+(*
+ ||M|| This file is part of HELM, an Hypertextual, Electronic
+ ||A|| Library of Mathematics, developed at the Computer Science
+ ||T|| Department, University of Bologna, Italy.
+ ||I||
+ ||T|| HELM is free software; you can redistribute it and/or
+ ||A|| modify it under the terms of the GNU General Public License
+ \ / version 2 or (at your option) any later version.
+ \ / This software is distributed as is, NO WARRANTY.
+ V_______________________________________________________________ *)
+
{
module O = Options
+(*
+ ||M|| This file is part of HELM, an Hypertextual, Electronic
+ ||A|| Library of Mathematics, developed at the Computer Science
+ ||T|| Department, University of Bologna, Italy.
+ ||I||
+ ||T|| HELM is free software; you can redistribute it and/or
+ ||A|| modify it under the terms of the GNU General Public License
+ \ / version 2 or (at your option) any later version.
+ \ / This software is distributed as is, NO WARRANTY.
+ V_______________________________________________________________ *)
+
module A = Arg
module P = Printf
module O = Options
module L = Lexer
-let help = "Usage: mac [ -LX ]* [ <file> ]*"
+let help = "Usage: mac [ -LXQV | -p <int> ]* [ <file> ]*"
let help_L = " Activate lexer debugging"
let help_Q = " Read data from standard input"
let help_V = " Show version information"
let help_X = " Reset options and counters"
+let help_p = "<int> Assume <int> characters per page (default: 5120)"
let active = ref false
L.token lexbuf; active := true
let output_version () =
- P.printf "mac 0.1.0 M - November 2012\n"
+ P.printf "mac 0.1.1 M - July 2013\n"
let process_stdin () =
process_channel stdin
let ich = open_in fname in
process_channel ich; close_in ich
+let set_page i =
+ if i > 0 then O.page := i
+
let output_count () =
- if !active then P.printf "%u\n" !O.count
+ if !active then
+ let pages = !O.count / !O.page in
+ let pages = if !O.count mod !O.page = 0 then pages else succ pages in
+ P.printf "%u %u\n" !O.count pages
let main () =
A.parse [
+(*
+ ||M|| This file is part of HELM, an Hypertextual, Electronic
+ ||A|| Library of Mathematics, developed at the Computer Science
+ ||T|| Department, University of Bologna, Italy.
+ ||I||
+ ||T|| HELM is free software; you can redistribute it and/or
+ ||A|| modify it under the terms of the GNU General Public License
+ \ / version 2 or (at your option) any later version.
+ \ / This software is distributed as is, NO WARRANTY.
+ V_______________________________________________________________ *)
+
let debug_lexer_default = false
let count_default = 0
+let page_default = 5120
+
let debug_lexer = ref debug_lexer_default
let count = ref count_default
+let page = ref page_default
+
let clear () =
debug_lexer := debug_lexer_default;
- count := count_default
+ count := count_default;
+ page := page_default
--- /dev/null
+(*
+ ||M|| This file is part of HELM, an Hypertextual, Electronic
+ ||A|| Library of Mathematics, developed at the Computer Science
+ ||T|| Department, University of Bologna, Italy.
+ ||I||
+ ||T|| HELM is free software; you can redistribute it and/or
+ ||A|| modify it under the terms of the GNU General Public License
+ \ / version 2 or (at your option) any later version.
+ \ / This software is distributed as is, NO WARRANTY.
+ V_______________________________________________________________ *)
+
+val debug_lexer: bool ref
+
+val count: int ref
+
+val page: int ref
+
+val clear: unit -> unit
module O = Options
module E = Engine
-let src_exists path = !O.no_devel || Y.file_exists path
+let is_obj path =
+ F.check_suffix path ".con.ng" &
+ F.check_suffix path ".ind.ng" &
+ F.check_suffix path ".var.ng"
+
+let src_exists path = !O.no_devel || Y.file_exists path
let mk_file path =
if F.check_suffix path "/" then S.sub path 0 (pred (S.length path))
O.remove := F.concat base path :: !O.remove
let rec scan_entry base devel path =
- if F.check_suffix path ".con.ng" then add_obj path else
- if F.check_suffix path ".ind.ng" then add_obj path else
- if F.check_suffix path ".var.ng" then add_obj path else
+ if is_obj path then add_obj path else
if F.check_suffix path ".ng" then
if src_exists (F.chop_extension devel ^ ".ma")
then add_src devel path else add_remove base path
rmdir (F.dirname dir)
in
if Y.file_exists dir then begin
- A.iter map (Y.readdir dir);
- try rmdir dir with U.Unix_error _ -> ()
+ try A.iter map (Y.readdir dir); rmdir dir
+ with U.Unix_error _ -> ()
end
let objects () =
TRIM := sed "s/ \\+$$//"
-XOA_CONF := ground_2/xoa.conf.xml
-XOA_TARGETS := ground_2/xoa_notation.ma ground_2/xoa.ma
+XOA_CONF := ground_2/xoa.conf.xml
+XOA_TARGETS := ground_2/xoa_notation.ma ground_2/xoa.ma
-XOA_DIR := ../../../components/binaries/xoa
-XOA := xoa.native
-XOA_OPTS := ../../matita.conf.xml $(XOA_CONF)
+XOA_DIR := ../../../components/binaries/xoa
+XOA := xoa.native
+XOA_OPTS := ../../matita.conf.xml $(XOA_CONF)
-DEP_DIR := ../../../components/binaries/matitadep
-DEP := matitadep.native
+XOA2_CONF := ground_2/xoa2.conf.xml
+XOA2_TARGETS := ground_2/xoa2_notation.ma ground_2/xoa2.ma
+XOA2_OPTS := ../../matita.conf.xml $(XOA2_CONF)
-MAC_DIR := ../../../components/binaries/mac
-MAC := mac.native
+DEP_DIR := ../../../components/binaries/matitadep
+DEP := matitadep.native
-PRB_DIR := ../../../components/binaries/probe
-PRB := probe.native
-PRB_OPTS := $(XOA_OPTS) -g
+MAC_DIR := ../../../components/binaries/mac
+MAC := mac.native
+MAC_OPTS :=
-ORIG := . ./orig.sh
-ORIGS := basic_2/basic_1.orig
+PRB_DIR := ../../../components/binaries/probe
+PRB := probe.native
+PRB_OPTS := $(XOA_OPTS) -g
-TAGS := all xoa orig deps stats tbls trim
+ORIG := . ./orig.sh
+ORIGS := basic_2/basic_1.orig
+
+TAGS := all xoa xoa2 orig elim deps stats tbls trim
PACKAGES := ground_2 basic_2 apps_2
$(1)/$(1)_probe.txt: $$(MAS_$(1))
@echo " PROBE $(1)"
$$(H)$$(PRB_DIR)/$$(PRB) $$(PRB_OPTS) $(1) -sn -on -i > $$@
+
+$(1)/$(1)_mac.txt: $$(MAS_$(1))
+ @echo " MAC $(1)"
+ $$(H)$$(MAC_DIR)/$$(MAC) $$(MAC_OPTS) $$^ > $$@
endef
$(foreach PKG, $(PACKAGES), $(eval $(call MAS_TEMPLATE,$(PKG))))
@echo " EXEC $(XOA) $(XOA_CONF)"
$(H)MATITA_RT_BASE_DIR=../.. $(XOA_DIR)/$(XOA) $(XOA_OPTS)
+# xoa2 #######################################################################
+
+xoa2: $(XOA2_TARGETS)
+
+$(XOA2_TARGETS): $(XOA2_CONF)
+ @echo " EXEC $(XOA) $(XOA2_CONF)"
+ $(H)MATITA_RT_BASE_DIR=../.. $(XOA_DIR)/$(XOA) $(XOA2_OPTS)
+
+# elim #######################################################################
+
+elim:
+ @echo " MATITADEP"
+ $(H)grep "elim (.*?)" $(MAS)
+
# orig #######################################################################
orig: $(ORIGS)
STTS += $$(STT_$(1))
$$(STT_$(1)): S0 = $$(shell cat $(1)/$(1)_probe.txt)
- $$(STT_$(1)): S1 := $$(shell $$(MAC_DIR)/$$(MAC) $$(MAS_$(1)))
- $$(STT_$(1)): S3 = $$(shell echo $$$$(($$(S1) / 5120)))
+ $$(STT_$(1)): S1 = $$(shell cat $(1)/$(1)_mac.txt)
$$(STT_$(1)): S4 = $$(shell ls $$(MAS_$(1)) | wc -l)
$$(STT_$(1)): P1 = $$(shell grep "theorem " $$(MAS_$(1)) | wc -l)
$$(STT_$(1)): P2 = $$(shell grep "lemma " $$(MAS_$(1)) | wc -l)
$$(STT_$(1)): M2 = $$(shell grep "$$(OPEN)\*[^*:]*$$$$" $$(MAS_$(1)) | wc -l)
$$(STT_$(1)): M3 = $$(shell grep "(\*\*)" $$(MAS_$(1)) | wc -l)
-$$(STT_$(1)): $$(MAS_$(1)) $(1)/$(1)_probe.txt
+$$(STT_$(1)): $$(MAS_$(1)) $(1)/$(1)_probe.txt $(1)/$(1)_mac.txt
@printf '\x1B[1;40;37m'
@printf '%-15s %-47s' 'Statistics for:' $(1)
@printf '\x1B[0m\n'
@printf '\x1B[1;40;35m'
- @printf '%-8s %6i' Chars $$(S1)
- @printf ' %-8s %4i' Pages $$(S3)
+ @printf '%-8s %6i' Chars $$(word 1, $$(S1))
+ @printf ' %-8s %4i' Pages $$(word 2, $$(S1))
@printf ' %-7s %7i' Nodes $$(word 3, $$(S0))
@printf ' %-11s' ''
@printf '\x1B[0m\n'
SUMS += $$(SUM_$(1))
$$(SUM_$(1)): S0 = $$(shell cat $(1)/$(1)_probe.txt)
- $$(SUM_$(1)): S1 = $$(shell $$(MAC_DIR)/$$(MAC) $$(MAS_$(1)))
+ $$(SUM_$(1)): S1 = $$(shell cat $(1)/$(1)_mac.txt)
$$(SUM_$(1)): S4 = $$(shell ls $$(MAS_$(1)) | wc -l)
$$(SUM_$(1)): C1 = $$(shell grep "inductive \|record " $$(MAS_$(1)) | wc -l)
$$(SUM_$(1)): C2 = $$(shell grep "definition \|let rec " $$(MAS_$(1)) | wc -l)
$$(SUM_$(1)): P2 = $$(shell grep "lemma " $$(MAS_$(1)) | wc -l)
$$(SUM_$(1)): P3 = $$(shell grep "lemma \|theorem " $$(MAS_$(1)) | wc -l)
- $$(SUM_$(1)): $$(MAS_$(1)) $(1)/$(1)_probe.txt
+ $$(SUM_$(1)): $$(MAS_$(1)) $(1)/$(1)_probe.txt $(1)/$(1)_mac.txt
@printf ' SUMMARY $(1)\n'
@printf 'name "$$(basename $$(@F))"\n\n' > $$@
@printf 'table {\n' >> $$@
@printf ' ]\n' >> $$@
@printf ' class "cyan" [ "sizes"\n' >> $$@
@printf ' [ "files" "$$(S4)" ]\n' >> $$@
- @printf ' [ "characters" "$$(S1)" ]\n' >> $$@
+ @printf ' [ "characters" "$$(word 1, $$(S1))" ]\n' >> $$@
@printf ' [ "nodes" "$$(word 3, $$(S0))" ]\n' >> $$@
@printf ' ]\n' >> $$@
@printf ' class "green" [ "propositions"\n' >> $$@
@printf 'class "component" { 0 }\n\n' >> $$@
@printf 'class "plane" { 1 } { 3 } { 5 }\n\n' >> $$@
@printf 'class "number" { 2 } { 4 } { 6 }\n' >> $$@
+
+.PHONY: $$(SUM_$(1))
endef
ifeq ($(MAKECMDGOALS), tbls)
lemma flift_join: ∀e1,e2,T. ⇧[e1, e2] ↑[0, e1] T ≡ ↑[0, e1 + e2] T.
#e1 #e2 #T
lapply (flift_lift T 0 (e1+e2)) #H
-elim (lift_split … H e1 e1 ? ? ?) -H // #U #H
+elim (lift_split … H e1 e1) -H // #U #H
>(flift_inv_lift … H) -H //
qed.
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/ineint_4.ma".
include "basic_2/grammar/aarity.ma".
include "basic_2/substitution/gr2_gr2.ma".
include "basic_2/substitution/lifts_lift_vector.ma".
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/notation/relations/dpredstar_5.ma".
+include "basic_2/unfold/sstas.ma".
+include "basic_2/computation/cprs.ma".
+
+(* DECOMPOSED EXTENDED PARALLEL COMPUTATION ON TERMS ************************)
+
+definition cpds: ∀h. sd h → lenv → relation term ≝ λh,g,L,T1,T2.
+ ∃∃T. ⦃h, L⦄ ⊢ T1 •*[g] T & L ⊢ T ➡* T2.
+
+interpretation "decomposed extended parallel computation (term)"
+ 'DPRedStar h g L T1 T2 = (cpds h g L T1 T2).
+
+(* Basic properties *********************************************************)
+
+lemma cpds_refl: ∀h,g,L. reflexive … (cpds h g L).
+/2 width=3/ qed.
+
+lemma sstas_cpds: ∀h,g,L,T1,T2. ⦃h, L⦄ ⊢ T1 •*[g] T2 → ⦃h, L⦄ ⊢ T1 •*➡*[g] T2.
+/2 width=3/ qed.
+
+lemma cprs_cpds: ∀h,g,L,T1,T2. L ⊢ T1 ➡* T2 → ⦃h, L⦄ ⊢ T1 •*➡*[g] T2.
+/2 width=3/ qed.
+
+lemma cpds_strap1: ∀h,g,L,T1,T,T2.
+ ⦃h, L⦄ ⊢ T1 •*➡*[g] T → L ⊢ T ➡ T2 → ⦃h, L⦄ ⊢ T1 •*➡*[g] T2.
+#h #g #L #T1 #T #T2 * /3 width=5/
+qed.
+
+lemma cpds_strap2: ∀h,g,L,T1,T,T2,l.
+ ⦃h, L⦄ ⊢ T1 •[g] ⦃l+1, T⦄ → ⦃h, L⦄ ⊢ T •*➡*[g] T2 → ⦃h, L⦄ ⊢ T1 •*➡*[g] T2.
+#h #g #L #T1 #T #T2 #l #HT1 * /3 width=4/
+qed.
+
+lemma ssta_cprs_cpds: ∀h,g,L,T1,T,T2,l. ⦃h, L⦄ ⊢ T1 •[g] ⦃l+1, T⦄ →
+ L ⊢ T ➡* T2 → ⦃h, L⦄ ⊢ T1 •*➡*[g] T2.
+/3 width=3/ qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/unfold/sstas_aaa.ma".
+include "basic_2/computation/cpxs_aaa.ma".
+include "basic_2/computation/cpds.ma".
+
+(* DECOMPOSED EXTENDED PARALLEL COMPUTATION ON TERMS ************************)
+
+(* Properties on atomic arity assignment for terms **************************)
+
+lemma cpds_aaa: ∀h,g,L,T,A. L ⊢ T ⁝ A → ∀U. ⦃h, L⦄ ⊢ T •*➡*[g] U → L ⊢ U ⁝ A.
+#h #g #L #T #A #HT #U * /3 width=5 by sstas_aaa, aaa_cprs_conf/
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/unfold/sstas_sstas.ma".
+include "basic_2/computation/lprs_cprs.ma".
+include "basic_2/computation/cpds.ma".
+
+(* DECOMPOSED EXTENDED PARALLEL COMPUTATION ON TERMS ************************)
+
+(* Advanced properties ******************************************************)
+
+lemma cpds_cprs_trans: ∀h,g,L,T1,T,T2.
+ ⦃h, L⦄ ⊢ T1 •*➡*[g] T → L ⊢ T ➡* T2 → ⦃h, L⦄ ⊢ T1 •*➡*[g] T2.
+#h #g #L #T1 #T #T2 * #T0 #HT10 #HT0 #HT2
+lapply (cprs_trans … HT0 … HT2) -T /2 width=3/
+qed-.
+
+lemma sstas_cpds_trans: ∀h,g,L,T1,T,T2.
+ ⦃h, L⦄ ⊢ T1 •*[g] T → ⦃h, L⦄ ⊢ T •*➡*[g] T2 → ⦃h, L⦄ ⊢ T1 •*➡*[g] T2.
+#h #g #L #T1 #T #T2 #HT1 * #T0 #HT0 #HT02
+lapply (sstas_trans … HT1 … HT0) -T /2 width=3/
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma cpds_inv_abst1: ∀h,g,a,L,V1,T1,U2. ⦃h, L⦄ ⊢ ⓛ{a}V1. T1 •*➡*[g] U2 →
+ ∃∃V2,T2. L ⊢ V1 ➡* V2 & ⦃h, L.ⓛV1⦄ ⊢ T1 •*➡*[g] T2 &
+ U2 = ⓛ{a}V2. T2.
+#h #g #a #L #V1 #T1 #U2 * #X #H1 #H2
+elim (sstas_inv_bind1 … H1) -H1 #U #HTU1 #H destruct
+elim (cprs_inv_abst1 … H2) -H2 #V2 #T2 #HV12 #HUT2 #H destruct /3 width=5/
+qed-.
+
+lemma cpds_inv_abbr_abst: ∀h,g,a1,a2,L,V1,W2,T1,T2. ⦃h, L⦄ ⊢ ⓓ{a1}V1.T1 •*➡*[g] ⓛ{a2}W2.T2 →
+ ∃∃T. ⦃h, L.ⓓV1⦄ ⊢ T1 •*➡*[g] T & ⇧[0, 1] ⓛ{a2}W2.T2 ≡ T & a1 = true.
+#h #g #a1 #a2 #L #V1 #W2 #T1 #T2 * #X #H1 #H2
+elim (sstas_inv_bind1 … H1) -H1 #U1 #HTU1 #H destruct
+elim (cprs_inv_abbr1 … H2) -H2 *
+[ #V2 #U2 #HV12 #HU12 #H destruct
+| /3 width=3/
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/unfold/sstas_lift.ma".
+include "basic_2/computation/cprs_lift.ma".
+include "basic_2/computation/cpds.ma".
+
+(* DECOMPOSED EXTENDED PARALLEL COMPUTATION ON TERMS ************************)
+
+(* Relocation properties ****************************************************)
+
+lemma cpds_lift: ∀L,K,d,e. ⇩[d, e] L ≡ K → ∀T1,U1. ⇧[d, e] T1 ≡ U1 →
+ ∀h,g,T2. ⦃h, K⦄ ⊢ T1 •*➡*[g] T2 → ∀U2. ⇧[d, e] T2 ≡ U2 →
+ ⦃h, L⦄ ⊢ U1 •*➡*[g] U2.
+#L #K #d #e #HLK #T1 #U1 #HTU1 #h #g #T2 * #T
+elim (lift_total T d e) /3 width=11/
+qed.
+
+lemma cpds_inv_lift1: ∀L,K,d,e. ⇩[d, e] L ≡ K →
+ ∀T1,U1. ⇧[d, e] T1 ≡ U1 → ∀h,g,U2. ⦃h, L⦄ ⊢ U1 •*➡*[g] U2 →
+ ∃∃T2. ⇧[d, e] T2 ≡ U2 & ⦃h, K⦄ ⊢ T1 •*➡*[g] T2.
+#L #K #d #e #HLK #T1 #U1 #HTU1 #h #g #U2 * #U #HU1 #HU2
+elim (sstas_inv_lift1 … HU1 … HLK … HTU1) -U1 #T #HT1 #HTU
+elim (cprs_inv_lift1 … HU2 … HLK … HTU) -U -L /3 width=5/
+qed-.
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/peval_3.ma".
include "basic_2/computation/cprs.ma".
include "basic_2/computation/csn.ma".
(* Basic_properties *********************************************************)
(* Basic_1: was just: nf2_sn3 *)
-axiom csn_cpre: ∀h,g,L,T1. ⦃h, L⦄ ⊢ ⬊*[g] T1 → ∃T2. L ⊢ T1 ➡* 𝐍⦃T2⦄.
-(*
+lemma csn_cpre: ∀h,g,L,T1. ⦃h, L⦄ ⊢ ⬊*[g] T1 → ∃T2. L ⊢ T1 ➡* 𝐍⦃T2⦄.
#h #g #L #T1 #H @(csn_ind … H) -T1
#T1 #_ #IHT1
elim (cnr_dec L T1) /3 width=3/
* #T #H1T1 #H2T1
elim (IHT1 … H2T1) -IHT1 -H2T1 [2: /2 width=2/ ] #T2 * /4 width=3/
qed.
-*)
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/predstar_3.ma".
include "basic_2/reduction/cnr.ma".
(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
lemma cpr_cprs: ∀L,T1,T2. L ⊢ T1 ➡ T2 → L ⊢ T1 ➡* T2.
/2 width=1/ qed.
-lemma cpss_cprs: ∀L,T1,T2. L ⊢ T1 ▶* T2 → L ⊢ T1 ➡* T2.
-/3 width=1/ qed.
-
(* Basic_1: was: pr3_refl *)
lemma cprs_refl: ∀L,T. L ⊢ T ➡* T.
/2 width=1/ qed.
L ⊢ T1 ➡ T → L ⊢ T ➡* T2 → L ⊢ T1 ➡* T2.
normalize /2 width=3/ qed.
-lemma cprs_cpss_trans: ∀L,T1,T. L ⊢ T1 ➡* T → ∀T2. L ⊢ T ▶* T2 → L ⊢ T1 ➡* T2.
-/3 width=3/ qed-.
-
-lemma cpss_cprs_trans: ∀L,T1,T. L ⊢ T1 ▶* T → ∀T2. L ⊢ T ➡* T2 → L ⊢ T1 ➡* T2.
-/3 width=3/ qed-.
-
-lemma cprs_lsubr_trans: lsub_trans … cprs lsubr.
-/3 width=5 by cpr_lsubr_trans, TC_lsub_trans/
+lemma lsubx_cprs_trans: lsub_trans … cprs lsubx.
+/3 width=5 by lsubx_cpr_trans, TC_lsub_trans/
qed-.
(* Basic_1: was: pr3_pr1 *)
lemma tprs_cprs: ∀L,T1,T2. ⋆ ⊢ T1 ➡* T2 → L ⊢ T1 ➡* T2.
-#L #T1 #T2 #H @(cprs_lsubr_trans … H) -H //
-qed.
-
-lemma cprs_ext_bind_dx: ∀L,V1,V2. L ⊢ V1 ➡ V2 → ∀V,T1,T2. L.ⓛV ⊢ T1 ➡* T2 →
- ∀a,I. L ⊢ ⓑ{a,I}V1.T1 ➡* ⓑ{a,I}V2.T2.
-#L #V1 #V2 #HV12 #V #T1 #T2 #HT12 #a @(cprs_ind … HT12) -T2
-/3 width=1/ /3 width=6/
+#L #T1 #T2 #H @(lsubx_cprs_trans … H) -H //
qed.
lemma cprs_bind_dx: ∀L,V1,V2. L ⊢ V1 ➡ V2 → ∀I,T1,T2. L. ⓑ{I}V1 ⊢ T1 ➡* T2 →
#L #T1 #T2 #H elim H -T2 /2 width=3/ /3 width=1/
qed.
-lemma cprs_beta_dx: ∀a,L,V1,V2,W,T1,T2.
- L ⊢ V1 ➡ V2 → L.ⓛW ⊢ T1 ➡* T2 →
- L ⊢ ⓐV1.ⓛ{a}W.T1 ➡* ⓓ{a}V2.T2.
-#a #L #V1 #V2 #W #T1 #T2 #HV12 * -T2 /3 width=1/
-/4 width=6 by cprs_strap1, cprs_bind_dx, cprs_flat_dx, cpr_beta/ (**) (* auto too slow without trace *)
+lemma cprs_beta_dx: ∀a,L,V1,V2,W1,W2,T1,T2.
+ L ⊢ V1 ➡ V2 → L ⊢ W1 ➡ W2 → L.ⓛW1 ⊢ T1 ➡* T2 →
+ L ⊢ ⓐV1.ⓛ{a}W1.T1 ➡* ⓓ{a}ⓝW2.V2.T2.
+#a #L #V1 #V2 #W1 #W2 #T1 #T2 #HV12 #HW12 * -T2 /3 width=1/
+/4 width=7 by cprs_strap1, cprs_bind_dx, cprs_flat_dx, cpr_beta/ (**) (* auto too slow without trace *)
qed.
lemma cprs_theta_dx: ∀a,L,V1,V,V2,W1,W2,T1,T2.
>(cpr_inv_sort1 … HU2) -HU2 //
qed-.
-(* Basic_1: was pr3_gen_appl *)
-lemma cprs_inv_appl1: ∀L,V1,T1,U2. L ⊢ ⓐV1. T1 ➡* U2 →
- ∨∨ ∃∃V2,T2. L ⊢ V1 ➡* V2 & L ⊢ T1 ➡* T2 &
- U2 = ⓐV2. T2
- | ∃∃a,V2,W,T. L ⊢ V1 ➡* V2 &
- L ⊢ T1 ➡* ⓛ{a}W. T & L ⊢ ⓓ{a}V2. T ➡* U2
- | ∃∃a,V0,V2,V,T. L ⊢ V1 ➡* V0 & ⇧[0,1] V0 ≡ V2 &
- L ⊢ T1 ➡* ⓓ{a}V. T & L ⊢ ⓓ{a}V. ⓐV2. T ➡* U2.
-#L #V1 #T1 #U2 #H @(cprs_ind … H) -U2 /3 width=5/
-#U #U2 #_ #HU2 * *
-[ #V0 #T0 #HV10 #HT10 #H destruct
- elim (cpr_inv_appl1 … HU2) -HU2 *
- [ #V2 #T2 #HV02 #HT02 #H destruct /4 width=5/
- | #a #V2 #W2 #T #T2 #HV02 #HT2 #H1 #H2 destruct
- lapply (cprs_strap1 … HV10 … HV02) -V0 /5 width=7/
- | #a #V #V2 #W0 #W2 #T #T2 #HV0 #HV2 #HW02 #HT2 #H1 #H2 destruct
- @or3_intro2 @(ex4_5_intro … HV2 HT10) /2 width=3/ /3 width=1/ (**) (* explicit constructor. /5 width=8/ is too slow because TC_transitive gets in the way *)
- ]
-| /4 width=9/
-| /4 width=11/
-]
-qed-.
-
(* Basic_1: was: pr3_gen_cast *)
lemma cprs_inv_cast1: ∀L,W1,T1,U2. L ⊢ ⓝW1.T1 ➡* U2 → L ⊢ T1 ➡* U2 ∨
∃∃W2,T2. L ⊢ W1 ➡* W2 & L ⊢ T1 ➡* T2 & U2 = ⓝW2.T2.
lapply (H2T0 … H1T0) -H1T0 #H destruct /2 width=1/
qed-.
-(* Basic forward lemmas *****************************************************)
-
-(* Basic_1: was: pr3_gen_abst *)
-lemma cprs_fwd_abst1: ∀a,L,V1,T1,U2. L ⊢ ⓛ{a}V1. T1 ➡* U2 → ∀I,W.
- ∃∃V2,T2. L ⊢ V1 ➡* V2 & L. ⓑ{I} W ⊢ T1 ➡* T2 &
- U2 = ⓛ{a}V2. T2.
-#a #L #V1 #T1 #U2 #H @(cprs_ind … H) -U2 /2 width=5/
-#U #U2 #_ #HU2 #IHU1 #I #W
-elim (IHU1 I W) -IHU1 #V #T #HV1 #HT1 #H destruct
-elim (cpr_fwd_abst1 … HU2 I W) -HU2 #V2 #T2 #HV2 #HT2 #H destruct /3 width=5/
-qed-.
-
-lemma cprs_fwd_abst: ∀a,L,V1,V2,T1,T2. L ⊢ ⓛ{a}V1. T1 ➡* ⓛ{a}V2. T2 → ∀I,W.
- L ⊢ V1 ➡* V2 ∧ L. ⓑ{I} W ⊢ T1 ➡* T2.
-#a #L #V1 #V2 #T1 #T2 #H #I #W
-elim (cprs_fwd_abst1 … H I W) -H #V #T #HV1 #HT1 #H destruct /2 width=1/
-qed-.
-
(* Basic_1: removed theorems 13:
pr1_head_1 pr1_head_2 pr1_comp
clear_pr3_trans pr3_cflat pr3_gen_bind
theorem cprs_conf: ∀L. confluent2 … (cprs L) (cprs L).
#L @TC_confluent2 /2 width=3 by cpr_conf/ qed-. (**) (* auto /3 width=3/ does not work because a δ-expansion gets in the way *)
-theorem cprs_ext_bind: ∀L,V1,V2. L ⊢ V1 ➡* V2 → ∀V,T1,T2. L.ⓛV ⊢ T1 ➡* T2 →
- ∀a,I. L ⊢ ⓑ{a,I}V1. T1 ➡* ⓑ{a,I}V2. T2.
-#L #V1 #V2 #H #V #T1 #T2 #HT12 #a #I @(TC_ind_dx … V1 H) -V1 /2 width=3/
-#V1 #V0 #HV10 #_ #IHV02
-@(cprs_trans … IHV02) /2 width=1/
-qed.
-
theorem cprs_bind: ∀a,I,L,V1,V2,T1,T2. L. ⓑ{I}V1 ⊢ T1 ➡* T2 → L ⊢ V1 ➡* V2 →
L ⊢ ⓑ{a,I}V1. T1 ➡* ⓑ{a,I}V2. T2.
#a #I #L #V1 #V2 #T1 #T2 #HT12 #H @(cprs_ind … H) -V2 /2 width=1/
@(cprs_trans … IHV1) -IHV1 /2 width=1/
qed.
-theorem cprs_beta: ∀a,L,V1,V2,W,T1,T2.
- L.ⓛW ⊢ T1 ➡* T2 → L ⊢ V1 ➡* V2 →
- L ⊢ ⓐV1.ⓛ{a}W.T1 ➡* ⓓ{a}V2.T2.
-#a #L #V1 #V2 #W #T1 #T2 #HT12 #H @(cprs_ind … H) -V2 /2 width=1/
+theorem cprs_beta_rc: ∀a,L,V1,V2,W1,W2,T1,T2.
+ L ⊢ V1 ➡ V2 → L.ⓛW1 ⊢ T1 ➡* T2 → L ⊢ W1 ➡* W2 →
+ L ⊢ ⓐV1.ⓛ{a}W1.T1 ➡* ⓓ{a}ⓝW2.V2.T2.
+#a #L #V1 #V2 #W1 #W2 #T1 #T2 #HV12 #HT12 #H @(cprs_ind … H) -W2 /2 width=1/
+#W #W2 #_ #HW2 #IHW1
+@(cprs_trans … IHW1) -IHW1 /3 width=1/
+qed.
+
+theorem cprs_beta: ∀a,L,V1,V2,W1,W2,T1,T2.
+ L.ⓛW1 ⊢ T1 ➡* T2 → L ⊢ W1 ➡* W2 → L ⊢ V1 ➡* V2 →
+ L ⊢ ⓐV1.ⓛ{a}W1.T1 ➡* ⓓ{a}ⓝW2.V2.T2.
+#a #L #V1 #V2 #W1 #W2 #T1 #T2 #HT12 #HW12 #H @(cprs_ind … H) -V2 /2 width=1/
#V #V2 #_ #HV2 #IHV1
-@(cprs_trans … IHV1) /2 width=1/
+@(cprs_trans … IHV1) -IHV1 /3 width=1/
qed.
theorem cprs_theta_rc: ∀a,L,V1,V,V2,W1,W2,T1,T2.
@(cprs_trans … IHV0) /2 width=1/
qed.
+(* Advanced inversion lemmas ************************************************)
+
+(* Basic_1: was pr3_gen_appl *)
+lemma cprs_inv_appl1: ∀L,V1,T1,U2. L ⊢ ⓐV1.T1 ➡* U2 →
+ ∨∨ ∃∃V2,T2. L ⊢ V1 ➡* V2 & L ⊢ T1 ➡* T2 &
+ U2 = ⓐV2. T2
+ | ∃∃a,W,T. L ⊢ T1 ➡* ⓛ{a}W.T &
+ L ⊢ ⓓ{a}ⓝW.V1.T ➡* U2
+ | ∃∃a,V0,V2,V,T. L ⊢ V1 ➡* V0 & ⇧[0,1] V0 ≡ V2 &
+ L ⊢ T1 ➡* ⓓ{a}V.T &
+ L ⊢ ⓓ{a}V.ⓐV2.T ➡* U2.
+#L #V1 #T1 #U2 #H @(cprs_ind … H) -U2 [ /3 width=5/ ]
+#U #U2 #_ #HU2 * *
+[ #V0 #T0 #HV10 #HT10 #H destruct
+ elim (cpr_inv_appl1 … HU2) -HU2 *
+ [ #V2 #T2 #HV02 #HT02 #H destruct /4 width=5/
+ | #a #V2 #W #W2 #T #T2 #HV02 #HW2 #HT2 #H1 #H2 destruct
+ lapply (cprs_strap1 … HV10 … HV02) -V0 #HV12
+ lapply (lsubx_cpr_trans … HT2 (L.ⓓⓝW.V1) ?) -HT2 /2 width=1/ #HT2
+ @or3_intro1 @(ex2_3_intro … HT10) -HT10 /3 width=1/ (**) (* explicit constructor. /5 width=8/ is too slow because TC_transitive gets in the way *)
+ | #a #V #V2 #W0 #W2 #T #T2 #HV0 #HV2 #HW02 #HT2 #H1 #H2 destruct
+ @or3_intro2 @(ex4_5_intro … HV2 HT10) /2 width=3/ /3 width=1/ (**) (* explicit constructor. /5 width=8/ is too slow because TC_transitive gets in the way *)
+ ]
+| /4 width=9/
+| /4 width=11/
+]
+qed-.
+
(* Properties concerning sn parallel reduction on local environments ********)
(* Basic_1: was just: pr3_pr2_pr2_t *)
|4,6: /3 width=1/
| #L2 #V2 #T1 #T #T2 #_ #HT2 #IHT1 #L1 #HL12
lapply (IHT1 (L1.ⓓV2) ?) -IHT1 /2 width=1/ /2 width=3/
-| #a #L2 #V1 #V2 #W #T1 #T2 #_ #_ #IHV12 #IHT12 #L1 #HL12
- lapply (IHT12 (L1.ⓛW) ?) -IHT12 /2 width=1/ /3 width=1/
+| #a #L2 #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #L1 #HL12
+ lapply (IHT12 (L1.ⓛW1) ?) -IHT12 /2 width=1/ /3 width=1/
| #a #L2 #V1 #V #V2 #W1 #W2 #T1 #T2 #_ #HV2 #_ #_ #IHV1 #IHW12 #IHT12 #L1 #HL12
lapply (IHT12 (L1.ⓓW1) ?) -IHT12 /2 width=1/ /3 width=3/
]
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/substitution/lpss_lpss.ma".
-include "basic_2/reduction/lpr_lpss.ma".
-include "basic_2/computation/cprs.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
-
-(* Properties on parallel substitution for terms ****************************)
-
-(* Basic_1: was: pr3_subst1 *)
-lemma cprs_cpss_conf: ∀L,T0,T1. L ⊢ T0 ➡* T1 → ∀T2. L ⊢ T0 ▶* T2 →
- ∃∃T. L ⊢ T1 ▶* T & L ⊢ T2 ➡* T.
-#L @TC_strip1 /2 width=3 by cpr_cpss_conf/ qed-. (**) (* auto /3 width=3/ fails because a δ-expansion gets in the way *)
-
-(* Properties on sn parallel substitution for local environments ************)
-
-lemma cprs_lpss_conf_dx: ∀L0,T0,T1. L0 ⊢ T0 ➡* T1 → ∀L1. L0 ⊢ ▶* L1 →
- ∃∃T. L1 ⊢ T1 ▶* T & L1 ⊢ T0 ➡* T.
-#L0 #T0 #T1 #H elim H -T1
-[ #T1 #HT01 #L1 #HL01
- elim (cpr_lpss_conf_dx … HT01 … HL01) -L0 /3 width=3/
-| #T #T1 #_ #HT1 #IHT0 #L1 #HL01
- elim (IHT0 … HL01) #T2 #HT2 #HT02
- elim (cpr_lpss_conf_dx … HT1 … HL01) -L0 #T3 #HT13 #HT3
- elim (cpr_cpss_conf … HT3 … HT2) -T #T #HT3 #HT2
- lapply (cpss_trans … HT13 … HT3) -T3
- lapply (cprs_strap1 … HT02 … HT2) -T2 /2 width=3/
-]
-qed-.
-
-lemma cprs_lpss_conf_sn: ∀L0,T0,T1. L0 ⊢ T0 ➡* T1 → ∀L1. L0 ⊢ ▶* L1 →
- ∃∃T. L0 ⊢ T1 ▶* T & L1 ⊢ T0 ➡* T.
-#L0 #T0 #T1 #HT01 #L1 #HL01
-elim (cprs_lpss_conf_dx … HT01 … HL01) -HT01 #T #HT1
-lapply (lpss_cpss_trans … HL01 … HT1) -HT1 /2 width=3/
-qed-.
-
-lemma cprs_cpss_lpss_conf_sn: ∀L1,T1,U1. L1 ⊢ T1 ➡* U1 →
- ∀T2. L1 ⊢ T1 ▶* T2 → ∀L2. L1 ⊢ ▶* L2 →
- ∃∃U2. L2 ⊢ T2 ➡* U2 & L1 ⊢ U1 ▶* U2.
-#L1 #T1 #U1 #HTU1 #T2 #HT12 #L2 #HL12
-elim (cprs_cpss_conf … HTU1 … HT12) -T1 #U #HU1 #HT2U
-elim (cprs_lpss_conf_sn … HT2U … HL12) -HT2U -HL12 #U2 #HU2 #HTU2
-lapply (cpss_trans … HU1 … HU2) -U /2 width=3/
-qed-.
-
-lemma cprs_cpss_lpss_conf_dx: ∀L1,T1,U1. L1 ⊢ T1 ➡* U1 →
- ∀T2. L1 ⊢ T1 ▶* T2 → ∀L2. L1 ⊢ ▶* L2 →
- ∃∃U2. L2 ⊢ T2 ➡* U2 & L2 ⊢ U1 ▶* U2.
-#L1 #T1 #U1 #HTU1 #T2 #HT12 #L2 #HL12
-elim (cprs_lpss_conf_dx … HTU1 … HL12) -HTU1 #U2 #HU12 #HT1U2
-elim (lpss_cpss_conf_dx … HT12 … HL12) -L1 #T #HT1 #HT2
-elim (cprs_cpss_conf … HT1U2 … HT1) -T1 #U #HU2 #HTU
-lapply (cpss_trans … HU12 … HU2) -U2
-lapply (cpss_cprs_trans … HT2 … HTU) -T /2 width=3/
-qed-.
-
-
-lemma cprs_cpss2_lpss_conf_sn: ∀L1,T1,U1. L1 ⊢ T1 ➡* U1 → ∀T2. L1 ⊢ T1 ▶* T2 →
- ∀U2. L1 ⊢ U1 ▶* U2 → ∀L2. L1 ⊢ ▶* L2 →
- ∃∃U. L2 ⊢ T2 ➡* U & L1 ⊢ U2 ▶* U.
-#L1 #T1 #U1 #HTU1 #T2 #HT12 #U2 #HU12 #L2 #HL12
-elim (cprs_cpss_lpss_conf_sn … HTU1 … HT12 … HL12) -T1 #T1 #HT21 #HUT1
-elim (cpss_conf … HU12 … HUT1) -U1 #U1 #HU21 #HTU1
-elim (lpss_cpss_conf_sn … HTU1 … HL12) -HTU1 -HL12 #U2 #HT1U2 #HU12
-lapply (cpss_trans … HU21 … HU12) -U1
-lapply (cprs_cpss_trans … HT21 … HT1U2) -T1 /2 width=3/
-qed-.
-
-lemma cprs_cpss2_lpss_conf_dx: ∀L1,T1,U1. L1 ⊢ T1 ➡* U1 → ∀T2. L1 ⊢ T1 ▶* T2 →
- ∀U2. L1 ⊢ U1 ▶* U2 → ∀L2. L1 ⊢ ▶* L2 →
- ∃∃U. L2 ⊢ T2 ➡* U & L2 ⊢ U2 ▶* U.
-#L1 #T1 #U1 #HTU1 #T2 #HT12 #U2 #HU12 #L2 #HL12
-elim (cprs_cpss_lpss_conf_dx … HTU1 … HT12 … HL12) -T1 #T1 #HT21 #HUT1
-elim (lpss_cpss_conf_dx … HU12 … HL12) -L1 #U #HU1 #HU2
-elim (cpss_conf … HU1 … HUT1) -U1 #U1 #HU1 #HTU1
-lapply (cpss_trans … HU2 … HU1) -U
-lapply (cprs_cpss_trans … HT21 … HTU1) -T1 /2 width=3/
-qed-.
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/peval_5.ma".
include "basic_2/computation/cpxs.ma".
include "basic_2/computation/csn.ma".
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/predstar_5.ma".
include "basic_2/reduction/cnx.ma".
include "basic_2/computation/cprs.ma".
/3 width=5 by lsubx_cpx_trans, TC_lsub_trans/
qed-.
-axiom cprs_cpxs: ∀h,g,L,T1,T2. L ⊢ T1 ➡* T2 → ⦃h, L⦄ ⊢ T1 ➡*[g] T2.
-(*
+lemma cprs_cpxs: ∀h,g,L,T1,T2. L ⊢ T1 ➡* T2 → ⦃h, L⦄ ⊢ T1 ➡*[g] T2.
#h #g #L #T1 #T2 #H @(cprs_ind … H) -T2 // /3 width=3/
qed.
-*)
+
lemma cpxs_bind_dx: ∀h,g,L,V1,V2. ⦃h, L⦄ ⊢ V1 ➡[g] V2 →
∀I,T1,T2. ⦃h, L. ⓑ{I}V1⦄ ⊢ T1 ➡*[g] T2 →
∀a. ⦃h, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡*[g] ⓑ{a,I}V2.T2.
qed.
theorem cpxs_beta_rc: ∀h,g,a,L,V1,V2,W1,W2,T1,T2.
- ⦃h, L⦄ ⊢ V1 ➡[g] V2 → ⦃h, L.ⓛW1⦄ ⊢ T1 ➡*[g] T2 → ⦃h, L⦄ ⊢ W1 ➡*[g] W2 →
- ⦃h, L⦄ ⊢ ⓐV1.ⓛ{a}W1.T1 ➡*[g] ⓓ{a}ⓝW2.V2.T2.
+ ⦃h, L⦄ ⊢ V1 ➡[g] V2 → ⦃h, L.ⓛW1⦄ ⊢ T1 ➡*[g] T2 → ⦃h, L⦄ ⊢ W1 ➡*[g] W2 →
+ ⦃h, L⦄ ⊢ ⓐV1.ⓛ{a}W1.T1 ➡*[g] ⓓ{a}ⓝW2.V2.T2.
#h #g #a #L #V1 #V2 #W1 #W2 #T1 #T2 #HV12 #HT12 #H @(cpxs_ind … H) -W2 /2 width=1/
#W #W2 #_ #HW2 #IHW1
@(cpxs_trans … IHW1) -IHW1 /3 width=1/
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/sn_4.ma".
include "basic_2/reduction/cnx.ma".
(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERMS ********************)
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/snalt_4.ma".
include "basic_2/computation/cpxs.ma".
include "basic_2/computation/csn.ma".
#h #g #L #T1 #H
@csna_intro_aux #T #T2 #H @(cpxs_ind_dx … H) -T
[ -H #H destruct #H
- elim (H ?) //
+ elim H //
| #T0 #T #HLT1 #HLT2 #IHT #HT10 #HT12 destruct
elim (term_eq_dec T0 T) #HT0
[ -HLT1 -HLT2 -H /3 width=1/
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/unfold/sstas.ma".
-include "basic_2/computation/cprs.ma".
-
-(* DECOMPOSED EXTENDED PARALLEL COMPUTATION ON TERMS ************************)
-
-definition dxprs: ∀h. sd h → lenv → relation term ≝ λh,g,L,T1,T2.
- ∃∃T. ⦃h, L⦄ ⊢ T1 •*[g] T & L ⊢ T ➡* T2.
-
-interpretation "decomposed extended parallel computation (term)"
- 'DecomposedPRedStar h g L T1 T2 = (dxprs h g L T1 T2).
-
-(* Basic properties *********************************************************)
-
-lemma dxprs_refl: ∀h,g,L. reflexive … (dxprs h g L).
-/2 width=3/ qed.
-
-lemma sstas_dxprs: ∀h,g,L,T1,T2. ⦃h, L⦄ ⊢ T1 •*[g] T2 → ⦃h, L⦄ ⊢ T1 •*➡*[g] T2.
-/2 width=3/ qed.
-
-lemma cprs_dxprs: ∀h,g,L,T1,T2. L ⊢ T1 ➡* T2 → ⦃h, L⦄ ⊢ T1 •*➡*[g] T2.
-/2 width=3/ qed.
-
-lemma dxprs_strap1: ∀h,g,L,T1,T,T2.
- ⦃h, L⦄ ⊢ T1 •*➡*[g] T → L ⊢ T ➡ T2 → ⦃h, L⦄ ⊢ T1 •*➡*[g] T2.
-#h #g #L #T1 #T #T2 * /3 width=5/
-qed.
-
-lemma dxprs_strap2: ∀h,g,L,T1,T,T2,l.
- ⦃h, L⦄ ⊢ T1 •[g] ⦃l+1, T⦄ → ⦃h, L⦄ ⊢ T •*➡*[g] T2 → ⦃h, L⦄ ⊢ T1 •*➡*[g] T2.
-#h #g #L #T1 #T #T2 #l #HT1 * /3 width=4/
-qed.
-
-lemma ssta_cprs_dxprs: ∀h,g,L,T1,T,T2,l. ⦃h, L⦄ ⊢ T1 •[g] ⦃l+1, T⦄ →
- L ⊢ T ➡* T2 → ⦃h, L⦄ ⊢ T1 •*➡*[g] T2.
-/3 width=3/ qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma dxprs_inv_abst1: ∀h,g,a,L,V1,T1,U2. ⦃h, L⦄ ⊢ ⓛ{a}V1. T1 •*➡*[g] U2 →
- ∃∃V2,T2. L ⊢ V1 ➡* V2 & ⦃h, L.ⓛV1⦄ ⊢ T1 •*➡*[g] T2 &
- U2 = ⓛ{a}V2. T2.
-#h #g #a #L #V1 #T1 #U2 * #X #H1 #H2
-elim (sstas_inv_bind1 … H1) -H1 #U #HTU1 #H destruct
-elim (cprs_fwd_abst1 … H2 Abst V1) -H2 #V2 #T2 #HV12 #HUT2 #H destruct /3 width=5/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/unfold/sstas_aaa.ma".
-include "basic_2/computation/cpxs_aaa.ma".
-include "basic_2/computation/dxprs.ma".
-
-(* DECOMPOSED EXTENDED PARALLEL COMPUTATION ON TERMS ************************)
-
-(* Properties on atomic arity assignment for terms **************************)
-
-lemma dxprs_aaa: ∀h,g,L,T,A. L ⊢ T ⁝ A → ∀U. ⦃h, L⦄ ⊢ T •*➡*[g] U → L ⊢ U ⁝ A.
-#h #g #L #T #A #HT #U * /3 width=5 by sstas_aaa, aaa_cprs_conf/
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/unfold/sstas_sstas.ma".
-include "basic_2/computation/lprs_cprs.ma".
-include "basic_2/computation/dxprs.ma".
-
-(* DECOMPOSED EXTENDED PARALLEL COMPUTATION ON TERMS ************************)
-
-(* Advanced properties ******************************************************)
-
-lemma dxprs_cprs_trans: ∀h,g,L,T1,T,T2.
- ⦃h, L⦄ ⊢ T1 •*➡*[g] T → L ⊢ T ➡* T2 → ⦃h, L⦄ ⊢ T1 •*➡*[g] T2.
-#h #g #L #T1 #T #T2 * #T0 #HT10 #HT0 #HT2
-lapply (cprs_trans … HT0 … HT2) -T /2 width=3/
-qed-.
-
-lemma sstas_dxprs_trans: ∀h,g,L,T1,T,T2.
- ⦃h, L⦄ ⊢ T1 •*[g] T → ⦃h, L⦄ ⊢ T •*➡*[g] T2 → ⦃h, L⦄ ⊢ T1 •*➡*[g] T2.
-#h #g #L #T1 #T #T2 #HT1 * #T0 #HT0 #HT02
-lapply (sstas_trans … HT1 … HT0) -T /2 width=3/
-qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma dxprs_inv_abbr_abst: ∀h,g,a1,a2,L,V1,W2,T1,T2. ⦃h, L⦄ ⊢ ⓓ{a1}V1.T1 •*➡*[g] ⓛ{a2}W2.T2 →
- ∃∃T. ⦃h, L.ⓓV1⦄ ⊢ T1 •*➡*[g] T & ⇧[0, 1] ⓛ{a2}W2.T2 ≡ T & a1 = true.
-#h #g #a1 #a2 #L #V1 #W2 #T1 #T2 * #X #H1 #H2
-elim (sstas_inv_bind1 … H1) -H1 #U1 #HTU1 #H destruct
-elim (cprs_inv_abbr1 … H2) -H2 *
-[ #V2 #U2 #HV12 #HU12 #H destruct
-| /3 width=3/
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/unfold/sstas_lift.ma".
-include "basic_2/computation/cprs_lift.ma".
-include "basic_2/computation/dxprs.ma".
-
-(* DECOMPOSED EXTENDED PARALLEL COMPUTATION ON TERMS ************************)
-
-(* Relocation properties ****************************************************)
-
-lemma dxprs_lift: ∀L,K,d,e. ⇩[d, e] L ≡ K → ∀T1,U1. ⇧[d, e] T1 ≡ U1 →
- ∀h,g,T2. ⦃h, K⦄ ⊢ T1 •*➡*[g] T2 → ∀U2. ⇧[d, e] T2 ≡ U2 →
- ⦃h, L⦄ ⊢ U1 •*➡*[g] U2.
-#L #K #d #e #HLK #T1 #U1 #HTU1 #h #g #T2 * #T
-elim (lift_total T d e) /3 width=11/
-qed.
-
-lemma dxprs_inv_lift1: ∀L,K,d,e. ⇩[d, e] L ≡ K →
- ∀T1,U1. ⇧[d, e] T1 ≡ U1 → ∀h,g,U2. ⦃h, L⦄ ⊢ U1 •*➡*[g] U2 →
- ∃∃T2. ⇧[d, e] T2 ≡ U2 & ⦃h, K⦄ ⊢ T1 •*➡*[g] T2.
-#L #K #d #e #HLK #T1 #U1 #HTU1 #h #g #U2 * #U #HU1 #HU2
-elim (sstas_inv_lift1 … HU1 … HLK … HTU1) -U1 #T #HT1 #HTU
-elim (cprs_inv_lift1 … HU2 … HLK … HTU) -U -L /3 width=5/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/unfold/sstas_lpss.ma".
-include "basic_2/computation/cprs_lpss.ma".
-include "basic_2/computation/dxprs.ma".
-
-(* DECOMPOSED EXTENDED PARALLEL COMPUTATION ON TERMS ************************)
-
-(* Properties about sn parallel substitution for local environments *********)
-
-lemma dxprs_lpss_conf: ∀h,g,L1,T,U1. ⦃h, L1⦄ ⊢ T •*➡*[g] U1 → ∀L2. L1 ⊢ ▶* L2 →
- ∃∃U2. ⦃h, L2⦄ ⊢ T •*➡*[g] U2 & L1 ⊢ U1 ▶* U2.
-#h #g #L1 #T #U1 * #U #HTU #HU1 #L2 #HL12
-elim (sstas_lpss_conf … HTU … HL12) -HTU #U0 #HTU0 #HU0
-elim (cprs_cpss_conf … HU1 … HU0) -U #U #HU1 #HU0
-elim (cprs_lpss_conf_sn … HU0 … HL12) -HU0 -HL12 #U2 #HU2 #HU02
-lapply (cpss_trans … HU1 … HU2) -U /3 width=3/
-qed-.
-
-lemma dxprs_cpss_conf: ∀h,g,L,T1,U1. ⦃h, L⦄ ⊢ T1 •*➡*[g] U1 → ∀T2. L ⊢ T1 ▶* T2 →
- ∃∃U2. ⦃h, L⦄ ⊢ T2 •*➡*[g] U2 & L ⊢ U1 ▶* U2.
-#h #g #L #T1 #U1 * #W1 #HTW1 #HWU1 #T2 #HT12
-elim (sstas_cpss_conf … HTW1 … HT12) -T1 #W2 #HTW2 #HW12
-elim (cprs_cpss_conf … HWU1 … HW12) -W1 /3 width=3/
-qed-.
-
-lemma dxprs_cpss_lpss_conf: ∀h,g,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 •*➡*[g] U1 →
- ∀T2. L1 ⊢ T1 ▶* T2 → ∀L2. L1 ⊢ ▶* L2 →
- ∃∃U2. ⦃h, L2⦄ ⊢ T2 •*➡*[g] U2 & L1 ⊢ U1 ▶* U2.
-#h #g #L1 #T1 #U1 #HTU1 #T2 #HT12 #L2 #HL12
-elim (dxprs_cpss_conf … HTU1 … HT12) -T1 #U2 #HTU2 #HU12
-elim (dxprs_lpss_conf … HTU2 … HL12) -HTU2 -HL12 #U #HT2U #HU2
-lapply (cpss_trans … HU12 … HU2) -U2 /2 width=3/
-qed-.
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/predsnstar_2.ma".
include "basic_2/grammar/lpx_sn_tc.ma".
include "basic_2/reduction/lpr.ma".
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/predsnstaralt_2.ma".
include "basic_2/computation/cprs_cprs.ma".
include "basic_2/computation/lprs.ma".
(* Advanced properties ******************************************************)
lemma lprs_pair: ∀I,L1,L2. L1 ⊢ ➡* L2 → ∀V1,V2. L1 ⊢ V1 ➡* V2 →
- L1. ⓑ{I} V1 ⊢ ➡* L2. ⓑ{I} V2.
+ L1. ⓑ{I} V1 ⊢ ➡* L2.ⓑ{I} V2.
/2 width=1 by TC_lpx_sn_pair/ qed.
(* Advanced inversion lemmas ************************************************)
(* Inversion lemmas on context-sensitive parallel computation for terms *****)
+(* Basic_1: was: pr3_gen_abst *)
+lemma cprs_inv_abst1: ∀a,L,W1,T1,U2. L ⊢ ⓛ{a}W1.T1 ➡* U2 →
+ ∃∃W2,T2. L ⊢ W1 ➡* W2 & L.ⓛW1 ⊢ T1 ➡* T2 &
+ U2 = ⓛ{a}W2.T2.
+#a #L #V1 #T1 #U2 #H @(cprs_ind … H) -U2 /2 width=5/
+#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) ?) /2 width=1/ -HT02 #HT02
+lapply (cprs_strap1 … HV10 … HV02) -V0
+lapply (cprs_trans … HT10 … HT02) -T0 /2 width=5/
+qed-.
+
+lemma cprs_inv_abst: ∀a,L,W1,W2,T1,T2. L ⊢ ⓛ{a}W1.T1 ➡* ⓛ{a}W2.T2 →
+ L ⊢ W1 ➡* W2 ∧ L.ⓛW1 ⊢ T1 ➡* T2.
+#a #L #W1 #W2 #T1 #T2 #H
+elim (cprs_inv_abst1 … H) -H #W #T #HW1 #HT1 #H destruct /2 width=1/
+qed-.
+
(* Basic_1: was pr3_gen_abbr *)
lemma cprs_inv_abbr1: ∀a,L,V1,T1,U2. L ⊢ ⓓ{a}V1.T1 ➡* U2 → (
∃∃V2,T2. L ⊢ V1 ➡* V2 & L. ⓓV1 ⊢ T1 ➡* T2 &
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/reduction/lpr_lpss.ma".
-include "basic_2/computation/lprs.ma".
-
-(* SN PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ****************************)
-
-(* Properties on sn parallel substitution on local environments *************)
-
-lemma lprs_lpss_conf: confluent2 … lprs lpss.
-/3 width=3 by TC_strip1, lpr_lpss_conf/
-qed-.
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/predsnstar_4.ma".
include "basic_2/reduction/lpx.ma".
include "basic_2/computation/lprs.ma".
(* Basic properties *********************************************************)
-axiom lprs_lpxs: ∀h,g,L1,L2. L1 ⊢ ➡* L2 → ⦃h, L1⦄ ⊢ ➡*[g] L2.
-(*
+lemma lprs_lpxs: ∀h,g,L1,L2. L1 ⊢ ➡* L2 → ⦃h, L1⦄ ⊢ ➡*[g] L2.
/3 width=3/ qed.
-*)
+
lemma lpx_lpxs: ∀h,g,L1,L2. ⦃h, L1⦄ ⊢ ➡[g] L2 → ⦃h, L1⦄ ⊢ ➡*[g] L2.
/2 width=1/ qed.
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/predsnstaralt_4.ma".
include "basic_2/computation/cpxs_cpxs.ma".
include "basic_2/computation/lpxs.ma".
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/crsubeq_3.ma".
include "basic_2/static/aaa.ma".
include "basic_2/computation/acp_cr.ma".
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/pconv_3.ma".
include "basic_2/reduction/cpr.ma".
(* CONTEXT-SENSITIVE PARALLEL CONVERSION ON TERMS ***************************)
(* *)
(**************************************************************************)
-include "basic_2/equivalence/lsubss.ma".
+include "basic_2/notation/relations/crsubeqv_4.ma".
include "basic_2/dynamic/snv.ma".
(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************)
inductive lsubsv (h:sh) (g:sd h): relation lenv ≝
| lsubsv_atom: lsubsv h g (⋆) (⋆)
| lsubsv_pair: ∀I,L1,L2,V. lsubsv h g L1 L2 →
- lsubsv h g (L1. ⓑ{I} V) (L2. ⓑ{I} V)
-| lsubsv_abbr: ∀L1,L2,V1,V2,W1,W2,l. ⦃h, L1⦄ ⊢ V1 ¡[g] → ⦃h, L1⦄ ⊢ V1 •[g] ⦃l+1, W1⦄ →
- L1 ⊢ W1 ⬌* W2 → ⦃h, L2⦄ ⊢ W2 ¡[g] → ⦃h, L2⦄ ⊢ W2 •[g] ⦃l, V2⦄ →
- lsubsv h g L1 L2 → lsubsv h g (L1. ⓓV1) (L2. ⓛW2)
+ lsubsv h g (L1.ⓑ{I}V) (L2.ⓑ{I}V)
+| lsubsv_abbr: ∀L1,L2,W,V,W1,V2,l. ⦃h, L1⦄ ⊢ ⓝW.V ¡[g] → ⦃h, L2⦄ ⊢ W ¡[g] →
+ ⦃h, L1⦄ ⊢ V •[g] ⦃l+1, W1⦄ → ⦃h, L2⦄ ⊢ W •[g] ⦃l, V2⦄ →
+ lsubsv h g L1 L2 → lsubsv h g (L1.ⓓⓝW.V) (L2.ⓛW)
.
interpretation
#h #g #L1 #L2 * -L1 -L2
[ //
| #I #L1 #L2 #V #_ #H destruct
-| #L1 #L2 #V1 #V2 #W1 #W2 #l #_ #_ #_ #_ #_ #_ #H destruct
+| #L1 #L2 #W #V #V1 #V2 #l #_ #_ #_ #_ #_ #H destruct
]
qed-.
/2 width=5 by lsubsv_inv_atom1_aux/ qed-.
fact lsubsv_inv_pair1_aux: ∀h,g,L1,L2. h ⊢ L1 ¡⊑[g] L2 →
- ∀I,K1,V1. L1 = K1. ⓑ{I} V1 →
- (∃∃K2. h ⊢ K1 ¡⊑[g] K2 & L2 = K2. ⓑ{I} V1) ∨
- ∃∃K2,V2,W1,W2,l. ⦃h, K1⦄ ⊢ V1 ¡[g] & ⦃h, K1⦄ ⊢ V1 •[g] ⦃l+1, W1⦄ &
- K1 ⊢ W1 ⬌* W2 & ⦃h, K2⦄ ⊢ W2 ¡[g] & ⦃h, K2⦄ ⊢ W2 •[g] ⦃l, V2⦄ &
- h ⊢ K1 ¡⊑[g] K2 & L2 = K2. ⓛW2 & I = Abbr.
+ ∀I,K1,X. L1 = K1.ⓑ{I}X →
+ (∃∃K2. h ⊢ K1 ¡⊑[g] K2 & L2 = K2.ⓑ{I}X) ∨
+ ∃∃K2,W,V,W1,V2,l. ⦃h, K1⦄ ⊢ X ¡[g] & ⦃h, K2⦄ ⊢ W ¡[g] &
+ ⦃h, K1⦄ ⊢ V •[g] ⦃l+1, W1⦄ & ⦃h, K2⦄ ⊢ W •[g] ⦃l, V2⦄ &
+ h ⊢ K1 ¡⊑[g] K2 &
+ I = Abbr & L2 = K2.ⓛW & X = ⓝW.V.
#h #g #L1 #L2 * -L1 -L2
-[ #J #K1 #U1 #H destruct
-| #I #L1 #L2 #V #HL12 #J #K1 #U1 #H destruct /3 width=3/
-| #L1 #L2 #V1 #V2 #W1 #W2 #l #HV1 #HVW1 #HW12 #HW2 #HWV2 #HL12 #J #K1 #U1 #H destruct /3 width=11/
+[ #J #K1 #X #H destruct
+| #I #L1 #L2 #V #HL12 #J #K1 #X #H destruct /3 width=3/
+| #L1 #L2 #W #V #W1 #V2 #l #HV #HW #HW1 #HV2 #HL12 #J #K1 #X #H destruct /3 width=12/
]
qed-.
-lemma lsubsv_inv_pair1: ∀h,g,I,K1,L2,V1. h ⊢ K1. ⓑ{I} V1 ¡⊑[g] L2 →
- (∃∃K2. h ⊢ K1 ¡⊑[g] K2 & L2 = K2. ⓑ{I} V1) ∨
- ∃∃K2,V2,W1,W2,l. ⦃h, K1⦄ ⊢ V1 ¡[g] & ⦃h, K1⦄ ⊢ V1 •[g] ⦃l+1, W1⦄ &
- K1 ⊢ W1 ⬌* W2 & ⦃h, K2⦄ ⊢ W2 ¡[g] & ⦃h, K2⦄ ⊢ W2 •[g] ⦃l, V2⦄ &
- h ⊢ K1 ¡⊑[g] K2 & L2 = K2. ⓛW2 & I = Abbr.
+lemma lsubsv_inv_pair1: ∀h,g,I,K1,L2,X. h ⊢ K1.ⓑ{I}X ¡⊑[g] L2 →
+ (∃∃K2. h ⊢ K1 ¡⊑[g] K2 & L2 = K2.ⓑ{I}X) ∨
+ ∃∃K2,W,V,W1,V2,l. ⦃h, K1⦄ ⊢ X ¡[g] & ⦃h, K2⦄ ⊢ W ¡[g] &
+ ⦃h, K1⦄ ⊢ V •[g] ⦃l+1, W1⦄ & ⦃h, K2⦄ ⊢ W •[g] ⦃l, V2⦄ &
+ h ⊢ K1 ¡⊑[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,L1,L2. h ⊢ L1 ¡⊑[g] L2 → L2 = ⋆ → L1 = ⋆.
#h #g #L1 #L2 * -L1 -L2
[ //
| #I #L1 #L2 #V #_ #H destruct
-| #L1 #L2 #V1 #V2 #W1 #W2 #l #_ #_ #_ #_ #_ #_ #H destruct
+| #L1 #L2 #W #V #V1 #V2 #l #_ #_ #_ #_ #_ #H destruct
]
qed-.
/2 width=5 by lsubsv_inv_atom2_aux/ qed-.
fact lsubsv_inv_pair2_aux: ∀h,g,L1,L2. h ⊢ L1 ¡⊑[g] L2 →
- ∀I,K2,W2. L2 = K2. ⓑ{I} W2 →
- (∃∃K1. h ⊢ K1 ¡⊑[g] K2 & L1 = K1. ⓑ{I} W2) ∨
- ∃∃K1,W1,V1,V2,l. ⦃h, K1⦄ ⊢ V1 ¡[g] & ⦃h, K1⦄ ⊢ V1 •[g] ⦃l+1, W1⦄ &
- K1 ⊢ W1 ⬌* W2 & ⦃h, K2⦄ ⊢ W2 ¡[g] & ⦃h, K2⦄ ⊢ W2 •[g] ⦃l, V2⦄ &
- h ⊢ K1 ¡⊑[g] K2 & L1 = K1. ⓓV1 & I = Abst.
+ ∀I,K2,W. L2 = K2.ⓑ{I}W →
+ (∃∃K1. h ⊢ K1 ¡⊑[g] K2 & L1 = K1.ⓑ{I}W) ∨
+ ∃∃K1,V,W1,V2,l. ⦃h, K1⦄ ⊢ ⓝW.V ¡[g] & ⦃h, K2⦄ ⊢ W ¡[g] &
+ ⦃h, K1⦄ ⊢ V •[g] ⦃l+1, W1⦄ & ⦃h, K2⦄ ⊢ W •[g] ⦃l, V2⦄ &
+ h ⊢ K1 ¡⊑[g] K2 & I = Abst & L1 = K1. ⓓⓝW.V.
#h #g #L1 #L2 * -L1 -L2
-[ #J #K2 #U2 #H destruct
-| #I #L1 #L2 #V #HL12 #J #K2 #U2 #H destruct /3 width=3/
-| #L1 #L2 #V1 #V2 #W1 #W2 #l #HV #HVW1 #HW12 #HW2 #HWV2 #HL12 #J #K2 #U2 #H destruct /3 width=11/
+[ #J #K2 #U #H destruct
+| #I #L1 #L2 #V #HL12 #J #K2 #U #H destruct /3 width=3/
+| #L1 #L2 #W #V #W1 #V2 #l #HV #HW #HW1 #HV2 #HL12 #J #K2 #U #H destruct /3 width=10/
]
qed-.
-lemma lsubsv_inv_pair2: ∀h,g,I,L1,K2,W2. h ⊢ L1 ¡⊑[g] K2. ⓑ{I} W2 →
- (∃∃K1. h ⊢ K1 ¡⊑[g] K2 & L1 = K1. ⓑ{I} W2) ∨
- ∃∃K1,W1,V1,V2,l. ⦃h, K1⦄ ⊢ V1 ¡[g] & ⦃h, K1⦄ ⊢ V1 •[g] ⦃l+1, W1⦄ &
- K1 ⊢ W1 ⬌* W2 & ⦃h, K2⦄ ⊢ W2 ¡[g] & ⦃h, K2⦄ ⊢ W2 •[g] ⦃l, V2⦄ &
- h ⊢ K1 ¡⊑[g] K2 & L1 = K1. ⓓV1 & I = Abst.
+lemma lsubsv_inv_pair2: ∀h,g,I,L1,K2,W. h ⊢ L1 ¡⊑[g] K2.ⓑ{I}W →
+ (∃∃K1. h ⊢ K1 ¡⊑[g] K2 & L1 = K1.ⓑ{I}W) ∨
+ ∃∃K1,V,W1,V2,l. ⦃h, K1⦄ ⊢ ⓝW.V ¡[g] & ⦃h, K2⦄ ⊢ W ¡[g] &
+ ⦃h, K1⦄ ⊢ V •[g] ⦃l+1, W1⦄ & ⦃h, K2⦄ ⊢ W •[g] ⦃l, V2⦄ &
+ h ⊢ K1 ¡⊑[g] K2 & I = Abst & L1 = K1. ⓓⓝW.V.
/2 width=3 by lsubsv_inv_pair2_aux/ qed-.
(* Basic_forward lemmas *****************************************************)
-lemma lsubsv_fwd_lsubss: ∀h,g,L1,L2. h ⊢ L1 ¡⊑[g] L2 → h ⊢ L1 •⊑[g] L2.
-#h #g #L1 #L2 #H elim H -L1 -L2 // /2 width=1/ /2 width=6/
-qed-.
-
-lemma lsubsv_fwd_lsubr1: ∀h,g,L1,L2. h ⊢ L1 ¡⊑[g] L2 → L1 ⊑ L2.
-/3 width=3 by lsubsv_fwd_lsubss, lsubss_fwd_lsubr1/
-qed-.
-
-lemma lsubsv_fwd_lsubr2: ∀h,g,L1,L2. h ⊢ L1 ¡⊑[g] L2 → L1 ⊑ L2.
-/3 width=3 by lsubsv_fwd_lsubss, lsubss_fwd_lsubr2/
+lemma lsubsv_fwd_lsubx: ∀h,g,L1,L2. h ⊢ L1 ¡⊑[g] L2 → L1 ⓝ⊑ L2.
+#h #g #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
qed-.
(* Basic properties *********************************************************)
lemma lsubsv_cprs_trans: ∀h,g,L1,L2. h ⊢ L1 ¡⊑[g] L2 →
∀T1,T2. L2 ⊢ T1 ➡* T2 → L1 ⊢ T1 ➡* T2.
-/3 width=5 by lsubsv_fwd_lsubss, lsubss_cprs_trans/
+/3 width=5 by lsubsv_fwd_lsubx, lsubx_cprs_trans/
qed-.
lemma lsubsv_cpcs_trans: ∀h,g,L1,L2. h ⊢ L1 ¡⊑[g] L2 →
∀T1,T2. L2 ⊢ T1 ⬌* T2 → L1 ⊢ T1 ⬌* T2.
-/3 width=5 by lsubsv_fwd_lsubr2, cpcs_lsubr_trans/
+/3 width=5 by lsubsv_fwd_lsubx, lsubx_cpcs_trans/
qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/dynamic/snv_cpcs.ma".
+include "basic_2/dynamic/lsubsv_ssta.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************)
+
+(* Properties for the preservation results **********************************)
+
+fact lsubsv_sstas_aux: ∀h,g,L0,T0.
+ (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_cpr_lpr h g L1 T1) →
+ (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_ssta_cpr_lpr h g L1 T1) →
+ (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_ssta h g L1 T1) →
+ (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_lsubsv h g L1 T1) →
+ ∀L2,T. h ⊢ ⦃L0, T0⦄ >[g] ⦃L2, T⦄ → ⦃h, L2⦄ ⊢ T ¡[g] →
+ ∀L1. h ⊢ L1 ¡⊑[g] L2 → ∀U2. ⦃h, L2⦄ ⊢ T •*[g] U2 →
+ ∃∃U1. ⦃h, L1⦄ ⊢ T •*[g] U1 & L1 ⊢ U1 ⬌* U2.
+#h #g #L0 #T0 #IH4 #IH3 #IH2 #IH1 #L2 #T #HLT0 #HT #L1 #HL12 #U2 #H @(sstas_ind … H) -U2 [ /2 width=3/ ]
+#U2 #W #l #HTU2 #HU2W * #U1 #HTU1 #HU12
+lapply (IH1 … HT … HL12) // #H
+lapply (snv_sstas_aux … IH2 … HTU1) // /3 width=4 by ygt_yprs_trans, lsubsv_yprs/ -H #HU1
+lapply (snv_sstas_aux … IH2 … HTU2) // #H
+lapply (IH1 … H … HL12) [ /3 width=4 by ygt_yprs_trans, sstas_yprs/ ] -H #HU2
+elim (snv_fwd_ssta … HU1) #l1 #W1 #HUW1
+elim (lsubsv_ssta_trans … HU2W … HL12) -HU2W #W2 #HUW2 #HW2
+elim (ssta_cpcs_lpr_aux … IH4 IH3 … HU1 HU2 … HUW1 … HUW2 … HU12 L1) -HU1 -HU2 -HUW2 -HU12 //
+[2,3: /4 width=4 by ygt_yprs_trans, sstas_yprs, lsubsv_yprs/ ] -L2 -L0 -T0 -U2 #H #HW12 destruct
+lapply (cpcs_trans … HW12 … HW2) -W2 /3 width=4/
+qed-.
+
+fact lsubsv_cpds_aux: ∀h,g,L0,T0.
+ (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_cpr_lpr h g L1 T1) →
+ (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_ssta_cpr_lpr h g L1 T1) →
+ (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_ssta h g L1 T1) →
+ (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_lsubsv h g L1 T1) →
+ ∀L2,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L2, T1⦄ → ⦃h, L2⦄ ⊢ T1 ¡[g] →
+ ∀L1. h ⊢ L1 ¡⊑[g] L2 → ∀T2. ⦃h, L2⦄ ⊢ T1 •*➡*[g] T2 →
+ ∃∃T. ⦃h, L1⦄ ⊢ T1 •*➡*[g] T & L1 ⊢ T2 ➡* T.
+#h #g #L0 #T0 #IH4 #IH3 #IH2 #IH1 #L2 #T1 #HLT0 #HT1 #L1 #HL12 #T2 * #T #HT1T #HTT2
+lapply (lsubsv_cprs_trans … HL12 … HTT2) -HTT2 #HTT2
+elim (lsubsv_sstas_aux … IH4 IH3 IH2 IH1 … HLT0 … HL12 … HT1T) // -L2 -L0 -T0 #T0 #HT10 #HT0
+lapply (cpcs_cprs_strap1 … HT0 … HTT2) -T #HT02
+elim (cpcs_inv_cprs … HT02) -HT02 /3 width=3/
+qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/dynamic/snv_cpcs.ma".
-include "basic_2/dynamic/lsubsv_ssta.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************)
-
-(* Properties for the preservation results **********************************)
-
-fact lsubsv_sstas_aux: ∀h,g,L0,T0.
- (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_cpr_lpr h g L1 T1) →
- (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_ssta_cpr_lpr h g L1 T1) →
- (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_ssta h g L1 T1) →
- (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_lsubsv h g L1 T1) →
- ∀L2,T. h ⊢ ⦃L0, T0⦄ >[g] ⦃L2, T⦄ → ⦃h, L2⦄ ⊢ T ¡[g] →
- ∀L1. h ⊢ L1 ¡⊑[g] L2 → ∀U2. ⦃h, L2⦄ ⊢ T •*[g] U2 →
- ∃∃U1. ⦃h, L1⦄ ⊢ T •*[g] U1 & L1 ⊢ U1 ⬌* U2.
-#h #g #L0 #T0 #IH4 #IH3 #IH2 #IH1 #L2 #T #HLT0 #HT #L1 #HL12 #U2 #H @(sstas_ind … H) -U2 [ /2 width=3/ ]
-#U2 #W #l #HTU2 #HU2W * #U1 #HTU1 #HU12
-lapply (IH1 … HT … HL12) // #H
-lapply (snv_sstas_aux … IH2 … HTU1) // /3 width=4 by ygt_yprs_trans, lsubsv_yprs/ -H #HU1
-lapply (snv_sstas_aux … IH2 … HTU2) // #H
-lapply (IH1 … H … HL12) [ /3 width=4 by ygt_yprs_trans, sstas_yprs/ ] -H #HU2
-elim (snv_fwd_ssta … HU1) #l1 #W1 #HUW1
-elim (lsubsv_ssta_trans … HU2W … HL12) -HU2W #W2 #HUW2 #HW2
-elim (ssta_cpcs_lpr_aux … IH4 IH3 … HU1 HU2 … HUW1 … HUW2 … HU12 L1) -HU1 -HU2 -HUW2 -HU12 //
-[2,3: /4 width=4 by ygt_yprs_trans, sstas_yprs, lsubsv_yprs/ ] -L2 -L0 -T0 -U2 #H #HW12 destruct
-lapply (cpcs_trans … HW12 … HW2) -W2 /3 width=4/
-qed-.
-
-fact lsubsv_dxprs_aux: ∀h,g,L0,T0.
- (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_cpr_lpr h g L1 T1) →
- (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_ssta_cpr_lpr h g L1 T1) →
- (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_ssta h g L1 T1) →
- (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_lsubsv h g L1 T1) →
- ∀L2,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L2, T1⦄ → ⦃h, L2⦄ ⊢ T1 ¡[g] →
- ∀L1. h ⊢ L1 ¡⊑[g] L2 → ∀T2. ⦃h, L2⦄ ⊢ T1 •*➡*[g] T2 →
- ∃∃T. ⦃h, L1⦄ ⊢ T1 •*➡*[g] T & L1 ⊢ T2 ➡* T.
-#h #g #L0 #T0 #IH4 #IH3 #IH2 #IH1 #L2 #T1 #HLT0 #HT1 #L1 #HL12 #T2 * #T #HT1T #HTT2
-lapply (lsubsv_cprs_trans … HL12 … HTT2) -HTT2 #HTT2
-elim (lsubsv_sstas_aux … IH4 IH3 IH2 IH1 … HLT0 … HL12 … HT1T) // -L2 -L0 -T0 #T0 #HT10 #HT0
-lapply (cpcs_cprs_strap1 … HT0 … HTT2) -T #HT02
-elim (cpcs_inv_cprs … HT02) -HT02 /3 width=3/
-qed-.
| #I #L1 #L2 #V #_ #IHL12 #K1 #e #H
elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK1
[ destruct
- elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
+ elim (IHL12 L1 0) -IHL12 // #X #HL12 #H
<(ldrop_inv_O2 … H) in HL12; -H /3 width=3/
| elim (IHL12 … HLK1) -L1 /3 width=3/
]
-| #L1 #L2 #V1 #V2 #W1 #W2 #l #HV1 #HVW1 #HW12 #HW2 #HWV2 #_ #IHL12 #K1 #e #H
+| #L1 #L2 #W #V #W1 #V2 #l #HV #HW #HW1 #HV2 #_ #IHL12 #K1 #e #H
elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK1
[ destruct
- elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
+ elim (IHL12 L1 0) -IHL12 // #X #HL12 #H
<(ldrop_inv_O2 … H) in HL12; -H /3 width=6/
| elim (IHL12 … HLK1) -L1 /3 width=3/
]
]
-qed.
+qed-.
(* Note: the constant 0 cannot be generalized *)
lemma lsubsv_ldrop_O1_trans: ∀h,g,L1,L2. h ⊢ L1 ¡⊑[g] L2 →
| #I #L1 #L2 #V #_ #IHL12 #K2 #e #H
elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK2
[ destruct
- elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
+ elim (IHL12 L2 0) -IHL12 // #X #HL12 #H
<(ldrop_inv_O2 … H) in HL12; -H /3 width=3/
| elim (IHL12 … HLK2) -L2 /3 width=3/
]
-| #L1 #L2 #V1 #V2 #W1 #W2 #l #HV1 #HVW1 #HW12 #HW2 #HWV2 #_ #IHL12 #K2 #e #H
+| #L1 #L2 #W #V #W1 #V2 #l #HV #HW #HW1 #HV2 #_ #IHL12 #K2 #e #H
elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK2
[ destruct
- elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
+ elim (IHL12 L2 0) -IHL12 // #X #HL12 #H
<(ldrop_inv_O2 … H) in HL12; -H /3 width=6/
| elim (IHL12 … HLK2) -L2 /3 width=3/
]
]
-qed.
+qed-.
(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************)
(* Properties on local environment refinement for atomic arity assignment ***)
-
-lemma lsubsv_fwd_lsuba: ∀h,g,L1,L2. h ⊢ L1 ¡⊑[g] L2 → L1 ⁝⊑ L2.
+(*
+lamma lsubsv_fwd_lsuba: ∀h,g,L1,L2. h ⊢ L1 ¡⊑[g] L2 → L1 ⁝⊑ L2.
#h #g #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
#L1 #L2 #V1 #V2 #W1 #W2 #l #HV1 #HVW1 #HW12 #HW2 #_ #_ #HL12
elim (snv_fwd_aaa … HV1) -HV1 #A #HV1
lapply (lsuba_aaa_trans … HW2 … HL12) #H2
lapply (aaa_cpcs_mono … HW12 … H1 … H2) -W1 -H2 #H destruct /2 width=3/
qed-.
+*)
(* *)
(**************************************************************************)
-include "basic_2/computation/dxprs_dxprs.ma".
-include "basic_2/dynamic/lsubsv_ldrop.ma".
-include "basic_2/dynamic/lsubsv_dxprs.ma".
+include "basic_2/computation/cpds_cpds.ma".
+include "basic_2/dynamic/lsubsv_cpds.ma".
include "basic_2/dynamic/lsubsv_cpcs.ma".
(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************)
elim (lsubsv_inv_pair2 … H) -H * #K1
[ #HK12 #H destruct
/5 width=8 by snv_lref, fsupp_ygt, fsupp_lref/ (**) (* auto too slow without trace *)
- | #W1 #V1 #V2 #l #HV1 #_ #_ #_ #_ #_ #H #_ destruct /2 width=5/
+ | #V #W1 #V2 #l #HV #_ #_ #_ #_ #_ #H destruct /2 width=5/
]
| #p #HL0 #HT0 #H #L1 #HL12 destruct -IH4 -IH3 -IH2 -IH1
elim (snv_inv_gref … H)
lapply (lsubsv_cprs_trans … HL12 … HW0) -HW0 #HW0
elim (lsubsv_ssta_trans … HVW … HL12) -HVW #W1 #HVW1 #HW1
lapply (cpcs_cprs_strap1 … HW1 … HW0) -W #HW10
- elim (lsubsv_dxprs_aux … IH4 IH3 IH2 IH1 … HL12 … HTU) -IH4 -IH3 -IH2 -HTU // /2 width=1/ #X #HTU #H
- elim (cprs_fwd_abst1 … H Abst W0) -H #W #U2 #HW0 #HU2 #H destruct
+ elim (lsubsv_cpds_aux … IH4 IH3 IH2 IH1 … HL12 … HTU) -IH4 -IH3 -IH2 -HTU // /2 width=1/ #X #HTU #H
+ elim (cprs_inv_abst1 … H) -H #W #U2 #HW0 #HU2 #H destruct
lapply (cpcs_cprs_strap1 … HW10 … HW0) -W0 #H
elim (cpcs_inv_cprs … H) -H #W0 #HW10 #HW0
- lapply (dxprs_cprs_trans … (ⓛ{a}W0.U2) HTU ?) [ /2 width=1/ ] -HTU -HW0
+ lapply (cpds_cprs_trans … (ⓛ{a}W0.U2) HTU ?) [ /2 width=1/ ] -HTU -HW0
/4 width=8 by snv_appl, fsupp_ygt/ (**) (* auto too slow without trace *)
| #W #T #HL0 #HT0 #H #L1 #HL12 destruct -IH4 -IH3 -IH2
elim (snv_inv_cast … H) -H #U #l #HW #HT #HTU #HUW
(* *)
(**************************************************************************)
-include "basic_2/equivalence/lsubss_ssta.ma".
-include "basic_2/dynamic/lsubsv.ma".
+include "basic_2/static/ssta_ssta.ma".
+include "basic_2/equivalence/cpcs_cpcs.ma".
+include "basic_2/dynamic/lsubsv_ldrop.ma".
(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************)
lemma lsubsv_ssta_trans: ∀h,g,L2,T,U2,l. ⦃h, L2⦄ ⊢ T •[g] ⦃l, U2⦄ →
∀L1. h ⊢ L1 ¡⊑[g] L2 →
∃∃U1. ⦃h, L1⦄ ⊢ T •[g] ⦃l, U1⦄ & L1 ⊢ U1 ⬌* U2.
-/3 width=3 by lsubsv_fwd_lsubss, lsubss_ssta_trans/
+#h #g #L2 #T #U #l #H elim H -L2 -T -U -l
+[ /3 width=3/
+| #L2 #K2 #X #Y #U #i #l #HLK2 #_ #HYU #IHXY #L1 #HL12
+ elim (lsubsv_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
+ elim (lsubsv_inv_pair2 … H) -H * #K1 [ | -HYU -IHXY -HLK1 ]
+ [ #HK12 #H destruct
+ elim (IHXY … HK12) -K2 #T #HXT #HTY
+ lapply (ldrop_fwd_ldrop2 … HLK1) #H
+ elim (lift_total T 0 (i+1)) /3 width=11/
+ | #V #W1 #V2 #l0 #_ #_ #_ #_ #_ #H destruct
+ ]
+| #L2 #K2 #Y #X #U #i #l #HLK2 #HYX #HYU #IHYX #L1 #HL12
+ elim (lsubsv_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
+ elim (lsubsv_inv_pair2 … H) -H * #K1 [ -HYX | -IHYX ]
+ [ #HK12 #H destruct
+ elim (IHYX … HK12) -K2 /3 width=6/
+ | #V #W1 #V2 #l0 #HYV #_ #HV #HY #_ #_ #H destruct
+ elim (snv_inv_cast … HYV) -HYV #W #l1 #_ #_ #HVW #HWY
+ elim (ssta_mono … HVW … HV) -HV #Hl10 #_
+ elim (ssta_mono … HYX … HY) -HYX -HY #H #_ destruct
+ lapply (ldrop_fwd_ldrop2 … HLK1) #H
+ elim (lift_total W 0 (i+1))
+ /4 width=11 by cpcs_lift, ex2_intro, ssta_ldef, ssta_cast/
+ ]
+| #a #I #L2 #V2 #T2 #U2 #l #_ #IHTU2 #L1 #HL12
+ elim (IHTU2 (L1.ⓑ{I}V2) …) [2: /2 width=1/ ] -L2 /3 width=3/
+| #L2 #V2 #T2 #U2 #l #_ #IHTU2 #L1 #HL12
+ elim (IHTU2 … HL12) -L2 /3 width=5/
+| #L2 #W2 #T2 #U2 #l #_ #IHTU2 #L1 #HL12
+ elim (IHTU2 … HL12) -L2 /3 width=3/
+]
qed-.
(* *)
(**************************************************************************)
-include "basic_2/computation/dxprs.ma".
+include "basic_2/notation/relations/nativevalid_4.ma".
+include "basic_2/computation/cpds.ma".
include "basic_2/equivalence/cpcs.ma".
(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
(**************************************************************************)
include "basic_2/computation/csn_aaa.ma".
-include "basic_2/computation/dxprs_aaa.ma".
+include "basic_2/computation/cpds_aaa.ma".
include "basic_2/equivalence/cpcs_aaa.ma".
include "basic_2/dynamic/snv.ma".
| #I #L #K #V #i #HLK #_ * /3 width=6/
| #a * #L #V #T #_ #_ * #B #HV * #A #HA /3 width=2/
| #a #L #V #W #W0 #T #U #l #_ #_ #HVW #HW0 #HTU * #B #HV * #X #HT
- lapply (dxprs_aaa h g … HV W0 ?) [ -HTU /3 width=4/ ] -W #HW0 (**) (* auto fail without -HTU *)
- lapply (dxprs_aaa … HT … HTU) -HTU #H
+ lapply (cpds_aaa h g … HV W0 ?) [ -HTU /3 width=4/ ] -W #HW0 (**) (* auto fail without -HTU *)
+ lapply (cpds_aaa … HT … HTU) -HTU #H
elim (aaa_inv_abst … H) -H #B0 #A #H1 #HU #H2 destruct
lapply (aaa_mono … H1 … HW0) -W0 #H destruct /3 width=4/
| #L #W #T #U #l #_ #_ #HTU #HUW * #B #HW * #A #HT
[2: /3 width=9 by snv_cprs_lpr_aux/
|3: /5 width=6 by ygt_yprs_trans, cprs_yprs/
] -L0 -T0 -T1 -T #U2 #HTU2 #HU2
-lapply (cpcs_lpr_conf … HL12 … HU1) -L1 #HU1
+lapply (lpr_cpcs_conf … HL12 … HU1) -L1 #HU1
lapply (cpcs_trans … HU1 … HU2) -U /2 width=3/
qed-.
∀U1. ⦃h, L1⦄ ⊢ T1 •*[g] U1 → ∀T2. L1 ⊢ T1 ➡* T2 → ∀L2. L1 ⊢ ➡ L2 →
∃∃U2. ⦃h, L2⦄ ⊢ T2 •*[g] U2 & L2 ⊢ U1 ⬌* U2.
#h #g #L0 #T0 #IH3 #IH2 #IH1 #L1 #T1 #H01 #HT1 #U1 #H
-@(sstas_ind … H) -U1 [ /3 width=5 by cprs_lpr_conf, ex2_intro/ ]
+@(sstas_ind … H) -U1 [ /3 width=5 by lpr_cprs_conf, ex2_intro/ ]
#U1 #W1 #l1 #HTU1 #HUW1 #IHTU1 #T2 #HT12 #L2 #HL12
elim (IHTU1 … HT12 … HL12) -IHTU1 #U2 #HTU2 #HU12
lapply (snv_cprs_lpr_aux … IH2 … HT1 … HT12 … HL12) // #HT2
lapply (cpcs_trans … HW1 … HW12) -W /3 width=4/
qed-.
-fact dxprs_cprs_lpr_aux: ∀h,g,L0,T0.
- (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_ssta h g L1 T1) →
- (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_cpr_lpr h g L1 T1) →
- (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_ssta_cpr_lpr h g L1 T1) →
- ∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → ⦃h, L1⦄ ⊢ T1 ¡[g] →
- ∀U1. ⦃h, L1⦄ ⊢ T1 •*➡*[g] U1 →
- ∀T2. L1 ⊢ T1 ➡* T2 → ∀L2. L1 ⊢ ➡ L2 →
- ∃∃U2. ⦃h, L2⦄ ⊢ T2 •*➡*[g] U2 & L2 ⊢ U1 ➡* U2.
+fact cpds_cprs_lpr_aux: ∀h,g,L0,T0.
+ (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_ssta h g L1 T1) →
+ (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_cpr_lpr h g L1 T1) →
+ (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_ssta_cpr_lpr h g L1 T1) →
+ ∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → ⦃h, L1⦄ ⊢ T1 ¡[g] →
+ ∀U1. ⦃h, L1⦄ ⊢ T1 •*➡*[g] U1 →
+ ∀T2. L1 ⊢ T1 ➡* T2 → ∀L2. L1 ⊢ ➡ L2 →
+ ∃∃U2. ⦃h, L2⦄ ⊢ T2 •*➡*[g] U2 & L2 ⊢ U1 ➡* U2.
#h #g #L0 #T0 #IH3 #IH2 #IH1 #L1 #T1 #H01 #HT1 #U1 * #W1 #HTW1 #HWU1 #T2 #HT12 #L2 #HL12
elim (sstas_cprs_lpr_aux … IH3 IH2 IH1 … H01 … HTW1 … HT12 … HL12) // -L0 -T0 -T1 #W2 #HTW2 #HW12
-lapply (cprs_lpr_conf … HL12 … HWU1) -L1 #HWU1
+lapply (lpr_cprs_conf … HL12 … HWU1) -L1 #HWU1
lapply (cpcs_canc_sn … HW12 HWU1) -W1 #H
elim (cpcs_inv_cprs … H) -H /3 width=3/
qed-.
-fact ssta_dxprs_aux: ∀h,g,L0,T0.
- (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_cpr_lpr h g L1 T1) →
- (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_ssta_cpr_lpr h g L1 T1) →
- ∀L,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L, T1⦄ → ⦃h, L⦄ ⊢ T1 ¡[g] →
- ∀l,U1. ⦃h, L⦄ ⊢ T1 •[g] ⦃l+1, U1⦄ → ∀T2. ⦃h, L⦄ ⊢ T1 •*➡*[g] T2 →
- ∃∃U,U2. ⦃h, L⦄ ⊢ U1 •*[g] U & ⦃h, L⦄ ⊢ T2 •*[g] U2 & L ⊢ U ⬌* U2.
+fact ssta_cpds_aux: ∀h,g,L0,T0.
+ (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_cpr_lpr h g L1 T1) →
+ (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_ssta_cpr_lpr h g L1 T1) →
+ ∀L,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L, T1⦄ → ⦃h, L⦄ ⊢ T1 ¡[g] →
+ ∀l,U1. ⦃h, L⦄ ⊢ T1 •[g] ⦃l+1, U1⦄ → ∀T2. ⦃h, L⦄ ⊢ T1 •*➡*[g] T2 →
+ ∃∃U,U2. ⦃h, L⦄ ⊢ U1 •*[g] U & ⦃h, L⦄ ⊢ T2 •*[g] U2 & L ⊢ U ⬌* U2.
#h #g #L0 #T0 #IH2 #IH1 #L #T1 #H01 #HT1 #l #U1 #HTU1 #T2 * #T #HT1T #HTT2
elim (sstas_strip … HT1T … HTU1) #HU1T destruct [ -HT1T | -L0 -T0 -T1 ]
[ elim (ssta_cprs_lpr_aux … IH2 IH1 … HTU1 … HTT2 L) // -L0 -T0 -T /3 width=5/
(* *)
(**************************************************************************)
-include "basic_2/computation/dxprs_lift.ma".
+include "basic_2/computation/cpds_lift.ma".
include "basic_2/equivalence/cpcs_cpcs.ma".
include "basic_2/dynamic/snv.ma".
>(lift_inv_sort1 … H) -X -K -d -e //
| #I #K #K0 #V #i #HK0 #_ #IHV #L #d #e #HLK #X #H
elim (lift_inv_lref1 … H) * #Hid #H destruct
- [ elim (ldrop_trans_le … HLK … HK0 ?) -K /2 width=2/ #X #HL0 #H
- elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #L0 #W #HLK0 #HVW #H destruct
+ [ elim (ldrop_trans_le … HLK … HK0) -K /2 width=2/ #X #HL0 #H
+ elim (ldrop_inv_skip2 … H) -H /2 width=1/ -Hid #L0 #W #HLK0 #HVW #H destruct
/3 width=8/
| lapply (ldrop_trans_ge … HLK … HK0 ?) -K // -Hid /3 width=8/
]
elim (lift_total T1 (d+1) e) #U1 #HTU1
@(snv_appl … a … W0 … W1 … U1 l)
[ /2 width=4/ | /2 width=4/ | /2 width=9/ | /2 width=9/ ]
- @(dxprs_lift … HLK … HTU … HT1) /2 width=1/
+ @(cpds_lift … HLK … HTU … HT1) /2 width=1/
| #K #V0 #T #V #l #_ #_ #HTV #HV0 #IHV0 #IHT #L #d #e #HLK #X #H
elim (lift_inv_flat1 … H) -H #W0 #U #HVW0 #HTU #H destruct
elim (lift_total V d e) #W #HVW
>(lift_inv_sort2 … H) -X -L -d -e //
| #I #L #L0 #W #i #HL0 #_ #IHW #K #d #e #HLK #X #H
elim (lift_inv_lref2 … H) * #Hid #H destruct
- [ elim (ldrop_conf_le … HLK … HL0 ?) -L /2 width=2/ #X #HK0 #H
- elim (ldrop_inv_skip1 … H ?) -H /2 width=1/ -Hid #K0 #V #HLK0 #HVW #H destruct
+ [ elim (ldrop_conf_le … HLK … HL0) -L /2 width=2/ #X #HK0 #H
+ elim (ldrop_inv_skip1 … H) -H /2 width=1/ -Hid #K0 #V #HLK0 #HVW #H destruct
/3 width=8/
| lapply (ldrop_conf_ge … HLK … HL0 ?) -L // -Hid /3 width=8/
]
elim (lift_inv_flat2 … H) -H #V #T #HVW #HTU #H destruct
elim (ssta_inv_lift1 … HW0 … HLK … HVW) -HW0 #V0 #HV0 #HVW0
elim (cprs_inv_lift1 … HW01 … HLK … HVW0) -W0 #V1 #HVW1 #HV01
- elim (dxprs_inv_lift1 … HLK … HTU … HU1) -HU1 #X #H #HTU
+ elim (cpds_inv_lift1 … HLK … HTU … HU1) -HU1 #X #H #HTU
elim (lift_inv_bind2 … H) -H #Y #T1 #HY #HTU1 #H destruct
lapply (lift_inj … HY … HVW1) -HY #H destruct /3 width=8/
| #L #W0 #U #W #l #_ #_ #HUW #HW0 #IHW0 #IHU #K #d #e #HLK #X #H
(* *)
(**************************************************************************)
-include "basic_2/computation/dxprs_dxprs.ma".
+include "basic_2/computation/cpds_cpds.ma".
include "basic_2/dynamic/snv_lift.ma".
include "basic_2/dynamic/snv_cpcs.ma".
lapply (IH1 … HV1 … HV12 … HL12) [ /2 width=1/ ] #HV2
lapply (IH1 … HT1 … HT12 … HL12) [ /2 width=1/ ] #HT2
elim (IH3 … HVW1 … HV12 … HL12) -HVW1 -HV12 // -HV1 [2: /2 width=1/ ] #W2 #HVW2 #HW12
- elim (dxprs_cprs_lpr_aux … IH2 IH1 IH3 … HTU1 … T2 … HL12) // [2,3: /2 width=1/ ] -IH2 -IH1 -IH3 -HT1 -HT12 -HTU1 #X #HTU2 #H
- elim (cprs_fwd_abst1 … H Abst W1) -H #W20 #U2 #HW120 #_ #H destruct
- lapply (cprs_lpr_conf … HL12 … HW10) -L1 #HW10
+ elim (cpds_cprs_lpr_aux … IH2 IH1 IH3 … HTU1 … T2 … HL12) // [2,3: /2 width=1/ ] -IH2 -IH1 -IH3 -HT1 -HT12 -HTU1 #X #HTU2 #H
+ elim (cprs_inv_abst1 … H) -H #W20 #U2 #HW120 #_ #H destruct
+ lapply (lpr_cprs_conf … HL12 … HW10) -L1 #HW10
lapply (cpcs_cprs_strap1 … HW10 … HW120) -W1 #HW120
lapply (cpcs_canc_sn … HW12 HW120) -W10 #HW20
elim (cpcs_inv_cprs … HW20) -HW20 #W0 #HW20 #HW200
- lapply (dxprs_cprs_trans … (ⓛ{a}W0.U2) HTU2 ?) [ /2 width=1/ ] -HW200 -HTU2 /2 width=8/
- | #b #V2 #W20 #T20 #T2 #HV12 #HT202 #H1 #H2 destruct
+ lapply (cpds_cprs_trans … (ⓛ{a}W0.U2) HTU2 ?) [ /2 width=1/ ] -HW200 -HTU2 /2 width=8/
+ | #b #V2 #W20 #W2 #T20 #T2 #HV12 #HW202 #HT202 #H1 #H2 destruct
elim (snv_inv_bind … HT1) -HT1 #HW20 #HT20
- elim (dxprs_inv_abst1 … HTU1) -HTU1 #W30 #T30 #HW230 #_ #H destruct -T30
+ elim (cpds_inv_abst1 … HTU1) -HTU1 #W30 #T30 #HW230 #_ #H destruct -T30
lapply (cprs_div … HW10 … HW230) -W30 #HW120
- lapply (cpcs_lpr_conf … HL12 … HW120) -HW120 #HW120
- elim (IH3 … HVW1 … HV12 … HL12) // [2: /2 width=1/ ] -HVW1 #W2 #HVW2 #HW102
- lapply (cpcs_canc_sn … HW102 … HW120) -W10 #HW220
- lapply (IH1 … HV12 … HL12) // [ /2 width=1/ ] #HV2 -HV1
- lapply (IH1 … HW20 … W20 … HL12) // [ /2 width=1/ ] -HW20 #HW20
- lapply (IH1 … HT20 … HT202 … (L2.ⓛW20) ?) [1,2: /2 width=1/ ] -HT20 #HT2
- lapply (IH2 … HVW2) //
+ lapply (cpcs_cpr_strap1 … HW120 … HW202) -HW120 #HW102
+ lapply (lpr_cpcs_conf … HL12 … HW102) -HW102 #HW102
+ elim (IH3 … HVW1 … HV12 … HL12) // [2: /2 width=1/ ] -HVW1 #W3 #HV2W3 #HW103
+ lapply (cpcs_canc_sn … HW103 … HW102) -W10 #HW32
+ lapply (IH1 … HV12 … HL12) // [ /2 width=1/ ] -HV1 #HV2
+ lapply (IH1 … HW202 … HL12) // [ /2 width=1/ ] -HW20 #HW2
+ lapply (IH1 … HT20 … HT202 … (L2.ⓛW2) ?) [1,2: /2 width=1/ ] -HT20 #HT2
+ lapply (IH2 … HV2W3) //
[ @(ygt_yprs_trans … L1 L1 … V1) (**) (* auto /4 width=5/ is a bit slow even with trace *)
[ /2 width=1 by fsupp_ygt/
| /3 width=1 by cprs_lpr_yprs, cpr_cprs/
]
- ] #HW2
- elim (snv_fwd_ssta … HW20) #l0 #U20 #HWU20
- elim (ssta_fwd_correct … HVW2) <minus_plus_m_m #U2 #HWU2
- elim (ssta_cpcs_lpr_aux … IH1 IH3 … HWU2 … HWU20 … HW220 … L2) // -IH3
- [2: /4 width=4 by ygt_yprs_trans, fsupp_ygt, ypr_yprs, ypr_lpr/
+ ] #HW3
+ elim (snv_fwd_ssta … HW2) #l0 #U2 #HWU2
+ elim (ssta_fwd_correct … HV2W3) <minus_plus_m_m #U3 #HWU3
+ elim (ssta_cpcs_lpr_aux … IH1 IH3 … HWU3 … HWU2 … HW32 … L2) // -IH3
+ [2: /4 width=5 by ygt_yprs_trans, fsupp_ygt, cprs_lpr_yprs, cpr_cprs/
|3: @(ygt_yprs_trans … L1 L2 … V2) (**) (* auto not tried *)
[ @(ygt_yprs_trans … L1 L1 … V1)
[ /2 width=1 by fsupp_ygt/
]
| /3 width=2 by ypr_ssta, ypr_yprs/
]
- ] #H #_ destruct -IH2 -U2
- lapply (IH4 … HT2 (L2.ⓓV2) ?)
- [ /2 width=6/
+ ] #H #_ destruct -IH2 -U3
+ lapply (IH4 … HT2 (L2.ⓓⓝW2.V2) ?)
+ [ /3 width=5/
| @(ygt_yprs_trans … (L1.ⓛW20) … T2) (**) (* auto /5 width=5/ is too slow even with trace timeout=35 *)
[ /4 width=4 by ygt_yprs_trans, fsupp_ygt, ypr_yprs, ypr_cpr/
| /4 width=1 by ypr_yprs, ypr_lpr, lpr_pair/
]
- ] -L1 -V1 -W2 -T20 -U20 -W20 -l0 /2 width=1/
+ ] -L1 -V1 -T20 -U2 /3 width=4/
| #b #V0 #V2 #W0 #W2 #T0 #T2 #HV10 #HV02 #HW02 #HT02 #H1 #H2 destruct -IH4
elim (snv_inv_bind … HT1) -HT1 #HW0 #HT0
- elim (dxprs_inv_abbr_abst … HTU1) -HTU1 #X #HTU0 #HX #H destruct
+ elim (cpds_inv_abbr_abst … HTU1) -HTU1 #X #HTU0 #HX #H destruct
elim (lift_inv_bind1 … HX) -HX #W3 #U3 #HW13 #_ #H destruct
- lapply (cprs_lpr_conf … HL12 … HW10) -HW10 #HW10
- elim (dxprs_cprs_lpr_aux … IH2 IH1 IH3 … HTU0 T2 … (L2.ⓓW2) ?) // [2,3,4: /2 width=1/ ] -IH2 -HTU0 #X #HTU2 #H
- elim (cprs_fwd_abst1 … H Abst W3) -H #W #U2 #HW1 #_ #H destruct -U3
+ lapply (lpr_cprs_conf … HL12 … HW10) -HW10 #HW10
+ elim (cpds_cprs_lpr_aux … IH2 IH1 IH3 … HTU0 T2 … (L2.ⓓW2)) // [2,3,4: /2 width=1/ ] -IH2 -HTU0 #X #HTU2 #H
+ elim (cprs_inv_abst1 … H) -H #W #U2 #HW1 #_ #H destruct -U3
elim (IH3 … HVW1 … HV10 … HL12) // /2 width=1/ -IH3 -HVW1 #X #H1 #H2
lapply (cpcs_canc_sn … H2 HW10) -W10 #H2
elim (lift_total X 0 1) #W20 #H3
lapply (cpcs_lift (L2.ⓓW2) … H3 … HW13 H2) /2 width=1/ -HW13 -H3 -H2 #HW320
lapply (cpcs_cprs_strap1 … HW320 … HW1) -W3 #HW20
elim (cpcs_inv_cprs … HW20) -HW20 #W3 #HW203 #HW3
- lapply (dxprs_cprs_trans … (ⓛ{a}W3.U2) HTU2 ?) [ /2 width=1/ ] -HW3 -HTU2 #HTU2
+ lapply (cpds_cprs_trans … (ⓛ{a}W3.U2) HTU2 ?) [ /2 width=1/ ] -HW3 -HTU2 #HTU2
lapply (IH1 … HW02 … HL12) // [ /2 width=1/ ] -HW0 #HW2
lapply (IH1 … HV10 … HL12) // [ /2 width=1/ ] -HV1 -HV10 #HV0
lapply (IH1 … HT02 (L2.ⓓW2) ?) // [1,2: /2 width=1/ ] -L1 #HT2
lapply (IH1 … HW12 … HL12) // /2 width=1/ -HW1 -HW12 #HW2
lapply (IH1 … HT12 … HL12) // /2 width=1/ -IH1 #HT2
elim (IH3 … HTU1 … HT12 … HL12) // /2 width=1/ -IH3 -HT1 -HT12 -HTU1 #U2 #HTU2 #HU12
- lapply (cpcs_lpr_conf … HL12 … H1) -L1 #H1
+ lapply (lpr_cpcs_conf … HL12 … H1) -L1 #H1
lapply (cpcs_canc_sn … HU12 H1) -U1 /2 width=4/
| #H -IH3 -HW1 -HTU1 -HUW1
lapply (IH1 … H … HL12) // /2 width=1/
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/computation/dxprs_lpss.ma".
-include "basic_2/equivalence/cpcs_lpss.ma".
-include "basic_2/dynamic/snv_lift.ma".
-
-(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
-
-(* Properties about sn parallel substitution for local environments *********)
-
-lemma snv_cpss_lpss_conf: ∀h,g,L1,T1. ⦃h, L1⦄ ⊢ T1 ¡[g] → ∀T2. L1 ⊢ T1 ▶* T2 →
- ∀L2. L1 ⊢ ▶* L2 → ⦃h, L2⦄ ⊢ T2 ¡[g].
-#h #g #L1 #T1 #H elim H -L1 -T1
-[ #L1 #k #X #H #L2 #_
- >(cpss_inv_sort1 … H) -X //
-| #I #L1 #K1 #V1 #i #HLK1 #_ #IHV1 #W2 #H #L2 #HL12
- elim (cpss_inv_lref1 … H) -H
- [ #H destruct
- elim (lpss_ldrop_conf … HLK1 … HL12) -L1 #X #H #HLK2
- elim (lpss_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct
- lapply (IHV1 … HV12 … HK12) -IHV1 -HV12 -HK12 /2 width=5/
- | * #K0 #V0 #V2 #HLK0 #HV12 #HVW2
- lapply (ldrop_mono … HLK0 … HLK1) -HLK0 #H destruct
- elim (lpss_ldrop_conf … HLK1 … HL12) -L1 #X #H #HLK2
- elim (lpss_inv_pair1 … H) -H #K2 #V #HK12 #_ #H destruct
- lapply (ldrop_fwd_ldrop2 … HLK2) -V #HLK2
- lapply (IHV1 … HV12 … HK12) -IHV1 -HV12 -HK12 /2 width=7/
- ]
-| #a #I #L1 #V1 #T1 #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
- elim (cpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
- lapply (IHV1 … HV12 … HL12) -IHV1 #HV2
- lapply (IHT1 … HT12 (L2.ⓑ{I}V2) ?) -IHT1 -HT12 /2 width=1/
-| #a #L1 #V1 #W1 #W0 #T1 #U1 #l #_ #_ #HVW1 #HW10 #HTU1 #IHV1 #IHT1 #X #H #L2 #HL12
- elim (cpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
- lapply (IHV1 … HV12 … HL12) -IHV1 #HV2
- lapply (IHT1 … HT12 … HL12) -IHT1 #HT2
- elim (ssta_cpss_lpss_conf … HVW1 … HV12 … HL12) -V1 #W2 #HVW2 #HW12
- elim (dxprs_cpss_lpss_conf … HTU1 … HT12 … HL12) -T1 #X #HTU2 #H
- elim (cpss_inv_bind1 … H) -H #W #U2 #HW0 #_ #H -U1 destruct
- elim (cprs_cpss2_lpss_conf_dx … HW10 … HW12 … HW0 … HL12) -L1 -W1 -W0 #W0 #HW20 #HW0
- lapply (dxprs_strap1 … (ⓛ{a}W0.U2) HTU2 ?) -HTU2 /3 width=3/ -HW0 /2 width=8/
-| #L1 #W1 #T1 #U1 #l #_ #_ #HTU1 #HUW1 #IHW1 #IHT1 #X #H #L2 #HL12
- elim (cpss_inv_flat1 … H) -H #W2 #T2 #HW12 #HT12 #H destruct
- lapply (IHW1 … HW12 … HL12) -IHW1 #HW2
- lapply (IHT1 … HT12 … HL12) -IHT1 #HT2
- elim (ssta_cpss_lpss_conf … HTU1 … HT12 … HL12) -T1 #U2 #HTU2 #HU12
- lapply (cpcs_cpss2_lpss_conf … HUW1 … HU12 … HW12 … HL12) -L1 -W1 -U1 /2 width=4/
-]
-qed-.
-
-lemma snv_lpss_conf: ∀h,g,L1,T. ⦃h, L1⦄ ⊢ T ¡[g] →
- ∀L2. L1 ⊢ ▶* L2 → ⦃h, L2⦄ ⊢ T ¡[g].
-#h #g #L1 #T #HT #L2 #HL12
-@(snv_cpss_lpss_conf … HT … HL12) //
-qed-.
-
-lemma snv_cpss_conf: ∀h,g,L,T1. ⦃h, L⦄ ⊢ T1 ¡[g] →
- ∀T2. L ⊢ T1 ▶* T2 → ⦃h, L⦄ ⊢ T2 ¡[g].
-#h #g #L #T1 #HT1 #T2 #HT12
-@(snv_cpss_lpss_conf … HT1 … HT12) //
-qed-.
elim (snv_inv_appl … H1) -H1 #a #W1 #W0 #T0 #l0 #HV1 #HT1 #HVW1 #HW10 #HT10
elim (ssta_inv_appl1 … H2) -H2 #U1 #HTU1 #H destruct
lapply (IH1 … HT1 … HTU1) -IH1 /2 width=1/ #HU1
- elim (ssta_dxprs_aux … IH3 IH2 … HTU1 … HT10) -IH3 -IH2 // /2 width=2/ -T1 #U #X #HU1U #H #HU0
+ elim (ssta_cpds_aux … IH3 IH2 … HTU1 … HT10) -IH3 -IH2 // /2 width=2/ -T1 #U #X #HU1U #H #HU0
elim (sstas_inv_bind1 … H) -H #U0 #HTU0 #H destruct
elim (cpcs_inv_abst2 … HU0) -HU0 #W2 #U2 #HU2 #HU02
- elim (cprs_fwd_abst … HU02 Abst W0) -HU02 #HW02 #_
+ elim (cprs_inv_abst … HU02) -HU02 #HW02 #_
lapply (cprs_trans … HW10 … HW02) -W0 /3 width=10 by snv_appl, ex2_intro/ (**) (* auto is too slow without trace *)
| #W1 #T1 #HL0 #HT0 #H1 #X #l #H2 destruct -IH3 -IH2
elim (snv_inv_cast … H1) -H1 #U1 #l0 #HW1 #HT1 #HTU1 #HUW1
(* *)
(**************************************************************************)
-include "basic_2/equivalence/lsubss_ssta.ma".
+include "basic_2/computation/cpds_cpds.ma".
include "basic_2/dynamic/snv_cpcs.ma".
+include "basic_2/dynamic/lsubsv_ssta.ma".
(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
[ #V2 #T2 #HV12 #HT12 #H destruct -a -l0 -W1 -W10 -U10 -HV1 -IH3 -IH2
elim (IH1 … HTU1 … HT12 … HL12) -IH1 -HTU1 // [2: /2 width=1/ ] -T1 #U2 #HTU2 #HU12
lapply (lpr_cpr_conf … HL12 … HV12) -L1 /3 width=5/
- | #b #V2 #W #T2 #T20 #HV12 #HT20 #H1 #H2 destruct
- elim (snv_inv_bind … HT1) -HT1 #HW #HT2
+ | #b #V2 #W2 #W20 #T2 #T20 #HV12 #HW20 #HT20 #H1 #H2 destruct
+ elim (snv_inv_bind … HT1) -HT1 #HW2 #HT2
elim (ssta_inv_bind1 … HTU1) -HTU1 #U2 #HTU2 #H destruct
- elim (dxprs_inv_abst1 … HTU10) -HTU10 #W0 #U0 #HW0 #_ #H destruct
- lapply (cprs_div … HW10 … HW0) -W0 #HW1W
+ elim (cpds_inv_abst1 … HTU10) -HTU10 #W0 #U0 #HW0 #_ #H destruct
+ lapply (cprs_div … HW10 … HW0) -W0 #HW12
elim (ssta_fwd_correct … HVW1) <minus_plus_m_m #X1 #HWX1
- elim (snv_fwd_ssta … HW) #l1 #V #HWV
+ elim (snv_fwd_ssta … HW2) #l1 #V22 #HWV22
lapply (IH3 … HVW1) -IH3 // [ /2 width=1/ ] #HW1
- elim (ssta_cpcs_lpr_aux … IH2 IH1 … HWX1 … HWV … L1) -IH2 -HWX1 //
+ elim (ssta_cpcs_lpr_aux … IH2 IH1 … HWX1 … HWV22 … L1) -HWX1 //
[2: /2 width=1/
|3: /4 width=4 by ygt_yprs_trans, fsupp_ygt, sstas_yprs, ssta_sstas/
] #H #_ destruct -X1
- elim (IH1 … HVW1 … HV12 … HL12) -HVW1 // -HV1 [2: /2 width=1/ ] #W2 #HVW2 #HW12
- elim (IH1 … HWV W … HL12) -HWV // -HW [2: /2 width=1/ ] #V0 #HWV0 #_
- elim (IH1 … HTU2 … HT20 (L2.ⓛW)) -IH1 -HTU2 -HT20 // [2,3: /2 width=1/ ] -HT2 #U20 #HTU20 #HU20
- lapply (cpcs_lpr_conf … HL12 … HW1W) #HW1W
+ lapply (IH2 … HV1 … HV12 … HL12) [ /2 width=1/ ] #HV2
+ lapply (IH2 … HW2 … HW20 … HL12) [ /2 width=1/ ] -IH2 #H2W20
+ elim (IH1 … HVW1 … HV12 … HL12) -HVW1 // -HV1 [2: /2 width=1/ ] #W12 #HVW12 #HW112
+ elim (IH1 … HWV22 … HW20 … HL12) -HWV22 // -HW2 [2: /2 width=1/ ] #V20 #HWV20 #_
+ elim (IH1 … HTU2 … HT20 (L2.ⓛW20)) -IH1 -HTU2 -HT20 // [2,3: /2 width=1/ ] -HT2 #U20 #HTU20 #HU20
+ lapply (lpr_cpcs_conf … HL12 … HW12) -HW12 #HW12
+ lapply (lpr_cpr_conf … HL12 … HW20) -HW20 #HW20
lapply (lpr_cpr_conf … HL12 … HV12) -L1 #HV12
- lapply (cpcs_ext_bind … HV12 … HU20 b Abbr) -HV12 -HU20 #HU20
- lapply (cpcs_canc_sn … HW12 HW1W) -W1 #HW2
- elim (lsubss_ssta_trans … HTU20 (L2.ⓓV2) ?) -HTU20
- [ #U #HTU20 #HUU20 -HWV0 -W2
- lapply (cpcs_bind1 b … V2 V2 … HUU20) // -HUU20 #HUU20
- lapply (cpcs_canc_dx … HU20 … HUU20) -U20 #HU2
- lapply (cpcs_cpr_strap2 … (ⓐV1.ⓛ{b}W.U2) … HU2) [ /2 width=1/ ] /3 width=3/
- | -b -l -V -V1 -T2 -T20 -U0 -U2 -U20 /2 width=6/
+ lapply (cpcs_canc_sn … HW12 HW112) -W1 #HW12
+ lapply (cpcs_canc_sn … HW12 HW20) -HW12 #HW12
+ elim (lsubsv_ssta_trans … HTU20 (L2.ⓓⓝW20.V2)) -HTU20
+ [ #U #HTU20 #HUU20 -HVW12 -HWV20 -HW12
+ @(ex2_intro … (ⓓ{b}ⓝW20.V2.U)) [ /3 width=1/ ] -HTU20
+ @(cpcs_canc_dx … (ⓓ{b}ⓝW20.V2.U20)) [2: /2 width=1/ ] -HUU20
+ @(cpcs_cpr_strap1 … (ⓐV2.ⓛ{b}W20.U20)) [2: /2 width=1/ ]
+ /3 by cpcs_bind2, cpcs_flat/
+ | -HU20 -HW20 -HV12 /3 width=5 by lsubsv_abbr, snv_cast/
]
| #b #V0 #V2 #W0 #W2 #T0 #T2 #HV10 #HV02 #HW02 #HT02 #H1 #H2 destruct -a -l0 -W1 -W10 -HV1 -IH3 -IH2
elim (ssta_inv_bind1 … HTU1) -HTU1 #U0 #HTU0 #H destruct
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/btpredstarproper_6.ma".
include "basic_2/dynamic/ysc.ma".
include "basic_2/dynamic/yprs.ma".
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/btpred_6.ma".
include "basic_2/relocation/fsup.ma".
include "basic_2/reduction/lpr.ma".
include "basic_2/dynamic/lsubsv.ma".
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/btpredstar_6.ma".
include "basic_2/substitution/fsupp.ma".
include "basic_2/computation/lprs.ma".
include "basic_2/dynamic/ypr.ma".
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/btpredproper_6.ma".
include "basic_2/dynamic/ypr.ma".
(* "BIG TREE" PROPER PARALLEL REDUCTION FOR CLOSURES ************************)
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/pconvstar_3.ma".
include "basic_2/conversion/cpc.ma".
(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
lemma cpcs_cpr_conf: ∀L,T1,T. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
/3 width=3/ qed.
-lemma cpcs_cpss_strap1: ∀L,T1,T. L ⊢ T1 ⬌* T → ∀T2. L ⊢ T ▶* T2 → L ⊢ T1 ⬌* T2.
-#L #T1 #T #HT1 #T2 #HT2
-@(cpcs_cpr_strap1 … HT1) -T1 /2 width=3/
-qed-.
-
-lemma cpcs_cpss_strap2: ∀L,T1,T. L ⊢ T1 ▶* T → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
-#L #T1 #T #HT1 #T2 #HT2
-@(cpcs_cpr_strap2 … HT2) -T2 /2 width=3/
-qed-.
-
-lemma cpcs_cpss_conf: ∀L,T,T1. L ⊢ T ▶* T1 → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
-#L #T #T1 #HT1 #T2 #HT2
-@(cpcs_cpr_conf … HT2) -T2 /2 width=3/
-qed-.
-
-lemma cpcs_cpss_div: ∀L,T1,T. L ⊢ T1 ⬌* T → ∀T2. L ⊢ T2 ▶* T → L ⊢ T1 ⬌* T2.
-#L #T1 #T #HT1 #T2 #HT2
-@(cpcs_cpr_div … HT1) -T1 /2 width=3/
-qed-.
-
(* Basic_1: removed theorems 9:
clear_pc3_trans pc3_ind_left
pc3_head_1 pc3_head_2 pc3_head_12 pc3_head_21
pc3_pr2_fsubst0 pc3_pr2_fsubst0_back pc3_fsubst0
+ pc3_gen_abst pc3_gen_abst_shift
*)
(* Basic_1: removed local theorems 6:
pc3_left_pr3 pc3_left_trans pc3_left_sym pc3_left_pc3 pc3_pc3_left
(* *)
(**************************************************************************)
-include "basic_2/computation/cprs_cprs.ma".
+include "basic_2/computation/lprs_cprs.ma".
include "basic_2/conversion/cpc_cpc.ma".
include "basic_2/equivalence/cpcs_cprs.ma".
lapply (cprs_inv_sort1 … H2) -L #H destruct //
qed-.
-(* Basic_1: was: pc3_gen_sort_abst *)
-lemma cpcs_inv_sort_abst: ∀a,L,W,T,k. L ⊢ ⋆k ⬌* ⓛ{a}W.T → ⊥.
-#a #L #W #T #k #H
-elim (cpcs_inv_cprs … H) -H #X #H1
->(cprs_inv_sort1 … H1) -X #H2
-elim (cprs_fwd_abst1 … H2 Abst W) -H2 #W0 #T0 #_ #_ #H destruct
-qed-.
-
-(* Basic_1: was: pc3_gen_abst *)
-lemma cpcs_inv_abst: ∀a1,a2,L,W1,W2,T1,T2. L ⊢ ⓛ{a1}W1.T1 ⬌* ⓛ{a2}W2.T2 → ∀I,V.
- ∧∧ L ⊢ W1 ⬌* W2 & L. ②{I}V ⊢ T1 ⬌* T2 & a1 = a2.
-#a1 #a2 #L #W1 #W2 #T1 #T2 #H #I #V
-elim (cpcs_inv_cprs … H) -H #T #H1 #H2
-elim (cprs_fwd_abst1 … H1 I V) -H1 #W0 #T0 #HW10 #HT10 #H destruct
-elim (cprs_fwd_abst1… H2 I V) -H2 #W #T #HW2 #HT2 #H destruct /3 width=3/
-qed-.
-
-(* Basic_1: was: pc3_gen_abst_shift *)
-lemma cpcs_inv_abst_shift: ∀a1,a2,L,W1,W2,T1,T2. L ⊢ ⓛ{a1}W1.T1 ⬌* ⓛ{a2}W2.T2 → ∀W.
- ∧∧ L ⊢ W1 ⬌* W2 & L. ⓛW ⊢ T1 ⬌* T2 & a1 = a2.
-#a1 #a2 #L #W1 #W2 #T1 #T2 #H #W
-lapply (cpcs_inv_abst … H Abst W) -H //
-qed.
-
lemma cpcs_inv_abst1: ∀a,L,W1,T1,T. L ⊢ ⓛ{a}W1.T1 ⬌* T →
∃∃W2,T2. L ⊢ T ➡* ⓛ{a}W2.T2 & L ⊢ ⓛ{a}W1.T1 ➡* ⓛ{a}W2.T2.
#a #L #W1 #T1 #T #H
elim (cpcs_inv_cprs … H) -H #X #H1 #H2
-elim (cprs_fwd_abst1 … H1 Abst W1) -H1 #W2 #T2 #HW12 #HT12 #H destruct
+elim (cprs_inv_abst1 … H1) -H1 #W2 #T2 #HW12 #HT12 #H destruct
@(ex2_2_intro … H2) -H2 /2 width=2/ (**) (* explicit constructor, /3 width=6/ is slow *)
qed-.
∃∃W2,T2. L ⊢ T ➡* ⓛ{a}W2.T2 & 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,L,W,T,k. L ⊢ ⋆k ⬌* ⓛ{a}W.T → ⊥.
+#a #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: ∀L,K,d,e. ⇩[d, e] L ≡ K →
∀T1,U1. ⇧[d, e] T1 ≡ U1 → ∀T2,U2. ⇧[d, e] T2 ≡ U2 →
lapply (lpr_cprs_trans … HT2 … HL12) -L2 /2 width=3/
qed-.
+lemma lprs_cpcs_trans: ∀L1,L2. L1 ⊢ ➡* L2 → ∀T1,T2. L2 ⊢ T1 ⬌* T2 → L1 ⊢ T1 ⬌* T2.
+#L1 #L2 #HL12 #T1 #T2 #H
+elim (cpcs_inv_cprs … H) -H #T #HT1 #HT2
+lapply (lprs_cprs_trans … HT1 … HL12) -HT1
+lapply (lprs_cprs_trans … HT2 … HL12) -L2 /2 width=3/
+qed-.
+
lemma cpr_cprs_conf_cpcs: ∀L,T,T1,T2. L ⊢ T ➡* T1 → L ⊢ T ➡ T2 → L ⊢ T1 ⬌* T2.
#L #T #T1 #T2 #HT1 #HT2
elim (cprs_strip … HT1 … HT2) /2 width=3 by cpr_cprs_div/
elim (cprs_conf … HT1 … HT2) /2 width=3/
qed-.
+lemma lprs_cprs_conf: ∀L1,L2. L1 ⊢ ➡* L2 → ∀T1,T2. L1 ⊢ T1 ➡* T2 → L2 ⊢ T1 ⬌* T2.
+#L1 #L2 #HL12 #T1 #T2 #HT12
+elim (lprs_cprs_conf_dx … HT12 … HL12) -L1 /2 width=3/
+qed-.
+
+(* Basic_1: was: pc3_wcpr0_t *)
+(* Basic_1: note: pc3_wcpr0_t should be renamed *)
+lemma lpr_cprs_conf: ∀L1,L2. L1 ⊢ ➡ L2 → ∀T1,T2. L1 ⊢ T1 ➡* T2 → L2 ⊢ T1 ⬌* T2.
+/3 width=5 by lprs_cprs_conf, lpr_lprs/ qed-.
+
(* Basic_1: was only: pc3_pr0_pr2_t *)
(* Basic_1: note: pc3_pr0_pr2_t should be renamed *)
lemma lpr_cpr_conf: ∀L1,L2. L1 ⊢ ➡ L2 → ∀T1,T2. L1 ⊢ T1 ➡ T2 → L2 ⊢ T1 ⬌* T2.
-#L1 #L2 #HL12 #T1 #T2 #HT12
-elim (lpr_cpr_conf_dx … HT12 … HL12) -L1 /3 width=3/
-qed-.
+/3 width=5 by lpr_cprs_conf, cpr_cprs/ qed-.
(* Basic_1: was only: pc3_thin_dx *)
lemma cpcs_flat: ∀L,V1,V2. L ⊢ V1 ⬌* V2 → ∀T1,T2. L ⊢ T1 ⬌* T2 →
∀I. L ⊢ ⓕ{I}V1. T1 ⬌* ⓕ{I}V2. T2.
/3 width=1/ qed.
-lemma cpcs_ext_bind: ∀L,V1,V2. L ⊢ V1 ⬌* V2 → ∀V,T1,T2. L.ⓛV ⊢ T1 ⬌* T2 →
- ∀a,I. L ⊢ ⓑ{a,I}V1.T1 ⬌* ⓑ{a,I}V2.T2.
-#L #V1 #V2 #HV12 #V #T1 #T2 #HT12 #a #I
-elim (cpcs_inv_cprs … HV12) -HV12
-elim (cpcs_inv_cprs … HT12) -HT12
-/3 width=6 by cprs_div, cprs_ext_bind/ (**) (* /3 width=6/ is a bit slow *)
-qed.
-
lemma cpcs_bind_dx: ∀a,I,L,V,T1,T2. L.ⓑ{I}V ⊢ T1 ⬌* T2 →
L ⊢ ⓑ{a,I}V. T1 ⬌* ⓑ{a,I}V. T2.
#a #I #L #V #T1 #T2 #HT12
elim (cpcs_inv_cprs … HV12) -HV12 /3 width=5 by cprs_div, cprs_bind/ (**) (* /3 width=5/ is a bit slow *)
qed.
-lemma cpcs_beta_dx_cpr: ∀a,L,V1,V2,W,T1,T2.
- L ⊢ V1 ➡ V2 → L.ⓛW ⊢ T1 ⬌* T2 → L ⊢ ⓐV1.ⓛ{a}W.T1 ⬌* ⓓ{a}V2.T2.
-#a #L #V1 #V2 #W #T1 #T2 #HV12 #HT12
-elim (cpcs_inv_cprs … HT12) -HT12 #T #HT1 #HT2
-lapply (cprs_beta_dx a … HV12 HT1) -HV12 -HT1 #HT1
-lapply (cprs_lsubr_trans … HT2 (L.ⓓV2) ?) -HT2 /2 width=1/ #HT2
-@(cprs_div … HT1) /2 width=1/
-qed.
-
-lemma cpcs_beta_dx_rev_cpr: ∀a,L,V1,V2,W,T1,T2.
- L ⊢ V1 ➡ V2 → L.ⓛW ⊢ T2 ⬌* T1 →
- L ⊢ ⓓ{a}V2.T2 ⬌* ⓐV1.ⓛ{a}W.T1.
-/4 width=1/ qed.
-
-lemma cpcs_lsubr_trans: ∀L1,T1,T2. L1 ⊢ T1 ⬌* T2 →
- ∀L2. L2 ⊑ L1 → L2 ⊢ T1 ⬌* T2.
+lemma lsubx_cpcs_trans: ∀L1,T1,T2. L1 ⊢ T1 ⬌* T2 →
+ ∀L2. L2 ⓝ⊑ L1 → L2 ⊢ T1 ⬌* T2.
#L1 #T1 #T2 #HT12
elim (cpcs_inv_cprs … HT12) -HT12
-/3 width=5 by cprs_div, cprs_lsubr_trans/ (**) (* /3 width=5/ is a bit slow *)
+/3 width=5 by cprs_div, lsubx_cprs_trans/ (**) (* /3 width=5/ is a bit slow *)
qed-.
(* Basic_1: was: pc3_lift *)
∃∃T0. L ⊢ T1 ⬌ T0 & L ⊢ T2 ⬌* T0.
#L #T1 #T @TC_strip1 /2 width=3/ qed-.
+(* More inversion lemmas ****************************************************)
+
+lemma cpcs_inv_abst_sn: ∀a1,a2,L,W1,W2,T1,T2. L ⊢ ⓛ{a1}W1.T1 ⬌* ⓛ{a2}W2.T2 →
+ ∧∧ L ⊢ W1 ⬌* W2 & L.ⓛW1 ⊢ T1 ⬌* T2 & a1 = a2.
+#a1 #a2 #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/ -HT2 #HT2
+lapply (lprs_cpcs_trans … (L.ⓛW1) … HT2) /2 width=1/ -HT2 #HT2
+/4 width=3 by and3_intro, cprs_div, cpcs_cprs_div, cpcs_sym/
+qed-.
+
+lemma cpcs_inv_abst_dx: ∀a1,a2,L,W1,W2,T1,T2. L ⊢ ⓛ{a1}W1.T1 ⬌* ⓛ{a2}W2.T2 →
+ ∧∧ L ⊢ W1 ⬌* W2 & L. ⓛW2 ⊢ T1 ⬌* T2 & a1 = a2.
+#a1 #a2 #L #W1 #W2 #T1 #T2 #HT12
+lapply (cpcs_sym … HT12) -HT12 #HT12
+elim (cpcs_inv_abst_sn … HT12) -HT12 /3 width=1/
+qed-.
+
(* Main properties **********************************************************)
(* Basic_1: was pc3_t *)
@(cpcs_trans … (ⓑ{a,I}V2.T1)) /2 width=1/
qed.
-(* Basic_1: was: pc3_wcpr0_t *)
-(* Basic_1: note: pc3_wcpr0_t should be renamed *)
-lemma cprs_lpr_conf: ∀L1,L2. L1 ⊢ ➡ L2 → ∀T1,T2. L1 ⊢ T1 ➡* T2 → L2 ⊢ T1 ⬌* T2.
-#L1 #L2 #HL12 #T1 #T2 #H @(cprs_ind … H) -T2 //
-/3 width=5 by cpcs_trans, lpr_cpr_conf/
-qed-.
+lemma cpcs_beta_dx: ∀a,L,V1,V2,W1,W2,T1,T2.
+ L ⊢ V1 ⬌* V2 → L ⊢ W1 ⬌* W2 → L.ⓛW2 ⊢ T1 ⬌* T2 →
+ L ⊢ ⓐV1.ⓛ{a}W1.T1 ⬌* ⓓ{a}ⓝW2.V2.T2.
+#a #L #V1 #V2 #W1 #W2 #T1 #T2 #HV12 #HW12 #HT12
+@(cpcs_cpr_strap1 … (ⓐV2.ⓛ{a}W2.T2)) /2 width=1/ /3 width=1/
+qed.
+
+lemma cpcs_beta_sn: ∀a,L,V1,V2,W1,W2,T1,T2.
+ L ⊢ V1 ⬌* V2 → L ⊢ W1 ⬌* W2 → L.ⓛW1 ⊢ T1 ⬌* T2 →
+ L ⊢ ⓐV1.ⓛ{a}W1.T1 ⬌* ⓓ{a}ⓝW2.V2.T2.
+#a #L #V1 #V2 #W1 #W2 #T1 #T2 #HV12 #HW12 #HT12
+lapply (lsubx_cpcs_trans … HT12 (L.ⓓⓝW1.V1) ?) /2 width=1/ #H2T12
+@(cpcs_cpr_strap2 … (ⓓ{a}ⓝW1.V1.T1)) /2 width=1/ -HT12 /3 width=1/
+qed.
(* Basic_1: was: pc3_wcpr0 *)
-lemma cpcs_lpr_conf: ∀L1,L2. L1 ⊢ ➡ L2 → ∀T1,T2. L1 ⊢ T1 ⬌* T2 → L2 ⊢ T1 ⬌* T2.
+lemma lpr_cpcs_conf: ∀L1,L2. L1 ⊢ ➡ L2 → ∀T1,T2. L1 ⊢ T1 ⬌* T2 → L2 ⊢ T1 ⬌* T2.
#L1 #L2 #HL12 #T1 #T2 #H
-elim (cpcs_inv_cprs … H) -H /3 width=5 by cpcs_canc_dx, cprs_lpr_conf/
+elim (cpcs_inv_cprs … H) -H /3 width=5 by cpcs_canc_dx, lpr_cprs_conf/
qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/computation/cprs_lpss.ma".
-include "basic_2/equivalence/cpcs_cpcs.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
-
-(* Properties on sn parallel substitution for local environments ************)
-
-lemma cpcs_lpss_conf: ∀L1,T1,T2. L1 ⊢ T1 ⬌* T2 →
- ∀L2. L1 ⊢ ▶* L2 → L2 ⊢ T1 ⬌* T2.
-#L1 #T1 #T2 #H #L2 #HL12
-elim (cpcs_inv_cprs … H) -H #T #HT1 #HT2
-elim (cprs_lpss_conf_dx … HT1 … HL12) -HT1 #U1 #H1 #HTU1
-elim (cprs_lpss_conf_dx … HT2 … HL12) -L1 #U2 #H2 #HTU2
-elim (cpss_conf … H1 … H2) -T #U #HU1 #HU2
-lapply (cprs_cpss_trans … HTU1 … HU1) -U1
-lapply (cprs_cpss_trans … HTU2 … HU2) -U2 /2 width=3/
-qed-.
-
-lemma cpcs_cpss_lpss_conf: ∀L1,T,T2. L1 ⊢ T ⬌* T2 → ∀T1. L1 ⊢ T ▶* T1 →
- ∀L2. L1 ⊢ ▶* L2 → L2 ⊢ T1 ⬌* T2.
-#L1 #T #T2 #HT2 #T1 #HT1 #L2 #HL12
-lapply (cpcs_lpss_conf … HT2 … HL12) -HT2 #HT2
-elim (lpss_cpss_conf_dx … HT1 … HL12) -L1 #T0 #HT0 #HT10
-lapply (cpcs_cpss_conf … HT0 … HT2) -T #HT02
-lapply (cpcs_cpss_strap2 … HT10 … HT02) -T0 //
-qed-.
-
-lemma cpcs_cpss2_lpss_conf: ∀L1,T1,T2. L1 ⊢ T1 ⬌* T2 →
- ∀T3. L1 ⊢ T1 ▶* T3 → ∀T4. L1 ⊢ T2 ▶* T4 →
- ∀L2. L1 ⊢ ▶* L2 → L2 ⊢ T3 ⬌* T4.
-#L1 #T1 #T2 #HT12 #T3 #HT13 #T4 #HT24 #L2 #HL12
-lapply (cpcs_cpss_lpss_conf … HT12 … HT13 … HL12) -T1 #HT32
-elim (lpss_cpss_conf_dx … HT24 … HL12) -L1 #T #HT2 #HT4
-lapply (cpcs_cpss_strap1 … HT32 … HT2) -T2 #HT3
-lapply (cpcs_cpss_div … HT3 … HT4) -T //
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/static/ssta.ma".
-include "basic_2/computation/cprs.ma".
-include "basic_2/equivalence/cpcs.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED STATIC TYPE ASSIGNMENT *******)
-
-(* Note: this is not transitive *)
-inductive lsubss (h:sh) (g:sd h): relation lenv ≝
-| lsubss_atom: lsubss h g (⋆) (⋆)
-| lsubss_pair: ∀I,L1,L2,V. lsubss h g L1 L2 →
- lsubss h g (L1. ⓑ{I} V) (L2. ⓑ{I} V)
-| lsubss_abbr: ∀L1,L2,V1,V2,W1,W2,l. L1 ⊢ W1 ⬌* W2 →
- ⦃h, L1⦄ ⊢ V1 •[g] ⦃l+1, W1⦄ → ⦃h, L2⦄ ⊢ W2 •[g] ⦃l, V2⦄ →
- lsubss h g L1 L2 → lsubss h g (L1. ⓓV1) (L2. ⓛW2)
-.
-
-interpretation
- "local environment refinement (stratified static type assigment)"
- 'CrSubEqS h g L1 L2 = (lsubss h g L1 L2).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact lsubss_inv_atom1_aux: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 → L1 = ⋆ → L2 = ⋆.
-#h #g #L1 #L2 * -L1 -L2
-[ //
-| #I #L1 #L2 #V #_ #H destruct
-| #L1 #L2 #V1 #V2 #W1 #W2 #l #_ #_ #_ #_ #H destruct
-]
-qed-.
-
-lemma lsubss_inv_atom1: ∀h,g,L2. h ⊢ ⋆ •⊑[g] L2 → L2 = ⋆.
-/2 width=5 by lsubss_inv_atom1_aux/ qed-.
-
-fact lsubss_inv_pair1_aux: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 →
- ∀I,K1,V1. L1 = K1. ⓑ{I} V1 →
- (∃∃K2. h ⊢ K1 •⊑[g] K2 & L2 = K2. ⓑ{I} V1) ∨
- ∃∃K2,W1,W2,V2,l. ⦃h, K1⦄ ⊢ V1 •[g] ⦃l+1, W1⦄ & ⦃h, K2⦄ ⊢ W2 •[g] ⦃l, V2⦄ &
- K1 ⊢ W1 ⬌* W2 & h ⊢ K1 •⊑[g] K2 & L2 = K2. ⓛW2 & I = Abbr.
-#h #g #L1 #L2 * -L1 -L2
-[ #J #K1 #U1 #H destruct
-| #I #L1 #L2 #V #HL12 #J #K1 #U1 #H destruct /3 width=3/
-| #L1 #L2 #V1 #V2 #W1 #W2 #l #HW12 #HVW1 #HWV2 #HL12 #J #K1 #U1 #H destruct /3 width=10/
-]
-qed-.
-
-lemma lsubss_inv_pair1: ∀h,g,I,K1,L2,V1. h ⊢ K1. ⓑ{I} V1 •⊑[g] L2 →
- (∃∃K2. h ⊢ K1 •⊑[g] K2 & L2 = K2. ⓑ{I} V1) ∨
- ∃∃K2,W1,W2,V2,l. ⦃h, K1⦄ ⊢ V1 •[g] ⦃l+1, W1⦄ & ⦃h, K2⦄ ⊢ W2 •[g] ⦃l, V2⦄ &
- K1 ⊢ W1 ⬌* W2 & h ⊢ K1 •⊑[g] K2 & L2 = K2. ⓛW2 & I = Abbr.
-/2 width=3 by lsubss_inv_pair1_aux/ qed-.
-
-fact lsubss_inv_atom2_aux: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 → L2 = ⋆ → L1 = ⋆.
-#h #g #L1 #L2 * -L1 -L2
-[ //
-| #I #L1 #L2 #V #_ #H destruct
-| #L1 #L2 #V1 #V2 #W1 #W2 #l #_ #_ #_ #_ #H destruct
-]
-qed-.
-
-lemma lsubss_inv_atom2: ∀h,g,L1. h ⊢ L1 •⊑[g] ⋆ → L1 = ⋆.
-/2 width=5 by lsubss_inv_atom2_aux/ qed-.
-
-fact lsubss_inv_pair2_aux: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 →
- ∀I,K2,W2. L2 = K2. ⓑ{I} W2 →
- (∃∃K1. h ⊢ K1 •⊑[g] K2 & L1 = K1. ⓑ{I} W2) ∨
- ∃∃K1,W1,V1,V2,l. ⦃h, K1⦄ ⊢ V1 •[g] ⦃l+1, W1⦄ & ⦃h, K2⦄ ⊢ W2 •[g] ⦃l, V2⦄ &
- K1 ⊢ W1 ⬌* W2 & h ⊢ K1 •⊑[g] K2 & L1 = K1. ⓓV1 & I = Abst.
-#h #g #L1 #L2 * -L1 -L2
-[ #J #K2 #U2 #H destruct
-| #I #L1 #L2 #V #HL12 #J #K2 #U2 #H destruct /3 width=3/
-| #L1 #L2 #V1 #V2 #W1 #W2 #l #HW12 #HVW1 #HWV2 #HL12 #J #K2 #U2 #H destruct /3 width=10/
-]
-qed-.
-
-lemma lsubss_inv_pair2: ∀h,g,I,L1,K2,W2. h ⊢ L1 •⊑[g] K2. ⓑ{I} W2 →
- (∃∃K1. h ⊢ K1 •⊑[g] K2 & L1 = K1. ⓑ{I} W2) ∨
- ∃∃K1,W1,V1,V2,l. ⦃h, K1⦄ ⊢ V1 •[g] ⦃l+1, W1⦄ & ⦃h, K2⦄ ⊢ W2 •[g] ⦃l, V2⦄ &
- K1 ⊢ W1 ⬌* W2 & h ⊢ K1 •⊑[g] K2 & L1 = K1. ⓓV1 & I = Abst.
-/2 width=3 by lsubss_inv_pair2_aux/ qed-.
-
-(* Basic_forward lemmas *****************************************************)
-
-lemma lsubss_fwd_lsubr1: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 → L1 ⊑ L2.
-#h #g #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
-qed-.
-
-lemma lsubss_fwd_lsubr2: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 → L1 ⊑ L2.
-#h #g #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma lsubss_refl: ∀h,g,L. h ⊢ L •⊑[g] L.
-#h #g #L elim L -L // /2 width=1/
-qed.
-
-lemma lsubss_cprs_trans: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 →
- ∀T1,T2. L2 ⊢ T1 ➡* T2 → L1 ⊢ T1 ➡* T2.
-/3 width=5 by lsubss_fwd_lsubr2, cprs_lsubr_trans/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/equivalence/cpcs_cpcs.ma".
-include "basic_2/equivalence/lsubss.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED STATIC TYPE ASSIGNMENT *******)
-
-(* Properties on context-sensitive parallel equivalence for terms ***********)
-
-lemma lsubss_cpcs_trans: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 →
- ∀T1,T2. L2 ⊢ T1 ⬌* T2 → L1 ⊢ T1 ⬌* T2.
-/3 width=5 by lsubss_fwd_lsubr2, cpcs_lsubr_trans/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/equivalence/lsubss.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED STATIC TYPE ASSIGNMENT *******)
-
-(* Properties concerning basic local environment slicing ********************)
-
-(* Note: the constant 0 cannot be generalized *)
-lemma lsubss_ldrop_O1_conf: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 →
- ∀K1,e. ⇩[0, e] L1 ≡ K1 →
- ∃∃K2. h ⊢ K1 •⊑[g] K2 & ⇩[0, e] L2 ≡ K2.
-#h #g #L1 #L2 #H elim H -L1 -L2
-[ /2 width=3/
-| #I #L1 #L2 #V #_ #IHL12 #K1 #e #H
- elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK1
- [ destruct
- elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
- <(ldrop_inv_O2 … H) in HL12; -H /3 width=3/
- | elim (IHL12 … HLK1) -L1 /3 width=3/
- ]
-| #L1 #L2 #V1 #V2 #W1 #W2 #l #HW12 #HVW1 #HWV2 #_ #IHL12 #K1 #e #H
- elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK1
- [ destruct
- elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
- <(ldrop_inv_O2 … H) in HL12; -H /3 width=6/
- | elim (IHL12 … HLK1) -L1 /3 width=3/
- ]
-]
-qed-.
-
-(* Note: the constant 0 cannot be generalized *)
-lemma lsubss_ldrop_O1_trans: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 →
- ∀K2,e. ⇩[0, e] L2 ≡ K2 →
- ∃∃K1. h ⊢ K1 •⊑[g] K2 & ⇩[0, e] L1 ≡ K1.
-#h #g #L1 #L2 #H elim H -L1 -L2
-[ /2 width=3/
-| #I #L1 #L2 #V #_ #IHL12 #K2 #e #H
- elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK2
- [ destruct
- elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
- <(ldrop_inv_O2 … H) in HL12; -H /3 width=3/
- | elim (IHL12 … HLK2) -L2 /3 width=3/
- ]
-| #L1 #L2 #V1 #V2 #W1 #W2 #l #HW12 #HVW1 #HWV2 #_ #IHL12 #K2 #e #H
- elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK2
- [ destruct
- elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
- <(ldrop_inv_O2 … H) in HL12; -H /3 width=6/
- | elim (IHL12 … HLK2) -L2 /3 width=3/
- ]
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/static/ssta_ssta.ma".
-include "basic_2/equivalence/cpcs_cpcs.ma".
-include "basic_2/equivalence/lsubss_ldrop.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED STATIC TYPE ASSIGNMENT *******)
-
-(* Properties on stratified native type assignment **************************)
-
-lemma lsubss_ssta_trans: ∀h,g,L2,T,U2,l. ⦃h, L2⦄ ⊢ T •[g] ⦃l, U2⦄ →
- ∀L1. h ⊢ L1 •⊑[g] L2 →
- ∃∃U1. ⦃h, L1⦄ ⊢ T •[g] ⦃l, U1⦄ & L1 ⊢ U1 ⬌* U2.
-#h #g #L2 #T #U #l #H elim H -L2 -T -U -l
-[ /3 width=3/
-| #L2 #K2 #V2 #W2 #U2 #i #l #HLK2 #_ #HWU2 #IHVW2 #L1 #HL12
- elim (lsubss_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
- elim (lsubss_inv_pair2 … H) -H * #K1 [ | -HWU2 -IHVW2 -HLK1 ]
- [ #HK12 #H destruct
- elim (IHVW2 … HK12) -K2 #T2 #HVT2 #HTW2
- lapply (ldrop_fwd_ldrop2 … HLK1) #H
- elim (lift_total T2 0 (i+1)) /3 width=11/
- | #W1 #V1 #W2 #l0 #_ #_ #_ #_ #_ #H destruct
- ]
-| #L2 #K2 #W2 #V2 #U2 #i #l #HLK2 #HWV2 #HWU2 #IHWV2 #L1 #HL12
- elim (lsubss_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
- elim (lsubss_inv_pair2 … H) -H * #K1 [ -HWV2 | -IHWV2 ]
- [ #HK12 #H destruct
- elim (IHWV2 … HK12) -K2 /3 width=6/
- | #W1 #V1 #T2 #l0 #HVW1 #HWT2 #HW12 #_ #H #_ destruct
- elim (ssta_mono … HWV2 … HWT2) -HWV2 -HWT2 #H1 #H2 destruct
- lapply (ldrop_fwd_ldrop2 … HLK1) #H
- elim (lift_total W1 0 (i+1)) /3 width=11/
- ]
-| #a #I #L2 #V2 #T2 #U2 #l #_ #IHTU2 #L1 #HL12
- elim (IHTU2 (L1.ⓑ{I}V2) …) [2: /2 width=1/ ] -L2 /3 width=3/
-| #L2 #V2 #T2 #U2 #l #_ #IHTU2 #L1 #HL12
- elim (IHTU2 … HL12) -L2 /3 width=5/
-| #L2 #W2 #T2 #U2 #l #_ #IHTU2 #L1 #HL12
- elim (IHTU2 … HL12) -L2 /3 width=3/
-]
-qed-.
(* Properties about dx parallel unfold **************************************)
-(* Note: lemma 500 *)
lemma aaa_ltpss_dx_tpss_conf: ∀L1,T1,A. L1 ⊢ T1 ⁝ A →
∀L2,d,e. L1 ▶* [d, e] L2 →
∀T2. L2 ⊢ T1 ▶* [d, e] T2 → L2 ⊢ T2 ⁝ A.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/substitution/lpss_ldrop.ma".
+include "basic_2/static/aaa_lift.ma".
+
+(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
+
+(* Properties about sn parallel substitution ********************************)
+
+(* Note: lemma 500 *)
+lemma aaa_cpss_lpss_conf: ∀L1,T1,A. L1 ⊢ T1 ⁝ A → ∀T2. L1 ⊢ T1 ▶* T2 →
+ ∀L2. L1 ⊢ ▶* L2 → L2 ⊢ T2 ⁝ A.
+#L1 #T1 #A #H elim H -L1 -T1 -A
+[ #L1 #k #X #H
+ >(cpss_inv_sort1 … H) -H //
+| #I #L1 #K1 #V1 #B #i #HLK1 #_ #IHV1 #X #H #L2 #HL12
+ elim (cpss_inv_lref1 … H) -H
+ [ #H destruct
+ elim (lpss_ldrop_conf … HLK1 … HL12) -L1 #X #H #HLK2
+ elim (lpss_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct /3 width=6/
+ | * #Y #Z #V2 #H #HV12 #HV2
+ lapply (ldrop_mono … H … HLK1) -H #H destruct
+ elim (lpss_ldrop_conf … HLK1 … HL12) -L1 #Z #H #HLK2
+ elim (lpss_inv_pair1 … H) -H #K2 #V0 #HK12 #_ #H destruct
+ lapply (ldrop_fwd_ldrop2 … HLK2) -V0 /3 width=7/
+ ]
+| #a #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
+ elim (cpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct /4 width=2/
+| #a #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
+ elim (cpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct /4 width=1/
+| #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
+ elim (cpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct /3 width=3/
+| #L1 #V1 #T1 #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
+ elim (cpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct /3 width=1/
+]
+qed-.
+
+lemma aaa_cpss_conf: ∀L,T1,A. L ⊢ T1 ⁝ A → ∀T2. L ⊢ T1 ▶* T2 → L ⊢ T2 ⁝ A.
+/2 width=5 by aaa_cpss_lpss_conf/ qed-.
+
+lemma aaa_lpss_conf: ∀L1,T,A. L1 ⊢ T ⁝ A → ∀L2. L1 ⊢ ▶* L2 → L2 ⊢ T ⁝ A.
+/2 width=5 by aaa_cpss_lpss_conf/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/computation/cprs_lpss.ma".
+include "basic_2/equivalence/cpcs_cpcs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
+
+(* Properties on sn parallel substitution for local environments ************)
+
+lemma cpcs_lpss_conf: ∀L1,T1,T2. L1 ⊢ T1 ⬌* T2 →
+ ∀L2. L1 ⊢ ▶* L2 → L2 ⊢ T1 ⬌* T2.
+#L1 #T1 #T2 #H #L2 #HL12
+elim (cpcs_inv_cprs … H) -H #T #HT1 #HT2
+elim (cprs_lpss_conf_dx … HT1 … HL12) -HT1 #U1 #H1 #HTU1
+elim (cprs_lpss_conf_dx … HT2 … HL12) -L1 #U2 #H2 #HTU2
+elim (cpss_conf … H1 … H2) -T #U #HU1 #HU2
+lapply (cprs_cpss_trans … HTU1 … HU1) -U1
+lapply (cprs_cpss_trans … HTU2 … HU2) -U2 /2 width=3/
+qed-.
+
+lemma cpcs_cpss_lpss_conf: ∀L1,T,T2. L1 ⊢ T ⬌* T2 → ∀T1. L1 ⊢ T ▶* T1 →
+ ∀L2. L1 ⊢ ▶* L2 → L2 ⊢ T1 ⬌* T2.
+#L1 #T #T2 #HT2 #T1 #HT1 #L2 #HL12
+lapply (cpcs_lpss_conf … HT2 … HL12) -HT2 #HT2
+elim (lpss_cpss_conf_dx … HT1 … HL12) -L1 #T0 #HT0 #HT10
+lapply (cpcs_cpss_conf … HT0 … HT2) -T #HT02
+lapply (cpcs_cpss_strap2 … HT10 … HT02) -T0 //
+qed-.
+
+lemma cpcs_cpss2_lpss_conf: ∀L1,T1,T2. L1 ⊢ T1 ⬌* T2 →
+ ∀T3. L1 ⊢ T1 ▶* T3 → ∀T4. L1 ⊢ T2 ▶* T4 →
+ ∀L2. L1 ⊢ ▶* L2 → L2 ⊢ T3 ⬌* T4.
+#L1 #T1 #T2 #HT12 #T3 #HT13 #T4 #HT24 #L2 #HL12
+lapply (cpcs_cpss_lpss_conf … HT12 … HT13 … HL12) -T1 #HT32
+elim (lpss_cpss_conf_dx … HT24 … HL12) -L1 #T #HT2 #HT4
+lapply (cpcs_cpss_strap1 … HT32 … HT2) -T2 #HT3
+lapply (cpcs_cpss_div … HT3 … HT4) -T //
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 "hvbox( L ⊢ break term 46 T1 ➤ * break term 46 T2 )"
+ non associative with precedence 45
+ for @{ 'PRestStar $L $T1 $T2 }.
+
+include "basic_2/substitution/cpss.ma".
+
+(* CONTEXT-SENSITIVE RESTRICTED PARALLEL COMPUTATION FOR TERMS **************)
+
+inductive cpqs: lenv → relation term ≝
+| cpqs_atom : ∀I,L. cpqs L (⓪{I}) (⓪{I})
+| cpqs_delta: ∀L,K,V,V2,W2,i.
+ ⇩[0, i] L ≡ K. ⓓV → cpqs K V V2 →
+ ⇧[0, i + 1] V2 ≡ W2 → cpqs L (#i) W2
+| cpqs_bind : ∀a,I,L,V1,V2,T1,T2.
+ cpqs L V1 V2 → cpqs (L. ⓑ{I} V1) T1 T2 →
+ cpqs L (ⓑ{a,I} V1. T1) (ⓑ{a,I} V2. T2)
+| cpqs_flat : ∀I,L,V1,V2,T1,T2.
+ cpqs L V1 V2 → cpqs L T1 T2 →
+ cpqs L (ⓕ{I} V1. T1) (ⓕ{I} V2. T2)
+| cpqs_zeta : ∀L,V,T1,T,T2. cpqs (L.ⓓV) T1 T →
+ ⇧[0, 1] T2 ≡ T → cpqs L (+ⓓV. T1) T2
+| cpqs_tau : ∀L,V,T1,T2. cpqs L T1 T2 → cpqs L (ⓝV. T1) T2
+.
+
+interpretation "context-sensitive restricted parallel computation (term)"
+ 'PRestStar L T1 T2 = (cpqs L T1 T2).
+
+(* Basic properties *********************************************************)
+
+lemma cpqs_lsubr_trans: lsub_trans … cpqs lsubr.
+#L1 #T1 #T2 #H elim H -L1 -T1 -T2
+[ //
+| #L1 #K1 #V1 #V2 #W2 #i #HLK1 #_ #HVW2 #IHV12 #L2 #HL12
+ elim (lsubr_fwd_ldrop2_abbr … HL12 … HLK1) -HL12 -HLK1 /3 width=6/
+| /4 width=1/
+|4,6: /3 width=1/
+| /4 width=3/
+]
+qed-.
+
+lemma cpss_cpqs: ∀L,T1,T2. L ⊢ T1 ▶* T2 → L ⊢ T1 ➤* T2.
+#L #T1 #T2 #H elim H -L -T1 -T2 // /2 width=1/ /2 width=6/
+qed.
+
+lemma cpqs_refl: ∀T,L. L ⊢ T ➤* T.
+/2 width=1/ qed.
+
+lemma cpqs_delift: ∀L,K,V,T1,d. ⇩[0, d] L ≡ (K. ⓓV) →
+ ∃∃T2,T. L ⊢ T1 ➤* T2 & ⇧[d, 1] T ≡ T2.
+#L #K #V #T1 #d #HLK
+elim (cpss_delift … T1 … HLK) -HLK /3 width=4/
+qed-.
+
+lemma cpqs_append: l_appendable_sn … cpqs.
+#K #T1 #T2 #H elim H -K -T1 -T2 // /2 width=1/ /2 width=3/
+#K #K0 #V1 #V2 #W2 #i #HK0 #_ #HVW2 #IHV12 #L
+lapply (ldrop_fwd_length_lt2 … HK0) #H
+@(cpqs_delta … (L@@K0) V1 … HVW2) //
+@(ldrop_O1_append_sn_le … HK0) /2 width=2/ (**) (* /3/ does not work *)
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+fact cpqs_inv_atom1_aux: ∀L,T1,T2. L ⊢ T1 ➤* T2 → ∀I. T1 = ⓪{I} →
+ T2 = ⓪{I} ∨
+ ∃∃K,V,V2,i. ⇩[O, i] L ≡ K. ⓓV &
+ K ⊢ V ➤* V2 &
+ ⇧[O, i + 1] V2 ≡ T2 &
+ I = LRef i.
+#L #T1 #T2 * -L -T1 -T2
+[ #I #L #J #H destruct /2 width=1/
+| #L #K #V #V2 #T2 #i #HLK #HV2 #HVT2 #J #H destruct /3 width=8/
+| #a #I #L #V1 #V2 #T1 #T2 #_ #_ #J #H destruct
+| #I #L #V1 #V2 #T1 #T2 #_ #_ #J #H destruct
+| #L #V #T1 #T #T2 #_ #_ #J #H destruct
+| #L #V #T1 #T2 #_ #J #H destruct
+]
+qed-.
+
+lemma cpqs_inv_atom1: ∀I,L,T2. L ⊢ ⓪{I} ➤* T2 →
+ T2 = ⓪{I} ∨
+ ∃∃K,V,V2,i. ⇩[O, i] L ≡ K. ⓓV &
+ K ⊢ V ➤* V2 &
+ ⇧[O, i + 1] V2 ≡ T2 &
+ I = LRef i.
+/2 width=3 by cpqs_inv_atom1_aux/ qed-.
+
+lemma cpqs_inv_sort1: ∀L,T2,k. L ⊢ ⋆k ➤* T2 → T2 = ⋆k.
+#L #T2 #k #H
+elim (cpqs_inv_atom1 … H) -H //
+* #K #V #V2 #i #_ #_ #_ #H destruct
+qed-.
+
+lemma cpqs_inv_lref1: ∀L,T2,i. L ⊢ #i ➤* T2 →
+ T2 = #i ∨
+ ∃∃K,V,V2. ⇩[O, i] L ≡ K. ⓓV &
+ K ⊢ V ➤* V2 &
+ ⇧[O, i + 1] V2 ≡ T2.
+#L #T2 #i #H
+elim (cpqs_inv_atom1 … H) -H /2 width=1/
+* #K #V #V2 #j #HLK #HV2 #HVT2 #H destruct /3 width=6/
+qed-.
+
+lemma cpqs_inv_gref1: ∀L,T2,p. L ⊢ §p ➤* T2 → T2 = §p.
+#L #T2 #p #H
+elim (cpqs_inv_atom1 … H) -H //
+* #K #V #V2 #i #_ #_ #_ #H destruct
+qed-.
+
+fact cpqs_inv_bind1_aux: ∀L,U1,U2. L ⊢ U1 ➤* U2 →
+ ∀a,I,V1,T1. U1 = ⓑ{a,I} V1. T1 → (
+ ∃∃V2,T2. L ⊢ V1 ➤* V2 &
+ L. ⓑ{I} V1 ⊢ T1 ➤* T2 &
+ U2 = ⓑ{a,I} V2. T2
+ ) ∨
+ ∃∃T. L.ⓓV1 ⊢ T1 ➤* T & ⇧[0, 1] U2 ≡ T & a = true & I = Abbr.
+#L #U1 #U2 * -L -U1 -U2
+[ #I #L #b #J #W1 #U1 #H destruct
+| #L #K #V #V2 #W2 #i #_ #_ #_ #b #J #W1 #U1 #H destruct
+| #a #I #L #V1 #V2 #T1 #T2 #HV12 #HT12 #b #J #W1 #U1 #H destruct /3 width=5/
+| #I #L #V1 #V2 #T1 #T2 #_ #_ #b #J #W1 #U1 #H destruct
+| #L #V #T1 #T #T2 #HT1 #HT2 #b #J #W1 #U1 #H destruct /3 width=3/
+| #L #V #T1 #T2 #_ #b #J #W1 #U1 #H destruct
+]
+qed-.
+
+lemma cpqs_inv_bind1: ∀a,I,L,V1,T1,U2. L ⊢ ⓑ{a,I} V1. T1 ➤* U2 → (
+ ∃∃V2,T2. L ⊢ V1 ➤* V2 &
+ L. ⓑ{I} V1 ⊢ T1 ➤* T2 &
+ U2 = ⓑ{a,I} V2. T2
+ ) ∨
+ ∃∃T. L.ⓓV1 ⊢ T1 ➤* T & ⇧[0, 1] U2 ≡ T & a = true & I = Abbr.
+/2 width=3 by cpqs_inv_bind1_aux/ qed-.
+
+lemma cpqs_inv_abbr1: ∀a,L,V1,T1,U2. L ⊢ ⓓ{a} V1. T1 ➤* U2 → (
+ ∃∃V2,T2. L ⊢ V1 ➤* V2 &
+ L. ⓓ V1 ⊢ T1 ➤* T2 &
+ U2 = ⓓ{a} V2. T2
+ ) ∨
+ ∃∃T. L.ⓓV1 ⊢ T1 ➤* T & ⇧[0, 1] U2 ≡ T & a = true.
+#a #L #V1 #T1 #U2 #H
+elim (cpqs_inv_bind1 … H) -H * /3 width=3/ /3 width=5/
+qed-.
+
+lemma cpqs_inv_abst1: ∀a,L,V1,T1,U2. L ⊢ ⓛ{a} V1. T1 ➤* U2 →
+ ∃∃V2,T2. L ⊢ V1 ➤* V2 &
+ L. ⓛ V1 ⊢ T1 ➤* T2 &
+ U2 = ⓛ{a} V2. T2.
+#a #L #V1 #T1 #U2 #H
+elim (cpqs_inv_bind1 … H) -H *
+[ /3 width=5/
+| #T #_ #_ #_ #H destruct
+]
+qed-.
+
+fact cpqs_inv_flat1_aux: ∀L,U1,U2. L ⊢ U1 ➤* U2 →
+ ∀I,V1,T1. U1 = ⓕ{I} V1. T1 → (
+ ∃∃V2,T2. L ⊢ V1 ➤* V2 & L ⊢ T1 ➤* T2 &
+ U2 = ⓕ{I} V2. T2
+ ) ∨
+ (L ⊢ T1 ➤* U2 ∧ I = Cast).
+#L #U1 #U2 * -L -U1 -U2
+[ #I #L #J #W1 #U1 #H destruct
+| #L #K #V #V2 #W2 #i #_ #_ #_ #J #W1 #U1 #H destruct
+| #a #I #L #V1 #V2 #T1 #T2 #_ #_ #J #W1 #U1 #H destruct
+| #I #L #V1 #V2 #T1 #T2 #HV12 #HT12 #J #W1 #U1 #H destruct /3 width=5/
+| #L #V #T1 #T #T2 #_ #_ #J #W1 #U1 #H destruct
+| #L #V #T1 #T2 #HT12 #J #W1 #U1 #H destruct /3 width=1/
+]
+qed-.
+
+lemma cpqs_inv_flat1: ∀I,L,V1,T1,U2. L ⊢ ⓕ{I} V1. T1 ➤* U2 → (
+ ∃∃V2,T2. L ⊢ V1 ➤* V2 & L ⊢ T1 ➤* T2 &
+ U2 = ⓕ{I} V2. T2
+ ) ∨
+ (L ⊢ T1 ➤* U2 ∧ I = Cast).
+/2 width=3 by cpqs_inv_flat1_aux/ qed-.
+
+lemma cpqs_inv_appl1: ∀L,V1,T1,U2. L ⊢ ⓐ V1. T1 ➤* U2 →
+ ∃∃V2,T2. L ⊢ V1 ➤* V2 & L ⊢ T1 ➤* T2 &
+ U2 = ⓐ V2. T2.
+#L #V1 #T1 #U2 #H elim (cpqs_inv_flat1 … H) -H *
+[ /3 width=5/
+| #_ #H destruct
+]
+qed-.
+
+lemma cpqs_inv_cast1: ∀L,V1,T1,U2. L ⊢ ⓝ V1. T1 ➤* U2 → (
+ ∃∃V2,T2. L ⊢ V1 ➤* V2 & L ⊢ T1 ➤* T2 &
+ U2 = ⓝ V2. T2
+ ) ∨
+ L ⊢ T1 ➤* U2.
+#L #V1 #T1 #U2 #H elim (cpqs_inv_flat1 … H) -H * /2 width=1/ /3 width=5/
+qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma cpqs_fwd_shift1: ∀L1,L,T1,T. L ⊢ L1 @@ T1 ➤* T →
+ ∃∃L2,T2. |L1| = |L2| & T = L2 @@ T2.
+#L1 @(lenv_ind_dx … L1) -L1 normalize
+[ #L #T1 #T #HT1
+ @(ex2_2_intro … (⋆)) // (**) (* explicit constructor *)
+| #I #L1 #V1 #IH #L #T1 #X
+ >shift_append_assoc normalize #H
+ elim (cpqs_inv_bind1 … H) -H *
+ [ #V0 #T0 #_ #HT10 #H destruct
+ elim (IH … HT10) -IH -HT10 #L2 #T2 #HL12 #H destruct
+ >append_length >HL12 -HL12
+ @(ex2_2_intro … (⋆.ⓑ{I}V0@@L2) T2) [ >append_length ] // /2 width=3/ (**) (* explicit constructor *)
+ | #T #_ #_ #H destruct
+ ]
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/relocation/ldrop_ldrop.ma".
+include "basic_2/unfold/cpqs.ma".
+
+(* CONTEXT-SENSITIVE RESTRICTED PARALLEL COMPUTATION FOR TERMS **************)
+
+(* Relocation properties ****************************************************)
+
+lemma cpqs_lift: l_liftable cpqs.
+#K #T1 #T2 #H elim H -K -T1 -T2
+[ #I #K #L #d #e #_ #U1 #H1 #U2 #H2
+ >(lift_mono … H1 … H2) -H1 -H2 //
+| #K #KV #V #V2 #W2 #i #HKV #HV2 #HVW2 #IHV2 #L #d #e #HLK #U1 #H #U2 #HWU2
+ elim (lift_inv_lref1 … H) * #Hid #H destruct
+ [ elim (lift_trans_ge … HVW2 … HWU2) -W2 // <minus_plus #W2 #HVW2 #HWU2
+ elim (ldrop_trans_le … HLK … HKV) -K /2 width=2/ #X #HLK #H
+ elim (ldrop_inv_skip2 … H) -H /2 width=1/ -Hid #K #Y #HKV #HVY #H destruct /3 width=8/
+ | lapply (lift_trans_be … HVW2 … HWU2 ? ?) -W2 // /2 width=1/ >plus_plus_comm_23 #HVU2
+ lapply (ldrop_trans_ge_comm … HLK … HKV ?) -K // -Hid /3 width=6/
+ ]
+| #a #I #K #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L #d #e #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=5/
+| #I #K #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L #d #e #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/
+| #K #V #T1 #T #T2 #_ #HT2 #IHT1 #L #d #e #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=5/
+| #K #V #T1 #T2 #_ #IHT12 #L #d #e #HLK #U1 #H #U2 #HTU2
+ elim (lift_inv_flat1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct /3 width=5/
+]
+qed.
+
+lemma cpqs_inv_lift1: l_deliftable_sn cpqs.
+#L #U1 #U2 #H elim H -L -U1 -U2
+[ * #L #i #K #d #e #_ #T1 #H
+ [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3/
+ | elim (lift_inv_lref2 … H) -H * #Hid #H destruct /3 width=3/
+ | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3/
+ ]
+| #L #LV #V #V2 #W2 #i #HLV #HV2 #HVW2 #IHV2 #K #d #e #HLK #T1 #H
+ elim (lift_inv_lref2 … H) -H * #Hid #H destruct
+ [ elim (ldrop_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_m_m // -Hid /3 width=8/
+ | elim (le_inv_plus_l … Hid) #Hdie #Hei
+ lapply (ldrop_conf_ge … HLK … HLV ?) -L // #HKLV
+ elim (lift_split … HVW2 d (i - e + 1)) -HVW2 [4: // |3: /2 width=1/ |2: /3 width=1/ ] -Hid -Hdie
+ #V1 #HV1 >plus_minus // <minus_minus // /2 width=1/ <minus_n_n <plus_n_O /3 width=8/
+ ]
+| #a #I #L #V1 #V2 #U1 #U2 #_ #_ #IHV12 #IHU12 #K #d #e #HLK #X #H
+ elim (lift_inv_bind2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
+ elim (IHV12 … HLK … HWV1) -IHV12 #W2 #HW12 #HWV2
+ elim (IHU12 … HTU1) -IHU12 -HTU1 /3 width=5/
+| #I #L #V1 #V2 #U1 #U2 #_ #_ #IHV12 #IHU12 #K #d #e #HLK #X #H
+ elim (lift_inv_flat2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
+ elim (IHV12 … HLK … HWV1) -V1
+ elim (IHU12 … HLK … HTU1) -U1 -HLK /3 width=5/
+| #L #V #U1 #U #U2 #_ #HU2 #IHU1 #K #d #e #HLK #X #H
+ elim (lift_inv_bind2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
+ elim (IHU1 (K.ⓓW1) … HTU1) /2 width=1/ -L -U1 #T #HTU #HT1
+ elim (lift_div_le … HU2 … HTU) -U // /3 width=5/
+| #L #V #U1 #U2 #_ #IHU12 #K #d #e #HLK #X #H
+ elim (lift_inv_flat2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
+ elim (IHU12 … HLK … HTU1) -L -U1 /3 width=3/
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/substitution/lpss_lpss.ma".
+include "basic_2/reduction/lpr_lpss.ma".
+include "basic_2/computation/cprs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
+
+(* Properties on parallel substitution for terms ****************************)
+
+(* Basic_1: was: pr3_subst1 *)
+lemma cprs_cpss_conf: ∀L,T0,T1. L ⊢ T0 ➡* T1 → ∀T2. L ⊢ T0 ▶* T2 →
+ ∃∃T. L ⊢ T1 ▶* T & L ⊢ T2 ➡* T.
+#L @TC_strip1 /2 width=3 by cpr_cpss_conf/ qed-. (**) (* auto /3 width=3/ fails because a δ-expansion gets in the way *)
+
+(* Properties on sn parallel substitution for local environments ************)
+
+lemma cprs_lpss_conf_dx: ∀L0,T0,T1. L0 ⊢ T0 ➡* T1 → ∀L1. L0 ⊢ ▶* L1 →
+ ∃∃T. L1 ⊢ T1 ▶* T & L1 ⊢ T0 ➡* T.
+#L0 #T0 #T1 #H elim H -T1
+[ #T1 #HT01 #L1 #HL01
+ elim (cpr_lpss_conf_dx … HT01 … HL01) -L0 /3 width=3/
+| #T #T1 #_ #HT1 #IHT0 #L1 #HL01
+ elim (IHT0 … HL01) #T2 #HT2 #HT02
+ elim (cpr_lpss_conf_dx … HT1 … HL01) -L0 #T3 #HT13 #HT3
+ elim (cpr_cpss_conf … HT3 … HT2) -T #T #HT3 #HT2
+ lapply (cpss_trans … HT13 … HT3) -T3
+ lapply (cprs_strap1 … HT02 … HT2) -T2 /2 width=3/
+]
+qed-.
+
+lemma cprs_lpss_conf_sn: ∀L0,T0,T1. L0 ⊢ T0 ➡* T1 → ∀L1. L0 ⊢ ▶* L1 →
+ ∃∃T. L0 ⊢ T1 ▶* T & L1 ⊢ T0 ➡* T.
+#L0 #T0 #T1 #HT01 #L1 #HL01
+elim (cprs_lpss_conf_dx … HT01 … HL01) -HT01 #T #HT1
+lapply (lpss_cpss_trans … HL01 … HT1) -HT1 /2 width=3/
+qed-.
+
+lemma cprs_cpss_lpss_conf_sn: ∀L1,T1,U1. L1 ⊢ T1 ➡* U1 →
+ ∀T2. L1 ⊢ T1 ▶* T2 → ∀L2. L1 ⊢ ▶* L2 →
+ ∃∃U2. L2 ⊢ T2 ➡* U2 & L1 ⊢ U1 ▶* U2.
+#L1 #T1 #U1 #HTU1 #T2 #HT12 #L2 #HL12
+elim (cprs_cpss_conf … HTU1 … HT12) -T1 #U #HU1 #HT2U
+elim (cprs_lpss_conf_sn … HT2U … HL12) -HT2U -HL12 #U2 #HU2 #HTU2
+lapply (cpss_trans … HU1 … HU2) -U /2 width=3/
+qed-.
+
+lemma cprs_cpss_lpss_conf_dx: ∀L1,T1,U1. L1 ⊢ T1 ➡* U1 →
+ ∀T2. L1 ⊢ T1 ▶* T2 → ∀L2. L1 ⊢ ▶* L2 →
+ ∃∃U2. L2 ⊢ T2 ➡* U2 & L2 ⊢ U1 ▶* U2.
+#L1 #T1 #U1 #HTU1 #T2 #HT12 #L2 #HL12
+elim (cprs_lpss_conf_dx … HTU1 … HL12) -HTU1 #U2 #HU12 #HT1U2
+elim (lpss_cpss_conf_dx … HT12 … HL12) -L1 #T #HT1 #HT2
+elim (cprs_cpss_conf … HT1U2 … HT1) -T1 #U #HU2 #HTU
+lapply (cpss_trans … HU12 … HU2) -U2
+lapply (cpss_cprs_trans … HT2 … HTU) -T /2 width=3/
+qed-.
+
+
+lemma cprs_cpss2_lpss_conf_sn: ∀L1,T1,U1. L1 ⊢ T1 ➡* U1 → ∀T2. L1 ⊢ T1 ▶* T2 →
+ ∀U2. L1 ⊢ U1 ▶* U2 → ∀L2. L1 ⊢ ▶* L2 →
+ ∃∃U. L2 ⊢ T2 ➡* U & L1 ⊢ U2 ▶* U.
+#L1 #T1 #U1 #HTU1 #T2 #HT12 #U2 #HU12 #L2 #HL12
+elim (cprs_cpss_lpss_conf_sn … HTU1 … HT12 … HL12) -T1 #T1 #HT21 #HUT1
+elim (cpss_conf … HU12 … HUT1) -U1 #U1 #HU21 #HTU1
+elim (lpss_cpss_conf_sn … HTU1 … HL12) -HTU1 -HL12 #U2 #HT1U2 #HU12
+lapply (cpss_trans … HU21 … HU12) -U1
+lapply (cprs_cpss_trans … HT21 … HT1U2) -T1 /2 width=3/
+qed-.
+
+lemma cprs_cpss2_lpss_conf_dx: ∀L1,T1,U1. L1 ⊢ T1 ➡* U1 → ∀T2. L1 ⊢ T1 ▶* T2 →
+ ∀U2. L1 ⊢ U1 ▶* U2 → ∀L2. L1 ⊢ ▶* L2 →
+ ∃∃U. L2 ⊢ T2 ➡* U & L2 ⊢ U2 ▶* U.
+#L1 #T1 #U1 #HTU1 #T2 #HT12 #U2 #HU12 #L2 #HL12
+elim (cprs_cpss_lpss_conf_dx … HTU1 … HT12 … HL12) -T1 #T1 #HT21 #HUT1
+elim (lpss_cpss_conf_dx … HU12 … HL12) -L1 #U #HU1 #HU2
+elim (cpss_conf … HU1 … HUT1) -U1 #U1 #HU1 #HTU1
+lapply (cpss_trans … HU2 … HU1) -U
+lapply (cprs_cpss_trans … HT21 … HTU1) -T1 /2 width=3/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 "hvbox( L ⊢ break term 46 T1 ▶* break term 46 T2 )"
+ non associative with precedence 45
+ for @{ 'PSubstStar $L $T1 $T2 }.
+
+include "basic_2/grammar/cl_shift.ma".
+include "basic_2/relocation/ldrop_append.ma".
+include "basic_2/substitution/lsubr.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL SUBSTITUTION FOR TERMS ************************)
+
+inductive cpss: lenv → relation term ≝
+| cpss_atom : ∀I,L. cpss L (⓪{I}) (⓪{I})
+| cpss_delta: ∀L,K,V,V2,W2,i.
+ ⇩[0, i] L ≡ K. ⓓV → cpss K V V2 →
+ ⇧[0, i + 1] V2 ≡ W2 → cpss L (#i) W2
+| cpss_bind : ∀a,I,L,V1,V2,T1,T2.
+ cpss L V1 V2 → cpss (L. ⓑ{I} V1) T1 T2 →
+ cpss L (ⓑ{a,I} V1. T1) (ⓑ{a,I} V2. T2)
+| cpss_flat : ∀I,L,V1,V2,T1,T2.
+ cpss L V1 V2 → cpss L T1 T2 →
+ cpss L (ⓕ{I} V1. T1) (ⓕ{I} V2. T2)
+.
+
+interpretation "context-sensitive parallel substitution (term)"
+ 'PSubstStar L T1 T2 = (cpss L T1 T2).
+
+(* Basic properties *********************************************************)
+
+lemma cpss_lsubr_trans: lsub_trans … cpss lsubr.
+#L1 #T1 #T2 #H elim H -L1 -T1 -T2
+[ //
+| #L1 #K1 #V1 #V2 #W2 #i #HLK1 #_ #HVW2 #IHV12 #L2 #HL12
+ elim (lsubr_fwd_ldrop2_abbr … HL12 … HLK1) -HL12 -HLK1 /3 width=6/
+| /4 width=1/
+| /3 width=1/
+]
+qed-.
+
+(* Basic_1: was by definition: subst1_refl *)
+lemma cpss_refl: ∀T,L. L ⊢ T ▶* T.
+#T elim T -T //
+#I elim I -I /2 width=1/
+qed.
+
+(* Basic_1: was only: subst1_ex *)
+lemma cpss_delift: ∀K,V,T1,L,d. ⇩[0, d] L ≡ (K. ⓓV) →
+ ∃∃T2,T. L ⊢ T1 ▶* T2 & ⇧[d, 1] T ≡ T2.
+#K #V #T1 elim T1 -T1
+[ * #i #L #d #HLK /2 width=4/
+ elim (lt_or_eq_or_gt i d) #Hid /3 width=4/
+ destruct
+ elim (lift_total V 0 (i+1)) #W #HVW
+ elim (lift_split … HVW i i) // /3 width=6/
+| * [ #a ] #I #W1 #U1 #IHW1 #IHU1 #L #d #HLK
+ elim (IHW1 … HLK) -IHW1 #W2 #W #HW12 #HW2
+ [ elim (IHU1 (L. ⓑ{I} W1) (d+1)) -IHU1 /2 width=1/ -HLK /3 width=9/
+ | elim (IHU1 … HLK) -IHU1 -HLK /3 width=8/
+ ]
+]
+qed-.
+
+lemma cpss_append: l_appendable_sn … cpss.
+#K #T1 #T2 #H elim H -K -T1 -T2 // /2 width=1/
+#K #K0 #V1 #V2 #W2 #i #HK0 #_ #HVW2 #IHV12 #L
+lapply (ldrop_fwd_length_lt2 … HK0) #H
+@(cpss_delta … (L@@K0) V1 … HVW2) //
+@(ldrop_O1_append_sn_le … HK0) /2 width=2/ (**) (* /3/ does not work *)
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+fact cpss_inv_atom1_aux: ∀L,T1,T2. L ⊢ T1 ▶* T2 → ∀I. T1 = ⓪{I} →
+ T2 = ⓪{I} ∨
+ ∃∃K,V,V2,i. ⇩[O, i] L ≡ K. ⓓV &
+ K ⊢ V ▶* V2 &
+ ⇧[O, i + 1] V2 ≡ T2 &
+ I = LRef i.
+#L #T1 #T2 * -L -T1 -T2
+[ #I #L #J #H destruct /2 width=1/
+| #L #K #V #V2 #T2 #i #HLK #HV2 #HVT2 #I #H destruct /3 width=8/
+| #a #I #L #V1 #V2 #T1 #T2 #_ #_ #J #H destruct
+| #I #L #V1 #V2 #T1 #T2 #_ #_ #J #H destruct
+]
+qed-.
+
+lemma cpss_inv_atom1: ∀I,L,T2. L ⊢ ⓪{I} ▶* T2 →
+ T2 = ⓪{I} ∨
+ ∃∃K,V,V2,i. ⇩[O, i] L ≡ K. ⓓV &
+ K ⊢ V ▶* V2 &
+ ⇧[O, i + 1] V2 ≡ T2 &
+ I = LRef i.
+/2 width=3 by cpss_inv_atom1_aux/ qed-.
+
+(* Basic_1: was only: subst1_gen_sort *)
+lemma cpss_inv_sort1: ∀L,T2,k. L ⊢ ⋆k ▶* T2 → T2 = ⋆k.
+#L #T2 #k #H
+elim (cpss_inv_atom1 … H) -H //
+* #K #V #V2 #i #_ #_ #_ #H destruct
+qed-.
+
+(* Basic_1: was only: subst1_gen_lref *)
+lemma cpss_inv_lref1: ∀L,T2,i. L ⊢ #i ▶* T2 →
+ T2 = #i ∨
+ ∃∃K,V,V2. ⇩[O, i] L ≡ K. ⓓV &
+ K ⊢ V ▶* V2 &
+ ⇧[O, i + 1] V2 ≡ T2.
+#L #T2 #i #H
+elim (cpss_inv_atom1 … H) -H /2 width=1/
+* #K #V #V2 #j #HLK #HV2 #HVT2 #H destruct /3 width=6/
+qed-.
+
+lemma cpss_inv_gref1: ∀L,T2,p. L ⊢ §p ▶* T2 → T2 = §p.
+#L #T2 #p #H
+elim (cpss_inv_atom1 … H) -H //
+* #K #V #V2 #i #_ #_ #_ #H destruct
+qed-.
+
+fact cpss_inv_bind1_aux: ∀L,U1,U2. L ⊢ U1 ▶* U2 →
+ ∀a,I,V1,T1. U1 = ⓑ{a,I} V1. T1 →
+ ∃∃V2,T2. L ⊢ V1 ▶* V2 &
+ L. ⓑ{I} V1 ⊢ T1 ▶* T2 &
+ U2 = ⓑ{a,I} V2. T2.
+#L #U1 #U2 * -L -U1 -U2
+[ #I #L #b #J #W1 #U1 #H destruct
+| #L #K #V #V2 #W2 #i #_ #_ #_ #b #J #W1 #U1 #H destruct
+| #a #I #L #V1 #V2 #T1 #T2 #HV12 #HT12 #b #J #W1 #U1 #H destruct /2 width=5/
+| #I #L #V1 #V2 #T1 #T2 #_ #_ #b #J #W1 #U1 #H destruct
+]
+qed-.
+
+lemma cpss_inv_bind1: ∀a,I,L,V1,T1,U2. L ⊢ ⓑ{a,I} V1. T1 ▶* U2 →
+ ∃∃V2,T2. L ⊢ V1 ▶* V2 &
+ L. ⓑ{I} V1 ⊢ T1 ▶* T2 &
+ U2 = ⓑ{a,I} V2. T2.
+/2 width=3 by cpss_inv_bind1_aux/ qed-.
+
+fact cpss_inv_flat1_aux: ∀L,U1,U2. L ⊢ U1 ▶* U2 →
+ ∀I,V1,T1. U1 = ⓕ{I} V1. T1 →
+ ∃∃V2,T2. L ⊢ V1 ▶* V2 & L ⊢ T1 ▶* T2 &
+ U2 = ⓕ{I} V2. T2.
+#L #U1 #U2 * -L -U1 -U2
+[ #I #L #J #W1 #U1 #H destruct
+| #L #K #V #V2 #W2 #i #_ #_ #_ #J #W1 #U1 #H destruct
+| #a #I #L #V1 #V2 #T1 #T2 #_ #_ #J #W1 #U1 #H destruct
+| #I #L #V1 #V2 #T1 #T2 #HV12 #HT12 #J #W1 #U1 #H destruct /2 width=5/
+]
+qed-.
+
+lemma cpss_inv_flat1: ∀I,L,V1,T1,U2. L ⊢ ⓕ{I} V1. T1 ▶* U2 →
+ ∃∃V2,T2. L ⊢ V1 ▶* V2 & L ⊢ T1 ▶* T2 &
+ U2 = ⓕ{I} V2. T2.
+/2 width=3 by cpss_inv_flat1_aux/ qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma cpss_fwd_tw: ∀L,T1,T2. L ⊢ T1 ▶* T2 → ♯{T1} ≤ ♯{T2}.
+#L #T1 #T2 #H elim H -L -T1 -T2 normalize
+/3 width=1 by monotonic_le_plus_l, le_plus/ (**) (* auto is too slow without trace *)
+qed-.
+
+lemma cpss_fwd_shift1: ∀L1,L,T1,T. L ⊢ L1 @@ T1 ▶* T →
+ ∃∃L2,T2. |L1| = |L2| & T = L2 @@ T2.
+#L1 @(lenv_ind_dx … L1) -L1 normalize
+[ #L #T1 #T #HT1
+ @(ex2_2_intro … (⋆)) // (**) (* explicit constructor *)
+| #I #L1 #V1 #IH #L #T1 #X
+ >shift_append_assoc normalize #H
+ elim (cpss_inv_bind1 … H) -H
+ #V0 #T0 #_ #HT10 #H destruct
+ elim (IH … HT10) -IH -HT10 #L2 #T2 #HL12 #H destruct
+ >append_length >HL12 -HL12
+ @(ex2_2_intro … (⋆.ⓑ{I}V0@@L2) T2) [ >append_length ] // /2 width=3/ (**) (* explicit constructor *)
+]
+qed-.
+
+(* Basic_1: removed theorems 27:
+ 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
+ subst1_gen_lift_eq subst1_confluence_neq
+*)
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/relocation/ldrop_ldrop.ma".
+include "basic_2/substitution/cpss.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL SUBSTITUTION FOR TERMS ************************)
+
+(* Relocation properties ****************************************************)
+
+(* Basic_1: was only: subst1_lift_lt subst1_lift_ge *)
+lemma cpss_lift: l_liftable cpss.
+#K #T1 #T2 #H elim H -K -T1 -T2
+[ #I #K #L #d #e #_ #U1 #H1 #U2 #H2
+ >(lift_mono … H1 … H2) -H1 -H2 //
+| #K #KV #V #V2 #W2 #i #HKV #HV2 #HVW2 #IHV2 #L #d #e #HLK #U1 #H #U2 #HWU2
+ elim (lift_inv_lref1 … H) * #Hid #H destruct
+ [ elim (lift_trans_ge … HVW2 … HWU2) -W2 // <minus_plus #W2 #HVW2 #HWU2
+ elim (ldrop_trans_le … HLK … HKV) -K /2 width=2/ #X #HLK #H
+ elim (ldrop_inv_skip2 … H) -H /2 width=1/ -Hid #K #Y #HKV #HVY #H destruct /3 width=8/
+ | lapply (lift_trans_be … HVW2 … HWU2 ? ?) -W2 // /2 width=1/ >plus_plus_comm_23 #HVU2
+ lapply (ldrop_trans_ge_comm … HLK … HKV ?) -K // -Hid /3 width=6/
+ ]
+| #a #I #K #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L #d #e #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=5/
+| #I #K #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L #d #e #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/
+]
+qed.
+
+(* Basic_1: was only: subst1_gen_lift_lt subst1_gen_lift_ge *)
+lemma cpss_inv_lift1: l_deliftable_sn cpss.
+#L #U1 #U2 #H elim H -L -U1 -U2
+[ * #L #i #K #d #e #_ #T1 #H
+ [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3/
+ | elim (lift_inv_lref2 … H) -H * #Hid #H destruct /3 width=3/
+ | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3/
+ ]
+| #L #LV #V #V2 #W2 #i #HLV #HV2 #HVW2 #IHV2 #K #d #e #HLK #T1 #H
+ elim (lift_inv_lref2 … H) -H * #Hid #H destruct
+ [ elim (ldrop_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_m_m // -Hid /3 width=8/
+ | elim (le_inv_plus_l … Hid) #Hdie #Hei
+ lapply (ldrop_conf_ge … HLK … HLV ?) -L // #HKLV
+ elim (lift_split … HVW2 d (i - e + 1)) -HVW2 [4: // |3: /2 width=1/ |2: /3 width=1/ ] -Hid -Hdie
+ #V1 #HV1 >plus_minus // <minus_minus // /2 width=1/ <minus_n_n <plus_n_O /3 width=8/
+ ]
+| #a #I #L #V1 #V2 #U1 #U2 #_ #_ #IHV12 #IHU12 #K #d #e #HLK #X #H
+ elim (lift_inv_bind2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
+ elim (IHV12 … HLK … HWV1) -IHV12 #W2 #HW12 #HWV2
+ elim (IHU12 … HTU1) -IHU12 -HTU1 /3 width=5/
+| #I #L #V1 #V2 #U1 #U2 #_ #_ #IHV12 #IHU12 #K #d #e #HLK #X #H
+ elim (lift_inv_flat2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
+ elim (IHV12 … HLK … HWV1) -V1
+ elim (IHU12 … HLK … HTU1) -U1 -HLK /3 width=5/
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/unfold/sstas_lpss.ma".
+include "basic_2/computation/cprs_lpss.ma".
+include "basic_2/computation/dxprs.ma".
+
+(* DECOMPOSED EXTENDED PARALLEL COMPUTATION ON TERMS ************************)
+
+(* Properties about sn parallel substitution for local environments *********)
+
+lemma dxprs_lpss_conf: ∀h,g,L1,T,U1. ⦃h, L1⦄ ⊢ T •*➡*[g] U1 → ∀L2. L1 ⊢ ▶* L2 →
+ ∃∃U2. ⦃h, L2⦄ ⊢ T •*➡*[g] U2 & L1 ⊢ U1 ▶* U2.
+#h #g #L1 #T #U1 * #U #HTU #HU1 #L2 #HL12
+elim (sstas_lpss_conf … HTU … HL12) -HTU #U0 #HTU0 #HU0
+elim (cprs_cpss_conf … HU1 … HU0) -U #U #HU1 #HU0
+elim (cprs_lpss_conf_sn … HU0 … HL12) -HU0 -HL12 #U2 #HU2 #HU02
+lapply (cpss_trans … HU1 … HU2) -U /3 width=3/
+qed-.
+
+lemma dxprs_cpss_conf: ∀h,g,L,T1,U1. ⦃h, L⦄ ⊢ T1 •*➡*[g] U1 → ∀T2. L ⊢ T1 ▶* T2 →
+ ∃∃U2. ⦃h, L⦄ ⊢ T2 •*➡*[g] U2 & L ⊢ U1 ▶* U2.
+#h #g #L #T1 #U1 * #W1 #HTW1 #HWU1 #T2 #HT12
+elim (sstas_cpss_conf … HTW1 … HT12) -T1 #W2 #HTW2 #HW12
+elim (cprs_cpss_conf … HWU1 … HW12) -W1 /3 width=3/
+qed-.
+
+lemma dxprs_cpss_lpss_conf: ∀h,g,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 •*➡*[g] U1 →
+ ∀T2. L1 ⊢ T1 ▶* T2 → ∀L2. L1 ⊢ ▶* L2 →
+ ∃∃U2. ⦃h, L2⦄ ⊢ T2 •*➡*[g] U2 & L1 ⊢ U1 ▶* U2.
+#h #g #L1 #T1 #U1 #HTU1 #T2 #HT12 #L2 #HL12
+elim (dxprs_cpss_conf … HTU1 … HT12) -T1 #U2 #HTU2 #HU12
+elim (dxprs_lpss_conf … HTU2 … HL12) -HTU2 -HL12 #U #HT2U #HU2
+lapply (cpss_trans … HU12 … HU2) -U2 /2 width=3/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 "hvbox( T1 ⊢ ➤ * break term 46 T2 )"
+ non associative with precedence 45
+ for @{ 'PRestStarSn $T1 $T2 }.
+
+include "basic_2/substitution/lpss.ma".
+include "basic_2/unfold/cpqs.ma".
+
+(* SN RESTRICTED PARALLEL COMPUTATION FOR LOCAL ENVIRONMENTS ****************)
+
+definition lpqs: relation lenv ≝ lpx_sn cpqs.
+
+interpretation "restricted parallel computation (local environment, sn variant)"
+ 'PRestStarSn L1 L2 = (lpqs L1 L2).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma lpqs_inv_atom1: ∀L2. ⋆ ⊢ ➤* L2 → L2 = ⋆.
+/2 width=4 by lpx_sn_inv_atom1_aux/ qed-.
+
+lemma lpqs_inv_pair1: ∀I,K1,V1,L2. K1. ⓑ{I} V1 ⊢ ➤* L2 →
+ ∃∃K2,V2. K1 ⊢ ➤* K2 & K1 ⊢ V1 ➤* V2 & L2 = K2. ⓑ{I} V2.
+/2 width=3 by lpx_sn_inv_pair1_aux/ qed-.
+
+lemma lpqs_inv_atom2: ∀L1. L1 ⊢ ➤* ⋆ → L1 = ⋆.
+/2 width=4 by lpx_sn_inv_atom2_aux/ qed-.
+
+lemma lpqs_inv_pair2: ∀I,L1,K2,V2. L1 ⊢ ➤* K2. ⓑ{I} V2 →
+ ∃∃K1,V1. K1 ⊢ ➤* K2 & K1 ⊢ V1 ➤* V2 & L1 = K1. ⓑ{I} V1.
+/2 width=3 by lpx_sn_inv_pair2_aux/ qed-.
+
+(* Basic properties *********************************************************)
+
+lemma lpqs_refl: ∀L. L ⊢ ➤* L.
+/2 width=1 by lpx_sn_refl/ qed.
+
+lemma lpqs_pair: ∀I,K1,K2,V1,V2. K1 ⊢ ➤* K2 → K1 ⊢ V1 ➤* V2 →
+ K1.ⓑ{I}V1 ⊢ ➤* K2.ⓑ{I}V2.
+/2 width=1/ qed.
+
+lemma lpqs_append: ∀K1,K2. K1 ⊢ ➤* K2 → ∀L1,L2. L1 ⊢ ➤* L2 →
+ L1 @@ K1 ⊢ ➤* L2 @@ K2.
+/3 width=1 by lpx_sn_append, cpqs_append/ qed.
+
+lemma lpss_lpqs: ∀L1,L2. L1 ⊢ ▶* L2 → L1 ⊢ ➤* L2.
+#L1 #L2 #H elim H -L1 -L2 // /3 width=1/
+qed.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma lpqs_fwd_length: ∀L1,L2. L1 ⊢ ➤* L2 → |L1| = |L2|.
+/2 width=2 by lpx_sn_fwd_length/ qed-.
+
+(* Advanced forward lemmas **************************************************)
+
+lemma lpqs_fwd_append1: ∀K1,L1,L. K1 @@ L1 ⊢ ➤* L →
+ ∃∃K2,L2. K1 ⊢ ➤* K2 & L = K2 @@ L2.
+/2 width=2 by lpx_sn_fwd_append1/ qed-.
+
+lemma lpqs_fwd_append2: ∀L,K2,L2. L ⊢ ➤* K2 @@ L2 →
+ ∃∃K1,L1. K1 ⊢ ➤* K2 & L = K1 @@ L1.
+/2 width=2 by lpx_sn_fwd_append2/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/grammar/lpx_sn_lpx_sn.ma".
+include "basic_2/substitution/fsupp.ma".
+include "basic_2/unfold/lpqs_ldrop.ma".
+
+(* SN RESTRICTED PARALLEL COMPUTATION FOR LOCAL ENVIRONMENTS ****************)
+
+(* Main properties on context-sensitive rest parallel computation for terms *)
+
+theorem cpqs_trans_lpqs: lpx_sn_transitive cpqs cpqs.
+#L0 #T0 @(fsupp_wf_ind … L0 T0) -L0 -T0 #L0 #T0 #IH #L1 * [|*]
+[ #I #HL #HT #T #H1 #L2 #HL12 #T2 #HT2 destruct
+ elim (cpqs_inv_atom1 … H1) -H1
+ [ #H destruct
+ elim (cpqs_inv_atom1 … HT2) -HT2
+ [ #H destruct //
+ | * #K2 #V #V2 #i #HLK2 #HV2 #HVT2 #H destruct
+ elim (lpqs_ldrop_trans_O1 … HL12 … HLK2) -L2 #X #HLK1 #H
+ elim (lpqs_inv_pair2 … H) -H #K1 #V1 #HK12 #HV1 #H destruct
+ lapply (fsupp_lref … HLK1) /3 width=9/
+ ]
+ | * #K1 #V1 #V #i #HLK1 #HV1 #HVT #H destruct
+ elim (lpqs_ldrop_conf … HLK1 … HL12) -HL12 #X #H #HLK2
+ elim (lpqs_inv_pair1 … H) -H #K2 #W2 #HK12 #_ #H destruct
+ lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
+ elim (cpqs_inv_lift1 … HT2 … HLK2 … HVT) -L2 -T
+ lapply (fsupp_lref … HLK1) /3 width=9/
+ ]
+| #a #I #V1 #T1 #HL #HT #X1 #H1 #L2 #HL12 #X2 #H2
+ elim (cpqs_inv_bind1 … H1) -H1 *
+ [ #V #T #HV1 #HT1 #H destruct
+ elim (cpqs_inv_bind1 … H2) -H2 *
+ [ #V2 #T2 #HV2 #HT2 #H destruct /4 width=5/
+ | #T2 #HT2 #HXT2 #H1 #H2 destruct /4 width=5/
+ ]
+ | #Y1 #HTY1 #HXY1 #H11 #H12 destruct
+ elim (lift_total X2 0 1) #Y2 #HXY2
+ lapply (cpqs_lift … H2 (L2.ⓓV1) … HXY1 … HXY2) /2 width=1/ -X1 /4 width=5/
+ ]
+| #I #V1 #T1 #HL #HT #X1 #H1 #L2 #HL12 #X2 #H2
+ elim (cpqs_inv_flat1 … H1) -H1 *
+ [ #V #T #HV1 #HT1 #H destruct
+ elim (cpqs_inv_flat1 … H2) -H2 *
+ [ #V2 #T2 #HV2 #HT2 #H destruct /3 width=5/
+ | #HX2 #H destruct /3 width=5/
+ ]
+ | #HX1 #H destruct /3 width=5/
+]
+qed-.
+
+theorem cpqs_trans: ∀L. Transitive … (cpqs L).
+/2 width=5 by cpqs_trans_lpqs/ qed-.
+
+(* Properties on context-sensitive rest. parallel computation for terms *****)
+
+lemma lpqs_cpqs_trans: ∀L1,L2. L1 ⊢ ➤* L2 →
+ ∀T1,T2. L2 ⊢ T1 ➤* T2 → L1 ⊢ T1 ➤* T2.
+/2 width=5 by cpqs_trans_lpqs/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/relocation/fsup.ma".
+include "basic_2/relocation/ldrop_lpx_sn.ma".
+include "basic_2/unfold/cpqs_lift.ma".
+include "basic_2/unfold/lpqs.ma".
+
+(* SN RESTRICTED PARALLEL COMPUTATION FOR LOCAL ENVIRONMENTS ****************)
+
+(* Properies on local environment slicing ***********************************)
+
+lemma lpqs_ldrop_conf: dropable_sn lpqs.
+/3 width=5 by lpx_sn_deliftable_dropable, cpqs_inv_lift1/ qed-.
+
+lemma ldrop_lpqs_trans: dedropable_sn lpqs.
+/3 width=9 by lpx_sn_liftable_dedropable, cpqs_lift/ qed-.
+
+lemma lpqs_ldrop_trans_O1: dropable_dx lpqs.
+/2 width=3 by lpx_sn_dropable/ qed-.
+
+(* Properties on context-sensitive rest. parallel computation for terms *****)
+
+lemma fsup_cpqs_trans: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ → ∀U2. L2 ⊢ T2 ➤* U2 →
+ ∃∃L,U1. L1 ⊢ ➤* L & L ⊢ T1 ➤* U1 & ⦃L, U1⦄ ⊃ ⦃L2, U2⦄.
+#L1 #L2 #T1 #T2 #H elim H -L1 -L2 -T1 -T2 [2: * ] [1,2,3,4,5: /3 width=5/ ]
+[ #L #K #U #T #d #e #HLK #HUT #He #U2 #HU2
+ elim (lift_total U2 d e) #T2 #HUT2
+ lapply (cpqs_lift … HU2 … HLK … HUT … HUT2) -HU2 -HUT /3 width=9/
+| #L1 #K1 #K2 #T1 #T2 #U1 #d #e #HLK1 #HTU1 #_ #IHT12 #U2 #HTU2
+ elim (IHT12 … HTU2) -IHT12 -HTU2 #K #T #HK1 #HT1 #HT2
+ elim (lift_total T d e) #U #HTU
+ elim (ldrop_lpqs_trans … HLK1 … HK1) -HLK1 -HK1 #L2 #HL12 #HL2K
+ lapply (cpqs_lift … HT1 … HL2K … HTU1 … HTU) -HT1 -HTU1 /3 width=11/
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/unfold/lpqs_cpqs.ma".
+
+(* SN RESTRICTED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *****************)
+
+(* Main properties on context-sensitive rest parallel computation for terms *)
+
+fact cpqs_conf_lpqs_atom_atom:
+ ∀I,L1,L2. ∃∃T. L1 ⊢ ⓪{I} ➤* T & L2 ⊢ ⓪{I} ➤* T.
+/2 width=3/ qed-.
+
+fact cpqs_conf_lpqs_atom_delta:
+ ∀L0,i. (
+ ∀L,T. ⦃L0, #i⦄ ⊃+ ⦃L, T⦄ →
+ ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
+ ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
+ ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
+ ) →
+ ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
+ ∀V2. K0 ⊢ V0 ➤* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
+ ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
+ ∃∃T. L1 ⊢ #i ➤* T & L2 ⊢ T2 ➤* T.
+#L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
+elim (lpqs_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
+elim (lpqs_inv_pair1 … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct
+elim (lpqs_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
+elim (lpqs_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
+lapply (fsupp_lref … HLK0) -HLK0 #HLK0
+elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
+elim (lift_total V 0 (i+1)) #T #HVT
+lapply (cpqs_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 /3 width=6/
+qed-.
+
+fact cpqs_conf_lpqs_delta_delta:
+ ∀L0,i. (
+ ∀L,T. ⦃L0, #i⦄ ⊃+ ⦃L, T⦄ →
+ ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
+ ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
+ ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
+ ) →
+ ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
+ ∀V1. K0 ⊢ V0 ➤* V1 → ∀T1. ⇧[O, i + 1] V1 ≡ T1 →
+ ∀KX,VX. ⇩[O, i] L0 ≡ KX.ⓓVX →
+ ∀V2. KX ⊢ VX ➤* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
+ ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
+ ∃∃T. L1 ⊢ T1 ➤* T & L2 ⊢ T2 ➤* T.
+#L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1
+#KX #VX #H #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
+lapply (ldrop_mono … H … HLK0) -H #H destruct
+elim (lpqs_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
+elim (lpqs_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK1) -W1 #HLK1
+elim (lpqs_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
+elim (lpqs_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
+lapply (fsupp_lref … HLK0) -HLK0 #HLK0
+elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
+elim (lift_total V 0 (i+1)) #T #HVT
+lapply (cpqs_lift … HV1 … HLK1 … HVT1 … HVT) -K1 -V1
+lapply (cpqs_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 -V /2 width=3/
+qed-.
+
+fact cpqs_conf_lpqs_bind_bind:
+ ∀a,I,L0,V0,T0. (
+ ∀L,T. ⦃L0,ⓑ{a,I}V0.T0⦄ ⊃+ ⦃L,T⦄ →
+ ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
+ ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
+ ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
+ ) →
+ ∀V1. L0 ⊢ V0 ➤* V1 → ∀T1. L0.ⓑ{I}V0 ⊢ T0 ➤* T1 →
+ ∀V2. L0 ⊢ V0 ➤* V2 → ∀T2. L0.ⓑ{I}V0 ⊢ T0 ➤* T2 →
+ ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
+ ∃∃T. L1 ⊢ ⓑ{a,I}V1.T1 ➤* T & L2 ⊢ ⓑ{a,I}V2.T2 ➤* T.
+#a #I #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 // /2 width=1/ /3 width=5/
+qed-.
+
+fact cpqs_conf_lpqs_bind_zeta:
+ ∀L0,V0,T0. (
+ ∀L,T. ⦃L0,+ⓓV0.T0⦄ ⊃+ ⦃L,T⦄ →
+ ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
+ ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
+ ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
+ ) →
+ ∀V1. L0 ⊢ V0 ➤* V1 → ∀T1. L0.ⓓV0 ⊢ T0 ➤* T1 →
+ ∀T2. L0.ⓓV0 ⊢ T0 ➤* T2 → ∀X2. ⇧[O, 1] X2 ≡ T2 →
+ ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
+ ∃∃T. L1 ⊢ +ⓓV1.T1 ➤* T & L2 ⊢ X2 ➤* T.
+#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/ -L0 -V0 -T0 #T #HT1 #HT2
+elim (cpqs_inv_lift1 … HT2 L2 … HXT2) -T2 /2 width=1/ /3 width=3/
+qed-.
+
+fact cpqs_conf_lpqs_zeta_zeta:
+ ∀L0,V0,T0. (
+ ∀L,T. ⦃L0,+ⓓV0.T0⦄ ⊃+ ⦃L,T⦄ →
+ ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
+ ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
+ ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
+ ) →
+ ∀T1. L0.ⓓV0 ⊢ T0 ➤* T1 → ∀X1. ⇧[O, 1] X1 ≡ T1 →
+ ∀T2. L0.ⓓV0 ⊢ T0 ➤* T2 → ∀X2. ⇧[O, 1] X2 ≡ T2 →
+ ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
+ ∃∃T. L1 ⊢ X1 ➤* T & L2 ⊢ X2 ➤* T.
+#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/ -L0 -T0 #T #HT1 #HT2
+elim (cpqs_inv_lift1 … HT1 L1 … HXT1) -T1 /2 width=1/ #T1 #HT1 #HXT1
+elim (cpqs_inv_lift1 … HT2 L2 … HXT2) -T2 /2 width=1/ #T2 #HT2 #HXT2
+lapply (lift_inj … HT2 … HT1) -T #H destruct /2 width=3/
+qed-.
+
+fact cpqs_conf_lpqs_flat_flat:
+ ∀I,L0,V0,T0. (
+ ∀L,T. ⦃L0,ⓕ{I}V0.T0⦄ ⊃+ ⦃L,T⦄ →
+ ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
+ ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
+ ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
+ ) →
+ ∀V1. L0 ⊢ V0 ➤* V1 → ∀T1. L0 ⊢ T0 ➤* T1 →
+ ∀V2. L0 ⊢ V0 ➤* V2 → ∀T2. L0 ⊢ T0 ➤* T2 →
+ ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
+ ∃∃T. L1 ⊢ ⓕ{I}V1.T1 ➤* T & L2 ⊢ ⓕ{I}V2.T2 ➤* T.
+#I #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/
+qed-.
+
+fact cpqs_conf_lpqs_flat_tau:
+ ∀L0,V0,T0. (
+ ∀L,T. ⦃L0,ⓝV0.T0⦄ ⊃+ ⦃L,T⦄ →
+ ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
+ ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
+ ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
+ ) →
+ ∀V1,T1. L0 ⊢ T0 ➤* T1 → ∀T2. L0 ⊢ T0 ➤* T2 →
+ ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
+ ∃∃T. L1 ⊢ ⓝV1.T1 ➤* T & L2 ⊢ T2 ➤* T.
+#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/
+qed-.
+
+fact cpqs_conf_lpqs_tau_tau:
+ ∀L0,V0,T0. (
+ ∀L,T. ⦃L0,ⓝV0.T0⦄ ⊃+ ⦃L,T⦄ →
+ ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
+ ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
+ ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
+ ) →
+ ∀T1. L0 ⊢ T0 ➤* T1 → ∀T2. L0 ⊢ T0 ➤* T2 →
+ ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
+ ∃∃T. L1 ⊢ T1 ➤* T & L2 ⊢ T2 ➤* T.
+#L0 #V0 #T0 #IH #T1 #HT01
+#T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /2 width=3/
+qed-.
+
+theorem cpqs_conf_lpqs: lpx_sn_confluent cpqs cpqs.
+#L0 #T0 @(fsupp_wf_ind … L0 T0) -L0 -T0 #L #T #IH #L0 * [|*]
+[ #I0 #HL #HT #T1 #H1 #T2 #H2 #L1 #HL01 #L2 #HL02 destruct
+ elim (cpqs_inv_atom1 … H1) -H1
+ elim (cpqs_inv_atom1 … H2) -H2
+ [ #H2 #H1 destruct
+ /2 width=1 by cpqs_conf_lpqs_atom_atom/
+ | * #K0 #V0 #V2 #i2 #HLK0 #HV02 #HVT2 #H2 #H1 destruct
+ /3 width=10 by cpqs_conf_lpqs_atom_delta/
+ | #H2 * #K0 #V0 #V1 #i1 #HLK0 #HV01 #HVT1 #H1 destruct
+ /4 width=10 by ex2_commute, cpqs_conf_lpqs_atom_delta/
+ | * #X #Y #V2 #z #H #HV02 #HVT2 #H2
+ * #K0 #V0 #V1 #i #HLK0 #HV01 #HVT1 #H1 destruct
+ /3 width=17 by cpqs_conf_lpqs_delta_delta/
+ ]
+| #a #I #V0 #T0 #HL #HT #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
+ elim (cpqs_inv_bind1 … H1) -H1 *
+ [ #V1 #T1 #HV01 #HT01 #H1
+ | #T1 #HT01 #HXT1 #H11 #H12
+ ]
+ elim (cpqs_inv_bind1 … H2) -H2 *
+ [1,3: #V2 #T2 #HV02 #HT02 #H2
+ |2,4: #T2 #HT02 #HXT2 #H21 #H22
+ ] destruct
+ [ /3 width=10 by cpqs_conf_lpqs_bind_bind/
+ | /4 width=11 by ex2_commute, cpqs_conf_lpqs_bind_zeta/
+ | /3 width=11 by cpqs_conf_lpqs_bind_zeta/
+ | /3 width=12 by cpqs_conf_lpqs_zeta_zeta/
+ ]
+| #I #V0 #T0 #HL #HT #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
+ elim (cpqs_inv_flat1 … H1) -H1 *
+ [ #V1 #T1 #HV01 #HT01 #H1
+ | #HX1 #H1
+ ]
+ elim (cpqs_inv_flat1 … H2) -H2 *
+ [1,3: #V2 #T2 #HV02 #HT02 #H2
+ |2,4: #HX2 #H2
+ ] destruct
+ [ /3 width=10 by cpqs_conf_lpqs_flat_flat/
+ | /4 width=8 by ex2_commute, cpqs_conf_lpqs_flat_tau/
+ | /3 width=8 by cpqs_conf_lpqs_flat_tau/
+ | /3 width=7 by cpqs_conf_lpqs_tau_tau/
+ ]
+]
+qed-.
+
+theorem cpqs_conf: ∀L. confluent … (cpqs L).
+/2 width=6 by cpqs_conf_lpqs/ qed-.
+
+(* Properties on context-sensitive rest. parallel computation for terms *****)
+
+lemma lpqs_cpqs_conf_dx: ∀L0,T0,T1. L0 ⊢ T0 ➤* T1 → ∀L1. L0 ⊢ ➤* L1 →
+ ∃∃T. L1 ⊢ T0 ➤* T & L1 ⊢ T1 ➤* T.
+#L0 #T0 #T1 #HT01 #L1 #HL01
+elim (cpqs_conf_lpqs … HT01 T0 … HL01 … HL01) // -L0 /2 width=3/
+qed-.
+
+lemma lpqs_cpqs_conf_sn: ∀L0,T0,T1. L0 ⊢ T0 ➤* T1 → ∀L1. L0 ⊢ ➤* L1 →
+ ∃∃T. L1 ⊢ T0 ➤* T & L0 ⊢ T1 ➤* T.
+#L0 #T0 #T1 #HT01 #L1 #HL01
+elim (cpqs_conf_lpqs … HT01 T0 … L0 … HL01) // -HT01 -HL01 /2 width=3/
+qed-.
+
+(* Main properties **********************************************************)
+
+theorem lpqs_conf: confluent … lpqs.
+/3 width=6 by lpx_sn_conf, cpqs_conf_lpqs/
+qed-.
+
+theorem lpqs_trans: Transitive … lpqs.
+/3 width=5 by lpx_sn_trans, cpqs_trans_lpqs/
+qed-.
+
+(* Advanced forward lemmas **************************************************)
+
+lemma cpqs_fwd_shift1: ∀L1,L,T1,T. L ⊢ L1 @@ T1 ➤* T →
+ ∃∃L2,T2. L @@ L1 ⊢ ➤* L @@ L2 & L @@ L1 ⊢ T1 ➤* T2 &
+ T = L2 @@ T2.
+#L1 @(lenv_ind_dx … L1) -L1
+[ #L #T1 #T #HT1
+ @ex3_2_intro [3: // |4,5: // |1,2: skip ] (**) (* /2 width=4/ does not work *)
+| #I #L1 #V1 #IH #L #T1 #T >shift_append_assoc #H <append_assoc
+ elim (cpqs_inv_bind1 … H) -H *
+ [ #V2 #T2 #HV12 #HT12 #H destruct
+ elim (IH … HT12) -IH -HT12 #L2 #T #HL12 #HT1 #H destruct
+ lapply (lpqs_trans … HL12 (L.ⓑ{I}V2@@L2) ?) -HL12 /3 width=1/ #HL12
+ @(ex3_2_intro … (⋆.ⓑ{I}V2@@L2)) [4: /2 width=3/ | skip ] <append_assoc // (**) (* explicit constructor *)
+ | #T #_ #_ #H destruct
+ ]
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/grammar/lpx_sn_lpx_sn.ma".
+include "basic_2/substitution/fsupp.ma".
+include "basic_2/substitution/lpss_ldrop.ma".
+include "basic_2/reduction/lpr_ldrop.ma".
+
+(* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************)
+
+(* Properties on context-sensitive parallel substitution for terms **********)
+
+fact cpr_cpss_conf_lpr_lpss_atom_atom:
+ ∀I,L1,L2. ∃∃T. L1 ⊢ ⓪{I} ▶* T & L2 ⊢ ⓪{I} ➡ T.
+/2 width=3/ qed-.
+
+fact cpr_cpss_conf_lpr_lpss_atom_delta:
+ ∀L0,i. (
+ ∀L,T. ⦃L0, #i⦄ ⊃+ ⦃L, T⦄ →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
+ ∀V2. K0 ⊢ V0 ▶* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ #i ▶* T & L2 ⊢ T2 ➡ T.
+#L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
+elim (lpr_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
+elim (lpr_inv_pair1 … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct
+elim (lpss_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
+elim (lpss_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
+lapply (fsupp_lref … HLK0) -HLK0 #HLK0
+elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
+elim (lift_total V 0 (i+1)) #T #HVT
+lapply (cpr_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 /3 width=6/
+qed-.
+
+fact cpr_cpss_conf_lpr_lpss_delta_atom:
+ ∀L0,i. (
+ ∀L,T.⦃L0, #i⦄ ⊃+ ⦃L, T⦄ →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
+ ∀V1. K0 ⊢ V0 ➡ V1 → ∀T1. ⇧[O, i + 1] V1 ≡ T1 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ T1 ▶* T & L2 ⊢ #i ➡ T.
+#L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1 #L1 #HL01 #L2 #HL02
+elim (lpss_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
+elim (lpss_inv_pair1 … H2) -H2 #K2 #V2 #HK02 #HV02 #H destruct
+elim (lpr_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
+elim (lpr_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK1) -W1 #HLK1
+lapply (fsupp_lref … HLK0) -HLK0 #HLK0
+elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
+elim (lift_total V 0 (i+1)) #T #HVT
+lapply (cpss_lift … HV1 … HLK1 … HVT1 … HVT) -K1 -V1 /3 width=9/
+qed-.
+
+fact cpr_cpss_conf_lpr_lpss_delta_delta:
+ ∀L0,i. (
+ ∀L,T. ⦃L0, #i⦄ ⊃+ ⦃L, T⦄ →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
+ ∀V1. K0 ⊢ V0 ➡ V1 → ∀T1. ⇧[O, i + 1] V1 ≡ T1 →
+ ∀KX,VX. ⇩[O, i] L0 ≡ KX.ⓓVX →
+ ∀V2. KX ⊢ VX ▶* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ T1 ▶* T & L2 ⊢ T2 ➡ T.
+#L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1
+#KX #VX #H #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
+lapply (ldrop_mono … H … HLK0) -H #H destruct
+elim (lpr_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
+elim (lpr_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK1) -W1 #HLK1
+elim (lpss_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
+elim (lpss_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
+lapply (fsupp_lref … HLK0) -HLK0 #HLK0
+elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
+elim (lift_total V 0 (i+1)) #T #HVT
+lapply (cpss_lift … HV1 … HLK1 … HVT1 … HVT) -K1 -V1
+lapply (cpr_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 -V /2 width=3/
+qed-.
+
+fact cpr_cpss_conf_lpr_lpss_bind_bind:
+ ∀a,I,L0,V0,T0. (
+ ∀L,T. ⦃L0,ⓑ{a,I}V0.T0⦄ ⊃+ ⦃L, T⦄ →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0.ⓑ{I}V0 ⊢ T0 ➡ T1 →
+ ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0.ⓑ{I}V0 ⊢ T0 ▶* T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ ⓑ{a,I}V1.T1 ▶* T & L2 ⊢ ⓑ{a,I}V2.T2 ➡ T.
+#a #I #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 // /2 width=1/ /3 width=5/
+qed-.
+
+fact cpr_cpss_conf_lpr_lpss_bind_zeta:
+ ∀L0,V0,T0. (
+ ∀L,T. ⦃L0,+ⓓV0.T0⦄ ⊃+ ⦃L, T⦄ →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀T1. L0.ⓓV0 ⊢ T0 ➡ T1 → ∀X1. ⇧[O, 1] X1 ≡ T1 →
+ ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0.ⓓV0 ⊢ T0 ▶* T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ X1 ▶* T & L2 ⊢ +ⓓV2.T2 ➡ T.
+#L0 #V0 #T0 #IH #T1 #HT01 #X1 #HXT1
+#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HT01 … HT02 (L1.ⓓV2) … (L2.ⓓV2)) -IH -HT01 -HT02 // /2 width=1/ /3 width=1/ -L0 -V0 -T0 #T #HT1 #HT2
+elim (cpss_inv_lift1 … HT1 L1 … HXT1) -T1 /2 width=1/ /3 width=9/
+qed-.
+
+fact cpr_cpss_conf_lpr_lpss_flat_flat:
+ ∀I,L0,V0,T0. (
+ ∀L,T. ⦃L0,ⓕ{I}V0.T0⦄ ⊃+ ⦃L, T⦄ →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0 ⊢ T0 ➡ T1 →
+ ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0 ⊢ T0 ▶* T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ ⓕ{I}V1.T1 ▶* T & L2 ⊢ ⓕ{I}V2.T2 ➡ T.
+#I #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/
+qed-.
+
+fact cpr_cpss_conf_lpr_lpss_flat_tau:
+ ∀L0,V0,T0. (
+ ∀L,T. ⦃L0,ⓝV0.T0⦄ ⊃+ ⦃L, T⦄ →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀T1. L0 ⊢ T0 ➡ T1 → ∀V2,T2. L0 ⊢ T0 ▶* T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ T1 ▶* T & L2 ⊢ ⓝV2.T2 ➡ T.
+#L0 #V0 #T0 #IH #T1 #HT01
+#V2 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /3 width=3/
+qed-.
+
+fact cpr_cpss_conf_lpr_lpss_flat_beta:
+ ∀a,L0,V0,W0,T0. (
+ ∀L,T. ⦃L0,ⓐV0.ⓛ{a}W0.T0⦄ ⊃+ ⦃L, T⦄ →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0.ⓛW0 ⊢ T0 ➡ T1 →
+ ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0 ⊢ ⓛ{a}W0.T0 ▶* T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ ⓓ{a}V1.T1 ▶* T & L2 ⊢ ⓐV2.T2 ➡ T.
+#a #L0 #V0 #W0 #T0 #IH #V1 #HV01 #T1 #HT01
+#V2 #HV02 #X #H #L1 #HL01 #L2 #HL02
+elim (cpss_inv_bind1 … H) -H #W2 #T2 #HW02 #HT02 #H destruct
+elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1/ #V #HV1 #HV2
+elim (IH … HT01 … HT02 (L1.ⓛW2) … (L2.ⓛW2)) /2 width=1/ /3 width=1/ -L0 -V0 -W0 -T0 #T #HT1 #HT2
+lapply (cpss_lsubr_trans … HT1 (L1.ⓓV1) ?) -HT1 /2 width=1/ /3 width=5/
+qed-.
+
+fact cpr_cpss_conf_lpr_lpss_flat_theta:
+ ∀a,L0,V0,W0,T0. (
+ ∀L,T. ⦃L0,ⓐV0.ⓓ{a}W0.T0⦄ ⊃+ ⦃L, T⦄ →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀V1. L0 ⊢ V0 ➡ V1 → ∀U1. ⇧[O, 1] V1 ≡ U1 →
+ ∀W1. L0 ⊢ W0 ➡ W1 → ∀T1. L0.ⓓW0 ⊢ T0 ➡ T1 →
+ ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0 ⊢ ⓓ{a}W0.T0 ▶* T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ ⓓ{a}W1.ⓐU1.T1 ▶* T & L2 ⊢ ⓐV2.T2 ➡ T.
+#a #L0 #V0 #W0 #T0 #IH #V1 #HV01 #U1 #HVU1 #W1 #HW01 #T1 #HT01
+#V2 #HV02 #X #H #L1 #HL01 #L2 #HL02
+elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1/ #V #HV1 #HV2
+elim (lift_total V 0 1) #U #HVU
+lapply (cpss_lift … HV1 (L1.ⓓW1) … HVU1 … HVU) -HVU1 /2 width=1/ #HU1
+elim (cpss_inv_bind1 … H) -H #W2 #T2 #HW02 #HT02 #H destruct
+elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1/
+elim (IH … HT01 … HT02 (L1.ⓓW1) … (L2.ⓓW2)) /2 width=1/ -L0 -V0 -W0 -T0
+/4 width=9 by ex2_intro, cpr_theta, cpss_bind, cpss_flat/ (**) (* auto too slow without trace *)
+qed-.
+
+lemma cpr_cpss_conf_lpr_lpss: lpx_sn_confluent cpr cpss.
+#L0 #T0 @(fsupp_wf_ind … L0 T0) -L0 -T0 #L #T #IH #L0 * [|*]
+[ #I0 #HL #HT #T1 #H1 #T2 #H2 #L1 #HL01 #L2 #HL02 destruct
+ elim (cpr_inv_atom1 … H1) -H1
+ elim (cpss_inv_atom1 … H2) -H2
+ [ #H2 #H1 destruct
+ /2 width=1 by cpr_cpss_conf_lpr_lpss_atom_atom/
+ | * #K0 #V0 #V2 #i2 #HLK0 #HV02 #HVT2 #H2 #H1 destruct
+ /3 width=10 by cpr_cpss_conf_lpr_lpss_atom_delta/
+ | #H2 * #K0 #V0 #V1 #i1 #HLK0 #HV01 #HVT1 #H1 destruct
+ /3 width=10 by cpr_cpss_conf_lpr_lpss_delta_atom/
+ | * #X #Y #V2 #z #H #HV02 #HVT2 #H2
+ * #K0 #V0 #V1 #i #HLK0 #HV01 #HVT1 #H1 destruct
+ /3 width=17 by cpr_cpss_conf_lpr_lpss_delta_delta/
+ ]
+| #a #I #V0 #T0 #HL #HT #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
+ elim (cpss_inv_bind1 … H2) -H2 #V2 #T2 #HV02 #HT02 #H2
+ elim (cpr_inv_bind1 … H1) -H1 *
+ [ #V1 #T1 #HV01 #HT01 #H1
+ | #T1 #HT01 #HXT1 #H11 #H12
+ ] destruct
+ [ /3 width=10 by cpr_cpss_conf_lpr_lpss_bind_bind/
+ | /3 width=11 by cpr_cpss_conf_lpr_lpss_bind_zeta/
+ ]
+| #I #V0 #T0 #HL #HT #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
+ elim (cpss_inv_flat1 … H2) -H2 #V2 #T2 #HV02 #HT02 #H2
+ elim (cpr_inv_flat1 … H1) -H1 *
+ [ #V1 #T1 #HV01 #HT01 #H1
+ | #HX1 #H1
+ | #a1 #V1 #Y1 #Z1 #T1 #HV01 #HZT1 #H11 #H12 #H13
+ | #a1 #V1 #U1 #Y1 #W1 #Z1 #T1 #HV01 #HVU1 #HYW1 #HZT1 #H11 #H12 #H13
+ ] destruct
+ [ /3 width=10 by cpr_cpss_conf_lpr_lpss_flat_flat/
+ | /3 width=8 by cpr_cpss_conf_lpr_lpss_flat_tau/
+ | /3 width=11 by cpr_cpss_conf_lpr_lpss_flat_beta/
+ | /3 width=14 by cpr_cpss_conf_lpr_lpss_flat_theta/
+ ]
+]
+qed-.
+
+(* Basic_1: includes: pr0_subst1 *)
+(* Basic_1: was: pr2_subst1 *)
+lemma cpr_cpss_conf: ∀L. confluent2 … (cpr L) (cpss L).
+/2 width=6 by cpr_cpss_conf_lpr_lpss/ qed-.
+
+lemma cpr_lpss_conf_dx: ∀L0,T0,T1. L0 ⊢ T0 ➡ T1 → ∀L1. L0 ⊢ ▶* L1 →
+ ∃∃T. L1 ⊢ T1 ▶* T & L1 ⊢ T0 ➡ T.
+#L0 #T0 #T1 #HT01 #L1 #HL01
+elim (cpr_cpss_conf_lpr_lpss … HT01 T0 … L1 … HL01) // /2 width=1/ -L0 /2 width=3/
+qed-.
+
+lemma cpr_lpss_conf_sn: ∀L0,T0,T1. L0 ⊢ T0 ➡ T1 → ∀L1. L0 ⊢ ▶* L1 →
+ ∃∃T. L0 ⊢ T1 ▶* T & L1 ⊢ T0 ➡ T.
+#L0 #T0 #T1 #HT01 #L1 #HL01
+elim (cpr_cpss_conf_lpr_lpss … HT01 T0 … L0 … HL01) // -HT01 -HL01 /2 width=3/
+qed-.
+
+(* Basic_1: includes: pr0_subst1_fwd *)
+lemma lpr_cpss_conf: ∀L0,T0,T1. L0 ⊢ T0 ▶* T1 → ∀L1. L0 ⊢ ➡ L1 →
+ ∃∃T. L1 ⊢ T0 ▶* T & L0 ⊢ T1 ➡ T.
+#L0 #T0 #T1 #HT01 #L1 #HL01
+elim (cpr_cpss_conf_lpr_lpss ?? T0 … HT01 … HL01 L0) // -HT01 -HL01 /2 width=3/
+qed-.
+
+(* Properties on sn parallel substitution on local environments *************)
+
+lemma lpr_lpss_conf: confluent2 … lpr lpss.
+/3 width=6 by lpx_sn_conf, cpr_cpss_conf_lpr_lpss/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/reduction/lpr_lpss.ma".
+include "basic_2/computation/lprs.ma".
+
+(* SN PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ****************************)
+
+(* Properties on sn parallel substitution on local environments *************)
+
+lemma lprs_lpss_conf: confluent2 … lprs lpss.
+/3 width=3 by TC_strip1, lpr_lpss_conf/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 "hvbox( T1 ⊢ ▶ * break term 46 T2 )"
+ non associative with precedence 45
+ for @{ 'PSubstStarSn $T1 $T2 }.
+
+include "basic_2/grammar/lpx_sn.ma".
+include "basic_2/substitution/cpss.ma".
+
+(* SN PARALLEL SUBSTITUTION FOR LOCAL ENVIRONMENTS **************************)
+
+(* Basic_1: includes: csubst1_bind *)
+definition lpss: relation lenv ≝ lpx_sn cpss.
+
+interpretation "parallel substitution (local environment, sn variant)"
+ 'PSubstStarSn L1 L2 = (lpss L1 L2).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma lpss_inv_atom1: ∀L2. ⋆ ⊢ ▶* L2 → L2 = ⋆.
+/2 width=4 by lpx_sn_inv_atom1_aux/ qed-.
+
+lemma lpss_inv_pair1: ∀I,K1,V1,L2. K1. ⓑ{I} V1 ⊢ ▶* L2 →
+ ∃∃K2,V2. K1 ⊢ ▶* K2 & K1 ⊢ V1 ▶* V2 & L2 = K2. ⓑ{I} V2.
+/2 width=3 by lpx_sn_inv_pair1_aux/ qed-.
+
+lemma lpss_inv_atom2: ∀L1. L1 ⊢ ▶* ⋆ → L1 = ⋆.
+/2 width=4 by lpx_sn_inv_atom2_aux/ qed-.
+
+lemma lpss_inv_pair2: ∀I,L1,K2,V2. L1 ⊢ ▶* K2. ⓑ{I} V2 →
+ ∃∃K1,V1. K1 ⊢ ▶* K2 & K1 ⊢ V1 ▶* V2 & L1 = K1. ⓑ{I} V1.
+/2 width=3 by lpx_sn_inv_pair2_aux/ qed-.
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was by definition: csubst1_refl *)
+lemma lpss_refl: ∀L. L ⊢ ▶* L.
+/2 width=1 by lpx_sn_refl/ qed.
+
+lemma lpss_pair: ∀I,K1,K2,V1,V2. K1 ⊢ ▶* K2 → K1 ⊢ V1 ▶* V2 →
+ K1.ⓑ{I}V1 ⊢ ▶* K2.ⓑ{I}V2.
+/2 width=1/ qed.
+
+lemma lpss_append: ∀K1,K2. K1 ⊢ ▶* K2 → ∀L1,L2. L1 ⊢ ▶* L2 →
+ L1 @@ K1 ⊢ ▶* L2 @@ K2.
+/3 width=1 by lpx_sn_append, cpss_append/ qed.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma lpss_fwd_length: ∀L1,L2. L1 ⊢ ▶* L2 → |L1| = |L2|.
+/2 width=2 by lpx_sn_fwd_length/ qed-.
+
+(* Advanced forward lemmas **************************************************)
+
+lemma lpss_fwd_append1: ∀K1,L1,L. K1 @@ L1 ⊢ ▶* L →
+ ∃∃K2,L2. K1 ⊢ ▶* K2 & L = K2 @@ L2.
+/2 width=2 by lpx_sn_fwd_append1/ qed-.
+
+lemma lpss_fwd_append2: ∀L,K2,L2. L ⊢ ▶* K2 @@ L2 →
+ ∃∃K1,L1. K1 ⊢ ▶* K2 & L = K1 @@ L1.
+/2 width=2 by lpx_sn_fwd_append2/ qed-.
+
+(* Basic_1: removed theorems 28:
+ csubst0_clear_O csubst0_drop_lt csubst0_drop_gt csubst0_drop_eq
+ csubst0_clear_O_back csubst0_clear_S csubst0_clear_trans
+ csubst0_drop_gt_back csubst0_drop_eq_back csubst0_drop_lt_back
+ csubst0_gen_sort csubst0_gen_head csubst0_getl_ge csubst0_getl_lt
+ csubst0_gen_S_bind_2 csubst0_getl_ge_back csubst0_getl_lt_back
+ csubst0_snd_bind csubst0_fst_bind csubst0_both_bind
+ csubst1_head csubst1_flat csubst1_gen_head
+ csubst1_getl_ge csubst1_getl_lt csubst1_getl_ge_back getl_csubst1
+ fsubst0_gen_base
+*)
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/grammar/lpx_sn_lpx_sn.ma".
+include "basic_2/substitution/fsupp.ma".
+include "basic_2/substitution/lpss_ldrop.ma".
+
+(* SN PARALLEL SUBSTITUTION FOR LOCAL ENVIRONMENTS **************************)
+
+(* Main properties on context-sensitive parallel substitution for terms *****)
+
+theorem cpss_trans_lpss: lpx_sn_transitive cpss cpss.
+#L0 #T0 @(fsupp_wf_ind … L0 T0) -L0 -T0 #L0 #T0 #IH #L1 * [|*]
+[ #I #HL #HT #T #H1 #L2 #HL12 #T2 #HT2 destruct
+ elim (cpss_inv_atom1 … H1) -H1
+ [ #H destruct
+ elim (cpss_inv_atom1 … HT2) -HT2
+ [ #H destruct //
+ | * #K2 #V #V2 #i #HLK2 #HV2 #HVT2 #H destruct
+ elim (lpss_ldrop_trans_O1 … HL12 … HLK2) -L2 #X #HLK1 #H
+ elim (lpss_inv_pair2 … H) -H #K1 #V1 #HK12 #HV1 #H destruct
+ lapply (fsupp_lref … HLK1) /3 width=9/
+ ]
+ | * #K1 #V1 #V #i #HLK1 #HV1 #HVT #H destruct
+ elim (lpss_ldrop_conf … HLK1 … HL12) -HL12 #X #H #HLK2
+ elim (lpss_inv_pair1 … H) -H #K2 #W2 #HK12 #_ #H destruct
+ lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
+ elim (cpss_inv_lift1 … HT2 … HLK2 … HVT) -L2 -T
+ lapply (fsupp_lref … HLK1) /3 width=9/
+ ]
+| #a #I #V1 #T1 #HL #HT #X1 #H1 #L2 #HL12 #X2 #H2
+ elim (cpss_inv_bind1 … H1) -H1 #V #T #HV1 #HT1 #H destruct
+ elim (cpss_inv_bind1 … H2) -H2 #V2 #T2 #HV2 #HT2 #H destruct /4 width=5/
+| #I #V1 #T1 #HL #HT #X1 #H1 #L2 #HL12 #X2 #H2
+ elim (cpss_inv_flat1 … H1) -H1 #V #T #HV1 #HT1 #H destruct
+ elim (cpss_inv_flat1 … H2) -H2 #V2 #T2 #HV2 #HT2 #H destruct /3 width=5/
+]
+qed-.
+
+(* Basic_1: was only: subst1_trans *)
+theorem cpss_trans: ∀L. Transitive … (cpss L).
+/2 width=5 by cpss_trans_lpss/ qed-.
+
+(* Properties on context-sensitive parallel substitution for terms **********)
+
+(* Basic_1: was only: subst1_subst1 *)
+lemma lpss_cpss_trans: ∀L1,L2. L1 ⊢ ▶* L2 →
+ ∀T1,T2. L2 ⊢ T1 ▶* T2 → L1 ⊢ T1 ▶* T2.
+/2 width=5 by cpss_trans_lpss/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/relocation/fsup.ma".
+include "basic_2/relocation/ldrop_lpx_sn.ma".
+include "basic_2/substitution/cpss_lift.ma".
+include "basic_2/substitution/lpss.ma".
+
+(* SN PARALLEL SUBSTITUTION FOR LOCAL ENVIRONMENTS **************************)
+
+(* Properies on local environment slicing ***********************************)
+
+lemma lpss_ldrop_conf: dropable_sn lpss.
+/3 width=5 by lpx_sn_deliftable_dropable, cpss_inv_lift1/ qed-.
+
+lemma ldrop_lpss_trans: dedropable_sn lpss.
+/3 width=9 by lpx_sn_liftable_dedropable, cpss_lift/ qed-.
+
+lemma lpss_ldrop_trans_O1: dropable_dx lpss.
+/2 width=3 by lpx_sn_dropable/ qed-.
+
+(* Properties on context-sensitive parallel substitution for terms **********)
+
+lemma fsup_cpss_trans: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ → ∀U2. L2 ⊢ T2 ▶* U2 →
+ ∃∃L,U1. L1 ⊢ ▶* L & L ⊢ T1 ▶* U1 & ⦃L, U1⦄ ⊃ ⦃L2, U2⦄.
+#L1 #L2 #T1 #T2 #H elim H -L1 -L2 -T1 -T2 [2: * ] [1,2,3,4,5: /3 width=5/ ]
+[ #L #K #U #T #d #e #HLK #HUT #He #U2 #HU2
+ elim (lift_total U2 d e) #T2 #HUT2
+ lapply (cpss_lift … HU2 … HLK … HUT … HUT2) -HU2 -HUT /3 width=9/
+| #L1 #K1 #K2 #T1 #T2 #U1 #d #e #HLK1 #HTU1 #_ #IHT12 #U2 #HTU2
+ elim (IHT12 … HTU2) -IHT12 -HTU2 #K #T #HK1 #HT1 #HT2
+ elim (lift_total T d e) #U #HTU
+ elim (ldrop_lpss_trans … HLK1 … HK1) -HLK1 -HK1 #L2 #HL12 #HL2K
+ lapply (cpss_lift … HT1 … HL2K … HTU1 … HTU) -HT1 -HTU1 /3 width=11/
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/substitution/lpss_cpss.ma".
+
+(* SN PARALLEL SUBSTITUTION ON LOCAL ENVIRONMENTS ***************************)
+
+(* Main properties on context-sensitive parallel substitution for terms *****)
+
+fact cpss_conf_lpss_atom_atom:
+ ∀I,L1,L2. ∃∃T. L1 ⊢ ⓪{I} ▶* T & L2 ⊢ ⓪{I} ▶* T.
+/2 width=3/ qed-.
+
+fact cpss_conf_lpss_atom_delta:
+ ∀L0,i. (
+ ∀L,T. ⦃L0, #i⦄ ⊃+ ⦃L, T⦄ →
+ ∀T1. L ⊢ T ▶* T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ▶* L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ▶* T0
+ ) →
+ ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
+ ∀V2. K0 ⊢ V0 ▶* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
+ ∀L1. L0 ⊢ ▶* L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ #i ▶* T & L2 ⊢ T2 ▶* T.
+#L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
+elim (lpss_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
+elim (lpss_inv_pair1 … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct
+elim (lpss_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
+elim (lpss_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
+lapply (fsupp_lref … HLK0) -HLK0 #HLK0
+elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
+elim (lift_total V 0 (i+1)) #T #HVT
+lapply (cpss_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 /3 width=6/
+qed-.
+
+fact cpss_conf_lpss_delta_delta:
+ ∀L0,i. (
+ ∀L,T. ⦃L0, #i⦄ ⊃+ ⦃L, T⦄ →
+ ∀T1. L ⊢ T ▶* T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ▶* L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ▶* T0
+ ) →
+ ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
+ ∀V1. K0 ⊢ V0 ▶* V1 → ∀T1. ⇧[O, i + 1] V1 ≡ T1 →
+ ∀KX,VX. ⇩[O, i] L0 ≡ KX.ⓓVX →
+ ∀V2. KX ⊢ VX ▶* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
+ ∀L1. L0 ⊢ ▶* L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ T1 ▶* T & L2 ⊢ T2 ▶* T.
+#L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1
+#KX #VX #H #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
+lapply (ldrop_mono … H … HLK0) -H #H destruct
+elim (lpss_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
+elim (lpss_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK1) -W1 #HLK1
+elim (lpss_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
+elim (lpss_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
+lapply (fsupp_lref … HLK0) -HLK0 #HLK0
+elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
+elim (lift_total V 0 (i+1)) #T #HVT
+lapply (cpss_lift … HV1 … HLK1 … HVT1 … HVT) -K1 -V1
+lapply (cpss_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 -V /2 width=3/
+qed-.
+
+fact cpss_conf_lpss_bind_bind:
+ ∀a,I,L0,V0,T0. (
+ ∀L,T. ⦃L0,ⓑ{a,I}V0.T0⦄ ⊃+ ⦃L,T⦄ →
+ ∀T1. L ⊢ T ▶* T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ▶* L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ▶* T0
+ ) →
+ ∀V1. L0 ⊢ V0 ▶* V1 → ∀T1. L0.ⓑ{I}V0 ⊢ T0 ▶* T1 →
+ ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0.ⓑ{I}V0 ⊢ T0 ▶* T2 →
+ ∀L1. L0 ⊢ ▶* L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ ⓑ{a,I}V1.T1 ▶* T & L2 ⊢ ⓑ{a,I}V2.T2 ▶* T.
+#a #I #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 // /2 width=1/ /3 width=5/
+qed-.
+
+fact cpss_conf_lpss_flat_flat:
+ ∀I,L0,V0,T0. (
+ ∀L,T. ⦃L0,ⓕ{I}V0.T0⦄ ⊃+ ⦃L,T⦄ →
+ ∀T1. L ⊢ T ▶* T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ▶* L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ▶* T0
+ ) →
+ ∀V1. L0 ⊢ V0 ▶* V1 → ∀T1. L0 ⊢ T0 ▶* T1 →
+ ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0 ⊢ T0 ▶* T2 →
+ ∀L1. L0 ⊢ ▶* L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ ⓕ{I}V1.T1 ▶* T & L2 ⊢ ⓕ{I}V2.T2 ▶* T.
+#I #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/
+qed-.
+
+theorem cpss_conf_lpss: lpx_sn_confluent cpss cpss.
+#L0 #T0 @(fsupp_wf_ind … L0 T0) -L0 -T0 #L #T #IH #L0 * [|*]
+[ #I0 #HL #HT #T1 #H1 #T2 #H2 #L1 #HL01 #L2 #HL02 destruct
+ elim (cpss_inv_atom1 … H1) -H1
+ elim (cpss_inv_atom1 … H2) -H2
+ [ #H2 #H1 destruct
+ /2 width=1 by cpss_conf_lpss_atom_atom/
+ | * #K0 #V0 #V2 #i2 #HLK0 #HV02 #HVT2 #H2 #H1 destruct
+ /3 width=10 by cpss_conf_lpss_atom_delta/
+ | #H2 * #K0 #V0 #V1 #i1 #HLK0 #HV01 #HVT1 #H1 destruct
+ /4 width=10 by ex2_commute, cpss_conf_lpss_atom_delta/
+ | * #X #Y #V2 #z #H #HV02 #HVT2 #H2
+ * #K0 #V0 #V1 #i #HLK0 #HV01 #HVT1 #H1 destruct
+ /3 width=17 by cpss_conf_lpss_delta_delta/
+ ]
+| #a #I #V0 #T0 #HL #HT #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
+ elim (cpss_inv_bind1 … H1) -H1 #V1 #T1 #HV01 #HT01 #H destruct
+ elim (cpss_inv_bind1 … H2) -H2 #V2 #T2 #HV02 #HT02 #H destruct
+ /3 width=10 by cpss_conf_lpss_bind_bind/
+| #I #V0 #T0 #HL #HT #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
+ elim (cpss_inv_flat1 … H1) -H1 #V1 #T1 #HV01 #HT01 #H destruct
+ elim (cpss_inv_flat1 … H2) -H2 #V2 #T2 #HV02 #HT02 #H destruct
+ /3 width=10 by cpss_conf_lpss_flat_flat/
+]
+qed-.
+
+(* Basic_1: was only: subst1_confluence_eq *)
+theorem cpss_conf: ∀L. confluent … (cpss L).
+/2 width=6 by cpss_conf_lpss/ qed-.
+
+(* Properties on context-sensitive parallel substitution for terms **********)
+
+(* Basic_1: was only: subst1_subst1_back *)
+lemma lpss_cpss_conf_dx: ∀L0,T0,T1. L0 ⊢ T0 ▶* T1 → ∀L1. L0 ⊢ ▶* L1 →
+ ∃∃T. L1 ⊢ T0 ▶* T & L1 ⊢ T1 ▶* T.
+#L0 #T0 #T1 #HT01 #L1 #HL01
+elim (cpss_conf_lpss … HT01 T0 … HL01 … HL01) // -L0 /2 width=3/
+qed-.
+
+lemma lpss_cpss_conf_sn: ∀L0,T0,T1. L0 ⊢ T0 ▶* T1 → ∀L1. L0 ⊢ ▶* L1 →
+ ∃∃T. L1 ⊢ T0 ▶* T & L0 ⊢ T1 ▶* T.
+#L0 #T0 #T1 #HT01 #L1 #HL01
+elim (cpss_conf_lpss … HT01 T0 … L0 … HL01) // -HT01 -HL01 /2 width=3/
+qed-.
+
+(* Main properties **********************************************************)
+
+theorem lpss_conf: confluent … lpss.
+/3 width=6 by lpx_sn_conf, cpss_conf_lpss/
+qed-.
+
+theorem lpss_trans: Transitive … lpss.
+/3 width=5 by lpx_sn_trans, cpss_trans_lpss/
+qed-.
+
+(* Advanced forward lemmas **************************************************)
+
+lemma cpss_fwd_shift1: ∀L1,L,T1,T. L ⊢ L1 @@ T1 ▶* T →
+ ∃∃L2,T2. L @@ L1 ⊢ ▶* L @@ L2 & L @@ L1 ⊢ T1 ▶* T2 &
+ T = L2 @@ T2.
+#L1 @(lenv_ind_dx … L1) -L1
+[ #L #T1 #T #HT1
+ @ex3_2_intro [3: // |4,5: // |1,2: skip ] (**) (* /2 width=4/ does not work *)
+| #I #L1 #V1 #IH #L #T1 #T >shift_append_assoc #H <append_assoc
+ elim (cpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+ elim (IH … HT12) -IH -HT12 #L2 #T #HL12 #HT1 #H destruct
+ lapply (lpss_trans … HL12 (L.ⓑ{I}V2@@L2) ?) -HL12 /3 width=1/ #HL12
+ @(ex3_2_intro … (⋆.ⓑ{I}V2@@L2)) [4: /2 width=3/ | skip ] <append_assoc // (**) (* explicit constructor *)
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 "hvbox( L1 ⊑ break term 46 L2 )"
+ non associative with precedence 45
+ for @{ 'CrSubEq $L1 $L2 }.
+
+include "basic_2/relocation/ldrop.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR SUBSTITUTION ****************************)
+
+inductive lsubr: relation lenv ≝
+| lsubr_sort: ∀L. lsubr L (⋆)
+| lsubr_abbr: ∀L1,L2,V. lsubr L1 L2 → lsubr (L1. ⓓV) (L2.ⓓV)
+| lsubr_abst: ∀I,L1,L2,V1,V2. lsubr L1 L2 → lsubr (L1. ⓑ{I}V1) (L2. ⓛV2)
+.
+
+interpretation
+ "local environment refinement (substitution)"
+ 'CrSubEq L1 L2 = (lsubr L1 L2).
+
+(* Basic properties *********************************************************)
+
+lemma lsubr_bind: ∀I,L1,L2,V. L1 ⊑ L2 → L1. ⓑ{I} V ⊑ L2.ⓑ{I} V.
+* /2 width=1/ qed.
+
+lemma lsubr_abbr: ∀I,L1,L2,V. L1 ⊑ L2 → L1. ⓓV ⊑ L2. ⓑ{I}V.
+* /2 width=1/ qed.
+
+lemma lsubr_refl: ∀L. L ⊑ L.
+#L elim L -L // /2 width=1/
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+fact lsubr_inv_atom1_aux: ∀L1,L2. L1 ⊑ L2 → L1 = ⋆ → L2 = ⋆.
+#L1 #L2 * -L1 -L2 //
+[ #L1 #L2 #V #_ #H destruct
+| #I #L1 #L2 #V1 #V2 #_ #H destruct
+]
+qed-.
+
+lemma lsubr_inv_atom1: ∀L2. ⋆ ⊑ L2 → L2 = ⋆.
+/2 width=3 by lsubr_inv_atom1_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
+| #L1 #L2 #V #HL12 #K2 #W #H destruct /2 width=3/
+| #I #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-.
+
+fact lsubr_inv_abst2_aux: ∀L1,L2. L1 ⊑ L2 → ∀K2,W2. L2 = K2.ⓛW2 →
+ ∃∃I,K1,W1. K1 ⊑ K2 & L1 = K1.ⓑ{I}W1.
+#L1 #L2 * -L1 -L2
+[ #L #K2 #W2 #H destruct
+| #L1 #L2 #V #_ #K2 #W2 #H destruct
+| #I #L1 #L2 #V1 #V2 #HL12 #K2 #W2 #H destruct /2 width=5/
+]
+qed-.
+
+lemma lsubr_inv_abst2: ∀L1,K2,W2. L1 ⊑ K2.ⓛW2 →
+ ∃∃I,K1,W1. K1 ⊑ K2 & L1 = K1.ⓑ{I}W1.
+/2 width=4 by lsubr_inv_abst2_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/
+qed-.
+
+lemma lsubr_fwd_ldrop2_abbr: ∀L1,L2. L1 ⊑ L2 →
+ ∀K2,W,i. ⇩[0, i] L2 ≡ K2. ⓓW →
+ ∃∃K1. K1 ⊑ K2 & ⇩[0, i] L1 ≡ K1. ⓓW.
+#L1 #L2 #H elim H -L1 -L2
+[ #L #K2 #W #i #H
+ elim (ldrop_inv_atom1 … H) -H #H destruct
+| #L1 #L2 #V #HL12 #IHL12 #K2 #W #i #H
+ elim (ldrop_inv_O1_pair1 … H) -H * #Hi #HLK2 destruct [ -IHL12 | -HL12 ]
+ [ /2 width=3/
+ | elim (IHL12 … HLK2) -IHL12 -HLK2 /3 width=3/
+ ]
+| #I #L1 #L2 #V1 #V2 #_ #IHL12 #K2 #W #i #H
+ elim (ldrop_inv_O1_pair1 … H) -H * #Hi #HLK2 destruct
+ elim (IHL12 … HLK2) -IHL12 -HLK2 /3 width=3/
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+lemma lsubr_fwd_lsubr: ∀L1,L2. L1 ⓝ⊑ L2 → L1 ⊑ L2.
+#L1 #L2 #H elim H -L1 -L2 // /2 width=1/
+qed-.
+
+lemma cpqs_cpr: ∀L,T1,T2. L ⊢ T1 ➤* T2 → L ⊢ T1 ➡ T2.
+#L #T1 #T2 #H elim H -L -T1 -T2 // /2 width=1/ /2 width=6/
+qed.
+
+lemma cpss_cpr: ∀L,T1,T2. L ⊢ T1 ▶* T2 → L ⊢ T1 ➡ T2.
+/3 width=1/ qed.
+
+lemma lpqs_lpr: ∀L1,L2. L1 ⊢ ➤* L2 → L1 ⊢ ➡ L2.
+#L1 #L2 #H elim H -L1 -L2 // /3 width=1/
+qed.
+
+lemma lpss_lpr: ∀L1,L2. L1 ⊢ ▶* L2 → L1 ⊢ ➡ L2.
+/3 width=1/ qed.
+
+lemma cpss_fwd_cir_eq: ∀L,T1,T2. L ⊢ T1 ▶* T2 → L ⊢ 𝐈⦃T1⦄ → T2 = T1.
+/3 width=3 by cpr_fwd_cir, cpss_cpr/ qed-.
+
+lemma cpss_cprs: ∀L,T1,T2. L ⊢ T1 ▶* T2 → L ⊢ T1 ➡* T2.
+/3 width=1/ qed.
+
+lemma cprs_cpss_trans: ∀L,T1,T. L ⊢ T1 ➡* T → ∀T2. L ⊢ T ▶* T2 → L ⊢ T1 ➡* T2.
+/3 width=3/ qed-.
+
+lemma cpss_cprs_trans: ∀L,T1,T. L ⊢ T1 ▶* T → ∀T2. L ⊢ T ➡* T2 → L ⊢ T1 ➡* T2.
+/3 width=3/ qed-.
+
+lemma cpcs_cpss_strap1: ∀L,T1,T. L ⊢ T1 ⬌* T → ∀T2. L ⊢ T ▶* T2 → L ⊢ T1 ⬌* T2.
+#L #T1 #T #HT1 #T2 #HT2
+@(cpcs_cpr_strap1 … HT1) -T1 /2 width=3/
+qed-.
+
+lemma cpcs_cpss_strap2: ∀L,T1,T. L ⊢ T1 ▶* T → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
+#L #T1 #T #HT1 #T2 #HT2
+@(cpcs_cpr_strap2 … HT2) -T2 /2 width=3/
+qed-.
+
+lemma cpcs_cpss_conf: ∀L,T,T1. L ⊢ T ▶* T1 → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
+#L #T #T1 #HT1 #T2 #HT2
+@(cpcs_cpr_conf … HT2) -T2 /2 width=3/
+qed-.
+
+lemma cpcs_cpss_div: ∀L,T1,T. L ⊢ T1 ⬌* T → ∀T2. L ⊢ T2 ▶* T → L ⊢ T1 ⬌* T2.
+#L #T1 #T #HT1 #T2 #HT2
+@(cpcs_cpr_div … HT1) -T1 /2 width=3/
+qed-.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/substitution/lsubr.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR SUBSTITUTION ****************************)
+
+(* Auxiliary inversion lemmas ***********************************************)
+
+fact lsubr_inv_abbr1_aux: ∀L1,L2. L1 ⊑ L2 → ∀K1,W. L1 = K1.ⓓW →
+ ∨∨ L2 = ⋆
+ | ∃∃K2. K1 ⊑ K2 & L2 = K2.ⓓW
+ | ∃∃K2,W2. K1 ⊑ K2 & L2 = K2.ⓛW2.
+#L1 #L2 * -L1 -L2
+[ #L #K1 #W #H destruct /2 width=1/
+| #L1 #L2 #V #HL12 #K1 #W #H destruct /3 width=3/
+| #I #L1 #L2 #V1 #V2 #HL12 #K1 #W #H destruct /3 width=4/
+]
+qed-.
+
+lemma lsubr_inv_abbr1: ∀K1,L2,W. K1.ⓓW ⊑ L2 →
+ ∨∨ L2 = ⋆
+ | ∃∃K2. K1 ⊑ K2 & L2 = K2.ⓓW
+ | ∃∃K2,W2. K1 ⊑ K2 & L2 = K2.ⓛW2.
+/2 width=3 by lsubr_inv_abbr1_aux/ qed-.
+
+fact lsubr_inv_abst1_aux: ∀L1,L2. L1 ⊑ L2 → ∀K1,W1. L1 = K1.ⓛW1 →
+ L2 = ⋆ ∨
+ ∃∃K2,W2. K1 ⊑ K2 & L2 = K2.ⓛW2.
+#L1 #L2 * -L1 -L2
+[ #L #K1 #W1 #H destruct /2 width=1/
+| #L1 #L2 #V #_ #K1 #W1 #H destruct
+| #I #L1 #L2 #V1 #V2 #HL12 #K1 #W1 #H destruct /3 width=4/
+]
+qed-.
+
+lemma lsubr_inv_abst1: ∀K1,L2,W1. K1.ⓛW1 ⊑ L2 →
+ L2 = ⋆ ∨
+ ∃∃K2,W2. K1 ⊑ K2 & L2 = K2.ⓛW2.
+/2 width=4 by lsubr_inv_abst1_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 //
+| #L1 #L #V #_ #IHL1 #X #H
+ elim (lsubr_inv_abbr1 … H) -H // *
+ #L2 [2: #V2 ] #HL2 #H destruct /3 width=1/
+| #I #L1 #L #V1 #V #_ #IHL1 #X #H
+ elim (lsubr_inv_abst1 … H) -H // *
+ #L2 #V2 #HL2 #H destruct /3 width=1/
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/computation/dxprs_lpss.ma".
+include "basic_2/equivalence/cpcs_lpss.ma".
+include "basic_2/dynamic/snv_lift.ma".
+
+(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
+
+(* Properties about sn parallel substitution for local environments *********)
+
+lemma snv_cpss_lpss_conf: ∀h,g,L1,T1. ⦃h, L1⦄ ⊢ T1 ¡[g] → ∀T2. L1 ⊢ T1 ▶* T2 →
+ ∀L2. L1 ⊢ ▶* L2 → ⦃h, L2⦄ ⊢ T2 ¡[g].
+#h #g #L1 #T1 #H elim H -L1 -T1
+[ #L1 #k #X #H #L2 #_
+ >(cpss_inv_sort1 … H) -X //
+| #I #L1 #K1 #V1 #i #HLK1 #_ #IHV1 #W2 #H #L2 #HL12
+ elim (cpss_inv_lref1 … H) -H
+ [ #H destruct
+ elim (lpss_ldrop_conf … HLK1 … HL12) -L1 #X #H #HLK2
+ elim (lpss_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct
+ lapply (IHV1 … HV12 … HK12) -IHV1 -HV12 -HK12 /2 width=5/
+ | * #K0 #V0 #V2 #HLK0 #HV12 #HVW2
+ lapply (ldrop_mono … HLK0 … HLK1) -HLK0 #H destruct
+ elim (lpss_ldrop_conf … HLK1 … HL12) -L1 #X #H #HLK2
+ elim (lpss_inv_pair1 … H) -H #K2 #V #HK12 #_ #H destruct
+ lapply (ldrop_fwd_ldrop2 … HLK2) -V #HLK2
+ lapply (IHV1 … HV12 … HK12) -IHV1 -HV12 -HK12 /2 width=7/
+ ]
+| #a #I #L1 #V1 #T1 #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
+ elim (cpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+ lapply (IHV1 … HV12 … HL12) -IHV1 #HV2
+ lapply (IHT1 … HT12 (L2.ⓑ{I}V2) ?) -IHT1 -HT12 /2 width=1/
+| #a #L1 #V1 #W1 #W0 #T1 #U1 #l #_ #_ #HVW1 #HW10 #HTU1 #IHV1 #IHT1 #X #H #L2 #HL12
+ elim (cpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+ lapply (IHV1 … HV12 … HL12) -IHV1 #HV2
+ lapply (IHT1 … HT12 … HL12) -IHT1 #HT2
+ elim (ssta_cpss_lpss_conf … HVW1 … HV12 … HL12) -V1 #W2 #HVW2 #HW12
+ elim (dxprs_cpss_lpss_conf … HTU1 … HT12 … HL12) -T1 #X #HTU2 #H
+ elim (cpss_inv_bind1 … H) -H #W #U2 #HW0 #_ #H -U1 destruct
+ elim (cprs_cpss2_lpss_conf_dx … HW10 … HW12 … HW0 … HL12) -L1 -W1 -W0 #W0 #HW20 #HW0
+ lapply (dxprs_strap1 … (ⓛ{a}W0.U2) HTU2 ?) -HTU2 /3 width=3/ -HW0 /2 width=8/
+| #L1 #W1 #T1 #U1 #l #_ #_ #HTU1 #HUW1 #IHW1 #IHT1 #X #H #L2 #HL12
+ elim (cpss_inv_flat1 … H) -H #W2 #T2 #HW12 #HT12 #H destruct
+ lapply (IHW1 … HW12 … HL12) -IHW1 #HW2
+ lapply (IHT1 … HT12 … HL12) -IHT1 #HT2
+ elim (ssta_cpss_lpss_conf … HTU1 … HT12 … HL12) -T1 #U2 #HTU2 #HU12
+ lapply (cpcs_cpss2_lpss_conf … HUW1 … HU12 … HW12 … HL12) -L1 -W1 -U1 /2 width=4/
+]
+qed-.
+
+lemma snv_lpss_conf: ∀h,g,L1,T. ⦃h, L1⦄ ⊢ T ¡[g] →
+ ∀L2. L1 ⊢ ▶* L2 → ⦃h, L2⦄ ⊢ T ¡[g].
+#h #g #L1 #T #HT #L2 #HL12
+@(snv_cpss_lpss_conf … HT … HL12) //
+qed-.
+
+lemma snv_cpss_conf: ∀h,g,L,T1. ⦃h, L⦄ ⊢ T1 ¡[g] →
+ ∀T2. L ⊢ T1 ▶* T2 → ⦃h, L⦄ ⊢ T2 ¡[g].
+#h #g #L #T1 #HT1 #T2 #HT12
+@(snv_cpss_lpss_conf … HT1 … HT12) //
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/substitution/lpss_ldrop.ma".
+include "basic_2/static/ssta_lift.ma".
+
+(* STRATIFIED STATIC TYPE ASSIGNMENT ON TERMS *******************************)
+
+(* Properties about sn parallel substitution ********************************)
+
+(* Note: apparently this was missing in basic_1 *)
+lemma ssta_cpss_lpss_conf: ∀h,g,L1,T1,U1,l. ⦃h, L1⦄ ⊢ T1 •[g] ⦃l, U1⦄ →
+ ∀T2. L1 ⊢ T1 ▶* T2 → ∀L2. L1 ⊢ ▶* L2 →
+ ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g] ⦃l, U2⦄ & L1 ⊢ U1 ▶* U2.
+#h #g #L1 #T1 #U1 #l #H elim H -L1 -T1 -U1 -l
+[ #L1 #k1 #l1 #Hkl1 #X #H
+ >(cpss_inv_sort1 … H) -H /3 width=3/
+| #L1 #K1 #V1 #W1 #U1 #i #l #HLK1 #_ #HWU1 #IHVW1 #X #H #L2 #HL12
+ elim (cpss_inv_lref1 … H) -H
+ [ #H destruct
+ elim (lpss_ldrop_conf … HLK1 … HL12) -HL12 #X #H #HLK2
+ elim (lpss_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct
+ lapply (ldrop_fwd_ldrop2 … HLK1) -HLK1 #HLK1
+ elim (IHVW1 … HV12 … HK12) -IHVW1 -HV12 -HK12 #W2 #HVW2 #HW12
+ elim (lift_total W2 0 (i+1)) #U2 #HWU2
+ lapply (cpss_lift … HW12 … HLK1 … HWU1 … HWU2) -HW12 -HLK1 -HWU1 /3 width=6/
+ | * #Y #Z #V2 #H #HV12 #HV2
+ lapply (ldrop_mono … H … HLK1) -H #H destruct
+ elim (lpss_ldrop_conf … HLK1 … HL12) -HL12 #Z #H #HLK2
+ elim (lpss_inv_pair1 … H) -H #K2 #V0 #HK12 #_ #H destruct
+ lapply (ldrop_fwd_ldrop2 … HLK2) -V0 #HLK2
+ lapply (ldrop_fwd_ldrop2 … HLK1) -HLK1 #HLK1
+ elim (IHVW1 … HV12 … HK12) -IHVW1 -HK12 -HV12 #W2 #HVW2 #HW12
+ elim (lift_total W2 0 (i+1)) #U2 #HWU2
+ lapply (ssta_lift … HVW2 … HLK2 … HV2 … HWU2) -HVW2 -HLK2 -HV2
+ lapply (cpss_lift … HW12 … HLK1 … HWU1 … HWU2) -HW12 -HLK1 -HWU1 -HWU2 /3 width=3/
+ ]
+| #L1 #K1 #W1 #V1 #U1 #i #l #HLK1 #_ #HWU1 #IHWV1 #X #H #L2 #HL12
+ elim (cpss_inv_lref1 … H) -H [ | -IHWV1 -HWU1 -HL12 ]
+ [ #H destruct
+ elim (lpss_ldrop_conf … HLK1 … HL12) -HL12 #X #H #HLK2
+ elim (lpss_inv_pair1 … H) -H #K2 #W2 #HK12 #HW12 #H destruct
+ lapply (ldrop_fwd_ldrop2 … HLK1) -HLK1 #HLK1
+ elim (IHWV1 … HW12 … HK12) -IHWV1 -HK12 #V2 #HWV2 #_
+ elim (lift_total W2 0 (i+1)) #U2 #HWU2
+ lapply (cpss_lift … HW12 … HLK1 … HWU1 … HWU2) -HW12 -HLK1 -HWU1 /3 width=6/
+ | * #K2 #V2 #W2 #HLK2 #_ #_
+ lapply (ldrop_mono … HLK2 … HLK1) -HLK1 -HLK2 #H destruct
+ ]
+| #a #I #L1 #V1 #T1 #U1 #l #_ #IHTU1 #X #H #L2 #HL12
+ elim (cpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+ elim (IHTU1 … HT12 (L2.ⓑ{I}V2)) -IHTU1 -HT12 /2 width=1/ -HL12 /3 width=5/
+| #L1 #V1 #T1 #U1 #l #_ #IHTU1 #X #H #L2 #HL12
+ elim (cpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+ elim (IHTU1 … HT12 … HL12) -IHTU1 -HT12 -HL12 /3 width=5/
+| #L1 #W1 #T1 #U1 #l #_ #IHTU1 #X #H #L2 #HL12
+ elim (cpss_inv_flat1 … H) -H #W2 #T2 #HW12 #HT12 #H destruct
+ elim (IHTU1 … HT12 … HL12) -IHTU1 -HT12 -HL12 /3 width=3/
+]
+qed-.
+
+lemma ssta_cpss_conf: ∀h,g,L,T1,U1,l. ⦃h, L⦄ ⊢ T1 •[g] ⦃l, U1⦄ →
+ ∀T2. L ⊢ T1 ▶* T2 →
+ ∃∃U2. ⦃h, L⦄ ⊢ T2 •[g] ⦃l, U2⦄ & L ⊢ U1 ▶* U2.
+/2 width=3 by ssta_cpss_lpss_conf/ qed-.
+
+lemma ssta_lpss_conf: ∀h,g,L1,T,U1,l. ⦃h, L1⦄ ⊢ T •[g] ⦃l, U1⦄ →
+ ∀L2. L1 ⊢ ▶* L2 →
+ ∃∃U2. ⦃h, L2⦄ ⊢ T •[g] ⦃l, U2⦄ & L1 ⊢ U1 ▶* U2.
+/2 width=3 by ssta_cpss_lpss_conf/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/static/ssta_lpss.ma".
+include "basic_2/unfold/sstas.ma".
+
+(* ITERATED STRATIFIED STATIC TYPE ASSIGNMENT FOR TERMS *********************)
+
+(* Properties about sn parallel substitution for local environments *********)
+
+lemma sstas_cpss_lpss_conf: ∀h,g,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 •*[g] U1 →
+ ∀T2. L1 ⊢ T1 ▶* T2 → ∀L2. L1 ⊢ ▶* L2 →
+ ∃∃U2. ⦃h, L2⦄ ⊢ T2 •*[g] U2 & L1 ⊢ U1 ▶* U2.
+#h #g #L1 #T1 #U1 #H @(sstas_ind_dx … H) -T1 /2 width=3/
+#T0 #U0 #l0 #HTU0 #_ #IHU01 #T #HT0 #L2 #HL12
+elim (ssta_cpss_lpss_conf … HTU0 … HT0 … HL12) -HTU0 -HT0 #U #HTU #HU0
+elim (IHU01 … HU0 … HL12) -IHU01 -U0 -HL12 /3 width=4/
+qed-.
+
+lemma sstas_cpss_conf: ∀h,g,L,T1,U1. ⦃h, L⦄ ⊢ T1 •*[g] U1 →
+ ∀T2. L ⊢ T1 ▶* T2 →
+ ∃∃U2. ⦃h, L⦄ ⊢ T2 •*[g] U2 & L ⊢ U1 ▶* U2.
+/2 width=3 by sstas_cpss_lpss_conf/ qed-.
+
+lemma sstas_lpss_conf: ∀h,g,L1,T,U1. ⦃h, L1⦄ ⊢ T •*[g] U1 →
+ ∀L2. L1 ⊢ ▶* L2 →
+ ∃∃U2. ⦃h, L2⦄ ⊢ T •*[g] U2 & L1 ⊢ U1 ▶* U2.
+/2 width=3 by sstas_cpss_lpss_conf/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 "hvbox( h ⊢ break term 46 L1 • ⊑ break [ term 46 g ] break term 46 L2 )"
+ non associative with precedence 45
+ for @{ 'CrSubEqS $h $g $L1 $L2 }.
+
+include "basic_2/static/ssta.ma".
+include "basic_2/computation/cprs.ma".
+include "basic_2/equivalence/cpcs.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED STATIC TYPE ASSIGNMENT *******)
+
+(* Note: this is not transitive *)
+inductive lsubss (h:sh) (g:sd h): relation lenv ≝
+| lsubss_atom: lsubss h g (⋆) (⋆)
+| lsubss_pair: ∀I,L1,L2,V. lsubss h g L1 L2 →
+ lsubss h g (L1. ⓑ{I} V) (L2. ⓑ{I} V)
+| lsubss_abbr: ∀L1,L2,V1,V2,W1,W2,l. L1 ⊢ W1 ⬌* W2 →
+ ⦃h, L1⦄ ⊢ V1 •[g] ⦃l+1, W1⦄ → ⦃h, L2⦄ ⊢ W2 •[g] ⦃l, V2⦄ →
+ lsubss h g L1 L2 → lsubss h g (L1. ⓓV1) (L2. ⓛW2)
+.
+
+interpretation
+ "local environment refinement (stratified static type assigment)"
+ 'CrSubEqS h g L1 L2 = (lsubss h g L1 L2).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact lsubss_inv_atom1_aux: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 → L1 = ⋆ → L2 = ⋆.
+#h #g #L1 #L2 * -L1 -L2
+[ //
+| #I #L1 #L2 #V #_ #H destruct
+| #L1 #L2 #V1 #V2 #W1 #W2 #l #_ #_ #_ #_ #H destruct
+]
+qed-.
+
+lemma lsubss_inv_atom1: ∀h,g,L2. h ⊢ ⋆ •⊑[g] L2 → L2 = ⋆.
+/2 width=5 by lsubss_inv_atom1_aux/ qed-.
+
+fact lsubss_inv_pair1_aux: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 →
+ ∀I,K1,V1. L1 = K1. ⓑ{I} V1 →
+ (∃∃K2. h ⊢ K1 •⊑[g] K2 & L2 = K2. ⓑ{I} V1) ∨
+ ∃∃K2,W1,W2,V2,l. ⦃h, K1⦄ ⊢ V1 •[g] ⦃l+1, W1⦄ & ⦃h, K2⦄ ⊢ W2 •[g] ⦃l, V2⦄ &
+ K1 ⊢ W1 ⬌* W2 & h ⊢ K1 •⊑[g] K2 & L2 = K2. ⓛW2 & I = Abbr.
+#h #g #L1 #L2 * -L1 -L2
+[ #J #K1 #U1 #H destruct
+| #I #L1 #L2 #V #HL12 #J #K1 #U1 #H destruct /3 width=3/
+| #L1 #L2 #V1 #V2 #W1 #W2 #l #HW12 #HVW1 #HWV2 #HL12 #J #K1 #U1 #H destruct /3 width=10/
+]
+qed-.
+
+lemma lsubss_inv_pair1: ∀h,g,I,K1,L2,V1. h ⊢ K1. ⓑ{I} V1 •⊑[g] L2 →
+ (∃∃K2. h ⊢ K1 •⊑[g] K2 & L2 = K2. ⓑ{I} V1) ∨
+ ∃∃K2,W1,W2,V2,l. ⦃h, K1⦄ ⊢ V1 •[g] ⦃l+1, W1⦄ & ⦃h, K2⦄ ⊢ W2 •[g] ⦃l, V2⦄ &
+ K1 ⊢ W1 ⬌* W2 & h ⊢ K1 •⊑[g] K2 & L2 = K2. ⓛW2 & I = Abbr.
+/2 width=3 by lsubss_inv_pair1_aux/ qed-.
+
+fact lsubss_inv_atom2_aux: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 → L2 = ⋆ → L1 = ⋆.
+#h #g #L1 #L2 * -L1 -L2
+[ //
+| #I #L1 #L2 #V #_ #H destruct
+| #L1 #L2 #V1 #V2 #W1 #W2 #l #_ #_ #_ #_ #H destruct
+]
+qed-.
+
+lemma lsubss_inv_atom2: ∀h,g,L1. h ⊢ L1 •⊑[g] ⋆ → L1 = ⋆.
+/2 width=5 by lsubss_inv_atom2_aux/ qed-.
+
+fact lsubss_inv_pair2_aux: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 →
+ ∀I,K2,W2. L2 = K2. ⓑ{I} W2 →
+ (∃∃K1. h ⊢ K1 •⊑[g] K2 & L1 = K1. ⓑ{I} W2) ∨
+ ∃∃K1,W1,V1,V2,l. ⦃h, K1⦄ ⊢ V1 •[g] ⦃l+1, W1⦄ & ⦃h, K2⦄ ⊢ W2 •[g] ⦃l, V2⦄ &
+ K1 ⊢ W1 ⬌* W2 & h ⊢ K1 •⊑[g] K2 & L1 = K1. ⓓV1 & I = Abst.
+#h #g #L1 #L2 * -L1 -L2
+[ #J #K2 #U2 #H destruct
+| #I #L1 #L2 #V #HL12 #J #K2 #U2 #H destruct /3 width=3/
+| #L1 #L2 #V1 #V2 #W1 #W2 #l #HW12 #HVW1 #HWV2 #HL12 #J #K2 #U2 #H destruct /3 width=10/
+]
+qed-.
+
+lemma lsubss_inv_pair2: ∀h,g,I,L1,K2,W2. h ⊢ L1 •⊑[g] K2. ⓑ{I} W2 →
+ (∃∃K1. h ⊢ K1 •⊑[g] K2 & L1 = K1. ⓑ{I} W2) ∨
+ ∃∃K1,W1,V1,V2,l. ⦃h, K1⦄ ⊢ V1 •[g] ⦃l+1, W1⦄ & ⦃h, K2⦄ ⊢ W2 •[g] ⦃l, V2⦄ &
+ K1 ⊢ W1 ⬌* W2 & h ⊢ K1 •⊑[g] K2 & L1 = K1. ⓓV1 & I = Abst.
+/2 width=3 by lsubss_inv_pair2_aux/ qed-.
+
+(* Basic_forward lemmas *****************************************************)
+
+axiom lsubss_fwd_lsubx: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 → L1 ⓝ⊑ L2.
+(*
+#h #g #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
+qed-.
+*)
+(* Basic properties *********************************************************)
+
+lemma lsubss_refl: ∀h,g,L. h ⊢ L •⊑[g] L.
+#h #g #L elim L -L // /2 width=1/
+qed.
+
+lemma lsubss_cprs_trans: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 →
+ ∀T1,T2. L2 ⊢ T1 ➡* T2 → L1 ⊢ T1 ➡* T2.
+/3 width=5 by lsubss_fwd_lsubx, lsubx_cprs_trans/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/equivalence/cpcs_cpcs.ma".
+include "basic_2/equivalence/lsubss.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED STATIC TYPE ASSIGNMENT *******)
+
+(* Properties on context-sensitive parallel equivalence for terms ***********)
+
+lemma lsubss_cpcs_trans: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 →
+ ∀T1,T2. L2 ⊢ T1 ⬌* T2 → L1 ⊢ T1 ⬌* T2.
+/3 width=5 by lsubss_fwd_lsubx, lsubx_cpcs_trans/
+qed-.
--- /dev/null
+lemma lsubsv_fwd_lsubss: ∀h,g,L1,L2. h ⊢ L1 ¡⊑[g] L2 → h ⊢ L1 •⊑[g] L2.
+#h #g #L1 #L2 #H elim H -L1 -L2 // /2 width=1/ /2 width=6/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/equivalence/lsubss.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED STATIC TYPE ASSIGNMENT *******)
+
+(* Properties concerning basic local environment slicing ********************)
+
+(* Note: the constant 0 cannot be generalized *)
+lemma lsubss_ldrop_O1_conf: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 →
+ ∀K1,e. ⇩[0, e] L1 ≡ K1 →
+ ∃∃K2. h ⊢ K1 •⊑[g] K2 & ⇩[0, e] L2 ≡ K2.
+#h #g #L1 #L2 #H elim H -L1 -L2
+[ /2 width=3/
+| #I #L1 #L2 #V #_ #IHL12 #K1 #e #H
+ elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK1
+ [ destruct
+ elim (IHL12 L1 0) -IHL12 // #X #HL12 #H
+ <(ldrop_inv_O2 … H) in HL12; -H /3 width=3/
+ | elim (IHL12 … HLK1) -L1 /3 width=3/
+ ]
+| #L1 #L2 #V1 #V2 #W1 #W2 #l #HW12 #HVW1 #HWV2 #_ #IHL12 #K1 #e #H
+ elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK1
+ [ destruct
+ elim (IHL12 L1 0) -IHL12 // #X #HL12 #H
+ <(ldrop_inv_O2 … H) in HL12; -H /3 width=6/
+ | elim (IHL12 … HLK1) -L1 /3 width=3/
+ ]
+]
+qed-.
+
+(* Note: the constant 0 cannot be generalized *)
+lemma lsubss_ldrop_O1_trans: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 →
+ ∀K2,e. ⇩[0, e] L2 ≡ K2 →
+ ∃∃K1. h ⊢ K1 •⊑[g] K2 & ⇩[0, e] L1 ≡ K1.
+#h #g #L1 #L2 #H elim H -L1 -L2
+[ /2 width=3/
+| #I #L1 #L2 #V #_ #IHL12 #K2 #e #H
+ elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK2
+ [ destruct
+ elim (IHL12 L2 0) -IHL12 // #X #HL12 #H
+ <(ldrop_inv_O2 … H) in HL12; -H /3 width=3/
+ | elim (IHL12 … HLK2) -L2 /3 width=3/
+ ]
+| #L1 #L2 #V1 #V2 #W1 #W2 #l #HW12 #HVW1 #HWV2 #_ #IHL12 #K2 #e #H
+ elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK2
+ [ destruct
+ elim (IHL12 L2 0) -IHL12 // #X #HL12 #H
+ <(ldrop_inv_O2 … H) in HL12; -H /3 width=6/
+ | elim (IHL12 … HLK2) -L2 /3 width=3/
+ ]
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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_2/static/ssta_ssta.ma".
+include "basic_2/equivalence/cpcs_cpcs.ma".
+include "basic_2/equivalence/lsubss_ldrop.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED STATIC TYPE ASSIGNMENT *******)
+
+(* Properties on stratified native type assignment **************************)
+
+lemma lsubss_ssta_trans: ∀h,g,L2,T,U2,l. ⦃h, L2⦄ ⊢ T •[g] ⦃l, U2⦄ →
+ ∀L1. h ⊢ L1 •⊑[g] L2 →
+ ∃∃U1. ⦃h, L1⦄ ⊢ T •[g] ⦃l, U1⦄ & L1 ⊢ U1 ⬌* U2.
+#h #g #L2 #T #U #l #H elim H -L2 -T -U -l
+[ /3 width=3/
+| #L2 #K2 #V2 #W2 #U2 #i #l #HLK2 #_ #HWU2 #IHVW2 #L1 #HL12
+ elim (lsubss_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
+ elim (lsubss_inv_pair2 … H) -H * #K1 [ | -HWU2 -IHVW2 -HLK1 ]
+ [ #HK12 #H destruct
+ elim (IHVW2 … HK12) -K2 #T2 #HVT2 #HTW2
+ lapply (ldrop_fwd_ldrop2 … HLK1) #H
+ elim (lift_total T2 0 (i+1)) /3 width=11/
+ | #W1 #V1 #W2 #l0 #_ #_ #_ #_ #_ #H destruct
+ ]
+| #L2 #K2 #W2 #V2 #U2 #i #l #HLK2 #HWV2 #HWU2 #IHWV2 #L1 #HL12
+ elim (lsubss_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
+ elim (lsubss_inv_pair2 … H) -H * #K1 [ -HWV2 | -IHWV2 ]
+ [ #HK12 #H destruct
+ elim (IHWV2 … HK12) -K2 /3 width=6/
+ | #W1 #V1 #T2 #l0 #HVW1 #HWT2 #HW12 #_ #H #_ destruct
+ elim (ssta_mono … HWV2 … HWT2) -HWV2 -HWT2 #H1 #H2 destruct
+ lapply (ldrop_fwd_ldrop2 … HLK1) #H
+ elim (lift_total W1 0 (i+1)) /3 width=11/
+ ]
+| #a #I #L2 #V2 #T2 #U2 #l #_ #IHTU2 #L1 #HL12
+ elim (IHTU2 (L1.ⓑ{I}V2) …) [2: /2 width=1/ ] -L2 /3 width=3/
+| #L2 #V2 #T2 #U2 #l #_ #IHTU2 #L1 #HL12
+ elim (IHTU2 … HL12) -L2 /3 width=5/
+| #L2 #W2 #T2 #U2 #l #_ #IHTU2 #L1 #HL12
+ elim (IHTU2 … HL12) -L2 /3 width=3/
+]
+qed-.
*)
include "ground_2/star.ma".
-include "basic_2/notation.ma".
+include "basic_2/notation/constructors/item0_0.ma".
+include "basic_2/notation/constructors/snitem2_2.ma".
(* ATOMIC ARITY *************************************************************)
(* *)
(**************************************************************************)
+include "basic_2/notation/functions/weight_2.ma".
include "basic_2/grammar/lenv_weight.ma".
include "basic_2/grammar/cl_shift.ma".
(**************************************************************************)
include "ground_2/list.ma".
+include "basic_2/notation/constructors/star_0.ma".
+include "basic_2/notation/constructors/dxbind2_3.ma".
+include "basic_2/notation/constructors/dxabbr_2.ma".
+include "basic_2/notation/constructors/dxabst_2.ma".
include "basic_2/grammar/term.ma".
(* GLOBAL ENVIRONMENTS ******************************************************)
interpretation "sort (global environment)"
'Star = (nil2 bind2 term).
-interpretation "environment construction (binary)"
- 'DxItem2 L I T = (cons2 bind2 term I T L).
-
interpretation "environment binding construction (binary)"
'DxBind2 L I T = (cons2 bind2 term I T L).
(**************************************************************************)
include "ground_2/arith.ma".
-include "basic_2/notation.ma".
(* ITEMS ********************************************************************)
(* *)
(**************************************************************************)
+include "basic_2/notation/constructors/star_0.ma".
+include "basic_2/notation/constructors/dxbind2_3.ma".
+include "basic_2/notation/constructors/dxabbr_2.ma".
+include "basic_2/notation/constructors/dxabst_2.ma".
include "basic_2/grammar/term.ma".
(* LOCAL ENVIRONMENTS *******************************************************)
interpretation "sort (local environment)"
'Star = LAtom.
-interpretation "environment construction (binary)"
- 'DxItem2 L I T = (LPair L I T).
-
interpretation "environment binding construction (binary)"
'DxBind2 L I T = (LPair L I T).
(* *)
(**************************************************************************)
+include "basic_2/notation/constructors/item0_1.ma".
+include "basic_2/notation/constructors/snitem2_3.ma".
+include "basic_2/notation/constructors/snbind2_4.ma".
+include "basic_2/notation/constructors/snbind2pos_3.ma".
+include "basic_2/notation/constructors/snbind2neg_3.ma".
+include "basic_2/notation/constructors/snflat2_3.ma".
+include "basic_2/notation/constructors/star_1.ma".
+include "basic_2/notation/constructors/lref_1.ma".
+include "basic_2/notation/constructors/gref_1.ma".
+include "basic_2/notation/constructors/snabbr_3.ma".
+include "basic_2/notation/constructors/snabbrpos_2.ma".
+include "basic_2/notation/constructors/snabbrneg_2.ma".
+include "basic_2/notation/constructors/snabst_3.ma".
+include "basic_2/notation/constructors/snabstpos_2.ma".
+include "basic_2/notation/constructors/snabstneg_2.ma".
+include "basic_2/notation/constructors/snappl_2.ma".
+include "basic_2/notation/constructors/sncast_2.ma".
include "basic_2/grammar/item.ma".
(* TERMS ********************************************************************)
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/simple_1.ma".
include "basic_2/grammar/term.ma".
(* SIMPLE (NEUTRAL) TERMS ***************************************************)
(**************************************************************************)
include "ground_2/list.ma".
+include "basic_2/notation/functions/snapplv_2.ma".
include "basic_2/grammar/term_simple.ma".
(* TERMS ********************************************************************)
(* *)
(**************************************************************************)
+include "basic_2/notation/functions/weight_1.ma".
include "basic_2/grammar/term.ma".
(* WEIGHT OF A TERM *********************************************************)
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/iso_2.ma".
include "basic_2/grammar/term_simple.ma".
(* SAME TOP TERM CONSTRUCTOR ************************************************)
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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 λδ ****************************************)
-
-(* Grammar ******************************************************************)
-
-notation "⓪"
- non associative with precedence 55
- for @{ 'Item0 }.
-
-notation "hvbox( ⓪ { term 46 I } )"
- non associative with precedence 55
- for @{ 'Item0 $I }.
-
-notation "⋆"
- non associative with precedence 46
- for @{ 'Star }.
-
-notation "hvbox( ⋆ term 90 k )"
- non associative with precedence 55
- for @{ 'Star $k }.
-
-notation "hvbox( # term 90 i )"
- non associative with precedence 55
- for @{ 'LRef $i }.
-
-notation "hvbox( § term 90 p )"
- non associative with precedence 55
- for @{ 'GRef $p }.
-
-notation "hvbox( ② term 55 T1 . break term 55 T )"
- non associative with precedence 55
- for @{ 'SnItem2 $T1 $T }.
-
-notation "hvbox( ② { term 46 I } break term 55 T1 . break term 55 T )"
- non associative with precedence 55
- for @{ 'SnItem2 $I $T1 $T }.
-
-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 }.
-
-notation "hvbox( + ⓑ { term 46 I } break term 55 T1 . break term 55 T )"
- non associative with precedence 55
- for @{ 'SnBind2Pos $I $T1 $T }.
-
-notation "hvbox( - ⓑ { term 46 I } break term 55 T1 . break term 55 T )"
- non associative with precedence 55
- for @{ 'SnBind2Neg $I $T1 $T }.
-
-notation "hvbox( ⓕ { term 46 I } break term 55 T1 . break term 55 T )"
- non associative with precedence 55
- for @{ 'SnFlat2 $I $T1 $T }.
-
-notation "hvbox( ⓓ { term 46 a } break term 55 T1 . break term 55 T2 )"
- non associative with precedence 55
- for @{ 'SnAbbr $a $T1 $T2 }.
-
-notation "hvbox( + ⓓ term 55 T1 . break term 55 T2 )"
- non associative with precedence 55
- for @{ 'SnAbbrPos $T1 $T2 }.
-
-notation "hvbox( - ⓓ term 55 T1 . break term 55 T2 )"
- non associative with precedence 55
- for @{ 'SnAbbrNeg $T1 $T2 }.
-
-notation "hvbox( ⓛ { term 46 a } break term 55 T1 . break term 55 T2 )"
- non associative with precedence 55
- for @{ 'SnAbst $a $T1 $T2 }.
-
-notation "hvbox( + ⓛ term 55 T1 . break term 55 T2 )"
- non associative with precedence 55
- for @{ 'SnAbstPos $T1 $T2 }.
-
-notation "hvbox( - ⓛ term 55 T1 . break term 55 T2 )"
- non associative with precedence 55
- for @{ 'SnAbstNeg $T1 $T2 }.
-
-notation "hvbox( ⓐ term 55 T1 . break term 55 T2 )"
- non associative with precedence 55
- for @{ 'SnAppl $T1 $T2 }.
-
-notation "hvbox( ⓝ term 55 T1 . break term 55 T2 )"
- non associative with precedence 55
- for @{ 'SnCast $T1 $T2 }.
-
-notation "hvbox( Ⓐ term 55 T1 . break term 55 T )"
- non associative with precedence 55
- for @{ 'SnApplV $T1 $T }.
-
-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 }.
-
-notation "hvbox( T1 . break ⓓ T2 )"
- left associative with precedence 48
- for @{ 'DxAbbr $T1 $T2 }.
-
-notation "hvbox( T1 . break ⓛ T2 )"
- left associative with precedence 49
- for @{ 'DxAbst $T1 $T2 }.
-
-notation "hvbox( ♯ { term 46 x } )"
- non associative with precedence 90
- for @{ 'Weight $x }.
-
-notation "hvbox( ♯ { term 46 x , break term 46 y } )"
- non associative with precedence 90
- for @{ 'Weight $x $y }.
-
-notation "hvbox( 𝐒 ⦃ term 46 T ⦄ )"
- non associative with precedence 45
- for @{ 'Simple $T }.
-
-notation "hvbox( T1 ≃ break term 46 T2 )"
- non associative with precedence 45
- for @{ 'Iso $T1 $T2 }.
-
-(* Relocation ***************************************************************)
-
-notation "hvbox( ⇧ [ term 46 d , break term 46 e ] break term 46 T1 ≡ break term 46 T2 )"
- non associative with precedence 45
- for @{ 'RLift $d $e $T1 $T2 }.
-
-notation "hvbox( ⇩ [ term 46 e ] break term 46 L1 ≡ break term 46 L2 )"
- non associative with precedence 45
- for @{ 'RDrop $e $L1 $L2 }.
-
-notation "hvbox( ⇩ [ term 46 d , break term 46 e ] break term 46 L1 ≡ break term 46 L2 )"
- non associative with precedence 45
- for @{ 'RDrop $d $e $L1 $L2 }.
-
-notation "hvbox( ⦃ term 46 L1, break term 46 T1 ⦄ ⊃ break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
- non associative with precedence 45
- for @{ 'SupTerm $L1 $T1 $L2 $T2 }.
-
-notation "hvbox( ⦃ term 46 L1, break term 46 T1 ⦄ ⊃⸮ break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
- non associative with precedence 45
- for @{ 'SupTermOpt $L1 $T1 $L2 $T2 }.
-
-notation "hvbox( ⦃ term 46 L1, break term 46 T1 ⦄ ⊃⊃⸮ break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
- non associative with precedence 45
- for @{ 'SupTermOptAlt $L1 $T1 $L2 $T2 }.
-
-notation "hvbox( L ⊢ break ⌘ ⦃ term 46 T ⦄ ≡ break term 46 k )"
- non associative with precedence 45
- for @{ 'ICM $L $T $k }.
-
-(* Substitution *************************************************************)
-
-notation "hvbox( @ ⦃ term 46 T1 , break term 46 f ⦄ ≡ break term 46 T2 )"
- non associative with precedence 45
- for @{ 'RAt $T1 $f $T2 }.
-
-notation "hvbox( T1 ▭ break term 46 T2 ≡ break term 46 T )"
- non associative with precedence 45
- for @{ 'RMinus $T1 $T2 $T }.
-
-notation "hvbox( ⇧ * [ term 46 e ] break term 46 T1 ≡ break term 46 T2 )"
- non associative with precedence 45
- for @{ 'RLiftStar $e $T1 $T2 }.
-
-notation "hvbox( ⇩ * [ term 46 e ] break term 46 L1 ≡ break term 46 L2 )"
- non associative with precedence 45
- for @{ 'RDropStar $e $L1 $L2 }.
-
-notation "hvbox( ⦃ term 46 L1, break term 46 T1 ⦄ ⊃ + break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
- non associative with precedence 45
- for @{ 'SupTermPlus $L1 $T1 $L2 $T2 }.
-
-notation "hvbox( ⦃ term 46 L1, break term 46 T1 ⦄ ⊃ * break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
- non associative with precedence 45
- for @{ 'SupTermStar $L1 $T1 $L2 $T2 }.
-
-notation "hvbox( L1 ⊑ break term 46 L2 )"
- non associative with precedence 45
- for @{ 'CrSubEq $L1 $L2 }.
-
-notation "hvbox( L ⊢ break term 46 T1 ▶* break term 46 T2 )"
- non associative with precedence 45
- for @{ 'PSubstStar $L $T1 $T2 }.
-
-notation "hvbox( T1 ⊢ ▶ * break term 46 T2 )"
- non associative with precedence 45
- for @{ 'PSubstStarSn $T1 $T2 }.
-
-(* Static typing ************************************************************)
-
-notation "hvbox( L ⊢ break term 46 T ⁝ break term 46 A )"
- non associative with precedence 45
- for @{ 'AtomicArity $L $T $A }.
-
-notation "hvbox( T1 ⁝ ⊑ break term 46 T2 )"
- non associative with precedence 45
- for @{ 'CrSubEqA $T1 $T2 }.
-
-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 @{ 'CrSubEqB $h $L1 $L2 }.
-
-notation "hvbox( ⦃ term 46 h , break term 46 L ⦄ ⊢ break term 46 T1 • break [ term 46 g ] break ⦃ term 46 l , break term 46 T2 ⦄ )"
- non associative with precedence 45
- for @{ 'StaticType $h $g $L $T1 $T2 $l }.
-
-(* Unfold *******************************************************************)
-
-notation "hvbox( ⦃ term 46 h , break term 46 L ⦄ ⊢ break term 46 T1 •* break [ term 46 g ] break term 46 T2 )"
- non associative with precedence 45
- for @{ 'StaticTypeStar $h $g $L $T1 $T2 }.
-
-notation "hvbox( L1 ⊢ ⧫ * break term 46 T ≡ break term 46 L2 )"
- non associative with precedence 45
- for @{ 'Unfold $L1 $T $L2 }.
-
-notation "hvbox( L ⊢ break term 46 T1 ➤ * break term 46 T2 )"
- non associative with precedence 45
- for @{ 'PRestStar $L $T1 $T2 }.
-
-notation "hvbox( T1 ⊢ ➤ * break term 46 T2 )"
- non associative with precedence 45
- for @{ 'PRestStarSn $T1 $T2 }.
-
-(* Reduction ****************************************************************)
-
-notation "hvbox( L ⊢ 𝐑 break ⦃ term 46 T ⦄ )"
- non associative with precedence 45
- for @{ 'Reducible $L $T }.
-
-notation "hvbox( ⦃ term 46 h, break term 46 L ⦄ ⊢ 𝐑 break [ term 46 g ] break ⦃ term 46 T ⦄ )"
- non associative with precedence 45
- for @{ 'Reducible $h $g $L $T }.
-
-notation "hvbox( L ⊢ 𝐈 break ⦃ term 46 T ⦄ )"
- non associative with precedence 45
- for @{ 'NotReducible $L $T }.
-
-notation "hvbox( ⦃ term 46 h, break term 46 L ⦄ ⊢ 𝐈 break [ term 46 g ] break ⦃ term 46 T ⦄ )"
- non associative with precedence 45
- for @{ 'NotReducible $h $g $L $T }.
-
-notation "hvbox( L ⊢ 𝐍 break ⦃ term 46 T ⦄ )"
- non associative with precedence 45
- for @{ 'Normal $L $T }.
-
-notation "hvbox( ⦃ term 46 h, break term 46 L ⦄ ⊢ 𝐍 break [ term 46 g ] break ⦃ term 46 T ⦄ )"
- non associative with precedence 45
- for @{ 'Normal $h $g $L $T }.
-
-notation "hvbox( L ⊢ break term 46 T1 ➡ break term 46 T2 )"
- non associative with precedence 45
- for @{ 'PRed $L $T1 $T2 }.
-
-notation "hvbox( ⦃ term 46 h, break term 46 L ⦄ ⊢ break term 46 T1 ➡ break [ term 46 g ] break term 46 T2 )"
- non associative with precedence 45
- for @{ 'PRed $h $g $L $T1 $T2 }.
-
-notation "hvbox( L1 ⊢ ➡ break term 46 L2 )"
- non associative with precedence 45
- for @{ 'PRedSn $L1 $L2 }.
-
-notation "hvbox( ⦃ term 46 h, break term 46 L1 ⦄ ⊢ ➡ break [ term 46 g ] break term 46 L2 )"
- non associative with precedence 45
- for @{ 'PRedSn $h $g $L1 $L2 }.
-
-(* Computation **************************************************************)
-
-notation "hvbox( ⦃ term 46 L, break term 46 T ⦄ ϵ break [ term 46 R ] break 〚term 46 A 〛 )"
- non associative with precedence 45
- for @{ 'InEInt $R $L $T $A }.
-
-notation "hvbox( T1 ⊑ break [ term 46 R ] break term 46 T2 )"
- non associative with precedence 45
- for @{ 'CrSubEq $T1 $R $T2 }.
-
-notation "hvbox( L1 ⓝ ⊑ break term 46 L2 )"
- non associative with precedence 45
- for @{ 'CrSubEqT $L1 $L2 }.
-
-notation "hvbox( L ⊢ break term 46 T1 ➡ * break term 46 T2 )"
- non associative with precedence 45
- for @{ 'PRedStar $L $T1 $T2 }.
-
-notation "hvbox( ⦃ term 46 h, break term 46 L ⦄ ⊢ break term 46 T1 ➡ * break [ term 46 g ] break term 46 T2 )"
- non associative with precedence 45
- for @{ 'PRedStar $h $g $L $T1 $T2 }.
-
-notation "hvbox( L1 ⊢ ➡* break term 46 L2 )"
- non associative with precedence 45
- for @{ 'PRedSnStar $L1 $L2 }.
-
-notation "hvbox( ⦃ term 46 h, break term 46 L1 ⦄ ⊢ ➡ * break [ term 46 g ] break term 46 L2 )"
- non associative with precedence 45
- for @{ 'PRedSnStar $h $g $L1 $L2 }.
-
-notation "hvbox( L1 ⊢ ➡ ➡ * break term 46 L2 )"
- non associative with precedence 45
- for @{ 'PRedSnStarAlt $L1 $L2 }.
-
-notation "hvbox( ⦃ term 46 h, break term 46 L1 ⦄ ⊢ ➡ ➡ * break [ term 46 g ] break term 46 L2 )"
- non associative with precedence 45
- for @{ 'PRedSnStarAlt $h $g $L1 $L2 }.
-
-notation "hvbox( ⦃ term 46 h , break term 46 L ⦄ ⊢ break term 46 T1 • * ➡ * break [ term 46 g ] break term 46 T2 )"
- non associative with precedence 45
- for @{ 'DecomposedPRedStar $h $g $L $T1 $T2 }.
-
-notation "hvbox( ⦃ term 46 h, break term 46 L ⦄ ⊢ ⬊ * break [ term 46 g ] break term 46 T )"
- non associative with precedence 45
- for @{ 'SN $h $g $L $T }.
-
-notation "hvbox( ⦃ term 46 h, break term 46 L ⦄ ⊢ ⬊ ⬊ * break [ term 46 g ] break term 46 T )"
- non associative with precedence 45
- for @{ 'SNAlt $h $g $L $T }.
-
-notation "hvbox( L ⊢ break term 46 T1 ➡ * break 𝐍 ⦃ term 46 T2 ⦄ )"
- non associative with precedence 45
- for @{ 'PEval $L $T1 $T2 }.
-
-notation "hvbox( ⦃ term 46 h, break term 46 L ⦄ ⊢ break term 46 T1 ➡ * break [ term 46 g ] break 𝐍 ⦃ term 46 T2 ⦄ )"
- non associative with precedence 45
- for @{ 'PEval $h $g $L $T1 $T2 }.
-
-(* Conversion ***************************************************************)
-
-notation "hvbox( L ⊢ break term 46 T1 ⬌ break term 46 T2 )"
- non associative with precedence 45
- for @{ 'PConv $L $T1 $T2 }.
-
-notation "hvbox( L1 ⊢ ⬌ break term 46 L2 )"
- non associative with precedence 45
- for @{ 'PConvSn $L1 $L2 }.
-
-(* Equivalence **************************************************************)
-
-notation "hvbox( L ⊢ break term 46 T1 ⬌* break term 46 T2 )"
- non associative with precedence 45
- for @{ 'PConvStar $L $T1 $T2 }.
-
-notation "hvbox( h ⊢ break term 46 L1 • ⊑ break [ term 46 g ] break term 46 L2 )"
- non associative with precedence 45
- for @{ 'CrSubEqS $h $g $L1 $L2 }.
-
-notation "hvbox( L1 ⊢ ⬌* break term 46 L2 )"
- non associative with precedence 45
- for @{ 'PConvSnStar $L1 $L2 }.
-
-(* Dynamic typing ***********************************************************)
-
-notation "hvbox( ⦃ term 46 h , break term 46 L ⦄ ⊢ break term 46 T ¡ break [ term 46 g ] )"
- non associative with precedence 45
- for @{ 'NativeValid $h $g $L $T }.
-
-notation "hvbox( h ⊢ break term 46 L1 ¡ ⊑ break [ term 46 g ] break term 46 L2 )"
- non associative with precedence 45
- for @{ 'CrSubEqV $h $g $L1 $L2 }.
-
-notation "hvbox( h ⊢ break ⦃ term 46 L1, break term 46 T1 ⦄ ≽ break [ term 46 g ] break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
- non associative with precedence 45
- for @{ 'BTPRed $h $g $L1 $T1 $L2 $T2 }.
-
-notation "hvbox( h ⊢ break ⦃ term 46 L1, break term 46 T1 ⦄ ≻ break [ term 46 g ] break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
- non associative with precedence 45
- for @{ 'BTPRedProper $h $g $L1 $T1 $L2 $T2 }.
-
-notation "hvbox( h ⊢ break ⦃ term 46 L1, break term 46 T1 ⦄ ≥ break [ term 46 g ] break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
- non associative with precedence 45
- for @{ 'BTPRedStar $h $g $L1 $T1 $L2 $T2 }.
-
-notation "hvbox( h ⊢ break ⦃ term 46 L1, break term 46 T1 ⦄ > break [ term 46 g ] break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
- non associative with precedence 45
- for @{ 'BTPRedStarProper $h $g $L1 $T1 $L2 $T2 }.
-
-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 }.
-
-(* Higher order dynamic typing **********************************************)
-
-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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 @{ 'SnApplV $T1 $T }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 , break term 46 y } )"
+ non associative with precedence 90
+ for @{ 'Weight $x $y }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 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 @{ 'CrSubEqB $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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 T ⁝ break term 46 A )"
+ non associative with precedence 45
+ for @{ 'AtomicArity $L $T $A }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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( h ⊢ break ⦃ term 46 L1, break term 46 T1 ⦄ ≽ break [ term 46 g ] break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
+ non associative with precedence 45
+ for @{ 'BTPRed $h $g $L1 $T1 $L2 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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( h ⊢ break ⦃ term 46 L1, break term 46 T1 ⦄ ≻ break [ term 46 g ] break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
+ non associative with precedence 45
+ for @{ 'BTPRedProper $h $g $L1 $T1 $L2 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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( h ⊢ break ⦃ term 46 L1, break term 46 T1 ⦄ ≥ break [ term 46 g ] break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
+ non associative with precedence 45
+ for @{ 'BTPRedStar $h $g $L1 $T1 $L2 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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( h ⊢ break ⦃ term 46 L1, break term 46 T1 ⦄ > break [ term 46 g ] break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
+ non associative with precedence 45
+ for @{ 'BTPRedStarProper $h $g $L1 $T1 $L2 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 R ] break term 46 T2 )"
+ non associative with precedence 45
+ for @{ 'CrSubEq $T1 $R $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 @{ 'CrSubEqA $T1 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 @{ 'CrSubEqT $L1 $L2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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( h ⊢ break term 46 L1 ¡ ⊑ break [ term 46 g ] break term 46 L2 )"
+ non associative with precedence 45
+ for @{ 'CrSubEqV $h $g $L1 $L2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 L ⦄ ⊢ break term 46 T1 • * ➡ * break [ term 46 g ] break term 46 T2 )"
+ non associative with precedence 45
+ for @{ 'DPRedStar $h $g $L $T1 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 ⦄ ϵ break [ term 46 R ] break 〚term 46 A 〛 )"
+ non associative with precedence 45
+ for @{ 'InEInt $R $L $T $A }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 @{ 'Iso $T1 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 L ⦄ ⊢ break term 46 T ¡ break [ term 46 g ] )"
+ non associative with precedence 45
+ for @{ 'NativeValid $h $g $L $T }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 T ⦄ )"
+ non associative with precedence 45
+ for @{ 'Normal $L $T }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 L ⦄ ⊢ 𝐍 break [ term 46 g ] break ⦃ term 46 T ⦄ )"
+ non associative with precedence 45
+ for @{ 'Normal $h $g $L $T }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 T ⦄ )"
+ non associative with precedence 45
+ for @{ 'NotReducible $L $T }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 L ⦄ ⊢ 𝐈 break [ term 46 g ] break ⦃ term 46 T ⦄ )"
+ non associative with precedence 45
+ for @{ 'NotReducible $h $g $L $T }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 T1 ⬌ break term 46 T2 )"
+ non associative with precedence 45
+ for @{ 'PConv $L $T1 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 T1 ⬌* break term 46 T2 )"
+ non associative with precedence 45
+ for @{ 'PConvStar $L $T1 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 T1 ➡ * break 𝐍 ⦃ term 46 T2 ⦄ )"
+ non associative with precedence 45
+ for @{ 'PEval $L $T1 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 L ⦄ ⊢ break term 46 T1 ➡ * break [ term 46 g ] break 𝐍 ⦃ term 46 T2 ⦄ )"
+ non associative with precedence 45
+ for @{ 'PEval $h $g $L $T1 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 T1 ➡ break term 46 T2 )"
+ non associative with precedence 45
+ for @{ 'PRed $L $T1 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 L ⦄ ⊢ break term 46 T1 ➡ break [ term 46 g ] break term 46 T2 )"
+ non associative with precedence 45
+ for @{ 'PRed $h $g $L $T1 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 @{ 'PRedSn $L1 $L2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 L1 ⦄ ⊢ ➡ break [ term 46 g ] break term 46 L2 )"
+ non associative with precedence 45
+ for @{ 'PRedSn $h $g $L1 $L2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 @{ 'PRedSnStar $L1 $L2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 L1 ⦄ ⊢ ➡ * break [ term 46 g ] break term 46 L2 )"
+ non associative with precedence 45
+ for @{ 'PRedSnStar $h $g $L1 $L2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 @{ 'PRedSnStarAlt $L1 $L2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 L1 ⦄ ⊢ ➡ ➡ * break [ term 46 g ] break term 46 L2 )"
+ non associative with precedence 45
+ for @{ 'PRedSnStarAlt $h $g $L1 $L2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 T1 ➡ * break term 46 T2 )"
+ non associative with precedence 45
+ for @{ 'PRedStar $L $T1 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 L ⦄ ⊢ break term 46 T1 ➡ * break [ term 46 g ] break term 46 T2 )"
+ non associative with precedence 45
+ for @{ 'PRedStar $h $g $L $T1 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 e ] break term 46 L1 ≡ break term 46 L2 )"
+ non associative with precedence 45
+ for @{ 'RDrop $e $L1 $L2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 d , break term 46 e ] break term 46 L1 ≡ break term 46 L2 )"
+ non associative with precedence 45
+ for @{ 'RDrop $d $e $L1 $L2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 e ] break term 46 L1 ≡ break term 46 L2 )"
+ non associative with precedence 45
+ for @{ 'RDropStar $e $L1 $L2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 T ⦄ )"
+ non associative with precedence 45
+ for @{ 'Reducible $L $T }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 L ⦄ ⊢ 𝐑 break [ term 46 g ] break ⦃ term 46 T ⦄ )"
+ non associative with precedence 45
+ for @{ 'Reducible $h $g $L $T }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 d , break term 46 e ] break term 46 T1 ≡ break term 46 T2 )"
+ non associative with precedence 45
+ for @{ 'RLift $d $e $T1 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 e ] break term 46 T1 ≡ break term 46 T2 )"
+ non associative with precedence 45
+ for @{ 'RLiftStar $e $T1 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 L ⦄ ⊢ ⬊ * break [ term 46 g ] break term 46 T )"
+ non associative with precedence 45
+ for @{ 'SN $h $g $L $T }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 L ⦄ ⊢ ⬊ ⬊ * break [ term 46 g ] break term 46 T )"
+ non associative with precedence 45
+ for @{ 'SNAlt $h $g $L $T }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 L ⦄ ⊢ break term 46 T1 • break [ term 46 g ] break ⦃ term 46 l , break term 46 T2 ⦄ )"
+ non associative with precedence 45
+ for @{ 'StaticType $h $g $L $T1 $T2 $l }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 L ⦄ ⊢ break term 46 T1 •* break [ term 46 g ] break term 46 T2 )"
+ non associative with precedence 45
+ for @{ 'StaticTypeStar $h $g $L $T1 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 L1, break term 46 T1 ⦄ ⊃ break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
+ non associative with precedence 45
+ for @{ 'SupTerm $L1 $T1 $L2 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 L1, break term 46 T1 ⦄ ⊃⸮ break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
+ non associative with precedence 45
+ for @{ 'SupTermOpt $L1 $T1 $L2 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 L1, break term 46 T1 ⦄ ⊃⊃⸮ break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
+ non associative with precedence 45
+ for @{ 'SupTermOptAlt $L1 $T1 $L2 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 L1, break term 46 T1 ⦄ ⊃ + break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
+ non associative with precedence 45
+ for @{ 'SupTermPlus $L1 $T1 $L2 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 L1, break term 46 T1 ⦄ ⊃ * break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
+ non associative with precedence 45
+ for @{ 'SupTermStar $L1 $T1 $L2 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The 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 L2 )"
+ non associative with precedence 45
+ for @{ 'Unfold $L1 $T $L2 }.
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/notreducible_2.ma".
include "basic_2/reduction/crr.ma".
(* CONTEXT-SENSITIVE IRREDUCIBLE TERMS **************************************)
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/notreducible_4.ma".
include "basic_2/reduction/cir.ma".
include "basic_2/reduction/crx.ma".
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/normal_2.ma".
include "basic_2/reduction/cpr.ma".
(* CONTEXT-SENSITIVE NORMAL TERMS *******************************************)
lapply (H U ?) -H /2 width=3/ #H destruct
elim (lift_inv_pair_xy_y … HTU)
| #HT
- elim (cpss_delift (⋆) V T (⋆. ⓓV) 0 ?) // #T2 #T1 #HT2 #HT12
+ elim (cpr_delift (⋆) V T (⋆. ⓓV) 0) // #T2 #T1 #HT2 #HT12
lapply (H (+ⓓV.T2) ?) -H /4 width=1/ -HT2 #H destruct /3 width=2/
]
qed-.
| 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/ -HV12 #H destruct
- | lapply (H (ⓓ{a}V1.U1) ?) -H /3 width=1/ #H destruct
+ | lapply (H (ⓓ{a}ⓝW1.V1.U1) ?) -H /3 width=1/ #H destruct
]
qed-.
qed.
(* Basic_1: was: nf2_abst *)
-lemma cnr_abst: ∀a,I,L,V,W,T. L ⊢ 𝐍⦃W⦄ → L. ⓑ{I} V ⊢ 𝐍⦃T⦄ → L ⊢ 𝐍⦃ⓛ{a}W.T⦄.
-#a #I #L #V #W #T #HW #HT #X #H
-elim (cpr_fwd_abst1 … H I V) -H #W0 #T0 #HW0 #HT0 #H destruct
+lemma cnr_abst: ∀a,L,W,T. L ⊢ 𝐍⦃W⦄ → L.ⓛW ⊢ 𝐍⦃T⦄ → L ⊢ 𝐍⦃ⓛ{a}W.T⦄.
+#a #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: ∀L,V,T. L ⊢ 𝐍⦃V⦄ → L ⊢ 𝐍⦃T⦄ → 𝐒⦃T⦄ → L ⊢ 𝐍⦃ⓐV.T⦄.
#L #V #T #HV #HT #HS #X #H
-elim (cpr_inv_appl1_simple … H ?) -H // #V0 #T0 #HV0 #HT0 #H destruct
+elim (cpr_inv_appl1_simple … H) -H // #V0 #T0 #HV0 #HT0 #H destruct
>(HV … HV0) -V0 >(HT … HT0) -T0 //
qed.
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/normal_4.ma".
include "basic_2/reduction/cnr.ma".
include "basic_2/reduction/cpx.ma".
]
qed-.
-axiom cnx_inv_zeta: ∀h,g,L,V,T. ⦃h, L⦄ ⊢ 𝐍[g]⦃+ⓓV.T⦄ → ⊥.
-(*
+lemma cnx_inv_zeta: ∀h,g,L,V,T. ⦃h, L⦄ ⊢ 𝐍[g]⦃+ⓓV.T⦄ → ⊥.
#h #g #L #V #T #H elim (is_lift_dec T 0 1)
[ * #U #HTU
lapply (H U ?) -H /2 width=3/ #H destruct
elim (lift_inv_pair_xy_y … HTU)
| #HT
- elim (cpss_delift (⋆) V T (⋆. ⓓV) 0 ?) // #T2 #T1 #HT2 #HT12
+ elim (cpr_delift (⋆) V T (⋆.ⓓV) 0) // #T2 #T1 #HT2 #HT12
lapply (H (+ⓓV.T2) ?) -H /5 width=1/ -HT2 #H destruct /3 width=2/
]
qed-.
-*)
+
lemma cnx_inv_appl: ∀h,g,L,V,T. ⦃h, L⦄ ⊢ 𝐍[g]⦃ⓐV.T⦄ →
∧∧ ⦃h, L⦄ ⊢ 𝐍[g]⦃V⦄ & ⦃h, L⦄ ⊢ 𝐍[g]⦃T⦄ & 𝐒⦃T⦄.
#h #g #L #V1 #T1 #HVT1 @and3_intro
qed-.
(* Basic forward lemmas *****************************************************)
-(*
-lamma cnx_fwd_cnr: ∀h,g,L,T. ⦃h, L⦄ ⊢ 𝐍[g]⦃T⦄ → L ⊢ 𝐍⦃T⦄.
+
+lemma cnx_fwd_cnr: ∀h,g,L,T. ⦃h, L⦄ ⊢ 𝐍[g]⦃T⦄ → L ⊢ 𝐍⦃T⦄.
#h #g #L #T #H #U #HTU
@H /2 width=1/ (**) (* auto fails because a δ-expansion gets in the way *)
qed-.
-*)
+
(* Basic properties *********************************************************)
lemma cnx_sort: ∀h,g,L,k. deg h g k 0 → ⦃h, L⦄ ⊢ 𝐍[g]⦃⋆k⦄.
lemma cnx_appl_simple: ∀h,g,L,V,T. ⦃h, L⦄ ⊢ 𝐍[g]⦃V⦄ → ⦃h, L⦄ ⊢ 𝐍[g]⦃T⦄ → 𝐒⦃T⦄ →
⦃h, L⦄ ⊢ 𝐍[g]⦃ⓐV.T⦄.
#h #g #L #V #T #HV #HT #HS #X #H
-elim (cpx_inv_appl1_simple … H ?) -H // #V0 #T0 #HV0 #HT0 #H destruct
+elim (cpx_inv_appl1_simple … H) -H // #V0 #T0 #HV0 #HT0 #H destruct
>(HV … HV0) -V0 >(HT … HT0) -T0 //
qed.
(* *)
(**************************************************************************)
-include "basic_2/unfold/cpqs.ma".
+include "basic_2/notation/relations/pred_3.ma".
+include "basic_2/grammar/cl_shift.ma".
+include "basic_2/relocation/ldrop_append.ma".
+include "basic_2/reduction/lsubx.ma".
(* CONTEXT-SENSITIVE PARALLEL REDUCTION FOR TERMS ***************************)
⇩[0, i] L ≡ K. ⓓV → cpr K V V2 →
⇧[0, i + 1] V2 ≡ W2 → cpr L (#i) W2
| cpr_bind : ∀a,I,L,V1,V2,T1,T2.
- cpr L V1 V2 → cpr (L. ⓑ{I} V1) T1 T2 →
- cpr L (ⓑ{a,I} V1. T1) (ⓑ{a,I} V2. T2)
+ cpr L V1 V2 → cpr (L.ⓑ{I}V1) T1 T2 →
+ cpr L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2)
| cpr_flat : ∀I,L,V1,V2,T1,T2.
cpr L V1 V2 → cpr L T1 T2 →
- cpr L (ⓕ{I} V1. T1) (ⓕ{I} V2. T2)
+ cpr L (ⓕ{I} V1. T1) (ⓕ{I}V2.T2)
| cpr_zeta : ∀L,V,T1,T,T2. cpr (L.ⓓV) T1 T →
- ⇧[0, 1] T2 ≡ T → cpr L (+ⓓV. T1) T2
-| cpr_tau : ∀L,V,T1,T2. cpr L T1 T2 → cpr L (ⓝV. T1) T2
-| cpr_beta : ∀a,L,V1,V2,W,T1,T2.
- cpr L V1 V2 → cpr (L.ⓛW) T1 T2 →
- cpr L (ⓐV1. ⓛ{a}W. T1) (ⓓ{a}V2. T2)
+ ⇧[0, 1] T2 ≡ T → cpr L (+ⓓV.T1) T2
+| cpr_tau : ∀L,V,T1,T2. cpr L T1 T2 → cpr L (ⓝV.T1) T2
+| cpr_beta : ∀a,L,V1,V2,W1,W2,T1,T2.
+ cpr L V1 V2 → cpr L W1 W2 → cpr (L.ⓛW1) T1 T2 →
+ cpr L (ⓐV1.ⓛ{a}W1.T1) (ⓓ{a}ⓝW2.V2.T2)
| cpr_theta: ∀a,L,V1,V,V2,W1,W2,T1,T2.
cpr L V1 V → ⇧[0, 1] V ≡ V2 → cpr L W1 W2 → cpr (L.ⓓW1) T1 T2 →
- cpr L (ⓐV1. ⓓ{a}W1. T1) (ⓓ{a}W2. ⓐV2. T2)
+ cpr L (ⓐV1.ⓓ{a}W1.T1) (ⓓ{a}W2.ⓐV2.T2)
.
interpretation "context-sensitive parallel reduction (term)"
(* Basic properties *********************************************************)
-lemma cpr_lsubr_trans: lsub_trans … cpr lsubr.
+lemma lsubx_cpr_trans: lsub_trans … cpr lsubx.
#L1 #T1 #T2 #H elim H -L1 -T1 -T2
[ //
| #L1 #K1 #V1 #V2 #W2 #i #HLK1 #_ #HVW2 #IHV12 #L2 #HL12
- elim (lsubr_fwd_ldrop2_abbr … HL12 … HLK1) -HL12 -HLK1 /3 width=6/
+ elim (lsubx_fwd_ldrop2_abbr … HL12 … HLK1) -L1 * /3 width=6/
|3,7: /4 width=1/
|4,6: /3 width=1/
|5,8: /4 width=3/
(* Basic_1: was by definition: pr2_free *)
lemma tpr_cpr: ∀T1,T2. ⋆ ⊢ T1 ➡ T2 → ∀L. L ⊢ T1 ➡ T2.
#T1 #T2 #HT12 #L
-lapply (cpr_lsubr_trans … HT12 L ?) //
+lapply (lsubx_cpr_trans … HT12 L ?) //
qed.
-lemma cpqs_cpr: ∀L,T1,T2. L ⊢ T1 ➤* T2 → L ⊢ T1 ➡ T2.
-#L #T1 #T2 #H elim H -L -T1 -T2 // /2 width=1/ /2 width=6/
-qed.
-
-lemma cpss_cpr: ∀L,T1,T2. L ⊢ T1 ▶* T2 → L ⊢ T1 ➡ T2.
-/3 width=1/ qed.
-
(* Basic_1: includes by definition: pr0_refl *)
lemma cpr_refl: ∀T,L. L ⊢ T ➡ T.
-/2 width=1/ qed.
+#T elim T -T // * /2 width=1/
+qed.
(* Basic_1: was: pr2_head_1 *)
lemma cpr_pair_sn: ∀I,L,V1,V2. L ⊢ V1 ➡ V2 →
∀T. L ⊢ ②{I}V1.T ➡ ②{I}V2.T.
* /2 width=1/ qed.
-lemma cpr_delift: ∀L,K,V,T1,d. ⇩[0, d] L ≡ (K. ⓓV) →
+lemma cpr_delift: ∀K,V,T1,L,d. ⇩[0, d] L ≡ (K.ⓓV) →
∃∃T2,T. L ⊢ T1 ➡ T2 & ⇧[d, 1] T ≡ T2.
-#L #K #V #T1 #d #HLK
-elim (cpqs_delift … T1 … HLK) -HLK /3 width=4/
+#K #V #T1 elim T1 -T1
+[ * #i #L #d #HLK /2 width=4/
+ elim (lt_or_eq_or_gt i d) #Hid [1,3: /3 width=4/ ]
+ destruct
+ elim (lift_total V 0 (i+1)) #W #HVW
+ elim (lift_split … HVW i i) // /3 width=6/
+| * [ #a ] #I #W1 #U1 #IHW1 #IHU1 #L #d #HLK
+ elim (IHW1 … HLK) -IHW1 #W2 #W #HW12 #HW2
+ [ elim (IHU1 (L. ⓑ{I}W1) (d+1)) -IHU1 /2 width=1/ -HLK /3 width=9/
+ | elim (IHU1 … HLK) -IHU1 -HLK /3 width=8/
+ ]
+]
qed-.
lemma cpr_append: l_appendable_sn … cpr.
@(ldrop_O1_append_sn_le … HK0) /2 width=2/ (**) (* /3/ does not work *)
qed.
-lemma cpr_ext_bind: ∀L,V1,V2. L ⊢ V1 ➡ V2 → ∀V,T1,T2. L.ⓛV ⊢ T1 ➡ T2 →
- ∀a,I. L ⊢ ⓑ{a,I}V1. T1 ➡ ⓑ{a,I}V2. T2.
-#L #V1 #V2 #HV12 #V #T1 #T2 #HT12 #a #I
-lapply (cpr_lsubr_trans … HT12 (L.ⓑ{I}V1) ?) -HT12 /2 width=1/
-qed.
-
(* Basic inversion lemmas ***************************************************)
fact cpr_inv_atom1_aux: ∀L,T1,T2. L ⊢ T1 ➡ T2 → ∀I. T1 = ⓪{I} →
| #I #L #V1 #V2 #T1 #T2 #_ #_ #J #H destruct
| #L #V #T1 #T #T2 #_ #_ #J #H destruct
| #L #V #T1 #T2 #_ #J #H destruct
-| #a #L #V1 #V2 #W #T1 #T2 #_ #_ #J #H destruct
+| #a #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #J #H destruct
| #a #L #V1 #V #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #J #H destruct
]
qed-.
qed-.
fact cpr_inv_bind1_aux: ∀L,U1,U2. L ⊢ U1 ➡ U2 →
- ∀a,I,V1,T1. U1 = ⓑ{a,I} V1. T1 → (
+ ∀a,I,V1,T1. U1 = ⓑ{a,I}V1. T1 → (
∃∃V2,T2. L ⊢ V1 ➡ V2 &
- L. ⓑ{I} V1 ⊢ T1 ➡ T2 &
- U2 = ⓑ{a,I} V2. T2
+ L. ⓑ{I}V1 ⊢ T1 ➡ T2 &
+ U2 = ⓑ{a,I}V2.T2
) ∨
∃∃T. L.ⓓV1 ⊢ T1 ➡ T & ⇧[0, 1] U2 ≡ T & a = true & I = Abbr.
#L #U1 #U2 * -L -U1 -U2
[ #I #L #b #J #W1 #U1 #H destruct
-| #L #K #V #V2 #W2 #i #_ #_ #_ #b #J #W1 #U1 #H destruct
-| #a #I #L #V1 #V2 #T1 #T2 #HV12 #HT12 #b #J #W1 #U1 #H destruct /3 width=5/
-| #I #L #V1 #V2 #T1 #T2 #_ #_ #b #J #W1 #U1 #H destruct
-| #L #V #T1 #T #T2 #HT1 #HT2 #b #J #W1 #U1 #H destruct /3 width=3/
-| #L #V #T1 #T2 #_ #b #J #W1 #U1 #H destruct
-| #a #L #V1 #V2 #W #T1 #T2 #_ #_ #b #J #W1 #U1 #H destruct
-| #a #L #V1 #V #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #b #J #W1 #U1 #H destruct
+| #L #K #V #V2 #W2 #i #_ #_ #_ #b #J #W #U1 #H destruct
+| #a #I #L #V1 #V2 #T1 #T2 #HV12 #HT12 #b #J #W #U1 #H destruct /3 width=5/
+| #I #L #V1 #V2 #T1 #T2 #_ #_ #b #J #W #U1 #H destruct
+| #L #V #T1 #T #T2 #HT1 #HT2 #b #J #W #U1 #H destruct /3 width=3/
+| #L #V #T1 #T2 #_ #b #J #W #U1 #H destruct
+| #a #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #b #J #W #U1 #H destruct
+| #a #L #V1 #V #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #b #J #W #U1 #H destruct
]
qed-.
-lemma cpr_inv_bind1: ∀a,I,L,V1,T1,U2. L ⊢ ⓑ{a,I} V1. T1 ➡ U2 → (
+lemma cpr_inv_bind1: ∀a,I,L,V1,T1,U2. L ⊢ ⓑ{a,I}V1.T1 ➡ U2 → (
∃∃V2,T2. L ⊢ V1 ➡ V2 &
- L. ⓑ{I} V1 ⊢ T1 ➡ T2 &
- U2 = ⓑ{a,I} V2. T2
+ L. ⓑ{I}V1 ⊢ T1 ➡ T2 &
+ U2 = ⓑ{a,I}V2.T2
) ∨
∃∃T. L.ⓓV1 ⊢ T1 ➡ T & ⇧[0, 1] U2 ≡ T & a = true & I = Abbr.
/2 width=3 by cpr_inv_bind1_aux/ qed-.
(* Basic_1: includes: pr0_gen_abbr pr2_gen_abbr *)
-lemma cpr_inv_abbr1: ∀a,L,V1,T1,U2. L ⊢ ⓓ{a} V1. T1 ➡ U2 → (
+lemma cpr_inv_abbr1: ∀a,L,V1,T1,U2. L ⊢ ⓓ{a}V1.T1 ➡ U2 → (
∃∃V2,T2. L ⊢ V1 ➡ V2 &
- L. ⓓ V1 ⊢ T1 ➡ T2 &
- U2 = ⓓ{a} V2. T2
+ L. ⓓV1 ⊢ T1 ➡ T2 &
+ U2 = ⓓ{a}V2.T2
) ∨
∃∃T. L.ⓓV1 ⊢ T1 ➡ T & ⇧[0, 1] U2 ≡ T & a = true.
#a #L #V1 #T1 #U2 #H
qed-.
(* Basic_1: includes: pr0_gen_abst pr2_gen_abst *)
-lemma cpr_inv_abst1: ∀a,L,V1,T1,U2. L ⊢ ⓛ{a} V1. T1 ➡ U2 →
- ∃∃V2,T2. L ⊢ V1 ➡ V2 & L. ⓛ V1 ⊢ T1 ➡ T2 &
- U2 = ⓛ{a} V2. T2.
+lemma cpr_inv_abst1: ∀a,L,V1,T1,U2. L ⊢ ⓛ{a}V1.T1 ➡ U2 →
+ ∃∃V2,T2. L ⊢ V1 ➡ V2 & L.ⓛV1 ⊢ T1 ➡ T2 &
+ U2 = ⓛ{a}V2.T2.
#a #L #V1 #T1 #U2 #H
elim (cpr_inv_bind1 … H) -H *
[ /3 width=5/
qed-.
fact cpr_inv_flat1_aux: ∀L,U,U2. L ⊢ U ➡ U2 →
- ∀I,V1,U1. U = ⓕ{I} V1. U1 →
+ ∀I,V1,U1. U = ⓕ{I}V1.U1 →
∨∨ ∃∃V2,T2. L ⊢ V1 ➡ V2 & L ⊢ U1 ➡ T2 &
U2 = ⓕ{I} V2. T2
| (L ⊢ U1 ➡ U2 ∧ I = Cast)
- | ∃∃a,V2,W,T1,T2. L ⊢ V1 ➡ V2 & L.ⓛW ⊢ T1 ➡ T2 &
- U1 = ⓛ{a}W. T1 &
- U2 = ⓓ{a}V2. T2 & I = Appl
+ | ∃∃a,V2,W1,W2,T1,T2. L ⊢ V1 ➡ V2 & L ⊢ W1 ➡ W2 &
+ L.ⓛW1 ⊢ T1 ➡ T2 & U1 = ⓛ{a}W1.T1 &
+ U2 = ⓓ{a}ⓝW2.V2.T2 & I = Appl
| ∃∃a,V,V2,W1,W2,T1,T2. L ⊢ V1 ➡ V & ⇧[0,1] V ≡ V2 &
L ⊢ W1 ➡ W2 & L.ⓓW1 ⊢ T1 ➡ T2 &
- U1 = ⓓ{a}W1. T1 &
- U2 = ⓓ{a}W2. ⓐV2. T2 & I = Appl.
+ U1 = ⓓ{a}W1.T1 &
+ U2 = ⓓ{a}W2.ⓐV2.T2 & I = Appl.
#L #U #U2 * -L -U -U2
[ #I #L #J #W1 #U1 #H destruct
-| #L #K #V #V2 #W2 #i #_ #_ #_ #J #W1 #U1 #H destruct
-| #a #I #L #V1 #V2 #T1 #T2 #_ #_ #J #W1 #U1 #H destruct
-| #I #L #V1 #V2 #T1 #T2 #HV12 #HT12 #J #W1 #U1 #H destruct /3 width=5/
-| #L #V #T1 #T #T2 #_ #_ #J #W1 #U1 #H destruct
-| #L #V #T1 #T2 #HT12 #J #W1 #U1 #H destruct /3 width=1/
-| #a #L #V1 #V2 #W #T1 #T2 #HV12 #HT12 #J #W1 #U1 #H destruct /3 width=9/
-| #a #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 #HW12 #HT12 #J #W1 #U1 #H destruct /3 width=13/
+| #L #K #V #V2 #W2 #i #_ #_ #_ #J #W #U1 #H destruct
+| #a #I #L #V1 #V2 #T1 #T2 #_ #_ #J #W #U1 #H destruct
+| #I #L #V1 #V2 #T1 #T2 #HV12 #HT12 #J #W #U1 #H destruct /3 width=5/
+| #L #V #T1 #T #T2 #_ #_ #J #W #U1 #H destruct
+| #L #V #T1 #T2 #HT12 #J #W #U1 #H destruct /3 width=1/
+| #a #L #V1 #V2 #W1 #W2 #T1 #T2 #HV12 #HW12 #HT12 #J #W #U1 #H destruct /3 width=11/
+| #a #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 #HW12 #HT12 #J #W #U1 #H destruct /3 width=13/
]
qed-.
-lemma cpr_inv_flat1: ∀I,L,V1,U1,U2. L ⊢ ⓕ{I} V1. U1 ➡ U2 →
+lemma cpr_inv_flat1: ∀I,L,V1,U1,U2. L ⊢ ⓕ{I}V1.U1 ➡ U2 →
∨∨ ∃∃V2,T2. L ⊢ V1 ➡ V2 & L ⊢ U1 ➡ T2 &
- U2 = ⓕ{I} V2. T2
+ U2 = ⓕ{I}V2.T2
| (L ⊢ U1 ➡ U2 ∧ I = Cast)
- | ∃∃a,V2,W,T1,T2. L ⊢ V1 ➡ V2 & L.ⓛW ⊢ T1 ➡ T2 &
- U1 = ⓛ{a}W. T1 &
- U2 = ⓓ{a}V2. T2 & I = Appl
+ | ∃∃a,V2,W1,W2,T1,T2. L ⊢ V1 ➡ V2 & L ⊢ W1 ➡ W2 &
+ L.ⓛW1 ⊢ T1 ➡ T2 & U1 = ⓛ{a}W1.T1 &
+ U2 = ⓓ{a}ⓝW2.V2.T2 & I = Appl
| ∃∃a,V,V2,W1,W2,T1,T2. L ⊢ V1 ➡ V & ⇧[0,1] V ≡ V2 &
L ⊢ W1 ➡ W2 & L.ⓓW1 ⊢ T1 ➡ T2 &
- U1 = ⓓ{a}W1. T1 &
- U2 = ⓓ{a}W2. ⓐV2. T2 & I = Appl.
+ U1 = ⓓ{a}W1.T1 &
+ U2 = ⓓ{a}W2.ⓐV2.T2 & I = Appl.
/2 width=3 by cpr_inv_flat1_aux/ qed-.
(* Basic_1: includes: pr0_gen_appl pr2_gen_appl *)
-lemma cpr_inv_appl1: ∀L,V1,U1,U2. L ⊢ ⓐ V1. U1 ➡ U2 →
+lemma cpr_inv_appl1: ∀L,V1,U1,U2. L ⊢ ⓐV1.U1 ➡ U2 →
∨∨ ∃∃V2,T2. L ⊢ V1 ➡ V2 & L ⊢ U1 ➡ T2 &
- U2 = ⓐ V2. T2
- | ∃∃a,V2,W,T1,T2. L ⊢ V1 ➡ V2 & L.ⓛW ⊢ T1 ➡ T2 &
- U1 = ⓛ{a}W. T1 & U2 = ⓓ{a}V2. T2
+ U2 = ⓐV2.T2
+ | ∃∃a,V2,W1,W2,T1,T2. L ⊢ V1 ➡ V2 & L ⊢ W1 ➡ W2 &
+ L.ⓛW1 ⊢ T1 ➡ T2 &
+ U1 = ⓛ{a}W1.T1 & U2 = ⓓ{a}ⓝW2.V2.T2
| ∃∃a,V,V2,W1,W2,T1,T2. L ⊢ V1 ➡ V & ⇧[0,1] V ≡ V2 &
L ⊢ W1 ➡ W2 & L.ⓓW1 ⊢ T1 ➡ T2 &
- U1 = ⓓ{a}W1. T1 & U2 = ⓓ{a}W2. ⓐV2. T2.
+ U1 = ⓓ{a}W1.T1 & U2 = ⓓ{a}W2.ⓐV2.T2.
#L #V1 #U1 #U2 #H elim (cpr_inv_flat1 … H) -H *
[ /3 width=5/
| #_ #H destruct
-| /3 width=9/
+| /3 width=11/
| /3 width=13/
]
qed-.
#L #V1 #T1 #U #H #HT1
elim (cpr_inv_appl1 … H) -H *
[ /2 width=5/
-| #a #V2 #W #U1 #U2 #_ #_ #H #_ destruct
+| #a #V2 #W1 #W2 #U1 #U2 #_ #_ #_ #H #_ destruct
elim (simple_inv_bind … HT1)
| #a #V #V2 #W1 #W2 #U1 #U2 #_ #_ #_ #_ #H #_ destruct
elim (simple_inv_bind … HT1)
#L #V1 #U1 #U2 #H elim (cpr_inv_flat1 … H) -H *
[ /3 width=5/
| /2 width=1/
-| #a #V2 #W #T1 #T2 #_ #_ #_ #_ #H destruct
+| #a #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #H destruct
| #a #V #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #H destruct
]
qed-.
(* Basic forward lemmas *****************************************************)
-lemma cpr_fwd_abst1: ∀a,L,V1,T1,U2. L ⊢ ⓛ{a}V1.T1 ➡ U2 → ∀I,W.
- ∃∃V2,T2. L ⊢ V1 ➡ V2 & L. ⓑ{I} W ⊢ T1 ➡ T2 &
- U2 = ⓛ{a} V2. T2.
-#a #L #V1 #T1 #U2 #H #I #W
-elim (cpr_inv_abst1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
-lapply (cpr_lsubr_trans … HT12 (L.ⓑ{I}W) ?) -HT12 /2 width=1/ /2 width=5/
-qed-.
-
-
-lemma cpr_fwd_ext_abst1: ∀a,L,V1,T1,U2. L ⊢ ⓛ{a}V1.T1 ➡ U2 → ∀b,I,W.
- ∃∃V2,T2. L ⊢ V1 ➡ V2 & L ⊢ ⓑ{b,I}W.T1 ➡ ⓑ{b,I}W.T2 &
- U2 = ⓛ{a}V2.T2.
-#a #L #V1 #T1 #U2 #H #b #I #W
-elim (cpr_fwd_abst1 … H I W) -H /3 width=5/
-qed-.
-
lemma cpr_fwd_bind1_minus: ∀I,L,V1,T1,T. L ⊢ -ⓑ{I}V1.T1 ➡ T → ∀b.
∃∃V2,T2. L ⊢ ⓑ{b,I}V1.T1 ➡ ⓑ{b,I}V2.T2 &
T = -ⓑ{I}V2.T2.
elim (cir_inv_ri2 … H) /2 width=1/
| #L #V1 #T1 #T2 #_ #_ #H
elim (cir_inv_ri2 … H) /2 width=1/
-| #a #L #V1 #V2 #W #T1 #T2 #_ #_ #_ #_ #H
+| #a #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #H
elim (cir_inv_appl … H) -H #_ #_ #H
elim (simple_inv_bind … H)
| #a #L #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #_ #H
elim (simple_inv_bind … H)
]
qed-.
-
-lemma cpss_fwd_cir_eq: ∀L,T1,T2. L ⊢ T1 ▶* T2 → L ⊢ 𝐈⦃T1⦄ → T2 = T1.
-/3 width=3 by cpr_fwd_cir, cpss_cpr/ qed-.
elim (lift_conf_O1 … HTU2 … HT2) -T2 /4 width=5/
| #K #V #T1 #T2 #_ #IHT12 #L #d #e #HLK #U1 #H #U2 #HTU2
elim (lift_inv_flat1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct /3 width=5/
-| #a #K #V1 #V2 #W #T1 #T2 #_ #_ #IHV12 #IHT12 #L #d #e #HLK #X1 #HX1 #X2 #HX2
+| #a #K #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #L #d #e #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 #V3 #T3 #HV23 #HT23 #HX2 destruct /4 width=5/
+ 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=5/
| #a #K #V1 #V #V2 #W1 #W2 #T1 #T2 #_ #HV2 #_ #_ #IHV1 #IHW12 #IHT12 #L #d #e #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=5/
+ elim (lift_trans_ge … HV2 … HV3) -V2 // /4 width=5/
]
qed.
| #L #V #U1 #U2 #_ #IHU12 #K #d #e #HLK #X #H
elim (lift_inv_flat2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
elim (IHU12 … HLK … HTU1) -L -U1 /3 width=3/
-| #a #L #V1 #V2 #W #T1 #T2 #_ #_ #IHV12 #IHT12 #K #d #e #HLK #X #HX
+| #a #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #K #d #e #HLK #X #HX
elim (lift_inv_flat2 … HX) -HX #V0 #Y #HV01 #HY #HX destruct
elim (lift_inv_bind2 … HY) -HY #W0 #T0 #HW01 #HT01 #HY destruct
- elim (IHV12 … HLK … HV01) -V1
- elim (IHT12 (K.ⓛW0) … HT01) -T1 /2 width=1/ /3 width=5/
+ elim (IHV12 … HLK … HV01) -V1 #V3 #HV32 #HV03
+ elim (IHT12 (K.ⓛW0) … HT01) -T1 /2 width=1/ #T3 #HT32 #HT03
+ elim (IHW12 … HLK … HW01) -W1 #W3 #HW32 #HW03
+ @ex2_intro [2: /3 width=2/ | skip |3: /2 width=1/ ] (**) (* /4 width=6/ is slow *)
| #a #L #V1 #V #V2 #W1 #W2 #T1 #T2 #_ #HV2 #_ #_ #IHV1 #IHW12 #IHT12 #K #d #e #HLK #X #HX
elim (lift_inv_flat2 … HX) -HX #V0 #Y #HV01 #HY #HX destruct
elim (lift_inv_bind2 … HY) -HY #W0 #T0 #HW01 #HT01 #HY destruct
elim (IHV1 … HLK … HV01) -V1 #V3 #HV3 #HV03
elim (IHT12 (K.ⓓW0) … HT01) -T1 /2 width=1/ #T3 #HT32 #HT03
elim (IHW12 … HLK … HW01) -W1 #W3 #HW32 #HW03
- elim (lift_trans_le … HV3 … HV2 ?) -V // #V #HV3 #HV2
+ elim (lift_trans_le … HV3 … HV2) -V // #V #HV3 #HV2
@ex2_intro [2: /3 width=2/ | skip |3: /2 width=3/ ] (**) (* /4 width=5/ is slow *)
]
qed-.
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/pred_5.ma".
include "basic_2/static/ssta.ma".
include "basic_2/reduction/cpr.ma".
-include "basic_2/reduction/lsubx.ma".
(* CONTEXT-SENSITIVE EXTENDED PARALLEL REDUCTION FOR TERMS ******************)
lemma cpx_refl: ∀h,g,T,L. ⦃h, L⦄ ⊢ T ➡[g] T.
#h #g #T elim T -T // * /2 width=1/
qed.
-(*
-lamma cpr_cpx: ∀h,g,L,T1,T2. L ⊢ T1 ➡ T2 → ⦃h, L⦄ ⊢ T1 ➡[g] T2.
+
+lemma cpr_cpx: ∀h,g,L,T1,T2. L ⊢ T1 ➡ T2 → ⦃h, L⦄ ⊢ T1 ➡[g] T2.
#h #g #L #T1 #T2 #H elim H -L -T1 -T2 // /2 width=1/ /2 width=3/ /2 width=7/
qed.
-*)
+
fact ssta_cpx_aux: ∀h,g,L,T1,T2,l0. ⦃h, L⦄ ⊢ T1 •[g] ⦃l0, T2⦄ →
∀l. l0 = l+1 → ⦃h, L⦄ ⊢ T1 ➡[g] T2.
#h #g #L #T1 #T2 #l0 #H elim H -L -T1 -T2 -l0 /2 width=2/ /2 width=7/ /3 width=2/ /3 width=7/
qed-.
fact cpx_inv_bind1_aux: ∀h,g,L,U1,U2. ⦃h, L⦄ ⊢ U1 ➡[g] U2 →
- ∀a,J,V1,T1. U1 = ⓑ{a,J} V1. T1 → (
+ ∀a,J,V1,T1. U1 = ⓑ{a,J}V1.T1 → (
∃∃V2,T2. ⦃h, L⦄ ⊢ V1 ➡[g] V2 & ⦃h, L.ⓑ{J}V1⦄ ⊢ T1 ➡[g] T2 &
- U2 = ⓑ{a,J} V2. T2
+ U2 = ⓑ{a,J}V2.T2
) ∨
∃∃T. ⦃h, L.ⓓV1⦄ ⊢ T1 ➡[g] T & ⇧[0, 1] U2 ≡ T &
a = true & J = Abbr.
#h #g #L #U1 #U2 * -L -U1 -U2
-[ #I #L #b #J #W1 #U1 #H destruct
-| #L #k #l #_ #b #J #W1 #U1 #H destruct
-| #I #L #K #V #V2 #W2 #i #_ #_ #_ #b #J #W1 #U1 #H destruct
-| #a #I #L #V1 #V2 #T1 #T2 #HV12 #HT12 #b #J #W1 #U1 #H destruct /3 width=5/
-| #I #L #V1 #V2 #T1 #T2 #_ #_ #b #J #W1 #U1 #H destruct
-| #L #V #T1 #T #T2 #HT1 #HT2 #b #J #W1 #U1 #H destruct /3 width=3/
-| #L #V #T1 #T2 #_ #b #J #W1 #U1 #H destruct
-| #L #V1 #V2 #T #_ #b #J #W1 #U1 #H destruct
-| #a #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #b #J #W1 #U1 #H destruct
-| #a #L #V1 #V #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #b #J #W1 #U1 #H destruct
+[ #I #L #b #J #W #U1 #H destruct
+| #L #k #l #_ #b #J #W #U1 #H destruct
+| #I #L #K #V #V2 #W2 #i #_ #_ #_ #b #J #W #U1 #H destruct
+| #a #I #L #V1 #V2 #T1 #T2 #HV12 #HT12 #b #J #W #U1 #H destruct /3 width=5/
+| #I #L #V1 #V2 #T1 #T2 #_ #_ #b #J #W #U1 #H destruct
+| #L #V #T1 #T #T2 #HT1 #HT2 #b #J #W #U1 #H destruct /3 width=3/
+| #L #V #T1 #T2 #_ #b #J #W #U1 #H destruct
+| #L #V1 #V2 #T #_ #b #J #W #U1 #H destruct
+| #a #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #b #J #W #U1 #H destruct
+| #a #L #V1 #V #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #b #J #W #U1 #H destruct
]
qed-.
/2 width=3 by cpx_inv_bind1_aux/ qed-.
lemma cpx_inv_abbr1: ∀h,g,a,L,V1,T1,U2. ⦃h, L⦄ ⊢ ⓓ{a}V1.T1 ➡[g] U2 → (
- ∃∃V2,T2. ⦃h, L⦄ ⊢ V1 ➡[g] V2 & ⦃h, L.ⓓ V1⦄ ⊢ T1 ➡[g] T2 &
+ ∃∃V2,T2. ⦃h, L⦄ ⊢ V1 ➡[g] V2 & ⦃h, L.ⓓV1⦄ ⊢ T1 ➡[g] T2 &
U2 = ⓓ{a} V2. T2
) ∨
∃∃T. ⦃h, L.ⓓV1⦄ ⊢ T1 ➡[g] T & ⇧[0, 1] U2 ≡ T & a = true.
qed-.
lemma cpx_inv_abst1: ∀h,g,a,L,V1,T1,U2. ⦃h, L⦄ ⊢ ⓛ{a}V1.T1 ➡[g] U2 →
- ∃∃V2,T2. ⦃h, L⦄ ⊢ V1 ➡[g] V2 & ⦃h, L.ⓛ V1⦄ ⊢ T1 ➡[g] T2 &
+ ∃∃V2,T2. ⦃h, L⦄ ⊢ V1 ➡[g] V2 & ⦃h, L.ⓛV1⦄ ⊢ T1 ➡[g] T2 &
U2 = ⓛ{a} V2. T2.
#h #g #a #L #V1 #T1 #U2 #H
elim (cpx_inv_bind1 … H) -H *
qed-.
fact cpx_inv_flat1_aux: ∀h,g,L,U,U2. ⦃h, L⦄ ⊢ U ➡[g] U2 →
- ∀J,V1,U1. U = ⓕ{J} V1. U1 →
+ ∀J,V1,U1. U = ⓕ{J}V1.U1 →
∨∨ ∃∃V2,T2. ⦃h, L⦄ ⊢ V1 ➡[g] V2 & ⦃h, L⦄ ⊢ U1 ➡[g] T2 &
- U2 = ⓕ{J} V2.T2
+ U2 = ⓕ{J}V2.T2
| (⦃h, L⦄ ⊢ U1 ➡[g] U2 ∧ J = Cast)
| (⦃h, L⦄ ⊢ V1 ➡[g] U2 ∧ J = Cast)
| ∃∃a,V2,W1,W2,T1,T2. ⦃h, L⦄ ⊢ V1 ➡[g] V2 & ⦃h, L⦄ ⊢ W1 ➡[g] W2 &
U2 = ⓓ{a}ⓝW2.V2.T2 & J = Appl
| ∃∃a,V,V2,W1,W2,T1,T2. ⦃h, L⦄ ⊢ V1 ➡[g] V & ⇧[0,1] V ≡ V2 &
⦃h, L⦄ ⊢ W1 ➡[g] W2 & ⦃h, L.ⓓW1⦄ ⊢ T1 ➡[g] T2 &
- U1 = ⓓ{a}W1. T1 &
- U2 = ⓓ{a}W2. ⓐV2. T2 & J = Appl.
+ U1 = ⓓ{a}W1.T1 &
+ U2 = ⓓ{a}W2.ⓐV2.T2 & J = Appl.
#h #g #L #U #U2 * -L -U -U2
-[ #I #L #J #W1 #U1 #H destruct
-| #L #k #l #_ #J #W1 #U1 #H destruct
-| #I #L #K #V #V2 #W2 #i #_ #_ #_ #J #W1 #U1 #H destruct
-| #a #I #L #V1 #V2 #T1 #T2 #_ #_ #J #W1 #U1 #H destruct
-| #I #L #V1 #V2 #T1 #T2 #HV12 #HT12 #J #W1 #U1 #H destruct /3 width=5/
-| #L #V #T1 #T #T2 #_ #_ #J #W1 #U1 #H destruct
-| #L #V #T1 #T2 #HT12 #J #W1 #U1 #H destruct /3 width=1/
-| #L #V1 #V2 #T #HV12 #J #W1 #U1 #H destruct /3 width=1/
-| #a #L #V1 #V2 #W1 #W2 #T1 #T2 #HV12 #HW12 #HT12 #J #W1 #U1 #H destruct /3 width=11/
-| #a #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 #HW12 #HT12 #J #W1 #U1 #H destruct /3 width=13/
+[ #I #L #J #W #U1 #H destruct
+| #L #k #l #_ #J #W #U1 #H destruct
+| #I #L #K #V #V2 #W2 #i #_ #_ #_ #J #W #U1 #H destruct
+| #a #I #L #V1 #V2 #T1 #T2 #_ #_ #J #W #U1 #H destruct
+| #I #L #V1 #V2 #T1 #T2 #HV12 #HT12 #J #W #U1 #H destruct /3 width=5/
+| #L #V #T1 #T #T2 #_ #_ #J #W #U1 #H destruct
+| #L #V #T1 #T2 #HT12 #J #W #U1 #H destruct /3 width=1/
+| #L #V1 #V2 #T #HV12 #J #W #U1 #H destruct /3 width=1/
+| #a #L #V1 #V2 #W1 #W2 #T1 #T2 #HV12 #HW12 #HT12 #J #W #U1 #H destruct /3 width=11/
+| #a #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 #HW12 #HT12 #J #W #U1 #H destruct /3 width=13/
]
qed-.
U2 = ⓓ{a}ⓝW2.V2.T2 & I = Appl
| ∃∃a,V,V2,W1,W2,T1,T2. ⦃h, L⦄ ⊢ V1 ➡[g] V & ⇧[0,1] V ≡ V2 &
⦃h, L⦄ ⊢ W1 ➡[g] W2 & ⦃h, L.ⓓW1⦄ ⊢ T1 ➡[g] T2 &
- U1 = ⓓ{a}W1. T1 &
- U2 = ⓓ{a}W2. ⓐV2. T2 & I = Appl.
+ U1 = ⓓ{a}W1.T1 &
+ U2 = ⓓ{a}W2.ⓐV2.T2 & I = Appl.
/2 width=3 by cpx_inv_flat1_aux/ qed-.
lemma cpx_inv_appl1: ∀h,g,L,V1,U1,U2. ⦃h, L⦄ ⊢ ⓐ V1.U1 ➡[g] U2 →
U1 = ⓛ{a}W1.T1 & U2 = ⓓ{a}ⓝW2.V2.T2
| ∃∃a,V,V2,W1,W2,T1,T2. ⦃h, L⦄ ⊢ V1 ➡[g] V & ⇧[0,1] V ≡ V2 &
⦃h, L⦄ ⊢ W1 ➡[g] W2 & ⦃h, L.ⓓW1⦄ ⊢ T1 ➡[g] T2 &
- U1 = ⓓ{a}W1. T1 & U2 = ⓓ{a}W2. ⓐV2. T2.
+ U1 = ⓓ{a}W1.T1 & U2 = ⓓ{a}W2. ⓐV2. T2.
#h #g #L #V1 #U1 #U2 #H elim (cpx_inv_flat1 … H) -H *
[ /3 width=5/
|2,3: #_ #H destruct
(* Note: the main property of simple terms *)
lemma cpx_inv_appl1_simple: ∀h,g,L,V1,T1,U. ⦃h, L⦄ ⊢ ⓐV1.T1 ➡[g] U → 𝐒⦃T1⦄ →
∃∃V2,T2. ⦃h, L⦄ ⊢ V1 ➡[g] V2 & ⦃h, L⦄ ⊢ T1 ➡[g] T2 &
- U = ⓐV2. T2.
+ U = ⓐV2.T2.
#h #g #L #V1 #T1 #U #H #HT1
elim (cpx_inv_appl1 … H) -H *
[ /2 width=5/
]
qed-.
-lemma cpx_inv_cast1: ∀h,g,L,V1,U1,U2. ⦃h, L⦄ ⊢ ⓝ V1.U1 ➡[g] U2 →
+lemma cpx_inv_cast1: ∀h,g,L,V1,U1,U2. ⦃h, L⦄ ⊢ ⓝV1.U1 ➡[g] U2 →
∨∨ ∃∃V2,T2. ⦃h, L⦄ ⊢ V1 ➡[g] V2 & ⦃h, L⦄ ⊢ U1 ➡[g] T2 &
U2 = ⓝ V2. T2
| ⦃h, L⦄ ⊢ U1 ➡[g] U2
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=5/
+ elim (lift_trans_ge … HV2 … HV3) -V2 // /4 width=5/
]
qed.
elim (IHV1 … HLK … HV01) -V1 #V3 #HV3 #HV03
elim (IHT12 (K.ⓓW0) … HT01) -T1 /2 width=1/ #T3 #HT32 #HT03
elim (IHW12 … HLK … HW01) -W1 #W3 #HW32 #HW03
- elim (lift_trans_le … HV3 … HV2 ?) -V // #V #HV3 #HV2
+ elim (lift_trans_le … HV3 … HV2) -V // #V #HV3 #HV2
@ex2_intro [2: /3 width=2/ | skip |3: /2 width=3/ ] (**) (* /4 width=5/ is slow *)
]
qed-.
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/reducible_2.ma".
include "basic_2/relocation/ldrop.ma".
(* CONTEXT-SENSITIVE REDUCIBLE TERMS ****************************************)
[ #L1 #K1 #V1 #i #HLK1 #L2 #H destruct
lapply (ldrop_fwd_length_lt2 … HLK1)
>append_length >commutative_plus normalize in ⊢ (??% → ?); #H
- elim (le_to_or_lt_eq i (|L2|) ?) /2 width=1/ -H #Hi destruct
+ elim (le_to_or_lt_eq i (|L2|)) /2 width=1/ -H #Hi destruct
[ elim (ldrop_O1_lt … Hi) #I2 #K2 #V2 #HLK2
lapply (ldrop_O1_inv_append1_le … HLK1 … HLK2) -HLK1 /2 width=2/ -Hi
normalize #H destruct /2 width=3/
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/reducible_4.ma".
include "basic_2/static/sd.ma".
include "basic_2/reduction/crr.ma".
(* *)
(**************************************************************************)
-include "basic_2/unfold/lpqs.ma".
+include "basic_2/notation/relations/predsn_2.ma".
+include "basic_2/grammar/lpx_sn.ma".
include "basic_2/reduction/cpr.ma".
(* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************)
L1 @@ K1 ⊢ ➡ L2 @@ K2.
/3 width=1 by lpx_sn_append, cpr_append/ qed.
-lemma lpqs_lpr: ∀L1,L2. L1 ⊢ ➤* L2 → L1 ⊢ ➡ L2.
-#L1 #L2 #H elim H -L1 -L2 // /3 width=1/
-qed.
-
-lemma lpss_lpr: ∀L1,L2. L1 ⊢ ▶* L2 → L1 ⊢ ➡ L2.
-/3 width=1/ qed.
-
(* Basic forward lemmas *****************************************************)
lemma lpr_fwd_length: ∀L1,L2. L1 ⊢ ➡ L2 → |L1| = |L2|.
∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
) →
∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0 ⊢ ⓛ{a}W0.T0 ➡ T1 →
- ∀V2. L0 ⊢ V0 ➡ V2 → ∀T2. L0.ⓛW0 ⊢ T0 ➡ T2 →
+ ∀V2. L0 ⊢ V0 ➡ V2 → ∀W2. L0 ⊢ W0 ➡ W2 → ∀T2. L0.ⓛW0 ⊢ T0 ➡ T2 →
∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
- ∃∃T. L1 ⊢ ⓐV1.T1 ➡ T & L2 ⊢ ⓓ{a}V2.T2 ➡ T.
+ ∃∃T. L1 ⊢ ⓐV1.T1 ➡ T & L2 ⊢ ⓓ{a}ⓝW2.V2.T2 ➡ T.
#a #L0 #V0 #W0 #T0 #IH #V1 #HV01 #X #H
-#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+#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/ #V #HV1 #HV2
-elim (IH … HT01 … HT02 (L1.ⓛW1) … (L2.ⓛW1)) /2 width=1/ -L0 -V0 -W0 -T0 #T #HT1 #HT2
-lapply (cpr_lsubr_trans … HT2 (L2.ⓓV2) ?) -HT2 /2 width=1/ /3 width=5/
+elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1/ #W #HW1 #HW2
+elim (IH … HT01 … HT02 (L1.ⓛW1) … (L2.ⓛW2)) /2 width=1/ -L0 -V0 -W0 -T0 #T #HT1 #HT2
+lapply (lsubx_cpr_trans … HT2 (L2.ⓓⓝW2.V2) ?) -HT2 /2 width=1/
+/4 width=5 by cpr_bind, cpr_flat, cpr_beta, ex2_intro/ (**) (* auto too slow without trace *)
qed-.
(* Basic-1: includes:
∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
) →
- ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0.ⓛW0 ⊢ T0 ➡ T1 →
- ∀V2. L0 ⊢ V0 ➡ V2 → ∀T2. L0.ⓛW0 ⊢ T0 ➡ T2 →
+ ∀V1. L0 ⊢ V0 ➡ V1 → ∀W1. L0 ⊢ W0 ➡ W1 → ∀T1. L0.ⓛW0 ⊢ T0 ➡ T1 →
+ ∀V2. L0 ⊢ V0 ➡ V2 → ∀W2. L0 ⊢ W0 ➡ W2 → ∀T2. L0.ⓛW0 ⊢ T0 ➡ T2 →
∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
- ∃∃T. L1 ⊢ ⓓ{a}V1.T1 ➡ T & L2 ⊢ ⓓ{a}V2.T2 ➡ T.
-#a #L0 #V0 #W0 #T0 #IH #V1 #HV01 #T1 #HT01
-#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+ ∃∃T. L1 ⊢ ⓓ{a}ⓝW1.V1.T1 ➡ T & L2 ⊢ ⓓ{a}ⓝW2.V2.T2 ➡ T.
+#a #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/ #V #HV1 #HV2
-elim (IH … HT01 … HT02 (L1.ⓛW0) … (L2.ⓛW0)) /2 width=1/ -L0 -V0 -T0 #T #HT1 #HT2
-lapply (cpr_lsubr_trans … HT1 (L1.ⓓV1) ?) -HT1 /2 width=1/
-lapply (cpr_lsubr_trans … HT2 (L2.ⓓV2) ?) -HT2 /2 width=1/ /3 width=5/
+elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1/ #W #HW1 #HW2
+elim (IH … HT01 … HT02 (L1.ⓛW1) … (L2.ⓛW2)) /2 width=1/ -L0 -V0 -W0 -T0 #T #HT1 #HT2
+lapply (lsubx_cpr_trans … HT1 (L1.ⓓⓝW1.V1) ?) -HT1 /2 width=1/
+lapply (lsubx_cpr_trans … HT2 (L2.ⓓⓝW2.V2) ?) -HT2 /2 width=1/
+/4 width=5 by cpr_bind, cpr_flat, ex2_intro/
qed-.
(* Basic_1: was: pr0_upsilon_upsilon *)
elim (cpr_inv_flat1 … H1) -H1 *
[ #V1 #T1 #HV01 #HT01 #H1
| #HX1 #H1
- | #a1 #V1 #Y1 #Z1 #T1 #HV01 #HZT1 #H11 #H12 #H13
+ | #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 #Z2 #T2 #HV02 #HZT2 #H21 #H22 #H23
+ |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_tau/
- | /4 width=11 by ex2_commute, cpr_conf_lpr_flat_beta/
+ | /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_tau/
| /3 width=7 by cpr_conf_lpr_tau_tau/
- | /3 width=11 by cpr_conf_lpr_flat_beta/
- | /3 width=11 by cpr_conf_lpr_beta_beta/
+ | /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/
]
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/grammar/lpx_sn_lpx_sn.ma".
-include "basic_2/substitution/fsupp.ma".
-include "basic_2/substitution/lpss_ldrop.ma".
-include "basic_2/reduction/lpr_ldrop.ma".
-
-(* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************)
-
-(* Properties on context-sensitive parallel substitution for terms **********)
-
-fact cpr_cpss_conf_lpr_lpss_atom_atom:
- ∀I,L1,L2. ∃∃T. L1 ⊢ ⓪{I} ▶* T & L2 ⊢ ⓪{I} ➡ T.
-/2 width=3/ qed-.
-
-fact cpr_cpss_conf_lpr_lpss_atom_delta:
- ∀L0,i. (
- ∀L,T. ⦃L0, #i⦄ ⊃+ ⦃L, T⦄ →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
- ∀V2. K0 ⊢ V0 ▶* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ #i ▶* T & L2 ⊢ T2 ➡ T.
-#L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
-elim (lpr_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
-elim (lpr_inv_pair1 … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct
-elim (lpss_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
-elim (lpss_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
-lapply (fsupp_lref … HLK0) -HLK0 #HLK0
-elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
-elim (lift_total V 0 (i+1)) #T #HVT
-lapply (cpr_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 /3 width=6/
-qed-.
-
-fact cpr_cpss_conf_lpr_lpss_delta_atom:
- ∀L0,i. (
- ∀L,T.⦃L0, #i⦄ ⊃+ ⦃L, T⦄ →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
- ∀V1. K0 ⊢ V0 ➡ V1 → ∀T1. ⇧[O, i + 1] V1 ≡ T1 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ T1 ▶* T & L2 ⊢ #i ➡ T.
-#L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1 #L1 #HL01 #L2 #HL02
-elim (lpss_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
-elim (lpss_inv_pair1 … H2) -H2 #K2 #V2 #HK02 #HV02 #H destruct
-elim (lpr_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
-elim (lpr_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK1) -W1 #HLK1
-lapply (fsupp_lref … HLK0) -HLK0 #HLK0
-elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
-elim (lift_total V 0 (i+1)) #T #HVT
-lapply (cpss_lift … HV1 … HLK1 … HVT1 … HVT) -K1 -V1 /3 width=9/
-qed-.
-
-fact cpr_cpss_conf_lpr_lpss_delta_delta:
- ∀L0,i. (
- ∀L,T. ⦃L0, #i⦄ ⊃+ ⦃L, T⦄ →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
- ∀V1. K0 ⊢ V0 ➡ V1 → ∀T1. ⇧[O, i + 1] V1 ≡ T1 →
- ∀KX,VX. ⇩[O, i] L0 ≡ KX.ⓓVX →
- ∀V2. KX ⊢ VX ▶* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ T1 ▶* T & L2 ⊢ T2 ➡ T.
-#L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1
-#KX #VX #H #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
-lapply (ldrop_mono … H … HLK0) -H #H destruct
-elim (lpr_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
-elim (lpr_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK1) -W1 #HLK1
-elim (lpss_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
-elim (lpss_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
-lapply (fsupp_lref … HLK0) -HLK0 #HLK0
-elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
-elim (lift_total V 0 (i+1)) #T #HVT
-lapply (cpss_lift … HV1 … HLK1 … HVT1 … HVT) -K1 -V1
-lapply (cpr_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 -V /2 width=3/
-qed-.
-
-fact cpr_cpss_conf_lpr_lpss_bind_bind:
- ∀a,I,L0,V0,T0. (
- ∀L,T. ⦃L0,ⓑ{a,I}V0.T0⦄ ⊃+ ⦃L, T⦄ →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0.ⓑ{I}V0 ⊢ T0 ➡ T1 →
- ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0.ⓑ{I}V0 ⊢ T0 ▶* T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ ⓑ{a,I}V1.T1 ▶* T & L2 ⊢ ⓑ{a,I}V2.T2 ➡ T.
-#a #I #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 // /2 width=1/ /3 width=5/
-qed-.
-
-fact cpr_cpss_conf_lpr_lpss_bind_zeta:
- ∀L0,V0,T0. (
- ∀L,T. ⦃L0,+ⓓV0.T0⦄ ⊃+ ⦃L, T⦄ →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀T1. L0.ⓓV0 ⊢ T0 ➡ T1 → ∀X1. ⇧[O, 1] X1 ≡ T1 →
- ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0.ⓓV0 ⊢ T0 ▶* T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ X1 ▶* T & L2 ⊢ +ⓓV2.T2 ➡ T.
-#L0 #V0 #T0 #IH #T1 #HT01 #X1 #HXT1
-#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HT01 … HT02 (L1.ⓓV2) … (L2.ⓓV2)) -IH -HT01 -HT02 // /2 width=1/ /3 width=1/ -L0 -V0 -T0 #T #HT1 #HT2
-elim (cpss_inv_lift1 … HT1 L1 … HXT1) -T1 /2 width=1/ /3 width=9/
-qed-.
-
-fact cpr_cpss_conf_lpr_lpss_flat_flat:
- ∀I,L0,V0,T0. (
- ∀L,T. ⦃L0,ⓕ{I}V0.T0⦄ ⊃+ ⦃L, T⦄ →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0 ⊢ T0 ➡ T1 →
- ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0 ⊢ T0 ▶* T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ ⓕ{I}V1.T1 ▶* T & L2 ⊢ ⓕ{I}V2.T2 ➡ T.
-#I #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/
-qed-.
-
-fact cpr_cpss_conf_lpr_lpss_flat_tau:
- ∀L0,V0,T0. (
- ∀L,T. ⦃L0,ⓝV0.T0⦄ ⊃+ ⦃L, T⦄ →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀T1. L0 ⊢ T0 ➡ T1 → ∀V2,T2. L0 ⊢ T0 ▶* T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ T1 ▶* T & L2 ⊢ ⓝV2.T2 ➡ T.
-#L0 #V0 #T0 #IH #T1 #HT01
-#V2 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /3 width=3/
-qed-.
-
-fact cpr_cpss_conf_lpr_lpss_flat_beta:
- ∀a,L0,V0,W0,T0. (
- ∀L,T. ⦃L0,ⓐV0.ⓛ{a}W0.T0⦄ ⊃+ ⦃L, T⦄ →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0.ⓛW0 ⊢ T0 ➡ T1 →
- ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0 ⊢ ⓛ{a}W0.T0 ▶* T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ ⓓ{a}V1.T1 ▶* T & L2 ⊢ ⓐV2.T2 ➡ T.
-#a #L0 #V0 #W0 #T0 #IH #V1 #HV01 #T1 #HT01
-#V2 #HV02 #X #H #L1 #HL01 #L2 #HL02
-elim (cpss_inv_bind1 … H) -H #W2 #T2 #HW02 #HT02 #H destruct
-elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1/ #V #HV1 #HV2
-elim (IH … HT01 … HT02 (L1.ⓛW2) … (L2.ⓛW2)) /2 width=1/ /3 width=1/ -L0 -V0 -W0 -T0 #T #HT1 #HT2
-lapply (cpss_lsubr_trans … HT1 (L1.ⓓV1) ?) -HT1 /2 width=1/ /3 width=5/
-qed-.
-
-fact cpr_cpss_conf_lpr_lpss_flat_theta:
- ∀a,L0,V0,W0,T0. (
- ∀L,T. ⦃L0,ⓐV0.ⓓ{a}W0.T0⦄ ⊃+ ⦃L, T⦄ →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀V1. L0 ⊢ V0 ➡ V1 → ∀U1. ⇧[O, 1] V1 ≡ U1 →
- ∀W1. L0 ⊢ W0 ➡ W1 → ∀T1. L0.ⓓW0 ⊢ T0 ➡ T1 →
- ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0 ⊢ ⓓ{a}W0.T0 ▶* T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ ⓓ{a}W1.ⓐU1.T1 ▶* T & L2 ⊢ ⓐV2.T2 ➡ T.
-#a #L0 #V0 #W0 #T0 #IH #V1 #HV01 #U1 #HVU1 #W1 #HW01 #T1 #HT01
-#V2 #HV02 #X #H #L1 #HL01 #L2 #HL02
-elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1/ #V #HV1 #HV2
-elim (lift_total V 0 1) #U #HVU
-lapply (cpss_lift … HV1 (L1.ⓓW1) … HVU1 … HVU) -HVU1 /2 width=1/ #HU1
-elim (cpss_inv_bind1 … H) -H #W2 #T2 #HW02 #HT02 #H destruct
-elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1/
-elim (IH … HT01 … HT02 (L1.ⓓW1) … (L2.ⓓW2)) /2 width=1/ -L0 -V0 -W0 -T0
-/4 width=9 by ex2_intro, cpr_theta, cpss_bind, cpss_flat/ (**) (* auto too slow without trace *)
-qed-.
-
-lemma cpr_cpss_conf_lpr_lpss: lpx_sn_confluent cpr cpss.
-#L0 #T0 @(fsupp_wf_ind … L0 T0) -L0 -T0 #L #T #IH #L0 * [|*]
-[ #I0 #HL #HT #T1 #H1 #T2 #H2 #L1 #HL01 #L2 #HL02 destruct
- elim (cpr_inv_atom1 … H1) -H1
- elim (cpss_inv_atom1 … H2) -H2
- [ #H2 #H1 destruct
- /2 width=1 by cpr_cpss_conf_lpr_lpss_atom_atom/
- | * #K0 #V0 #V2 #i2 #HLK0 #HV02 #HVT2 #H2 #H1 destruct
- /3 width=10 by cpr_cpss_conf_lpr_lpss_atom_delta/
- | #H2 * #K0 #V0 #V1 #i1 #HLK0 #HV01 #HVT1 #H1 destruct
- /3 width=10 by cpr_cpss_conf_lpr_lpss_delta_atom/
- | * #X #Y #V2 #z #H #HV02 #HVT2 #H2
- * #K0 #V0 #V1 #i #HLK0 #HV01 #HVT1 #H1 destruct
- /3 width=17 by cpr_cpss_conf_lpr_lpss_delta_delta/
- ]
-| #a #I #V0 #T0 #HL #HT #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
- elim (cpss_inv_bind1 … H2) -H2 #V2 #T2 #HV02 #HT02 #H2
- elim (cpr_inv_bind1 … H1) -H1 *
- [ #V1 #T1 #HV01 #HT01 #H1
- | #T1 #HT01 #HXT1 #H11 #H12
- ] destruct
- [ /3 width=10 by cpr_cpss_conf_lpr_lpss_bind_bind/
- | /3 width=11 by cpr_cpss_conf_lpr_lpss_bind_zeta/
- ]
-| #I #V0 #T0 #HL #HT #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
- elim (cpss_inv_flat1 … H2) -H2 #V2 #T2 #HV02 #HT02 #H2
- elim (cpr_inv_flat1 … H1) -H1 *
- [ #V1 #T1 #HV01 #HT01 #H1
- | #HX1 #H1
- | #a1 #V1 #Y1 #Z1 #T1 #HV01 #HZT1 #H11 #H12 #H13
- | #a1 #V1 #U1 #Y1 #W1 #Z1 #T1 #HV01 #HVU1 #HYW1 #HZT1 #H11 #H12 #H13
- ] destruct
- [ /3 width=10 by cpr_cpss_conf_lpr_lpss_flat_flat/
- | /3 width=8 by cpr_cpss_conf_lpr_lpss_flat_tau/
- | /3 width=11 by cpr_cpss_conf_lpr_lpss_flat_beta/
- | /3 width=14 by cpr_cpss_conf_lpr_lpss_flat_theta/
- ]
-]
-qed-.
-
-(* Basic_1: includes: pr0_subst1 *)
-(* Basic_1: was: pr2_subst1 *)
-lemma cpr_cpss_conf: ∀L. confluent2 … (cpr L) (cpss L).
-/2 width=6 by cpr_cpss_conf_lpr_lpss/ qed-.
-
-lemma cpr_lpss_conf_dx: ∀L0,T0,T1. L0 ⊢ T0 ➡ T1 → ∀L1. L0 ⊢ ▶* L1 →
- ∃∃T. L1 ⊢ T1 ▶* T & L1 ⊢ T0 ➡ T.
-#L0 #T0 #T1 #HT01 #L1 #HL01
-elim (cpr_cpss_conf_lpr_lpss … HT01 T0 … L1 … HL01) // /2 width=1/ -L0 /2 width=3/
-qed-.
-
-lemma cpr_lpss_conf_sn: ∀L0,T0,T1. L0 ⊢ T0 ➡ T1 → ∀L1. L0 ⊢ ▶* L1 →
- ∃∃T. L0 ⊢ T1 ▶* T & L1 ⊢ T0 ➡ T.
-#L0 #T0 #T1 #HT01 #L1 #HL01
-elim (cpr_cpss_conf_lpr_lpss … HT01 T0 … L0 … HL01) // -HT01 -HL01 /2 width=3/
-qed-.
-
-(* Basic_1: includes: pr0_subst1_fwd *)
-lemma lpr_cpss_conf: ∀L0,T0,T1. L0 ⊢ T0 ▶* T1 → ∀L1. L0 ⊢ ➡ L1 →
- ∃∃T. L1 ⊢ T0 ▶* T & L0 ⊢ T1 ➡ T.
-#L0 #T0 #T1 #HT01 #L1 #HL01
-elim (cpr_cpss_conf_lpr_lpss ?? T0 … HT01 … HL01 L0) // -HT01 -HL01 /2 width=3/
-qed-.
-
-(* Properties on sn parallel substitution on local environments *************)
-
-lemma lpr_lpss_conf: confluent2 … lpr lpss.
-/3 width=6 by lpx_sn_conf, cpr_cpss_conf_lpr_lpss/
-qed-.
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/predsn_4.ma".
include "basic_2/reduction/lpr.ma".
include "basic_2/reduction/cpx.ma".
lemma lpx_append: ∀h,g,K1,K2. ⦃h, K1⦄ ⊢ ➡[g] K2 → ∀L1,L2. ⦃h, L1⦄ ⊢ ➡[g] L2 →
⦃h, L1 @@ K1⦄ ⊢ ➡[g] L2 @@ K2.
/3 width=1 by lpx_sn_append, cpx_append/ qed.
-(*
-lamma lpr_lpx: ∀h,g,L1,L2. L1 ⊢ ➡ L2 → ⦃h, L1⦄ ⊢ ➡[g] L2.
+
+lemma lpr_lpx: ∀h,g,L1,L2. L1 ⊢ ➡ L2 → ⦃h, L1⦄ ⊢ ➡[g] L2.
#h #g #L1 #L2 #H elim H -L1 -L2 // /3 width=1/
qed.
-*)
+
(* Basic forward lemmas *****************************************************)
lemma lpx_fwd_length: ∀h,g,L1,L2. ⦃h, L1⦄ ⊢ ➡[g] L2 → |L1| = |L2|.
(* Properties on atomic arity assignment for terms **************************)
+(* Note: lemma 500 *)
lemma aaa_cpx_lpx_conf: ∀h,g,L1,T1,A. L1 ⊢ T1 ⁝ A → ∀T2. ⦃h, L1⦄ ⊢ T1 ➡[g] T2 →
∀L2. ⦃h, L1⦄ ⊢ ➡[g] L2 → L2 ⊢ T2 ⁝ A.
#h #g #L1 #T1 #A #H elim H -L1 -T1 -A
lemma aaa_lpx_conf: ∀h,g,L1,T,A. L1 ⊢ T ⁝ A → ∀L2. ⦃h, L1⦄ ⊢ ➡[g] L2 → L2 ⊢ T ⁝ A.
/2 width=7 by aaa_cpx_lpx_conf/ qed-.
-(*
-lamma aaa_cpr_conf: ∀L,T1,A. L ⊢ T1 ⁝ A → ∀T2. L ⊢ T1 ➡ T2 → L ⊢ T2 ⁝ A.
+
+lemma aaa_cpr_conf: ∀L,T1,A. L ⊢ T1 ⁝ A → ∀T2. L ⊢ T1 ➡ T2 → L ⊢ T2 ⁝ A.
/3 width=5 by aaa_cpx_conf, cpr_cpx/ qed-.
-lamma aaa_lpr_conf: ∀L1,T,A. L1 ⊢ T ⁝ A → ∀L2. L1 ⊢ ➡ L2 → L2 ⊢ T ⁝ A.
+lemma aaa_lpr_conf: ∀L1,T,A. L1 ⊢ T ⁝ A → ∀L2. L1 ⊢ ➡ L2 → L2 ⊢ T ⁝ A.
/3 width=5 by aaa_lpx_conf, lpr_lpx/ qed-.
-*)
\ No newline at end of file
(* *)
(**************************************************************************)
-include "basic_2/substitution/lsubr.ma".
+include "basic_2/notation/relations/crsubeqt_2.ma".
+include "basic_2/relocation/ldrop.ma".
(* LOCAL ENVIRONMENT REFINEMENT FOR EXTENDED REDUCTION **********************)
.
interpretation
- "local environment refinement (extended reduction)"
+ "local environment refinement (reduction)"
'CrSubEqT L1 L2 = (lsubx L1 L2).
(* Basic properties *********************************************************)
#L1 #L2 #H elim H -L1 -L2 // /2 width=1/
qed-.
-lemma lsubx_fwd_lsubr: ∀L1,L2. L1 ⓝ⊑ L2 → L1 ⊑ L2.
-#L1 #L2 #H elim H -L1 -L2 // /2 width=1/
-qed-.
-
lemma lsubx_fwd_ldrop2_bind: ∀L1,L2. L1 ⓝ⊑ L2 →
∀I,K2,W,i. ⇩[0, i] L2 ≡ K2.ⓑ{I}W →
(∃∃K1. K1 ⓝ⊑ K2 & ⇩[0, i] L1 ≡ K1.ⓑ{I}W) ∨
- ∃∃K1,V. K1 ⓝ⊑ K2 & ⇩[0, i] L1 ≡ K1.ⓓⓝW.V.
+ ∃∃K1,V. K1 ⓝ⊑ K2 & ⇩[0, i] L1 ≡ K1.ⓓⓝW.V & I = Abst.
#L1 #L2 #H elim H -L1 -L2
[ #L #I #K2 #W #i #H
elim (ldrop_inv_atom1 … H) -H #H destruct
]
]
qed-.
+
+lemma lsubx_fwd_ldrop2_abbr: ∀L1,L2. L1 ⓝ⊑ L2 →
+ ∀K2,V,i. ⇩[0, i] L2 ≡ K2.ⓓV →
+ ∃∃K1. K1 ⓝ⊑ K2 & ⇩[0, i] L1 ≡ K1.ⓓV.
+#L1 #L2 #HL12 #K2 #V #i #HLK2 elim (lsubx_fwd_ldrop2_bind … HL12 … HLK2) -L2 // *
+#K1 #W #_ #_ #H destruct
+qed-.
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/supterm_4.ma".
include "basic_2/grammar/cl_weight.ma".
include "basic_2/relocation/ldrop.ma".
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/suptermopt_4.ma".
include "basic_2/relocation/fsup.ma".
(* OPTIONAL SUPCLOSURE ******************************************************)
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/suptermoptalt_4.ma".
include "basic_2/relocation/fsupq.ma".
(* OPTIONAL SUPCLOSURE ******************************************************)
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/rdrop_3.ma".
include "basic_2/grammar/genv.ma".
(* GLOBAL ENVIRONMENT SLICING ***********************************************)
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/rdrop_4.ma".
include "basic_2/grammar/lenv_length.ma".
include "basic_2/grammar/lenv_weight.ma".
include "basic_2/relocation/lift.ma".
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/rlift_4.ma".
include "basic_2/grammar/term_weight.ma".
include "basic_2/grammar/term_simple.ma".
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/atomicarity_3.ma".
include "basic_2/grammar/aarity.ma".
include "basic_2/relocation/ldrop.ma".
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/substitution/lpss_ldrop.ma".
-include "basic_2/static/aaa_lift.ma".
-
-(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
-
-(* Properties about sn parallel substitution ********************************)
-
-(* Note: lemma 500 *)
-lemma aaa_cpss_lpss_conf: ∀L1,T1,A. L1 ⊢ T1 ⁝ A → ∀T2. L1 ⊢ T1 ▶* T2 →
- ∀L2. L1 ⊢ ▶* L2 → L2 ⊢ T2 ⁝ A.
-#L1 #T1 #A #H elim H -L1 -T1 -A
-[ #L1 #k #X #H
- >(cpss_inv_sort1 … H) -H //
-| #I #L1 #K1 #V1 #B #i #HLK1 #_ #IHV1 #X #H #L2 #HL12
- elim (cpss_inv_lref1 … H) -H
- [ #H destruct
- elim (lpss_ldrop_conf … HLK1 … HL12) -L1 #X #H #HLK2
- elim (lpss_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct /3 width=6/
- | * #Y #Z #V2 #H #HV12 #HV2
- lapply (ldrop_mono … H … HLK1) -H #H destruct
- elim (lpss_ldrop_conf … HLK1 … HL12) -L1 #Z #H #HLK2
- elim (lpss_inv_pair1 … H) -H #K2 #V0 #HK12 #_ #H destruct
- lapply (ldrop_fwd_ldrop2 … HLK2) -V0 /3 width=7/
- ]
-| #a #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
- elim (cpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct /4 width=2/
-| #a #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
- elim (cpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct /4 width=1/
-| #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
- elim (cpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct /3 width=3/
-| #L1 #V1 #T1 #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
- elim (cpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct /3 width=1/
-]
-qed-.
-
-lemma aaa_cpss_conf: ∀L,T1,A. L ⊢ T1 ⁝ A → ∀T2. L ⊢ T1 ▶* T2 → L ⊢ T2 ⁝ A.
-/2 width=5 by aaa_cpss_lpss_conf/ qed-.
-
-lemma aaa_lpss_conf: ∀L1,T,A. L1 ⊢ T ⁝ A → ∀L2. L1 ⊢ ▶* L2 → L2 ⊢ T ⁝ A.
-/2 width=5 by aaa_cpss_lpss_conf/ qed-.
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/crsubeqa_2.ma".
include "basic_2/static/aaa.ma".
(* LOCAL ENVIRONMENT REFINEMENT FOR ATOMIC ARITY ASSIGNMENT *****************)
axiom nexts_dec: ∀h,k1,k2. Decidable (∃l. (next h)^l k1 = k2).
axiom nexts_inj: ∀h,k,l1,l2. (next h)^l1 k = (next h)^l2 k → l1 = l2.
-
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/statictype_6.ma".
include "basic_2/relocation/ldrop.ma".
include "basic_2/static/sd.ma".
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/substitution/lpss_ldrop.ma".
-include "basic_2/static/ssta_lift.ma".
-
-(* STRATIFIED STATIC TYPE ASSIGNMENT ON TERMS *******************************)
-
-(* Properties about sn parallel substitution ********************************)
-
-(* Note: apparently this was missing in basic_1 *)
-lemma ssta_cpss_lpss_conf: ∀h,g,L1,T1,U1,l. ⦃h, L1⦄ ⊢ T1 •[g] ⦃l, U1⦄ →
- ∀T2. L1 ⊢ T1 ▶* T2 → ∀L2. L1 ⊢ ▶* L2 →
- ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g] ⦃l, U2⦄ & L1 ⊢ U1 ▶* U2.
-#h #g #L1 #T1 #U1 #l #H elim H -L1 -T1 -U1 -l
-[ #L1 #k1 #l1 #Hkl1 #X #H
- >(cpss_inv_sort1 … H) -H /3 width=3/
-| #L1 #K1 #V1 #W1 #U1 #i #l #HLK1 #_ #HWU1 #IHVW1 #X #H #L2 #HL12
- elim (cpss_inv_lref1 … H) -H
- [ #H destruct
- elim (lpss_ldrop_conf … HLK1 … HL12) -HL12 #X #H #HLK2
- elim (lpss_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct
- lapply (ldrop_fwd_ldrop2 … HLK1) -HLK1 #HLK1
- elim (IHVW1 … HV12 … HK12) -IHVW1 -HV12 -HK12 #W2 #HVW2 #HW12
- elim (lift_total W2 0 (i+1)) #U2 #HWU2
- lapply (cpss_lift … HW12 … HLK1 … HWU1 … HWU2) -HW12 -HLK1 -HWU1 /3 width=6/
- | * #Y #Z #V2 #H #HV12 #HV2
- lapply (ldrop_mono … H … HLK1) -H #H destruct
- elim (lpss_ldrop_conf … HLK1 … HL12) -HL12 #Z #H #HLK2
- elim (lpss_inv_pair1 … H) -H #K2 #V0 #HK12 #_ #H destruct
- lapply (ldrop_fwd_ldrop2 … HLK2) -V0 #HLK2
- lapply (ldrop_fwd_ldrop2 … HLK1) -HLK1 #HLK1
- elim (IHVW1 … HV12 … HK12) -IHVW1 -HK12 -HV12 #W2 #HVW2 #HW12
- elim (lift_total W2 0 (i+1)) #U2 #HWU2
- lapply (ssta_lift … HVW2 … HLK2 … HV2 … HWU2) -HVW2 -HLK2 -HV2
- lapply (cpss_lift … HW12 … HLK1 … HWU1 … HWU2) -HW12 -HLK1 -HWU1 -HWU2 /3 width=3/
- ]
-| #L1 #K1 #W1 #V1 #U1 #i #l #HLK1 #_ #HWU1 #IHWV1 #X #H #L2 #HL12
- elim (cpss_inv_lref1 … H) -H [ | -IHWV1 -HWU1 -HL12 ]
- [ #H destruct
- elim (lpss_ldrop_conf … HLK1 … HL12) -HL12 #X #H #HLK2
- elim (lpss_inv_pair1 … H) -H #K2 #W2 #HK12 #HW12 #H destruct
- lapply (ldrop_fwd_ldrop2 … HLK1) -HLK1 #HLK1
- elim (IHWV1 … HW12 … HK12) -IHWV1 -HK12 #V2 #HWV2 #_
- elim (lift_total W2 0 (i+1)) #U2 #HWU2
- lapply (cpss_lift … HW12 … HLK1 … HWU1 … HWU2) -HW12 -HLK1 -HWU1 /3 width=6/
- | * #K2 #V2 #W2 #HLK2 #_ #_
- lapply (ldrop_mono … HLK2 … HLK1) -HLK1 -HLK2 #H destruct
- ]
-| #a #I #L1 #V1 #T1 #U1 #l #_ #IHTU1 #X #H #L2 #HL12
- elim (cpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
- elim (IHTU1 … HT12 (L2.ⓑ{I}V2)) -IHTU1 -HT12 /2 width=1/ -HL12 /3 width=5/
-| #L1 #V1 #T1 #U1 #l #_ #IHTU1 #X #H #L2 #HL12
- elim (cpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
- elim (IHTU1 … HT12 … HL12) -IHTU1 -HT12 -HL12 /3 width=5/
-| #L1 #W1 #T1 #U1 #l #_ #IHTU1 #X #H #L2 #HL12
- elim (cpss_inv_flat1 … H) -H #W2 #T2 #HW12 #HT12 #H destruct
- elim (IHTU1 … HT12 … HL12) -IHTU1 -HT12 -HL12 /3 width=3/
-]
-qed-.
-
-lemma ssta_cpss_conf: ∀h,g,L,T1,U1,l. ⦃h, L⦄ ⊢ T1 •[g] ⦃l, U1⦄ →
- ∀T2. L ⊢ T1 ▶* T2 →
- ∃∃U2. ⦃h, L⦄ ⊢ T2 •[g] ⦃l, U2⦄ & L ⊢ U1 ▶* U2.
-/2 width=3 by ssta_cpss_lpss_conf/ qed-.
-
-lemma ssta_lpss_conf: ∀h,g,L1,T,U1,l. ⦃h, L1⦄ ⊢ T •[g] ⦃l, U1⦄ →
- ∀L2. L1 ⊢ ▶* L2 →
- ∃∃U2. ⦃h, L2⦄ ⊢ T •[g] ⦃l, U2⦄ & L1 ⊢ U1 ▶* U2.
-/2 width=3 by ssta_cpss_lpss_conf/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/grammar/cl_shift.ma".
-include "basic_2/relocation/ldrop_append.ma".
-include "basic_2/substitution/lsubr.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL SUBSTITUTION FOR TERMS ************************)
-
-inductive cpss: lenv → relation term ≝
-| cpss_atom : ∀I,L. cpss L (⓪{I}) (⓪{I})
-| cpss_delta: ∀L,K,V,V2,W2,i.
- ⇩[0, i] L ≡ K. ⓓV → cpss K V V2 →
- ⇧[0, i + 1] V2 ≡ W2 → cpss L (#i) W2
-| cpss_bind : ∀a,I,L,V1,V2,T1,T2.
- cpss L V1 V2 → cpss (L. ⓑ{I} V1) T1 T2 →
- cpss L (ⓑ{a,I} V1. T1) (ⓑ{a,I} V2. T2)
-| cpss_flat : ∀I,L,V1,V2,T1,T2.
- cpss L V1 V2 → cpss L T1 T2 →
- cpss L (ⓕ{I} V1. T1) (ⓕ{I} V2. T2)
-.
-
-interpretation "context-sensitive parallel substitution (term)"
- 'PSubstStar L T1 T2 = (cpss L T1 T2).
-
-(* Basic properties *********************************************************)
-
-lemma cpss_lsubr_trans: lsub_trans … cpss lsubr.
-#L1 #T1 #T2 #H elim H -L1 -T1 -T2
-[ //
-| #L1 #K1 #V1 #V2 #W2 #i #HLK1 #_ #HVW2 #IHV12 #L2 #HL12
- elim (lsubr_fwd_ldrop2_abbr … HL12 … HLK1) -HL12 -HLK1 /3 width=6/
-| /4 width=1/
-| /3 width=1/
-]
-qed-.
-
-(* Basic_1: was by definition: subst1_refl *)
-lemma cpss_refl: ∀T,L. L ⊢ T ▶* T.
-#T elim T -T //
-#I elim I -I /2 width=1/
-qed.
-
-(* Basic_1: was only: subst1_ex *)
-lemma cpss_delift: ∀K,V,T1,L,d. ⇩[0, d] L ≡ (K. ⓓV) →
- ∃∃T2,T. L ⊢ T1 ▶* T2 & ⇧[d, 1] T ≡ T2.
-#K #V #T1 elim T1 -T1
-[ * #i #L #d #HLK /2 width=4/
- elim (lt_or_eq_or_gt i d) #Hid /3 width=4/
- destruct
- elim (lift_total V 0 (i+1)) #W #HVW
- elim (lift_split … HVW i i) // /3 width=6/
-| * [ #a ] #I #W1 #U1 #IHW1 #IHU1 #L #d #HLK
- elim (IHW1 … HLK) -IHW1 #W2 #W #HW12 #HW2
- [ elim (IHU1 (L. ⓑ{I} W1) (d+1)) -IHU1 /2 width=1/ -HLK /3 width=9/
- | elim (IHU1 … HLK) -IHU1 -HLK /3 width=8/
- ]
-]
-qed-.
-
-lemma cpss_append: l_appendable_sn … cpss.
-#K #T1 #T2 #H elim H -K -T1 -T2 // /2 width=1/
-#K #K0 #V1 #V2 #W2 #i #HK0 #_ #HVW2 #IHV12 #L
-lapply (ldrop_fwd_length_lt2 … HK0) #H
-@(cpss_delta … (L@@K0) V1 … HVW2) //
-@(ldrop_O1_append_sn_le … HK0) /2 width=2/ (**) (* /3/ does not work *)
-qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-fact cpss_inv_atom1_aux: ∀L,T1,T2. L ⊢ T1 ▶* T2 → ∀I. T1 = ⓪{I} →
- T2 = ⓪{I} ∨
- ∃∃K,V,V2,i. ⇩[O, i] L ≡ K. ⓓV &
- K ⊢ V ▶* V2 &
- ⇧[O, i + 1] V2 ≡ T2 &
- I = LRef i.
-#L #T1 #T2 * -L -T1 -T2
-[ #I #L #J #H destruct /2 width=1/
-| #L #K #V #V2 #T2 #i #HLK #HV2 #HVT2 #I #H destruct /3 width=8/
-| #a #I #L #V1 #V2 #T1 #T2 #_ #_ #J #H destruct
-| #I #L #V1 #V2 #T1 #T2 #_ #_ #J #H destruct
-]
-qed-.
-
-lemma cpss_inv_atom1: ∀I,L,T2. L ⊢ ⓪{I} ▶* T2 →
- T2 = ⓪{I} ∨
- ∃∃K,V,V2,i. ⇩[O, i] L ≡ K. ⓓV &
- K ⊢ V ▶* V2 &
- ⇧[O, i + 1] V2 ≡ T2 &
- I = LRef i.
-/2 width=3 by cpss_inv_atom1_aux/ qed-.
-
-(* Basic_1: was only: subst1_gen_sort *)
-lemma cpss_inv_sort1: ∀L,T2,k. L ⊢ ⋆k ▶* T2 → T2 = ⋆k.
-#L #T2 #k #H
-elim (cpss_inv_atom1 … H) -H //
-* #K #V #V2 #i #_ #_ #_ #H destruct
-qed-.
-
-(* Basic_1: was only: subst1_gen_lref *)
-lemma cpss_inv_lref1: ∀L,T2,i. L ⊢ #i ▶* T2 →
- T2 = #i ∨
- ∃∃K,V,V2. ⇩[O, i] L ≡ K. ⓓV &
- K ⊢ V ▶* V2 &
- ⇧[O, i + 1] V2 ≡ T2.
-#L #T2 #i #H
-elim (cpss_inv_atom1 … H) -H /2 width=1/
-* #K #V #V2 #j #HLK #HV2 #HVT2 #H destruct /3 width=6/
-qed-.
-
-lemma cpss_inv_gref1: ∀L,T2,p. L ⊢ §p ▶* T2 → T2 = §p.
-#L #T2 #p #H
-elim (cpss_inv_atom1 … H) -H //
-* #K #V #V2 #i #_ #_ #_ #H destruct
-qed-.
-
-fact cpss_inv_bind1_aux: ∀L,U1,U2. L ⊢ U1 ▶* U2 →
- ∀a,I,V1,T1. U1 = ⓑ{a,I} V1. T1 →
- ∃∃V2,T2. L ⊢ V1 ▶* V2 &
- L. ⓑ{I} V1 ⊢ T1 ▶* T2 &
- U2 = ⓑ{a,I} V2. T2.
-#L #U1 #U2 * -L -U1 -U2
-[ #I #L #b #J #W1 #U1 #H destruct
-| #L #K #V #V2 #W2 #i #_ #_ #_ #b #J #W1 #U1 #H destruct
-| #a #I #L #V1 #V2 #T1 #T2 #HV12 #HT12 #b #J #W1 #U1 #H destruct /2 width=5/
-| #I #L #V1 #V2 #T1 #T2 #_ #_ #b #J #W1 #U1 #H destruct
-]
-qed-.
-
-lemma cpss_inv_bind1: ∀a,I,L,V1,T1,U2. L ⊢ ⓑ{a,I} V1. T1 ▶* U2 →
- ∃∃V2,T2. L ⊢ V1 ▶* V2 &
- L. ⓑ{I} V1 ⊢ T1 ▶* T2 &
- U2 = ⓑ{a,I} V2. T2.
-/2 width=3 by cpss_inv_bind1_aux/ qed-.
-
-fact cpss_inv_flat1_aux: ∀L,U1,U2. L ⊢ U1 ▶* U2 →
- ∀I,V1,T1. U1 = ⓕ{I} V1. T1 →
- ∃∃V2,T2. L ⊢ V1 ▶* V2 & L ⊢ T1 ▶* T2 &
- U2 = ⓕ{I} V2. T2.
-#L #U1 #U2 * -L -U1 -U2
-[ #I #L #J #W1 #U1 #H destruct
-| #L #K #V #V2 #W2 #i #_ #_ #_ #J #W1 #U1 #H destruct
-| #a #I #L #V1 #V2 #T1 #T2 #_ #_ #J #W1 #U1 #H destruct
-| #I #L #V1 #V2 #T1 #T2 #HV12 #HT12 #J #W1 #U1 #H destruct /2 width=5/
-]
-qed-.
-
-lemma cpss_inv_flat1: ∀I,L,V1,T1,U2. L ⊢ ⓕ{I} V1. T1 ▶* U2 →
- ∃∃V2,T2. L ⊢ V1 ▶* V2 & L ⊢ T1 ▶* T2 &
- U2 = ⓕ{I} V2. T2.
-/2 width=3 by cpss_inv_flat1_aux/ qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma cpss_fwd_tw: ∀L,T1,T2. L ⊢ T1 ▶* T2 → ♯{T1} ≤ ♯{T2}.
-#L #T1 #T2 #H elim H -L -T1 -T2 normalize
-/3 width=1 by monotonic_le_plus_l, le_plus/ (**) (* auto is too slow without trace *)
-qed-.
-
-lemma cpss_fwd_shift1: ∀L1,L,T1,T. L ⊢ L1 @@ T1 ▶* T →
- ∃∃L2,T2. |L1| = |L2| & T = L2 @@ T2.
-#L1 @(lenv_ind_dx … L1) -L1 normalize
-[ #L #T1 #T #HT1
- @(ex2_2_intro … (⋆)) // (**) (* explicit constructor *)
-| #I #L1 #V1 #IH #L #T1 #X
- >shift_append_assoc normalize #H
- elim (cpss_inv_bind1 … H) -H
- #V0 #T0 #_ #HT10 #H destruct
- elim (IH … HT10) -IH -HT10 #L2 #T2 #HL12 #H destruct
- >append_length >HL12 -HL12
- @(ex2_2_intro … (⋆.ⓑ{I}V0@@L2) T2) [ >append_length ] // /2 width=3/ (**) (* explicit constructor *)
-]
-qed-.
-
-(* Basic_1: removed theorems 27:
- 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
- subst1_gen_lift_eq subst1_confluence_neq
-*)
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/relocation/ldrop_ldrop.ma".
-include "basic_2/substitution/cpss.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL SUBSTITUTION FOR TERMS ************************)
-
-(* Relocation properties ****************************************************)
-
-(* Basic_1: was only: subst1_lift_lt subst1_lift_ge *)
-lemma cpss_lift: l_liftable cpss.
-#K #T1 #T2 #H elim H -K -T1 -T2
-[ #I #K #L #d #e #_ #U1 #H1 #U2 #H2
- >(lift_mono … H1 … H2) -H1 -H2 //
-| #K #KV #V #V2 #W2 #i #HKV #HV2 #HVW2 #IHV2 #L #d #e #HLK #U1 #H #U2 #HWU2
- elim (lift_inv_lref1 … H) * #Hid #H destruct
- [ elim (lift_trans_ge … HVW2 … HWU2) -W2 // <minus_plus #W2 #HVW2 #HWU2
- elim (ldrop_trans_le … HLK … HKV) -K /2 width=2/ #X #HLK #H
- elim (ldrop_inv_skip2 … H) -H /2 width=1/ -Hid #K #Y #HKV #HVY #H destruct /3 width=8/
- | lapply (lift_trans_be … HVW2 … HWU2 ? ?) -W2 // /2 width=1/ >plus_plus_comm_23 #HVU2
- lapply (ldrop_trans_ge_comm … HLK … HKV ?) -K // -Hid /3 width=6/
- ]
-| #a #I #K #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L #d #e #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=5/
-| #I #K #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L #d #e #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/
-]
-qed.
-
-(* Basic_1: was only: subst1_gen_lift_lt subst1_gen_lift_ge *)
-lemma cpss_inv_lift1: l_deliftable_sn cpss.
-#L #U1 #U2 #H elim H -L -U1 -U2
-[ * #L #i #K #d #e #_ #T1 #H
- [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3/
- | elim (lift_inv_lref2 … H) -H * #Hid #H destruct /3 width=3/
- | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3/
- ]
-| #L #LV #V #V2 #W2 #i #HLV #HV2 #HVW2 #IHV2 #K #d #e #HLK #T1 #H
- elim (lift_inv_lref2 … H) -H * #Hid #H destruct
- [ elim (ldrop_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_m_m // -Hid /3 width=8/
- | elim (le_inv_plus_l … Hid) #Hdie #Hei
- lapply (ldrop_conf_ge … HLK … HLV ?) -L // #HKLV
- elim (lift_split … HVW2 d (i - e + 1)) -HVW2 [4: // |3: /2 width=1/ |2: /3 width=1/ ] -Hid -Hdie
- #V1 #HV1 >plus_minus // <minus_minus // /2 width=1/ <minus_n_n <plus_n_O /3 width=8/
- ]
-| #a #I #L #V1 #V2 #U1 #U2 #_ #_ #IHV12 #IHU12 #K #d #e #HLK #X #H
- elim (lift_inv_bind2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
- elim (IHV12 … HLK … HWV1) -IHV12 #W2 #HW12 #HWV2
- elim (IHU12 … HTU1) -IHU12 -HTU1 /3 width=5/
-| #I #L #V1 #V2 #U1 #U2 #_ #_ #IHV12 #IHU12 #K #d #e #HLK #X #H
- elim (lift_inv_flat2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
- elim (IHV12 … HLK … HWV1) -V1
- elim (IHU12 … HLK … HTU1) -U1 -HLK /3 width=5/
-]
-qed-.
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/suptermplus_4.ma".
include "basic_2/relocation/fsup.ma".
(* PLUS-ITERATED SUPCLOSURE *************************************************)
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/suptermstar_4.ma".
include "basic_2/relocation/fsupq.ma".
(* STAR-ITERATED SUPCLOSURE *************************************************)
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/rat_3.ma".
include "basic_2/grammar/term_vector.ma".
(* GENERIC RELOCATION WITH PAIRS ********************************************)
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/rminus_3.ma".
include "basic_2/substitution/gr2.ma".
(* GENERIC RELOCATION WITH PAIRS ********************************************)
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/rdropstar_3.ma".
include "basic_2/relocation/ldrop.ma".
include "basic_2/substitution/gr2_minus.ma".
include "basic_2/substitution/lifts.ma".
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/rliftstar_3.ma".
include "basic_2/relocation/lift.ma".
include "basic_2/substitution/gr2_plus.ma".
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/grammar/lpx_sn.ma".
-include "basic_2/substitution/cpss.ma".
-
-(* SN PARALLEL SUBSTITUTION FOR LOCAL ENVIRONMENTS **************************)
-
-(* Basic_1: includes: csubst1_bind *)
-definition lpss: relation lenv ≝ lpx_sn cpss.
-
-interpretation "parallel substitution (local environment, sn variant)"
- 'PSubstStarSn L1 L2 = (lpss L1 L2).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma lpss_inv_atom1: ∀L2. ⋆ ⊢ ▶* L2 → L2 = ⋆.
-/2 width=4 by lpx_sn_inv_atom1_aux/ qed-.
-
-lemma lpss_inv_pair1: ∀I,K1,V1,L2. K1. ⓑ{I} V1 ⊢ ▶* L2 →
- ∃∃K2,V2. K1 ⊢ ▶* K2 & K1 ⊢ V1 ▶* V2 & L2 = K2. ⓑ{I} V2.
-/2 width=3 by lpx_sn_inv_pair1_aux/ qed-.
-
-lemma lpss_inv_atom2: ∀L1. L1 ⊢ ▶* ⋆ → L1 = ⋆.
-/2 width=4 by lpx_sn_inv_atom2_aux/ qed-.
-
-lemma lpss_inv_pair2: ∀I,L1,K2,V2. L1 ⊢ ▶* K2. ⓑ{I} V2 →
- ∃∃K1,V1. K1 ⊢ ▶* K2 & K1 ⊢ V1 ▶* V2 & L1 = K1. ⓑ{I} V1.
-/2 width=3 by lpx_sn_inv_pair2_aux/ qed-.
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was by definition: csubst1_refl *)
-lemma lpss_refl: ∀L. L ⊢ ▶* L.
-/2 width=1 by lpx_sn_refl/ qed.
-
-lemma lpss_pair: ∀I,K1,K2,V1,V2. K1 ⊢ ▶* K2 → K1 ⊢ V1 ▶* V2 →
- K1.ⓑ{I}V1 ⊢ ▶* K2.ⓑ{I}V2.
-/2 width=1/ qed.
-
-lemma lpss_append: ∀K1,K2. K1 ⊢ ▶* K2 → ∀L1,L2. L1 ⊢ ▶* L2 →
- L1 @@ K1 ⊢ ▶* L2 @@ K2.
-/3 width=1 by lpx_sn_append, cpss_append/ qed.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma lpss_fwd_length: ∀L1,L2. L1 ⊢ ▶* L2 → |L1| = |L2|.
-/2 width=2 by lpx_sn_fwd_length/ qed-.
-
-(* Advanced forward lemmas **************************************************)
-
-lemma lpss_fwd_append1: ∀K1,L1,L. K1 @@ L1 ⊢ ▶* L →
- ∃∃K2,L2. K1 ⊢ ▶* K2 & L = K2 @@ L2.
-/2 width=2 by lpx_sn_fwd_append1/ qed-.
-
-lemma lpss_fwd_append2: ∀L,K2,L2. L ⊢ ▶* K2 @@ L2 →
- ∃∃K1,L1. K1 ⊢ ▶* K2 & L = K1 @@ L1.
-/2 width=2 by lpx_sn_fwd_append2/ qed-.
-
-(* Basic_1: removed theorems 28:
- csubst0_clear_O csubst0_drop_lt csubst0_drop_gt csubst0_drop_eq
- csubst0_clear_O_back csubst0_clear_S csubst0_clear_trans
- csubst0_drop_gt_back csubst0_drop_eq_back csubst0_drop_lt_back
- csubst0_gen_sort csubst0_gen_head csubst0_getl_ge csubst0_getl_lt
- csubst0_gen_S_bind_2 csubst0_getl_ge_back csubst0_getl_lt_back
- csubst0_snd_bind csubst0_fst_bind csubst0_both_bind
- csubst1_head csubst1_flat csubst1_gen_head
- csubst1_getl_ge csubst1_getl_lt csubst1_getl_ge_back getl_csubst1
- fsubst0_gen_base
-*)
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/grammar/lpx_sn_lpx_sn.ma".
-include "basic_2/substitution/fsupp.ma".
-include "basic_2/substitution/lpss_ldrop.ma".
-
-(* SN PARALLEL SUBSTITUTION FOR LOCAL ENVIRONMENTS **************************)
-
-(* Main properties on context-sensitive parallel substitution for terms *****)
-
-theorem cpss_trans_lpss: lpx_sn_transitive cpss cpss.
-#L0 #T0 @(fsupp_wf_ind … L0 T0) -L0 -T0 #L0 #T0 #IH #L1 * [|*]
-[ #I #HL #HT #T #H1 #L2 #HL12 #T2 #HT2 destruct
- elim (cpss_inv_atom1 … H1) -H1
- [ #H destruct
- elim (cpss_inv_atom1 … HT2) -HT2
- [ #H destruct //
- | * #K2 #V #V2 #i #HLK2 #HV2 #HVT2 #H destruct
- elim (lpss_ldrop_trans_O1 … HL12 … HLK2) -L2 #X #HLK1 #H
- elim (lpss_inv_pair2 … H) -H #K1 #V1 #HK12 #HV1 #H destruct
- lapply (fsupp_lref … HLK1) /3 width=9/
- ]
- | * #K1 #V1 #V #i #HLK1 #HV1 #HVT #H destruct
- elim (lpss_ldrop_conf … HLK1 … HL12) -HL12 #X #H #HLK2
- elim (lpss_inv_pair1 … H) -H #K2 #W2 #HK12 #_ #H destruct
- lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
- elim (cpss_inv_lift1 … HT2 … HLK2 … HVT) -L2 -T
- lapply (fsupp_lref … HLK1) /3 width=9/
- ]
-| #a #I #V1 #T1 #HL #HT #X1 #H1 #L2 #HL12 #X2 #H2
- elim (cpss_inv_bind1 … H1) -H1 #V #T #HV1 #HT1 #H destruct
- elim (cpss_inv_bind1 … H2) -H2 #V2 #T2 #HV2 #HT2 #H destruct /4 width=5/
-| #I #V1 #T1 #HL #HT #X1 #H1 #L2 #HL12 #X2 #H2
- elim (cpss_inv_flat1 … H1) -H1 #V #T #HV1 #HT1 #H destruct
- elim (cpss_inv_flat1 … H2) -H2 #V2 #T2 #HV2 #HT2 #H destruct /3 width=5/
-]
-qed-.
-
-(* Basic_1: was only: subst1_trans *)
-theorem cpss_trans: ∀L. Transitive … (cpss L).
-/2 width=5 by cpss_trans_lpss/ qed-.
-
-(* Properties on context-sensitive parallel substitution for terms **********)
-
-(* Basic_1: was only: subst1_subst1 *)
-lemma lpss_cpss_trans: ∀L1,L2. L1 ⊢ ▶* L2 →
- ∀T1,T2. L2 ⊢ T1 ▶* T2 → L1 ⊢ T1 ▶* T2.
-/2 width=5 by cpss_trans_lpss/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/relocation/fsup.ma".
-include "basic_2/relocation/ldrop_lpx_sn.ma".
-include "basic_2/substitution/cpss_lift.ma".
-include "basic_2/substitution/lpss.ma".
-
-(* SN PARALLEL SUBSTITUTION FOR LOCAL ENVIRONMENTS **************************)
-
-(* Properies on local environment slicing ***********************************)
-
-lemma lpss_ldrop_conf: dropable_sn lpss.
-/3 width=5 by lpx_sn_deliftable_dropable, cpss_inv_lift1/ qed-.
-
-lemma ldrop_lpss_trans: dedropable_sn lpss.
-/3 width=9 by lpx_sn_liftable_dedropable, cpss_lift/ qed-.
-
-lemma lpss_ldrop_trans_O1: dropable_dx lpss.
-/2 width=3 by lpx_sn_dropable/ qed-.
-
-(* Properties on context-sensitive parallel substitution for terms **********)
-
-lemma fsup_cpss_trans: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ → ∀U2. L2 ⊢ T2 ▶* U2 →
- ∃∃L,U1. L1 ⊢ ▶* L & L ⊢ T1 ▶* U1 & ⦃L, U1⦄ ⊃ ⦃L2, U2⦄.
-#L1 #L2 #T1 #T2 #H elim H -L1 -L2 -T1 -T2 [2: * ] [1,2,3,4,5: /3 width=5/ ]
-[ #L #K #U #T #d #e #HLK #HUT #He #U2 #HU2
- elim (lift_total U2 d e) #T2 #HUT2
- lapply (cpss_lift … HU2 … HLK … HUT … HUT2) -HU2 -HUT /3 width=9/
-| #L1 #K1 #K2 #T1 #T2 #U1 #d #e #HLK1 #HTU1 #_ #IHT12 #U2 #HTU2
- elim (IHT12 … HTU2) -IHT12 -HTU2 #K #T #HK1 #HT1 #HT2
- elim (lift_total T d e) #U #HTU
- elim (ldrop_lpss_trans … HLK1 … HK1) -HLK1 -HK1 #L2 #HL12 #HL2K
- lapply (cpss_lift … HT1 … HL2K … HTU1 … HTU) -HT1 -HTU1 /3 width=11/
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/substitution/lpss_cpss.ma".
-
-(* SN PARALLEL SUBSTITUTION ON LOCAL ENVIRONMENTS ***************************)
-
-(* Main properties on context-sensitive parallel substitution for terms *****)
-
-fact cpss_conf_lpss_atom_atom:
- ∀I,L1,L2. ∃∃T. L1 ⊢ ⓪{I} ▶* T & L2 ⊢ ⓪{I} ▶* T.
-/2 width=3/ qed-.
-
-fact cpss_conf_lpss_atom_delta:
- ∀L0,i. (
- ∀L,T. ⦃L0, #i⦄ ⊃+ ⦃L, T⦄ →
- ∀T1. L ⊢ T ▶* T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ▶* L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ▶* T0
- ) →
- ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
- ∀V2. K0 ⊢ V0 ▶* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
- ∀L1. L0 ⊢ ▶* L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ #i ▶* T & L2 ⊢ T2 ▶* T.
-#L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
-elim (lpss_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
-elim (lpss_inv_pair1 … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct
-elim (lpss_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
-elim (lpss_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
-lapply (fsupp_lref … HLK0) -HLK0 #HLK0
-elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
-elim (lift_total V 0 (i+1)) #T #HVT
-lapply (cpss_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 /3 width=6/
-qed-.
-
-fact cpss_conf_lpss_delta_delta:
- ∀L0,i. (
- ∀L,T. ⦃L0, #i⦄ ⊃+ ⦃L, T⦄ →
- ∀T1. L ⊢ T ▶* T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ▶* L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ▶* T0
- ) →
- ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
- ∀V1. K0 ⊢ V0 ▶* V1 → ∀T1. ⇧[O, i + 1] V1 ≡ T1 →
- ∀KX,VX. ⇩[O, i] L0 ≡ KX.ⓓVX →
- ∀V2. KX ⊢ VX ▶* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
- ∀L1. L0 ⊢ ▶* L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ T1 ▶* T & L2 ⊢ T2 ▶* T.
-#L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1
-#KX #VX #H #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
-lapply (ldrop_mono … H … HLK0) -H #H destruct
-elim (lpss_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
-elim (lpss_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK1) -W1 #HLK1
-elim (lpss_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
-elim (lpss_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
-lapply (fsupp_lref … HLK0) -HLK0 #HLK0
-elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
-elim (lift_total V 0 (i+1)) #T #HVT
-lapply (cpss_lift … HV1 … HLK1 … HVT1 … HVT) -K1 -V1
-lapply (cpss_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 -V /2 width=3/
-qed-.
-
-fact cpss_conf_lpss_bind_bind:
- ∀a,I,L0,V0,T0. (
- ∀L,T. ⦃L0,ⓑ{a,I}V0.T0⦄ ⊃+ ⦃L,T⦄ →
- ∀T1. L ⊢ T ▶* T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ▶* L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ▶* T0
- ) →
- ∀V1. L0 ⊢ V0 ▶* V1 → ∀T1. L0.ⓑ{I}V0 ⊢ T0 ▶* T1 →
- ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0.ⓑ{I}V0 ⊢ T0 ▶* T2 →
- ∀L1. L0 ⊢ ▶* L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ ⓑ{a,I}V1.T1 ▶* T & L2 ⊢ ⓑ{a,I}V2.T2 ▶* T.
-#a #I #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 // /2 width=1/ /3 width=5/
-qed-.
-
-fact cpss_conf_lpss_flat_flat:
- ∀I,L0,V0,T0. (
- ∀L,T. ⦃L0,ⓕ{I}V0.T0⦄ ⊃+ ⦃L,T⦄ →
- ∀T1. L ⊢ T ▶* T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ▶* L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ▶* T0
- ) →
- ∀V1. L0 ⊢ V0 ▶* V1 → ∀T1. L0 ⊢ T0 ▶* T1 →
- ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0 ⊢ T0 ▶* T2 →
- ∀L1. L0 ⊢ ▶* L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ ⓕ{I}V1.T1 ▶* T & L2 ⊢ ⓕ{I}V2.T2 ▶* T.
-#I #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/
-qed-.
-
-theorem cpss_conf_lpss: lpx_sn_confluent cpss cpss.
-#L0 #T0 @(fsupp_wf_ind … L0 T0) -L0 -T0 #L #T #IH #L0 * [|*]
-[ #I0 #HL #HT #T1 #H1 #T2 #H2 #L1 #HL01 #L2 #HL02 destruct
- elim (cpss_inv_atom1 … H1) -H1
- elim (cpss_inv_atom1 … H2) -H2
- [ #H2 #H1 destruct
- /2 width=1 by cpss_conf_lpss_atom_atom/
- | * #K0 #V0 #V2 #i2 #HLK0 #HV02 #HVT2 #H2 #H1 destruct
- /3 width=10 by cpss_conf_lpss_atom_delta/
- | #H2 * #K0 #V0 #V1 #i1 #HLK0 #HV01 #HVT1 #H1 destruct
- /4 width=10 by ex2_commute, cpss_conf_lpss_atom_delta/
- | * #X #Y #V2 #z #H #HV02 #HVT2 #H2
- * #K0 #V0 #V1 #i #HLK0 #HV01 #HVT1 #H1 destruct
- /3 width=17 by cpss_conf_lpss_delta_delta/
- ]
-| #a #I #V0 #T0 #HL #HT #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
- elim (cpss_inv_bind1 … H1) -H1 #V1 #T1 #HV01 #HT01 #H destruct
- elim (cpss_inv_bind1 … H2) -H2 #V2 #T2 #HV02 #HT02 #H destruct
- /3 width=10 by cpss_conf_lpss_bind_bind/
-| #I #V0 #T0 #HL #HT #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
- elim (cpss_inv_flat1 … H1) -H1 #V1 #T1 #HV01 #HT01 #H destruct
- elim (cpss_inv_flat1 … H2) -H2 #V2 #T2 #HV02 #HT02 #H destruct
- /3 width=10 by cpss_conf_lpss_flat_flat/
-]
-qed-.
-
-(* Basic_1: was only: subst1_confluence_eq *)
-theorem cpss_conf: ∀L. confluent … (cpss L).
-/2 width=6 by cpss_conf_lpss/ qed-.
-
-(* Properties on context-sensitive parallel substitution for terms **********)
-
-(* Basic_1: was only: subst1_subst1_back *)
-lemma lpss_cpss_conf_dx: ∀L0,T0,T1. L0 ⊢ T0 ▶* T1 → ∀L1. L0 ⊢ ▶* L1 →
- ∃∃T. L1 ⊢ T0 ▶* T & L1 ⊢ T1 ▶* T.
-#L0 #T0 #T1 #HT01 #L1 #HL01
-elim (cpss_conf_lpss … HT01 T0 … HL01 … HL01) // -L0 /2 width=3/
-qed-.
-
-lemma lpss_cpss_conf_sn: ∀L0,T0,T1. L0 ⊢ T0 ▶* T1 → ∀L1. L0 ⊢ ▶* L1 →
- ∃∃T. L1 ⊢ T0 ▶* T & L0 ⊢ T1 ▶* T.
-#L0 #T0 #T1 #HT01 #L1 #HL01
-elim (cpss_conf_lpss … HT01 T0 … L0 … HL01) // -HT01 -HL01 /2 width=3/
-qed-.
-
-(* Main properties **********************************************************)
-
-theorem lpss_conf: confluent … lpss.
-/3 width=6 by lpx_sn_conf, cpss_conf_lpss/
-qed-.
-
-theorem lpss_trans: Transitive … lpss.
-/3 width=5 by lpx_sn_trans, cpss_trans_lpss/
-qed-.
-
-(* Advanced forward lemmas **************************************************)
-
-lemma cpss_fwd_shift1: ∀L1,L,T1,T. L ⊢ L1 @@ T1 ▶* T →
- ∃∃L2,T2. L @@ L1 ⊢ ▶* L @@ L2 & L @@ L1 ⊢ T1 ▶* T2 &
- T = L2 @@ T2.
-#L1 @(lenv_ind_dx … L1) -L1
-[ #L #T1 #T #HT1
- @ex3_2_intro [3: // |4,5: // |1,2: skip ] (**) (* /2 width=4/ does not work *)
-| #I #L1 #V1 #IH #L #T1 #T >shift_append_assoc #H <append_assoc
- elim (cpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
- elim (IH … HT12) -IH -HT12 #L2 #T #HL12 #HT1 #H destruct
- lapply (lpss_trans … HL12 (L.ⓑ{I}V2@@L2) ?) -HL12 /3 width=1/ #HL12
- @(ex3_2_intro … (⋆.ⓑ{I}V2@@L2)) [4: /2 width=3/ | skip ] <append_assoc // (**) (* explicit constructor *)
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/relocation/ldrop.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR SUBSTITUTION ****************************)
-
-inductive lsubr: relation lenv ≝
-| lsubr_sort: ∀L. lsubr L (⋆)
-| lsubr_abbr: ∀L1,L2,V. lsubr L1 L2 → lsubr (L1. ⓓV) (L2.ⓓV)
-| lsubr_abst: ∀I,L1,L2,V1,V2. lsubr L1 L2 → lsubr (L1. ⓑ{I}V1) (L2. ⓛV2)
-.
-
-interpretation
- "local environment refinement (substitution)"
- 'CrSubEq L1 L2 = (lsubr L1 L2).
-
-(* Basic properties *********************************************************)
-
-lemma lsubr_bind: ∀I,L1,L2,V. L1 ⊑ L2 → L1. ⓑ{I} V ⊑ L2.ⓑ{I} V.
-* /2 width=1/ qed.
-
-lemma lsubr_abbr: ∀I,L1,L2,V. L1 ⊑ L2 → L1. ⓓV ⊑ L2. ⓑ{I}V.
-* /2 width=1/ qed.
-
-lemma lsubr_refl: ∀L. L ⊑ L.
-#L elim L -L // /2 width=1/
-qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-fact lsubr_inv_atom1_aux: ∀L1,L2. L1 ⊑ L2 → L1 = ⋆ → L2 = ⋆.
-#L1 #L2 * -L1 -L2 //
-[ #L1 #L2 #V #_ #H destruct
-| #I #L1 #L2 #V1 #V2 #_ #H destruct
-]
-qed-.
-
-lemma lsubr_inv_atom1: ∀L2. ⋆ ⊑ L2 → L2 = ⋆.
-/2 width=3 by lsubr_inv_atom1_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
-| #L1 #L2 #V #HL12 #K2 #W #H destruct /2 width=3/
-| #I #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-.
-
-fact lsubr_inv_abst2_aux: ∀L1,L2. L1 ⊑ L2 → ∀K2,W2. L2 = K2.ⓛW2 →
- ∃∃I,K1,W1. K1 ⊑ K2 & L1 = K1.ⓑ{I}W1.
-#L1 #L2 * -L1 -L2
-[ #L #K2 #W2 #H destruct
-| #L1 #L2 #V #_ #K2 #W2 #H destruct
-| #I #L1 #L2 #V1 #V2 #HL12 #K2 #W2 #H destruct /2 width=5/
-]
-qed-.
-
-lemma lsubr_inv_abst2: ∀L1,K2,W2. L1 ⊑ K2.ⓛW2 →
- ∃∃I,K1,W1. K1 ⊑ K2 & L1 = K1.ⓑ{I}W1.
-/2 width=4 by lsubr_inv_abst2_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/
-qed-.
-
-lemma lsubr_fwd_ldrop2_abbr: ∀L1,L2. L1 ⊑ L2 →
- ∀K2,W,i. ⇩[0, i] L2 ≡ K2. ⓓW →
- ∃∃K1. K1 ⊑ K2 & ⇩[0, i] L1 ≡ K1. ⓓW.
-#L1 #L2 #H elim H -L1 -L2
-[ #L #K2 #W #i #H
- elim (ldrop_inv_atom1 … H) -H #H destruct
-| #L1 #L2 #V #HL12 #IHL12 #K2 #W #i #H
- elim (ldrop_inv_O1_pair1 … H) -H * #Hi #HLK2 destruct [ -IHL12 | -HL12 ]
- [ /2 width=3/
- | elim (IHL12 … HLK2) -IHL12 -HLK2 /3 width=3/
- ]
-| #I #L1 #L2 #V1 #V2 #_ #IHL12 #K2 #W #i #H
- elim (ldrop_inv_O1_pair1 … H) -H * #Hi #HLK2 destruct
- elim (IHL12 … HLK2) -IHL12 -HLK2 /3 width=3/
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/substitution/lsubr.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR SUBSTITUTION ****************************)
-
-(* Auxiliary inversion lemmas ***********************************************)
-
-fact lsubr_inv_abbr1_aux: ∀L1,L2. L1 ⊑ L2 → ∀K1,W. L1 = K1.ⓓW →
- ∨∨ L2 = ⋆
- | ∃∃K2. K1 ⊑ K2 & L2 = K2.ⓓW
- | ∃∃K2,W2. K1 ⊑ K2 & L2 = K2.ⓛW2.
-#L1 #L2 * -L1 -L2
-[ #L #K1 #W #H destruct /2 width=1/
-| #L1 #L2 #V #HL12 #K1 #W #H destruct /3 width=3/
-| #I #L1 #L2 #V1 #V2 #HL12 #K1 #W #H destruct /3 width=4/
-]
-qed-.
-
-lemma lsubr_inv_abbr1: ∀K1,L2,W. K1.ⓓW ⊑ L2 →
- ∨∨ L2 = ⋆
- | ∃∃K2. K1 ⊑ K2 & L2 = K2.ⓓW
- | ∃∃K2,W2. K1 ⊑ K2 & L2 = K2.ⓛW2.
-/2 width=3 by lsubr_inv_abbr1_aux/ qed-.
-
-fact lsubr_inv_abst1_aux: ∀L1,L2. L1 ⊑ L2 → ∀K1,W1. L1 = K1.ⓛW1 →
- L2 = ⋆ ∨
- ∃∃K2,W2. K1 ⊑ K2 & L2 = K2.ⓛW2.
-#L1 #L2 * -L1 -L2
-[ #L #K1 #W1 #H destruct /2 width=1/
-| #L1 #L2 #V #_ #K1 #W1 #H destruct
-| #I #L1 #L2 #V1 #V2 #HL12 #K1 #W1 #H destruct /3 width=4/
-]
-qed-.
-
-lemma lsubr_inv_abst1: ∀K1,L2,W1. K1.ⓛW1 ⊑ L2 →
- L2 = ⋆ ∨
- ∃∃K2,W2. K1 ⊑ K2 & L2 = K2.ⓛW2.
-/2 width=4 by lsubr_inv_abst1_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 //
-| #L1 #L #V #_ #IHL1 #X #H
- elim (lsubr_inv_abbr1 … H) -H // *
- #L2 [2: #V2 ] #HL2 #H destruct /3 width=1/
-| #I #L1 #L #V1 #V #_ #IHL1 #X #H
- elim (lsubr_inv_abst1 … H) -H // *
- #L2 #V2 #HL2 #H destruct /3 width=1/
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/substitution/cpss.ma".
-
-(* CONTEXT-SENSITIVE RESTRICTED PARALLEL COMPUTATION FOR TERMS **************)
-
-inductive cpqs: lenv → relation term ≝
-| cpqs_atom : ∀I,L. cpqs L (⓪{I}) (⓪{I})
-| cpqs_delta: ∀L,K,V,V2,W2,i.
- ⇩[0, i] L ≡ K. ⓓV → cpqs K V V2 →
- ⇧[0, i + 1] V2 ≡ W2 → cpqs L (#i) W2
-| cpqs_bind : ∀a,I,L,V1,V2,T1,T2.
- cpqs L V1 V2 → cpqs (L. ⓑ{I} V1) T1 T2 →
- cpqs L (ⓑ{a,I} V1. T1) (ⓑ{a,I} V2. T2)
-| cpqs_flat : ∀I,L,V1,V2,T1,T2.
- cpqs L V1 V2 → cpqs L T1 T2 →
- cpqs L (ⓕ{I} V1. T1) (ⓕ{I} V2. T2)
-| cpqs_zeta : ∀L,V,T1,T,T2. cpqs (L.ⓓV) T1 T →
- ⇧[0, 1] T2 ≡ T → cpqs L (+ⓓV. T1) T2
-| cpqs_tau : ∀L,V,T1,T2. cpqs L T1 T2 → cpqs L (ⓝV. T1) T2
-.
-
-interpretation "context-sensitive restricted parallel computation (term)"
- 'PRestStar L T1 T2 = (cpqs L T1 T2).
-
-(* Basic properties *********************************************************)
-
-lemma cpqs_lsubr_trans: lsub_trans … cpqs lsubr.
-#L1 #T1 #T2 #H elim H -L1 -T1 -T2
-[ //
-| #L1 #K1 #V1 #V2 #W2 #i #HLK1 #_ #HVW2 #IHV12 #L2 #HL12
- elim (lsubr_fwd_ldrop2_abbr … HL12 … HLK1) -HL12 -HLK1 /3 width=6/
-| /4 width=1/
-|4,6: /3 width=1/
-| /4 width=3/
-]
-qed-.
-
-lemma cpss_cpqs: ∀L,T1,T2. L ⊢ T1 ▶* T2 → L ⊢ T1 ➤* T2.
-#L #T1 #T2 #H elim H -L -T1 -T2 // /2 width=1/ /2 width=6/
-qed.
-
-lemma cpqs_refl: ∀T,L. L ⊢ T ➤* T.
-/2 width=1/ qed.
-
-lemma cpqs_delift: ∀L,K,V,T1,d. ⇩[0, d] L ≡ (K. ⓓV) →
- ∃∃T2,T. L ⊢ T1 ➤* T2 & ⇧[d, 1] T ≡ T2.
-#L #K #V #T1 #d #HLK
-elim (cpss_delift … T1 … HLK) -HLK /3 width=4/
-qed-.
-
-lemma cpqs_append: l_appendable_sn … cpqs.
-#K #T1 #T2 #H elim H -K -T1 -T2 // /2 width=1/ /2 width=3/
-#K #K0 #V1 #V2 #W2 #i #HK0 #_ #HVW2 #IHV12 #L
-lapply (ldrop_fwd_length_lt2 … HK0) #H
-@(cpqs_delta … (L@@K0) V1 … HVW2) //
-@(ldrop_O1_append_sn_le … HK0) /2 width=2/ (**) (* /3/ does not work *)
-qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-fact cpqs_inv_atom1_aux: ∀L,T1,T2. L ⊢ T1 ➤* T2 → ∀I. T1 = ⓪{I} →
- T2 = ⓪{I} ∨
- ∃∃K,V,V2,i. ⇩[O, i] L ≡ K. ⓓV &
- K ⊢ V ➤* V2 &
- ⇧[O, i + 1] V2 ≡ T2 &
- I = LRef i.
-#L #T1 #T2 * -L -T1 -T2
-[ #I #L #J #H destruct /2 width=1/
-| #L #K #V #V2 #T2 #i #HLK #HV2 #HVT2 #J #H destruct /3 width=8/
-| #a #I #L #V1 #V2 #T1 #T2 #_ #_ #J #H destruct
-| #I #L #V1 #V2 #T1 #T2 #_ #_ #J #H destruct
-| #L #V #T1 #T #T2 #_ #_ #J #H destruct
-| #L #V #T1 #T2 #_ #J #H destruct
-]
-qed-.
-
-lemma cpqs_inv_atom1: ∀I,L,T2. L ⊢ ⓪{I} ➤* T2 →
- T2 = ⓪{I} ∨
- ∃∃K,V,V2,i. ⇩[O, i] L ≡ K. ⓓV &
- K ⊢ V ➤* V2 &
- ⇧[O, i + 1] V2 ≡ T2 &
- I = LRef i.
-/2 width=3 by cpqs_inv_atom1_aux/ qed-.
-
-lemma cpqs_inv_sort1: ∀L,T2,k. L ⊢ ⋆k ➤* T2 → T2 = ⋆k.
-#L #T2 #k #H
-elim (cpqs_inv_atom1 … H) -H //
-* #K #V #V2 #i #_ #_ #_ #H destruct
-qed-.
-
-lemma cpqs_inv_lref1: ∀L,T2,i. L ⊢ #i ➤* T2 →
- T2 = #i ∨
- ∃∃K,V,V2. ⇩[O, i] L ≡ K. ⓓV &
- K ⊢ V ➤* V2 &
- ⇧[O, i + 1] V2 ≡ T2.
-#L #T2 #i #H
-elim (cpqs_inv_atom1 … H) -H /2 width=1/
-* #K #V #V2 #j #HLK #HV2 #HVT2 #H destruct /3 width=6/
-qed-.
-
-lemma cpqs_inv_gref1: ∀L,T2,p. L ⊢ §p ➤* T2 → T2 = §p.
-#L #T2 #p #H
-elim (cpqs_inv_atom1 … H) -H //
-* #K #V #V2 #i #_ #_ #_ #H destruct
-qed-.
-
-fact cpqs_inv_bind1_aux: ∀L,U1,U2. L ⊢ U1 ➤* U2 →
- ∀a,I,V1,T1. U1 = ⓑ{a,I} V1. T1 → (
- ∃∃V2,T2. L ⊢ V1 ➤* V2 &
- L. ⓑ{I} V1 ⊢ T1 ➤* T2 &
- U2 = ⓑ{a,I} V2. T2
- ) ∨
- ∃∃T. L.ⓓV1 ⊢ T1 ➤* T & ⇧[0, 1] U2 ≡ T & a = true & I = Abbr.
-#L #U1 #U2 * -L -U1 -U2
-[ #I #L #b #J #W1 #U1 #H destruct
-| #L #K #V #V2 #W2 #i #_ #_ #_ #b #J #W1 #U1 #H destruct
-| #a #I #L #V1 #V2 #T1 #T2 #HV12 #HT12 #b #J #W1 #U1 #H destruct /3 width=5/
-| #I #L #V1 #V2 #T1 #T2 #_ #_ #b #J #W1 #U1 #H destruct
-| #L #V #T1 #T #T2 #HT1 #HT2 #b #J #W1 #U1 #H destruct /3 width=3/
-| #L #V #T1 #T2 #_ #b #J #W1 #U1 #H destruct
-]
-qed-.
-
-lemma cpqs_inv_bind1: ∀a,I,L,V1,T1,U2. L ⊢ ⓑ{a,I} V1. T1 ➤* U2 → (
- ∃∃V2,T2. L ⊢ V1 ➤* V2 &
- L. ⓑ{I} V1 ⊢ T1 ➤* T2 &
- U2 = ⓑ{a,I} V2. T2
- ) ∨
- ∃∃T. L.ⓓV1 ⊢ T1 ➤* T & ⇧[0, 1] U2 ≡ T & a = true & I = Abbr.
-/2 width=3 by cpqs_inv_bind1_aux/ qed-.
-
-lemma cpqs_inv_abbr1: ∀a,L,V1,T1,U2. L ⊢ ⓓ{a} V1. T1 ➤* U2 → (
- ∃∃V2,T2. L ⊢ V1 ➤* V2 &
- L. ⓓ V1 ⊢ T1 ➤* T2 &
- U2 = ⓓ{a} V2. T2
- ) ∨
- ∃∃T. L.ⓓV1 ⊢ T1 ➤* T & ⇧[0, 1] U2 ≡ T & a = true.
-#a #L #V1 #T1 #U2 #H
-elim (cpqs_inv_bind1 … H) -H * /3 width=3/ /3 width=5/
-qed-.
-
-lemma cpqs_inv_abst1: ∀a,L,V1,T1,U2. L ⊢ ⓛ{a} V1. T1 ➤* U2 →
- ∃∃V2,T2. L ⊢ V1 ➤* V2 &
- L. ⓛ V1 ⊢ T1 ➤* T2 &
- U2 = ⓛ{a} V2. T2.
-#a #L #V1 #T1 #U2 #H
-elim (cpqs_inv_bind1 … H) -H *
-[ /3 width=5/
-| #T #_ #_ #_ #H destruct
-]
-qed-.
-
-fact cpqs_inv_flat1_aux: ∀L,U1,U2. L ⊢ U1 ➤* U2 →
- ∀I,V1,T1. U1 = ⓕ{I} V1. T1 → (
- ∃∃V2,T2. L ⊢ V1 ➤* V2 & L ⊢ T1 ➤* T2 &
- U2 = ⓕ{I} V2. T2
- ) ∨
- (L ⊢ T1 ➤* U2 ∧ I = Cast).
-#L #U1 #U2 * -L -U1 -U2
-[ #I #L #J #W1 #U1 #H destruct
-| #L #K #V #V2 #W2 #i #_ #_ #_ #J #W1 #U1 #H destruct
-| #a #I #L #V1 #V2 #T1 #T2 #_ #_ #J #W1 #U1 #H destruct
-| #I #L #V1 #V2 #T1 #T2 #HV12 #HT12 #J #W1 #U1 #H destruct /3 width=5/
-| #L #V #T1 #T #T2 #_ #_ #J #W1 #U1 #H destruct
-| #L #V #T1 #T2 #HT12 #J #W1 #U1 #H destruct /3 width=1/
-]
-qed-.
-
-lemma cpqs_inv_flat1: ∀I,L,V1,T1,U2. L ⊢ ⓕ{I} V1. T1 ➤* U2 → (
- ∃∃V2,T2. L ⊢ V1 ➤* V2 & L ⊢ T1 ➤* T2 &
- U2 = ⓕ{I} V2. T2
- ) ∨
- (L ⊢ T1 ➤* U2 ∧ I = Cast).
-/2 width=3 by cpqs_inv_flat1_aux/ qed-.
-
-lemma cpqs_inv_appl1: ∀L,V1,T1,U2. L ⊢ ⓐ V1. T1 ➤* U2 →
- ∃∃V2,T2. L ⊢ V1 ➤* V2 & L ⊢ T1 ➤* T2 &
- U2 = ⓐ V2. T2.
-#L #V1 #T1 #U2 #H elim (cpqs_inv_flat1 … H) -H *
-[ /3 width=5/
-| #_ #H destruct
-]
-qed-.
-
-lemma cpqs_inv_cast1: ∀L,V1,T1,U2. L ⊢ ⓝ V1. T1 ➤* U2 → (
- ∃∃V2,T2. L ⊢ V1 ➤* V2 & L ⊢ T1 ➤* T2 &
- U2 = ⓝ V2. T2
- ) ∨
- L ⊢ T1 ➤* U2.
-#L #V1 #T1 #U2 #H elim (cpqs_inv_flat1 … H) -H * /2 width=1/ /3 width=5/
-qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma cpqs_fwd_shift1: ∀L1,L,T1,T. L ⊢ L1 @@ T1 ➤* T →
- ∃∃L2,T2. |L1| = |L2| & T = L2 @@ T2.
-#L1 @(lenv_ind_dx … L1) -L1 normalize
-[ #L #T1 #T #HT1
- @(ex2_2_intro … (⋆)) // (**) (* explicit constructor *)
-| #I #L1 #V1 #IH #L #T1 #X
- >shift_append_assoc normalize #H
- elim (cpqs_inv_bind1 … H) -H *
- [ #V0 #T0 #_ #HT10 #H destruct
- elim (IH … HT10) -IH -HT10 #L2 #T2 #HL12 #H destruct
- >append_length >HL12 -HL12
- @(ex2_2_intro … (⋆.ⓑ{I}V0@@L2) T2) [ >append_length ] // /2 width=3/ (**) (* explicit constructor *)
- | #T #_ #_ #H destruct
- ]
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/relocation/ldrop_ldrop.ma".
-include "basic_2/unfold/cpqs.ma".
-
-(* CONTEXT-SENSITIVE RESTRICTED PARALLEL COMPUTATION FOR TERMS **************)
-
-(* Relocation properties ****************************************************)
-
-lemma cpqs_lift: l_liftable cpqs.
-#K #T1 #T2 #H elim H -K -T1 -T2
-[ #I #K #L #d #e #_ #U1 #H1 #U2 #H2
- >(lift_mono … H1 … H2) -H1 -H2 //
-| #K #KV #V #V2 #W2 #i #HKV #HV2 #HVW2 #IHV2 #L #d #e #HLK #U1 #H #U2 #HWU2
- elim (lift_inv_lref1 … H) * #Hid #H destruct
- [ elim (lift_trans_ge … HVW2 … HWU2) -W2 // <minus_plus #W2 #HVW2 #HWU2
- elim (ldrop_trans_le … HLK … HKV) -K /2 width=2/ #X #HLK #H
- elim (ldrop_inv_skip2 … H) -H /2 width=1/ -Hid #K #Y #HKV #HVY #H destruct /3 width=8/
- | lapply (lift_trans_be … HVW2 … HWU2 ? ?) -W2 // /2 width=1/ >plus_plus_comm_23 #HVU2
- lapply (ldrop_trans_ge_comm … HLK … HKV ?) -K // -Hid /3 width=6/
- ]
-| #a #I #K #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L #d #e #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=5/
-| #I #K #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L #d #e #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/
-| #K #V #T1 #T #T2 #_ #HT2 #IHT1 #L #d #e #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=5/
-| #K #V #T1 #T2 #_ #IHT12 #L #d #e #HLK #U1 #H #U2 #HTU2
- elim (lift_inv_flat1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct /3 width=5/
-]
-qed.
-
-lemma cpqs_inv_lift1: l_deliftable_sn cpqs.
-#L #U1 #U2 #H elim H -L -U1 -U2
-[ * #L #i #K #d #e #_ #T1 #H
- [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3/
- | elim (lift_inv_lref2 … H) -H * #Hid #H destruct /3 width=3/
- | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3/
- ]
-| #L #LV #V #V2 #W2 #i #HLV #HV2 #HVW2 #IHV2 #K #d #e #HLK #T1 #H
- elim (lift_inv_lref2 … H) -H * #Hid #H destruct
- [ elim (ldrop_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_m_m // -Hid /3 width=8/
- | elim (le_inv_plus_l … Hid) #Hdie #Hei
- lapply (ldrop_conf_ge … HLK … HLV ?) -L // #HKLV
- elim (lift_split … HVW2 d (i - e + 1)) -HVW2 [4: // |3: /2 width=1/ |2: /3 width=1/ ] -Hid -Hdie
- #V1 #HV1 >plus_minus // <minus_minus // /2 width=1/ <minus_n_n <plus_n_O /3 width=8/
- ]
-| #a #I #L #V1 #V2 #U1 #U2 #_ #_ #IHV12 #IHU12 #K #d #e #HLK #X #H
- elim (lift_inv_bind2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
- elim (IHV12 … HLK … HWV1) -IHV12 #W2 #HW12 #HWV2
- elim (IHU12 … HTU1) -IHU12 -HTU1 /3 width=5/
-| #I #L #V1 #V2 #U1 #U2 #_ #_ #IHV12 #IHU12 #K #d #e #HLK #X #H
- elim (lift_inv_flat2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
- elim (IHV12 … HLK … HWV1) -V1
- elim (IHU12 … HLK … HTU1) -U1 -HLK /3 width=5/
-| #L #V #U1 #U #U2 #_ #HU2 #IHU1 #K #d #e #HLK #X #H
- elim (lift_inv_bind2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
- elim (IHU1 (K.ⓓW1) … HTU1) /2 width=1/ -L -U1 #T #HTU #HT1
- elim (lift_div_le … HU2 … HTU) -U // /3 width=5/
-| #L #V #U1 #U2 #_ #IHU12 #K #d #e #HLK #X #H
- elim (lift_inv_flat2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
- elim (IHU12 … HLK … HTU1) -L -U1 /3 width=3/
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/substitution/lpss.ma".
-include "basic_2/unfold/cpqs.ma".
-
-(* SN RESTRICTED PARALLEL COMPUTATION FOR LOCAL ENVIRONMENTS ****************)
-
-definition lpqs: relation lenv ≝ lpx_sn cpqs.
-
-interpretation "restricted parallel computation (local environment, sn variant)"
- 'PRestStarSn L1 L2 = (lpqs L1 L2).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma lpqs_inv_atom1: ∀L2. ⋆ ⊢ ➤* L2 → L2 = ⋆.
-/2 width=4 by lpx_sn_inv_atom1_aux/ qed-.
-
-lemma lpqs_inv_pair1: ∀I,K1,V1,L2. K1. ⓑ{I} V1 ⊢ ➤* L2 →
- ∃∃K2,V2. K1 ⊢ ➤* K2 & K1 ⊢ V1 ➤* V2 & L2 = K2. ⓑ{I} V2.
-/2 width=3 by lpx_sn_inv_pair1_aux/ qed-.
-
-lemma lpqs_inv_atom2: ∀L1. L1 ⊢ ➤* ⋆ → L1 = ⋆.
-/2 width=4 by lpx_sn_inv_atom2_aux/ qed-.
-
-lemma lpqs_inv_pair2: ∀I,L1,K2,V2. L1 ⊢ ➤* K2. ⓑ{I} V2 →
- ∃∃K1,V1. K1 ⊢ ➤* K2 & K1 ⊢ V1 ➤* V2 & L1 = K1. ⓑ{I} V1.
-/2 width=3 by lpx_sn_inv_pair2_aux/ qed-.
-
-(* Basic properties *********************************************************)
-
-lemma lpqs_refl: ∀L. L ⊢ ➤* L.
-/2 width=1 by lpx_sn_refl/ qed.
-
-lemma lpqs_pair: ∀I,K1,K2,V1,V2. K1 ⊢ ➤* K2 → K1 ⊢ V1 ➤* V2 →
- K1.ⓑ{I}V1 ⊢ ➤* K2.ⓑ{I}V2.
-/2 width=1/ qed.
-
-lemma lpqs_append: ∀K1,K2. K1 ⊢ ➤* K2 → ∀L1,L2. L1 ⊢ ➤* L2 →
- L1 @@ K1 ⊢ ➤* L2 @@ K2.
-/3 width=1 by lpx_sn_append, cpqs_append/ qed.
-
-lemma lpss_lpqs: ∀L1,L2. L1 ⊢ ▶* L2 → L1 ⊢ ➤* L2.
-#L1 #L2 #H elim H -L1 -L2 // /3 width=1/
-qed.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma lpqs_fwd_length: ∀L1,L2. L1 ⊢ ➤* L2 → |L1| = |L2|.
-/2 width=2 by lpx_sn_fwd_length/ qed-.
-
-(* Advanced forward lemmas **************************************************)
-
-lemma lpqs_fwd_append1: ∀K1,L1,L. K1 @@ L1 ⊢ ➤* L →
- ∃∃K2,L2. K1 ⊢ ➤* K2 & L = K2 @@ L2.
-/2 width=2 by lpx_sn_fwd_append1/ qed-.
-
-lemma lpqs_fwd_append2: ∀L,K2,L2. L ⊢ ➤* K2 @@ L2 →
- ∃∃K1,L1. K1 ⊢ ➤* K2 & L = K1 @@ L1.
-/2 width=2 by lpx_sn_fwd_append2/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/grammar/lpx_sn_lpx_sn.ma".
-include "basic_2/substitution/fsupp.ma".
-include "basic_2/unfold/lpqs_ldrop.ma".
-
-(* SN RESTRICTED PARALLEL COMPUTATION FOR LOCAL ENVIRONMENTS ****************)
-
-(* Main properties on context-sensitive rest parallel computation for terms *)
-
-theorem cpqs_trans_lpqs: lpx_sn_transitive cpqs cpqs.
-#L0 #T0 @(fsupp_wf_ind … L0 T0) -L0 -T0 #L0 #T0 #IH #L1 * [|*]
-[ #I #HL #HT #T #H1 #L2 #HL12 #T2 #HT2 destruct
- elim (cpqs_inv_atom1 … H1) -H1
- [ #H destruct
- elim (cpqs_inv_atom1 … HT2) -HT2
- [ #H destruct //
- | * #K2 #V #V2 #i #HLK2 #HV2 #HVT2 #H destruct
- elim (lpqs_ldrop_trans_O1 … HL12 … HLK2) -L2 #X #HLK1 #H
- elim (lpqs_inv_pair2 … H) -H #K1 #V1 #HK12 #HV1 #H destruct
- lapply (fsupp_lref … HLK1) /3 width=9/
- ]
- | * #K1 #V1 #V #i #HLK1 #HV1 #HVT #H destruct
- elim (lpqs_ldrop_conf … HLK1 … HL12) -HL12 #X #H #HLK2
- elim (lpqs_inv_pair1 … H) -H #K2 #W2 #HK12 #_ #H destruct
- lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
- elim (cpqs_inv_lift1 … HT2 … HLK2 … HVT) -L2 -T
- lapply (fsupp_lref … HLK1) /3 width=9/
- ]
-| #a #I #V1 #T1 #HL #HT #X1 #H1 #L2 #HL12 #X2 #H2
- elim (cpqs_inv_bind1 … H1) -H1 *
- [ #V #T #HV1 #HT1 #H destruct
- elim (cpqs_inv_bind1 … H2) -H2 *
- [ #V2 #T2 #HV2 #HT2 #H destruct /4 width=5/
- | #T2 #HT2 #HXT2 #H1 #H2 destruct /4 width=5/
- ]
- | #Y1 #HTY1 #HXY1 #H11 #H12 destruct
- elim (lift_total X2 0 1) #Y2 #HXY2
- lapply (cpqs_lift … H2 (L2.ⓓV1) … HXY1 … HXY2) /2 width=1/ -X1 /4 width=5/
- ]
-| #I #V1 #T1 #HL #HT #X1 #H1 #L2 #HL12 #X2 #H2
- elim (cpqs_inv_flat1 … H1) -H1 *
- [ #V #T #HV1 #HT1 #H destruct
- elim (cpqs_inv_flat1 … H2) -H2 *
- [ #V2 #T2 #HV2 #HT2 #H destruct /3 width=5/
- | #HX2 #H destruct /3 width=5/
- ]
- | #HX1 #H destruct /3 width=5/
-]
-qed-.
-
-theorem cpqs_trans: ∀L. Transitive … (cpqs L).
-/2 width=5 by cpqs_trans_lpqs/ qed-.
-
-(* Properties on context-sensitive rest. parallel computation for terms *****)
-
-lemma lpqs_cpqs_trans: ∀L1,L2. L1 ⊢ ➤* L2 →
- ∀T1,T2. L2 ⊢ T1 ➤* T2 → L1 ⊢ T1 ➤* T2.
-/2 width=5 by cpqs_trans_lpqs/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/relocation/fsup.ma".
-include "basic_2/relocation/ldrop_lpx_sn.ma".
-include "basic_2/unfold/cpqs_lift.ma".
-include "basic_2/unfold/lpqs.ma".
-
-(* SN RESTRICTED PARALLEL COMPUTATION FOR LOCAL ENVIRONMENTS ****************)
-
-(* Properies on local environment slicing ***********************************)
-
-lemma lpqs_ldrop_conf: dropable_sn lpqs.
-/3 width=5 by lpx_sn_deliftable_dropable, cpqs_inv_lift1/ qed-.
-
-lemma ldrop_lpqs_trans: dedropable_sn lpqs.
-/3 width=9 by lpx_sn_liftable_dedropable, cpqs_lift/ qed-.
-
-lemma lpqs_ldrop_trans_O1: dropable_dx lpqs.
-/2 width=3 by lpx_sn_dropable/ qed-.
-
-(* Properties on context-sensitive rest. parallel computation for terms *****)
-
-lemma fsup_cpqs_trans: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ → ∀U2. L2 ⊢ T2 ➤* U2 →
- ∃∃L,U1. L1 ⊢ ➤* L & L ⊢ T1 ➤* U1 & ⦃L, U1⦄ ⊃ ⦃L2, U2⦄.
-#L1 #L2 #T1 #T2 #H elim H -L1 -L2 -T1 -T2 [2: * ] [1,2,3,4,5: /3 width=5/ ]
-[ #L #K #U #T #d #e #HLK #HUT #He #U2 #HU2
- elim (lift_total U2 d e) #T2 #HUT2
- lapply (cpqs_lift … HU2 … HLK … HUT … HUT2) -HU2 -HUT /3 width=9/
-| #L1 #K1 #K2 #T1 #T2 #U1 #d #e #HLK1 #HTU1 #_ #IHT12 #U2 #HTU2
- elim (IHT12 … HTU2) -IHT12 -HTU2 #K #T #HK1 #HT1 #HT2
- elim (lift_total T d e) #U #HTU
- elim (ldrop_lpqs_trans … HLK1 … HK1) -HLK1 -HK1 #L2 #HL12 #HL2K
- lapply (cpqs_lift … HT1 … HL2K … HTU1 … HTU) -HT1 -HTU1 /3 width=11/
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/unfold/lpqs_cpqs.ma".
-
-(* SN RESTRICTED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *****************)
-
-(* Main properties on context-sensitive rest parallel computation for terms *)
-
-fact cpqs_conf_lpqs_atom_atom:
- ∀I,L1,L2. ∃∃T. L1 ⊢ ⓪{I} ➤* T & L2 ⊢ ⓪{I} ➤* T.
-/2 width=3/ qed-.
-
-fact cpqs_conf_lpqs_atom_delta:
- ∀L0,i. (
- ∀L,T. ⦃L0, #i⦄ ⊃+ ⦃L, T⦄ →
- ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
- ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
- ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
- ) →
- ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
- ∀V2. K0 ⊢ V0 ➤* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
- ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
- ∃∃T. L1 ⊢ #i ➤* T & L2 ⊢ T2 ➤* T.
-#L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
-elim (lpqs_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
-elim (lpqs_inv_pair1 … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct
-elim (lpqs_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
-elim (lpqs_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
-lapply (fsupp_lref … HLK0) -HLK0 #HLK0
-elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
-elim (lift_total V 0 (i+1)) #T #HVT
-lapply (cpqs_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 /3 width=6/
-qed-.
-
-fact cpqs_conf_lpqs_delta_delta:
- ∀L0,i. (
- ∀L,T. ⦃L0, #i⦄ ⊃+ ⦃L, T⦄ →
- ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
- ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
- ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
- ) →
- ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
- ∀V1. K0 ⊢ V0 ➤* V1 → ∀T1. ⇧[O, i + 1] V1 ≡ T1 →
- ∀KX,VX. ⇩[O, i] L0 ≡ KX.ⓓVX →
- ∀V2. KX ⊢ VX ➤* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
- ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
- ∃∃T. L1 ⊢ T1 ➤* T & L2 ⊢ T2 ➤* T.
-#L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1
-#KX #VX #H #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
-lapply (ldrop_mono … H … HLK0) -H #H destruct
-elim (lpqs_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
-elim (lpqs_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK1) -W1 #HLK1
-elim (lpqs_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
-elim (lpqs_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
-lapply (fsupp_lref … HLK0) -HLK0 #HLK0
-elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
-elim (lift_total V 0 (i+1)) #T #HVT
-lapply (cpqs_lift … HV1 … HLK1 … HVT1 … HVT) -K1 -V1
-lapply (cpqs_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 -V /2 width=3/
-qed-.
-
-fact cpqs_conf_lpqs_bind_bind:
- ∀a,I,L0,V0,T0. (
- ∀L,T. ⦃L0,ⓑ{a,I}V0.T0⦄ ⊃+ ⦃L,T⦄ →
- ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
- ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
- ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
- ) →
- ∀V1. L0 ⊢ V0 ➤* V1 → ∀T1. L0.ⓑ{I}V0 ⊢ T0 ➤* T1 →
- ∀V2. L0 ⊢ V0 ➤* V2 → ∀T2. L0.ⓑ{I}V0 ⊢ T0 ➤* T2 →
- ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
- ∃∃T. L1 ⊢ ⓑ{a,I}V1.T1 ➤* T & L2 ⊢ ⓑ{a,I}V2.T2 ➤* T.
-#a #I #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 // /2 width=1/ /3 width=5/
-qed-.
-
-fact cpqs_conf_lpqs_bind_zeta:
- ∀L0,V0,T0. (
- ∀L,T. ⦃L0,+ⓓV0.T0⦄ ⊃+ ⦃L,T⦄ →
- ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
- ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
- ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
- ) →
- ∀V1. L0 ⊢ V0 ➤* V1 → ∀T1. L0.ⓓV0 ⊢ T0 ➤* T1 →
- ∀T2. L0.ⓓV0 ⊢ T0 ➤* T2 → ∀X2. ⇧[O, 1] X2 ≡ T2 →
- ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
- ∃∃T. L1 ⊢ +ⓓV1.T1 ➤* T & L2 ⊢ X2 ➤* T.
-#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/ -L0 -V0 -T0 #T #HT1 #HT2
-elim (cpqs_inv_lift1 … HT2 L2 … HXT2) -T2 /2 width=1/ /3 width=3/
-qed-.
-
-fact cpqs_conf_lpqs_zeta_zeta:
- ∀L0,V0,T0. (
- ∀L,T. ⦃L0,+ⓓV0.T0⦄ ⊃+ ⦃L,T⦄ →
- ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
- ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
- ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
- ) →
- ∀T1. L0.ⓓV0 ⊢ T0 ➤* T1 → ∀X1. ⇧[O, 1] X1 ≡ T1 →
- ∀T2. L0.ⓓV0 ⊢ T0 ➤* T2 → ∀X2. ⇧[O, 1] X2 ≡ T2 →
- ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
- ∃∃T. L1 ⊢ X1 ➤* T & L2 ⊢ X2 ➤* T.
-#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/ -L0 -T0 #T #HT1 #HT2
-elim (cpqs_inv_lift1 … HT1 L1 … HXT1) -T1 /2 width=1/ #T1 #HT1 #HXT1
-elim (cpqs_inv_lift1 … HT2 L2 … HXT2) -T2 /2 width=1/ #T2 #HT2 #HXT2
-lapply (lift_inj … HT2 … HT1) -T #H destruct /2 width=3/
-qed-.
-
-fact cpqs_conf_lpqs_flat_flat:
- ∀I,L0,V0,T0. (
- ∀L,T. ⦃L0,ⓕ{I}V0.T0⦄ ⊃+ ⦃L,T⦄ →
- ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
- ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
- ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
- ) →
- ∀V1. L0 ⊢ V0 ➤* V1 → ∀T1. L0 ⊢ T0 ➤* T1 →
- ∀V2. L0 ⊢ V0 ➤* V2 → ∀T2. L0 ⊢ T0 ➤* T2 →
- ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
- ∃∃T. L1 ⊢ ⓕ{I}V1.T1 ➤* T & L2 ⊢ ⓕ{I}V2.T2 ➤* T.
-#I #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/
-qed-.
-
-fact cpqs_conf_lpqs_flat_tau:
- ∀L0,V0,T0. (
- ∀L,T. ⦃L0,ⓝV0.T0⦄ ⊃+ ⦃L,T⦄ →
- ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
- ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
- ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
- ) →
- ∀V1,T1. L0 ⊢ T0 ➤* T1 → ∀T2. L0 ⊢ T0 ➤* T2 →
- ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
- ∃∃T. L1 ⊢ ⓝV1.T1 ➤* T & L2 ⊢ T2 ➤* T.
-#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/
-qed-.
-
-fact cpqs_conf_lpqs_tau_tau:
- ∀L0,V0,T0. (
- ∀L,T. ⦃L0,ⓝV0.T0⦄ ⊃+ ⦃L,T⦄ →
- ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
- ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
- ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
- ) →
- ∀T1. L0 ⊢ T0 ➤* T1 → ∀T2. L0 ⊢ T0 ➤* T2 →
- ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
- ∃∃T. L1 ⊢ T1 ➤* T & L2 ⊢ T2 ➤* T.
-#L0 #V0 #T0 #IH #T1 #HT01
-#T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /2 width=3/
-qed-.
-
-theorem cpqs_conf_lpqs: lpx_sn_confluent cpqs cpqs.
-#L0 #T0 @(fsupp_wf_ind … L0 T0) -L0 -T0 #L #T #IH #L0 * [|*]
-[ #I0 #HL #HT #T1 #H1 #T2 #H2 #L1 #HL01 #L2 #HL02 destruct
- elim (cpqs_inv_atom1 … H1) -H1
- elim (cpqs_inv_atom1 … H2) -H2
- [ #H2 #H1 destruct
- /2 width=1 by cpqs_conf_lpqs_atom_atom/
- | * #K0 #V0 #V2 #i2 #HLK0 #HV02 #HVT2 #H2 #H1 destruct
- /3 width=10 by cpqs_conf_lpqs_atom_delta/
- | #H2 * #K0 #V0 #V1 #i1 #HLK0 #HV01 #HVT1 #H1 destruct
- /4 width=10 by ex2_commute, cpqs_conf_lpqs_atom_delta/
- | * #X #Y #V2 #z #H #HV02 #HVT2 #H2
- * #K0 #V0 #V1 #i #HLK0 #HV01 #HVT1 #H1 destruct
- /3 width=17 by cpqs_conf_lpqs_delta_delta/
- ]
-| #a #I #V0 #T0 #HL #HT #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
- elim (cpqs_inv_bind1 … H1) -H1 *
- [ #V1 #T1 #HV01 #HT01 #H1
- | #T1 #HT01 #HXT1 #H11 #H12
- ]
- elim (cpqs_inv_bind1 … H2) -H2 *
- [1,3: #V2 #T2 #HV02 #HT02 #H2
- |2,4: #T2 #HT02 #HXT2 #H21 #H22
- ] destruct
- [ /3 width=10 by cpqs_conf_lpqs_bind_bind/
- | /4 width=11 by ex2_commute, cpqs_conf_lpqs_bind_zeta/
- | /3 width=11 by cpqs_conf_lpqs_bind_zeta/
- | /3 width=12 by cpqs_conf_lpqs_zeta_zeta/
- ]
-| #I #V0 #T0 #HL #HT #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
- elim (cpqs_inv_flat1 … H1) -H1 *
- [ #V1 #T1 #HV01 #HT01 #H1
- | #HX1 #H1
- ]
- elim (cpqs_inv_flat1 … H2) -H2 *
- [1,3: #V2 #T2 #HV02 #HT02 #H2
- |2,4: #HX2 #H2
- ] destruct
- [ /3 width=10 by cpqs_conf_lpqs_flat_flat/
- | /4 width=8 by ex2_commute, cpqs_conf_lpqs_flat_tau/
- | /3 width=8 by cpqs_conf_lpqs_flat_tau/
- | /3 width=7 by cpqs_conf_lpqs_tau_tau/
- ]
-]
-qed-.
-
-theorem cpqs_conf: ∀L. confluent … (cpqs L).
-/2 width=6 by cpqs_conf_lpqs/ qed-.
-
-(* Properties on context-sensitive rest. parallel computation for terms *****)
-
-lemma lpqs_cpqs_conf_dx: ∀L0,T0,T1. L0 ⊢ T0 ➤* T1 → ∀L1. L0 ⊢ ➤* L1 →
- ∃∃T. L1 ⊢ T0 ➤* T & L1 ⊢ T1 ➤* T.
-#L0 #T0 #T1 #HT01 #L1 #HL01
-elim (cpqs_conf_lpqs … HT01 T0 … HL01 … HL01) // -L0 /2 width=3/
-qed-.
-
-lemma lpqs_cpqs_conf_sn: ∀L0,T0,T1. L0 ⊢ T0 ➤* T1 → ∀L1. L0 ⊢ ➤* L1 →
- ∃∃T. L1 ⊢ T0 ➤* T & L0 ⊢ T1 ➤* T.
-#L0 #T0 #T1 #HT01 #L1 #HL01
-elim (cpqs_conf_lpqs … HT01 T0 … L0 … HL01) // -HT01 -HL01 /2 width=3/
-qed-.
-
-(* Main properties **********************************************************)
-
-theorem lpqs_conf: confluent … lpqs.
-/3 width=6 by lpx_sn_conf, cpqs_conf_lpqs/
-qed-.
-
-theorem lpqs_trans: Transitive … lpqs.
-/3 width=5 by lpx_sn_trans, cpqs_trans_lpqs/
-qed-.
-
-(* Advanced forward lemmas **************************************************)
-
-lemma cpqs_fwd_shift1: ∀L1,L,T1,T. L ⊢ L1 @@ T1 ➤* T →
- ∃∃L2,T2. L @@ L1 ⊢ ➤* L @@ L2 & L @@ L1 ⊢ T1 ➤* T2 &
- T = L2 @@ T2.
-#L1 @(lenv_ind_dx … L1) -L1
-[ #L #T1 #T #HT1
- @ex3_2_intro [3: // |4,5: // |1,2: skip ] (**) (* /2 width=4/ does not work *)
-| #I #L1 #V1 #IH #L #T1 #T >shift_append_assoc #H <append_assoc
- elim (cpqs_inv_bind1 … H) -H *
- [ #V2 #T2 #HV12 #HT12 #H destruct
- elim (IH … HT12) -IH -HT12 #L2 #T #HL12 #HT1 #H destruct
- lapply (lpqs_trans … HL12 (L.ⓑ{I}V2@@L2) ?) -HL12 /3 width=1/ #HL12
- @(ex3_2_intro … (⋆.ⓑ{I}V2@@L2)) [4: /2 width=3/ | skip ] <append_assoc // (**) (* explicit constructor *)
- | #T #_ #_ #H destruct
- ]
-]
-qed-.
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/statictypestar_5.ma".
include "basic_2/static/ssta.ma".
(* ITERATED STRATIFIED STATIC TYPE ASSIGNMENT FOR TERMS *********************)
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The 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_2/static/ssta_lpss.ma".
-include "basic_2/unfold/sstas.ma".
-
-(* ITERATED STRATIFIED STATIC TYPE ASSIGNMENT FOR TERMS *********************)
-
-(* Properties about sn parallel substitution for local environments *********)
-
-lemma sstas_cpss_lpss_conf: ∀h,g,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 •*[g] U1 →
- ∀T2. L1 ⊢ T1 ▶* T2 → ∀L2. L1 ⊢ ▶* L2 →
- ∃∃U2. ⦃h, L2⦄ ⊢ T2 •*[g] U2 & L1 ⊢ U1 ▶* U2.
-#h #g #L1 #T1 #U1 #H @(sstas_ind_dx … H) -T1 /2 width=3/
-#T0 #U0 #l0 #HTU0 #_ #IHU01 #T #HT0 #L2 #HL12
-elim (ssta_cpss_lpss_conf … HTU0 … HT0 … HL12) -HTU0 -HT0 #U #HTU #HU0
-elim (IHU01 … HU0 … HL12) -IHU01 -U0 -HL12 /3 width=4/
-qed-.
-
-lemma sstas_cpss_conf: ∀h,g,L,T1,U1. ⦃h, L⦄ ⊢ T1 •*[g] U1 →
- ∀T2. L ⊢ T1 ▶* T2 →
- ∃∃U2. ⦃h, L⦄ ⊢ T2 •*[g] U2 & L ⊢ U1 ▶* U2.
-/2 width=3 by sstas_cpss_lpss_conf/ qed-.
-
-lemma sstas_lpss_conf: ∀h,g,L1,T,U1. ⦃h, L1⦄ ⊢ T •*[g] U1 →
- ∀L2. L1 ⊢ ▶* L2 →
- ∃∃U2. ⦃h, L2⦄ ⊢ T •*[g] U2 & L1 ⊢ U1 ▶* U2.
-/2 width=3 by sstas_cpss_lpss_conf/ qed-.
(* *)
(**************************************************************************)
+include "basic_2/notation/relations/unfold_3.ma".
include "basic_2/grammar/lenv_append.ma".
include "basic_2/relocation/ldrop.ma".
.
interpretation "context-sensitive unfold (term)"
- 'Unwind L1 T L2 = (unfold L1 T L2).
+ 'Unfold L1 T L2 = (unfold L1 T L2).
}
]
[ { "stratified native validity" * } {
- [ "snv ( ⦃?,?⦄ ⊢ ? ¡[?] )" "snv_lift" + "snv_lpss" + "snv_aaa" + "snv_ssta" + "snv_sstas" + "snv_ssta_lpr" + "snv_lpr" + "snv_cpcs" * ]
+ [ "snv ( ⦃?,?⦄ ⊢ ? ¡[?] )" "snv_lift" + "snv_aaa" + "snv_ssta" + "snv_sstas" + "snv_ssta_lpr" + "snv_lpr" + "snv_cpcs" * ]
}
]
}
]
class "blue"
[ { "equivalence" * } {
- [ { "local env. ref. for stratified static type assignment" * } {
- [ "lsubss ( ? •⊑[?] ? )" "lsubss_ldrop" + "lsubss_ssta" + "lsubss_cpcs" * ]
- }
- ]
[ { "context-sensitive equivalence" * } {
- [ "cpcs ( ? ⊢ ? ⬌* ? )" "cpcs_lpss" + "cpcs_aaa" + "cpcs_cprs" + "cpcs_cpcs" * ]
+ [ "cpcs ( ? ⊢ ? ⬌* ? )" "cpcs_aaa" + "cpcs_cprs" + "cpcs_cpcs" * ]
}
]
}
}
]
[ { "decomposed extended computation" * } {
- [ "dxprs ( ⦃?,?⦄ ⊢ ? •*➡*[?] ? )" "dxprs_lift" + "dxprs_lpss" + "dxprs_aaa" + "dxprs_dxprs" * ]
+ [ "dxprs ( ⦃?,?⦄ ⊢ ? •*➡*[?] ? )" "dxprs_lift" + "dxprs_aaa" + "dxprs_dxprs" * ]
}
]
[ { "context-sensitive extended computation" * } {
}
]
[ { "context-sensitive computation" * } {
- [ "lprs ( ? ⊢ ➡* ? )" "lprs_alt ( ? ⊢ ➡➡* ? )" "lprs_ldrop" + "lprs_lpss" + "lprs_cprs" + "lprs_lprs" * ]
- [ "cprs ( ? ⊢ ? ➡* ?)" "cprs_lift" + "cprs_lpss" + "cprs_cprs" * ]
+ [ "lprs ( ? ⊢ ➡* ? )" "lprs_alt ( ? ⊢ ➡➡* ? )" "lprs_ldrop" + "lprs_cprs" + "lprs_lprs" * ]
+ [ "cprs ( ? ⊢ ? ➡* ?)" "cprs_lift" + "cprs_cprs" * ]
}
]
[ { "local env. ref. for abstract candidates of reducibility" * } {
[ "crx ( ⦃?,?⦄ ⊢ 𝐑[?]⦃?⦄ )" "crx_append" + "crx_lift" * ]
}
]
- [ { "local env. ref. for extended reduction" * } {
- [ "lsubx ( ? ⓝ⊑ ? )" "lsubx_lsubx" * ]
- }
- ]
[ { "context-sensitive normal forms" * } {
[ "cnr ( ? ⊢ 𝐍⦃?⦄ )" "cnr_lift" + "cnr_crr" + "cnr_cir" * ]
}
]
[ { "context-sensitive reduction" * } {
- [ "lpr ( ? ⊢ ➡ ? )" "lpr_ldrop" + "lpr_lpss" + "lpr_lpr" * ]
+ [ "lpr ( ? ⊢ ➡ ? )" "lpr_ldrop" + "lpr_lpr" * ]
[ "cpr ( ? ⊢ ? ➡ ? )" "cpr_lift" + "cpr_cir" * ]
}
]
[ "crr ( ? ⊢ 𝐑⦃?⦄ )" "crr_append" + "crr_lift" * ]
}
]
+ [ { "local env. ref. for extended reduction" * } {
+ [ "lsubx ( ? ⓝ⊑ ? )" "lsubx_lsubx" * ]
+ }
+ ]
}
]
class "green"
[ { "unfold" * } {
- [ { "restricted parallel computation" * } {
- [ "lpqs ( ? ⊢ ➤* ? )" "lpqs_ldrop" + "lpqs_cpqs" + "lpqs_lpqs" * ]
- [ "cpqs ( ? ⊢ ? ➤* ? )" "cpqs_lift" * ]
- }
- ]
[ { "unfold" * } {
[ "unfold ( ? ⊢ ? ⧫* ? )" * ]
}
]
[ { "iterated stratified static type assignment" * } {
- [ "sstas ( ⦃?,?⦄ ⊢ ? •*[?] ? )" "sstas_lift" + "sstas_lpss" + "sstas_aaa" + "sstas_sstas" * ]
+ [ "sstas ( ⦃?,?⦄ ⊢ ? •*[?] ? )" "sstas_lift" + "sstas_aaa" + "sstas_sstas" * ]
}
]
}
class "grass"
[ { "static typing" * } {
[ { "stratified static type assignment" * } {
- [ "ssta ( ⦃?,?⦄ ⊢ ? •[?,?] ? )" "ssta_lift" + "ssta_lpss" + "ssta_aaa" + "ssta_ssta" * ]
+ [ "ssta ( ⦃?,?⦄ ⊢ ? •[?,?] ? )" "ssta_lift" + "ssta_aaa" + "ssta_ssta" * ]
}
]
[ { "local env. ref. for atomic arity assignment" * } {
}
]
[ { "atomic arity assignment" * } {
- [ "aaa ( ? ⊢ ? ⁝ ? )" "aaa_lift" + "aaa_lifts" + "aaa_lpss" + "aaa_aaa" * ]
+ [ "aaa ( ? ⊢ ? ⁝ ? )" "aaa_lift" + "aaa_lifts" + "aaa_aaa" * ]
}
]
[ { "parameters" * } {
]
class "yellow"
[ { "substitution" * } {
- [ { "parallel substitution" * } {
- [ "lpss ( ? ⊢ ▶* ? )" "lpss_ldrop" + "lpss_cpss" + "lpss_lpss" * ]
- [ "cpss ( ? ⊢ ? ▶* ? )" "cpss_lift" * ]
- }
- ]
- [ { "local env. ref. for substitution" * } {
- [ "lsubr ( ? ⊑ ? )" "lsubr_lsubr" * ]
- }
- ]
[ { "iterated structural successor for closures" * } {
[ "fsups ( ⦃?,?⦄ ⊃* ⦃?,?⦄ )" "fsups_fsups" * ]
[ "fsupp ( ⦃?,?⦄ ⊃+ ⦃?,?⦄ )" "fsupp_fsupp" * ]
<key name="ex">6 6</key>
<key name="ex">6 7</key>
<key name="ex">7 4</key>
+ <key name="ex">7 5</key>
<key name="ex">7 7</key>
<key name="ex">8 5</key>
+ <key name="ex">8 6</key>
<key name="or">3</key>
<key name="or">4</key>
<key name="or">5</key>
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, 5) *)
+
+inductive ex7_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3,P4,P5,P6:A0→A1→A2→A3→A4→Prop) : Prop ≝
+ | ex7_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 → ex7_5 ? ? ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (7, 5)" 'Ex P0 P1 P2 P3 P4 P5 P6 = (ex7_5 ? ? ? ? ? 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 ≝
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 existental quantifier (8, 6) *)
+
+inductive ex8_6 (A0,A1,A2,A3,A4,A5:Type[0]) (P0,P1,P2,P3,P4,P5,P6,P7:A0→A1→A2→A3→A4→A5→Prop) : Prop ≝
+ | ex8_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 → P6 x0 x1 x2 x3 x4 x5 → P7 x0 x1 x2 x3 x4 x5 → ex8_6 ? ? ? ? ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (8, 6)" 'Ex P0 P1 P2 P3 P4 P5 P6 P7 = (ex8_6 ? ? ? ? ? ? P0 P1 P2 P3 P4 P5 P6 P7).
+
(* multiple disjunction connective (3) *)
inductive or3 (P0,P1,P2:Prop) : Prop ≝
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, 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)"
+ 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) }.
+
+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)"
+ 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) }.
+
(* 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}:$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 existental quantifier (8, 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 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}.λ${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) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P6) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P7) }.
+
+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 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.λ${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) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P6) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P7) }.
+
(* multiple disjunction connective (3) *)
notation "hvbox(∨∨ term 29 P0 break | term 29 P1 break | term 29 P2)"