]> matita.cs.unibo.it Git - helm.git/commitdiff
- lambda_delta: programmed renaming to lambdadelta
authorFerruccio Guidi <ferruccio.guidi@unibo.it>
Tue, 25 Dec 2012 21:48:14 +0000 (21:48 +0000)
committerFerruccio Guidi <ferruccio.guidi@unibo.it>
Tue, 25 Dec 2012 21:48:14 +0000 (21:48 +0000)
- nat: general weight-based eliminator added for lambdadelta

605 files changed:
matita/matita/contribs/lambda_delta/Makefile [deleted file]
matita/matita/contribs/lambda_delta/apps_2/functional/dsubst.ma [deleted file]
matita/matita/contribs/lambda_delta/apps_2/functional/lift.ma [deleted file]
matita/matita/contribs/lambda_delta/apps_2/functional/notation.ma [deleted file]
matita/matita/contribs/lambda_delta/apps_2/functional/rtm.ma [deleted file]
matita/matita/contribs/lambda_delta/apps_2/functional/rtm_step.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/basic_1.orig [deleted file]
matita/matita/contribs/lambda_delta/basic_2/basic_1.txt [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/acp.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/acp_aaa.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/acp_cr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/cpe.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/cpe_cpe.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/cprs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/cprs_aaa.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/cprs_cprs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/cprs_delift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/cprs_lfpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/cprs_lfprs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/cprs_lift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/cprs_ltpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/cprs_tstc.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/cprs_tstc_vector.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/csn.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/csn_aaa.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/csn_alt.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/csn_cpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/csn_cpr_vector.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/csn_lfpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/csn_lift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/csn_tstc_vector.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/csn_vector.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/fprs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/fprs_aaa.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/fprs_cprs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/fprs_fprs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/lfprs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/lfprs_aaa.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/lfprs_cprs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/lfprs_lfprs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/lsubc.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/lsubc_ldrop.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/lsubc_ldrops.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/lsubc_lsuba.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/ltprs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/ltprs_alt.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/ltprs_ldrop.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/ltprs_ltprs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/tprs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/tprs_lift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/tprs_tprs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/xprs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/xprs_aaa.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/xprs_cprs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/xprs_lift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/xprs_lsubss.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/computation/xprs_xprs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/conversion/cpc.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/conversion/cpc_cpc.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/conversion/fpc.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/conversion/fpc_fpc.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/conversion/lfpc.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/conversion/lfpc_lfpc.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/dynamic/snv.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/dynamic/snv_aaa.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/dynamic/snv_lift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/dynamic/snv_ssta.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs_aaa.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs_cpcs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs_cprs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs_delift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs_ltpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs_ltpss.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/equivalence/fpcs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/equivalence/fpcs_aaa.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/equivalence/fpcs_cpcs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/equivalence/fpcs_fpcs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/equivalence/fpcs_fprs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/equivalence/lfpcs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/equivalence/lfpcs_aaa.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/equivalence/lfpcs_lfpcs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/equivalence/lfpcs_lfprs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/equivalence/lsubse.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/equivalence/lsubse_cpcs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/equivalence/lsubse_ldrop.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/equivalence/lsubse_ssta.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/csup/csup.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/csup/csup_csup.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/csup/csupp.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/csup/csupp_csupp.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/csup/csups.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/csup/csups_csups.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/csup/ypr.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/csup/yprs.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/csup/yprs_csups.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/csup/yprs_xprs.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/csup/yprs_yprs.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/csup/ysteps.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/csup/ysteps_csups.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/hod/ntas.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/hod/ntas_lift.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/lenv_px/lcpcs.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/lenv_px/lcpcs_ltpr.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/lenv_px/lenv_px_sn.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/lsubn/lsubn_lsubn.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/lsubsv/lsubsv.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/lsubsv/lsubsv_cpcs.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/lsubsv/lsubsv_ldrop.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/lsubsv/lsubsv_snv.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/lsubsv/lsubsv_ssta.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/nta/lsubn.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/nta/lsubn_cpcs.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/nta/lsubn_ldrop.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/nta/lsubn_nta.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_aaa.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_alt.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_lift.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_ltpr.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_ltpss.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_nta.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_sta.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_thin.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/snta/lsubsn.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/snta/lsubsn_cpcs.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/snta/lsubsn_ldrop.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/snta/lsubsn_snta.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/snta/snta.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/snta/snta_lift.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/snta/snta_ltpr.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/snta/snta_ltpss.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/snta/snta_snta.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/snta/snta_thin.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/sstas/sstas.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/sstas/sstas_lift.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/sstas/sstas_ltpss.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/sstas/sstas_sstas.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/sta/sta.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/sta/sta_lift.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/sta/sta_ltpss.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/sta/sta_sta.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/etc/top/lenv_top.etc [deleted file]
matita/matita/contribs/lambda_delta/basic_2/grammar/aarity.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/grammar/cl_shift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/grammar/cl_weight.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/grammar/genv.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/grammar/item.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/grammar/lenv.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/grammar/lenv_append.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/grammar/lenv_length.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/grammar/lenv_px.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/grammar/lenv_px_bi.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/grammar/lenv_weight.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/grammar/term.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/grammar/term_simple.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/grammar/term_vector.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/grammar/term_weight.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/grammar/tshf.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/grammar/tstc.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/grammar/tstc_tstc.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/grammar/tstc_vector.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/names.txt [deleted file]
matita/matita/contribs/lambda_delta/basic_2/notation.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/cfpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/cfpr_aaa.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/cfpr_cfpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/cfpr_cpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/cfpr_ltpss.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/cif.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/cif_append.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/cnf.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/cnf_cif.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/cnf_lift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr_aaa.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr_cpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr_delift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr_lift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr_ltpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr_ltpss.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr_tpss.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/crf.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/crf_append.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/fpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/fpr_cpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/fpr_fpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/lfpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/lfpr_aaa.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/lfpr_alt.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/lfpr_cpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/lfpr_fpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/lfpr_lfpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/ltpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/ltpr_aaa.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/ltpr_ldrop.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/ltpr_ltpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/ltpr_ltpss_dx.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/ltpr_ltpss_sn.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/ltpr_tps.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/thnf.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/tpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/tpr_delift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/tpr_lift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/tpr_tpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/tpr_tps.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/tpr_tpss.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/xpr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/xpr_aaa.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/xpr_lift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/reducibility/xpr_lsubss.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/aaa.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/aaa_aaa.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/aaa_lift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/aaa_lifts.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/aaa_ltpss_dx.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/aaa_ltpss_sn.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/lsuba.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/lsuba_aaa.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/lsuba_ldrop.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/lsuba_lsuba.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/lsubss.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/lsubss_ldrop.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/lsubss_lsubss.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/lsubss_ssta.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/sd.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/sh.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/ssta.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/ssta_aaa.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/ssta_lift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/ssta_ltpss_dx.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/ssta_ltpss_sn.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/static/ssta_ssta.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/substitution/frsup.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/substitution/gdrop.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/substitution/gdrop_gdrop.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/substitution/ldrop.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/substitution/ldrop_append.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/substitution/ldrop_ldrop.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/substitution/ldrop_lpx.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/substitution/ldrop_sfr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/substitution/lift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/substitution/lift_lift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/substitution/lift_lift_vector.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/substitution/lift_vector.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/substitution/lsubs.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/substitution/lsubs_sfr.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/substitution/tps.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/substitution/tps_lift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/substitution/tps_tps.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/delift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/delift_alt.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/delift_delift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/delift_lift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/delift_ltpss.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/delift_tpss.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/frsupp.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/frsupp_frsupp.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/frsups.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/frsups_frsups.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/gr2.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/gr2_gr2.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/gr2_minus.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/gr2_plus.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/ldrops.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/ldrops_ldrop.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/ldrops_ldrops.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/lifts.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/lifts_lift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/lifts_lift_vector.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/lifts_lifts.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/lifts_vector.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_dx.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_dx_ldrop.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_dx_ltpss_dx.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_dx_tps.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_dx_tpss.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_sn.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_sn_alt.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_sn_ldrop.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_sn_ltpss_sn.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_sn_tps.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_sn_tpss.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/thin.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/thin_delift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/thin_ldrop.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/tpss.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/tpss_alt.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/tpss_lift.ma [deleted file]
matita/matita/contribs/lambda_delta/basic_2/unfold/tpss_tpss.ma [deleted file]
matita/matita/contribs/lambda_delta/ground_2/arith.ma [deleted file]
matita/matita/contribs/lambda_delta/ground_2/list.ma [deleted file]
matita/matita/contribs/lambda_delta/ground_2/notation.ma [deleted file]
matita/matita/contribs/lambda_delta/ground_2/star.ma [deleted file]
matita/matita/contribs/lambda_delta/ground_2/xoa.conf.xml [deleted file]
matita/matita/contribs/lambda_delta/ground_2/xoa.ma [deleted file]
matita/matita/contribs/lambda_delta/ground_2/xoa_notation.ma [deleted file]
matita/matita/contribs/lambda_delta/ground_2/xoa_props.ma [deleted file]
matita/matita/contribs/lambda_delta/ma2etc.sh [deleted file]
matita/matita/contribs/lambda_delta/orig.sh [deleted file]
matita/matita/contribs/lambda_delta/replace.sh [deleted file]
matita/matita/contribs/lambda_delta/root [deleted file]
matita/matita/contribs/lambdadelta/Makefile [new file with mode: 0644]
matita/matita/contribs/lambdadelta/apps_2/functional/dsubst.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/apps_2/functional/lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/apps_2/functional/notation.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/apps_2/functional/rtm.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/apps_2/functional/rtm_step.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/basic_1.orig [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/basic_1.txt [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/acp.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/acp_aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/acp_cr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/cpe.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/cpe_cpe.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/cprs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/cprs_aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/cprs_cprs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/cprs_delift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/cprs_lfpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/cprs_lfprs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/cprs_lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/cprs_ltpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/cprs_tstc.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/cprs_tstc_vector.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/csn.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/csn_aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/csn_alt.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/csn_cpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/csn_cpr_vector.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/csn_lfpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/csn_lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/csn_tstc_vector.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/csn_vector.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/fprs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/fprs_aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/fprs_cprs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/fprs_fprs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/lfprs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/lfprs_aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/lfprs_cprs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/lfprs_lfprs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/lsubc.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/lsubc_ldrop.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/lsubc_ldrops.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/lsubc_lsuba.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/ltprs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/ltprs_alt.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/ltprs_ldrop.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/ltprs_ltprs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/tprs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/tprs_lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/tprs_tprs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/xprs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/xprs_aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/xprs_cprs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/xprs_lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/xprs_lsubss.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/computation/xprs_xprs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/conversion/cpc.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/conversion/cpc_cpc.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/conversion/fpc.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/conversion/fpc_fpc.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/conversion/lfpc.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/conversion/lfpc_lfpc.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/snv.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ssta.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_cpcs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_cprs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_delift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/fpcs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/fpcs_aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/fpcs_cpcs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/fpcs_fpcs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/fpcs_fprs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/lfpcs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/lfpcs_aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/lfpcs_lfpcs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/lfpcs_lfprs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/lsubse.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/lsubse_cpcs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/lsubse_ldrop.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/equivalence/lsubse_ssta.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/csup/csup.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/csup/csup_csup.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/csup/csupp.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/csup/csupp_csupp.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/csup/csups.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/csup/csups_csups.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/csup/ypr.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/csup/yprs.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/csup/yprs_csups.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/csup/yprs_xprs.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/csup/yprs_yprs.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/csup/ysteps.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/csup/ysteps_csups.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/hod/ntas.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/hod/ntas_lift.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lenv_px/lcpcs.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lenv_px/lcpcs_ltpr.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lenv_px/lenv_px_sn.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lsubn/lsubn_lsubn.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lsubsv/lsubsv.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lsubsv/lsubsv_cpcs.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lsubsv/lsubsv_ldrop.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lsubsv/lsubsv_snv.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/lsubsv/lsubsv_ssta.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/nta/lsubn.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/nta/lsubn_cpcs.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/nta/lsubn_ldrop.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/nta/lsubn_nta.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_aaa.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_alt.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_lift.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_ltpr.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_ltpss.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_nta.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_sta.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_thin.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/snta/lsubsn.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/snta/lsubsn_cpcs.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/snta/lsubsn_ldrop.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/snta/lsubsn_snta.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/snta/snta.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/snta/snta_lift.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/snta/snta_ltpr.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/snta/snta_ltpss.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/snta/snta_snta.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/snta/snta_thin.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/sstas/sstas.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/sstas/sstas_lift.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/sstas/sstas_ltpss.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/sstas/sstas_sstas.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/sta/sta.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/sta/sta_lift.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/sta/sta_ltpss.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/sta/sta_sta.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/top/lenv_top.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/grammar/aarity.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/grammar/cl_shift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/grammar/cl_weight.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/grammar/genv.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/grammar/item.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/grammar/lenv.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/grammar/lenv_append.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/grammar/lenv_length.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/grammar/lenv_px.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/grammar/lenv_px_bi.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/grammar/lenv_weight.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/grammar/term.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/grammar/term_simple.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/grammar/term_vector.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/grammar/term_weight.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/grammar/tshf.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/grammar/tstc.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/grammar/tstc_tstc.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/grammar/tstc_vector.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/names.txt [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr_aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr_cfpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr_cpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr_ltpss.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cif.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cif_append.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cnf.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cnf_cif.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cnf_lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_cpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_delift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpss.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_tpss.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/crf.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/crf_append.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/fpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/fpr_cpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/fpr_fpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/lfpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/lfpr_aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/lfpr_alt.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/lfpr_cpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/lfpr_fpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/lfpr_lfpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/ltpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/ltpr_aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/ltpr_ldrop.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/ltpr_ltpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/ltpr_ltpss_dx.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/ltpr_ltpss_sn.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/ltpr_tps.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/thnf.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/tpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/tpr_delift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/tpr_lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/tpr_tpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/tpr_tps.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/tpr_tpss.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/xpr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/xpr_aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/xpr_lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/reducibility/xpr_lsubss.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/aaa_aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/aaa_lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/aaa_lifts.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/aaa_ltpss_dx.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/aaa_ltpss_sn.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/lsuba.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/lsuba_aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/lsuba_ldrop.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/lsuba_lsuba.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/lsubss.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/lsubss_ldrop.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/lsubss_lsubss.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/lsubss_ssta.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/sd.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/sh.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/ssta.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/ssta_aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/ssta_lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/ssta_ltpss_dx.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/ssta_ltpss_sn.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/ssta_ssta.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/substitution/frsup.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/substitution/gdrop.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/substitution/gdrop_gdrop.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/substitution/ldrop.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/substitution/ldrop_append.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/substitution/ldrop_ldrop.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/substitution/ldrop_lpx.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/substitution/ldrop_sfr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/substitution/lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/substitution/lift_lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/substitution/lift_lift_vector.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/substitution/lift_vector.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/substitution/lsubs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/substitution/lsubs_sfr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/substitution/tps.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/substitution/tps_lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/substitution/tps_tps.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/delift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/delift_alt.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/delift_delift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/delift_lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/delift_ltpss.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/delift_tpss.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/frsupp.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/frsupp_frsupp.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/frsups.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/frsups_frsups.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/gr2.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/gr2_gr2.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/gr2_minus.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/gr2_plus.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/ldrops.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/ldrops_ldrop.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/ldrops_ldrops.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/lifts.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/lifts_lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/lifts_lift_vector.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/lifts_lifts.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/lifts_vector.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_dx.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_dx_ldrop.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_dx_ltpss_dx.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_dx_tps.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_dx_tpss.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_sn.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_sn_alt.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_sn_ldrop.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_sn_ltpss_sn.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_sn_tps.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_sn_tpss.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/thin.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/thin_delift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/thin_ldrop.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/tpss.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/tpss_alt.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/tpss_lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/unfold/tpss_tpss.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/ground_2/arith.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/ground_2/list.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/ground_2/notation.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/ground_2/star.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/ground_2/xoa.conf.xml [new file with mode: 0644]
matita/matita/contribs/lambdadelta/ground_2/xoa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/ground_2/xoa_notation.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/ground_2/xoa_props.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/ma2etc.sh [new file with mode: 0644]
matita/matita/contribs/lambdadelta/orig.sh [new file with mode: 0644]
matita/matita/contribs/lambdadelta/replace.sh [new file with mode: 0644]
matita/matita/contribs/lambdadelta/root [new file with mode: 0644]
matita/matita/lib/arithmetics/nat.ma

diff --git a/matita/matita/contribs/lambda_delta/Makefile b/matita/matita/contribs/lambda_delta/Makefile
deleted file mode 100644 (file)
index 7e267a2..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-H        = @
-XOA_DIR  = ../../../components/binaries/xoa
-XOA      = xoa.native
-DEP_DIR  = ../../../components/binaries/matitadep
-DEP      = matitadep.native
-MAC_DIR  = ../../../components/binaries/mac
-MAC      = mac.native
-
-XOA_CONF    = ground_2/xoa.conf.xml
-XOA_TARGETS = ground_2/xoa_notation.ma ground_2/xoa.ma
-
-ORIG     = . ./orig.sh 
-
-ORIGS    = basic_2/basic_1.orig
-
-PACKAGES = ground_2 basic_2 apps_2
-
-all:
-
-# xoa ########################################################################
-
-xoa: $(XOA_TARGETS)
-
-$(XOA_TARGETS): $(XOA_CONF)
-       @echo "  EXEC $(XOA) $(XOA_CONF)"
-       $(H)MATITA_RT_BASE_DIR=../.. $(XOA_DIR)/$(XOA) $(XOA_CONF)
-
-# orig #######################################################################
-
-orig: $(ORIGS)
-       @echo "  ORIG basic_2"
-       $(H)$(ORIG) basic_2 < $(ORIGS)
-
-# dep ########################################################################
-
-deps: MAS = $(shell find $* -name "*.ma")
-
-deps: $(DEP_DIR)/$(DEP)
-       @echo "  MATITADEP"
-       $(H)grep "include \"" $(MAS) | $<
-
-# stats ######################################################################
-
-stats: $(PACKAGES:%=%.stats)
-
-%.stats: MAS = $(shell find $* -name "*.ma")
-
-%.stats: CHARS = $(shell $(MAC_DIR)/$(MAC) $(MAS))
-
-%.stats:
-       @printf '\x1B[1;40;37m'
-       @printf '%-15s %-40s' 'Statistics for:' $*      
-       @printf '\x1B[0m\n'     
-       @printf '\x1B[1;40;35m'
-       @printf '%-8s %6i' Chars $(CHARS)
-       @printf '   %-8s %3i' Pages `echo $$(($(CHARS) / 5120))`
-       @printf '   %-23s' ''
-       @printf '\x1B[0m\n'
-       @printf '\x1B[1;40;36m'
-       @printf '%-8s %6i' Sources `ls $(MAS) | wc -l`
-       @printf '   %-38s' ''
-#      @printf '   %-8s %5i' Objs `ls *.vo | wc -l`
-#      @printf '   %-6s %3i' Files `ls *.v | wc -l`
-       @printf '\x1B[0m\n'     
-       @printf '\x1B[1;40;32m'
-       @printf '%-8s %6i' Theorems `grep "theorem " $(MAS) | wc -l`
-       @printf '   %-8s %3i' Lemmas `grep "lemma " $(MAS) | wc -l`
-       @printf '   %-5s %3i' Facts `grep "fact " $(MAS) | wc -l`
-       @printf '   %-6s %4i' Proofs `grep qed $(MAS) | wc -l`
-       @printf '\x1B[0m\n'     
-       @printf '\x1B[1;40;33m'
-       @printf '%-8s %6i' Declared `grep "inductive \|record " $(MAS) | wc -l` 
-       @printf '   %-8s %3i' Defined `grep "definition \|let rec " $(MAS) | wc -l`     
-       @printf '   %-23s' ''
-#      @printf '   %-8s %5i' Local `grep "Local" *.v | wc -l`
-       @printf '\x1B[0m\n'
-       @printf '\x1B[1;40;31m'
-       @printf '%-8s %6i' Axioms `grep axiom $(MAS) | wc -l`
-       @printf '   %-8s %3i' Comments `grep "(\*[^*:]*$$" $(MAS) | wc -l`
-       @printf '   %-5s %3i' Marks `grep "(\*\*)" $(MAS) | wc -l`
-       @printf '   %-11s' ''
-       @printf '\x1B[0m\n'
-
-# summary ####################################################################
-
-define SUMMARY_TEMPLATE
-  TBL_$(1) := $(1)/$(1)_sum.tbl  
-  MAS_$(1) := $$(shell find $(1) -name "*.ma")
-  TBLS     += $$(TBL_$(1))
-
-  $$(TBL_$(1)): V1 := $$(shell ls $$(MAS_$(1)) | wc -l)
-  $$(TBL_$(1)): V2 := $$(shell $$(MAC_DIR)/$$(MAC) $$(MAS_$(1)))
-  $$(TBL_$(1)): C1 := $$(shell grep "inductive \|record " $$(MAS_$(1)) | wc -l)
-  $$(TBL_$(1)): C2 := $$(shell grep "definition \|let rec " $$(MAS_$(1)) | wc -l)
-  $$(TBL_$(1)): C3 := $$(shell grep "inductive \|record \|definition \|let rec " $$(MAS_$(1)) | wc -l)
-  $$(TBL_$(1)): P1 := $$(shell grep "theorem " $$(MAS_$(1)) | wc -l)
-  $$(TBL_$(1)): P2 := $$(shell grep "lemma " $$(MAS_$(1)) | wc -l)
-  $$(TBL_$(1)): P3 := $$(shell grep "lemma \|theorem " $$(MAS_$(1)) | wc -l)
-
-  $$(TBL_$(1)): $$(MAS_$(1))
-       @printf '  SUMMARY $(1)\n'
-       @printf 'name "$$(basename $$(@F))"\n\n'       >  $$@
-       @printf 'table {\n'                            >> $$@
-       @printf '   class "grey" [ "category"\n'       >> $$@
-       @printf '      [ "objects" * ]\n'              >> $$@
-       @printf '   ]\n'                               >> $$@
-       @printf '   class "cyan" [ "sizes"\n'          >> $$@
-       @printf '      [ "files" "$$(V1)" ]\n'         >> $$@
-       @printf '      [ "characters" "$$(V2)" ]\n'    >> $$@
-       @printf '      [ * ]\n'                        >> $$@
-       @printf '   ]\n'                               >> $$@   
-       @printf '   class "green" [ "propositions"\n'  >> $$@
-       @printf '      [ "theorems" "$$(P1)" ]\n'      >> $$@
-       @printf '      [ "lemmas"   "$$(P2)" ]\n'      >> $$@
-       @printf '      [ "total"    "$$(P3)" ]\n'      >> $$@
-       @printf '   ]\n'                               >> $$@
-       @printf '   class "yellow" [ "concepts"\n'     >> $$@
-       @printf '      [ "declared" "$$(C1)" ]\n'      >> $$@
-       @printf '      [ "defined"  "$$(C2)" ]\n'      >> $$@
-       @printf '      [ "total"    "$$(C3)" ]\n'      >> $$@
-       @printf '   ]\n'                               >> $$@
-       @printf '}\n\n'                                >> $$@
-       @printf 'class "component" { 0 }\n\n'          >> $$@
-       @printf 'class "plane" { 1 } { 3 } { 5 }\n\n'  >> $$@
-       @printf 'class "number" { 2 } { 4 } { 6 }\n\n' >> $$@
-endef
-
-$(foreach PKG, $(PACKAGES), $(eval $(call SUMMARY_TEMPLATE,$(PKG))))
-
-tbls: $(TBLS)
diff --git a/matita/matita/contribs/lambda_delta/apps_2/functional/dsubst.ma b/matita/matita/contribs/lambda_delta/apps_2/functional/dsubst.ma
deleted file mode 100644 (file)
index f584737..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/delift_lift.ma".
-include "apps_2/functional/lift.ma".
-
-(* FUNCTIONAL DELIFTING SUBSTITUTION ****************************************)
-
-let rec fdsubst W d U on U ≝ match U with
-[ TAtom I     ⇒ match I with
-  [ Sort _ ⇒ U
-  | LRef i ⇒ tri … i d (#i) (↑[0, i] W) (#(i-1))
-  | GRef _ ⇒ U
-  ]
-| TPair I V T ⇒ match I with
-  [ Bind2 a I ⇒ ⓑ{a,I} (fdsubst W d V). (fdsubst W (d+1) T)
-  | Flat2 I   ⇒ ⓕ{I} (fdsubst W d V). (fdsubst W d T)
-  ]
-].
-
-interpretation
-   "functional delifting substitution"
-   'DSubst V d T = (fdsubst V d T).
-
-(* Main properties **********************************************************)
-
-theorem fdsubst_delift: ∀K,V,T,L,d.
-                        ⇩[0, d] L ≡ K. ⓓV → L ⊢ ▼*[d, 1] T ≡ [d ⬐ V] T.
-#K #V #T elim T -T
-[ * #i #L #d #HLK normalize in ⊢ (? ? ? ? ? %); /2 width=3/
-  elim (lt_or_eq_or_gt i d) #Hid
-  [ -HLK >(tri_lt ?????? Hid) /3 width=3/
-  | destruct >tri_eq /4 width=4 by tpss_strap2, tps_subst, le_n, ex2_1_intro/ (**) (* too slow without trace *)   
-  | -HLK >(tri_gt ?????? Hid) /3 width=3/
-  ]
-| * /3 width=1/ /4 width=1/
-]
-qed.
-
-(* Main inversion properties ************************************************)
-
-theorem fdsubst_inv_delift: ∀K,V,T1,L,T2,d. ⇩[0, d] L ≡ K. ⓓV →
-                            L ⊢ ▼*[d, 1] T1 ≡ T2 → [d ⬐ V] T1 = T2.
-#K #V #T1 elim T1 -T1
-[ * #i #L #T2 #d #HLK #H
-  [ -HLK >(delift_inv_sort1 … H) -H //
-  | elim (lt_or_eq_or_gt i d) #Hid normalize
-    [ -HLK >(delift_inv_lref1_lt … H) -H // /2 width=1/
-    | destruct
-      elim (delift_inv_lref1_be … H ? ?) -H // #K0 #V0 #V2 #HLK0
-      lapply (ldrop_mono … HLK0 … HLK) -HLK0 -HLK #H >minus_plus <minus_n_n #HV2 #HVT2 destruct
-      >(delift_inv_refl_O2 … HV2) -V >(flift_inv_lift … HVT2) -V2 //
-    | -HLK >(delift_inv_lref1_ge … H) -H // /2 width=1/
-    ]
-  | -HLK >(delift_inv_gref1 … H) -H //
-  ]
-| * [ #a ] #I #V1 #T1 #IHV1 #IHT1 #L #X #d #HLK #H
-  [ elim (delift_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
-    <(IHV1 … HV12) -IHV1 -HV12 // <(IHT1 … HT12) -IHT1 -HT12 // /2 width=1/
-  | elim (delift_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
-    <(IHV1 … HV12) -IHV1 -HV12 // <(IHT1 … HT12) -IHT1 -HT12 //
-  ]
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/apps_2/functional/lift.ma b/matita/matita/contribs/lambda_delta/apps_2/functional/lift.ma
deleted file mode 100644 (file)
index bf05ea3..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/lift.ma".
-include "apps_2/functional/notation.ma".
-
-(* FUNCTIONAL RELOCATION ****************************************************)
-
-let rec flift d e U on U ≝ match U with
-[ TAtom I     ⇒ match I with
-  [ Sort _ ⇒ U
-  | LRef i ⇒ #(tri … i d i (i + e) (i + e))
-  | GRef _ ⇒ U
-  ]
-| TPair I V T ⇒ match I with
-  [ Bind2 a I ⇒ ⓑ{a,I} (flift d e V). (flift (d+1) e T)
-  | Flat2 I   ⇒ ⓕ{I} (flift d e V). (flift d e T)
-  ]
-].
-
-interpretation "functional relocation" 'Lift d e T = (flift d e T).
-
-(* Main properties **********************************************************)
-
-theorem flift_lift: ∀T,d,e. ⇧[d, e] T ≡ ↑[d, e] T.
-#T elim T -T
-[ * #i #d #e //
-  elim (lt_or_eq_or_gt i d) #Hid normalize
-  [ >(tri_lt ?????? Hid) /2 width=1/
-  | /2 width=1/
-  | >(tri_gt ?????? Hid) /3 width=2/
-  ]
-| * /2/
-]
-qed.
-
-(* Main inversion properties ************************************************)
-
-theorem flift_inv_lift: ∀d,e,T1,T2. ⇧[d, e] T1 ≡ T2 → ↑[d, e] T1 = T2.
-#d #e #T1 #T2 #H elim H -d -e -T1 -T2 normalize //
-[ #i #d #e #Hid >(tri_lt ?????? Hid) //
-| #i #d #e #Hid
-  elim (le_to_or_lt_eq … Hid) -Hid #Hid
-  [ >(tri_gt ?????? Hid) //
-  | destruct //
-  ]
-]
-qed-.
-
-(* Derived properties *******************************************************)
-
-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
->(flift_inv_lift … H) -H //
-qed.
diff --git a/matita/matita/contribs/lambda_delta/apps_2/functional/notation.ma b/matita/matita/contribs/lambda_delta/apps_2/functional/notation.ma
deleted file mode 100644 (file)
index 1c60d6c..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE "functional" COMPONENT ********************************)
-
-notation "hvbox( ↑ [ term 46 d , break term 46 e ] break term 46 T )"
-   non associative with precedence 46
-   for @{ 'Lift $d $e $T }.
-
-notation "hvbox( [ term 46 d ⬐ break term 46 V ] break term 46 T )"
-   non associative with precedence 46
-   for @{ 'DSubst $V $d $T }.
-
-notation "hvbox( T1 ⇨ break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'SRed $T1 $T2 }.
diff --git a/matita/matita/contribs/lambda_delta/apps_2/functional/rtm.ma b/matita/matita/contribs/lambda_delta/apps_2/functional/rtm.ma
deleted file mode 100644 (file)
index c7acff7..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/term_vector.ma".
-include "basic_2/grammar/genv.ma".
-
-(* REDUCTION AND TYPE MACHINE ***********************************************)
-
-(* machine local environment *)
-inductive xenv: Type[0] ≝
-| XAtom: xenv                                    (* empty *)
-| XQuad: xenv → bind2 → nat → xenv → term → xenv (* entry *)
-.
-
-interpretation "atom (ext. local environment)"
-   'Star = XAtom.
-
-interpretation "environment construction (quad)"
-   'DxItem4 L I u K V = (XQuad L I u K V).
-
-(* machine stack *)
-definition stack: Type[0] ≝ list2 xenv term.
-
-(* machine status *)
-record rtm: Type[0] ≝
-{ rg: genv;  (* global environment *)
-  ru: nat;   (* current de Bruijn's level *)
-  re: xenv;  (* extended local environment *)
-  rs: stack; (* application stack *)
-  rt: term   (* code *)
-}.
-
-(* initial state *)
-definition rtm_i: genv → term → rtm ≝
-                  λG,T. mk_rtm G 0 (⋆) (⟠) T.
-
-(* update code *)
-definition rtm_t: rtm → term → rtm ≝
-                  λM,T. match M with
-                  [ mk_rtm G u E _ _ ⇒ mk_rtm G u E (⟠) T
-                  ].
-
-(* update closure *)
-definition rtm_u: rtm → xenv → term → rtm ≝
-                  λM,E,T. match M with
-                  [ mk_rtm G u _ _ _ ⇒ mk_rtm G u E (⟠) T
-                  ].
-
-(* get global environment *)
-definition rtm_g: rtm → genv ≝
-                  λM. match M with
-                  [ mk_rtm G _ _ _ _ ⇒ G
-                  ].
-
-(* get local reference level *)
-definition rtm_l: rtm → nat ≝
-                  λM. match M with
-                  [ mk_rtm _ u E _ _ ⇒ match E with
-                     [ XAtom           ⇒ u
-                     | XQuad _ _ u _ _ ⇒ u
-                     ]
-                  ].
-
-(* get stack *)
-definition rtm_s: rtm → stack ≝
-                  λM. match M with
-                  [ mk_rtm _ _ _ S _ ⇒ S
-                  ].
-
-(* get code *)
-definition rtm_c: rtm → term ≝
-                  λM. match M with
-                  [ mk_rtm _ _ _ _ T ⇒ T
-                  ].
diff --git a/matita/matita/contribs/lambda_delta/apps_2/functional/rtm_step.ma b/matita/matita/contribs/lambda_delta/apps_2/functional/rtm_step.ma
deleted file mode 100644 (file)
index ed16d50..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "apps_2/functional/rtm.ma".
-
-(* REDUCTION AND TYPE MACHINE ***********************************************)
-
-(* transitions *)
-inductive rtm_step: relation rtm ≝
-| rtm_ldrop : ∀G,u,E,I,t,F,V,S,i.
-              rtm_step (mk_rtm G u (E. ④{I} {t, F, V}) S (#(i + 1)))
-                       (mk_rtm G u E S (#i))
-| rtm_ldelta: ∀G,u,E,t,F,V,S.
-              rtm_step (mk_rtm G u (E. ④{Abbr} {t, F, V}) S (#0))
-                       (mk_rtm G u F S V)
-| rtm_ltype : ∀G,u,E,t,F,V,S.
-              rtm_step (mk_rtm G u (E. ④{Abst} {t, F, V}) S (#0))
-                       (mk_rtm G u F S V)
-| rtm_gdrop : ∀G,I,V,u,E,S,p. p < |G| →
-              rtm_step (mk_rtm (G. ⓑ{I} V) u E S (§p))
-                       (mk_rtm G u E S (§p))
-| rtm_gdelta: ∀G,V,u,E,S,p. p = |G| →
-              rtm_step (mk_rtm (G. ⓓV) u E S (§p))
-                       (mk_rtm G u E S V)
-| rtm_gtype : ∀G,V,u,E,S,p. p = |G| →
-              rtm_step (mk_rtm (G. ⓛV) u E S (§p))
-                       (mk_rtm G u E S V)
-| rtm_tau   : ∀G,u,E,S,W,T.
-              rtm_step (mk_rtm G u E S (ⓝW. T))
-                       (mk_rtm G u E S T)
-| rtm_appl  : ∀G,u,E,S,V,T.
-              rtm_step (mk_rtm G u E S (ⓐV. T))
-                       (mk_rtm G u E ({E, V} @ S) T)
-| rtm_beta  : ∀G,u,E,F,V,S,W,T.
-              rtm_step (mk_rtm G u E ({F, V} @ S) (+ⓛW. T))
-                       (mk_rtm G u (E. ④{Abbr} {u, F, V}) S T)
-| rtm_push  : ∀G,u,E,W,T.
-              rtm_step (mk_rtm G u E ⟠ (+ⓛW. T))
-                       (mk_rtm G (u + 1) (E. ④{Abst} {u, E, W}) ⟠ T)
-| rtm_theta : ∀G,u,E,S,V,T.
-              rtm_step (mk_rtm G u E S (+ⓓV. T))
-                       (mk_rtm G u (E. ④{Abbr} {u, E, V}) S T)
-.
-
-interpretation "sequential reduction (RTM)"
-   'SRed O1 O2 = (rtm_step O1 O2).
diff --git a/matita/matita/contribs/lambda_delta/basic_2/basic_1.orig b/matita/matita/contribs/lambda_delta/basic_2/basic_1.orig
deleted file mode 100644 (file)
index 0b48e94..0000000
+++ /dev/null
@@ -1,712 +0,0 @@
-aplus/props / aplus_ahead_simpl
-aplus/props / aplus_asort_le_simpl
-aplus/props / aplus_asort_O_simpl
-aplus/props / aplus_asort_simpl
-aplus/props / aplus_assoc
-aplus/props / aplus_asucc
-aplus/props / aplus_asucc_false
-aplus/props / aplus_inj
-aplus/props / aplus_reg_r
-aplus/props / aplus_sort_O_S_simpl
-aplus/props / aplus_sort_S_S_simpl
-aprem/fwd / aprem_gen_head_O
-aprem/fwd / aprem_gen_head_S
-aprem/fwd / aprem_gen_sort
-aprem/props / aprem_asucc
-aprem/props / aprem_repl
-arity/aprem / arity_aprem
-arity/cimp / arity_cimp_conf
-arity/fwd / arity_gen_abst
-arity/fwd / arity_gen_appl
-arity/fwd / arity_gen_appls
-arity/fwd / arity_gen_bind
-arity/fwd / arity_gen_cast
-arity/fwd / arity_gen_lift
-arity/fwd / arity_gen_lref
-arity/fwd / arity_gen_sort
-arity/lift1 / arity_lift1
-arity/pr3 / arity_sred_pr2
-arity/pr3 / arity_sred_pr3
-arity/pr3 / arity_sred_wcpr0_pr0
-arity/pr3 / arity_sred_wcpr0_pr1
-arity/props / arity_appls_abbr
-arity/props / arity_appls_bind
-arity/props / arity_appls_cast
-arity/props / arity_lift
-arity/props / arity_mono
-arity/props / arity_repellent
-arity/props / node_inh
-arity/subst0 / arity_fsubst0
-arity/subst0 / arity_gen_cvoid
-arity/subst0 / arity_gen_cvoid_subst0
-arity/subst0 / arity_subst0
-asucc/fwd / asucc_gen_head
-asucc/fwd / asucc_gen_sort
-cimp/props / cimp_bind
-cimp/props / cimp_flat_dx
-cimp/props / cimp_flat_sx
-cimp/props / cimp_getl_conf
-clear/drop / drop_clear
-clear/drop / drop_clear_O
-clear/drop / drop_clear_S
-clear/fwd / clear_gen_all
-clear/fwd / clear_gen_bind
-clear/fwd / clear_gen_flat
-clear/fwd / clear_gen_flat_r
-clear/fwd / clear_gen_sort
-clear/props / clear_cle
-clear/props / clear_clear
-clear/props / clear_ctail
-clear/props / clear_mono
-clear/props / clear_trans
-clen/getl / getl_ctail_clen
-clen/getl / getl_gen_tail
-cnt/props / cnt_lift
-C/props / chead_ctail
-C/props / clt_cong
-C/props / clt_head
-C/props / clt_thead
-C/props / clt_wf_ind
-C/props clt_wf q_ind
-C/props / c_tail_ind
-csuba/arity / arity_appls_appl
-csuba/arity / csuba_arity
-csuba/arity / csuba_arity_rev
-csuba/clear / csuba_clear_conf
-csuba/clear / csuba_clear_trans
-csuba/drop / csuba_drop_abbr
-csuba/drop / csuba_drop_abbr_rev
-csuba/drop / csuba_drop_abst
-csuba/drop / csuba_drop_abst_rev
-csuba/fwd / csuba_gen_abbr
-csuba/fwd / csuba_gen_abbr_rev
-csuba/fwd / csuba_gen_abst
-csuba/fwd / csuba_gen_abst_rev
-csuba/fwd / csuba_gen_bind
-csuba/fwd / csuba_gen_bind_rev
-csuba/fwd / csuba_gen_flat
-csuba/fwd / csuba_gen_flat_rev
-csuba/fwd / csuba_gen_void
-csuba/fwd / csuba_gen_void_rev
-csuba/getl / csuba_getl_abbr
-csuba/getl / csuba_getl_abbr_rev
-csuba/getl / csuba_getl_abst
-csuba/getl / csuba_getl_abst_rev
-csuba/props / csuba_refl
-csubc/arity / csubc_arity_conf
-csubc/arity / csubc_arity_trans
-csubc/clear / csubc_clear_conf
-csubc/csuba / csubc_csuba
-csubc/drop1 / csubc_drop1_conf_rev
-csubc/drop1 / drop1_csubc_trans
-csubc/drop / csubc_drop_conf_O
-csubc/drop / csubc_drop_conf_rev
-csubc/drop / drop_csubc_trans
-csubc/fwd / csubc_gen_head_l
-csubc/fwd / csubc_gen_head_r
-csubc/fwd / csubc_gen_sort_l
-csubc/fwd / csubc_gen_sort_r
-csubc/getl / csubc_getl_conf
-csubc/props / csubc_refl
-csubst0/clear / csubst0_clear_O
-csubst0/clear / csubst0_clear_O_back
-csubst0/clear / csubst0_clear_S
-csubst0/clear / csubst0_clear_trans
-csubst0/drop / csubst0_drop_eq
-csubst0/drop / csubst0_drop_eq_back
-csubst0/drop / csubst0_drop_gt
-csubst0/drop / csubst0_drop_gt_back
-csubst0/drop / csubst0_drop_lt
-csubst0/drop / csubst0_drop_lt_back
-csubst0/fwd / csubst0_gen_head
-csubst0/fwd / csubst0_gen_S_bind_2
-csubst0/fwd / csubst0_gen_sort
-csubst0/getl / csubst0_getl_ge
-csubst0/getl / csubst0_getl_ge_back
-csubst0/getl / csubst0_getl_lt
-csubst0/getl / csubst0_getl_lt_back
-csubst0/props / csubst0_both_bind
-csubst0/props / csubst0_fst_bind
-csubst0/props / csubst0_snd_bind
-csubst1/fwd / csubst1_gen_head
-csubst1/getl / csubst1_getl_ge
-csubst1/getl / csubst1_getl_ge_back
-csubst1/getl / csubst1_getl_lt
-csubst1/getl / getl_csubst1
-csubst1/props / csubst1_bind
-csubst1/props / csubst1_flat
-csubst1/props / csubst1_head
-csubt/clear / csubt_clear_conf
-csubt/csuba / csubt_csuba
-csubt/drop / csubt_drop_abbr
-csubt/drop / csubt_drop_abst
-csubt/drop / csubt_drop_flat
-csubt/fwd / csubt_gen_abbr
-csubt/fwd / csubt_gen_abst
-csubt/fwd / csubt_gen_bind
-csubt/fwd / csubt_gen_flat
-csubt/getl / csubt_getl_abbr
-csubt/getl / csubt_getl_abst
-csubt/pc3 / csubt_pc3
-csubt/pc3 / csubt_pr2
-csubt/props / csubt_refl
-csubt/ty3 / csubt_ty3
-csubt/ty3 / csubt_ty3_ld
-csubv/clear / csubv_clear_conf
-csubv/clear / csubv_clear_conf_void
-csubv/drop / csubv_drop_conf
-csubv/getl / csubv_getl_conf
-csubv/getl / csubv_getl_conf_void
-csubv/props / csubv_bind_same
-csubv/props / csubv_refl
-drop1/fwd / drop1_gen_pcons
-drop1/fwd / drop1_gen_pnil
-drop1/getl / drop1_getl_trans
-drop1/props / drop1_cons_tail
-drop1/props / drop1_skip_bind
-drop1/props / drop1_trans
-drop/fwd / drop_gen_drop
-drop/fwd / drop_gen_refl
-drop/fwd / drop_gen_skip_l
-drop/fwd / drop_gen_skip_r
-drop/fwd / drop_gen_sort
-drop/props / drop_conf_ge
-drop/props / drop_conf_lt
-drop/props / drop_conf_rev
-drop/props / drop_ctail
-drop/props / drop_mono
-drop/props / drop_S
-drop/props / drop_skip_bind
-drop/props / drop_skip_flat
-drop/props / drop_trans_ge
-drop/props / drop_trans_le
-ex0/props / aplus_gz_ge
-ex0/props / aplus_gz_le
-ex0/props / leq_leqz
-ex0/props / leqz_leq
-ex0/props / next_plus_gz
-ex1/props / ex1_arity
-ex1/props ex1 leq_sort_SS
-ex1/props / ex1_ty3
-ex2/props / ex2_arity
-ex2/props / ex2_nf2
-flt/props / flt_arith0
-flt/props / flt_arith1
-flt/props / flt_arith2
-flt/props / flt_shift
-flt/props / flt_thead_dx
-flt/props / flt_thead_sx
-flt/props / flt_trans
-flt/props / flt_wf_ind
-flt/props flt_wf q_ind
-fsubst0/fwd / fsubst0_gen_base
-getl/clear / clear_getl_trans
-getl/clear / getl_clear_bind
-getl/clear / getl_clear_conf
-getl/clear / getl_clear_trans
-getl/dec / getl_dec
-getl/drop / drop_getl_trans_ge
-getl/drop / drop_getl_trans_le
-getl/drop / drop_getl_trans_lt
-getl/drop / getl_conf_ge_drop
-getl/drop / getl_drop
-getl/drop / getl_drop_conf_ge
-getl/drop / getl_drop_conf_lt
-getl/drop / getl_drop_conf_rev
-getl/drop / getl_drop_trans
-getl/flt / getl_flt
-getl/fwd / getl_gen_2
-getl/fwd / getl_gen_all
-getl/fwd / getl_gen_bind
-getl/fwd / getl_gen_flat
-getl/fwd / getl_gen_O
-getl/fwd / getl_gen_S
-getl/fwd / getl_gen_sort
-getl/getl / getl_conf_le
-getl/getl / getl_trans
-getl/props / getl_ctail
-getl/props / getl_flat
-getl/props / getl_head
-getl/props / getl_mono
-getl/props / getl_refl
-iso/fwd / iso_flats_flat_bind_false
-iso/fwd / iso_flats_lref_bind_false
-iso/fwd / iso_gen_head
-iso/fwd / iso_gen_lref
-iso/fwd / iso_gen_sort
-iso/props / iso_refl
-iso/props / iso_trans
-leq/asucc / asucc_inj
-leq/asucc / asucc_repl
-leq/asucc / leq_ahead_asucc_false
-leq/asucc / leq_asucc
-leq/asucc / leq_asucc_false
-leq/fwd / leq_gen_head1
-leq/fwd / leq_gen_head2
-leq/fwd / leq_gen_sort1
-leq/fwd / leq_gen_sort2
-leq/props / ahead_inj_snd
-leq/props / leq_ahead_false_1
-leq/props / leq_ahead_false_2
-leq/props / leq_eq
-leq/props / leq_refl
-leq/props / leq_sym
-leq/props / leq_trans
-lift1/fwd / lift1_bind
-lift1/fwd / lift1_cons_tail
-lift1/fwd / lift1_flat
-lift1/fwd / lift1_lref
-lift1/fwd / lift1_sort
-lift1/fwd / lifts1_cons
-lift1/fwd / lifts1_flat
-lift1/fwd / lifts1_nil
-lift1/props / lift1_free
-lift1/props / lift1_lift1
-lift1/props / lift1_xhg
-lift1/props / lifts1_xhg
-lift/fwd / lift_bind
-lift/fwd / lift_flat
-lift/fwd / lift_gen_bind
-lift/fwd / lift_gen_flat
-lift/fwd / lift_gen_head
-lift/fwd / lift_gen_lref
-lift/fwd / lift_gen_lref_false
-lift/fwd / lift_gen_lref_ge
-lift/fwd / lift_gen_lref_lt
-lift/fwd / lift_gen_sort
-lift/fwd / lift_head
-lift/fwd / lift_lref_ge
-lift/fwd / lift_lref_lt
-lift/fwd / lift_sort
-lift/props / lift_d
-lift/props / lift_free
-lift/props / lift_gen_lift
-lift/props / lift_inj
-lift/props / lift_lref_gt
-lift/props / lift_r
-lift/props / lifts_inj
-lift/props / lifts_tapp
-lift/props / thead_x_lift_y_y
-lift/tlt / lift_tlt_dx
-lift/tlt / lift_weight
-lift/tlt / lift_weight_add
-lift/tlt / lift_weight_add_O
-lift/tlt / lift_weight_map
-llt/props / llt_head_dx
-llt/props / llt_head_sx
-llt/props / llt_repl
-llt/props / llt_trans
-llt/props / llt_wf_ind
-llt/props llt_wf q_ind
-llt/props / lweight_repl
-next_plus/props / next_plus_assoc
-next_plus/props / next_plus_lt
-next_plus/props / next_plus_next
-nf2/arity / arity_nf2_inv_all
-nf2/dec / nf2_dec
-nf2/fwd / nf2_gen_abbr
-nf2/fwd / nf2_gen_abst
-nf2/fwd / nf2_gen_beta
-nf2/fwd / nf2_gen_cast
-nf2/fwd / nf2_gen_flat
-nf2/fwd / nf2_gen_lref
-nf2/fwd nf2_gen nf2_gen_aux
-nf2/fwd / nf2_gen_void
-nf2/iso / nf2_iso_appls_lref
-nf2/lift1 / nf2_lift1
-nf2/pr3 / nf2_pr3_confluence
-nf2/pr3 / nf2_pr3_unfold
-nf2/props / nf2_abst
-nf2/props / nf2_abst_shift
-nf2/props / nf2_appl_lref
-nf2/props / nf2_appls_lref
-nf2/props / nf2_csort_lref
-nf2/props / nf2_lift
-nf2/props / nf2_lref_abst
-nf2/props / nf2_sort
-nf2/props / nfs2_tapp
-pc1/props / pc1_head
-pc1/props / pc1_head_1
-pc1/props / pc1_head_2
-pc1/props / pc1_pr0_r
-pc1/props / pc1_pr0_u
-pc1/props / pc1_pr0_u2
-pc1/props / pc1_pr0_x
-pc1/props / pc1_refl
-pc1/props / pc1_s
-pc1/props / pc1_t
-pc3/dec / pc3_abst_dec
-pc3/dec / pc3_dec
-pc3/fsubst0 / pc3_fsubst0
-pc3/fsubst0 / pc3_pr2_fsubst0
-pc3/fsubst0 / pc3_pr2_fsubst0_back
-pc3/fwd / pc3_gen_abst
-pc3/fwd / pc3_gen_abst_shift
-pc3/fwd / pc3_gen_lift
-pc3/fwd / pc3_gen_lift_abst
-pc3/fwd / pc3_gen_not_abst
-pc3/fwd / pc3_gen_sort
-pc3/fwd / pc3_gen_sort_abst
-pc3/left / pc3_ind_left
-pc3/left pc3_ind_left pc3_left_pc3
-pc3/left pc3_ind_left pc3_left_pr3
-pc3/left pc3_ind_left pc3_left_sym
-pc3/left pc3_ind_left pc3_left_trans
-pc3/left pc3_ind_left pc3_pc3_left
-pc3/nf2 / pc3_nf2
-pc3/nf2 / pc3_nf2_unfold
-pc3/pc1 / pc3_pc1
-pc3/props / clear_pc3_trans
-pc3/props / pc3_eta
-pc3/props / pc3_head_1
-pc3/props / pc3_head_12
-pc3/props / pc3_head_2
-pc3/props / pc3_head_21
-pc3/props / pc3_lift
-pc3/props / pc3_pr0_pr2_t
-pc3/props / pc3_pr2_pr2_t
-pc3/props / pc3_pr2_pr3_t
-pc3/props / pc3_pr2_r
-pc3/props / pc3_pr2_u
-pc3/props / pc3_pr2_u2
-pc3/props / pc3_pr2_x
-pc3/props / pc3_pr3_conf
-pc3/props / pc3_pr3_pc3_t
-pc3/props / pc3_pr3_r
-pc3/props / pc3_pr3_t
-pc3/props / pc3_pr3_x
-pc3/props / pc3_refl
-pc3/props / pc3_s
-pc3/props / pc3_t
-pc3/props / pc3_thin_dx
-pc3/subst1 / pc3_gen_cabbr
-pc3/wcpr0 / pc3_wcpr0
-pc3/wcpr0 pc3_wcpr0 pc3_wcpr0_t_aux
-pc3/wcpr0 / pc3_wcpr0_t
-pr0/dec / nf0_dec
-pr0/fwd / pr0_gen_abbr
-pr0/fwd / pr0_gen_abst
-pr0/fwd / pr0_gen_appl
-pr0/fwd / pr0_gen_cast
-pr0/fwd / pr0_gen_lift
-pr0/fwd / pr0_gen_lref
-pr0/fwd / pr0_gen_sort
-pr0/fwd / pr0_gen_void
-pr0/pr0 / pr0_confluence
-pr0/pr0 pr0_confluence pr0_cong_delta
-pr0/pr0 pr0_confluence pr0_cong_upsilon_cong
-pr0/pr0 pr0_confluence pr0_cong_upsilon_delta
-pr0/pr0 pr0_confluence pr0_cong_upsilon_refl
-pr0/pr0 pr0_confluence pr0_cong_upsilon_zeta
-pr0/pr0 pr0_confluence pr0_delta_delta
-pr0/pr0 pr0_confluence pr0_delta_tau
-pr0/pr0 pr0_confluence pr0_upsilon_upsilon
-pr0/props / pr0_lift
-pr0/props / pr0_subst0
-pr0/props / pr0_subst0_back
-pr0/props / pr0_subst0_fwd
-pr0/subst1 / pr0_delta1
-pr0/subst1 / pr0_subst1
-pr0/subst1 / pr0_subst1_back
-pr0/subst1 / pr0_subst1_fwd
-pr1/pr1 / pr1_confluence
-pr1/pr1 / pr1_strip
-pr1/props / pr1_comp
-pr1/props / pr1_eta
-pr1/props / pr1_head_1
-pr1/props / pr1_head_2
-pr1/props / pr1_pr0
-pr1/props / pr1_t
-pr2/clen / pr2_gen_cbind
-pr2/clen / pr2_gen_cflat
-pr2/clen / pr2_gen_ctail
-pr2/fwd / pr2_gen_abbr
-pr2/fwd / pr2_gen_abst
-pr2/fwd / pr2_gen_appl
-pr2/fwd / pr2_gen_cast
-pr2/fwd / pr2_gen_csort
-pr2/fwd / pr2_gen_lift
-pr2/fwd / pr2_gen_lref
-pr2/fwd / pr2_gen_sort
-pr2/fwd / pr2_gen_void
-pr2/pr2 / pr2_confluence
-pr2/pr2 pr2_confluence pr2_delta_delta
-pr2/pr2 pr2_confluence pr2_free_delta
-pr2/pr2 pr2_confluence pr2_free_free
-pr2/props / clear_pr2_trans
-pr2/props / pr2_cflat
-pr2/props / pr2_change
-pr2/props / pr2_ctail
-pr2/props / pr2_head_1
-pr2/props / pr2_head_2
-pr2/props / pr2_lift
-pr2/props / pr2_thin_dx
-pr2/subst1 / pr2_delta1
-pr2/subst1 / pr2_gen_cabbr
-pr2/subst1 / pr2_subst1
-pr3/fwd / pr3_gen_abbr
-pr3/fwd / pr3_gen_abst
-pr3/fwd / pr3_gen_appl
-pr3/fwd / pr3_gen_bind
-pr3/fwd / pr3_gen_cast
-pr3/fwd / pr3_gen_lift
-pr3/fwd / pr3_gen_lref
-pr3/fwd / pr3_gen_sort
-pr3/fwd / pr3_gen_void
-pr3/iso / pr3_iso_appl_bind
-pr3/iso / pr3_iso_appls_abbr
-pr3/iso / pr3_iso_appls_appl_bind
-pr3/iso / pr3_iso_appls_beta
-pr3/iso / pr3_iso_appls_bind
-pr3/iso / pr3_iso_appls_cast
-pr3/iso / pr3_iso_beta
-pr3/pr1 / pr3_pr1
-pr3/pr3 / pr3_confluence
-pr3/pr3 / pr3_strip
-pr3/props / clear_pr3_trans
-pr3/props / pr3_cflat
-pr3/props / pr3_eta
-pr3/props / pr3_flat
-pr3/props / pr3_head_1
-pr3/props / pr3_head_12
-pr3/props / pr3_head_2
-pr3/props / pr3_head_21
-pr3/props / pr3_lift
-pr3/props / pr3_pr0_pr2_t
-pr3/props / pr3_pr2
-pr3/props / pr3_pr2_pr2_t
-pr3/props / pr3_pr2_pr3_t
-pr3/props / pr3_pr3_pr3_t
-pr3/props / pr3_t
-pr3/props / pr3_thin_dx
-pr3/subst1 / pr3_gen_cabbr
-pr3/subst1 / pr3_subst1
-pr3/wcpr0 / pr3_wcpr0_t
-r/props / r_arith0
-r/props / r_arith1
-r/props / r_dis
-r/props / r_minus
-r/props / r_plus
-r/props / r_plus_sym
-r/props / r_S
-r/props / s_r
-sc3/arity / sc3_arity
-sc3/arity / sc3_arity_csubc
-sc3/props / sc3_abbr
-sc3/props / sc3_abst
-sc3/props / sc3_appl
-sc3/props / sc3_arity_gen
-sc3/props / sc3_bind
-sc3/props / sc3_cast
-sc3/props / sc3_lift
-sc3/props / sc3_lift1
-sc3/props sc3_props sc3_sn3_abst
-sc3/props / sc3_repl
-sc3/props / sc3_sn3
-sn3/fwd / sn3_gen_bind
-sn3/fwd / sn3_gen_cflat
-sn3/fwd / sn3_gen_flat
-sn3/fwd / sn3_gen_head
-sn3/fwd / sn3_gen_lift
-sn3/lift1 / sns3_lifts1
-sn3/nf2 / nf2_sn3
-sn3/nf2 / sn3_nf2
-sn3/props / sn3_abbr
-sn3/props / sn3_appl_abbr
-sn3/props / sn3_appl_appl
-sn3/props / sn3_appl_appls
-sn3/props / sn3_appl_beta
-sn3/props / sn3_appl_bind
-sn3/props / sn3_appl_cast
-sn3/props / sn3_appl_lref
-sn3/props / sn3_appls_abbr
-sn3/props / sn3_appls_beta
-sn3/props / sn3_appls_bind
-sn3/props / sn3_appls_cast
-sn3/props / sn3_appls_lref
-sn3/props / sn3_beta
-sn3/props / sn3_bind
-sn3/props / sn3_cast
-sn3/props / sn3_cdelta
-sn3/props / sn3_cflat
-sn3/props / sn3_change
-sn3/props / sn3_cpr3_trans
-sn3/props / sn3_gen_def
-sn3/props / sn3_lift
-sn3/props / sn3_pr2_intro
-sn3/props / sn3_pr3_trans
-sn3/props / sn3_shift
-sn3/props / sns3_lifts
-s/props / minus_s_s
-s/props / s_arith0
-s/props / s_arith1
-s/props / s_inc
-s/props / s_inj
-s/props / s_le
-s/props / s_lt
-s/props / s_minus
-s/props / s_plus
-s/props / s_plus_sym
-s/props / s_S
-sty0/fwd / sty0_gen_appl
-sty0/fwd / sty0_gen_bind
-sty0/fwd / sty0_gen_cast
-sty0/fwd / sty0_gen_lref
-sty0/fwd / sty0_gen_sort
-sty0/props / sty0_correct
-sty0/props / sty0_lift
-sty1/cnt / sty1_cnt
-sty1/props / sty1_abbr
-sty1/props / sty1_appl
-sty1/props / sty1_bind
-sty1/props / sty1_cast2
-sty1/props / sty1_correct
-sty1/props / sty1_lift
-sty1/props / sty1_trans
-subst0/dec / dnf_dec
-subst0/dec / dnf_dec2
-subst0/fwd / subst0_gen_head
-subst0/fwd / subst0_gen_lift_false
-subst0/fwd / subst0_gen_lift_ge
-subst0/fwd / subst0_gen_lift_lt
-subst0/fwd / subst0_gen_lref
-subst0/fwd / subst0_gen_sort
-subst0/props / subst0_lift_ge
-subst0/props / subst0_lift_ge_s
-subst0/props / subst0_lift_ge_S
-subst0/props / subst0_lift_lt
-subst0/props / subst0_refl
-subst0/subst0 / subst0_confluence_eq
-subst0/subst0 / subst0_confluence_lift
-subst0/subst0 / subst0_confluence_neq
-subst0/subst0 / subst0_subst0
-subst0/subst0 / subst0_subst0_back
-subst0/subst0 / subst0_trans
-subst0/tlt / subst0_tlt
-subst0/tlt / subst0_tlt_head
-subst0/tlt / subst0_weight_le
-subst0/tlt / subst0_weight_lt
-subst1/fwd / subst1_gen_head
-subst1/fwd / subst1_gen_lift_eq
-subst1/fwd / subst1_gen_lift_ge
-subst1/fwd / subst1_gen_lift_lt
-subst1/fwd / subst1_gen_lref
-subst1/fwd / subst1_gen_sort
-subst1/props / subst1_ex
-subst1/props / subst1_head
-subst1/props / subst1_lift_ge
-subst1/props / subst1_lift_lt
-subst1/props / subst1_lift_S
-subst1/subst1 / subst1_confluence_eq
-subst1/subst1 / subst1_confluence_lift
-subst1/subst1 / subst1_confluence_neq
-subst1/subst1 / subst1_subst1
-subst1/subst1 / subst1_subst1_back
-subst1/subst1 / subst1_trans
-subst/fwd / subst_head
-subst/fwd / subst_lref_eq
-subst/fwd / subst_lref_gt
-subst/fwd / subst_lref_lt
-subst/fwd / subst_sort
-subst/props / subst_lift_SO
-subst/props / subst_subst0
-T/dec / abst_dec
-T/dec / bind_dec_not
-T/dec / binder_dec
-T/dec / term_dec
-T/dec terms_props bind_dec
-T/dec terms_props flat_dec
-T/dec terms_props kind_dec
-tlist/props / tcons_tapp_ex
-tlist/props / theads_tapp
-tlist/props / tlist_ind_rev
-tlist/props / tslt_wf_ind
-tlist/props tslt_wf q_ind
-tlt/props / tlt_head_dx
-tlt/props / tlt_head_sx
-tlt/props / tlt_trans
-tlt/props / tlt_wf_ind
-tlt/props tlt_wf q_ind
-tlt/props / wadd_le
-tlt/props / wadd_lt
-tlt/props / wadd_O
-tlt/props / weight_add_O
-tlt/props / weight_add_S
-tlt/props / weight_eq
-tlt/props / weight_le
-T/props / not_abbr_abst
-T/props / not_abbr_void
-T/props / not_abst_void
-T/props / not_void_abst
-T/props / thead_x_y_y
-T/props / tweight_lt
-ty3/arity / ty3_arity
-ty3/arity_props / ty3_acyclic
-ty3/arity_props / ty3_predicative
-ty3/arity_props / ty3_repellent
-ty3/arity_props / ty3_sn3
-ty3/dec / ty3_inference
-ty3/fsubst0 / ty3_csubst0
-ty3/fsubst0 / ty3_fsubst0
-ty3/fsubst0 / ty3_subst0
-ty3/fwd / ty3_gen_appl
-ty3/fwd / ty3_gen_bind
-ty3/fwd / ty3_gen_cast
-ty3/fwd / ty3_gen_lref
-ty3/fwd / ty3_gen_sort
-ty3/fwd / tys3_gen_cons
-ty3/fwd / tys3_gen_nil
-ty3/fwd_nf2 / ty3_gen_appl_nf2
-ty3/fwd_nf2 / ty3_inv_appls_lref_nf2
-ty3/fwd_nf2 / ty3_inv_lref_lref_nf2
-ty3/fwd_nf2 / ty3_inv_lref_nf2
-ty3/fwd_nf2 / ty3_inv_lref_nf2_pc3
-ty3/nf2 ty3_nf2_gen ty3_nf2_inv_abst_aux
-ty3/nf2 / ty3_nf2_inv_abst
-ty3/nf2 / ty3_nf2_inv_abst_premise_csort
-ty3/nf2 / ty3_nf2_inv_all
-ty3/nf2 / ty3_nf2_inv_sort
-ty3/pr3 / ty3_sred_pr0
-ty3/pr3 / ty3_sred_pr1
-ty3/pr3 / ty3_sred_pr2
-ty3/pr3 / ty3_sred_pr3
-ty3/pr3 / ty3_sred_wcpr0_pr0
-ty3/pr3_props / ty3_cred_pr2
-ty3/pr3_props / ty3_cred_pr3
-ty3/pr3_props / ty3_gen_lift
-ty3/pr3_props / ty3_sconv
-ty3/pr3_props / ty3_sconv_pc3
-ty3/pr3_props / ty3_sred_back
-ty3/pr3_props / ty3_tred
-ty3/props / ty3_correct
-ty3/props / ty3_gen_abst_abst
-ty3/props / ty3_getl_subst0
-ty3/props / ty3_lift
-ty3/props / ty3_typecheck
-ty3/props / ty3_unique
-ty3/sty0 / ty3_sty0
-ty3/subst1 / ty3_gen_cabbr
-ty3/subst1 / ty3_gen_cvoid
-wcpr0/fwd / wcpr0_gen_head
-wcpr0/fwd / wcpr0_gen_sort
-wcpr0/getl / wcpr0_drop
-wcpr0/getl / wcpr0_drop_back
-wcpr0/getl / wcpr0_getl
-wcpr0/getl / wcpr0_getl_back
-wf3/clear / clear_wf3_trans
-wf3/clear / wf3_clear_conf
-wf3/fwd / wf3_gen_bind1
-wf3/fwd / wf3_gen_flat1
-wf3/fwd / wf3_gen_head2
-wf3/fwd / wf3_gen_sort1
-wf3/getl / getl_wf3_trans
-wf3/getl / wf3_getl_conf
-wf3/props / ty3_shift1
-wf3/props / wf3_idem
-wf3/props / wf3_mono
-wf3/props / wf3_total
-wf3/props / wf3_ty3
-wf3/ty3 / wf3_pc3_conf
-wf3/ty3 / wf3_pr2_conf
-wf3/ty3 / wf3_pr3_conf
-wf3/ty3 / wf3_ty3_conf
diff --git a/matita/matita/contribs/lambda_delta/basic_2/basic_1.txt b/matita/matita/contribs/lambda_delta/basic_2/basic_1.txt
deleted file mode 100644 (file)
index d64855d..0000000
+++ /dev/null
@@ -1,244 +0,0 @@
-# waiting ####################################################################
-
-aplus/props aplus_reg_r
-aplus/props aplus_assoc
-aplus/props aplus_asucc
-aplus/props aplus_sort_O_S_simpl
-aplus/props aplus_sort_S_S_simpl
-aplus/props aplus_asort_O_simpl
-aplus/props aplus_asort_le_simpl
-aplus/props aplus_asort_simpl
-aplus/props aplus_ahead_simpl
-aplus/props aplus_asucc_false
-aplus/props aplus_inj
-aprem/fwd aprem_gen_sort
-aprem/fwd aprem_gen_head_O
-aprem/fwd aprem_gen_head_S
-aprem/props aprem_repl
-aprem/props aprem_asucc
-arity/aprem arity_aprem
-arity/cimp arity_cimp_conf
-arity/fwd arity_gen_sort
-arity/fwd arity_gen_lref
-arity/fwd arity_gen_bind
-arity/fwd arity_gen_abst
-arity/fwd arity_gen_appl
-arity/fwd arity_gen_cast
-arity/fwd arity_gen_appls
-arity/fwd arity_gen_lift
-arity/lift1 arity_lift1
-arity/pr3 arity_sred_wcpr0_pr0
-arity/pr3 arity_sred_wcpr0_pr1
-arity/pr3 arity_sred_pr2
-arity/pr3 arity_sred_pr3
-arity/props node_inh
-arity/props arity_lift
-arity/props arity_mono
-arity/props arity_repellent
-arity/props arity_appls_cast
-arity/props arity_appls_abbr
-arity/props arity_appls_bind
-arity/subst0 arity_gen_cvoid_subst0
-arity/subst0 arity_gen_cvoid
-arity/subst0 arity_fsubst0
-arity/subst0 arity_subst0
-asucc/fwd asucc_gen_sort
-asucc/fwd asucc_gen_head
-cnt/props cnt_lift
-C/props clt_wf__q_ind
-C/props clt_wf_ind
-
-csuba/arity csuba_arity
-csuba/arity csuba_arity_rev
-csuba/arity arity_appls_appl
-csuba/clear csuba_clear_conf
-csuba/clear csuba_clear_trans
-csuba/drop csuba_drop_abbr
-csuba/drop csuba_drop_abst
-csuba/drop csuba_drop_abst_rev
-csuba/drop csuba_drop_abbr_rev
-csuba/fwd csuba_gen_abbr
-csuba/fwd csuba_gen_void
-csuba/fwd csuba_gen_abst
-csuba/fwd csuba_gen_flat
-csuba/fwd csuba_gen_bind
-csuba/fwd csuba_gen_abst_rev
-csuba/fwd csuba_gen_void_rev
-csuba/fwd csuba_gen_abbr_rev
-csuba/fwd csuba_gen_flat_rev
-csuba/fwd csuba_gen_bind_rev
-csuba/getl csuba_getl_abbr
-csuba/getl csuba_getl_abst
-csuba/getl csuba_getl_abst_rev
-csuba/getl csuba_getl_abbr_rev
-csuba/props csuba_refl
-
-csubc/arity csubc_arity_conf
-csubc/arity csubc_arity_trans
-csubc/drop1 drop1_csubc_trans
-csubc/drop drop_csubc_trans
-
-csubt/csuba csubt_csuba
-csubt/fwd csubt_gen_abbr
-csubt/fwd csubt_gen_abst
-
-csubv/clear csubv_clear_conf
-csubv/clear csubv_clear_conf_void
-csubv/drop csubv_drop_conf
-csubv/getl csubv_getl_conf
-csubv/getl csubv_getl_conf_void
-csubv/props csubv_bind_same
-csubv/props csubv_refl
-drop1/props drop1_cons_tail
-ex0/props aplus_gz_le
-ex0/props aplus_gz_ge
-ex0/props next_plus_gz
-ex0/props leqz_leq
-ex0/props leq_leqz
-ex1/props ex1__leq_sort_SS
-ex1/props ex1_arity
-ex1/props ex1_ty3
-ex2/props ex2_nf2
-ex2/props ex2_arity
-leq/asucc asucc_repl
-leq/asucc asucc_inj
-leq/asucc leq_asucc
-leq/asucc leq_ahead_asucc_false
-leq/asucc leq_asucc_false
-leq/fwd leq_gen_sort1
-leq/fwd leq_gen_head1
-leq/fwd leq_gen_sort2
-leq/fwd leq_gen_head2
-leq/props ahead_inj_snd
-leq/props leq_refl
-leq/props leq_eq
-leq/props leq_sym
-leq/props leq_trans
-leq/props leq_ahead_false_1
-leq/props leq_ahead_false_2
-lift1/fwd lift1_cons_tail
-lift1/fwd lifts1_nil
-lift1/fwd lifts1_cons
-lift/props thead_x_lift_y_y
-lift/props lifts_tapp
-lift/props lifts_inj
-llt/props lweight_repl
-llt/props llt_repl
-llt/props llt_trans
-llt/props llt_head_sx
-llt/props llt_head_dx
-llt/props llt_wf__q_ind
-llt/props llt_wf_ind
-next_plus/props next_plus_assoc
-next_plus/props next_plus_next
-next_plus/props next_plus_lt
-nf2/arity arity_nf2_inv_all
-nf2/fwd nf2_gen_lref
-nf2/fwd nf2_gen_abst
-nf2/fwd nf2_gen_cast
-nf2/fwd nf2_gen_beta
-nf2/fwd nf2_gen_flat
-nf2/fwd nf2_gen__nf2_gen_aux
-nf2/fwd nf2_gen_abbr
-nf2/fwd nf2_gen_void
-nf2/props nfs2_tapp
-nf2/props nf2_appls_lref
-pc1/props pc1_pr0_r
-pc1/props pc1_pr0_x
-pc1/props pc1_refl
-pc1/props pc1_pr0_u
-pc1/props pc1_s
-pc1/props pc1_head_1
-pc1/props pc1_head_2
-pc1/props pc1_t
-pc1/props pc1_pr0_u2
-pc1/props pc1_head
-
-pc3/dec pc3_dec
-pc3/dec pc3_abst_dec
-pc3/fwd pc3_gen_not_abst
-pc3/fwd pc3_gen_lift_abst
-pc3/nf2 pc3_nf2
-pc3/nf2 pc3_nf2_unfold
-pc3/pc1 pc3_pc1
-pc3/props pc3_pr2_pr2_t
-pc3/props pc3_pr2_pr3_t
-pc3/props pc3_pr3_pc3_t
-pc3/props pc3_eta
-
-pr0/fwd pr0_gen_void
-pr0/dec nf0_dec
-
-pr1/props pr1_eta
-
-pr2/fwd pr2_gen_void
-pr3/fwd pr3_gen_void
-pr3/props pr3_eta
-sn3/props sns3_lifts
-sty1/cnt sty1_cnt
-subst/fwd subst_sort
-subst/fwd subst_lref_lt
-subst/fwd subst_lref_eq
-subst/fwd subst_lref_gt
-subst/fwd subst_head
-subst/props subst_lift_SO
-subst/props subst_subst0
-T/dec binder_dec
-T/dec abst_dec
-tlist/props tslt_wf__q_ind
-tlist/props tslt_wf_ind
-tlist/props theads_tapp
-tlist/props tcons_tapp_ex
-tlist/props tlist_ind_rev
-ty3/arity ty3_arity
-ty3/arity_props ty3_predicative
-ty3/arity_props ty3_repellent
-ty3/arity_props ty3_acyclic
-ty3/dec ty3_inference
-ty3/fwd tys3_gen_nil
-ty3/fwd tys3_gen_cons
-ty3/fwd_nf2 ty3_gen_appl_nf2
-ty3/fwd_nf2 ty3_inv_lref_nf2_pc3
-ty3/fwd_nf2 ty3_inv_lref_nf2
-ty3/fwd_nf2 ty3_inv_appls_lref_nf2
-ty3/fwd_nf2 ty3_inv_lref_lref_nf2
-ty3/nf2 ty3_nf2_inv_abst_premise_csort
-ty3/nf2 ty3_nf2_inv_all
-ty3/nf2 ty3_nf2_inv_sort
-ty3/nf2 ty3_nf2_gen__ty3_nf2_inv_abst_aux
-ty3/nf2 ty3_nf2_inv_abst
-ty3/pr3 ty3_sred_wcpr0_pr0
-ty3/pr3 ty3_sred_pr0
-ty3/pr3 ty3_sred_pr1
-ty3/pr3 ty3_sred_pr2
-ty3/pr3 ty3_sred_pr3
-ty3/pr3_props ty3_cred_pr2
-ty3/pr3_props ty3_cred_pr3
-ty3/pr3_props ty3_gen_lift
-ty3/pr3_props ty3_tred
-ty3/pr3_props ty3_sconv_pc3
-ty3/pr3_props ty3_sred_back
-ty3/pr3_props ty3_sconv
-ty3/props ty3_gen_abst_abst
-ty3/sty0 ty3_sty0
-ty3/subst1 ty3_gen_cvoid
-
-wf3/clear wf3_clear_conf
-wf3/clear clear_wf3_trans
-wf3/fwd wf3_gen_sort1
-wf3/fwd wf3_gen_bind1
-wf3/fwd wf3_gen_flat1
-wf3/fwd wf3_gen_head2
-wf3/getl wf3_getl_conf
-wf3/getl getl_wf3_trans
-wf3/props wf3_mono
-wf3/props wf3_total
-wf3/props ty3_shift1
-wf3/props wf3_idem
-wf3/props wf3_ty3
-wf3/ty3 wf3_pr2_conf
-wf3/ty3 wf3_pr3_conf
-wf3/ty3 wf3_pc3_conf
-wf3/ty3 wf3_ty3_conf
-
-# check ######################################################################
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/acp.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/acp.ma
deleted file mode 100644 (file)
index dc046b0..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/ldrops.ma".
-
-(* ABSTRACT COMPUTATION PROPERTIES ******************************************)
-
-definition CP1 ≝ λRR:lenv→relation term. λRS:relation term.
-                 ∀L,k. NF … (RR L) RS (⋆k).
-
-definition CP2 ≝ λRR:lenv→relation term. λRS:relation term.
-                 ∀L,K,W,i. ⇩[0,i] L ≡ K. ⓛW → NF … (RR L) RS (#i).
-
-definition CP3 ≝ λRR:lenv→relation term. λRP:lenv→predicate term.
-                 ∀L,V,k. RP L (ⓐ⋆k.V) → RP L V.
-
-definition CP4 ≝ λRR:lenv→relation term. λRS:relation term.
-                 ∀L0,L,T,T0,d,e. NF … (RR L) RS T → 
-                 ⇩[d, e] L0 ≡ L → ⇧[d, e] T ≡ T0 → NF … (RR L0) RS T0.
-
-definition CP4s ≝ λRR:lenv→relation term. λRS:relation term.
-                  ∀L0,L,des. ⇩*[des] L0 ≡ L →
-                  ∀T,T0. ⇧*[des] T ≡ T0 →
-                  NF … (RR L) RS T → NF … (RR L0) RS T0.
-
-(* requirements for abstract computation properties *)
-record acp (RR:lenv->relation term) (RS:relation term) (RP:lenv→predicate term) : Prop ≝
-{ cp1: CP1 RR RS;
-  cp2: CP2 RR RS;
-  cp3: CP3 RR RP;
-  cp4: CP4 RR RS
-}.
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was: nf2_lift1 *)
-lemma acp_lifts: ∀RR,RS. CP4 RR RS → CP4s RR RS.
-#RR #RS #HRR #L1 #L2 #des #H elim H -L1 -L2 -des
-[ #L #T1 #T2 #H #HT1
-  <(lifts_inv_nil … H) -H //
-| #L1 #L #L2 #des #d #e #_ #HL2 #IHL #T2 #T1 #H #HLT2
-  elim (lifts_inv_cons … H) -H /3 width=9/
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/acp_aaa.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/acp_aaa.ma
deleted file mode 100644 (file)
index f4da113..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/lifts_lifts.ma".
-include "basic_2/unfold/ldrops_ldrops.ma".
-include "basic_2/static/aaa_lifts.ma".
-include "basic_2/static/aaa_aaa.ma".
-include "basic_2/computation/lsubc_ldrops.ma".
-
-(* ABSTRACT COMPUTATION PROPERTIES ******************************************)
-
-(* Main propertis ***********************************************************)
-
-(* Basic_1: was: sc3_arity_csubc *)
-theorem aacr_aaa_csubc_lifts: ∀RR,RS,RP.
-                              acp RR RS RP → acr RR RS RP (λL,T. RP L T) →
-                              ∀L1,T,A. L1 ⊢ T ⁝ A → ∀L0,des. ⇩*[des] L0 ≡ L1 →
-                              ∀T0. ⇧*[des] T ≡ T0 → ∀L2. L2 ⊑[RP] L0 →
-                              ⦃L2, T0⦄ ϵ[RP] 〚A〛.
-#RR #RS #RP #H1RP #H2RP #L1 #T #A #H elim H -L1 -T -A
-[ #L #k #L0 #des #HL0 #X #H #L2 #HL20
-  >(lifts_inv_sort1 … H) -H
-  lapply (aacr_acr … H1RP H2RP ⓪) #HAtom
-  @(s2 … HAtom … ◊) // /2 width=2/
-| #I #L1 #K1 #V1 #B #i #HLK1 #HKV1B #IHB #L0 #des #HL01 #X #H #L2 #HL20
-  lapply (aacr_acr … H1RP H2RP B) #HB
-  elim (lifts_inv_lref1 … H) -H #i1 #Hi1 #H destruct
-  lapply (ldrop_fwd_ldrop2 … HLK1) #HK1b
-  elim (ldrops_ldrop_trans … HL01 … HLK1) #X #des1 #i0 #HL0 #H #Hi0 #Hdes1
-  >(at_mono … Hi1 … Hi0) -i1
-  elim (ldrops_inv_skip2 … Hdes1 … H) -des1 #K0 #V0 #des0 #Hdes0 #HK01 #HV10 #H destruct
-  elim (lsubc_ldrop_O1_trans … HL20 … HL0) -HL0 #X #HLK2 #H
-  elim (lsubc_inv_pair2 … H) -H *
-  [ #K2 #HK20 #H destruct
-    generalize in match HLK2; generalize in match I; -HLK2 -I * #HLK2
-    [ elim (lift_total V0 0 (i0 +1)) #V #HV0
-      elim (lifts_lift_trans  … Hi0 … Hdes0 … HV10 … HV0) -HV10 #V2 #HV12 #HV2
-      @(s4 … HB … ◊ … HV0 HLK2) /3 width=7/ (* uses IHB HL20 V2 HV0 *)
-    | @(s2 … HB … ◊) // /2 width=3/
-    ]
-  | -HLK1 -IHB -HL01 -HL20 -HK1b -Hi0 -Hdes0
-    #K2 #V2 #A2 #HKV2A #HKV0A #_ #H1 #H2 destruct
-    lapply (ldrop_fwd_ldrop2 … HLK2) #HLK2b
-    lapply (aaa_lifts … HK01 … HV10 HKV1B) -HKV1B -HK01 -HV10 #HKV0B
-    >(aaa_mono … HKV0A … HKV0B) in HKV2A; -HKV0A -HKV0B #HKV2B
-    elim (lift_total V2 0 (i0 +1)) #V #HV2
-    @(s4 … HB … ◊ … HV2 HLK2)
-    @(s7 … HB … HKV2B) //
-  ]
-| #a #L #V #T #B #A #_ #_ #IHB #IHA #L0 #des #HL0 #X #H #L2 #HL20
-  elim (lifts_inv_bind1 … H) -H #V0 #T0 #HV0 #HT0 #H destruct
-  lapply (aacr_acr … H1RP H2RP A) #HA
-  lapply (aacr_acr … H1RP H2RP B) #HB
-  lapply (s1 … HB) -HB #HB
-  @(s5 … HA … ◊ ◊) // /3 width=5/
-| #a #L #W #T #B #A #HLWB #_ #IHB #IHA #L0 #des #HL0 #X #H #L2 #HL02
-  elim (lifts_inv_bind1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct
-  @(aacr_abst  … H1RP H2RP)
-  [ lapply (aacr_acr … H1RP H2RP B) #HB
-    @(s1 … HB) /2 width=5/
-  | -IHB
-    #L3 #V3 #T3 #des3 #HL32 #HT03 #HB
-    elim (lifts_total des3 W0) #W2 #HW02
-    elim (ldrops_lsubc_trans … H1RP H2RP … HL32 … HL02) -L2 #L2 #HL32 #HL20
-    lapply (aaa_lifts … L2 W2 … (des @@ des3) … HLWB) -HLWB /2 width=3/ #HLW2B
-    @(IHA (L2. ⓛW2) … (des + 1 @@ des3 + 1)) -IHA
-    /2 width=3/ /3 width=5/
-  ]
-| #L #V #T #B #A #_ #_ #IHB #IHA #L0 #des #HL0 #X #H #L2 #HL20
-  elim (lifts_inv_flat1 … H) -H #V0 #T0 #HV0 #HT0 #H destruct
-  /3 width=10/
-| #L #V #T #A #_ #_ #IH1A #IH2A #L0 #des #HL0 #X #H #L2 #HL20
-  elim (lifts_inv_flat1 … H) -H #V0 #T0 #HV0 #HT0 #H destruct
-  lapply (aacr_acr … H1RP H2RP A) #HA
-  lapply (s1 … HA) #H
-  @(s6 … HA … ◊) /2 width=5/ /3 width=5/
-]
-qed.
-
-(* Basic_1: was: sc3_arity *)
-lemma aacr_aaa: ∀RR,RS,RP. acp RR RS RP → acr RR RS RP (λL,T. RP L T) →
-                ∀L,T,A. L ⊢ T ⁝ A → ⦃L, T⦄ ϵ[RP] 〚A〛.
-/2 width=8/ qed.
-
-lemma acp_aaa: ∀RR,RS,RP. acp RR RS RP → acr RR RS RP (λL,T. RP L T) →
-               ∀L,T,A. L ⊢ T ⁝ A → RP L T.
-#RR #RS #RP #H1RP #H2RP #L #T #A #HT
-lapply (aacr_acr … H1RP H2RP A) #HA
-@(s1 … HA) /2 width=4/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/acp_cr.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/acp_cr.ma
deleted file mode 100644 (file)
index b0b15e6..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/grammar/aarity.ma".
-include "basic_2/unfold/gr2_gr2.ma".
-include "basic_2/unfold/lifts_lift_vector.ma".
-include "basic_2/unfold/ldrops_ldrop.ma".
-include "basic_2/computation/acp.ma".
-
-(* ABSTRACT COMPUTATION PROPERTIES ******************************************)
-
-(* Note: this is Girard's CR1 *)
-definition S1 ≝ λRP,C:lenv→predicate term.
-                ∀L,T. C L T → RP L T.
-
-(* Note: this is Tait's iii, or Girard's CR4 *)
-definition S2 ≝ λRR:lenv→relation term. λRS:relation term. λRP,C:lenv→predicate term.
-                ∀L,Vs. all … (RP L) Vs →
-                ∀T. 𝐒⦃T⦄ → NF … (RR L) RS T → C L (ⒶVs.T).
-
-(* Note: this is Tait's ii *)
-definition S3 ≝ λRP,C:lenv→predicate term.
-                ∀a,L,Vs,V,T,W. C L (ⒶVs. ⓓ{a}V. T) → RP L W → C L (ⒶVs. ⓐV. ⓛ{a}W. T).
-
-definition S4 ≝ λRP,C:lenv→predicate term. ∀L,K,Vs,V1,V2,i.
-                C L (ⒶVs. V2) → ⇧[0, i + 1] V1 ≡ V2 →
-                ⇩[0, i] L ≡ K. ⓓV1 → C L (Ⓐ Vs. #i).
-
-definition S5 ≝ λRP,C:lenv→predicate term.
-                ∀L,V1s,V2s. ⇧[0, 1] V1s ≡ V2s →
-                ∀a,V,T. C (L. ⓓV) (ⒶV2s. T) → RP L V → C L (ⒶV1s. ⓓ{a}V. T).
-
-definition S6 ≝ λRP,C:lenv→predicate term.
-                ∀L,Vs,T,W. C L (ⒶVs. T) → RP L W → C L (ⒶVs. ⓝW. T).
-
-definition S7 ≝ λC:lenv→predicate term. ∀L2,L1,T1,d,e.
-                C L1 T1 → ∀T2. ⇩[d, e] L2 ≡ L1 → ⇧[d, e] T1 ≡ T2 → C L2 T2.
-
-definition S7s ≝ λC:lenv→predicate term.
-                 ∀L1,L2,des. ⇩*[des] L2 ≡ L1 →
-                 ∀T1,T2. ⇧*[des] T1 ≡ T2 → C L1 T1 → C L2 T2.
-
-(* properties of the abstract candidate of reducibility *)
-record acr (RR:lenv->relation term) (RS:relation term) (RP,C:lenv→predicate term) : Prop ≝
-{ s1: S1 RP C;
-  s2: S2 RR RS RP C;
-  s3: S3 RP C;
-  s4: S4 RP C;
-  s5: S5 RP C;
-  s6: S6 RP C;
-  s7: S7 C
-}.
-
-(* the abstract candidate of reducibility associated to an atomic arity *)
-let rec aacr (RP:lenv→predicate term) (A:aarity) (L:lenv) on A: predicate term ≝
-λT. match A with
-[ AAtom     ⇒ RP L T
-| APair B A ⇒ ∀L0,V0,T0,des. aacr RP B L0 V0 → ⇩*[des] L0 ≡ L → ⇧*[des] T ≡ T0 →
-              aacr RP A L0 (ⓐV0. T0)
-].
-
-interpretation
-   "candidate of reducibility of an atomic arity (abstract)"
-   'InEInt RP L T A = (aacr RP A L T).
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was: sc3_lift1 *)
-lemma acr_lifts: ∀C. S7 C → S7s C.
-#C #HC #L1 #L2 #des #H elim H -L1 -L2 -des
-[ #L #T1 #T2 #H #HT1
-  <(lifts_inv_nil … H) -H //
-| #L1 #L #L2 #des #d #e #_ #HL2 #IHL #T2 #T1 #H #HLT2
-  elim (lifts_inv_cons … H) -H /3 width=9/
-]
-qed.
-
-lemma rp_lifts: ∀RR,RS,RP. acr RR RS RP (λL,T. RP L T) →
-                ∀des,L0,L,V,V0. ⇩*[des] L0 ≡ L → ⇧*[des] V ≡ V0 →
-                RP L V → RP L0 V0.
-#RR #RS #RP #HRP #des #L0 #L #V #V0 #HL0 #HV0 #HV 
-@acr_lifts /width=6/
-@(s7 … HRP)
-qed.
-
-(* Basic_1: was only: sns3_lifts1 *)
-lemma rp_liftsv_all: ∀RR,RS,RP. acr RR RS RP (λL,T. RP L T) →
-                     ∀des,L0,L,Vs,V0s. ⇧*[des] Vs ≡ V0s → ⇩*[des] L0 ≡ L →
-                     all … (RP L) Vs → all … (RP L0) V0s.
-#RR #RS #RP #HRP #des #L0 #L #Vs #V0s #H elim H -Vs -V0s normalize //
-#T1s #T2s #T1 #T2 #HT12 #_ #IHT2s #HL0 * #HT1 #HT1s
-@conj /2 width=1/ /2 width=6 by rp_lifts/
-qed.
-
-(* Basic_1: was: 
-   sc3_sn3 sc3_abst sc3_appl sc3_abbr sc3_bind sc3_cast sc3_lift
-*) 
-lemma aacr_acr: ∀RR,RS,RP. acp RR RS RP → acr RR RS RP (λL,T. RP L T) →
-                ∀A. acr RR RS RP (aacr RP A).
-#RR #RS #RP #H1RP #H2RP #A elim A -A normalize //
-#B #A #IHB #IHA @mk_acr normalize
-[ #L #T #H
-  lapply (H ? (⋆0) ? ⟠ ? ? ?) -H
-  [1,3: // |2,4: skip
-  | @(s2 … IHB … ◊) // /2 width=2/
-  | #H @(cp3 … H1RP … 0) @(s1 … IHA) //
-  ]
-| #L #Vs #HVs #T #H1T #H2T #L0 #V0 #X #des #HB #HL0 #H
-  elim (lifts_inv_applv1 … H) -H #V0s #T0 #HV0s #HT0 #H destruct
-  lapply (s1 … IHB … HB) #HV0
-  @(s2 … IHA … (V0 @ V0s)) /2 width=4 by lifts_simple_dx/ /3 width=6/
-| #a #L #Vs #U #T #W #HA #HW #L0 #V0 #X #des #HB #HL0 #H
-  elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct
-  elim (lifts_inv_flat1 … HY) -HY #U0 #X #HU0 #HX #H destruct
-  elim (lifts_inv_bind1 … HX) -HX #W0 #T0 #HW0 #HT0 #H destruct
-  @(s3 … IHA … (V0 @ V0s)) /2 width=6 by rp_lifts/ /4 width=5/
-| #L #K #Vs #V1 #V2 #i #HA #HV12 #HLK #L0 #V0 #X #des #HB #HL0 #H
-  elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct
-  elim (lifts_inv_lref1 … HY) -HY #i0 #Hi0 #H destruct
-  elim (ldrops_ldrop_trans … HL0 … HLK) #X #des0 #i1 #HL02 #H #Hi1 #Hdes0
-  >(at_mono … Hi1 … Hi0) in HL02; -i1 #HL02
-  elim (ldrops_inv_skip2 … Hdes0 … H) -H -des0 #L2 #W1 #des0 #Hdes0 #HLK #HVW1 #H destruct
-  elim (lift_total W1 0 (i0 + 1)) #W2 #HW12
-  elim (lifts_lift_trans  … Hdes0 … HVW1 … HW12) // -Hdes0 -Hi0 #V3 #HV13 #HVW2
-  >(lift_mono … HV13 … HV12) in HVW2; -V3 #HVW2
-  @(s4 … IHA … (V0 @ V0s) … HW12 HL02) /3 width=4/
-| #L #V1s #V2s #HV12s #a #V #T #HA #HV #L0 #V10 #X #des #HB #HL0 #H
-  elim (lifts_inv_applv1 … H) -H #V10s #Y #HV10s #HY #H destruct
-  elim (lifts_inv_bind1 … HY) -HY #V0 #T0 #HV0 #HT0 #H destruct
-  elim (lift_total V10 0 1) #V20 #HV120
-  elim (liftv_total 0 1 V10s) #V20s #HV120s
-  @(s5 … IHA … (V10 @ V10s) (V20 @ V20s)) /2 width=1/ /2 width=6 by rp_lifts/
-  @(HA … (des + 1)) /2 width=1/
-  [ @(s7 … IHB … HB … HV120) /2 width=1/
-  | @lifts_applv //
-    elim (liftsv_liftv_trans_le … HV10s … HV120s) -V10s #V10s #HV10s #HV120s
-    >(liftv_mono … HV12s … HV10s) -V1s //
-  ]
-| #L #Vs #T #W #HA #HW #L0 #V0 #X #des #HB #HL0 #H
-  elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct
-  elim (lifts_inv_flat1 … HY) -HY #W0 #T0 #HW0 #HT0 #H destruct
-  @(s6 … IHA … (V0 @ V0s)) /2 width=6 by rp_lifts/ /3 width=4/
-| /3 width=7/
-]
-qed.
-
-lemma aacr_abst: ∀RR,RS,RP. acp RR RS RP → acr RR RS RP (λL,T. RP L T) →
-                 ∀a,L,W,T,A,B. RP L W → (
-                    ∀L0,V0,T0,des. ⇩*[des] L0 ≡ L → ⇧*[des + 1] T ≡ T0 →
-                                   ⦃L0, V0⦄ ϵ[RP] 〚B〛 → ⦃L0. ⓓV0, T0⦄ ϵ[RP] 〚A〛
-                 ) →
-                 ⦃L, ⓛ{a}W. T⦄ ϵ[RP] 〚②B. A〛.
-#RR #RS #RP #H1RP #H2RP #a #L #W #T #A #B #HW #HA #L0 #V0 #X #des #HB #HL0 #H
-lapply (aacr_acr … H1RP H2RP A) #HCA
-lapply (aacr_acr … H1RP H2RP B) #HCB
-elim (lifts_inv_bind1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct
-lapply (s1 … HCB) -HCB #HCB
-@(s3 … HCA … ◊) /2 width=6 by rp_lifts/
-@(s5 … HCA … ◊ ◊) // /2 width=1/ /2 width=3/
-qed.
-
-(* Basic_1: removed theorems 2: sc3_arity_gen sc3_repl *)
-(* Basic_1: removed local theorems 1: sc3_sn3_abst *)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/cpe.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/cpe.ma
deleted file mode 100644 (file)
index 285e6e4..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/cprs.ma".
-include "basic_2/computation/csn.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL EVALUATION ON TERMS **************************)
-
-definition cpe: lenv → relation term ≝
-                λL,T1,T2. L ⊢ T1 ➡* T2 ∧ L ⊢ 𝐍⦃T2⦄.
-
-interpretation "context-sensitive parallel evaluation (term)"
-   'PEval L T1 T2 = (cpe L T1 T2).
-
-(* Basic_properties *********************************************************)
-
-(* Basic_1: was: nf2_sn3 *)
-lemma cpe_csn: ∀L,T1. L ⊢ ⬊* T1 → ∃T2. L ⊢ T1 ➡* 𝐍⦃T2⦄.
-#L #T1 #H @(csn_ind … H) -T1
-#T1 #_ #IHT1
-elim (cnf_dec L T1) /3 width=3/
-* #T #H1T1 #H2T1
-elim (IHT1 … H1T1 H2T1) -IHT1 -H2T1 #T2 * /4 width=3/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/cpe_cpe.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/cpe_cpe.ma
deleted file mode 100644 (file)
index ec77078..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/cprs_cprs.ma".
-include "basic_2/computation/cpe.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL EVALUATION ON TERMS **************************)
-
-(* Main properties *********************************************************)
-
-(* Basic_1: was: nf2_pr3_confluence *)
-theorem cpe_mono: ∀L,T,T1. L ⊢ T ➡* 𝐍⦃T1⦄ → ∀T2. L ⊢ T ➡* 𝐍⦃T2⦄ → T1 = T2.
-#L #T #T1 * #H1T1 #H2T1 #T2 * #H1T2 #H2T2
-elim (cprs_conf … H1T1 … H1T2) -T #T #HT1
->(cprs_inv_cnf1 … HT1 H2T1) -T1 #HT2
->(cprs_inv_cnf1 … HT2 H2T2) -T2 //
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/cprs.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/cprs.ma
deleted file mode 100644 (file)
index ae0c1ae..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/reducibility/cnf.ma".
-include "basic_2/computation/tprs.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
-
-(* Basic_1: includes: pr3_pr2 *)
-definition cprs: lenv → relation term ≝
-                 λL. TC … (cpr L).
-
-interpretation "context-sensitive parallel computation (term)"
-   'PRedStar L T1 T2 = (cprs L T1 T2).
-
-(* Basic eliminators ********************************************************)
-
-lemma cprs_ind: ∀L,T1. ∀R:predicate term. R T1 →
-                (∀T,T2. L ⊢ T1 ➡* T → L ⊢ T ➡ T2 → R T → R T2) →
-                ∀T2. L ⊢ T1 ➡* T2 → R T2.
-#L #T1 #R #HT1 #IHT1 #T2 #HT12
-@(TC_star_ind … HT1 IHT1 … HT12) //
-qed-.
-
-lemma cprs_ind_dx: ∀L,T2. ∀R:predicate term. R T2 →
-                   (∀T1,T. L ⊢ T1 ➡ T → L ⊢ T ➡* T2 → R T → R T1) →
-                   ∀T1. L ⊢ T1 ➡* T2 → R T1.
-#L #T2 #R #HT2 #IHT2 #T1 #HT12
-@(TC_star_ind_dx … HT2 IHT2 … HT12) //
-qed-.
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was: pr3_refl *)
-lemma cprs_refl: ∀L,T. L ⊢ T ➡* T.
-/2 width=1/ qed.
-
-lemma cprs_strap1: ∀L,T1,T,T2.
-                   L ⊢ T1 ➡* T → L ⊢ T ➡ T2 → L ⊢ T1 ➡* T2.
-/2 width=3/ qed.
-
-(* Basic_1: was: pr3_step *)
-lemma cprs_strap2: ∀L,T1,T,T2.
-                   L ⊢ T1 ➡ T → L ⊢ T ➡* T2 → L ⊢ T1 ➡* T2.
-/2 width=3/ qed.
-
-(* Note: it does not hold replacing |L1| with |L2| *)
-lemma cprs_lsubs_trans: ∀L1,T1,T2. L1 ⊢ T1 ➡* T2 →
-                        ∀L2. L2 ≼ [0, |L1|] L1 → L2 ⊢ T1 ➡* T2.
-/3 width=3/
-qed.
-
-(* Basic_1: was only: pr3_thin_dx *)
-lemma cprs_flat_dx: ∀I,L,V1,V2. L ⊢ V1 ➡ V2 → ∀T1,T2. L ⊢ T1 ➡* T2 →
-                    L ⊢ ⓕ{I} V1. T1 ➡* ⓕ{I} V2. T2.
-#I #L #V1 #V2 #HV12 #T1 #T2 #HT12 @(cprs_ind … HT12) -T2 /3 width=1/
-#T #T2 #_ #HT2 #IHT2
-@(cprs_strap1 … IHT2) -IHT2 /2 width=1/
-qed.
-
-(* Basic_1: was: pr3_pr1 *)
-lemma tprs_cprs: ∀T1,T2. T1 ➡* T2 → ∀L. L ⊢ T1 ➡* T2.
-#T1 #T2 #H @(tprs_ind … H) -T2 /2 width=1/ /3 width=3/
-qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-(* Basic_1: was: pr3_gen_sort *)
-lemma cprs_inv_sort1: ∀L,U2,k. L ⊢ ⋆k ➡* U2 → U2 = ⋆k.
-#L #U2 #k #H @(cprs_ind … H) -U2 //
-#U2 #U #_ #HU2 #IHU2 destruct
->(cpr_inv_sort1 … HU2) -HU2 //
-qed-.
-
-(* Basic_1: was: pr3_gen_cast *)
-lemma cprs_inv_cast1: ∀L,W1,T1,U2. L ⊢ ⓝW1.T1 ➡* U2 → L ⊢ T1 ➡* U2 ∨
-                      ∃∃W2,T2. L ⊢ W1 ➡* W2 & L ⊢ T1 ➡* T2 & U2 = ⓝW2.T2.
-#L #W1 #T1 #U2 #H @(cprs_ind … H) -U2 /3 width=5/
-#U2 #U #_ #HU2 * /3 width=3/ *
-#W #T #HW1 #HT1 #H destruct
-elim (cpr_inv_cast1 … HU2) -HU2 /3 width=3/ *
-#W2 #T2 #HW2 #HT2 #H destruct /4 width=5/
-qed-.
-
-(* Basic_1: was: nf2_pr3_unfold *)
-lemma cprs_inv_cnf1: ∀L,T,U. L ⊢ T ➡* U → L ⊢ 𝐍⦃T⦄ → T = U.
-#L #T #U #H @(cprs_ind_dx … H) -T //
-#T0 #T #H1T0 #_ #IHT #H2T0
-lapply (H2T0 … H1T0) -H1T0 #H destruct /2 width=1/
-qed-.
-
-lemma tprs_inv_cnf1: ∀T,U. T ➡* U → ⋆ ⊢ 𝐍⦃T⦄ → T = U.
-/3 width=3 by tprs_cprs, cprs_inv_cnf1/ qed-.
-
-(* Basic_1: removed theorems 10:
-   clear_pr3_trans pr3_cflat pr3_gen_bind
-   pr3_head_1 pr3_head_2 pr3_head_21 pr3_head_12
-   pr3_iso_appl_bind pr3_iso_appls_appl_bind pr3_iso_appls_bind
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_aaa.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_aaa.ma
deleted file mode 100644 (file)
index e04e3c7..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/cpr_aaa.ma".
-include "basic_2/computation/cprs.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
-
-(* Properties about atomic arity assignment on terms ************************)
-
-lemma aaa_cprs_conf: ∀L,T1,A. L ⊢ T1 ⁝ A → ∀T2. L ⊢ T1 ➡* T2 → L ⊢ T2 ⁝ A.
-#L #T1 #A #HT1 #T2 #HT12
-@(TC_Conf3 … HT1 ? HT12) /2 width=3/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_cprs.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_cprs.ma
deleted file mode 100644 (file)
index 8f94b0f..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/reducibility/cpr_lift.ma".
-include "basic_2/reducibility/cpr_cpr.ma".
-include "basic_2/reducibility/lfpr_cpr.ma".
-include "basic_2/computation/cprs_lfpr.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
-
-(* Advanced properties ******************************************************)
-
-lemma cprs_abst_dx: ∀L,V1,V2. L ⊢ V1 ➡ V2 → ∀V,T1,T2.
-                    L.ⓛV ⊢ T1 ➡* T2 → ∀a. L ⊢ ⓛ{a}V1. T1 ➡* ⓛ{a}V2. T2.
-#L #V1 #V2 #HV12 #V #T1 #T2 #HT12 #a @(cprs_ind … HT12) -T2
-[ /3 width=2/
-| /3 width=6 by cprs_strap1, cpr_abst/ (**) (* /3 width=6/ is too slow *)
-]
-qed.
-
-lemma cprs_abbr1_dx: ∀L,V1,V2. L ⊢ V1 ➡ V2 → ∀T1,T2. L. ⓓV1 ⊢ T1 ➡* T2 →
-                     ∀a. L ⊢ ⓓ{a}V1. T1 ➡* ⓓ{a}V2. T2.
-#L #V1 #V2 #HV12 #T1 #T2 #HT12 #a @(cprs_ind_dx … HT12) -T1
-[ /3 width=5/
-| #T1 #T #HT1 #_ #IHT1
-  @(cprs_strap2 … IHT1) -IHT1 /2 width=1/
-]
-qed.
-
-lemma cpr_abbr1: ∀L,V1,V2. L ⊢ V1 ➡ V2 → ∀T1,T2. L. ⓓV1 ⊢ T1 ➡ T2 →
-                 ∀a. L ⊢ ⓓ{a}V1. T1 ➡* ⓓ{a}V2. T2.
-/3 width=1/ qed.
-
-lemma cpr_abbr2: ∀L,V1,V2. L ⊢ V1 ➡ V2 → ∀T1,T2. L. ⓓV2 ⊢ T1 ➡ T2 →
-                 ∀a. L ⊢ ⓓ{a}V1. T1 ➡* ⓓ{a}V2. T2.
-#L #V1 #V2 #HV12 #T1 #T2 #HT12
-lapply (lfpr_cpr_trans (L. ⓓV1) … HT12) /2 width=1/
-qed.
-
-(* Basic_1: was: pr3_strip *)
-lemma cprs_strip: ∀L,T1,T. L ⊢ T ➡* T1 → ∀T2. L ⊢ T ➡ T2 →
-                  ∃∃T0. L ⊢ T1 ➡ T0 & L ⊢ T2 ➡* T0.
-/3 width=3/ 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,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 /4 width=7/
-  | #a #V #V2 #W0 #W2 #T #T2 #HV0 #HW02 #HT2 #HV2 #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-.
-
-(* Main propertis ***********************************************************)
-
-(* Basic_1: was: pr3_confluence *)
-theorem cprs_conf: ∀L,T1,T. L ⊢ T ➡* T1 → ∀T2. L ⊢ T ➡* T2 →
-                   ∃∃T0. L ⊢ T1 ➡* T0 & L ⊢ T2 ➡* T0.
-/3 width=3/ qed.
-
-(* Basic_1: was: pr3_t *)
-theorem cprs_trans: ∀L,T1,T. L ⊢ T1 ➡* T → ∀T2. L ⊢ T ➡* T2 → L ⊢ T1 ➡* T2.
-/2 width=3/ qed.
-
-(* Basic_1: was: pr3_flat *)
-lemma cprs_flat: ∀I,L,T1,T2. L ⊢ T1 ➡* T2 → ∀V1,V2. L ⊢ V1 ➡* V2 →
-                 L ⊢ ⓕ{I} V1. T1 ➡* ⓕ{I} V2. T2.
-#I #L #T1 #T2 #HT12 #V1 #V2 #HV12 @(cprs_ind … HV12) -V2 /2 width=1/
-#V #V2 #_ #HV2 #IHV1
-@(cprs_trans … IHV1) -IHV1 /2 width=1/
-qed.
-
-lemma cprs_abst: ∀L,V1,V2. L ⊢ V1 ➡* V2 → ∀V,T1,T2.
-                 L.ⓛV ⊢ T1 ➡* T2 → ∀a. L ⊢ ⓛ{a}V1. T1 ➡* ⓛ{a}V2. T2.
-#L #V1 #V2 #HV12 #V #T1 #T2 #HT12 #a @(cprs_ind … HV12) -V2
-[ lapply (cprs_lsubs_trans … HT12 (L.ⓛV1) ?) -HT12 /2 width=2/
-| #V0 #V2 #_ #HV02 #IHV01
-  @(cprs_trans … IHV01) -V1 /2 width=2/
-]
-qed.
-
-lemma cprs_abbr1: ∀L,V1,T1,T2. L. ⓓV1 ⊢ T1 ➡* T2 → ∀V2. L ⊢ V1 ➡* V2 →
-                  ∀a.L ⊢ ⓓ{a}V1. T1 ➡* ⓓ{a}V2. T2.
-#L #V1 #T1 #T2 #HT12 #V2 #HV12 #a @(cprs_ind … HV12) -V2 /2 width=1/
-#V #V2 #_ #HV2 #IHV1
-@(cprs_trans … IHV1) -IHV1 /2 width=1/
-qed.
-
-lemma cprs_abbr2_dx: ∀L,V1,V2. L ⊢ V1 ➡ V2 → ∀T1,T2. L. ⓓV2 ⊢ T1 ➡* T2 →
-                     ∀a. L ⊢ ⓓ{a}V1. T1 ➡* ⓓ{a}V2. T2.
-#L #V1 #V2 #HV12 #T1 #T2 #HT12 #a @(cprs_ind_dx … HT12) -T1
-[ /2 width=1/
-| #T1 #T #HT1 #_ #IHT1
-  lapply (lfpr_cpr_trans (L. ⓓV1) … HT1) -HT1 /2 width=1/ #HT1
-  @(cprs_trans … IHT1) -IHT1 /2 width=1/
-]
-qed.
-
-lemma cprs_abbr2: ∀L,V1,V2. L ⊢ V1 ➡* V2 → ∀T1,T2. L. ⓓV2 ⊢ T1 ➡* T2 →
-                  ∀a. L ⊢ ⓓ{a}V1. T1 ➡* ⓓ{a}V2. T2.
-#L #V1 #V2 #HV12 @(cprs_ind … HV12) -V2 /2 width=1/
-#V #V2 #_ #HV2 #IHV1 #T1 #T2 #HT12 #a
-lapply (IHV1 T1 T1 ? a) -IHV1 // #HV1
-@(cprs_trans … HV1) -HV1 /2 width=1/
-qed.
-
-lemma cprs_beta_dx: ∀L,V1,V2,W,T1,T2.
-                    L ⊢ V1 ➡ V2 → L.ⓛW ⊢ T1 ➡* T2 →
-                    ∀a.L ⊢ ⓐV1.ⓛ{a}W.T1 ➡* ⓓ{a}V2.T2.
-#L #V1 #V2 #W #T1 #T2 #HV12 #HT12 #a @(cprs_ind … HT12) -T2
-[ /3 width=1/
-| -HV12 #T #T2 #_ #HT2 #IHT1
-  lapply (cpr_lsubs_trans … HT2 (L.ⓓV2) ?) -HT2 /2 width=1/ #HT2
-  @(cprs_trans … IHT1) -V1 -W -T1 /3 width=1/
-]
-qed.
-
-(* Basic_1: was only: pr3_pr2_pr3_t pr3_wcpr0_t *)
-lemma lcpr_cprs_trans: ∀L1,L2. ⦃L1⦄ ➡ ⦃L2⦄ →
-                       ∀T1,T2. L2 ⊢ T1 ➡* T2 → L1 ⊢ T1 ➡* T2.
-#L1 #L2 #HL12 #T1 #T2 #H @(cprs_ind … H) -T2 //
-#T #T2 #_ #HT2 #IHT2
-@(cprs_trans … IHT2) /2 width=3/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_delift.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_delift.ma
deleted file mode 100644 (file)
index 6b78926..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/cpr_delift.ma".
-include "basic_2/reducibility/cpr_cpr.ma".
-include "basic_2/computation/cprs.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
-
-(* Properties on inverse basic term relocation ******************************)
-
-(* Note: this should be stated with tprs *)
-lemma cprs_zeta_delift: ∀L,V,T1,T2. L.ⓓV ⊢ ▼*[O, 1] T1 ≡ T2 → L ⊢ +ⓓV.T1 ➡* T2.
-#L #V #T1 #T2 * #T #HT1 #HT2
-@(cprs_strap2 … (+ⓓV.T)) [ /3 width=3/ | @inj /3 width=3/ ] (**) (* explicit constructor, /5 width=3/ is too slow *)
-qed.
-
-(* Basic_1: was only: pr3_gen_cabbr *)
-lemma thin_cprs_delift_conf: ∀L,U1,U2. L ⊢ U1 ➡* U2 →
-                             ∀K,d,e. ▼*[d, e] L ≡ K → ∀T1. L ⊢ ▼*[d, e] U1 ≡ T1 →
-                             ∃∃T2. K ⊢ T1 ➡* T2 & L ⊢ ▼*[d, e] U2 ≡ T2.
-#L #U1 #U2 #H @(cprs_ind … H) -U2 /2 width=3/
-#U #U2 #_ #HU2 #IHU1 #K #d #e #HLK #T1 #HTU1
-elim (IHU1 … HLK … HTU1) -U1 #T #HT1 #HUT
-elim (thin_cpr_delift_conf … HU2 … HLK … HUT) -U -HLK /3 width=3/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_lfpr.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_lfpr.ma
deleted file mode 100644 (file)
index a066435..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/ltpr_tps.ma".
-include "basic_2/reducibility/cpr_ltpss.ma".
-include "basic_2/reducibility/lfpr.ma".
-include "basic_2/computation/cprs.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
-
-(* Properties concerning focalized parallel reduction on local environments *)
-
-lemma ltpr_tpss_trans: ∀L1,L2. L1 ➡ L2 → ∀T1,T2,d,e. L2 ⊢ T1 ▶* [d, e] T2 →
-                       ∃∃T. L1 ⊢ T1 ▶* [d, e] T & L1 ⊢ T ➡* T2.
-#L1 #L2 #HL12 #T1 #T2 #d #e #H @(tpss_ind … H) -T2
-[ /2 width=3/
-| #T #T2 #_ #HT2 * #T0 #HT10 #HT0
-  elim (ltpr_tps_trans … HT2 … HL12) -L2 #T3 #HT3 #HT32
-  @(ex2_1_intro … HT10) -T1 (**) (* explicit constructors *)
-  @(cprs_strap1 … T3 …) /2 width=1/ -HT32
-  @(cprs_strap1 … HT0) -HT0 /3 width=3/
-]
-qed.
-
-(* Basic_1: was just: pr3_pr0_pr2_t *)
-lemma ltpr_cpr_trans: ∀L1,L2. L1 ➡ L2 → ∀T1,T2. L2 ⊢ T1 ➡ T2 → L1 ⊢ T1 ➡* T2.
-#L1 #L2 #HL12 #T1 #T2 * #T #HT1
-<(ltpr_fwd_length … HL12) #HT2
-elim (ltpr_tpss_trans … HL12 … HT2) -L2 /3 width=3/
-qed.
-
-(* Basic_1: was just: pr3_pr2_pr2_t *)
-lemma lfpr_cpr_trans: ∀L1,L2. ⦃L1⦄ ➡ ⦃L2⦄ → ∀T1,T2. L2 ⊢ T1 ➡ T2 → L1 ⊢ T1 ➡* T2.
-#L1 #L2 * /3 width=7/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_lfprs.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_lfprs.ma
deleted file mode 100644 (file)
index 33620d0..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/cprs_cprs.ma".
-include "basic_2/computation/lfprs_lfprs.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
-
-(* Properties on focalized computation for local environments ***************)
-
-(* Basic_1: was just: pr3_pr3_pr3_t *)
-lemma lfprs_cprs_trans: ∀L1,L2. ⦃L1⦄ ➡* ⦃L2⦄ →
-                        ∀T1,T2. L2 ⊢ T1 ➡* T2 → L1 ⊢ T1 ➡* T2.
-#L1 #L2 #HL12 @(lfprs_ind … HL12) -L2 // /3 width=3/
-qed.
-
-lemma lfprs_cpr_trans: ∀L1,L2. ⦃L1⦄ ➡* ⦃L2⦄ →
-                       ∀T1,T2. L2 ⊢ T1 ➡ T2 → L1 ⊢ T1 ➡* T2.
-/3 width=3 by lfprs_cprs_trans, inj/ qed.
-
-(* Advanced inversion lemmas ************************************************)
-
-(* 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 &
-                                U2 = ⓓ{a}V2. T2
-                      ) ∨
-                      ∃∃T2. L. ⓓV1 ⊢ T1 ➡* T2 & ⇧[0, 1] U2 ≡ T2 & a = true.
-#a #L #V1 #T1 #U2 #H @(cprs_ind … H) -U2 /3 width=5/
-#U0 #U2 #_ #HU02 * *
-[ #V0 #T0 #HV10 #HT10 #H destruct
-  elim (cpr_inv_abbr1 … HU02) -HU02 *
-  [ #V #V2 #T2 #HV0 #HV2 #HT02 #H destruct
-    lapply (cpr_intro … HV0 … HV2) -HV2 #HV02
-    lapply (ltpr_cpr_trans (L.ⓓV0) … HT02) /2 width=1/ -V #HT02
-    lapply (lfprs_cprs_trans (L. ⓓV1) … HT02) -HT02 /2 width=1/ /4 width=5/
-  | #T2 #HT02 #HUT2
-    lapply (lfprs_cpr_trans (L.ⓓV1) … HT02) -HT02 /2 width=1/ -V0 #HT02
-    lapply (cprs_trans … HT10 … HT02) -T0 /3 width=3/
-  ]
-| #U1 #HTU1 #HU01
-  elim (lift_total U2 0 1) #U #HU2
-  lapply (cpr_lift (L.ⓓV1) … HU01 … HU2 HU02) -U0 /2 width=1/ /4 width=3/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_lift.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_lift.ma
deleted file mode 100644 (file)
index 36ce0ef..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/reducibility/cpr_lift.ma".
-include "basic_2/computation/cprs.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
-
-(* Advanced inversion lemmas ************************************************)
-
-(* Basic_1: was: pr3_gen_lref *)
-lemma cprs_inv_lref1: ∀L,T2,i. L ⊢ #i ➡* T2 →
-                      T2 = #i ∨
-                      ∃∃K,V1,T1. ⇩[0, i] L ≡ K. ⓓV1 &
-                                 K ⊢ V1 ➡* T1 &
-                                 ⇧[0, i + 1] T1 ≡ T2 &
-                                 i < |L|.
-#L #T2 #i #H @(cprs_ind … H) -T2 /2 width=1/
-#T #T2 #_ #HT2 *
-[ #H destruct
-  elim (cpr_inv_lref1 … HT2) -HT2 /2 width=1/
-  * #K #V1 #T1 #HLK #HVT1 #HT12 #Hi
-  @or_intror @(ex4_3_intro … HLK … HT12) // /3 width=3/ (**) (* explicit constructors *)
-| * #K #V1 #T1 #HLK #HVT1 #HT1 #Hi
-  lapply (ldrop_fwd_ldrop2 … HLK) #H0LK
-  elim (cpr_inv_lift1 … H0LK … HT1 … HT2) -H0LK -T /4 width=6/
-]
-qed-.
-
-(* Basic_1: was: pr3_gen_abst *)
-lemma cprs_inv_abst1: ∀I,W,a,L,V1,T1,U2. L ⊢ ⓛ{a}V1. T1 ➡* U2 →
-                      ∃∃V2,T2. L ⊢ V1 ➡* V2 & L. ⓑ{I} W ⊢ T1 ➡* T2 &
-                               U2 = ⓛ{a}V2. T2.
-#I #W #a #L #V1 #T1 #U2 #H @(cprs_ind … H) -U2 /2 width=5/
-#U #U2 #_ #HU2 * #V #T #HV1 #HT1 #H destruct
-elim (cpr_inv_abst1 … HU2 I W) -HU2 #V2 #T2 #HV2 #HT2 #H destruct  /3 width=5/
-qed-.
-
-lemma cprs_inv_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_inv_abst1 I W … H) -H #V #T #HV1 #HT1 #H destruct /2 width=1/
-qed-.
-
-(* Relocation properties ****************************************************)
-
-(* Basic_1: was: pr3_lift *)
-lemma cprs_lift: ∀L,K,d,e. ⇩[d, e] L ≡ K → ∀T1,U1. ⇧[d, e] T1 ≡ U1 →
-                 ∀T2. K ⊢ T1 ➡* T2 → ∀U2. ⇧[d, e] T2 ≡ U2 →
-                 L ⊢ U1 ➡* U2.
-#L #K #d #e #HLK #T1 #U1 #HTU1 #T2 #HT12 @(cprs_ind … HT12) -T2
-[ -HLK #T2 #HT12
-   <(lift_mono … HTU1 … HT12) -T1 //
-| -HTU1 #T #T2 #_ #HT2 #IHT2 #U2 #HTU2
-  elim (lift_total T d e) #U #HTU
-  lapply (cpr_lift … HLK … HTU … HTU2 … HT2) -T2 -HLK /3 width=3/
-]
-qed.
-
-(* Basic_1: was: pr3_gen_lift *)
-lemma cprs_inv_lift1: ∀L,K,d,e. ⇩[d, e] L ≡ K →
-                      ∀T1,U1. ⇧[d, e] T1 ≡ U1 → ∀U2. L ⊢ U1 ➡* U2 →
-                      ∃∃T2. ⇧[d, e] T2 ≡ U2 & K ⊢ T1 ➡* T2.
-#L #K #d #e #HLK #T1 #U1 #HTU1 #U2 #HU12 @(cprs_ind … HU12) -U2 /2 width=3/
--HTU1 #U #U2 #_ #HU2 * #T #HTU #HT1
-elim (cpr_inv_lift1 … HLK … HTU … HU2) -U -HLK /3 width=5/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_ltpr.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_ltpr.ma
deleted file mode 100644 (file)
index 2682a76..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/cpr_ltpr.ma".
-include "basic_2/computation/cprs.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
-
-(* Properties concerning parallel unfold on terms ***************************)
-
-(* Basic_1: was only: pr3_subst1 *)
-lemma cprs_tpss_ltpr: ∀L1,T1,U1,d,e. L1 ⊢ T1 ▶* [d, e] U1 →
-                      ∀L2. L1 ➡ L2 → ∀T2. L2 ⊢ T1 ➡* T2 →
-                      ∃∃U2. L2 ⊢ U1 ➡* U2 & L2 ⊢ T2 ▶* [d, e] U2.
-#L1 #T1 #U1 #d #e #HTU1 #L2 #HL12 #T2 #HT12 elim HT12 -T2
-[ #T2 #HT12
-  elim (cpr_tpss_ltpr … HL12 … HT12 … HTU1) -L1 -T1 /3 width=3/
-| #T #T2 #_ #HT2 * #U #HU1 #HTU
-  elim (cpr_tpss_ltpr … HT2 … HTU) -L1 -T // /3 width=3/
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_tstc.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_tstc.ma
deleted file mode 100644 (file)
index f7afb8d..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/grammar/tstc.ma".
-include "basic_2/computation/cprs_lift.ma".
-include "basic_2/computation/cprs_lfprs.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
-
-(* Forward lemmas involving same top term constructor ***********************)
-
-lemma cprs_fwd_cnf: ∀L,T. L ⊢ 𝐍⦃T⦄ → ∀U. L ⊢ T ➡* U → T ≃ U.
-#L #T #HT #U #H
->(cprs_inv_cnf1 … H HT) -L -T //
-qed-.
-
-(* Basic_1: was: pr3_iso_beta *)
-lemma cprs_fwd_beta: ∀a,L,V,W,T,U. L ⊢ ⓐV. ⓛ{a}W. T ➡* U →
-                     ⓐV. ⓛ{a}W. T ≃ U ∨ L ⊢ ⓓ{a}V. T ➡* U.
-#a #L #V #W #T #U #H
-elim (cprs_inv_appl1 … H) -H *
-[ #V0 #T0 #_ #_ #H destruct /2 width=1/
-| #b #V0 #W0 #T0 #HV0 #HT0 #HU
-  elim (cprs_inv_abst1 Abbr V … HT0) -HT0 #W1 #T1 #_ #HT1 #H destruct -W1
-  @or_intror -W
-  @(cprs_trans … HU) -U /2 width=1/ (**) (* explicit constructor *)
-| #b #V1 #V2 #V0 #T1 #_ #_ #HT1 #_
-  elim (cprs_inv_abst1 Abbr V … HT1) -HT1 #W2 #T2 #_ #_ #H destruct
-]
-qed-.
-
-(* Note: probably this is an inversion lemma *)
-lemma cprs_fwd_delta: ∀L,K,V1,i. ⇩[0, i] L ≡ K. ⓓV1 →
-                      ∀V2. ⇧[0, i + 1] V1 ≡ V2 →
-                      ∀U. L ⊢ #i ➡* U →
-                      #i ≃ U ∨ L ⊢ V2 ➡* U.
-#L #K #V1 #i #HLK #V2 #HV12 #U #H
-elim (cprs_inv_lref1 … H) -H /2 width=1/
-* #K0 #V0 #U0 #HLK0 #HVU0 #HU0 #_
-lapply (ldrop_mono … HLK0 … HLK) -HLK0 #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK) -HLK /3 width=9/
-qed-.
-
-lemma cprs_fwd_theta: ∀a,L,V1,V,T,U. L ⊢ ⓐV1. ⓓ{a}V. T ➡* U →
-                      ∀V2. ⇧[0, 1] V1 ≡ V2 → ⓐV1. ⓓ{a}V. T ≃ U ∨
-                      L ⊢ ⓓ{a}V. ⓐV2. T ➡* U.
-#a #L #V1 #V #T #U #H #V2 #HV12
-elim (cprs_inv_appl1 … H) -H *
-[ -HV12 #V0 #T0 #_ #_ #H destruct /2 width=1/
-| #b #V0 #W #T0 #HV10 #HT0 #HU
-  elim (cprs_inv_abbr1 … HT0) -HT0 *
-  [ #V3 #T3 #_ #_ #H destruct
-  | #X #HT2 #H #H0 destruct
-    elim (lift_inv_bind1 … H) -H #W2 #T2 #HW2 #HT02 #H destruct
-    @or_intror @(cprs_trans … HU) -U (**) (* explicit constructor *)
-    @(cprs_trans … (+ⓓV.ⓐV2.ⓛ{b}W2.T2)) [ /3 width=1/ ] -T
-    @(cprs_strap2 … (ⓐV1.ⓛ{b}W.T0)) [ /5 width=7/ ] -V -V2 -W2 -T2
-    @(cprs_strap2 … (ⓓ{b}V1.T0)) [ /3 width=1/ ] -W /2 width=1/
-  ]
-| #b #V3 #V4 #V0 #T0 #HV13 #HV34 #HT0 #HU
-  @or_intror @(cprs_trans … HU) -U (**) (* explicit constructor *)
-  elim (cprs_inv_abbr1 … HT0) -HT0 *
-  [ #V5 #T5 #HV5 #HT5 #H destruct
-    lapply (cprs_lift (L.ⓓV) … HV12 … HV13 … HV34) -V1 -V3 /2 width=1/
-    /3 width=1/
-  | #X #HT1 #H #H0 destruct
-    elim (lift_inv_bind1 … H) -H #V5 #T5 #HV05 #HT05 #H destruct
-    lapply (cprs_lift (L.ⓓV0) … HV12 … HV13 … HV34) -V3 /2 width=1/ #HV24
-    @(cprs_trans … (+ⓓV.ⓐV2.ⓓ{b}V5.T5)) [ /3 width=1/ ] -T
-    @(cprs_strap2 … (ⓐV1.ⓓ{b}V0.T0)) [ /5 width=7/ ] -V -V5 -T5
-    @(cprs_strap2 … (ⓓ{b}V0.ⓐV2.T0)) [ /3 width=3/ ] -V1 /3 width=1/
-  ]
-]
-qed-.
-
-lemma cprs_fwd_tau: ∀L,W,T,U. L ⊢ ⓝW. T ➡* U →
-                    ⓝW. T ≃ U ∨ L ⊢ T ➡* U.
-#L #W #T #U #H
-elim (cprs_inv_cast1 … H) -H /2 width=1/ *
-#W0 #T0 #_ #_ #H destruct /2 width=1/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_tstc_vector.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_tstc_vector.ma
deleted file mode 100644 (file)
index fd3eb58..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/grammar/tstc_vector.ma".
-include "basic_2/substitution/lift_vector.ma".
-include "basic_2/computation/cprs_tstc.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
-
-(* Vector form of forward lemmas involving same top term constructor ********)
-
-(* Basic_1: was just: nf2_iso_appls_lref *)
-lemma cprs_fwd_cnf_vector: ∀L,T.  𝐒⦃T⦄ → L ⊢ 𝐍⦃T⦄ → ∀Vs,U. L ⊢ ⒶVs.T ➡* U → ⒶVs.T ≃ U.
-#L #T #H1T #H2T #Vs elim Vs -Vs [ @(cprs_fwd_cnf … H2T) ] (**) (* /2 width=3 by cprs_fwd_cnf/ does not work *)
-#V #Vs #IHVs #U #H
-elim (cprs_inv_appl1 … H) -H *
-[ -IHVs #V0 #T0 #_ #_ #H destruct /2 width=1/
-| #a #V0 #W0 #T0 #HV0 #HT0 #HU
-  lapply (IHVs … HT0) -IHVs -HT0 #HT0
-  elim (tstc_inv_bind_appls_simple … HT0 ?) //
-| #a #V1 #V2 #V0 #T0 #HV1 #HV12 #HT0 #HU
-  lapply (IHVs … HT0) -IHVs -HT0 #HT0
-  elim (tstc_inv_bind_appls_simple … HT0 ?) //
-]
-qed-.
-
-(* Basic_1: was: pr3_iso_appls_beta *)
-lemma cprs_fwd_beta_vector: ∀a,L,Vs,V,W,T,U. L ⊢ ⒶVs. ⓐV. ⓛ{a}W. T ➡* U →
-                            ⒶVs. ⓐV. ⓛ{a}W. T ≃ U ∨ L ⊢ ⒶVs. ⓓ{a}V. T ➡* U.
-#a #L #Vs elim Vs -Vs /2 width=1 by cprs_fwd_beta/
-#V0 #Vs #IHVs #V #W #T #U #H
-elim (cprs_inv_appl1 … H) -H *
-[ -IHVs #V1 #T1 #_ #_ #H destruct /2 width=1/
-| #b #V1 #W1 #T1 #HV01 #HT1 #HU
-  elim (IHVs … HT1) -IHVs -HT1 #HT1
-  [ elim (tstc_inv_bind_appls_simple … HT1 ?) //
-  | @or_intror -W (**) (* explicit constructor *)
-    @(cprs_trans … HU) -U
-    @(cprs_strap1 … (ⓐV1.ⓛ{b}W1.T1)) [ /2 width=1/ ] -V -V0 -Vs -T /3 width=1/
-  ]
-| #b #V1 #V2 #V3 #T1 #HV01 #HV12 #HT1 #HU
-  elim (IHVs … HT1) -IHVs -HT1 #HT1
-  [ elim (tstc_inv_bind_appls_simple … HT1 ?) //
-  | @or_intror -W (**) (* explicit constructor *)
-    @(cprs_trans … HU) -U
-    @(cprs_strap1 … (ⓐV1.ⓓ{b}V3.T1)) [ /2 width=1/ ] -V -V0 -Vs -T /3 width=3/
-  ]
-]
-qed-.
-
-lemma cprs_fwd_delta_vector: ∀L,K,V1,i. ⇩[0, i] L ≡ K. ⓓV1 →
-                             ∀V2. ⇧[0, i + 1] V1 ≡ V2 →
-                             ∀Vs,U. L ⊢ ⒶVs.#i ➡* U →
-                             ⒶVs.#i ≃ U ∨ L ⊢ ⒶVs.V2 ➡* U.
-#L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs /2 width=4 by cprs_fwd_delta/
-#V #Vs #IHVs #U #H -K -V1
-elim (cprs_inv_appl1 … H) -H *
-[ -IHVs #V0 #T0 #_ #_ #H destruct /2 width=1/
-| #b #V0 #W0 #T0 #HV0 #HT0 #HU
-  elim (IHVs … HT0) -IHVs -HT0 #HT0
-  [ elim (tstc_inv_bind_appls_simple … HT0 ?) //
-  | @or_intror -i (**) (* explicit constructor *)
-    @(cprs_trans … HU) -U
-    @(cprs_strap1 … (ⓐV0.ⓛ{b}W0.T0)) [ /2 width=1/ ] -V -V2 -Vs /3 width=1/
-  ]
-| #b #V0 #V1 #V3 #T0 #HV0 #HV01 #HT0 #HU
-  elim (IHVs … HT0) -IHVs -HT0 #HT0
-  [ elim (tstc_inv_bind_appls_simple … HT0 ?) //
-  | @or_intror -i (**) (* explicit constructor *)
-    @(cprs_trans … HU) -U
-    @(cprs_strap1 … (ⓐV0.ⓓ{b}V3.T0)) [ /2 width=1/ ] -V -V2 -Vs /3 width=3/
-  ]
-]
-qed-.
-
-(* Basic_1: was: pr3_iso_appls_abbr *)
-lemma cprs_fwd_theta_vector: ∀L,V1s,V2s. ⇧[0, 1] V1s ≡ V2s →
-                             ∀a,V,T,U. L ⊢ ⒶV1s. ⓓ{a}V. T ➡* U →
-                             ⒶV1s. ⓓ{a}V. T ≃ U ∨ L ⊢ ⓓ{a}V. ⒶV2s. T ➡* U.
-#L #V1s #V2s * -V1s -V2s /3 width=1/
-#V1s #V2s #V1a #V2a #HV12a #HV12s #a
-generalize in match HV12a; -HV12a
-generalize in match V2a; -V2a
-generalize in match V1a; -V1a
-elim HV12s -V1s -V2s /2 width=1 by cprs_fwd_theta/
-#V1s #V2s #V1b #V2b #HV12b #_ #IHV12s #V1a #V2a #HV12a #V #T #U #H
-elim (cprs_inv_appl1 … H) -H *
-[ -IHV12s -HV12a -HV12b #V0 #T0 #_ #_ #H destruct /2 width=1/
-| #b #V0a #W0 #T0 #HV10a #HT0 #HU
-  elim (IHV12s … HV12b … HT0) -IHV12s -HT0 #HT0
-  [ -HV12a -HV12b -HV10a -HU
-    elim (tstc_inv_pair1 … HT0) #V1 #T1 #H destruct
-  | @or_intror -V1s (**) (* explicit constructor *)
-    @(cprs_trans … HU) -U
-    elim (cprs_inv_abbr1 … HT0) -HT0 *
-    [ -HV12a -HV12b -HV10a #V1 #T1 #_ #_ #H destruct
-    | -V1b #X #HT1 #H #H0 destruct
-      elim (lift_inv_bind1 … H) -H #W1 #T1 #HW01 #HT01 #H destruct
-      @(cprs_trans … (+ⓓV.ⓐV2a.ⓛ{b}W1.T1)) [ /3 width=1/ ] -T -V2b -V2s
-      @(cprs_strap2 … (ⓐV1a.ⓛ{b}W0.T0)) [ /5 width=7/ ] -V -V2a -W1 -T1
-      @(cprs_strap2 … (ⓓ{b}V1a.T0)) [ /3 width=1/ ] -W0 /2 width=1/
-    ]
-  ]
-| #b #V0a #Va #V0 #T0 #HV10a #HV0a #HT0 #HU
-  elim (IHV12s … HV12b … HT0) -HV12b -IHV12s -HT0 #HT0
-  [ -HV12a -HV10a -HV0a -HU
-    elim (tstc_inv_pair1 … HT0) #V1 #T1 #H destruct
-  | @or_intror -V1s -V1b (**) (* explicit constructor *)
-    @(cprs_trans … HU) -U
-    elim (cprs_inv_abbr1 … HT0) -HT0 *
-    [ #V1 #T1 #HV1 #HT1 #H destruct
-      lapply (cprs_lift (L.ⓓV) … HV12a … HV10a … HV0a) -V1a -V0a [ /2 width=1/ ] #HV2a
-      @(cprs_trans … (ⓓ{a}V.ⓐV2a.T1)) [ /3 width=1/ ] -T -V2b -V2s /3 width=1/
-    | #X #HT1 #H #H0 destruct
-      elim (lift_inv_bind1 … H) -H #V1 #T1 #HW01 #HT01 #H destruct
-      lapply (cprs_lift (L.ⓓV0) … HV12a … HV10a … HV0a) -V0a [ /2 width=1/ ] #HV2a
-      @(cprs_trans … (+ⓓV.ⓐV2a.ⓓ{b}V1.T1)) [ /3 width=1/ ] -T -V2b -V2s
-      @(cprs_strap2 … (ⓐV1a.ⓓ{b}V0.T0)) [ /5 width=7/ ] -V -V1 -T1
-      @(cprs_strap2 … (ⓓ{b}V0.ⓐV2a.T0)) [ /3 width=3/ ] -V1a /3 width=1/
-    ]
-  ]
-]  
-qed-.
-
-(* Basic_1: was: pr3_iso_appls_cast *)
-lemma cprs_fwd_tau_vector: ∀L,Vs,W,T,U. L ⊢ ⒶVs. ⓝW. T ➡* U →
-                           ⒶVs. ⓝW. T ≃ U ∨ L ⊢ ⒶVs. T ➡* U.
-#L #Vs elim Vs -Vs /2 width=1 by cprs_fwd_tau/
-#V #Vs #IHVs #W #T #U #H
-elim (cprs_inv_appl1 … H) -H *
-[ -IHVs #V0 #T0 #_ #_ #H destruct /2 width=1/
-| #b #V0 #W0 #T0 #HV0 #HT0 #HU
-  elim (IHVs … HT0) -IHVs -HT0 #HT0
-  [ elim (tstc_inv_bind_appls_simple … HT0 ?) //
-  | @or_intror -W (**) (* explicit constructor *)
-    @(cprs_trans … HU) -U
-    @(cprs_strap1 … (ⓐV0.ⓛ{b}W0.T0)) [ /2 width=1/ ] -V -Vs -T /3 width=1/
-  ]
-| #b #V0 #V1 #V2 #T0 #HV0 #HV01 #HT0 #HU
-  elim (IHVs … HT0) -IHVs -HT0 #HT0
-  [ elim (tstc_inv_bind_appls_simple … HT0 ?) //
-  | @or_intror -W (**) (* explicit constructor *)
-    @(cprs_trans … HU) -U
-    @(cprs_strap1 … (ⓐV0.ⓓ{b}V2.T0)) [ /2 width=1/ ] -V -Vs -T /3 width=3/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/csn.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/csn.ma
deleted file mode 100644 (file)
index 3ed3101..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/cnf.ma".
-
-(* CONTEXT-SENSITIVE STRONGLY NORMALIZING TERMS *****************************)
-
-definition csn: lenv → predicate term ≝ λL. SN … (cpr L) (eq …).
-
-interpretation
-   "context-sensitive strong normalization (term)"
-   'SN L T = (csn L T).
-
-(* Basic eliminators ********************************************************)
-
-lemma csn_ind: ∀L. ∀R:predicate term.
-               (∀T1. L ⊢ ⬊* T1 →
-                     (∀T2. L ⊢ T1 ➡ T2 → (T1 = T2 → ⊥) → R T2) →
-                     R T1
-               ) →
-               ∀T. L ⊢ ⬊* T → R T.
-#L #R #H0 #T1 #H elim H -T1 #T1 #HT1 #IHT1
-@H0 -H0 /3 width=1/ -IHT1 /4 width=1/
-qed-.
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was: sn3_pr2_intro *)
-lemma csn_intro: ∀L,T1.
-                 (∀T2. L ⊢ T1 ➡ T2 → (T1 = T2 → ⊥) → L ⊢ ⬊* T2) → L ⊢ ⬊* T1.
-/4 width=1/ qed.
-
-(* Basic_1: was: sn3_nf2 *)
-lemma csn_cnf: ∀L,T. L ⊢ 𝐍⦃T⦄ → L ⊢ ⬊* T.
-/2 width=1/ qed.
-
-lemma csn_cpr_trans: ∀L,T1. L ⊢ ⬊* T1 → ∀T2. L ⊢ T1 ➡ T2 → L ⊢ ⬊* T2.
-#L #T1 #H elim H -T1 #T1 #HT1 #IHT1 #T2 #HLT12
-@csn_intro #T #HLT2 #HT2
-elim (term_eq_dec T1 T2) #HT12
-[ -IHT1 -HLT12 destruct /3 width=1/
-| -HT1 -HT2 /3 width=4/
-qed.
-
-(* Basic_1: was: sn3_cast *)
-lemma csn_cast: ∀L,W. L ⊢ ⬊* W → ∀T. L ⊢ ⬊* T → L ⊢ ⬊* ⓝW. T.
-#L #W #HW elim HW -W #W #_ #IHW #T #HT @(csn_ind … HT) -T #T #HT #IHT
-@csn_intro #X #H1 #H2
-elim (cpr_inv_cast1 … H1) -H1
-[ * #W0 #T0 #HLW0 #HLT0 #H destruct
-  elim (eq_false_inv_tpair_sn … H2) -H2
-  [ /3 width=3/
-  | -HLW0 * #H destruct /3 width=1/ 
-  ]
-| /3 width=3/
-]
-qed.
-
-(* Basic forward lemmas *****************************************************)
-
-fact csn_fwd_flat_dx_aux: ∀L,U. L ⊢ ⬊* U → ∀I,V,T. U = ⓕ{I} V. T → L ⊢ ⬊* T.
-#L #U #H elim H -H #U0 #_ #IH #I #V #T #H destruct
-@csn_intro #T2 #HLT2 #HT2
-@(IH (ⓕ{I} V. T2)) -IH // /2 width=1/ -HLT2 #H destruct /2 width=1/
-qed.
-
-(* Basic_1: was: sn3_gen_flat *)
-lemma csn_fwd_flat_dx: ∀I,L,V,T. L ⊢ ⬊* ⓕ{I} V. T → L ⊢ ⬊* T.
-/2 width=5/ qed-.
-
-(* Basic_1: removed theorems 14:
-            sn3_cdelta
-            sn3_gen_cflat sn3_cflat sn3_cpr3_trans sn3_shift sn3_change
-            sn3_appl_cast sn3_appl_beta sn3_appl_lref sn3_appl_abbr
-            sn3_appl_appls sn3_bind sn3_appl_bind sn3_appls_bind
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/csn_aaa.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/csn_aaa.ma
deleted file mode 100644 (file)
index 67744a0..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/acp_aaa.ma".
-include "basic_2/computation/csn_tstc_vector.ma".
-
-(* CONTEXT-SENSITIVE STRONGLY NORMALIZING TERMS *****************************)
-
-(* Properties concerning atomic arity assignment ****************************)
-
-lemma csn_aaa: ∀L,T,A. L ⊢ T ⁝ A → L ⊢ ⬊* T.
-#L #T #A #H
-@(acp_aaa … csn_acp csn_acr … H)
-qed. 
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/csn_alt.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/csn_alt.ma
deleted file mode 100644 (file)
index eeba707..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/cprs.ma".
-include "basic_2/computation/csn.ma".
-
-(* CONTEXT-SENSITIVE STRONGLY NORMALIZING TERMS *****************************)
-
-(* alternative definition of csn *)
-definition csna: lenv → predicate term ≝ λL. SN … (cprs L) (eq …).
-
-interpretation
-   "context-sensitive strong normalization (term) alternative"
-   'SNAlt L T = (csna L T).
-
-(* Basic eliminators ********************************************************)
-
-lemma csna_ind: ∀L. ∀R:predicate term.
-                (∀T1. L ⊢ ⬊⬊* T1 →
-                      (∀T2. L ⊢ T1 ➡* T2 → (T1 = T2 → ⊥) → R T2) → R T1
-                ) →
-                ∀T. L ⊢ ⬊⬊* T → R T.
-#L #R #H0 #T1 #H elim H -T1 #T1 #HT1 #IHT1
-@H0 -H0 /3 width=1/ -IHT1 /4 width=1/
-qed-.
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was: sn3_intro *)
-lemma csna_intro: ∀L,T1.
-                  (∀T2. L ⊢ T1 ➡* T2 → (T1 = T2 → ⊥) → L ⊢ ⬊⬊* T2) → L ⊢ ⬊⬊* T1.
-/4 width=1/ qed.
-
-fact csna_intro_aux: ∀L,T1.
-                     (∀T,T2. L ⊢ T ➡* T2 → T1 = T → (T1 = T2 → ⊥) → L ⊢ ⬊⬊* T2) → L ⊢ ⬊⬊* T1.
-/4 width=3/ qed-.
-
-(* Basic_1: was: sn3_pr3_trans (old version) *)
-lemma csna_cprs_trans: ∀L,T1. L ⊢ ⬊⬊* T1 → ∀T2. L ⊢ T1 ➡* T2 → L ⊢ ⬊⬊* T2.
-#L #T1 #H elim H -T1 #T1 #HT1 #IHT1 #T2 #HLT12
-@csna_intro #T #HLT2 #HT2
-elim (term_eq_dec T1 T2) #HT12
-[ -IHT1 -HLT12 destruct /3 width=1/
-| -HT1 -HT2 /3 width=4/
-qed.
-
-(* Basic_1: was: sn3_pr2_intro (old version) *)
-lemma csna_intro_cpr: ∀L,T1.
-                      (∀T2. L ⊢ T1 ➡ T2 → (T1 = T2 → ⊥) → L ⊢ ⬊⬊* T2) →
-                      L ⊢ ⬊⬊* T1.
-#L #T1 #H
-@csna_intro_aux #T #T2 #H @(cprs_ind_dx … H) -T
-[ -H #H destruct #H
-  elim (H ?) //
-| #T0 #T #HLT1 #HLT2 #IHT #HT10 #HT12 destruct
-  elim (term_eq_dec T0 T) #HT0
-  [ -HLT1 -HLT2 -H /3 width=1/
-  | -IHT -HT12 /4 width=3/
-  ]
-] 
-qed.
-
-(* Main properties **********************************************************)
-
-theorem csn_csna: ∀L,T. L ⊢ ⬊* T → L ⊢ ⬊⬊* T.
-#L #T #H @(csn_ind … H) -T /4 width=1/
-qed.
-
-theorem csna_csn: ∀L,T. L ⊢ ⬊⬊* T → L ⊢ ⬊* T.
-#L #T #H @(csna_ind … H) -T /4 width=1/
-qed.
-
-(* Basic_1: was: sn3_pr3_trans *)
-lemma csn_cprs_trans: ∀L,T1. L ⊢ ⬊* T1 → ∀T2. L ⊢ T1 ➡* T2 → L ⊢ ⬊* T2.
-/4 width=3/ qed.
-
-(* Main eliminators *********************************************************)
-
-lemma csn_ind_alt: ∀L. ∀R:predicate term.
-                   (∀T1. L ⊢ ⬊* T1 →
-                         (∀T2. L ⊢ T1 ➡* T2 → (T1 = T2 → ⊥) → R T2) → R T1
-                   ) →
-                   ∀T. L ⊢ ⬊* T → R T.
-#L #R #H0 #T1 #H @(csna_ind … (csn_csna … H)) -T1 #T1 #HT1 #IHT1
-@H0 -H0 /2 width=1/ -HT1 /3 width=1/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/csn_cpr.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/csn_cpr.ma
deleted file mode 100644 (file)
index ccfd601..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/cpr_cpr.ma".
-include "basic_2/computation/csn.ma".
-
-(* CONTEXT-SENSITIVE STRONGLY NORMALIZING TERMS *****************************)
-
-(* Advanced forvard lemmas **************************************************)
-
-fact csn_fwd_pair_sn_aux: ∀L,U. L ⊢ ⬊* U → ∀I,V,T. U = ②{I} V. T → L ⊢ ⬊* V.
-#L #U #H elim H -H #U0 #_ #IH #I #V #T #H destruct
-@csn_intro #V2 #HLV2 #HV2
-@(IH (②{I} V2. T)) -IH // /2 width=1/ -HLV2 #H destruct /2 width=1/
-qed.
-
-(* Basic_1: was: sn3_gen_head *)
-lemma csn_fwd_pair_sn: ∀I,L,V,T. L ⊢ ⬊* ②{I} V. T → L ⊢ ⬊* V.
-/2 width=5/ qed.
-
-fact csn_fwd_bind_dx_aux: ∀L,U. L ⊢ ⬊* U →
-                          ∀a,I,V,T. U = ⓑ{a,I} V. T → L. ⓑ{I} V ⊢ ⬊* T.
-#L #U #H elim H -H #U0 #_ #IH #a #I #V #T #H destruct
-@csn_intro #T2 #HLT2 #HT2
-@(IH (ⓑ{a,I} V. T2)) -IH // /2 width=1/ -HLT2 #H destruct /2 width=1/
-qed.
-
-(* Basic_1: was: sn3_gen_bind *)
-lemma csn_fwd_bind_dx: ∀a,I,L,V,T. L ⊢ ⬊* ⓑ{a,I} V. T → L. ⓑ{I} V ⊢ ⬊* T.
-/2 width=4/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/csn_cpr_vector.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/csn_cpr_vector.ma
deleted file mode 100644 (file)
index 70c00eb..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/csn_cpr.ma".
-include "basic_2/computation/csn_vector.ma".
-
-(* Advanced forward lemmas **************************************************)
-
-lemma csn_fwd_applv: ∀L,T,Vs. L ⊢ ⬊* Ⓐ Vs. T → L ⊢ ⬊* Vs ∧ L ⊢ ⬊* T.
-#L #T #Vs elim Vs -Vs /2 width=1/
-#V #Vs #IHVs #HVs
-lapply (csn_fwd_pair_sn … HVs) #HV
-lapply (csn_fwd_flat_dx … HVs) -HVs #HVs
-elim (IHVs HVs) -IHVs -HVs /3 width=1/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/csn_lfpr.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/csn_lfpr.ma
deleted file mode 100644 (file)
index 444dcf8..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/grammar/tstc_tstc.ma".
-include "basic_2/computation/cprs_cprs.ma".
-include "basic_2/computation/csn_lift.ma".
-include "basic_2/computation/csn_cpr.ma".
-include "basic_2/computation/csn_alt.ma".
-
-(* CONTEXT-SENSITIVE STRONGLY NORMALIZING TERMS *****************************)
-
-(* Advanced properties ******************************************************)
-
-lemma csn_lfpr_conf: ∀L1,L2. ⦃L1⦄ ➡ ⦃L2⦄ → ∀T. L1 ⊢ ⬊* T → L2 ⊢ ⬊* T.
-#L1 #L2 #HL12 #T #H @(csn_ind_alt … H) -T #T #_ #IHT
-@csn_intro #T0 #HLT0 #HT0
-@IHT /2 width=2/ -IHT -HT0 /2 width=3/
-qed.
-
-lemma csn_abbr: ∀a,L,V. L ⊢ ⬊* V → ∀T. L. ⓓV ⊢ ⬊* T → L ⊢ ⬊* ⓓ{a}V. T.
-#a #L #V #HV elim HV -V #V #_ #IHV #T #HT @(csn_ind_alt … HT) -T #T #HT #IHT
-@csn_intro #X #H1 #H2
-elim (cpr_inv_abbr1 … H1) -H1 *
-[ #V0 #V1 #T1 #HLV0 #HLV01 #HLT1 #H destruct
-  lapply (cpr_intro … HLV0 HLV01) -HLV01 #HLV1
-  lapply (ltpr_cpr_trans (L. ⓓV) … HLT1) /2 width=1/ -V0 #HLT1
-  elim (eq_false_inv_tpair_sn … H2) -H2
-  [ #HV1 @IHV // /2 width=1/ -HV1
-    @(csn_lfpr_conf (L. ⓓV)) /2 width=1/ -HLV1 /2 width=3/
-  | -IHV -HLV1 * #H destruct /3 width=1/
-  ]
-| -IHV -IHT -H2 #T0 #HLT0 #HT0
-  lapply (csn_cpr_trans … HT … HLT0) -T #HLT0
-  lapply (csn_inv_lift … HLT0 … HT0) -T0 /2 width=3/
-]
-qed.
-
-fact csn_appl_beta_aux: ∀a,L,W. L ⊢ ⬊* W → ∀U. L ⊢ ⬊* U →
-                        ∀V,T. U = ⓓ{a}V. T → L ⊢ ⬊* ⓐV. ⓛ{a}W. T.
-#a #L #W #H elim H -W #W #_ #IHW #X #H @(csn_ind_alt … H) -X #X #HVT #IHVT #V #T #H destruct
-lapply (csn_fwd_pair_sn … HVT) #HV
-lapply (csn_fwd_bind_dx … HVT) #HT -HVT
-@csn_intro #X #H #H2
-elim (cpr_inv_appl1 … H) -H *
-[ #V0 #Y #HLV0 #H #H0 destruct
-  elim (cpr_inv_abst1 … H Abbr V) -H #W0 #T0 #HLW0 #HLT0 #H destruct
-  elim (eq_false_inv_beta … H2) -H2
-  [ -IHVT #HW0 @IHW -IHW [1,5: // |3: skip ] -HLW0 /2 width=1/ -HW0
-    @csn_abbr /2 width=3/ -HV
-    @(csn_lfpr_conf (L. ⓓV)) /2 width=1/ -V0 /2 width=3/
-  | -IHW -HLW0 -HV -HT * #H #HVT0 destruct
-    @(IHVT … HVT0) -IHVT -HVT0 // /2 width=1/
-  ]
-| -IHW -IHVT -H2 #b #V0 #W0 #T0 #T1 #HLV0 #HLT01 #H1 #H2 destruct
-  lapply (lfpr_cpr_trans (L. ⓓV) … HLT01) -HLT01 /2 width=1/ #HLT01
-  @csn_abbr /2 width=3/ -HV
-  @(csn_lfpr_conf (L. ⓓV)) /2 width=1/ -V0 /2 width=3/
-| -IHW -IHVT -HV -HT -H2 #b #V0 #V1 #W0 #W1 #T0 #T1 #_ #_ #_ #_ #H destruct
-]
-qed.
-
-(* Basic_1: was: sn3_beta *)
-lemma csn_appl_beta: ∀a,L,W. L ⊢ ⬊* W → ∀V,T. L ⊢ ⬊* ⓓ{a}V. T →
-                     L ⊢ ⬊* ⓐV. ⓛ{a}W. T.
-/2 width=3/ qed.
-
-fact csn_appl_theta_aux: ∀a,L,U. L ⊢ ⬊* U → ∀V1,V2. ⇧[0, 1] V1 ≡ V2 →
-                         ∀V,T. U = ⓓ{a}V. ⓐV2. T → L ⊢ ⬊* ⓐV1. ⓓ{a}V. T.
-#a #L #X #H @(csn_ind_alt … H) -X #X #HVT #IHVT #V1 #V2 #HV12 #V #T #H destruct
-lapply (csn_fwd_pair_sn … HVT) #HV
-lapply (csn_fwd_bind_dx … HVT) -HVT #HVT
-@csn_intro #X #HL #H
-elim (cpr_inv_appl1 … HL) -HL *
-[ -HV #V0 #Y #HLV10 #HL #H0 destruct
-  elim (cpr_inv_abbr1 … HL) -HL *
-  [ #V3 #V4 #T3 #HV3 #HLV34 #HLT3 #H0 destruct
-    lapply (cpr_intro … HV3 HLV34) -HLV34 #HLV34
-    elim (lift_total V0 0 1) #V5 #HV05
-    elim (term_eq_dec (ⓓ{a}V.ⓐV2.T) (ⓓ{a}V4.ⓐV5.T3))
-    [ -IHVT #H0 destruct
-      elim (eq_false_inv_tpair_sn … H) -H
-      [ -HLV10 -HLV34 -HV3 -HLT3 -HVT
-        >(lift_inj … HV12 … HV05) -V5
-        #H elim (H ?) //
-      | * #_ #H elim (H ?) //
-      ]
-    | -H -HVT #H
-      lapply (cpr_lift (L. ⓓV) … HV12 … HV05 HLV10) -HLV10 -HV12 /2 width=1/ #HV25
-      lapply (ltpr_cpr_trans (L. ⓓV) … HLT3) /2 width=1/ -HLT3 #HLT3
-      @(IHVT … H … HV05) -IHVT // -H -HV05 /3 width=1/
-    ]
-  | -H -IHVT #T0 #HLT0 #HT0 #H0 destruct
-    lapply (csn_cpr_trans … HVT (ⓐV2.T0) ?) /2 width=1/ -T #HVT0
-    lapply (csn_inv_lift L … 1 HVT0 ? ? ?) -HVT0 [ /2 width=4/ |2,3: skip | /2 width=1/ ] -V2 -T0 #HVY
-    @(csn_cpr_trans … HVY) /2 width=1/
-  ]
-| -HV -HV12 -HVT -IHVT -H #b #V0 #W0 #T0 #T1 #_ #_ #H destruct
-| -IHVT -H #b #V0 #V3 #W0 #W1 #T0 #T1 #HLV10 #HLW01 #HLT01 #HV03 #H1 #H2 destruct
-  lapply (cpr_lift (L. ⓓW0) … HV12 … HV03 HLV10) -HLV10 -HV12 -HV03 /2 width=1/ #HLV23
-  lapply (lfpr_cpr_trans (L. ⓓW0) … HLT01) -HLT01 /2 width=1/ #HLT01
-  @csn_abbr /2 width=3/ -HV
-  @(csn_lfpr_conf (L. ⓓW0)) /2 width=1/ -W1
-  @(csn_cprs_trans … HVT) -HVT /2 width=1/
-]
-qed.
-
-lemma csn_appl_theta: ∀a,V1,V2. ⇧[0, 1] V1 ≡ V2 →
-                      ∀L,V,T. L ⊢ ⬊* ⓓ{a}V. ⓐV2. T → L ⊢ ⬊* ⓐV1. ⓓ{a}V. T.
-/2 width=5/ qed.
-
-(* Basic_1: was only: sn3_appl_appl *)
-lemma csn_appl_simple_tstc: ∀L,V. L ⊢ ⬊* V → ∀T1.
-                            L ⊢ ⬊* T1 →
-                            (∀T2. L ⊢ T1 ➡* T2 → (T1 ≃ T2 → ⊥) → L ⊢ ⬊* ⓐV. T2) →
-                            𝐒⦃T1⦄ → L ⊢ ⬊* ⓐV. T1.
-#L #V #H @(csn_ind … H) -V #V #_ #IHV #T1 #H @(csn_ind … H) -T1 #T1 #H1T1 #IHT1 #H2T1 #H3T1
-@csn_intro #X #HL #H
-elim (cpr_inv_appl1_simple … HL ?) -HL //
-#V0 #T0 #HLV0 #HLT10 #H0 destruct
-elim (eq_false_inv_tpair_sn … H) -H
-[ -IHT1 #HV0
-  @(csn_cpr_trans … (ⓐV0.T1)) /2 width=1/ -HLT10
-  @IHV -IHV // -H1T1 -H3T1 /2 width=1/ -HV0
-  #T2 #HLT12 #HT12
-  @(csn_cpr_trans … (ⓐV.T2)) /2 width=1/ -HLV0
-  @H2T1 -H2T1 // -HLT12 /2 width=1/
-| -IHV -H1T1 -HLV0 * #H #H1T10 destruct
-  elim (tstc_dec T1 T0) #H2T10
-  [ @IHT1 -IHT1 // /2 width=1/ -H1T10 /2 width=3/ -H3T1
-    #T2 #HLT02 #HT02
-    @H2T1 -H2T1 /2 width=3/ -HLT10 -HLT02 /3 width=3/
-  | -IHT1 -H3T1 -H1T10
-    @H2T1 -H2T1 /2 width=1/
-  ]
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/csn_lift.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/csn_lift.ma
deleted file mode 100644 (file)
index 4fd784d..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/reducibility/cnf_lift.ma".
-include "basic_2/computation/acp.ma".
-include "basic_2/computation/csn.ma".
-
-(* CONTEXT-SENSITIVE STRONGLY NORMALIZING TERMS *****************************)
-
-(* Relocation properties ****************************************************)
-
-(* Basic_1: was: sn3_lift *)
-lemma csn_lift: ∀L2,L1,T1,d,e. L1 ⊢ ⬊* T1 →
-                ∀T2. ⇩[d, e] L2 ≡ L1 → ⇧[d, e] T1 ≡ T2 → L2 ⊢ ⬊* T2.
-#L2 #L1 #T1 #d #e #H elim H -T1 #T1 #_ #IHT1 #T2 #HL21 #HT12
-@csn_intro #T #HLT2 #HT2
-elim (cpr_inv_lift1 … HL21 … HT12 … HLT2) -HLT2 #T0 #HT0 #HLT10
-@(IHT1 … HLT10) // -L1 -L2 #H destruct
->(lift_mono … HT0 … HT12) in HT2; -T1 /2 width=1/
-qed.
-
-(* Basic_1: was: sn3_gen_lift *)
-lemma csn_inv_lift: ∀L2,L1,T1,d,e. L1 ⊢ ⬊* T1 →
-                    ∀T2. ⇩[d, e] L1 ≡ L2 → ⇧[d, e] T2 ≡ T1 → L2 ⊢ ⬊* T2.
-#L2 #L1 #T1 #d #e #H elim H -T1 #T1 #_ #IHT1 #T2 #HL12 #HT21
-@csn_intro #T #HLT2 #HT2
-elim (lift_total T d e) #T0 #HT0
-lapply (cpr_lift … HL12 … HT21 … HT0 HLT2) -HLT2 #HLT10
-@(IHT1 … HLT10) // -L1 -L2 #H destruct
->(lift_inj … HT0 … HT21) in HT2; -T1 /2 width=1/
-qed.
-
-(* Advanced properties ******************************************************)
-
-(* Basic_1: was: sn3_abbr *)
-lemma csn_lref_abbr: ∀L,K,V,i. ⇩[0, i] L ≡ K. ⓓV → K ⊢ ⬊* V → L ⊢ ⬊* #i.
-#L #K #V #i #HLK #HV
-@csn_intro #X #H #Hi
-elim (cpr_inv_lref1 … H) -H
-[ #H destruct elim (Hi ?) //
-| -Hi * #K0 #V0 #V1 #HLK0 #HV01 #HV1 #_
-  lapply (ldrop_mono … HLK0 … HLK) -HLK #H destruct
-  lapply (ldrop_fwd_ldrop2 … HLK0) -HLK0 #HLK
-  @(csn_lift … HLK HV1) -HLK -HV1
-  @(csn_cpr_trans … HV) -HV
-  @(cpr_intro … HV01) -HV01 //
-]
-qed.
-
-lemma csn_abst: ∀a,L,W. L ⊢ ⬊* W → ∀I,V,T. L. ⓑ{I} V ⊢ ⬊* T → L ⊢ ⬊* ⓛ{a}W. T.
-#a #L #W #HW elim HW -W #W #_ #IHW #I #V #T #HT @(csn_ind … HT) -T #T #HT #IHT
-@csn_intro #X #H1 #H2
-elim (cpr_inv_abst1 … H1 I V) -H1
-#W0 #T0 #HLW0 #HLT0 #H destruct
-elim (eq_false_inv_tpair_sn … H2) -H2
-[ /3 width=5/
-| -HLW0 * #H destruct /3 width=1/
-]
-qed.
-
-lemma csn_appl_simple: ∀L,V. L ⊢ ⬊* V → ∀T1.
-                       (∀T2. L ⊢ T1 ➡ T2 → (T1 = T2 → ⊥) → L ⊢ ⬊* ⓐV. T2) →
-                       𝐒⦃T1⦄ → L ⊢ ⬊* ⓐV. T1.
-#L #V #H @(csn_ind … H) -V #V #_ #IHV #T1 #IHT1 #HT1
-@csn_intro #X #H1 #H2
-elim (cpr_inv_appl1_simple … H1 ?) // -H1
-#V0 #T0 #HLV0 #HLT10 #H destruct
-elim (eq_false_inv_tpair_dx … H2) -H2
-[ -IHV -HT1 #HT10
-  @(csn_cpr_trans … (ⓐV.T0)) /2 width=1/ -HLV0
-  @IHT1 -IHT1 // /2 width=1/
-| -HLT10 * #H #HV0 destruct
-  @IHV -IHV // -HT1 /2 width=1/ -HV0
-  #T2 #HLT02 #HT02
-  @(csn_cpr_trans … (ⓐV.T2)) /2 width=1/ -HLV0
-  @IHT1 -IHT1 // -HLT02 /2 width=1/
-]
-qed.
-
-(* Advanced inversion lemmas ************************************************)
-
-(* Basic_1: was: sn3_gen_def *)
-lemma csn_inv_lref_abbr: ∀L,K,V,i. ⇩[0, i] L ≡ K. ⓓV → L ⊢ ⬊* #i → K ⊢ ⬊* V.
-#L #K #V #i #HLK #Hi
-elim (lift_total V 0 (i+1)) #V0 #HV0
-lapply (ldrop_fwd_ldrop2 … HLK) #H0LK
-@(csn_inv_lift … H0LK … HV0) -H0LK
-@(csn_cpr_trans … Hi) -Hi /2 width=6/
-qed-.
-
-(* Main properties **********************************************************)
-
-theorem csn_acp: acp cpr (eq …) (csn …).
-@mk_acp
-[ /2 width=1/
-| /2 width=3/
-| /2 width=5/
-| @cnf_lift
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/csn_tstc_vector.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/csn_tstc_vector.ma
deleted file mode 100644 (file)
index cfee668..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/acp_cr.ma".
-include "basic_2/computation/cprs_tstc_vector.ma".
-include "basic_2/computation/csn_lfpr.ma".
-include "basic_2/computation/csn_vector.ma".
-
-(* CONTEXT-SENSITIVE STRONGLY NORMALIZING TERM VECTORS **********************)
-
-(* Advanced properties ******************************************************)
-
-(* Basic_1: was only: sn3_appls_lref *)
-lemma csn_applv_cnf: ∀L,T. 𝐒⦃T⦄ → L ⊢ 𝐍⦃T⦄ → 
-                     ∀Vs. L ⊢ ⬊* Vs → L ⊢ ⬊* ⒶVs.T.
-#L #T #H1T #H2T #Vs elim Vs -Vs [ #_ @(csn_cnf … H2T) ] (**) (* /2 width=1/ does not work *)
-#V #Vs #IHV #H
-elim (csnv_inv_cons … H) -H #HV #HVs
-@csn_appl_simple_tstc // -HV /2 width=1/ -IHV -HVs
-#X #H #H0
-lapply (cprs_fwd_cnf_vector … H) -H // -H1T -H2T #H
-elim (H0 ?) -H0 //
-qed.
-
-(* Basic_1: was: sn3_appls_beta *)
-lemma csn_applv_beta: ∀a,L,W. L ⊢ ⬊* W →
-                      ∀Vs,V,T. L ⊢ ⬊* ⒶVs.ⓓ{a}V.T →
-                      L ⊢ ⬊* ⒶVs. ⓐV.ⓛ{a}W. T.
-#a #L #W #HW #Vs elim Vs -Vs /2 width=1/ -HW
-#V0 #Vs #IHV #V #T #H1T
-lapply (csn_fwd_pair_sn … H1T) #HV0
-lapply (csn_fwd_flat_dx … H1T) #H2T
-@csn_appl_simple_tstc // -HV0 /2 width=1/ -IHV -H2T
-#X #H #H0
-elim (cprs_fwd_beta_vector … H) -H #H
-[ -H1T elim (H0 ?) -H0 //
-| -H0 @(csn_cprs_trans … H1T) -H1T /2 width=1/
-]
-qed.
-
-lemma csn_applv_delta: ∀L,K,V1,i. ⇩[0, i] L ≡ K. ⓓV1 →
-                       ∀V2. ⇧[0, i + 1] V1 ≡ V2 →
-                       ∀Vs.L ⊢ ⬊* (ⒶVs. V2) → L ⊢ ⬊* (ⒶVs. #i).
-#L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs
-[ #H
-  lapply (ldrop_fwd_ldrop2 … HLK) #HLK0
-  lapply (csn_inv_lift … H … HLK0 HV12) -V2 -HLK0 /2 width=4/
-| #V #Vs #IHV #H1T
-  lapply (csn_fwd_pair_sn … H1T) #HV
-  lapply (csn_fwd_flat_dx … H1T) #H2T
-  @csn_appl_simple_tstc // -HV /2 width=1/ -IHV -H2T
-  #X #H #H0
-  elim (cprs_fwd_delta_vector … HLK … HV12 … H) -HLK -HV12 -H #H
-  [ -H1T elim (H0 ?) -H0 //
-  | -H0 @(csn_cprs_trans … H1T) -H1T /2 width=1/
-  ]
-]
-qed.
-
-(* Basic_1: was: sn3_appls_abbr *) 
-lemma csn_applv_theta: ∀a,L,V1s,V2s. ⇧[0, 1] V1s ≡ V2s →
-                       ∀V,T. L ⊢ ⬊* ⓓ{a}V. ⒶV2s. T → L ⊢ ⬊* V →
-                       L ⊢ ⬊* ⒶV1s. ⓓ{a}V. T.
-#a #L #V1s #V2s * -V1s -V2s /2 width=1/
-#V1s #V2s #V1 #V2 #HV12 #H 
-generalize in match HV12; -HV12 generalize in match V2; -V2 generalize in match V1; -V1
-elim H -V1s -V2s /2 width=3/
-#V1s #V2s #V1 #V2 #HV12 #HV12s #IHV12s #W1 #W2 #HW12 #V #T #H #HV
-lapply (csn_appl_theta … HW12 … H) -H -HW12 #H
-lapply (csn_fwd_pair_sn … H) #HW1
-lapply (csn_fwd_flat_dx … H) #H1
-@csn_appl_simple_tstc // -HW1 /2 width=3/ -IHV12s -HV -H1 #X #H1 #H2
-elim (cprs_fwd_theta_vector … (V2@V2s) … H1) -H1 /2 width=1/ -HV12s -HV12
-[ -H #H elim (H2 ?) -H2 //
-| -H2 #H1 @(csn_cprs_trans … H) -H /2 width=1/
-]
-qed.
-
-(* Basic_1: was: sn3_appls_cast *)
-lemma csn_applv_tau: ∀L,W. L ⊢ ⬊* W →
-                     ∀Vs,T. L ⊢ ⬊* ⒶVs. T →
-                     L ⊢ ⬊* ⒶVs. ⓝW. T.
-#L #W #HW #Vs elim Vs -Vs /2 width=1/ -HW
-#V #Vs #IHV #T #H1T
-lapply (csn_fwd_pair_sn … H1T) #HV
-lapply (csn_fwd_flat_dx … H1T) #H2T
-@csn_appl_simple_tstc // -HV /2 width=1/ -IHV -H2T
-#X #H #H0
-elim (cprs_fwd_tau_vector … H) -H #H
-[ -H1T elim (H0 ?) -H0 //
-| -H0 @(csn_cprs_trans … H1T) -H1T /2 width=1/
-]
-qed.
-
-theorem csn_acr: acr cpr (eq …) (csn …) (λL,T. L ⊢ ⬊* T).
-@mk_acr //
-[ /3 width=1/
-| /2 width=1/
-| /2 width=6/
-| #L #V1 #V2 #HV12 #a #V #T #H #HVT
-  @(csn_applv_theta … HV12) -HV12 //
-  @(csn_abbr) //
-| /2 width=1/
-| @csn_lift
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/csn_vector.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/csn_vector.ma
deleted file mode 100644 (file)
index 7c26ef4..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/grammar/term_vector.ma".
-include "basic_2/computation/csn.ma".
-
-(* CONTEXT-SENSITIVE STRONGLY NORMALIZING TERM VECTORS **********************)
-
-definition csnv: lenv → predicate (list term) ≝
-                 λL. all … (csn L).
-
-interpretation
-   "context-sensitive strong normalization (term vector)"
-   'SN L Ts = (csnv L Ts).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma csnv_inv_cons: ∀L,T,Ts. L ⊢ ⬊* T @ Ts → L ⊢ ⬊* T ∧ L ⊢ ⬊* Ts.
-normalize // qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/fprs.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/fprs.ma
deleted file mode 100644 (file)
index 61c7207..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/reducibility/fpr.ma".
-
-(* CONTEXT-FREE PARALLEL COMPUTATION ON CLOSURES ****************************)
-
-definition fprs: bi_relation lenv term ≝ bi_TC … fpr.
-
-interpretation "context-free parallel computation (closure)"
-   'FocalizedPRedStar L1 T1 L2 T2 = (fprs L1 T1 L2 T2).
-
-(* Basic eliminators ********************************************************)
-
-lemma fprs_ind: ∀L1,T1. ∀R:relation2 lenv term. R L1 T1 →
-                (∀L,L2,T,T2. ⦃L1, T1⦄ ➡* ⦃L, T⦄ → ⦃L, T⦄ ➡ ⦃L2, T2⦄ → R L T → R L2 T2) →
-                ∀L2,T2. ⦃L1, T1⦄ ➡* ⦃L2, T2⦄ → R L2 T2.
-/3 width=7 by bi_TC_star_ind/ qed-.
-
-lemma fprs_ind_dx: ∀L2,T2. ∀R:relation2 lenv term. R L2 T2 →
-                   (∀L1,L,T1,T. ⦃L1, T1⦄ ➡ ⦃L, T⦄ → ⦃L, T⦄ ➡* ⦃L2, T2⦄ → R L T → R L1 T1) →
-                   ∀L1,T1. ⦃L1, T1⦄ ➡* ⦃L2, T2⦄ → R L1 T1.
-/3 width=7 by bi_TC_star_ind_dx/ qed-.
-
-(* Basic properties *********************************************************)
-
-lemma fprs_refl: bi_reflexive … fprs.
-/2 width=1/ qed.
-
-lemma fprs_strap1: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ➡* ⦃L, T⦄ → ⦃L, T⦄ ➡ ⦃L2, T2⦄ →
-                   ⦃L1, T1⦄ ➡* ⦃L2, T2⦄.
-/2 width=4/ qed.
-
-lemma fprs_strap2: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ➡ ⦃L, T⦄ → ⦃L, T⦄ ➡* ⦃L2, T2⦄ →
-                   ⦃L1, T1⦄ ➡* ⦃L2, T2⦄.
-/2 width=4/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/fprs_aaa.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/fprs_aaa.ma
deleted file mode 100644 (file)
index b76637f..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/cfpr_aaa.ma".
-include "basic_2/computation/fprs.ma".
-
-(* CONTEXT-FREE PARALLEL COMPUTATION ON CLOSURES ****************************)
-
-(* Properties about atomic arity assignment on terms ************************)
-
-lemma aaa_fprs_conf: ∀L1,T1,A. L1 ⊢ T1 ⁝ A →
-                     ∀L2,T2. ⦃L1, T1⦄ ➡* ⦃L2, T2⦄ → L2 ⊢ T2 ⁝ A.
-#L1 #T1 #A #HT1 #L2 #T2 #HLT12
-@(bi_TC_Conf3 … HT1 ?? HLT12) /2 width=4/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/fprs_cprs.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/fprs_cprs.ma
deleted file mode 100644 (file)
index 4e7a633..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/fpr_cpr.ma".
-include "basic_2/computation/cprs.ma".
-include "basic_2/computation/fprs.ma".
-
-(* CONTEXT-FREE PARALLEL COMPUTATION ON CLOSURES ****************************)
-
-(* Properties on context-sensitive parallel computation for terms ***********)
-
-lemma cprs_fprs: ∀L,T1,T2. L ⊢ T1 ➡* T2 → ⦃L, T1⦄ ➡* ⦃L, T2⦄.
-#L #T1 #T2 #H @(cprs_ind … H) -T2 // /3 width=4/
-qed.
-(*
-(* Advanced propertis *******************************************************)
-
-lamma fpr_bind_sn: ∀L1,L2,V1,V2. ⦃L1, V1⦄ ➡ ⦃L2, V2⦄ → ∀T1,T2. T1 ➡ T2 →
-                   ∀a,I. ⦃L1, ⓑ{a,I}V1.T1⦄ ➡ ⦃L2, ⓑ{a,I}V2.T2⦄.
-#L1 #L2 #V1 #V2 #H #T1 #T2 #HT12 #a #I
-elim (fpr_inv_all … H) /3 width=4/
-qed.
-
-(* Advanced forward lemmas **************************************************)
-
-lamma fpr_fwd_shift_bind_minus: ∀I1,I2,L1,L2,V1,V2,T1,T2.
-                                ⦃L1, -ⓑ{I1}V1.T1⦄ ➡ ⦃L2, -ⓑ{I2}V2.T2⦄ →
-                                ⦃L1, V1⦄ ➡ ⦃L2, V2⦄ ∧ I1 = I2.
-* #I2 #L1 #L2 #V1 #V2 #T1 #T2 #H
-elim (fpr_inv_all … H) -H #L #HL1 #H #HL2
-[ elim (cpr_inv_abbr1 … H) -H *
-  [ #V #V0 #T #HV1 #HV0 #_ #H destruct /4 width=4/
-  | #T #_ #_ #H destruct
-  ]
-| elim (cpr_inv_abst1 … H Abst V2) -H
-  #V #T #HV1 #_ #H destruct /3 width=4/
-]
-qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lamma fpr_inv_pair1: ∀I,K1,L2,V1,T1,T2. ⦃K1.ⓑ{I}V1, T1⦄ ➡ ⦃L2, T2⦄ →
-                     ∃∃K2,V2. ⦃K1, V1⦄  ➡ ⦃K2, V2⦄ &
-                              ⦃K1, -ⓑ{I}V1.T1⦄ ➡ ⦃K2, -ⓑ{I}V2.T2⦄  &
-                              L2 = K2.ⓑ{I}V2.
-#I1 #K1 #X #V1 #T1 #T2 #H
-elim (fpr_fwd_pair1 … H) -H #I2 #K2 #V2 #HT12 #H destruct
-elim (fpr_fwd_shift_bind_minus … HT12) #HV12 #H destruct /2 width=5/
-qed-.
-
-lamma fpr_inv_pair3: ∀I,L1,K2,V2,T1,T2. ⦃L1, T1⦄ ➡ ⦃K2.ⓑ{I}V2, T2⦄ →
-                     ∃∃K1,V1. ⦃K1, V1⦄  ➡ ⦃K2, V2⦄ &
-                              ⦃K1, -ⓑ{I}V1.T1⦄ ➡ ⦃K2, -ⓑ{I}V2.T2⦄  &
-                              L1 = K1.ⓑ{I}V1.
-#I2 #X #K2 #V2 #T1 #T2 #H
-elim (fpr_fwd_pair3 … H) -H #I1 #K1 #V1 #HT12 #H destruct
-elim (fpr_fwd_shift_bind_minus … HT12) #HV12 #H destruct /2 width=5/
-qed-.
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/fprs_fprs.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/fprs_fprs.ma
deleted file mode 100644 (file)
index e0c1b30..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/fpr_fpr.ma".
-include "basic_2/computation/fprs.ma".
-
-(* CONTEXT-FREE PARALLEL COMPUTATION ON CLOSURES ****************************)
-
-(* Advanced properties ******************************************************)
-
-lemma fprs_strip: ∀L0,L1,T0,T1. ⦃L0, T0⦄ ➡ ⦃L1, T1⦄ →
-                  ∀L2,T2. ⦃L0, T0⦄ ➡* ⦃L2, T2⦄ →
-                  ∃∃L,T. ⦃L1, T1⦄ ➡* ⦃L, T⦄ & ⦃L2, T2⦄ ➡ ⦃L, T⦄.
-#H1 #H2 #H3 #H4 #H5 #H6 #H7 #H8
-/2 width=4/ qed.
-
-(* Main propertis ***********************************************************)
-
-theorem fprs_conf: bi_confluent … fprs.
-/2 width=4/ qed.
-
-theorem fprs_trans: bi_transitive … fprs.
-/2 width=4/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/lfprs.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/lfprs.ma
deleted file mode 100644 (file)
index a193f3c..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/lfpr.ma".
-
-(* FOCALIZED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *********************)
-
-definition lfprs: relation lenv ≝ TC … lfpr.
-
-interpretation
-  "focalized parallel computation (environment)"
-  'FocalizedPRedStar L1 L2 = (lfprs L1 L2).
-
-(* Basic eliminators ********************************************************)
-
-lemma lfprs_ind: ∀L1. ∀R:predicate lenv. R L1 →
-                 (∀L,L2. ⦃L1⦄ ➡* ⦃L⦄ → ⦃L⦄ ➡ ⦃L2⦄ → R L → R L2) →
-                 ∀L2. ⦃L1⦄ ➡* ⦃L2⦄ → R L2.
-#L1 #R #HL1 #IHL1 #L2 #HL12
-@(TC_star_ind … HL1 IHL1 … HL12) //
-qed-.
-
-lemma lfprs_ind_dx: ∀L2. ∀R:predicate lenv. R L2 →
-                    (∀L1,L. ⦃L1⦄ ➡ ⦃L⦄ → ⦃L⦄ ➡* ⦃L2⦄ → R L → R L1) →
-                    ∀L1. ⦃L1⦄ ➡* ⦃L2⦄ → R L1.
-#L2 #R #HL2 #IHL2 #L1 #HL12
-@(TC_star_ind_dx … HL2 IHL2 … HL12) //
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma lfprs_refl: ∀L. ⦃L⦄ ➡* ⦃L⦄.
-/2 width=1/ qed.
-
-lemma lfprs_strap1: ∀L1,L,L2. ⦃L1⦄ ➡* ⦃L⦄ → ⦃L⦄ ➡ ⦃L2⦄ → ⦃L1⦄ ➡* ⦃L2⦄.
-/2 width=3/ qed.
-
-lemma lfprs_strap2: ∀L1,L,L2. ⦃L1⦄ ➡ ⦃L⦄ → ⦃L⦄ ➡* ⦃L2⦄ → ⦃L1⦄ ➡* ⦃L2⦄.
-/2 width=3/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/lfprs_aaa.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/lfprs_aaa.ma
deleted file mode 100644 (file)
index 5c6cd31..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/lfpr_aaa.ma".
-include "basic_2/computation/lfprs.ma".
-
-(* FOCALIZED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *********************)
-
-(* Properties about atomic arity assignment on terms ************************)
-
-lemma aaa_lfprs_conf: ∀L1,T,A. L1 ⊢ T ⁝ A → ∀L2. ⦃L1⦄ ➡* ⦃L2⦄ → L2 ⊢ T ⁝ A.
-#L1 #T #A #HT #L2 #HL12
-@(TC_Conf3 … (λL,A. L ⊢ T ⁝ A) … HT ? HL12) /2 width=3/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/lfprs_cprs.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/lfprs_cprs.ma
deleted file mode 100644 (file)
index b0f7c4a..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/lfpr_cpr.ma".
-include "basic_2/computation/cprs.ma".
-include "basic_2/computation/lfprs.ma".
-
-(* FOCALIZED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *********************)
-
-(* Advanced properties ******************************************************)
-
-lemma lfprs_pair_dx: ∀I,L1,L2. ⦃L1⦄ ➡ ⦃L2⦄ → ∀V1,V2. L2 ⊢ V1 ➡* V2 →
-                     ⦃L1. ⓑ{I} V1⦄ ➡* ⦃L2. ⓑ{I} V2⦄.
-#I #L1 #L2 #HL12 #V1 #V2 #H @(cprs_ind … H) -V2
-/3 width=1/ /3 width=5/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/lfprs_lfprs.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/lfprs_lfprs.ma
deleted file mode 100644 (file)
index e3866fd..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/lfpr_lfpr.ma".
-include "basic_2/computation/lfprs_cprs.ma".
-
-(* FOCALIZED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *********************)
-
-(* Advanced properties ******************************************************)
-
-lemma lfprs_strip: ∀L,L1. ⦃L⦄ ➡* ⦃L1⦄ → ∀L2. ⦃L⦄ ➡ ⦃L2⦄ →
-                   ∃∃L0. ⦃L1⦄ ➡ ⦃L0⦄ & ⦃L2⦄ ➡* ⦃L0⦄.
-/3 width=3/ qed.
-
-(* Main properties **********************************************************)
-
-theorem lfprs_conf: ∀L,L1. ⦃L⦄ ➡* ⦃L1⦄ → ∀L2. ⦃L⦄ ➡* ⦃L2⦄ →
-                    ∃∃L0. ⦃L1⦄ ➡* ⦃L0⦄ & ⦃L2⦄ ➡* ⦃L0⦄.
-/3 width=3/ qed.
-
-theorem lfprs_trans: ∀L1,L. ⦃L1⦄ ➡* ⦃L⦄ → ∀L2. ⦃L⦄ ➡* ⦃L2⦄ → ⦃L1⦄ ➡* ⦃L2⦄.
-/2 width=3/ qed.
-
-lemma lfprs_pair: ∀L1,L2. ⦃L1⦄ ➡* ⦃L2⦄ → ∀V1,V2. L2 ⊢ V1 ➡* V2 →
-                  ∀I. ⦃L1. ⓑ{I} V1⦄ ➡* ⦃L2. ⓑ{I} V2⦄.
-#L1 #L2 #H @(lfprs_ind … H) -L2 /2 width=1/
-#L #L2 #_ #HL2 #IHL1 #V1 #V2 #HV12 #I
-@(lfprs_trans … (L.ⓑ{I}V1)) /2 width=1/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/lsubc.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/lsubc.ma
deleted file mode 100644 (file)
index bcf6c77..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/aaa.ma".
-include "basic_2/computation/acp_cr.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR ABSTRACT CANDIDATES OF REDUCIBILITY *****)
-
-inductive lsubc (RP:lenv→predicate term): relation lenv ≝
-| lsubc_atom: lsubc RP (⋆) (⋆)
-| lsubc_pair: ∀I,L1,L2,V. lsubc RP L1 L2 → lsubc RP (L1. ⓑ{I} V) (L2. ⓑ{I} V)
-| lsubc_abbr: ∀L1,L2,V,W,A. ⦃L1, V⦄ ϵ[RP] 〚A〛 → L2 ⊢ W ⁝ A →
-              lsubc RP L1 L2 → lsubc RP (L1. ⓓV) (L2. ⓛW)
-.
-
-interpretation
-  "local environment refinement (abstract candidates of reducibility)"
-  'CrSubEq L1 RP L2 = (lsubc RP L1 L2).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact lsubc_inv_atom1_aux: ∀RP,L1,L2. L1 ⊑[RP] L2 → L1 = ⋆ → L2 = ⋆.
-#RP #L1 #L2 * -L1 -L2
-[ //
-| #I #L1 #L2 #V #_ #H destruct
-| #L1 #L2 #V #W #A #_ #_ #_ #H destruct
-]
-qed.
-
-(* Basic_1: was: csubc_gen_sort_r *)
-lemma lsubc_inv_atom1: ∀RP,L2. ⋆ ⊑[RP] L2 → L2 = ⋆.
-/2 width=4/ qed-.
-
-fact lsubc_inv_pair1_aux: ∀RP,L1,L2. L1 ⊑[RP] L2 → ∀I,K1,V. L1 = K1. ⓑ{I} V →
-                          (∃∃K2. K1 ⊑[RP] K2 & L2 = K2. ⓑ{I} V) ∨
-                          ∃∃K2,W,A. ⦃K1, V⦄ ϵ[RP] 〚A〛 & K2 ⊢ W ⁝ A &
-                                    K1 ⊑[RP] K2 &
-                                    L2 = K2. ⓛW & I = Abbr.
-#RP #L1 #L2 * -L1 -L2
-[ #I #K1 #V #H destruct
-| #J #L1 #L2 #V #HL12 #I #K1 #W #H destruct /3 width=3/
-| #L1 #L2 #V1 #W2 #A #HV1 #HW2 #HL12 #I #K1 #V #H destruct /3 width=7/
-]
-qed.
-
-(* Basic_1: was: csubc_gen_head_r *)
-lemma lsubc_inv_pair1: ∀RP,I,K1,L2,V. K1. ⓑ{I} V ⊑[RP] L2 →
-                       (∃∃K2. K1 ⊑[RP] K2 & L2 = K2. ⓑ{I} V) ∨
-                       ∃∃K2,W,A. ⦃K1, V⦄ ϵ[RP] 〚A〛 & K2 ⊢ W ⁝ A &
-                                 K1 ⊑[RP] K2 &
-                                 L2 = K2. ⓛW & I = Abbr.
-/2 width=3/ qed-.
-
-fact lsubc_inv_atom2_aux: ∀RP,L1,L2. L1 ⊑[RP] L2 → L2 = ⋆ → L1 = ⋆.
-#RP #L1 #L2 * -L1 -L2
-[ //
-| #I #L1 #L2 #V #_ #H destruct
-| #L1 #L2 #V #W #A #_ #_ #_ #H destruct
-]
-qed.
-
-(* Basic_1: was: csubc_gen_sort_l *)
-lemma lsubc_inv_atom2: ∀RP,L1. L1 ⊑[RP] ⋆ → L1 = ⋆.
-/2 width=4/ qed-.
-
-fact lsubc_inv_pair2_aux: ∀RP,L1,L2. L1 ⊑[RP] L2 → ∀I,K2,W. L2 = K2. ⓑ{I} W →
-                          (∃∃K1. K1 ⊑[RP] K2 & L1 = K1. ⓑ{I} W) ∨
-                          ∃∃K1,V,A. ⦃K1, V⦄ ϵ[RP] 〚A〛 & K2 ⊢ W ⁝ A &
-                                    K1 ⊑[RP] K2 &
-                                    L1 = K1. ⓓV & I = Abst.
-#RP #L1 #L2 * -L1 -L2
-[ #I #K2 #W #H destruct
-| #J #L1 #L2 #V #HL12 #I #K2 #W #H destruct /3 width=3/
-| #L1 #L2 #V1 #W2 #A #HV1 #HW2 #HL12 #I #K2 #W #H destruct /3 width=7/
-]
-qed.
-
-(* Basic_1: was: csubc_gen_head_l *)
-lemma lsubc_inv_pair2: ∀RP,I,L1,K2,W. L1 ⊑[RP] K2. ⓑ{I} W →
-                       (∃∃K1. K1 ⊑[RP] K2 & L1 = K1. ⓑ{I} W) ∨
-                       ∃∃K1,V,A. ⦃K1, V⦄ ϵ[RP] 〚A〛 & K2 ⊢ W ⁝ A &
-                                 K1 ⊑[RP] K2 &
-                                 L1 = K1. ⓓV & I = Abst.
-/2 width=3/ qed-.
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was: csubc_refl *)
-lemma lsubc_refl: ∀RP,L. L ⊑[RP] L.
-#RP #L elim L -L // /2 width=1/
-qed.
-
-(* Basic_1: removed theorems 3:
-            csubc_clear_conf csubc_getl_conf csubc_csuba
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/lsubc_ldrop.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/lsubc_ldrop.ma
deleted file mode 100644 (file)
index a7c7c7a..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/aaa_lift.ma".
-include "basic_2/computation/lsubc.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR ABSTRACT CANDIDATES OF REDUCIBILITY *****)
-
-(* Properties concerning basic local environment slicing ********************)
-
-(* Basic_1: was: csubc_drop_conf_O *)
-(* Note: the constant 0 can not be generalized *)
-lemma lsubc_ldrop_O1_trans: ∀RP,L1,L2. L1 ⊑[RP] L2 → ∀K2,e. ⇩[0, e] L2 ≡ K2 →
-                            ∃∃K1. ⇩[0, e] L1 ≡ K1 & K1 ⊑[RP] K2.
-#RP #L1 #L2 #H elim H -L1 -L2
-[ #X #e #H
-  >(ldrop_inv_atom1 … H) -H /2 width=3/
-| #I #L1 #L2 #V #_ #IHL12 #X #e #H
-  elim (ldrop_inv_O1 … H) -H * #He #H destruct
-  [ elim (IHL12 L2 0 ?) -IHL12 // #X #H <(ldrop_inv_refl … H) -H /3 width=3/
-  | elim (IHL12 … H) -L2 /3 width=3/
-  ]
-| #L1 #L2 #V #W #A #HV #HW #_ #IHL12 #X #e #H
-  elim (ldrop_inv_O1 … H) -H * #He #H destruct
-  [ elim (IHL12 L2 0 ?) -IHL12 // #X #H <(ldrop_inv_refl … H) -H /3 width=7/
-  | elim (IHL12 … H) -L2 /3 width=3/
-  ]
-qed-.
-
-(* Basic_1: was: csubc_drop_conf_rev *)
-lemma ldrop_lsubc_trans: ∀RR,RS,RP.
-                         acp RR RS RP → acr RR RS RP (λL,T. RP L T) →
-                         ∀L1,K1,d,e. ⇩[d, e] L1 ≡ K1 → ∀K2. K1 ⊑[RP] K2 →
-                         ∃∃L2. L1 ⊑[RP] L2 & ⇩[d, e] L2 ≡ K2.
-#RR #RS #RP #Hacp #Hacr #L1 #K1 #d #e #H elim H -L1 -K1 -d -e
-[ #d #e #X #H
-  >(lsubc_inv_atom1 … H) -H /2 width=3/
-| #L1 #I #V1 #X #H
-  elim (lsubc_inv_pair1 … H) -H *
-  [ #K1 #HLK1 #H destruct /3 width=3/
-  | #K1 #W1 #A #HV1 #HW1 #HLK1 #H1 #H2 destruct /3 width=3/
-  ]
-| #L1 #K1 #I #V1 #e #_ #IHLK1 #K2 #HK12
-  elim (IHLK1 … HK12) -K1 /3 width=5/
-| #L1 #K1 #I #V1 #V2 #d #e #HLK1 #HV21 #IHLK1 #X #H
-  elim (lsubc_inv_pair1 … H) -H *
-  [ #K2 #HK12 #H destruct
-    elim (IHLK1 … HK12) -K1 /3 width=5/
-  | #K2 #W2 #A #HV2 #HW2 #HK12 #H1 #H2 destruct
-    elim (IHLK1 … HK12) #K #HL1K #HK2
-    lapply (aacr_acr … Hacp Hacr A) -Hacp -Hacr #HA
-    lapply (s7 … HA … HV2 … HLK1 HV21) -HV2
-    elim (lift_total W2 d e) /4 width=9/
-  ]
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/lsubc_ldrops.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/lsubc_ldrops.ma
deleted file mode 100644 (file)
index 4e26322..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/lsubc_ldrop.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR ABSTRACT CANDIDATES OF REDUCIBILITY *****)
-
-(* Properties concerning generic local environment slicing ******************)
-
-(* Basic_1: was: csubc_drop1_conf_rev *)
-lemma ldrops_lsubc_trans: ∀RR,RS,RP.
-                          acp RR RS RP → acr RR RS RP (λL,T. RP L T) →
-                          ∀L1,K1,des. ⇩*[des] L1 ≡ K1 → ∀K2. K1 ⊑[RP] K2 →
-                          ∃∃L2. L1 ⊑[RP] L2 & ⇩*[des] L2 ≡ K2.
-#RR #RS #RP #Hacp #Hacr #L1 #K1 #des #H elim H -L1 -K1 -des
-[ /2 width=3/
-| #L1 #L #K1 #des #d #e #_ #HLK1 #IHL #K2 #HK12
-  elim (ldrop_lsubc_trans … Hacp Hacr … HLK1 … HK12) -Hacp -Hacr -K1 #K #HLK #HK2
-  elim (IHL … HLK) -IHL -HLK /3 width=5/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/lsubc_lsuba.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/lsubc_lsuba.ma
deleted file mode 100644 (file)
index aad454f..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/static/lsuba.ma".
-include "basic_2/computation/acp_aaa.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR ABSTRACT CANDIDATES OF REDUCIBILITY *****)
-
-(* properties concerning lenv refinement for atomic arity assignment ********)
-
-lemma lsubc_lsuba: ∀RR,RS,RP. acp RR RS RP → acr RR RS RP (λL,T. RP L T) →
-                   ∀L1,L2. L1 ⁝⊑ L2 → L1 ⊑[RP] L2.
-#RR #RS #RP #H1RP #H2RP #L1 #L2 #H elim H -L1 -L2
-// /2 width=1/ /3 width=4/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/ltprs.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/ltprs.ma
deleted file mode 100644 (file)
index b7b0e10..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/ltpr.ma".
-include "basic_2/computation/tprs.ma".
-
-(* CONTEXT-FREE PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ******************)
-
-definition ltprs: relation lenv ≝ TC … ltpr.
-
-interpretation
-  "context-free parallel computation (environment)"
-  'PRedStar L1 L2 = (ltprs L1 L2).
-
-(* Basic eliminators ********************************************************)
-
-lemma ltprs_ind: ∀L1. ∀R:predicate lenv. R L1 →
-                 (∀L,L2. L1 ➡* L → L ➡ L2 → R L → R L2) →
-                 ∀L2. L1 ➡* L2 → R L2.
-#L1 #R #HL1 #IHL1 #L2 #HL12
-@(TC_star_ind … HL1 IHL1 … HL12) //
-qed-.
-
-lemma ltprs_ind_dx: ∀L2. ∀R:predicate lenv. R L2 →
-                    (∀L1,L. L1 ➡ L → L ➡* L2 → R L → R L1) →
-                    ∀L1. L1 ➡* L2 → R L1.
-#L2 #R #HL2 #IHL2 #L1 #HL12
-@(TC_star_ind_dx … HL2 IHL2 … HL12) //
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma ltprs_refl: reflexive … ltprs.
-/2 width=1/ qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma ltprs_inv_atom1: ∀L2. ⋆ ➡* L2 → L2 = ⋆.
-#L2 #H @(ltprs_ind … H) -L2 //
-#L #L2 #_ #HL2 #IHL1 destruct
->(ltpr_inv_atom1 … HL2) -L2 //
-qed-.
-
-lemma ltprs_inv_pair1: ∀I,K1,L2,V1. K1. ⓑ{I} V1 ➡* L2 →
-                       ∃∃K2,V2. K1 ➡* K2 & V1 ➡* V2 & L2 = K2. ⓑ{I} V2.
-#I #K1 #L2 #V1 #H @(ltprs_ind … H) -L2 /2 width=5/
-#L #L2 #_ #HL2 * #K #V #HK1 #HV1 #H destruct
-elim (ltpr_inv_pair1 … HL2) -HL2 #K2 #V2 #HK2 #HV2 #H destruct /3 width=5/
-qed-.
-
-lemma ltprs_inv_atom2: ∀L1. L1 ➡* ⋆ → L1 = ⋆.
-#L1 #H @(ltprs_ind_dx … H) -L1 //
-#L1 #L #HL1 #_ #IHL2 destruct
->(ltpr_inv_atom2 … HL1) -L1 //
-qed-.
-
-lemma ltprs_inv_pair2: ∀I,L1,K2,V2. L1 ➡* K2. ⓑ{I} V2 →
-                       ∃∃K1,V1. K1 ➡* K2 & V1 ➡* V2 & L1 = K1. ⓑ{I} V1.
-#I #L1 #K2 #V2 #H @(ltprs_ind_dx … H) -L1 /2 width=5/
-#L1 #L #HL1 #_ * #K #V #HK2 #HV2 #H destruct
-elim (ltpr_inv_pair2 … HL1) -HL1 #K1 #V1 #HK1 #HV1 #H destruct /3 width=5/
-qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma ltprs_fwd_length: ∀L1,L2. L1 ➡* L2 → |L1| = |L2|.
-#L1 #L2 #H @(ltprs_ind … H) -L2 //
-#L #L2 #_ #HL2 #IHL1
->IHL1 -L1 >(ltpr_fwd_length … HL2) -HL2 //
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/ltprs_alt.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/ltprs_alt.ma
deleted file mode 100644 (file)
index 7d532c9..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/ltprs.ma".
-
-(* CONTEXT-FREE PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ******************)
-
-(* alternative definition of ltprs *)
-definition ltprsa: relation lenv ≝ lpx tprs.
-
-interpretation
-  "context-free parallel computation (environment) alternative"
-  'PRedStarAlt L1 L2 = (ltprsa L1 L2).
-
-(* Basic properties *********************************************************)
-
-lemma ltprs_ltprsa: ∀L1,L2. L1 ➡* L2 → L1 ➡➡* L2.
-/2 width=1/ qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma ltprsa_ltprs: ∀L1,L2. L1 ➡➡* L2 → L1 ➡* L2.
-/2 width=1/ qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/ltprs_ldrop.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/ltprs_ldrop.ma
deleted file mode 100644 (file)
index a7c3200..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/ltpr_ldrop.ma".
-include "basic_2/computation/ltprs.ma".
-
-(* CONTEXT-FREE PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ******************)
-
-lemma ltprs_ldrop_conf: dropable_sn ltprs.
-/2 width=3/ qed.
-
-lemma ldrop_ltprs_trans: dedropable_sn ltprs.
-/2 width=3/ qed.
-
-lemma ltprs_ldrop_trans_O1: dropable_dx ltprs.
-/2 width=3/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/ltprs_ltprs.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/ltprs_ltprs.ma
deleted file mode 100644 (file)
index e529ee3..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/ltpr_ltpr.ma".
-include "basic_2/computation/ltprs.ma".
-
-(* CONTEXT-FREE PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ******************)
-
-(* Advanced properties ******************************************************)
-
-lemma ltprs_strip: ∀L1. ∀L:term. L ➡* L1 → ∀L2. L ➡ L2 →
-                   ∃∃L0. L1 ➡ L0 & L2 ➡* L0.
-/3 width=3/ qed.
-
-(* Main properties **********************************************************)
-
-theorem ltprs_conf: Confluent … ltprs.
-/3 width=3/ qed.
-
-theorem ltprs_trans: Transitive … ltprs.
-/2 width=3/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/tprs.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/tprs.ma
deleted file mode 100644 (file)
index b094e66..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/tpr.ma".
-
-(* CONTEXT-FREE PARALLEL COMPUTATION ON TERMS *******************************)
-
-(* Basic_1: includes: pr1_pr0 *)
-definition tprs: relation term ≝ TC … tpr.
-
-interpretation "context-free parallel computation (term)"
-   'PRedStar T1 T2 = (tprs T1 T2).
-
-(* Basic eliminators ********************************************************)
-
-lemma tprs_ind: ∀T1. ∀R:predicate term. R T1 →
-                (∀T,T2. T1 ➡* T → T ➡ T2 → R T → R T2) →
-                ∀T2. T1 ➡* T2 → R T2.
-#T1 #R #HT1 #IHT1 #T2 #HT12
-@(TC_star_ind … HT1 IHT1 … HT12) //
-qed-.
-
-lemma tprs_ind_dx: ∀T2. ∀R:predicate term. R T2 →
-                   (∀T1,T. T1 ➡ T → T ➡* T2 → R T → R T1) →
-                   ∀T1. T1 ➡* T2 → R T1.
-#T2 #R #HT2 #IHT2 #T1 #HT12
-@(TC_star_ind_dx … HT2 IHT2 … HT12) //
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma tprs_refl: reflexive … tprs.
-/2 width=1/ qed.
-
-lemma tprs_strap1: ∀T1,T,T2. T1 ➡* T → T ➡ T2 → T1 ➡* T2.
-/2 width=3/ qed.
-
-lemma tprs_strap2: ∀T1,T,T2. T1 ➡ T → T ➡* T2 → T1 ➡* T2.
-/2 width=3/ qed.
-
-(* Basic_1: was only: pr1_head_1 *)
-lemma tprs_pair_sn: ∀I,T1,T2. T1 ➡ T2 → ∀V1,V2. V1 ➡* V2 →
-                    ②{I} V1. T1 ➡* ②{I} V2. T2.
-* [ #a ] #I #T1 #T2 #HT12 #V1 #V2 #H @(tprs_ind … H) -V2
-[1,3: /3 width=1/
-|2,4: #V #V2 #_ #HV2 #IHV1
-      @(tprs_strap1 … IHV1) -IHV1 /2 width=1/
-]
-qed.
-
-(* Basic_1: was only: pr1_head_2 *)
-lemma tprs_pair_dx: ∀I,V1,V2. V1 ➡ V2 → ∀T1,T2. T1 ➡* T2 →
-                    ②{I} V1. T1 ➡* ②{I} V2. T2.
-* [ #a ] #I #V1 #V2 #HV12 #T1 #T2 #H @(tprs_ind … H) -T2
-[1,3: /3 width=1/
-|2,4: #T #T2 #_ #HT2 #IHT1
-      @(tprs_strap1 … IHT1) -IHT1 /2 width=1/
-]
-qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma tprs_inv_atom1: ∀U2,k. ⋆k ➡* U2 → U2 = ⋆k.
-#U2 #k #H @(tprs_ind … H) -U2 //
-#U #U2 #_ #HU2 #IHU1 destruct
->(tpr_inv_atom1 … HU2) -HU2 //
-qed-.
-
-lemma tprs_inv_cast1: ∀W1,T1,U2. ⓝW1.T1 ➡* U2 → T1 ➡* U2 ∨
-                      ∃∃W2,T2. W1 ➡* W2 & T1 ➡* T2 & U2 = ⓝW2.T2.
-#W1 #T1 #U2 #H @(tprs_ind … H) -U2 /3 width=5/
-#U #U2 #_ #HU2 * /3 width=3/ *
-#W #T #HW1 #HT1 #H destruct
-elim (tpr_inv_cast1 … HU2) -HU2 /3 width=3/ *
-#W2 #T2 #HW2 #HT2 #H destruct /4 width=5/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/tprs_lift.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/tprs_lift.ma
deleted file mode 100644 (file)
index d0d1734..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/tpr_lift.ma".
-include "basic_2/computation/tprs.ma".
-
-(* CONTEXT-FREE PARALLEL COMPUTATION ON TERMS *******************************)
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma tprs_inv_abst1: ∀a,V1,T1,U2. ⓛ{a}V1. T1 ➡* U2 →
-                      ∃∃V2,T2. V1 ➡* V2 & T1 ➡* T2 & U2 = ⓛ{a}V2. T2.
-#a #V1 #T1 #U2 #H @(tprs_ind … H) -U2 /2 width=5/
-#U #U2 #_ #HU2 * #V #T #HV1 #HT1 #H destruct
-elim (tpr_inv_abst1 … HU2) -HU2 #V2 #T2 #HV2 #HT2 #H destruct /3 width=5/
-qed-.
-
-lemma tprs_inv_abst: ∀a,V1,V2,T1,T2. ⓛ{a}V1. T1 ➡* ⓛ{a}V2. T2 →
-                     V1 ➡* V2 ∧ T1 ➡* T2.
-#a #V1 #V2 #T1 #T2 #H
-elim (tprs_inv_abst1 … H) -H #V #T #HV1 #HT1 #H destruct /2 width=1/
-qed-.
-
-(* Relocation properties ****************************************************)
-
-(* Note: this was missing in basic_1 *)
-lemma tprs_lift: t_liftable tprs.
-/3 width=7/ qed.
-
-(* Note: this was missing in basic_1 *)
-lemma tprs_inv_lift1: t_deliftable_sn tprs.
-/3 width=3 by tpr_inv_lift1, t_deliftable_sn_TC/ qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/tprs_tprs.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/tprs_tprs.ma
deleted file mode 100644 (file)
index 2322445..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/tpr_tpr.ma".
-include "basic_2/computation/tprs.ma".
-
-(* CONTEXT-FREE PARALLEL COMPUTATION ON TERMS *******************************)
-
-(* Advanced properties ******************************************************)
-
-(* Basic_1: was: pr1_strip *)
-lemma tprs_strip: ∀T1,T. T ➡* T1 → ∀T2. T ➡ T2 →
-                  ∃∃T0. T1 ➡ T0 & T2 ➡* T0.
-/3 width=3/ qed.
-
-(* Main propertis ***********************************************************)
-
-(* Basic_1: was: pr1_confluence *)
-theorem tprs_conf: Confluent … tprs.
-/3 width=3/ qed.
-
-(* Basic_1: was: pr1_t *)
-theorem tprs_trans: Transitive … tprs.
-/2 width=3/ qed.
-
-(* Basic_1: was: pr1_comp *)
-lemma tprs_pair: ∀I,V1,V2. V1 ➡* V2 → ∀T1,T2. T1 ➡* T2 →
-                 ②{I} V1. T1 ➡* ②{I} V2. T2.
-#I #V1 #V2 #H @(tprs_ind … H) -V2 /2 width=1/
-#V #V2 #_ #HV2 #IHV1 #T1 #T2 #HT12
-@(tprs_trans … (②{I}V.T2)) /2 width=1/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/xprs.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/xprs.ma
deleted file mode 100644 (file)
index 854c5da..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/static/lsubss.ma".
-include "basic_2/reducibility/xpr.ma".
-(*
-include "basic_2/reducibility/cnf.ma".
-*)
-(* EXTENDED PARALLEL COMPUTATION ON TERMS ***********************************)
-
-definition xprs: ∀h. sd h → lenv → relation term ≝
-                 λh,g,L. TC … (xpr h g L).
-
-interpretation "extended parallel computation (term)"
-   'XPRedStar h g L T1 T2 = (xprs h g L T1 T2).
-
-(* Basic eliminators ********************************************************)
-
-lemma xprs_ind: ∀h,g,L,T1. ∀R:predicate term. R T1 →
-                (∀T,T2. ⦃h, L⦄ ⊢ T1 •➡*[g] T → ⦃h, L⦄ ⊢ T •➡[g] T2 → R T → R T2) →
-                ∀T2. ⦃h, L⦄ ⊢ T1 •➡*[g] T2 → R T2.
-#h #g #L #T1 #R #HT1 #IHT1 #T2 #HT12
-@(TC_star_ind … HT1 IHT1 … HT12) //
-qed-.
-
-lemma xprs_ind_dx: ∀h,g,L,T2. ∀R:predicate term. R T2 →
-                   (∀T1,T. ⦃h, L⦄ ⊢ T1 •➡[g] T → ⦃h, L⦄ ⊢ T •➡*[g] T2 → R T → R T1) →
-                   ∀T1. ⦃h, L⦄ ⊢ T1 •➡*[g] T2 → R T1.
-#h #g #L #T2 #R #HT2 #IHT2 #T1 #HT12
-@(TC_star_ind_dx … HT2 IHT2 … HT12) //
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma xprs_refl: ∀h,g,L. reflexive … (xprs h g L).
-/2 width=1/ qed.
-
-lemma xprs_strap1: ∀h,g,L,T1,T,T2.
-                   ⦃h, L⦄ ⊢ T1 •➡*[g] T → ⦃h, L⦄ ⊢ T •➡[g] T2 → ⦃h, L⦄ ⊢ T1 •➡*[g] T2.
-/2 width=3/ qed.
-
-lemma xprs_strap2: ∀h,g,L,T1,T,T2.
-                   ⦃h, L⦄ ⊢ T1 •➡[g] T → ⦃h, L⦄ ⊢ T •➡*[g] T2 → ⦃h, L⦄ ⊢ T1 •➡*[g] T2.
-/2 width=3/ qed.
-
-(* Basic inversion lemmas ***************************************************)
-(*
-axiom xprs_inv_cnf1: ∀L,T,U. L ⊢ T ➡* U → L ⊢ 𝐍⦃T⦄ → T = U.
-#L #T #U #H @(xprs_ind_dx … H) -T //
-#T0 #T #H1T0 #_ #IHT #H2T0
-lapply (H2T0 … H1T0) -H1T0 #H destruct /2 width=1/
-qed-.
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/xprs_aaa.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/xprs_aaa.ma
deleted file mode 100644 (file)
index 5beb8fe..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/xpr_aaa.ma".
-include "basic_2/computation/xprs.ma".
-
-(* EXTENDED PARALLEL COMPUTATION ON TERMS ***********************************)
-
-(* Properties on atomic arity assignment for terms **************************)
-
-lemma xprs_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 #H @(xprs_ind … H) -U // /2 width=5/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/xprs_cprs.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/xprs_cprs.ma
deleted file mode 100644 (file)
index 13a4f88..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/cprs.ma".
-include "basic_2/computation/xprs.ma".
-
-(* EXTENDED PARALLEL COMPUTATION ON TERMS ***********************************)
-
-(* properties on context sensitive parallel computation for terms ***********)
-
-lemma cprs_xprs: ∀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.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/xprs_lift.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/xprs_lift.ma
deleted file mode 100644 (file)
index cb151a1..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/xpr_lift.ma".
-include "basic_2/computation/cprs.ma".
-include "basic_2/computation/xprs.ma".
-
-(* EXTENDED PARALLEL COMPUTATION ON TERMS ***********************************)
-
-(* Advanced forward lemmas **************************************************)
-
-lemma xprs_fwd_abst1: ∀h,g,a,L,V1,T1,U2. ⦃h, L⦄ ⊢ ⓛ{a}V1. T1 •➡*[g] U2 →
-                      ∃∃V2,T2. L ⊢ V1 ➡* V2 & U2 = ⓛ{a}V2. T2.
-#h #g #a #L #V1 #T1 #U2 #H @(xprs_ind … H) -U2 /2 width=4/
-#U #U2 #_ #HU2 * #V #T #HV1 #H destruct
-elim (xpr_inv_abst1 … HU2) -HU2 #V2 #T2 #HV2 #_ #H destruct /3 width=4/
-qed-.
-
-(* Relocation properties ****************************************************)
-
-lemma xprs_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 #HT12 @(xprs_ind … HT12) -T2
-[ -HLK #T2 #HT12
-   <(lift_mono … HTU1 … HT12) -T1 //
-| -HTU1 #T #T2 #_ #HT2 #IHT2 #U2 #HTU2
-  elim (lift_total T d e) #U #HTU
-  lapply (xpr_lift … HLK … HTU … HTU2 … HT2) -T2 -HLK /3 width=3/
-]
-qed.
-
-lemma xprs_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 #HU12 @(xprs_ind … HU12) -U2 /2 width=3/
--HTU1 #U #U2 #_ #HU2 * #T #HTU #HT1
-elim (xpr_inv_lift1 … HLK … HTU … HU2) -U -HLK /3 width=5/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/xprs_lsubss.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/xprs_lsubss.ma
deleted file mode 100644 (file)
index c883c14..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/xpr_lsubss.ma".
-include "basic_2/computation/xprs.ma".
-
-(* EXTENDED PARALLEL COMPUTATION ON TERMS ***********************************)
-
-(* Properties on lenv ref for stratified type assignment ********************)
-
-lemma lsubss_xprs_trans: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 →
-                         ∀T1,T2. ⦃h, L2⦄ ⊢ T1 •➡*[g] T2 → ⦃h, L1⦄ ⊢ T1 •➡*[g] T2.
-#h #g #L1 #L2 #HL12 #T1 #T2 #H @(xprs_ind … H) -T2 //
-#T #T2 #_ #HT2 #IHT1
-lapply (lsubss_xpr_trans … HL12 … HT2) -L2 /2 width=3/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/xprs_xprs.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/xprs_xprs.ma
deleted file mode 100644 (file)
index 9593f05..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/xprs.ma".
-
-(* EXTENDED PARALLEL COMPUTATION ON TERMS ***********************************)
-
-theorem xprs_trans: ∀h,g,L. transitive … (xprs h g L).
-/2 width=3/ qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/conversion/cpc.ma b/matita/matita/contribs/lambda_delta/basic_2/conversion/cpc.ma
deleted file mode 100644 (file)
index 5fb614a..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/cpr.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL CONVERSION ON TERMS ***************************)
-
-definition cpc: lenv → relation term ≝
-   λL,T1,T2. L ⊢ T1 ➡ T2 ∨ L ⊢ T2 ➡ T1.
-
-interpretation
-   "context-sensitive parallel conversion (term)"
-   'PConv L T1 T2 = (cpc L T1 T2).
-
-(* Basic properties *********************************************************)
-
-lemma cpc_refl: ∀L. reflexive … (cpc L).
-/2 width=1/ qed.
-
-lemma cpc_sym: ∀L. symmetric … (cpc L).
-#L #T1 #T2 * /2 width=1/
-qed.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma cpc_fwd_cpr: ∀L,T1,T2. L ⊢ T1 ⬌ T2 → ∃∃T. L ⊢ T1 ➡ T & L ⊢ T2 ➡ T.
-#L #T1 #T2 * /2 width=3/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/conversion/cpc_cpc.ma b/matita/matita/contribs/lambda_delta/basic_2/conversion/cpc_cpc.ma
deleted file mode 100644 (file)
index dcea07a..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/conversion/cpc.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL CONVERSION ON TERMS ***************************)
-
-(* Main properties **********************************************************)
-
-theorem cpc_conf: ∀L,T0,T1,T2. L ⊢ T0 ⬌ T1 → L ⊢ T0 ⬌ T2 →
-                  ∃∃T. L ⊢ T1 ⬌ T & L ⊢ T2 ⬌ T.
-/3 width=3/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/conversion/fpc.ma b/matita/matita/contribs/lambda_delta/basic_2/conversion/fpc.ma
deleted file mode 100644 (file)
index f552d58..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/fpr.ma".
-
-(* CONTEXT-FREE PARALLEL CONVERSION ON CLOSURES *****************************)
-
-definition fpc: bi_relation lenv term ≝
-   λL1,T1,L2,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ ∨ ⦃L2, T2⦄ ➡ ⦃L1, T1⦄.
-
-interpretation
-   "context-free parallel conversion (closure)"
-   'FocalizedPConv L1 T1 L2 T2 = (fpc L1 T1 L2 T2).
-
-(* Basic properties *********************************************************)
-
-lemma fpc_refl: bi_reflexive … fpc.
-/2 width=1/ qed.
-
-lemma fpc_sym: bi_symmetric … fpc.
-#L1 #L2 #T1 #T2 * /2 width=1/
-qed.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma fpc_fwd_fpr: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⬌ ⦃L2, T2⦄ →
-                   ∃∃L,T. ⦃L1, T1⦄ ➡ ⦃L, T⦄ & ⦃L2, T2⦄ ➡ ⦃L, T⦄.
-#L1 #L2 #T1 #T2 * /2 width=4/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/conversion/fpc_fpc.ma b/matita/matita/contribs/lambda_delta/basic_2/conversion/fpc_fpc.ma
deleted file mode 100644 (file)
index 22fc16f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/conversion/fpc.ma".
-
-(* CONTEXT-FREE PARALLEL CONVERSION ON CLOSURES *****************************)
-
-(* Main properties **********************************************************)
-
-theorem fpc_conf: ∀L0,L1,T0,T1. ⦃L0, T0⦄ ⬌ ⦃L1, T1⦄ →
-                  ∀L2,T2. ⦃L0, T0⦄ ⬌ ⦃L2, T2⦄ →
-                  ∃∃L,T. ⦃L1, T1⦄ ⬌ ⦃L, T⦄ & ⦃L2, T2⦄ ⬌ ⦃L, T⦄.
-/3 width=4/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/conversion/lfpc.ma b/matita/matita/contribs/lambda_delta/basic_2/conversion/lfpc.ma
deleted file mode 100644 (file)
index 273873a..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/lfpr.ma".
-
-(* FOCALIZED PARALLEL CONVERSION ON LOCAL ENVIRONMENTS **********************)
-
-definition lfpc: relation lenv ≝
-   λL1,L2. ⦃L1⦄ ➡ ⦃L2⦄ ∨ ⦃L2⦄ ➡ ⦃L1⦄.
-
-interpretation
-   "focalized parallel conversion (local environment)"
-   'FocalizedPConv L1 L2 = (lfpc L1 L2).
-
-(* Basic properties *********************************************************)
-
-lemma lfpc_refl: ∀L. ⦃L⦄ ⬌ ⦃L⦄.
-/2 width=1/ qed.
-
-lemma lfpc_sym: ∀L1,L2. ⦃L1⦄ ⬌ ⦃L2⦄ → ⦃L2⦄ ⬌ ⦃L1⦄.
-#L1 #L2 * /2 width=1/
-qed.
-
-lemma lfpc_lfpr: ∀L1,L2. ⦃L1⦄ ⬌ ⦃L2⦄ → ∃∃L. ⦃L1⦄ ➡ ⦃L⦄ & ⦃L2⦄ ➡ ⦃L⦄.
-#L1 #L2 * /2 width=3/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/conversion/lfpc_lfpc.ma b/matita/matita/contribs/lambda_delta/basic_2/conversion/lfpc_lfpc.ma
deleted file mode 100644 (file)
index 69e444a..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/conversion/lfpc.ma".
-
-(* FOCALIZED PARALLEL CONVERSION ON LOCAL ENVIRONMENTS **********************)
-
-(* Main properties **********************************************************)
-
-theorem lfpc_conf: ∀L0,L1,L2. ⦃L0⦄ ⬌ ⦃L1⦄ → ⦃L0⦄ ⬌ ⦃L2⦄ →
-                   ∃∃L. ⦃L1⦄ ⬌ ⦃L⦄ & ⦃L2⦄ ⬌ ⦃L⦄.
-/3 width=3/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/dynamic/snv.ma b/matita/matita/contribs/lambda_delta/basic_2/dynamic/snv.ma
deleted file mode 100644 (file)
index 2be5715..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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.ma".
-include "basic_2/computation/xprs.ma".
-include "basic_2/equivalence/cpcs.ma".
-
-(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
-
-inductive snv (h:sh) (g:sd h): lenv → predicate term ≝
-| snv_sort: ∀L,k. snv h g L (⋆k)
-| snv_lref: ∀I,L,K,V,i. ⇩[0, i] L ≡ K.ⓑ{I}V → snv h g K V → snv h g L (#i)
-| snv_bind: ∀a,I,L,V,T. snv h g L V → snv h g (L.ⓑ{I}V) T → snv h g L (ⓑ{a,I}V.T)
-| snv_appl: ∀a,L,V,W,W0,T,U,l. snv h g L V → snv h g L T →
-            ⦃h, L⦄ ⊢ V •[g, l + 1] W → L ⊢ W ➡* W0 →
-            ⦃h, L⦄ ⊢ T •➡*[g] ⓛ{a}W0.U → snv h g L (ⓐV.T)
-| snv_cast: ∀L,W,T,U,l. snv h g L W → snv h g L T →
-            ⦃h, L⦄ ⊢ T •[g, l + 1] U → L ⊢ U ⬌* W → snv h g L (ⓝW.T)
-.
-
-interpretation "stratified native validity (term)"
-   'NativeValid h g L T = (snv h g L T).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact snv_inv_lref_aux: ∀h,g,L,X. ⦃h, L⦄ ⊩ X :[g] → ∀i. X = #i →
-                       ∃∃I,K,V. ⇩[0, i] L ≡ K.ⓑ{I}V & ⦃h, K⦄ ⊩ V :[g].
-#h #g #L #X * -L -X
-[ #L #k #i #H destruct
-| #I #L #K #V #i0 #HLK #HV #i #H destruct /2 width=5/
-| #a #I #L #V #T #_ #_ #i #H destruct
-| #a #L #V #W #W0 #T #U #l #_ #_ #_ #_ #_ #i #H destruct
-| #L #W #T #U #l #_ #_ #_ #_ #i #H destruct
-]
-qed.
-
-lemma snv_inv_lref: ∀h,g,L,i. ⦃h, L⦄ ⊩ #i :[g] →
-                    ∃∃I,K,V. ⇩[0, i] L ≡ K.ⓑ{I}V & ⦃h, K⦄ ⊩ V :[g].
-/2 width=3/ qed-.
-
-fact snv_inv_bind_aux: ∀h,g,L,X. ⦃h, L⦄ ⊩ X :[g] → ∀a,I,V,T. X = ⓑ{a,I}V.T →
-                       ⦃h, L⦄ ⊩ V :[g] ∧ ⦃h, L.ⓑ{I}V⦄ ⊩ T :[g].
-#h #g #L #X * -L -X
-[ #L #k #a #I #V #T #H destruct
-| #I0 #L #K #V0 #i #_ #_ #a #I #V #T #H destruct
-| #b #I0 #L #V0 #T0 #HV0 #HT0 #a #I #V #T #H destruct /2 width=1/
-| #b #L #V0 #W0 #W00 #T0 #U0 #l #_ #_ #_ #_ #_ #a #I #V #T #H destruct
-| #L #W0 #T0 #U0 #l #_ #_ #_ #_ #a #I #V #T #H destruct
-]
-qed.
-
-lemma snv_inv_bind: ∀h,g,a,I,L,V,T. ⦃h, L⦄ ⊩ ⓑ{a,I}V.T :[g] →
-                        ⦃h, L⦄ ⊩ V :[g] ∧ ⦃h, L.ⓑ{I}V⦄ ⊩ T :[g].
-/2 width=4/ qed-.
-
-fact snv_inv_appl_aux: ∀h,g,L,X. ⦃h, L⦄ ⊩ X :[g] → ∀V,T. X = ⓐV.T →
-                       ∃∃a,W,W0,U,l. ⦃h, L⦄ ⊩ V :[g] & ⦃h, L⦄ ⊩ T :[g] &
-                                   ⦃h, L⦄ ⊢ V •[g, l + 1] W & L ⊢ W ➡* W0 &
-                                   ⦃h, L⦄ ⊢ T •➡*[g] ⓛ{a}W0.U.
-#h #g #L #X * -L -X
-[ #L #k #V #T #H destruct
-| #I #L #K #V0 #i #_ #_ #V #T #H destruct
-| #a #I #L #V0 #T0 #_ #_ #V #T #H destruct
-| #a #L #V0 #W0 #W00 #T0 #U0 #l #HV0 #HT0 #HVW0 #HW00 #HTU0 #V #T #H destruct /2 width=8/
-| #L #W0 #T0 #U0 #l #_ #_ #_ #_ #V #T #H destruct
-]
-qed.
-
-lemma snv_inv_appl: ∀h,g,L,V,T. ⦃h, L⦄ ⊩ ⓐV.T :[g] →
-                    ∃∃a,W,W0,U,l. ⦃h, L⦄ ⊩ V :[g] & ⦃h, L⦄ ⊩ T :[g] &
-                                ⦃h, L⦄ ⊢ V •[g, l + 1] W & L ⊢ W ➡* W0 &
-                                ⦃h, L⦄ ⊢ T •➡*[g] ⓛ{a}W0.U.
-/2 width=3/ qed-.
-
-fact snv_inv_cast_aux: ∀h,g,L,X. ⦃h, L⦄ ⊩ X :[g] → ∀W,T. X = ⓝW.T →
-                       ∃∃U,l. ⦃h, L⦄ ⊩ W :[g] & ⦃h, L⦄ ⊩ T :[g] & 
-                              ⦃h, L⦄ ⊢ T •[g, l + 1] U & L ⊢ U ⬌* W.
-#h #g #L #X * -L -X
-[ #L #k #W #T #H destruct
-| #I #L #K #V #i #_ #_ #W #T #H destruct
-| #a #I #L #V #T0 #_ #_ #W #T #H destruct
-| #a #L #V #W0 #W00 #T0 #U #l #_ #_ #_ #_ #_ #W #T #H destruct
-| #L #W0 #T0 #U0 #l #HW0 #HT0 #HTU0 #HUW0 #W #T #H destruct /2 width=4/
-]
-qed.
-
-lemma snv_inv_cast: ∀h,g,L,W,T. ⦃h, L⦄ ⊩ ⓝW.T :[g] →
-                    ∃∃U,l. ⦃h, L⦄ ⊩ W :[g] & ⦃h, L⦄ ⊩ T :[g] &
-                           ⦃h, L⦄ ⊢ T •[g, l + 1] U & L ⊢ U ⬌* W.
-/2 width=3/ qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/dynamic/snv_aaa.ma b/matita/matita/contribs/lambda_delta/basic_2/dynamic/snv_aaa.ma
deleted file mode 100644 (file)
index 3d4761d..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/csn_aaa.ma".
-include "basic_2/computation/xprs_aaa.ma".
-include "basic_2/computation/xprs_cprs.ma".
-include "basic_2/equivalence/cpcs_aaa.ma".
-include "basic_2/dynamic/snv.ma".
-
-(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
-
-(* Properties on atomic arity assignment for terms **************************)
-
-lemma snv_aaa: ∀h,g,L,T. ⦃h, L⦄ ⊩ T :[g] → ∃A. L ⊢ T ⁝ A.
-#h #g #L #T #H elim H -L -T
-[ /2 width=2/
-| #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 (xprs_aaa h g … HV W0 ?) [ /3 width=3/ ] -W #HW0
-  lapply (xprs_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
-  lapply (aaa_cpcs_mono … HUW A … HW) -HUW /2 width=7/ -HTU #H destruct /3 width=3/
-]
-qed-.
-
-lemma snv_csn: ∀h,g,L,T. ⦃h, L⦄ ⊩ T :[g] → L ⊢ ⬊* T.
-#h #g #L #T #H elim (snv_aaa … H) -H /2 width=2/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/dynamic/snv_lift.ma b/matita/matita/contribs/lambda_delta/basic_2/dynamic/snv_lift.ma
deleted file mode 100644 (file)
index 6d79ef5..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/xprs_lift.ma".
-include "basic_2/equivalence/cpcs_cpcs.ma".
-include "basic_2/dynamic/snv.ma".
-
-(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
-
-(* Relocation properties ****************************************************)
-
-lemma snv_lift: ∀h,g,K,T. ⦃h, K⦄ ⊩ T :[g] → ∀L,d,e. ⇩[d, e] L ≡ K →
-                ∀U. ⇧[d, e] T ≡ U → ⦃h, L⦄ ⊩ U :[g].
-#h #g #K #T #H elim H -K -T
-[ #K #k #L #d #e #_ #X #H
-  >(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
-    /3 width=8/
-  | lapply (ldrop_trans_ge … HLK … HK0 ?) -K // -Hid /3 width=8/
-  ]
-| #a #I #K #V #T #_ #_ #IHV #IHT #L #d #e #HLK #X #H
-  elim (lift_inv_bind1 … H) -H #W #U #HVW #HTU #H destruct
-  /4 width=4/
-| #a #K #V #V0 #V1 #T #T1 #l #_ #_ #HV0 #HV01 #HT1 #IHV #IHT #L #d #e #HLK #X #H
-  elim (lift_inv_flat1 … H) -H #W #U #HVW #HTU #H destruct
-  elim (lift_total V0 d e) #W0 #HVW0
-  elim (lift_total V1 d e) #W1 #HVW1
-  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/ ]
-  @(xprs_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
-  @(snv_cast … W l) [ /2 width=4/ | /2 width=4/ | /2 width=9/ | /2 width=9/ ]
-]
-qed.
-
-lemma snv_inv_lift: ∀h,g,L,U. ⦃h, L⦄ ⊩ U :[g] → ∀K,d,e. ⇩[d, e] L ≡ K →
-                    ∀T. ⇧[d, e] T ≡ U → ⦃h, K⦄ ⊩ T :[g].
-#h #g #L #U #H elim H -L -U
-[ #L #k #K #d #e #_ #X #H
-  >(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
-    /3 width=8/
-  | lapply (ldrop_conf_ge … HLK … HL0 ?) -L // -Hid /3 width=8/
-  ]
-| #a #I #L #W #U #_ #_ #IHW #IHU #K #d #e #HLK #X #H
-  elim (lift_inv_bind2 … H) -H #V #T #HVW #HTU #H destruct /4 width=4/
-| #a #L #W #W0 #W1 #U #U1 #l #_ #_ #HW0 #HW01 #HU1 #IHW #IHU #K #d #e #HLK #X #H
-  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 … HLK … HVW0 … HW01) -W0 #V1 #HVW1 #HV01
-  elim (xprs_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
-  elim (lift_inv_flat2 … H) -H #V0 #T #HVW0 #HTU #H destruct
-  elim (ssta_inv_lift1 … HUW … HLK … HTU) -HUW #V #HTV #HVW
-  lapply (cpcs_inv_lift … HLK … HVW … HVW0 ?) // -W /3 width=4/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/dynamic/snv_ssta.ma b/matita/matita/contribs/lambda_delta/basic_2/dynamic/snv_ssta.ma
deleted file mode 100644 (file)
index d96994e..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/dynamic/snv.ma".
-
-(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
-
-(* Properties on stratified static type assignment for terms ****************)
-
-lemma snv_ssta: ∀h,g,L,T. ⦃h, L⦄ ⊩ T :[g] → ∃∃U,l. ⦃h, L⦄ ⊢ T •[g, l] U.
-#h #g #L #T #H elim H -L -T
-[ #L #k elim (deg_total h g k) /3 width=3/
-| * #L #K #V #i #HLK #_ * #W #l0 #HVW
-  [ elim (lift_total W 0 (i+1)) /3 width=8/
-  | elim (lift_total V 0 (i+1)) /3 width=8/
-  ]
-| #a #I #L #V #T #_ #_ #_ * /3 width=3/
-| #a #L #V #W #W1 #T0 #T1 #l #_ #_ #_ #_ #_ #_ * /3 width=3/
-| #L #W #T #U #l #_ #_ #HTU #_ #_ #_ /3 width=3/ (**) (* auto fails without the last #_ *) 
-]
-qed-.
-
-fact snv_ssta_conf_aux: ∀h,g,L,T. (
-                           ∀L0,T0. ⦃h, L0⦄ ⊩ T0 :[g] →
-                           ∀U0,l. ⦃h, L0⦄ ⊢ T0 •[g, l + 1] U0 →
-                           #{L0, T0} < #{L, T} → ⦃h, L0⦄ ⊩ U0 :[g]
-                        ) →
-                        ∀L0,T0. ⦃h, L0⦄ ⊩ T0 :[g] →
-                        ∀U0,l. ⦃h, L0⦄ ⊢ T0 •[g, l + 1] U0 →
-                        L0 = L → T0 = T → ⦃h, L0⦄ ⊩ U0 :[g].
-#h #g #L #T #IH1 #L0 #T0 * -L0 -T0
-[
-|
-|
-| #a #L0 #V #W #W0 #T0 #V0 #l0 #HV #HT0 #HVW #HW0 #HTV0 #X #l #H #H1 #H2 destruct
-  elim (ssta_inv_appl1 … H) -H #U0 #HTU0 #H destruct
-  lapply (IH1 … HT0 … HTU0 ?) // #HU0
-  @(snv_appl … HV HU0 HVW HW0) -HV -HU0 -HVW -HW0
-| #L0 #W #T0 #W0 #l0 #_ #HT0 #_ #_ #U0 #l #H #H1 #H2 destruct -W0
-  lapply (ssta_inv_cast1 … H) -H /2 width=5/
diff --git a/matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs.ma b/matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs.ma
deleted file mode 100644 (file)
index 9d9ceb9..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/conversion/cpc.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
-
-definition cpcs: lenv → relation term ≝
-                 λL. TC … (cpc L).
-
-interpretation "context-sensitive parallel equivalence (term)"
-   'PConvStar L T1 T2 = (cpcs L T1 T2).
-
-(* Basic eliminators ********************************************************)
-
-lemma cpcs_ind: ∀L,T1. ∀R:predicate term. R T1 →
-                (∀T,T2. L ⊢ T1 ⬌* T → L ⊢ T ⬌ T2 → R T → R T2) →
-                ∀T2. L ⊢ T1 ⬌* T2 → R T2.
-#L #T1 #R #HT1 #IHT1 #T2 #HT12 @(TC_star_ind … HT1 IHT1 … HT12) //
-qed-.
-
-lemma cpcs_ind_dx: ∀L,T2. ∀R:predicate term. R T2 →
-                   (∀T1,T. L ⊢ T1 ⬌ T → L ⊢ T ⬌* T2 → R T → R T1) →
-                   ∀T1. L ⊢ T1 ⬌* T2 → R T1.
-#L #T2 #R #HT2 #IHT2 #T1 #HT12
-@(TC_star_ind_dx … HT2 IHT2 … HT12) //
-qed-.
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was: pc3_refl *)
-lemma cpcs_refl: ∀L. reflexive … (cpcs L).
-/2 width=1/ qed.
-
-(* Basic_1: was: pc3_s *)
-lemma cpcs_sym: ∀L. symmetric … (cpcs L).
-/3 width=1/ qed.
-
-lemma cpcs_strap1: ∀L,T1,T,T2. L ⊢ T1 ⬌* T → L ⊢ T ⬌ T2 → L ⊢ T1 ⬌* T2.
-/2 width=3/ qed.
-
-lemma cpcs_strap2: ∀L,T1,T,T2. L ⊢ T1 ⬌ T → L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
-/2 width=3/ qed.
-
-(* Basic_1: was: pc3_pr2_r *)
-lemma cpcs_cpr_dx: ∀L,T1,T2. L ⊢ T1 ➡ T2 → L ⊢ T1 ⬌* T2.
-/3 width=1/ qed.
-
-lemma cpcs_tpr_dx: ∀L,T1,T2. T1 ➡ T2 → L ⊢ T1 ⬌* T2.
-/3 width=1/ qed.
-
-(* Basic_1: was: pc3_pr2_x *)
-lemma cpcs_cpr_sn: ∀L,T1,T2. L ⊢ T2 ➡ T1 → L ⊢ T1 ⬌* T2.
-/3 width=1/ qed.
-
-lemma cpcs_tpr_sn: ∀L,T1,T2. T2 ➡ T1 → L ⊢ T1 ⬌* T2.
-/3 width=1/ qed.
-
-lemma cpcs_cpr_strap1: ∀L,T1,T. L ⊢ T1 ⬌* T → ∀T2. L ⊢ T ➡ T2 → L ⊢ T1 ⬌* T2.
-/3 width=3/ qed.
-
-(* Basic_1: was: pc3_pr2_u *)
-lemma cpcs_cpr_strap2: ∀L,T1,T. L ⊢ T1 ➡ T → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
-/3 width=3/ qed.
-
-lemma cpcs_cpr_div: ∀L,T1,T. L ⊢ T1 ⬌* T → ∀T2. L ⊢ T2 ➡ T → L ⊢ T1 ⬌* T2.
-/3 width=3/ qed.
-
-lemma cpr_div: ∀L,T1,T. L ⊢ T1 ➡ T → ∀T2. L ⊢ T2 ➡ T → L ⊢ T1 ⬌* T2.
-/3 width=3/ qed-.
-
-(* Basic_1: was: pc3_pr2_u2 *)
-lemma cpcs_cpr_conf: ∀L,T1,T. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
-/3 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
-   Basic_1: removed local theorems 6:
-            pc3_left_pr3 pc3_left_trans pc3_left_sym pc3_left_pc3 pc3_pc3_left
-            pc3_wcpr0_t_aux
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs_aaa.ma b/matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs_aaa.ma
deleted file mode 100644 (file)
index 363b8ac..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/cprs_aaa.ma".
-include "basic_2/equivalence/cpcs_cpcs.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
-
-(* Main properties about atomic arity assignment on terms *******************)
-
-theorem aaa_cpcs_mono: ∀L,T1,T2. L ⊢ T1 ⬌* T2 →
-                       ∀A1. L ⊢ T1 ⁝ A1 → ∀A2. L ⊢ T2 ⁝ A2 →
-                       A1 = A2.
-#L #T1 #T2 #HT12 #A1 #HA1 #A2 #HA2
-elim (cpcs_inv_cprs … HT12) -HT12 #T #HT1 #HT2
-lapply (aaa_cprs_conf … HA1 … HT1) -T1 #HA1
-lapply (aaa_cprs_conf … HA2 … HT2) -T2 #HA2
-lapply (aaa_mono … HA1 … HA2) -L -T //
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs_cpcs.ma b/matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs_cpcs.ma
deleted file mode 100644 (file)
index ac9de93..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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_lift.ma".
-include "basic_2/computation/cprs_cprs.ma".
-include "basic_2/conversion/cpc_cpc.ma".
-include "basic_2/equivalence/cpcs_cprs.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma cpcs_inv_cprs: ∀L,T1,T2. L ⊢ T1 ⬌* T2 →
-                     ∃∃T. L ⊢ T1 ➡* T & L ⊢ T2 ➡* T.
-#L #T1 #T2 #H @(cpcs_ind … H) -T2
-[ /3 width=3/
-| #T #T2 #_ #HT2 * #T0 #HT10 elim HT2 -HT2 #HT2 #HT0
-  [ elim (cprs_strip … HT0 … HT2) -T #T #HT0 #HT2
-    lapply (cprs_strap1 … HT10 … HT0) -T0 /2 width=3/
-  | lapply (cprs_strap2 … HT2 … HT0) -T /2 width=3/
-  ]
-]
-qed-.
-
-(* Basic_1: was: pc3_gen_sort *)
-lemma cpcs_inv_sort: ∀L,k1,k2. L ⊢ ⋆k1 ⬌* ⋆k2 → k1 = k2.
-#L #k1 #k2 #H
-elim (cpcs_inv_cprs … H) -H #T #H1
->(cprs_inv_sort1 … H1) -T #H2
-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_inv_abst1 Abst W … H2) -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_inv_abst1 I V … H1) -H1 #W0 #T0 #HW10 #HT10 #H destruct
-elim (cprs_inv_abst1 I V … H2) -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_inv_abst1 Abst W1 … H1) -H1 #W2 #T2 #HW12 #HT12 #H destruct
-@(ex2_2_intro … H2) -H2 /2 width=2/ (**) (* explicit constructor, /3 width=6/ is slow *)
-qed-.
-
-lemma cpcs_inv_abst2: ∀a,L,W1,T1,T. L ⊢ T ⬌* ⓛ{a}W1.T1 →
-                      ∃∃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_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 →
-                     L ⊢ U1 ⬌* U2 → K ⊢ T1 ⬌* T2.
-#L #K #d #e #HLK #T1 #U1 #HTU1 #T2 #U2 #HTU2 #HU12
-elim (cpcs_inv_cprs … HU12) -HU12 #U #HU1 #HU2
-elim (cprs_inv_lift1 … HLK … HTU1 … HU1) -U1 #T #HTU #HT1
-elim (cprs_inv_lift1 … HLK … HTU2 … HU2) -L -U2 #X #HXU
->(lift_inj … HXU … HTU) -X -U -d -e /2 width=3/
-qed-.
-
-(* Advanced properties ******************************************************)
-
-lemma cpr_cprs_conf: ∀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/
-qed-.
-
-lemma cprs_cpr_conf: ∀L,T,T1,T2. L ⊢ T ➡* T1 → L ⊢ T ➡ T2 → L ⊢ T2 ⬌* T1.
-#L #T #T1 #T2 #HT1 #HT2
-elim (cprs_strip … HT1 … HT2) /2 width=3 by cprs_cpr_div/
-qed-.
-
-lemma cprs_conf: ∀L,T,T1,T2. L ⊢ T ➡* T1 → L ⊢ T ➡* T2 → L ⊢ T1 ⬌* T2.
-#L #T #T1 #T2 #HT1 #HT2
-elim (cprs_conf … HT1 … HT2) /2 width=3/
-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.
-#L #V1 #V2 #HV12 #T1 #T2 #HT12 #I
-elim (cpcs_inv_cprs … HV12) -HV12 #V #HV1 #HV2
-elim (cpcs_inv_cprs … HT12) -HT12 /3 width=5 by cprs_flat, cprs_div/ (**) (* /3 width=5/ is too slow *)
-qed.
-
-lemma cpcs_flat_dx_tpr_rev: ∀L,V1,V2. V2 ➡ V1 → ∀T1,T2. L ⊢ T1 ⬌* T2 →
-                            ∀I. L ⊢ ⓕ{I}V1. T1 ⬌* ⓕ{I}V2. T2.
-/3 width=1/ qed.
-
-lemma cpcs_abst: ∀a,L,V1,V2. L ⊢ V1 ⬌* V2 →
-                 ∀V,T1,T2. L.ⓛV ⊢ T1 ⬌* T2 → L ⊢ ⓛ{a}V1. T1 ⬌* ⓛ{a}V2. T2.
-#a #L #V1 #V2 #HV12 #V #T1 #T2 #HT12
-elim (cpcs_inv_cprs … HV12) -HV12
-elim (cpcs_inv_cprs … HT12) -HT12
-/3 width=6 by cprs_div, cprs_abst/ (**) (* /3 width=6/ is a bit slow *)
-qed.
-
-lemma cpcs_abbr_dx: ∀a,L,V,T1,T2. L.ⓓV ⊢ T1 ⬌* T2 → L ⊢ ⓓ{a}V. T1 ⬌* ⓓ{a}V. T2.
-#a #L #V #T1 #T2 #HT12
-elim (cpcs_inv_cprs … HT12) -HT12 /3 width=5 by cprs_div, cprs_abbr1/ (**) (* /3 width=5/ 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 * /2 width=1/ /2 width=2/ qed.
-
-lemma cpcs_abbr_sn: ∀a,L,V1,V2,T. L ⊢ V1 ⬌* V2 → L ⊢ ⓓ{a}V1. T ⬌* ⓓ{a}V2. T.
-#a #L #V1 #V2 #T #HV12
-elim (cpcs_inv_cprs … HV12) -HV12 /3 width=5 by cprs_div, cprs_abbr1/ (**) (* /3 width=5/ is a bit slow *)
-qed.
-
-lemma cpcs_bind_sn: ∀a,I,L,V1,V2,T. L ⊢ V1 ⬌* V2 → L ⊢ ⓑ{a,I}V1. T ⬌* ⓑ{a,I}V2. T.
-#a * /2 width=1/ /2 width=2/ qed.
-
-lemma cpcs_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 #HT12
-elim (cpcs_inv_cprs … HT12) -HT12 #T #HT1 #HT2
-lapply (cprs_beta_dx … HV12 HT1 a) -HV12 -HT1 #HT1
-lapply (cprs_lsubs_trans … HT2 (L.ⓓV2) ?) -HT2 /2 width=1/ #HT2
-@(cprs_div … HT1) /2 width=1/
-qed.
-
-lemma cpcs_beta_dx_tpr_rev: ∀a,L,V1,V2,W,T1,T2.
-                            V1 ➡ V2 → L.ⓛW ⊢ T2 ⬌* T1 →
-                            L ⊢ ⓓ{a}V2.T2 ⬌* ⓐV1.ⓛ{a}W.T1.
-/4 width=1/ qed.
-
-(* Note: it does not hold replacing |L1| with |L2| *)
-lemma cpcs_lsubs_trans: ∀L1,T1,T2. L1 ⊢ T1 ⬌* T2 →
-                        ∀L2. L2 ≼ [0, |L1|] L1 → L2 ⊢ T1 ⬌* T2.
-#L1 #T1 #T2 #HT12
-elim (cpcs_inv_cprs … HT12) -HT12
-/3 width=5 by cprs_div, cprs_lsubs_trans/ (**) (* /3 width=5/ is a bit slow *)
-qed.
-
-(* Basic_1: was: pc3_lift *)
-lemma cpcs_lift: ∀L,K,d,e. ⇩[d, e] L ≡ K →
-                 ∀T1,U1. ⇧[d, e] T1 ≡ U1 → ∀T2,U2. ⇧[d, e] T2 ≡ U2 →
-                 K ⊢ T1 ⬌* T2 → L ⊢ U1 ⬌* U2.
-#L #K #d #e #HLK #T1 #U1 #HTU1 #T2 #U2 #HTU2 #HT12
-elim (cpcs_inv_cprs … HT12) -HT12 #T #HT1 #HT2
-elim (lift_total T d e) #U #HTU
-lapply (cprs_lift … HLK … HTU1 … HT1 … HTU) -T1 #HU1
-lapply (cprs_lift … HLK … HTU2 … HT2 … HTU) -K -T2 -T -d -e /2 width=3/
-qed.
-
-lemma cpcs_strip: ∀L,T1,T. L ⊢ T ⬌* T1 → ∀T2. L ⊢ T ⬌ T2 →
-                  ∃∃T0. L ⊢ T1 ⬌ T0 & L ⊢ T2 ⬌* T0.
-/3 width=3/ qed.
-
-(* Main properties **********************************************************)
-
-(* Basic_1: was pc3_t *)
-theorem cpcs_trans: ∀L,T1,T. L ⊢ T1 ⬌* T → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
-/2 width=3/ qed.
-
-theorem cpcs_canc_sn: ∀L,T,T1,T2. L ⊢ T ⬌* T1 → L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
-/3 width=3 by cpcs_trans, cpcs_sym/ qed. (**) (* /3 width=3/ is too slow *)
-
-theorem cpcs_canc_dx: ∀L,T,T1,T2. L ⊢ T1 ⬌* T → L ⊢ T2 ⬌* T → L ⊢ T1 ⬌* T2.
-/3 width=3 by cpcs_trans, cpcs_sym/ qed. (**) (* /3 width=3/ is too slow *)
-
-lemma cpcs_abbr1: ∀a,L,V1,V2. L ⊢ V1 ⬌* V2 → ∀T1,T2. L.ⓓV1 ⊢ T1 ⬌* T2 →
-                  L ⊢ ⓓ{a}V1. T1 ⬌* ⓓ{a}V2. T2.
-#a #L #V1 #V2 #HV12 #T1 #T2 #HT12
-@(cpcs_trans … (ⓓ{a}V1.T2)) /2 width=1/
-qed.
-
-lemma cpcs_abbr2: ∀a,L,V1,V2. L ⊢ V1 ⬌* V2 → ∀T1,T2. L.ⓓV2 ⊢ T1 ⬌* T2 →
-                  L ⊢ ⓓ{a}V1. T1 ⬌* ⓓ{a}V2. T2.
-#a #L #V1 #V2 #HV12 #T1 #T2 #HT12
-@(cpcs_trans … (ⓓ{a}V2.T1)) /2 width=1/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs_cprs.ma b/matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs_cprs.ma
deleted file mode 100644 (file)
index cb1f5d7..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/cprs.ma".
-include "basic_2/equivalence/cpcs.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
-
-(* Properties about context sensitive computation on terms ******************)
-
-(* Basic_1: was: pc3_pr3_r *)
-lemma cpcs_cprs_dx: ∀L,T1,T2. L ⊢ T1 ➡* T2 → L ⊢ T1 ⬌* T2.
-#L #T1 #T2 #H @(cprs_ind … H) -T2 /width=1/ /3 width=3/
-qed.
-
-(* Basic_1: was: pc3_pr3_x *)
-lemma cpcs_cprs_sn: ∀L,T1,T2. L ⊢ T2 ➡* T1 → L ⊢ T1 ⬌* T2.
-#L #T1 #T2 #H @(cprs_ind_dx … H) -T2 /width=1/ /3 width=3/
-qed.
-
-lemma cpcs_cprs_strap1: ∀L,T1,T. L ⊢ T1 ⬌* T → ∀T2. L ⊢ T ➡* T2 → L ⊢ T1 ⬌* T2.
-#L #T1 #T #HT1 #T2 #H @(cprs_ind … H) -T2 /width=1/ /2 width=3/
-qed.
-
-lemma cpcs_cprs_strap2: ∀L,T1,T. L ⊢ T1 ➡* T → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
-#L #T1 #T #H #T2 #HT2 @(cprs_ind_dx … H) -T1 /width=1/ /2 width=3/
-qed.
-
-lemma cpcs_cprs_div: ∀L,T1,T. L ⊢ T1 ⬌* T → ∀T2. L ⊢ T2 ➡* T → L ⊢ T1 ⬌* T2.
-#L #T1 #T #HT1 #T2 #H @(cprs_ind_dx … H) -T2 /width=1/ /2 width=3/
-qed.
-
-(* Basic_1: was: pc3_pr3_conf *)
-lemma cpcs_cprs_conf: ∀L,T1,T. L ⊢ T ➡* T1 → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
-#L #T1 #T #H #T2 #HT2 @(cprs_ind … H) -T1 /width=1/ /2 width=3/
-qed.
-
-(* Basic_1: was: pc3_pr3_t *)
-(* Basic_1: note: pc3_pr3_t should be renamed *)
-lemma cprs_div: ∀L,T1,T. L ⊢ T1 ➡* T → ∀T2. L ⊢ T2 ➡* T → L ⊢ T1 ⬌* T2.
-#L #T1 #T #HT1 #T2 #H @(cprs_ind_dx … H) -T2 /2 width=1/ /2 width=3/
-qed.
-
-lemma cprs_cpr_div: ∀L,T1,T. L ⊢ T1 ➡* T → ∀T2. L ⊢ T2 ➡ T → L ⊢ T1 ⬌* T2.
-/3 width=5 by step, cprs_div/ qed-.
-
-lemma cpr_cprs_div: ∀L,T1,T. L ⊢ T1 ➡ T → ∀T2. L ⊢ T2 ➡* T → L ⊢ T1 ⬌* T2.
-/3 width=3 by step, cprs_div/ qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs_delift.ma b/matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs_delift.ma
deleted file mode 100644 (file)
index 7012ec1..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/delift_lift.ma".
-include "basic_2/unfold/delift_delift.ma".
-include "basic_2/computation/cprs_delift.ma".
-include "basic_2/equivalence/cpcs_cpcs.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
-
-(* Properties on inverse basic term relocation ******************************)
-
-lemma cpcs_zeta_delift_comm: ∀L,V,T1,T2. L.ⓓV ⊢ ▼*[O, 1] T1 ≡ T2 →
-                             L ⊢ T2 ⬌* +ⓓV.T1.
-/3 width=1/ qed.
-
-(* Basic_1: was only: pc3_gen_cabbr *)
-lemma thin_cpcs_delift_mono: ∀L,U1,U2. L ⊢ U1 ⬌* U2 →
-                             ∀K,d,e. ▼*[d, e] L ≡ K → ∀T1. L ⊢ ▼*[d, e] U1 ≡ T1 →
-                             ∀T2. L ⊢ ▼*[d, e] U2 ≡ T2 → K ⊢ T1 ⬌* T2.
-#L #U1 #U2 #H #K #d #e #HLK #T1 #HTU1 #T2 #HTU2
-elim (cpcs_inv_cprs … H) -H #U #HU1 #HU2
-elim (thin_cprs_delift_conf … HU1 … HLK … HTU1) -U1 #T #HT1 #HUT
-elim (thin_cprs_delift_conf … HU2 … HLK … HTU2) -U2 -HLK #X #HT2 #H
-lapply (delift_mono … H … HUT) -L #H destruct /2 width=3/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs_ltpr.ma b/matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs_ltpr.ma
deleted file mode 100644 (file)
index 13713e5..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/cpr_ltpr.ma".
-include "basic_2/equivalence/cpcs_cpcs.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
-
-(* Properties about context-free parallel reduction on local environments ***)
-
-(* Basic_1: was only: pc3_pr0_pr2_t *)
-(* Basic_1: note: pc3_pr0_pr2_t should be renamed *)
-lemma ltpr_cpr_conf: ∀L1,L2. L1 ➡ L2 → ∀T1,T2. L1 ⊢ T1 ➡ T2 → L2 ⊢ T1 ⬌* T2.
-#L1 #L2 #HL12 #T1 #T2 #HT12
-elim (cpr_ltpr_conf_eq … HT12 … HL12) -L1 #T #HT1 #HT2
-@(cprs_div … T) /2 width=1/ /3 width=1/ (**) (* /4 width=3/ is too long *)
-qed.
-
-(* Basic_1: was: pc3_wcpr0_t *)
-(* Basic_1: note: pc3_wcpr0_t should be renamed *)
-lemma ltpr_cprs_conf: ∀L1,L2. L1 ➡ L2 → ∀T1,T2. L1 ⊢ T1 ➡* T2 → L2 ⊢ T1 ⬌* T2.
-#L1 #L2 #HL12 #T1 #T2 #H @(cprs_ind … H) -T2 //
-#T #T2 #_ #HT2 #IHT1
-@(cpcs_trans … IHT1) -T1 /2 width=3/
-qed.
-
-(* Basic_1: was: pc3_wcpr0 *)
-lemma ltpr_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 #T #HT1 #HT2
-@(cpcs_canc_dx … T) /2 width=3/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs_ltpss.ma b/matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs_ltpss.ma
deleted file mode 100644 (file)
index 4338566..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/equivalence/cpcs_cpcs.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
-
-(* Properties concerning partial unfold on local environments ***************)
-
-lemma ltpss_dx_cpr_conf: ∀L1,L2,d,e. L1 ▶* [d, e] L2 →
-                         ∀T1,T2. L1 ⊢ T1 ➡ T2 → L2 ⊢ T1 ⬌* T2.
-#L1 #L2 #d #e #HL12 #T1 #T2 *
-lapply (ltpss_dx_weak_all … HL12)
->(ltpss_dx_fwd_length … HL12) -HL12 #HL12 #T #HT1 #HT2
-elim (ltpss_dx_tpss_conf … HT2 … HL12) -L1 #T0 #HT0 #HT20
-@(cprs_div … T0) /3 width=3/ (**) (* /4/ is too slow *)
-qed.
-
-lemma ltpss_dx_cprs_conf: ∀L1,L2,d,e. L1 ▶* [d, e] L2 →
-                          ∀T1,T2. L1 ⊢ T1 ➡* T2 → L2 ⊢ T1 ⬌* T2.
-#L1 #L2 #d #e #HL12 #T1 #T2 #H @(cprs_ind … H) -T2 //
-#T #T2 #_ #HT2 #IHT1
-@(cpcs_trans … IHT1) -T1 /2 width=5/
-qed.
-
-lemma ltpss_dx_cpcs_conf: ∀L1,L2,d,e. L1 ▶* [d, e] L2 →
-                          ∀T1,T2. L1 ⊢ T1 ⬌* T2 → L2 ⊢ T1 ⬌* T2.
-#L1 #L2 #d #e #HL12 #T1 #T2 #H
-elim (cpcs_inv_cprs … H) -H #T #HT1 #HT2
-@(cpcs_canc_dx … T) /2 width=5/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/equivalence/fpcs.ma b/matita/matita/contribs/lambda_delta/basic_2/equivalence/fpcs.ma
deleted file mode 100644 (file)
index c0e0235..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/conversion/fpc.ma".
-
-(* CONTEXT-FREE PARALLEL EQUIVALENCE ON CLOSURES ****************************)
-
-definition fpcs: bi_relation lenv term ≝ bi_TC … fpc.
-
-interpretation "context-free parallel equivalence (closure)"
-   'FocalizedPConvStar L1 T1 L2 T2 = (fpcs L1 T1 L2 T2).
-
-(* Basic eliminators ********************************************************)
-
-lemma fpcs_ind: ∀L1,T1. ∀R:relation2 lenv term. R L1 T1 →
-                (∀L,L2,T,T2. ⦃L1, T1⦄ ⬌* ⦃L, T⦄ → ⦃L, T⦄ ⬌ ⦃L2, T2⦄ → R L T → R L2 T2) →
-                ∀L2,T2. ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄ → R L2 T2.
-/3 width=7 by bi_TC_star_ind/ qed-.
-
-lemma fpcs_ind_dx: ∀L2,T2. ∀R:relation2 lenv term. R L2 T2 →
-                   (∀L1,L,T1,T. ⦃L1, T1⦄ ⬌ ⦃L, T⦄ → ⦃L, T⦄ ⬌* ⦃L2, T2⦄ → R L T → R L1 T1) →
-                   ∀L1,T1. ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄ → R L1 T1.
-/3 width=7 by bi_TC_star_ind_dx/ qed-.
-
-(* Basic properties *********************************************************)
-
-lemma fpcs_refl: bi_reflexive … fpcs.
-/2 width=1/ qed.
-
-lemma fpcs_sym: bi_symmetric … fpcs.
-/3 width=1/ qed.
-
-lemma fpcs_strap1: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⬌* ⦃L, T⦄ → ⦃L, T⦄ ⬌ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-/2 width=4/ qed.
-
-lemma fpcs_strap2: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⬌ ⦃L, T⦄ → ⦃L, T⦄ ⬌* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-/2 width=4/ qed.
-
-lemma fpcs_fpr_dx: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-/3 width=1/ qed.
-
-lemma fpcs_fpr_sn: ∀L1,L2,T1,T2. ⦃L2, T2⦄ ➡ ⦃L1, T1⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-/3 width=1/ qed.
-
-lemma fpcs_fpr_strap1: ∀L1,L,T1,T. ⦃L1, T1⦄ ⬌* ⦃L, T⦄ →
-                       ∀L2,T2. ⦃L, T⦄ ➡ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-/3 width=4/ qed.
-
-lemma fpcs_fpr_strap2: ∀L1,L,T1,T. ⦃L1, T1⦄ ➡ ⦃L, T⦄ →
-                       ∀L2,T2. ⦃L, T⦄ ⬌* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-/3 width=4/ qed.
-
-lemma fpcs_fpr_div: ∀L1,L,T1,T. ⦃L1, T1⦄ ⬌* ⦃L, T⦄ →
-                    ∀L2,T2. ⦃L2, T2⦄ ➡ ⦃L, T⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-/3 width=4/ qed.
-
-lemma fpr_div: ∀L1,L,T1,T. ⦃L1, T1⦄ ➡ ⦃L, T⦄ → ∀L2,T2. ⦃L2, T2⦄ ➡ ⦃L, T⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-/3 width=4/ qed-.
-
-lemma fpcs_fpr_conf: ∀L1,L,T1,T. ⦃L, T⦄ ➡ ⦃L1, T1⦄ →
-                     ∀L2,T2. ⦃L, T⦄ ⬌* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-/3 width=4/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/equivalence/fpcs_aaa.ma b/matita/matita/contribs/lambda_delta/basic_2/equivalence/fpcs_aaa.ma
deleted file mode 100644 (file)
index 9f4327b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/fprs_aaa.ma".
-include "basic_2/equivalence/fpcs_fpcs.ma".
-
-(* CONTEXT-FREE PARALLEL EQUIVALENCE ON CLOSURES ****************************)
-
-(* Main properties about atomic arity assignment on terms *******************)
-
-theorem aaa_fpcs_mono: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄ →
-                       ∀A1. L1 ⊢ T1 ⁝ A1 → ∀A2. L2 ⊢ T2 ⁝ A2 →
-                       A1 = A2.
-#L1 #L2 #T1 #T2 #H12 #A1 #HT1 #A2 #HT2
-elim (fpcs_inv_fprs … H12) -H12 #L #T #H1 #H2
-lapply (aaa_fprs_conf … HT1 … H1) -L1 -T1 #HT1
-lapply (aaa_fprs_conf … HT2 … H2) -L2 -T2 #HT2
-lapply (aaa_mono … HT1 … HT2) -L -T //
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/equivalence/fpcs_cpcs.ma b/matita/matita/contribs/lambda_delta/basic_2/equivalence/fpcs_cpcs.ma
deleted file mode 100644 (file)
index 4b51a70..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/fprs_cprs.ma".
-include "basic_2/equivalence/cpcs_cpcs.ma".
-include "basic_2/equivalence/fpcs_fprs.ma".
-
-(* CONTEXT-FREE PARALLEL EQUIVALENCE ON CLOSURES ****************************)
-
-(* Properties on context-sensitive parallel equivalence for terms ***********)
-
-lemma cpcs_fpcs: ∀L,T1,T2. L ⊢ T1 ⬌* T2 → ⦃L, T1⦄ ⬌* ⦃L, T2⦄.
-#L #T1 #T2 #H
-elim (cpcs_inv_cprs … H) -H /3 width=4 by fprs_div, cprs_fprs/ (**) (* too slow without trace *)
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/equivalence/fpcs_fpcs.ma b/matita/matita/contribs/lambda_delta/basic_2/equivalence/fpcs_fpcs.ma
deleted file mode 100644 (file)
index 270e8dc..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/fprs_fprs.ma".
-include "basic_2/conversion/fpc_fpc.ma".
-include "basic_2/equivalence/fpcs_fprs.ma".
-
-(* CONTEXT-FREE PARALLEL EQUIVALENCE ON CLOSURES ****************************)
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma fpcs_inv_fprs: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄ →
-                     ∃∃L,T. ⦃L1, T1⦄ ➡* ⦃L, T⦄ & ⦃L2, T2⦄ ➡* ⦃L, T⦄.
-#L1 #L2 #T1 #T2 #H @(fpcs_ind … H) -L2 -T2
-[ /3 width=4/
-| #L #L2 #T #T2 #_ #HT2 * #L0 #T0 #HT10 elim HT2 -HT2 #HT2 #HT0
-  [ elim (fprs_strip … HT2 … HT0) -L -T #L #T #HT2 #HT0
-    lapply (fprs_strap1 … HT10 … HT0) -L0 -T0 /2 width=4/
-  | lapply (fprs_strap2 … HT2 … HT0) -L -T /2 width=4/
-  ]
-]
-qed-.
-
-(* Advanced properties ******************************************************)
-
-lemma fpr_fprs_conf: ∀L,L1,L2,T,T1,T2. ⦃L, T⦄ ➡* ⦃L1, T1⦄ → ⦃L, T⦄ ➡ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-#L #L1 #L2 #T #T1 #T2 #HT1 #HT2
-elim (fprs_strip … HT2 … HT1) /2 width=4 by fpr_fprs_div/
-qed-.
-
-lemma fprs_fpr_conf: ∀L,L1,L2,T,T1,T2. ⦃L, T⦄ ➡* ⦃L1, T1⦄ → ⦃L, T⦄ ➡ ⦃L2, T2⦄ → ⦃L2, T2⦄ ⬌* ⦃L1, T1⦄.
-#L #L1 #L2 #T #T1 #T2 #HT1 #HT2
-elim (fprs_strip … HT2 … HT1) /2 width=4 by fprs_fpr_div/
-qed-.
-
-lemma fprs_conf: ∀L,L1,L2,T,T1,T2. ⦃L, T⦄ ➡* ⦃L1, T1⦄ → ⦃L, T⦄ ➡* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-#L #L1 #L2 #T #T1 #T2 #HT1 #HT2
-elim (fprs_conf … HT1 … HT2) /2 width=4/
-qed-.
-
-lemma fpcs_strip: ∀L0,L1,T0,T1. ⦃L0, T0⦄ ⬌ ⦃L1, T1⦄ →
-                  ∀L2,T2. ⦃L0, T0⦄ ⬌* ⦃L2, T2⦄ →
-                  ∃∃L,T. ⦃L1, T1⦄ ⬌* ⦃L, T⦄ & ⦃L2, T2⦄ ⬌ ⦃L, T⦄.
-/3 width=4/ qed.
-
-(* Main properties **********************************************************)
-
-theorem fpcs_trans: bi_transitive … fpcs.
-/2 width=4/ qed.
-
-theorem fpcs_canc_sn: ∀L,L1,L2,T,T1,T2. ⦃L, T⦄ ⬌* ⦃L1, T1⦄ → ⦃L, T⦄ ⬌* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-/3 width=4 by fpcs_trans, fpcs_sym/ qed. (**) (* /3 width=3/ is too slow *)
-
-theorem fpcs_canc_dx: ∀L1,L2,L,T1,T2,T. ⦃L1, T1⦄ ⬌* ⦃L, T⦄ → ⦃L2, T2⦄ ⬌* ⦃L, T⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-/3 width=4 by fpcs_trans, fpcs_sym/ qed. (**) (* /3 width=3/ is too slow *)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/equivalence/fpcs_fprs.ma b/matita/matita/contribs/lambda_delta/basic_2/equivalence/fpcs_fprs.ma
deleted file mode 100644 (file)
index 1d3f71f..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/fprs.ma".
-include "basic_2/equivalence/fpcs.ma".
-
-(* CONTEXT-FREE PARALLEL EQUIVALENCE ON CLOSURES ****************************)
-
-(* Properties on context-free parallel computation for closures *************)
-
-(* Note: lemma 1000 *)
-lemma fpcs_fprs_dx: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ➡* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-#L1 #L2 #T1 #T2 #H @(fprs_ind … H) -L2 -T2 /width=1/ /3 width=4/
-qed.
-
-lemma fpcs_fprs_sn: ∀L1,L2,T1,T2. ⦃L2, T2⦄ ➡* ⦃L1, T1⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-#L1 #L2 #T1 #T2 #H @(fprs_ind_dx … H) -L2 -T2 /width=1/ /3 width=4/
-qed.
-
-lemma fpcs_fprs_strap1: ∀L1,L,T1,T. ⦃L1, T1⦄ ⬌* ⦃L, T⦄ → ∀L2,T2. ⦃L, T⦄ ➡* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-#L1 #L #T1 #T #HT1 #L2 #T2 #H @(fprs_ind … H) -L2 -T2 /width=1/ /2 width=4/
-qed.
-
-lemma fpcs_fprs_strap2: ∀L1,L,T1,T. ⦃L1, T1⦄ ➡* ⦃L, T⦄ → ∀L2,T2. ⦃L, T⦄ ⬌* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-#L1 #L #T1 #T #H #L2 #T2 #HT2 @(fprs_ind_dx … H) -L1 -T1 /width=1/ /2 width=4/
-qed.
-
-lemma fpcs_fprs_div: ∀L1,L,T1,T. ⦃L1, T1⦄ ⬌* ⦃L, T⦄ → ∀L2,T2. ⦃L2, T2⦄ ➡* ⦃L, T⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-#L1 #L #T1 #T #HT1 #L2 #T2 #H @(fprs_ind_dx … H) -L2 -T2 /width=1/ /2 width=4/
-qed.
-
-lemma fpcs_fprs_conf: ∀L1,L,T1,T. ⦃L, T⦄ ➡* ⦃L1, T1⦄ → ∀L2,T2. ⦃L, T⦄ ⬌* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-#L1 #L #T1 #T #H #T2 #HT2 @(fprs_ind … H) -L1 -T1 /width=1/ /3 width=4 by fpcs_fpr_conf/ (**) (* /2 width=4/ does not work *)
-qed.
-
-lemma fprs_div: ∀L1,L,T1,T. ⦃L1, T1⦄ ➡* ⦃L, T⦄ → ∀L2,T2. ⦃L2, T2⦄ ➡* ⦃L, T⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-#L1 #L #T1 #T #HT1 #T2 #L2 #H @(fprs_ind_dx … H) -L2 -T2 /2 width=1/ /2 width=4/
-qed.
-
-lemma fprs_fpr_div: ∀L1,L,T1,T. ⦃L1, T1⦄ ➡* ⦃L, T⦄ → ∀L2,T2. ⦃L2, T2⦄ ➡ ⦃L, T⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-/3 width=7 by bi_step, fprs_div/ qed-.
-
-lemma fpr_fprs_div: ∀L1,L,T1,T. ⦃L1, T1⦄ ➡ ⦃L, T⦄ → ∀L2,T2. ⦃L2, T2⦄ ➡* ⦃L, T⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
-/3 width=4 by bi_step, fprs_div/ qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/equivalence/lfpcs.ma b/matita/matita/contribs/lambda_delta/basic_2/equivalence/lfpcs.ma
deleted file mode 100644 (file)
index fded17b..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/conversion/lfpc.ma".
-
-(* FOCALIZED PARALLEL EQUIVALENCE ON LOCAL ENVIRONMENTS *********************)
-
-definition lfpcs: relation lenv ≝ TC … lfpc.
-
-interpretation "focalized parallel equivalence (local environment)"
-   'FocalizedPConvStar L1 L2 = (lfpcs L1 L2).
-
-(* Basic eliminators ********************************************************)
-
-lemma lfpcs_ind: ∀L1. ∀R:predicate lenv. R L1 →
-                 (∀L,L2. ⦃L1⦄ ⬌* ⦃L⦄ → ⦃L⦄ ⬌ ⦃L2⦄ → R L → R L2) →
-                 ∀L2. ⦃L1⦄ ⬌* ⦃L2⦄ → R L2.
-#L1 #R #HL1 #IHL1 #L2 #HL12 @(TC_star_ind … HL1 IHL1 … HL12) //
-qed-.
-
-lemma lfpcs_ind_dx: ∀L2. ∀R:predicate lenv. R L2 →
-                    (∀L1,L. ⦃L1⦄ ⬌ ⦃L⦄ → ⦃L⦄ ⬌* ⦃L2⦄ → R L → R L1) →
-                    ∀L1. ⦃L1⦄ ⬌* ⦃L2⦄ → R L1.
-#L2 #R #HL2 #IHL2 #L1 #HL12
-@(TC_star_ind_dx … HL2 IHL2 … HL12) //
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma lfpcs_refl: reflexive … lfpcs.
-/2 width=1/ qed.
-
-lemma lfprs_sym: symmetric … lfpcs.
-/3 width=1/ qed.
-
-lemma lfpcs_strap1: ∀L1,L,L2. ⦃L1⦄ ⬌* ⦃L⦄ → ⦃L⦄ ⬌ ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
-/2 width=3/ qed.
-
-lemma lfpcs_strap2: ∀L1,L,L2. ⦃L1⦄ ⬌ ⦃L⦄ → ⦃L⦄ ⬌* ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
-/2 width=3/ qed.
-
-lemma lfpcs_lfpr_dx: ∀L1,L2. ⦃L1⦄ ➡ ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
-/3 width=1/ qed.
-
-lemma lfpcs_lfpr_sn: ∀L1,L2. ⦃L2⦄ ➡ ⦃L1⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
-/3 width=1/ qed.
-
-lemma lfpcs_lfpr_strap1: ∀L1,L. ⦃L1⦄ ⬌* ⦃L⦄ → ∀L2. ⦃L⦄ ➡ ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
-/3 width=3/ qed.
-
-lemma lfpcs_lfpr_strap2: ∀L1,L. ⦃L1⦄ ➡ ⦃L⦄ → ∀L2. ⦃L⦄ ⬌* ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
-/3 width=3/ qed.
-
-lemma lfpcs_lfpr_div: ∀L1,L. ⦃L1⦄ ⬌* ⦃L⦄ → ∀L2. ⦃L2⦄ ➡ ⦃L⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
-/3 width=3/ qed.
-
-lemma lfpcs_lfpr_conf: ∀L1,L. ⦃L⦄ ➡ ⦃L1⦄ → ∀L2. ⦃L⦄ ⬌* ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
-/3 width=3/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/equivalence/lfpcs_aaa.ma b/matita/matita/contribs/lambda_delta/basic_2/equivalence/lfpcs_aaa.ma
deleted file mode 100644 (file)
index b7cea0b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/lfprs_aaa.ma".
-include "basic_2/equivalence/lfpcs_lfpcs.ma".
-
-(* FOCALIZED PARALLEL EQUIVALENCE ON LOCAL ENVIRONMENTS *********************)
-
-(* Main properties about atomic arity assignment on terms *******************)
-
-theorem aaa_lfpcs_mono: ∀L1,L2. ⦃L1⦄ ⬌* ⦃L2⦄ →
-                        ∀T,A1. L1 ⊢ T ⁝ A1 → ∀A2. L2 ⊢ T ⁝ A2 →
-                        A1 = A2.
-#L1 #L2 #HL12 #T #A1 #HT1 #A2 #HT2
-elim (lfpcs_inv_lfprs … HL12) -HL12 #L #HL1 #HL2
-lapply (aaa_lfprs_conf … HT1 … HL1) -L1 #HT1
-lapply (aaa_lfprs_conf … HT2 … HL2) -L2 #HT2
-lapply (aaa_mono … HT1 … HT2) -L -T //
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/equivalence/lfpcs_lfpcs.ma b/matita/matita/contribs/lambda_delta/basic_2/equivalence/lfpcs_lfpcs.ma
deleted file mode 100644 (file)
index 434068e..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/lfprs_lfprs.ma".
-include "basic_2/conversion/lfpc_lfpc.ma".
-include "basic_2/equivalence/lfpcs_lfprs.ma".
-
-(* FOCALIZED PARALLEL EQUIVALENCE ON LOCAL ENVIRONMENTS *********************)
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma lfpcs_inv_lfprs: ∀L1,L2. ⦃L1⦄ ⬌* ⦃L2⦄ →
-                       ∃∃L. ⦃L1⦄ ➡* ⦃L⦄ & ⦃L2⦄ ➡* ⦃L⦄.
-#L1 #L2 #H @(lfpcs_ind … H) -L2
-[ /3 width=3/
-| #L #L2 #_ #HL2 * #L0 #HL10 elim HL2 -HL2 #HL2 #HL0
-  [ elim (lfprs_strip … HL0 … HL2) -L #L #HL0 #HL2
-    lapply (lfprs_strap1 … HL10 … HL0) -L0 /2 width=3/
-  | lapply (lfprs_strap2 … HL2 … HL0) -L /2 width=3/
-  ]
-]
-qed-.
-
-(* Advanced properties ******************************************************)
-
-lemma lfpcs_strip: ∀L,L1. ⦃L⦄ ⬌* ⦃L1⦄ → ∀L2. ⦃L⦄ ⬌ ⦃L2⦄ →
-                   ∃∃L0. ⦃L1⦄ ⬌ ⦃L0⦄ & ⦃L2⦄ ⬌* ⦃L0⦄.
-/3 width=3/ qed.
-
-(* Main properties **********************************************************)
-
-theorem lfpcs_trans: ∀L1,L. ⦃L1⦄ ⬌* ⦃L⦄ → ∀L2. ⦃L⦄ ⬌* ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
-/2 width=3/ qed.
-
-theorem lfpcs_canc_sn: ∀L,L1,L2. ⦃L⦄ ⬌* ⦃L1⦄ → ⦃L⦄ ⬌* ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
-/3 width=3 by lfpcs_trans, lfprs_sym/ qed.
-
-theorem lfpcs_canc_dx: ∀L,L1,L2. ⦃L1⦄ ⬌* ⦃L⦄ → ⦃L2⦄ ⬌* ⦃L⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
-/3 width=3 by lfpcs_trans, lfprs_sym/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/equivalence/lfpcs_lfprs.ma b/matita/matita/contribs/lambda_delta/basic_2/equivalence/lfpcs_lfprs.ma
deleted file mode 100644 (file)
index baf2caf..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/lfprs.ma".
-include "basic_2/equivalence/lfpcs.ma".
-
-(* FOCALIZED PARALLEL EQUIVALENCE ON LOCAL ENVIRONMENTS *********************)
-
-(* Properties on focalized computation for local environments ***************)
-
-lemma lfpcs_lfprs_dx: ∀L1,L2. ⦃L1⦄ ➡* ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
-#L1 #L2 #H @(lfprs_ind … H) -L2 /width=1/ /3 width=3/
-qed.
-
-lemma lfpcs_lfprs_sn: ∀L1,L2. ⦃L2⦄ ➡* ⦃L1⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
-#L1 #L2 #H @(lfprs_ind_dx … H) -L2 /width=1/ /3 width=3/
-qed.
-
-lemma lfpcs_lfprs_strap1: ∀L1,L. ⦃L1⦄ ⬌* ⦃L⦄ → ∀L2. ⦃L⦄ ➡* ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
-#L1 #L #HL1 #L2 #H @(lfprs_ind … H) -L2 /width=1/ /2 width=3/
-qed.
-
-lemma lfpcs_lfprs_strap2: ∀L1,L. ⦃L1⦄ ➡* ⦃L⦄ → ∀L2. ⦃L⦄ ⬌* ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
-#L1 #L #H #L2 #HL2 @(lfprs_ind_dx … H) -L1 /width=1/ /2 width=3/
-qed.
-
-lemma lfpcs_lfprs_div: ∀L1,L. ⦃L1⦄ ⬌* ⦃L⦄ → ∀L2. ⦃L2⦄ ➡* ⦃L⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
-#L1 #L #HL1 #L2 #H @(lfprs_ind_dx … H) -L2 /width=1/ /2 width=3/
-qed.
-
-lemma lfpcs_lfprs_conf: ∀L1,L. ⦃L⦄ ➡* ⦃L1⦄ → ∀L2. ⦃L⦄ ⬌* ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
-#L1 #L #H #L2 #HL2 @(lfprs_ind … H) -L1 /width=1/ /2 width=3/
-qed.
-
-lemma lfprs_div: ∀L1,L. ⦃L1⦄ ➡* ⦃L⦄ → ∀L2. ⦃L2⦄ ➡* ⦃L⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
-#L1 #L #HL1 #L2 #H @(lfprs_ind_dx … H) -L2 /2 width=1/ /2 width=3/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/equivalence/lsubse.ma b/matita/matita/contribs/lambda_delta/basic_2/equivalence/lsubse.ma
deleted file mode 100644 (file)
index 6719c7a..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/static/ssta.ma".
-include "basic_2/computation/cprs.ma".
-include "basic_2/equivalence/cpcs.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR CONTEXT-SENSITIVE PARALLEL EQUIVALENCE **)
-
-(* Note: this is not transitive *)
-inductive lsubse (h:sh) (g:sd h): relation lenv ≝
-| lsubse_atom: lsubse h g (⋆) (⋆)
-| lsubse_pair: ∀I,L1,L2,V. lsubse h g L1 L2 →
-               lsubse h g (L1. ⓑ{I} V) (L2. ⓑ{I} V)
-| lsubse_abbr: ∀L1,L2,V1,V2,W1,W2,l. L1 ⊢ W1 ⬌* W2 →
-               ⦃h, L1⦄ ⊢ V1 •[g, l + 1] W1 → ⦃h, L2⦄ ⊢ W2 •[g, l] V2 →
-               lsubse h g L1 L2 → lsubse h g (L1. ⓓV1) (L2. ⓛW2)
-.
-
-interpretation
-  "local environment refinement (context-sensitive parallel equivalence)"
-  'CrSubEqSE h g L1 L2 = (lsubse h g L1 L2).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact lsubse_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 lsubse_inv_atom1: ∀h,g,L2. h ⊢ ⋆ ⊢•⊑[g] L2 → L2 = ⋆.
-/2 width=5 by lsubse_inv_atom1_aux/ qed-.
-
-fact lsubse_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 lsubse_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 lsubse_inv_pair1_aux/ qed-.
-
-fact lsubse_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 lsubse_inv_atom2: ∀h,g,L1. h ⊢ L1 ⊢•⊑[g] ⋆ → L1 = ⋆.
-/2 width=5 by lsubse_inv_atom2_aux/ qed-.
-
-fact lsubse_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 lsubse_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 lsubse_inv_pair2_aux/ qed-.
-
-(* Basic_forward lemmas *****************************************************)
-
-lemma lsubse_fwd_lsubs1: ∀h,g,L1,L2. h ⊢ L1 ⊢•⊑[g] L2 → L1 ≼[0, |L1|] L2.
-#h #g #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
-qed-.
-
-lemma lsubse_fwd_lsubs2: ∀h,g,L1,L2. h ⊢ L1 ⊢•⊑[g] L2 → L1 ≼[0, |L2|] L2.
-#h #g #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma lsubse_refl: ∀h,g,L. h ⊢ L ⊢•⊑[g] L.
-#h #g #L elim L -L // /2 width=1/
-qed.
-
-lemma lsubse_cprs_trans: ∀h,g,L1,L2. h ⊢ L1 ⊢•⊑[g] L2 →
-                         ∀T1,T2. L2 ⊢ T1 ➡* T2 → L1 ⊢ T1 ➡* T2.
-/3 width=5 by lsubse_fwd_lsubs2, cprs_lsubs_trans/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/equivalence/lsubse_cpcs.ma b/matita/matita/contribs/lambda_delta/basic_2/equivalence/lsubse_cpcs.ma
deleted file mode 100644 (file)
index 2cc3ce0..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/equivalence/cpcs_cpcs.ma".
-include "basic_2/equivalence/lsubse.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR CONTEXT-SENSITIVE PARALLEL EQUIVALENCE **)
-
-(* Properties on context-sensitive parallel equivalence for terms ***********)
-
-lemma lsubse_cpcs_trans: ∀h,g,L1,L2. h ⊢ L1 ⊢•⊑[g] L2 →
-                         ∀T1,T2. L2 ⊢ T1 ⬌* T2 → L1 ⊢ T1 ⬌* T2.
-/3 width=5 by lsubse_fwd_lsubs2, cpcs_lsubs_trans/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/equivalence/lsubse_ldrop.ma b/matita/matita/contribs/lambda_delta/basic_2/equivalence/lsubse_ldrop.ma
deleted file mode 100644 (file)
index 729f4b6..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/equivalence/lsubse.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR CONTEXT-SENSITIVE PARALLEL EQUIVALENCE **)
-
-(* Properties concerning basic local environment slicing ********************)
-
-(* Note: the constant 0 cannot be generalized *)
-lemma lsubse_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 … H) -H * #He #HLK1
-  [ destruct
-    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … 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 … H) -H * #He #HLK1
-  [ destruct
-    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=6/
-  | elim (IHL12 … HLK1) -L1 /3 width=3/
-  ]
-]
-qed-.
-
-(* Note: the constant 0 cannot be generalized *)
-lemma lsubse_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 … H) -H * #He #HLK2
-  [ destruct
-    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … 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 … H) -H * #He #HLK2
-  [ destruct
-    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=6/
-  | elim (IHL12 … HLK2) -L2 /3 width=3/
-  ]
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/equivalence/lsubse_ssta.ma b/matita/matita/contribs/lambda_delta/basic_2/equivalence/lsubse_ssta.ma
deleted file mode 100644 (file)
index b5dc3f5..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(*
-include "basic_2/computation/xprs_lsubss.ma".
-*)
-include "basic_2/equivalence/lsubse.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR CONTEXT-SENSITIVE PARALLEL EQUIVALENCE **)
-
-(* Properties on stratified native type assignment **************************)
-
-axiom lsubse_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.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/csup/csup.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/csup/csup.etc
deleted file mode 100644 (file)
index dcfe086..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-notation "hvbox( ⦃ L1, break T1 ⦄ > break ⦃ L2 , break T2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'SupTerm $L1 $T1 $L2 $T2 }.
-
-include "basic_2/substitution/ldrop.ma".
-
-(* SUPCLOSURE ***************************************************************)
-
-inductive csup: bi_relation lenv term ≝
-| csup_lref   : ∀I,L,K,V,i. ⇩[0, i] L ≡ K.ⓑ{I}V → csup L (#i) K V
-| csup_bind_sn: ∀a,I,L,V,T. csup L (ⓑ{a,I}V.T) L V
-| csup_bind_dx: ∀a,I,L,V,T. csup L (ⓑ{a,I}V.T) (L.ⓑ{I}V) T
-| csup_flat_sn: ∀I,L,V,T.   csup L (ⓕ{I}V.T) L V
-| csup_flat_dx: ∀I,L,V,T.   csup L (ⓕ{I}V.T) L T
-.
-
-interpretation
-   "structural predecessor (closure)"
-   'SupTerm L1 T1 L2 T2 = (csup L1 T1 L2 T2).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact csup_inv_atom1_aux: ∀L1,L2,T1,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ → ∀J. T1 = ⓪{J} →
-                         ∃∃I,i. ⇩[0, i] L1 ≡ L2.ⓑ{I}T2 & J = LRef i.
-#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2
-[ #I #L #K #V #i #HLK #J #H destruct /2 width=4/
-| #a #I #L #V #T #J #H destruct
-| #a #I #L #V #T #J #H destruct
-| #I #L #V #T #J #H destruct
-| #I #L #V #T #J #H destruct
-]
-qed-.
-
-lemma csup_inv_atom1: ∀J,L1,L2,T2. ⦃L1, ⓪{J}⦄ > ⦃L2, T2⦄ →
-                      ∃∃I,i. ⇩[0, i] L1 ≡ L2.ⓑ{I}T2 & J = LRef i.
-/2 width=3 by csup_inv_atom1_aux/ qed-.
-
-fact csup_inv_bind1_aux: ∀L1,L2,T1,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ →
-                         ∀b,J,W,U. T1 = ⓑ{b,J}W.U →
-                         (L2 = L1 ∧ T2 = W) ∨
-                         (L2 = L1.ⓑ{J}W ∧ T2 = U).
-#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2
-[ #I #L #K #V #i #_ #b #J #W #U #H destruct
-| #a #I #L #V #T #b #J #W #U #H destruct /3 width=1/
-| #a #I #L #V #T #b #J #W #U #H destruct /3 width=1/
-| #I #L #V #T #b #J #W #U #H destruct
-| #I #L #V #T #b #J #W #U #H destruct
-]
-qed-.
-
-lemma csup_inv_bind1: ∀b,J,L1,L2,W,U,T2. ⦃L1, ⓑ{b,J}W.U⦄ > ⦃L2, T2⦄ →
-                      (L2 = L1 ∧ T2 = W) ∨
-                      (L2 = L1.ⓑ{J}W ∧ T2 = U).
-/2 width=4 by csup_inv_bind1_aux/ qed-.
-
-fact csup_inv_flat1_aux: ∀L1,L2,T1,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ →
-                         ∀J,W,U. T1 = ⓕ{J}W.U →
-                         L2 = L1 ∧ (T2 = W ∨ T2 = U).
-#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2
-[ #I #L #K #V #i #_ #J #W #U #H destruct
-| #a #I #L #V #T #J #W #U #H destruct
-| #a #I #L #V #T #J #W #U #H destruct
-| #I #L #V #T #J #W #U #H destruct /3 width=1/
-| #I #L #V #T #J #W #U #H destruct /3 width=1/
-]
-qed-.
-
-lemma csup_inv_flat1: ∀J,L1,L2,W,U,T2. ⦃L1, ⓕ{J}W.U⦄ > ⦃L2, T2⦄ →
-                      L2 = L1 ∧ (T2 = W ∨ T2 = U).
-/2 width=4 by csup_inv_flat1_aux/ qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma csup_fwd_cw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ → #{L2, T2} < #{L1, T1}.
-#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2 /width=1/ /2 width=4 by ldrop_pair2_fwd_cw/
-qed-.
-
-lemma csup_fwd_ldrop: ∀L1,L2,T1,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ →
-                      ∃i. ⇩[0, i] L1 ≡ L2 ∨ ⇩[0, i] L2 ≡ L1.
-#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2 /3 width=2/ /4 width=2/
-#I #L1 #K1 #V1 #i #HLK1
-lapply (ldrop_fwd_ldrop2 … HLK1) -HLK1 /3 width=2/
-qed-. 
-
-(* Advanced forward lemmas **************************************************)
-
-lemma lift_csup_trans_eq: ∀T1,U1,d,e. ⇧[d, e] T1 ≡ U1 →
-                          ∀L,U2. ⦃L, U1⦄ > ⦃L, U2⦄ → 
-                          ∃T2. ⇧[d, e] T2 ≡ U2.
-#T1 #U1 #d #e * -T1 -U1 -d -e
-[5: #a #I #V1 #W1 #T1 #U1 #d #e #HVW1 #_ #L #X #H
-    elim (csup_inv_bind1 … H) -H *
-    [ #_ #H destruct /2 width=2/
-    | #H elim (discr_lpair_x_xy … H)
-    ]
-|6: #I #V1 #W1 #T1 #U1 #d #e #HVW1 #HUT1 #L #X #H
-    elim (csup_inv_flat1 … H) -H #_ * #H destruct /2 width=2/
-]
-#i #d #e [2,3: #_ ] #L #X #H
-elim (csup_inv_atom1 … H) -H #I #j #HL #H destruct
-lapply (ldrop_pair2_fwd_cw … HL X) -HL #H
-elim (lt_refl_false … H)
-qed-.
-(*
-lemma lift_csup_trans_gt: ∀L1,L2,U1,U2. ⦃L1, U1⦄ > ⦃L2, U2⦄ →
-                          ⇩[0, 1] L2 ≡ L1 → ∀T1,d,e. ⇧[d, e] T1 ≡ U1 →
-                          ∃T2. ⇧[d + 1, e] T2 ≡ U2.
-#L1 #L2 #U1 #U2 * -L1 -L2 -U1 -U2
-[ #I #L1 #K1 #V #i #HLK1 #HKL1
-  lapply (ldrop_fwd_lw … HLK1) -HLK1 #HLK1
-  lapply (ldrop_fwd_lw … HKL1) -HKL1 #HKL1
-  lapply (transitive_le … HLK1 HKL1) -L1 normalize #H
-  
-  
-| #a
-| #a
-]
-#I #L1 #W1 #U1 #HL1
-  
-
-
- #X #d #e #H
-  lapply (ldrop_inv_refl … HL1) -HL1
-| #a #I #L1 #W1 #U1 #j #HL1 #X #d #e #H
-  lapply (ldrop_inv_ldrop1 … HL1)
-
-  elim (lift_inv_bind2 … H) -H #W2 #U2 #HW21 #HU21 #H destruct 
-   
-
- /3 width=2/ /4 width=2/
-
-*)
-
-
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma csup_inv_lref2_be: ∀L,U,i. ⦃L, U⦄ > ⦃L, #i⦄ →
-                         ∀T,d,e. ⇧[d, e] T ≡ U → d ≤ i → i < d + e → ⊥.
-#L #U #i #H #T #d #e #HTU #Hdi #Hide
-elim (lift_csup_trans_eq … HTU … H) -H -T #T #H
-elim (lift_inv_lref2_be … H ? ?) //
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/csup/csup_csup.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/csup/csup_csup.etc
deleted file mode 100644 (file)
index 813cb96..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/ldrop_ldrop.ma".
-include "basic_2/substitution/csup.ma".
-
-(* SUPCLOSURE ***************************************************************)
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma csup_inv_ldrop: ∀L1,L2,T1,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ →
-                      ∀J,W,j. ⇩[0, j] L1 ≡ L2.ⓑ{J}W → T1 = #j ∧ T2 = W.
-#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2
-[ #I #L #K #V #i #HLKV #J #W #j #HLKW
-  elim (ldrop_conf_div … HLKV … HLKW) -L /2 width=1/
-| #a
-| #a
-]
-#I #L #V #T #J #W #j #H
-lapply (ldrop_pair2_fwd_cw … H W) -H #H
-[2: lapply (transitive_lt (#{L,W}) … H) /2 width=1/ -H #H ]
-elim (lt_refl_false … H)
-qed-.
-
-(* Main forward lemmas ******************************************************)
-
-theorem csup_trans_fwd_refl: ∀L,L0,T1,T2. ⦃L, T1⦄ > ⦃L0, T2⦄ →
-                             ∀T3. ⦃L0, T2⦄ > ⦃L, T3⦄ →
-                             L = L0 ∨ ⦃L, T1⦄ > ⦃L, T3⦄.
-#L #L0 #T1 #T2 * -L -L0 -T1 -T2 /2 width=1/
-[ #I #L0 #K0 #V0 #i #HLK0 #T3 #H
-  lapply (ldrop_pair2_fwd_cw … HLK0 T3) -HLK0 #H1
-  lapply (csup_fwd_cw … H) -H #H2
-  lapply (transitive_lt … H1 H2) -H1 -H2 #H
-  elim (lt_refl_false … H)
-| #a #I #L0 #V2 #T2 #T3 #HT23
-  elim (csup_inv_ldrop … HT23 I V2 0 ?) -HT23 // #H1 #H2 destruct /2 width=1/
-  qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/csup/csupp.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/csup/csupp.etc
deleted file mode 100644 (file)
index c28eaea..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-notation "hvbox( ⦃ L1, break T1 ⦄ > + break ⦃ L2 , break T2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'SupTermPlus $L1 $T1 $L2 $T2 }.
-
-include "basic_2/substitution/csup.ma".
-
-(* PLUS-ITERATED SUPCLOSURE *************************************************)
-
-definition csupp: bi_relation lenv term ≝ bi_TC … csup.
-
-interpretation "plus-iterated structural predecessor (closure)"
-   'SupTermPlus L1 T1 L2 T2 = (csupp L1 T1 L2 T2).
-
-(* Basic eliminators ********************************************************)
-
-lemma csupp_ind: ∀L1,T1. ∀R:relation2 lenv term.
-                 (∀L2,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ → R L2 T2) →
-                 (∀L,T,L2,T2. ⦃L1, T1⦄ >+ ⦃L, T⦄ → ⦃L, T⦄ > ⦃L2, T2⦄ → R L T → R L2 T2) →
-                 ∀L2,T2. ⦃L1, T1⦄ >+ ⦃L2, T2⦄ → R L2 T2.
-#L1 #T1 #R #IH1 #IH2 #L2 #T2 #H
-@(bi_TC_ind … IH1 IH2 ? ? H)
-qed-.
-
-lemma csupp_ind_dx: ∀L2,T2. ∀R:relation2 lenv term.
-                    (∀L1,T1. ⦃L1, T1⦄ > ⦃L2, T2⦄ → R L1 T1) →
-                    (∀L1,L,T1,T. ⦃L1, T1⦄ > ⦃L, T⦄ → ⦃L, T⦄ >+ ⦃L2, T2⦄ → R L T → R L1 T1) →
-                    ∀L1,T1. ⦃L1, T1⦄ >+ ⦃L2, T2⦄ → R L1 T1.
-#L2 #T2 #R #IH1 #IH2 #L1 #T1 #H
-@(bi_TC_ind_dx … IH1 IH2 ? ? H)
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma csup_csupp: ∀L1,L2,T1,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ → ⦃L1, T1⦄ >+ ⦃L2, T2⦄.
-/2 width=1/ qed.
-
-lemma csupp_strap1: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ >+ ⦃L, T⦄ → ⦃L, T⦄ > ⦃L2, T2⦄ →
-                    ⦃L1, T1⦄ >+ ⦃L2, T2⦄.
-/2 width=4/ qed.
-
-lemma csupp_strap2: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ > ⦃L, T⦄ → ⦃L, T⦄ >+ ⦃L2, T2⦄ →
-                    ⦃L1, T1⦄ >+ ⦃L2, T2⦄.
-/2 width=4/ qed.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma csupp_fwd_cw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ >+ ⦃L2, T2⦄ → #{L2, T2} < #{L1, T1}.
-#L1 #L2 #T1 #T2 #H @(csupp_ind … H) -L2 -T2
-/3 width=3 by csup_fwd_cw, transitive_lt/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/csup/csupp_csupp.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/csup/csupp_csupp.etc
deleted file mode 100644 (file)
index 5afdb68..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/csupp.ma".
-
-(* PLUS-ITERATED SUPCLOSURE *************************************************)
-
-(* Main propertis ***********************************************************)
-
-theorem csupp_trans: bi_transitive … csupp.
-/2 width=4/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/csup/csups.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/csup/csups.etc
deleted file mode 100644 (file)
index 7f58794..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-notation "hvbox( ⦃ L1, break T1 ⦄ > * break ⦃ L2 , break T2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'SupTermStar $L1 $T1 $L2 $T2 }.
-
-include "basic_2/substitution/csup.ma".
-include "basic_2/unfold/csupp.ma".
-
-(* STAR-ITERATED SUPCLOSURE *************************************************)
-
-definition csups: bi_relation lenv term ≝ bi_star … csup.
-
-interpretation "star-iterated structural predecessor (closure)"
-   'SupTermStar L1 T1 L2 T2 = (csups L1 T1 L2 T2).
-
-(* Basic eliminators ********************************************************)
-
-lemma csups_ind: ∀L1,T1. ∀R:relation2 lenv term. R L1 T1 →
-                 (∀L,L2,T,T2. ⦃L1, T1⦄ >* ⦃L, T⦄ → ⦃L, T⦄ > ⦃L2, T2⦄ → R L T → R L2 T2) →
-                 ∀L2,T2. ⦃L1, T1⦄ >* ⦃L2, T2⦄ → R L2 T2.
-#L1 #T1 #R #IH1 #IH2 #L2 #T2 #H
-@(bi_star_ind … IH1 IH2 ? ? H)
-qed-.
-
-lemma csups_ind_dx: ∀L2,T2. ∀R:relation2 lenv term. R L2 T2 →
-                    (∀L1,L,T1,T. ⦃L1, T1⦄ > ⦃L, T⦄ → ⦃L, T⦄ >* ⦃L2, T2⦄ → R L T → R L1 T1) →
-                    ∀L1,T1. ⦃L1, T1⦄ >* ⦃L2, T2⦄ → R L1 T1.
-#L2 #T2 #R #IH1 #IH2 #L1 #T1 #H
-@(bi_star_ind_dx … IH1 IH2 ? ? H)
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma csups_refl: bi_reflexive … csups.
-/2 width=1/ qed.
-
-lemma csupp_csups: ∀L1,L2,T1,T2. ⦃L1, T1⦄ >+ ⦃L2, T2⦄ → ⦃L1, T1⦄ >* ⦃L2, T2⦄.
-/2 width=1/ qed.
-
-lemma csup_csups: ∀L1,L2,T1,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ → ⦃L1, T1⦄ >* ⦃L2, T2⦄.
-/2 width=1/ qed.
-
-lemma csups_strap1: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ >* ⦃L, T⦄ → ⦃L, T⦄ > ⦃L2, T2⦄ →
-                    ⦃L1, T1⦄ >* ⦃L2, T2⦄.
-/2 width=4/ qed.
-
-lemma csups_strap2: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ > ⦃L, T⦄ → ⦃L, T⦄ >* ⦃L2, T2⦄ →
-                    ⦃L1, T1⦄ >* ⦃L2, T2⦄.
-/2 width=4/ qed.
-
-lemma csups_csupp_csupp: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ >* ⦃L, T⦄ →
-                         ⦃L, T⦄ >+ ⦃L2, T2⦄ → ⦃L1, T1⦄ >+ ⦃L2, T2⦄.
-/2 width=4/ qed.
-
-lemma csupp_csups_csupp: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ >+ ⦃L, T⦄ →
-                          ⦃L, T⦄ >* ⦃L2, T2⦄ → ⦃L1, T1⦄ >+ ⦃L2, T2⦄.
-/2 width=4/ qed.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma csups_fwd_cw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ >* ⦃L2, T2⦄ → #{L2, T2} ≤ #{L1, T1}.
-#L1 #L2 #T1 #T2 #H @(csups_ind … H) -L2 -T2 //
-/4 width=3 by csup_fwd_cw, lt_to_le_to_lt, lt_to_le/ (**) (* slow even with trace *)
-qed-.
-
-(* Advanced inversion lemmas for csupp **************************************)
-
-lemma csupp_inv_atom1_csups: ∀J,L1,L2,T2. ⦃L1, ⓪{J}⦄ >+ ⦃L2, T2⦄ →
-                             ∃∃I,K,V,i. ⇩[0, i] L1 ≡ K.ⓑ{I}V &
-                             ⦃K, V⦄ >* ⦃L2, T2⦄ & J = LRef i.
-#J #L1 #L2 #T2 #H @(csupp_ind … H) -L2 -T2
-[ #L2 #T2 #H
-  elim (csup_inv_atom1 … H) -H * #i #HL12 #H destruct /2 width=7/
-| #L #T #L2 #T2 #_ #HT2 * #I #K #V #i #HLK #HVT #H destruct /3 width=8/
-]
-qed-.
-
-lemma csupp_inv_bind1_csups: ∀b,J,L1,L2,W,U,T2. ⦃L1, ⓑ{b,J}W.U⦄ >+ ⦃L2, T2⦄ →
-                             ⦃L1, W⦄ >* ⦃L2, T2⦄ ∨ ⦃L1.ⓑ{J}W, U⦄ >* ⦃L2, T2⦄.
-#b #J #L1 #L2 #W #U #T2 #H @(csupp_ind … H) -L2 -T2
-[ #L2 #T2 #H
-  elim (csup_inv_bind1 … H) -H * #H1 #H2 destruct /2 width=1/
-| #L #T #L2 #T2 #_ #HT2 * /3 width=4/
-]
-qed-.
-
-lemma csupp_inv_flat1_csups: ∀J,L1,L2,W,U,T2. ⦃L1, ⓕ{J}W.U⦄ >+ ⦃L2, T2⦄ →
-                             ⦃L1, W⦄ >* ⦃L2, T2⦄ ∨ ⦃L1, U⦄ >* ⦃L2, T2⦄.
-#J #L1 #L2 #W #U #T2 #H @(csupp_ind … H) -L2 -T2
-[ #L2 #T2 #H
-  elim (csup_inv_flat1 … H) -H #H1 * #H2 destruct /2 width=1/
-| #L #T #L2 #T2 #_ #HT2 * /3 width=4/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/csup/csups_csups.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/csup/csups_csups.etc
deleted file mode 100644 (file)
index aa54d9b..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/csup_csup.ma".
-include "basic_2/unfold/csups.ma".
-
-(* STAR-ITERATED SUPCLOSURE *************************************************)
-
-(* Advanced forward lemmas **************************************************)
-
-(*
-lemma csupp_strap2_fwd_refl: ∀L,L0,T1,T2. ⦃L, T1⦄ > ⦃L0, T2⦄ →
-                             ∀T3. ⦃L0, T2⦄ >+ ⦃L, T3⦄ →
-                             L = L0 ∨ ⦃L, T1⦄ >+ ⦃L, T3⦄.
-#L #L0 #T1 #T2 * -L -L0 -T1 -T2 /2 width=1/
-[ #I #L0 #K0 #V0 #i #HLK0 #T3 #H
-  lapply (ldrop_pair2_fwd_cw … HLK0 T3) -HLK0 #H1
-  lapply (csupp_fwd_cw … H) -H #H2
-  lapply (transitive_lt … H1 H2) -H1 -H2 #H
-  elim (lt_refl_false … H)
-| #a #I #L0 #V2 #T2 #T3 #HT23
-  /3 width=5/
-
-  elim (csup_inv_ldrop … HT23 I V2 0 ?) -HT23 // #H1 #H2 destruct /2 width=1/
-  qed-.
-
-
-
-
-
-
-
-
-lemma csups_strap1_fwd_refl: ∀L,L0,T1,T2. ⦃L, T1⦄ >* ⦃L0, T2⦄ →
-                             ∀T3. ⦃L0, T2⦄ > ⦃L, T3⦄ → L = L0.
-#L #L0 #T1 #T2 #H @(csups_ind_dx … H) -L -T1 //
-#L1 #L #T1 #T #HL1 #_ #IHL0 #T3 #HL0
-lapply (csup_trans_fwd_refl … HL10) … HL0) -T2
-*) 
-lemma lift_csups_trans_aux: ∀T1,U1,d,e. ⇧[d, e] T1 ≡ U1 →
-                            ∀L1,L2,U2. ⦃L1, U1⦄ >* ⦃L2, U2⦄ → L1 = L2 →
-                            ∃T2. ⇧[d, e] T2 ≡ U2.
-#T1 #U1 #d #e #HTU1 #L1 #L2 #U2 #H @(csups_ind … H) -L2 -U2 /2 width=2/ -T1
-#L #L2 #U #U2 #HL1 #HL2 #IHL1 #H destruct
-
-* -T1 -U1 -d -e
-
-(* Main propertis ***********************************************************)
-
-theorem csups_trans: bi_transitive … csups.
-/2 width=4/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/csup/ypr.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/csup/ypr.etc
deleted file mode 100644 (file)
index f1510ab..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-notation "hvbox( h ⊢ break ⦃ L1, break T1 ⦄ • ⥸ break [ g ] break ⦃ L2 , break T2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'YPRed $h $g $L1 $T1 $L2 $T2 }.
-
-include "basic_2/substitution/csup.ma".
-include "basic_2/reducibility/xpr.ma".
-
-(* HYPER PARALLEL REDUCTION ON CLOSURES *************************************)
-
-inductive ypr (h) (g) (L1) (T1): relation2 lenv term ≝
-| ypr_cpr : ∀T2. L1 ⊢ T1 ➡ T2 → ypr h g L1 T1 L1 T2
-| ypr_ssta: ∀T2,l. ⦃h, L1⦄ ⊢ T1 •[g, l + 1] T2 → ypr h g L1 T1 L1 T2
-| ypr_csup: ∀L2,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ → ypr h g L1 T1 L2 T2
-. 
-
-interpretation
-   "hyper parallel reduction (closure)"
-   'YPRed h g L1 T1 L2 T2 = (ypr h g L1 T1 L2 T2).
-
-(* Basic properties *********************************************************)
-
-lemma ypr_refl: ∀h,g. bi_reflexive … (ypr h g).
-/2 width=1/ qed.
-
-lemma xpr_ypr: ∀h,g,L,T1,T2. ⦃h, L⦄ ⊢ T1 •➡[g] T2 → h ⊢ ⦃L, T1⦄ •⥸[g] ⦃L, T2⦄.
-#h #g #L #T1 #T2 * /2 width=1/ /2 width=2/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/csup/yprs.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/csup/yprs.etc
deleted file mode 100644 (file)
index 86dc0c1..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-notation "hvbox( h ⊢ break ⦃ L1, break T1 ⦄ • ⥸  * break [ g ] break ⦃ L2 , break T2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'YPRedStar $h $g $L1 $T1 $L2 $T2 }.
-
-include "basic_2/reducibility/ypr.ma".
-
-(* HYPER PARALLEL COMPUTATION ON CLOSURES ***********************************)
-
-definition yprs: ∀h. sd h → bi_relation lenv term ≝
-                 λh,g. bi_TC … (ypr h g).
-
-interpretation "hyper parallel computation (closure)"
-   'YPRedStar h g L1 T1 L2 T2 = (yprs h g L1 T1 L2 T2).
-
-(* Basic eliminators ********************************************************)
-
-lemma yprs_ind: ∀h,g,L1,T1. ∀R:relation2 lenv term. R L1 T1 →
-                (∀L,L2,T,T2. h ⊢ ⦃L1, T1⦄ •⥸*[g] ⦃L, T⦄ → h ⊢ ⦃L, T⦄ •⥸[g] ⦃L2, T2⦄ → R L T → R L2 T2) →
-                ∀L2,T2. h ⊢ ⦃L1, T1⦄ •⥸*[g] ⦃L2, T2⦄ → R L2 T2.
-/3 width=7 by bi_TC_star_ind/ qed-.
-
-lemma yprs_ind_dx: ∀h,g,L2,T2. ∀R:relation2 lenv term. R L2 T2 →
-                   (∀L1,L,T1,T. h ⊢ ⦃L1, T1⦄ •⥸[g] ⦃L, T⦄ → h ⊢ ⦃L, T⦄ •⥸*[g] ⦃L2, T2⦄ → R L T → R L1 T1) →
-                   ∀L1,T1. h ⊢ ⦃L1, T1⦄ •⥸*[g] ⦃L2, T2⦄ → R L1 T1.
-/3 width=7 by bi_TC_star_ind_dx/ qed-.
-
-(* Basic properties *********************************************************)
-
-lemma yprs_refl: ∀h,g. bi_reflexive … (yprs h g).
-/2 width=1/ qed.
-
-lemma yprs_strap1: ∀h,g,L1,L,L2,T1,T,T2. h ⊢ ⦃L1, T1⦄ •⥸*[g] ⦃L, T⦄ →
-                   h ⊢ ⦃L, T⦄ •⥸[g] ⦃L2, T2⦄ → h ⊢ ⦃L1, T1⦄ •⥸*[g] ⦃L2, T2⦄.
-/2 width=4/ qed.
-
-lemma yprs_strap2: ∀h,g,L1,L,L2,T1,T,T2. h ⊢ ⦃L1, T1⦄ •⥸[g] ⦃L, T⦄ →
-                   h ⊢ ⦃L, T⦄ •⥸*[g] ⦃L2, T2⦄ → h ⊢ ⦃L1, T1⦄ •⥸*[g] ⦃L2, T2⦄.
-/2 width=4/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/csup/yprs_csups.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/csup/yprs_csups.etc
deleted file mode 100644 (file)
index 08c939d..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/csups.ma".
-include "basic_2/computation/yprs.ma".
-
-(* HYPER PARALLEL COMPUTATION ON CLOSURES ***********************************)
-
-(* Properties on iterated supclosure ****************************************)
-
-lemma csups_yprs: ∀h,g,L1,L2,T1,T2. ⦃L1, T1⦄ >* ⦃L2, T2⦄ →
-                  h ⊢ ⦃L1, T1⦄ •⥸*[g] ⦃L2, T2⦄.
-#h #g #L1 #L2 #T1 #T2 #H @(csups_ind … H) -L2 -T2 /3 width=1/ /3 width=4/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/csup/yprs_xprs.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/csup/yprs_xprs.etc
deleted file mode 100644 (file)
index 2feb88a..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/xprs_cprs.ma".
-include "basic_2/computation/yprs.ma".
-
-(* HYPER PARALLEL COMPUTATION ON CLOSURES ***********************************)
-
-(* Properties on extended parallel computation for terms ********************)
-
-lemma xprs_yprs: ∀h,g,L,T1,T2. ⦃h, L⦄ ⊢ T1 •➡*[g] T2 →
-                 h ⊢ ⦃L, T1⦄ •⥸*[g] ⦃L, T2⦄.
-#h #g #L #T1 #T2 #H @(xprs_ind … H) -T2 // /3 width=4/
-qed.
-
-lemma cprs_yprs: ∀h,g,L,T1,T2. L ⊢ T1 ➡* T2 → h ⊢ ⦃L, T1⦄ •⥸*[g] ⦃L, T2⦄.
-/3 width=1/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/csup/yprs_yprs.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/csup/yprs_yprs.etc
deleted file mode 100644 (file)
index d737dd8..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/yprs.ma".
-
-(* HYPER PARALLEL COMPUTATION ON TERMS **************************************)
-
-theorem yprs_trans: ∀h,g. bi_transitive … (yprs h g).
-/2 width=4/ qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/csup/ysteps.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/csup/ysteps.etc
deleted file mode 100644 (file)
index 149e789..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The 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 ⦃ L1, break T1 ⦄ • ⭃ * break [ g ] break ⦃ L2 , break T2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'YPRedStepStar $h $g $L1 $T1 $L2 $T2 }.
-
-include "basic_2/substitution/csup.ma".
-include "basic_2/computation/yprs.ma".
-
-(* ITERATED STEP OF HYPER PARALLEL COMPUTATION ON CLOSURES ******************)
-
-inductive ysteps (h) (g) (L1) (T1) (L2) (T2): Prop ≝
-| ysteps_intro: h ⊢ ⦃L1, T1⦄ •⥸*[g] ⦃L2, T2⦄ → (L1 = L2 → T1 = T2 → ⊥) →
-                ysteps h g L1 T1 L2 T2
-.
-
-interpretation "iterated step of hyper parallel computation (closure)"
-   'YPRedStepStar h g L1 T1 L2 T2 = (ysteps h g L1 T1 L2 T2).
-
-(* Basic properties *********************************************************)
-
-lemma ssta_ysteps: ∀h,g,L,T,U,l. ⦃h, L⦄ ⊢ T •[g, l + 1] U →
-                   h ⊢ ⦃L, T⦄ •⭃*[g] ⦃L, U⦄.
-#h #g #L #T #U #l #HTU
-@ysteps_intro /3 width=2/ #_ #H destruct
-elim (ssta_inv_refl … HTU)
-qed.
-
-lemma csup_ysteps: ∀h,g,L1,L2,T1,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ →
-                   h ⊢ ⦃L1, T1⦄ •⭃*[g] ⦃L2, T2⦄.
-#h #g #L1 #L2 #T1 #T2 #H
-lapply (csup_fwd_cw … H) #H1
-@ysteps_intro /3 width=1/ -H #H2 #H3 destruct
-elim (lt_refl_false … H1)
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/csup/ysteps_csups.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/csup/ysteps_csups.etc
deleted file mode 100644 (file)
index 2e48f39..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/yprs_csups.ma".
-include "basic_2/computation/ysteps.ma".
-
-(* ITERATED STEP OF HYPER PARALLEL COMPUTATION ON CLOSURES ******************)
-
-(* Properties on iterated supclosure ****************************************)
-
-lemma csups_ysteps: ∀h,g,L1,L2,T1,T2. ⦃L1, T1⦄ >* ⦃L2, T2⦄ →
-                    h ⊢ ⦃L1, T1⦄ •⭃*[g] ⦃L2, T2⦄.
-#h #g #L1 #L2 #T1 #T2 #H
-lapply (csups_fwd_cw … H) #H1
-@ysteps_intro /2 width=1/ -H #H2 #H3 destruct
-elim (lt_refl_false … H1)
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/hod/ntas.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/hod/ntas.etc
deleted file mode 100644 (file)
index 8cfaa34..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-notation "hvbox( ⦃ h , break L ⦄ ⊢ break term 46 T1 : : * break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'NativeTypeStarAlt $h $L $T1 $T2 }.
-
-include "basic_2/dynamic/nta.ma".
-
-(* HIGHER ORDER NATIVE TYPE ASSIGNMENT ON TERMS *****************************)
-
-definition ntas: sh → lenv → relation term ≝
-                 λh,L. star … (nta h L).
-
-interpretation "higher order native type assignment (term)"
-   'NativeTypeStar h L T U = (ntas h L T U).
-
-(* Basic eliminators ********************************************************)
-(*
-lemma cprs_ind: ∀L,T1. ∀R:predicate term. R T1 →
-                (∀T,T2. L ⊢ T1 ➡* T → L ⊢ T ➡ T2 → R T → R T2) →
-                ∀T2. L ⊢ T1 ➡* T2 → R T2.
-#L #T1 #R #HT1 #IHT1 #T2 #HT12
-@(TC_star_ind … HT1 IHT1 … HT12) //
-qed-.
-*)
-axiom ntas_ind_dx: ∀h,L,T2. ∀R:predicate term. R T2 →
-                   (∀T1,T. ⦃h, L⦄ ⊢ T1 : T → ⦃h, L⦄ ⊢ T :* T2 → R T → R T1) →
-                   ∀T1. ⦃h, L⦄ ⊢ T1 :* T2 → R T1.
-(*
-#h #L #T2 #R #HT2 #IHT2 #T1 #HT12
-@(star_ind_dx … HT2 IHT2 … HT12) //
-qed-.
-*)
-(* Basic properties *********************************************************)
-
-lemma ntas_refl: ∀h,L,T. ⦃h, L⦄ ⊢ T :* T.
-// qed.
-
-lemma ntas_strap1: ∀h,L,T1,T,T2.
-                   ⦃h, L⦄ ⊢ T1 :* T → ⦃h, L⦄  ⊢ T : T2 → ⦃h, L⦄  ⊢ T1 :* T2.
-/2 width=3/ qed.
-
-lemma ntas_strap2: ∀h,L,T1,T,T2.
-                   ⦃h, L⦄  ⊢ T1 : T → ⦃h, L⦄ ⊢ T :* T2 → ⦃h, L⦄ ⊢ T1 :* T2.
-/2 width=3/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/hod/ntas_lift.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/hod/ntas_lift.etc
deleted file mode 100644 (file)
index 1adced7..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/dynamic/nta_lift.ma".
-include "basic_2/hod/ntas.ma".
-
-(* HIGHER ORDER NATIVE TYPE ASSIGNMENT ON TERMS *****************************)
-
-(* Advanced properties on native type assignment for terms ******************)
-
-lemma nta_pure_ntas: ∀h,L,U,W,Y. ⦃h, L⦄ ⊢ U :* ⓛW.Y → ∀T. ⦃h, L⦄ ⊢ T : U →
-                     ∀V. ⦃h, L⦄ ⊢ V : W →  ⦃h, L⦄ ⊢ ⓐV.T : ⓐV.U.
-#h #L #U #W #Y #H @(ntas_ind_dx … H) -U /2 width=1/ /3 width=2/
-qed.
-
-axiom pippo: ∀h,L,T,W,Y. ⦃h, L⦄ ⊢ T :* ⓛW.Y → ∀U. ⦃h, L⦄ ⊢ T : U →
-             ∃Z. ⦃h, L⦄ ⊢ U :* ⓛW.Z.
-(* REQUIRES SUBJECT CONVERSION
-#h #L #T #W #Y #H @(ntas_ind_dx … H) -T
-[ #U #HYU
-  elim (nta_fwd_correct … HYU) #U0 #HU0 
-  elim (nta_inv_bind1 … HYU) #W0 #Y0 #HW0 #HY0 #HY0U
-*)
-
-(* Advanced inversion lemmas on native type assignment for terms ************)
-
-fact nta_inv_pure1_aux: ∀h,L,Z,U. ⦃h, L⦄ ⊢ Z : U → ∀X,Y. Z = ⓐY.X →
-                        ∃∃W,V,T. ⦃h, L⦄ ⊢ Y : W & ⦃h, L⦄ ⊢ X : V &
-                                 L ⊢ ⓐY.V ⬌* U & ⦃h, L⦄ ⊢ V :* ⓛW.T.
-#h #L #Z #U #H elim H -L -Z -U
-[ #L #k #X #Y #H destruct
-| #L #K #V #W #U #i #_ #_ #_ #_ #X #Y #H destruct
-| #L #K #W #V #U #i #_ #_ #_ #_ #X #Y #H destruct
-| #I #L #V #W #T #U #_ #_ #_ #_ #X #Y #H destruct
-| #L #V #W #Z #U #HVW #HZU #_ #_ #X #Y #H destruct /2 width=7/
-| #L #V #W #Z #U #HZU #_ #_ #IHUW #X #Y #H destruct
-  elim (IHUW U Y ?) -IHUW // /3 width=9/
-| #L #Z #U #_ #_ #X #Y #H destruct
-| #L #Z #U1 #U2 #V2 #_ #HU12 #_ #IHTU1 #_ #X #Y #H destruct
-  elim (IHTU1 ???) -IHTU1 [4: // |2,3: skip ] #W #V #T #HYW #HXV #HU1 #HVT
-  lapply (cpcs_trans … HU1 … HU12) -U1 /2 width=7/
-]
-qed.
-
-(* Basic_1: was only: ty3_gen_appl *)
-lemma nta_inv_pure1: ∀h,L,Y,X,U. ⦃h, L⦄ ⊢ ⓐY.X : U →
-                     ∃∃W,V,T. ⦃h, L⦄ ⊢ Y : W & ⦃h, L⦄ ⊢ X : V &
-                              L ⊢ ⓐY.V ⬌* U & ⦃h, L⦄ ⊢ V :* ⓛW.T.
-/2 width=3/ qed-.
-
-axiom nta_inv_appl1: ∀h,L,Z,Y,X,U. ⦃h, L⦄ ⊢ ⓐZ.ⓛY.X : U →
-                     ∃∃W. ⦃h, L⦄ ⊢ Z : Y & ⦃h, L⦄ ⊢ ⓛY.X : ⓛY.W &
-                     L ⊢ ⓐZ.ⓛY.W ⬌* U.
-(* REQUIRES SUBJECT REDUCTION
-#h #L #Z #Y #X #U #H
-elim (nta_inv_pure1 … H) -H #W #V #T #HZW #HXV #HVU #HVT
-elim (nta_inv_bind1 … HXV) -HXV #Y0 #X0 #HY0 #HX0 #HX0V
-lapply (cpcs_trans … (ⓐZ.ⓛY.X0) … HVU) -HVU /2 width=1/ -HX0V #HX0U
-@(ex3_1_intro … HX0U) /2 width=2/
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/lenv_px/lcpcs.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/lenv_px/lcpcs.etc
deleted file mode 100644 (file)
index d815739..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-notation "hvbox( L1 ⊢ ⬌* break term 46 L2 )"
-   non associative with precedence 45
-   for @{ 'CPConvStar $L1 $L2 }.
-
-include "basic_2/grammar/lenv_px_sn.ma".
-include "basic_2/equivalence/cpcs.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON LOCAL ENVIRONMENTS *************)
-
-definition lcpcs: relation lenv ≝ lpx_sn … cpcs.
-
-interpretation "context-sensitive parallel equivalence (local environment)"
-   'CPConvStar L1 L2 = (lcpcs L1 L2).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma lcpcs_inv_atom1: ∀L2. ⋆ ⊢ ⬌* L2 → L2 = ⋆.
-/2 width=2 by lpx_sn_inv_atom1/ qed-.
-
-lemma lcpcs_inv_pair1: ∀I,K1,V1,L2. K1. ⓑ{I} V1 ⊢ ⬌* L2 →
-                       ∃∃K2,V2. K1 ⊢ ⬌* K2 & K1 ⊢ V1 ⬌* V2 & L2 = K2. ⓑ{I} V2.
-/2 width=1 by lpx_sn_inv_pair1/ qed-.
-
-lemma lcpcs_inv_atom2: ∀L1. L1 ⊢ ⬌* ⋆ → L1 = ⋆.
-/2 width=2 by lpx_sn_inv_atom2/ qed-.
-
-lemma lcpcs_inv_pair2: ∀I,L1,K2,V2. L1 ⊢ ⬌* K2. ⓑ{I} V2 →
-                       ∃∃K1,V1. K1 ⊢ ⬌* K2 & K1 ⊢ V1 ⬌* V2 & L1 = K1. ⓑ{I} V1.
-/2 width=1 by lpx_sn_inv_pair2/ qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma lcpcs_fwd_length: ∀L1,L2. L1 ⊢ ⬌* L2 → |L1| = |L2|.
-/2 width=2 by lpx_sn_fwd_length/ qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/lenv_px/lcpcs_ltpr.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/lenv_px/lcpcs_ltpr.etc
deleted file mode 100644 (file)
index ecc6be8..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/ltpr.ma".
-include "basic_2/equivalence/lcpcs.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON LOCAL ENVIRONMENTS *************)
-
-(* Properties on context-free parallel reduction for local environments *****)
-
-lemma ltpr_lcpcs: ∀L1,L2. L1 ➡ L2 → L1 ⊢ ⬌* L2.
-#L1 #L2 #H elim H -L1 -L2 // /4 width=1/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/lenv_px/lenv_px_sn.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/lenv_px/lenv_px_sn.etc
deleted file mode 100644 (file)
index fddab03..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/lenv_length.ma".
-
-(* SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS **********)
-
-inductive lpx_sn (R:lenv→relation term): relation lenv ≝
-| lpx_sn_stom: lpx_sn R (⋆) (⋆)
-| lpx_sn_pair: ∀I,K1,K2,V1,V2.
-               lpx_sn R K1 K2 → R K1 V1 V2 → lpx_sn R (K1. ⓑ{I} V1) (K2. ⓑ{I} V2)
-.
-
-(* Basic inversion lemmas ***************************************************)
-
-fact lpx_sn_inv_atom1_aux: ∀R,L1,L2. lpx_sn R L1 L2 → L1 = ⋆ → L2 = ⋆.
-#R #L1 #L2 * -L1 -L2
-[ //
-| #I #K1 #K2 #V1 #V2 #_ #_ #H destruct
-]
-qed-.
-
-lemma lpx_sn_inv_atom1: ∀R,L2. lpx_sn R (⋆) L2 → L2 = ⋆.
-/2 width=4 by lpx_sn_inv_atom1_aux/ qed-.
-
-fact lpx_sn_inv_pair1_aux: ∀R,L1,L2. lpx_sn R L1 L2 → ∀I,K1,V1. L1 = K1. ⓑ{I} V1 →
-                           ∃∃K2,V2. lpx_sn R K1 K2 & R K1 V1 V2 & L2 = K2. ⓑ{I} V2.
-#R #L1 #L2 * -L1 -L2
-[ #J #K1 #V1 #H destruct
-| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #L #W #H destruct /2 width=5/
-]
-qed-.
-
-lemma lpx_sn_inv_pair1: ∀R,I,K1,V1,L2. lpx_sn R (K1. ⓑ{I} V1) L2 →
-                        ∃∃K2,V2. lpx_sn R K1 K2 & R K1 V1 V2 & L2 = K2. ⓑ{I} V2.
-/2 width=3 by lpx_sn_inv_pair1_aux/ qed-.
-
-fact lpx_sn_inv_atom2_aux: ∀R,L1,L2. lpx_sn R L1 L2 → L2 = ⋆ → L1 = ⋆.
-#R #L1 #L2 * -L1 -L2
-[ //
-| #I #K1 #K2 #V1 #V2 #_ #_ #H destruct
-]
-qed-.
-
-lemma lpx_sn_inv_atom2: ∀R,L1. lpx_sn R L1 (⋆) → L1 = ⋆.
-/2 width=4 by lpx_sn_inv_atom2_aux/ qed-.
-
-fact lpx_sn_inv_pair2_aux: ∀R,L1,L2. lpx_sn R L1 L2 → ∀I,K2,V2. L2 = K2. ⓑ{I} V2 →
-                           ∃∃K1,V1. lpx_sn R K1 K2 & R K1 V1 V2 & L1 = K1. ⓑ{I} V1.
-#R #L1 #L2 * -L1 -L2
-[ #J #K2 #V2 #H destruct
-| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #K #W #H destruct /2 width=5/
-]
-qed-.
-
-lemma lpx_sn_inv_pair2: ∀R,I,L1,K2,V2. lpx_sn R L1 (K2. ⓑ{I} V2) →
-                        ∃∃K1,V1. lpx_sn R K1 K2 & R K1 V1 V2 & L1 = K1. ⓑ{I} V1.
-/2 width=3 by lpx_sn_inv_pair2_aux/ qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma lpx_sn_fwd_length: ∀R,L1,L2. lpx_sn R L1 L2 → |L1| = |L2|.
-#R #L1 #L2 #H elim H -L1 -L2 normalize //
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/lsubn/lsubn_lsubn.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/lsubn/lsubn_lsubn.etc
deleted file mode 100644 (file)
index 9ef3dda..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/dynamic/lsubn_nta.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR NATIVE TYPE ASSIGNMENT ******************)
-
-(* Main properties **********************************************************)
-
-(* Note: new property *)
-theorem lsubn_trans: ∀h,L1,L. h ⊢ L1 :⊑ L → ∀L2. h ⊢ L :⊑ L2 → h ⊢ L1 :⊑ L2.
-#h #L1 #L #H elim H -L1 -L
-[ #X #H >(lsubn_inv_atom1 … H) -H //
-| #I #L1 #L #V #HL1 #H1W #IHL1 #X #H
-  elim (lsubn_inv_pair1 … H) -H * #L2
-  [ #HL2 #H #H2W destruct /4 width=1/
-  | #W #H1VW #H2VW #HL2 #H1 #H2 destruct /3 width=3/
-  ]
-| #L1 #L #V1 #W1 #H1VW1 #H2VW1 #HL1 #IHL1 #X #H
-  elim (lsubn_inv_pair1 … H) -H * #L2
-  [ #HL2 #H #HW destruct /3 width=1/
-  | #V #_ #_ #_ #_ #H destruct
-  ]
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/lsubsv/lsubsv.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/lsubsv/lsubsv.etc
deleted file mode 100644 (file)
index 2512226..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************)
-
-(* Note: this is not transitive *)
-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] → L1 ⊢ W2 ⬌* W1 → 
-               ⦃h, L1⦄ ⊢ V1 •[g, l + 1] W1 → ⦃h, L2⦄ ⊢ W2 •[g, l] V2 →
-               lsubsv h g L1 L2 → lsubsv h g (L1. ⓓV1) (L2. ⓛW2)
-.
-
-interpretation
-  "local environment refinement (stratified native validity)"
-  'CrSubEqV h g L1 L2 = (lsubsv h g L1 L2).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact lsubsv_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 lsubsv_inv_atom1: ∀h,g,L2. h ⊢ ⋆ ⊩:⊑[g] L2 → L2 = ⋆.
-/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,W1,W2,V2,l. ⦃h, K1⦄ ⊩ V1 :[g] & ⦃h, K1⦄ ⊢ V1 •[g,l+1] W1 & ⦃h, K2⦄ ⊢ W2 •[g,l] V2 &
-                                            K1 ⊢ W2 ⬌* W1 & 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 #HV1 #HW21 #HVW1 #HWV2 #HL12 #J #K1 #U1 #H destruct /3 width=10/
-]
-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,W1,W2,V2,l. ⦃h, K1⦄ ⊩ V1 :[g] & ⦃h, K1⦄ ⊢ V1 •[g,l+1] W1 & ⦃h, K2⦄ ⊢ W2 •[g,l] V2 &
-                                         K1 ⊢ W2 ⬌* W1 & h ⊢ K1 ⊩:⊑[g] K2 & L2 = K2. ⓛW2 & I = Abbr.
-/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
-]
-qed-.
-
-lemma lsubsv_inv_atom2: ∀h,g,L1. h ⊢ L1 ⊩:⊑[g] ⋆ → L1 = ⋆.
-/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 & ⦃h, K2⦄ ⊢ W2 •[g,l] V2 &
-                                            K1 ⊢ W2 ⬌* W1 & 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 #HV #HW21 #HVW1 #HWV2 #HL12 #J #K2 #U2 #H destruct /3 width=11/
-]
-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 & ⦃h, K2⦄ ⊢ W2 •[g,l] V2 &
-                                         K1 ⊢ W2 ⬌* W1 & h ⊢ K1 ⊩:⊑[g] K2 & L1 = K1. ⓓV1 & I = Abst.
-/2 width=3 by lsubsv_inv_pair2_aux/ qed-.
-
-(* Basic_forward lemmas *****************************************************)
-
-lemma lsubsv_fwd_lsubs1: ∀h,g,L1,L2. h ⊢ L1 ⊩:⊑[g] L2 → L1 ≼[0, |L1|] L2.
-#h #g #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
-qed-.
-
-lemma lsubsv_fwd_lsubs2: ∀h,g,L1,L2. h ⊢ L1 ⊩:⊑[g] L2 → L1 ≼[0, |L2|] L2.
-#h #g #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma lsubsv_refl: ∀h,g,L. h ⊢ L ⊩:⊑[g] L.
-#h #g #L elim L -L // /2 width=1/
-qed.
-
-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_lsubs2, cprs_lsubs_trans/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/lsubsv/lsubsv_cpcs.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/lsubsv/lsubsv_cpcs.etc
deleted file mode 100644 (file)
index 87a72e0..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/equivalence/cpcs_cpcs.ma".
-include "basic_2/dynamic/lsubsv.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************)
-
-(* Properties on context-sensitive parallel equivalence for terms ***********)
-
-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_lsubs2, cpcs_lsubs_trans/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/lsubsv/lsubsv_ldrop.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/lsubsv/lsubsv_ldrop.etc
deleted file mode 100644 (file)
index 2c3381f..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/dynamic/lsubsv.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************)
-
-(* Properties concerning basic local environment slicing ********************)
-
-(* Note: the constant 0 cannot be generalized *)
-lemma lsubsv_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 … H) -H * #He #HLK1
-  [ destruct
-    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
-  | elim (IHL12 … HLK1) -L1 /3 width=3/
-  ]
-| #L1 #L2 #V1 #V2 #W1 #W2 #l #HV1 #HW21 #HVW1 #HWV2 #_ #IHL12 #K1 #e #H
-  elim (ldrop_inv_O1 … H) -H * #He #HLK1
-  [ destruct
-    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=6/
-  | elim (IHL12 … HLK1) -L1 /3 width=3/
-  ]
-]
-qed.
-
-(* Note: the constant 0 cannot be generalized *)
-lemma lsubsv_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 … H) -H * #He #HLK2
-  [ destruct
-    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
-  | elim (IHL12 … HLK2) -L2 /3 width=3/
-  ]
-| #L1 #L2 #V1 #V2 #W1 #W2 #l #HV #HW21 #HVW1 #HWV2 #_ #IHL12 #K2 #e #H
-  elim (ldrop_inv_O1 … H) -H * #He #HLK2
-  [ destruct
-    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=6/
-  | elim (IHL12 … HLK2) -L2 /3 width=3/
-  ]
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/lsubsv/lsubsv_snv.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/lsubsv/lsubsv_snv.etc
deleted file mode 100644 (file)
index e5bd995..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/dynamic/lsubsv_ldrop.ma".
-include "basic_2/dynamic/lsubsv_ssta.ma".
-include "basic_2/dynamic/lsubsv_cpcs.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************)
-
-(* Properties concerning stratified native validity *************************)
-
-axiom lsubsv_xprs_trans: ∀h,g,L1,L2. h ⊢ L1 ⊩:⊑[g] L2 →
-                         ∀T1,T2. ⦃h, L2⦄ ⊢ T1 •➡*[g] T2 → ⦃h, L1⦄ ⊢ T1 •➡*[g] T2.
-(*
-/3 width=3 by lsubsv_fwd_lsubss, lsubss_xprs_trans/ qed-.
-*)
-axiom lsubsv_snv_trans: ∀h,g,L2,T. ⦃h, L2⦄ ⊩ T :[g] →
-                        ∀L1. h ⊢ L1 ⊩:⊑[g] L2 → ⦃h, L1⦄ ⊩ T :[g].
-(*
-#h #g #L2 #T #H elim H -L2 -T //
-[ #I2 #L2 #K2 #V2 #i #HLK2 #_ #IHV2 #L1 #HL12
-  elim (lsubsv_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
-  elim (lsubsv_inv_pair2 … H) -H * #K1 [ | -IHV2 ]
-  [ #HK12 #H destruct /3 width=5/
-  | #V1 #l #HV1 #_ #_ #_ #H destruct /2 width=5/
-  ]
-| #a #I #L2 #V #T #_ #_ #IHV #IHT #L1 #HL12 /4 width=1/
-| #a #L2 #V #W #W0 #T #U #l #_ #_ #HVW #HW0 #HTU #IHV #IHT #L1 #HL12
-  lapply (IHV … HL12) -IHV #HV
-  lapply (IHT … HL12) -IHT #HT
-  lapply (lsubsv_ssta_trans … HVW … HL12) -HVW #HVW
-  lapply (lsubsv_cprs_trans … HL12 … HW0) -HW0 #HW0
-  lapply (lsubsv_xprs_trans … HL12 … HTU) -HL12 -HTU /2 width=8/
-| #L2 #W #T #U #l #_ #_ #HTU #HWU #IHW #IHT #L1 #HL12
-  lapply (IHW … HL12) -IHW #HW
-  lapply (IHT … HL12) -IHT #HT
-  lapply (lsubsv_ssta_trans … HTU … HL12) -HTU #HTU
-  lapply (lsubsv_cpcs_trans … HL12 … HWU) -HL12 -HWU /2 width=4/
-]
-qed-.
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/lsubsv/lsubsv_ssta.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/lsubsv/lsubsv_ssta.etc
deleted file mode 100644 (file)
index 1e5b5fd..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/xprs_lsubss.ma".
-include "basic_2/dynamic/lsubsv.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************)
-
-(* Properties on stratified native type assignment **************************)
-
-axiom lsubsv_ssta_trans: ∀h,g,L2,T,U2,l. ⦃h, L2⦄ ⊢ T •[g,l] U2 →
-                         ∀L1. h ⊢ L1 ⊩:⊑[g] L2 →
-                         ∃∃U1. L1 ⊢ U2 ⬌* U1 & ⦃h, L1⦄ ⊢ T •[g,l] U1.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/nta/lsubn.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/nta/lsubn.etc
deleted file mode 100644 (file)
index c4359c3..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The 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 L2 )"
-   non associative with precedence 45
-   for @{ 'CrSubEqN $h $L1 $L2 }.
-
-notation "hvbox( h ⊢ break term 46 L1 : : ⊑ break term 46 L2 )"
-   non associative with precedence 45
-   for @{ 'CrSubEqNAlt $h $L1 $L2 }.
-
-include "basic_2/dynamic/nta.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR NATIVE TYPE ASSIGNMENT ******************)
-
-(* Note: may not be transitive *)
-inductive lsubn (h:sh): relation lenv ≝
-| lsubn_atom: lsubn h (⋆) (⋆)
-| lsubn_pair: ∀I,L1,L2,W. lsubn h L1 L2 → lsubn h (L1. ⓑ{I} W) (L2. ⓑ{I} W)
-| lsubn_abbr: ∀L1,L2,V,W. ⦃h, L1⦄ ⊢ V : W → ⦃h, L2⦄ ⊢ V : W →
-              lsubn h L1 L2 → lsubn h (L1. ⓓV) (L2. ⓛW)
-.
-
-interpretation
-  "local environment refinement (native type assigment)"
-  'CrSubEqN h L1 L2 = (lsubn h L1 L2).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact lsubn_inv_atom1_aux: ∀h,L1,L2. h ⊢ L1 :⊑ L2 → L1 = ⋆ → L2 = ⋆.
-#h #L1 #L2 * -L1 -L2
-[ //
-| #I #L1 #L2 #V #_ #H destruct
-| #L1 #L2 #V #W #_ #_ #_ #H destruct
-]
-qed.
-
-lemma lsubn_inv_atom1: ∀h,L2. h ⊢ ⋆ :⊑ L2 → L2 = ⋆.
-/2 width=4/ qed-.
-
-fact lsubn_inv_pair1_aux: ∀h,L1,L2. h ⊢ L1 :⊑ L2 → ∀I,K1,V. L1 = K1. ⓑ{I} V →
-                          (∃∃K2. h ⊢ K1 :⊑ K2 & L2 = K2. ⓑ{I} V) ∨
-                          ∃∃K2,W. ⦃h, K1⦄ ⊢ V : W & ⦃h, K2⦄ ⊢ V : W &
-                                  h ⊢ K1 :⊑ K2 & L2 = K2. ⓛW & I = Abbr.
-#h #L1 #L2 * -L1 -L2
-[ #I #K1 #V #H destruct
-| #J #L1 #L2 #V #HL12 #I #K1 #W #H destruct /3 width=3/
-| #L1 #L2 #V #W #H1VW #H2VW #HL12 #I #K1 #V1 #H destruct /3 width=7/
-]
-qed.
-
-lemma lsubn_inv_pair1: ∀h,I,K1,L2,V. h ⊢ K1. ⓑ{I} V :⊑ L2 →
-                       (∃∃K2. h ⊢ K1 :⊑ K2 & L2 = K2. ⓑ{I} V) ∨
-                       ∃∃K2,W. ⦃h, K1⦄ ⊢ V : W & ⦃h, K2⦄ ⊢ V : W &
-                               h ⊢ K1 :⊑ K2 & L2 = K2. ⓛW & I = Abbr.
-/2 width=3/ qed-.
-
-fact lsubn_inv_atom2_aux: ∀h,L1,L2. h ⊢ L1 :⊑ L2 → L2 = ⋆ → L1 = ⋆.
-#h #L1 #L2 * -L1 -L2
-[ //
-| #I #L1 #L2 #V #_ #H destruct
-| #L1 #L2 #V #W #_ #_ #_ #H destruct
-]
-qed.
-
-lemma lsubc_inv_atom2: ∀h,L1. h ⊢ L1 :⊑ ⋆ → L1 = ⋆.
-/2 width=4/ qed-.
-
-fact lsubn_inv_pair2_aux: ∀h,L1,L2. h ⊢ L1 :⊑ L2 → ∀I,K2,W. L2 = K2. ⓑ{I} W →
-                          (∃∃K1. h ⊢ K1 :⊑ K2 & L1 = K1. ⓑ{I} W) ∨
-                          ∃∃K1,V. ⦃h, K1⦄ ⊢ V : W & ⦃h, K2⦄ ⊢ V : W &
-                                  h ⊢ K1 :⊑ K2 & L1 = K1. ⓓV & I = Abst.
-#h #L1 #L2 * -L1 -L2
-[ #I #K2 #W #H destruct
-| #J #L1 #L2 #V #HL12 #I #K2 #W #H destruct /3 width=3/
-| #L1 #L2 #V #W #H1VW #H2VW #HL12 #I #K2 #W2 #H destruct /3 width=7/
-]
-qed.
-
-(* Basic_1: was: csubt_gen_bind *)
-lemma lsubn_inv_pair2: ∀h,I,L1,K2,W. h ⊢ L1 :⊑ K2. ⓑ{I} W →
-                       (∃∃K1. h ⊢ K1 :⊑ K2 & L1 = K1. ⓑ{I} W) ∨
-                       ∃∃K1,V. ⦃h, K1⦄ ⊢ V : W & ⦃h, K2⦄ ⊢ V : W &
-                               h ⊢ K1 :⊑ K2 & L1 = K1. ⓓV & I = Abst.
-/2 width=3/ qed-.
-
-(* Basic_forward lemmas *****************************************************)
-
-lemma lsubn_fwd_lsubs1: ∀h,L1,L2. h ⊢ L1 :⊑ L2 → L1 ≼[0, |L1|] L2.
-#h #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
-qed-.
-
-lemma lsubn_fwd_lsubs2: ∀h,L1,L2. h ⊢ L1 :⊑ L2 → L1 ≼[0, |L2|] L2.
-#h #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
-qed-.
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was: csubt_refl *)
-lemma lsubn_refl: ∀h,L. h ⊢ L :⊑ L.
-#h #L elim L -L // /2 width=1/
-qed.
-
-(* Basic_1: removed theorems 6:
-            csubt_gen_flat csubt_drop_flat csubt_clear_conf
-            csubt_getl_abbr csubt_getl_abst csubt_ty3_ld
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/nta/lsubn_cpcs.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/nta/lsubn_cpcs.etc
deleted file mode 100644 (file)
index 5f610bc..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/equivalence/cpcs_cpcs.ma".
-include "basic_2/dynamic/lsubn.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR NATIVE TYPE ASSIGNMENT ******************)
-
-(* Properties on context-sensitive parallel equivalence for terms ***********)
-
-(* Basic_1: was: csubt_pr2 *)
-lemma cpr_lsubn_trans: ∀h,L1,L2. h ⊢ L1 :⊑ L2 →
-                       ∀T1,T2. L2 ⊢ T1 ➡ T2 → L1 ⊢ T1 ➡ T2.
-/3 width=4 by lsubn_fwd_lsubs2, cpr_lsubs_trans/ qed.
-
-lemma cprs_lsubn_trans: ∀h,L1,L2. h ⊢ L1 :⊑ L2 →
-                        ∀T1,T2. L2 ⊢ T1 ➡* T2 → L1 ⊢ T1 ➡* T2.
-/3 width=4 by lsubn_fwd_lsubs2, cprs_lsubs_trans/ qed.
-
-(* Basic_1: was: csubt_pc3 *)
-lemma cpcs_lsubn_trans: ∀h,L1,L2. h ⊢ L1 :⊑ L2 →
-                        ∀T1,T2. L2 ⊢ T1 ⬌* T2 → L1 ⊢ T1 ⬌* T2.
-/3 width=4 by lsubn_fwd_lsubs2, cpcs_lsubs_trans/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/nta/lsubn_ldrop.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/nta/lsubn_ldrop.etc
deleted file mode 100644 (file)
index a16fff6..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/dynamic/lsubn.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR NATIVE TYPE ASSIGNMENT ******************)
-
-(* Properties concerning basic local environment slicing ********************)
-
-(* Note: the constant 0 cannot be generalized *)
-lemma lsubn_ldrop_O1_conf: ∀h,L1,L2. h ⊢ L1 :⊑ L2 → ∀K1,e. ⇩[0, e] L1 ≡ K1 →
-                           ∃∃K2. h ⊢ K1 :⊑ K2 & ⇩[0, e] L2 ≡ K2.
-#h #L1 #L2 #H elim H -L1 -L2
-[ /2 width=3/
-| #I #L1 #L2 #V #_ #IHL12 #K1 #e #H
-  elim (ldrop_inv_O1 … H) -H * #He #HLK1
-  [ destruct
-    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
-  | elim (IHL12 … HLK1) -L1 /3 width=3/
-  ]
-| #L1 #L2 #V #W #H1VW #H2VW #_ #IHL12 #K1 #e #H
-  elim (ldrop_inv_O1 … H) -H * #He #HLK1
-  [ destruct
-    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
-  | elim (IHL12 … HLK1) -L1 /3 width=3/
-  ]
-]
-qed.
-
-(* Note: the constant 0 cannot be generalized *)
-(* Basic_1: was only: csubt_drop_abbr csubt_drop_abst *)
-lemma lsubn_ldrop_O1_trans: ∀h,L1,L2. h ⊢ L1 :⊑ L2 → ∀K2,e. ⇩[0, e] L2 ≡ K2 →
-                            ∃∃K1. h ⊢ K1 :⊑ K2 & ⇩[0, e] L1 ≡ K1.
-#h #L1 #L2 #H elim H -L1 -L2
-[ /2 width=3/
-| #I #L1 #L2 #V #_ #IHL12 #K2 #e #H
-  elim (ldrop_inv_O1 … H) -H * #He #HLK2
-  [ destruct
-    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
-  | elim (IHL12 … HLK2) -L2 /3 width=3/
-  ]
-| #L1 #L2 #V #W #H1VW #H2VW #_ #IHL12 #K2 #e #H
-  elim (ldrop_inv_O1 … H) -H * #He #HLK2
-  [ destruct
-    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
-  | elim (IHL12 … HLK2) -L2 /3 width=3/
-  ]
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/nta/lsubn_nta.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/nta/lsubn_nta.etc
deleted file mode 100644 (file)
index 5832b00..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/nta_nta.ma".
-include "basic_2/dynamic/lsubn_ldrop.ma".
-include "basic_2/dynamic/lsubn_cpcs.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR NATIVE TYPE ASSIGNMENT ******************)
-
-(* Properties concerning atomic arity assignment ****************************)
-
-(* Note: the corresponding confluence property does not hold *)
-(* Basic_1: was: csubt_ty3 *)
-lemma lsubn_nta_trans: ∀h,L2,T,U. ⦃h, L2⦄ ⊢ T : U → ∀L1. h ⊢ L1 :⊑ L2 →
-                       ⦃h, L1⦄ ⊢ T : U.
-#h #L2 #T #U #H elim H -L2 -T -U
-[ //
-| #L2 #K2 #V2 #W2 #U2 #i #HLK2 #_ #WU2 #IHVW2 #L1 #HL12
-  elim (lsubn_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
-  elim (lsubn_inv_pair2 … H) -H * #K1
-  [ #HK12 #H destruct /3 width=6/
-  | #V1 #_ #_ #_ #_ #H destruct
-  ]
-| #L2 #K2 #W2 #V2 #U2 #i #HLK2 #_ #HWU2 #IHWV2 #L1 #HL12
-  elim (lsubn_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
-  elim (lsubn_inv_pair2 … H) -H * #K1 [ | -IHWV2 ]
-  [ #HK12 #H destruct /3 width=6/
-  | #V1 #H1V1W2 #_ #_ #H #_ destruct /2 width=6/
-  ]
-| /4 width=2/
-| /3 width=1/
-| /3 width=2/
-| /3 width=1/
-| /4 width=6/
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta.etc
deleted file mode 100644 (file)
index fa4a8ed..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/sh.ma".
-include "basic_2/equivalence/cpcs.ma".
-
-(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
-
-inductive nta (h:sh): lenv → relation term ≝
-| nta_sort: ∀L,k. nta h L (⋆k) (⋆(next h k))
-| nta_ldef: ∀L,K,V,W,U,i. ⇩[0, i] L ≡ K. ⓓV → nta h K V W →
-            ⇧[0, i + 1] W ≡ U → nta h L (#i) U
-| nta_ldec: ∀L,K,W,V,U,i. ⇩[0, i] L ≡ K. ⓛW → nta h K W V →
-            ⇧[0, i + 1] W ≡ U → nta h L (#i) U
-| nta_bind: ∀I,L,V,W,T,U. nta h L V W → nta h (L. ⓑ{I} V) T U →
-            nta h L (ⓑ{I}V.T) (ⓑ{I}V.U)
-| nta_appl: ∀L,V,W,T,U. nta h L V W → nta h L (ⓛW.T) (ⓛW.U) →
-            nta h L (ⓐV.ⓛW.T) (ⓐV.ⓛW.U)
-| nta_pure: ∀L,V,W,T,U. nta h L T U → nta h L (ⓐV.U) W →
-            nta h L (ⓐV.T) (ⓐV.U)
-| nta_cast: ∀L,T,U. nta h L T U → nta h L (ⓝU. T) U
-| nta_conv: ∀L,T,U1,U2,V2. nta h L T U1 → L ⊢ U1 ⬌* U2 → nta h L U2 V2 →
-            nta h L T U2
-.
-
-interpretation "native type assignment (term)"
-   'NativeType h L T U = (nta h L T U).
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was: ty3_cast *)
-lemma nta_cast_old: ∀h,L,W,T,U.
-                    ⦃h, L⦄ ⊢ T : U → ⦃h, L⦄ ⊢ U : W → ⦃h, L⦄ ⊢ ⓝU.T : ⓝW.U.
-/4 width=3/ qed.
-
-(* Basic_1: was: ty3_typecheck *)
-lemma nta_typecheck: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∃T0. ⦃h, L⦄ ⊢ ⓝU.T : T0.
-/3 width=2/ qed.
-
-(* Basic_1: removed theorems 4:
-            ty3_getl_subst0 ty3_fsubst0 ty3_csubst0 ty3_subst0
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_aaa.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_aaa.etc
deleted file mode 100644 (file)
index 9628569..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/csn_aaa.ma".
-include "basic_2/equivalence/lcpcs_aaa.ma".
-include "basic_2/dynamic/nta.ma".
-
-(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
-
-(* Forward lemmas on atomic arity assignment for terms **********************)
-
-lemma nta_fwd_aaa: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∃∃A. L ⊢ T ⁝ A & L ⊢ U ⁝ A.
-#h #L #T #U #H elim H -L -T -U
-[ /2 width=3/
-| #L #K #V #W #U #i #HLK #_ #HWU * #B #HV #HW
-  lapply (ldrop_fwd_ldrop2 … HLK) /3 width=9/
-| #L #K #W #V #U #i #HLK #_ #HWU * #B #HW #_ -V
-  lapply (ldrop_fwd_ldrop2 … HLK) /3 width=9/
-| * #L #V #W #T #U #_ #_ * #B #HV #HW * #A #HT #HU
-  [ /3 width=3/ | /3 width=5/ ]
-| #L #V #W #T #U #_ #_ * #B #HV #HW * #X #H1 #H2
-  elim (aaa_inv_abst … H1) -H1 #B1 #A1 #HW1 #HT #H destruct
-  elim (aaa_inv_abst … H2) -H2 #B2 #A #_ #HU #H destruct
-  lapply (aaa_mono … HW1 … HW) -HW1 #H destruct /4 width=5/
-| #L #V #W #T #U #_ #_ * #X #HT #HUX * #A #H #_ -W
-  elim (aaa_inv_appl … H) -H #B #HV #HUA
-  lapply (aaa_mono … HUA … HUX) -HUX #H destruct /3 width=5/
-| #L #T #U #_ * #A #HT #HU /3 width=3/
-| #L #T #U1 #U2 #V2 #_ #HU12 #_ * #X #HT #HU1 * #A #HU2 #_
-  lapply (aaa_cpcs_mono … HU12 … HU1 … HU2) -U1 #H destruct /2 width=3/
-]
-qed-.
-
-(* Note: this is the stong normalization property *)
-(* Basic_1: was only: ty3_sn3 *)
-theorem nta_fwd_csn: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → L ⊢ ⬇* T ∧ L ⊢ ⬇* U.
-#h #L #T #U #H elim (nta_fwd_aaa … H) -H /3 width=2/
-qed-. 
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_alt.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_alt.etc
deleted file mode 100644 (file)
index 8cbd595..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/dynamic/nta.ma".
-
-(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
-
-(* alternative definition of nta *)
-inductive ntaa (h:sh): lenv → relation term ≝
-| ntaa_sort: ∀L,k. ntaa h L (⋆k) (⋆(next h k))
-| ntaa_ldef: ∀L,K,V,W,U,i. ⇩[0, i] L ≡ K. ⓓV → ntaa h K V W →
-             ⇧[0, i + 1] W ≡ U → ntaa h L (#i) U
-| ntaa_ldec: ∀L,K,W,V,U,i. ⇩[0, i] L ≡ K. ⓛW → ntaa h K W V →
-             ⇧[0, i + 1] W ≡ U → ntaa h L (#i) U
-| ntaa_bind: ∀I,L,V,W,T,U. ntaa h L V W → ntaa h (L. ⓑ{I} V) T U →
-             ntaa h L (ⓑ{I}V.T) (ⓑ{I}V.U)
-| ntaa_appl: ∀L,V,W,T,U. ntaa h L V W → ntaa h L (ⓛW.T) (ⓛW.U) →
-             ntaa h L (ⓐV.ⓛW.T) (ⓐV.ⓛW.U)
-| ntaa_pure: ∀L,V,W,T,U. ntaa h L T U → ntaa h L (ⓐV.U) W →
-             ntaa h L (ⓐV.T) (ⓐV.U)
-| ntaa_cast: ∀L,T,U,W. ntaa h L T U → ntaa h L U W → ntaa h L (ⓝU. T) U
-| ntaa_conv: ∀L,T,U1,U2,V2. ntaa h L T U1 → L ⊢ U1 ⬌* U2 → ntaa h L U2 V2 →
-             ntaa h L T U2
-.
-
-interpretation "native type assignment (term) alternative"
-   'NativeTypeAlt h L T U = (ntaa h L T U).
-
-(* Advanced inversion lemmas ************************************************)
-
-fact ntaa_inv_bind1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T :: U → ∀J,X,Y. T = ⓑ{J}Y.X →
-                         ∃∃Z1,Z2. ⦃h, L⦄ ⊢ Y :: Z1 & ⦃h, L.ⓑ{J}Y⦄ ⊢ X :: Z2 &
-                                  L ⊢ ⓑ{J}Y.Z2 ⬌* U.
-#h #L #T #U #H elim H -L -T -U
-[ #L #k #J #X #Y #H destruct
-| #L #K #V #W #U #i #_ #_ #_ #_ #J #X #Y #H destruct
-| #L #K #W #V #U #i #_ #_ #_ #_ #J #X #Y #H destruct
-| #I #L #V #W #T #U #HVW #HTU #_ #_ #J #X #Y #H destruct /2 width=3/
-| #L #V #W #T #U #_ #_ #_ #_ #J #X #Y #H destruct
-| #L #V #W #T #U #_ #_ #_ #_ #J #X #Y #H destruct
-| #L #T #U #W #_ #_ #_ #_ #J #X #Y #H destruct
-| #L #T #U1 #U2 #V2 #_ #HU12 #_ #IHTU1 #_ #J #X #Y #H destruct
-  elim (IHTU1 ????) -IHTU1 [5: // |2,3,4: skip ] #Z1 #Z2 #HZ1 #HZ2 #HU1
-  lapply (cpcs_trans … HU1 … HU12) -U1 /2 width=3/
-]
-qed.
-
-lemma ntaa_inv_bind1: ∀h,J,L,Y,X,U. ⦃h, L⦄ ⊢ ⓑ{J}Y.X :: U →
-                      ∃∃Z1,Z2. ⦃h, L⦄ ⊢ Y :: Z1 & ⦃h, L.ⓑ{J}Y⦄ ⊢ X :: Z2 &
-                               L ⊢ ⓑ{J}Y.Z2 ⬌* U.
-/2 width=3/ qed-.                            
-
-lemma ntaa_nta: ∀h,L,T,U. ⦃h, L⦄ ⊢ T :: U → ⦃h, L⦄ ⊢ T : U.
-#h #L #T #U #H elim H -L -T -U
-// /2 width=1/ /2 width=2/ /2 width=3/ /2 width=6/
-qed-.
-
-(* Properties on relocation *************************************************)
-
-lemma ntaa_lift: ∀h,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 :: U1 → ∀L2,d,e. ⇩[d, e] L2 ≡ L1 →
-                 ∀T2. ⇧[d, e] T1 ≡ T2 → ∀U2. ⇧[d, e] U1 ≡ U2 → ⦃h, L2⦄ ⊢ T2 :: U2.
-#h #L1 #T1 #U1 #H elim H -L1 -T1 -U1
-[ #L1 #k #L2 #d #e #HL21 #X1 #H1 #X2 #H2
-  >(lift_inv_sort1 … H1) -X1
-  >(lift_inv_sort1 … H2) -X2 //
-| #L1 #K1 #V1 #W1 #W #i #HLK1 #_ #HW1 #IHVW1 #L2 #d #e #HL21 #X #H #U2 #HWU2
-  elim (lift_inv_lref1 … H) * #Hid #H destruct
-  [ elim (lift_trans_ge … HW1 … HWU2 ?) -W // #W2 #HW12 #HWU2
-    elim (ldrop_trans_le … HL21 … HLK1 ?) -L1 /2 width=2/ #X #HLK2 #H
-    elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K2 #V2 #HK21 #HV12 #H destruct
-    /3 width=8/
-  | lapply (lift_trans_be … HW1 … HWU2 ? ?) -W // /2 width=1/ #HW1U2
-    lapply (ldrop_trans_ge … HL21 … HLK1 ?) -L1 // -Hid /3 width=8/
-  ]
-| #L1 #K1 #W1 #V1 #W #i #HLK1 #_ #HW1 #IHWV1 #L2 #d #e #HL21 #X #H #U2 #HWU2
-  elim (lift_inv_lref1 … H) * #Hid #H destruct
-  [ elim (lift_trans_ge … HW1 … HWU2 ?) -W // <minus_plus #W #HW1 #HWU2
-    elim (ldrop_trans_le … HL21 … HLK1 ?) -L1 /2 width=2/ #X #HLK2 #H
-    elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K2 #W2 #HK21 #HW12 #H destruct
-    lapply (lift_mono … HW1 … HW12) -HW1 #H destruct
-    elim (lift_total V1 (d-i-1) e) /3 width=8/
-  | lapply (lift_trans_be … HW1 … HWU2 ? ?) -W // /2 width=1/ #HW1U2
-    lapply (ldrop_trans_ge … HL21 … HLK1 ?) -L1 // -Hid /3 width=8/
-  ]
-| #I #L1 #V1 #W1 #T1 #U1 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL21 #X1 #H1 #X2 #H2
-  elim (lift_inv_bind1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H destruct
-  elim (lift_inv_bind1 … H2) -H2 #X #U2 #H1 #HU12 #H2 destruct
-  lapply (lift_mono … H1 … HV12) -H1 #H destruct
-  elim (lift_total W1 d e) /4 width=6/
-| #L1 #V1 #W1 #T1 #U1 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL21 #X1 #H1 #X2 #H2
-  elim (lift_inv_flat1 … H1) -H1 #V2 #X #HV12 #H1 #H destruct
-  elim (lift_inv_bind1 … H1) -H1 #W2 #T2 #HW12 #HT12 #H destruct
-  elim (lift_inv_flat1 … H2) -H2 #Y2 #X #HY #H2 #H destruct
-  elim (lift_inv_bind1 … H2) -H2 #X2 #U2 #HX #HU12 #H destruct
-  lapply (lift_mono … HY … HV12) -HY #H destruct
-  lapply (lift_mono … HX … HW12) -HX #H destruct /4 width=6/
-| #L1 #V1 #W1 #T1 #U1 #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL21 #X1 #H1 #X2 #H2
-  elim (lift_inv_flat1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H destruct
-  elim (lift_inv_flat1 … H2) -H2 #X #U2 #H1 #HU12 #H2 destruct
-  lapply (lift_mono … H1 … HV12) -H1 #H destruct
-  elim (lift_total W1 d e) /4 width=6/
-| #L1 #T1 #U1 #W1 #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL21 #X #H #U2 #HU12
-  elim (lift_inv_flat1 … H) -H #X2 #T2 #HUX2 #HT12 #H destruct
-  lapply (lift_mono … HUX2 … HU12) -HUX2 #H destruct
-  elim (lift_total W1 d e) /3 width=6/
-| #L1 #T1 #U11 #U12 #V12 #_ #HU112 #_ #IHTU11 #IHUV12 #L2 #d #e #HL21 #U1 #HTU1 #U2 #HU12
-  elim (lift_total U11 d e) #U #HU11
-  elim (lift_total V12 d e) #V22 #HV122
-  lapply (cpcs_lift … HL21 … HU11 … HU12 HU112) -HU112 /3 width=6/
-]
-qed.
-
-(* Advanced forvard lemmas **************************************************)
-
-lemma ntaa_fwd_correct: ∀h,L,T,U. ⦃h, L⦄ ⊢ T :: U → ∃T0. ⦃h, L⦄ ⊢ U :: T0.
-#h #L #T #U #H elim H -L -T -U
-[ /2 width=2/
-| #L #K #V #W #W0 #i #HLK #_ #HW0 * #V0 #HWV0
-  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
-  elim (lift_total V0 0 (i+1)) /3 width=10/
-| #L #K #W #V #V0 #i #HLK #HWV #HWV0 #_
-  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
-  elim (lift_total V 0 (i+1)) /3 width=10/
-| #I #L #V #W #T #U #HVW #_ #_ * /3 width=2/
-| #L #V #W #T #U #HVW #_ #_ * #X #H
-  elim (ntaa_inv_bind1 … H) -H /4 width=2/
-| #L #V #W #T #U #_ #HUW * #T0 #HUT0 /3 width=2/
-| /2 width=2/
-| /2 width=2/
-]
-qed-.
-
-(* Advanced properties ******************************************************)
-
-lemma nta_ntaa: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ⦃h, L⦄ ⊢ T :: U.
-#h #L #T #U #H elim H -L -T -U
-// /2 width=1/ /2 width=2/ /2 width=3/ /2 width=6/
-#L #T #U #_ #HTU
-elim (ntaa_fwd_correct … HTU) /2 width=2/
-qed.
-
-(* Advanced eliminators *****************************************************)
-
-lemma nta_ind_alt: ∀h. ∀R:lenv→relation term.
-   (∀L,k. R L ⋆k ⋆(next h k)) →
-   (∀L,K,V,W,U,i.
-      ⇩[O, i] L ≡ K.ⓓV → ⦃h, K⦄ ⊢ V : W → ⇧[O, i + 1] W ≡ U →
-      R K V W → R L (#i) U 
-   ) →
-   (∀L,K,W,V,U,i.
-      ⇩[O, i] L ≡ K.ⓛW → ⦃h, K⦄ ⊢ W : V → ⇧[O, i + 1] W ≡ U →
-      R K W V → R L (#i) U
-   ) →
-   (∀I,L,V,W,T,U.
-      ⦃h, L⦄ ⊢ V : W → ⦃h, L.ⓑ{I}V⦄ ⊢ T : U →
-      R L V W → R (L.ⓑ{I}V) T U → R L (ⓑ{I}V.T) (ⓑ{I}V.U)
-   ) →
-   (∀L,V,W,T,U.
-      ⦃h, L⦄ ⊢ V : W → ⦃h, L⦄ ⊢ (ⓛW.T):(ⓛW.U) →
-      R L V W →R L (ⓛW.T) (ⓛW.U) →R L (ⓐV.ⓛW.T) (ⓐV.ⓛW.U)
-   ) →
-   (∀L,V,W,T,U.
-      ⦃h, L⦄ ⊢ T : U → ⦃h, L⦄ ⊢ (ⓐV.U) : W →
-      R L T U → R L (ⓐV.U) W → R L (ⓐV.T) (ⓐV.U)
-   ) →
-   (∀L,T,U,W.
-      ⦃h, L⦄ ⊢ T : U → ⦃h, L⦄ ⊢ U : W →
-      R L T U → R L U W → R L (ⓝU.T) U
-   ) →
-   (∀L,T,U1,U2,V2.
-      ⦃h, L⦄ ⊢ T : U1 → L ⊢ U1 ⬌* U2 → ⦃h, L⦄ ⊢ U2 : V2 →
-      R L T U1 →R L U2 V2 →R L T U2
-   ) →
-   ∀L,T,U. ⦃h, L⦄ ⊢ T : U → R L T U.
-#h #R #H1 #H2 #H3 #H4 #H5 #H6 #H7 #H8 #L #T #U #H elim (nta_ntaa … H) -L -T -U
-// /3 width=1 by ntaa_nta/ /3 width=3 by ntaa_nta/ /3 width=4 by ntaa_nta/
-/3 width=7 by ntaa_nta/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_lift.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_lift.etc
deleted file mode 100644 (file)
index 57e06a1..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/nta_alt.ma".
-
-(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
-
-(* Advanced inversion lemmas ************************************************)
-
-fact nta_inv_sort1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∀k0. T = ⋆k0 →
-                        L ⊢ ⋆(next h k0) ⬌* U.
-#h #L #T #U #H elim H -L -T -U
-[ #L #k #k0 #H destruct //
-| #L #K #V #W #U #i #_ #_ #_ #_ #k0 #H destruct
-| #L #K #W #V #U #i #_ #_ #_ #_ #k0 #H destruct
-| #I #L #V #W #T #U #_ #_ #_ #_ #k0 #H destruct
-| #L #V #W #T #U #_ #_ #_ #_ #k0 #H destruct
-| #L #V #W #T #U #_ #_ #_ #_ #k0 #H destruct
-| #L #T #U #_ #_ #k0 #H destruct
-| #L #T #U1 #U2 #V2 #_ #HU12 #_ #IHTU1 #_ #k0 #H destruct
-  lapply (IHTU1 ??) -IHTU1 [ // | skip ] #Hk0
-  lapply (cpcs_trans … Hk0 … HU12) -U1 //
-]
-qed.
-
-(* Basic_1: was: ty3_gen_sort *)
-lemma nta_inv_sort1: ∀h,L,U,k. ⦃h, L⦄ ⊢ ⋆k : U → L ⊢ ⋆(next h k) ⬌* U.
-/2 width=3/ qed-.
-
-fact nta_inv_lref1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∀j. T = #j →
-                        (∃∃K,V,W,U0. ⇩[0, j] L ≡ K. ⓓV & ⦃h, K⦄ ⊢ V : W &
-                                     ⇧[0, j + 1] W ≡ U0 & L ⊢ U0 ⬌* U
-                        ) ∨
-                        (∃∃K,W,V,U0. ⇩[0, j] L ≡ K. ⓛW & ⦃h, K⦄ ⊢ W : V &
-                                     ⇧[0, j + 1] W ≡ U0 & L ⊢ U0 ⬌* U
-                        ).
-#h #L #T #U #H elim H -L -T -U
-[ #L #k #j #H destruct
-| #L #K #V #W #U #i #HLK #HVW #HWU #_ #j #H destruct /3 width=8/
-| #L #K #W #V #U #i #HLK #HWV #HWU #_ #j #H destruct /3 width=8/
-| #I #L #V #W #T #U #_ #_ #_ #_ #j #H destruct
-| #L #V #W #T #U #_ #_ #_ #_ #j #H destruct
-| #L #V #W #T #U #_ #_ #_ #_ #j #H destruct
-| #L #T #U #_ #_ #j #H destruct
-| #L #T #U1 #U2 #V2 #_ #HU12 #_ #IHTU1 #_ #j #H destruct
-  elim (IHTU1 ??) -IHTU1 [4: // |2: skip ] * #K #V #W #U0 #HLK #HVW #HWU0 #HU01
-  lapply (cpcs_trans … HU01 … HU12) -U1 /3 width=8/
-]
-qed.
-
-(* Basic_1: was ty3_gen_lref *)
-lemma nta_inv_lref1: ∀h,L,U,i. ⦃h, L⦄ ⊢ #i : U →
-                     (∃∃K,V,W,U0. ⇩[0, i] L ≡ K. ⓓV & ⦃h, K⦄ ⊢ V : W &
-                                  ⇧[0, i + 1] W ≡ U0 & L ⊢ U0 ⬌* U
-                     ) ∨
-                     (∃∃K,W,V,U0. ⇩[0, i] L ≡ K. ⓛW & ⦃h, K⦄ ⊢ W : V &
-                                  ⇧[0, i + 1] W ≡ U0 & L ⊢ U0 ⬌* U
-                     ).
-/2 width=3/ qed-.
-
-(* Basic_1: was: ty3_gen_bind *)
-lemma nta_inv_bind1: ∀h,I,L,Y,X,U. ⦃h, L⦄ ⊢ ⓑ{I}Y.X : U →
-                     ∃∃Z1,Z2. ⦃h, L⦄ ⊢ Y : Z1 & ⦃h, L.ⓑ{I}Y⦄ ⊢ X : Z2 &
-                              L ⊢ ⓑ{I}Y.Z2 ⬌* U.
-#h #I #L #Y #X #U #H
-elim (ntaa_inv_bind1 … (nta_ntaa … H)) -H /3 width=3 by ntaa_nta, ex3_2_intro/
-qed-.
-
-fact nta_inv_cast1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∀X,Y. T = ⓝY.X →
-                     ⦃h, L⦄ ⊢ X : Y ∧ L ⊢ Y ⬌* U.
-#h #L #T #U #H elim H -L -T -U
-[ #L #k #X #Y #H destruct
-| #L #K #V #W #U #i #_ #_ #_ #_ #X #Y #H destruct
-| #L #K #W #V #U #i #_ #_ #_ #_ #X #Y #H destruct
-| #I #L #V #W #T #U #_ #_ #_ #_ #X #Y #H destruct
-| #L #V #W #T #U #_ #_ #_ #_ #X #Y #H destruct
-| #L #V #W #T #U #_ #_ #_ #_ #X #Y #H destruct
-| #L #T #U #HTU #_ #X #Y #H destruct /2 width=1/
-| #L #T #U1 #U2 #V2 #_ #HU12 #_ #IHTU1 #_ #X #Y #H destruct
-  elim (IHTU1 ???) -IHTU1 [4: // |2,3: skip ] #HXY #HU1
-  lapply (cpcs_trans … HU1 … HU12) -U1 /2 width=1/
-]
-qed.
-
-(* Basic_1: was: ty3_gen_cast *)
-lemma nta_inv_cast1: ∀h,L,X,Y,U. ⦃h, L⦄ ⊢ ⓝY.X : U →  ⦃h, L⦄ ⊢ X : Y ∧ L ⊢ Y ⬌* U.
-/2 width=3/ qed-.
-
-(* Advanced forvard lemmas **************************************************)
-
-fact nta_fwd_pure1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∀X,Y. T = ⓐY.X →
-                        ∃∃V,W. ⦃h, L⦄ ⊢ Y : W & ⦃h, L⦄ ⊢ X : V & L ⊢ ⓐY.V ⬌* U.
-#h #L #T #U #H elim H -L -T -U
-[ #L #k #X #Y #H destruct
-| #L #K #V #W #U #i #_ #_ #_ #_ #X #Y #H destruct
-| #L #K #W #V #U #i #_ #_ #_ #_ #X #Y #H destruct
-| #I #L #V #W #T #U #_ #_ #_ #_ #X #Y #H destruct
-| #L #V #W #T #U #HVW #HTU #_ #_ #X #Y #H destruct /2 width=3/
-| #L #V #W #T #U #HTU #_ #_ #IHUW #X #Y #H destruct
-  elim (IHUW U Y ?) -IHUW // /2 width=3/
-| #L #T #U #_ #_ #X #Y #H destruct
-| #L #T #U1 #U2 #V2 #_ #HU12 #_ #IHTU1 #_ #X #Y #H destruct
-  elim (IHTU1 ???) -IHTU1 [4: // |2,3: skip ] #V #W #HYW #HXV #HU1
-  lapply (cpcs_trans … HU1 … HU12) -U1 /2 width=3/
-]
-qed.
-
-lemma nta_fwd_pure1: ∀h,L,X,Y,U. ⦃h, L⦄ ⊢ ⓐY.X : U →
-                     ∃∃V,W. ⦃h, L⦄ ⊢ Y : W & ⦃h, L⦄ ⊢ X : V & L ⊢ ⓐY.V ⬌* U.
-/2 width=3/ qed-.
-
-(* Basic_1: was: ty3_correct *)
-lemma nta_fwd_correct: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∃T0. ⦃h, L⦄ ⊢ U : T0.
-#h #L #T #U #H
-elim (ntaa_fwd_correct … (nta_ntaa … H)) -H /3 width=2 by ntaa_nta, ex_intro/
-qed-.
-
-(* Advanced properties ******************************************************)
-
-(* Basic_1: was: ty3_appl *)
-lemma nta_appl_old: ∀h,L,V,W,T,U. ⦃h, L⦄ ⊢ V : W → ⦃h, L⦄ ⊢ T : ⓛW.U →
-                    ⦃h, L⦄ ⊢ ⓐV.T : ⓐV.ⓛW.U.
-#h #L #V #W #T #U #HVW #HTU
-elim (nta_fwd_correct … HTU) #X #H
-elim (nta_inv_bind1 … H) -H /4 width=2/
-qed.
-
-(* Properties on relocation *************************************************)
-
-(* Basic_1: was: ty3_lift *)
-lemma nta_lift: ∀h,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 : U1 → ∀L2,d,e. ⇩[d, e] L2 ≡ L1 →
-                ∀T2. ⇧[d, e] T1 ≡ T2 → ∀U2. ⇧[d, e] U1 ≡ U2 → ⦃h, L2⦄ ⊢ T2 : U2.
-/4 width=9 by ntaa_nta, nta_ntaa, ntaa_lift/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_ltpr.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_ltpr.etc
deleted file mode 100644 (file)
index c461e9f..0000000
+++ /dev/null
@@ -1,235 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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_delift.ma".
-include "basic_2/dynamic/nta.ma".
-(*
-lemma pippo: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∀X,Y. L ⊢ T ➡* ⓛX.Y →
-             ∃Z. L ⊢ U ➡* ⓛX.Z.
-#h #L #T #U #H elim H -L -T -U
-[
-|
-|
-|
-| #L #V #W #T #U #_ #_ #IHVW #IHTU #X #Y #H  
-| #L #V #W #T #U #_ #HUW #IHTU #IHUW #X #Y #HTY
-  elim (cprs_inv_appl_abst … HTY) -HTY #W1 #T1 #W2 #T2 #HT1 #HT12 #HYT2
-  elim (IHTU … HT1) -IHTU -HT1 #U1 #HU1 
-  
-  
-   *
-  [ #V0 #T0 #_ #_ #H destruct
-  | #V0 #W0 #T0 #HV0 #HT0 #HTY
-    elim (IHTU … HT0) -IHTU -HT0 #Z #HUZ
-    elim (cprs_inv_abbr1 … HTY) -HTY *
-    [ #V1 #T1 #_ #_ #H destruct #X0  
-
-*)
-
-(*
-
-include "basic_2/computation/cprs_lcprs.ma".
-
-
-
-
-include "basic_2/dynamic/nta_ltpss.ma".
-include "basic_2/dynamic/nta_thin.ma".
-include "basic_2/dynamic/lsubn_nta.ma".
-
-include "basic_2/hod/ntas_lift.ma".
-
-  
-  elim (nta_inv_pure1 … HUW) -HUW #V0 #U0 #U1 #HV0 #HU0 #HU0W #HU01
-  @(ex2_2_intro … HYW)
-  [2: 
-
-
-axiom pippo_aux: ∀h,L,Z,U. ⦃h, L⦄ ⊢ Z : U → ∀Y,X. Z = ⓐY.X →
-                 ∀W,T. L ⊢ X ➡* ⓛW.T → ⦃h, L⦄ ⊢ Y : W.
-#h #L #Z #U #H elim H -L -Z -U
-[
-|
-|
-|
-|
-| #L #V #W #T #U #HTU #_ #_ #IHUW #Y #X #H #W0 #T0 #HX destruct 
-  lapply (IHUW Y U ? ?) -IHUW -W // #T 
-  @(ex2_2_intro … HYW)
-  [2: 
-
-axiom pippo: ∀h,L,V,X,U. ⦃h, L⦄ ⊢ ⓐV.X : U →
-             ∃∃W,T. L ⊢ X ➡* ⓛW.T & ⦃h, L⦄ ⊢ V : W.
-#h #L #V #X #Y #H 
-
-*)
-(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
-
-(* Properties on context-free parallel reduction for local environments ******)
-(*
-axiom nta_ltpr_cprs_conf: ∀h,L1,T1,U. ⦃h, L1⦄ ⊢ T1 : U → ∀L2. L1 ➡ L2 →
-                          ∀T2. L2 ⊢ T1 ➡* T2 → ⦃h, L2⦄ ⊢ T2 : U.
-#h #L1 #T1 #U #H @(nta_ind_alt … H) -L1 -T1 -U
-[ #L1 #k #L2 #_ #T2 #H
-  >(cprs_inv_sort1 … H) -H //
-|
-|
-|
-|
-| #L1 #V1 #W1 #T1 #U1 #_ #_ #IHTU1 #IHUW1 #L2 #HL12 #T2 #H
-  elim (cprs_inv_appl1 … H) -H *
-  [ #V2 #T0 #HV12 #HT10 #H destruct
-    elim (nta_fwd_correct h L2 (ⓐV1.T1) (ⓐV1.U1) ?) [2: /3 width=2/ ] #U
-    @(nta_conv … (ⓐV2.U1)) (* /2 width=1/*) [ /4 width=2/] (**) (* explicit constructor, /5 width=5/ is too slow *)
-  | #V2 #W2 #T0 #HV12 #HT10 #HT02
-    lapply (IHTU1 … HL12 (ⓛW2.T0) ?) -IHTU1 /2 width=1/ -HT10 #H
-    elim (nta_inv_bind1 … H) -H #W #U0 #HW2 #HTU0 #HU01
-    elim (cpcs_inv_abst1 … HU01) -HU01 #W #U #HU1 #HU0
-    lapply (IHUW1 … HL12 (ⓐV2.ⓛW.U) ?) -IHUW1 -HL12 /2 width=1/ -HV12 #H
-    
-    
-    
-    elim (nta_fwd_pure1 … H) -H #W0 #U2 #HVU2 #H #HW01
-    elim (nta_inv_bind1 … H) -H #W3 #U3 #HW3 #HU3 #H
-    elim (cpcs_inv_abst1 … H) -H #W4 #U4  
-*)      
-(*
-axiom nta_ltpr_tpr_conf: ∀h,L1,T1,U. ⦃h, L1⦄ ⊢ T1 : U → ∀L2. L1 ➡ L2 →
-                         ∀T2. T1 ➡ T2 → ⦃h, L2⦄ ⊢ T2 : U.
-#h #L1 #T1 #U #H @(nta_ind_alt … H) -L1 -T1 -U
-[ #L1 #k #L2 #_ #T2 #H
-  >(tpr_inv_atom1 … H) -H //
-| #L1 #K1 #V1 #W #U #i #HLK1 #_ #HWU #IHV1 #L2 #HL12 #T2 #H
-  >(tpr_inv_atom1 … H) -T2
-  elim (ltpr_ldrop_conf … HLK1 … HL12) -HLK1 -HL12 #X #HLK2 #H
-  elim (ltpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct /3 width=6/
-| #L1 #K1 #W1 #V1 #U1 #i #HLK1 #HWV1 #HWU1 #IHWV1 #L2 #HL12 #T2 #H
-  >(tpr_inv_atom1 … H) -T2
-  elim (ltpr_ldrop_conf … HLK1 … HL12) -HLK1 -HL12 #X #HLK2 #H
-  elim (ltpr_inv_pair1 … H) -H #K2 #W2 #HK12 #HW12 #H destruct
-  lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
-  elim (lift_total V1 0 (i+1)) #W #HW
-  lapply (nta_lift h … HLK … HWU1 … HW) /2 width=1/ -HLK -HW
-  elim (lift_total W2 0 (i+1)) #U2 #HWU2
-  lapply (tpr_lift … HW12 … HWU1 … HWU2) -HWU1 #HU12
-  @(nta_conv … U2) /2 width=1/ /3 width=6/ (**) (* explicit constructor, /3 width=6/ is too slow *)
-| #I #L1 #V1 #W1 #T1 #U1 #_ #_ #IHVW1 #IHTU1 #L2 #HL12 #X #H
-  elim (tpr_inv_bind1 … H) -H *
-  [ #V2 #T0 #T2 #HV12 #HT10 #HT02 #H destruct
-    lapply (IHVW1 … HL12 … HV12) #HV2W1
-    lapply (IHVW1 L2 … V1 ?) // -IHVW1 #HWV1
-    lapply (IHTU1 (L2.ⓑ{I}V2) … HT10) -HT10 /2 width=1/ #HT0U1
-    lapply (IHTU1 (L2.ⓑ{I}V1) ? T1 ?) -IHTU1 // /2 width=1/ -HL12 #H
-    lapply (tps_lsubs_trans … HT02 (L2.ⓑ{I}V2) ?) -HT02 /2 width=1/ #HT02
-    lapply (nta_tps_conf … HT0U1 … HT02) -T0 #HT2U1
-    elim (nta_fwd_correct … H) -H #U2 #HU12
-    @(nta_conv … (ⓑ{I}V2.U1)) /2 width=2/ /3 width=1/ (**) (* explicit constructor, /4 width=6/ is too slow *)
-  | #T #HT1 #HTX #H destruct
-    lapply (IHVW1 … HL12 V1 ?) -IHVW1 // #HVW1
-    elim (lift_total X 0 1) #Y #HXY
-    lapply (tpr_lift … HTX … HT1 … HXY) -T #H
-    lapply (IHTU1 (L2.ⓓV1) … H) -T1 /2 width=1/ -L1 #H
-    elim (nta_fwd_correct … H) #T1 #HUT1
-    elim (nta_thin_conf … H L2 0 (0+1) ? ?) -H /2 width=1/ /3 width=1/ #T #U #HTU #H
-    normalize in ⊢ (??%??? → ?); #HU1
-    lapply (delift_inv_lift1_eq … H L2 … HXY) -Y /2 width=1/ #H destruct
-    @(nta_conv … U) // /2 width=2/
-  ]
-| #L1 #V1 #W1 #T1 #U1 #_ #_ #IHVW1 #IHTU1 #L2 #HL12 #X #H
-  elim (tpr_inv_appl1 … H) -H *
-  [ #V2 #Y #HV12 #HY #H destruct
-    elim (tpr_inv_abst1 … HY) -HY #W2 #T2 #HW12 #HT12 #H destruct
-    lapply (IHTU1 L2 ? (ⓛW1.T1) ?) // #H
-    elim (nta_fwd_correct … H) -H #X #H
-    elim (nta_inv_bind1 … H) -H #W #U #HW #HU #_
-    @(nta_conv … (ⓐV2.ⓛW1.U1)) /4 width=2/ (**) (* explicit constructor, /5 width=5/ is too slow *)
-  | #V2 #W2 #T0 #T2 #HV12 #HT02 #H1 #H2 destruct
-    lapply (IHVW1 … HL12 … HV12) #HVW2
-    lapply (IHVW1 … HL12 V1 ?) -IHVW1 // #HV1W2
-    lapply (IHTU1 … HL12 (ⓛW2.T2) ?) -IHTU1 -HL12 /2 width=1/ -HT02 #H1
-    elim (nta_fwd_correct … H1) #T #H2
-    elim (nta_inv_bind1 … H1) -H1 #W #U2 #HW2 #HTU2 #H
-    elim (cpcs_inv_abst … H Abst W2) -H #_ #HU21
-    elim (nta_inv_bind1 … H2) -H2 #W0 #U0 #_ #H #_ -T -W0
-    lapply (lsubn_nta_trans … HTU2 (L2.ⓓV2) ?) -HTU2 /2 width=1/ #HTU2
-    @(nta_conv … (ⓓV2.U2)) /2 width=2/ /3 width=2/ (**) (* explicit constructor, /4 width=5/ is too slow *)
-  | #V0 #V2 #W0 #W2 #T0 #T2 #_ #_ #_ #_ #H destruct
-  ]
-| #L1 #V1 #W1 #T1 #U1 #_ #_ #IHTU1 #IHUW1 #L2 #HL12 #X #H
-  elim (tpr_inv_appl1 … H) -H *
-  [ #V2 #T2 #HV12 #HT12 #H destruct
-    elim (nta_fwd_correct h L2 (ⓐV1.T1) (ⓐV1.U1) ?) [2: /3 width=2/ ] #U
-    @(nta_conv … (ⓐV2.U1)) /2 width=1/ /4 width=2/ (**) (* explicit constructor, /5 width=5/ is too slow *)
-  | #V2 #W2 #T0 #T2 #HV12 #HT02 #H1 #H2 destruct
-    lapply (IHTU1 … HL12 (ⓛW2.T2) ?) -IHTU1 /2 width=1/ -T0 #H
-    elim (nta_inv_bind1 … H) -H #W #U2 #HW2 #HTU2 #HU21
-    lapply (IHUW1 … HL12 (ⓐV2.U1) ?) -IHUW1 -HL12 /2 width=1/ #H
-    elim (nta_inv_pure1 … H) -H #V0 #U0 #U #HV20 #HU10 #HU0W1 #HU0
-    @(nta_conv … (ⓓV2.U2))
-    [2: @nta_bind //
-        @(lsubn_nta_trans … HTU2) @lsubn_abbr //
-(*
-    lapply (IH … HV1 … HL12 … HV12) -HV1 -HV12 /width=5/ #HB
-    lapply (IH … HB0  … HL12 W2 ?) -HB0 /width=5/ #HB0
-    lapply (IH … HA0 … (L2.ⓛW2) … HT02) -IH -HA0 -HT02 /width=5/ -T0 /2 width=1/ -L1 -V1 /4 width=7/
-*)
-*)
-(*
-axiom pippo: ⦃h, L⦄ ⊢ ⓐV.X : Y →
-             ∃∃W,T. L ⊢ X ➡* ⓛW.T & ⦃h, L⦄ ⊢ ⓐV : W.
-
-*)
-(* SEGMENT 2
-| #L1 #T1 #U1 #W1 #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL12 #X #H
-  elim (tpss_inv_flat1 … H) -H #U2 #T2 #HU12 #HT12 #H destruct
-  lapply (cpr_tpss … HU12) /4 width=4/
-| #L1 #T1 #U11 #U12 #U #_ #HU112 #_ #IHTU11 #IHU12 #L2 #d #e #HL12 #T2 #HT12
-  @(nta_conv … U11) /2 width=5/ (**) (* explicot constructor, /3 width=7/ is too slow *)
-]
-qed.
-*)
-
-(* SEGMENT 3
-fact nta_ltpr_tpr_conf_aux: ∀h,L,T,L1,T1,U. ⦃h, L1⦄ ⊢ T1 : U → L = L1 → T = T1 →
-                            ∀L2. L1 ➡ L2 → ∀T2. T1 ➡ T2 → ⦃h, L2⦄ ⊢ T2 : U.
-  
-  
-  | #V0 #V2 #W0 #W2 #T0 #T2 #HV10 #HW02 #HT02 #HV02 #H1 #H2 destruct
-    elim (nta_inv_abbr … HT1) -HT1 #B0 #HW0 #HT0
-    lapply (IH … HW0  … HL12 … HW02) -HW0 /width=5/ #HW2
-    lapply (IH … HV1 … HL12 … HV10) -HV1 -HV10 /width=5/ #HV0
-    lapply (IH … HT0 … (L2.ⓓW2) … HT02) -IH -HT0 -HT02 /width=5/ -V1 -T0 /2 width=1/ -L1 -W0 #HT2
-    @(nta_abbr … HW2) -HW2
-    @(nta_appl … HT2) -HT2 /3 width=7/ (**) (* explict constructors, /5 width=7/ is too slow *)
-  ]
-| #L1 #V1 #T1 #A #HV1 #HT1 #H1 #H2 #L2 #HL12 #X #H destruct
-  elim (tpr_inv_cast1 … H) -H
-  [ * #V2 #T2 #HV12 #HT12 #H destruct
-    lapply (IH … HV1 … HL12 … HV12) -HV1 -HV12 /width=5/ #HV2
-    lapply (IH … HT1 … HL12 … HT12) -IH -HT1 -HL12 -HT12 /width=5/ -L1 -V1 -T1 /2 width=1/
-  | -HV1 #HT1X
-     lapply (IH … HT1 … HL12 … HT1X) -IH -HT1 -HL12 -HT1X /width=5/
-  ]
-]
-qed.
-
-/2 width=9/ qed.
-
-axiom nta_ltpr_conf: ∀L1,T,A. L1 ⊢ T : A → ∀L2. L1 ➡ L2 → L2 ⊢ T : A.
-/2 width=5/ qed.
-
-axiom nta_tpr_conf: ∀L,T1,A. L ⊢ T1 : A → ∀T2. T1 ➡ T2 → L ⊢ T2 : A.
-/2 width=5/ qed.
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_ltpss.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_ltpss.etc
deleted file mode 100644 (file)
index 828fd82..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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_ltpss.ma".
-include "basic_2/dynamic/nta_nta.ma".
-
-(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
-
-(* Properties about parallel unfold *****************************************)
-
-lemma nta_ltpss_tpss_conf: ∀h,L1,T1,U. ⦃h, L1⦄ ⊢ T1 : U →
-                           ∀L2,d,e. L1 ▶* [d, e] L2 →
-                           ∀T2. L2 ⊢ T1 ▶* [d, e] T2 → ⦃h, L2⦄ ⊢ T2 : U.
-#h #L1 #T1 #U #H @(nta_ind_alt … H) -L1 -T1 -U
-[ #L1 #k #L2 #d #e #_ #T2 #H
-  >(tpss_inv_sort1 … H) -H //
-| #L1 #K1 #V1 #W #U #i #HLK1 #_ #HWU #IHV1 #L2 #d #e #HL12 #T2 #H
-  elim (tpss_inv_lref1 … H) -H
-  [ #H destruct
-    elim (lt_or_ge i d) #Hdi
-    [ elim (ltpss_ldrop_conf_le … HL12 … HLK1 ?) -L1 /2 width=2/ #X #H #HLK2
-      elim (ltpss_inv_tpss11 … H ?) -H /2 width=1/ -Hdi #K2 #V2 #HK12 #HV12 #H destruct
-      /3 width=7/
-    | elim (lt_or_ge i (d + e)) #Hide [ | -Hdi ]
-      [ elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HLK2
-        elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K2 #V2 #HK12 #HV12 #H destruct
-        /3 width=7/
-      | lapply (ltpss_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /3 width=7/
-      ]
-    ]
-  | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #HVW2 #HWT2
-    elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HL2K0
-    elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K0 #V0 #HK12 #HV12 #H destruct
-    lapply (ldrop_mono … HL2K0 … HLK2) -HL2K0 #H destruct
-    lapply (ldrop_fwd_ldrop2 … HLK2) -HLK2 #HLK2
-    lapply (tpss_trans_eq … HV12 HVW2) -V2 /3 width=9/
-  ]
-| #L1 #K1 #W1 #V1 #U1 #i #HLK1 #HWV1 #HWU1 #IHWV1 #L2 #d #e #HL12 #T2 #H
-  elim (tpss_inv_lref1 … H) -H [ | -HWV1 -HWU1 -IHWV1 ]
-  [ #H destruct
-    elim (lift_total V1 0 (i+1)) #W #HW
-    elim (lt_or_ge i d) #Hdi [ -HWV1 ]
-    [ elim (ltpss_ldrop_conf_le … HL12 … HLK1 ?) -L1 /2 width=2/ #X #H #HLK2
-      elim (ltpss_inv_tpss11 … H ?) -H /2 width=1/ -Hdi #K2 #W2 #HK12 #HW12 #H destruct
-      lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
-      lapply (nta_lift h … HLK … HWU1 … HW) /2 width=4/ -HW
-      elim (lift_total W2 0 (i+1)) #U2 #HWU2
-      lapply (tpss_lift_ge … HW12 … HLK … HWU1 … HWU2) -HLK -HWU1 // #HU12
-      lapply (cpr_tpss … HU12) -HU12 #HU12
-      @(nta_conv … U2) /2 width=1/ /3 width=6/ (**) (* explicit constructor, /4 width=6/ is too slow *)
-    | elim (lt_or_ge i (d + e)) #Hide [ -HWV1 | -IHWV1 -HW -Hdi ]
-      [ elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HLK2
-        elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K2 #W2 #HK12 #HW12 #H destruct
-        lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
-        lapply (nta_lift h … HLK … HWU1 … HW) /2 width=4/ -HW
-        elim (lift_total W2 0 (i+1)) #U2 #HWU2
-        lapply (tpss_lift_ge … HW12 … HLK … HWU1 … HWU2) -HLK -HWU1 // #HU12
-        lapply (cpr_tpss … HU12) -HU12 #HU12
-        @(nta_conv … U2) /2 width=1/ /3 width=6/ (**) (* explicit constructor, /4 width=6/ is too slow *)
-      | lapply (ltpss_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /2 width=6/
-      ]
-    ]
-  | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #_ #_
-    elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HL2K0
-    elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K0 #V0 #_ #_ #H destruct
-    lapply (ldrop_mono … HL2K0 … HLK2) -HL2K0 -HLK2 #H destruct
-  ]
-| #I #L1 #V1 #W1 #T1 #U1 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL12 #X #H
-  elim (tpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
-  lapply (cpr_tpss … HV12) #HV
-  lapply (IHTU1 (L2.ⓑ{I}V1) (d+1) e ? T1 ?) // /2 width=1/ #H
-  elim (nta_fwd_correct … H) -H #U2 #HU12
-  @(nta_conv … (ⓑ{I}V2.U1)) /3 width=2/ /3 width=4/ /4 width=4/ (**) (* explicit constructor, /5 width=6/ is too slow *)
-| #L1 #V1 #W1 #T1 #U1 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL12 #X #H
-  elim (tpss_inv_flat1 … H) -H #V2 #Y #HV12 #HY #H destruct
-  elim (tpss_inv_bind1 … HY) -HY #W2 #T2 #HW12 #HT12 #H destruct
-  lapply (cpr_tpss … HV12) #HV
-  lapply (IHTU1 L2 d e ? (ⓛW1.T1) ?) // #H
-  elim (nta_fwd_correct … H) -H #X #H
-  elim (nta_inv_bind1 … H) -H #W #U #HW #HU #_
-  @(nta_conv … (ⓐV2.ⓛW1.U1)) /3 width=2/ /3 width=4/ /4 width=5/ (**) (* explicit constructor, /5 width=5/ is too slow *)
-| #L1 #V1 #W1 #T1 #U1 #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL12 #X #H
-  elim (tpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
-  lapply (cpr_tpss … HV12) #HV
-  elim (nta_fwd_correct h L2 (ⓐV1.T1) (ⓐV1.U1) ?) [2: /3 width=4/ ] #U #HU
-  @(nta_conv … (ⓐV2.U1)) // /3 width=1/ /4 width=5/ (**) (* explicit constructor, /5 width=5/ is too slow *)
-| #L1 #T1 #U1 #W1 #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL12 #X #H
-  elim (tpss_inv_flat1 … H) -H #U2 #T2 #HU12 #HT12 #H destruct
-  lapply (cpr_tpss … HU12) /4 width=4/
-| #L1 #T1 #U11 #U12 #U #_ #HU112 #_ #IHTU11 #IHU12 #L2 #d #e #HL12 #T2 #HT12
-  @(nta_conv … U11) /2 width=5/ (**) (* explicot constructor, /3 width=7/ is too slow *)
-]
-qed.
-
-lemma nta_ltpss_tps_conf: ∀h,L1,T1,U. ⦃h, L1⦄ ⊢ T1 : U →
-                          ∀L2,d,e. L1 ▶* [d, e] L2 →
-                          ∀T2. L2 ⊢ T1 ▶ [d, e] T2 → ⦃h, L2⦄ ⊢ T2 : U.
-/3 width=7/ qed.
-
-lemma nta_ltpss_conf: ∀h,L1,T,U. ⦃h, L1⦄ ⊢ T : U →
-                      ∀L2,d,e. L1 ▶* [d, e] L2 → ⦃h, L2⦄ ⊢ T : U.
-/2 width=7/ qed.
-
-lemma nta_tpss_conf: ∀h,L,T1,U. ⦃h, L⦄ ⊢ T1 : U →
-                     ∀T2,d,e. L ⊢ T1 ▶* [d, e] T2 → ⦃h, L⦄ ⊢ T2 : U.
-/2 width=7/ qed.
-
-lemma nta_tps_conf: ∀h,L,T1,U. ⦃h, L⦄ ⊢ T1 : U →
-                    ∀T2,d,e. L ⊢ T1 ▶ [d, e] T2 → ⦃h, L⦄ ⊢ T2 : U.
-/2 width=7/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_nta.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_nta.etc
deleted file mode 100644 (file)
index 05eb6c5..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/dynamic/nta_lift.ma".
-
-(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
-
-(* Main properties **********************************************************)
-
-(* Basic_1: was: ty3_unique *)
-theorem nta_mono: ∀h,L,T,U1. ⦃h, L⦄ ⊢ T : U1 → ∀U2. ⦃h, L⦄ ⊢ T : U2 →
-                  L ⊢ U1 ⬌* U2.
-#h #L #T #U1 #H elim H -L -T -U1
-[ #L #k #X #H
-  lapply (nta_inv_sort1 … H) -H //
-| #L #K #V #W11 #W12 #i #HLK #_ #HW112 #IHVW11 #X #H
-  elim (nta_inv_lref1 … H) -H * #K0 #V0 #W21 #W22 #HLK0 #HVW21 #HW212 #HX
-  lapply (ldrop_mono … HLK0 … HLK) -HLK0 #H destruct
-  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
-  @(cpcs_trans … HX) -X /3 width=9 by cpcs_lift/ (**) (* to slow without trace *)
-| #L #K #W #V1 #V #i #HLK #_ #HWV #_ #X #H
-  elim (nta_inv_lref1 … H) -H * #K0 #W0 #V2 #V0 #HLK0 #_ #HWV0 #HX
-  lapply (ldrop_mono … HLK0 … HLK) -HLK0 -HLK #H destruct
-  lapply (lift_mono … HWV0 … HWV) -HWV0 -HWV #H destruct //
-| #I #L #V #W1 #T #U1 #_ #_ #_ #IHTU1 #X #H
-  elim (nta_inv_bind1 … H) -H #W2 #U2 #_ #HTU2 #H
-  @(cpcs_trans … H) -X /3 width=1/
-| #L #V #W1 #T #U1 #_ #_ #_ #IHTU1 #X #H
-  elim (nta_fwd_pure1 … H) -H #U2 #W2 #_ #HTU2 #H
-  @(cpcs_trans … H) -X /3 width=1/
-| #L #V #W1 #T #U1 #_ #_ #IHTU1 #_ #X #H
-  elim (nta_fwd_pure1 … H) -H #U2 #W2 #_ #HTU2 #H
-  @(cpcs_trans … H) -X /3 width=1/
-| #L #T #U1 #_ #_ #X #H
-  elim (nta_inv_cast1 … H) -H //
-| #L #T #U11 #U12 #V12 #_ #HU112 #_ #IHTU11 #_ #U2 #HTU2
-  @(cpcs_canc_sn … HU112) -U12 /2 width=1/
-]
-qed-.
-
-(* Advanced properties ******************************************************)
-
-lemma nta_cast_alt: ∀h,L,T,W,U. ⦃h, L⦄ ⊢ T : W → ⦃h, L⦄ ⊢ T : U →
-             ⦃h, L⦄ ⊢ ⓝW.T : U.
-#h #L #T #W #U #HTW #HTU
-lapply (nta_mono … HTW … HTU) #HWU
-elim (nta_fwd_correct … HTU) -HTU /3 width=3/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_sta.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_sta.etc
deleted file mode 100644 (file)
index 6268b98..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/static/sta.ma".
-include "basic_2/equivalence/cpcs_cpcs.ma".
-include "basic_2/dynamic/nta.ma".
-
-(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
-
-(* Properties on static type assignment *************************************)
-
-lemma nta_fwd_sta: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U →
-                   ∃∃U0. ⦃h, L⦄ ⊢ T • U0 & L ⊢ U0 ⬌* U.
-#h #L #T #U #H elim H -L -T -U
-[ /2 width=3/
-| #L #K #V #W1 #V1 #i #HLK #_ #HWV1 * #W0 #HVW0 #HW01
-  elim (lift_total W0 0 (i+1)) #V0 #HWV0
-  lapply (ldrop_fwd_ldrop2 … HLK) #HLK0
-  lapply (cpcs_lift … HLK0 … HWV0 … HWV1 HW01) -HLK0 -HWV1 -HW01 /3 width=6/
-| #L #K #W #V1 #W1 #i #HLK #HWV1 #HW1 * /3 width=6/
-| #I #L #V #W #T #U #_ #_ * #W0 #_ #_ * /3 width=3/
-| #L #V #W #T #U #_ #_ * #W0 #_ #HW0 * #X #H #HX
-  elim (sta_inv_bind1 … H) -H #U0 #HTU0 #H destruct
-  @(ex2_1_intro … (ⓐV.ⓛW.U0)) /2 width=1/ /3 width=1/
-| #L #V #W #T #U #_ #_ * #U0 #HTU0 #HU0 #_ -W
-  @(ex2_1_intro … (ⓐV.U0)) /2 width=1/
-| #L #T #U #HTU * #U0 #HTU0 #HU0 /3 width=3/
-| #L #T #U1 #U2 #V2 #_ #HU12 #_ * #U0 #HTU0 #HU01 #_
-  lapply (cpcs_trans … HU01 … HU12) -U1 /2 width=3/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_thin.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/nta/nta_thin.etc
deleted file mode 100644 (file)
index f927f84..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/thin_ldrop.ma".
-include "basic_2/equivalence/cpcs_delift.ma".
-include "basic_2/dynamic/nta_lift.ma".
-
-(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
-
-(* Properties on basic local environment thinning ***************************)
-
-(* Note: this is known as the substitution lemma *)
-(* Basic_1: was only: ty3_gen_cabbr *)
-lemma nta_thin_conf: ∀h,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 : U1 →
-                     ∀L2,d,e. ≽ [d, e] L1 → L1 ▼*[d, e] ≡ L2 →
-                     ∃∃T2,U2. ⦃h, L2⦄ ⊢ T2 : U2 &
-                              L1 ⊢ T1 ▼*[d, e] ≡ T2 & L1 ⊢ U1 ▼*[d, e] ≡ U2.
-#h #L1 #T1 #U1 #H elim H -L1 -T1 -U1
-[ /2 width=5/
-| #L1 #K1 #V1 #W1 #U1 #i #HLK1 #HVW1 #HWU1 #IHVW1 #L2 #d #e #HL1 #HL12
-  elim (lt_or_ge i d) #Hdi [ -HVW1 ]
-  [ lapply (sfr_ldrop_trans_ge … HLK1 … HL1 ?) -HL1 /2 width=2/ #H
-    lapply (sfr_inv_skip … H ?) -H /2 width=1/ #HK1
-    elim (thin_ldrop_conf_le … HL12 … HLK1 ?) -HL12 /2 width=2/ #X #H #HLK2
-    elim (thin_inv_delift1 … H ?) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
-    elim (IHVW1 … HK1 HK12) -IHVW1 -HK1 -HK12 #X2 #W2 #HVW2 #H #HW12
-    lapply (delift_mono … H … HV12) -H -HV12 #H destruct
-    elim (lift_total W2 0 (i+1)) #U2 #HWU2
-    lapply (ldrop_fwd_ldrop2 … HLK1) -V1 #HLK1
-    lapply (delift_lift_ge … HW12 … HLK1 HWU1 … HWU2) -HW12 -HLK1 -HWU1 //
-    >minus_plus <plus_minus_m_m // /3 width=6/
-  | elim (lt_or_ge i (d+e)) #Hide [ -HVW1 | -Hdi -IHVW1 -HL1 ]
-    [ lapply (sfr_ldrop_trans_be_up … HLK1 … HL1 ? ?) -HL1 // /2 width=2/ <minus_n_O #H
-      elim (sfr_inv_bind … H ?) -H /2 width=1/ #HK1 #_
-      elim (thin_ldrop_conf_be … HL12 … HLK1 ? ?) -HL12 /2 width=2/ #K2 #H #HLK2
-      lapply (thin_inv_thin1 … H ?) -H /2 width=1/ #HK12
-      elim (IHVW1 … HK1 HK12) -IHVW1 -HK1 -HK12 #V2 #W2 #HVW2 #HV12 #HW12
-      elim (lift_total V2 0 d) #T2 #HVT2
-      elim (lift_total W2 0 d) #U2 #HWU2
-      elim (lift_total W2 0 (i+1)) #U #HW2U
-      lapply (nta_lift … HVW2 … HLK2 … HVT2 … HWU2) -HVW2 -HLK2 #HTU2
-      lapply (ldrop_fwd_ldrop2 … HLK1) #HLK0
-      lapply (delift_lift_ge … HW12 … HLK0 HWU1 … HW2U) -HW12 -HLK0 -HWU1 // >minus_plus #HU1
-      lapply (lift_conf_be … HWU2 … HW2U ?) -W2 /2 width=1/ #HU2
-      lapply (delift_lift_div_be … HU1 … HU2 ? ?) -U // /2 width=1/ /3 width=8/
-    | lapply (transitive_le … (i+1) Hide ?) /2 width=1/ #Hdei
-      lapply (thin_ldrop_conf_ge … HL12 … HLK1 ?) -HL12 -HLK1 // #HL2K1
-      elim (lift_split … HWU1 d (i+1-e) ? ? ?) -HWU1 // /2 width=1/ #W
-      <plus_minus in ⊢ (??%??→?); /2 width=2/ #HW1
-      <minus_minus // /2 width=2/ -Hdei >commutative_plus <minus_n_n /3 width=6/
-    ]
-  ]
-| #L1 #K1 #W1 #V1 #U1 #i #HLK1 #HWV1 #HWU1 #IHWV1 #L2 #d #e #HL1 #HL12
-  elim (lt_or_ge i d) #Hdi [ -HWV1 | -IHWV1 ]
-  [ lapply (sfr_ldrop_trans_ge … HLK1 … HL1 ?) -HL1 /2 width=2/ #H
-    lapply (sfr_inv_skip … H ?) -H /2 width=1/ #HK1
-    elim (thin_ldrop_conf_le … HL12 … HLK1 ?) -HL12 /2 width=2/ #X #H #HLK2
-    elim (thin_inv_delift1 … H ?) -H /2 width=1/ #K2 #W2 #HK12 #HW12 #H destruct
-    elim (IHWV1 … HK1 HK12) -IHWV1 -HK1 -HK12 #X2 #V2 #HWV2 #H #_
-    lapply (delift_mono … H … HW12) -H #H destruct
-    elim (lift_total W2 0 (i+1)) #U2 #HWU2
-    lapply (ldrop_fwd_ldrop2 … HLK1) -HLK1 #HLK1
-    lapply (delift_lift_ge … HW12 … HLK1 HWU1 … HWU2) -HW12 -HLK1 -HWU1 //
-    >minus_plus <plus_minus_m_m // /3 width=6/
-  | elim (lt_or_ge i (d+e)) #Hide [ -HWV1 -HWU1 -HL12 | -Hdi -HL1 ]
-    [ lapply (sfr_inv_ldrop … HLK1 … HL1 ? ?) -HLK1 -HL1 // -Hdi -Hide #H destruct 
-    | lapply (transitive_le … (i+1) Hide ?) /2 width=1/ #Hdei
-      lapply (thin_ldrop_conf_ge … HL12 … HLK1 ?) -HL12 -HLK1 // #HL2K1
-      elim (lift_split … HWU1 d (i+1-e) ? ? ?) -HWU1 // /2 width=1/ #W
-      <plus_minus in ⊢ (??%??→?); /2 width=2/ #HW1
-      <minus_minus // /2 width=2/ -Hdei >commutative_plus <minus_n_n /3 width=6/
-    ]
-  ]
-| #I #L1 #V1 #W1 #T1 #U1 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL1 #HL12
-  elim (IHVW1 … HL1 HL12) -IHVW1 #V2 #W2 #HVW2 #HV12 #_
-  elim (IHTU1 (L2.ⓑ{I}V2) (d+1) e ? ?) -IHTU1 /2 width=1/ -HL1 -HL12 #T2 #U2 #HTU2 #HT12 #HU12
-  lapply (delift_lsubs_trans … HT12 (L1.ⓑ{I}V2) ?) -HT12 /2 width=1/
-  lapply (delift_lsubs_trans … HU12 (L1.ⓑ{I}V2) ?) -HU12 /2 width=1/ /3 width=7/
-| #L1 #V1 #W1 #T1 #U1 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL1 #HL12
-  elim (IHVW1 … HL1 HL12) -IHVW1 #V2 #W2 #HVW2 #HV12 #HW12
-  elim (IHTU1 … HL1 HL12) -IHTU1 -HL1 -HL12 #X2 #Y2 #HXY2 #HX2 #HY2
-  elim (delift_inv_bind1 … HX2) -HX2 #Z21 #T2 #HZ21 #HT12 #H destruct
-  elim (delift_inv_bind1 … HY2) -HY2 #Z22 #U2 #HZ22 #HU12 #H destruct
-  lapply (delift_mono … HZ21 … HW12) -HZ21 #H destruct
-  lapply (delift_mono … HZ22 … HW12) -HZ22 #H destruct
-  @(ex3_2_intro … (ⓐV2.ⓛW2.T2) (ⓐV2.ⓛW2.U2)) /3 width=1/ (**) (* explict constructor, /4 depth=?/ is too slow *)
-| #L1 #V1 #W1 #T1 #U1 #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL1 #HL12
-  elim (IHTU1 … HL1 HL12) -IHTU1 #T2 #U2 #HTU2 #HT12 #HU12
-  elim (IHUW1 … HL1 HL12) -IHUW1 -HL1 -HL12 #X2 #W2 #HXW2 #H #HW12
-  elim (delift_inv_flat1 … H) -H #V2 #Y2 #HV12 #HY2 #H destruct
-  lapply (delift_mono … HY2 … HU12) -HY2 #H destruct /3 width=7/
-| #L1 #T1 #U1 #_ #IHTU1 #L2 #d #e #HL1 #HL12
-  elim (IHTU1 … HL1 HL12) -IHTU1 -HL1 -HL12 /3 width=5/
-| #L1 #T1 #U11 #U12 #V1 #_ #HU112 #_ #IHT1 #IHU12 #L2 #d #e #HL1 #HL12
-  elim (IHT1 … HL1 HL12) -IHT1 #T2 #U21 #HT2 #HT12 #HU121
-  elim (IHU12 … HL1 HL12) -IHU12 -HL1 #U22 #V2 #HU22 #HU122 #_
-  lapply (thin_cpcs_delift_mono … HU112 … HL12 … HU121 … HU122) -HU112 -HL12 -HU121 /3 width=5/
-]
-qed.
-
-lemma nta_ldrop_conf: ∀h,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 : U1 →
-                      ∀L2,d,e. ≽ [d, e] L1 → ⇩[d, e] L1 ≡ L2 →
-                      ∃∃T2,U2. ⦃h, L2⦄ ⊢ T2 : U2 &
-                               L1 ⊢ T1 ▼*[d, e] ≡ T2 & L1 ⊢ U1 ▼*[d, e] ≡ U2.
-/3 width=1/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/snta/lsubsn.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/snta/lsubsn.etc
deleted file mode 100644 (file)
index f6b5450..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The 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 L2 )"
-   non associative with precedence 45
-   for @{ 'StratifiedCrSubEqN $h $L1 $L2 }.
-
-include "basic_2/dynamic/snta.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE TYPE ASSIGNMENT *******)
-
-(* Note: may not be transitive *)
-inductive lsubsn (h:sh): relation lenv ≝
-| lsubsn_atom: lsubsn h (⋆) (⋆)
-| lsubsn_pair: ∀I,L1,L2,W. lsubsn h L1 L2 →
-               lsubsn h (L1. ⓑ{I} W) (L2. ⓑ{I} W)
-| lsubsn_abbr: ∀L1,L2,V,W,l. ⦃h, L1⦄ ⊢ V :[l+1] W → ⦃h, L2⦄ ⊢ V :[l+1] W →
-               lsubsn h L1 L2 → lsubsn h (L1. ⓓV) (L2. ⓛW)
-.
-
-interpretation
-  "local environment refinement (stratified native type assigment)"
-  'StratifiedCrSubEqN h L1 L2 = (lsubsn h L1 L2).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact lsubsn_inv_atom1_aux: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 → L1 = ⋆ → L2 = ⋆.
-#h #L1 #L2 * -L1 -L2
-[ //
-| #I #L1 #L2 #V #_ #H destruct
-| #L1 #L2 #V #W #l #_ #_ #_ #H destruct
-]
-qed.
-
-lemma lsubsn_inv_atom1: ∀h,L2. h ⊢ ⋆ :⊑[] L2 → L2 = ⋆.
-/2 width=5/ qed-.
-
-fact lsubsn_inv_pair1_aux: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 →
-                           ∀I,K1,V. L1 = K1. ⓑ{I} V →
-                           (∃∃K2. h ⊢ K1 :⊑[] K2 & L2 = K2. ⓑ{I} V) ∨
-                           ∃∃K2,W,l. ⦃h, K1⦄ ⊢ V :[l+1] W & ⦃h, K2⦄ ⊢ V :[l+1] W &
-                                     h ⊢ K1 :⊑[] K2 & L2 = K2. ⓛW & I = Abbr.
-#h #L1 #L2 * -L1 -L2
-[ #I #K1 #V #H destruct
-| #J #L1 #L2 #V #HL12 #I #K1 #W #H destruct /3 width=3/
-| #L1 #L2 #V #W #l #H1VW #H2VW #HL12 #I #K1 #V1 #H destruct /3 width=7/
-]
-qed.
-
-lemma lsubsn_inv_pair1: ∀h,I,K1,L2,V. h ⊢ K1. ⓑ{I} V :⊑[] L2 →
-                        (∃∃K2. h ⊢ K1 :⊑[] K2 & L2 = K2. ⓑ{I} V) ∨
-                        ∃∃K2,W,l. ⦃h, K1⦄ ⊢ V :[l+1] W & ⦃h, K2⦄ ⊢ V :[l+1] W &
-                                  h ⊢ K1 :⊑[] K2 & L2 = K2. ⓛW & I = Abbr.
-/2 width=3/ qed-.
-
-fact lsubsn_inv_atom2_aux: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 → L2 = ⋆ → L1 = ⋆.
-#h #L1 #L2 * -L1 -L2
-[ //
-| #I #L1 #L2 #V #_ #H destruct
-| #L1 #L2 #V #W #l #_ #_ #_ #H destruct
-]
-qed.
-
-lemma lsubsn_inv_atom2: ∀h,L1. h ⊢ L1 :⊑[] ⋆ → L1 = ⋆.
-/2 width=5/ qed-.
-
-fact lsubsn_inv_pair2_aux: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 →
-                           ∀I,K2,W. L2 = K2. ⓑ{I} W →
-                           (∃∃K1. h ⊢ K1 :⊑[] K2 & L1 = K1. ⓑ{I} W) ∨
-                           ∃∃K1,V,l. ⦃h, K1⦄ ⊢ V :[l+1] W & ⦃h, K2⦄ ⊢ V :[l+1] W &
-                                     h ⊢ K1 :⊑[] K2 & L1 = K1. ⓓV & I = Abst.
-#h #L1 #L2 * -L1 -L2
-[ #I #K2 #W #H destruct
-| #J #L1 #L2 #V #HL12 #I #K2 #W #H destruct /3 width=3/
-| #L1 #L2 #V #W #l #H1VW #H2VW #HL12 #I #K2 #W2 #H destruct /3 width=7/
-]
-qed.
-
-lemma lsubsn_inv_pair2: ∀h,I,L1,K2,W. h ⊢ L1 :⊑[] K2. ⓑ{I} W →
-                        (∃∃K1. h ⊢ K1 :⊑[] K2 & L1 = K1. ⓑ{I} W) ∨
-                        ∃∃K1,V,l. ⦃h, K1⦄ ⊢ V :[l+1] W & ⦃h, K2⦄ ⊢ V :[l+1] W &
-                                  h ⊢ K1 :⊑[] K2 & L1 = K1. ⓓV & I = Abst.
-/2 width=3/ qed-.
-
-(* Basic_forward lemmas *****************************************************)
-
-lemma lsubsn_fwd_lsubs1: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 → L1 ≼[0, |L1|] L2.
-#h #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
-qed-.
-
-lemma lsubsn_fwd_lsubs2: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 → L1 ≼[0, |L2|] L2.
-#h #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma lsubsn_refl: ∀h,L. h ⊢ L :⊑[] L.
-#h #L elim L -L // /2 width=1/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/snta/lsubsn_cpcs.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/snta/lsubsn_cpcs.etc
deleted file mode 100644 (file)
index 38f7e17..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/equivalence/cpcs_cpcs.ma".
-include "basic_2/dynamic/lsubsn.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE TYPE ASSIGNMENT *******)
-
-(* Properties on context-sensitive parallel equivalence for terms ***********)
-
-lemma cpr_lsubsn_trans: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 →
-                        ∀T1,T2. L2 ⊢ T1 ➡ T2 → L1 ⊢ T1 ➡ T2.
-/3 width=5 by lsubsn_fwd_lsubs2, cpr_lsubs_trans/ qed-.
-
-lemma cprs_lsubsn_trans: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 →
-                         ∀T1,T2. L2 ⊢ T1 ➡* T2 → L1 ⊢ T1 ➡* T2.
-/3 width=5 by lsubsn_fwd_lsubs2, cprs_lsubs_trans/ qed-.
-
-lemma cpcs_lsubsn_trans: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 →
-                         ∀T1,T2. L2 ⊢ T1 ⬌* T2 → L1 ⊢ T1 ⬌* T2.
-/3 width=5 by lsubsn_fwd_lsubs2, cpcs_lsubs_trans/ qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/snta/lsubsn_ldrop.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/snta/lsubsn_ldrop.etc
deleted file mode 100644 (file)
index 0928837..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/dynamic/lsubsn.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE TYPE ASSIGNMENT *******)
-
-(* Properties concerning basic local environment slicing ********************)
-
-(* Note: the constant 0 cannot be generalized *)
-lemma lsubsn_ldrop_O1_conf: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 →
-                            ∀K1,e. ⇩[0, e] L1 ≡ K1 →
-                            ∃∃K2. h ⊢ K1 :⊑[] K2 & ⇩[0, e] L2 ≡ K2.
-#h #L1 #L2 #H elim H -L1 -L2
-[ /2 width=3/
-| #I #L1 #L2 #V #_ #IHL12 #K1 #e #H
-  elim (ldrop_inv_O1 … H) -H * #He #HLK1
-  [ destruct
-    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
-  | elim (IHL12 … HLK1) -L1 /3 width=3/
-  ]
-| #L1 #L2 #V #W #l #H1VW #H2VW #_ #IHL12 #K1 #e #H
-  elim (ldrop_inv_O1 … H) -H * #He #HLK1
-  [ destruct
-    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
-  | elim (IHL12 … HLK1) -L1 /3 width=3/
-  ]
-]
-qed.
-
-(* Note: the constant 0 cannot be generalized *)
-lemma lsubsn_ldrop_O1_trans: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 →
-                             ∀K2,e. ⇩[0, e] L2 ≡ K2 →
-                             ∃∃K1. h ⊢ K1 :⊑[] K2 & ⇩[0, e] L1 ≡ K1.
-#h #L1 #L2 #H elim H -L1 -L2
-[ /2 width=3/
-| #I #L1 #L2 #V #_ #IHL12 #K2 #e #H
-  elim (ldrop_inv_O1 … H) -H * #He #HLK2
-  [ destruct
-    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
-  | elim (IHL12 … HLK2) -L2 /3 width=3/
-  ]
-| #L1 #L2 #V #W #l #H1VW #H2VW #_ #IHL12 #K2 #e #H
-  elim (ldrop_inv_O1 … H) -H * #He #HLK2
-  [ destruct
-    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
-  | elim (IHL12 … HLK2) -L2 /3 width=3/
-  ]
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/snta/lsubsn_snta.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/snta/lsubsn_snta.etc
deleted file mode 100644 (file)
index c621530..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/dynamic/snta_snta.ma".
-include "basic_2/dynamic/lsubsn_ldrop.ma".
-include "basic_2/dynamic/lsubsn_cpcs.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE TYPE ASSIGNMENT *******)
-
-(* Properties concerning stratified native type assignment ******************)
-
-(* Note: the corresponding confluence property does not hold *)
-lemma lsubsn_snta_trans: ∀h,L2,T,U,l. ⦃h, L2⦄ ⊢ T :[l] U →
-                         ∀L1. h ⊢ L1 :⊑[] L2 → ⦃h, L1⦄ ⊢ T :[l] U.
-#h #L2 #T #U #l #H elim H -L2 -T -U -l
-[ //
-| #L2 #K2 #V2 #W2 #U2 #i #l #HLK2 #_ #WU2 #IHVW2 #L1 #HL12
-  elim (lsubsn_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
-  elim (lsubsn_inv_pair2 … H) -H * #K1
-  [ #HK12 #H destruct /3 width=6/
-  | #V1 #l0 #_ #_ #_ #_ #H destruct
-  ]
-| #L2 #K2 #W2 #V2 #U2 #i #l #HLK2 #HWV2 #HWU2 #IHWV2 #L1 #HL12
-  elim (lsubsn_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
-  elim (lsubsn_inv_pair2 … H) -H * #K1 [ -HWV2 | -IHWV2 ]
-  [ #HK12 #H destruct /3 width=6/
-  | #V1 #l0 #H1 #H2 #_ #H #_ destruct
-    elim (snta_fwd_correct … H2) -H2 #V #H
-    elim (snta_mono … HWV2 … H) -HWV2 -H /2 width=6/
-  ]
-| /4 width=3/
-| /3 width=2/
-| /3 width=2/
-| /3 width=1/
-| #L2 #T #U1 #U2 #V2 #l #_ #HU12 #_ #IHTU1 #IHUV2 #L1 #HL12
-  lapply (cpcs_lsubsn_trans … HL12 … HU12) -HU12 /3 width=3/
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/snta/snta.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/snta/snta.etc
deleted file mode 100644 (file)
index 71ed421..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-notation "hvbox( ⦃ h , break L ⦄ ⊢ break term 46 T1 : * break [ l ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'NativeTypeStar $h $l $L $T1 $T2 }.
-
-notation "hvbox( ⦃ h , break L ⦄ ⊢ break term 46 T1 : break [ l ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'StratifiedNativeType $h $l $L $T1 $T2 }.
-
-include "basic_2/static/sh.ma".
-include "basic_2/equivalence/cpcs.ma".
-
-(* STRATIFIED NATIVE TYPE ASSIGNMENT ON TERMS *******************************)
-
-inductive snta (h:sh): nat → lenv → relation term ≝
-| snta_sort: ∀L,k. snta h 0 L (⋆k) (⋆(next h k))
-| snta_ldef: ∀L,K,V,W,U,i,l. ⇩[0, i] L ≡ K. ⓓV → snta h l K V W →
-             ⇧[0, i + 1] W ≡ U → snta h l L (#i) U
-| snta_ldec: ∀L,K,W,V,U,i,l. ⇩[0, i] L ≡ K. ⓛW → snta h l K W V →
-             ⇧[0, i + 1] W ≡ U → snta h (l+1) L (#i) U
-| snta_bind: ∀I,L,V,W,T,U,l1,l2. snta h l1 L V W → snta h l2 (L. ⓑ{I} V) T U →
-             snta h l2 L (ⓑ{I}V.T) (ⓑ{I}V.U)
-| snta_appl: ∀L,V,W1,W2,T,U,l1,l2. snta h (l1+1) L V W2 →
-             snta h l2 L (ⓛW1.T) (ⓛW2.U) →
-             snta h l2 L (ⓐV.ⓛW1.T) (ⓐV.ⓛW2.U)
-| snta_pure: ∀L,V,T,U,W,l. snta h (l+1) L T U → snta h l L (ⓐV.U) W →
-             snta h (l+1) L (ⓐV.T) (ⓐV.U)
-| snta_cast: ∀L,T,U,W,l1,l2. snta h l2 L T U → snta h l1 L U W →
-             snta h l2 L (ⓝU.T) U
-| snta_conv: ∀L,T,U1,U2,V2,l. snta h l L T U1 → L ⊢ U1 ⬌* U2 →
-             snta h (l-1) L U2 V2 → snta h l L T U2
-.
-
-interpretation "stratified native type assignment (term)"
-   'StratifiedNativeType h l L T U = (snta h l L T U).
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/snta/snta_lift.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/snta/snta_lift.etc
deleted file mode 100644 (file)
index 424bfe8..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/equivalence/cpcs_cpcs.ma".
-include "basic_2/dynamic/snta.ma".
-
-(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
-
-(* Advanced inversion lemmas ************************************************)
-
-fact snta_inv_sort1_aux: ∀h,L,T,U,l. ⦃h, L⦄ ⊢ T :[l] U → ∀k0. T = ⋆k0 →
-                         l = 0 ∧ L ⊢ ⋆(next h k0) ⬌* U.
-#h #L #T #U #l #H elim H -L -T -U -l
-[ #L #k #k0 #H destruct /2 width=1/
-| #L #K #V #W #U #i #l #_ #_ #_ #_ #k0 #H destruct
-| #L #K #W #V #U #i #l #_ #_ #_ #_ #k0 #H destruct
-| #I #L #V #W #T #U #l1 #l2 #_ #_ #_ #_ #k0 #H destruct
-| #L #V #W1 #W2 #T #U #l1 #l2 #_ #_ #_ #_ #k0 #H destruct
-| #L #V #T #U #W #l #_ #_ #_ #_ #k0 #H destruct
-| #L #T #U #W #l1 #l2 #_ #_ #_ #_ #k0 #H destruct
-| #L #T #U1 #U2 #V2 #l #_ #HU12 #_ #IHTU1 #_ #k0 #H destruct
-  elim (IHTU1 ??) -IHTU1 [3: // |2: skip ] #H #Hk0
-  lapply (cpcs_trans … Hk0 … HU12) -U1 /2 width=1/
-]
-qed.
-
-lemma snta_inv_sort1: ∀h,L,U,k,l. ⦃h, L⦄ ⊢ ⋆k :[l] U →
-                      l = 0 ∧ L ⊢ ⋆(next h k) ⬌* U.
-/2 width=4/ qed-.
-
-fact snta_inv_lref1_aux: ∀h,L,T,U,l. ⦃h, L⦄ ⊢ T :[l] U → ∀j. T = #j →
-                         (∃∃K,V,W,U0. ⇩[0, j] L ≡ K. ⓓV & ⦃h, K⦄ ⊢ V :[l] W &
-                                      ⇧[0, j + 1] W ≡ U0 & L ⊢ U0 ⬌* U
-                         ) ∨
-                         (∃∃K,W,V,U0. ⇩[0, j] L ≡ K. ⓛW & ⦃h, K⦄ ⊢ W :[l-1] V &
-                                      ⇧[0, j + 1] W ≡ U0 & l > 0 & L ⊢ U0 ⬌* U
-                         ).
-#h #L #T #U #l #H elim H -L -T -U -l
-[ #L #k #j #H destruct
-| #L #K #V #W #U #i #l #HLK #HVW #HWU #_ #j #H destruct /3 width=8/
-| #L #K #W #V #U #i #l #HLK #HWV #HWU #_ #j #H destruct /3 width=8/
-| #I #L #V #W #T #U #l1 #l2 #_ #_ #_ #_ #j #H destruct
-| #L #V #W1 #W2 #T #U #l1 #l2 #_ #_ #_ #_ #j #H destruct
-| #L #V #T #U #W #l #_ #_ #_ #_ #j #H destruct
-| #L #T #U #W #l1 #l2 #_ #_ #_ #_ #j #H destruct
-| #L #T #U1 #U2 #V2 #l #_ #HU12 #_ #IHTU1 #_ #j #H destruct
-  elim (IHTU1 ??) -IHTU1 [4: // |2: skip ] * #K #V #W #U0 #HLK #HVW #HWU0 [2: #H ] #HU01
-  lapply (cpcs_trans … HU01 … HU12) -U1 /3 width=8/
-]
-qed.
-
-lemma snta_inv_lref1: ∀h,L,U,i,l. ⦃h, L⦄ ⊢ #i :[l] U →
-                     (∃∃K,V,W,U0. ⇩[0, i] L ≡ K. ⓓV & ⦃h, K⦄ ⊢ V :[l] W &
-                                  ⇧[0, i + 1] W ≡ U0 & L ⊢ U0 ⬌* U
-                     ) ∨
-                     (∃∃K,W,V,U0. ⇩[0, i] L ≡ K. ⓛW & ⦃h, K⦄ ⊢ W :[l-1] V &
-                                  ⇧[0, i + 1] W ≡ U0 & l > 0 & L ⊢ U0 ⬌* U
-                     ).
-/2 width=3/ qed-.
-
-fact snta_inv_bind1_aux: ∀h,L,T,U,l. ⦃h, L⦄ ⊢ T :[l] U → ∀J,X,Y. T = ⓑ{J}Y.X →
-                         ∃∃Z1,Z2,l0. ⦃h, L⦄ ⊢ Y :[l0] Z1 &
-                                  ⦃h, L.ⓑ{J}Y⦄ ⊢ X :[l] Z2 &
-                                  L ⊢ ⓑ{J}Y.Z2 ⬌* U.
-#h #L #T #U #l #H elim H -L -T -U -l
-[ #L #k #J #X #Y #H destruct
-| #L #K #V #W #U #i #l #_ #_ #_ #_ #J #X #Y #H destruct
-| #L #K #W #V #U #i #l #_ #_ #_ #_ #J #X #Y #H destruct
-| #I #L #V #W #T #U #l1 #l2 #HVW #HTU #_ #_ #J #X #Y #H destruct /2 width=3/
-| #L #V #W1 #W2 #T #U #l1 #l2 #_ #_ #_ #_ #J #X #Y #H destruct
-| #L #V #T #U #W #l #_ #_ #_ #_ #J #X #Y #H destruct
-| #L #T #U #W #l1 #l2 #_ #_ #_ #_ #J #X #Y #H destruct
-| #L #T #U1 #U2 #V2 #l #_ #HU12 #_ #IHTU1 #_ #J #X #Y #H destruct
-  elim (IHTU1 ????) -IHTU1 [5: // |2,3,4: skip ] #Z1 #Z2 #l0 #HZ1 #HZ2 #HU1
-  lapply (cpcs_trans … HU1 … HU12) -U1 /2 width=3/
-]
-qed.
-
-lemma snta_inv_bind1: ∀h,J,L,Y,X,U,l. ⦃h, L⦄ ⊢ ⓑ{J}Y.X :[l] U →
-                      ∃∃Z1,Z2,l0. ⦃h, L⦄ ⊢ Y :[l0] Z1 & ⦃h, L.ⓑ{J}Y⦄ ⊢ X :[l] Z2 &
-                                  L ⊢ ⓑ{J}Y.Z2 ⬌* U.
-/2 width=3/ qed-.
-
-fact snta_inv_cast1_aux: ∀h,L,T,U,l. ⦃h, L⦄ ⊢ T :[l] U → ∀X,Y. T = ⓝY.X →
-                      ⦃h, L⦄ ⊢ X :[l] Y ∧ L ⊢ Y ⬌* U.
-#h #L #T #U #l #H elim H -L -T -U -l
-[ #L #k #X #Y #H destruct
-| #L #K #V #W #U #i #l #_ #_ #_ #_ #X #Y #H destruct
-| #L #K #W #V #U #i #l #_ #_ #_ #_ #X #Y #H destruct
-| #I #L #V #W #T #U #l1 #l2 #_ #_ #_ #_ #X #Y #H destruct
-| #L #V #W1 #W2 #T #U #l1 #l2 #_ #_ #_ #_ #X #Y #H destruct
-| #L #V #T #U #W #l #_ #_ #_ #_ #X #Y #H destruct
-| #L #T #U #W #l1 #l2 #HTU #_ #_ #_ #X #Y #H destruct /2 width=1/
-| #L #T #U1 #U2 #V2 #l #_ #HU12 #_ #IHTU1 #_ #X #Y #H destruct
-  elim (IHTU1 ???) -IHTU1 [4: // |2,3: skip ] #HXY #HU1
-  lapply (cpcs_trans … HU1 … HU12) -U1 /2 width=1/
-]
-qed.
-
-lemma snta_inv_cast1: ∀h,L,X,Y,U,l. ⦃h, L⦄ ⊢ ⓝY.X :[l] U →
-                      ⦃h, L⦄ ⊢ X :[l] Y ∧ L ⊢ Y ⬌* U.
-/2 width=3/ qed-.
-
-(* Properties on relocation *************************************************)
-
-lemma snta_lift: ∀h,L1,T1,U1,l. ⦃h, L1⦄ ⊢ T1 :[l] U1 →
-                 ∀L2,d,e. ⇩[d, e] L2 ≡ L1 →
-                 ∀T2. ⇧[d, e] T1 ≡ T2 → ∀U2. ⇧[d, e] U1 ≡ U2 →
-                 ⦃h, L2⦄ ⊢ T2 :[l] U2.
-#h #L1 #T1 #U1 #l #H elim H -L1 -T1 -U1 -l
-[ #L1 #k #L2 #d #e #HL21 #X1 #H1 #X2 #H2
-  >(lift_inv_sort1 … H1) -X1
-  >(lift_inv_sort1 … H2) -X2 //
-| #L1 #K1 #V1 #W1 #W #i #l #HLK1 #_ #HW1 #IHVW1 #L2 #d #e #HL21 #X #H #U2 #HWU2
-  elim (lift_inv_lref1 … H) * #Hid #H destruct
-  [ elim (lift_trans_ge … HW1 … HWU2 ?) -W // #W2 #HW12 #HWU2
-    elim (ldrop_trans_le … HL21 … HLK1 ?) -L1 /2 width=2/ #X #HLK2 #H
-    elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K2 #V2 #HK21 #HV12 #H destruct
-    /3 width=8/
-  | lapply (lift_trans_be … HW1 … HWU2 ? ?) -W // /2 width=1/ #HW1U2
-    lapply (ldrop_trans_ge … HL21 … HLK1 ?) -L1 // -Hid /3 width=8/
-  ]
-| #L1 #K1 #W1 #V1 #W #i #l #HLK1 #_ #HW1 #IHWV1 #L2 #d #e #HL21 #X #H #U2 #HWU2
-  elim (lift_inv_lref1 … H) * #Hid #H destruct
-  [ elim (lift_trans_ge … HW1 … HWU2 ?) -W // <minus_plus #W #HW1 #HWU2
-    elim (ldrop_trans_le … HL21 … HLK1 ?) -L1 /2 width=2/ #X #HLK2 #H
-    elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K2 #W2 #HK21 #HW12 #H destruct
-    lapply (lift_mono … HW1 … HW12) -HW1 #H destruct
-    elim (lift_total V1 (d-i-1) e) /3 width=8/
-  | lapply (lift_trans_be … HW1 … HWU2 ? ?) -W // /2 width=1/ #HW1U2
-    lapply (ldrop_trans_ge … HL21 … HLK1 ?) -L1 // -Hid /3 width=8/
-  ]
-| #I #L1 #V1 #W1 #T1 #U1 #l1 #l2 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL21 #X1 #H1 #X2 #H2
-  elim (lift_inv_bind1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H destruct
-  elim (lift_inv_bind1 … H2) -H2 #X #U2 #H1 #HU12 #H2 destruct
-  lapply (lift_mono … H1 … HV12) -H1 #H destruct
-  elim (lift_total W1 d e) /4 width=6/
-| #L1 #V1 #W11 #W12 #T1 #U1 #l1 #l2 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL21 #X1 #H1 #X2 #H2
-  elim (lift_inv_flat1 … H1) -H1 #V2 #X #HV12 #H1 #H destruct
-  elim (lift_inv_bind1 … H1) -H1 #W21 #T2 #HW121 #HT12 #H destruct
-  elim (lift_inv_flat1 … H2) -H2 #Y2 #X #HY #H2 #H destruct
-  elim (lift_inv_bind1 … H2) -H2 #W22 #U2 #HW122 #HU12 #H destruct
-  lapply (lift_mono … HY … HV12) -HY #H destruct /4 width=6/
-| #L1 #V1 #T1 #U1 #W1 #l #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL21 #X1 #H1 #X2 #H2
-  elim (lift_inv_flat1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H destruct
-  elim (lift_inv_flat1 … H2) -H2 #X #U2 #H1 #HU12 #H2 destruct
-  lapply (lift_mono … H1 … HV12) -H1 #H destruct
-  elim (lift_total W1 d e) #W2 #HW12 /4 width=6/
-| #L1 #T1 #U1 #W1 #l1 #l2 #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL21 #X #H #U2 #HU12
-  elim (lift_inv_flat1 … H) -H #X2 #T2 #HUX2 #HT12 #H destruct
-  lapply (lift_mono … HUX2 … HU12) -HUX2 #H destruct
-  elim (lift_total W1 d e) /3 width=6/
-| #L1 #T1 #U11 #U12 #V12 #l #_ #HU112 #_ #IHTU11 #IHUV12 #L2 #d #e #HL21 #U1 #HTU1 #U2 #HU12
-  elim (lift_total U11 d e) #U #HU11
-  elim (lift_total V12 d e) #V22 #HV122
-  lapply (cpcs_lift … HL21 … HU11 … HU12 HU112) -HU112 /3 width=6/
-]
-qed.
-
-(* Advanced forvard lemmas **************************************************)
-
-fact snta_fwd_pure1_aux: ∀h,L,T,U,l. ⦃h, L⦄ ⊢ T :[l] U → ∀X,Y. T = ⓐY.X →
-                         ∃∃V,W,l0. ⦃h, L⦄ ⊢ Y :[l0+1] W & ⦃h, L⦄ ⊢ X :[l] V &
-                                   L ⊢ ⓐY.V ⬌* U.
-#h #L #T #U #l #H elim H -L -T -U -l
-[ #L #k #X #Y #H destruct
-| #L #K #V #W #U #i #l #_ #_ #_ #_ #X #Y #H destruct
-| #L #K #W #V #U #i #l #_ #_ #_ #_ #X #Y #H destruct
-| #I #L #V #W #T #U #l1 #l2 #_ #_ #_ #_ #X #Y #H destruct
-| #L #V #W1 #W2 #T #U #l1 #l2 #HVW2 #HTU #_ #_ #X #Y #H destruct /2 width=3/
-| #L #V #T #U #W #l #HTU #_ #_ #IHU #X #Y #H destruct
-  elim (IHU U Y ?) -IHU // /3 width=3/
-| #L #T #U #W #l1 #l2 #_ #_ #_ #_ #X #Y #H destruct
-| #L #T #U1 #U2 #V2 #l #_ #HU12 #_ #IHTU1 #_ #X #Y #H destruct
-  elim (IHTU1 ???) -IHTU1 [4: // |2,3: skip ] #V #W #l0 #HYW #HXV #HU1
-  lapply (cpcs_trans … HU1 … HU12) -U1 /2 width=3/
-]
-qed.
-
-lemma snta_fwd_pure1: ∀h,L,X,Y,U,l. ⦃h, L⦄ ⊢ ⓐY.X :[l] U →
-                      ∃∃V,W,l0. ⦃h, L⦄ ⊢ Y :[l0+1] W & ⦃h, L⦄ ⊢ X :[l] V &
-                                L ⊢ ⓐY.V ⬌* U.
-/2 width=3/ qed-.
-
-lemma snta_fwd_correct: ∀h,L,T,U,l. ⦃h, L⦄ ⊢ T :[l] U →
-                        ∃T0. ⦃h, L⦄ ⊢ U :[l-1] T0.
-#h #L #T #U #l #H elim H -L -T -U -l
-[ /2 width=2/
-| #L #K #V #W #W0 #i #l #HLK #_ #HW0 * #V0 #HWV0
-  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
-  elim (lift_total V0 0 (i+1)) /3 width=10/
-| #L #K #W #V #V0 #i #l #HLK #HWV #HWV0 #_
-  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
-  elim (lift_total V 0 (i+1)) /3 width=10/
-| #I #L #V #W #T #U #l1 #l2 #HVW #_ #_ * /3 width=3/
-| #L #V #W1 #W2 #T #U #l1 #l2 #HVW2 #_ #_ * #X #H
-  elim (snta_inv_bind1 … H) -H /4 width=5/   
-| /3 width=2/
-| /2 width=2/
-| /2 width=2/
-]
-qed-.
-
-(* Advanced properties ******************************************************)
-
-lemma snta_cast_short: ∀h,L,T,U,l. ⦃h, L⦄ ⊢ T :[l] U → ⦃h, L⦄ ⊢ ⓝU.T :[l] U.
-#h #L #T #U #l #HTU
-elim (snta_fwd_correct … HTU) /2 width=3/
-qed.
-
-lemma snta_typecheck: ∀h,L,T,U,l. ⦃h, L⦄ ⊢ T :[l] U →
-                      ∃T0. ⦃h, L⦄ ⊢ ⓝU.T :[l] T0.
-/3 width=2/ qed.
-
-lemma snta_cast_old: ∀h,L,W,T,U,l.
-                    ⦃h, L⦄ ⊢ T :[l] U → ⦃h, L⦄ ⊢ U :[l-1] W → ⦃h, L⦄ ⊢ ⓝU.T :[l] ⓝW.U.
-#h #L #W #T #U #l #HTU #HUW
-@(snta_conv … U) /2 width=2/ /3 width=1/ (**) (* /4 width=3/ is a bit slow *)
-qed.
-
-lemma snta_appl_old: ∀h,L,V,W,T,U,l1,l2.
-                     ⦃h, L⦄ ⊢ V :[l1+1] W → ⦃h, L⦄ ⊢ T :[l2+1] ⓛW.U →
-                     ⦃h, L⦄ ⊢ ⓐV.T :[l2+1] ⓐV.ⓛW.U.
-#h #L #V #W #T #U #l1 #l2 #HVW #HTU
-elim (snta_fwd_correct … HTU) #X #H
-elim (snta_inv_bind1 … H) -H /4 width=5/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/snta/snta_ltpr.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/snta/snta_ltpr.etc
deleted file mode 100644 (file)
index 77b62e4..0000000
+++ /dev/null
@@ -1,278 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/snta_ltpss.ma".
-include "basic_2/dynamic/snta_thin.ma".
-include "basic_2/dynamic/lsubsn_snta.ma".
-
-(* STRATIFIED NATIVE TYPE ASSIGNMENT ON TERMS *******************************)
-(*
-lemma snta_fwd_abst: ∀h,L,W1,W2,T,U,l2. ⦃h, L⦄ ⊢ ⓛW1.T :[l2] ⓛW2.U →
-                     ∃∃V1,V2,l1. ⦃h, L⦄ ⊢ W1 :[l1] V1 & ⦃h, L⦄ ⊢ W2 :[l1] V2 &
-                                 L ⊢ W1 ⬌* W2.
-#h #L #W1 #W2 #T #U #l2 #HTU
-elim (snta_fwd_correct … HTU) #X #H
-elim (snta_inv_bind1 … H) -H #W #T0 #l #HW2 #_ #_ -X
-elim (snta_inv_bind1 … HTU) -HTU #V1 #U0 #l0 #HWV1 #_ #H
-elim (cpcs_inv_abst … H Abst W1) -H
-#HW12 #_ -U0
-@(ex3_3_intro … HWV1 … HW12)
-[3: @(snta_conv … HTU0 HU0) 
-
- /3 width=3/
-
-*)
-(*
-#h #L #V #T #U #l2 #HTU
-elim (snta_fwd_correct … HTU) #X #H
-elim (snta_inv_bind1 … H) -H #W #T0 #l1 #HVW #HUT0 #_ -X
-elim (snta_inv_bind1 … HTU) -HTU #W0 #U0 #l0 #_ #HTU0 #H -l0
-elim (cpcs_inv_abst … H Abst V) -H /3 width=3/
-qed-.
-*)
-(*
-lemma snta_fwd_appl1_sound_aux: ∀h,l0. (∀L1,L2,T1,T2,U,l.
-                                        l < l0 → ⦃h, L1⦄ ⊢ T1 :[l] U →
-                                        L1 ➡ L2 → L2 ⊢ T1 ➡* T2 → ⦃h, L2⦄ ⊢ T2 :[l] U
-                                       ) →
-                                ∀L,T,U,l2. ⦃h, L⦄ ⊢ T :[l2] U →
-                                ∀Z,Y,X1. T = ⓐZ.ⓛY.X1 → l0 = l2 →
-                                ∃l1. ⦃h, L⦄ ⊢ Z :[l1+1] Y.
-#h #l0 #IH #L #T #U #l2 #H elim H -L -T -U -l2
-[
-|
-|
-|
-| #L #V #W1 #W2 #T #U #l1 #l2 #HVW2 #HTU #_ #_ #Z #Y #X1 #H1 #H2 destruct -IH
-  elim (snta_fwd_abst … HTU) -X1 -U -l2 #Y0 #W0 #l0 #HY0 #H1 #HYW2
-  elim (snta_fwd_correct … HVW2) #W #H2
-  elim (snta_mono … H1 … H2) -H1 -H2 #H #_ destruct -W0 -W /4 width=6/
-| #L #V #T #U #W #l #HTU #HUW #Z #Y #X1 #X2 #H1 #H2 #H3 destruct
-  elim (snta_inv_abst_sn … HTU) -HTU #Y0 #l0 #HY0 #HX12
-|
-| #L #T #U1 #U2 #V2 #l #HTU1 #HU12 #HUV2 #Z #Y #X1 #X2 #H1 #H2 #H3 destruct
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-lemma snta_inv_appl_aux: ∀h,l0. (∀L1,L2,T1,T2,U,l.
-                                 l < l0 + 1 → ⦃h, L1⦄ ⊢ T1 :[l] U →
-                                 L1 ➡ L2 → L2 ⊢ T1 ➡* T2 → ⦃h, L2⦄ ⊢ T2 :[l] U
-                                ) →
-                         ∀L,T,U,l2. ⦃h, L⦄ ⊢ T :[l2] U →
-                         ∀Z,Y,X1,X2. T = ⓐZ.ⓛY.X1 → U = ⓐZ.ⓛY.X2 → l0 = l2 →
-                         ∃∃l1. ⦃h, L⦄ ⊢ Z :[l1+1] Y & ⦃h, L.ⓛY⦄ ⊢ X1 :[l2] X2.
-#h #l0 #IH #L #T #U #l2 * -L -T -U -l2
-[
-|
-|
-|
-| #L #V #W1 #W2 #T #U #l1 #l2 #HVW2 #HTU #Z #Y #X1 #X2 #H1 #H2 #H3 destruct -IH
-  elim (snta_inv_abst … HTU) -HTU /2 width=2/
-| #L #V #T #U #W #l #HTU #HUW #Z #Y #X1 #X2 #H1 #H2 #H3 destruct
-  elim (snta_inv_abst … HTU) -HTU #Y0 #l0 #HY0 #HX12
-|
-| #L #T #U1 #U2 #V2 #l #HTU1 #HU12 #HUV2 #Z #Y #X1 #X2 #H1 #H2 #H3 destruct
-  
-   /2 width=2/
-
-
-axiom pippo: ∀h,l0. (∀L1,L2,T1,T2,U,l.
-                l < l0 + 1 → ⦃h, L1⦄ ⊢ T1 :[l] U →
-                L1 ➡ L2 → L2 ⊢ T1 ➡* T2 → ⦃h, L2⦄ ⊢ T2 :[l] U
-             ) →
-             ∀L,T1,U1,l. ⦃h, L⦄ ⊢ T1 :[l] U1 →
-             ∀V2,W2,T2. L ⊢ T1 ➡* ⓐV2.ⓛW2.T2 → l0 = l →
-             ∃l0. ⦃h, L2⦄ ⊢ V2 :[l0+1] W2.
-(*
-#h #l #IH #L1 #T1 #U1 #l1 * -L1 -T1 -U1 -l1
-[
-|
-|
-|
-| #L1 #V1 #W1 #T1 #U1 #l1 #HVW1 #HTU1 #Y1 #X1 #H1 #L2 #Y2 #HL12 #HY12 #Z2 #X2 #HX12 #H2 destruct
-  elim (IH ??? Y2 … HVW1 HL12 ?) -HVW1 // [2: /3 width=1/ ] -HY12 #l21 #HY2W1 #H1l21 #H2l21
-  elim (IH … HTU1 HL12 HX12) -IH -HTU1 -HL12 -HX12 // #l22 #H #_ #H2l22
-  elim (snta_inv_bind1 … H) -H #Z #X #HZ2 #_ #H
-  elim (cpcs_inv_abst … H Abst W1) -H #H #_
-  lapply (transitive_le … (l21+l22) … H1l21 ?) -H1l21 // #Hl21
-  @(ex3_1_intro … Hl21) [2: /3 width=1/ ]
-  @(snta_conv … W1) /2 width=2/ (**) (* explicit constructors *)
-| #L1 #V1 #T1 #U1 #W1 #l1 #HTU1 #HUW1 #Y1 #X1 #H1 #L2 #Y2 #HL12 #HY12 #Z2 #X2 #HX12 #H2 destruct
-
-*)
-(* Properties on context-free parallel reduction for local environments *****)
-*)
-fact snta_ltpr_tpr_conf_aux: ∀h,l0. (∀L1,L2,T1,T2,U,l.
-                                l < l0 → ⦃h, L1⦄ ⊢ T1 :[l] U →
-                                L1 ➡ L2 → L2 ⊢ T1 ➡* T2 → ⦃h, L2⦄ ⊢ T2 :[l] U
-                             ) →
-                             ∀L1,T1,U,l. ⦃h, L1⦄ ⊢ T1 :[l] U → ∀L2. L1 ➡ L2 →
-                             ∀T2. T1 ➡ T2 → l0 = l → ⦃h, L2⦄ ⊢ T2 :[l] U.
-#h #l0 #IH #L1 #T1 #U #l #H elim H -L1 -T1 -U -l
-[ #L1 #k1 #L2 #_ #T2 #H #_ -l0
-  >(tpr_inv_atom1 … H) -H //
-| #L1 #K1 #V1 #W #U #i1 #l #HLK1 #_ #HWU #IHV1 #L2 #HL12 #T2 #H #Hl -IH
-  >(tpr_inv_atom1 … H) -T2
-  elim (ltpr_ldrop_conf … HLK1 … HL12) -HLK1 -HL12 #X #HLK2 #H
-  elim (ltpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct /3 width=6/
-| #L1 #K1 #W1 #V1 #U1 #i1 #l #HLK1 #HWV1 #HWU1 #IHWV1 #L2 #HL12 #T2 #H #Hl -IH
-(*  
-  >(tpr_inv_atom1 … H) -T2
-  elim (ltpr_ldrop_conf … HLK1 … HL12) -HLK1 -HL12 #X #HLK2 #H
-  elim (ltpr_inv_pair1 … H) -H #K2 #W2 #HK12 #HW12 #H destruct
-  lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
-  elim (lift_total V1 0 (i+1)) #W #HW
-  lapply (snta_lift h … HLK … HWU1 … HW) /2 width=1/ -HLK -HW
-  elim (lift_total W2 0 (i+1)) #U2 #HWU2
-  lapply (tpr_lift … HW12 … HWU1 … HWU2) -HWU1 #HU12
-  @(snta_conv … U2) /2 width=1/ /3 width=6/ (**) (* explicit constructor, /3 width=6/ is too slow *)
-*)
-| #I #L1 #V1 #W1 #T1 #U1 #l1 #l2 #_ #_ #IHVW1 #IHTU1 #L2 #HL12 #X #H #Hl -IH
-(*  
-  elim (tpr_inv_bind1 … H) -H *
-  [ #V2 #T #T2 #HV12 #HT1 #HT2 #H destruct
-    lapply (IHVW1 … HL12 … HV12) #HV2W1
-    lapply (IHVW1 L2 … V1 ?) // -IHVW1 #HWV1
-    lapply (IHTU1 (L2.ⓑ{I}V2) … HT1) -HT1 /2 width=1/ #HTU1
-    lapply (IHTU1 (L2.ⓑ{I}V1) ? T1 ?) -IHTU1 // /2 width=1/ -HL12 #H
-    lapply (tps_lsubs_trans … HT2 (L2.ⓑ{I}V2) ?) -HT2 /2 width=1/ #HT2
-    lapply (snta_tps_conf … HTU1 … HT2) -T #HT2U1
-    elim (snta_fwd_correct … H) -H #U2 #HU12
-    @(snta_conv … (ⓑ{I}V2.U1)) /2 width=2/ /3 width=1/ (**) (* explicit constructor, /4 width=6/ is too slow *)
-  | #T #HT1 #HTX #H destruct
-    lapply (IHVW1 … HL12 V1 ?) -IHVW1 // #HVW1
-    lapply (IHTU1 (L2.ⓓV1) … HT1) -T1 /2 width=1/ -L1 #H
-    elim (snta_fwd_correct … H) #T1 #HUT1
-    elim (snta_ldrop_conf … H L2 0 1 ? ?) -H // /2 width=1/ #T0 #U0 #HTU0 #H #HU10
-    lapply (delift_inv_lift1_eq … H L2 … HTX) -H -HTX /2 width=1/ #H destruct
-    @(snta_conv … HTU0) /2 width=2/
-  ]
-*)
-| #L1 #V1 #W11 #W2 #T1 #U1 #l1 #l2 #_ #_ #IHVW1 #IHTU1 #L2 #HL12 #X #H #Hl -IH
-(*
-  elim (tpr_inv_appl1 … H) -H *
-  [ #V2 #Y #HV12 #HY #H destruct
-    elim (tpr_inv_abst1 … HY) -HY #W2 #T2 #HW12 #HT12 #H destruct
-    lapply (IHTU1 L2 ? (ⓛW1.T1) ?) // #H
-    elim (snta_fwd_correct … H) -H #X #H
-    elim (snta_inv_bind1 … H) -H #W #U #HW #HU #_
-    @(snta_conv … (ⓐV2.ⓛW1.U1)) /4 width=2/ (**) (* explicit constructor, /5 width=5/ is too slow *)
-  | #V2 #W2 #T0 #T2 #HV12 #HT02 #H1 #H2 destruct
-    lapply (IHVW1 … HL12 … HV12) #HVW2
-    lapply (IHVW1 … HL12 V1 ?) -IHVW1 // #HV1W2
-    lapply (IHTU1 … HL12 (ⓛW2.T2) ?) -IHTU1 -HL12 /2 width=1/ -HT02 #H1
-    elim (snta_fwd_correct … H1) #T #H2
-    elim (snta_inv_bind1 … H1) -H1 #W #U2 #HW2 #HTU2 #H
-    elim (cpcs_inv_abst … H Abst W2) -H #_ #HU21
-    elim (snta_inv_bind1 … H2) -H2 #W0 #U0 #_ #H #_ -T -W0
-    lapply (lsubsn_snta_trans … HTU2 (L2.ⓓV2) ?) -HTU2 /2 width=1/ #HTU2
-    @(snta_conv … (ⓓV2.U2)) /2 width=2/ /3 width=2/ (**) (* explicit constructor, /4 width=5/ is too slow *)
-  | #V0 #V2 #W0 #W2 #T0 #T2 #_ #_ #_ #_ #H destruct
-  ]
-*)
-| #L1 #V1 #T1 #U1 #W1 #l #_ #HUW1 #IHTU1 #_ #L2 #HL12 #X #H #Hl
-  elim (tpr_inv_appl1 … H) -H *
-  [ #V2 #T2 #HV12 #HT12 #H destruct
-    lapply (cpr_tpr … HV12 L2) #HV
-    elim (snta_fwd_correct h L2 (ⓐV1.T1) (ⓐV1.U1) (l+1) ?) [2: /3 width=6/ ] #U
-    @(snta_conv … (ⓐV2.U1)) /2 width=1/ -HV12 /4 width=8 by snta_pure, cprs_flat_dx/ (**) (* explicit constructor, /4 width=8/ is too slow without trace *)
-  | #V2 #W0 #T0 #T2 #HV12 #HT02 #H1 #H2 destruct
-    lapply (IHTU1 … HL12 (ⓛW0.T2) ? ?) -IHTU1 // /2 width=1/ -T0 #H1
-    lapply (IH … (ⓐV2.U1) … HUW1 HL12 ?) // /3 width=1/ #H2
-    lapply (snta_pure … H1 H2) -H2 #H
-    elim (snta_inv_bind1 … H1) -H1 #V0 #U2 #l1 #HWV0 #HTU2 #HU21
-    @(snta_conv … (ⓓV2.U2)) (**) (* explicit constructor *)
-    [2:
-(*
-        @snta_bind /3 width=2/ /3 width=6/ (**) (* /4 width=6/ is a bit slow *)
-*)
-    |3: @(cpcs_cpr_conf … (ⓐV1.ⓛW0.U2)) /2 width=1/
-    |4: /2 width=5/
-    | skip
-    ]
-(*
-    elim (snta_fwd_pure1 … H) -H #T1 #W2 #HVW2 #HUT1 #HTW1
-
-    elim (cpcs_inv_abst1 … HU21) #W3 #U3 #HU13 #H
-    elim (cprs_inv_abst … H Abst W0) -H #HW03 #_
-    elim (pippo … IH … HUW1 ? V2 W3 U3 HL12 ? ?) -IH -HUW1 -HL12 // /3 width=1/ -HU13 #l2 #HV2W3
-    lapply (snta_conv h L2 V2 W3 W0 V0 (l1+1) ? ? ?) /2 width=1/ -HV2W3 -HW03 -HWV0 #HV2W0    
-*)    
-(* SEGMENT 1.5
-    lapply (IH … HV1 … HL12 … HV12) -HV1 -HV12 /width=5/ #HB
-    lapply (IH … HB0  … HL12 W2 ?) -HB0 /width=5/ #HB0
-    lapply (IH … HA0 … (L2.ⓛW2) … HT02) -IH -HA0 -HT02 /width=5/ -T0 /2 width=1/ -L1 -V1 /4 width=7/
-    
-axiom pippo: ⦃h, L⦄ ⊢ ⓐV.X : Y →
-             ∃∃W,T. L ⊢ X ➡* ⓛW.T & ⦃h, L⦄ ⊢ ⓐV : W.
-
-*)
-(* SEGMENT 2
-| #L1 #T1 #U1 #W1 #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL12 #X #H
-  elim (tpss_inv_flat1 … H) -H #U2 #T2 #HU12 #HT12 #H destruct
-  lapply (cpr_tpss … HU12) /4 width=4/
-| #L1 #T1 #U11 #U12 #U #_ #HU112 #_ #IHTU11 #IHU12 #L2 #d #e #HL12 #T2 #HT12
-  @(snta_conv … U11) /2 width=5/ (**) (* explicot constructor, /3 width=7/ is too slow *)
-]
-qed.
-*)
-
-(* SEGMENT 3
-fact snta_ltpr_tpr_conf_aux: ∀h,L,T,L1,T1,U. ⦃h, L1⦄ ⊢ T1 : U → L = L1 → T = T1 →
-                            ∀L2. L1 ➡ L2 → ∀T2. T1 ➡ T2 → ⦃h, L2⦄ ⊢ T2 : U.
-  
-  
-  | #V0 #V2 #W0 #W2 #T0 #T2 #HV10 #HW02 #HT02 #HV02 #H1 #H2 destruct
-    elim (snta_inv_abbr … HT1) -HT1 #B0 #HW0 #HT0
-    lapply (IH … HW0  … HL12 … HW02) -HW0 /width=5/ #HW2
-    lapply (IH … HV1 … HL12 … HV10) -HV1 -HV10 /width=5/ #HV0
-    lapply (IH … HT0 … (L2.ⓓW2) … HT02) -IH -HT0 -HT02 /width=5/ -V1 -T0 /2 width=1/ -L1 -W0 #HT2
-    @(snta_abbr … HW2) -HW2
-    @(snta_appl … HT2) -HT2 /3 width=7/ (**) (* explict constructors, /5 width=7/ is too slow *)
-  ]
-| #L1 #V1 #T1 #A #HV1 #HT1 #H1 #H2 #L2 #HL12 #X #H destruct
-  elim (tpr_inv_cast1 … H) -H
-  [ * #V2 #T2 #HV12 #HT12 #H destruct
-    lapply (IH … HV1 … HL12 … HV12) -HV1 -HV12 /width=5/ #HV2
-    lapply (IH … HT1 … HL12 … HT12) -IH -HT1 -HL12 -HT12 /width=5/ -L1 -V1 -T1 /2 width=1/
-  | -HV1 #HT1X
-     lapply (IH … HT1 … HL12 … HT1X) -IH -HT1 -HL12 -HT1X /width=5/
-  ]
-]
-qed.
-
-lemma snta_ltpr_tpr_conf: ∀h,L1,T1,U. ⦃h, L1⦄ ⊢ T1 : U → ∀L2. L1 ➡ L2 →
-                         ∀T2. T1 ➡ T2 → ⦃h, L2⦄ ⊢ T2 : U.
-
-/2 width=9/ qed.
-
-axiom snta_ltpr_conf: ∀L1,T,A. L1 ⊢ T : A → ∀L2. L1 ➡ L2 → L2 ⊢ T : A.
-/2 width=5/ qed.
-
-axiom snta_tpr_conf: ∀L,T1,A. L ⊢ T1 : A → ∀T2. T1 ➡ T2 → L ⊢ T2 : A.
-/2 width=5/ qed.
-*)
-*)*)
\ No newline at end of file
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/snta/snta_ltpss.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/snta/snta_ltpss.etc
deleted file mode 100644 (file)
index 0e5f393..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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_ltpss.ma".
-include "basic_2/dynamic/snta_snta.ma".
-
-(* STRATIFIED NATIVE TYPE ASSIGNMENT ON TERMS *******************************)
-
-(* Properties about parallel unfold *****************************************)
-
-lemma snta_ltpss_tpss_conf: ∀h,L1,T1,U,l. ⦃h, L1⦄ ⊢ T1 :[l] U →
-                            ∀L2,d,e. L1 ▶* [d, e] L2 →
-                            ∀T2. L2 ⊢ T1 ▶* [d, e] T2 → ⦃h, L2⦄ ⊢ T2 :[l] U.
-#h #L1 #T1 #U #l #H elim H -L1 -T1 -U -l
-[ #L1 #k #L2 #d #e #_ #T2 #H
-  >(tpss_inv_sort1 … H) -H //
-| #L1 #K1 #V1 #W #U #i #l #HLK1 #_ #HWU #IHV1 #L2 #d #e #HL12 #T2 #H
-  elim (tpss_inv_lref1 … H) -H
-  [ #H destruct
-    elim (lt_or_ge i d) #Hdi
-    [ elim (ltpss_ldrop_conf_le … HL12 … HLK1 ?) -L1 /2 width=2/ #X #H #HLK2
-      elim (ltpss_inv_tpss11 … H ?) -H /2 width=1/ -Hdi #K2 #V2 #HK12 #HV12 #H destruct
-      /3 width=7/
-    | elim (lt_or_ge i (d + e)) #Hide [ | -Hdi ]
-      [ elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HLK2
-        elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K2 #V2 #HK12 #HV12 #H destruct
-        /3 width=7/
-      | lapply (ltpss_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /3 width=7/
-      ]
-    ]
-  | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #HVW2 #HWT2
-    elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HL2K0
-    elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K0 #V0 #HK12 #HV12 #H destruct
-    lapply (ldrop_mono … HL2K0 … HLK2) -HL2K0 #H destruct
-    lapply (ldrop_fwd_ldrop2 … HLK2) -HLK2 #HLK2
-    lapply (tpss_trans_eq … HV12 HVW2) -V2 /3 width=9/
-  ]
-| #L1 #K1 #W1 #V1 #U1 #i #l #HLK1 #HWV1 #HWU1 #IHWV1 #L2 #d #e #HL12 #T2 #H
-  elim (tpss_inv_lref1 … H) -H [ | -HWV1 -HWU1 -IHWV1 ]
-  [ #H destruct
-    elim (lift_total V1 0 (i+1)) #W #HW
-    elim (lt_or_ge i d) #Hdi [ -HWV1 ]
-    [ elim (ltpss_ldrop_conf_le … HL12 … HLK1 ?) -L1 /2 width=2/ #X #H #HLK2
-      elim (ltpss_inv_tpss11 … H ?) -H /2 width=1/ -Hdi #K2 #W2 #HK12 #HW12 #H destruct
-      lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
-      lapply (snta_lift h … HLK … HWU1 … HW) [ /2 width=4/ | skip ] -HW #H
-      elim (lift_total W2 0 (i+1)) #U2 #HWU2
-      lapply (tpss_lift_ge … HW12 … HLK … HWU1 … HWU2) -HLK -HWU1 // #HU12
-      lapply (cpr_tpss … HU12) -HU12 #HU12
-      @(snta_conv … U2) // /2 width=1/ /3 width=6/ (**) (* explicit constructor, /4 width=6/ is too slow *)
-    | elim (lt_or_ge i (d + e)) #Hide [ -HWV1 | -IHWV1 -HW -Hdi ]
-      [ elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HLK2
-        elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K2 #W2 #HK12 #HW12 #H destruct
-        lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
-        lapply (snta_lift h … HLK … HWU1 … HW) [ /2 width=4/ | skip ] -HW #H
-        elim (lift_total W2 0 (i+1)) #U2 #HWU2
-        lapply (tpss_lift_ge … HW12 … HLK … HWU1 … HWU2) -HLK -HWU1 // #HU12
-        lapply (cpr_tpss … HU12) -HU12 #HU12
-        @(snta_conv … U2) // /2 width=1/ /3 width=6/ (**) (* explicit constructor, /4 width=6/ is too slow *)
-      | lapply (ltpss_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /2 width=6/
-      ]
-    ]
-  | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #_ #_
-    elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HL2K0
-    elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K0 #V0 #_ #_ #H destruct
-    lapply (ldrop_mono … HL2K0 … HLK2) -HL2K0 -HLK2 #H destruct
-  ]
-| #I #L1 #V1 #W1 #T1 #U1 #l1 #l2 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL12 #X #H
-  elim (tpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
-  lapply (cpr_tpss … HV12) #HV
-  lapply (IHTU1 (L2.ⓑ{I}V1) (d+1) e ? T1 ?) // /2 width=1/ #H
-  elim (snta_fwd_correct … H) -H #U2 #HU12
-  @(snta_conv … (ⓑ{I}V2.U1)) /3 width=2/ /3 width=4/ /4 width=4/ (**) (* explicit constructor, /5 width=6/ is too slow *)
-| #L1 #V1 #W11 #W12 #T1 #U1 #l1 #l2 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL12 #X #H
-  elim (tpss_inv_flat1 … H) -H #V2 #Y #HV12 #HY #H destruct
-  elim (tpss_inv_bind1 … HY) -HY #W21 #T2 #HW121 #HT12 #H destruct
-  lapply (cpr_tpss … HV12) #HVV12
-  lapply (IHTU1 L2 d e ? (ⓛW21.T2) ?) -IHTU1 // /2 width=1/ -HW121 -HT12 #H0
-  elim (snta_fwd_correct … H0) #X #H
-  elim (snta_inv_bind1 … H) -H #W #U #l0 #HW #HU #_
-  @(snta_conv … (ⓐV2.ⓛW12.U1)) /3 width=2/ /3 width=4/ /3 width=5/ (**) (* explicit constructor, /4 width=5/ is too slow *)
-| #L1 #V1 #T1 #U1 #W1 #l #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL12 #X #H
-  elim (tpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
-  lapply (cpr_tpss … HV12) #HV
-  elim (snta_fwd_correct h L2 (ⓐV1.T1) (ⓐV1.U1) (l+1) ?) [2: /3 width=4/ ] #U
-  @(snta_conv … (ⓐV2.U1)) /3 width=1/ /4 width=5/ (**) (* explicit constructor, /5 width=5/ is too slow *)
-| #L1 #T1 #U1 #W1 #l1 #l2 #HTU1 #HUW1 #IHTU1 #IHUW1 #L2 #d #e #HL12 #X #H
-  elim (snta_fwd_correct … HTU1) -HTU1 #U #H
-  elim (snta_mono … HUW1 … H) -HUW1 -H #H #_ -U destruct
-  elim (tpss_inv_flat1 … H) -H #U2 #T2 #HU12 #HT12 #H destruct
-  lapply (cpr_tpss … HU12) #HU /4 width=4/
-| #L1 #T1 #U11 #U12 #U #l #_ #HU112 #_ #IHTU11 #IHU12 #L2 #d #e #HL12 #T2 #HT12
-  @(snta_conv … U11) /2 width=5/ (**) (* explicit constructor, /3 width=7/ is too slow *)
-]
-qed.
-
-lemma snta_ltpss_tps_conf: ∀h,L1,T1,U,l. ⦃h, L1⦄ ⊢ T1 :[l] U →
-                           ∀L2,d,e. L1 ▶* [d, e] L2 →
-                           ∀T2. L2 ⊢ T1 ▶ [d, e] T2 → ⦃h, L2⦄ ⊢ T2 :[l] U.
-/3 width=7/ qed.
-
-lemma snta_ltpss_conf: ∀h,L1,T,U,l. ⦃h, L1⦄ ⊢ T :[l] U →
-                       ∀L2,d,e. L1 ▶* [d, e] L2 → ⦃h, L2⦄ ⊢ T :[l] U.
-/2 width=7/ qed.
-
-lemma snta_tpss_conf: ∀h,L,T1,U,l. ⦃h, L⦄ ⊢ T1 :[l] U →
-                      ∀T2,d,e. L ⊢ T1 ▶* [d, e] T2 → ⦃h, L⦄ ⊢ T2 :[l] U.
-/2 width=7/ qed.
-
-lemma snta_tps_conf: ∀h,L,T1,U,l. ⦃h, L⦄ ⊢ T1 :[l] U →
-                     ∀T2,d,e. L ⊢ T1 ▶ [d, e] T2 → ⦃h, L⦄ ⊢ T2 :[l] U.
-/2 width=7/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/snta/snta_snta.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/snta/snta_snta.etc
deleted file mode 100644 (file)
index db71e11..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/dynamic/snta_lift.ma".
-
-(* STRATIFIED NATIVE TYPE ASSIGNMENT ON TERMS *******************************)
-
-(* Main properties **********************************************************)
-
-theorem snta_mono: ∀h,L,T,U1,l1. ⦃h, L⦄ ⊢ T :[l1] U1 →
-                   ∀U2,l2. ⦃h, L⦄ ⊢ T :[l2] U2 → l1 = l2 ∧ L ⊢ U1 ⬌* U2.
-#h #L #T #U1 #l1 #H elim H -L -T -U1 -l1
-[ #L #k #X #l2 #H
-  lapply (snta_inv_sort1 … H) -H * /2 width=1/
-| #L #K #V #W11 #W12 #i #l1 #HLK #_ #HW112 #IHVW11 #X #l2 #H
-  elim (snta_inv_lref1 … H) -H * #K0 #V0 #W21 #W22 #HLK0 #HVW21 #HW212 #HX
-  lapply (ldrop_mono … HLK0 … HLK) -HLK0 #H destruct
-  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
-  elim (IHVW11 … HVW21) -IHVW11 -HVW21 #Hl12 #HW121
-  lapply (cpcs_lift … HLK … HW112 … HW212 ?) // -K -W11 -W21 /3 width=3/
-| #L #K #W #V1 #V #i #l1 #HLK #_ #HWV #IHWV1 #X #l2 #H
-  elim (snta_inv_lref1 … H) -H * #K0 #W0 #V2 #V0 #HLK0 #HW0V2 #HWV0 [2: #HL2 ] #HX
-  lapply (ldrop_mono … HLK0 … HLK) -HLK0 -HLK #H destruct
-  lapply (lift_mono … HWV0 … HWV) -HWV0 -HWV #H destruct
-  elim (IHWV1 … HW0V2) -IHWV1 -HW0V2 /3 width=1/
-| #I #L #V #W1 #T #U1 #l10 #l1 #_ #_ #_ #IHTU1 #X #l2 #H
-  elim (snta_inv_bind1 … H) -H #W2 #U2 #l20 #_ #HTU2 #H
-  elim (IHTU1 … HTU2) -IHTU1 -HTU2 #Hl12 #HU12
-  lapply (cpcs_trans … (ⓑ{I}V.U1) … H) -H /2 width=1/
-| #L #V #W #W1 #T #U1 #l10 #l1 #_ #_ #_ #IHTU1 #X #l2 #H
-  elim (snta_fwd_pure1 … H) -H #U2 #W2 #l20 #_ #HTU2 #H
-  elim (IHTU1 … HTU2) -IHTU1 -HTU2 #Hl12 #HU12
-  lapply (cpcs_trans … (ⓐV.ⓛW1.U1) … H) -H /2 width=1/
-| #L #V #T #U1 #W1 #l1 #_ #_ #IHTU1 #_ #X #l2 #H
-  elim (snta_fwd_pure1 … H) -H #U2 #W2 #l20 #_ #HTU2 #H
-  elim (IHTU1 … HTU2) -IHTU1 -HTU2 #Hl12 #HU12
-  lapply (cpcs_trans … (ⓐV.U1) … H) -H /2 width=1/
-| #L #T #U1 #W1 #l10 #l1 #_ #_ #IHTU1 #_ #X #l2 #H
-  elim (snta_inv_cast1 … H) -H #HTU1
-  elim (IHTU1 … HTU1) -IHTU1 -HTU1 /2 width=1/
-| #L #T #U11 #U12 #V12 #l1 #_ #HU112 #_ #IHTU11 #_ #U2 #l2 #HTU2
-  elim (IHTU11 … HTU2) -IHTU11 -HTU2 #Hl12 #H
-  lapply (cpcs_canc_sn … HU112 … H) -U11 /2 width=1/
-]
-qed-.
-
-(* Advanced properties ******************************************************)
-
-lemma snta_cast_alt: ∀h,L,T,W,U,l. ⦃h, L⦄ ⊢ T :[l] W → ⦃h, L⦄ ⊢ T :[l] U →
-             ⦃h, L⦄ ⊢ ⓝW.T :[l] U.
-#h #L #T #W #U #l #HTW #HTU
-elim (snta_mono … HTW … HTU) #_ #HWU
-elim (snta_fwd_correct … HTU) -HTU /3 width=3/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/snta/snta_thin.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/snta/snta_thin.etc
deleted file mode 100644 (file)
index ceb5375..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/thin_ldrop.ma".
-include "basic_2/equivalence/cpcs_delift.ma".
-include "basic_2/dynamic/snta_lift.ma".
-
-(* STRATIFIED NATIVE TYPE ASSIGNMENT ON TERMS *******************************)
-
-(* Properties on basic local environment thinning ***************************)
-
-(* Note: this is known as the substitution lemma *)
-lemma snta_thin_conf: ∀h,L1,T1,U1,l. ⦃h, L1⦄ ⊢ T1 :[l] U1 →
-                      ∀L2,d,e. ≽ [d, e] L1 → L1 ▼*[d, e] ≡ L2 →
-                      ∃∃T2,U2. ⦃h, L2⦄ ⊢ T2 :[l] U2 &
-                               L1 ⊢ T1 ▼*[d, e] ≡ T2 & L1 ⊢ U1 ▼*[d, e] ≡ U2.
-#h #L1 #T1 #U1 #l #H elim H -L1 -T1 -U1 -l
-[ /2 width=5/
-| #L1 #K1 #V1 #W1 #U1 #i #l #HLK1 #HVW1 #HWU1 #IHVW1 #L2 #d #e #HL1 #HL12
-  elim (lt_or_ge i d) #Hdi [ -HVW1 ]
-  [ lapply (sfr_ldrop_trans_ge … HLK1 … HL1 ?) -HL1 /2 width=2/ #H
-    lapply (sfr_inv_skip … H ?) -H /2 width=1/ #HK1
-    elim (thin_ldrop_conf_le … HL12 … HLK1 ?) -HL12 /2 width=2/ #X #H #HLK2
-    elim (thin_inv_delift1 … H ?) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
-    elim (IHVW1 … HK1 HK12) -IHVW1 -HK1 -HK12 #X2 #W2 #HVW2 #H #HW12
-    lapply (delift_mono … H … HV12) -H -HV12 #H destruct
-    elim (lift_total W2 0 (i+1)) #U2 #HWU2
-    lapply (ldrop_fwd_ldrop2 … HLK1) -V1 #HLK1
-    lapply (delift_lift_ge … HW12 … HLK1 HWU1 … HWU2) -HW12 -HLK1 -HWU1 //
-    >minus_plus <plus_minus_m_m // /3 width=6/
-  | elim (lt_or_ge i (d+e)) #Hide [ -HVW1 | -Hdi -IHVW1 -HL1 ]
-    [ lapply (sfr_ldrop_trans_be_up … HLK1 … HL1 ? ?) -HL1 // /2 width=2/ <minus_n_O #H
-      elim (sfr_inv_bind … H ?) -H /2 width=1/ #HK1 #_
-      elim (thin_ldrop_conf_be … HL12 … HLK1 ? ?) -HL12 /2 width=2/ #K2 #H #HLK2
-      lapply (thin_inv_thin1 … H ?) -H /2 width=1/ #HK12
-      elim (IHVW1 … HK1 HK12) -IHVW1 -HK1 -HK12 #V2 #W2 #HVW2 #HV12 #HW12
-      elim (lift_total V2 0 d) #T2 #HVT2
-      elim (lift_total W2 0 d) #U2 #HWU2
-      elim (lift_total W2 0 (i+1)) #U #HW2U
-      lapply (snta_lift … HVW2 … HLK2 … HVT2 … HWU2) -HVW2 -HLK2 #HTU2
-      lapply (ldrop_fwd_ldrop2 … HLK1) #HLK0
-      lapply (delift_lift_ge … HW12 … HLK0 HWU1 … HW2U) -HW12 -HLK0 -HWU1 // >minus_plus #HU1
-      lapply (lift_conf_be … HWU2 … HW2U ?) -W2 /2 width=1/ #HU2
-      lapply (delift_lift_div_be … HU1 … HU2 ? ?) -U // /2 width=1/ /3 width=8/
-    | lapply (transitive_le … (i+1) Hide ?) /2 width=1/ #Hdei
-      lapply (thin_ldrop_conf_ge … HL12 … HLK1 ?) -HL12 -HLK1 // #HL2K1
-      elim (lift_split … HWU1 d (i+1-e) ? ? ?) -HWU1 // /2 width=1/ #W
-      <plus_minus in ⊢ (??%??→?); /2 width=2/ #HW1
-      <minus_minus // /2 width=2/ -Hdei >commutative_plus <minus_n_n /3 width=6/
-    ]
-  ]
-| #L1 #K1 #W1 #V1 #U1 #i #l #HLK1 #HWV1 #HWU1 #IHWV1 #L2 #d #e #HL1 #HL12
-  elim (lt_or_ge i d) #Hdi [ -HWV1 | -IHWV1 ]
-  [ lapply (sfr_ldrop_trans_ge … HLK1 … HL1 ?) -HL1 /2 width=2/ #H
-    lapply (sfr_inv_skip … H ?) -H /2 width=1/ #HK1
-    elim (thin_ldrop_conf_le … HL12 … HLK1 ?) -HL12 /2 width=2/ #X #H #HLK2
-    elim (thin_inv_delift1 … H ?) -H /2 width=1/ #K2 #W2 #HK12 #HW12 #H destruct
-    elim (IHWV1 … HK1 HK12) -IHWV1 -HK1 -HK12 #X2 #V2 #HWV2 #H #_
-    lapply (delift_mono … H … HW12) -H #H destruct
-    elim (lift_total W2 0 (i+1)) #U2 #HWU2
-    lapply (ldrop_fwd_ldrop2 … HLK1) -HLK1 #HLK1
-    lapply (delift_lift_ge … HW12 … HLK1 HWU1 … HWU2) -HW12 -HLK1 -HWU1 //
-    >minus_plus <plus_minus_m_m // /3 width=6/
-  | elim (lt_or_ge i (d+e)) #Hide [ -HWV1 -HWU1 -HL12 | -Hdi -HL1 ]
-    [ lapply (sfr_inv_ldrop … HLK1 … HL1 ? ?) -HLK1 -HL1 // -Hdi -Hide #H destruct 
-    | lapply (transitive_le … (i+1) Hide ?) /2 width=1/ #Hdei
-      lapply (thin_ldrop_conf_ge … HL12 … HLK1 ?) -HL12 -HLK1 // #HL2K1
-      elim (lift_split … HWU1 d (i+1-e) ? ? ?) -HWU1 // /2 width=1/ #W
-      <plus_minus in ⊢ (??%??→?); /2 width=2/ #HW1
-      <minus_minus // /2 width=2/ -Hdei >commutative_plus <minus_n_n /3 width=6/
-    ]
-  ]
-| #I #L1 #V1 #W1 #T1 #U1 #l1 #l2 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL1 #HL12
-  elim (IHVW1 … HL1 HL12) -IHVW1 #V2 #W2 #HVW2 #HV12 #_
-  elim (IHTU1 (L2.ⓑ{I}V2) (d+1) e ? ?) -IHTU1 /2 width=1/ -HL1 -HL12 #T2 #U2 #HTU2 #HT12 #HU12
-  lapply (delift_lsubs_trans … HT12 (L1.ⓑ{I}V2) ?) -HT12 /2 width=1/
-  lapply (delift_lsubs_trans … HU12 (L1.ⓑ{I}V2) ?) -HU12 /2 width=1/ /3 width=7/
-| #L1 #V1 #W11 #W12 #T1 #U1 #l1 #l2 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL1 #HL12
-  elim (IHVW1 … HL1 HL12) -IHVW1 #V2 #W22 #HVW2 #HV12 #HW122
-  elim (IHTU1 … HL1 HL12) -IHTU1 -HL1 -HL12 #X2 #Y2 #HXY2 #HX2 #HY2
-  elim (delift_inv_bind1 … HX2) -HX2 #W21 #T2 #W121 #HT12 #H destruct
-  elim (delift_inv_bind1 … HY2) -HY2 #X #U2 #HX #HU12 #H destruct
-  lapply (delift_mono … HX … HW122) -HX #H destruct
-  @(ex3_2_intro … (ⓐV2.ⓛW21.T2) (ⓐV2.ⓛW22.U2)) [ /2 width=2/ | 2,3: /3 width=1/ ] (**) (* explict constructor, /4 depth=?/ is too slow *)
-| #L1 #V1 #T1 #U1 #W1 #l #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL1 #HL12
-  elim (IHTU1 … HL1 HL12) -IHTU1 #T2 #U2 #HTU2 #HT12 #HU12
-  elim (IHUW1 … HL1 HL12) -IHUW1 -HL1 -HL12 #X2 #W2 #HXW2 #H #HW12
-  elim (delift_inv_flat1 … H) -H #V2 #Y2 #HV12 #HY2 #H destruct
-  lapply (delift_mono … HY2 … HU12) -HY2 #H destruct /3 width=7/
-| #L1 #T1 #U1 #W1 #l1 #l2 #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL1 #HL12
-  elim (IHTU1 … HL1 HL12) -IHTU1 #T2 #U2 #HTU2 #HT12 #HU12
-  elim (IHUW1 … HL1 HL12) -IHUW1 -HL1 -HL12 #Y2 #W2 #HUW2 #HY2 #HW12
-  lapply (delift_mono … HY2 … HU12) -HY2 #H destruct /3 width=5/
-| #L1 #T1 #U11 #U12 #V1 #l #_ #HU112 #_ #IHT1 #IHU12 #L2 #d #e #HL1 #HL12
-  elim (IHT1 … HL1 HL12) -IHT1 #T2 #U21 #HT2 #HT12 #HU121
-  elim (IHU12 … HL1 HL12) -IHU12 -HL1 #U22 #V2 #HU22 #HU122 #_
-  lapply (thin_cpcs_delift_mono … HU112 … HL12 … HU121 … HU122) -HU112 -HL12 -HU121 /3 width=5/
-]
-qed.
-
-lemma snta_ldrop_conf: ∀h,L1,T1,U1,l. ⦃h, L1⦄ ⊢ T1 :[l] U1 →
-                       ∀L2,d,e. ≽ [d, e] L1 → ⇩[d, e] L1 ≡ L2 →
-                       ∃∃T2,U2. ⦃h, L2⦄ ⊢ T2 :[l] U2 &
-                                L1 ⊢ T1 ▼*[d, e] ≡ T2 & L1 ⊢ U1 ▼*[d, e] ≡ U2.
-/3 width=1/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/sstas/sstas.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/sstas/sstas.etc
deleted file mode 100644 (file)
index 5954145..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The 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 L ⦄ ⊢ break term 46 T1 •* break [ g ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'StaticTypeStar $h $g $L $T1 $T2 }.
-
-include "basic_2/static/ssta.ma".
-
-(* ITERATED STRATIFIED STATIC TYPE ASSIGNMENTON TERMS ***********************)
-
-inductive sstas (h:sh) (g:sd h) (L:lenv): relation term ≝
-| sstas_refl: ∀T,U. ⦃h, L⦄ ⊢ T •[g, 0] U → sstas h g L T T
-| sstas_step: ∀T,U1,U2,l. ⦃h, L⦄ ⊢ T •[g, l+1] U1 → sstas h g L U1 U2 →
-              sstas h g L T U2.
-
-interpretation "stratified unwind (term)"
-   'StaticTypeStar h g L T U = (sstas h g L T U).
-
-(* Basic eliminators ********************************************************)
-
-fact sstas_ind_alt_aux: ∀h,g,L,U2. ∀R:predicate term.
-                        (∀T. ⦃h, L⦄ ⊢ U2 •[g , 0] T → R U2) →
-                        (∀T,U1,l. ⦃h, L⦄ ⊢ T •[g, l + 1] U1 →
-                                  ⦃h, L⦄ ⊢ U1 •* [g] U2 → R U1 → R T
-                        ) →
-                        ∀T,U. ⦃h, L⦄ ⊢ T •*[g] U → U = U2 → R T.
-#h #g #L #U2 #R #H1 #H2 #T #U #H elim H -H -T -U /2 width=2/ /3 width=5/
-qed-.
-
-lemma sstas_ind_alt: ∀h,g,L,U2. ∀R:predicate term.
-                     (∀T. ⦃h, L⦄ ⊢ U2 •[g , 0] T → R U2) →
-                     (∀T,U1,l. ⦃h, L⦄ ⊢ T •[g, l + 1] U1 →
-                               ⦃h, L⦄ ⊢ U1 •* [g] U2 → R U1 → R T
-                     ) →
-                     ∀T. ⦃h, L⦄ ⊢ T •*[g] U2 → R T.
-/3 width=9 by sstas_ind_alt_aux/ qed-.
-                         
-(* Basic inversion lemmas ***************************************************)
-
-fact sstas_inv_sort1_aux: ∀h,g,L,T,U. ⦃h, L⦄ ⊢ T •*[g] U → ∀k. T = ⋆k →
-                          ∀l. deg h g k l → U = ⋆((next h)^l k).
-#h #g #L #T #U #H @(sstas_ind_alt … H) -T
-[ #U0 #HU0 #k #H #l #Hkl destruct
-  elim (ssta_inv_sort1 … HU0) -L #HkO #_ -U0
-  >(deg_mono … Hkl HkO) -g -l //
-| #T0 #U0 #l0 #HTU0 #_ #IHU0 #k #H #l #Hkl destruct
-  elim (ssta_inv_sort1 … HTU0) -L #HkS #H destruct
-  lapply (deg_mono … Hkl HkS) -Hkl #H destruct
-  >(IHU0 (next h k) ? l0) -IHU0 // /2 width=1/ >iter_SO >iter_n_Sm //
-]
-qed.
-
-lemma sstas_inv_sort1: ∀h,g,L,U,k. ⦃h, L⦄ ⊢ ⋆k •*[g] U → ∀l. deg h g k l →
-                       U = ⋆((next h)^l k).
-/2 width=6/ qed-.
-
-fact sstas_inv_bind1_aux: ∀h,g,L,T,U. ⦃h, L⦄ ⊢ T •*[g] U →
-                          ∀J,X,Y. T = ⓑ{J}Y.X →
-                          ∃∃Z. ⦃h, L.ⓑ{J}Y⦄ ⊢ X •*[g] Z & U = ⓑ{J}Y.Z.
-#h #g #L #T #U #H @(sstas_ind_alt … H) -T
-[ #U0 #HU0 #J #X #Y #H destruct
-  elim (ssta_inv_bind1 … HU0) -HU0 #X0 #HX0 #H destruct /3 width=3/
-| #T0 #U0 #l #HTU0 #_ #IHU0 #J #X #Y #H destruct
-  elim (ssta_inv_bind1 … HTU0) -HTU0 #X0 #HX0 #H destruct
-  elim (IHU0 J X0 Y ?) -IHU0 // #X1 #HX01 #H destruct /3 width=4/
-]
-qed.
-
-lemma sstas_inv_bind1: ∀h,g,J,L,Y,X,U. ⦃h, L⦄ ⊢ ⓑ{J}Y.X •*[g] U →
-                       ∃∃Z. ⦃h, L.ⓑ{J}Y⦄ ⊢ X •*[g] Z & U = ⓑ{J}Y.Z.
-/2 width=3/ qed-.
-
-fact sstas_inv_appl1_aux: ∀h,g,L,T,U. ⦃h, L⦄ ⊢ T •*[g] U → ∀X,Y. T = ⓐY.X →
-                          ∃∃Z. ⦃h, L⦄ ⊢ X •*[g] Z & U = ⓐY.Z.
-#h #g #L #T #U #H @(sstas_ind_alt … H) -T
-[ #U0 #HU0 #X #Y #H destruct
-  elim (ssta_inv_appl1 … HU0) -HU0 #X0 #HX0 #H destruct /3 width=3/
-| #T0 #U0 #l #HTU0 #_ #IHU0 #X #Y #H destruct
-  elim (ssta_inv_appl1 … HTU0) -HTU0 #X0 #HX0 #H destruct
-  elim (IHU0 X0 Y ?) -IHU0 // #X1 #HX01 #H destruct /3 width=4/
-]
-qed.
-
-lemma sstas_inv_appl1: ∀h,g,L,Y,X,U. ⦃h, L⦄ ⊢ ⓐY.X •*[g] U →
-                       ∃∃Z. ⦃h, L⦄ ⊢ X •*[g] Z & U = ⓐY.Z.
-/2 width=3/ qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma sstas_fwd_correct: ∀h,g,L,T,U. ⦃h, L⦄ ⊢ T •*[g] U →
-                         ∃∃W. ⦃h, L⦄ ⊢ U •[g, 0] W & ⦃h, L⦄ ⊢ U •*[g] U.
-#h #g #L #T #U #H @(sstas_ind_alt … H) -T /2 width=1/ /3 width=2/
-qed-.
-
-(* Basic_1: removed theorems 7:
-            sty1_bind sty1_abbr sty1_appl sty1_cast2
-           sty1_lift sty1_correct sty1_trans
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/sstas/sstas_lift.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/sstas/sstas_lift.etc
deleted file mode 100644 (file)
index 838c7b6..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/static/ssta_lift.ma".
-include "basic_2/unwind/sstas.ma".
-
-(* ITERATED STRATIFIED STATIC TYPE ASSIGNMENTON TERMS ***********************)
-
-(* Advanced properties ******************************************************)
-
-lemma sstas_total_S: ∀h,g,L,l,T,U. ⦃h, L⦄ ⊢ T•[g, l + 1]U →
-                     ∃∃W. ⦃h, L⦄ ⊢ T •*[g] W & ⦃h, L⦄ ⊢ U •*[g] W.
-#h #g #L #l @(nat_ind_plus … l) -l
-[ #T #U #HTU
-  elim (ssta_fwd_correct … HTU) /4 width=4/
-| #l #IHl #T #U #HTU
-  elim (ssta_fwd_correct … HTU) <minus_plus_m_m #V #HUV
-  elim (IHl … HUV) -IHl -HUV /3 width=4/
-]
-qed-.
-
-(* Properties on relocation *************************************************)
-
-lemma sstas_lift: ∀h,g,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 •*[g] U1 →
-                  ∀L2,d,e. ⇩[d, e] L2 ≡ L1 → ∀T2. ⇧[d, e] T1 ≡ T2 →
-                  ∀U2. ⇧[d, e] U1 ≡ U2 → ⦃h, L2⦄ ⊢ T2 •*[g] U2.
-#h #g #L1 #T1 #U1 #H @(sstas_ind_alt … H) -T1
-[ #T1 #HUT1 #L2 #d #e #HL21 #X #HX #U2 #HU12
-  >(lift_mono … HX … HU12) -X
-  elim (lift_total T1 d e) /3 width=10/
-| #T0 #U0 #l0 #HTU0 #_ #IHU01 #L2 #d #e #HL21 #T2 #HT02 #U2 #HU12
-  elim (lift_total U0 d e) /3 width=10/
-]
-qed.
-
-lemma sstas_inv_lift1: ∀h,g,L2,T2,U2. ⦃h, L2⦄ ⊢ T2 •*[g] U2 →
-                       ∀L1,d,e. ⇩[d, e] L2 ≡ L1 → ∀T1. ⇧[d, e] T1 ≡ T2 →
-                       ∃∃U1. ⦃h, L1⦄ ⊢ T1 •*[g] U1 & ⇧[d, e] U1 ≡ U2.
-#h #g #L2 #T2 #U2 #H @(sstas_ind_alt … H) -T2
-[ #T2 #HUT2 #L1 #d #e #HL21 #U1 #HU12
-  elim (ssta_inv_lift1 … HUT2 … HL21 … HU12) -HUT2 -HL21 /3 width=3/
-| #T0 #U0 #l0 #HTU0 #_ #IHU01 #L1 #d #e #HL21 #U1 #HU12
-  elim (ssta_inv_lift1 … HTU0 … HL21 … HU12) -HTU0 -HU12 #U #HU1 #HU0
-  elim (IHU01 … HL21 … HU0) -IHU01 -HL21 -U0 /3 width=4/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/sstas/sstas_ltpss.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/sstas/sstas_ltpss.etc
deleted file mode 100644 (file)
index e0aa942..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/static/ssta_ltpss.ma".
-include "basic_2/unwind/sstas.ma".
-
-(* ITERATED STRATIFIED STATIC TYPE ASSIGNMENTON TERMS ***********************)
-
-(* Properties about parallel unfold *****************************************)
-
-lemma sstas_ltpss_tpss_conf: ∀h,g,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 •*[g] U1 →
-                             ∀L2,d,e. L1 ▶* [d, e] L2 →
-                             ∀T2. L2 ⊢ T1 ▶* [d, e] T2 →
-                             ∃∃U2. ⦃h, L2⦄ ⊢ T2 •*[g] U2 &
-                                   L2 ⊢ U1 ▶* [d, e] U2.
-#h #g #L1 #T1 #U1 #H @(sstas_ind_alt … H) -T1
-[ #T1 #HUT1 #L2 #d #e #HL12 #U2 #HU12
-  elim (ssta_ltpss_tpss_conf … HUT1 … HL12 … HU12) -HUT1 -HL12 /3 width=3/
-| #T0 #U0 #l0 #HTU0 #_ #IHU01 #L2 #d #e #HL12 #T #HT0
-  elim (ssta_ltpss_tpss_conf … HTU0 … HL12 … HT0) -HTU0 -HT0 #U #HTU #HU0
-  elim (IHU01 … HL12 … HU0) -IHU01 -HL12 -U0 /3 width=4/
-]
-qed.
-
-lemma sstas_ltpss_tps_conf: ∀h,g,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 •*[g] U1 →
-                            ∀L2,d,e. L1 ▶* [d, e] L2 →
-                            ∀T2. L2 ⊢ T1 ▶ [d, e] T2 →
-                            ∃∃U2. ⦃h, L2⦄ ⊢ T2 •*[g] U2 & L2 ⊢ U1 ▶* [d, e] U2.
-/3 width=5/ qed.
-
-lemma sstas_ltpss_conf: ∀h,g,L1,T,U1. ⦃h, L1⦄ ⊢ T •*[g] U1 →
-                        ∀L2,d,e. L1 ▶* [d, e] L2 →
-                        ∃∃U2. ⦃h, L2⦄ ⊢ T •*[g] U2 & L2 ⊢ U1 ▶* [d, e] U2.
-/2 width=5/ qed.
-
-lemma sstas_tpss_conf: ∀h,g,L,T1,U1. ⦃h, L⦄ ⊢ T1 •*[g] U1 →
-                       ∀T2,d,e. L ⊢ T1 ▶* [d, e] T2 →
-                       ∃∃U2. ⦃h, L⦄ ⊢ T2 •*[g] U2 & L ⊢ U1 ▶* [d, e] U2.
-/2 width=5/ qed.
-
-lemma sstas_tps_conf: ∀h,g,L,T1,U1. ⦃h, L⦄ ⊢ T1 •*[g] U1 →
-                      ∀T2,d,e. L ⊢ T1 ▶ [d, e] T2 →
-                      ∃∃U2. ⦃h, L⦄ ⊢ T2 •*[g] U2 & L ⊢ U1 ▶* [d, e] U2.
-/2 width=5/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/sstas/sstas_sstas.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/sstas/sstas_sstas.etc
deleted file mode 100644 (file)
index 2f7e261..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/delift_lift.ma".
-include "basic_2/static/ssta_ssta.ma".
-include "basic_2/unwind/sstas_lift.ma".
-
-(* ITERATED STRATIFIED STATIC TYPE ASSIGNMENTON TERMS ***********************)
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma sstas_inv_O: ∀h,g,L,T,U. ⦃h, L⦄ ⊢ T •*[g] U →
-                   ∀T0. ⦃h, L⦄ ⊢ T •[g , 0] T0 → U = T.
-#h #g #L #T #U #H @(sstas_ind_alt … H) -T //
-#T0 #U0 #l0 #HTU0 #_ #_ #T1 #HT01
-elim (ssta_mono … HTU0 … HT01) <plus_n_Sm #H destruct
-qed-.
-
-lemma sstas_inv_S: ∀h,g,L,T,U. ⦃h, L⦄ ⊢ T •*[g] U →
-                   ∀T0,l. ⦃h, L⦄ ⊢ T •[g , l+1] T0 → ⦃h, L⦄ ⊢ T0 •*[g] U.
-#h #g #L #T #U #H @(sstas_ind_alt … H) -T
-[ #U0 #HU0 #T #l #HUT
-  elim (ssta_mono … HUT … HU0) <plus_n_Sm #H destruct
-| #T0 #U0 #l0 #HTU0 #HU0 #_ #T #l #HT0
-  elim (ssta_mono … HT0 … HTU0) -T0 #_ #H destruct -l0 //
-]
-qed-.
-
-(* Main properties **********************************************************)
-
-theorem sstas_mono: ∀h,g,L,T,U1. ⦃h, L⦄ ⊢ T •*[g] U1 →
-                    ∀U2. ⦃h, L⦄ ⊢ T •*[g] U2 → U1 = U2.
-#h #g #L #T #U1 #H @(sstas_ind_alt … H) -T
-[ #T1 #HUT1 #U2 #HU12
-  >(sstas_inv_O … HU12 … HUT1) -h -L -T1 -U2 //
-| #T0 #U0 #l0 #HTU0 #_ #IHU01 #U2 #HU12
-  lapply (sstas_inv_S … HU12 … HTU0) -T0 -l0 /2 width=1/
-]
-qed-.
-
-(* More advancd inversion lemmas ********************************************)
-
-fact sstas_inv_lref1_aux: ∀h,g,L,T,U. ⦃h, L⦄ ⊢ T •*[g] U → ∀j. T = #j →
-                          ∃∃I,K,V,W. ⇩[0, j] L ≡ K. ⓑ{I}V & ⦃h, K⦄ ⊢ V •*[g] W &
-                                     L ⊢ ▼*[0, j + 1] U ≡ W.
-#h #g #L #T #U #H @(sstas_ind_alt … H) -T
-[ #T #HUT #j #H destruct
-  elim (ssta_inv_lref1 … HUT) -HUT * #K #V #W [2: #l] #HLK #HVW #HVT
-  [ <plus_n_Sm #H destruct
-  | /3 width=12/
-  ]
-| #T0 #U0 #l0 #HTU0 #HU0 #_ #j #H destruct
-  elim (ssta_inv_lref1 … HTU0) -HTU0 * #K #V #W [2: #l] #HLK #HVW #HVU0
-  [ #_ -HVW
-    lapply (ldrop_fwd_ldrop2 … HLK) #H
-    elim (sstas_inv_lift1 … HU0 … H … HVU0) -HU0 -H -HVU0 /3 width=7/
-  | elim (sstas_total_S … HVW) -HVW #T #HVT #HWT
-    lapply (ldrop_fwd_ldrop2 … HLK) #H
-    elim (sstas_inv_lift1 … HU0 … H … HVU0) -HU0 -H -HVU0 #X #HWX
-    >(sstas_mono … HWX … HWT) -X -W /3 width=7/
-  ]
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/sta/sta.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/sta/sta.etc
deleted file mode 100644 (file)
index 20302c6..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/ldrop.ma".
-include "basic_2/static/sh.ma".
-
-(* STATIC TYPE ASSIGNMENT ON TERMS ******************************************)
-
-inductive sta (h:sh): lenv → relation term ≝
-| sta_sort: ∀L,k. sta h L (⋆k) (⋆(next h k))
-| sta_ldef: ∀L,K,V,W,U,i. ⇩[0, i] L ≡ K. ⓓV → sta h K V W →
-            ⇧[0, i + 1] W ≡ U → sta h L (#i) U
-| sta_ldec: ∀L,K,W,V,U,i. ⇩[0, i] L ≡ K. ⓛW → sta h K W V →
-            ⇧[0, i + 1] W ≡ U → sta h L (#i) U
-| sta_bind: ∀I,L,V,T,U. sta h (L. ⓑ{I} V) T U →
-            sta h L (ⓑ{I}V.T) (ⓑ{I}V.U)
-| sta_appl: ∀L,V,T,U. sta h L T U →
-            sta h L (ⓐV.T) (ⓐV.U)
-| sta_cast: ∀L,W,T,U. sta h L T U → sta h L (ⓝW. T) U
-.
-
-interpretation "static type assignment (term)"
-   'StaticType h L T U = (sta h L T U).
-
-(* Basic inversion lemmas ************************************************)
-
-fact sta_inv_sort1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T • U → ∀k0. T = ⋆k0 →
-                        U = ⋆(next h k0).
-#h #L #T #U * -L -T -U
-[ #L #k #k0 #H destruct //
-| #L #K #V #W #U #i #_ #_ #_ #k0 #H destruct
-| #L #K #W #V #U #i #_ #_ #_ #k0 #H destruct
-| #I #L #V #T #U #_ #k0 #H destruct
-| #L #V #T #U #_ #k0 #H destruct
-| #L #W #T #U #_ #k0 #H destruct
-qed.
-
-(* Basic_1: was: sty0_gen_sort *)
-lemma sta_inv_sort1: ∀h,L,U,k. ⦃h, L⦄ ⊢ ⋆k • U → U = ⋆(next h k).
-/2 width=4/ qed-.
-
-fact sta_inv_lref1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T • U → ∀j. T = #j →
-                        (∃∃K,V,W. ⇩[0, j] L ≡ K. ⓓV & ⦃h, K⦄ ⊢ V • W &
-                                  ⇧[0, j + 1] W ≡ U
-                        ) ∨
-                        (∃∃K,W,V. ⇩[0, j] L ≡ K. ⓛW & ⦃h, K⦄ ⊢ W • V &
-                                  ⇧[0, j + 1] W ≡ U
-                        ).
-#h #L #T #U * -L -T -U
-[ #L #k #j #H destruct
-| #L #K #V #W #U #i #HLK #HVW #HWU #j #H destruct /3 width=6/
-| #L #K #W #V #U #i #HLK #HWV #HWU #j #H destruct /3 width=6/
-| #I #L #V #T #U #_ #j #H destruct
-| #L #V #T #U #_ #j #H destruct
-| #L #W #T #U #_ #j #H destruct
-]
-qed.
-
-(* Basic_1: was sty0_gen_lref *)
-lemma sta_inv_lref1: ∀h,L,U,i. ⦃h, L⦄ ⊢ #i • U →
-                     (∃∃K,V,W. ⇩[0, i] L ≡ K. ⓓV & ⦃h, K⦄ ⊢ V • W &
-                               ⇧[0, i + 1] W ≡ U
-                     ) ∨
-                     (∃∃K,W,V. ⇩[0, i] L ≡ K. ⓛW & ⦃h, K⦄ ⊢ W • V &
-                               ⇧[0, i + 1] W ≡ U
-                     ).
-/2 width=3/ qed-.
-
-fact sta_inv_bind1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T • U → ∀J,X,Y. T = ⓑ{J}Y.X →
-                        ∃∃Z. ⦃h, L.ⓑ{J}Y⦄ ⊢ X • Z & U = ⓑ{J}Y.Z.
-#h #L #T #U * -L -T -U
-[ #L #k #J #X #Y #H destruct
-| #L #K #V #W #U #i #_ #_ #_ #J #X #Y #H destruct
-| #L #K #W #V #U #i #_ #_ #_ #J #X #Y #H destruct
-| #I #L #V #T #U #HTU #J #X #Y #H destruct /2 width=3/
-| #L #V #T #U #_ #J #X #Y #H destruct
-| #L #W #T #U #_ #J #X #Y #H destruct
-]
-qed.
-
-(* Basic_1: was: sty0_gen_bind *)
-lemma sta_inv_bind1: ∀h,J,L,Y,X,U. ⦃h, L⦄ ⊢ ⓑ{J}Y.X • U →
-                     ∃∃Z. ⦃h, L.ⓑ{J}Y⦄ ⊢ X • Z & U = ⓑ{J}Y.Z.
-/2 width=3/ qed-.
-
-fact sta_inv_appl1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T • U → ∀X,Y. T = ⓐY.X →
-                        ∃∃Z. ⦃h, L⦄ ⊢ X • Z & U = ⓐY.Z.
-#h #L #T #U * -L -T -U
-[ #L #k #X #Y #H destruct
-| #L #K #V #W #U #i #_ #_ #_ #X #Y #H destruct
-| #L #K #W #V #U #i #_ #_ #_ #X #Y #H destruct
-| #I #L #V #T #U #_ #X #Y #H destruct
-| #L #V #T #U #HTU #X #Y #H destruct /2 width=3/
-| #L #W #T #U #_ #X #Y #H destruct
-]
-qed.
-
-(* Basic_1: was: sty0_gen_appl *)
-lemma sta_inv_appl1: ∀h,L,Y,X,U. ⦃h, L⦄ ⊢ ⓐY.X • U →
-                     ∃∃Z. ⦃h, L⦄ ⊢ X • Z & U = ⓐY.Z.
-/2 width=3/ qed-.
-
-fact sta_inv_cast1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T • U → ∀X,Y. T = ⓝY.X →
-                     ⦃h, L⦄ ⊢ X • U.
-#h #L #T #U * -L -T -U
-[ #L #k #X #Y #H destruct
-| #L #K #V #W #U #i #_ #_ #_ #X #Y #H destruct
-| #L #K #W #V #U #i #_ #_ #_ #X #Y #H destruct
-| #I #L #V #T #U #_ #X #Y #H destruct
-| #L #V #T #U #_ #X #Y #H destruct
-| #L #W #T #U #HTU #X #Y #H destruct //
-]
-qed.
-
-(* Basic_1: was: sty0_gen_cast *)
-lemma sta_inv_cast1: ∀h,L,X,Y,U. ⦃h, L⦄ ⊢ ⓝY.X • U →  ⦃h, L⦄ ⊢ X • U.
-/2 width=4/ qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/sta/sta_lift.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/sta/sta_lift.etc
deleted file mode 100644 (file)
index c9fbda0..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/ldrop_ldrop.ma".
-include "basic_2/static/sta.ma".
-
-(* STATIC TYPE ASSIGNMENT ON TERMS ******************************************)
-
-(* Properties on relocation *************************************************)
-
-(* Basic_1: was: sty0_lift *)
-lemma sta_lift: ∀h,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 • U1 → ∀L2,d,e. ⇩[d, e] L2 ≡ L1 →
-                ∀T2. ⇧[d, e] T1 ≡ T2 → ∀U2. ⇧[d, e] U1 ≡ U2 → ⦃h, L2⦄ ⊢ T2 • U2.
-#h #L1 #T1 #U1 #H elim H -L1 -T1 -U1
-[ #L1 #k #L2 #d #e #HL21 #X1 #H1 #X2 #H2
-  >(lift_inv_sort1 … H1) -X1
-  >(lift_inv_sort1 … H2) -X2 //
-| #L1 #K1 #V1 #W1 #W #i #HLK1 #_ #HW1 #IHVW1 #L2 #d #e #HL21 #X #H #U2 #HWU2
-  elim (lift_inv_lref1 … H) * #Hid #H destruct
-  [ elim (lift_trans_ge … HW1 … HWU2 ?) -W // #W2 #HW12 #HWU2
-    elim (ldrop_trans_le … HL21 … HLK1 ?) -L1 /2 width=2/ #X #HLK2 #H
-    elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K2 #V2 #HK21 #HV12 #H destruct
-    /3 width=8/
-  | lapply (lift_trans_be … HW1 … HWU2 ? ?) -W // /2 width=1/ #HW1U2
-    lapply (ldrop_trans_ge … HL21 … HLK1 ?) -L1 // -Hid /3 width=8/
-  ]
-| #L1 #K1 #W1 #V1 #W #i #HLK1 #_ #HW1 #IHWV1 #L2 #d #e #HL21 #X #H #U2 #HWU2
-  elim (lift_inv_lref1 … H) * #Hid #H destruct
-  [ elim (lift_trans_ge … HW1 … HWU2 ?) -W // <minus_plus #W #HW1 #HWU2
-    elim (ldrop_trans_le … HL21 … HLK1 ?) -L1 /2 width=2/ #X #HLK2 #H
-    elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K2 #W2 #HK21 #HW12 #H destruct
-    lapply (lift_mono … HW1 … HW12) -HW1 #H destruct
-    elim (lift_total V1 (d-i-1) e) /3 width=8/
-  | lapply (lift_trans_be … HW1 … HWU2 ? ?) -W // /2 width=1/ #HW1U2
-    lapply (ldrop_trans_ge … HL21 … HLK1 ?) -L1 // -Hid /3 width=8/
-  ]
-| #I #L1 #V1 #T1 #U1 #_ #IHTU1 #L2 #d #e #HL21 #X1 #H1 #X2 #H2
-  elim (lift_inv_bind1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H destruct
-  elim (lift_inv_bind1 … H2) -H2 #X #U2 #H1 #HU12 #H2 destruct
-  lapply (lift_mono … H1 … HV12) -H1 #H destruct /4 width=5/
-| #L1 #V1 #T1 #U1 #_ #IHTU1 #L2 #d #e #HL21 #X1 #H1 #X2 #H2
-  elim (lift_inv_flat1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H destruct
-  elim (lift_inv_flat1 … H2) -H2 #X #U2 #H1 #HU12 #H2 destruct
-  lapply (lift_mono … H1 … HV12) -H1 #H destruct /4 width=5/
-| #L1 #W1 #T1 #U1 #_ #IHTU1 #L2 #d #e #HL21 #X #H #U2 #HU12
-  elim (lift_inv_flat1 … H) -H #W2 #T2 #_ #HT12 #H destruct /3 width=5/
-]
-qed.
-
-(* Note: apparently this was missing in basic_1 *)
-lemma sta_inv_lift1: ∀h,L2,T2,U2. ⦃h, L2⦄ ⊢ T2 • U2 → ∀L1,d,e. ⇩[d, e] L2 ≡ L1 →
-                     ∀T1. ⇧[d, e] T1 ≡ T2 →
-                     ∃∃U1. ⦃h, L1⦄ ⊢ T1 • U1 & ⇧[d, e] U1 ≡ U2.
-#h #L2 #T2 #U2 #H elim H -L2 -T2 -U2
-[ #L2 #k #L1 #d #e #_ #X #H
-  >(lift_inv_sort2 … H) -X /2 width=3/
-| #L2 #K2 #V2 #W2 #W #i #HLK2 #HVW2 #HW2 #IHVW2 #L1 #d #e #HL21 #X #H
-  elim (lift_inv_lref2 … H) * #Hid #H destruct [ -HVW2 | -IHVW2 ]
-  [ elim (ldrop_conf_lt … HL21 … HLK2 ?) -L2 // #K1 #V1 #HLK1 #HK21 #HV12
-    elim (IHVW2 … HK21 … HV12) -K2 -V2 #W1 #HVW1 #HW12
-    elim (lift_trans_le … HW12 … HW2 ?) -W2 // >minus_plus <plus_minus_m_m // -Hid /3 width=6/
-  | lapply (ldrop_conf_ge … HL21 … HLK2 ?) -L2 // #HL1K2
-    elim (le_inv_plus_l … Hid) -Hid #Hdie #ei
-    elim (lift_split … HW2 d (i-e+1) ? ? ?) -HW2 // [3: /2 width=1/ ]
-    [ #W0 #HW20 <le_plus_minus_comm // >minus_minus_m_m /2 width=1/ /3 width=6/
-    | <le_plus_minus_comm // /2 width=1/
-    ]
-  ]
-| #L2 #K2 #W2 #V2 #W #i #HLK2 #HWV2 #HW2 #IHWV2 #L1 #d #e #HL21 #X #H
-  elim (lift_inv_lref2 … H) * #Hid #H destruct [ -HWV2 | -IHWV2 ]
-  [ elim (ldrop_conf_lt … HL21 … HLK2 ?) -L2 // #K1 #W1 #HLK1 #HK21 #HW12
-    elim (IHWV2 … HK21 … HW12) -K2 #V1 #HWV1 #_
-    elim (lift_trans_le … HW12 … HW2 ?) -W2 // >minus_plus <plus_minus_m_m // -Hid /3 width=6/
-  | lapply (ldrop_conf_ge … HL21 … HLK2 ?) -L2 // #HL1K2
-    elim (le_inv_plus_l … Hid) -Hid #Hdie #ei
-    elim (lift_split … HW2 d (i-e+1) ? ? ?) -HW2 // [3: /2 width=1/ ]
-    [ #W0 #HW20 <le_plus_minus_comm // >minus_minus_m_m /2 width=1/ /3 width=6/
-    | <le_plus_minus_comm // /2 width=1/
-    ]
-  ]
-| #I #L2 #V2 #T2 #U2 #_ #IHTU2 #L1 #d #e #HL21 #X #H
-  elim (lift_inv_bind2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
-  elim (IHTU2 (L1.ⓑ{I}V1) … HT12) -IHTU2 -HT12 /2 width=1/ -HL21 /3 width=5/
-| #L2 #V2 #T2 #U2 #_ #IHTU2 #L1 #d #e #HL21 #X #H
-  elim (lift_inv_flat2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
-  elim (IHTU2 … HL21 … HT12) -L2 -HT12 /3 width=5/
-| #L2 #W2 #T2 #U2 #_ #IHTU2 #L1 #d #e #HL21 #X #H
-  elim (lift_inv_flat2 … H) -H #W1 #T1 #_ #HT12 #H destruct
-  elim (IHTU2 … HL21 … HT12) -L2 -HT12 /3 width=3/
-]
-qed.  
-
-(* Advanced forvard lemmas **************************************************)
-
-(* Basic_1: was: sty0_correct *)
-lemma sta_fwd_correct: ∀h,L,T,U. ⦃h, L⦄ ⊢ T • U → ∃T0. ⦃h, L⦄ ⊢ U • T0.
-#h #L #T #U #H elim H -L -T -U
-[ /2 width=2/
-| #L #K #V #W #W0 #i #HLK #_ #HW0 * #V0 #HWV0
-  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
-  elim (lift_total V0 0 (i+1)) /3 width=10/
-| #L #K #W #V #V0 #i #HLK #HWV #HWV0 #_
-  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
-  elim (lift_total V 0 (i+1)) /3 width=10/
-| #I #L #V #T #U #_ * /3 width=2/
-| #L #V #T #U #_ * #T0 #HUT0 /3 width=2/
-| #L #W #T #U #_ * /2 width=2/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/sta/sta_ltpss.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/sta/sta_ltpss.etc
deleted file mode 100644 (file)
index b0232f5..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/tpss_tpss.ma".
-include "basic_2/unfold/ltpss_tpss.ma".
-include "basic_2/static/sta_lift.ma".
-
-(* STATIC TYPE ASSIGNMENT ON TERMS ******************************************)
-
-(* Properties about parallel unfold *****************************************)
-
-lemma sta_ltpss_tpss_conf: ∀h,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 • U1 →
-                           ∀L2,d,e. L1 ▶* [d, e] L2 →
-                           ∀T2. L2 ⊢ T1 ▶* [d, e] T2 →
-                           ∃∃U2. ⦃h, L2⦄ ⊢ T2 • U2 & L2 ⊢ U1 ▶* [d, e] U2.
-#h #L1 #T1 #U #H elim H -L1 -T1 -U
-[ #L1 #k1 #L2 #d #e #_ #T2 #H
-  >(tpss_inv_sort1 … H) -H /2 width=3/
-| #L1 #K1 #V1 #W1 #U1 #i #HLK1 #HVW1 #HWU1 #IHVW1 #L2 #d #e #HL12 #T2 #H
-  elim (tpss_inv_lref1 … H) -H [ | -HVW1 ]
-  [ #H destruct
-    elim (lt_or_ge i d) #Hdi [ -HVW1 | ]
-    [ elim (ltpss_ldrop_conf_le … HL12 … HLK1 ?) -L1 /2 width=2/ #X #H #HLK2
-      elim (ltpss_inv_tpss11 … H ?) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
-      elim (IHVW1 … HK12 … HV12) -IHVW1 -HK12 -HV12 #W2 #HVW2 #HW12
-      lapply (ldrop_fwd_ldrop2 … HLK2) #H
-      elim (lift_total W2 0 (i+1)) #U2 #HWU2
-      lapply (tpss_lift_ge … HW12 … H … HWU1 … HWU2) // -HW12 -H -HWU1
-      >minus_plus <plus_minus_m_m // -Hdi /3 width=6/
-    | elim (lt_or_ge i (d + e)) #Hide [ -HVW1 | -Hdi -IHVW1 ]
-      [ elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HLK2
-        elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
-        elim (IHVW1 … HK12 … HV12) -IHVW1 -HK12 -HV12 #W2 #HVW2 #HW12
-        lapply (ldrop_fwd_ldrop2 … HLK2) #H
-        elim (lift_total W2 0 (i+1)) #U2 #HWU2
-        lapply (tpss_lift_ge … HW12 … H … HWU1 … HWU2) // -HW12 -H -HWU1 >minus_plus #H
-        lapply (tpss_weak … H d e ? ?) [1,2: normalize [ >commutative_plus <plus_minus_m_m // | /2 width=1/ ]] -Hdi -Hide /3 width=6/
-      | lapply (ltpss_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /3 width=6/
-      ]
-    ]
-  | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #HVW2 #HWT2
-    elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HL2K0
-    elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ #K0 #V0 #HK12 #HV12 #H destruct
-    lapply (ldrop_mono … HL2K0 … HLK2) -HL2K0 #H destruct
-    lapply (ldrop_fwd_ldrop2 … HLK2) -HLK2 #HLK2
-    lapply (tpss_trans_eq … HV12 HVW2) -V2 #HV1W2
-    elim (IHVW1 … HK12 … HV1W2) -IHVW1 -HK12 -HV1W2 #V2 #HWV2 #HW1V2
-    elim (lift_total V2 0 (i+1)) #U2 #HVU2
-    lapply (sta_lift … HWV2 … HLK2 … HWT2 … HVU2) -HWV2 -HWT2 #HTU2
-    lapply (tpss_lift_ge … HW1V2 … HLK2 … HWU1 … HVU2) // -HW1V2 -HLK2 -HWU1 -HVU2 >minus_plus #H
-    lapply (tpss_weak … H d e ? ?) [1,2: normalize [ >commutative_plus <plus_minus_m_m // | /2 width=1/ ]] -Hdi -Hide /2 width=3/
-  ]
-| #L1 #K1 #W1 #V1 #U1 #i #HLK1 #HWV1 #HWU1 #IHWV1 #L2 #d #e #HL12 #T2 #H
-  elim (tpss_inv_lref1 … H) -H [ | -HWV1 -HWU1 -IHWV1 ]
-  [ #H destruct
-    elim (lt_or_ge i d) #Hdi [ -HWV1 ]
-    [ elim (ltpss_ldrop_conf_le … HL12 … HLK1 ?) -L1 /2 width=2/ #X #H #HLK2
-      elim (ltpss_inv_tpss11 … H ?) -H /2 width=1/ #K2 #W2 #HK12 #HW12 #H destruct
-      elim (IHWV1 … HK12 … HW12) -IHWV1 -HK12 #V2 #HWV2 #_
-      lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
-      elim (lift_total W2 0 (i+1)) #U2 #HWU2
-      lapply (tpss_lift_ge … HW12 … HLK … HWU1 … HWU2) // -HW12 -HLK -HWU1
-      >minus_plus <plus_minus_m_m // -Hdi /3 width=6/
-    | elim (lt_or_ge i (d + e)) #Hide [ -HWV1 | -IHWV1 -Hdi ]
-      [ elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HLK2
-        elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ #K2 #W2 #HK12 #HW12 #H destruct
-        elim (IHWV1 … HK12 … HW12) -IHWV1 -HK12 #V2 #HWV2 #_
-        lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
-        elim (lift_total W2 0 (i+1)) #U2 #HWU2
-        lapply (tpss_lift_ge … HW12 … HLK … HWU1 … HWU2) // -HW12 -HLK -HWU1 >minus_plus #H
-        lapply (tpss_weak … H d e ? ?) [1,2: normalize [ >commutative_plus <plus_minus_m_m // | /2 width=1/ ]] -Hdi -Hide /3 width=6/
-      | lapply (ltpss_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /3 width=6/
-      ]
-    ]
-  | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #_ #_
-    elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HL2K0
-    elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K0 #V0 #_ #_ #H destruct
-    lapply (ldrop_mono … HL2K0 … HLK2) -HL2K0 -HLK2 #H destruct
-  ]
-| #I #L1 #V1 #T1 #U1 #_ #IHTU1 #L2 #d #e #HL12 #X #H
-  elim (tpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
-  elim (IHTU1 … HT12) -IHTU1 -HT12 /2 width=1/ -HL12 /3 width=5/
-| #L1 #V1 #T1 #U1 #_ #IHTU1 #L2 #d #e #HL12 #X #H
-  elim (tpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
-  elim (IHTU1 … HT12) -IHTU1 -HT12 // -HL12 /3 width=5/
-| #L1 #W1 #T1 #U1 #_ #IHTU1 #L2 #d #e #HL12 #X #H
-  elim (tpss_inv_flat1 … H) -H #W2 #T2 #HW12 #HT12 #H destruct
-  elim (IHTU1 … HT12) -IHTU1 -HT12 // -HL12 /3 width=3/
-]
-qed.
-
-lemma sta_ltpss_tps_conf: ∀h,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 • U1 →
-                          ∀L2,d,e. L1 ▶* [d, e] L2 →
-                          ∀T2. L2 ⊢ T1 ▶ [d, e] T2 →
-                          ∃∃U2. ⦃h, L2⦄ ⊢ T2 • U2 & L2 ⊢ U1 ▶* [d, e] U2.
-/3 width=5/ qed.
-
-lemma sta_ltpss_conf: ∀h,L1,T,U1. ⦃h, L1⦄ ⊢ T • U1 →
-                      ∀L2,d,e. L1 ▶* [d, e] L2 →
-                      ∃∃U2. ⦃h, L2⦄ ⊢ T • U2 & L2 ⊢ U1 ▶* [d, e] U2.
-/2 width=5/ qed.
-
-lemma sta_tpss_conf: ∀h,L,T1,U1. ⦃h, L⦄ ⊢ T1 • U1 →
-                     ∀T2,d,e. L ⊢ T1 ▶* [d, e] T2 →
-                     ∃∃U2. ⦃h, L⦄ ⊢ T2 • U2 & L ⊢ U1 ▶* [d, e] U2.
-/2 width=5/ qed.
-
-lemma sta_tps_conf: ∀h,L,T1,U1. ⦃h, L⦄ ⊢ T1 • U1 →
-                    ∀T2,d,e. L ⊢ T1 ▶ [d, e] T2 →
-                    ∃∃U2. ⦃h, L⦄ ⊢ T2 • U2 & L ⊢ U1 ▶* [d, e] U2.
-/2 width=5/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/sta/sta_sta.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/sta/sta_sta.etc
deleted file mode 100644 (file)
index cfbb192..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/ldrop_ldrop.ma".
-include "basic_2/static/sta.ma".
-
-(* STATIC TYPE ASSIGNMENT ON TERMS ******************************************)
-
-(* Main properties **********************************************************)
-
-(* Note: apparently this was missing in basic_1 *)
-theorem sta_mono: ∀h,L,T,U1. ⦃h, L⦄ ⊢ T • U1 →
-                  ∀U2. ⦃h, L⦄ ⊢ T • U2 → U1 = U2.
-#h #L #T #U1 #H elim H -L -T -U1
-[ #L #k #X #H >(sta_inv_sort1 … H) -X //
-| #L #K #V #W #U1 #i #HLK #_ #HWU1 #IHVW #U2 #H
-  elim (sta_inv_lref1 … H) -H * #K0 #V0 #W0 #HLK0 #HVW0 #HW0U2
-  lapply (ldrop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct
-  lapply (IHVW … HVW0) -IHVW -HVW0 #H destruct
-  >(lift_mono … HWU1 … HW0U2) -W0 -U1 //
-| #L #K #W #V #U1 #i #HLK #_ #HWU1 #IHWV #U2 #H
-  elim (sta_inv_lref1 … H) -H * #K0 #W0 #V0 #HLK0 #HWV0 #HV0U2
-  lapply (ldrop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct
-  lapply (IHWV … HWV0) -IHWV -HWV0 #H destruct
-  >(lift_mono … HWU1 … HV0U2) -W -U1 //
-| #I #L #V #T #U1 #_ #IHTU1 #X #H
-  elim (sta_inv_bind1 … H) -H #U2 #HTU2 #H destruct /3 width=1/
-| #L #V #T #U1 #_ #IHTU1 #X #H
-  elim (sta_inv_appl1 … H) -H #U2 #HTU2 #H destruct /3 width=1/
-| #L #W #T #U1 #_ #IHTU1 #U2 #H
-  lapply (sta_inv_cast1 … H) -H /2 width=1/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/etc/top/lenv_top.etc b/matita/matita/contribs/lambda_delta/basic_2/etc/top/lenv_top.etc
deleted file mode 100644 (file)
index ab90ceb..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-notation "hvbox( T1 𝟙 break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'RTop $T1 $T2 }.
-
-include "basic_2/grammar/lenv_px.ma".
-
-(* POINTWISE EXTENSION OF TOP RELATION FOR TERMS ****************************)
-
-definition ttop: relation term ≝ λT1,T2. True.
-
-definition ltop: relation lenv ≝ lpx ttop.
-
-interpretation
-  "top reduction (environment)"
-  'RTop L1 L2 = (ltop L1 L2).
-
-(* Basic properties *********************************************************)
-
-lemma ltop_refl: reflexive … ltop.
-/2 width=1/ qed.
-
-lemma ltop_sym: symmetric … ltop.
-/2 width=1/ qed.
-
-lemma ltop_trans: transitive … ltop.
-/2 width=3/ qed.
-
-lemma ltop_append: ∀K1,K2. K1 𝟙 K2 → ∀L1,L2. L1 𝟙 L2 → L1 @@ K1 𝟙 L2 @@ K2.
-/2 width=1/ qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma ltop_inv_atom1: ∀L2. ⋆ 𝟙 L2 → L2 = ⋆.
-/2 width=2 by lpx_inv_atom1/ qed-.
-
-lemma ltop_inv_pair1: ∀K1,I,V1,L2. K1. ⓑ{I} V1 𝟙 L2 →
-                      ∃∃K2,V2. K1 𝟙 K2 & L2 = K2. ⓑ{I} V2.
-#K1 #I #V1 #L2 #H
-elim (lpx_inv_pair1 … H) -H /2 width=4/
-qed-.
-
-lemma ltop_inv_atom2: ∀L1. L1 𝟙 ⋆ → L1 = ⋆.
-/2 width=2 by lpx_inv_atom2/ qed-.
-
-lemma ltop_inv_pair2: ∀L1,K2,I,V2. L1 𝟙 K2. ⓑ{I} V2 →
-                      ∃∃K1,V1. K1 𝟙 K2 & L1 = K1. ⓑ{I} V1.
-#L1 #K2 #I #V2 #H
-elim (lpx_inv_pair2 … H) -H /2 width=4/
-qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma ltop_fwd_length: ∀L1,L2. L1 𝟙 L2 → |L1| = |L2|.
-/2 width=2 by lpx_fwd_length/ qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/grammar/aarity.ma b/matita/matita/contribs/lambda_delta/basic_2/grammar/aarity.ma
deleted file mode 100644 (file)
index 7489da1..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* THE FORMAL SYSTEM λδ: MATITA SOURCE FILES
- * Suggested invocation to start formal specifications with:
- *   - Patience on me to gain peace and perfection! -
- *)
-
-include "ground_2/star.ma".
-include "basic_2/notation.ma".
-
-(* ATOMIC ARITY *************************************************************)
-
-inductive aarity: Type[0] ≝
-  | AAtom: aarity                   (* atomic aarity construction *)
-  | APair: aarity → aarity → aarity (* binary aarity construction *)
-.
-
-interpretation "aarity construction (atomic)"
-   'Item0 = AAtom.
-
-interpretation "aarity construction (binary)"
-   'SnItem2 A1 A2 = (APair A1 A2).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma discr_apair_xy_x: ∀A,B. ②B. A = B → ⊥.
-#A #B elim B -B
-[ #H destruct
-| #Y #X #IHY #_ #H destruct
-  -H >e0 in e1; normalize (**) (* destruct: one quality is not simplified, the destucted equality is not erased *)
-  /2 width=1/
-]
-qed-.
-
-lemma discr_tpair_xy_y: ∀B,A. ②B. A = A → ⊥.
-#B #A elim A -A
-[ #H destruct
-| #Y #X #_ #IHX #H destruct
-  -H (**) (* destruct: the destucted equality is not erased *)
-  /2 width=1/
-]
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma aarity_eq_dec: ∀A1,A2:aarity. Decidable (A1 = A2).
-#A1 elim A1 -A1
-[ #A2 elim A2 -A2 /2 width=1/
-  #B2 #A2 #_ #_ @or_intror #H destruct
-| #B1 #A1 #IHB1 #IHA1 #A2 elim A2 -A2
-  [ -IHB1 -IHA1 @or_intror #H destruct
-  | #B2 #A2 #_ #_ elim (IHB1 B2) -IHB1
-    [ #H destruct elim (IHA1 A2) -IHA1
-      [ #H destruct /2 width=1/
-      | #HA12 @or_intror #H destruct /2 width=1/
-      ]
-    | -IHA1 #HB12 @or_intror #H destruct /2 width=1/
-    ]
-  ]
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/grammar/cl_shift.ma b/matita/matita/contribs/lambda_delta/basic_2/grammar/cl_shift.ma
deleted file mode 100644 (file)
index bbdc8e7..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/grammar/lenv_append.ma".
-
-(* SHIFT OF A CLOSURE *******************************************************)
-
-let rec shift L T on L ≝ match L with
-[ LAtom       ⇒ T
-| LPair L I V ⇒ shift L (-ⓑ{I} V. T)
-].
-
-interpretation "shift (closure)" 'Append L T = (shift L T).
-
-(* Basic properties *********************************************************)
-
-lemma shift_append_assoc: ∀L,K. ∀T:term. (L @@ K) @@ T = L @@ K @@ T.
-#L #K elim K -K // normalize //
-qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma shift_inj: ∀L1,L2. ∀T1,T2:term. L1 @@ T1 = L2 @@ T2 → |L1| = |L2| →
-                 L1 = L2 ∧ T1 = T2.
-#L1 elim L1 -L1
-[ * normalize /2 width=1/
-  #L2 #I2 #V2 #T1 #T2 #_ <plus_n_Sm #H destruct
-| #L1 #H1 #V1 #IH * normalize
-  [ #T1 #T2 #_ <plus_n_Sm #H destruct
-  | #L2 #I2 #V2 #T1 #T2 #H1 #H2
-    elim (IH … H1 ?) -IH -H1 /2 width=1/ -H2 #H1 #H2 destruct /2 width=1/
-  ]
-]
-qed-.
-  
\ No newline at end of file
diff --git a/matita/matita/contribs/lambda_delta/basic_2/grammar/cl_weight.ma b/matita/matita/contribs/lambda_delta/basic_2/grammar/cl_weight.ma
deleted file mode 100644 (file)
index d9569d4..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/grammar/lenv_weight.ma".
-include "basic_2/grammar/cl_shift.ma".
-
-(* WEIGHT OF A CLOSURE ******************************************************)
-
-definition fw: lenv → term → ? ≝ λL,T. #{L} + #{T}.
-
-interpretation "weight (closure)" 'Weight L T = (fw L T).
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was: flt_wf__q_ind *)
-
-(* Basic_1: was: flt_wf_ind *)
-axiom fw_ind: ∀R:relation2 lenv term.
-              (∀L2,T2. (∀L1,T1. #{L1,T1} < #{L2,T2} → R L1 T1) → R L2 T2) →
-              ∀L,T. R L T.
-
-(* Basic_1: was: flt_shift *)
-lemma fw_shift: ∀a,K,I,V,T. #{K. ⓑ{I} V, T} < #{K, ⓑ{a,I} V. T}.
-normalize //
-qed.
-
-lemma tw_shift: ∀L,T. #{L, T} ≤ #{L @@ T}.
-#L elim L //
-#K #I #V #IHL #T
-@transitive_le [3: @IHL |2: /2 width=2/ | skip ]
-qed.
-
-lemma fw_tpair_sn: ∀I,L,V,T. #{L, V} < #{L, ②{I}V.T}.
-normalize in ⊢ (?→?→?→?→?%%); //
-qed.
-
-lemma fw_tpair_dx: ∀I,L,V,T. #{L, T} < #{L, ②{I}V.T}.
-normalize in ⊢ (?→?→?→?→?%%); //
-qed.
-
-lemma fw_tpair_dx_sn: ∀I1,I2,L,V1,V2,T. #{L, V2} < #{L, ②{I1}V1.②{I2}V2.T}.
-normalize in ⊢ (?→?→?→?→?→?→?%%); /2 width=1/
-qed.
-
-lemma fw_tpair_sn_sn_shift: ∀I,I1,I2,L,V1,V2,T.
-                            #{L.ⓑ{I}V1, T} < #{L, ②{I1}V1.②{I2}V2.T}.
-normalize in ⊢ (?→?→?→?→?→?→?→?%%); /3 width=1/ 
-qed.
-
-lemma fw_tpair_sn_dx_shift: ∀I,I1,I2,L,V1,V2,T.
-                            #{L.ⓑ{I}V2, T} < #{L, ②{I1}V1.②{I2}V2.T}.
-normalize in ⊢ (?→?→?→?→?→?→?→?%%); /2 width=1/
-qed.
-
-(* Basic_1: removed theorems 6:
-            flt_thead_sx flt_thead_dx flt_arith0 flt_arith1 flt_arith2 flt_trans
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/grammar/genv.ma b/matita/matita/contribs/lambda_delta/basic_2/grammar/genv.ma
deleted file mode 100644 (file)
index 30b5dfd..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "ground_2/list.ma".
-include "basic_2/grammar/term.ma".
-
-(* GLOBAL ENVIRONMENTS ******************************************************)
-
-(* global environments *)
-definition genv ≝ list2 bind2 term.
-
-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).
-
-interpretation "abbreviation (global environment)"
-   'DxAbbr L T = (cons2 bind2 term Abbr T L).
-
-interpretation "abstraction (global environment)"
-   'DxAbst L T = (cons2 bind2 term Abst T L).
-
-(* Basic properties *********************************************************)
-
-axiom genv_eq_dec: ∀T1,T2:genv. Decidable (T1 = T2).
diff --git a/matita/matita/contribs/lambda_delta/basic_2/grammar/item.ma b/matita/matita/contribs/lambda_delta/basic_2/grammar/item.ma
deleted file mode 100644 (file)
index 323f22f..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "ground_2/arith.ma".
-include "basic_2/notation.ma".
-
-(* ITEMS ********************************************************************)
-
-(* atomic items *)
-inductive item0: Type[0] ≝
-   | Sort: nat → item0 (* sort: starting at 0 *)
-   | LRef: nat → item0 (* reference by index: starting at 0 *)
-   | GRef: nat → item0 (* reference by position: starting at 0 *)
-.
-
-(* binary binding items *)
-inductive bind2: Type[0] ≝
-  | Abbr: bind2 (* abbreviation *)
-  | Abst: bind2 (* abstraction *)
-.
-
-(* binary non-binding items *)
-inductive flat2: Type[0] ≝
-  | Appl: flat2 (* application *)
-  | Cast: flat2 (* explicit type annotation *)
-.
-
-(* binary items *)
-inductive item2: Type[0] ≝
-  | Bind2: bool → bind2 → item2 (* polarized binding item *)
-  | Flat2: flat2 → item2        (* non-binding item *)
-.
-
-(* Basic properties *********************************************************)
-
-axiom item0_eq_dec: ∀I1,I2:item0. Decidable (I1 = I2).
-
-(* Basic_1: was: bind_dec *)
-axiom bind2_eq_dec: ∀I1,I2:bind2. Decidable (I1 = I2).
-
-(* Basic_1: was: flat_dec *)
-axiom flat2_eq_dec: ∀I1,I2:flat2. Decidable (I1 = I2).
-
-(* Basic_1: was: kind_dec *)
-axiom item2_eq_dec: ∀I1,I2:item2. Decidable (I1 = I2).
-
-(* Basic_1: removed theorems 21:
-            s_S s_plus s_plus_sym s_minus minus_s_s s_le s_lt s_inj s_inc
-            s_arith0 s_arith1
-            r_S r_plus r_plus_sym r_minus r_dis s_r r_arith0 r_arith1
-            not_abbr_abst bind_dec_not
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/grammar/lenv.ma b/matita/matita/contribs/lambda_delta/basic_2/grammar/lenv.ma
deleted file mode 100644 (file)
index 9988b3d..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/grammar/term.ma".
-
-(* LOCAL ENVIRONMENTS *******************************************************)
-
-(* local environments *)
-inductive lenv: Type[0] ≝
-| LAtom: lenv                       (* empty *)
-| LPair: lenv → bind2 → term → lenv (* binary binding construction *)
-.
-
-interpretation "sort (local environment)"
-   'Star = LAtom.
-
-interpretation "environment construction (binary)"
-   'DxItem2 L I T = (LPair L I T).
-
-interpretation "environment binding construction (binary)"
-   'DxBind2 L I T = (LPair L I T).
-
-interpretation "abbreviation (local environment)"
-   'DxAbbr L T = (LPair L Abbr T).
-
-interpretation "abstraction (local environment)"
-   'DxAbst L T = (LPair L Abst T).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma destruct_lpair_lpair: ∀I1,I2,L1,L2,V1,V2. L1.ⓑ{I1}V1 = L2.ⓑ{I2}V2 →
-                            ∧∧L1 = L2 & I1 = I2 & V1 = V2.
-#I1 #I2 #L1 #L2 #V1 #V2 #H destruct /2 width=1/
-qed-.
-
-lemma discr_lpair_x_xy: ∀I,V,L. L = L.ⓑ{I}V → ⊥.
-#I #V #L elim L -L
-[ #H destruct
-| #L #J #W #IHL #H
-  elim (destruct_lpair_lpair … H) -H #H1 #H2 #H3 destruct /2 width=1/ (**) (* destruct lemma needed *)
-]
-qed-.
-
-(* Basic_1: removed theorems 2: chead_ctail c_tail_ind *)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/grammar/lenv_append.ma b/matita/matita/contribs/lambda_delta/basic_2/grammar/lenv_append.ma
deleted file mode 100644 (file)
index ab90ddf..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/lenv_length.ma".
-
-(* LOCAL ENVIRONMENTS *******************************************************)
-
-let rec append L K on K ≝ match K with
-[ LAtom       ⇒ L
-| LPair K I V ⇒ (append L K). ⓑ{I} V
-].
-
-interpretation "append (local environment)" 'Append L1 L2 = (append L1 L2).
-
-(* Basic properties *********************************************************)
-
-lemma append_atom_sn: ∀L. ⋆ @@ L = L.
-#L elim L -L normalize //
-qed.
-
-lemma append_assoc: associative … append.
-#L1 #L2 #L3 elim L3 -L3 normalize //
-qed.
-
-lemma append_length: ∀L1,L2. |L1 @@ L2| = |L1| + |L2|.
-#L1 #L2 elim L2 -L2 normalize //
-qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma append_inj_sn: ∀K1,K2,L1,L2. L1 @@ K1 = L2 @@ K2 → |K1| = |K2| →
-                     L1 = L2 ∧ K1 = K2.
-#K1 elim K1 -K1
-[ * normalize /2 width=1/
-  #K2 #I2 #V2 #L1 #L2 #_ <plus_n_Sm #H destruct
-| #K1 #I1 #V1 #IH * normalize
-  [ #L1 #L2 #_ <plus_n_Sm #H destruct
-  | #K2 #I2 #V2 #L1 #L2 #H1 #H2
-    elim (destruct_lpair_lpair … H1) -H1 #H1 #H3 #H4 destruct (**) (* destruct lemma needed *)
-    elim (IH … H1 ?) -IH -H1 // -H2 /2 width=1/
-  ]
-]
-qed-.
-
-(* Note: lemma 750 *)
-lemma append_inj_dx: ∀K1,K2,L1,L2. L1 @@ K1 = L2 @@ K2 → |L1| = |L2| →
-                     L1 = L2 ∧ K1 = K2.
-#K1 elim K1 -K1
-[ * normalize /2 width=1/
-  #K2 #I2 #V2 #L1 #L2 #H1 #H2 destruct
-  normalize in H2; >append_length in H2; #H
-  elim (plus_xySz_x_false … H)
-| #K1 #I1 #V1 #IH * normalize
-  [ #L1 #L2 #H1 #H2 destruct
-    normalize in H2; >append_length in H2; #H
-    elim (plus_xySz_x_false … (sym_eq … H))
-  | #K2 #I2 #V2 #L1 #L2 #H1 #H2
-    elim (destruct_lpair_lpair … H1) -H1 #H1 #H3 #H4 destruct (**) (* destruct lemma needed *)
-    elim (IH … H1 ?) -IH -H1 // -H2 /2 width=1/
-  ]
-]
-qed-.
-
-lemma append_inv_refl_dx: ∀L,K. L @@ K = L → K = ⋆.
-#L #K #H
-elim (append_inj_dx … (⋆) … H ?) //
-qed-.
-
-lemma append_inv_pair_dx: ∀I,L,K,V. L @@ K = L.ⓑ{I}V → K = ⋆.ⓑ{I}V.
-#I #L #K #V #H
-elim (append_inj_dx … (⋆.ⓑ{I}V) … H ?) //
-qed-.
-
-lemma length_inv_pos_dx_append: ∀d,L. |L| = d + 1 →
-                                ∃∃I,K,V. |K| = d & L = ⋆.ⓑ{I}V @@ K.
-#d @(nat_ind_plus … d) -d
-[ #L #H 
-  elim (length_inv_pos_dx … H) -H #I #K #V #H
-  >(length_inv_zero_dx … H) -H #H destruct
-  @ex2_3_intro [4: /2 width=2/ |5: // |1,2,3: skip ] (**) (* /3/ does not work *)
-| #d #IHd #L #H
-  elim (length_inv_pos_dx … H) -H #I #K #V #H
-  elim (IHd … H) -IHd -H #I0 #K0 #V0 #H1 #H2 #H3 destruct
-  @(ex2_3_intro … (K0.ⓑ{I}V)) //
-]
-qed-.
-
-(* Basic_eliminators ********************************************************)
-
-fact lenv_ind_dx_aux: ∀R:predicate lenv. R ⋆ →
-                      (∀I,L,V. R L → R (⋆.ⓑ{I}V @@ L)) →
-                      ∀d,L. |L| = d → R L.
-#R #Hatom #Hpair #d @(nat_ind_plus … d) -d
-[ #L #H >(length_inv_zero_dx … H) -H //
-| #d #IH #L #H
-  elim (length_inv_pos_dx_append … H) -H #I #K #V #H1 #H2 destruct /3 width=1/
-]
-qed-.
-
-lemma lenv_ind_dx: ∀R:predicate lenv. R ⋆ →
-                   (∀I,L,V. R L → R (⋆.ⓑ{I}V @@ L)) →
-                   ∀L. R L.
-/3 width=2 by lenv_ind_dx_aux/ qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma length_inv_pos_sn_append: ∀d,L. 1 + d = |L| →
-                                ∃∃I,K,V. d = |K| & L = ⋆. ⓑ{I}V @@ K.
-#d >commutative_plus @(nat_ind_plus … d) -d
-[ #L #H elim (length_inv_pos_sn … H) -H #I #K #V #H1 #H2 destruct
-  >(length_inv_zero_sn … H1) -K
-  @(ex2_3_intro … (⋆)) // (**) (* explicit constructor *)
-| #d #IHd #L #H elim (length_inv_pos_sn … H) -H #I #K #V #H1 #H2 destruct
-  >H1 in IHd; -H1 #IHd
-  elim (IHd K ?) -IHd // #J #L #W #H1 #H2 destruct
-  @(ex2_3_intro … (L.ⓑ{I}V)) // (**) (* explicit constructor *)
-  >append_length /2 width=1/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/grammar/lenv_length.ma b/matita/matita/contribs/lambda_delta/basic_2/grammar/lenv_length.ma
deleted file mode 100644 (file)
index faf6de0..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/grammar/lenv.ma".
-
-(* LENGTH OF A LOCAL ENVIRONMENT ********************************************)
-
-let rec length L ≝ match L with
-[ LAtom       ⇒ 0
-| LPair L _ _ ⇒ length L + 1
-].
-
-interpretation "length (local environment)" 'card L = (length L).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma length_inv_zero_dx: ∀L. |L| = 0 → L = ⋆.
-* // #L #I #V normalize <plus_n_Sm #H destruct
-qed-.
-
-lemma length_inv_zero_sn: ∀L. 0 = |L| → L = ⋆.
-* // #L #I #V normalize <plus_n_Sm #H destruct
-qed-.
-
-lemma length_inv_pos_dx: ∀d,L. |L| = d + 1 →
-                         ∃∃I,K,V. |K| = d & L = K. ⓑ{I}V.
-#d *
-[ normalize <plus_n_Sm #H destruct
-| #K #I #V #H
-  lapply (injective_plus_l … H) -H /2 width=5/
-]
-qed-.
-
-lemma length_inv_pos_sn: ∀d,L. d + 1 = |L| →
-                         ∃∃I,K,V. d = |K| & L = K. ⓑ{I}V.
-#d *
-[ normalize <plus_n_Sm #H destruct
-| #K #I #V #H
-  lapply (injective_plus_l … H) -H /2 width=5/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/grammar/lenv_px.ma b/matita/matita/contribs/lambda_delta/basic_2/grammar/lenv_px.ma
deleted file mode 100644 (file)
index 4171062..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/lenv_append.ma".
-
-(* POINTWISE EXTENSION OF A CONTEXT-FREE REALTION FOR TERMS *****************)
-
-inductive lpx (R:relation term): relation lenv ≝
-| lpx_stom: lpx R (⋆) (⋆)
-| lpx_pair: ∀I,K1,K2,V1,V2.
-            lpx R K1 K2 → R V1 V2 → lpx R (K1. ⓑ{I} V1) (K2. ⓑ{I} V2)
-.
-
-(* Basic inversion lemmas ***************************************************)
-
-fact lpx_inv_atom1_aux: ∀R,L1,L2. lpx R L1 L2 → L1 = ⋆ → L2 = ⋆.
-#R #L1 #L2 * -L1 -L2
-[ //
-| #I #K1 #K2 #V1 #V2 #_ #_ #H destruct
-]
-qed-.
-
-lemma lpx_inv_atom1: ∀R,L2. lpx R (⋆) L2 → L2 = ⋆.
-/2 width=4 by lpx_inv_atom1_aux/ qed-.
-
-fact lpx_inv_pair1_aux: ∀R,L1,L2. lpx R L1 L2 → ∀I,K1,V1. L1 = K1. ⓑ{I} V1 →
-                        ∃∃K2,V2. lpx R K1 K2 & R V1 V2 & L2 = K2. ⓑ{I} V2.
-#R #L1 #L2 * -L1 -L2
-[ #J #K1 #V1 #H destruct
-| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #L #W #H destruct /2 width=5/
-]
-qed-.
-
-lemma lpx_inv_pair1: ∀R,I,K1,V1,L2. lpx R (K1. ⓑ{I} V1) L2 →
-                     ∃∃K2,V2. lpx R K1 K2 & R V1 V2 & L2 = K2. ⓑ{I} V2.
-/2 width=3 by lpx_inv_pair1_aux/ qed-.
-
-fact lpx_inv_atom2_aux: ∀R,L1,L2. lpx R L1 L2 → L2 = ⋆ → L1 = ⋆.
-#R #L1 #L2 * -L1 -L2
-[ //
-| #I #K1 #K2 #V1 #V2 #_ #_ #H destruct
-]
-qed-.
-
-lemma lpx_inv_atom2: ∀R,L1. lpx R L1 (⋆) → L1 = ⋆.
-/2 width=4 by lpx_inv_atom2_aux/ qed-.
-
-fact lpx_inv_pair2_aux: ∀R,L1,L2. lpx R L1 L2 → ∀I,K2,V2. L2 = K2. ⓑ{I} V2 →
-                        ∃∃K1,V1. lpx R K1 K2 & R V1 V2 & L1 = K1. ⓑ{I} V1.
-#R #L1 #L2 * -L1 -L2
-[ #J #K2 #V2 #H destruct
-| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #K #W #H destruct /2 width=5/
-]
-qed-.
-
-lemma lpx_inv_pair2: ∀R,I,L1,K2,V2. lpx R L1 (K2. ⓑ{I} V2) →
-                     ∃∃K1,V1. lpx R K1 K2 & R V1 V2 & L1 = K1. ⓑ{I} V1.
-/2 width=3 by lpx_inv_pair2_aux/ qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma lpx_fwd_length: ∀R,L1,L2. lpx R L1 L2 → |L1| = |L2|.
-#R #L1 #L2 #H elim H -L1 -L2 normalize //
-qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma lpx_inv_append1: ∀R,L1,K1,L. lpx R (K1 @@ L1) L →
-                       ∃∃K2,L2. lpx R K1 K2 & lpx R L1 L2 & L = K2 @@ L2.
-#R #L1 elim L1 -L1 normalize
-[ #K1 #K2 #HK12
-  @(ex3_2_intro … K2 (⋆)) // (**) (* explicit constructor, /2 width=5/ does not work *) 
-| #L1 #I #V1 #IH #K1 #X #H
-  elim (lpx_inv_pair1 … H) -H #L #V2 #H1 #HV12 #H destruct
-  elim (IH … H1) -IH -H1 #K2 #L2 #HK12 #HL12 #H destruct
-  @(ex3_2_intro … HK12) [2: /2 width=2/ | skip | // ] (* explicit constructor, /3 width=5/ does not work *)
-]
-qed-.
-
-lemma lpx_inv_append2: ∀R,L2,K2,L. lpx R L (K2 @@ L2) →
-                       ∃∃K1,L1. lpx R K1 K2 & lpx R L1 L2 & L = K1 @@ L1.
-#R #L2 elim L2 -L2 normalize
-[ #K2 #K1 #HK12
-  @(ex3_2_intro … K1 (⋆)) // (**) (* explicit constructor, /2 width=5/ does not work *) 
-| #L2 #I #V2 #IH #K2 #X #H
-  elim (lpx_inv_pair2 … H) -H #L #V1 #H1 #HV12 #H destruct
-  elim (IH … H1) -IH -H1 #K1 #L1 #HK12 #HL12 #H destruct
-  @(ex3_2_intro … HK12) [2: /2 width=2/ | skip | // ] (* explicit constructor, /3 width=5/ does not work *)
-]
-qed-.   
-
-(* Basic properties *********************************************************)
-
-lemma lpx_refl: ∀R. reflexive ? R → reflexive … (lpx R).
-#R #HR #L elim L -L // /2 width=1/
-qed.
-
-lemma lpx_sym: ∀R. symmetric ? R → symmetric … (lpx R).
-#R #HR #L1 #L2 #H elim H -H // /3 width=1/
-qed.
-
-lemma lpx_trans: ∀R. Transitive ? R → Transitive … (lpx R).
-#R #HR #L1 #L #H elim H -L //
-#I #K1 #K #V1 #V #_ #HV1 #IHK1 #X #H
-elim (lpx_inv_pair1 … H) -H #K2 #V2 #HK2 #HV2 #H destruct /3 width=3/
-qed.
-
-lemma lpx_conf: ∀R. Confluent ? R → Confluent … (lpx R).
-#R #HR #L0 #L1 #H elim H -L1
-[ #X #H >(lpx_inv_atom1 … H) -X /2 width=3/
-| #I #K0 #K1 #V0 #V1 #_ #HV01 #IHK01 #X #H
-  elim (lpx_inv_pair1 … H) -H #K2 #V2 #HK02 #HV02 #H destruct
-  elim (IHK01 … HK02) -K0 #K #HK1 #HK2
-  elim (HR … HV01 … HV02) -HR -V0 /3 width=5/
-]
-qed.
-
-lemma lpx_TC_inj: ∀R,L1,L2. lpx R L1 L2 → lpx (TC … R) L1 L2. 
-#R #L1 #L2 #H elim H -L1 -L2 // /3 width=1/
-qed.
-
-lemma lpx_TC_step: ∀R,L1,L. lpx (TC … R) L1 L →
-                   ∀L2. lpx R L L2 → lpx (TC … R) L1 L2.
-#R #L1 #L #H elim H -L /2 width=1/
-#I #K1 #K #V1 #V #_ #HV1 #IHK1 #X #H
-elim (lpx_inv_pair1 … H) -H #K2 #V2 #HK2 #HV2 #H destruct /3 width=3/
-qed.
-
-lemma TC_lpx_pair_dx: ∀R. reflexive ? R →
-                      ∀I,K,V1,V2. TC … R V1 V2 →
-                      TC … (lpx R) (K.ⓑ{I}V1) (K.ⓑ{I}V2).
-#R #HR #I #K #V1 #V2 #H elim H -V2
-/4 width=5 by lpx_refl, lpx_pair, inj, step/ (**) (* too slow without trace *)
-qed.
-
-lemma TC_lpx_pair_sn: ∀R. reflexive ? R →
-                      ∀I,V,K1,K2. TC … (lpx R) K1 K2 →
-                      TC … (lpx R) (K1.ⓑ{I}V) (K2.ⓑ{I}V).
-#R #HR #I #V #K1 #K2 #H elim H -K2
-/4 width=5 by lpx_refl, lpx_pair, inj, step/ (**) (* too slow without trace *)
-qed.
-
-lemma lpx_TC: ∀R,L1,L2. TC … (lpx R) L1 L2 → lpx (TC … R) L1 L2.
-#R #L1 #L2 #H elim H -L2 /2 width=1/ /2 width=3/
-qed.
-
-lemma lpx_inv_TC: ∀R. reflexive ? R →
-                  ∀L1,L2. lpx (TC … R) L1 L2 → TC … (lpx R) L1 L2.
-#R #HR #L1 #L2 #H elim H -L1 -L2 /3 width=1/ /3 width=3/
-qed.
-
-lemma lpx_append: ∀R,K1,K2. lpx R K1 K2 → ∀L1,L2. lpx R L1 L2 →
-                  lpx R (L1 @@ K1) (L2 @@ K2).
-#R #K1 #K2 #H elim H -K1 -K2 // /3 width=1/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/grammar/lenv_px_bi.ma b/matita/matita/contribs/lambda_delta/basic_2/grammar/lenv_px_bi.ma
deleted file mode 100644 (file)
index 931d075..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/grammar/lenv_length.ma".
-
-(* POINTWISE EXTENSION OF A FOCALIZED REALTION FOR TERMS ********************)
-
-inductive lpx_bi (R:bi_relation lenv term): relation lenv ≝
-| lpx_bi_stom: lpx_bi R (⋆) (⋆)
-| lpx_bi_pair: ∀I,K1,K2,V1,V2.
-               lpx_bi R K1 K2 → R K1 V1 K2 V2 →
-               lpx_bi R (K1. ⓑ{I} V1) (K2. ⓑ{I} V2)
-.
-
-(* Basic inversion lemmas ***************************************************)
-
-fact lpx_bi_inv_atom1_aux: ∀R,L1,L2. lpx_bi R L1 L2 → L1 = ⋆ → L2 = ⋆.
-#R #L1 #L2 * -L1 -L2
-[ //
-| #I #K1 #K2 #V1 #V2 #_ #_ #H destruct
-]
-qed-.
-
-lemma lpx_bi_inv_atom1: ∀R,L2. lpx_bi R (⋆) L2 → L2 = ⋆.
-/2 width=4 by lpx_bi_inv_atom1_aux/ qed-.
-
-fact lpx_bi_inv_pair1_aux: ∀R,L1,L2. lpx_bi R L1 L2 →
-                           ∀I,K1,V1. L1 = K1. ⓑ{I} V1 →
-                           ∃∃K2,V2. lpx_bi R K1 K2 &
-                                    R K1 V1 K2 V2 & L2 = K2. ⓑ{I} V2.
-#R #L1 #L2 * -L1 -L2
-[ #J #K1 #V1 #H destruct
-| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #L #W #H destruct /2 width=5/
-]
-qed-.
-
-lemma lpx_bi_inv_pair1: ∀R,I,K1,V1,L2. lpx_bi R (K1. ⓑ{I} V1) L2 →
-                        ∃∃K2,V2. lpx_bi R K1 K2 & R K1 V1 K2 V2 &
-                                 L2 = K2. ⓑ{I} V2.
-/2 width=3 by lpx_bi_inv_pair1_aux/ qed-.
-
-fact lpx_bi_inv_atom2_aux: ∀R,L1,L2. lpx_bi R L1 L2 → L2 = ⋆ → L1 = ⋆.
-#R #L1 #L2 * -L1 -L2
-[ //
-| #I #K1 #K2 #V1 #V2 #_ #_ #H destruct
-]
-qed-.
-
-lemma lpx_bi_inv_atom2: ∀R,L1. lpx_bi R L1 (⋆) → L1 = ⋆.
-/2 width=4 by lpx_bi_inv_atom2_aux/ qed-.
-
-fact lpx_bi_inv_pair2_aux: ∀R,L1,L2. lpx_bi R L1 L2 →
-                           ∀I,K2,V2. L2 = K2. ⓑ{I} V2 →
-                           ∃∃K1,V1. lpx_bi R K1 K2 & R K1 V1 K2 V2 &
-                                    L1 = K1. ⓑ{I} V1.
-#R #L1 #L2 * -L1 -L2
-[ #J #K2 #V2 #H destruct
-| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #K #W #H destruct /2 width=5/
-]
-qed-.
-
-lemma lpx_bi_inv_pair2: ∀R,I,L1,K2,V2. lpx_bi R L1 (K2. ⓑ{I} V2) →
-                        ∃∃K1,V1. lpx_bi R K1 K2 & R K1 V1 K2 V2 &
-                                 L1 = K1. ⓑ{I} V1.
-/2 width=3 by lpx_bi_inv_pair2_aux/ qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma lpx_bi_fwd_length: ∀R,L1,L2. lpx_bi R L1 L2 → |L1| = |L2|.
-#R #L1 #L2 #H elim H -L1 -L2 normalize //
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma lpx_bi_refl: ∀R. bi_reflexive ? ? R → reflexive … (lpx_bi R).
-#R #HR #L elim L -L // /2 width=1/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/grammar/lenv_weight.ma b/matita/matita/contribs/lambda_delta/basic_2/grammar/lenv_weight.ma
deleted file mode 100644 (file)
index 59e2e61..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/grammar/term_weight.ma".
-include "basic_2/grammar/lenv.ma".
-
-(* WEIGHT OF A LOCAL ENVIRONMENT ********************************************)
-
-let rec lw L ≝ match L with
-[ LAtom       ⇒ 0
-| LPair L _ V ⇒ lw L + #{V}
-].
-
-interpretation "weight (local environment)" 'Weight L = (lw L).
-
-(* Basic properties *********************************************************)
-
-lemma lw_pair: ∀I,L,V. #{L} < #{(L.ⓑ{I}V)}.
-/3 width=1/ qed.
-
-(* Basic eliminators ********************************************************)
-
-axiom lw_ind: ∀R:predicate lenv.
-              (∀L2. (∀L1. #{L1} < #{L2} → R L1) → R L2) →
-              ∀L. R L.
-
-(* Basic_1: removed theorems 2: clt_cong clt_head clt_thead *)
-(* Basic_1: note: clt_thead should be renamed clt_ctail *)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/grammar/term.ma b/matita/matita/contribs/lambda_delta/basic_2/grammar/term.ma
deleted file mode 100644 (file)
index 5ccb5e4..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/item.ma".
-
-(* TERMS ********************************************************************)
-
-(* terms *)
-inductive term: Type[0] ≝
-  | TAtom: item0 → term               (* atomic item construction *)
-  | TPair: item2 → term → term → term (* binary item construction *)
-.
-
-interpretation "term construction (atomic)"
-   'Item0 I = (TAtom I).
-
-interpretation "term construction (binary)"
-   'SnItem2 I T1 T2 = (TPair I T1 T2).
-
-interpretation "term binding construction (binary)"
-   'SnBind2 a I T1 T2 = (TPair (Bind2 a I) T1 T2).
-
-interpretation "term positive binding construction (binary)"
-   'SnBind2Pos I T1 T2 = (TPair (Bind2 true I) T1 T2).
-
-interpretation "term negative binding construction (binary)"
-   'SnBind2Neg I T1 T2 = (TPair (Bind2 false I) T1 T2).
-
-interpretation "term flat construction (binary)"
-   'SnFlat2 I T1 T2 = (TPair (Flat2 I) T1 T2).
-
-interpretation "sort (term)"
-   'Star k = (TAtom (Sort k)).
-
-interpretation "local reference (term)"
-   'LRef i = (TAtom (LRef i)).
-
-interpretation "global reference (term)"
-   'GRef p = (TAtom (GRef p)).
-
-interpretation "abbreviation (term)"
-   'SnAbbr a T1 T2 = (TPair (Bind2 a Abbr) T1 T2).
-
-interpretation "positive abbreviation (term)"
-   'SnAbbrPos T1 T2 = (TPair (Bind2 true Abbr) T1 T2).
-
-interpretation "negative abbreviation (term)"
-   'SnAbbrNeg T1 T2 = (TPair (Bind2 false Abbr) T1 T2).
-
-interpretation "abstraction (term)"
-   'SnAbst a T1 T2 = (TPair (Bind2 a Abst) T1 T2).
-
-interpretation "positive abstraction (term)"
-   'SnAbstPos T1 T2 = (TPair (Bind2 true Abst) T1 T2).
-
-interpretation "negative abstraction (term)"
-   'SnAbstNeg T1 T2 = (TPair (Bind2 false Abst) T1 T2).
-
-interpretation "application (term)"
-   'SnAppl T1 T2 = (TPair (Flat2 Appl) T1 T2).
-
-interpretation "native type annotation (term)"
-   'SnCast T1 T2 = (TPair (Flat2 Cast) T1 T2).
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was: term_dec *)
-axiom term_eq_dec: ∀T1,T2:term. Decidable (T1 = T2).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma discr_tpair_xy_x: ∀I,T,V. ②{I} V. T = V → ⊥.
-#I #T #V elim V -V
-[ #J #H destruct
-| #J #W #U #IHW #_ #H destruct
-  -H >e0 in e1; normalize (**) (* destruct: one quality is not simplified, the destucted equality is not erased *)
-  /2 width=1/
-]
-qed-.
-
-(* Basic_1: was: thead_x_y_y *)
-lemma discr_tpair_xy_y: ∀I,V,T. ②{I} V. T = T → ⊥.
-#I #V #T elim T -T
-[ #J #H destruct
-| #J #W #U #_ #IHU #H destruct
-  -H (**) (* destruct: the destucted equality is not erased *)
-  /2 width=1/
-]
-qed-.
-
-lemma eq_false_inv_tpair_sn: ∀I,V1,T1,V2,T2.
-                             (②{I} V1. T1 = ②{I} V2. T2 → ⊥) →
-                             (V1 = V2 → ⊥) ∨ (V1 = V2 ∧ (T1 = T2 → ⊥)).
-#I #V1 #T1 #V2 #T2 #H
-elim (term_eq_dec V1 V2) /3 width=1/ #HV12 destruct
-@or_intror @conj // #HT12 destruct /2 width=1/ 
-qed-.
-
-lemma eq_false_inv_tpair_dx: ∀I,V1,T1,V2,T2.
-                             (②{I} V1. T1 = ②{I} V2. T2 → ⊥) →
-                             (T1 = T2 → ⊥) ∨ (T1 = T2 ∧ (V1 = V2 → ⊥)).
-#I #V1 #T1 #V2 #T2 #H
-elim (term_eq_dec T1 T2) /3 width=1/ #HT12 destruct
-@or_intror @conj // #HT12 destruct /2 width=1/
-qed-.
-
-lemma eq_false_inv_beta: ∀a,V1,V2,W1,W2,T1,T2.
-                         (ⓐV1. ⓛ{a}W1. T1 = ⓐV2. ⓛ{a}W2 .T2 → ⊥) →
-                         (W1 = W2 → ⊥) ∨
-                         (W1 = W2 ∧ (ⓓ{a}V1. T1 = ⓓ{a}V2. T2 → ⊥)).
-#a #V1 #V2 #W1 #W2 #T1 #T2 #H
-elim (eq_false_inv_tpair_sn … H) -H
-[ #HV12 elim (term_eq_dec W1 W2) /3 width=1/
-  #H destruct @or_intror @conj // #H destruct /2 width=1/
-| * #H1 #H2 destruct
-  elim (eq_false_inv_tpair_sn … H2) -H2 /3 width=1/
-  * #H #HT12 destruct
-  @or_intror @conj // #H destruct /2 width=1/
-]
-qed.
-
-(* Basic_1: removed theorems 3:
-            not_void_abst not_abbr_void not_abst_void
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/grammar/term_simple.ma b/matita/matita/contribs/lambda_delta/basic_2/grammar/term_simple.ma
deleted file mode 100644 (file)
index 328dc55..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/term.ma".
-
-(* SIMPLE (NEUTRAL) TERMS ***************************************************)
-
-inductive simple: predicate term ≝
-   | simple_atom: ∀I. simple (⓪{I})
-   | simple_flat: ∀I,V,T. simple (ⓕ{I} V. T)
-.
-
-interpretation "simple (term)" 'Simple T = (simple T).
-
-(* Basic inversion lemmas ***************************************************)
-(*
-lemma mt: ∀R1,R2:Prop. (R1 → R2) → (R2 → ⊥) → R1 → ⊥.
-/3 width=1/ qed.
-*)
-fact simple_inv_bind_aux: ∀T. 𝐒⦃T⦄ → ∀a,J,W,U. T = ⓑ{a,J} W. U → ⊥.
-#T * -T
-[ #I #a #J #W #U #H destruct
-| #I #V #T #a #J #W #U #H destruct
-]
-qed.
-
-lemma simple_inv_bind: ∀a,I,V,T. 𝐒⦃ⓑ{a,I} V. T⦄ → ⊥.
-/2 width=7/ qed-. (**) (* auto fails if mt is enabled *)
-
-lemma simple_inv_pair: ∀I,V,T.  𝐒⦃②{I}V.T⦄ → ∃J. I = Flat2 J.
-* /2 width=2/ #a #I #V #T #H
-elim (simple_inv_bind … H)
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/grammar/term_vector.ma b/matita/matita/contribs/lambda_delta/basic_2/grammar/term_vector.ma
deleted file mode 100644 (file)
index 7169d1a..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "ground_2/list.ma".
-include "basic_2/grammar/term_simple.ma".
-
-(* TERMS ********************************************************************)
-
-let rec applv Vs T on Vs ≝
-  match Vs with
-  [ nil        ⇒ T
-  | cons hd tl ⇒ ⓐhd. (applv tl T)
-  ].
-
-interpretation "application o vevtor (term)"
-   'SnApplV Vs T = (applv Vs T).
-
-(* properties concerning simple terms ***************************************)
-
-lemma applv_simple: ∀T,Vs.  𝐒⦃T⦄ → 𝐒⦃ⒶVs.T⦄.
-#T * //
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/grammar/term_weight.ma b/matita/matita/contribs/lambda_delta/basic_2/grammar/term_weight.ma
deleted file mode 100644 (file)
index d8f39a3..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/grammar/term.ma".
-
-(* WEIGHT OF A TERM *********************************************************)
-
-let rec tw T ≝ match T with
-[ TAtom _     ⇒ 1
-| TPair _ V T ⇒ tw V + tw T + 1
-].
-
-interpretation "weight (term)" 'Weight T = (tw T).
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was: tweight_lt *)
-lemma tw_pos: ∀T. 1 ≤ #{T}.
-#T elim T -T //
-qed.
-
-(* Basic eliminators ********************************************************)
-
-axiom tw_ind: ∀R:predicate term.
-              (∀T2. (∀T1. #{T1} < #{T2} → R T1) → R T2) →
-              ∀T. R T.
-
-(* Basic_1: removed theorems 11:
-            wadd_le wadd_lt wadd_O weight_le weight_eq weight_add_O
-            weight_add_S tlt_trans tlt_head_sx tlt_head_dx tlt_wf_ind
-            removed local theorems 1: q_ind
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/grammar/tshf.ma b/matita/matita/contribs/lambda_delta/basic_2/grammar/tshf.ma
deleted file mode 100644 (file)
index a8873c1..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/grammar/term_simple.ma".
-
-(* SAME HEAD TERM FORMS *****************************************************)
-
-inductive tshf: relation term ≝
-   | tshf_atom: ∀I. tshf (⓪{I}) (⓪{I})
-   | tshf_abbr: ∀V1,V2,T1,T2. tshf (-ⓓV1. T1) (-ⓓV2. T2)
-   | tshf_abst: ∀a,V1,V2,T1,T2. tshf (ⓛ{a}V1. T1) (ⓛ{a}V2. T2)
-   | tshf_appl: ∀V1,V2,T1,T2. tshf T1 T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄ →
-                tshf (ⓐV1. T1) (ⓐV2. T2)
-.
-
-interpretation "same head form (term)" 'napart T1 T2 = (tshf T1 T2).
-
-(* Basic properties *********************************************************)
-
-lemma tshf_sym: ∀T1,T2. T1 ≈ T2 → T2 ≈ T1.
-#T1 #T2 #H elim H -T1 -T2 /2 width=1/
-qed.
-
-lemma tshf_refl2: ∀T1,T2. T1 ≈ T2 → T2 ≈ T2.
-#T1 #T2 #H elim H -T1 -T2 // /2 width=1/
-qed.
-
-lemma tshf_refl1: ∀T1,T2. T1 ≈ T2 → T1 ≈ T1.
-/3 width=2/ qed.
-
-lemma simple_tshf_repl_dx: ∀T1,T2. T1 ≈ T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄.
-#T1 #T2 #H elim H -T1 -T2 //
-[ #V1 #V2 #T1 #T2 #H
-  elim (simple_inv_bind … H)
-| #a #V1 #V2 #T1 #T2 #H
-  elim (simple_inv_bind … H)
-]
-qed. (**) (* remove from index *)
-
-lemma simple_tshf_repl_sn: ∀T1,T2. T1 ≈ T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄.
-/3 width=3/ qed-.
-
-(* Basic inversion lemmas ***************************************************)
-
-fact tshf_inv_bind1_aux: ∀T1,T2. T1 ≈ T2 → ∀a,I,W1,U1. T1 = ⓑ{a,I}W1.U1 →
-                         ∃∃W2,U2. T2 = ⓑ{a,I}W2. U2 &
-                                  (Bind2 a I = Bind2 false Abbr ∨ I = Abst).
-#T1 #T2 * -T1 -T2
-[ #J #a #I #W1 #U1 #H destruct
-| #V1 #V2 #T1 #T2 #a #I #W1 #U1 #H destruct /3 width=3/
-| #b #V1 #V2 #T1 #T2 #a #I #W1 #U1 #H destruct /3 width=3/
-| #V1 #V2 #T1 #T2 #_ #_ #_ #a #I #W1 #U1 #H destruct
-]
-qed.
-
-lemma tshf_inv_bind1: ∀a,I,W1,U1,T2. ⓑ{a,I}W1.U1 ≈ T2 →
-                      ∃∃W2,U2. T2 = ⓑ{a,I}W2. U2 &
-                               (Bind2 a I = Bind2 false Abbr ∨ I = Abst).
-/2 width=5/ qed-.
-
-fact tshf_inv_flat1_aux: ∀T1,T2. T1 ≈ T2 → ∀I,W1,U1. T1 = ⓕ{I}W1.U1 →
-                         ∃∃W2,U2. U1 ≈ U2 & 𝐒⦃U1⦄ & 𝐒⦃U2⦄ &
-                                  I = Appl & T2 = ⓐW2. U2.
-#T1 #T2 * -T1 -T2
-[ #J #I #W1 #U1 #H destruct
-| #V1 #V2 #T1 #T2 #I #W1 #U1 #H destruct
-| #a #V1 #V2 #T1 #T2 #I #W1 #U1 #H destruct
-| #V1 #V2 #T1 #T2 #HT12 #HT1 #HT2 #I #W1 #U1 #H destruct /2 width=5/
-]
-qed.
-
-lemma tshf_inv_flat1: ∀I,W1,U1,T2. ⓕ{I}W1.U1 ≈ T2 →
-                      ∃∃W2,U2. U1 ≈ U2 & 𝐒⦃U1⦄ & 𝐒⦃U2⦄ &
-                               I = Appl & T2 = ⓐW2. U2.
-/2 width=4/ qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/grammar/tstc.ma b/matita/matita/contribs/lambda_delta/basic_2/grammar/tstc.ma
deleted file mode 100644 (file)
index 78a9b49..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/grammar/term_simple.ma".
-
-(* SAME TOP TERM CONSTRUCTOR ************************************************)
-
-inductive tstc: relation term ≝
-   | tstc_atom: ∀I. tstc (⓪{I}) (⓪{I})
-   | tstc_pair: ∀I,V1,V2,T1,T2. tstc (②{I} V1. T1) (②{I} V2. T2)
-.
-
-interpretation "same top constructor (term)" 'Iso T1 T2 = (tstc T1 T2).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact tstc_inv_atom1_aux: ∀T1,T2. T1 ≃ T2 → ∀I. T1 = ⓪{I} → T2 = ⓪{I}.
-#T1 #T2 * -T1 -T2 //
-#J #V1 #V2 #T1 #T2 #I #H destruct
-qed.
-
-(* Basic_1: was: iso_gen_sort iso_gen_lref *)
-lemma tstc_inv_atom1: ∀I,T2. ⓪{I} ≃ T2 → T2 = ⓪{I}.
-/2 width=3/ qed-.
-
-fact tstc_inv_pair1_aux: ∀T1,T2. T1 ≃ T2 → ∀I,W1,U1. T1 = ②{I}W1.U1 →
-                         ∃∃W2,U2. T2 = ②{I}W2. U2.
-#T1 #T2 * -T1 -T2
-[ #J #I #W1 #U1 #H destruct
-| #J #V1 #V2 #T1 #T2 #I #W1 #U1 #H destruct /2 width=3/
-]
-qed.
-
-(* Basic_1: was: iso_gen_head *)
-lemma tstc_inv_pair1: ∀I,W1,U1,T2. ②{I}W1.U1 ≃ T2 →
-                      ∃∃W2,U2. T2 = ②{I}W2. U2.
-/2 width=5/ qed-.
-
-fact tstc_inv_atom2_aux: ∀T1,T2. T1 ≃ T2 → ∀I. T2 = ⓪{I} → T1 = ⓪{I}.
-#T1 #T2 * -T1 -T2 //
-#J #V1 #V2 #T1 #T2 #I #H destruct
-qed.
-
-lemma tstc_inv_atom2: ∀I,T1. T1 ≃ ⓪{I} → T1 = ⓪{I}.
-/2 width=3/ qed-.
-
-fact tstc_inv_pair2_aux: ∀T1,T2. T1 ≃ T2 → ∀I,W2,U2. T2 = ②{I}W2.U2 →
-                         ∃∃W1,U1. T1 = ②{I}W1. U1.
-#T1 #T2 * -T1 -T2
-[ #J #I #W2 #U2 #H destruct
-| #J #V1 #V2 #T1 #T2 #I #W2 #U2 #H destruct /2 width=3/
-]
-qed.
-
-lemma tstc_inv_pair2: ∀I,T1,W2,U2. T1 ≃ ②{I}W2.U2 →
-                      ∃∃W1,U1. T1 = ②{I}W1. U1.
-/2 width=5/ qed-.
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was: iso_refl *)
-lemma tstc_refl: ∀T. T ≃ T.
-#T elim T -T //
-qed.
-
-lemma tstc_sym: ∀T1,T2. T1 ≃ T2 → T2 ≃ T1.
-#T1 #T2 #H elim H -T1 -T2 //
-qed.
-
-lemma tstc_dec: ∀T1,T2. Decidable (T1 ≃ T2).
-* #I1 [2: #V1 #T1 ] * #I2 [2,4: #V2 #T2 ]
-[ elim (item2_eq_dec I1 I2) #HI12
-  [ destruct /2 width=1/
-  | @or_intror #H
-    elim (tstc_inv_pair1 … H) -H #V #T #H destruct /2 width=1/
-  ]
-| @or_intror #H
-  lapply (tstc_inv_atom1 … H) -H #H destruct
-| @or_intror #H
-  lapply (tstc_inv_atom2 … H) -H #H destruct
-| elim (item0_eq_dec I1 I2) #HI12
-  [ destruct /2 width=1/
-  | @or_intror #H
-    lapply (tstc_inv_atom2 … H) -H #H destruct /2 width=1/
-  ]
-]
-qed.
-
-lemma simple_tstc_repl_dx: ∀T1,T2. T1 ≃ T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄.
-#T1 #T2 * -T1 -T2 //
-#I #V1 #V2 #T1 #T2 #H
-elim (simple_inv_pair … H) -H #J #H destruct //
-qed. (**) (* remove from index *)
-
-lemma simple_tstc_repl_sn: ∀T1,T2. T1 ≃ T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄.
-/3 width=3/ qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/grammar/tstc_tstc.ma b/matita/matita/contribs/lambda_delta/basic_2/grammar/tstc_tstc.ma
deleted file mode 100644 (file)
index df6fe37..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/grammar/tstc.ma".
-
-(* SAME TOP TERM CONSTRUCTOR ************************************************)
-
-(* Main properties **********************************************************)
-
-(* Basic_1: was: iso_trans *)
-theorem tstc_trans: ∀T1,T. T1 ≃ T → ∀T2. T ≃ T2 → T1 ≃ T2.
-#T1 #T * -T1 -T //
-#I #V1 #V #T1 #T #X #H
-elim (tstc_inv_pair1 … H) -H #V2 #T2 #H destruct //
-qed.
-
-theorem tstc_canc_sn: ∀T,T1. T ≃ T1 → ∀T2. T ≃ T2 → T1 ≃ T2.
-/3 width=3/ qed.
-
-theorem tstc_canc_dx: ∀T1,T. T1 ≃ T → ∀T2. T2 ≃ T → T1 ≃ T2.
-/3 width=3/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/grammar/tstc_vector.ma b/matita/matita/contribs/lambda_delta/basic_2/grammar/tstc_vector.ma
deleted file mode 100644 (file)
index 1e35292..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/grammar/term_vector.ma".
-include "basic_2/grammar/tstc.ma".
-
-(* SAME TOP TERM CONSTRUCTOR ************************************************)
-
-(* Advanced inversion lemmas ************************************************)
-
-(* Basic_1: was only: iso_flats_lref_bind_false iso_flats_flat_bind_false *)
-lemma tstc_inv_bind_appls_simple: ∀a,I,Vs,V2,T1,T2. ⒶVs.T1 ≃ ⓑ{a,I} V2. T2 →
-                                  𝐒⦃T1⦄ → ⊥.
-#a #I #Vs #V2 #T1 #T2 #H
-elim (tstc_inv_pair2 … H) -H #V0 #T0
-elim Vs -Vs normalize
-[ #H destruct #H
-  @(simple_inv_bind … H)
-| #V #Vs #_ #H destruct
-]
-qed.
-
diff --git a/matita/matita/contribs/lambda_delta/basic_2/names.txt b/matita/matita/contribs/lambda_delta/basic_2/names.txt
deleted file mode 100644 (file)
index 6c34328..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-NAMING CONVENTIONS FOR METAVARIABLES
-
-A,B    : arity
-C,D    : candidate of reducibility
-E,F    : RTM environment
-G      : global environment 
-H      : reserved: transient premise
-IH     : reserved: inductive premise
-I,J    : item
-K,L    : local environment
-M,N    : reserved: future use
-O,P,Q  :
-R      : generic predicate (relation)
-S      : RTM stack
-T,U,V,W: term
-X,Y,Z  : reserved: transient objet denoted by a capital letter
-
-a,b    : binder polarity
-c      : reserved: future use (lambda_delta 3)
-d      : relocation depth
-e      : relocation height
-f      :
-g      : sort degree parameter
-h      : sort hierarchy parameter
-i,j    : local reference position index (de Bruijn's)
-k      : sort index
-l      : term degree
-m,n    : reserved: future use
-o      :
-p,q    : global reference position
-r,s    :
-t,u    : local reference position level (de Bruijn's)
-v,w    :
-x,y,z  : reserved: transient objet denoted by a small letter
-
-NAMING CONVENTIONS FOR CONSTRUCTORS
-
-0: atomic
-2: binary
-
-A: application to vector
-
-a: application
-b: binder
-d: abbreviation
-f: flat
-l: abstraction
-n: native type annotation
diff --git a/matita/matita/contribs/lambda_delta/basic_2/notation.ma b/matita/matita/contribs/lambda_delta/basic_2/notation.ma
deleted file mode 100644 (file)
index 3ff8f21..0000000
+++ /dev/null
@@ -1,475 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-(* Grammar ******************************************************************)
-
-notation "⓪"
- non associative with precedence 90
- for @{ 'Item0 }.
-
-notation "hvbox( ⓪ { term 46 I } )"
- non associative with precedence 90
- for @{ 'Item0 $I }.
-
-notation "⋆"
- non associative with precedence 90
- for @{ 'Star }.
-
-notation "hvbox( ⋆ term 90 k )"
- non associative with precedence 90
- for @{ 'Star $k }.
-
-notation "hvbox( # term 90 i )"
- non associative with precedence 90
- for @{ 'LRef $i }.
-
-notation "hvbox( § term 90 p )"
- non associative with precedence 90
- 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 , 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 } 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 } 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( T . break ④ { term 46 I } break { term 46 T1 , break term 46 T2 , break term 46 T3 } )"
- non associative with precedence 50
- for @{ 'DxItem4 $T $I $T1 $T2 $T3 }.
-
-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( L ⊢ break term 46 T1 ≈ break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'Hom $L $T1 $T2 }.
-
-notation "hvbox( T1 ≃ break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'Iso $T1 $T2 }.
-
-(* Substitution *************************************************************)
-
-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( T1 break ≼ [ term 46 d , break term 46 e ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'SubEq $T1 $d $e $T2 }.
-
-notation "hvbox( ≽ [ term 46 d , break term 46 e ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'SubEqBottom $d $e $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 @{ 'RestSupTerm $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 }.
-
-notation "hvbox( L ⊢ break term 46 T1 break ▶ [ term 46 d , break term 46 e ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'PSubst $L $T1 $d $e $T2 }.
-
-(* Unfold *******************************************************************)
-
-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 @{ 'RestSupTermPlus $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 @{ 'RestSupTermStar $L1 $T1 $L2 $T2 }.
-
-notation "hvbox( T1 break ▶ * [ term 46 d , break term 46 e ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'PSubstStar $T1 $d $e $T2 }.
-
-notation "hvbox( L ⊢ break term 46 T1 break ▶ * [ term 46 d , break term 46 e ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'PSubstStar $L $T1 $d $e $T2 }.
-
-notation "hvbox( L ⊢ break term 46 T1 break ▶ ▶ * [ term 46 d , break term 46 e ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'PSubstStarAlt $L $T1 $d $e $T2 }.
-
-notation "hvbox( T1 break ⊢ ▶ * [ term 46 d , break term 46 e ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'PSubstStarSn $T1 $d $e $T2 }.
-
-notation "hvbox( T1 break ⊢ ▶ ▶ * [ term 46 d , break term 46 e ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'PSubstStarSnAlt $T1 $d $e $T2 }.
-
-notation "hvbox( ▼ * [ term 46 d , break term 46 e ] break term 46 T1 ≡ break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'TSubst $T1 $d $e $T2 }.
-
-notation "hvbox( L ⊢ break ▼ * [ term 46 d , break term 46 e ] break term 46 T1 ≡ break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'TSubst $L $T1 $d $e $T2 }.
-
-notation "hvbox( ▼ ▼ * [ term 46 d , break term 46 e ] break term 46 T1 ≡ break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'TSubstAlt $T1 $d $e $T2 }.
-
-notation "hvbox( L ⊢ break ▼ ▼ * [ term 46 d , break term 46 e ] break term 46 T1 ≡ break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'TSubstAlt $L $T1 $d $e $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 $L $T1 $T2 }.
-
-notation "hvbox( h ⊢ break term 46 L1 • ⊑ [ term 46 g ] break term 46 L2 )"
-   non associative with precedence 45
-   for @{ 'CrSubEqS $h $g $L1 $L2 }.
-
-(* Unwind *******************************************************************)
-
-notation "hvbox( L1 ⊢ ⧫ * break term 46 T ≡ break term 46 L2 )"
-   non associative with precedence 45
-   for @{ 'Unwind $L1 $T $L2 }.
-
-(* Reducibility *************************************************************)
-
-notation "hvbox( L ⊢ break 𝐑 ⦃ term 46 T ⦄ )"
-   non associative with precedence 45
-   for @{ 'Reducible $L $T }.
-
-notation "hvbox( L ⊢ break 𝐈 ⦃ term 46 T ⦄ )"
-   non associative with precedence 45
-   for @{ 'NotReducible $L $T }.
-
-notation "hvbox( L ⊢ break 𝐍 ⦃ term 46 T ⦄ )"
-   non associative with precedence 45
-   for @{ 'Normal $L $T }.
-
-(* this might be removed *)
-notation "hvbox( 𝐇𝐑 ⦃ term 46 T ⦄ )"
-   non associative with precedence 45
-   for @{ 'HdReducible $T }.
-
-(* this might be removed *)
-notation "hvbox( L ⊢ break 𝐇𝐑 ⦃ term 46 T ⦄ )"
-   non associative with precedence 45
-   for @{ 'HdReducible $L $T }.
-
-(* this might be removed *)
-notation "hvbox( 𝐇𝐈 ⦃ term 46 T ⦄ )"
-   non associative with precedence 45
-   for @{ 'NotHdReducible $T }.
-
-(* this might be removed *)
-notation "hvbox( L ⊢ break 𝐇𝐈 ⦃ term 46 T ⦄ )"
-   non associative with precedence 45
-   for @{ 'NotHdReducible $L $T }.
-
-(* this might be removed *)
-notation "hvbox( 𝐇𝐍 ⦃ term 46 T ⦄ )"
-   non associative with precedence 45
-   for @{ 'HdNormal $T }.
-
-(* this might be removed *)
-notation "hvbox( L ⊢ break 𝐇𝐍 ⦃ term 46 T ⦄ )"
-   non associative with precedence 45
-   for @{ 'HdNormal $L $T }.
-
-notation "hvbox( T1 ➡ break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'PRed $T1 $T2 }.
-
-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 L1 ⦄ ➡ break ⦃ term 46 L2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'FocalizedPRed $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 @{ 'FocalizedPRed $L1 $T1 $L2 $T2 }.
-
-notation "hvbox( L ⊢ break ⦃ term 46 L1, break term 46 T1 ⦄ ➡ break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'FocalizedPRed $L $L1 $T1 $L2 $T2 }.
-
-notation "hvbox( ⦃ term 46 L1 ⦄ ➡ ➡ break ⦃ term 46 L2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'FocalizedPRedAlt $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 @{ 'XPRed $h $g $L $T1 $T2 }.
-
-(* Computation **************************************************************)
-
-notation "hvbox( T1 ➡ * break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'PRedStar $T1 $T2 }.
-
-notation "hvbox( L ⊢ break term 46 T1 ➡ * break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'PRedStar $L $T1 $T2 }.
-
-notation "hvbox( T1 ➡ ➡ * break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'PRedStarAlt $T1 $T2 }.
-
-notation "hvbox( ⦃ term 46 L1 ⦄ ➡ * break ⦃ term 46 L2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'FocalizedPRedStar $L1 $L2 }.
-
-notation "hvbox( ⦃ term 46 L1 , term 46 T1 ⦄ ➡ * break ⦃ term 46 L2 , term 46 T2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'FocalizedPRedStar $L1 $T1 $L2 $T2 }.
-
-notation "hvbox( ⦃ term 46 L1 ⦄ ➡ ➡ * break ⦃ term 46 L2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'FocalizedPRedStarAlt $L1 $L2 }.
-
-notation "hvbox( ⦃ term 46 L1 , term 46 T1 ⦄ ➡ ➡ * break ⦃ term 46 L2 , term 46 T2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'FocalizedPRedStarAlt $L1 $T1 $L2 $T2 }.
-
-notation "hvbox( L ⊢ break term 46 T1 ➡ * break 𝐍 ⦃ Tterm 46 2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'PEval $L $T1 $T2 }.
-
-notation "hvbox( ⬊ * term 46 T )"
-   non associative with precedence 45
-   for @{ 'SN $T }.
-
-notation "hvbox( L ⊢ ⬊ * break term 46 T )"
-   non associative with precedence 45
-   for @{ 'SN $L $T }.
-
-notation "hvbox( L ⊢ ⬊ ⬊ * break term 46 T )"
-   non associative with precedence 45
-   for @{ 'SNAlt $L $T }.
-
-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( ⦃ 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 @{ 'XPRedStar $h $g $L $T1 $T2 }.
-
-notation "hvbox( ⦃ term 46 h , break term 46 L ⦄ ⊢ • ⬊ * break [ term 46 g ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'XSN $h $g $L $T }.
-
-(* Conversion ***************************************************************)
-
-notation "hvbox( L ⊢ break term 46 T1 ⬌ break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'PConv $L $T1 $T2 }.
-
-notation "hvbox( ⦃ term 46 L1 ⦄ ⬌ break ⦃ term 46 L2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'FocalizedPConv $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 @{ 'FocalizedPConv $L1 $T1 $L2 $T2 }.
-
-notation "hvbox( ⦃ term 46 L1 ⦄ ⬌ ⬌ break ⦃ term 46 L2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'FocalizedPConvAlt $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 @{ 'FocalizedPConvAlt $L1 $T1 $L2 $T2 }.
-
-(* 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 ⊢ • ⊑ [ term 46 g ] break term 46 L2 )"
-   non associative with precedence 45
-   for @{ 'CrSubEqSE $h $g $L1 $L2 }.
-
-notation "hvbox( ⦃ term 46 L1 ⦄ ⬌ * break ⦃ term 46 L2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'FocalizedPConvStar $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 @{ 'FocalizedPConvStar $L1 $T1 $L2 $T2 }.
-
-notation "hvbox( ⦃ term 46 L1 ⦄ ⬌ ⬌ * break ⦃ term 46 L2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'FocalizedPConvStarAlt $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 @{ 'FocalizedPConvStarAlt $L1 $T1 $L2 $T2 }.
-
-(* 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 ⊩ : ⊑ [ term 46 g ] break term 46 L2 )"
-   non associative with precedence 45
-   for @{ 'CrSubEqV $h $g $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 }.
-
-(* 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 }.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/cfpr.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/cfpr.ma
deleted file mode 100644 (file)
index 95c01d1..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/cpr.ma".
-include "basic_2/reducibility/fpr.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON CLOSURES *************************)
-
-definition cfpr: lenv → bi_relation lenv term ≝
-                 λL,L1,T1,L2,T2. |L1| = |L2| ∧ L ⊢ L1 @@ T1 ➡ L2 @@ T2.
-
-interpretation
-   "context-sensitive parallel reduction (closure)"
-   'FocalizedPRed L L1 T1 L2 T2 = (cfpr L L1 T1 L2 T2).
-
-(* Basic properties *********************************************************)
-
-lemma cfpr_refl: ∀L. bi_reflexive … (cfpr L).
-/2 width=1/ qed.
-
-lemma fpr_cfpr: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ → ⋆ ⊢ ⦃L1, T1⦄ ➡ ⦃L2, T2⦄.
-#L1 #L2 #T1 #T2 * /3 width=1/ 
-qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma cfpr_inv_atom1: ∀L,L2,T1,T2. L ⊢ ⦃⋆, T1⦄ ➡ ⦃L2, T2⦄ → L ⊢ T1 ➡ T2 ∧ L2 = ⋆.
-#L #L2 #T1 #T2 * #H >(length_inv_zero_sn … H) /2 width=1/
-qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma fpr_inv_pair1_sn: ∀I,K1,L2,V1,T1,T2. ⦃⋆.ⓑ{I}V1@@K1, T1⦄ ➡ ⦃L2, T2⦄ →
-                        ∃∃K2,V2. V1 ➡ V2 &
-                                 ⋆.ⓑ{I}V2 ⊢ ⦃K1, T1⦄ ➡ ⦃K2, T2⦄  &
-                                 L2 = ⋆.ⓑ{I}V2@@K2.
-#I1 #K1 #L2 #V1 #T1 #T2 * >append_length #H
-elim (length_inv_pos_sn_append … H) -H #I2 #K2 #V2 #HK12 #H destruct
->shift_append_assoc >shift_append_assoc normalize in ⊢ (%→?); #H 
-elim (tpr_inv_bind1 … H) -H *
-[ #V0 #T #T0 #HV10 #HT1 #HT0 #H destruct /5 width=5/
-| #T0 #_ #_ #H destruct
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/cfpr_aaa.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/cfpr_aaa.ma
deleted file mode 100644 (file)
index 4c9b8ac..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/cpr_aaa.ma".
-include "basic_2/reducibility/cfpr_cpr.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON CLOSURES *************************)
-
-(* Properties about atomic arity assignment on terms ************************)
-
-lemma aaa_fpr_conf: ∀L1,T1,A. L1 ⊢ T1 ⁝ A →
-                    ∀L2,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ → L2 ⊢ T2 ⁝ A.
-#L1 #T1 #A #HT1 #L2 #T2 #H
-elim (fpr_inv_all … H) -H 
-/4 width=5 by aaa_cpr_conf, aaa_ltpr_conf, aaa_ltpss_sn_conf/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/cfpr_cfpr.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/cfpr_cfpr.ma
deleted file mode 100644 (file)
index f442be2..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/cpr_cpr.ma".
-include "basic_2/reducibility/cfpr.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON CLOSURES *************************)
-
-(* Main properties **********************************************************)
-
-theorem cfpr_conf: ∀L. bi_confluent … (cfpr L).
-#L #L0 #L1 #T0 #T1 * #HL01 #HT01 #L2 #T2 * >HL01 #HL12 #HT02
-elim (cpr_conf … HT01 HT02) -L0 -T0 #X #H1 #H2
-elim (cpr_fwd_shift1 … H1) #L0 #T0 #HL10 #H destruct /3 width=5/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/cfpr_cpr.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/cfpr_cpr.ma
deleted file mode 100644 (file)
index a46c977..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/ltpss_sn_alt.ma".
-include "basic_2/reducibility/cpr_tpss.ma".
-include "basic_2/reducibility/cpr_cpr.ma".
-include "basic_2/reducibility/cfpr_ltpss.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON CLOSURES *************************)
-
-(* Advanced properties ******************************************************)
-
-lemma fpr_all: ∀L1,L. L1 ➡ L → ∀L2,T1,T2. L ⊢ T1 ➡ T2 →
-               L ⊢ ▶* [0, |L|] L2 → ⦃L1, T1⦄ ➡ ⦃L2, T2⦄.
-#L1 #L #H elim H -L1 -L
-[ #L2 #T1 #T2 #HT12 #HL2
-  lapply (ltpss_sn_inv_atom1 … HL2) -HL2 #H destruct
-  lapply (cpr_inv_atom … HT12) -HT12 /2 width=1/
-| #I #L1 #L #V1 #V #_ #HV1 #IH #X #T1 #T2 #HT12 #H
-  elim (ltpss_sn_inv_tpss21 … H ?) -H // <minus_plus_m_m #L2 #V2 #HL2 #HV2 #H destruct
-  lapply (cpr_bind_dx false … HV1 HT12) -HV1 -HT12 #HT12
-  lapply (cpr_tpss_trans … HT12 (-ⓑ{I}V2.T2) ?) -HT12 /2 width=1/ -HV2 /3 width=1/
-]
-qed.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma cfpr_inv_all: ∀L1,L2,L0,T1,T2. L0 ⊢ ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ →
-                    ∃∃L. L0 @@ L1 ➡ L0 @@ L & L0 @@ L ⊢ T1 ➡ T2 &
-                         L0 @@ L ⊢ ▶* [0, |L0| + |L|] L0 @@ L2.
-#L1 @(lenv_ind_dx … L1) -L1
-[ #L2 #L0 #T1 #T2 #H
-  elim (cfpr_inv_atom1 … H) -H #HT12 #H destruct /3 width=4/
-| #I #L1 #V1 #IH #X #L0 #T1 #T2 #H
-  elim (cfpr_inv_pair1 … H) -H #L2 #V #V2 #HV1 #HV2 #HT12 #H destruct
-  elim (IH … HT12) -IH -HT12 #L #HL1 #HT12 #HL2
-  elim (ltpr_inv_append1 … HL1) -HL1 #X #Y #HX #HY #H
-  lapply (ltpr_fwd_length … HX) -HX #HX
-  elim (append_inj_dx … H ?) -H // -HX #_ #H destruct -X
-  lapply (ltpss_sn_fwd_length … HL2) >append_length >append_length #H
-  lapply (injective_plus_r … H) -H #H
-  @(ex3_1_intro … (⋆.ⓑ{I}V@@Y)) <append_assoc // -HT12
-  <append_assoc [ /3 width=1/ ] -HV1 -HY
-  >append_length <associative_plus
-  @(ltpss_sn_dx_trans_eq … HL2) -HL2 >H -H >commutative_plus /3 width=1/
-]
-qed-.
-
-lemma fpr_inv_all: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ →
-                   ∃∃L. L1 ➡ L & L ⊢ T1 ➡ T2 & L ⊢ ▶* [0, |L|] L2.
-#L1 #L2 #T1 #T2 #H
-lapply (fpr_cfpr … H) -H #H
-elim (cfpr_inv_all … H) -H /2 width=4/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/cfpr_ltpss.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/cfpr_ltpss.ma
deleted file mode 100644 (file)
index 4249113..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/cpr_lift.ma".
-include "basic_2/reducibility/cpr_ltpss.ma".
-include "basic_2/reducibility/cfpr.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON CLOSURES *************************)
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma cfpr_inv_pair1: ∀I,L,K1,L2,V1,T1,T2. L ⊢ ⦃⋆.ⓑ{I}V1@@K1, T1⦄ ➡ ⦃L2, T2⦄ →
-                      ∃∃K2,V,V2. V1 ➡ V & L ⊢ V ▶* [0, |L|] V2 &
-                                 L.ⓑ{I}V ⊢ ⦃K1, T1⦄ ➡ ⦃K2, T2⦄  &
-                                 L2 = ⋆.ⓑ{I}V2@@K2.
-* #L #K1 #L2 #V1 #T1 #T2 * >append_length #H
-elim (length_inv_pos_sn_append … H) -H #I2 #K2 #V2 #HK12 #H destruct
->shift_append_assoc >shift_append_assoc normalize in ⊢ (??%%→?); #H 
-[ elim (cpr_inv_abbr1 … H) -H *
-  [ #V #V0 #T0 #HV1 #HV0 #HT10 #H destruct /3 width=7/
-  | #T0 #_ #_ #H destruct
-  ]
-| elim (cpr_inv_abst1 … H Abst V2) -H
-  #V #T * #V0 #HV10 #HV0 #HT1 #H destruct
-  lapply (ltpss_sn_cpr_trans (L.ⓛV0) … 0 (|L|+1) … HT1) -HT1 /2 width=1/ #HT12
-  /3 width=7/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/cif.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/cif.ma
deleted file mode 100644 (file)
index 0ea9d51..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/crf.ma".
-
-(* CONTEXT-SENSITIVE IRREDUCIBLE TERMS **************************************)
-
-definition cif: lenv → predicate term ≝ λL,T. L ⊢ 𝐑⦃T⦄ → ⊥.
-
-interpretation "context-sensitive irreducibility (term)"
-   'NotReducible L T = (cif L T).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma cif_inv_delta: ∀L,K,V,i. ⇩[0, i] L ≡ K.ⓓV → L ⊢ 𝐈⦃#i⦄ → ⊥.
-/3 width=3/ qed-.
-
-lemma cif_inv_ri2: ∀I,L,V,T. ri2 I → L ⊢ 𝐈⦃②{I}V.T⦄ → ⊥.
-/3 width=1/ qed-.
-
-lemma cif_inv_ib2: ∀a,I,L,V,T. ib2 a I → L ⊢ 𝐈⦃ⓑ{a,I}V.T⦄ →
-                   L ⊢ 𝐈⦃V⦄ ∧ L.ⓑ{I}V ⊢ 𝐈⦃T⦄.
-/4 width=1/ qed-.
-
-lemma cif_inv_bind: ∀a,I,L,V,T. L ⊢ 𝐈⦃ⓑ{a,I}V.T⦄ →
-                    ∧∧ L ⊢ 𝐈⦃V⦄ & L.ⓑ{I}V ⊢ 𝐈⦃T⦄ & ib2 a I.
-#a * [ elim a -a ]
-[ #L #V #T #H elim (H ?) -H /3 width=1/
-|*: #L #V #T #H elim (cif_inv_ib2 … H) -H /2 width=1/ /3 width=1/
-]  
-qed-.
-
-lemma cif_inv_appl: ∀L,V,T. L ⊢ 𝐈⦃ⓐV.T⦄ → ∧∧ L ⊢ 𝐈⦃V⦄ & L ⊢ 𝐈⦃T⦄ & 𝐒⦃T⦄.
-#L #V #T #HVT @and3_intro /3 width=1/
-generalize in match HVT; -HVT elim T -T //
-* // #a * #U #T #_ #_ #H elim (H ?) -H /2 width=1/
-qed-.
-
-lemma cif_inv_flat: ∀I,L,V,T. L ⊢ 𝐈⦃ⓕ{I}V.T⦄ →
-                    ∧∧ L ⊢ 𝐈⦃V⦄ & L ⊢ 𝐈⦃T⦄ & 𝐒⦃T⦄ & I = Appl.
-* #L #V #T #H
-[ elim (cif_inv_appl … H) -H /2 width=1/
-| elim (cif_inv_ri2 … H) -H /2 width=1/
-]
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma tif_atom: ∀I. ⋆ ⊢ 𝐈⦃⓪{I}⦄.
-/2 width=2 by trf_inv_atom/ qed.
-
-lemma cif_ib2: ∀a,I,L,V,T. ib2 a I → L ⊢ 𝐈⦃V⦄ → L.ⓑ{I}V ⊢ 𝐈⦃T⦄ → L ⊢ 𝐈⦃ⓑ{a,I}V.T⦄.
-#a #I #L #V #T #HI #HV #HT #H
-elim (crf_inv_ib2 … HI H) -HI -H /2 width=1/
-qed.
-
-lemma cif_appl: ∀L,V,T. L ⊢ 𝐈⦃V⦄ → L ⊢ 𝐈⦃T⦄ →  𝐒⦃T⦄ → L ⊢ 𝐈⦃ⓐV.T⦄.
-#L #V #T #HV #HT #H1 #H2
-elim (crf_inv_appl … H2) -H2 /2 width=1/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/cif_append.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/cif_append.ma
deleted file mode 100644 (file)
index 45fd178..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/crf_append.ma".
-include "basic_2/reducibility/cif.ma".
-
-(* CONTEXT-SENSITIVE IRREDUCIBLE TERMS **************************************)
-
-(* Advanved properties ******************************************************)
-
-lemma cif_labst_last: ∀L,T,W. L ⊢ 𝐈⦃T⦄  → ⋆.ⓛW @@ L ⊢ 𝐈⦃T⦄.
-/3 width=2 by crf_inv_labst_last/ qed.
-
-lemma cif_tif: ∀T,W. ⋆ ⊢ 𝐈⦃T⦄ → ⋆.ⓛW ⊢ 𝐈⦃T⦄.
-/3 width=2 by crf_inv_trf/ qed.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma cif_inv_labst_last: ∀L,T,W. ⋆.ⓛW @@ L ⊢ 𝐈⦃T⦄  → L ⊢ 𝐈⦃T⦄.
-/3 width=1/ qed-.
-
-lemma cif_inv_tif: ∀T,W. ⋆.ⓛW ⊢ 𝐈⦃T⦄  → ⋆ ⊢ 𝐈⦃T⦄.
-/3 width=1/ qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/cnf.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/cnf.ma
deleted file mode 100644 (file)
index 02bbcf8..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/cpr.ma".
-
-(* CONTEXT-SENSITIVE NORMAL TERMS *******************************************)
-
-definition cnf: lenv → predicate term ≝ λL. NF … (cpr L) (eq …).
-
-interpretation
-   "context-sensitive normality (term)"
-   'Normal L T = (cnf L T).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma cnf_inv_appl: ∀L,V,T. L ⊢ 𝐍⦃ⓐV.T⦄ → ∧∧ L ⊢ 𝐍⦃V⦄ & L ⊢ 𝐍⦃T⦄ & 𝐒⦃T⦄.
-#L #V1 #T1 #HVT1 @and3_intro
-[ #V2 #HV2 lapply (HVT1 (ⓐV2.T1) ?) -HVT1 /2 width=1/ -HV2 #H destruct //
-| #T2 #HT2 lapply (HVT1 (ⓐV1.T2) ?) -HVT1 /2 width=1/ -HT2 #H destruct //
-| generalize in match HVT1; -HVT1 elim T1 -T1 * // #a * #W1 #U1 #_ #_ #H
-  [ elim (lift_total V1 0 1) #V2 #HV12
-    lapply (H (ⓓ{a}W1.ⓐV2.U1) ?) -H /3 width=3/ -HV12 #H destruct
-  | lapply (H (ⓓ{a}V1.U1) ?) -H /3 width=1/ #H destruct
-]
-qed-.
-
-lemma cnf_inv_zeta: ∀L,V,T. L ⊢ 𝐍⦃+ⓓV.T⦄ → ⊥.
-#L #V #T #H elim (is_lift_dec T 0 1)
-[ * #U #HTU
-  lapply (H U ?) -H /3 width=3 by cpr_tpr, tpr_zeta/ #H destruct (**) (* auto too slow without trace *)
-  elim (lift_inv_pair_xy_y … HTU)
-| #HT
-  elim (tps_full (⋆) V T (⋆. ⓓV) 0 ?) // #T2 #T1 #HT2 #HT12
-  lapply (H (+ⓓV.T2) ?) -H /3 width=3 by cpr_tpr, tpr_delta/ -HT2 #H destruct /3 width=2/ (**) (* auto too slow without trace *)
-]
-qed.
-
-lemma cnf_inv_tau: ∀L,V,T. L ⊢ 𝐍⦃ⓝV.T⦄ → ⊥.
-#L #V #T #H lapply (H T ?) -H /2 width=1/ #H
-@discr_tpair_xy_y //
-qed-.
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was: nf2_sort *)
-lemma cnf_sort: ∀L,k. L ⊢ 𝐍⦃⋆k⦄.
-#L #k #X #H
->(cpr_inv_sort1 … H) //
-qed.
-
-(* Basic_1: was: nf2_dec *)
-axiom cnf_dec: ∀L,T1. L ⊢ 𝐍⦃T1⦄ ∨
-               ∃∃T2. L ⊢ T1 ➡ T2 & (T1 = T2 → ⊥).
-
-(* Basic_1: removed theorems 1: nf2_abst_shift *)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/cnf_cif.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/cnf_cif.ma
deleted file mode 100644 (file)
index 51ce95a..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/reducibility/cif.ma".
-include "basic_2/reducibility/cnf_lift.ma".
-
-(* CONTEXT-SENSITIVE NORMAL TERMS *******************************************)
-
-(* Main properties **********************************************************)
-
-lemma tps_cif_eq: ∀L,T1,T2,d,e. L ⊢ T1 ▶[d, e] T2 → L ⊢ 𝐈⦃T1⦄ → T1 = T2.
-#L #T1 #T2 #d #e #H elim H -L -T1 -T2 -d -e
-[ //
-| #L #K #V #W #i #d #e #_ #_ #HLK #_ #H -d -e
-  elim (cif_inv_delta … HLK ?) //
-| #L #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #H
-  elim (cif_inv_bind … H) -H #HV1 #HT1 * #H destruct
-  lapply (IHV12 … HV1) -IHV12 -HV1 #H destruct /3 width=1/
-| #L #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #H
-  elim (cif_inv_flat … H) -H #HV1 #HT1 #_ #_ /3 width=1/
-]
-qed.
-
-lemma tpss_cif_eq: ∀L,T1,T2,d,e. L ⊢ T1 ▶*[d, e] T2 → L ⊢ 𝐈⦃T1⦄ → T1 = T2.
-#L #T1 #T2 #d #e #H @(tpss_ind … H) -T2 //
-#T #T2 #_ #HT2 #IHT1 #HT1
-lapply (IHT1 HT1) -IHT1 #H destruct /2 width=5/
-qed.
-
-lemma tpr_cif_eq: ∀T1,T2. T1 ➡ T2 → ∀L. L ⊢ 𝐈⦃T1⦄ → T1 = T2.
-#T1 #T2 #H elim H -T1 -T2
-[ //
-| * #V1 #V2 #T1 #T2 #_ #_ #IHV1 #IHT1 #L #H
-  [ elim (cif_inv_appl … H) -H #HV1 #HT1 #_
-    >IHV1 -IHV1 // -HV1 >IHT1 -IHT1 //
-  | elim (cif_inv_ri2 … H) /2 width=1/
-  ]
-| #a #V1 #V2 #W #T1 #T2 #_ #_ #_ #_ #L #H
-  elim (cif_inv_appl … H) -H #_ #_ #H
-  elim (simple_inv_bind … H)
-| #a * #V1 #V2 #T1 #T #T2 #_ #_ #HT2 #IHV1 #IHT1 #L #H
-  [ lapply (tps_lsubs_trans … HT2 (L.ⓓV2) ?) -HT2 /2 width=1/ #HT2
-    elim (cif_inv_bind … H) -H #HV1 #HT1 * #H destruct
-    lapply (IHV1 … HV1) -IHV1 -HV1 #H destruct
-    lapply (IHT1 … HT1) -IHT1 #H destruct
-    lapply (tps_cif_eq … HT2 ?) -HT2 //
-  | <(tps_inv_refl_SO2 … HT2 ?) -HT2 //
-    elim (cif_inv_ib2 … H) -H /2 width=1/ /3 width=2/
-  ]
-| #a #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #_ #L #H
-  elim (cif_inv_appl … H) -H #_ #_ #H
-  elim (simple_inv_bind … H)
-| #V1 #T1 #T #T2 #_ #_ #_ #L #H
-  elim (cif_inv_ri2 … H) /2 width=1/
-| #V1 #T1 #T2 #_ #_ #L #H
-  elim (cif_inv_ri2 … H) /2 width=1/
-]
-qed.
-
-lemma cpr_cif_eq: ∀L,T1,T2. L ⊢ T1 ➡ T2 → L ⊢ 𝐈⦃T1⦄ → T1 = T2.
-#L #T1 #T2 * #T0 #HT10 #HT02 #HT1
-lapply (tpr_cif_eq … HT10 … HT1) -HT10 #H destruct /2 width=5/
-qed.
-
-theorem cif_cnf: ∀L,T. L ⊢ 𝐈⦃T⦄ → L ⊢ 𝐍⦃T⦄.
-/3 width=3/ qed.
-
-(* Note: this property is unusual *)
-lemma cnf_crf_false: ∀L,T. L ⊢ 𝐑⦃T⦄ → L ⊢ 𝐍⦃T⦄ → ⊥.
-#L #T #H elim H -L -T
-[ #L #K #V #i #HLK #H
-  elim (cnf_inv_delta … HLK H)
-| #L #V #T #_ #IHV #H
-  elim (cnf_inv_appl … H) -H /2 width=1/
-| #L #V #T #_ #IHT #H
-  elim (cnf_inv_appl … H) -H /2 width=1/
-| #I #L #V #T * #H1 #H2 destruct
-  [ elim (cnf_inv_zeta … H2)
-  | elim (cnf_inv_tau … H2)
-  ]
-|5,6: #a * [ elim a ] #L #V #T * #H1 #_ #IH #H2 destruct
-  [1,3: elim (cnf_inv_abbr … H2) -H2 /2 width=1/
-  |*: elim (cnf_inv_abst … H2) -H2 /2 width=1/
-  ]
-| #a #L #V #W #T #H
-  elim (cnf_inv_appl … H) -H #_ #_ #H
-  elim (simple_inv_bind … H)
-| #a #L #V #W #T #H 
-  elim (cnf_inv_appl … H) -H #_ #_ #H
-  elim (simple_inv_bind … H)
-]
-qed.
-
-theorem cnf_cif: ∀L,T. L ⊢ 𝐍⦃T⦄ → L ⊢ 𝐈⦃T⦄.
-/2 width=4/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/cnf_lift.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/cnf_lift.ma
deleted file mode 100644 (file)
index 0e1a855..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/reducibility/cpr_lift.ma".
-include "basic_2/reducibility/cpr_cpr.ma".
-include "basic_2/reducibility/cnf.ma".
-
-(* CONTEXT-SENSITIVE NORMAL TERMS *******************************************)
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma cnf_inv_delta: ∀L,K,V,i. ⇩[0, i] L ≡ K.ⓓV → L ⊢ 𝐍⦃#i⦄ → ⊥.
-#L #K #V #i #HLK #H
-elim (lift_total V 0 (i+1)) #W #HVW
-lapply (H W ?) -H [ /3 width=6/ ] -HLK #H destruct
-elim (lift_inv_lref2_be … HVW ? ?) -HVW //
-qed-.
-
-lemma cnf_inv_abst: ∀a,L,V,T. L ⊢ 𝐍⦃ⓛ{a}V.T⦄ → L ⊢ 𝐍⦃V⦄ ∧ L.ⓛV ⊢ 𝐍⦃T⦄.
-#a #L #V1 #T1 #HVT1 @conj
-[ #V2 #HV2 lapply (HVT1 (ⓛ{a}V2.T1) ?) -HVT1 /2 width=2/ -HV2 #H destruct //
-| #T2 #HT2 lapply (HVT1 (ⓛ{a}V1.T2) ?) -HVT1 /2 width=2/ -HT2 #H destruct //
-]
-qed-.
-
-lemma cnf_inv_abbr: ∀L,V,T. L ⊢ 𝐍⦃-ⓓV.T⦄ → L ⊢ 𝐍⦃V⦄ ∧ L.ⓓV ⊢ 𝐍⦃T⦄.
-#L #V1 #T1 #HVT1 @conj
-[ #V2 #HV2 lapply (HVT1 (-ⓓV2.T1) ?) -HVT1 /2 width=2/ -HV2 #H destruct //
-| #T2 #HT2 lapply (HVT1 (-ⓓV1.T2) ?) -HVT1 /2 width=2/ -HT2 #H destruct //
-]
-qed-.
-
-(* Advanced properties ******************************************************)
-
-(* Basic_1: was only: nf2_csort_lref *)
-lemma cnf_lref_atom: ∀L,i. ⇩[0, i] L ≡ ⋆ → L  ⊢ 𝐍⦃#i⦄.
-#L #i #HLK #X #H
-elim (cpr_inv_lref1 … H) // *
-#K0 #V0 #V1 #HLK0 #_ #_ #_
-lapply (ldrop_mono … HLK … HLK0) -L #H destruct
-qed.
-
-(* Basic_1: was: nf2_lref_abst *)
-lemma cnf_lref_abst: ∀L,K,V,i. ⇩[0, i] L ≡ K. ⓛV → L ⊢ 𝐍⦃#i⦄.
-#L #K #V #i #HLK #X #H
-elim (cpr_inv_lref1 … H) // *
-#K0 #V0 #V1 #HLK0 #_ #_ #_
-lapply (ldrop_mono … HLK … HLK0) -L #H destruct
-qed.
-
-(* Basic_1: was: nf2_abst *)
-lemma cnf_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_inv_abst1 … H I V) -H #W0 #T0 #HW0 #HT0 #H destruct
->(HW … HW0) -W0 >(HT … HT0) -T0 //
-qed.
-
-(* Basic_1: was only: nf2_appl_lref *)
-lemma cnf_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
->(HV … HV0) -V0 >(HT … HT0) -T0 //
-qed.
-
-(* Relocation properties ****************************************************)
-
-(* Basic_1: was: nf2_lift *)
-lemma cnf_lift: ∀L0,L,T,T0,d,e.
-                L ⊢ 𝐍⦃T⦄ → ⇩[d, e] L0 ≡ L → ⇧[d, e] T ≡ T0 → L0 ⊢ 𝐍⦃T0⦄.
-#L0 #L #T #T0 #d #e #HLT #HL0 #HT0 #X #H
-elim (cpr_inv_lift1 … HL0 … HT0 … H) -L0 #T1 #HT10 #HT1
-<(HLT … HT1) in HT0; -L #HT0
->(lift_mono … HT10 … HT0) -T1 -X //
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr.ma
deleted file mode 100644 (file)
index 22fbfc1..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/tpss.ma".
-include "basic_2/reducibility/tpr.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
-
-(* Basic_1: includes: pr2_delta1 *)
-definition cpr: lenv → relation term ≝
-   λL,T1,T2. ∃∃T. T1 ➡ T & L ⊢ T ▶* [0, |L|] T2.
-
-interpretation
-   "context-sensitive parallel reduction (term)"
-   'PRed L T1 T2 = (cpr L T1 T2).
-
-(* Basic properties *********************************************************)
-
-lemma cpr_intro: ∀L,T1,T,T2,d,e. T1 ➡ T → L ⊢ T ▶* [d, e] T2 → L ⊢ T1 ➡ T2.
-/4 width=3/ qed-.
-
-(* Basic_1: was by definition: pr2_free *)
-lemma cpr_tpr: ∀T1,T2. T1 ➡ T2 → ∀L. L ⊢ T1 ➡ T2.
-/2 width=3/ qed.
-
-lemma cpr_tpss: ∀L,T1,T2,d,e. L ⊢ T1 ▶* [d, e] T2 → L ⊢ T1 ➡ T2.
-/3 width=5/ qed.
-
-lemma cpr_refl: ∀L,T. L ⊢ T ➡ T.
-/2 width=1/ qed.
-
-(* Note: new property *)
-(* Basic_1: was only: pr2_thin_dx *) 
-lemma cpr_flat: ∀I,L,V1,V2,T1,T2.
-                L ⊢ V1 ➡ V2 → L ⊢ T1 ➡ T2 → L ⊢ ⓕ{I} V1. T1 ➡ ⓕ{I} V2. T2.
-#I #L #V1 #V2 #T1 #T2 * #V #HV1 #HV2 * /3 width=5/
-qed.
-
-lemma cpr_cast: ∀L,V,T1,T2.
-                L ⊢ T1 ➡ T2 → L ⊢ ⓝV. T1 ➡ T2.
-#L #V #T1 #T2 * /3 width=3/
-qed.
-
-(* Note: it does not hold replacing |L1| with |L2| *)
-(* Basic_1: was only: pr2_change *)
-lemma cpr_lsubs_trans: ∀L1,T1,T2. L1 ⊢ T1 ➡ T2 →
-                       ∀L2. L2 ≼ [0, |L1|] L1 → L2 ⊢ T1 ➡ T2.
-#L1 #T1 #T2 * #T #HT1 #HT2 #L2 #HL12 
-lapply (tpss_lsubs_trans … HT2 … HL12) -HT2 -HL12 /3 width=4/
-qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-(* Basic_1: was: pr2_gen_csort *)
-lemma cpr_inv_atom: ∀T1,T2. ⋆ ⊢ T1 ➡ T2 → T1 ➡ T2.
-#T1 #T2 * #T #HT normalize #HT2
-<(tpss_inv_refl_O2 … HT2) -HT2 //
-qed-.
-
-(* Basic_1: was: pr2_gen_sort *)
-lemma cpr_inv_sort1: ∀L,T2,k. L ⊢ ⋆k ➡ T2 → T2 = ⋆k.
-#L #T2 #k * #X #H
->(tpr_inv_atom1 … H) -H #H
->(tpss_inv_sort1 … H) -H //
-qed-.
-
-(* Basic_1: was: pr2_gen_cast *)
-lemma cpr_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 * #X #H #HU2
-elim (tpr_inv_cast1 … H) -H /3 width=3/
-* #V #T #HV1 #HT1 #H destruct
-elim (tpss_inv_flat1 … HU2) -HU2 #V2 #T2 #HV2 #HT2 #H destruct /4 width=5/
-qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma cpr_fwd_shift1: ∀L,L1,T1,T. L ⊢ L1 @@ T1 ➡ T →
-                      ∃∃L2,T2. |L1| = |L2| & T = L2 @@ T2.
-#L #L1 #T1 #T * #X #H1 #H2
-elim (tpr_fwd_shift1 … H1) -H1 #L0 #T0 #HL10 #H destruct
-elim (tpss_fwd_shift1 … H2) -H2 #L2 #T2 #HL02 #H destruct /2 width=4/
-qed-.
-
-(* Basic_1: removed theorems 6: 
-            pr2_head_2 pr2_cflat pr2_gen_cflat clear_pr2_trans
-            pr2_gen_ctail pr2_ctail
-   Basic_1: removed local theorems 3:
-            pr2_free_free pr2_free_delta pr2_delta_delta
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr_aaa.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr_aaa.ma
deleted file mode 100644 (file)
index 7c12733..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/static/aaa_ltpss_sn.ma".
-include "basic_2/reducibility/ltpr_aaa.ma".
-include "basic_2/reducibility/cpr.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
-
-(* Properties about atomic arity assignment on terms ************************)
-
-lemma aaa_cpr_conf: ∀L,T1,A. L ⊢ T1 ⁝ A → ∀T2. L ⊢ T1 ➡ T2 → L ⊢ T2 ⁝ A.
-#L #T1 #A #HT1 #T2 * /3 width=5/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr_cpr.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr_cpr.ma
deleted file mode 100644 (file)
index 8d2eb1f..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/tpr_tpr.ma".
-include "basic_2/reducibility/cpr.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
-
-(* Advanced properties ******************************************************)
-
-lemma cpr_bind_sn: ∀a,I,L,V1,V2,T1,T2. L ⊢ V1 ➡ V2 → T1 ➡ T2 →
-                   L ⊢ ⓑ{a,I} V1. T1 ➡ ⓑ{a,I} V2. T2.
-#a #I #L #V1 #V2 #T1 #T2 * #V #HV1 #HV2 #HT12
-@ex2_1_intro [2: @(tpr_delta … HV1 HT12) | skip ] /2 width=3/ (* /3 width=5/ is too slow *)
-qed.
-
-(* Basic_1: was only: pr2_gen_cbind *)
-lemma cpr_bind_dx: ∀a,I,L,V1,V2,T1,T2. V1 ➡ V2 → L. ⓑ{I} V2 ⊢ T1 ➡ T2 →
-                   L ⊢ ⓑ{a,I} V1. T1 ➡ ⓑ{a,I} V2. T2.
-#a #I #L #V1 #V2 #T1 #T2 #HV12 * #T #HT1 normalize #HT2
-elim (tpss_split_up … HT2 1 ? ?) -HT2 // #T0 <minus_n_O #HT0 normalize <minus_plus_m_m #HT02
-lapply (tpss_lsubs_trans … HT0 (⋆. ⓑ{I} V2) ?) -HT0 /2 width=1/ #HT0
-lapply (tpss_inv_SO2 … HT0) -HT0 #HT0
-@ex2_1_intro [2: @(tpr_delta … HV12 HT1 HT0) | skip | /2 width=1/ ] (**) (* /3 width=5/ is too slow *)
-qed.
-
-(* Basic_1: was only: pr2_head_1 *) 
-lemma cpr_pair_sn: ∀I,L,V1,V2,T1,T2. L ⊢ V1 ➡ V2 → T1 ➡ T2 →
-                   L ⊢ ②{I} V1. T1 ➡ ②{I} V2. T2.
-* /2 width=1/ /3 width=1/
-qed.
-
-(* Advanced forward lemmas **************************************************)
-
-lemma cpr_shift_fwd: ∀L,T1,T2. L ⊢ T1 ➡ T2 → L @@ T1 ➡ L @@ T2.
-#L elim L -L
-[ #T1 #T2 #HT12 @(cpr_inv_atom … HT12)
-| normalize /3 width=1/
-].
-qed-.
-
-(* Main properties **********************************************************)
-
-(* Basic_1: was: pr2_confluence *)
-theorem cpr_conf: ∀L,U0,T1,T2. L ⊢ U0 ➡ T1 → L ⊢ U0 ➡ T2 →
-                  ∃∃T. L ⊢ T1 ➡ T & L ⊢ T2 ➡ T.
-#L #U0 #T1 #T2 * #U1 #HU01 #HUT1 * #U2 #HU02 #HUT2
-elim (tpr_conf … HU01 HU02) -U0 #U #HU1 #HU2 
-elim (tpr_tpss_ltpr ? L … HU1 … HUT1) -U1 // #U1 #HTU1 #HU1
-elim (tpr_tpss_ltpr ? L … HU2 … HUT2) -U2 // #U2 #HTU2 #HU2
-elim (tpss_conf_eq … HU1 … HU2) -U /3 width=5/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr_delift.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr_delift.ma
deleted file mode 100644 (file)
index 04eb4ae..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/thin_delift.ma".
-include "basic_2/reducibility/tpr_delift.ma".
-include "basic_2/reducibility/cpr.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
-
-(* Properties on inverse basic term relocation ******************************)
-
-(* Basic_1: was only: pr2_gen_cabbr *)
-lemma thin_cpr_delift_conf: ∀L,U1,U2. L ⊢ U1 ➡ U2 →
-                            ∀K,d,e. ▼*[d, e] L ≡ K → ∀T1. L ⊢ ▼*[d, e] U1 ≡ T1 →
-                            ∃∃T2. K ⊢ T1 ➡ T2 & L ⊢ ▼*[d, e] U2 ≡ T2.
-#L #U1 #U2 * #U #HU1 #HU2 #K #d #e #HLK #T1 #HTU1
-elim (tpr_delift_conf … HU1 … HTU1) -U1 #T #HT1 #HUT
-elim (le_or_ge (|L|) d) #Hd
-[ elim (thin_delift_tpss_conf_le … HU2 … HUT … HLK ?)
-| elim (le_or_ge (|L|) (d+e)) #Hde
-  [ elim (thin_delift_tpss_conf_le_up … HU2 … HUT … HLK ? ? ?)
-  | elim (thin_delift_tpss_conf_be … HU2 … HUT … HLK ? ?)
-  ]
-] -U -HLK // -Hd [2,3: -Hde] #T2 #HT2
-lapply (cpr_intro … HT1 HT2) -T /2 width=3/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr_lift.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr_lift.ma
deleted file mode 100644 (file)
index b54510e..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/tpss_lift.ma".
-include "basic_2/reducibility/tpr_lift.ma".
-include "basic_2/reducibility/cpr.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
-
-(* Advanced properties ******************************************************)
-
-lemma cpr_cdelta: ∀L,K,V1,W1,W2,i.
-                  ⇩[0, i] L ≡ K. ⓓV1 → K ⊢ V1 ▶* [0, |L| - i - 1] W1 →
-                  ⇧[0, i + 1] W1 ≡ W2 → L ⊢ #i ➡ W2.
-#L #K #V1 #W1 #W2 #i #HLK #HVW1 #HW12
-lapply (ldrop_fwd_ldrop2_length … HLK) #Hi
-@ex2_1_intro [2: // | skip | @tpss_subst /width=6/ ] (**) (* /3 width=6/ is too slow *)
-qed.
-
-lemma cpr_abst: ∀L,V1,V2. L ⊢ V1 ➡ V2 → ∀V,T1,T2.
-                L.ⓛV ⊢ T1 ➡ T2 → ∀a. L ⊢ ⓛ{a}V1. T1 ➡ ⓛ{a}V2. T2.
-#L #V1 #V2 * #V0 #HV10 #HV02 #V #T1 #T2 * #T0 #HT10 #HT02 #a
-lapply (tpss_inv_S2 … HT02 L V ?) -HT02 // #HT02
-lapply (tpss_lsubs_trans … HT02 (L.ⓛV2) ?) -HT02 /2 width=1/ #HT02
-@(ex2_1_intro … (ⓛ{a}V0.T0)) /2 width=1/ (* explicit constructors *)
-qed.
-
-lemma cpr_beta: ∀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 * #V #HV1 #HV2 * #T #HT1 #HT2
-lapply (tpss_inv_S2 … HT2 L W ?) -HT2 // #HT2
-lapply (tpss_lsubs_trans … HT2 (L.ⓓV2) ?) -HT2 /2 width=1/ #HT2
-@(ex2_1_intro … (ⓓ{a}V.T)) /2 width=1/ (**) (* explicit constructor, /3/ is too slow *)
-qed.
-
-lemma cpr_beta_dx: ∀a,L,V1,V2,W,T1,T2.
-                   V1 ➡ V2 → L.ⓛW ⊢ T1 ➡ T2 → L ⊢ ⓐV1.ⓛ{a}W.T1 ➡ ⓓ{a}V2.T2.
-/3 width=1/ qed.
-
-(* Advanced inversion lemmas ************************************************)
-
-(* Basic_1: was: pr2_gen_lref *)
-lemma cpr_inv_lref1: ∀L,T2,i. L ⊢ #i ➡ T2 →
-                     T2 = #i ∨
-                     ∃∃K,V1,T1. ⇩[0, i] L ≡ K. ⓓV1 &
-                                K ⊢ V1 ▶* [0, |L| - i - 1] T1 &
-                                ⇧[0, i + 1] T1 ≡ T2 &
-                                i < |L|.
-#L #T2 #i * #X #H
->(tpr_inv_atom1 … H) -H #H
-elim (tpss_inv_lref1 … H) -H /2 width=1/
-* /3 width=6/
-qed-.
-
-(* Basic_1: was pr2_gen_abbr *)
-lemma cpr_inv_abbr1: ∀a,L,V1,T1,U2. L ⊢ ⓓ{a}V1. T1 ➡ U2 →
-                     (∃∃V,V2,T2. V1 ➡ V & L ⊢ V ▶* [O, |L|] V2 &
-                                 L. ⓓV ⊢ T1 ➡ T2 &
-                                 U2 = ⓓ{a}V2. T2
-                      ) ∨
-                      ∃∃T2. L.ⓓV1 ⊢ T1 ➡ T2 & ⇧[0,1] U2 ≡ T2 & a = true.
-#a #L #V1 #T1 #Y * #X #H1 #H2
-elim (tpr_inv_abbr1 … H1) -H1 *
-[ #V #T #T0 #HV1 #HT1 #HT0 #H destruct
-  elim (tpss_inv_bind1 … H2) -H2 #V2 #T2 #HV2 #HT02 #H destruct
-  lapply (tps_lsubs_trans … HT0 (L. ⓓV) ?) -HT0 /2 width=1/ #HT0
-  lapply (tps_weak_all … HT0) -HT0 #HT0
-  lapply (tpss_lsubs_trans … HT02 (L. ⓓV) ?) -HT02 /2 width=1/ #HT02
-  lapply (tpss_weak_all … HT02) -HT02 #HT02
-  lapply (tpss_strap2 … HT0 HT02) -T0 /4 width=7/
-| #T2 #HT12 #HXT2 #H destruct
-  elim (lift_total Y 0 1) #Z #HYZ
-  lapply (tpss_lift_ge … H2 (L.ⓓV1) … HXT2 … HYZ) -X // /2 width=1/ #H
-  lapply (cpr_intro … HT12 … H) -T2 /3 width=3/
-]
-qed-.
-
-(* Basic_1: was: pr2_gen_abst *)
-lemma cpr_inv_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 #Y * #X #H1 #H2 #I #W
-elim (tpr_inv_abst1 … H1) -H1 #V #T #HV1 #HT1 #H destruct
-elim (tpss_inv_bind1 … H2) -H2 #V2 #T2 #HV2 #HT2 #H destruct
-lapply (tpss_lsubs_trans … HT2 (L. ⓑ{I} W) ?) -HT2 /2 width=1/ /4 width=5/
-qed-.
-
-(* Basic_1: was pr2_gen_appl *)
-lemma cpr_inv_appl1: ∀L,V1,U0,U2. L ⊢ ⓐV1. U0 ➡ U2 →
-                     ∨∨ ∃∃V2,T2.              L ⊢ V1 ➡ V2 & L ⊢ U0 ➡ T2 &
-                                              U2 = ⓐV2. T2
-                      | ∃∃a,V2,W,T1,T2.       L ⊢ V1 ➡ V2 & L. ⓓV2 ⊢ T1 ➡ T2 &
-                                              U0 = ⓛ{a}W. T1 &
-                                              U2 = ⓓ{a}V2. T2
-                      | ∃∃a,V2,V,W1,W2,T1,T2. L ⊢ V1 ➡ V2 & L ⊢ W1 ➡ W2 & L. ⓓW2 ⊢ T1 ➡ T2 &
-                                              ⇧[0,1] V2 ≡ V &
-                                              U0 = ⓓ{a}W1. T1 &
-                                              U2 = ⓓ{a}W2. ⓐV. T2.
-#L #V1 #U0 #Y * #X #H1 #H2
-elim (tpr_inv_appl1 … H1) -H1 *
-[ #V #U #HV1 #HU0 #H destruct
-  elim (tpss_inv_flat1 … H2) -H2 #V2 #U2 #HV2 #HU2 #H destruct /4 width=5/
-| #a #V #W #T0 #T #HV1 #HT0 #H #H1 destruct
-  elim (tpss_inv_bind1 … H2) -H2 #V2 #T2 #HV2 #HT2 #H destruct
-  lapply (tpss_weak … HT2 0 (|L|+1) ? ?) -HT2 // /4 width=9/
-| #a #V0 #V #W #W0 #T #T0 #HV10 #HW0 #HT0 #HV0 #H #H1 destruct
-  elim (tpss_inv_bind1 … H2) -H2 #W2 #X #HW02 #HX #HY destruct
-  elim (tpss_inv_flat1 … HX) -HX #V2 #T2 #HV2 #HT2 #H destruct
-  elim (tpss_inv_lift1_ge … HV2 … HV0 ?) -V // [3: /2 width=1/ |2: skip ] #V <minus_plus_m_m
-  lapply (tpss_weak … HT2 0 (|L|+1) ? ?) -HT2 // /4 width=13/
-]
-qed-.
-
-(* Note: the main property of simple terms *)
-lemma cpr_inv_appl1_simple: ∀L,V1,T1,U. L ⊢ ⓐV1. T1 ➡ U → 𝐒⦃T1⦄ →
-                            ∃∃V2,T2. L ⊢ V1 ➡ V2 & L ⊢ T1 ➡ T2 &
-                                     U = ⓐV2. T2.
-#L #V1 #T1 #U #H #HT1
-elim (cpr_inv_appl1 … H) -H *
-[ /2 width=5/
-| #a #V2 #W #W1 #W2 #_ #_ #H #_ destruct
-  elim (simple_inv_bind … HT1)
-| #a #V2 #V #W1 #W2 #U1 #U2 #_ #_ #_ #_ #H #_ destruct
-  elim (simple_inv_bind … HT1)
-]
-qed-.
-     
-(* Relocation properties ****************************************************)
-
-(* Basic_1: was: pr2_lift *)
-lemma cpr_lift: ∀L,K,d,e. ⇩[d, e] L ≡ K →
-                ∀T1,U1. ⇧[d, e] T1 ≡ U1 → ∀T2,U2. ⇧[d, e] T2 ≡ U2 →
-                K ⊢ T1 ➡ T2 → L ⊢ U1 ➡ U2.
-#L #K #d #e #HLK #T1 #U1 #HTU1 #T2 #U2 #HTU2 * #T #HT1 #HT2
-elim (lift_total T d e) #U #HTU
-lapply (tpr_lift … HT1 … HTU1 … HTU) -T1 #HU1
-elim (lt_or_ge (|K|) d) #HKd
-[ lapply (tpss_lift_le … HT2 … HLK HTU … HTU2) -T2 -T -HLK [ /2 width=2/ | /3 width=4/ ]
-| lapply (tpss_lift_be … HT2 … HLK HTU … HTU2) -T2 -T -HLK // /3 width=4/
-]
-qed.
-
-(* Basic_1: was: pr2_gen_lift *)
-lemma cpr_inv_lift1: ∀L,K,d,e. ⇩[d, e] L ≡ K →
-                     ∀T1,U1. ⇧[d, e] T1 ≡ U1 → ∀U2. L ⊢ U1 ➡ U2 →
-                     ∃∃T2. ⇧[d, e] T2 ≡ U2 & K ⊢ T1 ➡ T2.
-#L #K #d #e #HLK #T1 #U1 #HTU1 #U2 * #U #HU1 #HU2
-elim (tpr_inv_lift1 … HU1 … HTU1) -U1 #T #HTU #T1
-elim (lt_or_ge (|L|) d) #HLd
-[ elim (tpss_inv_lift1_le … HU2 … HLK … HTU ?) -U -HLK [ /5 width=4/ | /2 width=2/ ]
-| elim (lt_or_ge (|L|) (d + e)) #HLde
-  [ elim (tpss_inv_lift1_be_up … HU2 … HLK … HTU ? ?) -U -HLK // [ /5 width=4/ | /2 width=2/ ] 
-  | elim (tpss_inv_lift1_be … HU2 … HLK … HTU ? ?) -U -HLK // /5 width=4/
-  ]
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr_ltpr.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr_ltpr.ma
deleted file mode 100644 (file)
index d3e75f8..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/tpr_tpss.ma".
-include "basic_2/reducibility/cpr.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
-
-(* Properties concerning parallel unfold on terms ***************************)
-
-(* Note: we could invoke tpss_weak_all instead of ltpr_fwd_length *)
-(* Basic_1: was only: pr2_subst1 *)
-lemma cpr_tpss_ltpr: ∀L1,L2. L1 ➡ L2 → ∀T1,T2. L2 ⊢ T1 ➡ T2 →
-                     ∀d,e,U1. L1 ⊢ T1 ▶* [d, e] U1 →
-                     ∃∃U2. L2 ⊢ U1 ➡ U2 & L2 ⊢ T2 ▶* [d, e] U2.
-#L1 #L2 #HL12 #T1 #T2 * #T #HT1 #HT2 #d #e #U1 #HTU1
-elim (tpr_tpss_ltpr … HL12 … HT1 … HTU1) -L1 -HT1 #U #HU1 #HTU
-elim (tpss_conf_eq … HT2 … HTU) -T /3 width=3/
-qed.
-
-lemma cpr_ltpr_conf_eq: ∀L1,T1,T2. L1 ⊢ T1 ➡ T2 → ∀L2. L1 ➡ L2 →
-                        ∃∃T. L2 ⊢ T1 ➡ T & T2 ➡ T.
-#L1 #T1 #T2 * #T #HT1 #HT2 #L2 #HL12
->(ltpr_fwd_length … HL12) in HT2; #HT2
-elim (tpr_tpss_ltpr … HL12 … HT2) -L1 /3 width=3/
-qed.
-
-lemma cpr_ltpr_conf_tpss: ∀L1,L2. L1 ➡ L2 → ∀T1,T2. L1 ⊢ T1 ➡ T2 →
-                          ∀d,e,U1. L1 ⊢ T1 ▶* [d, e] U1 →
-                          ∃∃U2. L2 ⊢ U1 ➡ U2 & L2 ⊢ T2 ➡ U2.
-#L1 #L2 #HL12 #T1 #T2 #HT12 #d #e #U1 #HTU1
-elim (cpr_ltpr_conf_eq … HT12 … HL12) -HT12 #T #HT1 #HT2
-elim (cpr_tpss_ltpr … HL12 … HT1 … HTU1) -L1 -HT1 #U2 #HU12 #HTU2
-lapply (tpss_weak_all … HTU2) -HTU2 #HTU2 /3 width=5/ (**) (* /4 width=5/ is too slow *)
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr_ltpss.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr_ltpss.ma
deleted file mode 100644 (file)
index b728d9d..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/ltpss_sn_ltpss_sn.ma".
-include "basic_2/reducibility/cpr.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
-
-(* Properties concerning partial unfold on local environments ***************)
-
-lemma ltpss_sn_cpr_trans: ∀L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 →
-                          ∀T1,T2. L2 ⊢ T1 ➡ T2 → L1 ⊢ T1 ➡ T2.
-#L1 #L2 #d #e #HL12 #T1 #T2 *
-lapply (ltpss_sn_weak_all … HL12)
-<(ltpss_sn_fwd_length … HL12) -HL12 /3 width=5/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr_tpss.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr_tpss.ma
deleted file mode 100644 (file)
index e5afe87..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/tpss_tpss.ma".
-include "basic_2/reducibility/cpr.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
-
-(* Properties on partial unfold for terms ***********************************)
-
-lemma cpr_tpss_trans: ∀L,T1,T. L ⊢ T1 ➡ T →
-                      ∀T2. L ⊢ T ▶* [O, |L|] T2 → L ⊢ T1 ➡ T2.
-#L #T1 #T * #T0 #HT10 #HT0 #T2 #HT2
-lapply (tpss_trans_eq … HT0 HT2) -T /2 width=3/
-qed.
-
-lemma cpr_tps_trans: ∀L,T1,T. L ⊢ T1 ➡ T →
-                     ∀T2. L ⊢ T ▶ [O, |L|] T2 → L ⊢ T1 ➡ T2.
-/3 width=3/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/crf.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/crf.ma
deleted file mode 100644 (file)
index 5015f03..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/ldrop.ma".
-
-(* CONTEXT-SENSITIVE REDUCIBLE TERMS ****************************************)
-
-(* reducible binary items *)
-definition ri2: item2 → Prop ≝
-                λI. I = Bind2 true Abbr ∨ I = Flat2 Cast.
-
-(* irreducible binary binders *)
-definition ib2: bool → bind2 → Prop ≝
-                λa,I. I = Abst ∨ Bind2 a I = Bind2 false Abbr.
-
-(* reducible terms *)
-inductive crf: lenv → predicate term ≝
-| crf_delta  : ∀L,K,V,i. ⇩[0, i] L ≡ K.ⓓV → crf L (#i)
-| crf_appl_sn: ∀L,V,T. crf L V → crf L (ⓐV. T)
-| crf_appl_dx: ∀L,V,T. crf L T → crf L (ⓐV. T)
-| crf_ri2    : ∀I,L,V,T. ri2 I → crf L (②{I}V. T)
-| crf_ib2_sn : ∀a,I,L,V,T. ib2 a I → crf L V → crf L (ⓑ{a,I}V. T)
-| crf_ib2_dx : ∀a,I,L,V,T. ib2 a I → crf (L.ⓑ{I}V) T → crf L (ⓑ{a,I}V. T)
-| crf_beta   : ∀a,L,V,W,T. crf L (ⓐV. ⓛ{a}W. T)
-| crf_theta  : ∀a,L,V,W,T. crf L (ⓐV. ⓓ{a}W. T)
-.
-
-interpretation
-   "context-sensitive reducibility (term)"
-   'Reducible L T = (crf L T).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact trf_inv_atom_aux: ∀I,L,T. L ⊢ 𝐑⦃T⦄ → L = ⋆ → T = ⓪{I} → ⊥.
-#I #L #T * -L -T
-[ #L #K #V #i #HLK #H1 #H2 destruct
-  lapply (ldrop_inv_atom1 … HLK) -HLK #H destruct
-| #L #V #T #_ #_ #H destruct
-| #L #V #T #_ #_ #H destruct
-| #J #L #V #T #_ #_ #H destruct
-| #a #J #L #V #T #_ #_ #_ #H destruct
-| #a #J #L #V #T #_ #_ #_ #H destruct
-| #a #L #V #W #T #_ #H destruct
-| #a #L #V #W #T #_ #H destruct
-]
-qed.
-
-lemma trf_inv_atom: ∀I. ⋆ ⊢ 𝐑⦃⓪{I}⦄ → ⊥.
-/2 width=6/ qed-.
-
-fact trf_inv_lref_aux: ∀L,T. L ⊢ 𝐑⦃T⦄ → ∀i. T = #i → ∃∃K,V. ⇩[0, i] L ≡ K.ⓓV.
-#L #T * -L -T
-[ #L #K #V #j #HLK #i #H destruct /2 width=3/
-| #L #V #T #_ #i #H destruct
-| #L #V #T #_ #i #H destruct
-| #J #L #V #T #_ #i #H destruct
-| #a #J #L #V #T #_ #_ #i #H destruct
-| #a #J #L #V #T #_ #_ #i #H destruct
-| #a #L #V #W #T #i #H destruct
-| #a #L #V #W #T #i #H destruct
-]
-qed.
-
-lemma trf_inv_lref: ∀L,i. L ⊢ 𝐑⦃#i⦄ → ∃∃K,V. ⇩[0, i] L ≡ K.ⓓV.
-/2 width=3/ qed-.
-
-fact crf_inv_ib2_aux: ∀a,I,L,W,U,T. ib2 a I → L ⊢ 𝐑⦃T⦄ → T = ⓑ{a,I}W. U →
-                      L ⊢ 𝐑⦃W⦄ ∨ L.ⓑ{I}W ⊢ 𝐑⦃U⦄.
-#a #I #L #W #U #T #HI * -T
-[ #L #K #V #i #_ #H destruct
-| #L #V #T #_ #H destruct
-| #L #V #T #_ #H destruct
-| #J #L #V #T #H1 #H2 destruct
-  elim H1 -H1 #H destruct
-  elim HI -HI #H destruct
-| #b #J #L #V #T #_ #HV #H destruct /2 width=1/
-| #b #J #L #V #T #_ #HT #H destruct /2 width=1/
-| #b #L #V #W #T #H destruct
-| #b #L #V #W #T #H destruct
-]
-qed.
-
-lemma crf_inv_ib2: ∀a,I,L,W,T. ib2 a I → L ⊢ 𝐑⦃ⓑ{a,I}W.T⦄ →
-                   L ⊢ 𝐑⦃W⦄ ∨ L.ⓑ{I}W ⊢ 𝐑⦃T⦄.
-/2 width=5/ qed-.
-
-fact crf_inv_appl_aux: ∀L,W,U,T. L ⊢ 𝐑⦃T⦄ → T = ⓐW. U →
-                       ∨∨ L ⊢ 𝐑⦃W⦄ | L ⊢ 𝐑⦃U⦄ | (𝐒⦃U⦄ → ⊥).
-#L #W #U #T * -T
-[ #L #K #V #i #_ #H destruct
-| #L #V #T #HV #H destruct /2 width=1/
-| #L #V #T #HT #H destruct /2 width=1/
-| #J #L #V #T #H1 #H2 destruct
-  elim H1 -H1 #H destruct
-| #a #I #L #V #T #_ #_ #H destruct
-| #a #I #L #V #T #_ #_ #H destruct
-| #a #L #V #W0 #T #H destruct
-  @or3_intro2 #H elim (simple_inv_bind … H)
-| #a #L #V #W0 #T #H destruct
-  @or3_intro2 #H elim (simple_inv_bind … H)
-]
-qed.
-
-lemma crf_inv_appl: ∀L,V,T. L ⊢ 𝐑⦃ⓐV.T⦄ → ∨∨ L ⊢ 𝐑⦃V⦄ | L ⊢ 𝐑⦃T⦄ | (𝐒⦃T⦄ → ⊥).
-/2 width=3/ qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/crf_append.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/crf_append.ma
deleted file mode 100644 (file)
index f50b97e..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/ldrop_append.ma".
-include "basic_2/reducibility/crf.ma".
-
-(* CONTEXT-SENSITIVE REDUCIBLE TERMS ****************************************)
-
-(* Advanved properties ******************************************************)
-
-lemma crf_labst_last: ∀L,T,W. L ⊢ 𝐑⦃T⦄  → ⋆.ⓛW @@ L ⊢ 𝐑⦃T⦄.
-#L #T #W #H elim H -L -T /2 width=1/
-#L #K #V #i #HLK
-lapply (ldrop_fwd_ldrop2_length … HLK) #Hi
-lapply (ldrop_O1_append_sn_le … HLK … (⋆.ⓛW)) -HLK /2 width=2/ -Hi /2 width=3/
-qed.
-
-lemma crf_trf: ∀T,W. ⋆ ⊢ 𝐑⦃T⦄ → ⋆.ⓛW ⊢ 𝐑⦃T⦄.
-#T #W #H lapply (crf_labst_last … W H) //
-qed.
-
-(* Advanced inversion lemmas ************************************************)
-
-fact crf_inv_labst_last_aux: ∀L1,T,W. L1 ⊢ 𝐑⦃T⦄  →
-                             ∀L2. L1 = ⋆.ⓛW @@ L2 → L2 ⊢ 𝐑⦃T⦄.
-#L1 #T #W #H elim H -L1 -T /2 width=1/ /3 width=1/
-[ #L1 #K1 #V1 #i #HLK1 #L2 #H destruct
-  lapply (ldrop_fwd_ldrop2_length … HLK1)
-  >append_length >commutative_plus normalize in ⊢ (??% → ?); #H
-  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/
-  | lapply (ldrop_O1_inv_append1_ge … HLK1 ?) -HLK1 // <minus_n_n #H
-    lapply (ldrop_inv_refl … H) -H #H destruct
-  ]
-| #a #I #L1 #V #T #HI #_ #IHT #L2 #H destruct /3 width=1/
-]
-qed.
-
-lemma crf_inv_labst_last: ∀L,T,W. ⋆.ⓛW @@ L ⊢ 𝐑⦃T⦄  → L ⊢ 𝐑⦃T⦄.
-/2 width=4/ qed-.
-
-lemma crf_inv_trf: ∀T,W. ⋆.ⓛW ⊢ 𝐑⦃T⦄  → ⋆ ⊢ 𝐑⦃T⦄.
-/2 width=4/ qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/fpr.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/fpr.ma
deleted file mode 100644 (file)
index 3910615..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/tpr.ma".
-
-(* CONTEXT-FREE PARALLEL REDUCTION ON CLOSURES ******************************)
-
-definition fpr: bi_relation lenv term ≝
-                λL1,T1,L2,T2. |L1| = |L2| ∧ L1 @@ T1 ➡ L2 @@ T2.
-
-interpretation
-   "context-free parallel reduction (closure)"
-   'FocalizedPRed L1 T1 L2 T2 = (fpr L1 T1 L2 T2).
-
-(* Basic properties *********************************************************)
-
-lemma fpr_refl: bi_reflexive … fpr.
-/2 width=1/ qed.
-
-lemma fpr_shift: ∀I1,I2,L1,L2,V1,V2,T1,T2.
-                 ⦃L1, -ⓑ{I1}V1.T1⦄ ➡ ⦃L2, -ⓑ{I2}V2.T2⦄ →
-                 ⦃L1.ⓑ{I1}V1, T1⦄ ➡ ⦃L2.ⓑ{I2}V2, T2⦄.
-#I1 #I2 #L1 #L2 #V1 #V2 #T1 #T2 * #HL12 #HT12
-@conj // normalize // (**) (* explicit constructor *)
-qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma fpr_inv_atom1: ∀L2,T1,T2. ⦃⋆, T1⦄ ➡ ⦃L2, T2⦄ → T1 ➡ T2 ∧ L2 = ⋆.
-#L2 #T1 #T2 * #H
-lapply (length_inv_zero_sn … H) -H #H destruct /2 width=1/
-qed-.
-
-lemma fpr_inv_atom3: ∀L1,T1,T2. ⦃L1,T1⦄ ➡ ⦃⋆,T2⦄ → T1 ➡ T2 ∧ L1 = ⋆.
-#L1 #T1 #T2 * #H
-lapply (length_inv_zero_dx … H) -H #H destruct /2 width=1/
-qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma fpr_fwd_pair1: ∀I1,K1,L2,V1,T1,T2. ⦃K1.ⓑ{I1}V1, T1⦄ ➡ ⦃L2, T2⦄ →
-                     ∃∃I2,K2,V2. ⦃K1, -ⓑ{I1}V1.T1⦄ ➡ ⦃K2, -ⓑ{I2}V2.T2⦄  &
-                                 L2 = K2.ⓑ{I2}V2.
-#I1 #K1 #L2 #V1 #T1 #T2 * #H
-elim (length_inv_pos_sn … H) -H #I2 #K2 #V2 #HK12 #H destruct /3 width=5/
-qed-.
-
-lemma fpr_fwd_pair3: ∀I2,L1,K2,V2,T1,T2. ⦃L1, T1⦄ ➡ ⦃K2.ⓑ{I2}V2, T2⦄ →
-                     ∃∃I1,K1,V1. ⦃K1, -ⓑ{I1}V1.T1⦄ ➡ ⦃K2, -ⓑ{I2}V2.T2⦄  &
-                                 L1 = K1.ⓑ{I1}V1.
-#I2 #L1 #K2 #V2 #T1 #T2 * #H
-elim (length_inv_pos_dx … H) -H #I1 #K1 #V1 #HK12 #H destruct /3 width=5/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/fpr_cpr.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/fpr_cpr.ma
deleted file mode 100644 (file)
index 0de0b98..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/cfpr_cpr.ma".
-
-(* CONTEXT-FREE PARALLEL REDUCTION ON CLOSURES ******************************)
-
-(* Properties on context-sensitive parallel reduction for terms *************)
-
-lemma cpr_fpr: ∀L,T1,T2. L ⊢ T1 ➡ T2 → ⦃L, T1⦄ ➡ ⦃L, T2⦄.
-/2 width=4/ qed.
-
-(* Advanced propertis *******************************************************)
-
-lemma fpr_bind_sn: ∀L1,L2,V1,V2. ⦃L1, V1⦄ ➡ ⦃L2, V2⦄ → ∀T1,T2. T1 ➡ T2 →
-                   ∀a,I. ⦃L1, ⓑ{a,I}V1.T1⦄ ➡ ⦃L2, ⓑ{a,I}V2.T2⦄.
-#L1 #L2 #V1 #V2 #H #T1 #T2 #HT12 #a #I
-elim (fpr_inv_all … H) /3 width=4/
-qed.
-
-(* Advanced forward lemmas **************************************************)
-
-lemma fpr_fwd_shift_bind_minus: ∀I1,I2,L1,L2,V1,V2,T1,T2.
-                                ⦃L1, -ⓑ{I1}V1.T1⦄ ➡ ⦃L2, -ⓑ{I2}V2.T2⦄ →
-                                ⦃L1, V1⦄ ➡ ⦃L2, V2⦄ ∧ I1 = I2.
-* #I2 #L1 #L2 #V1 #V2 #T1 #T2 #H
-elim (fpr_inv_all … H) -H #L #HL1 #H #HL2
-[ elim (cpr_inv_abbr1 … H) -H *
-  [ #V #V0 #T #HV1 #HV0 #_ #H destruct /4 width=4/
-  | #T #_ #_ #H destruct
-  ]
-| elim (cpr_inv_abst1 … H Abst V2) -H
-  #V #T #HV1 #_ #H destruct /3 width=4/
-]
-qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma fpr_inv_pair1: ∀I,K1,L2,V1,T1,T2. ⦃K1.ⓑ{I}V1, T1⦄ ➡ ⦃L2, T2⦄ →
-                     ∃∃K2,V2. ⦃K1, V1⦄  ➡ ⦃K2, V2⦄ &
-                              ⦃K1, -ⓑ{I}V1.T1⦄ ➡ ⦃K2, -ⓑ{I}V2.T2⦄  &
-                              L2 = K2.ⓑ{I}V2.
-#I1 #K1 #X #V1 #T1 #T2 #H
-elim (fpr_fwd_pair1 … H) -H #I2 #K2 #V2 #HT12 #H destruct
-elim (fpr_fwd_shift_bind_minus … HT12) #HV12 #H destruct /2 width=5/
-qed-.
-
-lemma fpr_inv_pair3: ∀I,L1,K2,V2,T1,T2. ⦃L1, T1⦄ ➡ ⦃K2.ⓑ{I}V2, T2⦄ →
-                     ∃∃K1,V1. ⦃K1, V1⦄  ➡ ⦃K2, V2⦄ &
-                              ⦃K1, -ⓑ{I}V1.T1⦄ ➡ ⦃K2, -ⓑ{I}V2.T2⦄  &
-                              L1 = K1.ⓑ{I}V1.
-#I2 #X #K2 #V2 #T1 #T2 #H
-elim (fpr_fwd_pair3 … H) -H #I1 #K1 #V1 #HT12 #H destruct
-elim (fpr_fwd_shift_bind_minus … HT12) #HV12 #H destruct /2 width=5/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/fpr_fpr.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/fpr_fpr.ma
deleted file mode 100644 (file)
index 3f7ac2c..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/tpr_tpr.ma".
-include "basic_2/reducibility/fpr.ma".
-
-(* CONTEXT-FREE PARALLEL REDUCTION ON CLOSURES ******************************)
-
-(* Main properties **********************************************************)
-
-theorem fpr_conf: bi_confluent … fpr.
-#L0 #L1 #T0 #T1 * #HL01 #HT01 #L2 #T2 * >HL01 #HL12 #HT02
-elim (tpr_conf … HT01 HT02) -L0 -T0 #X #H1 #H2
-elim (tpr_fwd_shift1 … H1) #L #T #HL1 #H destruct /3 width=5/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/lfpr.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/lfpr.ma
deleted file mode 100644 (file)
index 5e1ba79..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/ltpss_sn.ma".
-include "basic_2/reducibility/ltpr.ma".
-
-(* FOCALIZED PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ***********************)
-
-definition lfpr: relation lenv ≝
-   λL1,L2. ∃∃L. L1 ➡ L & L ⊢ ▶* [0, |L|] L2
-.
-
-interpretation
-  "focalized parallel reduction (environment)"
-  'FocalizedPRed L1 L2 = (lfpr L1 L2).
-
-(* Basic properties *********************************************************)
-
-(* Note: lemma 250 *)
-lemma lfpr_refl: ∀L. ⦃L⦄ ➡ ⦃L⦄.
-/2 width=3/ qed.
-
-lemma ltpss_sn_lfpr: ∀L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 → ⦃L1⦄ ➡ ⦃L2⦄.
-/3 width=5/ qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma lfpr_inv_atom1: ∀L2. ⦃⋆⦄ ➡ ⦃L2⦄ → L2 = ⋆.
-#L2 * #L #HL >(ltpr_inv_atom1 … HL) -HL #HL2 >(ltpss_sn_inv_atom1 … HL2) -HL2 //
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/lfpr_aaa.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/lfpr_aaa.ma
deleted file mode 100644 (file)
index 6f6c49d..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/static/aaa_ltpss_sn.ma".
-include "basic_2/reducibility/ltpr_aaa.ma".
-include "basic_2/reducibility/lfpr.ma".
-
-(* FOCALIZED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS **********************)
-
-(* Properties about atomic arity assignment on terms ************************)
-
-lemma aaa_lfpr_conf: ∀L1,T,A. L1 ⊢ T ⁝ A → ∀L2. ⦃L1⦄ ➡ ⦃L2⦄ → L2 ⊢ T ⁝ A.
-#L1 #T #A #HT #L2 * /3 width=5/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/lfpr_alt.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/lfpr_alt.ma
deleted file mode 100644 (file)
index adff7ad..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/lenv_px_bi.ma".
-include "basic_2/reducibility/fpr_cpr.ma".
-include "basic_2/reducibility/lfpr_fpr.ma".
-
-(* FOCALIZED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS **********************)
-
-(* alternative definition *)
-definition lfpra: relation lenv ≝ lpx_bi fpr.
-
-interpretation
-  "focalized parallel reduction (environment) alternative"
-  'FocalizedPRedAlt L1 L2 = (lfpra L1 L2).
-
-(* Basic properties *********************************************************)
-
-lemma lfpra_refl: reflexive … lfpra.
-/2 width=1/ qed.
-
-lemma fpr_lfpra: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ → ⦃L1⦄ ➡➡ ⦃L2⦄.
-#L1 elim L1 -L1
-[ #L2 #T1 #T2 #H
-  elim (fpr_inv_atom1 … H) -H #_ #H destruct //
-| #L1 #I #V1 #IH #L2 #T1 #T2 #H
-  elim (fpr_inv_pair1 … H) -H #L #V #HV1 #HL1 #H destruct /3 width=3/
-]
-qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma lfpra_inv_atom1: ∀L2. ⦃⋆⦄ ➡➡ ⦃L2⦄ → L2 = ⋆.
-/2 width=2 by lpx_bi_inv_atom1/ qed-.
-
-lemma lfpra_inv_pair1: ∀K1,I,V1,L2. ⦃K1. ⓑ{I} V1⦄ ➡➡ ⦃L2⦄ →
-                       ∃∃K2,V2. ⦃K1⦄ ➡➡ ⦃K2⦄ & ⦃K1, V1⦄ ➡ ⦃K2, V2⦄ &
-                                L2 = K2. ⓑ{I} V2.
-/2 width=1 by lpx_bi_inv_pair1/ qed-.
-
-lemma lfpra_inv_atom2: ∀L1. ⦃L1⦄ ➡➡ ⦃⋆⦄ → L1 = ⋆.
-/2 width=2 by lpx_bi_inv_atom2/ qed-.
-
-lemma lfpra_inv_pair2: ∀L1,K2,I,V2. ⦃L1⦄ ➡➡ ⦃K2. ⓑ{I} V2⦄ →
-                       ∃∃K1,V1. ⦃K1⦄ ➡➡ ⦃K2⦄ & ⦃K1, V1⦄ ➡ ⦃K2, V2⦄ &
-                                L1 = K1. ⓑ{I} V1.
-/2 width=1 by lpx_bi_inv_pair2/ qed-.
-
-lemma lfpra_inv_fpr: ∀L1,L2. ⦃L1⦄ ➡➡ ⦃L2⦄ → ∀T.⦃L1, T⦄ ➡ ⦃L2, T⦄.
-#L1 #L2 * -L1 -L2 // /3 width=1/
-qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma lfpra_fwd_length: ∀L1,L2. ⦃L1⦄ ➡➡ ⦃L2⦄ → |L1| = |L2|.
-/2 width=2 by lpx_bi_fwd_length/ qed-.
-
-(* Main properties **********************************************************)
-
-theorem lfpr_lfpra: ∀L1,L2. ⦃L1⦄ ➡ ⦃L2⦄ → ⦃L1⦄ ➡➡ ⦃L2⦄.
-#L1 #L2 #H
-lapply (lfpr_inv_fpr … H (⋆0)) -H /2 width=3/
-qed.
-
-theorem lfpra_lfpr: ∀L1,L2. ⦃L1⦄ ➡➡ ⦃L2⦄ → ⦃L1⦄ ➡ ⦃L2⦄.
-#L1 #L2 #H
-lapply (lfpra_inv_fpr … H (⋆0)) -H /2 width=3/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/lfpr_cpr.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/lfpr_cpr.ma
deleted file mode 100644 (file)
index 2a40f58..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/ltpss_sn_ltpss_sn.ma".
-include "basic_2/reducibility/cpr.ma".
-include "basic_2/reducibility/lfpr.ma".
-
-(* FOCALIZED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS **********************)
-
-(* Advanced properties ****************************************************)
-
-lemma lfpr_pair_cpr: ∀L1,L2. ⦃L1⦄ ➡ ⦃L2⦄ → ∀V1,V2. L2 ⊢ V1 ➡ V2 →
-                     ∀I. ⦃L1. ⓑ{I} V1⦄ ➡ ⦃L2. ⓑ{I} V2⦄.
-#L1 #L2 * #L #HL1 #HL2 #V1 #V2 *
-<(ltpss_sn_fwd_length … HL2) #V #HV1 #HV2 #I
-lapply (ltpss_sn_tpss_trans_eq … HV2 … HL2) -HV2 #V2
-@(ex2_1_intro … (L.ⓑ{I}V)) /2 width=1/ (**) (* explicit constructor *)
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/lfpr_fpr.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/lfpr_fpr.ma
deleted file mode 100644 (file)
index 9a226be..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/lfpr.ma".
-include "basic_2/reducibility/cfpr_cpr.ma".
-
-(* FOCALIZED PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ***********************)
-
-(* Inversion lemmas on context-free parallel reduction for closures *********)
-
-lemma fpr_lfpr: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ → ⦃L1⦄ ➡ ⦃L2⦄.
-#L1 #L2 #T1 #T2 #H
-elim (fpr_inv_all … H) -H /2 width=3/
-qed. 
-
-(* Inversion lemmas on context-free parallel reduction for closures *********)
-
-lemma lfpr_inv_fpr: ∀L1,L2. ⦃L1⦄ ➡ ⦃L2⦄ → ∀T. ⦃L1, T⦄ ➡ ⦃L2, T⦄.
-#L1 #L2 * /2 width=4/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/lfpr_lfpr.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/lfpr_lfpr.ma
deleted file mode 100644 (file)
index 7031e79..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/ltpr_ltpss_sn.ma".
-include "basic_2/reducibility/ltpr_ltpr.ma".
-include "basic_2/reducibility/lfpr.ma".
-
-(* FOCALIZED PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ***********************)
-
-(* Main properties **********************************************************)
-
-theorem lfpr_conf: ∀L0,L1,L2. ⦃L0⦄ ➡ ⦃L1⦄ → ⦃L0⦄ ➡ ⦃L2⦄ →
-                   ∃∃L. ⦃L1⦄ ➡ ⦃L⦄ & ⦃L2⦄ ➡ ⦃L⦄.
-#K0 #L1 #L2 * #K1 #HK01 #HKL1 * #K2 #HK02 #HKL2
-lapply (ltpr_fwd_length … HK01) #H
->(ltpr_fwd_length … HK02) in H; #H
-elim (ltpr_conf … HK01 … HK02) -K0 #K #HK1 #HK2
-lapply (ltpss_sn_fwd_length … HKL1) #H1
-lapply (ltpss_sn_fwd_length … HKL2) #H2
->H1 in HKL1 H; -H1 #HKL1
->H2 in HKL2; -H2 #HKL2 #H
-elim (ltpr_ltpss_sn_conf … HKL1 … HK1) -K1 #K1 #HK1 #HLK1
-elim (ltpr_ltpss_sn_conf … HKL2 … HK2) -K2 #K2 #HK2 #HLK2
-elim (ltpss_sn_conf … HK1 … HK2) -K #K #HK1 #HK2
-lapply (ltpr_fwd_length … HLK1) #H1
-lapply (ltpr_fwd_length … HLK2) #H2
-/3 width=5/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/ltpr.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/ltpr.ma
deleted file mode 100644 (file)
index a910ea7..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/lenv_px.ma".
-include "basic_2/reducibility/tpr.ma".
-
-(* CONTEXT-FREE PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ********************)
-
-definition ltpr: relation lenv ≝ lpx tpr.
-
-interpretation
-  "context-free parallel reduction (environment)"
-  'PRed L1 L2 = (ltpr L1 L2).
-
-(* Basic properties *********************************************************)
-
-lemma ltpr_refl: reflexive … ltpr.
-/2 width=1/ qed.
-
-lemma ltpr_append: ∀K1,K2. K1 ➡ K2 → ∀L1,L2:lenv. L1 ➡ L2 → K1 @@ L1 ➡ K2 @@ L2.
-/2 width=1/ qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-(* Basic_1: was: wcpr0_gen_sort *)
-lemma ltpr_inv_atom1: ∀L2. ⋆ ➡ L2 → L2 = ⋆.
-/2 width=2 by lpx_inv_atom1/ qed-.
-
-(* Basic_1: was: wcpr0_gen_head *)
-lemma ltpr_inv_pair1: ∀K1,I,V1,L2. K1. ⓑ{I} V1 ➡ L2 →
-                      ∃∃K2,V2. K1 ➡ K2 & V1 ➡ V2 & L2 = K2. ⓑ{I} V2.
-/2 width=1 by lpx_inv_pair1/ qed-.
-
-lemma ltpr_inv_atom2: ∀L1. L1 ➡ ⋆ → L1 = ⋆.
-/2 width=2 by lpx_inv_atom2/ qed-.
-
-lemma ltpr_inv_pair2: ∀L1,K2,I,V2. L1 ➡ K2. ⓑ{I} V2 →
-                      ∃∃K1,V1. K1 ➡ K2 & V1 ➡ V2 & L1 = K1. ⓑ{I} V1.
-/2 width=1 by lpx_inv_pair2/ qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma ltpr_fwd_length: ∀L1,L2. L1 ➡ L2 → |L1| = |L2|.
-/2 width=2 by lpx_fwd_length/ qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma ltpr_inv_append1: ∀K1,L1. ∀L:lenv. K1 @@ L1 ➡ L →
-                        ∃∃K2,L2. K1 ➡ K2 & L1 ➡ L2 & L = K2 @@ L2.
-/2 width=1 by lpx_inv_append1/ qed-.
-
-lemma ltpr_inv_append2: ∀L:lenv. ∀K2,L2. L ➡ K2 @@ L2 →
-                        ∃∃K1,L1. K1 ➡ K2 & L1 ➡ L2 & L = K1 @@ L1.
-/2 width=1 by lpx_inv_append2/ qed-.
-
-(* Basic_1: removed theorems 2: wcpr0_getl wcpr0_getl_back *)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/ltpr_aaa.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/ltpr_aaa.ma
deleted file mode 100644 (file)
index b45dbb9..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/static/aaa_ltpss_dx.ma".
-include "basic_2/static/lsuba_aaa.ma".
-include "basic_2/reducibility/ltpr_ldrop.ma".
-
-(* CONTEXT-FREE PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ********************)
-
-(* Properties about atomic arity assignment on terms ************************)
-
-fact aaa_ltpr_tpr_conf_aux: ∀L,T,L1,T1,A. L1 ⊢ T1 ⁝ A → L = L1 → T = T1 →
-                            ∀L2. L1 ➡ L2 → ∀T2. T1 ➡ T2 → L2 ⊢ T2 ⁝ A.
-#L #T @(fw_ind … L T) -L -T #L #T #IH
-#L1 #T1 #A * -L1 -T1 -A
-[ -IH #L1 #k #H1 #H2 #L2 #_ #T2 #H destruct
-  >(tpr_inv_atom1 … H) -H //
-| #I #L1 #K1 #V1 #B #i #HLK1 #HK1 #H1 #H2 #L2 #HL12 #T2 #H destruct
-  >(tpr_inv_atom1 … H) -T2
-  lapply (ldrop_pair2_fwd_fw … HLK1 (#i)) #HKV1
-  elim (ltpr_ldrop_conf … HLK1 … HL12) -HLK1 -HL12 #X #H #HLK2
-  elim (ltpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct
-  lapply (IH … HKV1 … HK1 … HK12 … HV12) // -L1 -K1 -V1 /2 width=5/
-| #a #L1 #V1 #T1 #B #A #HB #HA #H1 #H2 #L2 #HL12 #X #H destruct
-  elim (tpr_inv_abbr1 … H) -H *
-  [ #V2 #T #T2 #HV12 #HT1 #HT2 #H destruct
-    lapply (tps_lsubs_trans … HT2 (L2.ⓓV2) ?) -HT2 /2 width=1/ #HT2
-    lapply (IH … HB … HL12 … HV12) -HB /width=5/ #HB
-    lapply (IH … HA … (L2.ⓓV2) … HT1) -IH -HA -HT1 /width=5/ -T1 /2 width=1/ -L1 -V1 /3 width=5/
-  | -B #T #HT1 #HXT #H destruct
-    lapply (IH … HA … (L2.ⓓV1) … HT1) /width=5/ -T1 /2 width=1/ -L1 #HA
-    @(aaa_inv_lift … HA … HXT) /2 width=1/
-  ]
-| #a #L1 #V1 #T1 #B #A #HB #HA #H1 #H2 #L2 #HL12 #X #H destruct
-  elim (tpr_inv_abst1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
-  lapply (IH … HB … HL12 … HV12) -HB /width=5/ #HB
-  lapply (IH … HA … (L2.ⓛV2) … HT12) -IH -HA -HT12 /width=5/ -T1 /2 width=1/
-| #L1 #V1 #T1 #B #A #HV1 #HT1 #H1 #H2 #L2 #HL12 #X #H destruct
-  elim (tpr_inv_appl1 … H) -H *
-  [ #V2 #T2 #HV12 #HT12 #H destruct
-    lapply (IH … HV1 … HL12 … HV12) -HV1 -HV12 /width=5/ #HB
-    lapply (IH … HT1 … HL12 … HT12) -IH -HT1 -HL12 -HT12 /width=5/ /2 width=3/
-  | #a #V2 #W2 #T0 #T2 #HV12 #HT02 #H1 #H2 destruct
-    elim (aaa_inv_abst … HT1) -HT1 #B0 #A0 #HB0 #HA0 #H destruct
-    lapply (IH … HV1 … HL12 … HV12) -HV1 -HV12 /width=5/ #HB
-    lapply (IH … HB0  … HL12 W2 ?) -HB0 /width=5/ #HB0
-    lapply (IH … HA0 … (L2.ⓛW2) … HT02) -IH -HA0 -HT02 [2,4: // |3,5: skip ] /2 width=1/ -T0 -L1 -V1 /4 width=7/
-  | #a #V0 #V2 #W0 #W2 #T0 #T2 #HV10 #HW02 #HT02 #HV02 #H1 #H2 destruct
-    elim (aaa_inv_abbr … HT1) -HT1 #B0 #HW0 #HT0
-    lapply (IH … HW0  … HL12 … HW02) -HW0 /width=5/ #HW2
-    lapply (IH … HV1 … HL12 … HV10) -HV1 -HV10 /width=5/ #HV0
-    lapply (IH … HT0 … (L2.ⓓW2) … HT02) -IH -HT0 -HT02 [2,4: // |3,5: skip ] /2 width=1/ -V1 -T0 -L1 -W0 #HT2
-    @(aaa_abbr … HW2) -HW2
-    @(aaa_appl … HT2) -HT2 /3 width=7/ (**) (* explict constructors, /5 width=7/ is too slow *)
-  ]
-| #L1 #V1 #T1 #A #HV1 #HT1 #H1 #H2 #L2 #HL12 #X #H destruct
-  elim (tpr_inv_cast1 … H) -H
-  [ * #V2 #T2 #HV12 #HT12 #H destruct
-    lapply (IH … HV1 … HL12 … HV12) -HV1 -HV12 /width=5/ #HV2
-    lapply (IH … HT1 … HL12 … HT12) -IH -HT1 -HL12 -HT12 /width=5/ -L1 -V1 -T1 /2 width=1/
-  | -HV1 #HT1X
-     lapply (IH … HT1 … HL12 … HT1X) -IH -HT1 -HL12 -HT1X /width=5/
-  ]
-]
-qed.
-
-lemma aaa_ltpr_tpr_conf: ∀L1,T1,A. L1 ⊢ T1 ⁝ A → ∀L2. L1 ➡ L2 →
-                         ∀T2. T1 ➡ T2 → L2 ⊢ T2 ⁝ A.
-/2 width=9/ qed.
-
-lemma aaa_ltpr_conf: ∀L1,T,A. L1 ⊢ T ⁝ A → ∀L2. L1 ➡ L2 → L2 ⊢ T ⁝ A.
-/2 width=5/ qed.
-
-lemma aaa_tpr_conf: ∀L,T1,A. L ⊢ T1 ⁝ A → ∀T2. T1 ➡ T2 → L ⊢ T2 ⁝ A.
-/2 width=5/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/ltpr_ldrop.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/ltpr_ldrop.ma
deleted file mode 100644 (file)
index 9452797..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/ldrop_lpx.ma".
-include "basic_2/reducibility/tpr_lift.ma".
-include "basic_2/reducibility/ltpr.ma".
-
-(* CONTEXT-FREE PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ********************)
-
-(* Basic_1: was: wcpr0_drop *)
-lemma ltpr_ldrop_conf: dropable_sn ltpr.
-/3 width=3 by lpx_deliftable_dropable, tpr_inv_lift1/ qed.
-
-(* Basic_1: was: wcpr0_drop_back *)
-lemma ldrop_ltpr_trans: dedropable_sn ltpr.
-/2 width=3/ qed.
-
-lemma ltpr_ldrop_trans_O1: dropable_dx ltpr.
-/2 width=3/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/ltpr_ltpr.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/ltpr_ltpr.ma
deleted file mode 100644 (file)
index 4a27a6e..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/tpr_tpr.ma".
-include "basic_2/reducibility/ltpr.ma".
-
-(* CONTEXT-FREE PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ********************)
-
-(* Main properties **********************************************************)
-
-theorem ltpr_conf: ∀L0:lenv. ∀L1. L0 ➡ L1 → ∀L2. L0 ➡ L2 →
-                   ∃∃L. L1 ➡ L & L2 ➡ L.
-#L0 #L1 #H elim H -L0 -L1 /2 width=3/
-#I #K0 #K1 #V0 #V1 #_ #HV01 #IHK01 #L2 #H
-elim (ltpr_inv_pair1 … H) -H #K2 #V2 #HK02 #HV02 #H destruct
-elim (IHK01 … HK02) -K0 #K #HK1 #HK2
-elim (tpr_conf … HV01 HV02) -V0 /3 width=5/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/ltpr_ltpss_dx.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/ltpr_ltpss_dx.ma
deleted file mode 100644 (file)
index cee1cb4..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/tpr_tpss.ma".
-
-(* CONTEXT-FREE PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ********************)
-
-(* Properties concerning dx parallel unfold on local environments ***********)
-
-lemma ltpr_ltpss_dx_conf: ∀L1,K1,d,e. L1 ▶* [d, e] K1 → ∀L2. L1 ➡ L2 →
-                          ∃∃K2. L2 ▶* [d, e] K2 & K1 ➡ K2.
-#L1 #K1 #d #e #H elim H -L1 -K1 -d -e
-[ /2 width=3/
-| #L1 #I #V1 #X #H
-  elim (ltpr_inv_pair1 … H) -H #L2 #V2 #HL12 #HV12 #H destruct /3 width=5/
-| #L1 #K1 #I #V1 #W1 #e #_ #HVW1 #IHLK1 #X #H
-  elim (ltpr_inv_pair1 … H) -H #L2 #V2 #HL12 #HV12 #H destruct
-  elim (IHLK1 … HL12) -L1 #K2 #HLK2 #HK12
-  elim (tpr_tpss_ltpr … HK12 … HV12 … HVW1) -V1 /3 width=5/
-| #L1 #K1 #I #V1 #W1 #d #e #_ #HVW1 #IHLK1 #X #H
-  elim (ltpr_inv_pair1 … H) -H #L2 #V2 #HL12 #HV12 #H destruct
-  elim (IHLK1 … HL12) -L1 #K2 #HLK2 #HK12
-  elim (tpr_tpss_ltpr … HK12 … HV12 … HVW1) -V1 /3 width=5/
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/ltpr_ltpss_sn.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/ltpr_ltpss_sn.ma
deleted file mode 100644 (file)
index 8237623..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/ltpss_sn_alt.ma".
-include "basic_2/reducibility/ltpr_ltpss_dx.ma".
-
-(* CONTEXT-FREE PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ********************)
-
-(* Properties on sn parallel unfold on local environments *******************)
-
-(* Note: this can also be proved like ltpr_ltpss_dx_conf *) 
-lemma ltpr_ltpss_sn_conf: ∀L1,K1,d,e. L1 ⊢ ▶* [d, e] K1 → ∀L2. L1 ➡ L2 →
-                          ∃∃K2. L2 ⊢ ▶* [d, e] K2 & K1 ➡ K2.
-#L1 #K1 #d #e #H
-lapply (ltpss_sn_ltpssa … H) -H #H
-@(ltpssa_ind … H) -K1 /2 width=3/
-#K #K1 #_ #HK1 #IHK #L2 #HL12
-elim (IHK … HL12) -L1 #K2 #HLK2 #HK2
-elim (ltpr_ltpss_dx_conf … HK1 … HK2) -K /3 width=3/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/ltpr_tps.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/ltpr_tps.ma
deleted file mode 100644 (file)
index 75792ee..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/ltpr_ldrop.ma".
-
-(* CONTEXT-FREE PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ********************)
-
-(* Properties concerning parallel substitution on terms *********************)
-
-lemma ltpr_tps_trans: ∀L2,T1,T2,d,e. L2 ⊢ T1 ▶ [d, e] T2 → ∀L1. L1 ➡ L2 →
-                      ∃∃T. L1 ⊢ T1 ▶ [d, e] T & T ➡ T2.
-#L2 #T1 #T2 #d #e #H elim H -L2 -T1 -T2 -d -e
-[ /2 width=3/
-| #L2 #K2 #V2 #W2 #i #d #e #Hdi #Hide #HLK2 #HVW2 #L1 #HL12
-  elim (ltpr_ldrop_trans_O1 … HL12 … HLK2) -L2 #X #HLK1 #H
-  elim (ltpr_inv_pair2 … H) -H #K1 #V1 #HK12 #HV12 #H destruct -K2
-  elim (lift_total V1 0 (i+1)) #W1 #HVW1
-  lapply (tpr_lift … HV12 … HVW1 … HVW2) -V2 /3 width=4/
-| #L2 #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #L1 #HL12
-  elim (IHV12 … HL12) -IHV12 #V #HV1 #HV2
-  elim (IHT12 (L1.ⓑ{I}V) ?) /2 width=1/ -L2 /3 width=5/
-| #L2 #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #L1 #HL12
-  elim (IHV12 … HL12) -IHV12
-  elim (IHT12 … HL12) -L2 /3 width=5/
-]
-qed.
-
-lemma ltpr_tps_conf: ∀L1,T1,T2,d,e. L1 ⊢ T1 ▶ [d, e] T2 → ∀L2. L1 ➡ L2 →
-                     ∃∃T. L2 ⊢ T1 ▶ [d, e] T & T2 ➡ T.
-#L1 #T1 #T2 #d #e #H elim H -L1 -T1 -T2 -d -e
-[ /2 width=3/
-| #L1 #K1 #V1 #W1 #i #d #e #Hdi #Hide #HLK1 #HVW1 #L2 #HL12
-  elim (ltpr_ldrop_conf … HLK1 … HL12) -L1 #X #H #HLK2
-  elim (ltpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct -K1
-  elim (lift_total V2 0 (i+1)) #W2 #HVW2
-  lapply (tpr_lift … HV12 … HVW1 … HVW2) -V1 /3 width=4/
-| #L1 #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #L2 #HL12
-  elim (IHV12 … HL12) -IHV12 #V #HV1 #HV2
-  elim (IHT12 (L2.ⓑ{I}V) ?) /2 width=1/ -L1 /3 width=5/
-| #L1 #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #L2 #HL12
-  elim (IHV12 … HL12) -IHV12
-  elim (IHT12 … HL12) -L1 /3 width=5/
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/thnf.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/thnf.ma
deleted file mode 100644 (file)
index ab86426..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/grammar/tshf.ma".
-include "basic_2/reducibility/tpr.ma".
-
-(* CONTEXT-FREE WEAK HEAD NORMAL TERMS **************************************)
-
-definition thnf: predicate term ≝ NF … tpr tshf.
-
-interpretation
-   "context-free head normality (term)"
-   'HdNormal T = (thnf T).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma thnf_inv_tshf: ∀T. 𝐇𝐍⦃T⦄ → T ≈ T.
-normalize /2 width=1/
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma tpr_tshf: ∀T1,T2. T1 ➡ T2 → T1 ≈ T1 → T1 ≈ T2.
-#T1 #T2 #H elim H -T1 -T2 //
-[ #I #V1 #V2 #T1 #T2 #_ #_ #_ #IHT12 #H
-  elim (tshf_inv_flat1 … H) -H #W2 #U2 #HT1U2 #HT1 #_ #H1 #H2 destruct
-  lapply (IHT12 HT1U2) -IHT12 -HT1U2 #HUT2
-  lapply (simple_tshf_repl_dx … HUT2 HT1) /2 width=1/
-| #a #V1 #V2 #W #T1 #T2 #_ #_ #_ #_ #H
-  elim (tshf_inv_flat1 … H) -H #W2 #U2 #_ #H
-  elim (simple_inv_bind … H)
-| #a #I #V1 #V2 #T1 #T #T2 #_ #_ #_ #_ #_ #H
-  elim (tshf_inv_bind1 … H) -H #W2 #U2 #H1 * #H2 destruct //
-| #a #V2 #V1 #V #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #_ #H
-  elim (tshf_inv_flat1 … H) -H #U1 #U2 #_ #H
-  elim (simple_inv_bind … H)
-| #V #T #T1 #T2 #_ #_ #_ #H
-  elim (tshf_inv_bind1 … H) -H #W2 #U2 #H1 * #H2 destruct
-| #V #T1 #T2 #_ #_ #H
-  elim (tshf_inv_flat1 … H) -H #W2 #U2 #_ #_ #_ #H destruct
-]
-qed.
-
-lemma thnf_tshf: ∀T. T ≈ T → 𝐇𝐍⦃T⦄.
-/3 width=1/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/tpr.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/tpr.ma
deleted file mode 100644 (file)
index 957b5f3..0000000
+++ /dev/null
@@ -1,229 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/tps.ma".
-
-(* CONTEXT-FREE PARALLEL REDUCTION ON TERMS *********************************)
-
-(* Basic_1: includes: pr0_delta1 *)
-inductive tpr: relation term ≝
-| tpr_atom : ∀I. tpr (⓪{I}) (⓪{I})
-| tpr_flat : ∀I,V1,V2,T1,T2. tpr V1 V2 → tpr T1 T2 →
-             tpr (ⓕ{I} V1. T1) (ⓕ{I} V2. T2)
-| tpr_beta : ∀a,V1,V2,W,T1,T2.
-             tpr V1 V2 → tpr T1 T2 → tpr (ⓐV1. ⓛ{a}W. T1) (ⓓ{a}V2. T2)
-| tpr_delta: ∀a,I,V1,V2,T1,T,T2.
-             tpr V1 V2 → tpr T1 T → ⋆. ⓑ{I} V2 ⊢ T ▶ [0, 1] T2 →
-             tpr (ⓑ{a,I} V1. T1) (ⓑ{a,I} V2. T2)
-| tpr_theta: ∀a,V,V1,V2,W1,W2,T1,T2.
-             tpr V1 V2 → ⇧[0,1] V2 ≡ V → tpr W1 W2 → tpr T1 T2 →
-             tpr (ⓐV1. ⓓ{a}W1. T1) (ⓓ{a}W2. ⓐV. T2)
-| tpr_zeta : ∀V,T1,T,T2. tpr T1 T → ⇧[0, 1] T2 ≡ T → tpr (+ⓓV. T1) T2
-| tpr_tau  : ∀V,T1,T2. tpr T1 T2 → tpr (ⓝV. T1) T2
-.
-
-interpretation
-   "context-free parallel reduction (term)"
-   'PRed T1 T2 = (tpr T1 T2).
-
-(* Basic properties *********************************************************)
-
-lemma tpr_bind: ∀a,I,V1,V2,T1,T2. V1 ➡ V2 → T1 ➡ T2 → ⓑ{a,I} V1. T1 ➡ ⓑ{a,I} V2. T2.
-/2 width=3/ qed.
-
-(* Basic_1: was by definition: pr0_refl *)
-lemma tpr_refl: reflexive … tpr.
-#T elim T -T //
-#I elim I -I /2 width=1/
-qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-fact tpr_inv_atom1_aux: ∀U1,U2. U1 ➡ U2 → ∀I. U1 = ⓪{I} → U2 = ⓪{I}.
-#U1 #U2 * -U1 -U2
-[ //
-| #I #V1 #V2 #T1 #T2 #_ #_ #k #H destruct
-| #a #V1 #V2 #W #T1 #T2 #_ #_ #k #H destruct
-| #a #I #V1 #V2 #T1 #T #T2 #_ #_ #_ #k #H destruct
-| #a #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #k #H destruct
-| #V #T1 #T #T2 #_ #_ #k #H destruct
-| #V #T1 #T2 #_ #k #H destruct
-]
-qed.
-
-(* Basic_1: was: pr0_gen_sort pr0_gen_lref *)
-lemma tpr_inv_atom1: ∀I,U2. ⓪{I} ➡ U2 → U2 = ⓪{I}.
-/2 width=3/ qed-.
-
-fact tpr_inv_bind1_aux: ∀U1,U2. U1 ➡ U2 → ∀a,I,V1,T1. U1 = ⓑ{a,I} V1. T1 →
-                        (∃∃V2,T,T2. V1 ➡ V2 & T1 ➡ T &
-                                    ⋆.  ⓑ{I} V2 ⊢ T ▶ [0, 1] T2 &
-                                    U2 = ⓑ{a,I} V2. T2
-                        ) ∨
-                        ∃∃T. T1 ➡ T & ⇧[0, 1] U2 ≡ T & a = true & I = Abbr.
-#U1 #U2 * -U1 -U2
-[ #J #a #I #V #T #H destruct
-| #I1 #V1 #V2 #T1 #T2 #_ #_ #a #I #V #T #H destruct
-| #b #V1 #V2 #W #T1 #T2 #_ #_ #a #I #V #T #H destruct
-| #b #I1 #V1 #V2 #T1 #T #T2 #HV12 #HT1 #HT2 #a #I0 #V0 #T0 #H destruct /3 width=7/
-| #b #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #a #I0 #V0 #T0 #H destruct
-| #V #T1 #T #T2 #HT1 #HT2 #a #I0 #V0 #T0 #H destruct /3 width=3/
-| #V #T1 #T2 #_ #a #I0 #V0 #T0 #H destruct
-]
-qed.
-
-lemma tpr_inv_bind1: ∀V1,T1,U2,a,I. ⓑ{a,I} V1. T1 ➡ U2 →
-                     (∃∃V2,T,T2. V1 ➡ V2 & T1 ➡ T &
-                                 ⋆.  ⓑ{I} V2 ⊢ T ▶ [0, 1] T2 &
-                                 U2 = ⓑ{a,I} V2. T2
-                     ) ∨
-                     ∃∃T. T1 ➡ T & ⇧[0,1] U2 ≡ T & a = true & I = Abbr.
-/2 width=3/ qed-.
-
-(* Basic_1: was pr0_gen_abbr *)
-lemma tpr_inv_abbr1: ∀a,V1,T1,U2. ⓓ{a}V1. T1 ➡ U2 →
-                     (∃∃V2,T,T2. V1 ➡ V2 & T1 ➡ T &
-                                 ⋆.  ⓓV2 ⊢ T ▶ [0, 1] T2 &
-                                 U2 = ⓓ{a}V2. T2
-                      ) ∨
-                      ∃∃T. T1 ➡ T & ⇧[0, 1] U2 ≡ T & a = true.
-#a #V1 #T1 #U2 #H
-elim (tpr_inv_bind1 … H) -H * /3 width=7/
-qed-.
-
-fact tpr_inv_flat1_aux: ∀U1,U2. U1 ➡ U2 → ∀I,V1,U0. U1 = ⓕ{I} V1. U0 →
-                        ∨∨ ∃∃V2,T2.              V1 ➡ V2 & U0 ➡ T2 &
-                                                 U2 = ⓕ{I} V2. T2
-                         | ∃∃a,V2,W,T1,T2.       V1 ➡ V2 & T1 ➡ T2 &
-                                                 U0 = ⓛ{a}W. T1 &
-                                                 U2 = ⓓ{a}V2. T2 & I = Appl
-                         | ∃∃a,V2,V,W1,W2,T1,T2. V1 ➡ V2 & W1 ➡ W2 & T1 ➡ T2 &
-                                                 ⇧[0,1] V2 ≡ V &
-                                                 U0 = ⓓ{a}W1. T1 &
-                                                 U2 = ⓓ{a}W2. ⓐV. T2 &
-                                                 I = Appl
-                         |                       (U0 ➡ U2 ∧ I = Cast).
-#U1 #U2 * -U1 -U2
-[ #I #J #V #T #H destruct
-| #I #V1 #V2 #T1 #T2 #HV12 #HT12 #J #V #T #H destruct /3 width=5/
-| #a #V1 #V2 #W #T1 #T2 #HV12 #HT12 #J #V #T #H destruct /3 width=9/
-| #a #I #V1 #V2 #T1 #T #T2 #_ #_ #_ #J #V0 #T0 #H destruct
-| #a #V #V1 #V2 #W1 #W2 #T1 #T2 #HV12 #HV2 #HW12 #HT12 #J #V0 #T0 #H destruct /3 width=13/
-| #V #T1 #T #T2 #_ #_ #J #V0 #T0 #H destruct
-| #V #T1 #T2 #HT12 #J #V0 #T0 #H destruct /3 width=1/
-]
-qed.
-
-lemma tpr_inv_flat1: ∀V1,U0,U2,I. ⓕ{I} V1. U0 ➡ U2 →
-                     ∨∨ ∃∃V2,T2.              V1 ➡ V2 & U0 ➡ T2 &
-                                              U2 = ⓕ{I} V2. T2
-                      | ∃∃a,V2,W,T1,T2.       V1 ➡ V2 & T1 ➡ T2 &
-                                              U0 = ⓛ{a}W. T1 &
-                                              U2 = ⓓ{a}V2. T2 & I = Appl
-                      | ∃∃a,V2,V,W1,W2,T1,T2. V1 ➡ V2 & W1 ➡ W2 & T1 ➡ T2 &
-                                              ⇧[0,1] V2 ≡ V &
-                                              U0 = ⓓ{a}W1. T1 &
-                                              U2 = ⓓ{a}W2. ⓐV. T2 &
-                                              I = Appl
-                      |                       (U0 ➡ U2 ∧ I = Cast).
-/2 width=3/ qed-.
-
-(* Basic_1: was pr0_gen_appl *)
-lemma tpr_inv_appl1: ∀V1,U0,U2. ⓐV1. U0 ➡ U2 →
-                     ∨∨ ∃∃V2,T2.              V1 ➡ V2 & U0 ➡ T2 &
-                                              U2 = ⓐV2. T2
-                      | ∃∃a,V2,W,T1,T2.       V1 ➡ V2 & T1 ➡ T2 &
-                                              U0 = ⓛ{a}W. T1 &
-                                              U2 = ⓓ{a}V2. T2
-                      | ∃∃a,V2,V,W1,W2,T1,T2. V1 ➡ V2 & W1 ➡ W2 & T1 ➡ T2 &
-                                              ⇧[0,1] V2 ≡ V &
-                                              U0 = ⓓ{a}W1. T1 &
-                                              U2 = ⓓ{a}W2. ⓐV. T2.
-#V1 #U0 #U2 #H
-elim (tpr_inv_flat1 … H) -H *
-/3 width=5/ /3 width=9/ /3 width=13/
-#_ #H destruct
-qed-.
-
-(* Note: the main property of simple terms *)
-lemma tpr_inv_appl1_simple: ∀V1,T1,U. ⓐV1. T1 ➡ U → 𝐒⦃T1⦄ →
-                            ∃∃V2,T2. V1 ➡ V2 & T1 ➡ T2 &
-                                     U = ⓐV2. T2.
-#V1 #T1 #U #H #HT1
-elim (tpr_inv_appl1 … H) -H *
-[ /2 width=5/
-| #a #V2 #W #W1 #W2 #_ #_ #H #_ destruct
-  elim (simple_inv_bind … HT1)
-| #a #V2 #V #W1 #W2 #U1 #U2 #_ #_ #_ #_ #H #_ destruct
-  elim (simple_inv_bind … HT1)
-]
-qed-.
-
-(* Basic_1: was: pr0_gen_cast *)
-lemma tpr_inv_cast1: ∀V1,T1,U2. ⓝV1. T1 ➡ U2 →
-                       (∃∃V2,T2. V1 ➡ V2 & T1 ➡ T2 & U2 = ⓝV2. T2)
-                     ∨ T1 ➡ U2.
-#V1 #T1 #U2 #H
-elim (tpr_inv_flat1 … H) -H * /3 width=5/ #a #V2 #W #W1 #W2
-[ #_ #_ #_ #_ #H destruct
-| #T2 #U1 #_ #_ #_ #_ #_ #_ #H destruct
-]
-qed-.
-
-fact tpr_inv_lref2_aux: ∀T1,T2. T1 ➡ T2 → ∀i. T2 = #i →
-                        ∨∨        T1 = #i
-                         | ∃∃V,T. T ➡ #(i+1) & T1 = +ⓓV. T
-                         | ∃∃V,T. T ➡ #i & T1 = ⓝV. T.
-#T1 #T2 * -T1 -T2
-[ #I #i #H destruct /2 width=1/
-| #I #V1 #V2 #T1 #T2 #_ #_ #i #H destruct
-| #a #V1 #V2 #W #T1 #T2 #_ #_ #i #H destruct
-| #a #I #V1 #V2 #T1 #T #T2 #_ #_ #_ #i #H destruct
-| #a #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #i #H destruct
-| #V #T1 #T #T2 #HT1 #HT2 #i #H destruct
-  lapply (lift_inv_lref1_ge … HT2 ?) -HT2 // #H destruct /3 width=4/
-| #V #T1 #T2 #HT12 #i #H destruct /3 width=4/
-]
-qed.
-
-lemma tpr_inv_lref2: ∀T1,i. T1 ➡ #i →
-                     ∨∨        T1 = #i
-                      | ∃∃V,T. T ➡ #(i+1) & T1 = +ⓓV. T
-                      | ∃∃V,T. T ➡ #i & T1 = ⓝV. T.
-/2 width=3/ qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma tpr_fwd_shift1: ∀L1,T1,T. L1 @@ T1 ➡ T →
-                      ∃∃L2,T2. |L1| = |L2| & T = L2 @@ T2.
-#L1 @(lenv_ind_dx … L1) -L1 normalize
-[ #T1 #T #HT1
-  @(ex2_2_intro … (⋆)) // (**) (* explicit constructor *)
-| #I #L1 #V1 #IH #T1 #X
-  >shift_append_assoc normalize #H
-  elim (tpr_inv_bind1 … H) -H *
-  [ #V0 #T0 #X0 #_ #HT10 #H0 #H destruct
-    elim (IH … HT10) -IH -T1 #L #T #HL1 #H destruct
-    elim (tps_fwd_shift1 … H0) -T #L2 #T2 #HL2 #H destruct
-    >append_length >HL1 >HL2 -L1 -L
-    @(ex2_2_intro … (⋆.ⓑ{I}V0@@L2) T2) [ >append_length ] // /2 width=3/ (**) (* explicit constructor *)
-  | #T #_ #_ #H destruct
-  ]
-]
-qed-.
-
-(* Basic_1: removed theorems 3:
-            pr0_subst0_back pr0_subst0_fwd pr0_subst0
-   Basic_1: removed local theorems: 1: pr0_delta_tau
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/tpr_delift.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/tpr_delift.ma
deleted file mode 100644 (file)
index 99e621d..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/delift.ma".
-include "basic_2/reducibility/tpr_tpss.ma".
-
-(* CONTEXT-FREE PARALLEL REDUCTION ON TERMS *********************************)
-
-(* Properties on inverse basic term relocation ******************************)
-
-lemma tpr_delift_conf: ∀U1,U2. U1 ➡ U2 → ∀L,T1,d,e. L ⊢ ▼*[d, e] U1 ≡ T1 →
-                       ∃∃T2. T1 ➡ T2 & L ⊢ ▼*[d, e] U2 ≡ T2.
-#U1 #U2 #HU12 #L #T1 #d #e * #W1 #HUW1 #HTW1
-elim (tpr_tpss_conf … HU12 … HUW1) -U1 #U1 #HWU1 #HU21
-elim (tpr_inv_lift1 … HWU1 … HTW1) -W1 /3 width=5/
-qed. 
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/tpr_lift.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/tpr_lift.ma
deleted file mode 100644 (file)
index b4d7606..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/tps_lift.ma".
-include "basic_2/reducibility/tpr.ma".
-
-(* CONTEXT-FREE PARALLEL REDUCTION ON TERMS *********************************)
-
-(* Relocation properties ****************************************************)
-
-(* Basic_1: was: pr0_lift *)
-lemma tpr_lift: t_liftable tpr.
-#T1 #T2 #H elim H -T1 -T2
-[ * #i #U1 #d #e #HU1 #U2 #HU2
-  lapply (lift_mono … HU1 … HU2) -HU1 #H destruct
-  [ lapply (lift_inv_sort1 … HU2) -HU2 #H destruct //
-  | lapply (lift_inv_lref1 … HU2) * * #Hid #H destruct //
-  | lapply (lift_inv_gref1 … HU2) -HU2 #H destruct //
-  ]
-| #I #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #X1 #d #e #HX1 #X2 #HX2
-  elim (lift_inv_flat1 … HX1) -HX1 #W1 #U1 #HVW1 #HTU1 #HX1 destruct
-  elim (lift_inv_flat1 … HX2) -HX2 #W2 #U2 #HVW2 #HTU2 #HX2 destruct /3 width=4/
-| #a #V1 #V2 #W #T1 #T2 #_ #_ #IHV12 #IHT12 #X1 #d #e #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 /3 width=4/
-| #a #I #V1 #V2 #T1 #T #T2 #_ #_ #HT2 #IHV12 #IHT1 #X1 #d #e #HX1 #X2 #HX2
-  elim (lift_inv_bind1 … HX1) -HX1 #W1 #U1 #HVW1 #HTU1 #HX1 destruct
-  elim (lift_inv_bind1 … HX2) -HX2 #W2 #U0 #HVW2 #HTU0 #HX2 destruct
-  elim (lift_total T (d + 1) e) #U #HTU
-  @tpr_delta
-  [4: @(tps_lift_le … HT2 … HTU HTU0 ?) /2 width=1/ |1: skip |2: /2 width=4/ |3: /2 width=4/ ] (**) (*/3. is too slow *)
-| #a #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #HV2 #_ #_ #IHV12 #IHW12 #IHT12 #X1 #d #e #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 ?) -V // /3 width=4/
-| #V #T1 #T #T2 #_ #HT2 #IHT1 #X #d #e #H #U2 #HTU2
-  elim (lift_inv_bind1 … H) -H #V3 #T3 #_ #HT13 #H destruct -V
-  elim (lift_conf_O1 … HTU2 … HT2) -T2 /3 width=4/
-| #V #T1 #T2 #_ #IHT12 #X #d #e #HX #T #HT2
-  elim (lift_inv_flat1 … HX) -HX #V0 #T0 #_ #HT0 #HX destruct /3 width=4/
-]
-qed.
-
-(* Basic_1: was: pr0_gen_lift *)
-lemma tpr_inv_lift1: t_deliftable_sn tpr.
-#T1 #T2 #H elim H -T1 -T2
-[ * #i #X #d #e #HX
-  [ lapply (lift_inv_sort2 … HX) -HX #H destruct /2 width=3/
-  | lapply (lift_inv_lref2 … HX) -HX * * #Hid #H destruct /3 width=3/
-  | lapply (lift_inv_gref2 … HX) -HX #H destruct /2 width=3/
-  ]
-| #I #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #X #d #e #HX
-  elim (lift_inv_flat2 … HX) -HX #V0 #T0 #HV01 #HT01 #HX destruct
-  elim (IHV12 … HV01) -V1
-  elim (IHT12 … HT01) -T1 /3 width=5/
-| #a #V1 #V2 #W1 #T1 #T2 #_ #_ #IHV12 #IHT12 #X #d #e #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 … HV01) -V1
-  elim (IHT12 … HT01) -T1 /3 width=5/
-| #a #I #V1 #V2 #T1 #T #T2 #_ #_ #HT2 #IHV12 #IHT1 #X #d #e #HX
-  elim (lift_inv_bind2 … HX) -HX #W1 #U1 #HWV1 #HUT1 #HX destruct
-  elim (IHV12 … HWV1) -V1 #W2 #HWV2 #HW12
-  elim (IHT1 … HUT1) -T1 #U #HUT #HU1
-  elim (tps_inv_lift1_le … HT2 … HUT ?) -T // [3: /2 width=5/ |2: skip ] #U2 #HU2 #HUT2
-  @ex2_1_intro  [2: /2 width=2/ |1: skip |3: /2 width=3/ ] (**) (* /3 width=5/ is slow *)
-| #a #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #HV2 #_ #_ #IHV12 #IHW12 #IHT12 #X #d #e #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 … HV01) -V1 #V3 #HV32 #HV03
-  elim (IHW12 … HW01) -W1 #W3 #HW32 #HW03
-  elim (IHT12 … HT01) -T1 #T3 #HT32 #HT03
-  elim (lift_trans_le … HV32 … HV2 ?) -V2 // #V2 #HV32 #HV2
-  @ex2_1_intro [2: /3 width=2/ |1: skip |3: /2 width=3/ ] (**) (* /4 width=5/ is slow *)
-| #V #T1 #T #T2 #_ #HT2 #IHT1 #X #d #e #HX
-  elim (lift_inv_bind2 … HX) -HX #V3 #T3 #_ #HT31 #H destruct
-  elim (IHT1 … HT31) -T1 #T1 #HT1 #HT31
-  elim (lift_div_le … HT2 … HT1 ?) -T // /3 width=5/
-| #V #T1 #T2 #_ #IHT12 #X #d #e #HX
-  elim (lift_inv_flat2 … HX) -HX #V0 #T0 #_ #HT01 #H destruct
-  elim (IHT12 … HT01) -T1 /3 width=3/
-]
-qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-fact tpr_inv_abst1_aux: ∀U1,U2. U1 ➡ U2 → ∀a,V1,T1. U1 = ⓛ{a}V1. T1 →
-                        ∃∃V2,T2. V1 ➡ V2 & T1 ➡ T2 & U2 = ⓛ{a}V2. T2.
-#U1 #U2 * -U1 -U2
-[ #I #a #V #T #H destruct
-| #I #V1 #V2 #T1 #T2 #_ #_ #a #V #T #H destruct
-| #b #V1 #V2 #W #T1 #T2 #_ #_ #a #V #T #H destruct
-| #b #I #V1 #V2 #T1 #T #T2 #HV12 #HT1 #HT2 #a #V0 #T0 #H destruct
-  <(tps_inv_refl_SO2 … HT2 ? ? ?) -T2 /2 width=5/
-| #b #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #a #V0 #T0 #H destruct
-| #V #T1 #T #T2 #_ #_ #a #V0 #T0 #H destruct
-| #V #T1 #T2 #_ #a #V0 #T0 #H destruct
-]
-qed.
-
-(* Basic_1: was pr0_gen_abst *)
-lemma tpr_inv_abst1: ∀a,V1,T1,U2. ⓛ{a}V1. T1 ➡ U2 →
-                     ∃∃V2,T2. V1 ➡ V2 & T1 ➡ T2 & U2 = ⓛ{a}V2. T2.
-/2 width=3/ qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/tpr_tpr.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/tpr_tpr.ma
deleted file mode 100644 (file)
index 1522d00..0000000
+++ /dev/null
@@ -1,283 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/reducibility/tpr_tpss.ma".
-
-(* CONTEXT-FREE PARALLEL REDUCTION ON TERMS *********************************)
-
-(* Confluence lemmas ********************************************************)
-
-fact tpr_conf_atom_atom: ∀I. ∃∃X. ⓪{I} ➡ X & ⓪{I} ➡ X.
-/2 width=3/ qed.
-
-fact tpr_conf_flat_flat:
-   ∀I,V0,V1,T0,T1,V2,T2. (
-      ∀X0:term. #{X0} < #{V0} + #{T0} + 1 →
-      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
-      ∃∃X. X1 ➡ X & X2 ➡ X
-   ) →
-   V0 ➡ V1 → V0 ➡ V2 → T0 ➡ T1 → T0 ➡ T2 →
-   ∃∃T0. ⓕ{I} V1. T1 ➡ T0 & ⓕ{I} V2. T2 ➡ T0.
-#I #V0 #V1 #T0 #T1 #V2 #T2 #IH #HV01 #HV02 #HT01 #HT02
-elim (IH … HV01 … HV02) -HV01 -HV02 // #V #HV1 #HV2
-elim (IH … HT01 … HT02) -HT01 -HT02 -IH // /3 width=5/
-qed.
-
-fact tpr_conf_flat_beta:
-   ∀a,V0,V1,T1,V2,W0,U0,T2. (
-      ∀X0:term. #{X0} < #{V0} + (#{W0} + #{U0} + 1) + 1 →
-      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
-      ∃∃X. X1 ➡ X & X2 ➡ X
-   ) →
-   V0 ➡ V1 → V0 ➡ V2 →
-   U0 ➡ T2 → ⓛ{a}W0. U0 ➡ T1 →
-   ∃∃X. ⓐV1. T1 ➡ X & ⓓ{a}V2. T2 ➡ X.
-#a #V0 #V1 #T1 #V2 #W0 #U0 #T2 #IH #HV01 #HV02 #HT02 #H
-elim (tpr_inv_abst1 … H) -H #W1 #U1 #HW01 #HU01 #H destruct
-elim (IH … HV01 … HV02) -HV01 -HV02 /2 width=1/ #V #HV1 #HV2
-elim (IH … HT02 … HU01) -HT02 -HU01 -IH /2 width=1/ /3 width=5/
-qed.
-
-(* Basic-1: was:
-            pr0_cong_upsilon_refl pr0_cong_upsilon_zeta
-            pr0_cong_upsilon_cong pr0_cong_upsilon_delta
-*)
-fact tpr_conf_flat_theta:
-   ∀a,V0,V1,T1,V2,V,W0,W2,U0,U2. (
-      ∀X0:term. #{X0} < #{V0} + (#{W0} + #{U0} + 1) + 1 →
-      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
-      ∃∃X. X1 ➡ X & X2 ➡ X
-   ) →
-   V0 ➡ V1 → V0 ➡ V2 → ⇧[O,1] V2 ≡ V →
-   W0 ➡ W2 → U0 ➡ U2 →  ⓓ{a}W0. U0 ➡ T1 →
-   ∃∃X. ⓐV1. T1 ➡ X & ⓓ{a}W2. ⓐV. U2 ➡ X.
-#a #V0 #V1 #T1 #V2 #V #W0 #W2 #U0 #U2 #IH #HV01 #HV02 #HV2 #HW02 #HU02 #H
-elim (IH … HV01 … HV02) -HV01 -HV02 /2 width=1/ #VV #HVV1 #HVV2
-elim (lift_total VV 0 1) #VVV #HVV
-lapply (tpr_lift … HVV2 … HV2 … HVV) #HVVV
-elim (tpr_inv_abbr1 … H) -H *
-(* case 1: delta *)
-[ -HV2 -HVV2 #WW2 #UU2 #UU #HWW2 #HUU02 #HUU2 #H destruct
-  elim (IH … HW02 … HWW2) -HW02 -HWW2 /2 width=1/ #W #HW02 #HWW2
-  elim (IH … HU02 … HUU02) -HU02 -HUU02 -IH /2 width=1/ #U #HU2 #HUUU2
-  elim (tpr_tps_bind … HWW2 HUUU2 … HUU2) -UU2 #UUU #HUUU2 #HUUU1
-  @ex2_1_intro
-  [2: @tpr_theta [6: @HVV |7: @HWW2 |8: @HUUU2 |1,2,3,4: skip | // ]
-  |1:skip
-  |3: @tpr_delta [3: @tpr_flat |1: skip ] /2 width=5/
-  ] (**) (* /5 width=14/ is too slow *)
-(* case 3: zeta *)
-| -HV2 -HW02 -HVV2 #U1 #HU01 #HTU1
-  elim (IH … HU01 … HU02) -HU01 -HU02 -IH // -U0 #U #HU1 #HU2
-  elim (tpr_inv_lift1 … HU1 … HTU1) -U1 #UU #HUU #HT1UU #H destruct
-  @(ex2_1_intro … (ⓐVV.UU)) /2 width=1/ /3 width=5/ (**) (* /4 width=9/ is too slow *)
-]
-qed.
-
-fact tpr_conf_flat_cast:
-   ∀X2,V0,V1,T0,T1. (
-      ∀X0:term. #{X0} < #{V0} + #{T0} + 1 →
-      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
-      ∃∃X. X1 ➡ X & X2 ➡ X
-   ) →
-   V0 ➡ V1 → T0 ➡ T1 → T0 ➡ X2 →
-   ∃∃X. ⓝV1. T1 ➡ X & X2 ➡ X.
-#X2 #V0 #V1 #T0 #T1 #IH #_ #HT01 #HT02
-elim (IH … HT01 … HT02) -HT01 -HT02 -IH // /3 width=3/
-qed.
-
-fact tpr_conf_beta_beta:
-   ∀a. ∀W0:term. ∀V0,V1,T0,T1,V2,T2. (
-      ∀X0:term. #{X0} < #{V0} + (#{W0} + #{T0} + 1) + 1 →
-      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
-      ∃∃X. X1 ➡ X & X2 ➡ X
-   ) →
-   V0 ➡ V1 → V0 ➡ V2 → T0 ➡ T1 → T0 ➡ T2 →
-   ∃∃X. ⓓ{a}V1. T1 ➡X & ⓓ{a}V2. T2 ➡ X.
-#a #W0 #V0 #V1 #T0 #T1 #V2 #T2 #IH #HV01 #HV02 #HT01 #HT02
-elim (IH … HV01 … HV02) -HV01 -HV02 /2 width=1/
-elim (IH … HT01 … HT02) -HT01 -HT02 -IH /2 width=1/ /3 width=5/
-qed.
-
-(* Basic_1: was: pr0_cong_delta pr0_delta_delta *)
-fact tpr_conf_delta_delta:
-   ∀a,I1,V0,V1,T0,T1,TT1,V2,T2,TT2. (
-      ∀X0:term. #{X0} < #{V0} + #{T0} + 1 →
-      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
-      ∃∃X. X1 ➡ X & X2 ➡ X
-   ) →
-   V0 ➡ V1 → V0 ➡ V2 → T0 ➡ T1 → T0 ➡ T2 →
-   ⋆. ⓑ{I1} V1 ⊢ T1 ▶ [O, 1] TT1 →
-   ⋆. ⓑ{I1} V2 ⊢ T2 ▶ [O, 1] TT2 →
-   ∃∃X. ⓑ{a,I1} V1. TT1 ➡ X & ⓑ{a,I1} V2. TT2 ➡ X.
-#a #I1 #V0 #V1 #T0 #T1 #TT1 #V2 #T2 #TT2 #IH #HV01 #HV02 #HT01 #HT02 #HTT1 #HTT2
-elim (IH … HV01 … HV02) -HV01 -HV02 // #V #HV1 #HV2
-elim (IH … HT01 … HT02) -HT01 -HT02 -IH // #T #HT1 #HT2
-elim (tpr_tps_bind … HV1 HT1 … HTT1) -T1 #U1 #TTU1 #HTU1
-elim (tpr_tps_bind … HV2 HT2 … HTT2) -T2 #U2 #TTU2 #HTU2
-elim (tps_conf_eq … HTU1 … HTU2) -T #U #HU1 #HU2
-@ex2_1_intro [2,3: @tpr_delta |1: skip ] /width=10/ (**) (* /3 width=10/ is too slow *)
-qed.
-
-fact tpr_conf_delta_zeta:
-   ∀X2,V0,V1,T0,T1,TT1,T2. (
-      ∀X0:term. #{X0} < #{V0} + #{T0} + 1 →
-      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
-      ∃∃X. X1 ➡ X & X2 ➡ X
-   ) →
-   V0 ➡ V1 → T0 ➡ T1 → ⋆. ⓓV1 ⊢ T1 ▶ [O,1] TT1 →
-   T0 ➡ T2 → ⇧[O, 1] X2 ≡ T2 →
-   ∃∃X. +ⓓV1. TT1 ➡ X & X2 ➡ X.
-#X2 #V0 #V1 #T0 #T1 #TT1 #T2 #IH #_ #HT01 #HTT1 #HT02 #HXT2
-elim (IH … HT01 … HT02) -IH -HT01 -HT02 // -V0 -T0 #T #HT1 #HT2
-elim (tpr_tps_bind ? ? V1 … HT1 HTT1) -T1 // #TT #HTT1 #HTT
-elim (tpr_inv_lift1 … HT2 … HXT2) -T2 #X #HXT #HX2
-lapply (tps_inv_lift1_eq … HTT … HXT) -HTT #H destruct /3 width=3/
-qed.
-
-(* Basic_1: was: pr0_upsilon_upsilon *)
-fact tpr_conf_theta_theta:
-   ∀a,VV1,V0,V1,W0,W1,T0,T1,V2,VV2,W2,T2. (
-      ∀X0:term. #{X0} < #{V0} + (#{W0} + #{T0} + 1) + 1 →
-      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
-      ∃∃X. X1 ➡ X & X2 ➡ X
-   ) →
-   V0 ➡ V1 → V0 ➡ V2 → W0 ➡ W1 → W0 ➡ W2 → T0 ➡ T1 → T0 ➡ T2 →
-   ⇧[O, 1] V1 ≡ VV1 → ⇧[O, 1] V2 ≡ VV2 →
-   ∃∃X. ⓓ{a}W1. ⓐVV1. T1 ➡ X & ⓓ{a}W2. ⓐVV2. T2 ➡ X.
-#a #VV1 #V0 #V1 #W0 #W1 #T0 #T1 #V2 #VV2 #W2 #T2 #IH #HV01 #HV02 #HW01 #HW02 #HT01 #HT02 #HVV1 #HVV2
-elim (IH … HV01 … HV02) -HV01 -HV02 /2 width=1/ #V #HV1 #HV2
-elim (IH … HW01 … HW02) -HW01 -HW02 /2 width=1/ #W #HW1 #HW2
-elim (IH … HT01 … HT02) -HT01 -HT02 -IH /2 width=1/ #T #HT1 #HT2
-elim (lift_total V 0 1) #VV #HVV
-lapply (tpr_lift … HV1 … HVV1 … HVV) -V1 #HVV1
-lapply (tpr_lift … HV2 … HVV2 … HVV) -V2 -HVV #HVV2
-@ex2_1_intro [2,3: @tpr_bind |1:skip ] /2 width=5/ (**) (* /4 width=5/ is too slow *)
-qed.
-
-fact tpr_conf_zeta_zeta:
-   ∀V0:term. ∀X2,TT0,T0,T1,TT2. (
-      ∀X0:term. #{X0} < #{V0} + #{TT0} + 1 →
-      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
-      ∃∃X. X1 ➡ X & X2 ➡ X
-   ) →
-   TT0 ➡ T0 → ⇧[O, 1] T1 ≡ T0 →
-   TT0 ➡ TT2 → ⇧[O, 1] X2 ≡ TT2 →
-   ∃∃X. T1 ➡ X & X2 ➡ X.
-#V0 #X2 #TT0 #T0 #T1 #TT2 #IH #HTT0 #HT10 #HTT02 #HXTT2
-elim (IH … HTT0 … HTT02) -IH -HTT0 -HTT02 // -V0 -TT0 #T #HT0 #HTT2
-elim (tpr_inv_lift1 … HT0 … HT10) -T0 #T0 #HT0 #HT10
-elim (tpr_inv_lift1 … HTT2 … HXTT2) -TT2 #TT2 #HTT2 #HXTT2
-lapply (lift_inj … HTT2 … HT0) -HTT2 #H destruct /2 width=3/
-qed.
-
-fact tpr_conf_tau_tau:
-   ∀V0,T0:term. ∀X2,T1. (
-      ∀X0:term. #{X0} < #{V0} + #{T0} + 1 →
-      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
-      ∃∃X. X1 ➡ X & X2 ➡ X
-   ) →
-   T0 ➡ T1 → T0 ➡ X2 →
-   ∃∃X. T1 ➡ X & X2 ➡ X.
-#V0 #T0 #X2 #T1 #IH #HT01 #HT02
-elim (IH … HT01 … HT02) -HT01 -HT02 -IH // /2 width=3/
-qed.
-
-(* Confluence ***************************************************************)
-
-fact tpr_conf_aux:
-   ∀Y0:term. (
-      ∀X0:term. #{X0} < #{Y0} →
-      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
-      ∃∃X. X1 ➡ X & X2 ➡ X
-         ) →
-   ∀X0,X1,X2. X0 ➡ X1 → X0 ➡ X2 → X0 = Y0 →
-   ∃∃X. X1 ➡ X & X2 ➡ X.
-#Y0 #IH #X0 #X1 #X2 * -X0 -X1
-[ #I1 #H1 #H2 destruct
-  lapply (tpr_inv_atom1 … H1) -H1
-(* case 1: atom, atom *)
-  #H1 destruct //
-| #I #V0 #V1 #T0 #T1 #HV01 #HT01 #H1 #H2 destruct
-  elim (tpr_inv_flat1 … H1) -H1 *
-(* case 2: flat, flat *)
-  [ #V2 #T2 #HV02 #HT02 #H destruct
-    /3 width=7 by tpr_conf_flat_flat/ (**) (* /3 width=7/ is too slow *)
-(* case 3: flat, beta *)
-  | #b #V2 #W #U0 #T2 #HV02 #HT02 #H1 #H2 #H3 destruct
-    /3 width=8 by tpr_conf_flat_beta/ (**) (* /3 width=8/ is too slow *)
-(* case 4: flat, theta *)
-  | #b #V2 #V #W0 #W2 #U0 #U2 #HV02 #HW02 #HT02 #HV2 #H1 #H2 #H3 destruct
-    /3 width=11 by tpr_conf_flat_theta/ (**) (* /3 width=11/ is too slow *)
-(* case 5: flat, tau *)
-  | #HT02 #H destruct
-    /3 width=6 by tpr_conf_flat_cast/ (**) (* /3 width=6/ is too slow *)
-  ]
-| #a #V0 #V1 #W0 #T0 #T1 #HV01 #HT01 #H1 #H2 destruct
-  elim (tpr_inv_appl1 … H1) -H1 *
-(* case 6: beta, flat (repeated) *)
-  [ #V2 #T2 #HV02 #HT02 #H destruct
-    @ex2_1_comm /3 width=8 by tpr_conf_flat_beta/
-(* case 7: beta, beta *)
-  | #b #V2 #WW0 #TT0 #T2 #HV02 #HT02 #H1 #H2 destruct
-    /3 width=8 by tpr_conf_beta_beta/ (**) (* /3 width=8/ is too slow *)
-(* case 8, beta, theta (excluded) *)
-  | #b #V2 #VV2 #WW0 #W2 #TT0 #T2 #_ #_ #_ #_ #H destruct
-  ]
-| #a #I1 #V0 #V1 #T0 #T1 #TT1 #HV01 #HT01 #HTT1 #H1 #H2 destruct
-  elim (tpr_inv_bind1 … H1) -H1 *
-(* case 9: delta, delta *)
-  [ #V2 #T2 #TT2 #HV02 #HT02 #HTT2 #H destruct
-    /3 width=11 by tpr_conf_delta_delta/ (**) (* /3 width=11/ is too slow *)
-(* case 10: delta, zeta *)
-  | #T2 #HT20 #HTX2 #H1 #H2 destruct
-    /3 width=10 by tpr_conf_delta_zeta/ (**) (* /3 width=10/ is too slow *)
-  ]
-| #a #VV1 #V0 #V1 #W0 #W1 #T0 #T1 #HV01 #HVV1 #HW01 #HT01 #H1 #H2 destruct
-  elim (tpr_inv_appl1 … H1) -H1 *
-(* case 11: theta, flat (repeated) *)
-  [ #V2 #T2 #HV02 #HT02 #H destruct
-    @ex2_1_comm /3 width=11 by tpr_conf_flat_theta/
-(* case 12: theta, beta (repeated) *)
-  | #b #V2 #WW0 #TT0 #T2 #_ #_ #H destruct
-(* case 13: theta, theta *)
-  | #b #V2 #VV2 #WW0 #W2 #TT0 #T2 #V02 #HW02 #HT02 #HVV2 #H1 #H2 destruct
-    /3 width=14 by tpr_conf_theta_theta/ (**) (* /3 width=14/ is too slow *)
-  ]
-| #V0 #TT0 #T0 #T1 #HTT0 #HT01 #H1 #H2 destruct
-  elim (tpr_inv_abbr1 … H1) -H1 *
-(* case 14: zeta, delta (repeated) *)
-  [ #V2 #TT2 #T2 #HV02 #HTT02 #HTT2 #H destruct
-    @ex2_1_comm /3 width=10 by tpr_conf_delta_zeta/
-(* case 15: zeta, zeta *)
-  | #TT2 #HTT02 #HXTT2
-    /3 width=9 by tpr_conf_zeta_zeta/ (**) (* /3 width=9/ is too slow *)
-  ]
-| #V0 #T0 #T1 #HT01 #H1 #H2 destruct
-  elim (tpr_inv_cast1 … H1) -H1
-(* case 16: tau, flat (repeated) *)
-  [ * #V2 #T2 #HV02 #HT02 #H destruct
-    @ex2_1_comm /3 width=6 by tpr_conf_flat_cast/
-(* case 17: tau, tau *)
-  | #HT02
-    /3 width=5 by tpr_conf_tau_tau/
-  ]
-]
-qed.
-
-(* Basic_1: was: pr0_confluence *)
-theorem tpr_conf: ∀T0:term. ∀T1,T2. T0 ➡ T1 → T0 ➡ T2 →
-                  ∃∃T. T1 ➡ T & T2 ➡ T.
-#T @(tw_ind … T) -T /3 width=6 by tpr_conf_aux/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/tpr_tps.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/tpr_tps.ma
deleted file mode 100644 (file)
index 12cf13c..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reducibility/ltpr_ldrop.ma".
-
-(* CONTEXT-FREE PARALLEL REDUCTION ON TERMS *********************************)
-
-(* Properties on parallel substitution for terms ****************************)
-
-(* Basic_1: was: pr0_subst1_fwd *)
-lemma ltpr_tpr_conf: ∀L1,T,U1,d,e. L1 ⊢ T ▶ [d, e] U1 → ∀L2. L1 ➡ L2 →
-                     ∃∃U2. U1 ➡ U2 & L2 ⊢ T ▶ [d, e] U2.
-#L1 #T #U1 #d #e #H elim H -L1 -T -U1 -d -e
-[ /2 width=3/
-| #L1 #K1 #V1 #W1 #i #d #e #Hdi #Hide #HLK1 #HVW1 #L2 #HL12
-  elim (ltpr_ldrop_conf … HLK1 … HL12) -L1 #X #H #HLK2
-  elim (ltpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct -K1
-  elim (lift_total V2 0 (i+1)) #W2 #HVW2
-  lapply (tpr_lift … HV12 … HVW1 … HVW2) -V1 /3 width=6/
-| #L1 #a #I #V #W1 #T #U1 #d #e #_ #_ #IHV #IHT #L2 #HL12
-  elim (IHV … HL12) -IHV #W2 #HW12
-  elim (IHT (L2.ⓑ{I}W2) ?) -IHT /2 width=1/ -L1 /3 width=5/
-| #L1 #I #V #W1 #T #U1 #d #e #_ #_ #IHV #IHT #L2 #HL12
-  elim (IHV … HL12) -IHV
-  elim (IHT … HL12) -IHT -HL12 /3 width=5/
-]
-qed.
-
-(* Basic_1: was: pr0_subst1_back *)
-lemma ltpr_tps_trans: ∀L2,T,U2,d,e. L2 ⊢ T ▶ [d, e] U2 → ∀L1. L1 ➡ L2 →
-                      ∃∃U1. U1 ➡ U2 & L1 ⊢ T ▶ [d, e] U1.
-#L2 #T #U2 #d #e #H elim H -L2 -T -U2 -d -e
-[ /2 width=3/
-| #L2 #K2 #V2 #W2 #i #d #e #Hdi #Hide #HLK2 #HVW2 #L1 #HL12
-  elim (ltpr_ldrop_trans_O1 … HL12 … HLK2) -L2 #X #HLK1 #H
-  elim (ltpr_inv_pair2 … H) -H #K1 #V1 #HK12 #HV12 #H destruct -K2
-  elim (lift_total V1 0 (i+1)) #W1 #HVW1
-  lapply (tpr_lift … HV12 … HVW1 … HVW2) -V2 /3 width=6/
-| #L2 #a #I #V #W2 #T #U2 #d #e #_ #_ #IHV #IHT #L1 #HL12
-  elim (IHV … HL12) -IHV #W1 #HW12
-  elim (IHT (L1.ⓑ{I}W1) ?) -IHT /2 width=1/ -L2 /3 width=5/
-| #L2 #I #V #W2 #T #U2 #d #e #_ #_ #IHV #IHT #L1 #HL12
-  elim (IHV … HL12) -IHV
-  elim (IHT … HL12) -IHT -HL12 /3 width=5/
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/tpr_tpss.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/tpr_tpss.ma
deleted file mode 100644 (file)
index e1ead4e..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/ltpss_dx_ltpss_dx.ma".
-include "basic_2/reducibility/tpr_tps.ma".
-
-(* CONTEXT-FREE PARALLEL REDUCTION ON TERMS *********************************)
-
-(* Unfold properties ********************************************************)
-
-(* Basic_1: was: pr0_subst1 *)
-lemma tpr_tps_ltpr: ∀T1,T2. T1 ➡ T2 →
-                    ∀L1,d,e,U1. L1 ⊢ T1 ▶ [d, e] U1 →
-                    ∀L2. L1 ➡ L2 →
-                    ∃∃U2. U1 ➡ U2 & L2 ⊢ T2 ▶* [d, e] U2.
-#T1 #T2 #H elim H -T1 -T2
-[ #I #L1 #d #e #U1 #H #L2 #HL12
-  elim (ltpr_tpr_conf … H … HL12) -L1 /3 width=3/
-| #I #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L1 #d #e #X #H #L2 #HL12
-  elim (tps_inv_flat1 … H) -H #W1 #U1 #HVW1 #HTU1 #H destruct
-  elim (IHV12 … HVW1 … HL12) -V1
-  elim (IHT12 … HTU1 … HL12) -T1 -HL12 /3 width=5/
-| #a #V1 #V2 #W #T1 #T2 #_ #_ #IHV12 #IHT12 #L1 #d #e #X #H #L2 #HL12
-  elim (tps_inv_flat1 … H) -H #VV1 #Y #HVV1 #HY #HX destruct
-  elim (tps_inv_bind1 … HY) -HY #WW #TT1 #_ #HTT1 #H destruct
-  elim (IHV12 … HVV1 … HL12) -V1 #VV2 #HVV12 #HVV2
-  elim (IHT12 … HTT1 (L2. ⓛWW) ?) -T1 /2 width=1/ -HL12 #TT2 #HTT12 #HTT2
-  lapply (tpss_lsubs_trans … HTT2 (L2. ⓓVV2) ?) -HTT2 /3 width=5/
-| #a #I #V1 #V2 #T1 #T #T2 #HV12 #_ #HT2 #IHV12 #IHT1 #L1 #d #e #X #H #L2 #HL12
-  elim (tps_inv_bind1 … H) -H #W1 #U1 #HVW1 #HTU1 #H destruct
-  elim (IHV12 … HVW1 … HL12) -V1 #W2 #HW12 #HVW2
-  elim (IHT1 … HTU1 (L2. ⓑ{I} W2) ?) -T1 /2 width=1/ -HL12 #U #HU1 #HTU
-  elim (tpss_strip_neq … HTU … HT2 ?) -T /2 width=1/ #U2 #HU2 #HTU2
-  lapply (tps_lsubs_trans … HU2 (L2. ⓑ{I} V2) ?) -HU2 /2 width=1/ #HU2
-  elim (ltpss_dx_tps_conf … HU2 (L2. ⓑ{I} W2) (d + 1) e ?) -HU2 /2 width=1/ #U3 #HU3 #HU23
-  lapply (tps_lsubs_trans … HU3 (⋆. ⓑ{I} W2) ?) -HU3 /2 width=1/ #HU3
-  lapply (tpss_lsubs_trans … HU23 (L2. ⓑ{I} W2) ?) -HU23 /2 width=1/ #HU23
-  lapply (tpss_trans_eq … HTU2 … HU23) -U2 /3 width=5/
-| #a #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #HV2 #_ #_ #IHV12 #IHW12 #IHT12 #L1 #d #e #X #H #L2 #HL12
-  elim (tps_inv_flat1 … H) -H #VV1 #Y #HVV1 #HY #HX destruct
-  elim (tps_inv_bind1 … HY) -HY #WW1 #TT1 #HWW1 #HTT1 #H destruct
-  elim (IHV12 … HVV1 … HL12) -V1 #VV2 #HVV12 #HVV2
-  elim (IHW12 … HWW1 … HL12) -W1 #WW2 #HWW12 #HWW2
-  elim (IHT12 … HTT1 (L2. ⓓWW2) ?) -T1 /2 width=1/ -HL12 #TT2 #HTT12 #HTT2
-  elim (lift_total VV2 0 1) #VV #H2VV
-  lapply (tpss_lift_ge … HVV2 (L2. ⓓWW2) … HV2 … H2VV) -V2 /2 width=1/ #HVV
-  @ex2_1_intro [2: @tpr_theta |1: skip |3: @tpss_bind [2: @tpss_flat ] ] /width=11/ (**) (* /4 width=11/ is too slow *)
-| #V #T1 #T #T2 #_ #HT2 #IHT1 #L1 #d #e #X #H #L2 #HL12
-  elim (tps_inv_bind1 … H) -H #W #U1 #_ #HTU1 #H destruct -V
-  elim (IHT1 … HTU1 (L2.ⓓW) ?) -T1 /2 width=1/ -HL12 #U #HU1 #HTU
-  elim (tpss_inv_lift1_ge … HTU L2 … HT2 ?) -T <minus_plus_m_m /3 width=3/
-| #V1 #T1 #T2 #_ #IHT12 #L1 #d #e #X #H #L2 #HL12
-  elim (tps_inv_flat1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct
-  elim (IHT12 … HTT1 … HL12) -T1 -HL12 /3 width=3/
-]
-qed.
-
-lemma tpr_tps_bind: ∀I,V1,V2,T1,T2,U1. V1 ➡ V2 → T1 ➡ T2 →
-                    ⋆. ⓑ{I} V1 ⊢ T1 ▶ [0, 1] U1 →
-                    ∃∃U2. U1 ➡ U2 & ⋆. ⓑ{I} V2 ⊢ T2 ▶ [0, 1] U2.
-#I #V1 #V2 #T1 #T2 #U1 #HV12 #HT12 #HTU1
-elim (tpr_tps_ltpr … HT12 … HTU1 (⋆. ⓑ{I} V2) ?) -T1 /2 width=1/ -V1 #U2 #HU12 #HTU2
-lapply (tpss_inv_SO2 … HTU2) -HTU2 /2 width=3/
-qed.
-
-lemma tpr_tpss_ltpr: ∀L1,L2. L1 ➡ L2 → ∀T1,T2. T1 ➡ T2 →
-                     ∀d,e,U1. L1 ⊢ T1 ▶* [d, e] U1 →
-                     ∃∃U2. U1 ➡ U2 & L2 ⊢ T2 ▶* [d, e] U2.
-#L1 #L2 #HL12 #T1 #T2 #HT12 #d #e #U1 #HTU1 @(tpss_ind … HTU1) -U1
-[ /2 width=3/
-| -HT12 #U #U1 #_ #HU1 * #T #HUT #HT2
-  elim (tpr_tps_ltpr … HUT … HU1 … HL12) -U -HL12 #U2 #HU12 #HTU2
-  lapply (tpss_trans_eq … HT2 … HTU2) -T /2 width=3/
-]
-qed.
-
-lemma tpr_tpss_conf: ∀T1,T2. T1 ➡ T2 →
-                     ∀L,U1,d,e. L ⊢ T1 ▶* [d, e] U1 →
-                     ∃∃U2. U1 ➡ U2 & L ⊢ T2 ▶* [d, e] U2.
-/2 width=5/ qed. 
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/xpr.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/xpr.ma
deleted file mode 100644 (file)
index 7375349..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/static/ssta.ma".
-include "basic_2/reducibility/cpr.ma".
-
-(* EXTENDED PARALLEL REDUCTION ON TERMS *************************************)
-
-inductive xpr (h) (g) (L) (T1) (T2): Prop ≝
-| xpr_cpr : L ⊢ T1 ➡ T2 → xpr h g L T1 T2
-| xpr_ssta: ∀l. ⦃h, L⦄ ⊢ T1 •[g, l + 1] T2 → xpr h g L T1 T2
-.
-
-interpretation
-   "extended parallel reduction (term)"
-   'XPRed h g L T1 T2 = (xpr h g L T1 T2).
-
-(* Basic properties *********************************************************)
-
-lemma xpr_refl: ∀h,g,L. reflexive … (xpr h g L).
-/2 width=1/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/xpr_aaa.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/xpr_aaa.ma
deleted file mode 100644 (file)
index 98fe013..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/static/ssta_aaa.ma".
-include "basic_2/reducibility/cpr_aaa.ma".
-include "basic_2/reducibility/xpr.ma".
-
-(* EXTENDED PARALLEL REDUCTION ON TERMS *************************************)
-
-(* Properties on atomic arity assignment for terms **************************)
-
-lemma xpr_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 * /2 width=3/ /2 width=6/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/xpr_lift.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/xpr_lift.ma
deleted file mode 100644 (file)
index 8f5deca..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/static/ssta_lift.ma".
-include "basic_2/reducibility/cpr_lift.ma".
-include "basic_2/reducibility/xpr.ma".
-
-(* EXTENDED PARALLEL REDUCTION ON TERMS *************************************)
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma xpr_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 *
-[ #H elim (cpr_inv_abst1 … H Abst V1) /3 width=5/
-| #l #H elim (ssta_inv_bind1 … H) /3 width=5/
-]
-qed-.
-
-(* Relocation properties ****************************************************)
-
-lemma xpr_lift: ∀L,K,d,e. ⇩[d, e] L ≡ K →
-                ∀T1,U1. ⇧[d, e] T1 ≡ U1 → ∀T2,U2. ⇧[d, e] T2 ≡ U2 →
-                ∀h,g. ⦃h, K⦄ ⊢ T1 •➡[g] T2 → ⦃h, L⦄ ⊢ U1 •➡[g] U2.
-#L #K #d #e #HLK #T1 #U1 #HTU1 #T2 #U2 #HTU2 #h #g *
-/3 width=9/ /3 width=10/
-qed.
-
-lemma xpr_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 * [ #HU12 | #l #HU12 ]
-[ elim (cpr_inv_lift1 … HLK … HTU1 … HU12) -L -U1 /3 width=3/
-| elim (ssta_inv_lift1 … HU12 … HLK … HTU1) -L -U1 /3 width=4/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/xpr_lsubss.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/xpr_lsubss.ma
deleted file mode 100644 (file)
index bc66cd2..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/static/lsubss_ssta.ma".
-include "basic_2/reducibility/xpr.ma".
-
-(* EXTENDED PARALLEL REDUCTION ON TERMS *************************************)
-
-(* Properties on lenv ref for stratified type assignment ********************)
-
-lemma lsubss_xpr_trans: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 →
-                        ∀T1,T2. ⦃h, L2⦄ ⊢ T1 •➡[g] T2 → ⦃h, L1⦄ ⊢ T1 •➡[g] T2.
-#h #g #L1 #L2 #HL12 #T1 #T2 * [ | #l ] #HT12
-[ lapply (lsubss_fwd_lsubs2 … HL12) -HL12 /3 width=3/
-| /3 width=4/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/aaa.ma b/matita/matita/contribs/lambda_delta/basic_2/static/aaa.ma
deleted file mode 100644 (file)
index 7b48134..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/grammar/aarity.ma".
-include "basic_2/substitution/ldrop.ma".
-
-(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
-
-inductive aaa: lenv → term → predicate aarity ≝
-| aaa_sort: ∀L,k. aaa L (⋆k) ⓪
-| aaa_lref: ∀I,L,K,V,B,i. ⇩[0, i] L ≡ K. ⓑ{I} V → aaa K V B → aaa L (#i) B
-| aaa_abbr: ∀a,L,V,T,B,A.
-            aaa L V B → aaa (L. ⓓV) T A → aaa L (ⓓ{a}V. T) A
-| aaa_abst: ∀a,L,V,T,B,A.
-            aaa L V B → aaa (L. ⓛV) T A → aaa L (ⓛ{a}V. T) (②B. A)
-| aaa_appl: ∀L,V,T,B,A. aaa L V B → aaa L T (②B. A) → aaa L (ⓐV. T) A
-| aaa_cast: ∀L,V,T,A. aaa L V A → aaa L T A → aaa L (ⓝV. T) A
-.
-
-interpretation "atomic arity assignment (term)"
-   'AtomicArity L T A = (aaa L T A).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact aaa_inv_sort_aux: ∀L,T,A. L ⊢ T ⁝ A → ∀k. T = ⋆k → A = ⓪.
-#L #T #A * -L -T -A
-[ //
-| #I #L #K #V #B #i #_ #_ #k #H destruct
-| #a #L #V #T #B #A #_ #_ #k #H destruct
-| #a #L #V #T #B #A #_ #_ #k #H destruct
-| #L #V #T #B #A #_ #_ #k #H destruct
-| #L #V #T #A #_ #_ #k #H destruct
-]
-qed.
-
-lemma aaa_inv_sort: ∀L,A,k. L ⊢ ⋆k ⁝ A → A = ⓪.
-/2 width=5/ qed-.
-
-fact aaa_inv_lref_aux: ∀L,T,A. L ⊢ T ⁝ A → ∀i. T = #i →
-                       ∃∃I,K,V. ⇩[0, i] L ≡ K. ⓑ{I} V & K ⊢ V ⁝ A.
-#L #T #A * -L -T -A
-[ #L #k #i #H destruct
-| #I #L #K #V #B #j #HLK #HB #i #H destruct /2 width=5/
-| #a #L #V #T #B #A #_ #_ #i #H destruct
-| #a #L #V #T #B #A #_ #_ #i #H destruct
-| #L #V #T #B #A #_ #_ #i #H destruct
-| #L #V #T #A #_ #_ #i #H destruct
-]
-qed.
-
-lemma aaa_inv_lref: ∀L,A,i. L ⊢ #i ⁝ A →
-                    ∃∃I,K,V. ⇩[0, i] L ≡ K. ⓑ{I} V & K ⊢ V ⁝ A.
-/2 width=3/ qed-.
-
-fact aaa_inv_abbr_aux: ∀L,T,A. L ⊢ T ⁝ A → ∀a,W,U. T = ⓓ{a}W. U →
-                       ∃∃B. L ⊢ W ⁝ B & L. ⓓW ⊢ U ⁝ A.
-#L #T #A * -L -T -A
-[ #L #k #a #W #U #H destruct
-| #I #L #K #V #B #i #_ #_ #a #W #U #H destruct
-| #b #L #V #T #B #A #HV #HT #a #W #U #H destruct /2 width=2/
-| #b #L #V #T #B #A #_ #_ #a #W #U #H destruct
-| #L #V #T #B #A #_ #_ #a #W #U #H destruct
-| #L #V #T #A #_ #_ #a #W #U #H destruct
-]
-qed.
-
-lemma aaa_inv_abbr: ∀a,L,V,T,A. L ⊢ ⓓ{a}V. T ⁝ A →
-                    ∃∃B. L ⊢ V ⁝ B & L. ⓓV ⊢ T ⁝ A.
-/2 width=4/ qed-.
-
-fact aaa_inv_abst_aux: ∀L,T,A. L ⊢ T ⁝ A → ∀a,W,U. T = ⓛ{a}W. U →
-                       ∃∃B1,B2. L ⊢ W ⁝ B1 & L. ⓛW ⊢ U ⁝ B2 & A = ②B1. B2.
-#L #T #A * -L -T -A
-[ #L #k #a #W #U #H destruct
-| #I #L #K #V #B #i #_ #_ #a #W #U #H destruct
-| #b #L #V #T #B #A #_ #_ #a #W #U #H destruct
-| #b #L #V #T #B #A #HV #HT #a #W #U #H destruct /2 width=5/
-| #L #V #T #B #A #_ #_ #a #W #U #H destruct
-| #L #V #T #A #_ #_ #a #W #U #H destruct
-]
-qed.
-
-lemma aaa_inv_abst: ∀a,L,W,T,A. L ⊢ ⓛ{a}W. T ⁝ A →
-                    ∃∃B1,B2. L ⊢ W ⁝ B1 & L. ⓛW ⊢ T ⁝ B2 & A = ②B1. B2.
-/2 width=4/ qed-.
-
-fact aaa_inv_appl_aux: ∀L,T,A. L ⊢ T ⁝ A → ∀W,U. T = ⓐW. U →
-                       ∃∃B. L ⊢ W ⁝ B & L ⊢ U ⁝ ②B. A.
-#L #T #A * -L -T -A
-[ #L #k #W #U #H destruct
-| #I #L #K #V #B #i #_ #_ #W #U #H destruct
-| #a #L #V #T #B #A #_ #_ #W #U #H destruct
-| #a #L #V #T #B #A #_ #_ #W #U #H destruct
-| #L #V #T #B #A #HV #HT #W #U #H destruct /2 width=3/
-| #L #V #T #A #_ #_ #W #U #H destruct
-]
-qed.
-
-lemma aaa_inv_appl: ∀L,V,T,A. L ⊢ ⓐV. T ⁝ A →
-                    ∃∃B. L ⊢ V ⁝ B & L ⊢ T ⁝ ②B. A.
-/2 width=3/ qed-.
-
-fact aaa_inv_cast_aux: ∀L,T,A. L ⊢ T ⁝ A → ∀W,U. T = ⓝW. U →
-                       L ⊢ W ⁝ A ∧ L ⊢ U ⁝ A.
-#L #T #A * -L -T -A
-[ #L #k #W #U #H destruct
-| #I #L #K #V #B #i #_ #_ #W #U #H destruct
-| #a #L #V #T #B #A #_ #_ #W #U #H destruct
-| #a #L #V #T #B #A #_ #_ #W #U #H destruct
-| #L #V #T #B #A #_ #_ #W #U #H destruct
-| #L #V #T #A #HV #HT #W #U #H destruct /2 width=1/
-]
-qed.
-
-lemma aaa_inv_cast: ∀L,W,T,A. L ⊢ ⓝW. T ⁝ A →
-                    L ⊢ W ⁝ A ∧ L ⊢ T ⁝ A.
-/2 width=3/ qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/aaa_aaa.ma b/matita/matita/contribs/lambda_delta/basic_2/static/aaa_aaa.ma
deleted file mode 100644 (file)
index 9d9017c..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/ldrop_ldrop.ma".
-include "basic_2/static/aaa.ma".
-
-(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
-
-(* Main properties **********************************************************)
-
-theorem aaa_mono: ∀L,T,A1. L ⊢ T ⁝ A1 → ∀A2. L ⊢ T ⁝ A2 → A1 = A2.
-#L #T #A1 #H elim H -L -T -A1
-[ #L #k #A2 #H
-  >(aaa_inv_sort … H) -H //
-| #I1 #L #K1 #V1 #B #i #HLK1 #_ #IHA1 #A2 #H
-  elim (aaa_inv_lref … H) -H #I2 #K2 #V2 #HLK2 #HA2
-  lapply (ldrop_mono … HLK1 … HLK2) -L #H destruct /2 width=1/
-| #a #L #V #T #B1 #A1 #_ #_ #_ #IHA1 #A2 #H
-  elim (aaa_inv_abbr … H) -H /2 width=1/
-| #a #L #V1 #T1 #B1 #A1 #_ #_ #IHB1 #IHA1 #X #H
-  elim (aaa_inv_abst … H) -H #B2 #A2 #HB2 #HA2 #H destruct /3 width=1/
-| #L #V1 #T1 #B1 #A1 #_ #_ #_ #IHA1 #A2 #H
-  elim (aaa_inv_appl … H) -H #B2 #_ #HA2
-  lapply (IHA1 … HA2) -L #H destruct //
-| #L #V #T #A1 #_ #_ #_ #IHA1 #A2 #H
-  elim (aaa_inv_cast … H) -H /2 width=1/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/aaa_lift.ma b/matita/matita/contribs/lambda_delta/basic_2/static/aaa_lift.ma
deleted file mode 100644 (file)
index b40f1a9..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/ldrop_ldrop.ma".
-include "basic_2/static/aaa.ma".
-
-(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
-
-(* Properties concerning basic relocation ***********************************)
-
-lemma aaa_lift: ∀L1,T1,A. L1 ⊢ T1 ⁝ A → ∀L2,d,e. ⇩[d, e] L2 ≡ L1 →
-                ∀T2. ⇧[d, e] T1 ≡ T2 → L2 ⊢ T2 ⁝ A.
-#L1 #T1 #A #H elim H -L1 -T1 -A
-[ #L1 #k #L2 #d #e #_ #T2 #H
-  >(lift_inv_sort1 … H) -H //
-| #I #L1 #K1 #V1 #B #i #HLK1 #_ #IHB #L2 #d #e #HL21 #T2 #H
-  elim (lift_inv_lref1 … H) -H * #Hid #H destruct
-  [ elim (ldrop_trans_le … HL21 … HLK1 ?) -L1 /2 width=2/ #X #HLK2 #H
-    elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K2 #V2 #HK21 #HV12 #H destruct
-    /3 width=8/
-  | lapply (ldrop_trans_ge … HL21 … HLK1 ?) -L1 // -Hid /3 width=8/
-  ]
-| #a #L1 #V1 #T1 #B #A #_ #_ #IHB #IHA #L2 #d #e #HL21 #X #H
-  elim (lift_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
-  /4 width=4/
-| #a #L1 #V1 #T1 #B #A #_ #_ #IHB #IHA #L2 #d #e #HL21 #X #H
-  elim (lift_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
-  /4 width=4/
-| #L1 #V1 #T1 #B #A #_ #_ #IHB #IHA #L2 #d #e #HL21 #X #H
-  elim (lift_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
-  /3 width=4/
-| #L1 #V1 #T1 #A #_ #_ #IH1 #IH2 #L2 #d #e #HL21 #X #H
-  elim (lift_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
-  /3 width=4/
-]
-qed.
-
-lemma aaa_inv_lift: ∀L2,T2,A. L2 ⊢ T2 ⁝ A → ∀L1,d,e. ⇩[d, e] L2 ≡ L1 →
-                    ∀T1. ⇧[d, e] T1 ≡ T2 → L1 ⊢ T1 ⁝ A.
-#L2 #T2 #A #H elim H -L2 -T2 -A
-[ #L2 #k #L1 #d #e #_ #T1 #H
-  >(lift_inv_sort2 … H) -H //
-| #I #L2 #K2 #V2 #B #i #HLK2 #_ #IHB #L1 #d #e #HL21 #T1 #H
-  elim (lift_inv_lref2 … H) -H * #Hid #H destruct
-  [ elim (ldrop_conf_lt … HL21 … HLK2 ?) -L2 // -Hid /3 width=8/
-  | lapply (ldrop_conf_ge … HL21 … HLK2 ?) -L2 // -Hid /3 width=8/
-  ]
-| #a #L2 #V2 #T2 #B #A #_ #_ #IHB #IHA #L1 #d #e #HL21 #X #H
-  elim (lift_inv_bind2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
-  /4 width=4/
-| #a #L2 #V2 #T2 #B #A #_ #_ #IHB #IHA #L1 #d #e #HL21 #X #H
-  elim (lift_inv_bind2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
-  /4 width=4/
-| #L2 #V2 #T2 #B #A #_ #_ #IHB #IHA #L1 #d #e #HL21 #X #H
-  elim (lift_inv_flat2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
-  /3 width=4/
-| #L2 #V2 #T2 #A #_ #_ #IH1 #IH2 #L1 #d #e #HL21 #X #H
-  elim (lift_inv_flat2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
-  /3 width=4/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/aaa_lifts.ma b/matita/matita/contribs/lambda_delta/basic_2/static/aaa_lifts.ma
deleted file mode 100644 (file)
index 7514f6d..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/ldrops.ma".
-include "basic_2/static/aaa_lift.ma".
-
-(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
-
-(* Properties concerning generic relocation *********************************)
-
-lemma aaa_lifts: ∀L1,L2,T2,A,des. ⇩*[des] L2 ≡ L1 → ∀T1. ⇧*[des] T1 ≡ T2 →
-                                  L1 ⊢ T1 ⁝ A →  L2 ⊢ T2 ⁝ A.
-#L1 #L2 #T2 #A #des #H elim H -L1 -L2 -des
-[ #L #T1 #H #HT1
-  <(lifts_inv_nil … H) -H //
-| #L1 #L #L2 #des #d #e #_ #HL2 #IHL1 #T1 #H #HT1
-  elim (lifts_inv_cons … H) -H /3 width=9/
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/aaa_ltpss_dx.ma b/matita/matita/contribs/lambda_delta/basic_2/static/aaa_ltpss_dx.ma
deleted file mode 100644 (file)
index 2f2d073..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/tpss_tpss.ma".
-include "basic_2/unfold/ltpss_dx_ldrop.ma".
-include "basic_2/static/aaa_lift.ma".
-
-(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
-
-(* 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.
-#L1 #T1 #A #H elim H -L1 -T1 -A
-[ #L1 #k #L2 #d #e #_ #T2 #H
-  >(tpss_inv_sort1 … H) -H //
-| #I #L1 #K1 #V1 #B #i #HLK1 #_ #IHV1 #L2 #d #e #HL12 #T2 #H
-  elim (tpss_inv_lref1 … H) -H
-  [ #H destruct
-    elim (lt_or_ge i d) #Hdi
-    [ elim (ltpss_dx_ldrop_conf_le … HL12 … HLK1 ?) -L1 /2 width=2/ #X #H #HLK2
-      elim (ltpss_dx_inv_tpss11 … H ?) -H /2 width=1/ -Hdi #K2 #V2 #HK12 #HV12 #H destruct
-      /3 width=8 by aaa_lref/ (**) (* too slow without trace *)
-    | elim (lt_or_ge i (d + e)) #Hide
-      [ elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HLK2
-        elim (ltpss_dx_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K2 #V2 #HK12 #HV12 #H destruct
-        /3 width=8 by aaa_lref/ (**) (* too slow without trace *)
-      | -Hdi
-        lapply (ltpss_dx_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide
-        /3 width=8 by aaa_lref/ (**) (* too slow without trace *)
-      ]
-    ]
-  | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #HVW2 #HWT2
-    elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HL2K0
-    elim (ltpss_dx_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K0 #V0 #HK12 #HV12 #H destruct
-    lapply (ldrop_mono … HL2K0 … HLK2) -HL2K0 #H destruct
-    lapply (ldrop_fwd_ldrop2 … HLK2) -HLK2 #HLK2
-    lapply (tpss_trans_eq … HV12 HVW2) -V2 /3 width=7/
-  ]
-| #a #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #L2 #d #e #HL12 #X #H
-  elim (tpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct /4 width=4/
-| #a #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #L2 #d #e #HL12 #X #H
-  elim (tpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct /4 width=4/
-| #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #L2 #d #e #HL12 #X #H
-  elim (tpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct /3 width=4/
-| #L1 #V1 #T1 #A #_ #_ #IHV1 #IHT1 #L2 #d #e #HL12 #X #H
-  elim (tpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct /3 width=4/
-]
-qed.
-
-lemma aaa_ltpss_dx_tps_conf: ∀L1,T1,A. L1 ⊢ T1 ⁝ A →
-                             ∀L2,d,e. L1 ▶* [d, e] L2 →
-                             ∀T2. L2 ⊢ T1 ▶ [d, e] T2 → L2 ⊢ T2 ⁝ A.
-/3 width=7/ qed.
-
-lemma aaa_ltpss_dx_conf: ∀L1,T,A. L1 ⊢ T ⁝ A →
-                         ∀L2,d,e. L1 ▶* [d, e] L2 → L2 ⊢ T ⁝ A.
-/2 width=7/ qed.
-
-lemma aaa_tpss_conf: ∀L,T1,A. L ⊢ T1 ⁝ A →
-                     ∀T2,d,e. L ⊢ T1 ▶* [d, e] T2 → L ⊢ T2 ⁝ A.
-/2 width=7/ qed.
-
-lemma aaa_tps_conf: ∀L,T1,A. L ⊢ T1 ⁝ A →
-                    ∀T2,d,e. L ⊢ T1 ▶ [d, e] T2 → L ⊢ T2 ⁝ A.
-/2 width=7/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/aaa_ltpss_sn.ma b/matita/matita/contribs/lambda_delta/basic_2/static/aaa_ltpss_sn.ma
deleted file mode 100644 (file)
index 4f2a448..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/ltpss_sn_alt.ma".
-include "basic_2/static/aaa_ltpss_dx.ma".
-
-(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
-
-(* Properties about sn parallel unfold **************************************)
-
-lemma aaa_ltpss_sn_conf: ∀L1,T,A. L1 ⊢ T ⁝ A →
-                         ∀L2,d,e. L1 ⊢ ▶* [d, e] L2 → L2 ⊢ T ⁝ A.
-#L1 #T #A #HT #L2 #d #e #HL12
-lapply (ltpss_sn_ltpssa … HL12) -HL12 #HL12
-@(TC_Conf3 … (λL,A. L ⊢ T ⁝ A) … HT ? HL12) /2 width=5/
-qed.
-
-lemma aaa_ltpss_sn_tpss_conf: ∀L1,T1,A. L1 ⊢ T1 ⁝ A →
-                              ∀L2,d,e. L1 ⊢ ▶* [d, e] L2 →
-                              ∀T2. L2 ⊢ T1 ▶* [d, e] T2 → L2 ⊢ T2 ⁝ A.
-/3 width=5/ qed.
-
-lemma aaa_ltpss_sn_tps_conf: ∀L1,T1,A. L1 ⊢ T1 ⁝ A →
-                             ∀L2,d,e. L1 ⊢ ▶* [d, e] L2 →
-                             ∀T2. L2 ⊢ T1 ▶ [d, e] T2 → L2 ⊢ T2 ⁝ A.
-/3 width=5/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/lsuba.ma b/matita/matita/contribs/lambda_delta/basic_2/static/lsuba.ma
deleted file mode 100644 (file)
index aa4800f..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/static/aaa.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR ATOMIC ARITY ASSIGNMENT *****************)
-
-inductive lsuba: relation lenv ≝
-| lsuba_atom: lsuba (⋆) (⋆)
-| lsuba_pair: ∀I,L1,L2,V. lsuba L1 L2 → lsuba (L1. ⓑ{I} V) (L2. ⓑ{I} V)
-| lsuba_abbr: ∀L1,L2,V,W,A. L1 ⊢ V ⁝ A → L2 ⊢ W ⁝ A →
-              lsuba L1 L2 → lsuba (L1. ⓓV) (L2. ⓛW)
-.
-
-interpretation
-  "local environment refinement (atomic arity assigment)"
-  'CrSubEqA L1 L2 = (lsuba L1 L2).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact lsuba_inv_atom1_aux: ∀L1,L2. L1 ⁝⊑ L2 → L1 = ⋆ → L2 = ⋆.
-#L1 #L2 * -L1 -L2
-[ //
-| #I #L1 #L2 #V #_ #H destruct
-| #L1 #L2 #V #W #A #_ #_ #_ #H destruct
-]
-qed.
-
-lemma lsuba_inv_atom1: ∀L2. ⋆ ⁝⊑ L2 → L2 = ⋆.
-/2 width=3/ qed-.
-
-fact lsuba_inv_pair1_aux: ∀L1,L2. L1 ⁝⊑ L2 → ∀I,K1,V. L1 = K1. ⓑ{I} V →
-                          (∃∃K2. K1 ⁝⊑ K2 & L2 = K2. ⓑ{I} V) ∨
-                          ∃∃K2,W,A. K1 ⊢ V ⁝ A & K2 ⊢ W ⁝ A & K1 ⁝⊑ K2 &
-                                    L2 = K2. ⓛW & I = Abbr.
-#L1 #L2 * -L1 -L2
-[ #I #K1 #V #H destruct
-| #J #L1 #L2 #V #HL12 #I #K1 #W #H destruct /3 width=3/
-| #L1 #L2 #V1 #W2 #A #HV1 #HW2 #HL12 #I #K1 #V #H destruct /3 width=7/
-]
-qed.
-
-lemma lsuba_inv_pair1: ∀I,K1,L2,V. K1. ⓑ{I} V ⁝⊑ L2 →
-                       (∃∃K2. K1 ⁝⊑ K2 & L2 = K2. ⓑ{I} V) ∨
-                       ∃∃K2,W,A. K1 ⊢ V ⁝ A & K2 ⊢ W ⁝ A & K1 ⁝⊑ K2 &
-                                 L2 = K2. ⓛW & I = Abbr.
-/2 width=3/ qed-.
-
-fact lsuba_inv_atom2_aux: ∀L1,L2. L1 ⁝⊑ L2 → L2 = ⋆ → L1 = ⋆.
-#L1 #L2 * -L1 -L2
-[ //
-| #I #L1 #L2 #V #_ #H destruct
-| #L1 #L2 #V #W #A #_ #_ #_ #H destruct
-]
-qed.
-
-lemma lsubc_inv_atom2: ∀L1. L1 ⁝⊑ ⋆ → L1 = ⋆.
-/2 width=3/ qed-.
-
-fact lsuba_inv_pair2_aux: ∀L1,L2. L1 ⁝⊑ L2 → ∀I,K2,W. L2 = K2. ⓑ{I} W →
-                          (∃∃K1. K1 ⁝⊑ K2 & L1 = K1. ⓑ{I} W) ∨
-                          ∃∃K1,V,A. K1 ⊢ V ⁝ A & K2 ⊢ W ⁝ A & K1 ⁝⊑ K2 &
-                                    L1 = K1. ⓓV & I = Abst.
-#L1 #L2 * -L1 -L2
-[ #I #K2 #W #H destruct
-| #J #L1 #L2 #V #HL12 #I #K2 #W #H destruct /3 width=3/
-| #L1 #L2 #V1 #W2 #A #HV1 #HW2 #HL12 #I #K2 #W #H destruct /3 width=7/
-]
-qed.
-
-lemma lsuba_inv_pair2: ∀I,L1,K2,W. L1 ⁝⊑ K2. ⓑ{I} W →
-                       (∃∃K1. K1 ⁝⊑ K2 & L1 = K1. ⓑ{I} W) ∨
-                       ∃∃K1,V,A. K1 ⊢ V ⁝ A & K2 ⊢ W ⁝ A & K1 ⁝⊑ K2 &
-                                 L1 = K1. ⓓV & I = Abst.
-/2 width=3/ qed-.
-
-(* Basic properties *********************************************************)
-
-lemma lsuba_refl: ∀L. L ⁝⊑ L.
-#L elim L -L // /2 width=1/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/lsuba_aaa.ma b/matita/matita/contribs/lambda_delta/basic_2/static/lsuba_aaa.ma
deleted file mode 100644 (file)
index 66e802a..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/aaa_aaa.ma".
-include "basic_2/static/lsuba_ldrop.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR ATOMIC ARITY ASSIGNMENT *****************)
-
-(* Properties concerning atomic arity assignment ****************************)
-
-lemma lsuba_aaa_conf: ∀L1,V,A. L1 ⊢ V ⁝ A → ∀L2. L1 ⁝⊑ L2 → L2 ⊢ V ⁝ A.
-#L1 #V #A #H elim H -L1 -V -A
-[ //
-| #I #L1 #K1 #V1 #B #i #HLK1 #HV1B #IHV1 #L2 #HL12
-  elim (lsuba_ldrop_O1_conf … HL12 … HLK1) -L1 #X #H #HLK2
-  elim (lsuba_inv_pair1 … H) -H * #K2
-  [ #HK12 #H destruct /3 width=5/
-  | #V2 #A1 #HV1A1 #HV2 #_ #H1 #H2 destruct
-    >(aaa_mono … HV1B … HV1A1) -B -HV1A1 /2 width=5/
-  ]
-| /4 width=2/
-| /4 width=1/
-| /3 width=3/
-| /3 width=1/
-]
-qed.
-
-lemma lsuba_aaa_trans: ∀L2,V,A. L2 ⊢ V ⁝ A → ∀L1. L1 ⁝⊑ L2 → L1 ⊢ V ⁝ A.
-#L2 #V #A #H elim H -L2 -V -A
-[ //
-| #I #L2 #K2 #V2 #B #i #HLK2 #HV2B #IHV2 #L1 #HL12
-  elim (lsuba_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
-  elim (lsuba_inv_pair2 … H) -H * #K1
-  [ #HK12 #H destruct /3 width=5/
-  | #V1 #A1 #HV1 #HV2A1 #_ #H1 #H2 destruct
-    >(aaa_mono … HV2B … HV2A1) -B -HV2A1 /2 width=5/
-  ]
-| /4 width=2/
-| /4 width=1/
-| /3 width=3/
-| /3 width=1/
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/lsuba_ldrop.ma b/matita/matita/contribs/lambda_delta/basic_2/static/lsuba_ldrop.ma
deleted file mode 100644 (file)
index 247a8b2..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/static/lsuba.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR ATOMIC ARITY ASSIGNMENT *****************)
-
-(* Properties concerning basic local environment slicing ********************)
-
-(* Note: the constant 0 cannot be generalized *)
-lemma lsuba_ldrop_O1_conf: ∀L1,L2. L1 ⁝⊑ L2 → ∀K1,e. ⇩[0, e] L1 ≡ K1 →
-                           ∃∃K2. K1 ⁝⊑ K2 & ⇩[0, e] L2 ≡ K2.
-#L1 #L2 #H elim H -L1 -L2
-[ /2 width=3/
-| #I #L1 #L2 #V #_ #IHL12 #K1 #e #H
-  elim (ldrop_inv_O1 … H) -H * #He #HLK1
-  [ destruct
-    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
-  | elim (IHL12 … HLK1) -L1 /3 width=3/
-  ]
-| #L1 #L2 #V #W #A #HV #HW #_ #IHL12 #K1 #e #H
-  elim (ldrop_inv_O1 … H) -H * #He #HLK1
-  [ destruct
-    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
-  | elim (IHL12 … HLK1) -L1 /3 width=3/
-  ]
-]
-qed-.
-
-(* Note: the constant 0 cannot be generalized *)
-lemma lsuba_ldrop_O1_trans: ∀L1,L2. L1 ⁝⊑ L2 → ∀K2,e. ⇩[0, e] L2 ≡ K2 →
-                            ∃∃K1. K1 ⁝⊑ K2 & ⇩[0, e] L1 ≡ K1.
-#L1 #L2 #H elim H -L1 -L2
-[ /2 width=3/
-| #I #L1 #L2 #V #_ #IHL12 #K2 #e #H
-  elim (ldrop_inv_O1 … H) -H * #He #HLK2
-  [ destruct
-    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
-  | elim (IHL12 … HLK2) -L2 /3 width=3/
-  ]
-| #L1 #L2 #V #W #A #HV #HW #_ #IHL12 #K2 #e #H
-  elim (ldrop_inv_O1 … H) -H * #He #HLK2
-  [ destruct
-    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
-  | elim (IHL12 … HLK2) -L2 /3 width=3/
-  ]
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/lsuba_lsuba.ma b/matita/matita/contribs/lambda_delta/basic_2/static/lsuba_lsuba.ma
deleted file mode 100644 (file)
index 5d64516..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/static/lsuba_aaa.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR ATOMIC ARITY ASSIGNMENT *****************)
-
-(* Main properties **********************************************************)
-
-theorem lsuba_trans: ∀L1,L. L1 ⁝⊑ L → ∀L2. L ⁝⊑ L2 → L1 ⁝⊑ L2.
-#L1 #L #H elim H -L1 -L
-[ #X #H >(lsuba_inv_atom1 … H) -H //
-| #I #L1 #L #V #HL1 #IHL1 #X #H
-  elim (lsuba_inv_pair1 … H) -H * #L2
-  [ #HL2 #H destruct /3 width=1/
-  | #V #A #HLV #HL2V #HL2 #H1 #H2 destruct /3 width=3/
-  ]
-| #L1 #L #V1 #W #A1 #HV1 #HW #HL1 #IHL1 #X #H
-  elim (lsuba_inv_pair1 … H) -H * #L2
-  [ #HL2 #H destruct /3 width=5/
-  | #V #A2 #_ #_ #_ #_ #H destruct
-  ]
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/lsubss.ma b/matita/matita/contribs/lambda_delta/basic_2/static/lsubss.ma
deleted file mode 100644 (file)
index 356d7fe..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED STATIC TYPE ASSIGNMENT *******)
-
-(* Note: may not be transitive *)
-inductive lsubss (h:sh) (g:sd h): relation lenv ≝
-| lsubss_atom: lsubss h g (⋆) (⋆)
-| lsubss_pair: ∀I,L1,L2,W. lsubss h g L1 L2 →
-               lsubss h g (L1. ⓑ{I} W) (L2. ⓑ{I} W)
-| lsubss_abbr: ∀L1,L2,V,W,l. ⦃h, L1⦄ ⊢ V •[g, l+1] W → ⦃h, L2⦄ ⊢ V •[g, l+1] W →
-               lsubss h g L1 L2 → lsubss h g (L1. ⓓV) (L2. ⓛW)
-.
-
-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 #V #W #l #_ #_ #_ #H destruct
-]
-qed.
-
-lemma lsubss_inv_atom1: ∀h,g,L2. h ⊢ ⋆ •⊑[g] L2 → L2 = ⋆.
-/2 width=5/ qed-.
-
-fact lsubss_inv_pair1_aux: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 →
-                           ∀I,K1,V. L1 = K1. ⓑ{I} V →
-                           (∃∃K2. h ⊢ K1 •⊑[g] K2 & L2 = K2. ⓑ{I} V) ∨
-                           ∃∃K2,W,l. ⦃h, K1⦄ ⊢ V •[g,l+1] W & ⦃h, K2⦄ ⊢ V •[g,l+1] W &
-                                     h ⊢ K1 •⊑[g] K2 & L2 = K2. ⓛW & I = Abbr.
-#h #g #L1 #L2 * -L1 -L2
-[ #I #K1 #V #H destruct
-| #J #L1 #L2 #V #HL12 #I #K1 #W #H destruct /3 width=3/
-| #L1 #L2 #V #W #l #H1VW #H2VW #HL12 #I #K1 #V1 #H destruct /3 width=7/
-]
-qed.
-
-lemma lsubss_inv_pair1: ∀h,g,I,K1,L2,V. h ⊢ K1. ⓑ{I} V •⊑[g] L2 →
-                        (∃∃K2. h ⊢ K1 •⊑[g] K2 & L2 = K2. ⓑ{I} V) ∨
-                        ∃∃K2,W,l. ⦃h, K1⦄ ⊢ V •[g,l+1] W & ⦃h, K2⦄ ⊢ V •[g,l+1] W &
-                                  h ⊢ K1 •⊑[g] K2 & L2 = K2. ⓛW & I = Abbr.
-/2 width=3/ 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 #V #W #l #_ #_ #_ #H destruct
-]
-qed.
-
-lemma lsubss_inv_atom2: ∀h,g,L1. h ⊢ L1 •⊑[g] ⋆ → L1 = ⋆.
-/2 width=5/ qed-.
-
-fact lsubss_inv_pair2_aux: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 →
-                           ∀I,K2,W. L2 = K2. ⓑ{I} W →
-                           (∃∃K1. h ⊢ K1 •⊑[g] K2 & L1 = K1. ⓑ{I} W) ∨
-                           ∃∃K1,V,l. ⦃h, K1⦄ ⊢ V •[g,l+1] W & ⦃h, K2⦄ ⊢ V •[g,l+1] W &
-                                     h ⊢ K1 •⊑[g] K2 & L1 = K1. ⓓV & I = Abst.
-#h #g #L1 #L2 * -L1 -L2
-[ #I #K2 #W #H destruct
-| #J #L1 #L2 #V #HL12 #I #K2 #W #H destruct /3 width=3/
-| #L1 #L2 #V #W #l #H1VW #H2VW #HL12 #I #K2 #W2 #H destruct /3 width=7/
-]
-qed.
-
-lemma lsubss_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,l. ⦃h, K1⦄ ⊢ V •[g,l+1] W & ⦃h, K2⦄ ⊢ V •[g,l+1] W &
-                                  h ⊢ K1 •⊑[g] K2 & L1 = K1. ⓓV & I = Abst.
-/2 width=3/ qed-.
-
-(* Basic_forward lemmas *****************************************************)
-
-lemma lsubss_fwd_lsubs1: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 → L1 ≼[0, |L1|] L2.
-#h #g #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
-qed-.
-
-lemma lsubss_fwd_lsubs2: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 → L1 ≼[0, |L2|] 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.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/lsubss_ldrop.ma b/matita/matita/contribs/lambda_delta/basic_2/static/lsubss_ldrop.ma
deleted file mode 100644 (file)
index 82ede61..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/static/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 … H) -H * #He #HLK1
-  [ destruct
-    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
-  | elim (IHL12 … HLK1) -L1 /3 width=3/
-  ]
-| #L1 #L2 #V #W #l #H1VW #H2VW #_ #IHL12 #K1 #e #H
-  elim (ldrop_inv_O1 … H) -H * #He #HLK1
-  [ destruct
-    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
-  | 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 … H) -H * #He #HLK2
-  [ destruct
-    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
-  | elim (IHL12 … HLK2) -L2 /3 width=3/
-  ]
-| #L1 #L2 #V #W #l #H1VW #H2VW #_ #IHL12 #K2 #e #H
-  elim (ldrop_inv_O1 … H) -H * #He #HLK2
-  [ destruct
-    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
-    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
-  | elim (IHL12 … HLK2) -L2 /3 width=3/
-  ]
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/lsubss_lsubss.ma b/matita/matita/contribs/lambda_delta/basic_2/static/lsubss_lsubss.ma
deleted file mode 100644 (file)
index d9f9496..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/static/lsubss_ssta.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR STATIC TYPE ASSIGNMENT ******************)
-
-(* Main properties **********************************************************)
-
-theorem lsubss_trans: ∀h,g,L1,L. h ⊢ L1 •⊑[g] L → ∀L2. h ⊢ L •⊑[g] L2 →
-                      h ⊢ L1 •⊑[g] L2.
-#h #g #L1 #L #H elim H -L1 -L
-[ #X #H >(lsubss_inv_atom1 … H) -H //
-| #I #L1 #L #W #HL1 #IHL1 #X #H
-  elim (lsubss_inv_pair1 … H) -H * #L2
-  [ #HL2 #H destruct /3 width=1/
-  | #V #l #H1WV #H2WV #HL2 #H1 #H2 destruct /3 width=3/
-  ]
-| #L1 #L #V1 #W1 #l #H1VW1 #H2VW1 #HL1 #IHL1 #X #H
-  elim (lsubss_inv_pair1 … H) -H * #L2
-  [ #HL2 #H destruct /3 width=5/
-  | #V #l0 #_ #_ #_ #_ #H destruct
-  ]
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/lsubss_ssta.ma b/matita/matita/contribs/lambda_delta/basic_2/static/lsubss_ssta.ma
deleted file mode 100644 (file)
index f9c6289..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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_lift.ma".
-include "basic_2/static/ssta_ssta.ma".
-include "basic_2/static/lsubss_ldrop.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED STATIC TYPE ASSIGNMENT *******)
-
-(* Properties concerning stratified native type assignment ******************)
-
-lemma lsubss_ssta_trans: ∀h,g,L2,T,U,l. ⦃h, L2⦄ ⊢ T •[g,l] U →
-                         ∀L1. h ⊢ L1 •⊑[g] L2 → ⦃h, L1⦄ ⊢ T •[g,l] U.
-#h #g #L2 #T #U #l #H elim H -L2 -T -U -l
-[ /2 width=1/
-| #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 /3 width=6/
-  | #V1 #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 /3 width=6/
-  | #V1 #l0 #H1 #H2 #_ #H #_ destruct
-    elim (ssta_fwd_correct … H2) -H2 #V #H
-    elim (ssta_mono … HWV2 … H) -HWV2 -H /2 width=6/
-  ]
-| /4 width=1/
-| /3 width=1/
-| /3 width=1/
-]
-qed.
-
-lemma lsubss_ssta_conf: ∀h,g,L1,T,U,l. ⦃h, L1⦄ ⊢ T •[g,l] U →
-                        ∀L2. h ⊢ L1 •⊑[g] L2 → ⦃h, L2⦄ ⊢ T •[g,l] U.
-#h #g #L1 #T #U #l #H elim H -L1 -T -U -l
-[ /2 width=1/
-| #L1 #K1 #V1 #W1 #U1 #i #l #HLK1 #HVW1 #HWU1 #IHVW1 #L2 #HL12
-  elim (lsubss_ldrop_O1_conf … HL12 … HLK1) -L1 #X #H #HLK2
-  elim (lsubss_inv_pair1 … H) -H * #K2 [ -HVW1 | -IHVW1 ]
-  [ #HK12 #H destruct /3 width=6/
-  | #V2 #l0 #H1 #H2 #_ #H #_ destruct
-    elim (ssta_mono … HVW1 … H1) -HVW1 -H1 #H1 #H2 destruct
-    elim (ssta_fwd_correct … H2) -H2 /2 width=6/
-  ]
-| #L1 #K1 #W1 #V1 #U1 #i #l #HLK1 #_ #HWU1 #IHWV1 #L2 #HL12
-  elim (lsubss_ldrop_O1_conf … HL12 … HLK1) -L1 #X #H #HLK2
-  elim (lsubss_inv_pair1 … H) -H * #K2 [ | -HWU1 -IHWV1 -HLK2 ]
-  [ #HK12 #H destruct /3 width=6/
-  | #V2 #l0 #_ #_ #_ #_ #H destruct
-  ]
-| /4 width=1/
-| /3 width=1/
-| /3 width=1/
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/sd.ma b/matita/matita/contribs/lambda_delta/basic_2/static/sd.ma
deleted file mode 100644 (file)
index 63143b1..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/static/sh.ma".
-
-(* SORT DEGREE **************************************************************)
-
-(* sort degree specification *)
-record sd (h:sh): Type[0] ≝ {
-   deg      : relation nat;                            (* degree of the sort *)
-   deg_total: ∀k. ∃l. deg k l;                         (* functional relation axioms *)
-   deg_mono : ∀k,l1,l2. deg k l1 → deg k l2 → l1 = l2;
-   deg_next : ∀k,l. deg k l → deg (next h k) (l - 1)   (* compatibility condition *)
-}.
-
-(* Notable specifications ***************************************************)
-
-definition deg_O: relation nat ≝ λk,l. l = 0.
-
-definition sd_O: ∀h. sd h ≝ λh. mk_sd h deg_O ….
-// /2 width=1/ /2 width=2/ qed.
-
-inductive deg_SO (h:sh) (k:nat) (k0:nat): predicate nat ≝
-| deg_SO_pos : ∀l0. (next h)^l0 k0 = k → deg_SO h k k0 (l0 + 1)
-| deg_SO_zero: ((∃l0. (next h)^l0 k0 = k) → ⊥) → deg_SO h k k0 0
-.
-
-fact deg_SO_inv_pos_aux: ∀h,k,k0,l0. deg_SO h k k0 l0 → ∀l. l0 = l + 1 →
-                         (next h)^l k0 = k.
-#h #k #k0 #l0 * -l0
-[ #l0 #Hl0 #l #H
-  lapply (injective_plus_l … H) -H #H destruct //
-| #_ #l0 <plus_n_Sm #H destruct
-]
-qed.
-
-lemma deg_SO_inv_pos: ∀h,k,k0,l0. deg_SO h k k0 (l0 + 1) → (next h)^l0 k0 = k.
-/2 width=3/ qed-.
-
-lemma deg_SO_refl: ∀h,k. deg_SO h k k 1.
-#h #k @(deg_SO_pos … 0 ?) //
-qed.
-
-lemma deg_SO_gt: ∀h,k1,k2. k1 < k2 → deg_SO h k1 k2 0.
-#h #k1 #k2 #HK12 @deg_SO_zero * #l elim l -l normalize
-[ #H destruct
-  elim (lt_refl_false … HK12)
-| #l #_ #H
-  lapply (next_lt h ((next h)^l k2)) >H -H #H
-  lapply (transitive_lt … H HK12) -k1 #H1
-  lapply (nexts_le h k2 l) #H2
-  lapply (le_to_lt_to_lt … H2 H1) -h -l #H
-  elim (lt_refl_false … H)
-qed.
-
-definition sd_SO: ∀h. nat → sd h ≝ λh,k. mk_sd h (deg_SO h k) ….
-[ #k0
-  lapply (nexts_dec h k0 k) * [ * /3 width=2/ | /4 width=2/ ]
-| #K0 #l1 #l2 * [ #l01 ] #H1 * [1,3: #l02 ] #H2 //
-  [ < H2 in H1; -H2 #H
-    lapply (nexts_inj … H) -H #H destruct //
-  | elim (H1 ?) /2 width=2/
-  | elim (H2 ?) /2 width=2/
-  ]
-| #k0 #l0 *
-  [ #l #H destruct elim l -l normalize /2 width=1/
-  | #H1 @deg_SO_zero * #l #H2 destruct
-    @H1 -H1 @(ex_intro … (S l)) /2 width=1/ (**) (* explicit constructor *)
-  ]
-]
-qed.
-
-let rec sd_l (h:sh) (k:nat) (l:nat) on l : sd h ≝
-   match l with 
-   [ O   ⇒ sd_O h
-   | S l ⇒ match l with
-           [ O ⇒ sd_SO h k
-           | _ ⇒ sd_l h (next h k) l
-           ]
-   ].
-
-(* Basic properties *********************************************************)
-
-lemma deg_pred: ∀h,g,k,l. deg h g (next h k) (l + 1) → deg h g k (l + 2).
-#h #g #k #l #H1
-elim (deg_total h g k) #l0 #H0
-lapply (deg_next … H0) #H2
-lapply (deg_mono … H1 H2) -H1 -H2 #H
-<(associative_plus l 1 1) >H <plus_minus_m_m // /2 width=3 by transitive_le/
-qed.
-
-lemma sd_l_SS: ∀h,k,l. sd_l h k (l + 2) = sd_l h (next h k) (l + 1).
-#h #k #l <plus_n_Sm <plus_n_Sm //
-qed.
-
-lemma sd_l_correct: ∀h,l,k. deg h (sd_l h k l) k l.
-#h #l @(nat_ind_plus … l) -l // #l @(nat_ind_plus … l) -l // /3 width=1/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/sh.ma b/matita/matita/contribs/lambda_delta/basic_2/static/sh.ma
deleted file mode 100644 (file)
index 72df771..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "ground_2/arith.ma".
-
-(* SORT HIERARCHY ***********************************************************)
-
-(* sort hierarchy specification *)
-record sh: Type[0] ≝ {
-   next   : nat → nat;     (* next sort in the hierarchy *)
-   next_lt: ∀k. k < next k (* strict monotonicity condition *)
-}.
-
-(* Basic properties *********************************************************)
-
-lemma nexts_le: ∀h,k,l. k ≤ (next h)^l k.
-#h #k #l elim l -l // normalize #l #IHl
-lapply (next_lt h ((next h)^l k)) #H
-lapply (le_to_lt_to_lt … IHl H) -IHl -H /2 width=2/
-qed.
-
-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.
-
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/ssta.ma b/matita/matita/contribs/lambda_delta/basic_2/static/ssta.ma
deleted file mode 100644 (file)
index 3cd0134..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/ldrop.ma".
-include "basic_2/unfold/frsups.ma".
-include "basic_2/static/sd.ma".
-
-(* STRATIFIED STATIC TYPE ASSIGNMENT ON TERMS *******************************)
-
-inductive ssta (h:sh) (g:sd h): nat → lenv → relation term ≝
-| ssta_sort: ∀L,k,l. deg h g k l → ssta h g l L (⋆k) (⋆(next h k))
-| ssta_ldef: ∀L,K,V,W,U,i,l. ⇩[0, i] L ≡ K. ⓓV → ssta h g l K V W →
-             ⇧[0, i + 1] W ≡ U → ssta h g l L (#i) U
-| ssta_ldec: ∀L,K,W,V,U,i,l. ⇩[0, i] L ≡ K. ⓛW → ssta h g l K W V →
-             ⇧[0, i + 1] W ≡ U → ssta h g (l+1) L (#i) U
-| ssta_bind: ∀a,I,L,V,T,U,l. ssta h g l (L. ⓑ{I} V) T U →
-             ssta h g l L (ⓑ{a,I}V.T) (ⓑ{a,I}V.U)
-| ssta_appl: ∀L,V,T,U,l. ssta h g l L T U →
-             ssta h g l L (ⓐV.T) (ⓐV.U)
-| ssta_cast: ∀L,W,T,U,l. ssta h g l L T U → ssta h g l L (ⓝW. T) U
-.
-
-interpretation "stratified static type assignment (term)"
-   'StaticType h g l L T U = (ssta h g l L T U).
-
-(* Basic inversion lemmas ************************************************)
-
-fact ssta_inv_sort1_aux: ∀h,g,L,T,U,l. ⦃h, L⦄ ⊢ T •[g, l] U → ∀k0. T = ⋆k0 →
-                         deg h g k0 l ∧ U = ⋆(next h k0).
-#h #g #L #T #U #l * -L -T -U -l
-[ #L #k #l #Hkl #k0 #H destruct /2 width=1/
-| #L #K #V #W #U #i #l #_ #_ #_ #k0 #H destruct
-| #L #K #W #V #U #i #l #_ #_ #_ #k0 #H destruct
-| #a #I #L #V #T #U #l #_ #k0 #H destruct
-| #L #V #T #U #l #_ #k0 #H destruct
-| #L #W #T #U #l #_ #k0 #H destruct
-qed.
-
-(* Basic_1: was just: sty0_gen_sort *)
-lemma ssta_inv_sort1: ∀h,g,L,U,k,l. ⦃h, L⦄ ⊢ ⋆k •[g, l] U →
-                      deg h g k l ∧ U = ⋆(next h k).
-/2 width=4/ qed-.
-
-fact ssta_inv_lref1_aux: ∀h,g,L,T,U,l. ⦃h, L⦄ ⊢ T •[g, l] U → ∀j. T = #j →
-                         (∃∃K,V,W. ⇩[0, j] L ≡ K. ⓓV & ⦃h, K⦄ ⊢ V •[g, l] W &
-                                   ⇧[0, j + 1] W ≡ U
-                         ) ∨
-                         (∃∃K,W,V,l0. ⇩[0, j] L ≡ K. ⓛW & ⦃h, K⦄ ⊢ W •[g, l0] V &
-                                      ⇧[0, j + 1] W ≡ U & l = l0 + 1
-                         ).
-#h #g #L #T #U #l * -L -T -U -l
-[ #L #k #l #_ #j #H destruct
-| #L #K #V #W #U #i #l #HLK #HVW #HWU #j #H destruct /3 width=6/
-| #L #K #W #V #U #i #l #HLK #HWV #HWU #j #H destruct /3 width=8/
-| #a #I #L #V #T #U #l #_ #j #H destruct
-| #L #V #T #U #l #_ #j #H destruct
-| #L #W #T #U #l #_ #j #H destruct
-]
-qed.
-
-(* Basic_1: was just: sty0_gen_lref *)
-lemma ssta_inv_lref1: ∀h,g,L,U,i,l. ⦃h, L⦄ ⊢ #i •[g, l] U →
-                      (∃∃K,V,W. ⇩[0, i] L ≡ K. ⓓV & ⦃h, K⦄ ⊢ V •[g, l] W &
-                                ⇧[0, i + 1] W ≡ U
-                      ) ∨
-                      (∃∃K,W,V,l0. ⇩[0, i] L ≡ K. ⓛW & ⦃h, K⦄ ⊢ W •[g, l0] V &
-                                   ⇧[0, i + 1] W ≡ U & l = l0 + 1
-                      ).
-/2 width=3/ qed-.
-
-fact ssta_inv_bind1_aux: ∀h,g,L,T,U,l. ⦃h, L⦄ ⊢ T •[g, l] U →
-                         ∀a,I,X,Y. T = ⓑ{a,I}Y.X →
-                         ∃∃Z. ⦃h, L.ⓑ{I}Y⦄ ⊢ X •[g, l] Z & U = ⓑ{a,I}Y.Z.
-#h #g #L #T #U #l * -L -T -U -l
-[ #L #k #l #_ #a #I #X #Y #H destruct
-| #L #K #V #W #U #i #l #_ #_ #_ #a #I #X #Y #H destruct
-| #L #K #W #V #U #i #l #_ #_ #_ #a #I #X #Y #H destruct
-| #b #J #L #V #T #U #l #HTU #a #I #X #Y #H destruct /2 width=3/
-| #L #V #T #U #l #_ #a #I #X #Y #H destruct
-| #L #W #T #U #l #_ #a #I #X #Y #H destruct
-]
-qed.
-
-(* Basic_1: was just: sty0_gen_bind *)
-lemma ssta_inv_bind1: ∀h,g,a,I,L,Y,X,U,l. ⦃h, L⦄ ⊢ ⓑ{a,I}Y.X •[g, l] U →
-                      ∃∃Z. ⦃h, L.ⓑ{I}Y⦄ ⊢ X •[g, l] Z & U = ⓑ{a,I}Y.Z.
-/2 width=3/ qed-.
-
-fact ssta_inv_appl1_aux: ∀h,g,L,T,U,l. ⦃h, L⦄ ⊢ T •[g, l] U → ∀X,Y. T = ⓐY.X →
-                         ∃∃Z. ⦃h, L⦄ ⊢ X •[g, l] Z & U = ⓐY.Z.
-#h #g #L #T #U #l * -L -T -U -l
-[ #L #k #l #_ #X #Y #H destruct
-| #L #K #V #W #U #i #l #_ #_ #_ #X #Y #H destruct
-| #L #K #W #V #U #i #l #_ #_ #_ #X #Y #H destruct
-| #a #I #L #V #T #U #l #_ #X #Y #H destruct
-| #L #V #T #U #l #HTU #X #Y #H destruct /2 width=3/
-| #L #W #T #U #l #_ #X #Y #H destruct
-]
-qed.
-
-(* Basic_1: was just: sty0_gen_appl *)
-lemma ssta_inv_appl1: ∀h,g,L,Y,X,U,l. ⦃h, L⦄ ⊢ ⓐY.X •[g, l] U →
-                      ∃∃Z. ⦃h, L⦄ ⊢ X •[g, l] Z & U = ⓐY.Z.
-/2 width=3/ qed-.
-
-fact ssta_inv_cast1_aux: ∀h,g,L,T,U,l. ⦃h, L⦄ ⊢ T •[g, l] U →
-                         ∀X,Y. T = ⓝY.X → ⦃h, L⦄ ⊢ X •[g, l] U.
-#h #g #L #T #U #l * -L -T -U -l
-[ #L #k #l #_ #X #Y #H destruct
-| #L #K #V #W #U #l #i #_ #_ #_ #X #Y #H destruct
-| #L #K #W #V #U #l #i #_ #_ #_ #X #Y #H destruct
-| #a #I #L #V #T #U #l #_ #X #Y #H destruct
-| #L #V #T #U #l #_ #X #Y #H destruct
-| #L #W #T #U #l #HTU #X #Y #H destruct //
-]
-qed.
-
-(* Basic_1: was just: sty0_gen_cast *)
-lemma ssta_inv_cast1: ∀h,g,L,X,Y,U,l. ⦃h, L⦄ ⊢ ⓝY.X •[g, l] U →
-                      ⦃h, L⦄ ⊢ X •[g, l] U.
-/2 width=4/ qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma ssta_inv_frsupp: ∀h,g,L,T,U,l. ⦃h, L⦄ ⊢ T •[g, l] U → ⦃L, U⦄ ⧁+ ⦃L, T⦄ → ⊥.
-#h #g #L #T #U #l #H elim H -L -T -U -l
-[ #L #k #l #_ #H
-  elim (frsupp_inv_atom1_frsups … H)
-| #L #K #V #W #U #i #l #_ #_ #HWU #_ #H
-  elim (lift_frsupp_trans … (⋆) … H … HWU) -U #X #H
-  elim (lift_inv_lref2_be … H ? ?) -H //
-| #L #K #W #V #U #i #l #_ #_ #HWU #_ #H
-  elim (lift_frsupp_trans … (⋆) … H … HWU) -U #X #H
-  elim (lift_inv_lref2_be … H ? ?) -H //
-| #a #I #L #V #T #U #l #_ #IHTU #H
-  elim (frsupp_inv_bind1_frsups … H) -H #H [2: /4 width=4/ ] -IHTU
-  lapply (frsups_fwd_fw … H) -H normalize
-  <associative_plus <associative_plus #H
-  elim (le_plus_xySz_x_false … H)
-| #L #V #T #U #l #_ #IHTU #H
-  elim (frsupp_inv_flat1_frsups … H) -H #H [2: /4 width=4/ ] -IHTU
-  lapply (frsups_fwd_fw … H) -H normalize
-  <associative_plus <associative_plus #H
-  elim (le_plus_xySz_x_false … H)
-| /3 width=4/
-]
-qed-.
-
-fact ssta_inv_refl_aux: ∀h,g,L,T,U,l. ⦃h, L⦄ ⊢ T •[g, l] U → T = U → ⊥.
-#h #g #L #T #U #l #H elim H -L -T -U -l
-[ #L #k #l #_ #H
-  lapply (next_lt h k) destruct -H -e0 (**) (* destruct: these premises are not erased *)
-  <e1 -e1 #H elim (lt_refl_false … H)
-| #L #K #V #W #U #i #l #_ #_ #HWU #_ #H destruct
-  elim (lift_inv_lref2_be … HWU ? ?) -HWU //
-| #L #K #W #V #U #i #l #_ #_ #HWU #_ #H destruct
-  elim (lift_inv_lref2_be … HWU ? ?) -HWU //
-| #a #I #L #V #T #U #l #_ #IHTU #H destruct /2 width=1/
-| #L #V #T #U #l #_ #IHTU #H destruct /2 width=1/
-| #L #W #T #U #l #HTU #_ #H destruct
-  elim (ssta_inv_frsupp … HTU ?) -HTU /2 width=1/
-]
-qed-.
-
-lemma ssta_inv_refl: ∀h,g,T,L,l. ⦃h, L⦄ ⊢ T •[g, l] T → ⊥.
-/2 width=8 by ssta_inv_refl_aux/ qed-.
-
-lemma ssta_inv_frsups: ∀h,g,L,T,U,l. ⦃h, L⦄ ⊢ T •[g, l] U → ⦃L, U⦄ ⧁* ⦃L, T⦄ → ⊥.
-#h #g #L #T #U #L #HTU #H elim (frsups_inv_all … H) -H
-[ * #_ #H destruct /2 width=6 by ssta_inv_refl/
-| /2 width=8 by ssta_inv_frsupp/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/ssta_aaa.ma b/matita/matita/contribs/lambda_delta/basic_2/static/ssta_aaa.ma
deleted file mode 100644 (file)
index d14083a..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/static/aaa_lift.ma".
-include "basic_2/static/ssta.ma".
-
-(* STRATIFIED STATIC TYPE ASSIGNMENT ON TERMS *******************************)
-
-(* Properties on atomic arity assignment for terms **************************)
-
-lemma ssta_aaa: ∀h,g,L,T,A. L ⊢ T ⁝ A → ∀U,l. ⦃h, L⦄ ⊢ T •[g, l] U → L ⊢ U ⁝ A.
-#h #g #L #T #A #H elim H -L -T -A
-[ #L #k #U #l #H
-  elim (ssta_inv_sort1 … H) -H #_ #H destruct //
-| #I #L #K #V #B #i #HLK #HV #IHV #U #l #H
-  elim (ssta_inv_lref1 … H) -H * #K0 #V0 #W0 [2: #l0 ] #HLK0 #HVW0 #HU [ #H ]
-  lapply (ldrop_mono … HLK0 … HLK) -HLK0 #H0 destruct
-  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
-  @(aaa_lift … HLK … HU) -HU -L // -HV /2 width=2/
-| #a #L #V #T #B #A #HV #_ #_ #IHT #X #l #H
-  elim (ssta_inv_bind1 … H) -H #U #HTU #H destruct /3 width=2/
-| #a #L #V #T #B #A #HV #_ #_ #IHT #X #l #H
-  elim (ssta_inv_bind1 … H) -H #U #HTU #H destruct /3 width=2/
-| #L #V #T #B #A #HV #_ #_ #IHT #X #l #H
-  elim (ssta_inv_appl1 … H) -H #U #HTU #H destruct /3 width=3/
-| #L #V #T #A #_ #_ #IHV #IHT #X #l #H
-  lapply (ssta_inv_cast1 … H) -H /2 width=2/
-]
-qed.
-
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/ssta_lift.ma b/matita/matita/contribs/lambda_delta/basic_2/static/ssta_lift.ma
deleted file mode 100644 (file)
index e4f78ac..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/ldrop_ldrop.ma".
-include "basic_2/static/ssta.ma".
-
-(* STRATIFIED STATIC TYPE ASSIGNMENT ON TERMS *******************************)
-
-(* Properties on relocation *************************************************)
-
-(* Basic_1: was just: sty0_lift *)
-lemma ssta_lift: ∀h,g,L1,T1,U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
-                 ∀L2,d,e. ⇩[d, e] L2 ≡ L1 → ∀T2. ⇧[d, e] T1 ≡ T2 →
-                 ∀U2. ⇧[d, e] U1 ≡ U2 → ⦃h, L2⦄ ⊢ T2 •[g, l] U2.
-#h #g #L1 #T1 #U1 #l #H elim H -L1 -T1 -U1 -l
-[ #L1 #k #l #Hkl #L2 #d #e #HL21 #X1 #H1 #X2 #H2
-  >(lift_inv_sort1 … H1) -X1
-  >(lift_inv_sort1 … H2) -X2 /2 width=1/
-| #L1 #K1 #V1 #W1 #W #i #l #HLK1 #_ #HW1 #IHVW1 #L2 #d #e #HL21 #X #H #U2 #HWU2
-  elim (lift_inv_lref1 … H) * #Hid #H destruct
-  [ elim (lift_trans_ge … HW1 … HWU2 ?) -W // #W2 #HW12 #HWU2
-    elim (ldrop_trans_le … HL21 … HLK1 ?) -L1 /2 width=2/ #X #HLK2 #H
-    elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K2 #V2 #HK21 #HV12 #H destruct
-    /3 width=8/
-  | lapply (lift_trans_be … HW1 … HWU2 ? ?) -W // /2 width=1/ #HW1U2
-    lapply (ldrop_trans_ge … HL21 … HLK1 ?) -L1 // -Hid /3 width=8/
-  ]
-| #L1 #K1 #W1 #V1 #W #i #l #HLK1 #_ #HW1 #IHWV1 #L2 #d #e #HL21 #X #H #U2 #HWU2
-  elim (lift_inv_lref1 … H) * #Hid #H destruct
-  [ elim (lift_trans_ge … HW1 … HWU2 ?) -W // <minus_plus #W #HW1 #HWU2
-    elim (ldrop_trans_le … HL21 … HLK1 ?) -L1 /2 width=2/ #X #HLK2 #H
-    elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K2 #W2 #HK21 #HW12 #H destruct
-    lapply (lift_mono … HW1 … HW12) -HW1 #H destruct
-    elim (lift_total V1 (d-i-1) e) /3 width=8/
-  | lapply (lift_trans_be … HW1 … HWU2 ? ?) -W // /2 width=1/ #HW1U2
-    lapply (ldrop_trans_ge … HL21 … HLK1 ?) -L1 // -Hid /3 width=8/
-  ]
-| #a #I #L1 #V1 #T1 #U1 #l #_ #IHTU1 #L2 #d #e #HL21 #X1 #H1 #X2 #H2
-  elim (lift_inv_bind1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H destruct
-  elim (lift_inv_bind1 … H2) -H2 #X #U2 #H1 #HU12 #H2 destruct
-  lapply (lift_mono … H1 … HV12) -H1 #H destruct /4 width=5/
-| #L1 #V1 #T1 #U1 #l #_ #IHTU1 #L2 #d #e #HL21 #X1 #H1 #X2 #H2
-  elim (lift_inv_flat1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H destruct
-  elim (lift_inv_flat1 … H2) -H2 #X #U2 #H1 #HU12 #H2 destruct
-  lapply (lift_mono … H1 … HV12) -H1 #H destruct /4 width=5/
-| #L1 #W1 #T1 #U1 #l #_ #IHTU1 #L2 #d #e #HL21 #X #H #U2 #HU12
-  elim (lift_inv_flat1 … H) -H #W2 #T2 #HW12 #HT12 #H destruct /3 width=5/
-]
-qed.
-
-(* Note: apparently this was missing in basic_1 *)
-lemma ssta_inv_lift1: ∀h,g,L2,T2,U2,l. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 →
-                      ∀L1,d,e. ⇩[d, e] L2 ≡ L1 → ∀T1. ⇧[d, e] T1 ≡ T2 →
-                      ∃∃U1. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 & ⇧[d, e] U1 ≡ U2.
-#h #g #L2 #T2 #U2 #l #H elim H -L2 -T2 -U2 -l
-[ #L2 #k #l #Hkl #L1 #d #e #_ #X #H
-  >(lift_inv_sort2 … H) -X /3 width=3/
-| #L2 #K2 #V2 #W2 #W #i #l #HLK2 #HVW2 #HW2 #IHVW2 #L1 #d #e #HL21 #X #H
-  elim (lift_inv_lref2 … H) * #Hid #H destruct [ -HVW2 | -IHVW2 ]
-  [ elim (ldrop_conf_lt … HL21 … HLK2 ?) -L2 // #K1 #V1 #HLK1 #HK21 #HV12
-    elim (IHVW2 … HK21 … HV12) -K2 -V2 #W1 #HVW1 #HW12
-    elim (lift_trans_le … HW12 … HW2 ?) -W2 // >minus_plus <plus_minus_m_m // -Hid /3 width=6/
-  | lapply (ldrop_conf_ge … HL21 … HLK2 ?) -L2 // #HL1K2
-    elim (le_inv_plus_l … Hid) -Hid #Hdie #ei
-    elim (lift_split … HW2 d (i-e+1) ? ? ?) -HW2 // [3: /2 width=1/ ]
-    [ #W0 #HW20 <le_plus_minus_comm // >minus_minus_m_m /2 width=1/ /3 width=6/
-    | <le_plus_minus_comm //
-    ]
-  ]
-| #L2 #K2 #W2 #V2 #W #i #l #HLK2 #HWV2 #HW2 #IHWV2 #L1 #d #e #HL21 #X #H
-  elim (lift_inv_lref2 … H) * #Hid #H destruct [ -HWV2 | -IHWV2 ]
-  [ elim (ldrop_conf_lt … HL21 … HLK2 ?) -L2 // #K1 #W1 #HLK1 #HK21 #HW12
-    elim (IHWV2 … HK21 … HW12) -K2 #V1 #HWV1 #_
-    elim (lift_trans_le … HW12 … HW2 ?) -W2 // >minus_plus <plus_minus_m_m // -Hid /3 width=6/
-  | lapply (ldrop_conf_ge … HL21 … HLK2 ?) -L2 // #HL1K2
-    elim (le_inv_plus_l … Hid) -Hid #Hdie #ei
-    elim (lift_split … HW2 d (i-e+1) ? ? ?) -HW2 // [3: /2 width=1/ ]
-    [ #W0 #HW20 <le_plus_minus_comm // >minus_minus_m_m /2 width=1/ /3 width=6/
-    | <le_plus_minus_comm //
-    ]
-  ]
-| #a #I #L2 #V2 #T2 #U2 #l #_ #IHTU2 #L1 #d #e #HL21 #X #H
-  elim (lift_inv_bind2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
-  elim (IHTU2 (L1.ⓑ{I}V1) … HT12) -IHTU2 -HT12 /2 width=1/ -HL21 /3 width=5/
-| #L2 #V2 #T2 #U2 #l #_ #IHTU2 #L1 #d #e #HL21 #X #H
-  elim (lift_inv_flat2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
-  elim (IHTU2 … HL21 … HT12) -L2 -HT12 /3 width=5/
-| #L2 #W2 #T2 #U2 #l #_ #IHTU2 #L1 #d #e #HL21 #X #H
-  elim (lift_inv_flat2 … H) -H #W1 #T1 #HW12 #HT12 #H destruct
-  elim (IHTU2 … HL21 … HT12) -L2 -HT12 /3 width=3/
-]
-qed.
-
-(* Advanced forvard lemmas **************************************************)
-
-(* Basic_1: was just: sty0_correct *)
-lemma ssta_fwd_correct: ∀h,g,L,T,U,l. ⦃h, L⦄ ⊢ T •[g, l] U →
-                        ∃T0. ⦃h, L⦄ ⊢ U •[g, l - 1] T0.
-#h #g #L #T #U #l #H elim H -L -T -U -l
-[ /4 width=2/
-| #L #K #V #W #W0 #i #l #HLK #_ #HW0 * #V0 #HWV0
-  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
-  elim (lift_total V0 0 (i+1)) /3 width=10/
-| #L #K #W #V #V0 #i #l #HLK #HWV #HWV0 #_
-  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
-  elim (lift_total V 0 (i+1)) /3 width=10/
-| #a #I #L #V #T #U #l #_ * /3 width=2/
-| #L #V #T #U #l #_ * #T0 #HUT0 /3 width=2/
-| #L #W #T #U #l #_ * /2 width=2/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/ssta_ltpss_dx.ma b/matita/matita/contribs/lambda_delta/basic_2/static/ssta_ltpss_dx.ma
deleted file mode 100644 (file)
index ccc9ecc..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/tpss_tpss.ma".
-include "basic_2/unfold/ltpss_dx_tpss.ma".
-include "basic_2/static/ssta_lift.ma".
-
-(* STRATIFIED STATIC TYPE ASSIGNMENT ON TERMS *******************************)
-
-(* Properties about dx parallel unfold **************************************)
-
-(* Note: apparently this was missing in basic_1 *)
-lemma ssta_ltpss_dx_tpss_conf: ∀h,g,L1,T1,U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
-                               ∀L2,d,e. L1 ▶* [d, e] L2 →
-                               ∀T2. L2 ⊢ T1 ▶* [d, e] T2 →
-                               ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 &
-                                     L2 ⊢ U1 ▶* [d, e] U2.
-#h #g #L1 #T1 #U #l #H elim H -L1 -T1 -U -l
-[ #L1 #k1 #l1 #Hkl1 #L2 #d #e #_ #T2 #H
-  >(tpss_inv_sort1 … H) -H /3 width=3/
-| #L1 #K1 #V1 #W1 #U1 #i #l #HLK1 #HVW1 #HWU1 #IHVW1 #L2 #d #e #HL12 #T2 #H
-  elim (tpss_inv_lref1 … H) -H [ | -HVW1 ]
-  [ #H destruct
-    elim (lt_or_ge i d) #Hdi [ -HVW1 | ]
-    [ elim (ltpss_dx_ldrop_conf_le … HL12 … HLK1 ?) -L1 /2 width=2/ #X #H #HLK2
-      elim (ltpss_dx_inv_tpss11 … H ?) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
-      elim (IHVW1 … HK12 … HV12) -IHVW1 -HK12 -HV12 #W2 #HVW2 #HW12
-      lapply (ldrop_fwd_ldrop2 … HLK2) #H
-      elim (lift_total W2 0 (i+1)) #U2 #HWU2
-      lapply (tpss_lift_ge … HW12 … H … HWU1 … HWU2) // -HW12 -H -HWU1
-      >minus_plus <plus_minus_m_m // -Hdi /3 width=6/
-    | elim (lt_or_ge i (d + e)) #Hide [ -HVW1 | -Hdi -IHVW1 ]
-      [ elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HLK2
-        elim (ltpss_dx_inv_tpss21 … H ?) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
-        elim (IHVW1 … HK12 … HV12) -IHVW1 -HK12 -HV12 #W2 #HVW2 #HW12
-        lapply (ldrop_fwd_ldrop2 … HLK2) #H
-        elim (lift_total W2 0 (i+1)) #U2 #HWU2
-        lapply (tpss_lift_ge … HW12 … H … HWU1 … HWU2) // -HW12 -H -HWU1 >minus_plus #H
-        lapply (tpss_weak … H d e ? ?) [1,2: normalize [ >commutative_plus <plus_minus_m_m // | /2 width=1/ ]] -Hdi -Hide /3 width=6/
-      | lapply (ltpss_dx_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /3 width=6/
-      ]
-    ]
-  | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #HVW2 #HWT2
-    elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HL2K0
-    elim (ltpss_dx_inv_tpss21 … H ?) -H /2 width=1/ #K0 #V0 #HK12 #HV12 #H destruct
-    lapply (ldrop_mono … HL2K0 … HLK2) -HL2K0 #H destruct
-    lapply (ldrop_fwd_ldrop2 … HLK2) -HLK2 #HLK2
-    lapply (tpss_trans_eq … HV12 HVW2) -V2 #HV1W2
-    elim (IHVW1 … HK12 … HV1W2) -IHVW1 -HK12 -HV1W2 #V2 #HWV2 #HW1V2
-    elim (lift_total V2 0 (i+1)) #U2 #HVU2
-    lapply (ssta_lift … HWV2 … HLK2 … HWT2 … HVU2) -HWV2 -HWT2 #HTU2
-    lapply (tpss_lift_ge … HW1V2 … HLK2 … HWU1 … HVU2) // -HW1V2 -HLK2 -HWU1 -HVU2 >minus_plus #H
-    lapply (tpss_weak … H d e ? ?) [1,2: normalize [ >commutative_plus <plus_minus_m_m // | /2 width=1/ ]] -Hdi -Hide /2 width=3/
-  ]
-| #L1 #K1 #W1 #V1 #U1 #i #l #HLK1 #HWV1 #HWU1 #IHWV1 #L2 #d #e #HL12 #T2 #H
-  elim (tpss_inv_lref1 … H) -H [ | -HWV1 -HWU1 -IHWV1 ]
-  [ #H destruct
-    elim (lt_or_ge i d) #Hdi [ -HWV1 ]
-    [ elim (ltpss_dx_ldrop_conf_le … HL12 … HLK1 ?) -L1 /2 width=2/ #X #H #HLK2
-      elim (ltpss_dx_inv_tpss11 … H ?) -H /2 width=1/ #K2 #W2 #HK12 #HW12 #H destruct
-      elim (IHWV1 … HK12 … HW12) -IHWV1 -HK12 #V2 #HWV2 #_
-      lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
-      elim (lift_total W2 0 (i+1)) #U2 #HWU2
-      lapply (tpss_lift_ge … HW12 … HLK … HWU1 … HWU2) // -HW12 -HLK -HWU1
-      >minus_plus <plus_minus_m_m // -Hdi /3 width=6/
-    | elim (lt_or_ge i (d + e)) #Hide [ -HWV1 | -IHWV1 -Hdi ]
-      [ elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HLK2
-        elim (ltpss_dx_inv_tpss21 … H ?) -H /2 width=1/ #K2 #W2 #HK12 #HW12 #H destruct
-        elim (IHWV1 … HK12 … HW12) -IHWV1 -HK12 #V2 #HWV2 #_
-        lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
-        elim (lift_total W2 0 (i+1)) #U2 #HWU2
-        lapply (tpss_lift_ge … HW12 … HLK … HWU1 … HWU2) // -HW12 -HLK -HWU1 >minus_plus #H
-        lapply (tpss_weak … H d e ? ?) [1,2: normalize [ >commutative_plus <plus_minus_m_m // | /2 width=1/ ]] -Hdi -Hide /3 width=6/
-      | lapply (ltpss_dx_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /3 width=6/
-      ]
-    ]
-  | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #_ #_
-    elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HL2K0
-    elim (ltpss_dx_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K0 #V0 #_ #_ #H destruct
-    lapply (ldrop_mono … HL2K0 … HLK2) -HL2K0 -HLK2 #H destruct
-  ]
-| #a #I #L1 #V1 #T1 #U1 #l #_ #IHTU1 #L2 #d #e #HL12 #X #H
-  elim (tpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
-  elim (IHTU1 … HT12) -IHTU1 -HT12 /2 width=1/ -HL12 /3 width=5/
-| #L1 #V1 #T1 #U1 #l #_ #IHTU1 #L2 #d #e #HL12 #X #H
-  elim (tpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
-  elim (IHTU1 … HT12) -IHTU1 -HT12 // -HL12 /3 width=5/
-| #L1 #W1 #T1 #U1 #l #_ #IHTU1 #L2 #d #e #HL12 #X #H
-  elim (tpss_inv_flat1 … H) -H #W2 #T2 #HW12 #HT12 #H destruct
-  elim (IHTU1 … HT12) -IHTU1 -HT12 // -HL12 /3 width=3/
-]
-qed.
-
-lemma ssta_ltpss_dx_tps_conf: ∀h,g,L1,T1,U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
-                              ∀L2,d,e. L1 ▶* [d, e] L2 →
-                              ∀T2. L2 ⊢ T1 ▶ [d, e] T2 →
-                              ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 &
-                                   L2 ⊢ U1 ▶* [d, e] U2.
-/3 width=5/ qed.
-
-lemma ssta_ltpss_dx_conf: ∀h,g,L1,T,U1,l. ⦃h, L1⦄ ⊢ T •[g, l] U1 →
-                          ∀L2,d,e. L1 ▶* [d, e] L2 →
-                          ∃∃U2. ⦃h, L2⦄ ⊢ T •[g, l] U2 & L2 ⊢ U1 ▶* [d, e] U2.
-/2 width=5/ qed.
-
-lemma ssta_tpss_conf: ∀h,g,L,T1,U1,l. ⦃h, L⦄ ⊢ T1 •[g, l] U1 →
-                      ∀T2,d,e. L ⊢ T1 ▶* [d, e] T2 →
-                      ∃∃U2. ⦃h, L⦄ ⊢ T2 •[g, l] U2 & L ⊢ U1 ▶* [d, e] U2.
-/2 width=5/ qed.
-
-lemma ssta_tps_conf: ∀h,g,L,T1,U1,l. ⦃h, L⦄ ⊢ T1 •[g, l] U1 →
-                     ∀T2,d,e. L ⊢ T1 ▶ [d, e] T2 →
-                     ∃∃U2. ⦃h, L⦄ ⊢ T2 •[g, l] U2 & L ⊢ U1 ▶* [d, e] U2.
-/2 width=5/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/ssta_ltpss_sn.ma b/matita/matita/contribs/lambda_delta/basic_2/static/ssta_ltpss_sn.ma
deleted file mode 100644 (file)
index 342a839..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/ltpss_sn_alt.ma".
-include "basic_2/static/ssta_ltpss_dx.ma".
-
-(* STRATIFIED STATIC TYPE ASSIGNMENT ON TERMS *******************************)
-
-(* Properties about sn parallel unfold **************************************)
-
-lemma ssta_ltpss_sn_conf: ∀h,g,L1,T,U1,l. ⦃h, L1⦄ ⊢ T •[g, l] U1 →
-                          ∀L2,d,e. L1 ⊢ ▶* [d, e] L2 →
-                          ∃∃U2. ⦃h, L2⦄ ⊢ T •[g, l] U2 & L1 ⊢ U1 ▶* [d, e] U2.
-#h #g #L1 #T #U1 #l #HTU1 #L2 #d #e #HL12
-lapply (ltpss_sn_ltpssa … HL12) -HL12 #HL12
-@(ltpssa_ind … HL12) -L2 [ /2 width=3/ ] -HTU1
-#L #L2 #HL1 #HL2 * #U #HTU #HU1
-lapply (ltpssa_ltpss_sn … HL1) -HL1 #HL1
-elim (ssta_ltpss_dx_conf … HTU … HL2) -HTU #U2 #HTU2 #HU2
-lapply (ltpss_dx_tpss_trans_eq … HU2 … HL2) -HU2 -HL2 #HU2
-lapply (ltpss_sn_tpss_trans_eq … HU2 … HL1) -HU2 -HL1 #HU2
-lapply (tpss_trans_eq … HU1 HU2) -U /2 width=3/
-qed.
-
-lemma ssta_ltpss_sn_tpss_conf: ∀h,g,L1,T1,U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
-                               ∀L2,d,e. L1 ⊢ ▶* [d, e] L2 →
-                               ∀T2. L2 ⊢ T1 ▶* [d, e] T2 →
-                               ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 &
-                                     L1 ⊢ U1 ▶* [d, e] U2.
-#h #g #L1 #T1 #U1 #l #HTU1 #L2 #d #e #HL12 #T2 #HT12
-elim (ssta_ltpss_sn_conf … HTU1 … HL12) -HTU1 #U #HT1U #HU1
-elim (ssta_tpss_conf … HT1U … HT12) -T1 #U2 #HTU2 #HU2
-lapply (ltpss_sn_tpss_trans_eq … HU2 … HL12) -HU2 -HL12 #HU2
-lapply (tpss_trans_eq … HU1 HU2) -U /2 width=3/
-qed.
-
-lemma ssta_ltpss_sn_tps_conf: ∀h,g,L1,T1,U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
-                              ∀L2,d,e. L1 ⊢ ▶* [d, e] L2 →
-                              ∀T2. L2 ⊢ T1 ▶ [d, e] T2 →
-                              ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 &
-                                    L1 ⊢ U1 ▶* [d, e] U2.
-/3 width=3/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/static/ssta_ssta.ma b/matita/matita/contribs/lambda_delta/basic_2/static/ssta_ssta.ma
deleted file mode 100644 (file)
index b20e436..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/ldrop_ldrop.ma".
-include "basic_2/static/ssta.ma".
-
-(* STRATIFIED STATIC TYPE ASSIGNMENT ON TERMS *******************************)
-
-(* Main properties **********************************************************)
-
-(* Note: apparently this was missing in basic_1 *)
-theorem ssta_mono: ∀h,g,L,T,U1,l1. ⦃h, L⦄ ⊢ T •[g, l1] U1 →
-                   ∀U2,l2. ⦃h, L⦄ ⊢ T •[g, l2] U2 → l1 = l2 ∧ U1 = U2.
-#h #g #L #T #U1 #l1 #H elim H -L -T -U1 -l1
-[ #L #k #l #Hkl #X #l2 #H
-  elim (ssta_inv_sort1 … H) -H #Hkl2 #H destruct
-  >(deg_mono … Hkl2 … Hkl) -g -L -l2 /2 width=1/
-| #L #K #V #W #U1 #i #l1 #HLK #_ #HWU1 #IHVW #U2 #l2 #H
-  elim (ssta_inv_lref1 … H) -H * #K0 #V0 #W0 [2: #l0] #HLK0 #HVW0 #HW0U2
-  lapply (ldrop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct
-  lapply (IHVW … HVW0) -IHVW -HVW0 * #H1 #H2 destruct
-  >(lift_mono … HWU1 … HW0U2) -W0 -U1 /2 width=1/
-| #L #K #W #V #U1 #i #l1 #HLK #_ #HWU1 #IHWV #U2 #l2 #H
-  elim (ssta_inv_lref1 … H) -H * #K0 #W0 #V0 [2: #l0 ] #HLK0 #HWV0 #HV0U2
-  lapply (ldrop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct
-  lapply (IHWV … HWV0) -IHWV -HWV0 * #H1 #H2 destruct
-  >(lift_mono … HWU1 … HV0U2) -W -U1 /2 width=1/
-| #a #I #L #V #T #U1 #l1 #_ #IHTU1 #X #l2 #H
-  elim (ssta_inv_bind1 … H) -H #U2 #HTU2 #H destruct
-  elim (IHTU1 … HTU2) -T /3 width=1/
-| #L #V #T #U1 #l1 #_ #IHTU1 #X #l2 #H
-  elim (ssta_inv_appl1 … H) -H #U2 #HTU2 #H destruct
-  elim (IHTU1 … HTU2) -T /3 width=1/
-| #L #W1 #T #U1 #l1 #_ #IHTU1 #U2 #l2 #H
-  lapply (ssta_inv_cast1 … H) -H #HTU2
-  elim (IHTU1 … HTU2) -T /2 width=1/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/substitution/frsup.ma b/matita/matita/contribs/lambda_delta/basic_2/substitution/frsup.ma
deleted file mode 100644 (file)
index 31d6c9f..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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_weight.ma".
-include "basic_2/substitution/lift.ma".
-
-(* RESTRICTED SUPCLOSURE ****************************************************)
-
-inductive frsup: bi_relation lenv term ≝
-| frsup_bind_sn: ∀a,I,L,V,T. frsup L (ⓑ{a,I}V.T) L V
-| frsup_bind_dx: ∀a,I,L,V,T. frsup L (ⓑ{a,I}V.T) (L.ⓑ{I}V) T
-| frsup_flat_sn: ∀I,L,V,T.   frsup L (ⓕ{I}V.T) L V
-| frsup_flat_dx: ∀I,L,V,T.   frsup L (ⓕ{I}V.T) L T
-.
-
-interpretation
-   "restricted structural predecessor (closure)"
-   'RestSupTerm L1 T1 L2 T2 = (frsup L1 T1 L2 T2).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact frsup_inv_atom1_aux: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ →
-                          ∀J. T1 = ⓪{J} → ⊥.
-#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2
-[ #a #I #L #V #T #J #H destruct
-| #a #I #L #V #T #J #H destruct
-| #I #L #V #T #J #H destruct
-| #I #L #V #T #J #H destruct
-]
-qed-.
-
-lemma frsup_inv_atom1: ∀J,L1,L2,T2. ⦃L1, ⓪{J}⦄ ⧁ ⦃L2, T2⦄ → ⊥.
-/2 width=7 by frsup_inv_atom1_aux/ qed-.
-
-fact frsup_inv_bind1_aux: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ →
-                          ∀b,J,W,U. T1 = ⓑ{b,J}W.U →
-                          (L2 = L1 ∧ T2 = W) ∨
-                          (L2 = L1.ⓑ{J}W ∧ T2 = U).
-#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2
-[ #a #I #L #V #T #b #J #W #U #H destruct /3 width=1/
-| #a #I #L #V #T #b #J #W #U #H destruct /3 width=1/
-| #I #L #V #T #b #J #W #U #H destruct
-| #I #L #V #T #b #J #W #U #H destruct
-]
-qed-.
-
-lemma frsup_inv_bind1: ∀b,J,L1,L2,W,U,T2. ⦃L1, ⓑ{b,J}W.U⦄ ⧁ ⦃L2, T2⦄ →
-                       (L2 = L1 ∧ T2 = W) ∨
-                       (L2 = L1.ⓑ{J}W ∧ T2 = U).
-/2 width=4 by frsup_inv_bind1_aux/ qed-.
-
-fact frsup_inv_flat1_aux: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ →
-                          ∀J,W,U. T1 = ⓕ{J}W.U →
-                          L2 = L1 ∧ (T2 = W ∨ T2 = U).
-#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2
-[ #a #I #L #V #T #J #W #U #H destruct
-| #a #I #L #V #T #J #W #U #H destruct
-| #I #L #V #T #J #W #U #H destruct /3 width=1/
-| #I #L #V #T #J #W #U #H destruct /3 width=1/
-]
-qed-.
-
-lemma frsup_inv_flat1: ∀J,L1,L2,W,U,T2. ⦃L1, ⓕ{J}W.U⦄ ⧁ ⦃L2, T2⦄ →
-                       L2 = L1 ∧ (T2 = W ∨ T2 = U).
-/2 width=4 by frsup_inv_flat1_aux/ qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma frsup_fwd_fw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ → #{L2, T2} < #{L1, T1}.
-#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2 /width=1/
-qed-.
-
-lemma frsup_fwd_lw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ → #{L1} ≤ #{L2}.
-#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2 /width=1/
-qed-.
-
-lemma frsup_fwd_tw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ → #{T2} < #{T1}.
-#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2 /width=1/ /2 width=1 by le_minus_to_plus/
-qed-.
-
-lemma frsup_fwd_append: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ → ∃L. L2 = L1 @@ L.
-#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2
-[ #a
-| #a #I #L #V #_ @(ex_intro … (⋆.ⓑ{I}V)) //
-]
-#I #L #V #T @(ex_intro … (⋆)) //
-qed-.
-
-(* Advanced forward lemmas **************************************************)
-
-lemma lift_frsup_trans: ∀T1,U1,d,e. ⇧[d, e] T1 ≡ U1 →
-                        ∀L,K,U2. ⦃L, U1⦄ ⧁ ⦃L @@ K, U2⦄ →
-                        ∃T2. ⇧[d + |K|, e] T2 ≡ U2.
-#T1 #U1 #d #e * -T1 -U1 -d -e
-[5: #a #I #V1 #W1 #T1 #U1 #d #e #HVW1 #HTU1 #L #K #X #H
-    elim (frsup_inv_bind1 … H) -H *
-    [ -HTU1 #H1 #H2 destruct
-      >(append_inv_refl_dx … H1) -L -K normalize /2 width=2/
-    | -HVW1 #H1 #H2 destruct
-      >(append_inv_pair_dx … H1) -L -K normalize /2 width=2/
-    ]
-|6: #I #V1 #W1 #T1 #U1 #d #e #HVW1 #HUT1 #L #K #X #H
-    elim (frsup_inv_flat1 … H) -H #H1 * #H2 destruct
-    >(append_inv_refl_dx … H1) -L -K normalize /2 width=2/
-]
-#i #d #e [2,3: #_ ] #L #K #X #H
-elim (frsup_inv_atom1 … H)
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/substitution/gdrop.ma b/matita/matita/contribs/lambda_delta/basic_2/substitution/gdrop.ma
deleted file mode 100644 (file)
index 218389e..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/genv.ma".
-
-(* GLOBAL ENVIRONMENT SLICING ***********************************************)
-
-inductive gdrop (e:nat): relation genv ≝
-| gdrop_gt: ∀G. |G| ≤ e → gdrop e G (⋆)
-| gdrop_eq: ∀G. |G| = e + 1 → gdrop e G G
-| gdrop_lt: ∀I,G1,G2,V. e < |G1| → gdrop e G1 G2 → gdrop e (G1. ⓑ{I} V) G2
-.
-
-interpretation "global slicing" 
-   'RDrop e G1 G2 = (gdrop e G1 G2).
-
-(* basic inversion lemmas ***************************************************)
-
-lemma gdrop_inv_gt: ∀G1,G2,e. ⇩[e] G1 ≡ G2 → |G1| ≤ e → G2 = ⋆.
-#G1 #G2 #e * -G1 -G2 //
-[ #G #H >H -H >commutative_plus #H
-  lapply (le_plus_to_le_r … 0 H) -H #H
-  lapply (le_n_O_to_eq … H) -H #H destruct
-| #I #G1 #G2 #V #H1 #_ #H2
-  lapply (le_to_lt_to_lt … H2 H1) -H2 -H1 normalize in ⊢ (? % ? → ?); >commutative_plus #H
-  lapply (lt_plus_to_lt_l … 0 H) -H #H
-  elim (lt_zero_false … H)
-]
-qed-.
-
-lemma gdrop_inv_eq: ∀G1,G2,e. ⇩[e] G1 ≡ G2 → |G1| = e + 1 → G1 = G2.
-#G1 #G2 #e * -G1 -G2 //
-[ #G #H1 #H2 >H2 in H1; -H2 >commutative_plus #H
-  lapply (le_plus_to_le_r … 0 H) -H #H
-  lapply (le_n_O_to_eq … H) -H #H destruct
-| #I #G1 #G2 #V #H1 #_ normalize #H2
-  <(injective_plus_l … H2) in H1; -H2 #H
-  elim (lt_refl_false … H)
-]
-qed-.
-
-fact gdrop_inv_lt_aux: ∀I,G,G1,G2,V,e. ⇩[e] G ≡ G2 → G = G1. ⓑ{I} V →
-                       e < |G1| → ⇩[e] G1 ≡ G2.
-#I #G #G1 #G2 #V #e * -G -G2
-[ #G #H1 #H destruct #H2
-  lapply (le_to_lt_to_lt … H1 H2) -H1 -H2 normalize in ⊢ (? % ? → ?); >commutative_plus #H
-  lapply (lt_plus_to_lt_l … 0 H) -H #H
-  elim (lt_zero_false … H)
-| #G #H1 #H2 destruct >(injective_plus_l … H1) -H1 #H
-  elim (lt_refl_false … H)
-| #J #G #G2 #W #_ #HG2 #H destruct //
-]
-qed.
-
-lemma gdrop_inv_lt: ∀I,G1,G2,V,e.
-                    ⇩[e] G1. ⓑ{I} V ≡ G2 → e < |G1| → ⇩[e] G1 ≡ G2.
-/2 width=5/ qed-.
-
-(* Basic properties *********************************************************)
-
-lemma gdrop_total: ∀e,G1. ∃G2. ⇩[e] G1 ≡ G2.
-#e #G1 elim G1 -G1 /3 width=2/
-#I #V #G1 * #G2 #HG12
-elim (lt_or_eq_or_gt e (|G1|)) #He
-[ /3 width=2/
-| destruct /3 width=2/
-| @ex_intro [2: @gdrop_gt normalize /2 width=1/ | skip ] (**) (* explicit constructor *)
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/substitution/gdrop_gdrop.ma b/matita/matita/contribs/lambda_delta/basic_2/substitution/gdrop_gdrop.ma
deleted file mode 100644 (file)
index 0bc1a40..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/gdrop.ma".
-
-(* GLOBAL ENVIRONMENT SLICING ***********************************************)
-
-(* Main properties **********************************************************)
-
-theorem gdrop_mono: ∀G,G1,e. ⇩[e] G ≡ G1 → ∀G2. ⇩[e] G ≡ G2 → G1 = G2.
-#G #G1 #e #H elim H -G -G1
-[ #G #He #G2 #H
-  >(gdrop_inv_gt … H He) -H -He //
-| #G #He #G2 #H
-  >(gdrop_inv_eq … H He) -H -He //
-| #I #G #G1 #V #He #_ #IHG1 #G2 #H
-  lapply (gdrop_inv_lt … H He) -H -He /2 width=1/
-]
-qed-.
-
-lemma gdrop_dec: ∀G1,G2,e. Decidable (⇩[e] G1 ≡ G2).
-#G1 #G2 #e
-elim (gdrop_total e G1) #G #HG1
-elim (genv_eq_dec G G2) #HG2
-[ destruct /2 width=1/
-| @or_intror #HG12
-  lapply (gdrop_mono … HG1 … HG12) -HG1 -HG12 /2 width=1/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/substitution/ldrop.ma b/matita/matita/contribs/lambda_delta/basic_2/substitution/ldrop.ma
deleted file mode 100644 (file)
index 9511648..0000000
+++ /dev/null
@@ -1,313 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/grammar/cl_weight.ma".
-include "basic_2/substitution/lift.ma".
-include "basic_2/substitution/lsubs.ma".
-
-(* LOCAL ENVIRONMENT SLICING ************************************************)
-
-(* Basic_1: includes: drop_skip_bind *)
-inductive ldrop: nat → nat → relation lenv ≝
-| ldrop_atom : ∀d,e. ldrop d e (⋆) (⋆)
-| ldrop_pair : ∀L,I,V. ldrop 0 0 (L. ⓑ{I} V) (L. ⓑ{I} V)
-| ldrop_ldrop: ∀L1,L2,I,V,e. ldrop 0 e L1 L2 → ldrop 0 (e + 1) (L1. ⓑ{I} V) L2
-| ldrop_skip : ∀L1,L2,I,V1,V2,d,e.
-               ldrop d e L1 L2 → ⇧[d,e] V2 ≡ V1 →
-               ldrop (d + 1) e (L1. ⓑ{I} V1) (L2. ⓑ{I} V2)
-.
-
-interpretation "local slicing" 'RDrop d e L1 L2 = (ldrop d e L1 L2).
-
-definition l_liftable: (lenv → relation term) → Prop ≝
-                       λR. ∀K,T1,T2. R K T1 T2 → ∀L,d,e. ⇩[d, e] L ≡ K →
-                       ∀U1. ⇧[d, e] T1 ≡ U1 → ∀U2. ⇧[d, e] T2 ≡ U2 → R L U1 U2.
-
-definition l_deliftable_sn: (lenv → relation term) → Prop ≝
-                            λR. ∀L,U1,U2. R L U1 U2 → ∀K,d,e. ⇩[d, e] L ≡ K →
-                            ∀T1. ⇧[d, e] T1 ≡ U1 →
-                            ∃∃T2. ⇧[d, e] T2 ≡ U2 & R K T1 T2.
-
-definition dropable_sn: relation lenv → Prop ≝
-                        λR. ∀L1,K1,d,e. ⇩[d, e] L1 ≡ K1 → ∀L2. R L1 L2 →
-                        ∃∃K2. R K1 K2 & ⇩[d, e] L2 ≡ K2.
-
-definition dedropable_sn: relation lenv → Prop ≝
-                          λR. ∀L1,K1,d,e. ⇩[d, e] L1 ≡ K1 → ∀K2. R K1 K2 →
-                          ∃∃L2. R L1 L2 & ⇩[d, e] L2 ≡ K2.
-
-definition dropable_dx: relation lenv → Prop ≝
-                        λR. ∀L1,L2. R L1 L2 → ∀K2,e. ⇩[0, e] L2 ≡ K2 →
-                        ∃∃K1. ⇩[0, e] L1 ≡ K1 & R K1 K2.
-
-(* Basic inversion lemmas ***************************************************)
-
-fact ldrop_inv_refl_aux: ∀d,e,L1,L2. ⇩[d, e] L1 ≡ L2 → d = 0 → e = 0 → L1 = L2.
-#d #e #L1 #L2 * -d -e -L1 -L2
-[ //
-| //
-| #L1 #L2 #I #V #e #_ #_ >commutative_plus normalize #H destruct
-| #L1 #L2 #I #V1 #V2 #d #e #_ #_ >commutative_plus normalize #H destruct
-]
-qed.
-
-(* Basic_1: was: drop_gen_refl *)
-lemma ldrop_inv_refl: ∀L1,L2. ⇩[0, 0] L1 ≡ L2 → L1 = L2.
-/2 width=5/ qed-.
-
-fact ldrop_inv_atom1_aux: ∀d,e,L1,L2. ⇩[d, e] L1 ≡ L2 → L1 = ⋆ →
-                          L2 = ⋆.
-#d #e #L1 #L2 * -d -e -L1 -L2
-[ //
-| #L #I #V #H destruct
-| #L1 #L2 #I #V #e #_ #H destruct
-| #L1 #L2 #I #V1 #V2 #d #e #_ #_ #H destruct
-]
-qed.
-
-(* Basic_1: was: drop_gen_sort *)
-lemma ldrop_inv_atom1: ∀d,e,L2. ⇩[d, e] ⋆ ≡ L2 → L2 = ⋆.
-/2 width=5/ qed-.
-
-fact ldrop_inv_O1_aux: ∀d,e,L1,L2. ⇩[d, e] L1 ≡ L2 → d = 0 →
-                       ∀K,I,V. L1 = K. ⓑ{I} V → 
-                       (e = 0 ∧ L2 = K. ⓑ{I} V) ∨
-                       (0 < e ∧ ⇩[d, e - 1] K ≡ L2).
-#d #e #L1 #L2 * -d -e -L1 -L2
-[ #d #e #_ #K #I #V #H destruct
-| #L #I #V #_ #K #J #W #HX destruct /3 width=1/
-| #L1 #L2 #I #V #e #HL12 #_ #K #J #W #H destruct /3 width=1/
-| #L1 #L2 #I #V1 #V2 #d #e #_ #_ >commutative_plus normalize #H destruct
-]
-qed.
-
-lemma ldrop_inv_O1: ∀e,K,I,V,L2. ⇩[0, e] K. ⓑ{I} V ≡ L2 →
-                    (e = 0 ∧ L2 = K. ⓑ{I} V) ∨
-                    (0 < e ∧ ⇩[0, e - 1] K ≡ L2).
-/2 width=3/ qed-.
-
-lemma ldrop_inv_pair1: ∀K,I,V,L2. ⇩[0, 0] K. ⓑ{I} V ≡ L2 → L2 = K. ⓑ{I} V.
-#K #I #V #L2 #H
-elim (ldrop_inv_O1 … H) -H * // #H destruct
-elim (lt_refl_false … H)
-qed-.
-
-(* Basic_1: was: drop_gen_drop *)
-lemma ldrop_inv_ldrop1: ∀e,K,I,V,L2.
-                        ⇩[0, e] K. ⓑ{I} V ≡ L2 → 0 < e → ⇩[0, e - 1] K ≡ L2.
-#e #K #I #V #L2 #H #He
-elim (ldrop_inv_O1 … H) -H * // #H destruct
-elim (lt_refl_false … He)
-qed-.
-
-fact ldrop_inv_skip1_aux: ∀d,e,L1,L2. ⇩[d, e] L1 ≡ L2 → 0 < d →
-                          ∀I,K1,V1. L1 = K1. ⓑ{I} V1 →
-                          ∃∃K2,V2. ⇩[d - 1, e] K1 ≡ K2 &
-                                   ⇧[d - 1, e] V2 ≡ V1 & 
-                                   L2 = K2. ⓑ{I} V2.
-#d #e #L1 #L2 * -d -e -L1 -L2
-[ #d #e #_ #I #K #V #H destruct
-| #L #I #V #H elim (lt_refl_false … H)
-| #L1 #L2 #I #V #e #_ #H elim (lt_refl_false … H)
-| #X #L2 #Y #Z #V2 #d #e #HL12 #HV12 #_ #I #L1 #V1 #H destruct /2 width=5/
-]
-qed.
-
-(* Basic_1: was: drop_gen_skip_l *)
-lemma ldrop_inv_skip1: ∀d,e,I,K1,V1,L2. ⇩[d, e] K1. ⓑ{I} V1 ≡ L2 → 0 < d →
-                       ∃∃K2,V2. ⇩[d - 1, e] K1 ≡ K2 &
-                                ⇧[d - 1, e] V2 ≡ V1 & 
-                                L2 = K2. ⓑ{I} V2.
-/2 width=3/ qed-.
-
-fact ldrop_inv_skip2_aux: ∀d,e,L1,L2. ⇩[d, e] L1 ≡ L2 → 0 < d →
-                          ∀I,K2,V2. L2 = K2. ⓑ{I} V2 →
-                          ∃∃K1,V1. ⇩[d - 1, e] K1 ≡ K2 &
-                                   ⇧[d - 1, e] V2 ≡ V1 & 
-                                   L1 = K1. ⓑ{I} V1.
-#d #e #L1 #L2 * -d -e -L1 -L2
-[ #d #e #_ #I #K #V #H destruct
-| #L #I #V #H elim (lt_refl_false … H)
-| #L1 #L2 #I #V #e #_ #H elim (lt_refl_false … H)
-| #L1 #X #Y #V1 #Z #d #e #HL12 #HV12 #_ #I #L2 #V2 #H destruct /2 width=5/
-]
-qed.
-
-(* Basic_1: was: drop_gen_skip_r *)
-lemma ldrop_inv_skip2: ∀d,e,I,L1,K2,V2. ⇩[d, e] L1 ≡ K2. ⓑ{I} V2 → 0 < d →
-                       ∃∃K1,V1. ⇩[d - 1, e] K1 ≡ K2 & ⇧[d - 1, e] V2 ≡ V1 &
-                                L1 = K1. ⓑ{I} V1.
-/2 width=3/ qed-.
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was by definition: drop_refl *)
-lemma ldrop_refl: ∀L. ⇩[0, 0] L ≡ L.
-#L elim L -L //
-qed.
-
-lemma ldrop_ldrop_lt: ∀L1,L2,I,V,e.
-                      ⇩[0, e - 1] L1 ≡ L2 → 0 < e → ⇩[0, e] L1. ⓑ{I} V ≡ L2.
-#L1 #L2 #I #V #e #HL12 #He >(plus_minus_m_m e 1) // /2 width=1/
-qed.
-
-lemma ldrop_skip_lt: ∀L1,L2,I,V1,V2,d,e.
-                     ⇩[d - 1, e] L1 ≡ L2 → ⇧[d - 1, e] V2 ≡ V1 → 0 < d →
-                     ⇩[d, e] L1. ⓑ{I} V1 ≡ L2. ⓑ{I} V2.
-#L1 #L2 #I #V1 #V2 #d #e #HL12 #HV21 #Hd >(plus_minus_m_m d 1) // /2 width=1/
-qed.
-
-lemma ldrop_O1_le: ∀i,L. i ≤ |L| → ∃K. ⇩[0, i] L ≡ K.
-#i @(nat_ind_plus … i) -i /2 width=2/
-#i #IHi *
-[ #H lapply (le_n_O_to_eq … H) -H >commutative_plus normalize #H destruct 
-| #L #I #V normalize #H
-  elim (IHi L ?) -IHi /2 width=1/ -H /3 width=2/
-]
-qed.
-
-lemma ldrop_O1_lt: ∀L,i. i < |L| → ∃∃I,K,V. ⇩[0, i] L ≡ K.ⓑ{I}V.
-#L elim L -L
-[ #i #H elim (lt_zero_false … H)
-| #L #I #V #IHL #i @(nat_ind_plus … i) -i /2 width=4/
-  #i #_ normalize #H
-  elim (IHL i ? ) -IHL /2 width=1/ -H /3 width=4/
-]
-qed.
-
-lemma ldrop_lsubs_ldrop2_abbr: ∀L1,L2,d,e. L1 ≼ [d, e] L2 →
-                               ∀K2,V,i. ⇩[0, i] L2 ≡ K2. ⓓV →
-                               d ≤ i → i < d + e →
-                               ∃∃K1. K1 ≼ [0, d + e - i - 1] K2 &
-                                     ⇩[0, i] L1 ≡ K1. ⓓV.
-#L1 #L2 #d #e #H elim H -L1 -L2 -d -e
-[ #d #e #K1 #V #i #H
-  lapply (ldrop_inv_atom1 … H) -H #H destruct
-| #L1 #L2 #K1 #V #i #_ #_ #H
-  elim (lt_zero_false … H)
-| #L1 #L2 #V #e #HL12 #IHL12 #K1 #W #i #H #_ #Hie
-  elim (ldrop_inv_O1 … H) -H * #Hi #HLK1
-  [ -IHL12 -Hie destruct
-    <minus_n_O <minus_plus_m_m // /2 width=3/
-  | -HL12
-    elim (IHL12 … HLK1 ? ?) -IHL12 -HLK1 // /2 width=1/ -Hie >minus_minus_comm >arith_b1 // /4 width=3/
-  ]
-| #L1 #L2 #I #V1 #V2 #e #_ #IHL12 #K1 #W #i #H #_ #Hie
-  elim (ldrop_inv_O1 … H) -H * #Hi #HLK1
-  [ -IHL12 -Hie -Hi destruct
-  | elim (IHL12 … HLK1 ? ?) -IHL12 -HLK1 // /2 width=1/ -Hie >minus_minus_comm >arith_b1 // /3 width=3/
-  ]
-| #L1 #L2 #I1 #I2 #V1 #V2 #d #e #_ #IHL12 #K1 #V #i #H #Hdi >plus_plus_comm_23 #Hide
-  elim (le_inv_plus_l … Hdi) #Hdim #Hi
-  lapply (ldrop_inv_ldrop1 … H ?) -H // #HLK1
-  elim (IHL12 … HLK1 ? ?) -IHL12 -HLK1 // /2 width=1/ -Hdi -Hide >minus_minus_comm >arith_b1 // /3 width=3/
-]
-qed.
-
-lemma dropable_sn_TC: ∀R. dropable_sn R → dropable_sn (TC … R).
-#R #HR #L1 #K1 #d #e #HLK1 #L2 #H elim H -L2
-[ #L2 #HL12
-  elim (HR … HLK1 … HL12) -HR -L1 /3 width=3/
-| #L #L2 #_ #HL2 * #K #HK1 #HLK
-  elim (HR … HLK … HL2) -HR -L /3 width=3/
-]
-qed.
-
-lemma dedropable_sn_TC: ∀R. dedropable_sn R → dedropable_sn (TC … R).
-#R #HR #L1 #K1 #d #e #HLK1 #K2 #H elim H -K2
-[ #K2 #HK12
-  elim (HR … HLK1 … HK12) -HR -K1 /3 width=3/
-| #K #K2 #_ #HK2 * #L #HL1 #HLK
-  elim (HR … HLK … HK2) -HR -K /3 width=3/
-]
-qed.
-
-lemma dropable_dx_TC: ∀R. dropable_dx R → dropable_dx (TC … R).
-#R #HR #L1 #L2 #H elim H -L2
-[ #L2 #HL12 #K2 #e #HLK2
-  elim (HR … HL12 … HLK2) -HR -L2 /3 width=3/
-| #L #L2 #_ #HL2 #IHL1 #K2 #e #HLK2
-  elim (HR … HL2 … HLK2) -HR -L2 #K #HLK #HK2
-  elim (IHL1 … HLK) -L /3 width=5/
-]
-qed.
-
-(* Basic forvard lemmas *****************************************************)
-
-(* Basic_1: was: drop_S *)
-lemma ldrop_fwd_ldrop2: ∀L1,I2,K2,V2,e. ⇩[O, e] L1 ≡ K2. ⓑ{I2} V2 →
-                        ⇩[O, e + 1] L1 ≡ K2.
-#L1 elim L1 -L1
-[ #I2 #K2 #V2 #e #H lapply (ldrop_inv_atom1 … H) -H #H destruct
-| #K1 #I1 #V1 #IHL1 #I2 #K2 #V2 #e #H
-  elim (ldrop_inv_O1 … H) -H * #He #H
-  [ -IHL1 destruct /2 width=1/
-  | @ldrop_ldrop >(plus_minus_m_m e 1) // /2 width=3/
-  ]
-]
-qed-.
-
-lemma ldrop_fwd_lw: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → #{L2} ≤ #{L1}.
-#L1 #L2 #d #e #H elim H -L1 -L2 -d -e // normalize
-[ /2 width=3/
-| #L1 #L2 #I #V1 #V2 #d #e #_ #HV21 #IHL12
-  >(tw_lift … HV21) -HV21 /2 width=1/
-]
-qed-. 
-
-lemma ldrop_pair2_fwd_fw: ∀I,L,K,V,d,e. ⇩[d, e] L ≡ K. ⓑ{I} V →
-                          ∀T. #{K, V} < #{L, T}.
-#I #L #K #V #d #e #H #T
-lapply (ldrop_fwd_lw … H) -H #H
-@(le_to_lt_to_lt … H) -H /3 width=1/
-qed-.
-
-lemma ldrop_fwd_ldrop2_length: ∀L1,I2,K2,V2,e.
-                               ⇩[0, e] L1 ≡ K2. ⓑ{I2} V2 → e < |L1|.
-#L1 elim L1 -L1
-[ #I2 #K2 #V2 #e #H lapply (ldrop_inv_atom1 … H) -H #H destruct
-| #K1 #I1 #V1 #IHL1 #I2 #K2 #V2 #e #H
-  elim (ldrop_inv_O1 … H) -H * #He #H
-  [ -IHL1 destruct //
-  | lapply (IHL1 … H) -IHL1 -H #HeK1 whd in ⊢ (? ? %); /2 width=1/
-  ]
-]
-qed-.
-
-lemma ldrop_fwd_O1_length: ∀L1,L2,e. ⇩[0, e] L1 ≡ L2 → |L2| = |L1| - e.
-#L1 elim L1 -L1
-[ #L2 #e #H >(ldrop_inv_atom1 … H) -H //
-| #K1 #I1 #V1 #IHL1 #L2 #e #H
-  elim (ldrop_inv_O1 … H) -H * #He #H
-  [ -IHL1 destruct //
-  | lapply (IHL1 … H) -IHL1 -H #H >H -H normalize
-    >minus_le_minus_minus_comm //
-  ]
-]
-qed-.
-
-(* Basic_1: removed theorems 50:
-            drop_ctail drop_skip_flat 
-            cimp_flat_sx cimp_flat_dx cimp_bind cimp_getl_conf
-            drop_clear drop_clear_O drop_clear_S
-            clear_gen_sort clear_gen_bind clear_gen_flat clear_gen_flat_r
-            clear_gen_all clear_clear clear_mono clear_trans clear_ctail clear_cle
-            getl_ctail_clen getl_gen_tail clear_getl_trans getl_clear_trans
-            getl_clear_bind getl_clear_conf getl_dec getl_drop getl_drop_conf_lt
-            getl_drop_conf_ge getl_conf_ge_drop getl_drop_conf_rev
-            drop_getl_trans_lt drop_getl_trans_le drop_getl_trans_ge
-            getl_drop_trans getl_flt getl_gen_all getl_gen_sort getl_gen_O
-            getl_gen_S getl_gen_2 getl_gen_flat getl_gen_bind getl_conf_le
-            getl_trans getl_refl getl_head getl_flat getl_ctail getl_mono
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/substitution/ldrop_append.ma b/matita/matita/contribs/lambda_delta/basic_2/substitution/ldrop_append.ma
deleted file mode 100644 (file)
index 359d39c..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/ldrop.ma".
-
-(* DROPPING *****************************************************************)
-
-(* Properties on append for local environments ******************************)
-
-fact ldrop_O1_append_sn_le_aux: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → 
-                                d = 0 → e ≤ |L1| →
-                                ∀L. ⇩[0, e] L @@ L1 ≡ L @@ L2.
-#L1 #L2 #d #e #H elim H -L1 -L2 -d -e normalize // /4 width=1/
-#d #e #_ #H #L -d
-lapply (le_n_O_to_eq … H) -H //
-qed-.
-
-lemma ldrop_O1_append_sn_le: ∀L1,L2,e. ⇩[0, e] L1 ≡ L2 → e ≤ |L1| →
-                             ∀L. ⇩[0, e] L @@ L1 ≡ L @@ L2.
-/2 width=3 by ldrop_O1_append_sn_le_aux/ qed.
-
-(* Inversion lemmas on append for local environments ************************)
-
-lemma ldrop_O1_inv_append1_ge: ∀K,L1,L2,e. ⇩[0, e] L1 @@ L2 ≡ K →
-                               |L2| ≤ e → ⇩[0, e - |L2|] L1 ≡ K.
-#K #L1 #L2 elim L2 -L2 normalize //
-#L2 #I #V #IHL2 #e #H #H1e
-elim (ldrop_inv_O1 … H) -H * #H2e #HL12 destruct
-[ lapply (le_n_O_to_eq … H1e) -H1e -IHL2
-  >commutative_plus normalize #H destruct
-| <minus_plus >minus_minus_comm /3 width=1/
-]
-qed-.
-
-lemma ldrop_O1_inv_append1_le: ∀K,L1,L2,e. ⇩[0, e] L1 @@ L2 ≡ K → e ≤ |L2| →
-                               ∀K2. ⇩[0, e] L2 ≡ K2 → K = L1 @@ K2.
-#K #L1 #L2 elim L2 -L2 normalize
-[ #e #H1 #H2 #K2 #H3
-  lapply (le_n_O_to_eq … H2) -H2 #H2
-  lapply (ldrop_inv_atom1 … H3) -H3 #H3 destruct
-  >(ldrop_inv_refl … H1) -H1 //
-| #L2 #I #V #IHL2 #e @(nat_ind_plus … e) -e [ -IHL2 ]
-  [ #H1 #_ #K2 #H2
-    lapply (ldrop_inv_refl … H1) -H1 #H1
-    lapply (ldrop_inv_refl … H2) -H2 #H2 destruct //
-  | #e #_ #H1 #H1e #K2 #H2
-    lapply (ldrop_inv_ldrop1 … H1 ?) -H1 //
-    lapply (ldrop_inv_ldrop1 … H2 ?) -H2 // /3 width=4/
-  ]
-]
-qed-. 
diff --git a/matita/matita/contribs/lambda_delta/basic_2/substitution/ldrop_ldrop.ma b/matita/matita/contribs/lambda_delta/basic_2/substitution/ldrop_ldrop.ma
deleted file mode 100644 (file)
index 07d9c53..0000000
+++ /dev/null
@@ -1,176 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/lift_lift.ma".
-include "basic_2/substitution/ldrop.ma".
-
-(* DROPPING *****************************************************************)
-
-(* Main properties **********************************************************)
-
-(* Basic_1: was: drop_mono *)
-theorem ldrop_mono: ∀d,e,L,L1. ⇩[d, e] L ≡ L1 →
-                    ∀L2. ⇩[d, e] L ≡ L2 → L1 = L2.
-#d #e #L #L1 #H elim H -d -e -L -L1
-[ #d #e #L2 #H
-  >(ldrop_inv_atom1 … H) -L2 //
-| #K #I #V #L2 #HL12
-   <(ldrop_inv_refl … HL12) -L2 //
-| #L #K #I #V #e #_ #IHLK #L2 #H
-  lapply (ldrop_inv_ldrop1 … H ?) -H // /2 width=1/
-| #L #K1 #I #T #V1 #d #e #_ #HVT1 #IHLK1 #X #H
-  elim (ldrop_inv_skip1 … H ?) -H // <minus_plus_m_m #K2 #V2 #HLK2 #HVT2 #H destruct
-  >(lift_inj … HVT1 … HVT2) -HVT1 -HVT2
-  >(IHLK1 … HLK2) -IHLK1 -HLK2 //
-]
-qed-.
-
-(* Basic_1: was: drop_conf_ge *)
-theorem ldrop_conf_ge: ∀d1,e1,L,L1. ⇩[d1, e1] L ≡ L1 →
-                       ∀e2,L2. ⇩[0, e2] L ≡ L2 → d1 + e1 ≤ e2 →
-                       ⇩[0, e2 - e1] L1 ≡ L2.
-#d1 #e1 #L #L1 #H elim H -d1 -e1 -L -L1
-[ #d #e #e2 #L2 #H
-  >(ldrop_inv_atom1 … H) -L2 //
-| //
-| #L #K #I #V #e #_ #IHLK #e2 #L2 #H #He2
-  lapply (ldrop_inv_ldrop1 … H ?) -H /2 width=2/ #HL2
-  <minus_plus >minus_minus_comm /3 width=1/
-| #L #K #I #V1 #V2 #d #e #_ #_ #IHLK #e2 #L2 #H #Hdee2
-  lapply (transitive_le 1 … Hdee2) // #He2
-  lapply (ldrop_inv_ldrop1 … H ?) -H // -He2 #HL2
-  lapply (transitive_le (1 + e) … Hdee2) // #Hee2
-  @ldrop_ldrop_lt >minus_minus_comm /3 width=1/ (**) (* explicit constructor *)
-]
-qed.
-
-(* Note: apparently this was missing in basic_1 *)
-theorem ldrop_conf_be: ∀L0,L1,d1,e1. ⇩[d1, e1] L0 ≡ L1 →
-                       ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → d1 ≤ e2 → e2 ≤ d1 + e1 →
-                       ∃∃L. ⇩[0, d1 + e1 - e2] L2 ≡ L & ⇩[0, d1] L1 ≡ L.
-#L0 #L1 #d1 #e1 #H elim H -L0 -L1 -d1 -e1
-[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H /2 width=3/
-| normalize #L #I #V #L2 #e2 #HL2 #_ #He2
-  lapply (le_n_O_to_eq … He2) -He2 #H destruct
-  lapply (ldrop_inv_refl … HL2) -HL2 #H destruct /2 width=3/
-| normalize #L0 #K0 #I #V1 #e1 #HLK0 #IHLK0 #L2 #e2 #H #_ #He21
-  lapply (ldrop_inv_O1 … H) -H * * #He2 #HL20
-  [ -IHLK0 -He21 destruct <minus_n_O /3 width=3/
-  | -HLK0 <minus_le_minus_minus_comm //
-    elim (IHLK0 … HL20 ? ?) -L0 // /2 width=1/ /2 width=3/
-  ]
-| #L0 #K0 #I #V0 #V1 #d1 #e1 >plus_plus_comm_23 #_ #_ #IHLK0 #L2 #e2 #H #Hd1e2 #He2de1
-  elim (le_inv_plus_l … Hd1e2) #_ #He2
-  <minus_le_minus_minus_comm //
-  lapply (ldrop_inv_ldrop1 … H ?) -H // #HL02
-  elim (IHLK0 … HL02 ? ?) -L0 /2 width=1/ /3 width=3/
-]
-qed.
-
-(* Note: apparently this was missing in basic_1 *)
-theorem ldrop_conf_le: ∀L0,L1,d1,e1. ⇩[d1, e1] L0 ≡ L1 →
-                       ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → e2 ≤ d1 → 
-                       ∃∃L. ⇩[0, e2] L1 ≡ L & ⇩[d1 - e2, e1] L2 ≡ L.
-#L0 #L1 #d1 #e1 #H elim H -L0 -L1 -d1 -e1
-[ #d1 #e1 #L2 #e2 #H
-  lapply (ldrop_inv_atom1 … H) -H #H destruct /2 width=3/
-| #K0 #I #V0 #L2 #e2 #H1 #H2
-  lapply (le_n_O_to_eq … H2) -H2 #H destruct
-  lapply (ldrop_inv_pair1 … H1) -H1 #H destruct /2 width=3/
-| #K0 #K1 #I #V0 #e1 #HK01 #_ #L2 #e2 #H1 #H2
-  lapply (le_n_O_to_eq … H2) -H2 #H destruct
-  lapply (ldrop_inv_pair1 … H1) -H1 #H destruct /3 width=3/
-| #K0 #K1 #I #V0 #V1 #d1 #e1 #HK01 #HV10 #IHK01 #L2 #e2 #H #He2d1
-  elim (ldrop_inv_O1 … H) -H *
-  [ -IHK01 -He2d1 #H1 #H2 destruct /3 width=5/
-  | -HK01 -HV10 #He2 #HK0L2
-    elim (IHK01 … HK0L2 ?) -IHK01 -HK0L2 /2 width=1/ >minus_le_minus_minus_comm // /3 width=3/
-  ]
-]
-qed.
-
-(* Basic_1: was: drop_trans_ge *)
-theorem ldrop_trans_ge: ∀d1,e1,L1,L. ⇩[d1, e1] L1 ≡ L →
-                        ∀e2,L2. ⇩[0, e2] L ≡ L2 → d1 ≤ e2 → ⇩[0, e1 + e2] L1 ≡ L2.
-#d1 #e1 #L1 #L #H elim H -d1 -e1 -L1 -L
-[ #d #e #e2 #L2 #H
-  >(ldrop_inv_atom1 … H) -H -L2 //
-| //
-| /3 width=1/
-| #L1 #L2 #I #V1 #V2 #d #e #H_ #_ #IHL12 #e2 #L #H #Hde2
-  lapply (lt_to_le_to_lt 0 … Hde2) // #He2
-  lapply (lt_to_le_to_lt … (e + e2) He2 ?) // #Hee2
-  lapply (ldrop_inv_ldrop1 … H ?) -H // #HL2
-  @ldrop_ldrop_lt // >le_plus_minus // @IHL12 /2 width=1/ (**) (* explicit constructor *)
-]
-qed.
-
-(* Basic_1: was: drop_trans_le *)
-theorem ldrop_trans_le: ∀d1,e1,L1,L. ⇩[d1, e1] L1 ≡ L →
-                        ∀e2,L2. ⇩[0, e2] L ≡ L2 → e2 ≤ d1 →
-                        ∃∃L0. ⇩[0, e2] L1 ≡ L0 & ⇩[d1 - e2, e1] L0 ≡ L2.
-#d1 #e1 #L1 #L #H elim H -d1 -e1 -L1 -L
-[ #d #e #e2 #L2 #H
-  >(ldrop_inv_atom1 … H) -L2 /2 width=3/
-| #K #I #V #e2 #L2 #HL2 #H
-  lapply (le_n_O_to_eq … H) -H #H destruct /2 width=3/
-| #L1 #L2 #I #V #e #_ #IHL12 #e2 #L #HL2 #H
-  lapply (le_n_O_to_eq … H) -H #H destruct
-  elim (IHL12 … HL2 ?) -IHL12 -HL2 // #L0 #H #HL0
-  lapply (ldrop_inv_refl … H) -H #H destruct /3 width=5/
-| #L1 #L2 #I #V1 #V2 #d #e #HL12 #HV12 #IHL12 #e2 #L #H #He2d
-  elim (ldrop_inv_O1 … H) -H *
-  [ -He2d -IHL12 #H1 #H2 destruct /3 width=5/
-  | -HL12 -HV12 #He2 #HL2
-    elim (IHL12 … HL2 ?) -L2 [ >minus_le_minus_minus_comm // /3 width=3/ | /2 width=1/ ]
-  ]
-]
-qed.
-
-(* Basic_1: was: drop_conf_rev *)
-axiom ldrop_div: ∀e1,L1,L. ⇩[0, e1] L1 ≡ L → ∀e2,L2. ⇩[0, e2] L2 ≡ L →
-                 ∃∃L0. ⇩[0, e1] L0 ≡ L2 & ⇩[e1, e2] L0 ≡ L1.
-
-(* Basic_1: was: drop_conf_lt *)
-lemma ldrop_conf_lt: ∀d1,e1,L,L1. ⇩[d1, e1] L ≡ L1 →
-                     ∀e2,K2,I,V2. ⇩[0, e2] L ≡ K2. ⓑ{I} V2 →
-                     e2 < d1 → let d ≝ d1 - e2 - 1 in
-                     ∃∃K1,V1. ⇩[0, e2] L1 ≡ K1. ⓑ{I} V1 &
-                              ⇩[d, e1] K2 ≡ K1 & ⇧[d, e1] V1 ≡ V2.
-#d1 #e1 #L #L1 #H1 #e2 #K2 #I #V2 #H2 #He2d1
-elim (ldrop_conf_le … H1 … H2 ?) -L [2: /2 width=2/] #K #HL1K #HK2
-elim (ldrop_inv_skip1 … HK2 ?) -HK2 [2: /2 width=1/] #K1 #V1 #HK21 #HV12 #H destruct /2 width=5/
-qed.
-
-lemma ldrop_trans_ge_comm: ∀d1,e1,e2,L1,L2,L.
-                           ⇩[d1, e1] L1 ≡ L → ⇩[0, e2] L ≡ L2 → d1 ≤ e2 →
-                           ⇩[0, e2 + e1] L1 ≡ L2.
-#e1 #e1 #e2 >commutative_plus /2 width=5/
-qed.
-
-lemma ldrop_conf_div: ∀I1,L,K,V1,e1. ⇩[0, e1] L ≡ K. ⓑ{I1} V1 →
-                      ∀I2,V2,e2. ⇩[0, e2] L ≡ K. ⓑ{I2} V2 →
-                      ∧∧ e1 = e2 & I1 = I2 & V1 = V2.
-#I1 #L #K #V1 #e1 #HLK1 #I2 #V2 #e2 #HLK2
-elim (le_or_ge e1 e2) #He
-[ lapply (ldrop_conf_ge … HLK1 … HLK2 ?)
-| lapply (ldrop_conf_ge … HLK2 … HLK1 ?)
-] -HLK1 -HLK2 // #HK
-lapply (ldrop_fwd_O1_length … HK) #H
-elim (discr_minus_x_xy … H) -H
-[1,3: normalize <plus_n_Sm #H destruct ]
-#H >H in HK; #HK
-lapply (ldrop_inv_refl … HK) -HK #H destruct
-lapply (inv_eq_minus_O … H) -H /3 width=1/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/substitution/ldrop_lpx.ma b/matita/matita/contribs/lambda_delta/basic_2/substitution/ldrop_lpx.ma
deleted file mode 100644 (file)
index 2605b92..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/grammar/lenv_px.ma".
-include "basic_2/substitution/ldrop.ma".
-
-(* DROPPING *****************************************************************)
-
-(* Properties on pointwise extension ****************************************)
-
-lemma lpx_deliftable_dropable: ∀R. t_deliftable_sn R → dropable_sn (lpx R).
-#R #HR #L1 #K1 #d #e #H elim H -L1 -K1 -d -e
-[ #d #e #X #H >(lpx_inv_atom1 … H) -H /2 width=3/
-| #K1 #I #V1 #X #H
-  elim (lpx_inv_pair1 … H) -H #L2 #V2 #HL12 #HV12 #H destruct /3 width=5/
-| #L1 #K1 #I #V1 #e #_ #IHLK1 #X #H
-  elim (lpx_inv_pair1 … H) -H #L2 #V2 #HL12 #HV12 #H destruct
-  elim (IHLK1 … HL12) -L1 /3 width=3/
-| #L1 #K1 #I #V1 #W1 #d #e #_ #HWV1 #IHLK1 #X #H
-  elim (lpx_inv_pair1 … H) -H #L2 #V2 #HL12 #HV12 #H destruct
-  elim (HR … HV12 … HWV1) -V1
-  elim (IHLK1 … HL12) -L1 /3 width=5/
-]
-qed.
-
-lemma lpx_liftable_dedropable: ∀R. reflexive ? R →
-                               t_liftable R → dedropable_sn (lpx R).
-#R #H1R #H2R #L1 #K1 #d #e #H elim H -L1 -K1 -d -e
-[ #d #e #X #H >(lpx_inv_atom1 … H) -H /2 width=3/
-| #K1 #I #V1 #X #H
-  elim (lpx_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct /3 width=5/
-| #L1 #K1 #I #V1 #e #_ #IHLK1 #K2 #HK12
-  elim (IHLK1 … HK12) -K1 /3 width=5/
-| #L1 #K1 #I #V1 #W1 #d #e #_ #HWV1 #IHLK1 #X #H
-  elim (lpx_inv_pair1 … H) -H #K2 #W2 #HK12 #HW12 #H destruct
-  elim (lift_total W2 d e) #V2 #HWV2
-  lapply (H2R … HW12 … HWV1 … HWV2) -W1
-  elim (IHLK1 … HK12) -K1 /3 width=5/
-]
-qed.
-
-fact lpx_dropable_aux: ∀R,L2,K2,d,e. ⇩[d, e] L2 ≡ K2 → ∀L1. lpx R L1 L2 →
-                       d = 0 → ∃∃K1. ⇩[0, e] L1 ≡ K1 & lpx R K1 K2.
-#R #L2 #K2 #d #e #H elim H -L2 -K2 -d -e
-[ #d #e #X #H >(lpx_inv_atom2 … H) -H /2 width=3/
-| #K2 #I #V2 #X #H
-  elim (lpx_inv_pair2 … H) -H #K1 #V1 #HK12 #HV12 #H destruct /3 width=5/
-| #L2 #K2 #I #V2 #e #_ #IHLK2 #X #H #_
-  elim (lpx_inv_pair2 … H) -H #L1 #V1 #HL12 #HV12 #H destruct
-  elim (IHLK2 … HL12 ?) -L2 // /3 width=3/
-| #L2 #K2 #I #V2 #W2 #d #e #_ #_ #_ #L1 #_
-  >commutative_plus normalize #H destruct
-]
-qed.
-
-lemma ltpr_dropable: ∀R. dropable_dx (lpx R).
-/2 width=5/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/substitution/ldrop_sfr.ma b/matita/matita/contribs/lambda_delta/basic_2/substitution/ldrop_sfr.ma
deleted file mode 100644 (file)
index 78a15d7..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/lsubs_sfr.ma".
-include "basic_2/substitution/ldrop_ldrop.ma".
-
-(* DROPPING *****************************************************************)
-
-(* Inversion lemmas about local env. full refinement for substitution *******)
-
-(* Note: ldrop_ldrop not needed *)
-lemma sfr_inv_ldrop: ∀I,L,K,V,i. ⇩[0, i] L ≡ K. ⓑ{I}V → ∀d,e. ≽ [d, e] L →
-                     d ≤ i → i < d + e → I = Abbr.
-#I #L elim L -L
-[ #K #V #i #H
-  lapply (ldrop_inv_atom1 … H) -H #H destruct
-| #L #J #W #IHL #K #V #i #H
-  elim (ldrop_inv_O1 … H) -H *
-  [ -IHL #H1 #H2 #d #e #HL #Hdi #Hide destruct
-    lapply (le_n_O_to_eq … Hdi) -Hdi #H destruct
-    lapply (HL … (L.ⓓW) ?) -HL /2 width=1/ #H
-    elim (lsubs_inv_abbr2 … H ?) -H // -Hide #K #_ #H destruct //
-  | #Hi #HLK #d @(nat_ind_plus … d) -d
-    [ #e #H #_ #Hide
-      elim (sfr_inv_bind … H ?) -H [2: /2 width=2/ ] #HL #H destruct
-      @(IHL … HLK … HL) -IHL -HLK -HL // /2 width=1/
-    | #d #_ #e #H #Hdi #Hide
-      lapply (sfr_inv_skip … H ?) -H // #HL
-      @(IHL … HLK … HL) -IHL -HLK -HL /2 width=1/
-    ]
-  ]
-]
-qed-.
-
-(* Properties about local env. full refinement for substitution *************)
-
-(* Note: ldrop_ldrop not needed *)
-lemma sfr_ldrop: ∀L,d,e.
-                 (∀I,K,V,i. d ≤ i → i < d + e → ⇩[0, i] L ≡ K. ⓑ{I}V → I = Abbr) →
-                 ≽ [d, e] L.
-#L elim L -L //
-#L #I #V #IHL #d @(nat_ind_plus … d) -d
-[ #e @(nat_ind_plus … e) -e //
-  #e #_ #HH
-  >(HH I L V 0 ? ? ?) // /5 width=6/
-| /5 width=6/
-]
-qed.
-
-lemma sfr_ldrop_trans_le: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → ∀dd,ee. ≽ [dd, ee] L1 → 
-                          dd + ee ≤ d → ≽ [dd, ee] L2.
-#L1 #L2 #d #e #HL12 #dd #ee #HL1 #Hddee
-@sfr_ldrop #I #K2 #V2 #i #Hddi #Hiddee #HLK2
-lapply (lt_to_le_to_lt … Hiddee Hddee) -Hddee #Hid
-elim (ldrop_trans_le … HL12 … HLK2 ?) -L2 /2 width=2/ #X #HLK1 #H
-elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K1 #V1 #HK12 #HV21 #H destruct
-@(sfr_inv_ldrop … HLK1 … HL1) -L1 -K1 -V1 //
-qed.
-
-lemma sfr_ldrop_trans_be_up: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 →
-                             ∀dd,ee. ≽ [dd, ee] L1 →
-                             dd ≤ d + e → d + e ≤ dd + ee →
-                             ≽ [d, dd + ee - d - e] L2.
-#L1 #L2 #d #e #HL12 #dd #ee #HL1 #Hdde #Hddee
-@sfr_ldrop #I #K2 #V2 #i #Hdi #Hiddee #HLK2
-lapply (transitive_le ? ? (i+e)… Hdde ?) -Hdde /2 width=1/ #Hddie
->commutative_plus in Hiddee; >minus_minus_comm <plus_minus_m_m /2 width=1/ -Hddee #Hiddee
-lapply (ldrop_trans_ge … HL12 … HLK2 ?) -L2 // -Hdi  #HL1K2
-@(sfr_inv_ldrop … HL1K2 … HL1) -L1 >commutative_plus // -Hddie /2 width=1/
-qed.
-
-lemma sfr_ldrop_trans_ge: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → ∀dd,ee. ≽ [dd, ee] L1 → 
-                          d + e ≤ dd → ≽ [dd - e, ee] L2.
-#L1 #L2 #d #e #HL12 #dd #ee #HL1 #Hddee
-@sfr_ldrop #I #K2 #V2 #i #Hddi #Hiddee #HLK2
-elim (le_inv_plus_l … Hddee) -Hddee #Hdde #Hedd
->plus_minus in Hiddee; // #Hiddee
-lapply (transitive_le … Hdde Hddi) -Hdde #Hid
-lapply (ldrop_trans_ge … HL12 … HLK2 ?) -L2 // -Hid #HL1K2
-@(sfr_inv_ldrop … HL1K2 … HL1) -L1 >commutative_plus /2 width=1/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/substitution/lift.ma b/matita/matita/contribs/lambda_delta/basic_2/substitution/lift.ma
deleted file mode 100644 (file)
index 36c353b..0000000
+++ /dev/null
@@ -1,402 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/term_weight.ma".
-include "basic_2/grammar/term_simple.ma".
-
-(* BASIC TERM RELOCATION ****************************************************)
-
-(* Basic_1: includes:
-            lift_sort lift_lref_lt lift_lref_ge lift_bind lift_flat
-*)
-inductive lift: nat → nat → relation term ≝
-| lift_sort   : ∀k,d,e. lift d e (⋆k) (⋆k)
-| lift_lref_lt: ∀i,d,e. i < d → lift d e (#i) (#i)
-| lift_lref_ge: ∀i,d,e. d ≤ i → lift d e (#i) (#(i + e))
-| lift_gref   : ∀p,d,e. lift d e (§p) (§p)
-| lift_bind   : ∀a,I,V1,V2,T1,T2,d,e.
-                lift d e V1 V2 → lift (d + 1) e T1 T2 →
-                lift d e (ⓑ{a,I} V1. T1) (ⓑ{a,I} V2. T2)
-| lift_flat   : ∀I,V1,V2,T1,T2,d,e.
-                lift d e V1 V2 → lift d e T1 T2 →
-                lift d e (ⓕ{I} V1. T1) (ⓕ{I} V2. T2)
-.
-
-interpretation "relocation" 'RLift d e T1 T2 = (lift d e T1 T2).
-
-definition t_liftable: relation term → Prop ≝
-                       λR. ∀T1,T2. R T1 T2 → ∀U1,d,e. ⇧[d, e] T1 ≡ U1 →
-                       ∀U2. ⇧[d, e] T2 ≡ U2 → R U1 U2.
-
-definition t_deliftable_sn: relation term → Prop ≝
-                            λR. ∀U1,U2. R U1 U2 → ∀T1,d,e. ⇧[d, e] T1 ≡ U1 →
-                            ∃∃T2. ⇧[d, e] T2 ≡ U2 & R T1 T2.
-
-(* Basic inversion lemmas ***************************************************)
-
-fact lift_inv_refl_O2_aux: ∀d,e,T1,T2. ⇧[d, e] T1 ≡ T2 → e = 0 → T1 = T2.
-#d #e #T1 #T2 #H elim H -d -e -T1 -T2 // /3 width=1/
-qed.
-
-lemma lift_inv_refl_O2: ∀d,T1,T2. ⇧[d, 0] T1 ≡ T2 → T1 = T2.
-/2 width=4/ qed-.
-
-fact lift_inv_sort1_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 → ∀k. T1 = ⋆k → T2 = ⋆k.
-#d #e #T1 #T2 * -d -e -T1 -T2 //
-[ #i #d #e #_ #k #H destruct
-| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
-| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
-]
-qed.
-
-lemma lift_inv_sort1: ∀d,e,T2,k. ⇧[d,e] ⋆k ≡ T2 → T2 = ⋆k.
-/2 width=5/ qed-.
-
-fact lift_inv_lref1_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 → ∀i. T1 = #i →
-                         (i < d ∧ T2 = #i) ∨ (d ≤ i ∧ T2 = #(i + e)).
-#d #e #T1 #T2 * -d -e -T1 -T2
-[ #k #d #e #i #H destruct
-| #j #d #e #Hj #i #Hi destruct /3 width=1/
-| #j #d #e #Hj #i #Hi destruct /3 width=1/
-| #p #d #e #i #H destruct
-| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #i #H destruct
-| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #i #H destruct
-]
-qed.
-
-lemma lift_inv_lref1: ∀d,e,T2,i. ⇧[d,e] #i ≡ T2 →
-                      (i < d ∧ T2 = #i) ∨ (d ≤ i ∧ T2 = #(i + e)).
-/2 width=3/ qed-.
-
-lemma lift_inv_lref1_lt: ∀d,e,T2,i. ⇧[d,e] #i ≡ T2 → i < d → T2 = #i.
-#d #e #T2 #i #H elim (lift_inv_lref1 … H) -H * //
-#Hdi #_ #Hid lapply (le_to_lt_to_lt … Hdi Hid) -Hdi -Hid #Hdd
-elim (lt_refl_false … Hdd)
-qed-.
-
-lemma lift_inv_lref1_ge: ∀d,e,T2,i. ⇧[d,e] #i ≡ T2 → d ≤ i → T2 = #(i + e).
-#d #e #T2 #i #H elim (lift_inv_lref1 … H) -H * //
-#Hid #_ #Hdi lapply (le_to_lt_to_lt … Hdi Hid) -Hdi -Hid #Hdd
-elim (lt_refl_false … Hdd)
-qed-.
-
-fact lift_inv_gref1_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 → ∀p. T1 = §p → T2 = §p.
-#d #e #T1 #T2 * -d -e -T1 -T2 //
-[ #i #d #e #_ #k #H destruct
-| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
-| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
-]
-qed.
-
-lemma lift_inv_gref1: ∀d,e,T2,p. ⇧[d,e] §p ≡ T2 → T2 = §p.
-/2 width=5/ qed-.
-
-fact lift_inv_bind1_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 →
-                         ∀a,I,V1,U1. T1 = ⓑ{a,I} V1.U1 →
-                         ∃∃V2,U2. ⇧[d,e] V1 ≡ V2 & ⇧[d+1,e] U1 ≡ U2 &
-                                  T2 = ⓑ{a,I} V2. U2.
-#d #e #T1 #T2 * -d -e -T1 -T2
-[ #k #d #e #a #I #V1 #U1 #H destruct
-| #i #d #e #_ #a #I #V1 #U1 #H destruct
-| #i #d #e #_ #a #I #V1 #U1 #H destruct
-| #p #d #e #a #I #V1 #U1 #H destruct
-| #b #J #W1 #W2 #T1 #T2 #d #e #HW #HT #a #I #V1 #U1 #H destruct /2 width=5/
-| #J #W1 #W2 #T1 #T2 #d #e #_ #HT #a #I #V1 #U1 #H destruct
-]
-qed.
-
-lemma lift_inv_bind1: ∀d,e,T2,a,I,V1,U1. ⇧[d,e] ⓑ{a,I} V1. U1 ≡ T2 →
-                      ∃∃V2,U2. ⇧[d,e] V1 ≡ V2 & ⇧[d+1,e] U1 ≡ U2 &
-                               T2 = ⓑ{a,I} V2. U2.
-/2 width=3/ qed-.
-
-fact lift_inv_flat1_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 →
-                         ∀I,V1,U1. T1 = ⓕ{I} V1.U1 →
-                         ∃∃V2,U2. ⇧[d,e] V1 ≡ V2 & ⇧[d,e] U1 ≡ U2 &
-                                  T2 = ⓕ{I} V2. U2.
-#d #e #T1 #T2 * -d -e -T1 -T2
-[ #k #d #e #I #V1 #U1 #H destruct
-| #i #d #e #_ #I #V1 #U1 #H destruct
-| #i #d #e #_ #I #V1 #U1 #H destruct
-| #p #d #e #I #V1 #U1 #H destruct
-| #a #J #W1 #W2 #T1 #T2 #d #e #_ #_ #I #V1 #U1 #H destruct
-| #J #W1 #W2 #T1 #T2 #d #e #HW #HT #I #V1 #U1 #H destruct /2 width=5/
-]
-qed.
-
-lemma lift_inv_flat1: ∀d,e,T2,I,V1,U1. ⇧[d,e] ⓕ{I} V1. U1 ≡ T2 →
-                      ∃∃V2,U2. ⇧[d,e] V1 ≡ V2 & ⇧[d,e] U1 ≡ U2 &
-                               T2 = ⓕ{I} V2. U2.
-/2 width=3/ qed-.
-
-fact lift_inv_sort2_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 → ∀k. T2 = ⋆k → T1 = ⋆k.
-#d #e #T1 #T2 * -d -e -T1 -T2 //
-[ #i #d #e #_ #k #H destruct
-| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
-| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
-]
-qed.
-
-(* Basic_1: was: lift_gen_sort *)
-lemma lift_inv_sort2: ∀d,e,T1,k. ⇧[d,e] T1 ≡ ⋆k → T1 = ⋆k.
-/2 width=5/ qed-.
-
-fact lift_inv_lref2_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 → ∀i. T2 = #i →
-                         (i < d ∧ T1 = #i) ∨ (d + e ≤ i ∧ T1 = #(i - e)).
-#d #e #T1 #T2 * -d -e -T1 -T2
-[ #k #d #e #i #H destruct
-| #j #d #e #Hj #i #Hi destruct /3 width=1/
-| #j #d #e #Hj #i #Hi destruct <minus_plus_m_m /4 width=1/
-| #p #d #e #i #H destruct
-| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #i #H destruct
-| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #i #H destruct
-]
-qed.
-
-(* Basic_1: was: lift_gen_lref *)
-lemma lift_inv_lref2: ∀d,e,T1,i. ⇧[d,e] T1 ≡ #i →
-                      (i < d ∧ T1 = #i) ∨ (d + e ≤ i ∧ T1 = #(i - e)).
-/2 width=3/ qed-.
-
-(* Basic_1: was: lift_gen_lref_lt *)
-lemma lift_inv_lref2_lt: ∀d,e,T1,i. ⇧[d,e] T1 ≡ #i → i < d → T1 = #i.
-#d #e #T1 #i #H elim (lift_inv_lref2 … H) -H * //
-#Hdi #_ #Hid lapply (le_to_lt_to_lt … Hdi Hid) -Hdi -Hid #Hdd
-elim (lt_inv_plus_l … Hdd) -Hdd #Hdd
-elim (lt_refl_false … Hdd)
-qed-.
-
-(* Basic_1: was: lift_gen_lref_false *)
-lemma lift_inv_lref2_be: ∀d,e,T1,i. ⇧[d,e] T1 ≡ #i →
-                         d ≤ i → i < d + e → ⊥.
-#d #e #T1 #i #H elim (lift_inv_lref2 … H) -H *
-[ #H1 #_ #H2 #_ | #H2 #_ #_ #H1 ]
-lapply (le_to_lt_to_lt … H2 H1) -H2 -H1 #H
-elim (lt_refl_false … H)
-qed-.
-
-(* Basic_1: was: lift_gen_lref_ge *)
-lemma lift_inv_lref2_ge: ∀d,e,T1,i. ⇧[d,e] T1 ≡ #i → d + e ≤ i → T1 = #(i - e).
-#d #e #T1 #i #H elim (lift_inv_lref2 … H) -H * //
-#Hid #_ #Hdi lapply (le_to_lt_to_lt … Hdi Hid) -Hdi -Hid #Hdd
-elim (lt_inv_plus_l … Hdd) -Hdd #Hdd
-elim (lt_refl_false … Hdd)
-qed-.
-
-fact lift_inv_gref2_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 → ∀p. T2 = §p → T1 = §p.
-#d #e #T1 #T2 * -d -e -T1 -T2 //
-[ #i #d #e #_ #k #H destruct
-| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
-| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
-]
-qed.
-
-lemma lift_inv_gref2: ∀d,e,T1,p. ⇧[d,e] T1 ≡ §p → T1 = §p.
-/2 width=5/ qed-.
-
-fact lift_inv_bind2_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 →
-                         ∀a,I,V2,U2. T2 = ⓑ{a,I} V2.U2 →
-                         ∃∃V1,U1. ⇧[d,e] V1 ≡ V2 & ⇧[d+1,e] U1 ≡ U2 &
-                                  T1 = ⓑ{a,I} V1. U1.
-#d #e #T1 #T2 * -d -e -T1 -T2
-[ #k #d #e #a #I #V2 #U2 #H destruct
-| #i #d #e #_ #a #I #V2 #U2 #H destruct
-| #i #d #e #_ #a #I #V2 #U2 #H destruct
-| #p #d #e #a #I #V2 #U2 #H destruct
-| #b #J #W1 #W2 #T1 #T2 #d #e #HW #HT #a #I #V2 #U2 #H destruct /2 width=5/
-| #J #W1 #W2 #T1 #T2 #d #e #_ #_ #a #I #V2 #U2 #H destruct
-]
-qed.
-
-(* Basic_1: was: lift_gen_bind *)
-lemma lift_inv_bind2: ∀d,e,T1,a,I,V2,U2. ⇧[d,e] T1 ≡ ⓑ{a,I} V2. U2 →
-                      ∃∃V1,U1. ⇧[d,e] V1 ≡ V2 & ⇧[d+1,e] U1 ≡ U2 &
-                               T1 = ⓑ{a,I} V1. U1.
-/2 width=3/ qed-.
-
-fact lift_inv_flat2_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 →
-                         ∀I,V2,U2. T2 = ⓕ{I} V2.U2 →
-                         ∃∃V1,U1. ⇧[d,e] V1 ≡ V2 & ⇧[d,e] U1 ≡ U2 &
-                                  T1 = ⓕ{I} V1. U1.
-#d #e #T1 #T2 * -d -e -T1 -T2
-[ #k #d #e #I #V2 #U2 #H destruct
-| #i #d #e #_ #I #V2 #U2 #H destruct
-| #i #d #e #_ #I #V2 #U2 #H destruct
-| #p #d #e #I #V2 #U2 #H destruct
-| #a #J #W1 #W2 #T1 #T2 #d #e #_ #_ #I #V2 #U2 #H destruct
-| #J #W1 #W2 #T1 #T2 #d #e #HW #HT #I #V2 #U2 #H destruct /2 width=5/
-]
-qed.
-
-(* Basic_1: was: lift_gen_flat *)
-lemma lift_inv_flat2: ∀d,e,T1,I,V2,U2. ⇧[d,e] T1 ≡  ⓕ{I} V2. U2 →
-                      ∃∃V1,U1. ⇧[d,e] V1 ≡ V2 & ⇧[d,e] U1 ≡ U2 &
-                               T1 = ⓕ{I} V1. U1.
-/2 width=3/ qed-.
-
-lemma lift_inv_pair_xy_x: ∀d,e,I,V,T. ⇧[d, e] ②{I} V. T ≡ V → ⊥.
-#d #e #J #V elim V -V
-[ * #i #T #H
-  [ lapply (lift_inv_sort2 … H) -H #H destruct
-  | elim (lift_inv_lref2 … H) -H * #_ #H destruct
-  | lapply (lift_inv_gref2 … H) -H #H destruct
-  ]
-| * [ #a ] #I #W2 #U2 #IHW2 #_ #T #H
-  [ elim (lift_inv_bind2 … H) -H #W1 #U1 #HW12 #_ #H destruct /2 width=2/
-  | elim (lift_inv_flat2 … H) -H #W1 #U1 #HW12 #_ #H destruct /2 width=2/
-  ]
-]
-qed-.
-
-lemma lift_inv_pair_xy_y: ∀I,T,V,d,e. ⇧[d, e] ②{I} V. T ≡ T → ⊥.
-#J #T elim T -T
-[ * #i #V #d #e #H
-  [ lapply (lift_inv_sort2 … H) -H #H destruct
-  | elim (lift_inv_lref2 … H) -H * #_ #H destruct
-  | lapply (lift_inv_gref2 … H) -H #H destruct
-  ]
-| * [ #a ] #I #W2 #U2 #_ #IHU2 #V #d #e #H
-  [ elim (lift_inv_bind2 … H) -H #W1 #U1 #_ #HU12 #H destruct /2 width=4/
-  | elim (lift_inv_flat2 … H) -H #W1 #U1 #_ #HU12 #H destruct /2 width=4/
-  ]
-]
-qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma tw_lift: ∀d,e,T1,T2. ⇧[d, e] T1 ≡ T2 → #{T1} = #{T2}.
-#d #e #T1 #T2 #H elim H -d -e -T1 -T2 normalize //
-qed-.
-
-lemma lift_simple_dx: ∀d,e,T1,T2. ⇧[d, e] T1 ≡ T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄.
-#d #e #T1 #T2 #H elim H -d -e -T1 -T2 //
-#a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #_ #_ #H
-elim (simple_inv_bind … H)
-qed-.
-
-lemma lift_simple_sn: ∀d,e,T1,T2. ⇧[d, e] T1 ≡ T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄.
-#d #e #T1 #T2 #H elim H -d -e -T1 -T2 //
-#a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #_ #_ #H
-elim (simple_inv_bind … H)
-qed-. 
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was: lift_lref_gt *)
-lemma lift_lref_ge_minus: ∀d,e,i. d + e ≤ i → ⇧[d, e] #(i - e) ≡ #i.
-#d #e #i #H >(plus_minus_m_m i e) in ⊢ (? ? ? ? %); /2 width=2/ /3 width=2/
-qed.
-
-lemma lift_lref_ge_minus_eq: ∀d,e,i,j. d + e ≤ i → j = i - e → ⇧[d, e] #j ≡ #i.
-/2 width=1/ qed-.
-
-(* Basic_1: was: lift_r *)
-lemma lift_refl: ∀T,d. ⇧[d, 0] T ≡ T.
-#T elim T -T
-[ * #i // #d elim (lt_or_ge i d) /2 width=1/
-| * /2 width=1/
-]
-qed.
-
-lemma lift_total: ∀T1,d,e. ∃T2. ⇧[d,e] T1 ≡ T2.
-#T1 elim T1 -T1
-[ * #i /2 width=2/ #d #e elim (lt_or_ge i d) /3 width=2/
-| * [ #a ] #I #V1 #T1 #IHV1 #IHT1 #d #e
-  elim (IHV1 d e) -IHV1 #V2 #HV12
-  [ elim (IHT1 (d+1) e) -IHT1 /3 width=2/
-  | elim (IHT1 d e) -IHT1 /3 width=2/
-  ]
-]
-qed.
-
-(* Basic_1: was: lift_free (right to left) *)
-lemma lift_split: ∀d1,e2,T1,T2. ⇧[d1, e2] T1 ≡ T2 →
-                  ∀d2,e1. d1 ≤ d2 → d2 ≤ d1 + e1 → e1 ≤ e2 →
-                  ∃∃T. ⇧[d1, e1] T1 ≡ T & ⇧[d2, e2 - e1] T ≡ T2.
-#d1 #e2 #T1 #T2 #H elim H -d1 -e2 -T1 -T2
-[ /3 width=3/
-| #i #d1 #e2 #Hid1 #d2 #e1 #Hd12 #_ #_
-  lapply (lt_to_le_to_lt … Hid1 Hd12) -Hd12 #Hid2 /4 width=3/
-| #i #d1 #e2 #Hid1 #d2 #e1 #_ #Hd21 #He12
-  lapply (transitive_le … (i+e1) Hd21 ?) /2 width=1/ -Hd21 #Hd21
-  >(plus_minus_m_m e2 e1 ?) // /3 width=3/
-| /3 width=3/
-| #a #I #V1 #V2 #T1 #T2 #d1 #e2 #_ #_ #IHV #IHT #d2 #e1 #Hd12 #Hd21 #He12
-  elim (IHV … Hd12 Hd21 He12) -IHV #V0 #HV0a #HV0b
-  elim (IHT (d2+1) … ? ? He12) /2 width=1/ /3 width=5/
-| #I #V1 #V2 #T1 #T2 #d1 #e2 #_ #_ #IHV #IHT #d2 #e1 #Hd12 #Hd21 #He12
-  elim (IHV … Hd12 Hd21 He12) -IHV #V0 #HV0a #HV0b
-  elim (IHT d2 … ? ? He12) // /3 width=5/
-]
-qed.
-
-(* Basic_1: was only: dnf_dec2 dnf_dec *)
-lemma is_lift_dec: ∀T2,d,e. Decidable (∃T1. ⇧[d,e] T1 ≡ T2).
-#T1 elim T1 -T1
-[ * [1,3: /3 width=2/ ] #i #d #e
-  elim (lt_dec i d) #Hid
-  [ /4 width=2/
-  | lapply (false_lt_to_le … Hid) -Hid #Hid
-    elim (lt_dec i (d + e)) #Hide
-    [ @or_intror * #T1 #H
-      elim (lift_inv_lref2_be … H Hid Hide)
-    | lapply (false_lt_to_le … Hide) -Hide /4 width=2/
-    ]
-  ]
-| * [ #a ] #I #V2 #T2 #IHV2 #IHT2 #d #e
-  [ elim (IHV2 d e) -IHV2
-    [ * #V1 #HV12 elim (IHT2 (d+1) e) -IHT2
-      [ * #T1 #HT12 @or_introl /3 width=2/
-      | -V1 #HT2 @or_intror * #X #H
-        elim (lift_inv_bind2 … H) -H /3 width=2/
-      ]
-    | -IHT2 #HV2 @or_intror * #X #H
-      elim (lift_inv_bind2 … H) -H /3 width=2/
-    ]
-  | elim (IHV2 d e) -IHV2
-    [ * #V1 #HV12 elim (IHT2 d e) -IHT2
-      [ * #T1 #HT12 /4 width=2/
-      | -V1 #HT2 @or_intror * #X #H
-        elim (lift_inv_flat2 … H) -H /3 width=2/
-      ]
-    | -IHT2 #HV2 @or_intror * #X #H
-      elim (lift_inv_flat2 … H) -H /3 width=2/
-    ]
-  ]
-]
-qed.
-
-lemma t_liftable_TC: ∀R. t_liftable R → t_liftable (TC … R).
-#R #HR #T1 #T2 #H elim H -T2
-[ /3 width=7/
-| #T #T2 #_ #HT2 #IHT1 #U1 #d #e #HTU1 #U2 #HTU2
-  elim (lift_total T d e) /3 width=9/
-]
-qed.
-
-lemma t_deliftable_sn_TC: ∀R. t_deliftable_sn R → t_deliftable_sn (TC … R).
-#R #HR #U1 #U2 #H elim H -U2
-[ #U2 #HU12 #T1 #d #e #HTU1
-  elim (HR … HU12 … HTU1) -U1 /3 width=3/
-| #U #U2 #_ #HU2 #IHU1 #T1 #d #e #HTU1
-  elim (IHU1 … HTU1) -U1 #T #HTU #HT1
-  elim (HR … HU2 … HTU) -U /3 width=5/
-]
-qed-. 
-
-(* Basic_1: removed theorems 7:
-            lift_head lift_gen_head
-            lift_weight_map lift_weight lift_weight_add lift_weight_add_O
-            lift_tlt_dx
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/substitution/lift_lift.ma b/matita/matita/contribs/lambda_delta/basic_2/substitution/lift_lift.ma
deleted file mode 100644 (file)
index 3e18bff..0000000
+++ /dev/null
@@ -1,217 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/lift.ma".
-
-(* BASIC TERM RELOCATION ****************************************************)
-
-(* Main properies ***********************************************************)
-
-(* Basic_1: was: lift_inj *)
-theorem lift_inj: ∀d,e,T1,U. ⇧[d,e] T1 ≡ U → ∀T2. ⇧[d,e] T2 ≡ U → T1 = T2.
-#d #e #T1 #U #H elim H -d -e -T1 -U
-[ #k #d #e #X #HX
-  lapply (lift_inv_sort2 … HX) -HX //
-| #i #d #e #Hid #X #HX
-  lapply (lift_inv_lref2_lt … HX ?) -HX //
-| #i #d #e #Hdi #X #HX
-  lapply (lift_inv_lref2_ge … HX ?) -HX // /2 width=1/
-| #p #d #e #X #HX
-  lapply (lift_inv_gref2 … HX) -HX //
-| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #X #HX
-  elim (lift_inv_bind2 … HX) -HX #V #T #HV1 #HT1 #HX destruct /3 width=1/
-| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #X #HX
-  elim (lift_inv_flat2 … HX) -HX #V #T #HV1 #HT1 #HX destruct /3 width=1/
-]
-qed-.
-
-(* Basic_1: was: lift_gen_lift *)
-theorem lift_div_le: ∀d1,e1,T1,T. ⇧[d1, e1] T1 ≡ T →
-                     ∀d2,e2,T2. ⇧[d2 + e1, e2] T2 ≡ T →
-                     d1 ≤ d2 →
-                     ∃∃T0. ⇧[d1, e1] T0 ≡ T2 & ⇧[d2, e2] T0 ≡ T1.
-#d1 #e1 #T1 #T #H elim H -d1 -e1 -T1 -T
-[ #k #d1 #e1 #d2 #e2 #T2 #Hk #Hd12
-  lapply (lift_inv_sort2 … Hk) -Hk #Hk destruct /3 width=3/
-| #i #d1 #e1 #Hid1 #d2 #e2 #T2 #Hi #Hd12
-  lapply (lt_to_le_to_lt … Hid1 Hd12) -Hd12 #Hid2
-  lapply (lift_inv_lref2_lt … Hi ?) -Hi /2 width=3/ /3 width=3/
-| #i #d1 #e1 #Hid1 #d2 #e2 #T2 #Hi #Hd12
-  elim (lift_inv_lref2 … Hi) -Hi * #Hid2 #H destruct
-  [ -Hd12 lapply (lt_plus_to_lt_l … Hid2) -Hid2 #Hid2 /3 width=3/
-  | -Hid1 >plus_plus_comm_23 in Hid2; #H lapply (le_plus_to_le_r … H) -H #H
-    elim (le_inv_plus_l … H) -H #Hide2 #He2i
-    lapply (transitive_le … Hd12 Hide2) -Hd12 #Hd12
-    >le_plus_minus_comm // >(plus_minus_m_m i e2) in ⊢ (? ? ? %); // -He2i
-    /4 width=3/
-  ]
-| #p #d1 #e1 #d2 #e2 #T2 #Hk #Hd12
-  lapply (lift_inv_gref2 … Hk) -Hk #Hk destruct /3 width=3/
-| #a #I #W1 #W #U1 #U #d1 #e1 #_ #_ #IHW #IHU #d2 #e2 #T2 #H #Hd12
-  lapply (lift_inv_bind2 … H) -H * #W2 #U2 #HW2 #HU2 #H destruct
-  elim (IHW … HW2 ?) // -IHW -HW2 #W0 #HW2 #HW1
-  >plus_plus_comm_23 in HU2; #HU2 elim (IHU … HU2 ?) /2 width=1/ /3 width=5/
-| #I #W1 #W #U1 #U #d1 #e1 #_ #_ #IHW #IHU #d2 #e2 #T2 #H #Hd12
-  lapply (lift_inv_flat2 … H) -H * #W2 #U2 #HW2 #HU2 #H destruct
-  elim (IHW … HW2 ?) // -IHW -HW2 #W0 #HW2 #HW1
-  elim (IHU … HU2 ?) // /3 width=5/
-]
-qed.
-
-(* Note: apparently this was missing in basic_1 *)
-theorem lift_div_be: ∀d1,e1,T1,T. ⇧[d1, e1] T1 ≡ T →
-                     ∀e,e2,T2. ⇧[d1 + e, e2] T2 ≡ T →
-                     e ≤ e1 → e1 ≤ e + e2 →
-                     ∃∃T0. ⇧[d1, e] T0 ≡ T2 & ⇧[d1, e + e2 - e1] T0 ≡ T1.
-#d1 #e1 #T1 #T #H elim H -d1 -e1 -T1 -T
-[ #k #d1 #e1 #e #e2 #T2 #H >(lift_inv_sort2 … H) -H /2 width=3/
-| #i #d1 #e1 #Hid1 #e #e2 #T2 #H #He1 #He1e2
-  >(lift_inv_lref2_lt … H) -H [ /3 width=3/ | /2 width=3/ ]
-| #i #d1 #e1 #Hid1 #e #e2 #T2 #H #He1 #He1e2
-  elim (lt_or_ge (i+e1) (d1+e+e2)) #Hie1d1e2
-  [ elim (lift_inv_lref2_be … H ? ?) -H // /2 width=1/
-  | >(lift_inv_lref2_ge … H ?) -H //
-    lapply (le_plus_to_minus … Hie1d1e2) #Hd1e21i
-    elim (le_inv_plus_l … Hie1d1e2) -Hie1d1e2 #Hd1e12 #He2ie1
-    @ex2_1_intro [2: /2 width=1/ | skip ] -Hd1e12
-    @lift_lref_ge_minus_eq [ >plus_minus_commutative // | /2 width=1/ ]
-  ]
-| #p #d1 #e1 #e #e2 #T2 #H >(lift_inv_gref2 … H) -H /2 width=3/
-| #a #I #V1 #V #T1 #T #d1 #e1 #_ #_ #IHV1 #IHT1 #e #e2 #X #H #He1 #He1e2
-  elim (lift_inv_bind2 … H) -H #V2 #T2 #HV2 #HT2 #H destruct
-  elim (IHV1 … HV2 ? ?) -V // >plus_plus_comm_23 in HT2; #HT2
-  elim (IHT1 … HT2 ? ?) -T // -He1 -He1e2 /3 width=5/
-| #I #V1 #V #T1 #T #d1 #e1 #_ #_ #IHV1 #IHT1 #e #e2 #X #H #He1 #He1e2
-  elim (lift_inv_flat2 … H) -H #V2 #T2 #HV2 #HT2 #H destruct
-  elim (IHV1 … HV2 ? ?) -V //
-  elim (IHT1 … HT2 ? ?) -T // -He1 -He1e2 /3 width=5/
-]
-qed.
-
-theorem lift_mono: ∀d,e,T,U1. ⇧[d,e] T ≡ U1 → ∀U2. ⇧[d,e] T ≡ U2 → U1 = U2.
-#d #e #T #U1 #H elim H -d -e -T -U1
-[ #k #d #e #X #HX
-  lapply (lift_inv_sort1 … HX) -HX //
-| #i #d #e #Hid #X #HX 
-  lapply (lift_inv_lref1_lt … HX ?) -HX //
-| #i #d #e #Hdi #X #HX 
-  lapply (lift_inv_lref1_ge … HX ?) -HX //
-| #p #d #e #X #HX
-  lapply (lift_inv_gref1 … HX) -HX //
-| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #X #HX
-  elim (lift_inv_bind1 … HX) -HX #V #T #HV1 #HT1 #HX destruct /3 width=1/
-| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #X #HX
-  elim (lift_inv_flat1 … HX) -HX #V #T #HV1 #HT1 #HX destruct /3 width=1/
-]
-qed-.
-
-(* Basic_1: was: lift_free (left to right) *)
-theorem lift_trans_be: ∀d1,e1,T1,T. ⇧[d1, e1] T1 ≡ T →
-                       ∀d2,e2,T2. ⇧[d2, e2] T ≡ T2 →
-                       d1 ≤ d2 → d2 ≤ d1 + e1 → ⇧[d1, e1 + e2] T1 ≡ T2.
-#d1 #e1 #T1 #T #H elim H -d1 -e1 -T1 -T
-[ #k #d1 #e1 #d2 #e2 #T2 #HT2 #_ #_
-  >(lift_inv_sort1 … HT2) -HT2 //
-| #i #d1 #e1 #Hid1 #d2 #e2 #T2 #HT2 #Hd12 #_
-  lapply (lt_to_le_to_lt … Hid1 Hd12) -Hd12 #Hid2
-  lapply (lift_inv_lref1_lt … HT2 Hid2) /2 width=1/
-| #i #d1 #e1 #Hid1 #d2 #e2 #T2 #HT2 #_ #Hd21
-  lapply (lift_inv_lref1_ge … HT2 ?) -HT2
-  [ @(transitive_le … Hd21 ?) -Hd21 /2 width=1/
-  | -Hd21 /2 width=1/
-  ]
-| #p #d1 #e1 #d2 #e2 #T2 #HT2 #_ #_
-  >(lift_inv_gref1 … HT2) -HT2 //
-| #a #I #V1 #V2 #T1 #T2 #d1 #e1 #_ #_ #IHV12 #IHT12 #d2 #e2 #X #HX #Hd12 #Hd21
-  elim (lift_inv_bind1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct
-  lapply (IHV12 … HV20 ? ?) // -IHV12 -HV20 #HV10
-  lapply (IHT12 … HT20 ? ?) /2 width=1/
-| #I #V1 #V2 #T1 #T2 #d1 #e1 #_ #_ #IHV12 #IHT12 #d2 #e2 #X #HX #Hd12 #Hd21
-  elim (lift_inv_flat1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct
-  lapply (IHV12 … HV20 ? ?) // -IHV12 -HV20 #HV10
-  lapply (IHT12 … HT20 ? ?) // /2 width=1/
-]
-qed.
-
-(* Basic_1: was: lift_d (right to left) *)
-theorem lift_trans_le: ∀d1,e1,T1,T. ⇧[d1, e1] T1 ≡ T →
-                       ∀d2,e2,T2. ⇧[d2, e2] T ≡ T2 → d2 ≤ d1 →
-                       ∃∃T0. ⇧[d2, e2] T1 ≡ T0 & ⇧[d1 + e2, e1] T0 ≡ T2.
-#d1 #e1 #T1 #T #H elim H -d1 -e1 -T1 -T
-[ #k #d1 #e1 #d2 #e2 #X #HX #_
-  >(lift_inv_sort1 … HX) -HX /2 width=3/
-| #i #d1 #e1 #Hid1 #d2 #e2 #X #HX #_
-  lapply (lt_to_le_to_lt … (d1+e2) Hid1 ?) // #Hie2
-  elim (lift_inv_lref1 … HX) -HX * #Hid2 #HX destruct /3 width=3/ /4 width=3/
-| #i #d1 #e1 #Hid1 #d2 #e2 #X #HX #Hd21
-  lapply (transitive_le … Hd21 Hid1) -Hd21 #Hid2
-  lapply (lift_inv_lref1_ge … HX ?) -HX /2 width=3/ #HX destruct
-  >plus_plus_comm_23 /4 width=3/
-| #p #d1 #e1 #d2 #e2 #X #HX #_
-  >(lift_inv_gref1 … HX) -HX /2 width=3/
-| #a #I #V1 #V2 #T1 #T2 #d1 #e1 #_ #_ #IHV12 #IHT12 #d2 #e2 #X #HX #Hd21
-  elim (lift_inv_bind1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct
-  elim (IHV12 … HV20 ?) -IHV12 -HV20 //
-  elim (IHT12 … HT20 ?) -IHT12 -HT20 /2 width=1/ /3 width=5/
-| #I #V1 #V2 #T1 #T2 #d1 #e1 #_ #_ #IHV12 #IHT12 #d2 #e2 #X #HX #Hd21
-  elim (lift_inv_flat1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct
-  elim (IHV12 … HV20 ?) -IHV12 -HV20 //
-  elim (IHT12 … HT20 ?) -IHT12 -HT20 // /3 width=5/
-]
-qed.
-
-(* Basic_1: was: lift_d (left to right) *)
-theorem lift_trans_ge: ∀d1,e1,T1,T. ⇧[d1, e1] T1 ≡ T →
-                       ∀d2,e2,T2. ⇧[d2, e2] T ≡ T2 → d1 + e1 ≤ d2 →
-                       ∃∃T0. ⇧[d2 - e1, e2] T1 ≡ T0 & ⇧[d1, e1] T0 ≡ T2.
-#d1 #e1 #T1 #T #H elim H -d1 -e1 -T1 -T
-[ #k #d1 #e1 #d2 #e2 #X #HX #_
-  >(lift_inv_sort1 … HX) -HX /2 width=3/
-| #i #d1 #e1 #Hid1 #d2 #e2 #X #HX #Hded
-  lapply (lt_to_le_to_lt … (d1+e1) Hid1 ?) // #Hid1e
-  lapply (lt_to_le_to_lt … (d2-e1) Hid1 ?) /2 width=1/ #Hid2e
-  lapply (lt_to_le_to_lt … Hid1e Hded) -Hid1e -Hded #Hid2
-  lapply (lift_inv_lref1_lt … HX ?) -HX // #HX destruct /3 width=3/
-| #i #d1 #e1 #Hid1 #d2 #e2 #X #HX #_
-  elim (lift_inv_lref1 … HX) -HX * #Hied #HX destruct /4 width=3/
-| #p #d1 #e1 #d2 #e2 #X #HX #_
-  >(lift_inv_gref1 … HX) -HX /2 width=3/
-| #a #I #V1 #V2 #T1 #T2 #d1 #e1 #_ #_ #IHV12 #IHT12 #d2 #e2 #X #HX #Hded
-  elim (lift_inv_bind1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct
-  elim (IHV12 … HV20 ?) -IHV12 -HV20 //
-  elim (IHT12 … HT20 ?) -IHT12 -HT20 /2 width=1/ #T
-  <plus_minus /2 width=2/ /3 width=5/
-| #I #V1 #V2 #T1 #T2 #d1 #e1 #_ #_ #IHV12 #IHT12 #d2 #e2 #X #HX #Hded
-  elim (lift_inv_flat1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct
-  elim (IHV12 … HV20 ?) -IHV12 -HV20 //
-  elim (IHT12 … HT20 ?) -IHT12 -HT20 // /3 width=5/
-]
-qed.
-
-(* Advanced properties ******************************************************)
-
-lemma lift_conf_O1: ∀T,T1,d1,e1. ⇧[d1, e1] T ≡ T1 → ∀T2,e2. ⇧[0, e2] T ≡ T2 →
-                    ∃∃T0. ⇧[0, e2] T1 ≡ T0 & ⇧[d1 + e2, e1] T2 ≡ T0.
-#T #T1 #d1 #e1 #HT1 #T2 #e2 #HT2
-elim (lift_total T1 0 e2) #T0 #HT10
-elim (lift_trans_le … HT1 … HT10 ?) -HT1 // #X #HTX #HT20
-lapply (lift_mono … HTX … HT2) -T #H destruct /2 width=3/
-qed.
-
-lemma lift_conf_be: ∀T,T1,d,e1. ⇧[d, e1] T ≡ T1 → ∀T2,e2. ⇧[d, e2] T ≡ T2 →
-                    e1 ≤ e2 → ⇧[d + e1, e2 - e1] T1 ≡ T2.
-#T #T1 #d #e1 #HT1 #T2 #e2 #HT2 #He12
-elim (lift_split … HT2 (d+e1) e1 ? ? ?) -HT2 // #X #H
->(lift_mono … H … HT1) -T //
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/substitution/lift_lift_vector.ma b/matita/matita/contribs/lambda_delta/basic_2/substitution/lift_lift_vector.ma
deleted file mode 100644 (file)
index cdc1112..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/lift_lift.ma".
-include "basic_2/substitution/lift_vector.ma".
-
-(* BASIC TERM VECTOR RELOCATION *********************************************)
-
-(* Main properies ***********************************************************)
-
-theorem liftv_mono: ∀Ts,U1s,d,e. ⇧[d,e] Ts ≡ U1s →
-                    ∀U2s:list term. ⇧[d,e] Ts ≡ U2s → U1s = U2s.
-#Ts #U1s #d #e #H elim H -Ts -U1s
-[ #U2s #H >(liftv_inv_nil1 … H) -H //
-| #Ts #U1s #T #U1 #HTU1 #_ #IHTU1s #X #H destruct
-  elim (liftv_inv_cons1 … H) -H #U2 #U2s #HTU2 #HTU2s #H destruct
-  >(lift_mono … HTU1 … HTU2) -T /3 width=1/
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/substitution/lift_vector.ma b/matita/matita/contribs/lambda_delta/basic_2/substitution/lift_vector.ma
deleted file mode 100644 (file)
index 35ecb65..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/term_vector.ma".
-include "basic_2/substitution/lift.ma".
-
-(* BASIC TERM VECTOR RELOCATION *********************************************)
-
-inductive liftv (d,e:nat) : relation (list term) ≝
-| liftv_nil : liftv d e ◊ ◊
-| liftv_cons: ∀T1s,T2s,T1,T2.
-              ⇧[d, e] T1 ≡ T2 → liftv d e T1s T2s →
-              liftv d e (T1 @ T1s) (T2 @ T2s)
-.
-
-interpretation "relocation (vector)" 'RLift d e T1s T2s = (liftv d e T1s T2s).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact liftv_inv_nil1_aux: ∀T1s,T2s,d,e. ⇧[d, e] T1s ≡ T2s → T1s = ◊ → T2s = ◊.
-#T1s #T2s #d #e * -T1s -T2s //
-#T1s #T2s #T1 #T2 #_ #_ #H destruct
-qed.
-
-lemma liftv_inv_nil1: ∀T2s,d,e. ⇧[d, e] ◊ ≡ T2s → T2s = ◊.
-/2 width=5/ qed-.
-
-fact liftv_inv_cons1_aux: ∀T1s,T2s,d,e. ⇧[d, e] T1s ≡ T2s →
-                          ∀U1,U1s. T1s = U1 @ U1s →
-                          ∃∃U2,U2s. ⇧[d, e] U1 ≡ U2 & ⇧[d, e] U1s ≡ U2s &
-                                    T2s = U2 @ U2s.
-#T1s #T2s #d #e * -T1s -T2s
-[ #U1 #U1s #H destruct
-| #T1s #T2s #T1 #T2 #HT12 #HT12s #U1 #U1s #H destruct /2 width=5/
-]
-qed.
-
-lemma liftv_inv_cons1: ∀U1,U1s,T2s,d,e. ⇧[d, e] U1 @ U1s ≡ T2s →
-                       ∃∃U2,U2s. ⇧[d, e] U1 ≡ U2 & ⇧[d, e] U1s ≡ U2s &
-                                 T2s = U2 @ U2s.
-/2 width=3/ qed-.
-
-(* Basic properties *********************************************************)
-
-lemma liftv_total: ∀d,e. ∀T1s:list term. ∃T2s. ⇧[d, e] T1s ≡ T2s.
-#d #e #T1s elim T1s -T1s
-[ /2 width=2/
-| #T1 #T1s * #T2s #HT12s
-  elim (lift_total T1 d e) /3 width=2/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/substitution/lsubs.ma b/matita/matita/contribs/lambda_delta/basic_2/substitution/lsubs.ma
deleted file mode 100644 (file)
index f27883b..0000000
+++ /dev/null
@@ -1,194 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/lenv_length.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR SUBSTITUTION ****************************)
-
-inductive lsubs: nat → nat → relation lenv ≝
-| lsubs_sort: ∀d,e. lsubs d e (⋆) (⋆)
-| lsubs_OO:   ∀L1,L2. lsubs 0 0 L1 L2
-| lsubs_abbr: ∀L1,L2,V,e. lsubs 0 e L1 L2 →
-              lsubs 0 (e + 1) (L1. ⓓV) (L2.ⓓV)
-| lsubs_abst: ∀L1,L2,I,V1,V2,e. lsubs 0 e L1 L2 →
-              lsubs 0 (e + 1) (L1. ⓑ{I}V1) (L2. ⓛV2)
-| lsubs_skip: ∀L1,L2,I1,I2,V1,V2,d,e.
-              lsubs d e L1 L2 → lsubs (d + 1) e (L1. ⓑ{I1} V1) (L2. ⓑ{I2} V2)
-.
-
-interpretation
-  "local environment refinement (substitution)"
-  'SubEq L1 d e L2 = (lsubs d e L1 L2).
-
-definition lsubs_trans: ∀S. (lenv → relation S) → Prop ≝ λS,R.
-                        ∀L2,s1,s2. R L2 s1 s2 →
-                        ∀L1,d,e. L1 ≼ [d, e] L2 → R L1 s1 s2.
-
-(* Basic properties *********************************************************)
-
-lemma lsubs_bind_eq: ∀L1,L2,e. L1 ≼ [0, e] L2 → ∀I,V.
-                     L1. ⓑ{I} V ≼ [0, e + 1] L2.ⓑ{I} V.
-#L1 #L2 #e #HL12 #I #V elim I -I /2 width=1/
-qed.
-
-lemma lsubs_abbr_lt: ∀L1,L2,V,e. L1 ≼ [0, e - 1] L2 → 0 < e → 
-                     L1. ⓓV ≼ [0, e] L2.ⓓV.
-#L1 #L2 #V #e #HL12 #He >(plus_minus_m_m e 1) // /2 width=1/
-qed.
-
-lemma lsubs_abst_lt: ∀L1,L2,I,V1,V2,e. L1 ≼ [0, e - 1] L2 → 0 < e →
-                     L1. ⓑ{I}V1 ≼ [0, e] L2. ⓛV2.
-#L1 #L2 #I #V1 #V2 #e #HL12 #He >(plus_minus_m_m e 1) // /2 width=1/
-qed.
-
-lemma lsubs_skip_lt: ∀L1,L2,d,e. L1 ≼ [d - 1, e] L2 → 0 < d →
-                     ∀I1,I2,V1,V2. L1. ⓑ{I1} V1 ≼ [d, e] L2. ⓑ{I2} V2.
-#L1 #L2 #d #e #HL12 #Hd >(plus_minus_m_m d 1) // /2 width=1/
-qed.
-
-lemma lsubs_bind_lt: ∀I,L1,L2,V,e. L1 ≼ [0, e - 1] L2 → 0 < e → 
-                     L1. ⓓV ≼ [0, e] L2. ⓑ{I}V.
-* /2 width=1/ qed.
-
-lemma lsubs_refl: ∀d,e,L. L ≼ [d, e] L.
-#d elim d -d
-[ #e elim e -e // #e #IHe #L elim L -L // /2 width=1/
-| #d #IHd #e #L elim L -L // /2 width=1/
-]
-qed.
-
-lemma TC_lsubs_trans: ∀S,R. lsubs_trans S R → lsubs_trans S (λL. (TC … (R L))).
-#S #R #HR #L1 #s1 #s2 #H elim H -s2
-[ /3 width=5/
-| #s #s2 #_ #Hs2 #IHs1 #L2 #d #e #HL12
-  lapply (HR … Hs2 … HL12) -HR -Hs2 -HL12 /3 width=3/
-]
-qed.
-
-(* Basic inversion lemmas ***************************************************) 
-
-fact lsubs_inv_atom1_aux: ∀L1,L2,d,e. L1 ≼ [d, e] L2 → L1 = ⋆ →
-                          L2 = ⋆ ∨ (d = 0 ∧ e = 0).
-#L1 #L2 #d #e * -L1 -L2 -d -e
-[ /2 width=1/
-| /3 width=1/
-| #L1 #L2 #W #e #_ #H destruct
-| #L1 #L2 #I #W1 #W2 #e #_ #H destruct
-| #L1 #L2 #I1 #I2 #W1 #W2 #d #e #_ #H destruct
-]
-qed.
-
-lemma lsubs_inv_atom1: ∀L2,d,e. ⋆ ≼ [d, e] L2 →
-                       L2 = ⋆ ∨ (d = 0 ∧ e = 0).
-/2 width=3/ qed-.
-
-fact lsubs_inv_skip1_aux: ∀L1,L2,d,e. L1 ≼ [d, e] L2 →
-                          ∀I1,K1,V1. L1 = K1.ⓑ{I1}V1 → 0 < d →
-                          ∃∃I2,K2,V2. K1 ≼ [d - 1, e] K2 & L2 = K2.ⓑ{I2}V2.
-#L1 #L2 #d #e * -L1 -L2 -d -e
-[ #d #e #I1 #K1 #V1 #H destruct
-| #L1 #L2 #I1 #K1 #V1 #_ #H
-  elim (lt_zero_false … H)
-| #L1 #L2 #W #e #_ #I1 #K1 #V1 #_ #H
-  elim (lt_zero_false … H)
-| #L1 #L2 #I #W1 #W2 #e #_ #I1 #K1 #V1 #_ #H
-  elim (lt_zero_false … H)
-| #L1 #L2 #J1 #J2 #W1 #W2 #d #e #HL12 #I1 #K1 #V1 #H #_ destruct /2 width=5/
-]
-qed.
-
-lemma lsubs_inv_skip1: ∀I1,K1,L2,V1,d,e. K1.ⓑ{I1}V1 ≼ [d, e] L2 → 0 < d →
-                       ∃∃I2,K2,V2. K1 ≼ [d - 1, e] K2 & L2 = K2.ⓑ{I2}V2.
-/2 width=5/ qed-.
-
-fact lsubs_inv_atom2_aux: ∀L1,L2,d,e. L1 ≼ [d, e] L2 → L2 = ⋆ →
-                          L1 = ⋆ ∨ (d = 0 ∧ e = 0).
-#L1 #L2 #d #e * -L1 -L2 -d -e
-[ /2 width=1/
-| /3 width=1/
-| #L1 #L2 #W #e #_ #H destruct
-| #L1 #L2 #I #W1 #W2 #e #_ #H destruct
-| #L1 #L2 #I1 #I2 #W1 #W2 #d #e #_ #H destruct
-]
-qed.
-
-lemma lsubs_inv_atom2: ∀L1,d,e. L1 ≼ [d, e] ⋆ →
-                       L1 = ⋆ ∨ (d = 0 ∧ e = 0).
-/2 width=3/ qed-.
-
-fact lsubs_inv_abbr2_aux: ∀L1,L2,d,e. L1 ≼ [d, e] L2 →
-                          ∀K2,V. L2 = K2.ⓓV → d = 0 → 0 < e →
-                          ∃∃K1. K1 ≼ [0, e - 1] K2 & L1 = K1.ⓓV.
-#L1 #L2 #d #e * -L1 -L2 -d -e
-[ #d #e #K1 #V #H destruct
-| #L1 #L2 #K1 #V #_ #_ #H
-  elim (lt_zero_false … H)
-| #L1 #L2 #W #e #HL12 #K1 #V #H #_ #_ destruct /2 width=3/
-| #L1 #L2 #I #W1 #W2 #e #_ #K1 #V #H destruct
-| #L1 #L2 #I1 #I2 #W1 #W2 #d #e #_ #K1 #V #_ >commutative_plus normalize #H destruct
-]
-qed.
-
-lemma lsubs_inv_abbr2: ∀L1,K2,V,e. L1 ≼ [0, e] K2.ⓓV → 0 < e →
-                       ∃∃K1. K1 ≼ [0, e - 1] K2 & L1 = K1.ⓓV.
-/2 width=5/ qed-.
-
-fact lsubs_inv_skip2_aux: ∀L1,L2,d,e. L1 ≼ [d, e] L2 →
-                          ∀I2,K2,V2. L2 = K2.ⓑ{I2}V2 → 0 < d →
-                          ∃∃I1,K1,V1. K1 ≼ [d - 1, e] K2 & L1 = K1.ⓑ{I1}V1.
-#L1 #L2 #d #e * -L1 -L2 -d -e
-[ #d #e #I1 #K1 #V1 #H destruct
-| #L1 #L2 #I1 #K1 #V1 #_ #H
-  elim (lt_zero_false … H)
-| #L1 #L2 #W #e #_ #I1 #K1 #V1 #_ #H
-  elim (lt_zero_false … H)
-| #L1 #L2 #I #W1 #W2 #e #_ #I1 #K1 #V1 #_ #H
-  elim (lt_zero_false … H)
-| #L1 #L2 #J1 #J2 #W1 #W2 #d #e #HL12 #I1 #K1 #V1 #H #_ destruct /2 width=5/
-]
-qed.
-
-lemma lsubs_inv_skip2: ∀I2,L1,K2,V2,d,e. L1 ≼ [d, e] K2.ⓑ{I2}V2 → 0 < d →
-                       ∃∃I1,K1,V1. K1 ≼ [d - 1, e] K2 & L1 = K1.ⓑ{I1}V1.
-/2 width=5/ qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-fact lsubs_fwd_length_full1_aux: ∀L1,L2,d,e. L1 ≼ [d, e] L2 →
-                                 d = 0 → e = |L1| → |L1| ≤ |L2|.
-#L1 #L2 #d #e #H elim H -L1 -L2 -d -e normalize
-[ //
-| /2 width=1/
-| /3 width=1/
-| /3 width=1/
-| #L1 #L2 #_ #_ #_ #_ #d #e #_ #_ >commutative_plus normalize #H destruct
-]
-qed.
-
-lemma lsubs_fwd_length_full1: ∀L1,L2. L1 ≼ [0, |L1|] L2 → |L1| ≤ |L2|.
-/2 width=5/ qed-.
-
-fact lsubs_fwd_length_full2_aux: ∀L1,L2,d,e. L1 ≼ [d, e] L2 →
-                                 d = 0 → e = |L2| → |L2| ≤ |L1|.
-#L1 #L2 #d #e #H elim H -L1 -L2 -d -e normalize
-[ //
-| /2 width=1/
-| /3 width=1/
-| /3 width=1/
-| #L1 #L2 #_ #_ #_ #_ #d #e #_ #_ >commutative_plus normalize #H destruct
-]
-qed.
-
-lemma lsubs_fwd_length_full2: ∀L1,L2. L1 ≼ [0, |L2|] L2 → |L2| ≤ |L1|.
-/2 width=5/ qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/substitution/lsubs_sfr.ma b/matita/matita/contribs/lambda_delta/basic_2/substitution/lsubs_sfr.ma
deleted file mode 100644 (file)
index b71f25e..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/lsubs.ma".
-
-(* LOCAL ENVIRONMENT REFINEMENT FOR SUBSTITUTION ****************************)
-
-(* bottom element of the refinement *)
-definition sfr: nat → nat → predicate lenv ≝
-   λd,e. NF_sn … (lsubs d e) (lsubs d e …).
-
-interpretation
-   "local environment full refinement (substitution)"
-   'SubEqBottom d e L = (sfr d e L).
-
-(* Basic properties *********************************************************)
-
-lemma sfr_atom: ∀d,e. ≽ [d, e] ⋆.
-#d #e #L #H
-elim (lsubs_inv_atom2 … H) -H
-[ #H destruct //
-| * #H1 #H2 destruct //
-]
-qed.
-
-lemma sfr_OO: ∀L. ≽ [0, 0] L.
-// qed.
-
-lemma sfr_abbr: ∀L,V,e. ≽ [0, e] L → ≽ [0, e + 1] L.ⓓV.
-#L #V #e #HL #K #H
-elim (lsubs_inv_abbr2 … H ?) -H // <minus_plus_m_m #X #HLX #H destruct
-lapply (HL … HLX) -HL -HLX /2 width=1/
-qed.
-
-lemma sfr_abbr_O: ∀L,V. ≽[0,1] L.ⓓV.
-#L #V
-@(sfr_abbr … 0) //
-qed.
-
-lemma sfr_skip: ∀I,L,V,d,e. ≽ [d, e] L → ≽ [d + 1, e] L.ⓑ{I}V.
-#I #L #V #d #e #HL #K #H
-elim (lsubs_inv_skip2 … H ?) -H // <minus_plus_m_m #J #X #W #HLX #H destruct
-lapply (HL … HLX) -HL -HLX /2 width=1/
-qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma sfr_inv_bind: ∀I,L,V,e. ≽ [0, e] L.ⓑ{I}V → 0 < e →
-                    ≽ [0, e - 1] L ∧ I = Abbr.
-#I #L #V #e #HL #He
-lapply (HL (L.ⓓV) ?) /2 width=1/ #H
-elim (lsubs_inv_abbr2 … H ?) -H // #K #_ #H destruct
-@conj // #L #HKL
-lapply (HL (L.ⓓV) ?) -HL /2 width=1/ -HKL #H
-elim (lsubs_inv_abbr2 … H ?) -H // -He #X #HLX #H destruct //
-qed-.
-
-lemma sfr_inv_skip: ∀I,L,V,d,e. ≽ [d, e] L.ⓑ{I}V → 0 < d → ≽ [d - 1, e] L.
-#I #L #V #d #e #HL #Hd #K #HLK
-lapply (HL (K.ⓑ{I}V) ?) -HL /2 width=1/ -HLK #H
-elim (lsubs_inv_skip2 … H ?) -H // -Hd #J #X #W #HKX #H destruct //
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/substitution/tps.ma b/matita/matita/contribs/lambda_delta/basic_2/substitution/tps.ma
deleted file mode 100644 (file)
index ab11536..0000000
+++ /dev/null
@@ -1,285 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/ldrop_append.ma".
-
-(* PARALLEL SUBSTITUTION ON TERMS *******************************************)
-
-inductive tps: nat → nat → lenv → relation term ≝
-| tps_atom : ∀L,I,d,e. tps d e L (⓪{I}) (⓪{I})
-| tps_subst: ∀L,K,V,W,i,d,e. d ≤ i → i < d + e →
-             ⇩[0, i] L ≡ K. ⓓV → ⇧[0, i + 1] V ≡ W → tps d e L (#i) W
-| tps_bind : ∀L,a,I,V1,V2,T1,T2,d,e.
-             tps d e L V1 V2 → tps (d + 1) e (L. ⓑ{I} V2) T1 T2 →
-             tps d e L (ⓑ{a,I} V1. T1) (ⓑ{a,I} V2. T2)
-| tps_flat : ∀L,I,V1,V2,T1,T2,d,e.
-             tps d e L V1 V2 → tps d e L T1 T2 →
-             tps d e L (ⓕ{I} V1. T1) (ⓕ{I} V2. T2)
-.
-
-interpretation "parallel substritution (term)"
-   'PSubst L T1 d e T2 = (tps d e L T1 T2).
-
-(* Basic properties *********************************************************)
-
-lemma tps_lsubs_trans: ∀L1,T1,T2,d,e. L1 ⊢ T1 ▶ [d, e] T2 →
-                       ∀L2. L2 ≼ [d, e] L1 → L2 ⊢ T1 ▶ [d, e] T2.
-#L1 #T1 #T2 #d #e #H elim H -L1 -T1 -T2 -d -e
-[ //
-| #L1 #K1 #V #W #i #d #e #Hdi #Hide #HLK1 #HVW #L2 #HL12
-  elim (ldrop_lsubs_ldrop2_abbr … HL12 … HLK1 ? ?) -HL12 -HLK1 // /2 width=4/
-| /4 width=1/
-| /3 width=1/
-]
-qed.
-
-lemma tps_refl: ∀T,L,d,e. L ⊢ T ▶ [d, e] T.
-#T elim T -T //
-#I elim I -I /2 width=1/
-qed.
-
-(* Basic_1: was: subst1_ex *)
-lemma tps_full: ∀K,V,T1,L,d. ⇩[0, d] L ≡ (K. ⓓV) →
-                ∃∃T2,T. L ⊢ T1 ▶ [d, 1] 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=4/
-| * [ #a ] #I #W1 #U1 #IHW1 #IHU1 #L #d #HLK
-  elim (IHW1 … HLK) -IHW1 #W2 #W #HW12 #HW2
-  [ elim (IHU1 (L. ⓑ{I} W2) (d+1) ?) -IHU1 /2 width=1/ -HLK /3 width=9/
-  | elim (IHU1 … HLK) -IHU1 -HLK /3 width=8/
-  ]
-]
-qed.
-
-lemma tps_weak: ∀L,T1,T2,d1,e1. L ⊢ T1 ▶ [d1, e1] T2 →
-                ∀d2,e2. d2 ≤ d1 → d1 + e1 ≤ d2 + e2 →
-                L ⊢ T1 ▶ [d2, e2] T2.
-#L #T1 #T2 #d1 #e1 #H elim H -L -T1 -T2 -d1 -e1
-[ //
-| #L #K #V #W #i #d1 #e1 #Hid1 #Hide1 #HLK #HVW #d2 #e2 #Hd12 #Hde12
-  lapply (transitive_le … Hd12 … Hid1) -Hd12 -Hid1 #Hid2
-  lapply (lt_to_le_to_lt … Hide1 … Hde12) -Hide1 /2 width=4/
-| /4 width=3/
-| /4 width=1/
-]
-qed.
-
-lemma tps_weak_top: ∀L,T1,T2,d,e.
-                    L ⊢ T1 ▶ [d, e] T2 → L ⊢ T1 ▶ [d, |L| - d] T2.
-#L #T1 #T2 #d #e #H elim H -L -T1 -T2 -d -e
-[ //
-| #L #K #V #W #i #d #e #Hdi #_ #HLK #HVW
-  lapply (ldrop_fwd_ldrop2_length … HLK) #Hi
-  lapply (le_to_lt_to_lt … Hdi Hi) /3 width=4/
-| normalize /2 width=1/
-| /2 width=1/
-]
-qed.
-
-lemma tps_weak_all: ∀L,T1,T2,d,e.
-                    L ⊢ T1 ▶ [d, e] T2 → L ⊢ T1 ▶ [0, |L|] T2.
-#L #T1 #T2 #d #e #HT12
-lapply (tps_weak … HT12 0 (d + e) ? ?) -HT12 // #HT12
-lapply (tps_weak_top … HT12) //
-qed.
-
-lemma tps_split_up: ∀L,T1,T2,d,e. L ⊢ T1 ▶ [d, e] T2 → ∀i. d ≤ i → i ≤ d + e →
-                    ∃∃T. L ⊢ T1 ▶ [d, i - d] T & L ⊢ T ▶ [i, d + e - i] T2.
-#L #T1 #T2 #d #e #H elim H -L -T1 -T2 -d -e
-[ /2 width=3/
-| #L #K #V #W #i #d #e #Hdi #Hide #HLK #HVW #j #Hdj #Hjde
-  elim (lt_or_ge i j)
-  [ -Hide -Hjde
-    >(plus_minus_m_m j d) in ⊢ (% → ?); // -Hdj /3 width=4/
-  | -Hdi -Hdj #Hid
-    generalize in match Hide; -Hide (**) (* rewriting in the premises, rewrites in the goal too *)
-    >(plus_minus_m_m … Hjde) in ⊢ (% → ?); -Hjde /4 width=4/
-  ]
-| #L #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #i #Hdi #Hide
-  elim (IHV12 i ? ?) -IHV12 // #V #HV1 #HV2
-  elim (IHT12 (i + 1) ? ?) -IHT12 /2 width=1/
-  -Hdi -Hide >arith_c1x #T #HT1 #HT2
-  lapply (tps_lsubs_trans … HT1 (L. ⓑ{I} V) ?) -HT1 /3 width=5/
-| #L #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #i #Hdi #Hide
-  elim (IHV12 i ? ?) -IHV12 // elim (IHT12 i ? ?) -IHT12 //
-  -Hdi -Hide /3 width=5/
-]
-qed.
-
-lemma tps_split_down: ∀L,T1,T2,d,e. L ⊢ T1 ▶ [d, e] T2 →
-                      ∀i. d ≤ i → i ≤ d + e →
-                      ∃∃T. L ⊢ T1 ▶ [i, d + e - i] T &
-                           L ⊢ T ▶ [d, i - d] T2.
-#L #T1 #T2 #d #e #H elim H -L -T1 -T2 -d -e
-[ /2 width=3/
-| #L #K #V #W #i #d #e #Hdi #Hide #HLK #HVW #j #Hdj #Hjde
-  elim (lt_or_ge i j)
-  [ -Hide -Hjde >(plus_minus_m_m j d) in ⊢ (% → ?); // -Hdj /4 width=4/
-  | -Hdi -Hdj
-    >(plus_minus_m_m (d+e) j) in Hide; // -Hjde /3 width=4/
-  ]
-| #L #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #i #Hdi #Hide
-  elim (IHV12 i ? ?) -IHV12 // #V #HV1 #HV2
-  elim (IHT12 (i + 1) ? ?) -IHT12 /2 width=1/
-  -Hdi -Hide >arith_c1x #T #HT1 #HT2
-  lapply (tps_lsubs_trans … HT1 (L. ⓑ{I} V) ?) -HT1 /3 width=5/
-| #L #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #i #Hdi #Hide
-  elim (IHV12 i ? ?) -IHV12 // elim (IHT12 i ? ?) -IHT12 //
-  -Hdi -Hide /3 width=5/
-]
-qed.
-
-lemma tps_append: ∀K,T1,T2,d,e. K ⊢ T1 ▶ [d, e] T2 →
-                  ∀L. L @@ K ⊢ T1 ▶ [d, e] T2.
-#K #T1 #T2 #d #e #H elim H -K -T1 -T2 -d -e // /2 width=1/
-#K #K0 #V #W #i #d #e #Hdi #Hide #HK0 #HVW #L
-lapply (ldrop_fwd_ldrop2_length … HK0) #H
-@(tps_subst … (L@@K0) … HVW) // (**) (* /3/ does not work *)
-@(ldrop_O1_append_sn_le … HK0) /2 width=2/
-qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-fact tps_inv_atom1_aux: ∀L,T1,T2,d,e. L ⊢ T1 ▶ [d, e] T2 → ∀I. T1 = ⓪{I} →
-                        T2 = ⓪{I} ∨
-                        ∃∃K,V,i. d ≤ i & i < d + e &
-                                 ⇩[O, i] L ≡ K. ⓓV &
-                                 ⇧[O, i + 1] V ≡ T2 &
-                                 I = LRef i.
-#L #T1 #T2 #d #e * -L -T1 -T2 -d -e
-[ #L #I #d #e #J #H destruct /2 width=1/
-| #L #K #V #T2 #i #d #e #Hdi #Hide #HLK #HVT2 #I #H destruct /3 width=8/
-| #L #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #J #H destruct
-| #L #I #V1 #V2 #T1 #T2 #d #e #_ #_ #J #H destruct
-]
-qed.
-
-lemma tps_inv_atom1: ∀L,T2,I,d,e. L ⊢ ⓪{I} ▶ [d, e] T2 →
-                     T2 = ⓪{I} ∨
-                     ∃∃K,V,i. d ≤ i & i < d + e &
-                              ⇩[O, i] L ≡ K. ⓓV &
-                              ⇧[O, i + 1] V ≡ T2 &
-                              I = LRef i.
-/2 width=3/ qed-.
-
-
-(* Basic_1: was: subst1_gen_sort *)
-lemma tps_inv_sort1: ∀L,T2,k,d,e. L ⊢ ⋆k ▶ [d, e] T2 → T2 = ⋆k.
-#L #T2 #k #d #e #H
-elim (tps_inv_atom1 … H) -H //
-* #K #V #i #_ #_ #_ #_ #H destruct
-qed-.
-
-(* Basic_1: was: subst1_gen_lref *)
-lemma tps_inv_lref1: ∀L,T2,i,d,e. L ⊢ #i ▶ [d, e] T2 →
-                     T2 = #i ∨
-                     ∃∃K,V. d ≤ i & i < d + e &
-                            ⇩[O, i] L ≡ K. ⓓV &
-                            ⇧[O, i + 1] V ≡ T2.
-#L #T2 #i #d #e #H
-elim (tps_inv_atom1 … H) -H /2 width=1/
-* #K #V #j #Hdj #Hjde #HLK #HVT2 #H destruct /3 width=4/
-qed-.
-
-lemma tps_inv_gref1: ∀L,T2,p,d,e. L ⊢ §p ▶ [d, e] T2 → T2 = §p.
-#L #T2 #p #d #e #H
-elim (tps_inv_atom1 … H) -H //
-* #K #V #i #_ #_ #_ #_ #H destruct
-qed-.
-
-fact tps_inv_bind1_aux: ∀d,e,L,U1,U2. L ⊢ U1 ▶ [d, e] U2 →
-                        ∀a,I,V1,T1. U1 = ⓑ{a,I} V1. T1 →
-                        ∃∃V2,T2. L ⊢ V1 ▶ [d, e] V2 & 
-                                 L. ⓑ{I} V2 ⊢ T1 ▶ [d + 1, e] T2 &
-                                 U2 = ⓑ{a,I} V2. T2.
-#d #e #L #U1 #U2 * -d -e -L -U1 -U2
-[ #L #k #d #e #a #I #V1 #T1 #H destruct
-| #L #K #V #W #i #d #e #_ #_ #_ #_ #a #I #V1 #T1 #H destruct
-| #L #b #J #V1 #V2 #T1 #T2 #d #e #HV12 #HT12 #a #I #V #T #H destruct /2 width=5/
-| #L #J #V1 #V2 #T1 #T2 #d #e #_ #_ #a #I #V #T #H destruct
-]
-qed.
-
-lemma tps_inv_bind1: ∀d,e,L,a,I,V1,T1,U2. L ⊢ ⓑ{a,I} V1. T1 ▶ [d, e] U2 →
-                     ∃∃V2,T2. L ⊢ V1 ▶ [d, e] V2 & 
-                              L. ⓑ{I} V2 ⊢ T1 ▶ [d + 1, e] T2 &
-                              U2 = ⓑ{a,I} V2. T2.
-/2 width=3/ qed-.
-
-fact tps_inv_flat1_aux: ∀d,e,L,U1,U2. L ⊢ U1 ▶ [d, e] U2 →
-                        ∀I,V1,T1. U1 = ⓕ{I} V1. T1 →
-                        ∃∃V2,T2. L ⊢ V1 ▶ [d, e] V2 & L ⊢ T1 ▶ [d, e] T2 &
-                                 U2 =  ⓕ{I} V2. T2.
-#d #e #L #U1 #U2 * -d -e -L -U1 -U2
-[ #L #k #d #e #I #V1 #T1 #H destruct
-| #L #K #V #W #i #d #e #_ #_ #_ #_ #I #V1 #T1 #H destruct
-| #L #a #J #V1 #V2 #T1 #T2 #d #e #_ #_ #I #V #T #H destruct
-| #L #J #V1 #V2 #T1 #T2 #d #e #HV12 #HT12 #I #V #T #H destruct /2 width=5/
-]
-qed.
-
-lemma tps_inv_flat1: ∀d,e,L,I,V1,T1,U2. L ⊢ ⓕ{I} V1. T1 ▶ [d, e] U2 →
-                     ∃∃V2,T2. L ⊢ V1 ▶ [d, e] V2 & L ⊢ T1 ▶ [d, e] T2 &
-                              U2 =  ⓕ{I} V2. T2.
-/2 width=3/ qed-.
-
-fact tps_inv_refl_O2_aux: ∀L,T1,T2,d,e. L ⊢ T1 ▶ [d, e] T2 → e = 0 → T1 = T2.
-#L #T1 #T2 #d #e #H elim H -L -T1 -T2 -d -e
-[ //
-| #L #K #V #W #i #d #e #Hdi #Hide #_ #_ #H destruct
-  lapply (le_to_lt_to_lt … Hdi … Hide) -Hdi -Hide <plus_n_O #Hdd
-  elim (lt_refl_false … Hdd)
-| /3 width=1/
-| /3 width=1/
-]
-qed.
-
-lemma tps_inv_refl_O2: ∀L,T1,T2,d. L ⊢ T1 ▶ [d, 0] T2 → T1 = T2.
-/2 width=6/ qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma tps_fwd_tw: ∀L,T1,T2,d,e. L ⊢ T1 ▶ [d, e] T2 → #{T1} ≤ #{T2}.
-#L #T1 #T2 #d #e #H elim H -L -T1 -T2 -d -e normalize
-/3 by monotonic_le_plus_l, le_plus/ (**) (* just /3 width=1/ is too slow *)
-qed-.
-
-lemma tps_fwd_shift1: ∀L1,L,T1,T,d,e. L ⊢ L1 @@ T1 ▶[d, e] T →
-                      ∃∃L2,T2. |L1| = |L2| & T = L2 @@ T2.
-#L1 @(lenv_ind_dx … L1) -L1 normalize
-[ #L #T1 #T #d #e #HT1
-  @(ex2_2_intro … (⋆)) // (**) (* explicit constructor *)
-| #I #L1 #V1 #IH #L #T1 #X #d #e
-  >shift_append_assoc normalize #H
-  elim (tps_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 25:
-            subst0_gen_sort subst0_gen_lref subst0_gen_head subst0_gen_lift_lt
-            subst0_gen_lift_false subst0_gen_lift_ge subst0_refl subst0_trans
-            subst0_lift_lt subst0_lift_ge subst0_lift_ge_S subst0_lift_ge_s
-            subst0_subst0 subst0_subst0_back subst0_weight_le subst0_weight_lt
-            subst0_confluence_neq subst0_confluence_eq subst0_tlt_head
-            subst0_confluence_lift subst0_tlt
-            subst1_head subst1_gen_head subst1_lift_S subst1_confluence_lift 
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/substitution/tps_lift.ma b/matita/matita/contribs/lambda_delta/basic_2/substitution/tps_lift.ma
deleted file mode 100644 (file)
index 5ffc949..0000000
+++ /dev/null
@@ -1,294 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/ldrop_ldrop.ma".
-include "basic_2/substitution/tps.ma".
-
-(* PARTIAL SUBSTITUTION ON TERMS ********************************************)
-
-(* Advanced inversion lemmas ************************************************)
-
-fact tps_inv_S2_aux: ∀L,T1,T2,d,e1. L ⊢ T1 ▶ [d, e1] T2 → ∀e2. e1 = e2 + 1 → 
-                     ∀K,V. ⇩[0, d] L ≡ K. ⓛV → L ⊢ T1 ▶ [d + 1, e2] T2.
-#L #T1 #T2 #d #e1 #H elim H -L -T1 -T2 -d -e1
-[ //
-| #L #K0 #V0 #W #i #d #e1 #Hdi #Hide1 #HLK0 #HV0 #e2 #He12 #K #V #HLK destruct
-  elim (lt_or_ge i (d+1)) #HiSd
-  [ -Hide1 -HV0
-    lapply (le_to_le_to_eq … Hdi ?) /2 width=1/ #H destruct
-    lapply (ldrop_mono … HLK0 … HLK) #H destruct
-  | -V -Hdi /2 width=4/
-  ]
-| /4 width=3/
-| /3 width=3/
-]
-qed.
-
-lemma tps_inv_S2: ∀L,T1,T2,d,e. L ⊢ T1 ▶ [d, e + 1] T2 →
-                  ∀K,V. ⇩[0, d] L ≡ K. ⓛV → L ⊢ T1 ▶ [d + 1, e] T2.
-/2 width=3/ qed-.
-
-lemma tps_inv_refl_SO2: ∀L,T1,T2,d. L ⊢ T1 ▶ [d, 1] T2 →
-                        ∀K,V. ⇩[0, d] L ≡ K. ⓛV → T1 = T2.
-#L #T1 #T2 #d #HT12 #K #V #HLK
-lapply (tps_inv_S2 … T1 T2 … 0 … HLK) -K // -HT12 #HT12
-lapply (tps_inv_refl_O2 … HT12) -HT12 //
-qed-.
-
-(* Relocation properties ****************************************************)
-
-(* Basic_1: was: subst1_lift_lt *)
-lemma tps_lift_le: ∀K,T1,T2,dt,et. K ⊢ T1 ▶ [dt, et] T2 →
-                   ∀L,U1,U2,d,e. ⇩[d, e] L ≡ K →
-                   ⇧[d, e] T1 ≡ U1 → ⇧[d, e] T2 ≡ U2 →
-                   dt + et ≤ d →
-                   L ⊢ U1 ▶ [dt, et] U2.
-#K #T1 #T2 #dt #et #H elim H -K -T1 -T2 -dt -et
-[ #K #I #dt #et #L #U1 #U2 #d #e #_ #H1 #H2 #_
-  >(lift_mono … H1 … H2) -H1 -H2 //
-| #K #KV #V #W #i #dt #et #Hdti #Hidet #HKV #HVW #L #U1 #U2 #d #e #HLK #H #HWU2 #Hdetd
-  lapply (lt_to_le_to_lt … Hidet … Hdetd) -Hdetd #Hid
-  lapply (lift_inv_lref1_lt … H … Hid) -H #H destruct
-  elim (lift_trans_ge … HVW … HWU2 ?) -W // <minus_plus #W #HVW #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 #_ #HVY
-  >(lift_mono … HVY … HVW) -Y -HVW #H destruct /2 width=4/
-| #K #a #I #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #d #e #HLK #H1 #H2 #Hdetd
-  elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
-  elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct
-  @tps_bind [ /2 width=6/ | @IHT12 /2 width=6/ ] (**) (* /3 width=6/ is too slow, arith3 needed to avoid crash *)
-| #K #I #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #d #e #HLK #H1 #H2 #Hdetd
-  elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
-  elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct /3 width=6/
-]
-qed.
-
-lemma tps_lift_be: ∀K,T1,T2,dt,et. K ⊢ T1 ▶ [dt, et] T2 →
-                   ∀L,U1,U2,d,e. ⇩[d, e] L ≡ K →
-                   ⇧[d, e] T1 ≡ U1 → ⇧[d, e] T2 ≡ U2 →
-                   dt ≤ d → d ≤ dt + et →
-                   L ⊢ U1 ▶ [dt, et + e] U2.
-#K #T1 #T2 #dt #et #H elim H -K -T1 -T2 -dt -et
-[ #K #I #dt #et #L #U1 #U2 #d #e #_ #H1 #H2 #_ #_
-  >(lift_mono … H1 … H2) -H1 -H2 //
-| #K #KV #V #W #i #dt #et #Hdti #Hidet #HKV #HVW #L #U1 #U2 #d #e #HLK #H #HWU2 #Hdtd #_
-  elim (lift_inv_lref1 … H) -H * #Hid #H destruct
-  [ -Hdtd
-    lapply (lt_to_le_to_lt … (dt+et+e) Hidet ?) // -Hidet #Hidete
-    elim (lift_trans_ge … HVW … HWU2 ?) -W // <minus_plus #W #HVW #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 #_ #HVY
-    >(lift_mono … HVY … HVW) -V #H destruct /2 width=4/
-  | -Hdti
-    lapply (transitive_le … Hdtd Hid) -Hdtd #Hdti
-    lapply (lift_trans_be … HVW … HWU2 ? ?) -W // /2 width=1/ >plus_plus_comm_23 #HVU2
-    lapply (ldrop_trans_ge_comm … HLK … HKV ?) -K // -Hid /3 width=4/
-  ]
-| #K #a #I #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #d #e #HLK #H1 #H2 #Hdtd #Hddet
-  elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
-  elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct
-  @tps_bind [ /2 width=6/ | @IHT12 [3,4: // | skip |5,6: /2 width=1/ | /2 width=1/ ] 
-            ] (**) (* /3 width=6/ is too slow, simplification like tps_lift_le is too slow *)
-| #K #I #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #d #e #HLK #H1 #H2 #Hdetd
-  elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
-  elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct /3 width=6/
-]
-qed.
-
-(* Basic_1: was: subst1_lift_ge *)
-lemma tps_lift_ge: ∀K,T1,T2,dt,et. K ⊢ T1 ▶ [dt, et] T2 →
-                   ∀L,U1,U2,d,e. ⇩[d, e] L ≡ K →
-                   ⇧[d, e] T1 ≡ U1 → ⇧[d, e] T2 ≡ U2 →
-                   d ≤ dt →
-                   L ⊢ U1 ▶ [dt + e, et] U2.
-#K #T1 #T2 #dt #et #H elim H -K -T1 -T2 -dt -et
-[ #K #I #dt #et #L #U1 #U2 #d #e #_ #H1 #H2 #_
-  >(lift_mono … H1 … H2) -H1 -H2 //
-| #K #KV #V #W #i #dt #et #Hdti #Hidet #HKV #HVW #L #U1 #U2 #d #e #HLK #H #HWU2 #Hddt
-  lapply (transitive_le … Hddt … Hdti) -Hddt #Hid
-  lapply (lift_inv_lref1_ge … H … Hid) -H #H destruct
-  lapply (lift_trans_be … HVW … HWU2 ? ?) -W // /2 width=1/ >plus_plus_comm_23 #HVU2
-  lapply (ldrop_trans_ge_comm … HLK … HKV ?) -K // -Hid /3 width=4/
-| #K #a #I #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #d #e #HLK #H1 #H2 #Hddt
-  elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
-  elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct
-  @tps_bind [ /2 width=5/ | /3 width=5/ ] (**) (* explicit constructor *)
-| #K #I #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #d #e #HLK #H1 #H2 #Hddt
-  elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
-  elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct /3 width=5/
-]
-qed.
-
-(* Basic_1: was: subst1_gen_lift_lt *)
-lemma tps_inv_lift1_le: ∀L,U1,U2,dt,et. L ⊢ U1 ▶ [dt, et] U2 →
-                        ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                        dt + et ≤ d →
-                        ∃∃T2. K ⊢ T1 ▶ [dt, et] T2 & ⇧[d, e] T2 ≡ U2.
-#L #U1 #U2 #dt #et #H elim H -L -U1 -U2 -dt -et
-[ #L * #i #dt #et #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 #KV #V #W #i #dt #et #Hdti #Hidet #HLKV #HVW #K #d #e #HLK #T1 #H #Hdetd
-  lapply (lt_to_le_to_lt … Hidet … Hdetd) -Hdetd #Hid
-  lapply (lift_inv_lref2_lt … H … Hid) -H #H destruct
-  elim (ldrop_conf_lt … HLK … HLKV ?) -L // #L #U #HKL #_ #HUV
-  elim (lift_trans_le … HUV … HVW ?) -V // >minus_plus <plus_minus_m_m // -Hid /3 width=4/
-| #L #a #I #V1 #V2 #U1 #U2 #dt #et #_ #_ #IHV12 #IHU12 #K #d #e #HLK #X #H #Hdetd
-  elim (lift_inv_bind2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
-  elim (IHV12 … HLK … HWV1 ?) -V1 // #W2 #HW12 #HWV2
-  elim (IHU12 … HTU1 ?) -IHU12 -HTU1 [3: /2 width=1/ |4: @ldrop_skip // |2: skip ] -HLK -Hdetd (**) (* /3 width=5/ is too slow *)
-  /3 width=5/
-| #L #I #V1 #V2 #U1 #U2 #dt #et #_ #_ #IHV12 #IHU12 #K #d #e #HLK #X #H #Hdetd
-  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.
-
-lemma tps_inv_lift1_be: ∀L,U1,U2,dt,et. L ⊢ U1 ▶ [dt, et] U2 →
-                        ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                        dt ≤ d → d + e ≤ dt + et →
-                        ∃∃T2. K ⊢ T1 ▶ [dt, et - e] T2 & ⇧[d, e] T2 ≡ U2.
-#L #U1 #U2 #dt #et #H elim H -L -U1 -U2 -dt -et
-[ #L * #i #dt #et #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 #KV #V #W #i #dt #et #Hdti #Hidet #HLKV #HVW #K #d #e #HLK #T1 #H #Hdtd #Hdedet
-  lapply (le_fwd_plus_plus_ge … Hdtd … Hdedet) #Heet
-  elim (lift_inv_lref2 … H) -H * #Hid #H destruct
-  [ -Hdtd -Hidet
-    lapply (lt_to_le_to_lt … (dt + (et - e)) Hid ?) [ <le_plus_minus /2 width=1/ ] -Hdedet #Hidete
-    elim (ldrop_conf_lt … HLK … HLKV ?) -L // #L #U #HKL #_ #HUV
-    elim (lift_trans_le … HUV … HVW ?) -V // >minus_plus <plus_minus_m_m // -Hid /3 width=4/
-  | -Hdti -Hdedet
-    lapply (transitive_le … (i - e) Hdtd ?) /2 width=1/ -Hdtd #Hdtie
-    elim (le_inv_plus_l … Hid) #Hdie #Hei
-    lapply (ldrop_conf_ge … HLK … HLKV ?) -L // #HKV
-    elim (lift_split … HVW d (i - e + 1) ? ? ?) -HVW [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 #H
-    @ex2_1_intro [3: @H | skip | @tps_subst [3,5,6: // |1,2: skip | >commutative_plus >plus_minus // /2 width=1/ ] ] (**) (* explicit constructor, uses monotonic_lt_minus_l *)
-  ]
-| #L #a #I #V1 #V2 #U1 #U2 #dt #et #_ #_ #IHV12 #IHU12 #K #d #e #HLK #X #H #Hdtd #Hdedet
-  elim (lift_inv_bind2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
-  elim (IHV12 … HLK … HWV1 ? ?) -V1 // #W2 #HW12 #HWV2
-  elim (IHU12 … HTU1 ? ?) -U1 [5: @ldrop_skip // |2: skip |3: >plus_plus_comm_23 >(plus_plus_comm_23 dt) /2 width=1/ |4: /2 width=1/ ] (**) (* 29s without the rewrites *)
-  /3 width=5/
-| #L #I #V1 #V2 #U1 #U2 #dt #et #_ #_ #IHV12 #IHU12 #K #d #e #HLK #X #H #Hdtd #Hdedet
-  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.
-
-(* Basic_1: was: subst1_gen_lift_ge *)
-lemma tps_inv_lift1_ge: ∀L,U1,U2,dt,et. L ⊢ U1 ▶ [dt, et] U2 →
-                        ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                        d + e ≤ dt →
-                        ∃∃T2. K ⊢ T1 ▶ [dt - e, et] T2 & ⇧[d, e] T2 ≡ U2.
-#L #U1 #U2 #dt #et #H elim H -L -U1 -U2 -dt -et
-[ #L * #i #dt #et #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 #KV #V #W #i #dt #et #Hdti #Hidet #HLKV #HVW #K #d #e #HLK #T1 #H #Hdedt
-  lapply (transitive_le … Hdedt … Hdti) #Hdei
-  elim (le_inv_plus_l … Hdedt) -Hdedt #_ #Hedt
-  elim (le_inv_plus_l … Hdei) #Hdie #Hei
-  lapply (lift_inv_lref2_ge … H … Hdei) -H #H destruct
-  lapply (ldrop_conf_ge … HLK … HLKV ?) -L // #HKV
-  elim (lift_split … HVW d (i - e + 1) ? ? ?) -HVW [4: // |3: /2 width=1/ |2: /3 width=1/ ] -Hdei -Hdie 
-  #V0 #HV10 >plus_minus // <minus_minus // /2 width=1/ <minus_n_n <plus_n_O #H
-  @ex2_1_intro [3: @H | skip | @tps_subst [5,6: // |1,2: skip | /2 width=1/ | >plus_minus // /2 width=1/ ] ] (**) (* explicit constructor, uses monotonic_lt_minus_l *)
-| #L #a #I #V1 #V2 #U1 #U2 #dt #et #_ #_ #IHV12 #IHU12 #K #d #e #HLK #X #H #Hdetd
-  elim (lift_inv_bind2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
-  elim (le_inv_plus_l … Hdetd) #_ #Hedt
-  elim (IHV12 … HLK … HWV1 ?) -V1 // #W2 #HW12 #HWV2
-  elim (IHU12 … HTU1 ?) -U1 [4: @ldrop_skip // |2: skip |3: /2 width=1/ ]
-  <plus_minus // /3 width=5/
-| #L #I #V1 #V2 #U1 #U2 #dt #et #_ #_ #IHV12 #IHU12 #K #d #e #HLK #X #H #Hdetd
-  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.
-
-(* Basic_1: was: subst1_gen_lift_eq *)
-lemma tps_inv_lift1_eq: ∀L,U1,U2,d,e.
-                        L ⊢ U1 ▶ [d, e] U2 → ∀T1. ⇧[d, e] T1 ≡ U1 → U1 = U2.
-#L #U1 #U2 #d #e #H elim H -L -U1 -U2 -d -e
-[ //
-| #L #K #V #W #i #d #e #Hdi #Hide #_ #_ #T1 #H
-  elim (lift_inv_lref2 … H) -H * #H
-  [ lapply (le_to_lt_to_lt … Hdi … H) -Hdi -H #H
-    elim (lt_refl_false … H)
-  | lapply (lt_to_le_to_lt … Hide … H) -Hide -H #H
-    elim (lt_refl_false … H)
-  ]
-| #L #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #X #HX
-  elim (lift_inv_bind2 … HX) -HX #V #T #HV1 #HT1 #H destruct
-  >IHV12 // >IHT12 //
-| #L #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #X #HX
-  elim (lift_inv_flat2 … HX) -HX #V #T #HV1 #HT1 #H destruct
-  >IHV12 // >IHT12 //
-]
-qed.
-(*
-      Theorem subst0_gen_lift_rev_ge: (t1,v,u2,i,h,d:?) 
-                                      (subst0 i v t1 (lift h d u2)) ->
-                                      (le (plus d h) i) ->
-                                      (EX u1 | (subst0 (minus i h) v u1 u2) &
-                                              t1 = (lift h d u1)
-                                     ).
-
-
-      Theorem subst0_gen_lift_rev_lelt: (t1,v,u2,i,h,d:?)
-                                        (subst0 i v t1 (lift h d u2)) ->
-                                        (le d i) -> (lt i (plus d h)) ->
-                                       (EX u1 | t1 = (lift (minus (plus d h) (S i)) (S i) u1)).
-*)
-lemma tps_inv_lift1_ge_up: ∀L,U1,U2,dt,et. L ⊢ U1 ▶ [dt, et] U2 →
-                           ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                           d ≤ dt → dt ≤ d + e → d + e ≤ dt + et →
-                           ∃∃T2. K ⊢ T1 ▶ [d, dt + et - (d + e)] T2 & ⇧[d, e] T2 ≡ U2.
-#L #U1 #U2 #dt #et #HU12 #K #d #e #HLK #T1 #HTU1 #Hddt #Hdtde #Hdedet
-elim (tps_split_up … HU12 (d + e) ? ?) -HU12 // -Hdedet #U #HU1 #HU2
-lapply (tps_weak … HU1 d e ? ?) -HU1 // [ >commutative_plus /2 width=1/ ] -Hddt -Hdtde #HU1
-lapply (tps_inv_lift1_eq … HU1 … HTU1) -HU1 #HU1 destruct
-elim (tps_inv_lift1_ge … HU2 … HLK … HTU1 ?) -U -L // <minus_plus_m_m /2 width=3/
-qed.
-
-lemma tps_inv_lift1_be_up: ∀L,U1,U2,dt,et. L ⊢ U1 ▶ [dt, et] U2 →
-                           ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                           dt ≤ d → dt + et ≤ d + e →
-                           ∃∃T2. K ⊢ T1 ▶ [dt, d - dt] T2 & ⇧[d, e] T2 ≡ U2.
-#L #U1 #U2 #dt #et #HU12 #K #d #e #HLK #T1 #HTU1 #Hdtd #Hdetde
-lapply (tps_weak … HU12 dt (d + e - dt) ? ?) -HU12 // /2 width=3/ -Hdetde #HU12
-elim (tps_inv_lift1_be … HU12 … HLK … HTU1 ? ?) -U1 -L // /2 width=3/
-qed.
-
-lemma tps_inv_lift1_le_up: ∀L,U1,U2,dt,et. L ⊢ U1 ▶ [dt, et] U2 →
-                           ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                           dt ≤ d → d ≤ dt + et → dt + et ≤ d + e →
-                           ∃∃T2. K ⊢ T1 ▶ [dt, d - dt] T2 & ⇧[d, e] T2 ≡ U2.
-#L #U1 #U2 #dt #et #HU12 #K #d #e #HLK #T1 #HTU1 #Hdtd #Hddet #Hdetde
-elim (tps_split_up … HU12 d ? ?) -HU12 // #U #HU1 #HU2
-elim (tps_inv_lift1_le … HU1 … HLK … HTU1 ?) -U1 [2: >commutative_plus /2 width=1/ ] -Hdtd #T #HT1 #HTU
-lapply (tps_weak … HU2 d e ? ?) -HU2 // [ >commutative_plus <plus_minus_m_m // ] -Hddet -Hdetde #HU2
-lapply (tps_inv_lift1_eq … HU2 … HTU) -L #H destruct /2 width=3/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/substitution/tps_tps.ma b/matita/matita/contribs/lambda_delta/basic_2/substitution/tps_tps.ma
deleted file mode 100644 (file)
index 3882750..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/tps_lift.ma".
-
-(* PARALLEL SUBSTITUTION ON TERMS *******************************************)
-
-(* Main properties **********************************************************)
-
-(* Basic_1: was: subst1_confluence_eq *)
-theorem tps_conf_eq: ∀L,T0,T1,d1,e1. L ⊢ T0 ▶ [d1, e1] T1 →
-                     ∀T2,d2,e2. L ⊢ T0 ▶ [d2, e2] T2 →
-                     ∃∃T. L ⊢ T1 ▶ [d2, e2] T & L ⊢ T2 ▶ [d1, e1] T.
-#L #T0 #T1 #d1 #e1 #H elim H -L -T0 -T1 -d1 -e1
-[ /2 width=3/
-| #L #K1 #V1 #T1 #i0 #d1 #e1 #Hd1 #Hde1 #HLK1 #HVT1 #T2 #d2 #e2 #H
-  elim (tps_inv_lref1 … H) -H
-  [ #HX destruct /4 width=4/
-  | -Hd1 -Hde1 * #K2 #V2 #_ #_ #HLK2 #HVT2
-    lapply (ldrop_mono … HLK1 … HLK2) -HLK1 -HLK2 #H destruct
-    >(lift_mono … HVT1 … HVT2) -HVT1 -HVT2 /2 width=3/
-  ]
-| #L #a #I #V0 #V1 #T0 #T1 #d1 #e1 #_ #_ #IHV01 #IHT01 #X #d2 #e2 #HX
-  elim (tps_inv_bind1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
-  lapply (tps_lsubs_trans … HT02 (L. ⓑ{I} V1) ?) -HT02 /2 width=1/ #HT02
-  elim (IHV01 … HV02) -V0 #V #HV1 #HV2
-  elim (IHT01 … HT02) -T0 #T #HT1 #HT2
-  lapply (tps_lsubs_trans … HT1 (L. ⓑ{I} V) ?) -HT1 /2 width=1/
-  lapply (tps_lsubs_trans … HT2 (L. ⓑ{I} V) ?) -HT2 /3 width=5/
-| #L #I #V0 #V1 #T0 #T1 #d1 #e1 #_ #_ #IHV01 #IHT01 #X #d2 #e2 #HX
-  elim (tps_inv_flat1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
-  elim (IHV01 … HV02) -V0
-  elim (IHT01 … HT02) -T0 /3 width=5/
-]
-qed.
-
-(* Basic_1: was: subst1_confluence_neq *)
-theorem tps_conf_neq: ∀L1,T0,T1,d1,e1. L1 ⊢ T0 ▶ [d1, e1] T1 →
-                      ∀L2,T2,d2,e2. L2 ⊢ T0 ▶ [d2, e2] T2 →
-                      (d1 + e1 ≤ d2 ∨ d2 + e2 ≤ d1) →
-                      ∃∃T. L2 ⊢ T1 ▶ [d2, e2] T & L1 ⊢ T2 ▶ [d1, e1] T.
-#L1 #T0 #T1 #d1 #e1 #H elim H -L1 -T0 -T1 -d1 -e1
-[ /2 width=3/
-| #L1 #K1 #V1 #T1 #i0 #d1 #e1 #Hd1 #Hde1 #HLK1 #HVT1 #L2 #T2 #d2 #e2 #H1 #H2
-  elim (tps_inv_lref1 … H1) -H1
-  [ #H destruct /4 width=4/
-  | -HLK1 -HVT1 * #K2 #V2 #Hd2 #Hde2 #_ #_ elim H2 -H2 #Hded
-    [ -Hd1 -Hde2
-      lapply (transitive_le … Hded Hd2) -Hded -Hd2 #H
-      lapply (lt_to_le_to_lt … Hde1 H) -Hde1 -H #H
-      elim (lt_refl_false … H)
-    | -Hd2 -Hde1
-      lapply (transitive_le … Hded Hd1) -Hded -Hd1 #H
-      lapply (lt_to_le_to_lt … Hde2 H) -Hde2 -H #H
-      elim (lt_refl_false … H)
-    ]
-  ]
-| #L1 #a #I #V0 #V1 #T0 #T1 #d1 #e1 #_ #_ #IHV01 #IHT01 #L2 #X #d2 #e2 #HX #H
-  elim (tps_inv_bind1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
-  elim (IHV01 … HV02 H) -V0 #V #HV1 #HV2
-  elim (IHT01 … HT02 ?) -T0
-  [ -H #T #HT1 #HT2
-    lapply (tps_lsubs_trans … HT1 (L2. ⓑ{I} V) ?) -HT1 /2 width=1/
-    lapply (tps_lsubs_trans … HT2 (L1. ⓑ{I} V) ?) -HT2 /2 width=1/ /3 width=5/
-  | -HV1 -HV2 >plus_plus_comm_23 >plus_plus_comm_23 in ⊢ (? ? %); elim H -H #H
-    [ @or_introl | @or_intror ] /2 by monotonic_le_plus_l/ (**) (* /3 / is too slow *)
-  ]
-| #L1 #I #V0 #V1 #T0 #T1 #d1 #e1 #_ #_ #IHV01 #IHT01 #L2 #X #d2 #e2 #HX #H
-  elim (tps_inv_flat1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
-  elim (IHV01 … HV02 H) -V0
-  elim (IHT01 … HT02 H) -T0 -H /3 width=5/
-]
-qed.
-
-(* Note: the constant 1 comes from tps_subst *)
-(* Basic_1: was: subst1_trans *)
-theorem tps_trans_ge: ∀L,T1,T0,d,e. L ⊢ T1 ▶ [d, e] T0 →
-                      ∀T2. L ⊢ T0 ▶ [d, 1] T2 → 1 ≤ e →
-                      L ⊢ T1 ▶ [d, e] T2.
-#L #T1 #T0 #d #e #H elim H -L -T1 -T0 -d -e
-[ #L #I #d #e #T2 #H #He
-  elim (tps_inv_atom1 … H) -H
-  [ #H destruct //
-  | * #K #V #i #Hd2i #Hide2 #HLK #HVT2 #H destruct
-    lapply (lt_to_le_to_lt … (d + e) Hide2 ?) /2 width=4/
-  ]
-| #L #K #V #V2 #i #d #e #Hdi #Hide #HLK #HVW #T2 #HVT2 #He
-  lapply (tps_weak … HVT2 0 (i +1) ? ?) -HVT2 /2 width=1/ #HVT2
-  <(tps_inv_lift1_eq … HVT2 … HVW) -HVT2 /2 width=4/
-| #L #a #I #V1 #V0 #T1 #T0 #d #e #_ #_ #IHV10 #IHT10 #X #H #He
-  elim (tps_inv_bind1 … H) -H #V2 #T2 #HV02 #HT02 #H destruct
-  lapply (tps_lsubs_trans … HT02 (L. ⓑ{I} V0) ?) -HT02 /2 width=1/ #HT02
-  lapply (IHT10 … HT02 He) -T0 #HT12
-  lapply (tps_lsubs_trans … HT12 (L. ⓑ{I} V2) ?) -HT12 /2 width=1/ /3 width=1/
-| #L #I #V1 #V0 #T1 #T0 #d #e #_ #_ #IHV10 #IHT10 #X #H #He
-  elim (tps_inv_flat1 … H) -H #V2 #T2 #HV02 #HT02 #H destruct /3 width=1/
-]
-qed.
-
-theorem tps_trans_down: ∀L,T1,T0,d1,e1. L ⊢ T1 ▶ [d1, e1] T0 →
-                        ∀T2,d2,e2. L ⊢ T0 ▶ [d2, e2] T2 → d2 + e2 ≤ d1 →
-                        ∃∃T. L ⊢ T1 ▶ [d2, e2] T & L ⊢ T ▶ [d1, e1] T2.
-#L #T1 #T0 #d1 #e1 #H elim H -L -T1 -T0 -d1 -e1
-[ /2 width=3/
-| #L #K #V #W #i1 #d1 #e1 #Hdi1 #Hide1 #HLK #HVW #T2 #d2 #e2 #HWT2 #Hde2d1
-  lapply (transitive_le … Hde2d1 Hdi1) -Hde2d1 #Hde2i1
-  lapply (tps_weak … HWT2 0 (i1 + 1) ? ?) -HWT2 normalize /2 width=1/ -Hde2i1 #HWT2
-  <(tps_inv_lift1_eq … HWT2 … HVW) -HWT2 /4 width=4/
-| #L #a #I #V1 #V0 #T1 #T0 #d1 #e1 #_ #_ #IHV10 #IHT10 #X #d2 #e2 #HX #de2d1
-  elim (tps_inv_bind1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
-  lapply (tps_lsubs_trans … HT02 (L. ⓑ{I} V0) ?) -HT02 /2 width=1/ #HT02
-  elim (IHV10 … HV02 ?) -IHV10 -HV02 // #V
-  elim (IHT10 … HT02 ?) -T0 /2 width=1/ #T #HT1 #HT2
-  lapply (tps_lsubs_trans … HT1 (L. ⓑ{I} V) ?) -HT1 /2 width=1/
-  lapply (tps_lsubs_trans … HT2 (L. ⓑ{I} V2) ?) -HT2 /2 width=1/ /3 width=6/
-| #L #I #V1 #V0 #T1 #T0 #d1 #e1 #_ #_ #IHV10 #IHT10 #X #d2 #e2 #HX #de2d1
-  elim (tps_inv_flat1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
-  elim (IHV10 … HV02 ?) -V0 //
-  elim (IHT10 … HT02 ?) -T0 // /3 width=6/
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/delift.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/delift.ma
deleted file mode 100644 (file)
index e8ac23d..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/tpss.ma".
-
-(* INVERSE BASIC TERM RELOCATION  *******************************************)
-
-definition delift: nat → nat → lenv → relation term ≝
-                   λd,e,L,T1,T2. ∃∃T. L ⊢ T1 ▶* [d, e] T & ⇧[d, e] T2 ≡ T.
-
-interpretation "inverse basic relocation (term)"
-   'TSubst L T1 d e T2 = (delift d e L T1 T2).
-
-(* Basic properties *********************************************************)
-
-lemma lift_delift: ∀T1,T2,d,e. ⇧[d, e] T1 ≡ T2 →
-                   ∀L. L ⊢ ▼*[d, e] T2 ≡ T1.
-/2 width=3/ qed.
-
-lemma delift_refl_O2: ∀L,T,d. L ⊢ ▼*[d, 0] T ≡ T.
-/2 width=3/ qed.
-
-lemma delift_lsubs_trans: ∀L1,T1,T2,d,e. L1 ⊢ ▼*[d, e] T1 ≡ T2 →
-                          ∀L2. L2 ≼ [d, e] L1 → L2 ⊢ ▼*[d, e] T1 ≡ T2.
-#L1 #T1 #T2 #d #e * /3 width=3/
-qed.
-
-lemma delift_sort: ∀L,d,e,k. L ⊢ ▼*[d, e] ⋆k ≡ ⋆k.
-/2 width=3/ qed.
-
-lemma delift_lref_lt: ∀L,d,e,i. i < d → L ⊢ ▼*[d, e] #i ≡ #i.
-/3 width=3/ qed.
-
-lemma delift_lref_ge: ∀L,d,e,i. d + e ≤ i → L ⊢ ▼*[d, e] #i ≡ #(i - e).
-/3 width=3/ qed.
-
-lemma delift_gref: ∀L,d,e,p. L ⊢ ▼*[d, e] §p ≡ §p.
-/2 width=3/ qed.
-
-lemma delift_bind: ∀a,I,L,V1,V2,T1,T2,d,e.
-                   L ⊢ ▼*[d, e] V1 ≡ V2 → L. ⓑ{I} V2 ⊢ ▼*[d+1, e] T1 ≡ T2 →
-                   L ⊢ ▼*[d, e] ⓑ{a,I} V1. T1 ≡ ⓑ{a,I} V2. T2.
-#a #I #L #V1 #V2 #T1 #T2 #d #e * #V #HV1 #HV2 * #T #HT1 #HT2
-lapply (tpss_lsubs_trans … HT1 (L. ⓑ{I} V) ?) -HT1 /2 width=1/ /3 width=5/
-qed.
-
-lemma delift_flat: ∀I,L,V1,V2,T1,T2,d,e.
-                   L ⊢ ▼*[d, e] V1 ≡ V2 → L ⊢ ▼*[d, e] T1 ≡ T2 →
-                   L ⊢ ▼*[d, e] ⓕ{I} V1. T1 ≡ ⓕ{I} V2. T2.
-#I #L #V1 #V2 #T1 #T2 #d #e * #V #HV1 #HV2 * /3 width=5/
-qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma delift_inv_sort1: ∀L,U2,d,e,k. L ⊢ ▼*[d, e] ⋆k ≡ U2 → U2 = ⋆k.
-#L #U2 #d #e #k * #U #HU
->(tpss_inv_sort1 … HU) -HU #HU2
->(lift_inv_sort2 … HU2) -HU2 //
-qed-.
-
-lemma delift_inv_gref1: ∀L,U2,d,e,p. L ⊢ ▼*[d, e] §p ≡ U2 → U2 = §p.
-#L #U #d #e #p * #U #HU
->(tpss_inv_gref1 … HU) -HU #HU2
->(lift_inv_gref2 … HU2) -HU2 //
-qed-.
-
-lemma delift_inv_bind1: ∀a,I,L,V1,T1,U2,d,e. L ⊢ ▼*[d, e] ⓑ{a,I} V1. T1 ≡ U2 →
-                        ∃∃V2,T2. L ⊢ ▼*[d, e] V1 ≡ V2 &
-                                 L. ⓑ{I} V2 ⊢ ▼*[d+1, e] T1 ≡ T2 &
-                                 U2 = ⓑ{a,I} V2. T2.
-#a #I #L #V1 #T1 #U2 #d #e * #U #HU #HU2
-elim (tpss_inv_bind1 … HU) -HU #V #T #HV1 #HT1 #X destruct
-elim (lift_inv_bind2 … HU2) -HU2 #V2 #T2 #HV2 #HT2
-lapply (tpss_lsubs_trans … HT1 (L. ⓑ{I} V2) ?) -HT1 /2 width=1/ /3 width=5/
-qed-.
-
-lemma delift_inv_flat1: ∀I,L,V1,T1,U2,d,e. L ⊢ ▼*[d, e] ⓕ{I} V1. T1 ≡ U2 →
-                        ∃∃V2,T2. L ⊢ ▼*[d, e] V1 ≡ V2 &
-                                 L ⊢ ▼*[d, e] T1 ≡ T2 &
-                                 U2 = ⓕ{I} V2. T2.
-#I #L #V1 #T1 #U2 #d #e * #U #HU #HU2
-elim (tpss_inv_flat1 … HU) -HU #V #T #HV1 #HT1 #X destruct
-elim (lift_inv_flat2 … HU2) -HU2 /3 width=5/
-qed-.
-
-lemma delift_inv_refl_O2: ∀L,T1,T2,d. L ⊢ ▼*[d, 0] T1 ≡ T2 → T1 = T2.
-#L #T1 #T2 #d * #T #HT1
->(tpss_inv_refl_O2 … HT1) -HT1 #HT2
->(lift_inv_refl_O2 … HT2) -HT2 //
-qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma delift_fwd_tw: ∀L,T1,T2,d,e. L ⊢ ▼*[d, e] T1 ≡ T2 → #{T1} ≤ #{T2}.
-#L #T1 #T2 #d #e * #T #HT1 #HT2
->(tw_lift … HT2) -T2 /2 width=4 by tpss_fwd_tw /
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/delift_alt.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/delift_alt.ma
deleted file mode 100644 (file)
index 9a3eb1b..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/delift_lift.ma".
-
-(* INVERSE BASIC TERM RELOCATION  *******************************************)
-
-(* alternative definition of inverse basic term relocation *)
-inductive delifta: nat → nat → lenv → relation term ≝
-| delifta_sort   : ∀L,d,e,k. delifta d e L (⋆k) (⋆k)
-| delifta_lref_lt: ∀L,d,e,i. i < d → delifta d e L (#i) (#i)
-| delifta_lref_be: ∀L,K,V1,V2,W2,i,d,e. d ≤ i → i < d + e →
-                   ⇩[0, i] L ≡ K. ⓓV1 → delifta 0 (d + e - i - 1) K V1 V2 →
-                   ⇧[0, d] V2 ≡ W2 → delifta d e L (#i) W2
-| delifta_lref_ge: ∀L,d,e,i. d + e ≤ i → delifta d e L (#i) (#(i - e))
-| delifta_gref   : ∀L,d,e,p. delifta d e L (§p) (§p)
-| delifta_bind   : ∀L,a,I,V1,V2,T1,T2,d,e.
-                   delifta d e L V1 V2 → delifta (d + 1) e (L. ⓑ{I} V2) T1 T2 →
-                   delifta d e L (ⓑ{a,I} V1. T1) (ⓑ{a,I} V2. T2)
-| delifta_flat   : ∀L,I,V1,V2,T1,T2,d,e.
-                   delifta d e L V1 V2 → delifta d e L T1 T2 →
-                   delifta d e L (ⓕ{I} V1. T1) (ⓕ{I} V2. T2)
-.
-
-interpretation "inverse basic relocation (term) alternative"
-   'TSubstAlt L T1 d e T2 = (delifta d e L T1 T2).
-
-(* Basic properties *********************************************************)
-
-lemma delifta_lsubs_trans: ∀L1,T1,T2,d,e. L1 ⊢ ▼▼*[d, e] T1 ≡ T2 →
-                           ∀L2. L2 ≼ [d, e] L1 → L2 ⊢ ▼▼*[d, e] T1 ≡ T2.
-#L1 #T1 #T2 #d #e #H elim H -L1 -T1 -T2 -d -e // /2 width=1/
-[ #L1 #K1 #V1 #V2 #W2 #i #d #e #Hdi #Hide #HLK1 #_ #HVW2 #IHV12 #L2 #HL12
-  elim (ldrop_lsubs_ldrop2_abbr … HL12 … HLK1 ? ?) -HL12 -HLK1 // /3 width=6/
-| /4 width=1/
-| /3 width=1/
-]
-qed.
-
-lemma delift_delifta: ∀L,T1,T2,d,e. L ⊢ ▼*[d, e] T1 ≡ T2 → L ⊢ ▼▼*[d, e] T1 ≡ T2.
-#L #T1 @(fw_ind … L T1) -L -T1 #L #T1 elim T1 -T1
-[ * #i #IH #T2 #d #e #H
-  [ >(delift_inv_sort1 … H) -H //
-  | elim (delift_inv_lref1 … H) -H * /2 width=1/
-    #K #V1 #V2 #Hdi #Hide #HLK #HV12 #HVT2
-    lapply (ldrop_pair2_fwd_fw … HLK) #H
-    lapply (IH … HV12) // -H /2 width=6/
-  | >(delift_inv_gref1 … H) -H //
-  ]
-| * [ #a ] #I #V1 #T1 #_ #_ #IH #X #d #e #H
-  [ elim (delift_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
-    lapply (delift_lsubs_trans … HT12 (L.ⓑ{I}V1) ?) -HT12 /2 width=1/ #HT12
-    lapply (IH … HV12) -HV12 // #HV12
-    lapply (IH … HT12) -IH -HT12 /2 width=1/ #HT12
-    lapply (delifta_lsubs_trans … HT12 (L.ⓑ{I}V2) ?) -HT12 /2 width=1/
-  | elim (delift_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
-    lapply (IH … HV12) -HV12 //
-    lapply (IH … HT12) -IH -HT12 // /2 width=1/
-  ]
-]
-qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma delifta_delift: ∀L,T1,T2,d,e. L ⊢ ▼▼*[d, e] T1 ≡ T2 → L ⊢ ▼*[d, e] T1 ≡ T2.
-#L #T1 #T2 #d #e #H elim H -L -T1 -T2 -d -e // /2 width=1/ /2 width=6/
-qed-. 
-
-lemma delift_ind_alt: ∀R:ℕ→ℕ→lenv→relation term.
-                      (∀L,d,e,k. R d e L (⋆k) (⋆k)) →
-                      (∀L,d,e,i. i < d → R d e L (#i) (#i)) →
-                      (∀L,K,V1,V2,W2,i,d,e. d ≤ i → i < d + e →
-                       ⇩[O, i] L ≡ K.ⓓV1 → K ⊢ ▼*[O, d + e - i - 1] V1 ≡ V2 →
-                       ⇧[O, d] V2 ≡ W2 → R O (d+e-i-1) K V1 V2 → R d e L #i W2
-                      ) →
-                      (∀L,d,e,i. d + e ≤ i → R d e L (#i) (#(i - e))) →
-                      (∀L,d,e,p. R d e L (§p) (§p)) →
-                      (∀L,a,I,V1,V2,T1,T2,d,e. L ⊢ ▼*[d, e] V1 ≡ V2 →
-                       L.ⓑ{I}V2 ⊢ ▼*[d + 1, e] T1 ≡ T2 → R d e L V1 V2 →
-                       R (d+1) e (L.ⓑ{I}V2) T1 T2 → R d e L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2)
-                      ) →
-                      (∀L,I,V1,V2,T1,T2,d,e. L ⊢ ▼*[d, e] V1 ≡ V2 →
-                       L⊢ ▼*[d, e] T1 ≡ T2 → R d e L V1 V2 →
-                       R d e L T1 T2 → R d e L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2)
-                      ) →
-                      ∀d,e,L,T1,T2. L ⊢ ▼*[d, e] T1 ≡ T2 → R d e L T1 T2.
-#R #H1 #H2 #H3 #H4 #H5 #H6 #H7 #d #e #L #T1 #T2 #H elim (delift_delifta … H) -L -T1 -T2 -d -e
-// /2 width=1 by delifta_delift/ /3 width=1 by delifta_delift/ /3 width=7 by delifta_delift/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/delift_delift.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/delift_delift.ma
deleted file mode 100644 (file)
index a5c5635..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/tpss_tpss.ma".
-include "basic_2/unfold/delift.ma".
-
-(* INVERSE BASIC TERM RELOCATION  *******************************************)
-
-(* Main properties **********************************************************)
-
-theorem delift_mono: ∀L,T,T1,T2,d,e.
-                     L ⊢ ▼*[d, e] T ≡ T1 → L ⊢ ▼*[d, e] T ≡ T2 → T1 = T2.
-#L #T #T1 #T2 #d #e * #U1 #H1TU1 #H2TU1 * #U2 #H1TU2 #H2TU2
-elim (tpss_conf_eq … H1TU1 … H1TU2) -T #U #HU1 #HU2
-lapply (tpss_inv_lift1_eq … HU1 … H2TU1) -HU1 #H destruct
-lapply (tpss_inv_lift1_eq … HU2 … H2TU2) -HU2 #H destruct
-lapply (lift_inj … H2TU1 … H2TU2) //
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/delift_lift.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/delift_lift.ma
deleted file mode 100644 (file)
index 01ee610..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/ldrop_sfr.ma".
-include "basic_2/unfold/tpss_lift.ma".
-include "basic_2/unfold/delift.ma".
-
-(* INVERSE BASIC TERM RELOCATION  *******************************************)
-
-(* Advanced properties ******************************************************)
-
-lemma delift_lref_be: ∀L,K,V1,V2,U2,i,d,e. d ≤ i → i < d + e →
-                      ⇩[0, i] L ≡ K. ⓓV1 → K ⊢ ▼*[0, d + e - i - 1] V1 ≡ V2 →
-                      ⇧[0, d] V2 ≡ U2 → L ⊢ ▼*[d, e] #i ≡ U2.
-#L #K #V1 #V2 #U2 #i #d #e #Hdi #Hide #HLK * #V #HV1 #HV2 #HVU2
-elim (lift_total V 0 (i+1)) #U #HVU
-lapply (lift_trans_be … HV2 … HVU ? ?) -HV2 // >minus_plus <plus_minus_m_m /2 width=1/ #HV2U 
-lapply (lift_conf_be … HVU2 … HV2U ?) //
->commutative_plus in ⊢ (??%??→?); <minus_plus_m_m /3 width=6/ 
-qed.
-
-fact sfr_delift_aux: ∀L,T,T1,d,e. d + e ≤ |L| → ≽ [d, e] L → T = T1 →
-                     ∃T2. L ⊢ ▼*[d, e] T1 ≡ T2.
-#L #T @(fw_ind … L T) -L -T #L #T #IH * * /2 width=2/
-[ #i #d #e #Hde #HL #H destruct
-  elim (lt_or_ge i d) #Hdi [ /3 width=2/ ]
-  elim (lt_or_ge i (d+e)) #Hide [2: /3 width=2/ ]
-  lapply (lt_to_le_to_lt … Hide Hde) #Hi
-  elim (ldrop_O1_lt … Hi) -Hi #I #K #V1 #HLK
-  lapply (sfr_inv_ldrop … HLK … HL ? ?) // #H destruct
-  lapply (ldrop_pair2_fwd_fw … HLK (#i)) #HKL
-  lapply (ldrop_fwd_ldrop2 … HLK) #HLK0
-  lapply (ldrop_fwd_O1_length … HLK0) #H
-  lapply (sfr_ldrop_trans_be_up … HLK0 … HL ? ?) -HLK0 -HL
-  [1,2: /2 width=1/ | <minus_n_O <minus_plus ] #HK
-  elim (IH … HKL … HK ?) -IH -HKL -HK
-  [3: // |2: skip |4: >H -H /2 width=1/ ] -Hde -H #V2 #V12 (**) (* H erased two times *)
-  elim (lift_total V2 0 d) /3 width=7/
-| #a #I #V1 #T1 #d #e #Hde #HL #H destruct
-  elim (IH … V1 … Hde HL ?) [2,4: // |3: skip ] #V2 #HV12
-  elim (IH (L.ⓑ{I}V1) T1 ? ? (d+1) e ? ? ?) -IH [3,6: // |2: skip |4,5: /2 width=1/ ] -Hde -HL #T2 #HT12
-  lapply (delift_lsubs_trans … HT12 (L.ⓑ{I}V2) ?) -HT12 /2 width=1/ /3 width=4/
-| #I #V1 #T1 #d #e #Hde #HL #H destruct
-  elim (IH … V1 … Hde HL ?) [2,4: // |3: skip ] #V2 #HV12
-  elim (IH … T1 … Hde HL ?) -IH -Hde -HL [3,4: // |2: skip ] /3 width=2/
-]
-qed.
-
-lemma sfr_delift: ∀L,T1,d,e. d + e ≤ |L| → ≽ [d, e] L →
-                  ∃T2. L ⊢ ▼*[d, e] T1 ≡ T2.
-/2 width=2/ qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma delift_inv_lref1_lt: ∀L,U2,i,d,e. L ⊢ ▼*[d, e] #i ≡ U2 → i < d → U2 = #i.
-#L #U2 #i #d #e * #U #HU #HU2 #Hid
-elim (tpss_inv_lref1 … HU) -HU
-[ #H destruct >(lift_inv_lref2_lt … HU2) //
-| * #K #V1 #V2 #Hdi
-  lapply (lt_to_le_to_lt … Hid Hdi) -Hid -Hdi #Hi
-  elim (lt_refl_false … Hi)
-]
-qed-.
-
-lemma delift_inv_lref1_be: ∀L,U2,d,e,i. L ⊢ ▼*[d, e] #i ≡ U2 →
-                           d ≤ i → i < d + e →
-                           ∃∃K,V1,V2. ⇩[0, i] L ≡ K. ⓓV1 &
-                                      K ⊢ ▼*[0, d + e - i - 1] V1 ≡ V2 &
-                                      ⇧[0, d] V2 ≡ U2.
-#L #U2 #d #e #i * #U #HU #HU2 #Hdi #Hide
-elim (tpss_inv_lref1 … HU) -HU
-[ #H destruct elim (lift_inv_lref2_be … HU2 ? ?) //
-| * #K #V1 #V #_ #_ #HLK #HV1 #HVU
-  elim (lift_div_be … HVU … HU2 ? ?) -U // /2 width=1/ /3 width=6/
-]
-qed-.
-
-lemma delift_inv_lref1_ge: ∀L,U2,i,d,e. L ⊢ ▼*[d, e] #i ≡ U2 →
-                           d + e ≤ i → U2 = #(i - e).
-#L #U2 #i #d #e * #U #HU #HU2 #Hdei
-elim (tpss_inv_lref1 … HU) -HU
-[ #H destruct >(lift_inv_lref2_ge … HU2) //
-| * #K #V1 #V2 #_ #Hide
-  lapply (lt_to_le_to_lt … Hide Hdei) -Hide -Hdei #Hi
-  elim (lt_refl_false … Hi)
-]
-qed-.
-
-lemma delift_inv_lref1: ∀L,U2,i,d,e. L ⊢ ▼*[d, e] #i ≡ U2 →
-                        ∨∨ (i < d ∧ U2 = #i) 
-                        |  (∃∃K,V1,V2. d ≤ i & i < d + e &
-                                       ⇩[0, i] L ≡ K. ⓓV1 &
-                                       K ⊢ ▼*[0, d + e - i - 1] V1 ≡ V2 &
-                                       ⇧[0, d] V2 ≡ U2
-                           )
-                        |  (d + e ≤ i ∧ U2 = #(i - e)).
-#L #U2 #i #d #e #H
-elim (lt_or_ge i d) #Hdi
-[ elim (delift_inv_lref1_lt … H Hdi) -H /3 width=1/
-| elim (lt_or_ge i (d+e)) #Hide
-  [ elim (delift_inv_lref1_be … H Hdi Hide) -H /3 width=6/
-  | elim (delift_inv_lref1_ge … H Hide) -H /3 width=1/
-  ]
-]
-qed-.
-
-(* Properties on basic term relocation **************************************)
-
-lemma delift_lift_le: ∀K,T1,T2,dt,et. K ⊢ ▼*[dt, et] T1 ≡ T2 →
-                      ∀L,U1,d,e. dt + et ≤ d → ⇩[d, e] L ≡ K →
-                      ⇧[d, e] T1 ≡ U1 → ∀U2. ⇧[d - et, e] T2 ≡ U2 →
-                      L ⊢ ▼*[dt, et] U1 ≡ U2.
-#K #T1 #T2 #dt #et * #T #HT1 #HT2 #L #U1 #d #e #Hdetd #HLK #HTU1 #U2 #HTU2
-elim (lift_total T d e) #U #HTU
-lapply (tpss_lift_le … HT1 … HLK HTU1 … HTU) -T1 -HLK // #HU1
-elim (lift_trans_ge … HT2 … HTU ?) -T // -Hdetd #T #HT2 #HTU
->(lift_mono … HTU2 … HT2) -T2 /2 width=3/
-qed.
-
-lemma delift_lift_be: ∀K,T1,T2,dt,et. K ⊢ ▼*[dt, et] T1 ≡ T2 →
-                      ∀L,U1,d,e. dt ≤ d → d ≤ dt + et →
-                      ⇩[d, e] L ≡ K → ⇧[d, e] T1 ≡ U1 →
-                      L ⊢ ▼*[dt, et + e] U1 ≡ T2.
-#K #T1 #T2 #dt #et * #T #HT1 #HT2 #L #U1 #d #e #Hdtd #Hddet #HLK #HTU1
-elim (lift_total T d e) #U #HTU
-lapply (tpss_lift_be … HT1 … HLK HTU1 … HTU) -T1 -HLK // #HU1
-lapply (lift_trans_be … HT2 … HTU ? ?) -T // -Hdtd -Hddet /2 width=3/
-qed.
-
-lemma delift_lift_ge: ∀K,T1,T2,dt,et. K ⊢ ▼*[dt, et] T1 ≡ T2 →
-                      ∀L,U1,d,e. d ≤ dt → ⇩[d, e] L ≡ K →
-                      ⇧[d, e] T1 ≡ U1 → ∀U2. ⇧[d, e] T2 ≡ U2 →
-                      L ⊢ ▼*[dt + e, et] U1 ≡ U2.
-#K #T1 #T2 #dt #et * #T #HT1 #HT2 #L #U1 #d #e #Hddt #HLK #HTU1 #U2 #HTU2
-elim (lift_total T d e) #U #HTU
-lapply (tpss_lift_ge … HT1 … HLK HTU1 … HTU) -T1 -HLK // #HU1
-elim (lift_trans_le … HT2 … HTU ?) -T // -Hddt #T #HT2 #HTU
->(lift_mono … HTU2 … HT2) -T2 /2 width=3/
-qed.
-
-lemma delift_inv_lift1_eq: ∀L,U1,T2,d,e. L ⊢ ▼*[d, e] U1 ≡ T2 →
-                           ∀K. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 → T1 = T2.
-#L #U1 #T2 #d #e * #U2 #HU12 #HTU2 #K #HLK #T1 #HTU1
-lapply (tpss_inv_lift1_eq … HU12 … HTU1) -L -K #H destruct
-lapply (lift_inj … HTU1 … HTU2) -U2 //
-qed-.
-
-lemma delift_lift_div_be: ∀L,T1,T,d,e,i. L ⊢ ▼*[i, d + e - i] T1 ≡ T →
-                          ∀T2. ⇧[d, i - d] T2 ≡ T → d ≤ i → i ≤ d + e →
-                          L ⊢ ▼*[d, e] T1 ≡ T2.
-#L #T1 #T #d #e #i * #T0 #HT10 #HT0 #T2 #HT2 #Hdi #Hide
-lapply (tpss_weak … HT10 d e ? ?) -HT10 // [ >commutative_plus /2 width=1/ ] #HT10
-lapply (lift_trans_be … HT2 … HT0 ? ?) -T //
->commutative_plus >commutative_plus in ⊢ (? ? (? % ?) ? ? → ?);
-<minus_le_minus_minus_comm // <plus_minus_m_m [ /2 width=3/ | /2 width=1/ ]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/delift_ltpss.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/delift_ltpss.ma
deleted file mode 100644 (file)
index a0ac3cf..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/ltpss_sn_alt.ma".
-include "basic_2/unfold/delift.ma".
-
-(* INVERSE BASIC TERM RELOCATION  *******************************************)
-
-(* Properties on sn partial unfold on local environments ********************)
-
-lemma delift_ltpss_sn_conf_eq: ∀L,T1,T2,d,e. L ⊢ ▼*[d, e] T1 ≡ T2 →
-                               ∀K. L ⊢ ▶* [d, e] K → K ⊢ ▼*[d, e] T1 ≡ T2.
-#L #T1 #T2 #d #e * #T #HT1 #HT2 #K #HLK
-elim (ltpss_sn_tpss_conf … HT1 … HLK) -HT1 -HLK #T0 #HT10 #HT0
-lapply (tpss_inv_lift1_eq … HT0 … HT2) -HT0 #H destruct /2 width=3/
-qed.
-
-lemma ltpss_sn_delift_trans_eq: ∀L,K,d,e. L ⊢ ▶* [d, e] K →
-                                ∀T1,T2. K ⊢ ▼*[d, e] T1 ≡ T2 → L ⊢ ▼*[d, e] T1 ≡ T2.
-#L #K #d #e #HLK #T1 #T2 * #T #HT1 #HT2 
-lapply (ltpss_sn_tpss_trans_eq … HT1 … HLK) -K /2 width=3/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/delift_tpss.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/delift_tpss.ma
deleted file mode 100644 (file)
index cebcf82..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/tpss_tpss.ma".
-include "basic_2/unfold/delift.ma".
-
-(* INVERSE BASIC TERM RELOCATION  *******************************************)
-
-(* Properties on partial unfold on terms ************************************)
-
-lemma delift_tpss_conf_le: ∀L,U1,U2,d,e. L ⊢ U1 ▶* [d, e] U2 →
-                           ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
-                           ∀K. ⇩[dd, ee] L ≡ K → d + e ≤ dd →
-                           ∃∃T2. K ⊢ T1 ▶* [d, e] T2 & L ⊢ ▼*[dd, ee] U2 ≡ T2.
-#L #U1 #U2 #d #e #HU12 #T1 #dd #ee * #X1 #HUX1 #HTX1 #K #HLK #H1
-elim (tpss_conf_eq … HU12 … HUX1) -U1 #U1 #HU21 #HXU1
-elim (tpss_inv_lift1_le … HXU1 … HLK … HTX1 ?) -X1 -HLK // -H1 /3 width=5/
-qed.
-
-lemma delift_tps_conf_le: ∀L,U1,U2,d,e. L ⊢ U1 ▶ [d, e] U2 →
-                          ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
-                          ∀K. ⇩[dd, ee] L ≡ K → d + e ≤ dd →
-                          ∃∃T2. K ⊢ T1 ▶* [d, e] T2 & L ⊢ ▼*[dd, ee] U2 ≡ T2.
-/3 width=3/ qed.
-
-lemma delift_tpss_conf_le_up: ∀L,U1,U2,d,e. L ⊢ U1 ▶* [d, e] U2 →
-                              ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
-                              ∀K. ⇩[dd, ee] L ≡ K →
-                              d ≤ dd → dd ≤ d + e → d + e ≤ dd + ee →
-                              ∃∃T2. K ⊢ T1 ▶* [d, dd - d] T2 &
-                                    L ⊢ ▼*[dd, ee] U2 ≡ T2.
-#L #U1 #U2 #d #e #HU12 #T1 #dd #ee * #X1 #HUX1 #HTX1 #K #HLK #H1 #H2 #H3
-elim (tpss_conf_eq … HU12 … HUX1) -U1 #U1 #HU21 #HXU1
-elim (tpss_inv_lift1_le_up … HXU1 … HLK … HTX1 ? ? ?) -X1 -HLK // -H1 -H2 -H3 /3 width=5/
-qed.
-
-lemma delift_tps_conf_le_up: ∀L,U1,U2,d,e. L ⊢ U1 ▶ [d, e] U2 →
-                             ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
-                             ∀K. ⇩[dd, ee] L ≡ K →
-                             d ≤ dd → dd ≤ d + e → d + e ≤ dd + ee →
-                             ∃∃T2. K ⊢ T1 ▶* [d, dd - d] T2 &
-                                   L ⊢ ▼*[dd, ee] U2 ≡ T2.
-/3 width=6/ qed.
-
-lemma delift_tpss_conf_be: ∀L,U1,U2,d,e. L ⊢ U1 ▶* [d, e] U2 →
-                           ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
-                           ∀K. ⇩[dd, ee] L ≡ K → d ≤ dd → dd + ee ≤ d + e →
-                           ∃∃T2. K ⊢ T1 ▶* [d, e - ee] T2 &
-                                 L ⊢ ▼*[dd, ee] U2 ≡ T2.
-#L #U1 #U2 #d #e #HU12 #T1 #dd #ee * #X1 #HUX1 #HTX1 #K #HLK #H1 #H2
-elim (tpss_conf_eq … HU12 … HUX1) -U1 #U1 #HU21 #HXU1
-elim (tpss_inv_lift1_be … HXU1 … HLK … HTX1 ? ?) -X1 -HLK // -H1 -H2 /3 width=5/
-qed.
-
-lemma delift_tps_conf_be: ∀L,U1,U2,d,e. L ⊢ U1 ▶ [d, e] U2 →
-                          ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
-                          ∀K. ⇩[dd, ee] L ≡ K → d ≤ dd → dd + ee ≤ d + e →
-                          ∃∃T2. K ⊢ T1 ▶* [d, e - ee] T2 &
-                                L ⊢ ▼*[dd, ee] U2 ≡ T2.
-/3 width=3/ qed.
-
-lemma delift_tpss_conf_eq: ∀L,U1,U2,d,e. L ⊢ U1 ▶* [d, e] U2 →
-                           ∀T. L ⊢ ▼*[d, e] U1 ≡ T → L ⊢ ▼*[d, e] U2 ≡ T.
-#L #U1 #U2 #d #e #HU12 #T * #X1 #HUX1 #HTX1
-elim (tpss_conf_eq … HU12 … HUX1) -U1 #U1 #HU21 #HXU1
-lapply (tpss_inv_lift1_eq … HXU1 … HTX1) -HXU1 #H destruct /2 width=3/
-qed.
-
-lemma delift_tps_conf_eq: ∀L,U1,U2,d,e. L ⊢ U1 ▶ [d, e] U2 →
-                          ∀T. L ⊢ ▼*[d, e] U1 ≡ T → L ⊢ ▼*[d, e] U2 ≡ T.
-/3 width=3/ qed.
-
-lemma tpss_delift_trans_eq: ∀L,U1,U2,d,e. L ⊢ U1 ▶* [d, e] U2 →
-                            ∀T. L ⊢ ▼*[d, e] U2 ≡ T → L ⊢ ▼*[d, e] U1 ≡ T.
-#L #U1 #U2 #d #e #HU12 #T * #X1 #HUX1 #HTX1
-lapply (tpss_trans_eq … HU12 … HUX1) -U2 /2 width=3/
-qed.
-
-lemma tps_delift_trans_eq: ∀L,U1,U2,d,e. L ⊢ U1 ▶ [d, e] U2 →
-                           ∀T. L ⊢ ▼*[d, e] U2 ≡ T → L ⊢ ▼*[d, e] U1 ≡ T.
-/3 width=3/ qed.                            
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/frsupp.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/frsupp.ma
deleted file mode 100644 (file)
index 9cfee7c..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/frsup.ma".
-
-(* PLUS-ITERATED RESTRICTED SUPCLOSURE **************************************)
-
-definition frsupp: bi_relation lenv term ≝ bi_TC … frsup.
-
-interpretation "plus-iterated restricted structural predecessor (closure)"
-   'RestSupTermPlus L1 T1 L2 T2 = (frsupp L1 T1 L2 T2).
-
-(* Basic eliminators ********************************************************)
-
-lemma frsupp_ind: ∀L1,T1. ∀R:relation2 lenv term.
-                  (∀L2,T2. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ → R L2 T2) →
-                  (∀L,T,L2,T2. ⦃L1, T1⦄ ⧁+ ⦃L, T⦄ → ⦃L, T⦄ ⧁ ⦃L2, T2⦄ → R L T → R L2 T2) →
-                  ∀L2,T2. ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄ → R L2 T2.
-#L1 #T1 #R #IH1 #IH2 #L2 #T2 #H
-@(bi_TC_ind … IH1 IH2 ? ? H)
-qed-.
-
-lemma frsupp_ind_dx: ∀L2,T2. ∀R:relation2 lenv term.
-                     (∀L1,T1. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ → R L1 T1) →
-                     (∀L1,L,T1,T. ⦃L1, T1⦄ ⧁ ⦃L, T⦄ → ⦃L, T⦄ ⧁+ ⦃L2, T2⦄ → R L T → R L1 T1) →
-                     ∀L1,T1. ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄ → R L1 T1.
-#L2 #T2 #R #IH1 #IH2 #L1 #T1 #H
-@(bi_TC_ind_dx … IH1 IH2 ? ? H)
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma frsup_frsupp: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄.
-/2 width=1/ qed.
-
-lemma frsupp_strap1: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⧁+ ⦃L, T⦄ → ⦃L, T⦄ ⧁ ⦃L2, T2⦄ →
-                     ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄.
-/2 width=4/ qed.
-
-lemma frsupp_strap2: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⧁ ⦃L, T⦄ → ⦃L, T⦄ ⧁+ ⦃L2, T2⦄ →
-                     ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄.
-/2 width=4/ qed.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma frsupp_fwd_fw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄ → #{L2, T2} < #{L1, T1}.
-#L1 #L2 #T1 #T2 #H @(frsupp_ind … H) -L2 -T2
-/3 width=3 by frsup_fwd_fw, transitive_lt/
-qed-.
-
-lemma frsupp_fwd_lw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄ → #{L1} ≤ #{L2}.
-#L1 #L2 #T1 #T2 #H @(frsupp_ind … H) -L2 -T2
-/2 width=3 by frsup_fwd_lw/ (**) (* /3 width=5 by frsup_fwd_lw, transitive_le/ is too slow *)
-#L #T #L2 #T2 #_ #HL2 #HL1
-lapply (frsup_fwd_lw … HL2) -HL2 /2 width=3 by transitive_le/
-qed-.
-
-lemma frsupp_fwd_tw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄ → #{T2} < #{T1}.
-#L1 #L2 #T1 #T2 #H @(frsupp_ind … H) -L2 -T2
-/3 width=3 by frsup_fwd_tw, transitive_lt/
-qed-.
-
-lemma frsupp_fwd_append: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄ → ∃L. L2 = L1 @@ L.
-#L1 #L2 #T1 #T2 #H @(frsupp_ind … H) -L2 -T2 /2 width=3 by frsup_fwd_append/
-#L #T #L2 #T2 #_ #HL2 * #K1 #H destruct
-elim (frsup_fwd_append … HL2) -HL2 #K2 #H destruct /2 width=2/
-qed-.
-
-(* Advanced forward lemmas **************************************************)
-
-fact lift_frsupp_trans_aux: ∀L2,U0. (
-                               ∀L,K,U1,U2. ⦃L, U1⦄ ⧁+ ⦃L @@ K, U2⦄ →
-                               ∀T1,d,e. ⇧[d, e] T1 ≡ U1 →
-                               #{L, U1} < #{L2, U0} → 
-                               ∃T2. ⇧[d + |K|, e] T2 ≡ U2
-                            ) →
-                            ∀L1,K,U1,U2. ⦃L1, U1⦄ ⧁+ ⦃L2 @@ K, U2⦄ →
-                            ∀T1,d,e. ⇧[d, e] T1 ≡ U1 →
-                            L2 = L1 → U0 = U1 →
-                            ∃T2. ⇧[d + |K|, e] T2 ≡ U2.
-#L2 #U0 #IH #L1 #X #U1 #U2 #H @(frsupp_ind_dx … H) -L1 -U1 /2 width=5 by lift_frsup_trans/
-#L1 #L #U1 #U #HL1 #HL2 #_ #T1 #d #e #HTU1 #H1 #H2 destruct
-elim (frsup_fwd_append … HL1) #K1 #H destruct
-elim (frsupp_fwd_append … HL2) #K >append_assoc #H
-elim (append_inj_dx … H ?) -H // #_ #H destruct
-<append_assoc in HL2; #HL2
-elim (lift_frsup_trans … HTU1 … HL1) -T1 #T #HTU
-lapply (frsup_fwd_fw … HL1) -HL1 #HL1
-elim (IH … HL2 … HTU ?) -IH -HL2 -T // -L1 -U1 -U /2 width=2/
-qed-.
-
-lemma lift_frsupp_trans: ∀L,U1,K,U2. ⦃L, U1⦄ ⧁+ ⦃L @@ K, U2⦄ →
-                         ∀T1,d,e. ⇧[d, e] T1 ≡ U1 →
-                         ∃T2. ⇧[d + |K|, e] T2 ≡ U2.
-#L #U1 @(fw_ind … L U1) -L -U1 /3 width=10 by lift_frsupp_trans_aux/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/frsupp_frsupp.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/frsupp_frsupp.ma
deleted file mode 100644 (file)
index 92efe26..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/frsupp.ma".
-
-(* PLUS-ITERATED RESTRICTED SUPCLOSURE **************************************)
-
-(* Main propertis ***********************************************************)
-
-theorem frsupp_trans: bi_transitive … frsupp.
-/2 width=4/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/frsups.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/frsups.ma
deleted file mode 100644 (file)
index 5923d60..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/frsupp.ma".
-
-(* STAR-ITERATED RESTRICTED SUPCLOSURE **************************************)
-
-definition frsups: bi_relation lenv term ≝ bi_star … frsup.
-
-interpretation "star-iterated restricted structural predecessor (closure)"
-   'RestSupTermStar L1 T1 L2 T2 = (frsups L1 T1 L2 T2).
-
-(* Basic eliminators ********************************************************)
-
-lemma frsups_ind: ∀L1,T1. ∀R:relation2 lenv term. R L1 T1 →
-                  (∀L,L2,T,T2. ⦃L1, T1⦄ ⧁* ⦃L, T⦄ → ⦃L, T⦄ ⧁ ⦃L2, T2⦄ → R L T → R L2 T2) →
-                  ∀L2,T2. ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄ → R L2 T2.
-#L1 #T1 #R #IH1 #IH2 #L2 #T2 #H
-@(bi_star_ind … IH1 IH2 ? ? H)
-qed-.
-
-lemma frsups_ind_dx: ∀L2,T2. ∀R:relation2 lenv term. R L2 T2 →
-                     (∀L1,L,T1,T. ⦃L1, T1⦄ ⧁ ⦃L, T⦄ → ⦃L, T⦄ ⧁* ⦃L2, T2⦄ → R L T → R L1 T1) →
-                     ∀L1,T1. ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄ → R L1 T1.
-#L2 #T2 #R #IH1 #IH2 #L1 #T1 #H
-@(bi_star_ind_dx … IH1 IH2 ? ? H)
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma frsups_refl: bi_reflexive … frsups.
-/2 width=1/ qed.
-
-lemma frsupp_frsups: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄.
-/2 width=1/ qed.
-
-lemma frsup_frsups: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄.
-/2 width=1/ qed.
-
-lemma frsups_strap1: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⧁* ⦃L, T⦄ → ⦃L, T⦄ ⧁ ⦃L2, T2⦄ →
-                     ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄.
-/2 width=4/ qed.
-
-lemma frsups_strap2: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⧁ ⦃L, T⦄ → ⦃L, T⦄ ⧁* ⦃L2, T2⦄ →
-                     ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄.
-/2 width=4/ qed.
-
-lemma frsups_frsupp_frsupp: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⧁* ⦃L, T⦄ →
-                            ⦃L, T⦄ ⧁+ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄.
-/2 width=4/ qed.
-
-lemma frsupp_frsups_frsupp: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⧁+ ⦃L, T⦄ →
-                            ⦃L, T⦄ ⧁* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄.
-/2 width=4/ qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma frsups_inv_all: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄ →
-                      (L1 = L2 ∧ T1 = T2) ∨ ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄.
-#L1 #L2 #T1 #T2 * /2 width=1/
-qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma frsups_fwd_fw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄ → #{L2, T2} ≤ #{L1, T1}.
-#L1 #L2 #T1 #T2 #H elim (frsups_inv_all … H) -H [ * // ]
-/3 width=1 by frsupp_fwd_fw, lt_to_le/
-qed-.
-
-lemma frsups_fwd_lw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄ → #{L1} ≤ #{L2}.
-#L1 #L2 #T1 #T2 #H elim (frsups_inv_all … H) -H [ * // ]
-/2 width=3 by frsupp_fwd_lw/
-qed-.
-
-lemma frsups_fwd_tw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄ → #{T2} ≤ #{T1}.
-#L1 #L2 #T1 #T2 #H elim (frsups_inv_all … H) -H [ * // ]
-/3 width=3 by frsupp_fwd_tw, lt_to_le/
-qed-.
-
-lemma frsups_fwd_append: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄ → ∃L. L2 = L1 @@ L.
-#L1 #L2 #T1 #T2 #H elim (frsups_inv_all … H) -H
-[ * #H1 #H2 destruct
-  @(ex_intro … (⋆)) //
-| /2 width=3 by frsupp_fwd_append/
-qed-.
-
-(* Advanced forward lemmas ***************************************************)
-
-lemma lift_frsups_trans: ∀T1,U1,d,e. ⇧[d, e] T1 ≡ U1 →
-                         ∀L,K,U2. ⦃L, U1⦄ ⧁* ⦃L @@ K, U2⦄ →
-                         ∃T2. ⇧[d + |K|, e] T2 ≡ U2.
-#T1 #U1 #d #e #HTU1 #L #K #U2 #H elim (frsups_inv_all … H) -H
-[ * #H1 #H2 destruct
-  >(append_inv_refl_dx … (sym_eq … H1)) -H1 normalize /2 width=2/
-| /2 width=5 by lift_frsupp_trans/
-]
-qed-.
-
-(* Advanced inversion lemmas for frsupp **************************************)
-
-lemma frsupp_inv_atom1_frsups: ∀J,L1,L2,T2. ⦃L1, ⓪{J}⦄ ⧁+ ⦃L2, T2⦄ → ⊥.
-#J #L1 #L2 #T2 #H @(frsupp_ind … H) -L2 -T2 //
-#L2 #T2 #H elim (frsup_inv_atom1 … H)
-qed-.
-
-lemma frsupp_inv_bind1_frsups: ∀b,J,L1,L2,W,U,T2. ⦃L1, ⓑ{b,J}W.U⦄ ⧁+ ⦃L2, T2⦄ →
-                               ⦃L1, W⦄ ⧁* ⦃L2, T2⦄ ∨ ⦃L1.ⓑ{J}W, U⦄ ⧁* ⦃L2, T2⦄.
-#b #J #L1 #L2 #W #U #T2 #H @(frsupp_ind … H) -L2 -T2
-[ #L2 #T2 #H
-  elim (frsup_inv_bind1 … H) -H * #H1 #H2 destruct /2 width=1/
-| #L #T #L2 #T2 #_ #HT2 * /3 width=4/
-]
-qed-.
-
-lemma frsupp_inv_flat1_frsups: ∀J,L1,L2,W,U,T2. ⦃L1, ⓕ{J}W.U⦄ ⧁+ ⦃L2, T2⦄ →
-                               ⦃L1, W⦄ ⧁* ⦃L2, T2⦄ ∨ ⦃L1, U⦄ ⧁* ⦃L2, T2⦄.
-#J #L1 #L2 #W #U #T2 #H @(frsupp_ind … H) -L2 -T2
-[ #L2 #T2 #H
-  elim (frsup_inv_flat1 … H) -H #H1 * #H2 destruct /2 width=1/
-| #L #T #L2 #T2 #_ #HT2 * /3 width=4/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/frsups_frsups.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/frsups_frsups.ma
deleted file mode 100644 (file)
index e7b7de2..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/frsups.ma".
-
-(* STAR-ITERATED RESTRICTED SUPCLOSURE **************************************)
-
-(* Main propertis ***********************************************************)
-
-theorem frsups_trans: bi_transitive … frsups.
-/2 width=4/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/gr2.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/gr2.ma
deleted file mode 100644 (file)
index 562b795..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/term_vector.ma".
-
-(* GENERIC RELOCATION WITH PAIRS ********************************************)
-
-inductive at: list2 nat nat → relation nat ≝
-| at_nil: ∀i. at ⟠ i i
-| at_lt : ∀des,d,e,i1,i2. i1 < d →
-          at des i1 i2 → at ({d, e} @ des) i1 i2
-| at_ge : ∀des,d,e,i1,i2. d ≤ i1 →
-          at des (i1 + e) i2 → at ({d, e} @ des) i1 i2
-.
-
-interpretation "application (generic relocation with pairs)"
-   'RAt i1 des i2 = (at des i1 i2).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact at_inv_nil_aux: ∀des,i1,i2. @⦃i1, des⦄ ≡ i2 → des = ⟠ → i1 = i2.
-#des #i1 #i2 * -des -i1 -i2
-[ //
-| #des #d #e #i1 #i2 #_ #_ #H destruct
-| #des #d #e #i1 #i2 #_ #_ #H destruct
-]
-qed.
-
-lemma at_inv_nil: ∀i1,i2. @⦃i1, ⟠⦄ ≡ i2 → i1 = i2.
-/2 width=3/ qed-.
-
-fact at_inv_cons_aux: ∀des,i1,i2. @⦃i1, des⦄ ≡ i2 →
-                      ∀d,e,des0. des = {d, e} @ des0 →
-                      i1 < d ∧ @⦃i1, des0⦄ ≡ i2 ∨
-                      d ≤ i1 ∧ @⦃i1 + e, des0⦄ ≡ i2.
-#des #i1 #i2 * -des -i1 -i2
-[ #i #d #e #des #H destruct
-| #des1 #d1 #e1 #i1 #i2 #Hid1 #Hi12 #d2 #e2 #des2 #H destruct /3 width=1/
-| #des1 #d1 #e1 #i1 #i2 #Hdi1 #Hi12 #d2 #e2 #des2 #H destruct /3 width=1/
-]
-qed.
-
-lemma at_inv_cons: ∀des,d,e,i1,i2. @⦃i1, {d, e} @ des⦄ ≡ i2 →
-                   i1 < d ∧ @⦃i1, des⦄ ≡ i2 ∨
-                   d ≤ i1 ∧ @⦃i1 + e, des⦄ ≡ i2.
-/2 width=3/ qed-.
-
-lemma at_inv_cons_lt: ∀des,d,e,i1,i2. @⦃i1, {d, e} @ des⦄ ≡ i2 →
-                      i1 < d → @⦃i1, des⦄ ≡ i2.
-#des #d #e #i1 #e2 #H
-elim (at_inv_cons … H) -H * // #Hdi1 #_ #Hi1d
-lapply (le_to_lt_to_lt … Hdi1 Hi1d) -Hdi1 -Hi1d #Hd
-elim (lt_refl_false … Hd)
-qed-.
-
-lemma at_inv_cons_ge: ∀des,d,e,i1,i2. @⦃i1, {d, e} @ des⦄ ≡ i2 →
-                      d ≤ i1 → @⦃i1 + e, des⦄ ≡ i2.
-#des #d #e #i1 #e2 #H
-elim (at_inv_cons … H) -H * // #Hi1d #_ #Hdi1
-lapply (le_to_lt_to_lt … Hdi1 Hi1d) -Hdi1 -Hi1d #Hd
-elim (lt_refl_false … Hd)
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/gr2_gr2.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/gr2_gr2.ma
deleted file mode 100644 (file)
index 20ce856..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/gr2.ma".
-
-(* GENERIC RELOCATION WITH PAIRS ********************************************)
-
-(* Main properties **********************************************************)
-
-theorem at_mono: ∀des,i,i1. @⦃i, des⦄ ≡ i1 → ∀i2. @⦃i, des⦄ ≡ i2 → i1 = i2.
-#des #i #i1 #H elim H -des -i -i1
-[ #i #x #H <(at_inv_nil … H) -x //
-| #des #d #e #i #i1 #Hid #_ #IHi1 #x #H
-  lapply (at_inv_cons_lt … H Hid) -H -Hid /2 width=1/
-| #des #d #e #i #i1 #Hdi #_ #IHi1 #x #H
-  lapply (at_inv_cons_ge … H Hdi) -H -Hdi /2 width=1/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/gr2_minus.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/gr2_minus.ma
deleted file mode 100644 (file)
index 6138548..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/gr2.ma".
-
-(* GENERIC RELOCATION WITH PAIRS ********************************************)
-
-inductive minuss: nat → relation (list2 nat nat) ≝
-| minuss_nil: ∀i. minuss i ⟠ ⟠ 
-| minuss_lt : ∀des1,des2,d,e,i. i < d → minuss i des1 des2 →
-              minuss i ({d, e} @ des1) ({d - i, e} @ des2)
-| minuss_ge : ∀des1,des2,d,e,i. d ≤ i → minuss (e + i) des1 des2 →
-              minuss i ({d, e} @ des1) des2
-.
-
-interpretation "minus (generic relocation with pairs)"
-   'RMinus des1 i des2 = (minuss i des1 des2).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact minuss_inv_nil1_aux: ∀des1,des2,i. des1 ▭ i ≡ des2 → des1 = ⟠ → des2 = ⟠.
-#des1 #des2 #i * -des1 -des2 -i
-[ //
-| #des1 #des2 #d #e #i #_ #_ #H destruct
-| #des1 #des2 #d #e #i #_ #_ #H destruct
-]
-qed.
-
-lemma minuss_inv_nil1: ∀des2,i. ⟠ ▭ i ≡ des2 → des2 = ⟠.
-/2 width=4/ qed-.
-
-fact minuss_inv_cons1_aux: ∀des1,des2,i. des1 ▭ i ≡ des2 →
-                           ∀d,e,des. des1 = {d, e} @ des →
-                           d ≤ i ∧ des ▭ e + i ≡ des2 ∨
-                           ∃∃des0. i < d & des ▭ i ≡ des0 &
-                                   des2 = {d - i, e} @ des0.
-#des1 #des2 #i * -des1 -des2 -i
-[ #i #d #e #des #H destruct 
-| #des1 #des #d1 #e1 #i1 #Hid1 #Hdes #d2 #e2 #des2 #H destruct /3 width=3/
-| #des1 #des #d1 #e1 #i1 #Hdi1 #Hdes #d2 #e2 #des2 #H destruct /3 width=1/
-]
-qed.
-
-lemma minuss_inv_cons1: ∀des1,des2,d,e,i. {d, e} @ des1 ▭ i ≡ des2 →
-                        d ≤ i ∧ des1 ▭ e + i ≡ des2 ∨
-                        ∃∃des. i < d & des1 ▭ i ≡ des &
-                               des2 = {d - i, e} @ des.
-/2 width=3/ qed-.
-
-lemma minuss_inv_cons1_ge: ∀des1,des2,d,e,i. {d, e} @ des1 ▭ i ≡ des2 →
-                           d ≤ i → des1 ▭ e + i ≡ des2.
-#des1 #des2 #d #e #i #H
-elim (minuss_inv_cons1 … H) -H * // #des #Hid #_ #_ #Hdi
-lapply (lt_to_le_to_lt … Hid Hdi) -Hid -Hdi #Hi
-elim (lt_refl_false … Hi)
-qed-.
-
-lemma minuss_inv_cons1_lt: ∀des1,des2,d,e,i. {d, e} @ des1 ▭ i ≡ des2 →
-                           i < d → 
-                           ∃∃des. des1 ▭ i ≡ des & des2 = {d - i, e} @ des.
-#des1 #des2 #d #e #i #H
-elim (minuss_inv_cons1 … H) -H * /2 width=3/ #Hdi #_ #Hid
-lapply (lt_to_le_to_lt … Hid Hdi) -Hid -Hdi #Hi
-elim (lt_refl_false … Hi)
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/gr2_plus.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/gr2_plus.ma
deleted file mode 100644 (file)
index bd8d1a9..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/gr2.ma".
-
-(* GENERIC RELOCATION WITH PAIRS ********************************************)
-
-let rec pluss (des:list2 nat nat) (i:nat) on des ≝ match des with
-[ nil2          ⇒ ⟠
-| cons2 d e des ⇒ {d + i, e} @ pluss des i
-].
-
-interpretation "plus (generic relocation with pairs)"
-   'plus x y = (pluss x y).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma pluss_inv_nil2: ∀i,des. des + i = ⟠ → des = ⟠.
-#i * // normalize
-#d #e #des #H destruct
-qed.
-
-lemma pluss_inv_cons2: ∀i,d,e,des2,des. des + i = {d, e} @ des2 →
-                       ∃∃des1. des1 + i = des2 & des = {d - i, e} @ des1.
-#i #d #e #des2 * normalize
-[ #H destruct
-| #d1 #e1 #des1 #H destruct /2 width=3/ 
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/ldrops.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/ldrops.ma
deleted file mode 100644 (file)
index b899bd2..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/ldrop.ma".
-include "basic_2/unfold/gr2_minus.ma".
-include "basic_2/unfold/lifts.ma".
-
-(* GENERIC LOCAL ENVIRONMENT SLICING ****************************************)
-
-inductive ldrops: list2 nat nat → relation lenv ≝
-| ldrops_nil : ∀L. ldrops ⟠ L L
-| ldrops_cons: ∀L1,L,L2,des,d,e.
-               ldrops des L1 L → ⇩[d,e] L ≡ L2 → ldrops ({d, e} @ des) L1 L2
-.
-
-interpretation "generic local environment slicing"
-   'RDropStar des T1 T2 = (ldrops des T1 T2).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact ldrops_inv_nil_aux: ∀L1,L2,des. ⇩*[des] L1 ≡ L2 → des = ⟠ → L1 = L2.
-#L1 #L2 #des * -L1 -L2 -des //
-#L1 #L #L2 #d #e #des #_ #_ #H destruct
-qed.
-
-(* Basic_1: was: drop1_gen_pnil *)
-lemma ldrops_inv_nil: ∀L1,L2. ⇩*[⟠] L1 ≡ L2 → L1 = L2.
-/2 width=3/ qed-.
-
-fact ldrops_inv_cons_aux: ∀L1,L2,des. ⇩*[des] L1 ≡ L2 →
-                          ∀d,e,tl. des = {d, e} @ tl →
-                          ∃∃L. ⇩*[tl] L1 ≡ L & ⇩[d, e] L ≡ L2.
-#L1 #L2 #des * -L1 -L2 -des
-[ #L #d #e #tl #H destruct
-| #L1 #L #L2 #des #d #e #HT1 #HT2 #hd #he #tl #H destruct
-  /2 width=3/
-qed.
-
-(* Basic_1: was: drop1_gen_pcons *)
-lemma ldrops_inv_cons: ∀L1,L2,d,e,des. ⇩*[{d, e} @ des] L1 ≡ L2 →
-                       ∃∃L. ⇩*[des] L1 ≡ L & ⇩[d, e] L ≡ L2.
-/2 width=3/ qed-.
-
-lemma ldrops_inv_skip2: ∀I,des,i,des2. des ▭ i ≡ des2 →
-                        ∀L1,K2,V2. ⇩*[des2] L1 ≡ K2. ⓑ{I} V2 →
-                        ∃∃K1,V1,des1. des + 1 ▭ i + 1 ≡ des1 + 1 &
-                                      ⇩*[des1] K1 ≡ K2 &
-                                      ⇧*[des1] V2 ≡ V1 &
-                                      L1 = K1. ⓑ{I} V1.
-#I #des #i #des2 #H elim H -des -i -des2
-[ #i #L1 #K2 #V2 #H
-  >(ldrops_inv_nil … H) -L1 /2 width=7/
-| #des #des2 #d #e #i #Hid #_ #IHdes2 #L1 #K2 #V2 #H
-  elim (ldrops_inv_cons … H) -H #L #HL1 #H
-  elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ #K #V >minus_plus #HK2 #HV2 #H destruct
-  elim (IHdes2 … HL1) -IHdes2 -HL1 #K1 #V1 #des1 #Hdes1 #HK1 #HV1 #X destruct
-  @(ex4_3_intro … K1 V1 … ) // [3,4: /2 width=7/ | skip ]
-  normalize >plus_minus // @minuss_lt // /2 width=1/ (**) (* explicit constructors, /3 width=1/ is a bit slow *)
-| #des #des2 #d #e #i #Hid #_ #IHdes2 #L1 #K2 #V2 #H
-  elim (IHdes2 … H) -IHdes2 -H #K1 #V1 #des1 #Hdes1 #HK1 #HV1 #X destruct
-  /4 width=7/
-]
-qed-.
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was: drop1_skip_bind *)
-lemma ldrops_skip: ∀L1,L2,des. ⇩*[des] L1 ≡ L2 → ∀V1,V2. ⇧*[des] V2 ≡ V1 →
-                   ∀I. ⇩*[des + 1] L1. ⓑ{I} V1 ≡ L2. ⓑ{I} V2.
-#L1 #L2 #des #H elim H -L1 -L2 -des
-[ #L #V1 #V2 #HV12 #I
-  >(lifts_inv_nil … HV12) -HV12 //
-| #L1 #L #L2 #des #d #e #_ #HL2 #IHL #V1 #V2 #H #I
-  elim (lifts_inv_cons … H) -H /3 width=5/
-].
-qed.
-
-(* Basic_1: removed theorems 1: drop1_getl_trans
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/ldrops_ldrop.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/ldrops_ldrop.ma
deleted file mode 100644 (file)
index 6ca2f73..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/ldrop_ldrop.ma".
-include "basic_2/unfold/ldrops.ma".
-
-(* GENERIC LOCAL ENVIRONMENT SLICING ****************************************)
-
-(* Properties concerning basic local environment slicing ********************)
-
-lemma ldrops_ldrop_trans: ∀L1,L,des. ⇩*[des] L1 ≡ L → ∀L2,i. ⇩[0, i] L ≡ L2 →
-                          ∃∃L0,des0,i0. ⇩[0, i0] L1 ≡ L0 & ⇩*[des0] L0 ≡ L2 &
-                                        @⦃i, des⦄ ≡ i0 & des ▭ i ≡ des0.
-#L1 #L #des #H elim H -L1 -L -des
-[ /2 width=7/
-| #L1 #L3 #L #des3 #d #e #_ #HL3 #IHL13 #L2 #i #HL2
-  elim (lt_or_ge i d) #Hid
-  [ elim (ldrop_trans_le … HL3 … HL2 ?) -L /2 width=2/ #L #HL3 #HL2
-    elim (IHL13 … HL3) -L3 /3 width=7/
-  | lapply (ldrop_trans_ge … HL3 … HL2 ?) -L // #HL32
-    elim (IHL13 … HL32) -L3 /3 width=7/
-  ]
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/ldrops_ldrops.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/ldrops_ldrops.ma
deleted file mode 100644 (file)
index 7709561..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/ldrops_ldrop.ma".
-
-(* GENERIC LOCAL ENVIRONMENT SLICING ****************************************)
-
-(* Main properties **********************************************************)
-
-(* Basic_1: was: drop1_trans *)
-theorem ldrops_trans: ∀L,L2,des2. ⇩*[des2] L ≡ L2 → ∀L1,des1. ⇩*[des1] L1 ≡ L →
-                      ⇩*[des2 @@ des1] L1 ≡ L2.
-#L #L2 #des2 #H elim H -L -L2 -des2 // /3 width=3/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/lifts.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/lifts.ma
deleted file mode 100644 (file)
index 40158ac..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/lift.ma".
-include "basic_2/unfold/gr2_plus.ma".
-
-(* GENERIC TERM RELOCATION **************************************************)
-
-inductive lifts: list2 nat nat → relation term ≝
-| lifts_nil : ∀T. lifts ⟠ T T
-| lifts_cons: ∀T1,T,T2,des,d,e.
-              ⇧[d,e] T1 ≡ T → lifts des T T2 → lifts ({d, e} @ des) T1 T2
-.
-
-interpretation "generic relocation (term)"
-   'RLiftStar des T1 T2 = (lifts des T1 T2).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact lifts_inv_nil_aux: ∀T1,T2,des. ⇧*[des] T1 ≡ T2 → des = ⟠ → T1 = T2.
-#T1 #T2 #des * -T1 -T2 -des //
-#T1 #T #T2 #d #e #des #_ #_ #H destruct
-qed.
-
-lemma lifts_inv_nil: ∀T1,T2. ⇧*[⟠] T1 ≡ T2 → T1 = T2.
-/2 width=3/ qed-.
-
-fact lifts_inv_cons_aux: ∀T1,T2,des. ⇧*[des] T1 ≡ T2 →
-                         ∀d,e,tl. des = {d, e} @ tl →
-                         ∃∃T. ⇧[d, e] T1 ≡ T & ⇧*[tl] T ≡ T2.
-#T1 #T2 #des * -T1 -T2 -des
-[ #T #d #e #tl #H destruct
-| #T1 #T #T2 #des #d #e #HT1 #HT2 #hd #he #tl #H destruct
-  /2 width=3/
-qed.
-
-lemma lifts_inv_cons: ∀T1,T2,d,e,des. ⇧*[{d, e} @ des] T1 ≡ T2 →
-                      ∃∃T. ⇧[d, e] T1 ≡ T & ⇧*[des] T ≡ T2.
-/2 width=3/ qed-.
-
-(* Basic_1: was: lift1_sort *)
-lemma lifts_inv_sort1: ∀T2,k,des. ⇧*[des] ⋆k ≡ T2 → T2 = ⋆k.
-#T2 #k #des elim des -des
-[ #H <(lifts_inv_nil … H) -H //
-| #d #e #des #IH #H
-  elim (lifts_inv_cons … H) -H #X #H
-  >(lift_inv_sort1 … H) -H /2 width=1/
-]
-qed-.
-
-(* Basic_1: was: lift1_lref *)
-lemma lifts_inv_lref1: ∀T2,des,i1. ⇧*[des] #i1 ≡ T2 →
-                       ∃∃i2. @⦃i1, des⦄ ≡ i2 & T2 = #i2.
-#T2 #des elim des -des
-[ #i1 #H <(lifts_inv_nil … H) -H /2 width=3/
-| #d #e #des #IH #i1 #H
-  elim (lifts_inv_cons … H) -H #X #H1 #H2
-  elim (lift_inv_lref1 … H1) -H1 * #Hdi1 #H destruct
-  elim (IH … H2) -IH -H2 /3 width=3/
-]
-qed-.
-
-lemma lifts_inv_gref1: ∀T2,p,des. ⇧*[des] §p ≡ T2 → T2 = §p.
-#T2 #p #des elim des -des
-[ #H <(lifts_inv_nil … H) -H //
-| #d #e #des #IH #H
-  elim (lifts_inv_cons … H) -H #X #H
-  >(lift_inv_gref1 … H) -H /2 width=1/
-]
-qed-.
-
-(* Basic_1: was: lift1_bind *)
-lemma lifts_inv_bind1: ∀a,I,T2,des,V1,U1. ⇧*[des] ⓑ{a,I} V1. U1 ≡ T2 →
-                       ∃∃V2,U2. ⇧*[des] V1 ≡ V2 & ⇧*[des + 1] U1 ≡ U2 &
-                                T2 = ⓑ{a,I} V2. U2.
-#a #I #T2 #des elim des -des
-[ #V1 #U1 #H
-  <(lifts_inv_nil … H) -H /2 width=5/
-| #d #e #des #IHdes #V1 #U1 #H
-  elim (lifts_inv_cons … H) -H #X #H #HT2
-  elim (lift_inv_bind1 … H) -H #V #U #HV1 #HU1 #H destruct
-  elim (IHdes … HT2) -IHdes -HT2 #V2 #U2 #HV2 #HU2 #H destruct
-  /3 width=5/
-]
-qed-.
-
-(* Basic_1: was: lift1_flat *)
-lemma lifts_inv_flat1: ∀I,T2,des,V1,U1. ⇧*[des] ⓕ{I} V1. U1 ≡ T2 →
-                       ∃∃V2,U2. ⇧*[des] V1 ≡ V2 & ⇧*[des] U1 ≡ U2 &
-                                T2 = ⓕ{I} V2. U2.
-#I #T2 #des elim des -des
-[ #V1 #U1 #H
-  <(lifts_inv_nil … H) -H /2 width=5/
-| #d #e #des #IHdes #V1 #U1 #H
-  elim (lifts_inv_cons … H) -H #X #H #HT2
-  elim (lift_inv_flat1 … H) -H #V #U #HV1 #HU1 #H destruct
-  elim (IHdes … HT2) -IHdes -HT2 #V2 #U2 #HV2 #HU2 #H destruct
-  /3 width=5/
-]
-qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma lifts_simple_dx: ∀T1,T2,des. ⇧*[des] T1 ≡ T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄.
-#T1 #T2 #des #H elim H -T1 -T2 -des // /3 width=5 by lift_simple_dx/
-qed-.
-
-lemma lifts_simple_sn: ∀T1,T2,des. ⇧*[des] T1 ≡ T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄.
-#T1 #T2 #des #H elim H -T1 -T2 -des // /3 width=5 by lift_simple_sn/
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma lifts_bind: ∀a,I,T2,V1,V2,des. ⇧*[des] V1 ≡ V2 →
-                  ∀T1. ⇧*[des + 1] T1 ≡ T2 →
-                  ⇧*[des] ⓑ{a,I} V1. T1 ≡ ⓑ{a,I} V2. T2.
-#a #I #T2 #V1 #V2 #des #H elim H -V1 -V2 -des
-[ #V #T1 #H >(lifts_inv_nil … H) -H //
-| #V1 #V #V2 #des #d #e #HV1 #_ #IHV #T1 #H
-  elim (lifts_inv_cons … H) -H /3 width=3/
-]
-qed.
-
-lemma lifts_flat: ∀I,T2,V1,V2,des. ⇧*[des] V1 ≡ V2 →
-                  ∀T1. ⇧*[des] T1 ≡ T2 →
-                  ⇧*[des] ⓕ{I} V1. T1 ≡ ⓕ{I} V2. T2.
-#I #T2 #V1 #V2 #des #H elim H -V1 -V2 -des
-[ #V #T1 #H >(lifts_inv_nil … H) -H //
-| #V1 #V #V2 #des #d #e #HV1 #_ #IHV #T1 #H
-  elim (lifts_inv_cons … H) -H /3 width=3/
-]
-qed.
-
-lemma lifts_total: ∀des,T1. ∃T2. ⇧*[des] T1 ≡ T2.
-#des elim des -des /2 width=2/
-#d #e #des #IH #T1
-elim (lift_total T1 d e) #T #HT1
-elim (IH T) -IH /3 width=4/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/lifts_lift.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/lifts_lift.ma
deleted file mode 100644 (file)
index 6ad3ff0..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/lift_lift.ma".
-include "basic_2/unfold/gr2_minus.ma".
-include "basic_2/unfold/lifts.ma".
-
-(* GENERIC TERM RELOCATION **************************************************)
-
-(* Properties concerning basic term relocation ******************************)
-
-(* Basic_1: was: lift1_xhg (right to left) *)
-lemma lifts_lift_trans_le: ∀T1,T,des. ⇧*[des] T1 ≡ T → ∀T2. ⇧[0, 1] T ≡ T2 →
-                           ∃∃T0. ⇧[0, 1] T1 ≡ T0 & ⇧*[des + 1] T0 ≡ T2.
-#T1 #T #des #H elim H -T1 -T -des
-[ /2 width=3/
-| #T1 #T3 #T #des #d #e #HT13 #_ #IHT13 #T2 #HT2
-  elim (IHT13 … HT2) -T #T #HT3 #HT2
-  elim (lift_trans_le … HT13 … HT3 ?) -T3 // /3 width=5/
-]
-qed-.
-
-(* Basic_1: was: lift1_free (right to left) *)
-lemma lifts_lift_trans: ∀des,i,i0. @⦃i, des⦄ ≡ i0 → 
-                        ∀des0. des + 1 ▭ i + 1 ≡ des0 + 1 →
-                        ∀T1,T0. ⇧*[des0] T1 ≡ T0 →
-                        ∀T2. ⇧[O, i0 + 1] T0 ≡ T2 →
-                        ∃∃T. ⇧[0, i + 1] T1 ≡ T & ⇧*[des] T ≡ T2.
-#des elim des -des normalize
-[ #i #x #H1 #des0 #H2 #T1 #T0 #HT10 #T2
-  <(at_inv_nil … H1) -x #HT02
-  lapply (minuss_inv_nil1 … H2) -H2 #H
-  >(pluss_inv_nil2 … H) in HT10; -des0 #H
-  >(lifts_inv_nil … H) -T1 /2 width=3/
-| #d #e #des #IHdes #i #i0 #H1 #des0 #H2 #T1 #T0 #HT10 #T2 #HT02
-  elim (at_inv_cons … H1) -H1 * #Hid #Hi0
-  [ elim (minuss_inv_cons1_lt … H2 ?) -H2 [2: /2 width=1/ ] #des1 #Hdes1 <minus_le_minus_minus_comm // <minus_plus_m_m #H
-    elim (pluss_inv_cons2 … H) -H #des2 #H1 #H2 destruct
-    elim (lifts_inv_cons … HT10) -HT10 #T >minus_plus #HT1 #HT0
-    elim (IHdes … Hi0 … Hdes1 … HT0 … HT02) -IHdes -Hi0 -Hdes1 -T0 #T0 #HT0 #HT02
-    elim (lift_trans_le … HT1 … HT0 ?) -T /2 width=1/ #T #HT1 <plus_minus_m_m /2 width=1/ /3 width=5/
-  | >commutative_plus in Hi0; #Hi0
-    lapply (minuss_inv_cons1_ge … H2 ?) -H2 [ /2 width=1/ ] <associative_plus #Hdes0
-    elim (IHdes … Hi0 … Hdes0 … HT10 … HT02) -IHdes -Hi0 -Hdes0 -T0 #T0 #HT0 #HT02
-    elim (lift_split … HT0 d (i+1) ? ? ?) -HT0 /2 width=1/ /3 width=5/
-  ]
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/lifts_lift_vector.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/lifts_lift_vector.ma
deleted file mode 100644 (file)
index bbd3b1d..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/lift_lift_vector.ma".
-include "basic_2/unfold/lifts_lift.ma".
-include "basic_2/unfold/lifts_vector.ma".
-
-(* GENERIC RELOCATION *******************************************************)
-
-(* Main properties **********************************************************)
-
-(* Basic_1: was: lifts1_xhg (right to left) *)
-lemma liftsv_liftv_trans_le: ∀T1s,Ts,des. ⇧*[des] T1s ≡ Ts →
-                             ∀T2s:list term. ⇧[0, 1] Ts ≡ T2s →
-                             ∃∃T0s. ⇧[0, 1] T1s ≡ T0s & ⇧*[des + 1] T0s ≡ T2s. 
-#T1s #Ts #des #H elim H -T1s -Ts
-[ #T1s #H
-  >(liftv_inv_nil1 … H) -T1s /2 width=3/
-| #T1s #Ts #T1 #T #HT1 #_ #IHT1s #X #H
-  elim (liftv_inv_cons1 … H) -H #T2 #T2s #HT2 #HT2s #H destruct
-  elim (IHT1s … HT2s) -Ts #Ts #HT1s #HT2s
-  elim (lifts_lift_trans_le … HT1 … HT2) -T /3 width=5/
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/lifts_lifts.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/lifts_lifts.ma
deleted file mode 100644 (file)
index 72948f0..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/lifts_lift.ma".
-
-(* GENERIC RELOCATION *******************************************************)
-
-(* Main properties **********************************************************)
-
-(* Basic_1: was: lift1_lift1 (left to right) *)
-theorem lifts_trans: ∀T1,T,des1. ⇧*[des1] T1 ≡ T → ∀T2:term. ∀des2. ⇧*[des2] T ≡ T2 →
-                     ⇧*[des1 @@ des2] T1 ≡ T2.
-#T1 #T #des1 #H elim H -T1 -T -des1 // /3 width=3/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/lifts_vector.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/lifts_vector.ma
deleted file mode 100644 (file)
index 9ea173a..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/lift_vector.ma".
-include "basic_2/unfold/lifts.ma".
-
-(* GENERIC TERM VECTOR RELOCATION *******************************************)
-
-inductive liftsv (des:list2 nat nat) : relation (list term) ≝
-| liftsv_nil : liftsv des ◊ ◊
-| liftsv_cons: ∀T1s,T2s,T1,T2.
-               ⇧*[des] T1 ≡ T2 → liftsv des T1s T2s →
-               liftsv des (T1 @ T1s) (T2 @ T2s)
-.
-
-interpretation "generic relocation (vector)"
-   'RLiftStar des T1s T2s = (liftsv des T1s T2s).
-
-(* Basic inversion lemmas ***************************************************)
-
-(* Basic_1: was: lifts1_flat (left to right) *)
-lemma lifts_inv_applv1: ∀V1s,U1,T2,des. ⇧*[des] Ⓐ V1s. U1 ≡ T2 →
-                        ∃∃V2s,U2. ⇧*[des] V1s ≡ V2s & ⇧*[des] U1 ≡ U2 &
-                                  T2 = Ⓐ V2s. U2.
-#V1s elim V1s -V1s normalize
-[ #T1 #T2 #des #HT12
-  @(ex3_2_intro) [3,4: // |1,2: skip | // ] (**) (* explicit constructor *)
-| #V1 #V1s #IHV1s #T1 #X #des #H
-  elim (lifts_inv_flat1 … H) -H #V2 #Y #HV12 #HY #H destruct
-  elim (IHV1s … HY) -IHV1s -HY #V2s #T2 #HV12s #HT12 #H destruct
-  @(ex3_2_intro) [4: // |3: /2 width=2/ |1,2: skip | // ] (**) (* explicit constructor *)
-]
-qed-.
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was: lifts1_flat (right to left) *)
-lemma lifts_applv: ∀V1s,V2s,des. ⇧*[des] V1s ≡ V2s →
-                   ∀T1,T2. ⇧*[des] T1 ≡ T2 →
-                   ⇧*[des] Ⓐ V1s. T1 ≡ Ⓐ V2s. T2.
-#V1s #V2s #des #H elim H -V1s -V2s // /3 width=1/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_dx.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_dx.ma
deleted file mode 100644 (file)
index 6ba09b9..0000000
+++ /dev/null
@@ -1,274 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/tpss.ma".
-
-(* DX PARALLEL UNFOLD ON LOCAL ENVIRONMENTS *********************************)
-
-(* Basic_1: includes: csubst1_bind *)
-inductive ltpss_dx: nat → nat → relation lenv ≝
-| ltpss_dx_atom : ∀d,e. ltpss_dx d e (⋆) (⋆)
-| ltpss_dx_pair : ∀L,I,V. ltpss_dx 0 0 (L. ⓑ{I} V) (L. ⓑ{I} V)
-| ltpss_dx_tpss2: ∀L1,L2,I,V1,V2,e.
-                  ltpss_dx 0 e L1 L2 → L2 ⊢ V1 ▶* [0, e] V2 →
-                  ltpss_dx 0 (e + 1) (L1. ⓑ{I} V1) (L2. ⓑ{I} V2)
-| ltpss_dx_tpss1: ∀L1,L2,I,V1,V2,d,e.
-                  ltpss_dx d e L1 L2 → L2 ⊢ V1 ▶* [d, e] V2 →
-                  ltpss_dx (d + 1) e (L1. ⓑ{I} V1) (L2. ⓑ{I} V2)
-.
-
-interpretation "parallel unfold (local environment, dx variant)"
-   'PSubstStar L1 d e L2 = (ltpss_dx d e L1 L2).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact ltpss_dx_inv_refl_O2_aux: ∀d,e,L1,L2. L1 ▶* [d, e] L2 → e = 0 → L1 = L2.
-#d #e #L1 #L2 #H elim H -d -e -L1 -L2 //
-[ #L1 #L2 #I #V1 #V2 #e #_ #_ #_ >commutative_plus normalize #H destruct
-| #L1 #L2 #I #V1 #V2 #d #e #_ #HV12 #IHL12 #He destruct
-  >(IHL12 ?) -IHL12 // >(tpss_inv_refl_O2 … HV12) //
-]
-qed.
-
-lemma ltpss_dx_inv_refl_O2: ∀d,L1,L2. L1 ▶* [d, 0] L2 → L1 = L2.
-/2 width=4/ qed-.
-
-fact ltpss_dx_inv_atom1_aux: ∀d,e,L1,L2.
-                             L1 ▶* [d, e] L2 → L1 = ⋆ → L2 = ⋆.
-#d #e #L1 #L2 * -d -e -L1 -L2
-[ //
-| #L #I #V #H destruct
-| #L1 #L2 #I #V1 #V2 #e #_ #_ #H destruct
-| #L1 #L2 #I #V1 #V2 #d #e #_ #_ #H destruct
-]
-qed.
-
-lemma ltpss_dx_inv_atom1: ∀d,e,L2. ⋆ ▶* [d, e] L2 → L2 = ⋆.
-/2 width=5/ qed-.
-
-fact ltpss_dx_inv_tpss21_aux: ∀d,e,L1,L2. L1 ▶* [d, e] L2 → d = 0 → 0 < e →
-                              ∀K1,I,V1. L1 = K1. ⓑ{I} V1 →
-                              ∃∃K2,V2. K1 ▶* [0, e - 1] K2 &
-                                       K2 ⊢ V1 ▶* [0, e - 1] V2 &
-                                       L2 = K2. ⓑ{I} V2.
-#d #e #L1 #L2 * -d -e -L1 -L2
-[ #d #e #_ #_ #K1 #I #V1 #H destruct
-| #L1 #I #V #_ #H elim (lt_refl_false … H)
-| #L1 #L2 #I #V1 #V2 #e #HL12 #HV12 #_ #_ #K1 #J #W1 #H destruct /2 width=5/
-| #L1 #L2 #I #V1 #V2 #d #e #_ #_ >commutative_plus normalize #H destruct
-]
-qed.
-
-lemma ltpss_dx_inv_tpss21: ∀e,K1,I,V1,L2. K1. ⓑ{I} V1 ▶* [0, e] L2 → 0 < e →
-                           ∃∃K2,V2. K1 ▶* [0, e - 1] K2 &
-                                    K2 ⊢ V1 ▶* [0, e - 1] V2 &
-                                    L2 = K2. ⓑ{I} V2.
-/2 width=5/ qed-.
-
-fact ltpss_dx_inv_tpss11_aux: ∀d,e,L1,L2. L1 ▶* [d, e] L2 → 0 < d →
-                              ∀I,K1,V1. L1 = K1. ⓑ{I} V1 →
-                              ∃∃K2,V2. K1 ▶* [d - 1, e] K2 &
-                                       K2 ⊢ V1 ▶* [d - 1, e] V2 &
-                                       L2 = K2. ⓑ{I} V2.
-#d #e #L1 #L2 * -d -e -L1 -L2
-[ #d #e #_ #I #K1 #V1 #H destruct
-| #L #I #V #H elim (lt_refl_false … H)
-| #L1 #L2 #I #V1 #V2 #e #_ #_ #H elim (lt_refl_false … H)
-| #L1 #L2 #I #V1 #V2 #d #e #HL12 #HV12 #_ #J #K1 #W1 #H destruct /2 width=5/
-]
-qed.
-
-lemma ltpss_dx_inv_tpss11: ∀d,e,I,K1,V1,L2. K1. ⓑ{I} V1 ▶* [d, e] L2 → 0 < d →
-                           ∃∃K2,V2. K1 ▶* [d - 1, e] K2 &
-                                    K2 ⊢ V1 ▶* [d - 1, e] V2 &
-                                    L2 = K2. ⓑ{I} V2.
-/2 width=3/ qed-.
-
-fact ltpss_dx_inv_atom2_aux: ∀d,e,L1,L2.
-                             L1 ▶* [d, e] L2 → L2 = ⋆ → L1 = ⋆.
-#d #e #L1 #L2 * -d -e -L1 -L2
-[ //
-| #L #I #V #H destruct
-| #L1 #L2 #I #V1 #V2 #e #_ #_ #H destruct
-| #L1 #L2 #I #V1 #V2 #d #e #_ #_ #H destruct
-]
-qed.
-
-lemma ltpss_dx_inv_atom2: ∀d,e,L1. L1 ▶* [d, e] ⋆ → L1 = ⋆.
-/2 width=5/ qed-.
-
-fact ltpss_dx_inv_tpss22_aux: ∀d,e,L1,L2. L1 ▶* [d, e] L2 → d = 0 → 0 < e →
-                              ∀K2,I,V2. L2 = K2. ⓑ{I} V2 →
-                              ∃∃K1,V1. K1 ▶* [0, e - 1] K2 &
-                                       K2 ⊢ V1 ▶* [0, e - 1] V2 &
-                                       L1 = K1. ⓑ{I} V1.
-#d #e #L1 #L2 * -d -e -L1 -L2
-[ #d #e #_ #_ #K1 #I #V1 #H destruct
-| #L1 #I #V #_ #H elim (lt_refl_false … H)
-| #L1 #L2 #I #V1 #V2 #e #HL12 #HV12 #_ #_ #K2 #J #W2 #H destruct /2 width=5/
-| #L1 #L2 #I #V1 #V2 #d #e #_ #_ >commutative_plus normalize #H destruct
-]
-qed.
-
-lemma ltpss_dx_inv_tpss22: ∀e,L1,K2,I,V2. L1 ▶* [0, e] K2. ⓑ{I} V2 → 0 < e →
-                           ∃∃K1,V1. K1 ▶* [0, e - 1] K2 &
-                                    K2 ⊢ V1 ▶* [0, e - 1] V2 &
-                                    L1 = K1. ⓑ{I} V1.
-/2 width=5/ qed-.
-
-fact ltpss_dx_inv_tpss12_aux: ∀d,e,L1,L2. L1 ▶* [d, e] L2 → 0 < d →
-                              ∀I,K2,V2. L2 = K2. ⓑ{I} V2 →
-                              ∃∃K1,V1. K1 ▶* [d - 1, e] K2 &
-                                       K2 ⊢ V1 ▶* [d - 1, e] V2 &
-                                       L1 = K1. ⓑ{I} V1.
-#d #e #L1 #L2 * -d -e -L1 -L2
-[ #d #e #_ #I #K2 #V2 #H destruct
-| #L #I #V #H elim (lt_refl_false … H)
-| #L1 #L2 #I #V1 #V2 #e #_ #_ #H elim (lt_refl_false … H)
-| #L1 #L2 #I #V1 #V2 #d #e #HL12 #HV12 #_ #J #K2 #W2 #H destruct /2 width=5/
-]
-qed.
-
-lemma ltpss_dx_inv_tpss12: ∀L1,K2,I,V2,d,e. L1 ▶* [d, e] K2. ⓑ{I} V2 → 0 < d →
-                           ∃∃K1,V1. K1 ▶* [d - 1, e] K2 &
-                                    K2 ⊢ V1 ▶* [d - 1, e] V2 &
-                                    L1 = K1. ⓑ{I} V1.
-/2 width=3/ qed-.
-
-(* Basic properties *********************************************************)
-
-lemma ltpss_dx_tps2: ∀L1,L2,I,V1,V2,e.
-                     L1 ▶* [0, e] L2 → L2 ⊢ V1 ▶ [0, e] V2 →
-                     L1. ⓑ{I} V1 ▶* [0, e + 1] L2. ⓑ{I} V2.
-/3 width=1/ qed.
-
-lemma ltpss_dx_tps1: ∀L1,L2,I,V1,V2,d,e.
-                     L1 ▶* [d, e] L2 → L2 ⊢ V1 ▶ [d, e] V2 →
-                     L1. ⓑ{I} V1 ▶* [d + 1, e] L2. ⓑ{I} V2.
-/3 width=1/ qed.
-
-lemma ltpss_dx_tpss2_lt: ∀L1,L2,I,V1,V2,e.
-                         L1 ▶* [0, e - 1] L2 → L2 ⊢ V1 ▶* [0, e - 1] V2 →
-                         0 < e → L1. ⓑ{I} V1 ▶* [0, e] L2. ⓑ{I} V2.
-#L1 #L2 #I #V1 #V2 #e #HL12 #HV12 #He
->(plus_minus_m_m e 1) /2 width=1/
-qed.
-
-lemma ltpss_dx_tpss1_lt: ∀L1,L2,I,V1,V2,d,e.
-                         L1 ▶* [d - 1, e] L2 → L2 ⊢ V1 ▶* [d - 1, e] V2 →
-                         0 < d → L1. ⓑ{I} V1 ▶* [d, e] L2. ⓑ{I} V2.
-#L1 #L2 #I #V1 #V2 #d #e #HL12 #HV12 #Hd
->(plus_minus_m_m d 1) /2 width=1/
-qed.
-
-lemma ltpss_dx_tps2_lt: ∀L1,L2,I,V1,V2,e.
-                        L1 ▶* [0, e - 1] L2 → L2 ⊢ V1 ▶ [0, e - 1] V2 →
-                        0 < e → L1. ⓑ{I} V1 ▶* [0, e] L2. ⓑ{I} V2.
-/3 width=1/ qed.
-
-lemma ltpss_dx_tps1_lt: ∀L1,L2,I,V1,V2,d,e.
-                        L1 ▶* [d - 1, e] L2 → L2 ⊢ V1 ▶ [d - 1, e] V2 →
-                        0 < d → L1. ⓑ{I} V1 ▶* [d, e] L2. ⓑ{I} V2.
-/3 width=1/ qed.
-
-(* Basic_1: was by definition: csubst1_refl *)
-lemma ltpss_dx_refl: ∀L,d,e. L ▶* [d, e] L.
-#L elim L -L //
-#L #I #V #IHL * /2 width=1/ * /2 width=1/
-qed.
-
-lemma ltpss_dx_weak: ∀L1,L2,d1,e1. L1 ▶* [d1, e1] L2 →
-                     ∀d2,e2. d2 ≤ d1 → d1 + e1 ≤ d2 + e2 → L1 ▶* [d2, e2] L2.
-#L1 #L2 #d1 #e1 #H elim H -L1 -L2 -d1 -e1 //
-[ #L1 #L2 #I #V1 #V2 #e1 #_ #HV12 #IHL12 #d2 #e2 #Hd2 #Hde2
-  lapply (le_n_O_to_eq … Hd2) #H destruct normalize in Hde2;
-  lapply (lt_to_le_to_lt 0 … Hde2) // #He2
-  lapply (le_plus_to_minus_r … Hde2) -Hde2 /3 width=5/
-| #L1 #L2 #I #V1 #V2 #d1 #e1 #_ #HV12 #IHL12 #d2 #e2 #Hd21 #Hde12
-  >plus_plus_comm_23 in Hde12; #Hde12
-  elim (le_to_or_lt_eq 0 d2 ?) // #H destruct
-  [ lapply (le_plus_to_minus_r … Hde12) -Hde12 <plus_minus // #Hde12
-    lapply (le_plus_to_minus … Hd21) -Hd21 #Hd21 /3 width=5/
-  | -Hd21 normalize in Hde12;
-    lapply (lt_to_le_to_lt 0 … Hde12) // #He2
-    lapply (le_plus_to_minus_r … Hde12) -Hde12
-    /3 width=5 by ltpss_dx_tpss2_lt, tpss_weak/ (**) (* /3 width=5/ used to work *)
-  ]
-]
-qed.
-
-lemma ltpss_dx_weak_all: ∀L1,L2,d,e. L1 ▶* [d, e] L2 → L1 ▶* [0, |L2|] L2.
-#L1 #L2 #d #e #H elim H -L1 -L2 -d -e
-// /3 width=2/ /3 width=3/
-qed.
-
-fact ltpss_dx_append_le_aux: ∀K1,K2,d,x. K1 ▶* [d, x] K2 → x = |K1| - d →
-                             ∀L1,L2,e. L1 ▶* [0, e] L2 → d ≤ |K1| →
-                             L1 @@ K1 ▶* [d, x + e] L2 @@ K2.
-#K1 #K2 #d #x #H elim H -K1 -K2 -d -x
-[ #d #x #H1 #L1 #L2 #e #HL12 #H2 destruct
-  lapply (le_n_O_to_eq … H2) -H2 #H destruct //
-| #K #I #V <minus_n_O normalize <plus_n_Sm #H destruct
-| #K1 #K2 #I #V1 #V2 #x #_ #HV12 <minus_n_O #IHK12 <minus_n_O #H #L1 #L2 #e #HL12 #_
-  lapply (injective_plus_l … H) -H #H destruct >plus_plus_comm_23
-  /4 width=5 by ltpss_dx_tpss2, tpss_append, tpss_weak, monotonic_le_plus_r/ (**) (* too slow without trace *)
-| #K1 #K2 #I #V1 #V2 #d #x #_ #HV12 #IHK12 normalize <minus_le_minus_minus_comm // <minus_plus_m_m #H1 #L1 #L2 #e #HL12 #H2 destruct
-  lapply (le_plus_to_le_r … H2) -H2 #Hd
-  /4 width=5 by ltpss_dx_tpss1, tpss_append, tpss_weak, monotonic_le_plus_r/ (**) (* too slow without trace *)
-]
-qed-.
-
-lemma ltpss_dx_append_le: ∀K1,K2,d. K1 ▶* [d, |K1| - d] K2 →
-                          ∀L1,L2,e. L1 ▶* [0, e] L2 → d ≤ |K1| →
-                          L1 @@ K1 ▶* [d, |K1| - d + e] L2 @@ K2.
-/2 width=1 by ltpss_dx_append_le_aux/ qed.
-
-lemma ltpss_dx_append_zero: ∀K1,K2. K1 ▶* [0, |K1|] K2 →
-                            ∀L1,L2,e. L1 ▶* [0, e] L2 →
-                            L1 @@ K1 ▶* [0, |K1| + e] L2 @@ K2.
-/2 width=1/ qed.
-
-lemma ltpss_dx_append_ge: ∀K1,K2,d,e. K1 ▶* [d, e] K2 →
-                          ∀L1,L2. L1 ▶* [d - |K1|, e] L2 → |K1| ≤ d →
-                          L1 @@ K1 ▶* [d, e] L2 @@ K2.
-#K1 #K2 #d #e #H elim H -K1 -K2 -d -e
-[ #d #e #L1 #L2 <minus_n_O //
-| #K #I #V #L1 #L2 #_ #H 
-  lapply (le_n_O_to_eq … H) -H normalize <plus_n_Sm #H destruct
-| #K1 #K2 #I #V1 #V2 #e #_ #_ #_ #L1 #L2 #_ #H
-  lapply (le_n_O_to_eq … H) -H normalize <plus_n_Sm #H destruct
-| #K1 #K2 #I #V1 #V2 #d #e #_ #HV12 #IHK12 #L1 #L2
-  normalize <minus_le_minus_minus_comm // <minus_plus_m_m #HL12 #H
-  lapply (le_plus_to_le_r … H) -H /3 width=1/
-]
-qed.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma ltpss_dx_fwd_length: ∀L1,L2,d,e. L1 ▶* [d, e] L2 → |L1| = |L2|.
-#L1 #L2 #d #e #H elim H -L1 -L2 -d -e
-normalize //
-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
-*)
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_dx_ldrop.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_dx_ldrop.ma
deleted file mode 100644 (file)
index 4aa2f57..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/ltpss_dx.ma".
-
-(* DX PARALLEL UNFOLD ON LOCAL ENVIRONMENTS *********************************)
-
-lemma ltpss_dx_ldrop_conf_ge: ∀L0,L1,d1,e1. L0 ▶* [d1, e1] L1 →
-                              ∀L2,e2. ⇩[0, e2] L0 ≡ L2 →
-                              d1 + e1 ≤ e2 → ⇩[0, e2] L1 ≡ L2.
-#L0 #L1 #d1 #e1 #H elim H -L0 -L1 -d1 -e1
-[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H //
-| //
-| normalize #K0 #K1 #I #V0 #V1 #e1 #_ #_ #IHK01 #L2 #e2 #H #He12
-  elim (le_inv_plus_l … He12) #_ #He2
-  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
-  lapply (IHK01 … HK0L2 ?) -K0 /2 width=1/
-| #K0 #K1 #I #V0 #V1 #d1 #e1 >plus_plus_comm_23 #_ #_ #IHK01 #L2 #e2 #H #Hd1e2
-  elim (le_inv_plus_l … Hd1e2) #_ #He2
-  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
-  lapply (IHK01 … HK0L2 ?) -K0 /2 width=1/
-]
-qed.
-
-lemma ltpss_dx_ldrop_trans_ge: ∀L1,L0,d1,e1. L1 ▶* [d1, e1] L0 →
-                               ∀L2,e2. ⇩[0, e2] L0 ≡ L2 →
-                               d1 + e1 ≤ e2 → ⇩[0, e2] L1 ≡ L2.
-#L1 #L0 #d1 #e1 #H elim H -L1 -L0 -d1 -e1
-[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H //
-| //
-| normalize #K1 #K0 #I #V1 #V0 #e1 #_ #_ #IHK10 #L2 #e2 #H #He12
-  elim (le_inv_plus_l … He12) #_ #He2
-  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
-  lapply (IHK10 … HK0L2 ?) -K0 /2 width=1/
-| #K0 #K1 #I #V1 #V0 #d1 #e1 >plus_plus_comm_23 #_ #_ #IHK10 #L2 #e2 #H #Hd1e2
-  elim (le_inv_plus_l … Hd1e2) #_ #He2
-  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
-  lapply (IHK10 … HK0L2 ?) -IHK10 -HK0L2 /2 width=1/
-]
-qed.
-
-lemma ltpss_dx_ldrop_conf_be: ∀L0,L1,d1,e1. L0 ▶* [d1, e1] L1 →
-                              ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → d1 ≤ e2 → e2 ≤ d1 + e1 →
-                              ∃∃L. L2 ▶* [0, d1 + e1 - e2] L & ⇩[0, e2] L1 ≡ L.
-#L0 #L1 #d1 #e1 #H elim H -L0 -L1 -d1 -e1
-[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H /2 width=3/
-| normalize #L #I #V #L2 #e2 #HL2 #_ #He2
-  lapply (le_n_O_to_eq … He2) -He2 #H destruct
-  lapply (ldrop_inv_refl … HL2) -HL2 #H destruct /2 width=3/
-| normalize #K0 #K1 #I #V0 #V1 #e1 #HK01 #HV01 #IHK01 #L2 #e2 #H #_ #He21
-  lapply (ldrop_inv_O1 … H) -H * * #He2 #HK0L2
-  [ -IHK01 -He21 destruct <minus_n_O /3 width=3/
-  | -HK01 -HV01 <minus_le_minus_minus_comm //
-    elim (IHK01 … HK0L2 ? ?) -K0 // /2 width=1/ /3 width=3/
-  ]
-| #K0 #K1 #I #V0 #V1 #d1 #e1 >plus_plus_comm_23 #_ #_ #IHK01 #L2 #e2 #H #Hd1e2 #He2de1
-  elim (le_inv_plus_l … Hd1e2) #_ #He2
-  <minus_le_minus_minus_comm //
-  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
-  elim (IHK01 … HK0L2 ? ?) -K0 /2 width=1/ /3 width=3/
-]
-qed.
-
-lemma ltpss_dx_ldrop_trans_be: ∀L1,L0,d1,e1. L1 ▶* [d1, e1] L0 →
-                               ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → d1 ≤ e2 → e2 ≤ d1 + e1 →
-                               ∃∃L. L ▶* [0, d1 + e1 - e2] L2 & ⇩[0, e2] L1 ≡ L.
-#L1 #L0 #d1 #e1 #H elim H -L1 -L0 -d1 -e1
-[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H /2 width=3/
-| normalize #L #I #V #L2 #e2 #HL2 #_ #He2
-  lapply (le_n_O_to_eq … He2) -He2 #H destruct
-  lapply (ldrop_inv_refl … HL2) -HL2 #H destruct /2 width=3/
-| normalize #K1 #K0 #I #V1 #V0 #e1 #HK10 #HV10 #IHK10 #L2 #e2 #H #_ #He21
-  lapply (ldrop_inv_O1 … H) -H * * #He2 #HK0L2
-  [ -IHK10 -He21 destruct <minus_n_O /3 width=3/
-  | -HK10 -HV10 <minus_le_minus_minus_comm //
-    elim (IHK10 … HK0L2 ? ?) -K0 // /2 width=1/ /3 width=3/
-  ]
-| #K1 #K0 #I #V1 #V0 #d1 #e1 >plus_plus_comm_23 #_ #_ #IHK10 #L2 #e2 #H #Hd1e2 #He2de1
-  elim (le_inv_plus_l … Hd1e2) #_ #He2
-  <minus_le_minus_minus_comm //
-  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
-  elim (IHK10 … HK0L2 ? ?) -K0 /2 width=1/ /3 width=3/
-]
-qed.
-
-lemma ltpss_dx_ldrop_conf_le: ∀L0,L1,d1,e1. L0 ▶* [d1, e1] L1 →
-                              ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → e2 ≤ d1 →
-                              ∃∃L. L2 ▶* [d1 - e2, e1] L & ⇩[0, e2] L1 ≡ L.
-#L0 #L1 #d1 #e1 #H elim H -L0 -L1 -d1 -e1
-[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H /2 width=3/
-| /2 width=3/
-| normalize #K0 #K1 #I #V0 #V1 #e1 #HK01 #HV01 #_ #L2 #e2 #H #He2
-  lapply (le_n_O_to_eq … He2) -He2 #He2 destruct
-  lapply (ldrop_inv_refl … H) -H #H destruct /3 width=3/
-| #K0 #K1 #I #V0 #V1 #d1 #e1 #HK01 #HV01 #IHK01 #L2 #e2 #H #He2d1
-  lapply (ldrop_inv_O1 … H) -H * * #He2 #HK0L2
-  [ -IHK01 -He2d1 destruct <minus_n_O /3 width=3/
-  | -HK01 -HV01 <minus_le_minus_minus_comm //
-    elim (IHK01 … HK0L2 ?) -K0 /2 width=1/ /3 width=3/
-  ]
-]
-qed.
-
-lemma ltpss_dx_ldrop_trans_le: ∀L1,L0,d1,e1. L1 ▶* [d1, e1] L0 →
-                               ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → e2 ≤ d1 →
-                               ∃∃L. L ▶* [d1 - e2, e1] L2 & ⇩[0, e2] L1 ≡ L.
-#L1 #L0 #d1 #e1 #H elim H -L1 -L0 -d1 -e1
-[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H /2 width=3/
-| /2 width=3/
-| normalize #K1 #K0 #I #V1 #V0 #e1 #HK10 #HV10 #_ #L2 #e2 #H #He2
-  lapply (le_n_O_to_eq … He2) -He2 #He2 destruct
-  lapply (ldrop_inv_refl … H) -H #H destruct /3 width=3/
-| #K1 #K0 #I #V1 #V0 #d1 #e1 #HK10 #HV10 #IHK10 #L2 #e2 #H #He2d1
-  lapply (ldrop_inv_O1 … H) -H * * #He2 #HK0L2
-  [ -IHK10 -He2d1 destruct <minus_n_O /3 width=3/
-  | -HK10 -HV10 <minus_le_minus_minus_comm //
-    elim (IHK10 … HK0L2 ?) -K0 /2 width=1/ /3 width=3/
-  ]
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_dx_ltpss_dx.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_dx_ltpss_dx.ma
deleted file mode 100644 (file)
index 5ea9f6b..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/tpss_tpss.ma".
-include "basic_2/unfold/tpss_alt.ma".
-include "basic_2/unfold/ltpss_dx_tpss.ma".
-
-(* DX PARTIAL UNFOLD ON LOCAL ENVIRONMENTS **********************************)
-
-(* Advanced properties ******************************************************)
-
-lemma ltpss_dx_tpss_conf: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶* [d2, e2] U2 →
-                          ∀L1,d1,e1. L0 ▶* [d1, e1] L1 →
-                          ∃∃T. L1 ⊢ T2 ▶* [d2, e2] T &
-                               L1 ⊢ U2 ▶* [d1, e1] T.
-#L0 #T2 #U2 #d2 #e2 #H #L1 #d1 #e1 #HL01 @(tpss_ind … H) -U2 /2 width=3/
-#U #U2 #_ #HU2 * #X2 #HTX2 #HUX2
-elim (ltpss_dx_tps_conf … HU2 … HL01) -L0 #X1 #HUX1 #HU2X1
-elim (tpss_strip_eq … HUX2 … HUX1) -U #X #HX2 #HX1
-lapply (tpss_trans_eq … HU2X1 … HX1) -X1 /3 width=3/
-qed.
-
-lemma ltpss_dx_tpss_trans_down: ∀L0,L1,T2,U2,d1,e1,d2,e2. d2 + e2 ≤ d1 →
-                                L1 ▶* [d1, e1] L0 → L0 ⊢ T2 ▶* [d2, e2] U2 →
-                                ∃∃T. L1 ⊢ T2 ▶* [d2, e2] T & L0 ⊢ T ▶* [d1, e1] U2.
-#L0 #L1 #T2 #U2 #d1 #e1 #d2 #e2 #Hde2d1 #HL10 #H @(tpss_ind … H) -U2
-[ /2 width=3/
-| #U #U2 #_ #HU2 * #T #HT2 #HTU
-  elim (tpss_strap1_down … HTU … HU2 ?) -U // #U #HTU #HU2
-  elim (ltpss_dx_tps_trans … HTU … HL10) -HTU -HL10 #X #HTX #HXU
-  lapply (tpss_trans_eq … HXU HU2) -U /3 width=3/
-]
-qed.
-
-fact ltpss_dx_tpss_trans_eq_aux: ∀Y1,X2,L1,T2,U2,d,e.
-                                 L1 ⊢ T2 ▶* [d, e] U2 → ∀L0. L0 ▶* [d, e] L1 →
-                                 Y1 = L1 → X2 = T2 → L0 ⊢ T2 ▶* [d, e] U2.
-#Y1 #X2 @(fw_ind … Y1 X2) -Y1 -X2 #Y1 #X2 #IH
-#L1 #T2 #U2 #d #e #H @(tpss_ind_alt … H) -L1 -T2 -U2 -d -e
-[ //
-| #L1 #K1 #V1 #V2 #W2 #i #d #e #Hdi #Hide #HLK1 #HV12 #HVW2 #_ #L0 #HL01 #H1 #H2 destruct
-  lapply (ldrop_fwd_lw … HLK1) #H1 normalize in H1;
-  elim (ltpss_dx_ldrop_trans_be … HL01 … HLK1 ? ?) -HL01 -HLK1 // /2 width=2/ #X #H #HLK0
-  elim (ltpss_dx_inv_tpss22 … H ?) -H /2 width=1/ #K0 #V0 #HK01 #HV01 #H destruct
-  lapply (tpss_fwd_tw … HV01) #H2
-  lapply (transitive_le (#{K1} + #{V0}) … H1) -H1 /2 width=1/ -H2 #H
-  lapply (tpss_trans_eq … HV01 HV12) -V1 #HV02
-  lapply (IH … HV02 … HK01 ? ?) -IH -HV02 -HK01
-  [1,3: // |2,4: skip | normalize /2 width=1/ | /2 width=6/ ]
-| #L #a #I #V1 #V2 #T1 #T2 #d #e #HV12 #HT12 #_ #_ #L0 #HL0 #H1 #H2 destruct
-  lapply (tpss_lsubs_trans … HT12 (L. ⓑ{I} V1) ?) -HT12 /2 width=1/ #HT12
-  lapply (IH … HV12 … HL0 ? ?) -HV12 [1,3: // |2,4: skip |5: /2 width=2/ ] #HV12
-  lapply (IH … HT12 (L0. ⓑ{I} V1) ? ? ?) -IH -HT12 [1,3,5: /2 width=2/ |2,4: skip | normalize // ] -HL0 #HT12
-  lapply (tpss_lsubs_trans … HT12 (L0. ⓑ{I} V2) ?) -HT12 /2 width=1/
-| #L #I #V1 #V2 #T1 #T2 #d #e #HV12 #HT12 #_ #_ #L0 #HL0 #H1 #H2 destruct
-  lapply (IH … HV12 … HL0 ? ?) -HV12 [1,3: // |2,4: skip |5: /2 width=3/ ]
-  lapply (IH … HT12 … HL0 ? ?) -IH -HT12 [1,3,5: normalize // |2,4: skip ] -HL0 /2 width=1/
-]
-qed.
-
-lemma ltpss_dx_tpss_trans_eq: ∀L1,T2,U2,d,e. L1 ⊢ T2 ▶* [d, e] U2 →
-                              ∀L0. L0 ▶* [d, e] L1 → L0 ⊢ T2 ▶* [d, e] U2.
-/2 width=5/ qed.
-
-lemma ltpss_dx_tps_trans_eq: ∀L0,L1,T2,U2,d,e. L0 ▶* [d, e] L1 →
-                             L1 ⊢ T2 ▶ [d, e] U2 → L0 ⊢ T2 ▶* [d, e] U2.
-/3 width=3/ qed.
-
-(* Main properties **********************************************************)
-
-fact ltpss_dx_conf_aux: ∀K,K1,L1,d1,e1. K1 ▶* [d1, e1] L1 →
-                        ∀K2,L2,d2,e2. K2 ▶* [d2, e2] L2 → K1 = K → K2 = K →
-                        ∃∃L. L1 ▶* [d2, e2] L & L2 ▶* [d1, e1] L.
-#K @(lw_ind … K) -K #K #IH #K1 #L1 #d1 #e1 * -K1 -L1 -d1 -e1
-[ -IH /2 width=3/
-| -IH #K1 #I1 #V1 #K2 #L2 #d2 #e2 * -K2 -L2 -d2 -e2
-  [ /2 width=3/
-  | #K2 #I2 #V2 #H1 #H2 destruct /2 width=3/
-  | #K2 #L2 #I2 #W2 #V2 #e2 #HKL2 #HWV2 #H1 #H2 destruct /3 width=3/
-  | #K2 #L2 #I2 #W2 #V2 #d2 #e2 #HKL2 #HWV2 #H1 #H2 destruct /3 width=3/
-  ]
-| #K1 #L1 #I1 #W1 #V1 #e1 #HKL1 #HWV1 #K2 #L2 #d2 #e2 * -K2 -L2 -d2 -e2
-  [ -IH #d2 #e2 #H1 #H2 destruct
-  | -IH #K2 #I2 #V2 #H1 #H2 destruct /3 width=5/
-  | #K2 #L2 #I2 #W2 #V2 #e2 #HKL2 #HWV2 #H1 #H2 destruct
-    elim (IH … HKL1 … HKL2 ? ?) -IH [2,4: // |3: skip |5: /2 width=1/ ] -K1 #L #HL1 #HL2
-    elim (ltpss_dx_tpss_conf … HWV1 … HL1) #U1 #HWU1 #HVU1
-    elim (ltpss_dx_tpss_conf … HWV2 … HL2) #U2 #HWU2 #HVU2
-    elim (tpss_conf_eq … HWU1 … HWU2) -W1 #W #HU1W #HU2W
-    lapply (tpss_trans_eq … HVU1 HU1W) -U1
-    lapply (tpss_trans_eq … HVU2 HU2W) -U2 /3 width=5/
-  | #K2 #L2 #I2 #W2 #V2 #d2 #e2 #HKL2 #HWV2 #H1 #H2 destruct
-    elim (IH … HKL1 … HKL2 ? ?) -IH [2,4: // |3: skip |5: /2 width=1/ ] -K1 #L #HL1 #HL2
-    elim (ltpss_dx_tpss_conf … HWV1 … HL1) #U1 #HWU1 #HVU1
-    elim (ltpss_dx_tpss_conf … HWV2 … HL2) #U2 #HWU2 #HVU2
-    elim (tpss_conf_eq … HWU1 … HWU2) -W1 #W #HU1W #HU2W
-    lapply (tpss_trans_eq … HVU1 HU1W) -U1
-    lapply (tpss_trans_eq … HVU2 HU2W) -U2 /3 width=5/
-  ]
-| #K1 #L1 #I1 #W1 #V1 #d1 #e1 #HKL1 #HWV1 #K2 #L2 #d2 #e2 * -K2 -L2 -d2 -e2
-  [ -IH #d2 #e2 #H1 #H2 destruct
-  | -IH #K2 #I2 #V2 #H1 #H2 destruct /3 width=5/
-  | #K2 #L2 #I2 #W2 #V2 #e2 #HKL2 #HWV2 #H1 #H2 destruct
-    elim (IH … HKL1 … HKL2 ? ?) -IH [2,4: // |3: skip |5: /2 width=1/ ] -K1 #L #HL1 #HL2
-    elim (ltpss_dx_tpss_conf … HWV1 … HL1) #U1 #HWU1 #HVU1
-    elim (ltpss_dx_tpss_conf … HWV2 … HL2) #U2 #HWU2 #HVU2
-    elim (tpss_conf_eq … HWU1 … HWU2) -W1 #W #HU1W #HU2W
-    lapply (tpss_trans_eq … HVU1 HU1W) -U1
-    lapply (tpss_trans_eq … HVU2 HU2W) -U2 /3 width=5/
-  | #K2 #L2 #I2 #W2 #V2 #d2 #e2 #HKL2 #HWV2 #H1 #H2 destruct
-    elim (IH … HKL1 … HKL2 ? ?) -IH [2,4: // |3: skip |5: /2 width=1/ ] -K1 #L #HL1 #HL2
-    elim (ltpss_dx_tpss_conf … HWV1 … HL1) #U1 #HWU1 #HVU1
-    elim (ltpss_dx_tpss_conf … HWV2 … HL2) #U2 #HWU2 #HVU2
-    elim (tpss_conf_eq … HWU1 … HWU2) -W1 #W #HU1W #HU2W
-    lapply (tpss_trans_eq … HVU1 HU1W) -U1
-    lapply (tpss_trans_eq … HVU2 HU2W) -U2 /3 width=5/
-  ]
-]
-qed.
-
-theorem ltpss_dx_conf: ∀L0,L1,d1,e1. L0 ▶* [d1, e1] L1 →
-                       ∀L2,d2,e2. L0 ▶* [d2, e2] L2 →
-                       ∃∃L. L1 ▶* [d2, e2] L & L2 ▶* [d1, e1] L.
-/2 width=7/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_dx_tps.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_dx_tps.ma
deleted file mode 100644 (file)
index b103066..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/ltpss_dx_ldrop.ma".
-
-(* DX PARALLEL UNFOLD ON LOCAL ENVIRONMENTS *********************************)
-
-(* Properties concerning partial substitution on terms **********************)
-
-lemma ltpss_dx_tps_conf_ge: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶ [d2, e2] U2 →
-                            ∀L1,d1,e1. L0 ▶* [d1, e1] L1 → d1 + e1 ≤ d2 →
-                            L1 ⊢ T2 ▶ [d2, e2] U2.
-#L0 #T2 #U2 #d2 #e2 #H elim H -L0 -T2 -U2 -d2 -e2
-[ //
-| #L0 #K0 #V0 #W0 #i2 #d2 #e2 #Hdi2 #Hide2 #HLK0 #HVW0 #L1 #d1 #e1 #HL01 #Hde1d2
-  lapply (transitive_le … Hde1d2 Hdi2) -Hde1d2 #Hde1i2
-  lapply (ltpss_dx_ldrop_conf_ge … HL01 … HLK0 ?) -L0 // /2 width=4/
-| #L0 #a #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL01 #Hde1d2
-  @tps_bind [ /2 width=4/ | @IHTU2 -IHTU2 -IHVW2 [3: /2 by ltpss_dx_tpss1/ |1,2: skip | /2 width=1/ ] ] (**) (* explicit constructor *)
-| /3 width=4/
-]
-qed.
-
-lemma ltpss_dx_tps_trans_ge: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶ [d2, e2] U2 →
-                             ∀L1,d1,e1. L1 ▶* [d1, e1] L0 → d1 + e1 ≤ d2 →
-                             L1 ⊢ T2 ▶ [d2, e2] U2.
-#L0 #T2 #U2 #d2 #e2 #H elim H -L0 -T2 -U2 -d2 -e2
-[ //
-| #L0 #K0 #V0 #W0 #i2 #d2 #e2 #Hdi2 #Hide2 #HLK0 #HVW0 #L1 #d1 #e1 #HL10 #Hde1d2
-  lapply (transitive_le … Hde1d2 Hdi2) -Hde1d2 #Hde1i2
-  lapply (ltpss_dx_ldrop_trans_ge … HL10 … HLK0 ?) -L0 // /2 width=4/
-| #L0 #a #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL10 #Hde1d2
-  @tps_bind [ /2 width=4/ | @IHTU2 -IHTU2 -IHVW2 [3: /2 by ltpss_dx_tpss1/ |1,2: skip | /2 width=1/ ] ] (**) (* explicit constructor *)
-| /3 width=4/
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_dx_tpss.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_dx_tpss.ma
deleted file mode 100644 (file)
index c3840c3..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/tpss_lift.ma".
-include "basic_2/unfold/ltpss_dx_tps.ma".
-
-(* DX PARALLEL UNFOLD ON LOCAL ENVIRONMENTS *********************************)
-
-(* Properties concerning partial unfold on terms ****************************)
-
-lemma ltpss_dx_tpss_conf_ge: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶* [d2, e2] U2 →
-                             ∀L1,d1,e1. L0 ▶* [d1, e1] L1 → d1 + e1 ≤ d2 →
-                             L1 ⊢ T2 ▶* [d2, e2] U2.
-#L0 #T2 #U2 #d2 #e2 #H #L1 #d1 #e1 #HL01 #Hde1d2 @(tpss_ind … H) -U2 //
-#U #U2 #_ #HU2 #IHU
-lapply (ltpss_dx_tps_conf_ge … HU2 … HL01 ?) -L0 // -Hde1d2 /2 width=3/
-qed.
-
-(* Basic_1: was: subst1_subst1_back *)
-lemma ltpss_dx_tps_conf: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶ [d2, e2] U2 →
-                         ∀L1,d1,e1. L0 ▶* [d1, e1] L1 →
-                         ∃∃T. L1 ⊢ T2 ▶ [d2, e2] T &
-                              L1 ⊢ U2 ▶* [d1, e1] T.
-#L0 #T2 #U2 #d2 #e2 #H elim H -L0 -T2 -U2 -d2 -e2
-[ /2 width=3/
-| #L0 #K0 #V0 #W0 #i2 #d2 #e2 #Hdi2 #Hide2 #HLK0 #HVW0 #L1 #d1 #e1 #HL01
-  elim (lt_or_ge i2 d1) #Hi2d1
-  [ elim (ltpss_dx_ldrop_conf_le … HL01 … HLK0 ?) -L0 /2 width=2/ #X #H #HLK1
-    elim (ltpss_dx_inv_tpss11 … H ?) -H /2 width=1/ #K1 #V1 #_ #HV01 #H destruct
-    lapply (ldrop_fwd_ldrop2 … HLK1) #H
-    elim (lift_total V1 0 (i2 + 1)) #W1 #HVW1
-    lapply (tpss_lift_ge … HV01 … H HVW0 … HVW1) -V0 -H // >minus_plus <plus_minus_m_m // /3 width=4/
-  | elim (lt_or_ge i2 (d1 + e1)) #Hde1i2
-    [ elim (ltpss_dx_ldrop_conf_be … HL01 … HLK0 ? ?) -L0 // /2 width=2/ #X #H #HLK1
-      elim (ltpss_dx_inv_tpss21 … H ?) -H /2 width=1/ #K1 #V1 #_ #HV01 #H destruct
-      lapply (ldrop_fwd_ldrop2 … HLK1) #H
-      elim (lift_total V1 0 (i2 + 1)) #W1 #HVW1
-      lapply (tpss_lift_ge … HV01 … H HVW0 … HVW1) -V0 -H // normalize #HW01
-      lapply (tpss_weak … HW01 d1 e1 ? ?) [2: /2 width=1/ |3: /3 width=4/ ] >minus_plus >commutative_plus /2 width=1/
-    | lapply (ltpss_dx_ldrop_conf_ge … HL01 … HLK0 ?) -L0 // /3 width=4/
-    ]
-  ]
-| #L0 #a #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL01
-  elim (IHVW2 … HL01) -IHVW2 #V #HV2 #HVW2
-  elim (IHTU2 (L1. ⓑ{I} V) (d1 + 1) e1 ?) -IHTU2 /2 width=1/ -HL01 /3 width=5/
-| #L0 #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL01
-  elim (IHVW2 … HL01) -IHVW2
-  elim (IHTU2 … HL01) -IHTU2 -HL01 /3 width=5/
-]
-qed.
-  
-lemma ltpss_dx_tpss_trans_ge: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶* [d2, e2] U2 →
-                              ∀L1,d1,e1. L1 ▶* [d1, e1] L0 → d1 + e1 ≤ d2 →
-                              L1 ⊢ T2 ▶* [d2, e2] U2.
-#L0 #T2 #U2 #d2 #e2 #H #L1 #d1 #e1 #HL01 #Hde1d2 @(tpss_ind … H) -U2 //
-#U #U2 #_ #HU2 #IHU
-lapply (ltpss_dx_tps_trans_ge … HU2 … HL01 ?) -L0 // -Hde1d2 /2 width=3/
-qed.
-
-(* Basic_1: was: subst1_subst1 *)
-lemma ltpss_dx_tps_trans: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶ [d2, e2] U2 →
-                          ∀L1,d1,e1. L1 ▶* [d1, e1] L0 →
-                          ∃∃T. L1 ⊢ T2 ▶ [d2, e2] T &
-                               L0 ⊢ T ▶* [d1, e1] U2.
-#L0 #T2 #U2 #d2 #e2 #H elim H -L0 -T2 -U2 -d2 -e2
-[ /2 width=3/
-| #L0 #K0 #V0 #W0 #i2 #d2 #e2 #Hdi2 #Hide2 #HLK0 #HVW0 #L1 #d1 #e1 #HL10
-  elim (lt_or_ge i2 d1) #Hi2d1
-  [ elim (ltpss_dx_ldrop_trans_le … HL10 … HLK0 ?) -HL10 /2 width=2/ #X #H #HLK1
-    elim (ltpss_dx_inv_tpss12 … H ?) -H /2 width=1/ #K1 #V1 #_ #HV01 #H destruct
-    lapply (ldrop_fwd_ldrop2 … HLK0) -HLK0 #H
-    elim (lift_total V1 0 (i2 + 1)) #W1 #HVW1
-    lapply (tpss_lift_ge … HV01 … H HVW1 … HVW0) -V0 -H // >minus_plus <plus_minus_m_m /2 width=1/ /3 width=4/
-  | elim (lt_or_ge i2 (d1 + e1)) #Hde1i2
-    [ elim (ltpss_dx_ldrop_trans_be … HL10 … HLK0 ? ?) -HL10 // /2 width=2/ #X #H #HLK1
-      elim (ltpss_dx_inv_tpss22 … H ?) -H /2 width=1/ #K1 #V1 #_ #HV01 #H destruct
-      lapply (ldrop_fwd_ldrop2 … HLK0) -HLK0 #H
-      elim (lift_total V1 0 (i2 + 1)) #W1 #HVW1
-      lapply (tpss_lift_ge … HV01 … H HVW1 … HVW0) -V0 -H // normalize #HW01
-      lapply (tpss_weak … HW01 d1 e1 ? ?) [2: /3 width=1/ |3: /3 width=4/ ] >minus_plus >commutative_plus /2 width=1/
-    | lapply (ltpss_dx_ldrop_trans_ge … HL10 … HLK0 ?) -HL10 -HLK0 // /3 width=4/
-    ]
-  ]
-| #L0 #a #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL10
-  elim (IHVW2 … HL10) -IHVW2 #V #HV2 #HVW2
-  elim (IHTU2 (L1. ⓑ{I} V) (d1 + 1) e1 ?) -IHTU2 /2 width=1/ -HL10 /3 width=5/
-| #L0 #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL10
-  elim (IHVW2 … HL10) -IHVW2
-  elim (IHTU2 … HL10) -IHTU2 -HL10 /3 width=5/
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_sn.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_sn.ma
deleted file mode 100644 (file)
index 0d13a5a..0000000
+++ /dev/null
@@ -1,255 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/tpss.ma".
-
-(* SN PARALLEL UNFOLD ON LOCAL ENVIRONMENTS *********************************)
-
-inductive ltpss_sn: nat → nat → relation lenv ≝
-| ltpss_sn_atom : ∀d,e. ltpss_sn d e (⋆) (⋆)
-| ltpss_sn_pair : ∀L,I,V. ltpss_sn 0 0 (L. ⓑ{I} V) (L. ⓑ{I} V)
-| ltpss_sn_tpss2: ∀L1,L2,I,V1,V2,e.
-                  ltpss_sn 0 e L1 L2 → L1 ⊢ V1 ▶* [0, e] V2 →
-                  ltpss_sn 0 (e + 1) (L1. ⓑ{I} V1) (L2. ⓑ{I} V2)
-| ltpss_sn_tpss1: ∀L1,L2,I,V1,V2,d,e.
-                  ltpss_sn d e L1 L2 → L1 ⊢ V1 ▶* [d, e] V2 →
-                  ltpss_sn (d + 1) e (L1. ⓑ{I} V1) (L2. ⓑ{I} V2)
-.
-
-interpretation "parallel unfold (local environment, sn variant)"
-   'PSubstStarSn L1 d e L2 = (ltpss_sn d e L1 L2).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact ltpss_sn_inv_refl_O2_aux: ∀d,e,L1,L2. L1 ⊢ ▶* [d, e] L2 → e = 0 → L1 = L2.
-#d #e #L1 #L2 #H elim H -d -e -L1 -L2 //
-[ #L1 #L2 #I #V1 #V2 #e #_ #_ #_ >commutative_plus normalize #H destruct
-| #L1 #L2 #I #V1 #V2 #d #e #_ #HV12 #IHL12 #He destruct
-  >(IHL12 ?) -IHL12 // >(tpss_inv_refl_O2 … HV12) //
-]
-qed.
-
-lemma ltpss_sn_inv_refl_O2: ∀d,L1,L2. L1 ⊢ ▶* [d, 0] L2 → L1 = L2.
-/2 width=4/ qed-.
-
-fact ltpss_sn_inv_atom1_aux: ∀d,e,L1,L2.
-                             L1 ⊢ ▶* [d, e] L2 → L1 = ⋆ → L2 = ⋆.
-#d #e #L1 #L2 * -d -e -L1 -L2
-[ //
-| #L #I #V #H destruct
-| #L1 #L2 #I #V1 #V2 #e #_ #_ #H destruct
-| #L1 #L2 #I #V1 #V2 #d #e #_ #_ #H destruct
-]
-qed.
-
-lemma ltpss_sn_inv_atom1: ∀d,e,L2. ⋆ ⊢ ▶* [d, e] L2 → L2 = ⋆.
-/2 width=5/ qed-.
-
-fact ltpss_sn_inv_tpss21_aux: ∀d,e,L1,L2. L1 ⊢ ▶* [d, e] L2 → d = 0 → 0 < e →
-                              ∀K1,I,V1. L1 = K1. ⓑ{I} V1 →
-                              ∃∃K2,V2. K1 ⊢ ▶* [0, e - 1] K2 &
-                                       K1 ⊢ V1 ▶* [0, e - 1] V2 &
-                                       L2 = K2. ⓑ{I} V2.
-#d #e #L1 #L2 * -d -e -L1 -L2
-[ #d #e #_ #_ #K1 #I #V1 #H destruct
-| #L1 #I #V #_ #H elim (lt_refl_false … H)
-| #L1 #L2 #I #V1 #V2 #e #HL12 #HV12 #_ #_ #K1 #J #W1 #H destruct /2 width=5/
-| #L1 #L2 #I #V1 #V2 #d #e #_ #_ >commutative_plus normalize #H destruct
-]
-qed.
-
-lemma ltpss_sn_inv_tpss21: ∀e,K1,I,V1,L2. K1. ⓑ{I} V1 ⊢ ▶* [0, e] L2 → 0 < e →
-                           ∃∃K2,V2. K1 ⊢ ▶* [0, e - 1] K2 &
-                                    K1 ⊢ V1 ▶* [0, e - 1] V2 &
-                                    L2 = K2. ⓑ{I} V2.
-/2 width=5/ qed-.
-
-fact ltpss_sn_inv_tpss11_aux: ∀d,e,L1,L2. L1 ⊢ ▶* [d, e] L2 → 0 < d →
-                              ∀I,K1,V1. L1 = K1. ⓑ{I} V1 →
-                              ∃∃K2,V2. K1 ⊢ ▶* [d - 1, e] K2 &
-                                       K1 ⊢ V1 ▶* [d - 1, e] V2 &
-                                       L2 = K2. ⓑ{I} V2.
-#d #e #L1 #L2 * -d -e -L1 -L2
-[ #d #e #_ #I #K1 #V1 #H destruct
-| #L #I #V #H elim (lt_refl_false … H)
-| #L1 #L2 #I #V1 #V2 #e #_ #_ #H elim (lt_refl_false … H)
-| #L1 #L2 #I #V1 #V2 #d #e #HL12 #HV12 #_ #J #K1 #W1 #H destruct /2 width=5/
-]
-qed.
-
-lemma ltpss_sn_inv_tpss11: ∀d,e,I,K1,V1,L2. K1. ⓑ{I} V1 ⊢ ▶* [d, e] L2 → 0 < d →
-                           ∃∃K2,V2. K1 ⊢ ▶* [d - 1, e] K2 &
-                                    K1 ⊢ V1 ▶* [d - 1, e] V2 &
-                                    L2 = K2. ⓑ{I} V2.
-/2 width=3/ qed-.
-
-fact ltpss_sn_inv_atom2_aux: ∀d,e,L1,L2.
-                             L1 ⊢ ▶* [d, e] L2 → L2 = ⋆ → L1 = ⋆.
-#d #e #L1 #L2 * -d -e -L1 -L2
-[ //
-| #L #I #V #H destruct
-| #L1 #L2 #I #V1 #V2 #e #_ #_ #H destruct
-| #L1 #L2 #I #V1 #V2 #d #e #_ #_ #H destruct
-]
-qed.
-
-lemma ltpss_sn_inv_atom2: ∀d,e,L1. L1 ⊢ ▶* [d, e] ⋆ → L1 = ⋆.
-/2 width=5/ qed-.
-
-fact ltpss_sn_inv_tpss22_aux: ∀d,e,L1,L2. L1 ⊢ ▶* [d, e] L2 → d = 0 → 0 < e →
-                              ∀K2,I,V2. L2 = K2. ⓑ{I} V2 →
-                              ∃∃K1,V1. K1 ⊢ ▶* [0, e - 1] K2 &
-                                       K1 ⊢ V1 ▶* [0, e - 1] V2 &
-                                       L1 = K1. ⓑ{I} V1.
-#d #e #L1 #L2 * -d -e -L1 -L2
-[ #d #e #_ #_ #K1 #I #V1 #H destruct
-| #L1 #I #V #_ #H elim (lt_refl_false … H)
-| #L1 #L2 #I #V1 #V2 #e #HL12 #HV12 #_ #_ #K2 #J #W2 #H destruct /2 width=5/
-| #L1 #L2 #I #V1 #V2 #d #e #_ #_ >commutative_plus normalize #H destruct
-]
-qed.
-
-lemma ltpss_sn_inv_tpss22: ∀e,L1,K2,I,V2. L1 ⊢ ▶* [0, e] K2. ⓑ{I} V2 → 0 < e →
-                           ∃∃K1,V1. K1 ⊢ ▶* [0, e - 1] K2 &
-                                    K1 ⊢ V1 ▶* [0, e - 1] V2 &
-                                    L1 = K1. ⓑ{I} V1.
-/2 width=5/ qed-.
-
-fact ltpss_sn_inv_tpss12_aux: ∀d,e,L1,L2. L1 ⊢ ▶* [d, e] L2 → 0 < d →
-                              ∀I,K2,V2. L2 = K2. ⓑ{I} V2 →
-                              ∃∃K1,V1. K1 ⊢ ▶* [d - 1, e] K2 &
-                                       K1 ⊢ V1 ▶* [d - 1, e] V2 &
-                                       L1 = K1. ⓑ{I} V1.
-#d #e #L1 #L2 * -d -e -L1 -L2
-[ #d #e #_ #I #K2 #V2 #H destruct
-| #L #I #V #H elim (lt_refl_false … H)
-| #L1 #L2 #I #V1 #V2 #e #_ #_ #H elim (lt_refl_false … H)
-| #L1 #L2 #I #V1 #V2 #d #e #HL12 #HV12 #_ #J #K2 #W2 #H destruct /2 width=5/
-]
-qed.
-
-lemma ltpss_sn_inv_tpss12: ∀L1,K2,I,V2,d,e. L1 ⊢ ▶* [d, e] K2. ⓑ{I} V2 → 0 < d →
-                           ∃∃K1,V1. K1 ⊢ ▶* [d - 1, e] K2 &
-                                    K1 ⊢ V1 ▶* [d - 1, e] V2 &
-                                    L1 = K1. ⓑ{I} V1.
-/2 width=3/ qed-.
-
-(* Basic properties *********************************************************)
-
-lemma ltpss_sn_tps2: ∀L1,L2,I,V1,V2,e.
-                     L1 ⊢ ▶* [0, e] L2 → L1 ⊢ V1 ▶ [0, e] V2 →
-                     L1. ⓑ{I} V1 ⊢ ▶* [0, e + 1] L2. ⓑ{I} V2.
-/3 width=1/ qed.
-
-lemma ltpss_sn_tps1: ∀L1,L2,I,V1,V2,d,e.
-                     L1 ⊢ ▶* [d, e] L2 → L1 ⊢ V1 ▶ [d, e] V2 →
-                     L1. ⓑ{I} V1 ⊢ ▶* [d + 1, e] L2. ⓑ{I} V2.
-/3 width=1/ qed.
-
-lemma ltpss_sn_tpss2_lt: ∀L1,L2,I,V1,V2,e.
-                         L1 ⊢ ▶* [0, e - 1] L2 → L1 ⊢ V1 ▶* [0, e - 1] V2 →
-                         0 < e → L1. ⓑ{I} V1 ⊢ ▶* [0, e] L2. ⓑ{I} V2.
-#L1 #L2 #I #V1 #V2 #e #HL12 #HV12 #He
->(plus_minus_m_m e 1) /2 width=1/
-qed.
-
-lemma ltpss_sn_tpss1_lt: ∀L1,L2,I,V1,V2,d,e.
-                         L1 ⊢ ▶* [d - 1, e] L2 → L1 ⊢ V1 ▶* [d - 1, e] V2 →
-                         0 < d → L1. ⓑ{I} V1 ⊢ ▶* [d, e] L2. ⓑ{I} V2.
-#L1 #L2 #I #V1 #V2 #d #e #HL12 #HV12 #Hd
->(plus_minus_m_m d 1) /2 width=1/
-qed.
-
-lemma ltpss_sn_tps2_lt: ∀L1,L2,I,V1,V2,e.
-                        L1 ⊢ ▶* [0, e - 1] L2 → L1 ⊢ V1 ▶ [0, e - 1] V2 →
-                        0 < e → L1. ⓑ{I} V1 ⊢ ▶* [0, e] L2. ⓑ{I} V2.
-/3 width=1/ qed.
-
-lemma ltpss_sn_tps1_lt: ∀L1,L2,I,V1,V2,d,e.
-                        L1 ⊢ ▶* [d - 1, e] L2 → L1 ⊢ V1 ▶ [d - 1, e] V2 →
-                        0 < d → L1. ⓑ{I} V1 ⊢ ▶* [d, e] L2. ⓑ{I} V2.
-/3 width=1/ qed.
-
-lemma ltpss_sn_refl: ∀L,d,e. L ⊢ ▶* [d, e] L.
-#L elim L -L //
-#L #I #V #IHL * /2 width=1/ * /2 width=1/
-qed.
-
-lemma ltpss_sn_weak: ∀L1,L2,d1,e1. L1 ⊢ ▶* [d1, e1] L2 →
-                     ∀d2,e2. d2 ≤ d1 → d1 + e1 ≤ d2 + e2 → L1 ⊢ ▶* [d2, e2] L2.
-#L1 #L2 #d1 #e1 #H elim H -L1 -L2 -d1 -e1 //
-[ #L1 #L2 #I #V1 #V2 #e1 #_ #HV12 #IHL12 #d2 #e2 #Hd2 #Hde2
-  lapply (le_n_O_to_eq … Hd2) #H destruct normalize in Hde2;
-  lapply (lt_to_le_to_lt 0 … Hde2) // #He2
-  lapply (le_plus_to_minus_r … Hde2) -Hde2 /3 width=5/
-| #L1 #L2 #I #V1 #V2 #d1 #e1 #_ #HV12 #IHL12 #d2 #e2 #Hd21 #Hde12
-  >plus_plus_comm_23 in Hde12; #Hde12
-  elim (le_to_or_lt_eq 0 d2 ?) // #H destruct
-  [ lapply (le_plus_to_minus_r … Hde12) -Hde12 <plus_minus // #Hde12
-    lapply (le_plus_to_minus … Hd21) -Hd21 #Hd21 /3 width=5/
-  | -Hd21 normalize in Hde12;
-    lapply (lt_to_le_to_lt 0 … Hde12) // #He2
-    lapply (le_plus_to_minus_r … Hde12) -Hde12
-    /3 width=5 by ltpss_sn_tpss2_lt, tpss_weak/ (**) (* /3 width=5/ used to work *)
-  ]
-]
-qed.
-
-lemma ltpss_sn_weak_all: ∀L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 → L1 ⊢ ▶* [0, |L1|] L2.
-#L1 #L2 #d #e #H elim H -L1 -L2 -d -e
-// /3 width=2/ /3 width=3/
-qed.
-
-fact ltpss_sn_append_le_aux: ∀K1,K2,d,x. K1 ⊢ ▶* [d, x] K2 → x = |K1| - d →
-                             ∀L1,L2,e. L1 ⊢ ▶* [0, e] L2 → d ≤ |K1| →
-                             L1 @@ K1 ⊢ ▶* [d, x + e] L2 @@ K2.
-#K1 #K2 #d #x #H elim H -K1 -K2 -d -x
-[ #d #x #H1 #L1 #L2 #e #HL12 #H2 destruct
-  lapply (le_n_O_to_eq … H2) -H2 #H destruct //
-| #K #I #V <minus_n_O normalize <plus_n_Sm #H destruct
-| #K1 #K2 #I #V1 #V2 #x #_ #HV12 <minus_n_O #IHK12 <minus_n_O #H #L1 #L2 #e #HL12 #_
-  lapply (injective_plus_l … H) -H #H destruct >plus_plus_comm_23
-  /4 width=5 by ltpss_sn_tpss2, tpss_append, tpss_weak, monotonic_le_plus_r/ (**) (* too slow without trace *)
-| #K1 #K2 #I #V1 #V2 #d #x #_ #HV12 #IHK12 normalize <minus_le_minus_minus_comm // <minus_plus_m_m #H1 #L1 #L2 #e #HL12 #H2 destruct
-  lapply (le_plus_to_le_r … H2) -H2 #Hd
-  /4 width=5 by ltpss_sn_tpss1, tpss_append, tpss_weak, monotonic_le_plus_r/ (**) (* too slow without trace *)
-]
-qed-.
-
-lemma ltpss_sn_append_le: ∀K1,K2,d. K1 ⊢ ▶* [d, |K1| - d] K2 →
-                          ∀L1,L2,e. L1 ⊢ ▶* [0, e] L2 → d ≤ |K1| →
-                          L1 @@ K1 ⊢ ▶* [d, |K1| - d + e] L2 @@ K2.
-/2 width=1 by ltpss_sn_append_le_aux/ qed.
-
-lemma ltpss_sn_append_ge: ∀K1,K2,d,e. K1 ⊢ ▶* [d, e] K2 →
-                          ∀L1,L2. L1 ⊢ ▶* [d - |K1|, e] L2 → |K1| ≤ d →
-                          L1 @@ K1 ⊢ ▶* [d, e] L2 @@ K2.
-#K1 #K2 #d #e #H elim H -K1 -K2 -d -e
-[ #d #e #L1 #L2 <minus_n_O //
-| #K #I #V #L1 #L2 #_ #H 
-  lapply (le_n_O_to_eq … H) -H normalize <plus_n_Sm #H destruct
-| #K1 #K2 #I #V1 #V2 #e #_ #_ #_ #L1 #L2 #_ #H
-  lapply (le_n_O_to_eq … H) -H normalize <plus_n_Sm #H destruct
-| #K1 #K2 #I #V1 #V2 #d #e #_ #HV12 #IHK12 #L1 #L2
-  normalize <minus_le_minus_minus_comm // <minus_plus_m_m #HL12 #H
-  lapply (le_plus_to_le_r … H) -H /3 width=1/
-]
-qed.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma ltpss_sn_fwd_length: ∀L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 → |L1| = |L2|.
-#L1 #L2 #d #e #H elim H -L1 -L2 -d -e
-normalize //
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_sn_alt.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_sn_alt.ma
deleted file mode 100644 (file)
index 7a453d2..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/ltpss_dx_ltpss_dx.ma".
-include "basic_2/unfold/ltpss_sn_ltpss_sn.ma".
-
-(* SN PARALLEL UNFOLD ON LOCAL ENVIRONMENTS *********************************)
-
-(* alternative definition of ltpss_sn *)
-definition ltpssa: nat → nat → relation lenv ≝
-                   λd,e. TC … (ltpss_dx d e).
-
-interpretation "parallel unfold (local environment, sn variant) alternative"
-   'PSubstStarSnAlt L1 d e L2 = (ltpssa d e L1 L2).
-
-(* Basic eliminators ********************************************************)
-
-lemma ltpssa_ind: ∀d,e,L1. ∀R:predicate lenv. R L1 →
-                  (∀L,L2. L1 ⊢ ▶▶* [d, e] L → L ▶* [d, e] L2 → R L → R L2) →
-                  ∀L2. L1 ⊢ ▶▶* [d, e] L2 → R L2.
-#d #e #L1 #R #HL1 #IHL1 #L2 #HL12 @(TC_star_ind … HL1 IHL1 … HL12) //
-qed-.
-
-lemma ltpssa_ind_dx: ∀d,e,L2. ∀R:predicate lenv. R L2 →
-                     (∀L1,L. L1 ▶* [d, e] L → L ⊢ ▶▶* [d, e] L2 → R L → R L1) →
-                     ∀L1. L1 ⊢ ▶▶* [d, e] L2 → R L1.
-#d #e #L2 #R #HL2 #IHL2 #L1 #HL12 @(TC_star_ind_dx … HL2 IHL2 … HL12) //
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma ltpssa_refl: ∀L,d,e. L ⊢ ▶▶* [d, e] L.
-/2 width=1/ qed.
-
-lemma ltpssa_tpss2: ∀I,L1,V1,V2,e. L1 ⊢ V1 ▶*[0, e] V2 →
-                    ∀L2. L1 ⊢ ▶▶* [0, e] L2 →
-                    L1.ⓑ{I}V1 ⊢ ▶▶* [O, e + 1] L2.ⓑ{I}V2.
-#I #L1 #V1 #V2 #e #HV12 #L2 #H @(ltpssa_ind … H) -L2
-[ /3 width=1/ | /3 width=5/ ]
-qed.
-
-lemma ltpssa_tpss1: ∀I,L1,V1,V2,d,e. L1 ⊢ V1 ▶*[d, e] V2 →
-                    ∀L2. L1 ⊢ ▶▶* [d, e] L2 →
-                    L1.ⓑ{I}V1 ⊢ ▶▶* [d + 1, e] L2.ⓑ{I}V2.
-#I #L1 #V1 #V2 #d #e #HV12 #L2 #H @(ltpssa_ind … H) -L2
-[ /3 width=1/ | /3 width=5/ ]
-qed.
-
-lemma ltpss_sn_ltpssa: ∀L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 → L1 ⊢ ▶▶* [d, e] L2.
-#L1 #L2 #d #e #H elim H -L1 -L2 -d -e // /2 width=1/
-qed.
-
-lemma ltpss_sn_dx_trans_eq: ∀L1,L,d,e. L1 ⊢ ▶* [d, e] L →
-                            ∀L2. L ▶* [d, e] L2 → L1 ⊢ ▶* [d, e] L2.
-#L1 #L #d #e #H elim H -L1 -L -d -e
-[ #d #e #X #H
-  lapply (ltpss_dx_inv_atom1 … H) -H #H destruct //
-| #L #I #V #X #H
-  lapply (ltpss_dx_inv_refl_O2 … H) -H #H destruct //
-| #L1 #L #I #V1 #V #e #_ #HV1 #IHL1 #X #H
-  elim (ltpss_dx_inv_tpss21 … H ?) -H // <minus_plus_m_m
-  #L2 #V2 #HL2 #HV2 #H destruct
-  lapply (IHL1 … HL2) -L #HL12
-  lapply (ltpss_sn_tpss_trans_eq … HV2 … HL12) -HV2 #HV2
-  lapply (tpss_trans_eq … HV1 HV2) -V /2 width=1/
-| #L1 #L #I #V1 #V #d #e #_ #HV1 #IHL1 #X #H
-  elim (ltpss_dx_inv_tpss11 … H ?) -H // <minus_plus_m_m
-  #L2 #V2 #HL2 #HV2 #H destruct
-  lapply (IHL1 … HL2) -L #HL12
-  lapply (ltpss_sn_tpss_trans_eq … HV2 … HL12) -HV2 #HV2
-  lapply (tpss_trans_eq … HV1 HV2) -V /2 width=1/
-]
-qed.
-
-lemma ltpss_dx_sn_trans_eq: ∀L1,L,d,e. L1 ▶* [d, e] L →
-                            ∀L2. L ⊢ ▶* [d, e] L2 → L1 ⊢ ▶* [d, e] L2.
-/3 width=3/ qed.
-
-lemma ltpssa_strip: ∀L0,L1,d1,e1. L0 ⊢ ▶▶* [d1, e1] L1 →
-                    ∀L2,d2,e2. L0 ▶* [d2, e2] L2 →
-                    ∃∃L. L1 ▶* [d2, e2] L & L2 ⊢ ▶▶* [d1, e1] L.
-/3 width=3/ qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma ltpssa_ltpss_sn: ∀L1,L2,d,e. L1 ⊢ ▶▶* [d, e] L2 → L1 ⊢ ▶* [d, e] L2.
-#L1 #L2 #d #e #H @(ltpssa_ind … H) -L2 // /2 width=3/
-qed-.
-
-(* Advanced properties ******************************************************)
-
-lemma ltpss_sn_strip: ∀L0,L1,d1,e1. L0 ⊢ ▶* [d1, e1] L1 →
-                      ∀L2,d2,e2. L0 ▶* [d2, e2] L2 →
-                      ∃∃L. L1 ▶* [d2, e2] L & L2 ⊢ ▶* [d1, e1] L.
-#L0 #L1 #d1 #e1 #H #L2 #d2 #e2 #HL02
-lapply (ltpss_sn_ltpssa … H) -H #HL01
-elim (ltpssa_strip … HL01 … HL02) -L0
-/3 width=3 by ltpssa_ltpss_sn, ex2_1_intro/
-qed.
-
-(* Note: this should go in ltpss_sn_ltpss_sn.ma *)
-lemma ltpss_sn_tpss_conf: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶* [d2, e2] U2 →
-                          ∀L1,d1,e1. L0 ⊢ ▶* [d1, e1] L1 →
-                          ∃∃T. L1 ⊢ T2 ▶* [d2, e2] T &
-                               L0 ⊢ U2 ▶* [d1, e1] T.
-#L0 #T2 #U2 #d2 #e2 #HTU2 #L1 #d1 #e1 #H
-lapply (ltpss_sn_ltpssa … H) -H #H @(ltpssa_ind … H) -L1 /2 width=3/ -HTU2
-#L #L1 #H #HL1 * #T #HT2 #HU2T
-lapply (ltpssa_ltpss_sn … H) -H #HL0
-lapply (ltpss_sn_dx_trans_eq … HL0 … HL1) -HL0 #HL01
-elim (ltpss_dx_tpss_conf … HT2 … HL1) -HT2 -HL1 #T0 #HT20 #HT0
-lapply (ltpss_sn_tpss_trans_eq … HT0 … HL01) -HT0 -HL01 #HT0
-lapply (tpss_trans_eq … HU2T HT0) -T /2 width=3/
-qed.
-
-(* Note: this should go in ltpss_sn_ltpss_sn.ma *)
-lemma ltpss_sn_tpss_trans_down: ∀L0,L1,T2,U2,d1,e1,d2,e2. d2 + e2 ≤ d1 →
-                                L1 ⊢ ▶* [d1, e1] L0 → L0 ⊢ T2 ▶* [d2, e2] U2 →
-                                ∃∃T. L1 ⊢ T2 ▶* [d2, e2] T & L1 ⊢ T ▶* [d1, e1] U2.
-#L0 #L1 #T2 #U2 #d1 #e1 #d2 #e2 #Hde2d1 #H #HTU2
-lapply (ltpss_sn_ltpssa … H) -H #HL10
-@(ltpssa_ind_dx … HL10) -L1 /2 width=3/ -HTU2
-#L1 #L #HL1 #_ * #T #HT2 #HTU2
-elim (ltpss_dx_tpss_trans_down … HL1 HT2) -HT2 // #T0 #HT20 #HT0 -Hde2d1
-lapply (tpss_trans_eq … HT0 HTU2) -T #HT0U2
-lapply (ltpss_dx_tpss_trans_eq … HT0U2 … HL1) -HT0U2 -HL1 /2 width=3/
-qed.
-
-(* Main properties **********************************************************)
-
-theorem ltpssa_conf: ∀L0,L1,d1,e1. L0 ⊢ ▶▶* [d1, e1] L1 →
-                     ∀L2,d2,e2. L0 ⊢ ▶▶* [d2, e2] L2 →
-                     ∃∃L. L1 ⊢ ▶▶* [d2, e2] L & L2 ⊢ ▶▶* [d1, e1] L.
-/3 width=3/ qed.
-
-(* Note: this should go in ltpss_sn_ltpss_sn.ma *)
-theorem ltpss_sn_conf: ∀L0,L1,d1,e1. L0 ⊢ ▶* [d1, e1] L1 →
-                       ∀L2,d2,e2. L0 ⊢ ▶* [d2, e2] L2 →
-                       ∃∃L. L1 ⊢ ▶* [d2, e2] L & L2 ⊢ ▶* [d1, e1] L.
-#L0 #L1 #d1 #e1 #H1 #L2 #d2 #e2 #H2
-lapply (ltpss_sn_ltpssa … H1) -H1 #HL01
-lapply (ltpss_sn_ltpssa … H2) -H2 #HL02
-elim (ltpssa_conf … HL01 … HL02) -L0
-/3 width=3 by ltpssa_ltpss_sn, ex2_1_intro/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_sn_ldrop.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_sn_ldrop.ma
deleted file mode 100644 (file)
index d92978d..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/ltpss_sn.ma".
-
-(* SN PARALLEL UNFOLD ON LOCAL ENVIRONMENTS *********************************)
-
-lemma ltpss_sn_ldrop_conf_ge: ∀L0,L1,d1,e1. L0 ⊢ ▶* [d1, e1] L1 →
-                              ∀L2,e2. ⇩[0, e2] L0 ≡ L2 →
-                              d1 + e1 ≤ e2 → ⇩[0, e2] L1 ≡ L2.
-#L0 #L1 #d1 #e1 #H elim H -L0 -L1 -d1 -e1
-[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H //
-| //
-| normalize #K0 #K1 #I #V0 #V1 #e1 #_ #_ #IHK01 #L2 #e2 #H #He12
-  elim (le_inv_plus_l … He12) #_ #He2
-  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
-  lapply (IHK01 … HK0L2 ?) -K0 /2 width=1/
-| #K0 #K1 #I #V0 #V1 #d1 #e1 >plus_plus_comm_23 #_ #_ #IHK01 #L2 #e2 #H #Hd1e2
-  elim (le_inv_plus_l … Hd1e2) #_ #He2
-  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
-  lapply (IHK01 … HK0L2 ?) -K0 /2 width=1/
-]
-qed.
-
-lemma ltpss_sn_ldrop_trans_ge: ∀L1,L0,d1,e1. L1 ⊢ ▶* [d1, e1] L0 →
-                               ∀L2,e2. ⇩[0, e2] L0 ≡ L2 →
-                               d1 + e1 ≤ e2 → ⇩[0, e2] L1 ≡ L2.
-#L1 #L0 #d1 #e1 #H elim H -L1 -L0 -d1 -e1
-[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H //
-| //
-| normalize #K1 #K0 #I #V1 #V0 #e1 #_ #_ #IHK10 #L2 #e2 #H #He12
-  elim (le_inv_plus_l … He12) #_ #He2
-  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
-  lapply (IHK10 … HK0L2 ?) -K0 /2 width=1/
-| #K0 #K1 #I #V1 #V0 #d1 #e1 >plus_plus_comm_23 #_ #_ #IHK10 #L2 #e2 #H #Hd1e2
-  elim (le_inv_plus_l … Hd1e2) #_ #He2
-  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
-  lapply (IHK10 … HK0L2 ?) -IHK10 -HK0L2 /2 width=1/
-]
-qed.
-
-lemma ltpss_sn_ldrop_conf_be: ∀L0,L1,d1,e1. L0 ⊢ ▶* [d1, e1] L1 →
-                              ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → d1 ≤ e2 → e2 ≤ d1 + e1 →
-                              ∃∃L. L2 ⊢ ▶* [0, d1 + e1 - e2] L & ⇩[0, e2] L1 ≡ L.
-#L0 #L1 #d1 #e1 #H elim H -L0 -L1 -d1 -e1
-[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H /2 width=3/
-| normalize #L #I #V #L2 #e2 #HL2 #_ #He2
-  lapply (le_n_O_to_eq … He2) -He2 #H destruct
-  lapply (ldrop_inv_refl … HL2) -HL2 #H destruct /2 width=3/
-| normalize #K0 #K1 #I #V0 #V1 #e1 #HK01 #HV01 #IHK01 #L2 #e2 #H #_ #He21
-  lapply (ldrop_inv_O1 … H) -H * * #He2 #HK0L2
-  [ -IHK01 -He21 destruct <minus_n_O /3 width=3/
-  | -HK01 -HV01 <minus_le_minus_minus_comm //
-    elim (IHK01 … HK0L2 ? ?) -K0 // /2 width=1/ /3 width=3/
-  ]
-| #K0 #K1 #I #V0 #V1 #d1 #e1 >plus_plus_comm_23 #_ #_ #IHK01 #L2 #e2 #H #Hd1e2 #He2de1
-  elim (le_inv_plus_l … Hd1e2) #_ #He2
-  <minus_le_minus_minus_comm //
-  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
-  elim (IHK01 … HK0L2 ? ?) -K0 /2 width=1/ /3 width=3/
-]
-qed.
-
-lemma ltpss_sn_ldrop_trans_be: ∀L1,L0,d1,e1. L1 ⊢ ▶* [d1, e1] L0 →
-                               ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → d1 ≤ e2 → e2 ≤ d1 + e1 →
-                               ∃∃L. L ⊢ ▶* [0, d1 + e1 - e2] L2 & ⇩[0, e2] L1 ≡ L.
-#L1 #L0 #d1 #e1 #H elim H -L1 -L0 -d1 -e1
-[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H /2 width=3/
-| normalize #L #I #V #L2 #e2 #HL2 #_ #He2
-  lapply (le_n_O_to_eq … He2) -He2 #H destruct
-  lapply (ldrop_inv_refl … HL2) -HL2 #H destruct /2 width=3/
-| normalize #K1 #K0 #I #V1 #V0 #e1 #HK10 #HV10 #IHK10 #L2 #e2 #H #_ #He21
-  lapply (ldrop_inv_O1 … H) -H * * #He2 #HK0L2
-  [ -IHK10 -He21 destruct <minus_n_O /3 width=3/
-  | -HK10 -HV10 <minus_le_minus_minus_comm //
-    elim (IHK10 … HK0L2 ? ?) -K0 // /2 width=1/ /3 width=3/
-  ]
-| #K1 #K0 #I #V1 #V0 #d1 #e1 >plus_plus_comm_23 #_ #_ #IHK10 #L2 #e2 #H #Hd1e2 #He2de1
-  elim (le_inv_plus_l … Hd1e2) #_ #He2
-  <minus_le_minus_minus_comm //
-  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
-  elim (IHK10 … HK0L2 ? ?) -K0 /2 width=1/ /3 width=3/
-]
-qed.
-
-lemma ltpss_sn_ldrop_conf_le: ∀L0,L1,d1,e1. L0 ⊢ ▶* [d1, e1] L1 →
-                              ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → e2 ≤ d1 →
-                              ∃∃L. L2 ⊢ ▶* [d1 - e2, e1] L & ⇩[0, e2] L1 ≡ L.
-#L0 #L1 #d1 #e1 #H elim H -L0 -L1 -d1 -e1
-[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H /2 width=3/
-| /2 width=3/
-| normalize #K0 #K1 #I #V0 #V1 #e1 #HK01 #HV01 #_ #L2 #e2 #H #He2
-  lapply (le_n_O_to_eq … He2) -He2 #He2 destruct
-  lapply (ldrop_inv_refl … H) -H #H destruct /3 width=3/
-| #K0 #K1 #I #V0 #V1 #d1 #e1 #HK01 #HV01 #IHK01 #L2 #e2 #H #He2d1
-  lapply (ldrop_inv_O1 … H) -H * * #He2 #HK0L2
-  [ -IHK01 -He2d1 destruct <minus_n_O /3 width=3/
-  | -HK01 -HV01 <minus_le_minus_minus_comm //
-    elim (IHK01 … HK0L2 ?) -K0 /2 width=1/ /3 width=3/
-  ]
-]
-qed.
-
-lemma ltpss_sn_ldrop_trans_le: ∀L1,L0,d1,e1. L1 ⊢ ▶* [d1, e1] L0 →
-                               ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → e2 ≤ d1 →
-                               ∃∃L. L ⊢ ▶* [d1 - e2, e1] L2 & ⇩[0, e2] L1 ≡ L.
-#L1 #L0 #d1 #e1 #H elim H -L1 -L0 -d1 -e1
-[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H /2 width=3/
-| /2 width=3/
-| normalize #K1 #K0 #I #V1 #V0 #e1 #HK10 #HV10 #_ #L2 #e2 #H #He2
-  lapply (le_n_O_to_eq … He2) -He2 #He2 destruct
-  lapply (ldrop_inv_refl … H) -H #H destruct /3 width=3/
-| #K1 #K0 #I #V1 #V0 #d1 #e1 #HK10 #HV10 #IHK10 #L2 #e2 #H #He2d1
-  lapply (ldrop_inv_O1 … H) -H * * #He2 #HK0L2
-  [ -IHK10 -He2d1 destruct <minus_n_O /3 width=3/
-  | -HK10 -HV10 <minus_le_minus_minus_comm //
-    elim (IHK10 … HK0L2 ?) -K0 /2 width=1/ /3 width=3/
-  ]
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_sn_ltpss_sn.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_sn_ltpss_sn.ma
deleted file mode 100644 (file)
index 10a1901..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/tpss_tpss.ma".
-include "basic_2/unfold/tpss_alt.ma".
-include "basic_2/unfold/ltpss_sn_tpss.ma".
-
-(* PARTIAL UNFOLD ON LOCAL ENVIRONMENTS *************************************)
-
-(* Advanced properties ******************************************************)
-
-fact ltpss_sn_tpss_trans_eq_aux: ∀Y1,X2,L1,T2,U2,d,e.
-                                 L1 ⊢ T2 ▶* [d, e] U2 → ∀L0. L0 ⊢ ▶* [d, e] L1 →
-                                 Y1 = L1 → X2 = T2 → L0 ⊢ T2 ▶* [d, e] U2.
-#Y1 #X2 @(fw_ind … Y1 X2) -Y1 -X2 #Y1 #X2 #IH
-#L1 #T2 #U2 #d #e #H @(tpss_ind_alt … H) -L1 -T2 -U2 -d -e
-[ //
-| #L1 #K1 #V1 #V2 #W2 #i #d #e #Hdi #Hide #HLK1 #HV12 #HVW2 #_ #L0 #HL01 #H1 #H2 destruct
-  lapply (ldrop_fwd_lw … HLK1) #H1 normalize in H1;
-  elim (ltpss_sn_ldrop_trans_be … HL01 … HLK1 ? ?) -HL01 -HLK1 // /2 width=2/ #X #H #HLK0
-  elim (ltpss_sn_inv_tpss22 … H ?) -H /2 width=1/ #K0 #V0 #HK01 #HV01 #H destruct
-  lapply (IH … HV12 … HK01 ? ?) -IH -HV12 -HK01 [1,3: // |2,4: skip | normalize /2 width=1/ ] #HV12 
-  lapply (tpss_trans_eq … HV01 HV12) -V1 /2 width=6/
-| #L #a #I #V1 #V2 #T1 #T2 #d #e #HV12 #HT12 #_ #_ #L0 #HL0 #H1 #H2 destruct
-  lapply (tpss_lsubs_trans … HT12 (L. ⓑ{I} V1) ?) -HT12 /2 width=1/ #HT12
-  lapply (IH … HV12 … HL0 ? ?) -HV12 [1,3: // |2,4: skip |5: /2 width=2/ ] #HV12
-  lapply (IH … HT12 (L0. ⓑ{I} V1) ? ? ?) -IH -HT12 [1,3,5: /2 width=2/ |2,4: skip | normalize // ] -HL0 #HT12
-  lapply (tpss_lsubs_trans … HT12 (L0. ⓑ{I} V2) ?) -HT12 /2 width=1/
-| #L #I #V1 #V2 #T1 #T2 #d #e #HV12 #HT12 #_ #_ #L0 #HL0 #H1 #H2 destruct
-  lapply (IH … HV12 … HL0 ? ?) -HV12 [1,3: // |2,4: skip |5: /2 width=3/ ]
-  lapply (IH … HT12 … HL0 ? ?) -IH -HT12 [1,3,5: normalize // |2,4: skip ] -HL0 /2 width=1/
-]
-qed.
-
-lemma ltpss_sn_tpss_trans_eq: ∀L1,T2,U2,d,e. L1 ⊢ T2 ▶* [d, e] U2 →
-                              ∀L0. L0 ⊢ ▶* [d, e] L1 → L0 ⊢ T2 ▶* [d, e] U2.
-/2 width=5/ qed.
-
-lemma ltpss_sn_tps_trans_eq: ∀L0,L1,T2,U2,d,e. L0 ⊢ ▶* [d, e] L1 →
-                             L1 ⊢ T2 ▶ [d, e] U2 → L0 ⊢ T2 ▶* [d, e] U2.
-/3 width=3/ qed.
-
-(* Main properties **********************************************************)
-
-theorem ltpss_sn_trans_eq: ∀L1,L,d,e. L1 ⊢ ▶* [d, e] L →
-                           ∀L2. L ⊢ ▶* [d, e] L2 → L1 ⊢ ▶* [d, e] L2.
-#L1 #L #d #e #H elim H -L1 -L -d -e //
-[ #L1 #L #I #V1 #V #e #HL1 #HV1 #IHL1 #X #H
-  elim (ltpss_sn_inv_tpss21 … H ?) -H // <minus_plus_m_m #L2 #V2 #HL2 #HV2 #H destruct
-  lapply (ltpss_sn_tpss_trans_eq … HV2 … HL1) -HV2 -HL1 #HV2
-  lapply (tpss_trans_eq … HV1 … HV2) -V /3 width=1/
-| #L1 #L #I #V1 #V #d #e #HL1 #HV1 #IHL1 #X #H
-  elim (ltpss_sn_inv_tpss11 … H ?) -H // <minus_plus_m_m #L2 #V2 #HL2 #HV2 #H destruct
-  lapply (ltpss_sn_tpss_trans_eq … HV2 … HL1) -HV2 -HL1 #HV2
-  lapply (tpss_trans_eq … HV1 … HV2) -V /3 width=1/
-]
-qed.
-
-(* Advanced forward lemmas **************************************************)
-
-lemma tps_fwd_shift1: ∀L1,L,T1,T,d,e. L ⊢ L1 @@ T1 ▶ [d, e] T →
-                      ∃∃L2,T2. L @@ L1 ⊢ ▶* [d + |L1|, e] L @@ L2 &
-                               L @@ L2 ⊢ T1 ▶ [d + |L1|, e] T2 &
-                               T = L2 @@ T2.
-#L1 @(lenv_ind_dx … L1) -L1
-[ #L #T1 #T #d #e #HT1
-  @ex3_2_intro [3: // |5: // |4: normalize /2 width=1/ |1,2: skip ] (**) (* /2 width=4/ does not work *)
-| #I #L1 #V1 #IH #L #T1 #T #d #e >shift_append_assoc #H
-  elim (tps_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
-  elim (IH … HT12) -IH -HT12 #L2 #T #HL12 #HT1 #H destruct
-  <append_assoc >append_length <associative_plus
-  lapply (ltpss_sn_trans_eq (L.ⓑ{I}V1@@L1) … HL12) -HL12 /3 width=1/ #HL12
-  @(ex3_2_intro … (⋆.ⓑ{I}V2@@L2)) [4: /2 width=3/ | skip ] <append_assoc // (**) (* explicit constructor *)
-]
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_sn_tps.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_sn_tps.ma
deleted file mode 100644 (file)
index 1de83c6..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/ltpss_sn_ldrop.ma".
-
-(* SN PARALLEL UNFOLD ON LOCAL ENVIRONMENTS *********************************)
-
-(* Properties concerning partial substitution on terms **********************)
-
-lemma ltpss_sn_tps_conf_ge: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶ [d2, e2] U2 →
-                            ∀L1,d1,e1. L0 ⊢ ▶* [d1, e1] L1 → d1 + e1 ≤ d2 →
-                            L1 ⊢ T2 ▶ [d2, e2] U2.
-#L0 #T2 #U2 #d2 #e2 #H elim H -L0 -T2 -U2 -d2 -e2
-[ //
-| #L0 #K0 #V0 #W0 #i2 #d2 #e2 #Hdi2 #Hide2 #HLK0 #HVW0 #L1 #d1 #e1 #HL01 #Hde1d2
-  lapply (transitive_le … Hde1d2 Hdi2) -Hde1d2 #Hde1i2
-  lapply (ltpss_sn_ldrop_conf_ge … HL01 … HLK0 ?) -L0 // /2 width=4/
-| #L0 #a #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL01 #Hde1d2
-  @tps_bind [ /2 width=4/ | @IHTU2 -IHTU2 -IHVW2 [3: /2 by ltpss_sn_tpss1/ |1,2: skip | /2 width=1/ ] ] (**) (* explicit constructor *)
-| /3 width=4/
-]
-qed.
-
-lemma ltpss_sn_tps_trans_ge: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶ [d2, e2] U2 →
-                             ∀L1,d1,e1. L1 ⊢ ▶* [d1, e1] L0 → d1 + e1 ≤ d2 →
-                             L1 ⊢ T2 ▶ [d2, e2] U2.
-#L0 #T2 #U2 #d2 #e2 #H elim H -L0 -T2 -U2 -d2 -e2
-[ //
-| #L0 #K0 #V0 #W0 #i2 #d2 #e2 #Hdi2 #Hide2 #HLK0 #HVW0 #L1 #d1 #e1 #HL10 #Hde1d2
-  lapply (transitive_le … Hde1d2 Hdi2) -Hde1d2 #Hde1i2
-  lapply (ltpss_sn_ldrop_trans_ge … HL10 … HLK0 ?) -L0 // /2 width=4/
-| #L0 #a #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL10 #Hde1d2
-  @tps_bind [ /2 width=4/ | @IHTU2 -IHTU2 -IHVW2 [3: /2 by ltpss_sn_tpss1/ |1,2: skip | /2 width=1/ ] ] (**) (* explicit constructor *)
-| /3 width=4/
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_sn_tpss.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/ltpss_sn_tpss.ma
deleted file mode 100644 (file)
index 0708932..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/tpss_lift.ma".
-include "basic_2/unfold/ltpss_sn_tps.ma".
-
-(* SN PARALLEL UNFOLD ON LOCAL ENVIRONMENTS *********************************)
-
-(* Properties concerning partial unfold on terms ****************************)
-
-lemma ltpss_sn_tpss_conf_ge: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶* [d2, e2] U2 →
-                             ∀L1,d1,e1. L0 ⊢ ▶* [d1, e1] L1 → d1 + e1 ≤ d2 →
-                             L1 ⊢ T2 ▶* [d2, e2] U2.
-#L0 #T2 #U2 #d2 #e2 #H #L1 #d1 #e1 #HL01 #Hde1d2 @(tpss_ind … H) -U2 //
-#U #U2 #_ #HU2 #IHU
-lapply (ltpss_sn_tps_conf_ge … HU2 … HL01 ?) -L0 // -Hde1d2 /2 width=3/
-qed.
-
-lemma ltpss_sn_tps_conf: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶ [d2, e2] U2 →
-                         ∀L1,d1,e1. L0 ⊢ ▶* [d1, e1] L1 →
-                         ∃∃T. L1 ⊢ T2 ▶ [d2, e2] T &
-                              L0 ⊢ U2 ▶* [d1, e1] T.
-#L0 #T2 #U2 #d2 #e2 #H elim H -L0 -T2 -U2 -d2 -e2
-[ /2 width=3/
-| #L0 #K0 #V0 #W0 #i2 #d2 #e2 #Hdi2 #Hide2 #HLK0 #HVW0 #L1 #d1 #e1 #HL01
-  elim (lt_or_ge i2 d1) #Hi2d1
-  [ elim (ltpss_sn_ldrop_conf_le … HL01 … HLK0 ?) /2 width=2/ #X #H #HLK1
-    elim (ltpss_sn_inv_tpss11 … H ?) -H /2 width=1/ #K1 #V1 #_ #HV01 #H destruct
-    lapply (ldrop_fwd_ldrop2 … HLK0) -HLK0 #HLK0
-    elim (lift_total V1 0 (i2 + 1)) #W1 #HVW1
-    lapply (tpss_lift_ge … HV01 … HLK0 HVW0 … HVW1) -V0 -HLK0 // >minus_plus <plus_minus_m_m // /3 width=4/
-  | elim (lt_or_ge i2 (d1 + e1)) #Hde1i2
-    [ elim (ltpss_sn_ldrop_conf_be … HL01 … HLK0 ? ?) -HL01 // /2 width=2/ #X #H #HLK1
-      elim (ltpss_sn_inv_tpss21 … H ?) -H /2 width=1/ #K1 #V1 #_ #HV01 #H destruct
-      lapply (ldrop_fwd_ldrop2 … HLK0) -HLK0 #HLK0
-      elim (lift_total V1 0 (i2 + 1)) #W1 #HVW1
-      lapply (tpss_lift_ge … HV01 … HLK0 HVW0 … HVW1) -V0 -HLK0 // normalize #HW01
-      lapply (tpss_weak … HW01 d1 e1 ? ?) [2: /2 width=1/ |3: /3 width=4/ ] >minus_plus >commutative_plus /2 width=1/
-    | lapply (ltpss_sn_ldrop_conf_ge … HL01 … HLK0 ?) -HL01 -HLK0 // /3 width=4/
-    ]
-  ]
-| #L0 #a #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL01
-  elim (IHVW2 … HL01) -IHVW2 #V #HV2 #HVW2
-  elim (IHTU2 (L1. ⓑ{I} V) (d1 + 1) e1 ?) -IHTU2 /2 width=1/ -HL01 #T #HT2 #H
-  lapply (tpss_lsubs_trans … H (L0.ⓑ{I}V) ?) -H /2 width=1/ /3 width=5/
-| #L0 #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL01
-  elim (IHVW2 … HL01) -IHVW2
-  elim (IHTU2 … HL01) -IHTU2 -HL01 /3 width=5/
-]
-qed.
-
-lemma ltpss_sn_tpss_trans_ge: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶* [d2, e2] U2 →
-                              ∀L1,d1,e1. L1 ⊢ ▶* [d1, e1] L0 → d1 + e1 ≤ d2 →
-                              L1 ⊢ T2 ▶* [d2, e2] U2.
-#L0 #T2 #U2 #d2 #e2 #H #L1 #d1 #e1 #HL01 #Hde1d2 @(tpss_ind … H) -U2 //
-#U #U2 #_ #HU2 #IHU
-lapply (ltpss_sn_tps_trans_ge … HU2 … HL01 ?) -L0 // -Hde1d2 /2 width=3/
-qed.
-
-lemma ltpss_sn_tps_trans: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶ [d2, e2] U2 →
-                          ∀L1,d1,e1. L1 ⊢ ▶* [d1, e1] L0 →
-                          ∃∃T. L1 ⊢ T2 ▶ [d2, e2] T &
-                               L1 ⊢ T ▶* [d1, e1] U2.
-#L0 #T2 #U2 #d2 #e2 #H elim H -L0 -T2 -U2 -d2 -e2
-[ /2 width=3/
-| #L0 #K0 #V0 #W0 #i2 #d2 #e2 #Hdi2 #Hide2 #HLK0 #HVW0 #L1 #d1 #e1 #HL10
-  elim (lt_or_ge i2 d1) #Hi2d1
-  [ elim (ltpss_sn_ldrop_trans_le … HL10 … HLK0 ?) -L0 /2 width=2/ #X #H #HLK1
-    elim (ltpss_sn_inv_tpss12 … H ?) -H /2 width=1/ #K1 #V1 #_ #HV01 #H destruct
-    lapply (ldrop_fwd_ldrop2 … HLK1) #H
-    elim (lift_total V1 0 (i2 + 1)) #W1 #HVW1
-    lapply (tpss_lift_ge … HV01 … H HVW1 … HVW0) -V0 -H // >minus_plus <plus_minus_m_m /2 width=1/ /3 width=4/
-  | elim (lt_or_ge i2 (d1 + e1)) #Hde1i2
-    [ elim (ltpss_sn_ldrop_trans_be … HL10 … HLK0 ? ?) -L0 // /2 width=2/ #X #H #HLK1
-      elim (ltpss_sn_inv_tpss22 … H ?) -H /2 width=1/ #K1 #V1 #_ #HV01 #H destruct
-      lapply (ldrop_fwd_ldrop2 … HLK1) #H
-      elim (lift_total V1 0 (i2 + 1)) #W1 #HVW1
-      lapply (tpss_lift_ge … HV01 … H HVW1 … HVW0) -V0 -H // normalize #HW01
-      lapply (tpss_weak … HW01 d1 e1 ? ?) [2: /3 width=1/ |3: /3 width=4/ ] >minus_plus >commutative_plus /2 width=1/
-    | lapply (ltpss_sn_ldrop_trans_ge … HL10 … HLK0 ?) -HL10 -HLK0 // /3 width=4/
-    ]
-  ]
-| #L0 #a #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL10
-  elim (IHVW2 … HL10) -IHVW2 #V #HV2 #HVW2
-  elim (IHTU2 (L1. ⓑ{I} V) (d1 + 1) e1 ?) -IHTU2 /2 width=1/ -HL10 #T #HT2 #H
-  lapply (tpss_lsubs_trans … H (L1.ⓑ{I}W2) ?) -H /2 width=1/ /3 width=5/
-| #L0 #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL10
-  elim (IHVW2 … HL10) -IHVW2
-  elim (IHTU2 … HL10) -IHTU2 -HL10 /3 width=5/
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/thin.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/thin.ma
deleted file mode 100644 (file)
index 65fb76f..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/unfold/ltpss_sn.ma".
-
-(* BASIC LOCAL ENVIRONMENT THINNING *****************************************)
-
-definition thin: nat → nat → relation lenv ≝
-                 λd,e,L1,L2. ∃∃L. L1 ⊢ ▶* [d, e] L & ⇩[d, e] L ≡ L2.
-
-interpretation "basic thinning (local environment)"
-   'TSubst L1 d e L2 = (thin d e L1 L2).
-
-(* Basic properties *********************************************************)
-
-lemma ldrop_thin: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → ▼*[d, e] L1 ≡ L2.
-/2 width=3/ qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma thin_inv_thin1: ∀I,K1,V1,L2,e. ▼*[0, e] K1.ⓑ{I} V1 ≡ L2 → 0 < e →
-                      ▼*[0, e - 1] K1 ≡ L2.
-#I #K1 #V1 #L2 #e * #X #HK1 #HL2 #e
-elim (ltpss_sn_inv_tpss21 … HK1 ?) -HK1 // #K #V #HK1 #_ #H destruct
-lapply (ldrop_inv_ldrop1 … HL2 ?) -HL2 // /2 width=3/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/thin_delift.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/thin_delift.ma
deleted file mode 100644 (file)
index b5ffc5e..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/delift_tpss.ma".
-include "basic_2/unfold/delift_ltpss.ma".
-include "basic_2/unfold/thin.ma".
-
-(* BASIC DELIFT ON LOCAL ENVIRONMENTS ***************************************)
-
-(* Inversion lemmas on inverse basic term relocation ************************)
-
-lemma thin_inv_delift1: ∀I,K1,V1,L2,d,e. ▼*[d, e] K1. ⓑ{I} V1 ≡ L2 → 0 < d →
-                        ∃∃K2,V2. ▼*[d - 1, e] K1 ≡ K2 &
-                                 K1 ⊢ ▼*[d - 1, e] V1 ≡ V2 &
-                                 L2 = K2. ⓑ{I} V2.
-#I #K1 #V1 #L2 #d #e * #X #HK1 #HL2 #e
-elim (ltpss_sn_inv_tpss11 … HK1 ?) -HK1 // #K #V #HK1 #HV1 #H destruct
-elim (ldrop_inv_skip1 … HL2 ?) -HL2 // #K2 #V2 #HK2 #HV2 #H destruct /3 width=5/
-qed-.
-
-(* Properties on inverse basic term relocation ******************************)
-
-lemma thin_delift: ∀L1,L2,d,e. ▼*[d, e] L1 ≡ L2 → ∀V1,V2. L1 ⊢ ▼*[d, e] V1 ≡ V2 →
-                   ∀I. ▼*[d + 1, e] L1.ⓑ{I}V1 ≡ L2.ⓑ{I}V2.
-#L1 #L2 #d #e * #L #HL1 #HL2 #V1 #V2 * #V #HV1 #HV2 #I
-elim (ltpss_sn_tpss_conf … HV1 … HL1) -HV1 #V0 #HV10 #HV0
-lapply (tpss_inv_lift1_eq … HV0 … HV2) -HV0 #H destruct
-lapply (ltpss_sn_tpss_trans_eq … HV10 … HL1) -HV10 /3 width=5/
-qed.
-
-lemma thin_delift_tpss_conf_le: ∀L,U1,U2,d,e. L ⊢ U1 ▶* [d, e] U2 →
-                                ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
-                                ∀K. ▼*[dd, ee] L ≡ K → d + e ≤ dd →
-                                ∃∃T2. K ⊢ T1 ▶* [d, e] T2 &
-                                      L ⊢ ▼*[dd, ee] U2 ≡ T2.
-#L #U1 #U2 #d #e #HU12 #T1 #dd #ee #HUT1 #K * #Y #HLY #HYK #Hdedd
-lapply (delift_ltpss_sn_conf_eq … HUT1 … HLY) -HUT1 #HUT1
-elim (ltpss_sn_tpss_conf … HU12 … HLY) -HU12 #U #HU1 #HU2
-elim (delift_tpss_conf_le … HU1 … HUT1 … HYK ?) -HU1 -HUT1 -HYK // -Hdedd #T #HT1 #HUT
-lapply (ltpss_sn_delift_trans_eq … HLY … HUT) -HLY -HUT #HUT
-lapply (tpss_delift_trans_eq … HU2 … HUT) -U /2 width=3/
-qed.
-
-lemma thin_delift_tps_conf_le: ∀L,U1,U2,d,e. L ⊢ U1 ▶ [d, e] U2 →
-                               ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
-                               ∀K. ▼*[dd, ee] L ≡ K → d + e ≤ dd →
-                               ∃∃T2. K ⊢ T1 ▶* [d, e] T2 &
-                                     L ⊢ ▼*[dd, ee] U2 ≡ T2.
-/3 width=3/ qed.
-
-lemma thin_delift_tpss_conf_le_up: ∀L,U1,U2,d,e. L ⊢ U1 ▶* [d, e] U2 →
-                                   ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
-                                   ∀K. ▼*[dd, ee] L ≡ K →
-                                   d ≤ dd → dd ≤ d + e → d + e ≤ dd + ee →
-                                   ∃∃T2. K ⊢ T1 ▶* [d, dd - d] T2 &
-                                         L ⊢ ▼*[dd, ee] U2 ≡ T2.
-#L #U1 #U2 #d #e #HU12 #T1 #dd #ee #HUT1 #K * #Y #HLY #HYK #Hdd #Hdde #Hddee
-lapply (delift_ltpss_sn_conf_eq … HUT1 … HLY) -HUT1 #HUT1
-elim (ltpss_sn_tpss_conf … HU12 … HLY) -HU12 #U #HU1 #HU2
-elim (delift_tpss_conf_le_up … HU1 … HUT1 … HYK ? ? ?) -HU1 -HUT1 -HYK // -Hdd -Hdde -Hddee #T #HT1 #HUT
-lapply (ltpss_sn_delift_trans_eq … HLY … HUT) -HLY -HUT #HUT
-lapply (tpss_delift_trans_eq … HU2 … HUT) -U /2 width=3/
-qed.
-
-lemma thin_delift_tps_conf_le_up: ∀L,U1,U2,d,e. L ⊢ U1 ▶ [d, e] U2 →
-                                  ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
-                                  ∀K. ▼*[dd, ee] L ≡ K →
-                                  d ≤ dd → dd ≤ d + e → d + e ≤ dd + ee →
-                                  ∃∃T2. K ⊢ T1 ▶* [d, dd - d] T2 &
-                                        L ⊢ ▼*[dd, ee] U2 ≡ T2.
-/3 width=6 by thin_delift_tpss_conf_le_up, tpss_strap2/ qed. (**) (* too slow without trace *)
-
-lemma thin_delift_tpss_conf_be: ∀L,U1,U2,d,e. L ⊢ U1 ▶* [d, e] U2 →
-                                ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
-                                ∀K. ▼*[dd, ee] L ≡ K → d ≤ dd → dd + ee ≤ d + e →
-                                ∃∃T2. K ⊢ T1 ▶* [d, e - ee] T2 &
-                                      L ⊢ ▼*[dd, ee] U2 ≡ T2.
-#L #U1 #U2 #d #e #HU12 #T1 #dd #ee #HUT1 #K * #Y #HLY #HYK #Hdd #Hddee
-lapply (delift_ltpss_sn_conf_eq … HUT1 … HLY) -HUT1 #HUT1
-elim (ltpss_sn_tpss_conf … HU12 … HLY) -HU12 #U #HU1 #HU2
-elim (delift_tpss_conf_be … HU1 … HUT1 … HYK ? ?) -HU1 -HUT1 -HYK // -Hdd -Hddee #T #HT1 #HUT
-lapply (ltpss_sn_delift_trans_eq … HLY … HUT) -HLY -HUT #HUT
-lapply (tpss_delift_trans_eq … HU2 … HUT) -U /2 width=3/
-qed.
-
-lemma thin_delift_tps_conf_be: ∀L,U1,U2,d,e. L ⊢ U1 ▶ [d, e] U2 →
-                               ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
-                               ∀K. ▼*[dd, ee] L ≡ K → d ≤ dd → dd + ee ≤ d + e →
-                               ∃∃T2. K ⊢ T1 ▶* [d, e - ee] T2 &
-                                     L ⊢ ▼*[dd, ee] U2 ≡ T2.
-/3 width=3/ qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/thin_ldrop.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/thin_ldrop.ma
deleted file mode 100644 (file)
index 498660e..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/ldrop_ldrop.ma".
-include "basic_2/unfold/ltpss_sn_ldrop.ma".
-include "basic_2/unfold/thin.ma".
-
-(* BASIC LOCAL ENVIRONMENT THINNING *****************************************)
-
-(* Properties on local environment slicing **********************************)
-
-lemma thin_ldrop_conf_ge: ∀L0,L1,d1,e1. ▼*[d1, e1] L0 ≡ L1 →
-                          ∀L2,e2. ⇩[0, e2] L0 ≡ L2 →
-                          d1 + e1 ≤ e2 → ⇩[0, e2 - e1] L1 ≡ L2.
-#L0 #L1 #d1 #e1 * /3 width=8 by ltpss_sn_ldrop_conf_ge, ldrop_conf_ge/
-qed.
-
-lemma thin_ldrop_conf_be: ∀L0,L1,d1,e1. ▼*[d1, e1] L0 ≡ L1 →
-                          ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → d1 ≤ e2 → e2 ≤ d1 + e1 →
-                          ∃∃L. ▼*[0, d1 + e1 - e2] L2 ≡ L & ⇩[0, d1] L1 ≡ L.
-#L0 #L1 #d1 #e1 * #L #HL0 #HL1 #L2 #e2 #HL02 #Hd1e2 #He2de1
-elim (ltpss_sn_ldrop_conf_be … HL0 … HL02 ? ?) -L0 // #L0 #HL20 #HL0
-elim (ldrop_conf_be … HL1 … HL0 ? ?) -L // -Hd1e2 -He2de1 /3 width=3/
-qed.
-
-lemma thin_ldrop_conf_le: ∀L0,L1,d1,e1. ▼*[d1, e1] L0 ≡ L1 →
-                          ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → e2 ≤ d1 →
-                          ∃∃L. ▼*[d1 - e2, e1] L2 ≡ L & ⇩[0, e2] L1 ≡ L.
-#L0 #L1 #d1 #e1 * #L #HL0 #HL1 #L2 #e2 #HL02 #He2d1
-elim (ltpss_sn_ldrop_conf_le … HL0 … HL02 ?) -L0 // #L0 #HL20 #HL0
-elim (ldrop_conf_le … HL1 … HL0 ?) -L // -He2d1 /3 width=3/
-qed.
-
-lemma thin_ldrop_trans_ge: ∀L1,L0,d1,e1. ▼*[d1, e1] L1 ≡ L0 →
-                           ∀L2,e2. ⇩[0, e2] L0 ≡ L2 →
-                           d1 ≤ e2 → ⇩[0, e1 + e2] L1 ≡ L2.
-#L1 #L0 #d1 #e1 * #L #HL1 #HL0 #L2 #e2 #HL02 #Hd1e2
-lapply (ldrop_trans_ge … HL0 … HL02 ?) -L0 // #HL2
-lapply (ltpss_sn_ldrop_trans_ge … HL1 … HL2 ?) -L // /2 width=1/
-qed.
-
-lemma thin_ldrop_trans_le: ∀L1,L0,d1,e1. ▼*[d1, e1] L1 ≡ L0 →
-                           ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → e2 ≤ d1 →
-                           ∃∃L. ▼*[d1 - e2, e1] L ≡ L2 & ⇩[0, e2] L1 ≡ L.
-#L1 #L0 #d1 #e1 * #L #HL1 #HL0 #L2 #e2 #HL02 #He2d1
-elim (ldrop_trans_le … HL0 … HL02 He2d1) -L0 #L0 #HL0 #HL02
-elim (ltpss_sn_ldrop_trans_le … HL1 … HL0 He2d1) -L -He2d1 /3 width=3/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/tpss.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/tpss.ma
deleted file mode 100644 (file)
index 9391620..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/tps.ma".
-
-(* PARTIAL UNFOLD ON TERMS **************************************************)
-
-definition tpss: nat → nat → lenv → relation term ≝
-                 λd,e,L. TC … (tps d e L).
-
-interpretation "partial unfold (term)"
-   'PSubstStar L T1 d e T2 = (tpss d e L T1 T2).
-
-(* Basic eliminators ********************************************************)
-
-lemma tpss_ind: ∀d,e,L,T1. ∀R:predicate term. R T1 →
-                (∀T,T2. L ⊢ T1 ▶* [d, e] T → L ⊢ T ▶ [d, e] T2 → R T → R T2) →
-                ∀T2. L ⊢ T1 ▶* [d, e] T2 → R T2.
-#d #e #L #T1 #R #HT1 #IHT1 #T2 #HT12
-@(TC_star_ind … HT1 IHT1 … HT12) //
-qed-.
-
-lemma tpss_ind_dx: ∀d,e,L,T2. ∀R:predicate term. R T2 →
-                   (∀T1,T. L ⊢ T1 ▶ [d, e] T → L ⊢ T ▶* [d, e] T2 → R T → R T1) →
-                   ∀T1. L ⊢ T1 ▶* [d, e] T2 → R T1.
-#d #e #L #T2 #R #HT2 #IHT2 #T1 #HT12
-@(TC_star_ind_dx … HT2 IHT2 … HT12) //
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma tpss_strap1: ∀L,T1,T,T2,d,e.
-                   L ⊢ T1 ▶* [d, e] T → L ⊢ T ▶ [d, e] T2 → L ⊢ T1 ▶* [d, e] T2. 
-/2 width=3/ qed.
-
-lemma tpss_strap2: ∀L,T1,T,T2,d,e.
-                   L ⊢ T1 ▶ [d, e] T → L ⊢ T ▶* [d, e] T2 → L ⊢ T1 ▶* [d, e] T2. 
-/2 width=3/ qed.
-
-lemma tpss_lsubs_trans: ∀L1,T1,T2,d,e. L1 ⊢ T1 ▶* [d, e] T2 →
-                        ∀L2. L2 ≼ [d, e] L1 → L2 ⊢ T1 ▶* [d, e] T2.
-/3 width=3/ qed.
-
-lemma tpss_refl: ∀d,e,L,T. L ⊢ T ▶* [d, e] T.
-/2 width=1/ qed.
-
-lemma tpss_bind: ∀L,V1,V2,d,e. L ⊢ V1 ▶* [d, e] V2 →
-                 ∀a,I,T1,T2. L. ⓑ{I} V2 ⊢ T1 ▶* [d + 1, e] T2 →
-                 L ⊢ ⓑ{a,I} V1. T1 ▶* [d, e] ⓑ{a,I} V2. T2.
-#L #V1 #V2 #d #e #HV12 elim HV12 -V2
-[ #V2 #HV12 #a #I #T1 #T2 #HT12 elim HT12 -T2
-  [ /3 width=5/
-  | #T #T2 #_ #HT2 #IHT @step /2 width=5/ (**) (* /3 width=5/ is too slow *)
-  ]
-| #V #V2 #_ #HV12 #IHV #a #I #T1 #T2 #HT12
-  lapply (tpss_lsubs_trans … HT12 (L. ⓑ{I} V) ?) -HT12 /2 width=1/ #HT12
-  lapply (IHV a … HT12) -IHV -HT12 #HT12 @step /2 width=5/ (**) (* /3 width=5/ is too slow *)
-]
-qed.
-
-lemma tpss_flat: ∀L,I,V1,V2,T1,T2,d,e.
-                 L ⊢ V1 ▶* [d, e] V2 → L ⊢ T1 ▶* [d, e] T2 →
-                 L ⊢ ⓕ{I} V1. T1 ▶* [d, e] ⓕ{I} V2. T2.
-#L #I #V1 #V2 #T1 #T2 #d #e #HV12 elim HV12 -V2
-[ #V2 #HV12 #HT12 elim HT12 -T2
-  [ /3 width=1/
-  | #T #T2 #_ #HT2 #IHT @step /2 width=5/ (**) (* /3 width=5/ is too slow *)
-  ]
-| #V #V2 #_ #HV12 #IHV #HT12
-  lapply (IHV … HT12) -IHV -HT12 #HT12 @step /2 width=5/ (**) (* /3 width=5/ is too slow *)
-]
-qed.
-
-lemma tpss_weak: ∀L,T1,T2,d1,e1. L ⊢ T1 ▶* [d1, e1] T2 →
-                 ∀d2,e2. d2 ≤ d1 → d1 + e1 ≤ d2 + e2 →
-                 L ⊢ T1 ▶* [d2, e2] T2.
-#L #T1 #T2 #d1 #e1 #H #d1 #d2 #Hd21 #Hde12 @(tpss_ind … H) -T2
-[ //
-| #T #T2 #_ #HT12 #IHT
-  lapply (tps_weak … HT12 … Hd21 Hde12) -HT12 -Hd21 -Hde12 /2 width=3/
-]
-qed.
-
-lemma tpss_weak_top: ∀L,T1,T2,d,e.
-                     L ⊢ T1 ▶* [d, e] T2 → L ⊢ T1 ▶* [d, |L| - d] T2.
-#L #T1 #T2 #d #e #H @(tpss_ind … H) -T2
-[ //
-| #T #T2 #_ #HT12 #IHT
-  lapply (tps_weak_top … HT12) -HT12 /2 width=3/
-]
-qed.
-
-lemma tpss_weak_all: ∀L,T1,T2,d,e.
-                     L ⊢ T1 ▶* [d, e] T2 → L ⊢ T1 ▶* [0, |L|] T2.
-#L #T1 #T2 #d #e #HT12
-lapply (tpss_weak … HT12 0 (d + e) ? ?) -HT12 // #HT12
-lapply (tpss_weak_top … HT12) //
-qed.
-
-lemma tpss_append: ∀K,T1,T2,d,e. K ⊢ T1 ▶* [d, e] T2 →
-                   ∀L. L @@ K ⊢ T1 ▶* [d, e] T2.
-#K #T1 #T2 #d #e #H @(tpss_ind … H) -T2 // /3 width=3/
-qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-(* Note: this can be derived from tpss_inv_atom1 *)
-lemma tpss_inv_sort1: ∀L,T2,k,d,e. L ⊢ ⋆k ▶* [d, e] T2 → T2 = ⋆k.
-#L #T2 #k #d #e #H @(tpss_ind … H) -T2
-[ //
-| #T #T2 #_ #HT2 #IHT destruct
-  >(tps_inv_sort1 … HT2) -HT2 //
-]
-qed-.
-
-(* Note: this can be derived from tpss_inv_atom1 *)
-lemma tpss_inv_gref1: ∀L,T2,p,d,e. L ⊢ §p ▶* [d, e] T2 → T2 = §p.
-#L #T2 #p #d #e #H @(tpss_ind … H) -T2
-[ //
-| #T #T2 #_ #HT2 #IHT destruct
-  >(tps_inv_gref1 … HT2) -HT2 //
-]
-qed-.
-
-lemma tpss_inv_bind1: ∀d,e,L,a,I,V1,T1,U2. L ⊢ ⓑ{a,I} V1. T1 ▶* [d, e] U2 →
-                      ∃∃V2,T2. L ⊢ V1 ▶* [d, e] V2 & 
-                               L. ⓑ{I} V2 ⊢ T1 ▶* [d + 1, e] T2 &
-                               U2 = ⓑ{a,I} V2. T2.
-#d #e #L #a #I #V1 #T1 #U2 #H @(tpss_ind … H) -U2
-[ /2 width=5/
-| #U #U2 #_ #HU2 * #V #T #HV1 #HT1 #H destruct
-  elim (tps_inv_bind1 … HU2) -HU2 #V2 #T2 #HV2 #HT2 #H
-  lapply (tpss_lsubs_trans … HT1 (L. ⓑ{I} V2) ?) -HT1 /2 width=1/ /3 width=5/
-]
-qed-.
-
-lemma tpss_inv_flat1: ∀d,e,L,I,V1,T1,U2. L ⊢ ⓕ{I} V1. T1 ▶* [d, e] U2 →
-                      ∃∃V2,T2. L ⊢ V1 ▶* [d, e] V2 & L ⊢ T1 ▶* [d, e] T2 &
-                               U2 =  ⓕ{I} V2. T2.
-#d #e #L #I #V1 #T1 #U2 #H @(tpss_ind … H) -U2
-[ /2 width=5/
-| #U #U2 #_ #HU2 * #V #T #HV1 #HT1 #H destruct
-  elim (tps_inv_flat1 … HU2) -HU2 /3 width=5/
-]
-qed-.
-
-lemma tpss_inv_refl_O2: ∀L,T1,T2,d. L ⊢ T1 ▶* [d, 0] T2 → T1 = T2.
-#L #T1 #T2 #d #H @(tpss_ind … H) -T2
-[ //
-| #T #T2 #_ #HT2 #IHT <(tps_inv_refl_O2 … HT2) -HT2 //
-]
-qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma tpss_fwd_tw: ∀L,T1,T2,d,e. L ⊢ T1 ▶* [d, e] T2 → #{T1} ≤ #{T2}.
-#L #T1 #T2 #d #e #H @(tpss_ind … H) -T2 //
-#T #T2 #_ #HT2 #IHT1
-lapply (tps_fwd_tw … HT2) -HT2 #HT2
-@(transitive_le … IHT1) //
-qed-.
-
-lemma tpss_fwd_shift1: ∀L,L1,T1,T,d,e. L ⊢ L1 @@ T1 ▶*[d, e] T →
-                       ∃∃L2,T2. |L1| = |L2| & T = L2 @@ T2.
-#L #L1 #T1 #T #d #e #H @(tpss_ind … H) -T
-[ /2 width=4/
-| #T #X #_ #H0 * #L0 #T0 #HL10 #H destruct
-  elim (tps_fwd_shift1 … H0) -H0 #L2 #T2 #HL02 #H destruct /2 width=4/
-]
-qed-.
-  
\ No newline at end of file
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/tpss_alt.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/tpss_alt.ma
deleted file mode 100644 (file)
index ae1dcf6..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||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/tpss_lift.ma".
-
-(* PARALLEL UNFOLD ON TERMS *************************************************)
-
-(* alternative definition of tpss *)
-inductive tpssa: nat → nat → lenv → relation term ≝
-| tpssa_atom : ∀L,I,d,e. tpssa d e L (⓪{I}) (⓪{I})
-| tpssa_subst: ∀L,K,V1,V2,W2,i,d,e. d ≤ i → i < d + e →
-               ⇩[0, i] L ≡ K. ⓓV1 → tpssa 0 (d + e - i - 1) K V1 V2 →
-               ⇧[0, i + 1] V2 ≡ W2 → tpssa d e L (#i) W2
-| tpssa_bind : ∀L,a,I,V1,V2,T1,T2,d,e.
-               tpssa d e L V1 V2 → tpssa (d + 1) e (L. ⓑ{I} V2) T1 T2 →
-               tpssa d e L (ⓑ{a,I} V1. T1) (ⓑ{a,I} V2. T2)
-| tpssa_flat : ∀L,I,V1,V2,T1,T2,d,e.
-               tpssa d e L V1 V2 → tpssa d e L T1 T2 →
-               tpssa d e L (ⓕ{I} V1. T1) (ⓕ{I} V2. T2)
-.
-
-interpretation "parallel unfold (term) alternative"
-   'PSubstStarAlt L T1 d e T2 = (tpssa d e L T1 T2).
-
-(* Basic properties *********************************************************)
-
-lemma tpssa_lsubs_trans: ∀L1,T1,T2,d,e. L1 ⊢ T1 ▶▶* [d, e] T2 →
-                         ∀L2. L2 ≼ [d, e] L1 → L2 ⊢ T1 ▶▶* [d, e] T2.
-#L1 #T1 #T2 #d #e #H elim H -L1 -T1 -T2 -d -e
-[ //
-| #L1 #K1 #V1 #V2 #W2 #i #d #e #Hdi #Hide #HLK1 #_ #HVW2 #IHV12 #L2 #HL12
-  elim (ldrop_lsubs_ldrop2_abbr … HL12 … HLK1 ? ?) -HL12 -HLK1 // /3 width=6/
-| /4 width=1/
-| /3 width=1/
-]
-qed.
-
-lemma tpssa_refl: ∀T,L,d,e. L ⊢ T ▶▶* [d, e] T.
-#T elim T -T //
-#I elim I -I /2 width=1/
-qed.
-
-lemma tpssa_tps_trans: ∀L,T1,T,d,e. L ⊢ T1 ▶▶* [d, e] T →
-                       ∀T2. L ⊢ T ▶ [d, e] T2 → L ⊢ T1 ▶▶* [d, e] T2.
-#L #T1 #T #d #e #H elim H -L -T1 -T -d -e
-[ #L #I #d #e #X #H
-  elim (tps_inv_atom1 … H) -H // * /2 width=6/
-| #L #K #V1 #V2 #W2 #i #d #e #Hdi #Hide #HLK #_ #HVW2 #IHV12 #T2 #H
-  lapply (ldrop_fwd_ldrop2 … HLK) #H0LK
-  lapply (tps_weak … H 0 (d+e) ? ?) -H // #H
-  elim (tps_inv_lift1_be … H … H0LK … HVW2 ? ?) -H -H0LK -HVW2 // /3 width=6/
-| #L #a #I #V1 #V #T1 #T #d #e #_ #_ #IHV1 #IHT1 #X #H
-  elim (tps_inv_bind1 … H) -H #V2 #T2 #HV2 #HT2 #H destruct
-  lapply (tps_lsubs_trans … HT2 (L.ⓑ{I}V) ?) -HT2 /2 width=1/ #HT2
-  lapply (IHV1 … HV2) -IHV1 -HV2 #HV12
-  lapply (IHT1 … HT2) -IHT1 -HT2 #HT12
-  lapply (tpssa_lsubs_trans … HT12 (L.ⓑ{I}V2) ?) -HT12 /2 width=1/
-| #L #I #V1 #V #T1 #T #d #e #_ #_ #IHV1 #IHT1 #X #H
-  elim (tps_inv_flat1 … H) -H #V2 #T2 #HV2 #HT2 #H destruct /3 width=1/
-]
-qed.
-
-lemma tpss_tpssa: ∀L,T1,T2,d,e. L ⊢ T1 ▶* [d, e] T2 → L ⊢ T1 ▶▶* [d, e] T2.
-#L #T1 #T2 #d #e #H @(tpss_ind … H) -T2 // /2 width=3/
-qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma tpssa_tpss: ∀L,T1,T2,d,e. L ⊢ T1 ▶▶* [d, e] T2 → L ⊢ T1 ▶* [d, e] T2.
-#L #T1 #T2 #d #e #H elim H -L -T1 -T2 -d -e // /2 width=6/
-qed-. 
-
-lemma tpss_ind_alt: ∀R:ℕ→ℕ→lenv→relation term.
-                    (∀L,I,d,e. R d e L (⓪{I}) (⓪{I})) →
-                    (∀L,K,V1,V2,W2,i,d,e. d ≤ i → i < d + e →
-                     ⇩[O, i] L ≡ K.ⓓV1 → K ⊢ V1 ▶* [O, d + e - i - 1] V2 →
-                     ⇧[O, i + 1] V2 ≡ W2 → R O (d+e-i-1) K V1 V2 → R d e L #i W2
-                    ) →
-                    (∀L,a,I,V1,V2,T1,T2,d,e. L ⊢ V1 ▶* [d, e] V2 →
-                     L.ⓑ{I}V2 ⊢ T1 ▶* [d + 1, e] T2 → R d e L V1 V2 →
-                     R (d+1) e (L.ⓑ{I}V2) T1 T2 → R d e L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2)
-                    ) →
-                    (∀L,I,V1,V2,T1,T2,d,e. L ⊢ V1 ▶* [d, e] V2 →
-                     L ⊢ T1 ▶* [d, e] T2 → R d e L V1 V2 →
-                     R d e L T1 T2 → R d e L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2)
-                    ) →
-                    ∀d,e,L,T1,T2. L ⊢ T1 ▶* [d, e] T2 → R d e L T1 T2.
-#R #H1 #H2 #H3 #H4 #d #e #L #T1 #T2 #H elim (tpss_tpssa … H) -L -T1 -T2 -d -e
-// /3 width=1 by tpssa_tpss/ /3 width=7 by tpssa_tpss/
-qed-.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/tpss_lift.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/tpss_lift.ma
deleted file mode 100644 (file)
index a68f86e..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/tps_lift.ma".
-include "basic_2/unfold/tpss.ma".
-
-(* PARTIAL UNFOLD ON TERMS **************************************************)
-
-(* Advanced properties ******************************************************)
-
-lemma tpss_subst: ∀L,K,V,U1,i,d,e.
-                  d ≤ i → i < d + e →
-                  ⇩[0, i] L ≡ K. ⓓV → K ⊢ V ▶* [0, d + e - i - 1] U1 →
-                  ∀U2. ⇧[0, i + 1] U1 ≡ U2 → L ⊢ #i ▶* [d, e] U2.
-#L #K #V #U1 #i #d #e #Hdi #Hide #HLK #H @(tpss_ind … H) -U1
-[ /3 width=4/
-| #U #U1 #_ #HU1 #IHU #U2 #HU12
-  elim (lift_total U 0 (i+1)) #U0 #HU0
-  lapply (IHU … HU0) -IHU #H
-  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
-  lapply (tps_lift_ge … HU1 … HLK HU0 HU12 ?) -HU1 -HLK -HU0 -HU12 // normalize #HU02
-  lapply (tps_weak … HU02 d e ? ?) -HU02 [ >minus_plus >commutative_plus /2 width=1/ | /2 width=1/ | /2 width=3/ ]
-]
-qed.
-
-(* Advanced inverion lemmas *************************************************)
-
-lemma tpss_inv_atom1: ∀L,T2,I,d,e. L ⊢ ⓪{I} ▶* [d, e] T2 →
-                      T2 = ⓪{I} ∨
-                      ∃∃K,V1,V2,i. d ≤ i & i < d + e &
-                                   ⇩[O, i] L ≡ K. ⓓV1 &
-                                   K ⊢ V1 ▶* [0, d + e - i - 1] V2 &
-                                   ⇧[O, i + 1] V2 ≡ T2 &
-                                   I = LRef i.
-#L #T2 #I #d #e #H @(tpss_ind … H) -T2
-[ /2 width=1/
-| #T #T2 #_ #HT2 *
-  [ #H destruct
-    elim (tps_inv_atom1 … HT2) -HT2 [ /2 width=1/ | * /3 width=10/ ]
-  | * #K #V1 #V #i #Hdi #Hide #HLK #HV1 #HVT #HI
-    lapply (ldrop_fwd_ldrop2 … HLK) #H
-    elim (tps_inv_lift1_ge_up … HT2 … H … HVT ? ? ?) normalize -HT2 -H -HVT [2,3,4: /2 width=1/ ] #V2 <minus_plus #HV2 #HVT2
-    @or_intror @(ex6_4_intro … Hdi Hide HLK … HVT2 HI) /2 width=3/ (**) (* /4 width=10/ is too slow *)
-  ]
-]
-qed-.
-
-lemma tpss_inv_lref1: ∀L,T2,i,d,e. L ⊢ #i ▶* [d, e] T2 →
-                      T2 = #i ∨
-                      ∃∃K,V1,V2. d ≤ i & i < d + e &
-                                 ⇩[O, i] L ≡ K. ⓓV1 &
-                                 K ⊢ V1 ▶* [0, d + e - i - 1] V2 &
-                                 ⇧[O, i + 1] V2 ≡ T2.
-#L #T2 #i #d #e #H
-elim (tpss_inv_atom1 … H) -H /2 width=1/
-* #K #V1 #V2 #j #Hdj #Hjde #HLK #HV12 #HVT2 #H destruct /3 width=6/
-qed-.
-
-lemma tpss_inv_S2: ∀L,T1,T2,d,e. L ⊢ T1 ▶* [d, e + 1] T2 →
-                   ∀K,V. ⇩[0, d] L ≡ K. ⓛV → L ⊢ T1 ▶* [d + 1, e] T2.
-#L #T1 #T2 #d #e #H #K #V #HLK @(tpss_ind … H) -T2 //
-#T #T2 #_ #HT2 #IHT
-lapply (tps_inv_S2 … HT2 … HLK) -HT2 -HLK /2 width=3/
-qed-.
-
-lemma tpss_inv_refl_SO2: ∀L,T1,T2,d. L ⊢ T1 ▶* [d, 1] T2 →
-                         ∀K,V. ⇩[0, d] L ≡ K. ⓛV → T1 = T2.
-#L #T1 #T2 #d #H #K #V #HLK @(tpss_ind … H) -T2 //
-#T #T2 #_ #HT2 #IHT <(tps_inv_refl_SO2 … HT2 … HLK) //
-qed-.
-
-(* Relocation properties ****************************************************)
-
-lemma tpss_lift_le: ∀K,T1,T2,dt,et. K ⊢ T1 ▶* [dt, et] T2 →
-                    ∀L,U1,d,e. dt + et ≤ d → ⇩[d, e] L ≡ K →
-                    ⇧[d, e] T1 ≡ U1 → ∀U2. ⇧[d, e] T2 ≡ U2 →
-                    L ⊢ U1 ▶* [dt, et] U2.
-#K #T1 #T2 #dt #et #H #L #U1 #d #e #Hdetd #HLK #HTU1 @(tpss_ind … H) -T2
-[ #U2 #H >(lift_mono … HTU1 … H) -H //
-| -HTU1 #T #T2 #_ #HT2 #IHT #U2 #HTU2
-  elim (lift_total T d e) #U #HTU
-  lapply (IHT … HTU) -IHT #HU1
-  lapply (tps_lift_le … HT2 … HLK HTU HTU2 ?) -HT2 -HLK -HTU -HTU2 // /2 width=3/
-]
-qed.
-
-lemma tpss_lift_be: ∀K,T1,T2,dt,et. K ⊢ T1 ▶* [dt, et] T2 →
-                    ∀L,U1,d,e. dt ≤ d → d ≤ dt + et →
-                    ⇩[d, e] L ≡ K → ⇧[d, e] T1 ≡ U1 →
-                    ∀U2. ⇧[d, e] T2 ≡ U2 → L ⊢ U1 ▶* [dt, et + e] U2.
-#K #T1 #T2 #dt #et #H #L #U1 #d #e #Hdtd #Hddet #HLK #HTU1 @(tpss_ind … H) -T2
-[ #U2 #H >(lift_mono … HTU1 … H) -H //
-| -HTU1 #T #T2 #_ #HT2 #IHT #U2 #HTU2
-  elim (lift_total T d e) #U #HTU
-  lapply (IHT … HTU) -IHT #HU1
-  lapply (tps_lift_be … HT2 … HLK HTU HTU2 ? ?) -HT2 -HLK -HTU -HTU2 // /2 width=3/
-]
-qed.
-
-lemma tpss_lift_ge: ∀K,T1,T2,dt,et. K ⊢ T1 ▶* [dt, et] T2 →
-                    ∀L,U1,d,e. d ≤ dt → ⇩[d, e] L ≡ K →
-                    ⇧[d, e] T1 ≡ U1 → ∀U2. ⇧[d, e] T2 ≡ U2 →
-                    L ⊢ U1 ▶* [dt + e, et] U2.
-#K #T1 #T2 #dt #et #H #L #U1 #d #e #Hddt #HLK #HTU1 @(tpss_ind … H) -T2
-[ #U2 #H >(lift_mono … HTU1 … H) -H //
-| -HTU1 #T #T2 #_ #HT2 #IHT #U2 #HTU2
-  elim (lift_total T d e) #U #HTU
-  lapply (IHT … HTU) -IHT #HU1
-  lapply (tps_lift_ge … HT2 … HLK HTU HTU2 ?) -HT2 -HLK -HTU -HTU2 // /2 width=3/
-]
-qed.
-
-lemma tpss_inv_lift1_le: ∀L,U1,U2,dt,et. L ⊢ U1 ▶* [dt, et] U2 →
-                         ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                         dt + et ≤ d →
-                         ∃∃T2. K ⊢ T1 ▶* [dt, et] T2 & ⇧[d, e] T2 ≡ U2.
-#L #U1 #U2 #dt #et #H #K #d #e #HLK #T1 #HTU1 #Hdetd @(tpss_ind … H) -U2
-[ /2 width=3/
-| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
-  elim (tps_inv_lift1_le … HU2 … HLK … HTU ?) -HU2 -HLK -HTU // /3 width=3/
-]
-qed.
-
-lemma tpss_inv_lift1_be: ∀L,U1,U2,dt,et. L ⊢ U1 ▶* [dt, et] U2 →
-                         ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                         dt ≤ d → d + e ≤ dt + et →
-                         ∃∃T2. K ⊢ T1 ▶* [dt, et - e] T2 & ⇧[d, e] T2 ≡ U2.
-#L #U1 #U2 #dt #et #H #K #d #e #HLK #T1 #HTU1 #Hdtd #Hdedet @(tpss_ind … H) -U2
-[ /2 width=3/
-| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
-  elim (tps_inv_lift1_be … HU2 … HLK … HTU ? ?) -HU2 -HLK -HTU // /3 width=3/
-]
-qed.
-
-lemma tpss_inv_lift1_ge: ∀L,U1,U2,dt,et. L ⊢ U1 ▶* [dt, et] U2 →
-                         ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                         d + e ≤ dt →
-                         ∃∃T2. K ⊢ T1 ▶* [dt - e, et] T2 & ⇧[d, e] T2 ≡ U2.
-#L #U1 #U2 #dt #et #H #K #d #e #HLK #T1 #HTU1 #Hdedt @(tpss_ind … H) -U2
-[ /2 width=3/
-| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
-  elim (tps_inv_lift1_ge … HU2 … HLK … HTU ?) -HU2 -HLK -HTU // /3 width=3/
-]
-qed.
-
-lemma tpss_inv_lift1_eq: ∀L,U1,U2,d,e.
-                         L ⊢ U1 ▶* [d, e] U2 → ∀T1. ⇧[d, e] T1 ≡ U1 → U1 = U2.
-#L #U1 #U2 #d #e #H #T1 #HTU1 @(tpss_ind … H) -U2 //
-#U #U2 #_ #HU2 #IHU destruct
-<(tps_inv_lift1_eq … HU2 … HTU1) -HU2 -HTU1 //
-qed.
-
-lemma tpss_inv_lift1_ge_up: ∀L,U1,U2,dt,et. L ⊢ U1 ▶* [dt, et] U2 →
-                            ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                            d ≤ dt → dt ≤ d + e → d + e ≤ dt + et →
-                            ∃∃T2. K ⊢ T1 ▶* [d, dt + et - (d + e)] T2 &
-                                 ⇧[d, e] T2 ≡ U2.
-#L #U1 #U2 #dt #et #H #K #d #e #HLK #T1 #HTU1 #Hddt #Hdtde #Hdedet @(tpss_ind … H) -U2
-[ /2 width=3/
-| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
-  elim (tps_inv_lift1_ge_up … HU2 … HLK … HTU ? ? ?) -HU2 -HLK -HTU // /3 width=3/
-]
-qed.
-
-lemma tpss_inv_lift1_be_up: ∀L,U1,U2,dt,et. L ⊢ U1 ▶* [dt, et] U2 →
-                            ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                            dt ≤ d → dt + et ≤ d + e →
-                            ∃∃T2. K ⊢ T1 ▶* [dt, d - dt] T2 & ⇧[d, e] T2 ≡ U2.
-#L #U1 #U2 #dt #et #H #K #d #e #HLK #T1 #HTU1 #Hdtd #Hdetde @(tpss_ind … H) -U2
-[ /2 width=3/
-| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
-  elim (tps_inv_lift1_be_up … HU2 … HLK … HTU ? ?) -HU2 -HLK -HTU // /3 width=3/
-]
-qed.
-
-lemma tpss_inv_lift1_le_up: ∀L,U1,U2,dt,et. L ⊢ U1 ▶* [dt, et] U2 →
-                            ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                            dt ≤ d → d ≤ dt + et → dt + et ≤ d + e →
-                            ∃∃T2. K ⊢ T1 ▶* [dt, d - dt] T2 & ⇧[d, e] T2 ≡ U2.
-#L #U1 #U2 #dt #et #H #K #d #e #HLK #T1 #HTU1 #Hdtd #Hddet #Hdetde @(tpss_ind … H) -U2
-[ /2 width=3/
-| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
-  elim (tps_inv_lift1_le_up … HU2 … HLK … HTU ? ? ?) -HU2 -HLK -HTU // /3 width=3/
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/basic_2/unfold/tpss_tpss.ma b/matita/matita/contribs/lambda_delta/basic_2/unfold/tpss_tpss.ma
deleted file mode 100644 (file)
index 3f41b00..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/substitution/tps_tps.ma".
-include "basic_2/unfold/tpss_lift.ma".
-
-(* PARTIAL UNFOLD ON TERMS **************************************************)
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma tpss_inv_SO2: ∀L,T1,T2,d. L ⊢ T1 ▶* [d, 1] T2 → L ⊢ T1 ▶ [d, 1] T2.
-#L #T1 #T2 #d #H @(tpss_ind … H) -T2 //
-#T #T2 #_ #HT2 #IHT1
-lapply (tps_trans_ge … IHT1 … HT2 ?) //
-qed-.
-
-(* Advanced properties ******************************************************)
-
-lemma tpss_strip_eq: ∀L,T0,T1,d1,e1. L ⊢ T0 ▶* [d1, e1] T1 →
-                     ∀T2,d2,e2. L ⊢ T0 ▶ [d2, e2] T2 →
-                     ∃∃T. L ⊢ T1 ▶ [d2, e2] T & L ⊢ T2 ▶* [d1, e1] T.
-/3 width=3/ qed.
-
-lemma tpss_strip_neq: ∀L1,T0,T1,d1,e1. L1 ⊢ T0 ▶* [d1, e1] T1 →
-                      ∀L2,T2,d2,e2. L2 ⊢ T0 ▶ [d2, e2] T2 →
-                      (d1 + e1 ≤ d2 ∨ d2 + e2 ≤ d1) →
-                      ∃∃T. L2 ⊢ T1 ▶ [d2, e2] T & L1 ⊢ T2 ▶* [d1, e1] T.
-/3 width=3/ qed.
-
-lemma tpss_strap1_down: ∀L,T1,T0,d1,e1. L ⊢ T1 ▶* [d1, e1] T0 →
-                        ∀T2,d2,e2. L ⊢ T0 ▶ [d2, e2] T2 → d2 + e2 ≤ d1 →
-                        ∃∃T. L ⊢ T1 ▶ [d2, e2] T & L ⊢ T ▶* [d1, e1] T2.
-/3 width=3/ qed.
-
-lemma tpss_strap2_down: ∀L,T1,T0,d1,e1. L ⊢ T1 ▶ [d1, e1] T0 →
-                        ∀T2,d2,e2. L ⊢ T0 ▶* [d2, e2] T2 → d2 + e2 ≤ d1 →
-                        ∃∃T. L ⊢ T1 ▶* [d2, e2] T & L ⊢ T ▶ [d1, e1] T2.
-/3 width=3/ qed.
-
-lemma tpss_split_up: ∀L,T1,T2,d,e. L ⊢ T1 ▶* [d, e] T2 →
-                     ∀i. d ≤ i → i ≤ d + e →
-                     ∃∃T. L ⊢ T1 ▶* [d, i - d] T & L ⊢ T ▶* [i, d + e - i] T2.
-#L #T1 #T2 #d #e #H #i #Hdi #Hide @(tpss_ind … H) -T2
-[ /2 width=3/
-| #T #T2 #_ #HT12 * #T3 #HT13 #HT3
-  elim (tps_split_up … HT12 … Hdi Hide) -HT12 -Hide #T0 #HT0 #HT02
-  elim (tpss_strap1_down … HT3 … HT0 ?) -T [2: >commutative_plus /2 width=1/ ]
-  /3 width=7 by ex2_1_intro, step/ (**) (* just /3 width=7/ is too slow *)
-]
-qed.
-
-lemma tpss_inv_lift1_up: ∀L,U1,U2,dt,et. L ⊢ U1 ▶* [dt, et] U2 →
-                         ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
-                         d ≤ dt → dt ≤ d + e → d + e ≤ dt + et →
-                         ∃∃T2. K ⊢ T1 ▶* [d, dt + et - (d + e)] T2 &
-                               ⇧[d, e] T2 ≡ U2.
-#L #U1 #U2 #dt #et #HU12 #K #d #e #HLK #T1 #HTU1 #Hddt #Hdtde #Hdedet
-elim (tpss_split_up … HU12 (d + e) ? ?) -HU12 // -Hdedet #U #HU1 #HU2
-lapply (tpss_weak … HU1 d e ? ?) -HU1 // [ >commutative_plus /2 width=1/ ] -Hddt -Hdtde #HU1
-lapply (tpss_inv_lift1_eq … HU1 … HTU1) -HU1 #HU1 destruct
-elim (tpss_inv_lift1_ge … HU2 … HLK … HTU1 ?) -HU2 -HLK -HTU1 // <minus_plus_m_m /2 width=3/
-qed.
-
-(* Main properties **********************************************************)
-
-theorem tpss_conf_eq: ∀L,T0,T1,d1,e1. L ⊢ T0 ▶* [d1, e1] T1 →
-                      ∀T2,d2,e2. L ⊢ T0 ▶* [d2, e2] T2 →
-                      ∃∃T. L ⊢ T1 ▶* [d2, e2] T & L ⊢ T2 ▶* [d1, e1] T.
-/3 width=3/ qed.
-
-theorem tpss_conf_neq: ∀L1,T0,T1,d1,e1. L1 ⊢ T0 ▶* [d1, e1] T1 →
-                       ∀L2,T2,d2,e2. L2 ⊢ T0 ▶* [d2, e2] T2 →
-                       (d1 + e1 ≤ d2 ∨ d2 + e2 ≤ d1) →
-                       ∃∃T. L2 ⊢ T1 ▶* [d2, e2] T & L1 ⊢ T2 ▶* [d1, e1] T.
-/3 width=3/ qed.
-
-theorem tpss_trans_eq: ∀L,T1,T,T2,d,e.
-                       L ⊢ T1 ▶* [d, e] T → L ⊢ T ▶* [d, e] T2 →
-                       L ⊢ T1 ▶* [d, e] T2.
-/2 width=3/ qed.
-
-theorem tpss_trans_down: ∀L,T1,T0,d1,e1. L ⊢ T1 ▶* [d1, e1] T0 →
-                         ∀T2,d2,e2. L ⊢ T0 ▶* [d2, e2] T2 → d2 + e2 ≤ d1 →
-                         ∃∃T. L ⊢ T1 ▶* [d2, e2] T & L ⊢ T ▶* [d1, e1] T2.
-/3 width=3/ qed.
diff --git a/matita/matita/contribs/lambda_delta/ground_2/arith.ma b/matita/matita/contribs/lambda_delta/ground_2/arith.ma
deleted file mode 100644 (file)
index 8afc445..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "arithmetics/nat.ma".
-include "ground_2/star.ma".
-
-(* ARITHMETICAL PROPERTIES **************************************************)
-
-(* Equations ****************************************************************)
-
-lemma plus_n_2: ∀n. n + 2 = n + 1 + 1.
-// qed.
-
-lemma le_plus_minus: ∀m,n,p. p ≤ n → m + n - p = m + (n - p).
-/2 by plus_minus/ qed.
-
-lemma le_plus_minus_comm: ∀n,m,p. p ≤ m → m + n - p = m - p + n.
-/2 by plus_minus/ qed.
-
-lemma arith_b1: ∀a,b,c1. c1 ≤ b → a - c1 - (b - c1) = a - b.
-#a #b #c1 #H >minus_minus_comm >minus_le_minus_minus_comm //
-qed.
-
-lemma arith_b2: ∀a,b,c1,c2. c1 + c2 ≤ b → a - c1 - c2 - (b - c1 - c2) = a - b.
-#a #b #c1 #c2 #H >minus_plus >minus_plus >minus_plus /2 width=1/
-qed.
-
-lemma arith_c1x: ∀x,a,b,c1. x + c1 + a - (b + c1) = x + a - b.
-/3 by monotonic_le_minus_l, le_to_le_to_eq, le_n/ qed.
-
-lemma arith_h1: ∀a1,a2,b,c1. c1 ≤ a1 → c1 ≤ b →
-                a1 - c1 + a2 - (b - c1) = a1 + a2 - b.
-#a1 #a2 #b #c1 #H1 #H2 >plus_minus // /2 width=1/
-qed.
-
-(* Inversion & forward lemmas ***********************************************)
-
-axiom eq_nat_dec: ∀n1,n2:nat. Decidable (n1 = n2).
-
-axiom lt_dec: ∀n1,n2. Decidable (n1 < n2).
-
-lemma lt_or_eq_or_gt: ∀m,n. ∨∨ m < n | n = m | n < m.
-#m #n elim (lt_or_ge m n) /2 width=1/
-#H elim H -m /2 width=1/
-#m #Hm * #H /2 width=1/ /3 width=1/
-qed-.
-
-lemma lt_refl_false: ∀n. n < n → ⊥.
-#n #H elim (lt_to_not_eq … H) -H /2 width=1/
-qed-.
-
-lemma lt_zero_false: ∀n. n < 0 → ⊥.
-#n #H elim (lt_to_not_le … H) -H /2 width=1/
-qed-.
-
-lemma false_lt_to_le: ∀x,y. (x < y → ⊥) → y ≤ x.
-#x #y #H elim (decidable_lt x y) /2 width=1/
-#Hxy elim (H Hxy)
-qed-.
-
-lemma le_plus_xySz_x_false: ∀y,z,x. x + y + S z ≤ x → ⊥.
-#y #z #x elim x -x
-[ #H lapply (le_n_O_to_eq … H) -H
-  <plus_n_Sm #H destruct
-| /3 width=1 by le_S_S_to_le/
-]
-qed-.
-
-lemma plus_xySz_x_false: ∀z,x,y. x + y + S z = x → ⊥.
-/2 width=4 by le_plus_xySz_x_false/ qed-.
-
-(* Iterators ****************************************************************)
-
-(* Note: see also: lib/arithemetcs/bigops.ma *)
-let rec iter (n:nat) (B:Type[0]) (op: B → B) (nil: B) ≝
-  match n with
-   [ O   ⇒ nil
-   | S k ⇒ op (iter k B op nil)
-   ].
-
-interpretation "iterated function" 'exp op n = (iter n ? op).
-
-lemma iter_SO: ∀B:Type[0]. ∀f:B→B. ∀b,l. f^(l+1) b = f (f^l b).
-#B #f #b #l >commutative_plus //
-qed.
-
-lemma iter_n_Sm: ∀B:Type[0]. ∀f:B→B. ∀b,l. f^l (f b) = f (f^l b).
-#B #f #b #l elim l -l normalize //
-qed.
-
-(* Trichotomy operator ******************************************************)
-
-(* Note: this is "if eqb n1 n2 then a2 else if leb n1 n2 then a1 else a3" *)
-let rec tri (A:Type[0]) n1 n2 a1 a2 a3 on n1 : A ≝
-  match n1 with 
-  [ O    ⇒ match n2 with [ O ⇒ a2 | S n2 ⇒ a1 ]
-  | S n1 ⇒ match n2 with [ O ⇒ a3 | S n2 ⇒ tri A n1 n2 a1 a2 a3 ]
-  ].
-
-lemma tri_lt: ∀A,a1,a2,a3,n2,n1. n1 < n2 → tri A n1 n2 a1 a2 a3 = a1.
-#A #a1 #a2 #a3 #n2 elim n2 -n2
-[ #n1 #H elim (lt_zero_false … H)
-| #n2 #IH #n1 elim n1 -n1 // /3 width=1/
-]
-qed.
-
-lemma tri_eq: ∀A,a1,a2,a3,n. tri A n n a1 a2 a3 = a2.
-#A #a1 #a2 #a3 #n elim n -n normalize //
-qed.
-
-lemma tri_gt: ∀A,a1,a2,a3,n1,n2. n2 < n1 → tri A n1 n2 a1 a2 a3 = a3.
-#A #a1 #a2 #a3 #n1 elim n1 -n1
-[ #n2 #H elim (lt_zero_false … H)
-| #n1 #IH #n2 elim n2 -n2 // /3 width=1/
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/ground_2/list.ma b/matita/matita/contribs/lambda_delta/ground_2/list.ma
deleted file mode 100644 (file)
index 9a5ac0a..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "ground_2/arith.ma".
-
-(* LISTS ********************************************************************)
-
-inductive list (A:Type[0]) : Type[0] :=
-  | nil : list A
-  | cons: A → list A → list A.
-
-interpretation "nil (list)" 'Nil = (nil ?).
-
-interpretation "cons (list)" 'Cons hd tl = (cons ? hd tl).
-
-let rec all A (R:predicate A) (l:list A) on l ≝
-  match l with
-  [ nil        ⇒ ⊤
-  | cons hd tl ⇒ R hd ∧ all A R tl
-  ].
-
-inductive list2 (A1,A2:Type[0]) : Type[0] :=
-  | nil2 : list2 A1 A2
-  | cons2: A1 → A2 → list2 A1 A2 → list2 A1 A2.
-
-interpretation "nil (list of pairs)" 'Nil2 = (nil2 ? ?).
-
-interpretation "cons (list of pairs)" 'Cons hd1 hd2 tl = (cons2 ? ? hd1 hd2 tl).
-
-let rec append2 (A1,A2:Type[0]) (l1,l2:list2 A1 A2) on l1 ≝ match l1 with
-[ nil2           ⇒ l2
-| cons2 a1 a2 tl ⇒ {a1, a2} @ append2 A1 A2 tl l2
-].
-
-interpretation "append (list of pairs)"
-   'Append l1 l2 = (append2 ? ? l1 l2).
-
-let rec length2 (A1,A2:Type[0]) (l:list2 A1 A2) on l ≝ match l with
-[ nil2        ⇒ 0
-| cons2 _ _ l ⇒ length2 A1 A2 l + 1
-].
-
-interpretation "length (list of pairs)"
-   'card l = (length2 ? ? l).
diff --git a/matita/matita/contribs/lambda_delta/ground_2/notation.ma b/matita/matita/contribs/lambda_delta/ground_2/notation.ma
deleted file mode 100644 (file)
index 4ac2e6e..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-(* Logic ********************************************************************)
-
-notation "⊥"
-  non associative with precedence 90
-  for @{'false}.
-
-notation "⊤"
-  non associative with precedence 90
-  for @{'true}.
-
-(* Lists ********************************************************************)
-
-notation "◊"
-  non associative with precedence 90
-  for @{'Nil}.
-
-notation "hvbox( hd @ break tl )"
-  right associative with precedence 47
-  for @{'Cons $hd $tl}.
-
-notation "hvbox( l1 @@ break l2 )"
-  right associative with precedence 47
-  for @{'Append $l1 $l2 }.
-
-notation "⟠"
-  non associative with precedence 90
-  for @{'Nil2}.
-
-notation "hvbox( { hd1 , break hd2 } @ break tl )"
-  non associative with precedence 47
-  for @{'Cons $hd1 $hd2 $tl}.
diff --git a/matita/matita/contribs/lambda_delta/ground_2/star.ma b/matita/matita/contribs/lambda_delta/ground_2/star.ma
deleted file mode 100644 (file)
index 1e46a48..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basics/star.ma".
-include "ground_2/xoa_props.ma".
-include "ground_2/notation.ma".
-
-(* PROPERTIES OF RELATIONS **************************************************)
-
-definition Decidable: Prop → Prop ≝ λR. R ∨ (R → ⊥).
-
-definition Confluent: ∀A. ∀R: relation A. Prop ≝ λA,R.
-                      ∀a0,a1. R a0 a1 → ∀a2. R a0 a2 →
-                      ∃∃a. R a1 a & R a2 a.
-
-definition Transitive: ∀A. ∀R: relation A. Prop ≝ λA,R.
-                       ∀a1,a0. R a1 a0 → ∀a2. R a0 a2 → R a1 a2.
-
-definition confluent2: ∀A. ∀R1,R2: relation A. Prop ≝ λA,R1,R2.
-                       ∀a0,a1. R1 a0 a1 → ∀a2. R2 a0 a2 →
-                       ∃∃a. R2 a1 a & R1 a2 a.
-
-definition transitive2: ∀A. ∀R1,R2: relation A. Prop ≝ λA,R1,R2.
-                        ∀a1,a0. R1 a1 a0 → ∀a2. R2 a0 a2 →
-                        ∃∃a. R2 a1 a & R1 a a2.
-
-definition bi_confluent:  ∀A,B. ∀R: bi_relation A B. Prop ≝ λA,B,R.
-                          ∀a0,a1,b0,b1. R a0 b0 a1 b1 → ∀a2,b2. R a0 b0 a2 b2 →
-                          ∃∃a,b. R a1 b1 a b & R a2 b2 a b.
-
-lemma TC_strip1: ∀A,R1,R2. confluent2 A R1 R2 →
-                 ∀a0,a1. TC … R1 a0 a1 → ∀a2. R2 a0 a2 →
-                 ∃∃a. R2 a1 a & TC … R1 a2 a.
-#A #R1 #R2 #HR12 #a0 #a1 #H elim H -a1
-[ #a1 #Ha01 #a2 #Ha02
-  elim (HR12 … Ha01 … Ha02) -HR12 -a0 /3 width=3/
-| #a #a1 #_ #Ha1 #IHa0 #a2 #Ha02
-  elim (IHa0 … Ha02) -a0 #a0 #Ha0 #Ha20
-  elim (HR12 … Ha1 … Ha0) -HR12 -a /4 width=3/
-]
-qed.
-
-lemma TC_strip2: ∀A,R1,R2. confluent2 A R1 R2 →
-                 ∀a0,a2. TC … R2 a0 a2 → ∀a1. R1 a0 a1 →
-                 ∃∃a. TC … R2 a1 a & R1 a2 a.
-#A #R1 #R2 #HR12 #a0 #a2 #H elim H -a2
-[ #a2 #Ha02 #a1 #Ha01
-  elim (HR12 … Ha01 … Ha02) -HR12 -a0 /3 width=3/
-| #a #a2 #_ #Ha2 #IHa0 #a1 #Ha01
-  elim (IHa0 … Ha01) -a0 #a0 #Ha10 #Ha0
-  elim (HR12 … Ha0 … Ha2) -HR12 -a /4 width=3/
-]
-qed.
-
-lemma TC_confluent2: ∀A,R1,R2.
-                     confluent2 A R1 R2 → confluent2 A (TC … R1) (TC … R2).
-#A #R1 #R2 #HR12 #a0 #a1 #H elim H -a1
-[ #a1 #Ha01 #a2 #Ha02
-  elim (TC_strip2 … HR12 … Ha02 … Ha01) -HR12 -a0 /3 width=3/
-| #a #a1 #_ #Ha1 #IHa0 #a2 #Ha02
-  elim (IHa0 … Ha02) -a0 #a0 #Ha0 #Ha20
-  elim (TC_strip2 … HR12 … Ha0 … Ha1) -HR12 -a /4 width=3/
-]
-qed.
-
-lemma TC_strap1: ∀A,R1,R2. transitive2 A R1 R2 →
-                 ∀a1,a0. TC … R1 a1 a0 → ∀a2. R2 a0 a2 →
-                 ∃∃a. R2 a1 a & TC … R1 a a2.
-#A #R1 #R2 #HR12 #a1 #a0 #H elim H -a0
-[ #a0 #Ha10 #a2 #Ha02
-  elim (HR12 … Ha10 … Ha02) -HR12 -a0 /3 width=3/
-| #a #a0 #_ #Ha0 #IHa #a2 #Ha02
-  elim (HR12 … Ha0 … Ha02) -HR12 -a0 #a0 #Ha0 #Ha02
-  elim (IHa … Ha0) -a /4 width=3/
-]
-qed.
-
-lemma TC_strap2: ∀A,R1,R2. transitive2 A R1 R2 →
-                 ∀a0,a2. TC … R2 a0 a2 → ∀a1. R1 a1 a0 →
-                 ∃∃a. TC … R2 a1 a & R1 a a2.
-#A #R1 #R2 #HR12 #a0 #a2 #H elim H -a2
-[ #a2 #Ha02 #a1 #Ha10
-  elim (HR12 … Ha10 … Ha02) -HR12 -a0 /3 width=3/
-| #a #a2 #_ #Ha02 #IHa #a1 #Ha10
-  elim (IHa … Ha10) -a0 #a0 #Ha10 #Ha0
-  elim (HR12 … Ha0 … Ha02) -HR12 -a /4 width=3/
-]
-qed.
-
-lemma TC_transitive2: ∀A,R1,R2.
-                      transitive2 A R1 R2 → transitive2 A (TC … R1) (TC … R2).
-#A #R1 #R2 #HR12 #a1 #a0 #H elim H -a0
-[ #a0 #Ha10 #a2 #Ha02
-  elim (TC_strap2 … HR12 … Ha02 … Ha10) -HR12 -a0 /3 width=3/
-| #a #a0 #_ #Ha0 #IHa #a2 #Ha02
-  elim (TC_strap2 … HR12 … Ha02 … Ha0) -HR12 -a0 #a0 #Ha0 #Ha02
-  elim (IHa … Ha0) -a /4 width=3/
-]
-qed.
-
-definition NF: ∀A. relation A → relation A → predicate A ≝
-   λA,R,S,a1. ∀a2. R a1 a2 → S a2 a1.
-
-inductive SN (A) (R,S:relation A): predicate A ≝
-| SN_intro: ∀a1. (∀a2. R a1 a2 → (S a2 a1 → ⊥) → SN A R S a2) → SN A R S a1
-.
-
-lemma NF_to_SN: ∀A,R,S,a. NF A R S a → SN A R S a.
-#A #R #S #a1 #Ha1
-@SN_intro #a2 #HRa12 #HSa12
-elim (HSa12 ?) -HSa12 /2 width=1/
-qed.
-
-definition NF_sn: ∀A. relation A → relation A → predicate A ≝
-   λA,R,S,a2. ∀a1. R a1 a2 → S a2 a1.
-
-inductive SN_sn (A) (R,S:relation A): predicate A ≝
-| SN_sn_intro: ∀a2. (∀a1. R a1 a2 → (S a2 a1 → ⊥) → SN_sn A R S a1) → SN_sn A R S a2
-.
-
-lemma NF_to_SN_sn: ∀A,R,S,a. NF_sn A R S a → SN_sn A R S a.
-#A #R #S #a2 #Ha2
-@SN_sn_intro #a1 #HRa12 #HSa12
-elim (HSa12 ?) -HSa12 /2 width=1/
-qed.
-
-lemma bi_TC_strip: ∀A,B,R. bi_confluent A B R →
-                   ∀a0,a1,b0,b1. R a0 b0 a1 b1 → ∀a2,b2. bi_TC … R a0 b0 a2 b2 →
-                   ∃∃a,b. bi_TC … R a1 b1 a b & R a2 b2 a b.
-#A #B #R #HR #a0 #a1 #b0 #b1 #H01 #a2 #b2 #H elim H -a2 -b2
-[ #a2 #b2 #H02
-  elim (HR … H01 … H02) -HR -a0 -b0 /3 width=4/
-| #a2 #b2 #a3 #b3 #_ #H23 * #a #b #H1 #H2
-  elim (HR … H23 … H2) -HR -a0 -b0 -a2 -b2 /3 width=4/
-]
-qed.
-
-lemma bi_TC_confluent: ∀A,B,R. bi_confluent A B R →
-                       bi_confluent A B (bi_TC … R).
-#A #B #R #HR #a0 #a1 #b0 #b1 #H elim H -a1 -b1
-[ #a1 #b1 #H01 #a2 #b2 #H02
-  elim (bi_TC_strip … HR … H01 … H02) -a0 -b0 /3 width=4/
-| #a1 #b1 #a3 #b3 #_ #H13 #IH #a2 #b2 #H02
-  elim (IH … H02) -a0 -b0 #a0 #b0 #H10 #H20
-  elim (bi_TC_strip … HR … H13 … H10) -a1 -b1 /3 width=7/
-]
-qed.
diff --git a/matita/matita/contribs/lambda_delta/ground_2/xoa.conf.xml b/matita/matita/contribs/lambda_delta/ground_2/xoa.conf.xml
deleted file mode 100644 (file)
index c6a00c1..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<helm_registry>
-  <section name="matita">
-    <key name="rt_base_dir">$(MATITA_RT_BASE_DIR)</key>
-<!--
-    <key name="system">false</key>
-    <key name="map_unicode_to_tex">false</key>
-    <key name="do_heavy_checks">true</key>
-    <key name="include_path">lib</key>
--->
-  </section>
-  <section name="xoa">
-    <key name="output_dir">contribs/lambda_delta/ground_2/</key>
-    <key name="objects">xoa</key>
-    <key name="notations">xoa_notation</key>
-    <key name="include">basics/pts.ma</key>
-    <key name="ex">1 2</key>
-    <key name="ex">1 3</key>
-    <key name="ex">2 1</key>
-    <key name="ex">2 2</key>
-    <key name="ex">2 3</key>
-    <key name="ex">3 1</key>
-    <key name="ex">3 2</key>
-    <key name="ex">3 3</key>
-    <key name="ex">3 4</key>
-    <key name="ex">4 1</key>
-    <key name="ex">4 2</key>
-    <key name="ex">4 3</key>
-    <key name="ex">4 4</key>
-    <key name="ex">4 5</key>
-    <key name="ex">5 2</key>
-    <key name="ex">5 3</key>
-    <key name="ex">5 4</key>
-    <key name="ex">5 5</key>
-    <key name="ex">6 4</key>
-    <key name="ex">6 5</key>
-    <key name="ex">6 6</key>
-    <key name="ex">6 7</key>
-    <key name="ex">7 7</key>
-    <key name="or">3</key>
-    <key name="or">4</key>
-    <key name="and">3</key>
-    <key name="and">4</key>
-  </section>
-</helm_registry>
diff --git a/matita/matita/contribs/lambda_delta/ground_2/xoa.ma b/matita/matita/contribs/lambda_delta/ground_2/xoa.ma
deleted file mode 100644 (file)
index ac4c8f9..0000000
+++ /dev/null
@@ -1,239 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-(* multiple existental quantifier (1, 2) *)
-
-inductive ex1_2 (A0,A1:Type[0]) (P0:A0→A1→Prop) : Prop ≝
-   | ex1_2_intro: ∀x0,x1. P0 x0 x1 → ex1_2 ? ? ?
-.
-
-interpretation "multiple existental quantifier (1, 2)" 'Ex P0 = (ex1_2 ? ? P0).
-
-(* multiple existental quantifier (1, 3) *)
-
-inductive ex1_3 (A0,A1,A2:Type[0]) (P0:A0→A1→A2→Prop) : Prop ≝
-   | ex1_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → ex1_3 ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (1, 3)" 'Ex P0 = (ex1_3 ? ? ? P0).
-
-(* multiple existental quantifier (2, 1) *)
-
-inductive ex2_1 (A0:Type[0]) (P0,P1:A0→Prop) : Prop ≝
-   | ex2_1_intro: ∀x0. P0 x0 → P1 x0 → ex2_1 ? ? ?
-.
-
-interpretation "multiple existental quantifier (2, 1)" 'Ex P0 P1 = (ex2_1 ? P0 P1).
-
-(* multiple existental quantifier (2, 2) *)
-
-inductive ex2_2 (A0,A1:Type[0]) (P0,P1:A0→A1→Prop) : Prop ≝
-   | ex2_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → ex2_2 ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (2, 2)" 'Ex P0 P1 = (ex2_2 ? ? P0 P1).
-
-(* multiple existental quantifier (2, 3) *)
-
-inductive ex2_3 (A0,A1,A2:Type[0]) (P0,P1:A0→A1→A2→Prop) : Prop ≝
-   | ex2_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → ex2_3 ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (2, 3)" 'Ex P0 P1 = (ex2_3 ? ? ? P0 P1).
-
-(* multiple existental quantifier (3, 1) *)
-
-inductive ex3_1 (A0:Type[0]) (P0,P1,P2:A0→Prop) : Prop ≝
-   | ex3_1_intro: ∀x0. P0 x0 → P1 x0 → P2 x0 → ex3_1 ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (3, 1)" 'Ex P0 P1 P2 = (ex3_1 ? P0 P1 P2).
-
-(* multiple existental quantifier (3, 2) *)
-
-inductive ex3_2 (A0,A1:Type[0]) (P0,P1,P2:A0→A1→Prop) : Prop ≝
-   | ex3_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → P2 x0 x1 → ex3_2 ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (3, 2)" 'Ex P0 P1 P2 = (ex3_2 ? ? P0 P1 P2).
-
-(* multiple existental quantifier (3, 3) *)
-
-inductive ex3_3 (A0,A1,A2:Type[0]) (P0,P1,P2:A0→A1→A2→Prop) : Prop ≝
-   | ex3_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → ex3_3 ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (3, 3)" 'Ex P0 P1 P2 = (ex3_3 ? ? ? P0 P1 P2).
-
-(* multiple existental quantifier (3, 4) *)
-
-inductive ex3_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2:A0→A1→A2→A3→Prop) : Prop ≝
-   | ex3_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → ex3_4 ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (3, 4)" 'Ex P0 P1 P2 = (ex3_4 ? ? ? ? P0 P1 P2).
-
-(* multiple existental quantifier (4, 1) *)
-
-inductive ex4_1 (A0:Type[0]) (P0,P1,P2,P3:A0→Prop) : Prop ≝
-   | ex4_1_intro: ∀x0. P0 x0 → P1 x0 → P2 x0 → P3 x0 → ex4_1 ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (4, 1)" 'Ex P0 P1 P2 P3 = (ex4_1 ? P0 P1 P2 P3).
-
-(* multiple existental quantifier (4, 2) *)
-
-inductive ex4_2 (A0,A1:Type[0]) (P0,P1,P2,P3:A0→A1→Prop) : Prop ≝
-   | ex4_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → P2 x0 x1 → P3 x0 x1 → ex4_2 ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (4, 2)" 'Ex P0 P1 P2 P3 = (ex4_2 ? ? P0 P1 P2 P3).
-
-(* multiple existental quantifier (4, 3) *)
-
-inductive ex4_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3:A0→A1→A2→Prop) : Prop ≝
-   | ex4_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → ex4_3 ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (4, 3)" 'Ex P0 P1 P2 P3 = (ex4_3 ? ? ? P0 P1 P2 P3).
-
-(* multiple existental quantifier (4, 4) *)
-
-inductive ex4_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3:A0→A1→A2→A3→Prop) : Prop ≝
-   | ex4_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → ex4_4 ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (4, 4)" 'Ex P0 P1 P2 P3 = (ex4_4 ? ? ? ? P0 P1 P2 P3).
-
-(* multiple existental quantifier (4, 5) *)
-
-inductive ex4_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3:A0→A1→A2→A3→A4→Prop) : Prop ≝
-   | ex4_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → ex4_5 ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (4, 5)" 'Ex P0 P1 P2 P3 = (ex4_5 ? ? ? ? ? P0 P1 P2 P3).
-
-(* multiple existental quantifier (5, 2) *)
-
-inductive ex5_2 (A0,A1:Type[0]) (P0,P1,P2,P3,P4:A0→A1→Prop) : Prop ≝
-   | ex5_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → P2 x0 x1 → P3 x0 x1 → P4 x0 x1 → ex5_2 ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (5, 2)" 'Ex P0 P1 P2 P3 P4 = (ex5_2 ? ? P0 P1 P2 P3 P4).
-
-(* multiple existental quantifier (5, 3) *)
-
-inductive ex5_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→Prop) : Prop ≝
-   | ex5_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → P4 x0 x1 x2 → ex5_3 ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (5, 3)" 'Ex P0 P1 P2 P3 P4 = (ex5_3 ? ? ? P0 P1 P2 P3 P4).
-
-(* multiple existental quantifier (5, 4) *)
-
-inductive ex5_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→A3→Prop) : Prop ≝
-   | ex5_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → P4 x0 x1 x2 x3 → ex5_4 ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (5, 4)" 'Ex P0 P1 P2 P3 P4 = (ex5_4 ? ? ? ? P0 P1 P2 P3 P4).
-
-(* multiple existental quantifier (5, 5) *)
-
-inductive ex5_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→A3→A4→Prop) : Prop ≝
-   | ex5_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → P4 x0 x1 x2 x3 x4 → ex5_5 ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (5, 5)" 'Ex P0 P1 P2 P3 P4 = (ex5_5 ? ? ? ? ? P0 P1 P2 P3 P4).
-
-(* multiple existental quantifier (6, 4) *)
-
-inductive ex6_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→Prop) : Prop ≝
-   | ex6_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → P4 x0 x1 x2 x3 → P5 x0 x1 x2 x3 → ex6_4 ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (6, 4)" 'Ex P0 P1 P2 P3 P4 P5 = (ex6_4 ? ? ? ? P0 P1 P2 P3 P4 P5).
-
-(* multiple existental quantifier (6, 5) *)
-
-inductive ex6_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→Prop) : Prop ≝
-   | ex6_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → P4 x0 x1 x2 x3 x4 → P5 x0 x1 x2 x3 x4 → ex6_5 ? ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (6, 5)" 'Ex P0 P1 P2 P3 P4 P5 = (ex6_5 ? ? ? ? ? P0 P1 P2 P3 P4 P5).
-
-(* multiple existental quantifier (6, 6) *)
-
-inductive ex6_6 (A0,A1,A2,A3,A4,A5:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→A5→Prop) : Prop ≝
-   | ex6_6_intro: ∀x0,x1,x2,x3,x4,x5. P0 x0 x1 x2 x3 x4 x5 → P1 x0 x1 x2 x3 x4 x5 → P2 x0 x1 x2 x3 x4 x5 → P3 x0 x1 x2 x3 x4 x5 → P4 x0 x1 x2 x3 x4 x5 → P5 x0 x1 x2 x3 x4 x5 → ex6_6 ? ? ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (6, 6)" 'Ex P0 P1 P2 P3 P4 P5 = (ex6_6 ? ? ? ? ? ? P0 P1 P2 P3 P4 P5).
-
-(* multiple existental quantifier (6, 7) *)
-
-inductive ex6_7 (A0,A1,A2,A3,A4,A5,A6:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→A5→A6→Prop) : Prop ≝
-   | ex6_7_intro: ∀x0,x1,x2,x3,x4,x5,x6. P0 x0 x1 x2 x3 x4 x5 x6 → P1 x0 x1 x2 x3 x4 x5 x6 → P2 x0 x1 x2 x3 x4 x5 x6 → P3 x0 x1 x2 x3 x4 x5 x6 → P4 x0 x1 x2 x3 x4 x5 x6 → P5 x0 x1 x2 x3 x4 x5 x6 → ex6_7 ? ? ? ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (6, 7)" 'Ex P0 P1 P2 P3 P4 P5 = (ex6_7 ? ? ? ? ? ? ? P0 P1 P2 P3 P4 P5).
-
-(* multiple existental quantifier (7, 7) *)
-
-inductive ex7_7 (A0,A1,A2,A3,A4,A5,A6:Type[0]) (P0,P1,P2,P3,P4,P5,P6:A0→A1→A2→A3→A4→A5→A6→Prop) : Prop ≝
-   | ex7_7_intro: ∀x0,x1,x2,x3,x4,x5,x6. P0 x0 x1 x2 x3 x4 x5 x6 → P1 x0 x1 x2 x3 x4 x5 x6 → P2 x0 x1 x2 x3 x4 x5 x6 → P3 x0 x1 x2 x3 x4 x5 x6 → P4 x0 x1 x2 x3 x4 x5 x6 → P5 x0 x1 x2 x3 x4 x5 x6 → P6 x0 x1 x2 x3 x4 x5 x6 → ex7_7 ? ? ? ? ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (7, 7)" 'Ex P0 P1 P2 P3 P4 P5 P6 = (ex7_7 ? ? ? ? ? ? ? P0 P1 P2 P3 P4 P5 P6).
-
-(* multiple disjunction connective (3) *)
-
-inductive or3 (P0,P1,P2:Prop) : Prop ≝
-   | or3_intro0: P0 → or3 ? ? ?
-   | or3_intro1: P1 → or3 ? ? ?
-   | or3_intro2: P2 → or3 ? ? ?
-.
-
-interpretation "multiple disjunction connective (3)" 'Or P0 P1 P2 = (or3 P0 P1 P2).
-
-(* multiple disjunction connective (4) *)
-
-inductive or4 (P0,P1,P2,P3:Prop) : Prop ≝
-   | or4_intro0: P0 → or4 ? ? ? ?
-   | or4_intro1: P1 → or4 ? ? ? ?
-   | or4_intro2: P2 → or4 ? ? ? ?
-   | or4_intro3: P3 → or4 ? ? ? ?
-.
-
-interpretation "multiple disjunction connective (4)" 'Or P0 P1 P2 P3 = (or4 P0 P1 P2 P3).
-
-(* multiple conjunction connective (3) *)
-
-inductive and3 (P0,P1,P2:Prop) : Prop ≝
-   | and3_intro: P0 → P1 → P2 → and3 ? ? ?
-.
-
-interpretation "multiple conjunction connective (3)" 'And P0 P1 P2 = (and3 P0 P1 P2).
-
-(* multiple conjunction connective (4) *)
-
-inductive and4 (P0,P1,P2,P3:Prop) : Prop ≝
-   | and4_intro: P0 → P1 → P2 → P3 → and4 ? ? ? ?
-.
-
-interpretation "multiple conjunction connective (4)" 'And P0 P1 P2 P3 = (and4 P0 P1 P2 P3).
-
diff --git a/matita/matita/contribs/lambda_delta/ground_2/xoa_notation.ma b/matita/matita/contribs/lambda_delta/ground_2/xoa_notation.ma
deleted file mode 100644 (file)
index 6f614f2..0000000
+++ /dev/null
@@ -1,270 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (1, 2) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.λ${ident x1}.$P0) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) }.
-
-(* multiple existental quantifier (1, 3) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) }.
-
-(* multiple existental quantifier (2, 1) *)
-
-notation > "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.$P0) (λ${ident x0}.$P1) }.
-
-notation < "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.$P0) (λ${ident x0}:$T0.$P1) }.
-
-(* multiple existental quantifier (2, 2) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) }.
-
-(* multiple existental quantifier (2, 3) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) }.
-
-(* multiple existental quantifier (3, 1) *)
-
-notation > "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.$P0) (λ${ident x0}.$P1) (λ${ident x0}.$P2) }.
-
-notation < "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.$P0) (λ${ident x0}:$T0.$P1) (λ${ident x0}:$T0.$P2) }.
-
-(* multiple existental quantifier (3, 2) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) (λ${ident x0}.λ${ident x1}.$P2) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P2) }.
-
-(* multiple existental quantifier (3, 3) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) }.
-
-(* multiple existental quantifier (3, 4) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) }.
-
-(* multiple existental quantifier (4, 1) *)
-
-notation > "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.$P0) (λ${ident x0}.$P1) (λ${ident x0}.$P2) (λ${ident x0}.$P3) }.
-
-notation < "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.$P0) (λ${ident x0}:$T0.$P1) (λ${ident x0}:$T0.$P2) (λ${ident x0}:$T0.$P3) }.
-
-(* multiple existental quantifier (4, 2) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) (λ${ident x0}.λ${ident x1}.$P2) (λ${ident x0}.λ${ident x1}.$P3) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P3) }.
-
-(* multiple existental quantifier (4, 3) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) }.
-
-(* multiple existental quantifier (4, 4) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) }.
-
-(* multiple existental quantifier (4, 5) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) }.
-
-(* multiple existental quantifier (5, 2) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) (λ${ident x0}.λ${ident x1}.$P2) (λ${ident x0}.λ${ident x1}.$P3) (λ${ident x0}.λ${ident x1}.$P4) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P4) }.
-
-(* multiple existental quantifier (5, 3) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P4) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P4) }.
-
-(* multiple existental quantifier (5, 4) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P4) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P4) }.
-
-(* multiple existental quantifier (5, 5) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P4) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P4) }.
-
-(* multiple existental quantifier (6, 4) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P5) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P5) }.
-
-(* multiple existental quantifier (6, 5) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P5) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P5) }.
-
-(* multiple existental quantifier (6, 6) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P5) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P5) }.
-
-(* multiple existental quantifier (6, 7) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P5) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P5) }.
-
-(* multiple existental quantifier (7, 7) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P6) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P6) }.
-
-(* multiple disjunction connective (3) *)
-
-notation "hvbox(∨∨ term 29 P0 break | term 29 P1 break | term 29 P2)"
- non associative with precedence 30
- for @{ 'Or $P0 $P1 $P2 }.
-
-(* multiple disjunction connective (4) *)
-
-notation "hvbox(∨∨ term 29 P0 break | term 29 P1 break | term 29 P2 break | term 29 P3)"
- non associative with precedence 30
- for @{ 'Or $P0 $P1 $P2 $P3 }.
-
-(* multiple conjunction connective (3) *)
-
-notation "hvbox(∧∧ term 34 P0 break & term 34 P1 break & term 34 P2)"
- non associative with precedence 35
- for @{ 'And $P0 $P1 $P2 }.
-
-(* multiple conjunction connective (4) *)
-
-notation "hvbox(∧∧ term 34 P0 break & term 34 P1 break & term 34 P2 break & term 34 P3)"
- non associative with precedence 35
- for @{ 'And $P0 $P1 $P2 $P3 }.
-
diff --git a/matita/matita/contribs/lambda_delta/ground_2/xoa_props.ma b/matita/matita/contribs/lambda_delta/ground_2/xoa_props.ma
deleted file mode 100644 (file)
index 71216d1..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basics/logic.ma".
-include "ground_2/xoa_notation.ma".
-include "ground_2/xoa.ma".
-
-interpretation "logical false" 'false = False.
-
-interpretation "logical true" 'true = True.
-
-lemma ex2_1_comm: ∀A0. ∀P0,P1:A0→Prop. (∃∃x0. P0 x0 & P1 x0) → ∃∃x0. P1 x0 & P0 x0.
-#A0 #P0 #P1 * /2 width=3/
-qed.
diff --git a/matita/matita/contribs/lambda_delta/ma2etc.sh b/matita/matita/contribs/lambda_delta/ma2etc.sh
deleted file mode 100644 (file)
index e546af7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-for FILE in `find $1 -name "*.ma"`; do svn mv $FILE ${FILE/%.ma/.etc} ; done
diff --git a/matita/matita/contribs/lambda_delta/orig.sh b/matita/matita/contribs/lambda_delta/orig.sh
deleted file mode 100644 (file)
index 83b1fa1..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-F=`find $1 -name "*.ma" -or -name "*.txt"` 
-while read A A A; do
-   if grep -q "$A" $F; then true; else echo $A; fi
-done
diff --git a/matita/matita/contribs/lambda_delta/replace.sh b/matita/matita/contribs/lambda_delta/replace.sh
deleted file mode 100644 (file)
index 5e281b2..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-for MA in `find -name "*.ma"`; do
-   echo ${MA}; sed "s!$1!$2!g" ${MA} > ${MA}.new
-   if diff ${MA} ${MA}.new > /dev/null; 
-      then rm -f ${MA}.new; 
-      else mv -f ${MA} ${MA}.old; mv -f ${MA}.new ${MA};
-   fi
-done
-
-unset MA
diff --git a/matita/matita/contribs/lambda_delta/root b/matita/matita/contribs/lambda_delta/root
deleted file mode 100644 (file)
index c41bf73..0000000
+++ /dev/null
@@ -1 +0,0 @@
-baseuri=cic:/matita/lambda_delta/
diff --git a/matita/matita/contribs/lambdadelta/Makefile b/matita/matita/contribs/lambdadelta/Makefile
new file mode 100644 (file)
index 0000000..7e267a2
--- /dev/null
@@ -0,0 +1,130 @@
+H        = @
+XOA_DIR  = ../../../components/binaries/xoa
+XOA      = xoa.native
+DEP_DIR  = ../../../components/binaries/matitadep
+DEP      = matitadep.native
+MAC_DIR  = ../../../components/binaries/mac
+MAC      = mac.native
+
+XOA_CONF    = ground_2/xoa.conf.xml
+XOA_TARGETS = ground_2/xoa_notation.ma ground_2/xoa.ma
+
+ORIG     = . ./orig.sh 
+
+ORIGS    = basic_2/basic_1.orig
+
+PACKAGES = ground_2 basic_2 apps_2
+
+all:
+
+# xoa ########################################################################
+
+xoa: $(XOA_TARGETS)
+
+$(XOA_TARGETS): $(XOA_CONF)
+       @echo "  EXEC $(XOA) $(XOA_CONF)"
+       $(H)MATITA_RT_BASE_DIR=../.. $(XOA_DIR)/$(XOA) $(XOA_CONF)
+
+# orig #######################################################################
+
+orig: $(ORIGS)
+       @echo "  ORIG basic_2"
+       $(H)$(ORIG) basic_2 < $(ORIGS)
+
+# dep ########################################################################
+
+deps: MAS = $(shell find $* -name "*.ma")
+
+deps: $(DEP_DIR)/$(DEP)
+       @echo "  MATITADEP"
+       $(H)grep "include \"" $(MAS) | $<
+
+# stats ######################################################################
+
+stats: $(PACKAGES:%=%.stats)
+
+%.stats: MAS = $(shell find $* -name "*.ma")
+
+%.stats: CHARS = $(shell $(MAC_DIR)/$(MAC) $(MAS))
+
+%.stats:
+       @printf '\x1B[1;40;37m'
+       @printf '%-15s %-40s' 'Statistics for:' $*      
+       @printf '\x1B[0m\n'     
+       @printf '\x1B[1;40;35m'
+       @printf '%-8s %6i' Chars $(CHARS)
+       @printf '   %-8s %3i' Pages `echo $$(($(CHARS) / 5120))`
+       @printf '   %-23s' ''
+       @printf '\x1B[0m\n'
+       @printf '\x1B[1;40;36m'
+       @printf '%-8s %6i' Sources `ls $(MAS) | wc -l`
+       @printf '   %-38s' ''
+#      @printf '   %-8s %5i' Objs `ls *.vo | wc -l`
+#      @printf '   %-6s %3i' Files `ls *.v | wc -l`
+       @printf '\x1B[0m\n'     
+       @printf '\x1B[1;40;32m'
+       @printf '%-8s %6i' Theorems `grep "theorem " $(MAS) | wc -l`
+       @printf '   %-8s %3i' Lemmas `grep "lemma " $(MAS) | wc -l`
+       @printf '   %-5s %3i' Facts `grep "fact " $(MAS) | wc -l`
+       @printf '   %-6s %4i' Proofs `grep qed $(MAS) | wc -l`
+       @printf '\x1B[0m\n'     
+       @printf '\x1B[1;40;33m'
+       @printf '%-8s %6i' Declared `grep "inductive \|record " $(MAS) | wc -l` 
+       @printf '   %-8s %3i' Defined `grep "definition \|let rec " $(MAS) | wc -l`     
+       @printf '   %-23s' ''
+#      @printf '   %-8s %5i' Local `grep "Local" *.v | wc -l`
+       @printf '\x1B[0m\n'
+       @printf '\x1B[1;40;31m'
+       @printf '%-8s %6i' Axioms `grep axiom $(MAS) | wc -l`
+       @printf '   %-8s %3i' Comments `grep "(\*[^*:]*$$" $(MAS) | wc -l`
+       @printf '   %-5s %3i' Marks `grep "(\*\*)" $(MAS) | wc -l`
+       @printf '   %-11s' ''
+       @printf '\x1B[0m\n'
+
+# summary ####################################################################
+
+define SUMMARY_TEMPLATE
+  TBL_$(1) := $(1)/$(1)_sum.tbl  
+  MAS_$(1) := $$(shell find $(1) -name "*.ma")
+  TBLS     += $$(TBL_$(1))
+
+  $$(TBL_$(1)): V1 := $$(shell ls $$(MAS_$(1)) | wc -l)
+  $$(TBL_$(1)): V2 := $$(shell $$(MAC_DIR)/$$(MAC) $$(MAS_$(1)))
+  $$(TBL_$(1)): C1 := $$(shell grep "inductive \|record " $$(MAS_$(1)) | wc -l)
+  $$(TBL_$(1)): C2 := $$(shell grep "definition \|let rec " $$(MAS_$(1)) | wc -l)
+  $$(TBL_$(1)): C3 := $$(shell grep "inductive \|record \|definition \|let rec " $$(MAS_$(1)) | wc -l)
+  $$(TBL_$(1)): P1 := $$(shell grep "theorem " $$(MAS_$(1)) | wc -l)
+  $$(TBL_$(1)): P2 := $$(shell grep "lemma " $$(MAS_$(1)) | wc -l)
+  $$(TBL_$(1)): P3 := $$(shell grep "lemma \|theorem " $$(MAS_$(1)) | wc -l)
+
+  $$(TBL_$(1)): $$(MAS_$(1))
+       @printf '  SUMMARY $(1)\n'
+       @printf 'name "$$(basename $$(@F))"\n\n'       >  $$@
+       @printf 'table {\n'                            >> $$@
+       @printf '   class "grey" [ "category"\n'       >> $$@
+       @printf '      [ "objects" * ]\n'              >> $$@
+       @printf '   ]\n'                               >> $$@
+       @printf '   class "cyan" [ "sizes"\n'          >> $$@
+       @printf '      [ "files" "$$(V1)" ]\n'         >> $$@
+       @printf '      [ "characters" "$$(V2)" ]\n'    >> $$@
+       @printf '      [ * ]\n'                        >> $$@
+       @printf '   ]\n'                               >> $$@   
+       @printf '   class "green" [ "propositions"\n'  >> $$@
+       @printf '      [ "theorems" "$$(P1)" ]\n'      >> $$@
+       @printf '      [ "lemmas"   "$$(P2)" ]\n'      >> $$@
+       @printf '      [ "total"    "$$(P3)" ]\n'      >> $$@
+       @printf '   ]\n'                               >> $$@
+       @printf '   class "yellow" [ "concepts"\n'     >> $$@
+       @printf '      [ "declared" "$$(C1)" ]\n'      >> $$@
+       @printf '      [ "defined"  "$$(C2)" ]\n'      >> $$@
+       @printf '      [ "total"    "$$(C3)" ]\n'      >> $$@
+       @printf '   ]\n'                               >> $$@
+       @printf '}\n\n'                                >> $$@
+       @printf 'class "component" { 0 }\n\n'          >> $$@
+       @printf 'class "plane" { 1 } { 3 } { 5 }\n\n'  >> $$@
+       @printf 'class "number" { 2 } { 4 } { 6 }\n\n' >> $$@
+endef
+
+$(foreach PKG, $(PACKAGES), $(eval $(call SUMMARY_TEMPLATE,$(PKG))))
+
+tbls: $(TBLS)
diff --git a/matita/matita/contribs/lambdadelta/apps_2/functional/dsubst.ma b/matita/matita/contribs/lambdadelta/apps_2/functional/dsubst.ma
new file mode 100644 (file)
index 0000000..f584737
--- /dev/null
@@ -0,0 +1,75 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/delift_lift.ma".
+include "apps_2/functional/lift.ma".
+
+(* FUNCTIONAL DELIFTING SUBSTITUTION ****************************************)
+
+let rec fdsubst W d U on U ≝ match U with
+[ TAtom I     ⇒ match I with
+  [ Sort _ ⇒ U
+  | LRef i ⇒ tri … i d (#i) (↑[0, i] W) (#(i-1))
+  | GRef _ ⇒ U
+  ]
+| TPair I V T ⇒ match I with
+  [ Bind2 a I ⇒ ⓑ{a,I} (fdsubst W d V). (fdsubst W (d+1) T)
+  | Flat2 I   ⇒ ⓕ{I} (fdsubst W d V). (fdsubst W d T)
+  ]
+].
+
+interpretation
+   "functional delifting substitution"
+   'DSubst V d T = (fdsubst V d T).
+
+(* Main properties **********************************************************)
+
+theorem fdsubst_delift: ∀K,V,T,L,d.
+                        ⇩[0, d] L ≡ K. ⓓV → L ⊢ ▼*[d, 1] T ≡ [d ⬐ V] T.
+#K #V #T elim T -T
+[ * #i #L #d #HLK normalize in ⊢ (? ? ? ? ? %); /2 width=3/
+  elim (lt_or_eq_or_gt i d) #Hid
+  [ -HLK >(tri_lt ?????? Hid) /3 width=3/
+  | destruct >tri_eq /4 width=4 by tpss_strap2, tps_subst, le_n, ex2_1_intro/ (**) (* too slow without trace *)   
+  | -HLK >(tri_gt ?????? Hid) /3 width=3/
+  ]
+| * /3 width=1/ /4 width=1/
+]
+qed.
+
+(* Main inversion properties ************************************************)
+
+theorem fdsubst_inv_delift: ∀K,V,T1,L,T2,d. ⇩[0, d] L ≡ K. ⓓV →
+                            L ⊢ ▼*[d, 1] T1 ≡ T2 → [d ⬐ V] T1 = T2.
+#K #V #T1 elim T1 -T1
+[ * #i #L #T2 #d #HLK #H
+  [ -HLK >(delift_inv_sort1 … H) -H //
+  | elim (lt_or_eq_or_gt i d) #Hid normalize
+    [ -HLK >(delift_inv_lref1_lt … H) -H // /2 width=1/
+    | destruct
+      elim (delift_inv_lref1_be … H ? ?) -H // #K0 #V0 #V2 #HLK0
+      lapply (ldrop_mono … HLK0 … HLK) -HLK0 -HLK #H >minus_plus <minus_n_n #HV2 #HVT2 destruct
+      >(delift_inv_refl_O2 … HV2) -V >(flift_inv_lift … HVT2) -V2 //
+    | -HLK >(delift_inv_lref1_ge … H) -H // /2 width=1/
+    ]
+  | -HLK >(delift_inv_gref1 … H) -H //
+  ]
+| * [ #a ] #I #V1 #T1 #IHV1 #IHT1 #L #X #d #HLK #H
+  [ elim (delift_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+    <(IHV1 … HV12) -IHV1 -HV12 // <(IHT1 … HT12) -IHT1 -HT12 // /2 width=1/
+  | elim (delift_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+    <(IHV1 … HV12) -IHV1 -HV12 // <(IHT1 … HT12) -IHT1 -HT12 //
+  ]
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/apps_2/functional/lift.ma b/matita/matita/contribs/lambdadelta/apps_2/functional/lift.ma
new file mode 100644 (file)
index 0000000..bf05ea3
--- /dev/null
@@ -0,0 +1,68 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/lift.ma".
+include "apps_2/functional/notation.ma".
+
+(* FUNCTIONAL RELOCATION ****************************************************)
+
+let rec flift d e U on U ≝ match U with
+[ TAtom I     ⇒ match I with
+  [ Sort _ ⇒ U
+  | LRef i ⇒ #(tri … i d i (i + e) (i + e))
+  | GRef _ ⇒ U
+  ]
+| TPair I V T ⇒ match I with
+  [ Bind2 a I ⇒ ⓑ{a,I} (flift d e V). (flift (d+1) e T)
+  | Flat2 I   ⇒ ⓕ{I} (flift d e V). (flift d e T)
+  ]
+].
+
+interpretation "functional relocation" 'Lift d e T = (flift d e T).
+
+(* Main properties **********************************************************)
+
+theorem flift_lift: ∀T,d,e. ⇧[d, e] T ≡ ↑[d, e] T.
+#T elim T -T
+[ * #i #d #e //
+  elim (lt_or_eq_or_gt i d) #Hid normalize
+  [ >(tri_lt ?????? Hid) /2 width=1/
+  | /2 width=1/
+  | >(tri_gt ?????? Hid) /3 width=2/
+  ]
+| * /2/
+]
+qed.
+
+(* Main inversion properties ************************************************)
+
+theorem flift_inv_lift: ∀d,e,T1,T2. ⇧[d, e] T1 ≡ T2 → ↑[d, e] T1 = T2.
+#d #e #T1 #T2 #H elim H -d -e -T1 -T2 normalize //
+[ #i #d #e #Hid >(tri_lt ?????? Hid) //
+| #i #d #e #Hid
+  elim (le_to_or_lt_eq … Hid) -Hid #Hid
+  [ >(tri_gt ?????? Hid) //
+  | destruct //
+  ]
+]
+qed-.
+
+(* Derived properties *******************************************************)
+
+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
+>(flift_inv_lift … H) -H //
+qed.
diff --git a/matita/matita/contribs/lambdadelta/apps_2/functional/notation.ma b/matita/matita/contribs/lambdadelta/apps_2/functional/notation.ma
new file mode 100644 (file)
index 0000000..1c60d6c
--- /dev/null
@@ -0,0 +1,27 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE "functional" COMPONENT ********************************)
+
+notation "hvbox( ↑ [ term 46 d , break term 46 e ] break term 46 T )"
+   non associative with precedence 46
+   for @{ 'Lift $d $e $T }.
+
+notation "hvbox( [ term 46 d ⬐ break term 46 V ] break term 46 T )"
+   non associative with precedence 46
+   for @{ 'DSubst $V $d $T }.
+
+notation "hvbox( T1 ⇨ break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'SRed $T1 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/apps_2/functional/rtm.ma b/matita/matita/contribs/lambdadelta/apps_2/functional/rtm.ma
new file mode 100644 (file)
index 0000000..c7acff7
--- /dev/null
@@ -0,0 +1,85 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/term_vector.ma".
+include "basic_2/grammar/genv.ma".
+
+(* REDUCTION AND TYPE MACHINE ***********************************************)
+
+(* machine local environment *)
+inductive xenv: Type[0] ≝
+| XAtom: xenv                                    (* empty *)
+| XQuad: xenv → bind2 → nat → xenv → term → xenv (* entry *)
+.
+
+interpretation "atom (ext. local environment)"
+   'Star = XAtom.
+
+interpretation "environment construction (quad)"
+   'DxItem4 L I u K V = (XQuad L I u K V).
+
+(* machine stack *)
+definition stack: Type[0] ≝ list2 xenv term.
+
+(* machine status *)
+record rtm: Type[0] ≝
+{ rg: genv;  (* global environment *)
+  ru: nat;   (* current de Bruijn's level *)
+  re: xenv;  (* extended local environment *)
+  rs: stack; (* application stack *)
+  rt: term   (* code *)
+}.
+
+(* initial state *)
+definition rtm_i: genv → term → rtm ≝
+                  λG,T. mk_rtm G 0 (⋆) (⟠) T.
+
+(* update code *)
+definition rtm_t: rtm → term → rtm ≝
+                  λM,T. match M with
+                  [ mk_rtm G u E _ _ ⇒ mk_rtm G u E (⟠) T
+                  ].
+
+(* update closure *)
+definition rtm_u: rtm → xenv → term → rtm ≝
+                  λM,E,T. match M with
+                  [ mk_rtm G u _ _ _ ⇒ mk_rtm G u E (⟠) T
+                  ].
+
+(* get global environment *)
+definition rtm_g: rtm → genv ≝
+                  λM. match M with
+                  [ mk_rtm G _ _ _ _ ⇒ G
+                  ].
+
+(* get local reference level *)
+definition rtm_l: rtm → nat ≝
+                  λM. match M with
+                  [ mk_rtm _ u E _ _ ⇒ match E with
+                     [ XAtom           ⇒ u
+                     | XQuad _ _ u _ _ ⇒ u
+                     ]
+                  ].
+
+(* get stack *)
+definition rtm_s: rtm → stack ≝
+                  λM. match M with
+                  [ mk_rtm _ _ _ S _ ⇒ S
+                  ].
+
+(* get code *)
+definition rtm_c: rtm → term ≝
+                  λM. match M with
+                  [ mk_rtm _ _ _ _ T ⇒ T
+                  ].
diff --git a/matita/matita/contribs/lambdadelta/apps_2/functional/rtm_step.ma b/matita/matita/contribs/lambdadelta/apps_2/functional/rtm_step.ma
new file mode 100644 (file)
index 0000000..ed16d50
--- /dev/null
@@ -0,0 +1,57 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "apps_2/functional/rtm.ma".
+
+(* REDUCTION AND TYPE MACHINE ***********************************************)
+
+(* transitions *)
+inductive rtm_step: relation rtm ≝
+| rtm_ldrop : ∀G,u,E,I,t,F,V,S,i.
+              rtm_step (mk_rtm G u (E. ④{I} {t, F, V}) S (#(i + 1)))
+                       (mk_rtm G u E S (#i))
+| rtm_ldelta: ∀G,u,E,t,F,V,S.
+              rtm_step (mk_rtm G u (E. ④{Abbr} {t, F, V}) S (#0))
+                       (mk_rtm G u F S V)
+| rtm_ltype : ∀G,u,E,t,F,V,S.
+              rtm_step (mk_rtm G u (E. ④{Abst} {t, F, V}) S (#0))
+                       (mk_rtm G u F S V)
+| rtm_gdrop : ∀G,I,V,u,E,S,p. p < |G| →
+              rtm_step (mk_rtm (G. ⓑ{I} V) u E S (§p))
+                       (mk_rtm G u E S (§p))
+| rtm_gdelta: ∀G,V,u,E,S,p. p = |G| →
+              rtm_step (mk_rtm (G. ⓓV) u E S (§p))
+                       (mk_rtm G u E S V)
+| rtm_gtype : ∀G,V,u,E,S,p. p = |G| →
+              rtm_step (mk_rtm (G. ⓛV) u E S (§p))
+                       (mk_rtm G u E S V)
+| rtm_tau   : ∀G,u,E,S,W,T.
+              rtm_step (mk_rtm G u E S (ⓝW. T))
+                       (mk_rtm G u E S T)
+| rtm_appl  : ∀G,u,E,S,V,T.
+              rtm_step (mk_rtm G u E S (ⓐV. T))
+                       (mk_rtm G u E ({E, V} @ S) T)
+| rtm_beta  : ∀G,u,E,F,V,S,W,T.
+              rtm_step (mk_rtm G u E ({F, V} @ S) (+ⓛW. T))
+                       (mk_rtm G u (E. ④{Abbr} {u, F, V}) S T)
+| rtm_push  : ∀G,u,E,W,T.
+              rtm_step (mk_rtm G u E ⟠ (+ⓛW. T))
+                       (mk_rtm G (u + 1) (E. ④{Abst} {u, E, W}) ⟠ T)
+| rtm_theta : ∀G,u,E,S,V,T.
+              rtm_step (mk_rtm G u E S (+ⓓV. T))
+                       (mk_rtm G u (E. ④{Abbr} {u, E, V}) S T)
+.
+
+interpretation "sequential reduction (RTM)"
+   'SRed O1 O2 = (rtm_step O1 O2).
diff --git a/matita/matita/contribs/lambdadelta/basic_2/basic_1.orig b/matita/matita/contribs/lambdadelta/basic_2/basic_1.orig
new file mode 100644 (file)
index 0000000..0b48e94
--- /dev/null
@@ -0,0 +1,712 @@
+aplus/props / aplus_ahead_simpl
+aplus/props / aplus_asort_le_simpl
+aplus/props / aplus_asort_O_simpl
+aplus/props / aplus_asort_simpl
+aplus/props / aplus_assoc
+aplus/props / aplus_asucc
+aplus/props / aplus_asucc_false
+aplus/props / aplus_inj
+aplus/props / aplus_reg_r
+aplus/props / aplus_sort_O_S_simpl
+aplus/props / aplus_sort_S_S_simpl
+aprem/fwd / aprem_gen_head_O
+aprem/fwd / aprem_gen_head_S
+aprem/fwd / aprem_gen_sort
+aprem/props / aprem_asucc
+aprem/props / aprem_repl
+arity/aprem / arity_aprem
+arity/cimp / arity_cimp_conf
+arity/fwd / arity_gen_abst
+arity/fwd / arity_gen_appl
+arity/fwd / arity_gen_appls
+arity/fwd / arity_gen_bind
+arity/fwd / arity_gen_cast
+arity/fwd / arity_gen_lift
+arity/fwd / arity_gen_lref
+arity/fwd / arity_gen_sort
+arity/lift1 / arity_lift1
+arity/pr3 / arity_sred_pr2
+arity/pr3 / arity_sred_pr3
+arity/pr3 / arity_sred_wcpr0_pr0
+arity/pr3 / arity_sred_wcpr0_pr1
+arity/props / arity_appls_abbr
+arity/props / arity_appls_bind
+arity/props / arity_appls_cast
+arity/props / arity_lift
+arity/props / arity_mono
+arity/props / arity_repellent
+arity/props / node_inh
+arity/subst0 / arity_fsubst0
+arity/subst0 / arity_gen_cvoid
+arity/subst0 / arity_gen_cvoid_subst0
+arity/subst0 / arity_subst0
+asucc/fwd / asucc_gen_head
+asucc/fwd / asucc_gen_sort
+cimp/props / cimp_bind
+cimp/props / cimp_flat_dx
+cimp/props / cimp_flat_sx
+cimp/props / cimp_getl_conf
+clear/drop / drop_clear
+clear/drop / drop_clear_O
+clear/drop / drop_clear_S
+clear/fwd / clear_gen_all
+clear/fwd / clear_gen_bind
+clear/fwd / clear_gen_flat
+clear/fwd / clear_gen_flat_r
+clear/fwd / clear_gen_sort
+clear/props / clear_cle
+clear/props / clear_clear
+clear/props / clear_ctail
+clear/props / clear_mono
+clear/props / clear_trans
+clen/getl / getl_ctail_clen
+clen/getl / getl_gen_tail
+cnt/props / cnt_lift
+C/props / chead_ctail
+C/props / clt_cong
+C/props / clt_head
+C/props / clt_thead
+C/props / clt_wf_ind
+C/props clt_wf q_ind
+C/props / c_tail_ind
+csuba/arity / arity_appls_appl
+csuba/arity / csuba_arity
+csuba/arity / csuba_arity_rev
+csuba/clear / csuba_clear_conf
+csuba/clear / csuba_clear_trans
+csuba/drop / csuba_drop_abbr
+csuba/drop / csuba_drop_abbr_rev
+csuba/drop / csuba_drop_abst
+csuba/drop / csuba_drop_abst_rev
+csuba/fwd / csuba_gen_abbr
+csuba/fwd / csuba_gen_abbr_rev
+csuba/fwd / csuba_gen_abst
+csuba/fwd / csuba_gen_abst_rev
+csuba/fwd / csuba_gen_bind
+csuba/fwd / csuba_gen_bind_rev
+csuba/fwd / csuba_gen_flat
+csuba/fwd / csuba_gen_flat_rev
+csuba/fwd / csuba_gen_void
+csuba/fwd / csuba_gen_void_rev
+csuba/getl / csuba_getl_abbr
+csuba/getl / csuba_getl_abbr_rev
+csuba/getl / csuba_getl_abst
+csuba/getl / csuba_getl_abst_rev
+csuba/props / csuba_refl
+csubc/arity / csubc_arity_conf
+csubc/arity / csubc_arity_trans
+csubc/clear / csubc_clear_conf
+csubc/csuba / csubc_csuba
+csubc/drop1 / csubc_drop1_conf_rev
+csubc/drop1 / drop1_csubc_trans
+csubc/drop / csubc_drop_conf_O
+csubc/drop / csubc_drop_conf_rev
+csubc/drop / drop_csubc_trans
+csubc/fwd / csubc_gen_head_l
+csubc/fwd / csubc_gen_head_r
+csubc/fwd / csubc_gen_sort_l
+csubc/fwd / csubc_gen_sort_r
+csubc/getl / csubc_getl_conf
+csubc/props / csubc_refl
+csubst0/clear / csubst0_clear_O
+csubst0/clear / csubst0_clear_O_back
+csubst0/clear / csubst0_clear_S
+csubst0/clear / csubst0_clear_trans
+csubst0/drop / csubst0_drop_eq
+csubst0/drop / csubst0_drop_eq_back
+csubst0/drop / csubst0_drop_gt
+csubst0/drop / csubst0_drop_gt_back
+csubst0/drop / csubst0_drop_lt
+csubst0/drop / csubst0_drop_lt_back
+csubst0/fwd / csubst0_gen_head
+csubst0/fwd / csubst0_gen_S_bind_2
+csubst0/fwd / csubst0_gen_sort
+csubst0/getl / csubst0_getl_ge
+csubst0/getl / csubst0_getl_ge_back
+csubst0/getl / csubst0_getl_lt
+csubst0/getl / csubst0_getl_lt_back
+csubst0/props / csubst0_both_bind
+csubst0/props / csubst0_fst_bind
+csubst0/props / csubst0_snd_bind
+csubst1/fwd / csubst1_gen_head
+csubst1/getl / csubst1_getl_ge
+csubst1/getl / csubst1_getl_ge_back
+csubst1/getl / csubst1_getl_lt
+csubst1/getl / getl_csubst1
+csubst1/props / csubst1_bind
+csubst1/props / csubst1_flat
+csubst1/props / csubst1_head
+csubt/clear / csubt_clear_conf
+csubt/csuba / csubt_csuba
+csubt/drop / csubt_drop_abbr
+csubt/drop / csubt_drop_abst
+csubt/drop / csubt_drop_flat
+csubt/fwd / csubt_gen_abbr
+csubt/fwd / csubt_gen_abst
+csubt/fwd / csubt_gen_bind
+csubt/fwd / csubt_gen_flat
+csubt/getl / csubt_getl_abbr
+csubt/getl / csubt_getl_abst
+csubt/pc3 / csubt_pc3
+csubt/pc3 / csubt_pr2
+csubt/props / csubt_refl
+csubt/ty3 / csubt_ty3
+csubt/ty3 / csubt_ty3_ld
+csubv/clear / csubv_clear_conf
+csubv/clear / csubv_clear_conf_void
+csubv/drop / csubv_drop_conf
+csubv/getl / csubv_getl_conf
+csubv/getl / csubv_getl_conf_void
+csubv/props / csubv_bind_same
+csubv/props / csubv_refl
+drop1/fwd / drop1_gen_pcons
+drop1/fwd / drop1_gen_pnil
+drop1/getl / drop1_getl_trans
+drop1/props / drop1_cons_tail
+drop1/props / drop1_skip_bind
+drop1/props / drop1_trans
+drop/fwd / drop_gen_drop
+drop/fwd / drop_gen_refl
+drop/fwd / drop_gen_skip_l
+drop/fwd / drop_gen_skip_r
+drop/fwd / drop_gen_sort
+drop/props / drop_conf_ge
+drop/props / drop_conf_lt
+drop/props / drop_conf_rev
+drop/props / drop_ctail
+drop/props / drop_mono
+drop/props / drop_S
+drop/props / drop_skip_bind
+drop/props / drop_skip_flat
+drop/props / drop_trans_ge
+drop/props / drop_trans_le
+ex0/props / aplus_gz_ge
+ex0/props / aplus_gz_le
+ex0/props / leq_leqz
+ex0/props / leqz_leq
+ex0/props / next_plus_gz
+ex1/props / ex1_arity
+ex1/props ex1 leq_sort_SS
+ex1/props / ex1_ty3
+ex2/props / ex2_arity
+ex2/props / ex2_nf2
+flt/props / flt_arith0
+flt/props / flt_arith1
+flt/props / flt_arith2
+flt/props / flt_shift
+flt/props / flt_thead_dx
+flt/props / flt_thead_sx
+flt/props / flt_trans
+flt/props / flt_wf_ind
+flt/props flt_wf q_ind
+fsubst0/fwd / fsubst0_gen_base
+getl/clear / clear_getl_trans
+getl/clear / getl_clear_bind
+getl/clear / getl_clear_conf
+getl/clear / getl_clear_trans
+getl/dec / getl_dec
+getl/drop / drop_getl_trans_ge
+getl/drop / drop_getl_trans_le
+getl/drop / drop_getl_trans_lt
+getl/drop / getl_conf_ge_drop
+getl/drop / getl_drop
+getl/drop / getl_drop_conf_ge
+getl/drop / getl_drop_conf_lt
+getl/drop / getl_drop_conf_rev
+getl/drop / getl_drop_trans
+getl/flt / getl_flt
+getl/fwd / getl_gen_2
+getl/fwd / getl_gen_all
+getl/fwd / getl_gen_bind
+getl/fwd / getl_gen_flat
+getl/fwd / getl_gen_O
+getl/fwd / getl_gen_S
+getl/fwd / getl_gen_sort
+getl/getl / getl_conf_le
+getl/getl / getl_trans
+getl/props / getl_ctail
+getl/props / getl_flat
+getl/props / getl_head
+getl/props / getl_mono
+getl/props / getl_refl
+iso/fwd / iso_flats_flat_bind_false
+iso/fwd / iso_flats_lref_bind_false
+iso/fwd / iso_gen_head
+iso/fwd / iso_gen_lref
+iso/fwd / iso_gen_sort
+iso/props / iso_refl
+iso/props / iso_trans
+leq/asucc / asucc_inj
+leq/asucc / asucc_repl
+leq/asucc / leq_ahead_asucc_false
+leq/asucc / leq_asucc
+leq/asucc / leq_asucc_false
+leq/fwd / leq_gen_head1
+leq/fwd / leq_gen_head2
+leq/fwd / leq_gen_sort1
+leq/fwd / leq_gen_sort2
+leq/props / ahead_inj_snd
+leq/props / leq_ahead_false_1
+leq/props / leq_ahead_false_2
+leq/props / leq_eq
+leq/props / leq_refl
+leq/props / leq_sym
+leq/props / leq_trans
+lift1/fwd / lift1_bind
+lift1/fwd / lift1_cons_tail
+lift1/fwd / lift1_flat
+lift1/fwd / lift1_lref
+lift1/fwd / lift1_sort
+lift1/fwd / lifts1_cons
+lift1/fwd / lifts1_flat
+lift1/fwd / lifts1_nil
+lift1/props / lift1_free
+lift1/props / lift1_lift1
+lift1/props / lift1_xhg
+lift1/props / lifts1_xhg
+lift/fwd / lift_bind
+lift/fwd / lift_flat
+lift/fwd / lift_gen_bind
+lift/fwd / lift_gen_flat
+lift/fwd / lift_gen_head
+lift/fwd / lift_gen_lref
+lift/fwd / lift_gen_lref_false
+lift/fwd / lift_gen_lref_ge
+lift/fwd / lift_gen_lref_lt
+lift/fwd / lift_gen_sort
+lift/fwd / lift_head
+lift/fwd / lift_lref_ge
+lift/fwd / lift_lref_lt
+lift/fwd / lift_sort
+lift/props / lift_d
+lift/props / lift_free
+lift/props / lift_gen_lift
+lift/props / lift_inj
+lift/props / lift_lref_gt
+lift/props / lift_r
+lift/props / lifts_inj
+lift/props / lifts_tapp
+lift/props / thead_x_lift_y_y
+lift/tlt / lift_tlt_dx
+lift/tlt / lift_weight
+lift/tlt / lift_weight_add
+lift/tlt / lift_weight_add_O
+lift/tlt / lift_weight_map
+llt/props / llt_head_dx
+llt/props / llt_head_sx
+llt/props / llt_repl
+llt/props / llt_trans
+llt/props / llt_wf_ind
+llt/props llt_wf q_ind
+llt/props / lweight_repl
+next_plus/props / next_plus_assoc
+next_plus/props / next_plus_lt
+next_plus/props / next_plus_next
+nf2/arity / arity_nf2_inv_all
+nf2/dec / nf2_dec
+nf2/fwd / nf2_gen_abbr
+nf2/fwd / nf2_gen_abst
+nf2/fwd / nf2_gen_beta
+nf2/fwd / nf2_gen_cast
+nf2/fwd / nf2_gen_flat
+nf2/fwd / nf2_gen_lref
+nf2/fwd nf2_gen nf2_gen_aux
+nf2/fwd / nf2_gen_void
+nf2/iso / nf2_iso_appls_lref
+nf2/lift1 / nf2_lift1
+nf2/pr3 / nf2_pr3_confluence
+nf2/pr3 / nf2_pr3_unfold
+nf2/props / nf2_abst
+nf2/props / nf2_abst_shift
+nf2/props / nf2_appl_lref
+nf2/props / nf2_appls_lref
+nf2/props / nf2_csort_lref
+nf2/props / nf2_lift
+nf2/props / nf2_lref_abst
+nf2/props / nf2_sort
+nf2/props / nfs2_tapp
+pc1/props / pc1_head
+pc1/props / pc1_head_1
+pc1/props / pc1_head_2
+pc1/props / pc1_pr0_r
+pc1/props / pc1_pr0_u
+pc1/props / pc1_pr0_u2
+pc1/props / pc1_pr0_x
+pc1/props / pc1_refl
+pc1/props / pc1_s
+pc1/props / pc1_t
+pc3/dec / pc3_abst_dec
+pc3/dec / pc3_dec
+pc3/fsubst0 / pc3_fsubst0
+pc3/fsubst0 / pc3_pr2_fsubst0
+pc3/fsubst0 / pc3_pr2_fsubst0_back
+pc3/fwd / pc3_gen_abst
+pc3/fwd / pc3_gen_abst_shift
+pc3/fwd / pc3_gen_lift
+pc3/fwd / pc3_gen_lift_abst
+pc3/fwd / pc3_gen_not_abst
+pc3/fwd / pc3_gen_sort
+pc3/fwd / pc3_gen_sort_abst
+pc3/left / pc3_ind_left
+pc3/left pc3_ind_left pc3_left_pc3
+pc3/left pc3_ind_left pc3_left_pr3
+pc3/left pc3_ind_left pc3_left_sym
+pc3/left pc3_ind_left pc3_left_trans
+pc3/left pc3_ind_left pc3_pc3_left
+pc3/nf2 / pc3_nf2
+pc3/nf2 / pc3_nf2_unfold
+pc3/pc1 / pc3_pc1
+pc3/props / clear_pc3_trans
+pc3/props / pc3_eta
+pc3/props / pc3_head_1
+pc3/props / pc3_head_12
+pc3/props / pc3_head_2
+pc3/props / pc3_head_21
+pc3/props / pc3_lift
+pc3/props / pc3_pr0_pr2_t
+pc3/props / pc3_pr2_pr2_t
+pc3/props / pc3_pr2_pr3_t
+pc3/props / pc3_pr2_r
+pc3/props / pc3_pr2_u
+pc3/props / pc3_pr2_u2
+pc3/props / pc3_pr2_x
+pc3/props / pc3_pr3_conf
+pc3/props / pc3_pr3_pc3_t
+pc3/props / pc3_pr3_r
+pc3/props / pc3_pr3_t
+pc3/props / pc3_pr3_x
+pc3/props / pc3_refl
+pc3/props / pc3_s
+pc3/props / pc3_t
+pc3/props / pc3_thin_dx
+pc3/subst1 / pc3_gen_cabbr
+pc3/wcpr0 / pc3_wcpr0
+pc3/wcpr0 pc3_wcpr0 pc3_wcpr0_t_aux
+pc3/wcpr0 / pc3_wcpr0_t
+pr0/dec / nf0_dec
+pr0/fwd / pr0_gen_abbr
+pr0/fwd / pr0_gen_abst
+pr0/fwd / pr0_gen_appl
+pr0/fwd / pr0_gen_cast
+pr0/fwd / pr0_gen_lift
+pr0/fwd / pr0_gen_lref
+pr0/fwd / pr0_gen_sort
+pr0/fwd / pr0_gen_void
+pr0/pr0 / pr0_confluence
+pr0/pr0 pr0_confluence pr0_cong_delta
+pr0/pr0 pr0_confluence pr0_cong_upsilon_cong
+pr0/pr0 pr0_confluence pr0_cong_upsilon_delta
+pr0/pr0 pr0_confluence pr0_cong_upsilon_refl
+pr0/pr0 pr0_confluence pr0_cong_upsilon_zeta
+pr0/pr0 pr0_confluence pr0_delta_delta
+pr0/pr0 pr0_confluence pr0_delta_tau
+pr0/pr0 pr0_confluence pr0_upsilon_upsilon
+pr0/props / pr0_lift
+pr0/props / pr0_subst0
+pr0/props / pr0_subst0_back
+pr0/props / pr0_subst0_fwd
+pr0/subst1 / pr0_delta1
+pr0/subst1 / pr0_subst1
+pr0/subst1 / pr0_subst1_back
+pr0/subst1 / pr0_subst1_fwd
+pr1/pr1 / pr1_confluence
+pr1/pr1 / pr1_strip
+pr1/props / pr1_comp
+pr1/props / pr1_eta
+pr1/props / pr1_head_1
+pr1/props / pr1_head_2
+pr1/props / pr1_pr0
+pr1/props / pr1_t
+pr2/clen / pr2_gen_cbind
+pr2/clen / pr2_gen_cflat
+pr2/clen / pr2_gen_ctail
+pr2/fwd / pr2_gen_abbr
+pr2/fwd / pr2_gen_abst
+pr2/fwd / pr2_gen_appl
+pr2/fwd / pr2_gen_cast
+pr2/fwd / pr2_gen_csort
+pr2/fwd / pr2_gen_lift
+pr2/fwd / pr2_gen_lref
+pr2/fwd / pr2_gen_sort
+pr2/fwd / pr2_gen_void
+pr2/pr2 / pr2_confluence
+pr2/pr2 pr2_confluence pr2_delta_delta
+pr2/pr2 pr2_confluence pr2_free_delta
+pr2/pr2 pr2_confluence pr2_free_free
+pr2/props / clear_pr2_trans
+pr2/props / pr2_cflat
+pr2/props / pr2_change
+pr2/props / pr2_ctail
+pr2/props / pr2_head_1
+pr2/props / pr2_head_2
+pr2/props / pr2_lift
+pr2/props / pr2_thin_dx
+pr2/subst1 / pr2_delta1
+pr2/subst1 / pr2_gen_cabbr
+pr2/subst1 / pr2_subst1
+pr3/fwd / pr3_gen_abbr
+pr3/fwd / pr3_gen_abst
+pr3/fwd / pr3_gen_appl
+pr3/fwd / pr3_gen_bind
+pr3/fwd / pr3_gen_cast
+pr3/fwd / pr3_gen_lift
+pr3/fwd / pr3_gen_lref
+pr3/fwd / pr3_gen_sort
+pr3/fwd / pr3_gen_void
+pr3/iso / pr3_iso_appl_bind
+pr3/iso / pr3_iso_appls_abbr
+pr3/iso / pr3_iso_appls_appl_bind
+pr3/iso / pr3_iso_appls_beta
+pr3/iso / pr3_iso_appls_bind
+pr3/iso / pr3_iso_appls_cast
+pr3/iso / pr3_iso_beta
+pr3/pr1 / pr3_pr1
+pr3/pr3 / pr3_confluence
+pr3/pr3 / pr3_strip
+pr3/props / clear_pr3_trans
+pr3/props / pr3_cflat
+pr3/props / pr3_eta
+pr3/props / pr3_flat
+pr3/props / pr3_head_1
+pr3/props / pr3_head_12
+pr3/props / pr3_head_2
+pr3/props / pr3_head_21
+pr3/props / pr3_lift
+pr3/props / pr3_pr0_pr2_t
+pr3/props / pr3_pr2
+pr3/props / pr3_pr2_pr2_t
+pr3/props / pr3_pr2_pr3_t
+pr3/props / pr3_pr3_pr3_t
+pr3/props / pr3_t
+pr3/props / pr3_thin_dx
+pr3/subst1 / pr3_gen_cabbr
+pr3/subst1 / pr3_subst1
+pr3/wcpr0 / pr3_wcpr0_t
+r/props / r_arith0
+r/props / r_arith1
+r/props / r_dis
+r/props / r_minus
+r/props / r_plus
+r/props / r_plus_sym
+r/props / r_S
+r/props / s_r
+sc3/arity / sc3_arity
+sc3/arity / sc3_arity_csubc
+sc3/props / sc3_abbr
+sc3/props / sc3_abst
+sc3/props / sc3_appl
+sc3/props / sc3_arity_gen
+sc3/props / sc3_bind
+sc3/props / sc3_cast
+sc3/props / sc3_lift
+sc3/props / sc3_lift1
+sc3/props sc3_props sc3_sn3_abst
+sc3/props / sc3_repl
+sc3/props / sc3_sn3
+sn3/fwd / sn3_gen_bind
+sn3/fwd / sn3_gen_cflat
+sn3/fwd / sn3_gen_flat
+sn3/fwd / sn3_gen_head
+sn3/fwd / sn3_gen_lift
+sn3/lift1 / sns3_lifts1
+sn3/nf2 / nf2_sn3
+sn3/nf2 / sn3_nf2
+sn3/props / sn3_abbr
+sn3/props / sn3_appl_abbr
+sn3/props / sn3_appl_appl
+sn3/props / sn3_appl_appls
+sn3/props / sn3_appl_beta
+sn3/props / sn3_appl_bind
+sn3/props / sn3_appl_cast
+sn3/props / sn3_appl_lref
+sn3/props / sn3_appls_abbr
+sn3/props / sn3_appls_beta
+sn3/props / sn3_appls_bind
+sn3/props / sn3_appls_cast
+sn3/props / sn3_appls_lref
+sn3/props / sn3_beta
+sn3/props / sn3_bind
+sn3/props / sn3_cast
+sn3/props / sn3_cdelta
+sn3/props / sn3_cflat
+sn3/props / sn3_change
+sn3/props / sn3_cpr3_trans
+sn3/props / sn3_gen_def
+sn3/props / sn3_lift
+sn3/props / sn3_pr2_intro
+sn3/props / sn3_pr3_trans
+sn3/props / sn3_shift
+sn3/props / sns3_lifts
+s/props / minus_s_s
+s/props / s_arith0
+s/props / s_arith1
+s/props / s_inc
+s/props / s_inj
+s/props / s_le
+s/props / s_lt
+s/props / s_minus
+s/props / s_plus
+s/props / s_plus_sym
+s/props / s_S
+sty0/fwd / sty0_gen_appl
+sty0/fwd / sty0_gen_bind
+sty0/fwd / sty0_gen_cast
+sty0/fwd / sty0_gen_lref
+sty0/fwd / sty0_gen_sort
+sty0/props / sty0_correct
+sty0/props / sty0_lift
+sty1/cnt / sty1_cnt
+sty1/props / sty1_abbr
+sty1/props / sty1_appl
+sty1/props / sty1_bind
+sty1/props / sty1_cast2
+sty1/props / sty1_correct
+sty1/props / sty1_lift
+sty1/props / sty1_trans
+subst0/dec / dnf_dec
+subst0/dec / dnf_dec2
+subst0/fwd / subst0_gen_head
+subst0/fwd / subst0_gen_lift_false
+subst0/fwd / subst0_gen_lift_ge
+subst0/fwd / subst0_gen_lift_lt
+subst0/fwd / subst0_gen_lref
+subst0/fwd / subst0_gen_sort
+subst0/props / subst0_lift_ge
+subst0/props / subst0_lift_ge_s
+subst0/props / subst0_lift_ge_S
+subst0/props / subst0_lift_lt
+subst0/props / subst0_refl
+subst0/subst0 / subst0_confluence_eq
+subst0/subst0 / subst0_confluence_lift
+subst0/subst0 / subst0_confluence_neq
+subst0/subst0 / subst0_subst0
+subst0/subst0 / subst0_subst0_back
+subst0/subst0 / subst0_trans
+subst0/tlt / subst0_tlt
+subst0/tlt / subst0_tlt_head
+subst0/tlt / subst0_weight_le
+subst0/tlt / subst0_weight_lt
+subst1/fwd / subst1_gen_head
+subst1/fwd / subst1_gen_lift_eq
+subst1/fwd / subst1_gen_lift_ge
+subst1/fwd / subst1_gen_lift_lt
+subst1/fwd / subst1_gen_lref
+subst1/fwd / subst1_gen_sort
+subst1/props / subst1_ex
+subst1/props / subst1_head
+subst1/props / subst1_lift_ge
+subst1/props / subst1_lift_lt
+subst1/props / subst1_lift_S
+subst1/subst1 / subst1_confluence_eq
+subst1/subst1 / subst1_confluence_lift
+subst1/subst1 / subst1_confluence_neq
+subst1/subst1 / subst1_subst1
+subst1/subst1 / subst1_subst1_back
+subst1/subst1 / subst1_trans
+subst/fwd / subst_head
+subst/fwd / subst_lref_eq
+subst/fwd / subst_lref_gt
+subst/fwd / subst_lref_lt
+subst/fwd / subst_sort
+subst/props / subst_lift_SO
+subst/props / subst_subst0
+T/dec / abst_dec
+T/dec / bind_dec_not
+T/dec / binder_dec
+T/dec / term_dec
+T/dec terms_props bind_dec
+T/dec terms_props flat_dec
+T/dec terms_props kind_dec
+tlist/props / tcons_tapp_ex
+tlist/props / theads_tapp
+tlist/props / tlist_ind_rev
+tlist/props / tslt_wf_ind
+tlist/props tslt_wf q_ind
+tlt/props / tlt_head_dx
+tlt/props / tlt_head_sx
+tlt/props / tlt_trans
+tlt/props / tlt_wf_ind
+tlt/props tlt_wf q_ind
+tlt/props / wadd_le
+tlt/props / wadd_lt
+tlt/props / wadd_O
+tlt/props / weight_add_O
+tlt/props / weight_add_S
+tlt/props / weight_eq
+tlt/props / weight_le
+T/props / not_abbr_abst
+T/props / not_abbr_void
+T/props / not_abst_void
+T/props / not_void_abst
+T/props / thead_x_y_y
+T/props / tweight_lt
+ty3/arity / ty3_arity
+ty3/arity_props / ty3_acyclic
+ty3/arity_props / ty3_predicative
+ty3/arity_props / ty3_repellent
+ty3/arity_props / ty3_sn3
+ty3/dec / ty3_inference
+ty3/fsubst0 / ty3_csubst0
+ty3/fsubst0 / ty3_fsubst0
+ty3/fsubst0 / ty3_subst0
+ty3/fwd / ty3_gen_appl
+ty3/fwd / ty3_gen_bind
+ty3/fwd / ty3_gen_cast
+ty3/fwd / ty3_gen_lref
+ty3/fwd / ty3_gen_sort
+ty3/fwd / tys3_gen_cons
+ty3/fwd / tys3_gen_nil
+ty3/fwd_nf2 / ty3_gen_appl_nf2
+ty3/fwd_nf2 / ty3_inv_appls_lref_nf2
+ty3/fwd_nf2 / ty3_inv_lref_lref_nf2
+ty3/fwd_nf2 / ty3_inv_lref_nf2
+ty3/fwd_nf2 / ty3_inv_lref_nf2_pc3
+ty3/nf2 ty3_nf2_gen ty3_nf2_inv_abst_aux
+ty3/nf2 / ty3_nf2_inv_abst
+ty3/nf2 / ty3_nf2_inv_abst_premise_csort
+ty3/nf2 / ty3_nf2_inv_all
+ty3/nf2 / ty3_nf2_inv_sort
+ty3/pr3 / ty3_sred_pr0
+ty3/pr3 / ty3_sred_pr1
+ty3/pr3 / ty3_sred_pr2
+ty3/pr3 / ty3_sred_pr3
+ty3/pr3 / ty3_sred_wcpr0_pr0
+ty3/pr3_props / ty3_cred_pr2
+ty3/pr3_props / ty3_cred_pr3
+ty3/pr3_props / ty3_gen_lift
+ty3/pr3_props / ty3_sconv
+ty3/pr3_props / ty3_sconv_pc3
+ty3/pr3_props / ty3_sred_back
+ty3/pr3_props / ty3_tred
+ty3/props / ty3_correct
+ty3/props / ty3_gen_abst_abst
+ty3/props / ty3_getl_subst0
+ty3/props / ty3_lift
+ty3/props / ty3_typecheck
+ty3/props / ty3_unique
+ty3/sty0 / ty3_sty0
+ty3/subst1 / ty3_gen_cabbr
+ty3/subst1 / ty3_gen_cvoid
+wcpr0/fwd / wcpr0_gen_head
+wcpr0/fwd / wcpr0_gen_sort
+wcpr0/getl / wcpr0_drop
+wcpr0/getl / wcpr0_drop_back
+wcpr0/getl / wcpr0_getl
+wcpr0/getl / wcpr0_getl_back
+wf3/clear / clear_wf3_trans
+wf3/clear / wf3_clear_conf
+wf3/fwd / wf3_gen_bind1
+wf3/fwd / wf3_gen_flat1
+wf3/fwd / wf3_gen_head2
+wf3/fwd / wf3_gen_sort1
+wf3/getl / getl_wf3_trans
+wf3/getl / wf3_getl_conf
+wf3/props / ty3_shift1
+wf3/props / wf3_idem
+wf3/props / wf3_mono
+wf3/props / wf3_total
+wf3/props / wf3_ty3
+wf3/ty3 / wf3_pc3_conf
+wf3/ty3 / wf3_pr2_conf
+wf3/ty3 / wf3_pr3_conf
+wf3/ty3 / wf3_ty3_conf
diff --git a/matita/matita/contribs/lambdadelta/basic_2/basic_1.txt b/matita/matita/contribs/lambdadelta/basic_2/basic_1.txt
new file mode 100644 (file)
index 0000000..d64855d
--- /dev/null
@@ -0,0 +1,244 @@
+# waiting ####################################################################
+
+aplus/props aplus_reg_r
+aplus/props aplus_assoc
+aplus/props aplus_asucc
+aplus/props aplus_sort_O_S_simpl
+aplus/props aplus_sort_S_S_simpl
+aplus/props aplus_asort_O_simpl
+aplus/props aplus_asort_le_simpl
+aplus/props aplus_asort_simpl
+aplus/props aplus_ahead_simpl
+aplus/props aplus_asucc_false
+aplus/props aplus_inj
+aprem/fwd aprem_gen_sort
+aprem/fwd aprem_gen_head_O
+aprem/fwd aprem_gen_head_S
+aprem/props aprem_repl
+aprem/props aprem_asucc
+arity/aprem arity_aprem
+arity/cimp arity_cimp_conf
+arity/fwd arity_gen_sort
+arity/fwd arity_gen_lref
+arity/fwd arity_gen_bind
+arity/fwd arity_gen_abst
+arity/fwd arity_gen_appl
+arity/fwd arity_gen_cast
+arity/fwd arity_gen_appls
+arity/fwd arity_gen_lift
+arity/lift1 arity_lift1
+arity/pr3 arity_sred_wcpr0_pr0
+arity/pr3 arity_sred_wcpr0_pr1
+arity/pr3 arity_sred_pr2
+arity/pr3 arity_sred_pr3
+arity/props node_inh
+arity/props arity_lift
+arity/props arity_mono
+arity/props arity_repellent
+arity/props arity_appls_cast
+arity/props arity_appls_abbr
+arity/props arity_appls_bind
+arity/subst0 arity_gen_cvoid_subst0
+arity/subst0 arity_gen_cvoid
+arity/subst0 arity_fsubst0
+arity/subst0 arity_subst0
+asucc/fwd asucc_gen_sort
+asucc/fwd asucc_gen_head
+cnt/props cnt_lift
+C/props clt_wf__q_ind
+C/props clt_wf_ind
+
+csuba/arity csuba_arity
+csuba/arity csuba_arity_rev
+csuba/arity arity_appls_appl
+csuba/clear csuba_clear_conf
+csuba/clear csuba_clear_trans
+csuba/drop csuba_drop_abbr
+csuba/drop csuba_drop_abst
+csuba/drop csuba_drop_abst_rev
+csuba/drop csuba_drop_abbr_rev
+csuba/fwd csuba_gen_abbr
+csuba/fwd csuba_gen_void
+csuba/fwd csuba_gen_abst
+csuba/fwd csuba_gen_flat
+csuba/fwd csuba_gen_bind
+csuba/fwd csuba_gen_abst_rev
+csuba/fwd csuba_gen_void_rev
+csuba/fwd csuba_gen_abbr_rev
+csuba/fwd csuba_gen_flat_rev
+csuba/fwd csuba_gen_bind_rev
+csuba/getl csuba_getl_abbr
+csuba/getl csuba_getl_abst
+csuba/getl csuba_getl_abst_rev
+csuba/getl csuba_getl_abbr_rev
+csuba/props csuba_refl
+
+csubc/arity csubc_arity_conf
+csubc/arity csubc_arity_trans
+csubc/drop1 drop1_csubc_trans
+csubc/drop drop_csubc_trans
+
+csubt/csuba csubt_csuba
+csubt/fwd csubt_gen_abbr
+csubt/fwd csubt_gen_abst
+
+csubv/clear csubv_clear_conf
+csubv/clear csubv_clear_conf_void
+csubv/drop csubv_drop_conf
+csubv/getl csubv_getl_conf
+csubv/getl csubv_getl_conf_void
+csubv/props csubv_bind_same
+csubv/props csubv_refl
+drop1/props drop1_cons_tail
+ex0/props aplus_gz_le
+ex0/props aplus_gz_ge
+ex0/props next_plus_gz
+ex0/props leqz_leq
+ex0/props leq_leqz
+ex1/props ex1__leq_sort_SS
+ex1/props ex1_arity
+ex1/props ex1_ty3
+ex2/props ex2_nf2
+ex2/props ex2_arity
+leq/asucc asucc_repl
+leq/asucc asucc_inj
+leq/asucc leq_asucc
+leq/asucc leq_ahead_asucc_false
+leq/asucc leq_asucc_false
+leq/fwd leq_gen_sort1
+leq/fwd leq_gen_head1
+leq/fwd leq_gen_sort2
+leq/fwd leq_gen_head2
+leq/props ahead_inj_snd
+leq/props leq_refl
+leq/props leq_eq
+leq/props leq_sym
+leq/props leq_trans
+leq/props leq_ahead_false_1
+leq/props leq_ahead_false_2
+lift1/fwd lift1_cons_tail
+lift1/fwd lifts1_nil
+lift1/fwd lifts1_cons
+lift/props thead_x_lift_y_y
+lift/props lifts_tapp
+lift/props lifts_inj
+llt/props lweight_repl
+llt/props llt_repl
+llt/props llt_trans
+llt/props llt_head_sx
+llt/props llt_head_dx
+llt/props llt_wf__q_ind
+llt/props llt_wf_ind
+next_plus/props next_plus_assoc
+next_plus/props next_plus_next
+next_plus/props next_plus_lt
+nf2/arity arity_nf2_inv_all
+nf2/fwd nf2_gen_lref
+nf2/fwd nf2_gen_abst
+nf2/fwd nf2_gen_cast
+nf2/fwd nf2_gen_beta
+nf2/fwd nf2_gen_flat
+nf2/fwd nf2_gen__nf2_gen_aux
+nf2/fwd nf2_gen_abbr
+nf2/fwd nf2_gen_void
+nf2/props nfs2_tapp
+nf2/props nf2_appls_lref
+pc1/props pc1_pr0_r
+pc1/props pc1_pr0_x
+pc1/props pc1_refl
+pc1/props pc1_pr0_u
+pc1/props pc1_s
+pc1/props pc1_head_1
+pc1/props pc1_head_2
+pc1/props pc1_t
+pc1/props pc1_pr0_u2
+pc1/props pc1_head
+
+pc3/dec pc3_dec
+pc3/dec pc3_abst_dec
+pc3/fwd pc3_gen_not_abst
+pc3/fwd pc3_gen_lift_abst
+pc3/nf2 pc3_nf2
+pc3/nf2 pc3_nf2_unfold
+pc3/pc1 pc3_pc1
+pc3/props pc3_pr2_pr2_t
+pc3/props pc3_pr2_pr3_t
+pc3/props pc3_pr3_pc3_t
+pc3/props pc3_eta
+
+pr0/fwd pr0_gen_void
+pr0/dec nf0_dec
+
+pr1/props pr1_eta
+
+pr2/fwd pr2_gen_void
+pr3/fwd pr3_gen_void
+pr3/props pr3_eta
+sn3/props sns3_lifts
+sty1/cnt sty1_cnt
+subst/fwd subst_sort
+subst/fwd subst_lref_lt
+subst/fwd subst_lref_eq
+subst/fwd subst_lref_gt
+subst/fwd subst_head
+subst/props subst_lift_SO
+subst/props subst_subst0
+T/dec binder_dec
+T/dec abst_dec
+tlist/props tslt_wf__q_ind
+tlist/props tslt_wf_ind
+tlist/props theads_tapp
+tlist/props tcons_tapp_ex
+tlist/props tlist_ind_rev
+ty3/arity ty3_arity
+ty3/arity_props ty3_predicative
+ty3/arity_props ty3_repellent
+ty3/arity_props ty3_acyclic
+ty3/dec ty3_inference
+ty3/fwd tys3_gen_nil
+ty3/fwd tys3_gen_cons
+ty3/fwd_nf2 ty3_gen_appl_nf2
+ty3/fwd_nf2 ty3_inv_lref_nf2_pc3
+ty3/fwd_nf2 ty3_inv_lref_nf2
+ty3/fwd_nf2 ty3_inv_appls_lref_nf2
+ty3/fwd_nf2 ty3_inv_lref_lref_nf2
+ty3/nf2 ty3_nf2_inv_abst_premise_csort
+ty3/nf2 ty3_nf2_inv_all
+ty3/nf2 ty3_nf2_inv_sort
+ty3/nf2 ty3_nf2_gen__ty3_nf2_inv_abst_aux
+ty3/nf2 ty3_nf2_inv_abst
+ty3/pr3 ty3_sred_wcpr0_pr0
+ty3/pr3 ty3_sred_pr0
+ty3/pr3 ty3_sred_pr1
+ty3/pr3 ty3_sred_pr2
+ty3/pr3 ty3_sred_pr3
+ty3/pr3_props ty3_cred_pr2
+ty3/pr3_props ty3_cred_pr3
+ty3/pr3_props ty3_gen_lift
+ty3/pr3_props ty3_tred
+ty3/pr3_props ty3_sconv_pc3
+ty3/pr3_props ty3_sred_back
+ty3/pr3_props ty3_sconv
+ty3/props ty3_gen_abst_abst
+ty3/sty0 ty3_sty0
+ty3/subst1 ty3_gen_cvoid
+
+wf3/clear wf3_clear_conf
+wf3/clear clear_wf3_trans
+wf3/fwd wf3_gen_sort1
+wf3/fwd wf3_gen_bind1
+wf3/fwd wf3_gen_flat1
+wf3/fwd wf3_gen_head2
+wf3/getl wf3_getl_conf
+wf3/getl getl_wf3_trans
+wf3/props wf3_mono
+wf3/props wf3_total
+wf3/props ty3_shift1
+wf3/props wf3_idem
+wf3/props wf3_ty3
+wf3/ty3 wf3_pr2_conf
+wf3/ty3 wf3_pr3_conf
+wf3/ty3 wf3_pc3_conf
+wf3/ty3 wf3_ty3_conf
+
+# check ######################################################################
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/acp.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/acp.ma
new file mode 100644 (file)
index 0000000..dc046b0
--- /dev/null
@@ -0,0 +1,55 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/ldrops.ma".
+
+(* ABSTRACT COMPUTATION PROPERTIES ******************************************)
+
+definition CP1 ≝ λRR:lenv→relation term. λRS:relation term.
+                 ∀L,k. NF … (RR L) RS (⋆k).
+
+definition CP2 ≝ λRR:lenv→relation term. λRS:relation term.
+                 ∀L,K,W,i. ⇩[0,i] L ≡ K. ⓛW → NF … (RR L) RS (#i).
+
+definition CP3 ≝ λRR:lenv→relation term. λRP:lenv→predicate term.
+                 ∀L,V,k. RP L (ⓐ⋆k.V) → RP L V.
+
+definition CP4 ≝ λRR:lenv→relation term. λRS:relation term.
+                 ∀L0,L,T,T0,d,e. NF … (RR L) RS T → 
+                 ⇩[d, e] L0 ≡ L → ⇧[d, e] T ≡ T0 → NF … (RR L0) RS T0.
+
+definition CP4s ≝ λRR:lenv→relation term. λRS:relation term.
+                  ∀L0,L,des. ⇩*[des] L0 ≡ L →
+                  ∀T,T0. ⇧*[des] T ≡ T0 →
+                  NF … (RR L) RS T → NF … (RR L0) RS T0.
+
+(* requirements for abstract computation properties *)
+record acp (RR:lenv->relation term) (RS:relation term) (RP:lenv→predicate term) : Prop ≝
+{ cp1: CP1 RR RS;
+  cp2: CP2 RR RS;
+  cp3: CP3 RR RP;
+  cp4: CP4 RR RS
+}.
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was: nf2_lift1 *)
+lemma acp_lifts: ∀RR,RS. CP4 RR RS → CP4s RR RS.
+#RR #RS #HRR #L1 #L2 #des #H elim H -L1 -L2 -des
+[ #L #T1 #T2 #H #HT1
+  <(lifts_inv_nil … H) -H //
+| #L1 #L #L2 #des #d #e #_ #HL2 #IHL #T2 #T1 #H #HLT2
+  elim (lifts_inv_cons … H) -H /3 width=9/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/acp_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/acp_aaa.ma
new file mode 100644 (file)
index 0000000..f4da113
--- /dev/null
@@ -0,0 +1,101 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/lifts_lifts.ma".
+include "basic_2/unfold/ldrops_ldrops.ma".
+include "basic_2/static/aaa_lifts.ma".
+include "basic_2/static/aaa_aaa.ma".
+include "basic_2/computation/lsubc_ldrops.ma".
+
+(* ABSTRACT COMPUTATION PROPERTIES ******************************************)
+
+(* Main propertis ***********************************************************)
+
+(* Basic_1: was: sc3_arity_csubc *)
+theorem aacr_aaa_csubc_lifts: ∀RR,RS,RP.
+                              acp RR RS RP → acr RR RS RP (λL,T. RP L T) →
+                              ∀L1,T,A. L1 ⊢ T ⁝ A → ∀L0,des. ⇩*[des] L0 ≡ L1 →
+                              ∀T0. ⇧*[des] T ≡ T0 → ∀L2. L2 ⊑[RP] L0 →
+                              ⦃L2, T0⦄ ϵ[RP] 〚A〛.
+#RR #RS #RP #H1RP #H2RP #L1 #T #A #H elim H -L1 -T -A
+[ #L #k #L0 #des #HL0 #X #H #L2 #HL20
+  >(lifts_inv_sort1 … H) -H
+  lapply (aacr_acr … H1RP H2RP ⓪) #HAtom
+  @(s2 … HAtom … ◊) // /2 width=2/
+| #I #L1 #K1 #V1 #B #i #HLK1 #HKV1B #IHB #L0 #des #HL01 #X #H #L2 #HL20
+  lapply (aacr_acr … H1RP H2RP B) #HB
+  elim (lifts_inv_lref1 … H) -H #i1 #Hi1 #H destruct
+  lapply (ldrop_fwd_ldrop2 … HLK1) #HK1b
+  elim (ldrops_ldrop_trans … HL01 … HLK1) #X #des1 #i0 #HL0 #H #Hi0 #Hdes1
+  >(at_mono … Hi1 … Hi0) -i1
+  elim (ldrops_inv_skip2 … Hdes1 … H) -des1 #K0 #V0 #des0 #Hdes0 #HK01 #HV10 #H destruct
+  elim (lsubc_ldrop_O1_trans … HL20 … HL0) -HL0 #X #HLK2 #H
+  elim (lsubc_inv_pair2 … H) -H *
+  [ #K2 #HK20 #H destruct
+    generalize in match HLK2; generalize in match I; -HLK2 -I * #HLK2
+    [ elim (lift_total V0 0 (i0 +1)) #V #HV0
+      elim (lifts_lift_trans  … Hi0 … Hdes0 … HV10 … HV0) -HV10 #V2 #HV12 #HV2
+      @(s4 … HB … ◊ … HV0 HLK2) /3 width=7/ (* uses IHB HL20 V2 HV0 *)
+    | @(s2 … HB … ◊) // /2 width=3/
+    ]
+  | -HLK1 -IHB -HL01 -HL20 -HK1b -Hi0 -Hdes0
+    #K2 #V2 #A2 #HKV2A #HKV0A #_ #H1 #H2 destruct
+    lapply (ldrop_fwd_ldrop2 … HLK2) #HLK2b
+    lapply (aaa_lifts … HK01 … HV10 HKV1B) -HKV1B -HK01 -HV10 #HKV0B
+    >(aaa_mono … HKV0A … HKV0B) in HKV2A; -HKV0A -HKV0B #HKV2B
+    elim (lift_total V2 0 (i0 +1)) #V #HV2
+    @(s4 … HB … ◊ … HV2 HLK2)
+    @(s7 … HB … HKV2B) //
+  ]
+| #a #L #V #T #B #A #_ #_ #IHB #IHA #L0 #des #HL0 #X #H #L2 #HL20
+  elim (lifts_inv_bind1 … H) -H #V0 #T0 #HV0 #HT0 #H destruct
+  lapply (aacr_acr … H1RP H2RP A) #HA
+  lapply (aacr_acr … H1RP H2RP B) #HB
+  lapply (s1 … HB) -HB #HB
+  @(s5 … HA … ◊ ◊) // /3 width=5/
+| #a #L #W #T #B #A #HLWB #_ #IHB #IHA #L0 #des #HL0 #X #H #L2 #HL02
+  elim (lifts_inv_bind1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct
+  @(aacr_abst  … H1RP H2RP)
+  [ lapply (aacr_acr … H1RP H2RP B) #HB
+    @(s1 … HB) /2 width=5/
+  | -IHB
+    #L3 #V3 #T3 #des3 #HL32 #HT03 #HB
+    elim (lifts_total des3 W0) #W2 #HW02
+    elim (ldrops_lsubc_trans … H1RP H2RP … HL32 … HL02) -L2 #L2 #HL32 #HL20
+    lapply (aaa_lifts … L2 W2 … (des @@ des3) … HLWB) -HLWB /2 width=3/ #HLW2B
+    @(IHA (L2. ⓛW2) … (des + 1 @@ des3 + 1)) -IHA
+    /2 width=3/ /3 width=5/
+  ]
+| #L #V #T #B #A #_ #_ #IHB #IHA #L0 #des #HL0 #X #H #L2 #HL20
+  elim (lifts_inv_flat1 … H) -H #V0 #T0 #HV0 #HT0 #H destruct
+  /3 width=10/
+| #L #V #T #A #_ #_ #IH1A #IH2A #L0 #des #HL0 #X #H #L2 #HL20
+  elim (lifts_inv_flat1 … H) -H #V0 #T0 #HV0 #HT0 #H destruct
+  lapply (aacr_acr … H1RP H2RP A) #HA
+  lapply (s1 … HA) #H
+  @(s6 … HA … ◊) /2 width=5/ /3 width=5/
+]
+qed.
+
+(* Basic_1: was: sc3_arity *)
+lemma aacr_aaa: ∀RR,RS,RP. acp RR RS RP → acr RR RS RP (λL,T. RP L T) →
+                ∀L,T,A. L ⊢ T ⁝ A → ⦃L, T⦄ ϵ[RP] 〚A〛.
+/2 width=8/ qed.
+
+lemma acp_aaa: ∀RR,RS,RP. acp RR RS RP → acr RR RS RP (λL,T. RP L T) →
+               ∀L,T,A. L ⊢ T ⁝ A → RP L T.
+#RR #RS #RP #H1RP #H2RP #L #T #A #HT
+lapply (aacr_acr … H1RP H2RP A) #HA
+@(s1 … HA) /2 width=4/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/acp_cr.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/acp_cr.ma
new file mode 100644 (file)
index 0000000..b0b15e6
--- /dev/null
@@ -0,0 +1,174 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/aarity.ma".
+include "basic_2/unfold/gr2_gr2.ma".
+include "basic_2/unfold/lifts_lift_vector.ma".
+include "basic_2/unfold/ldrops_ldrop.ma".
+include "basic_2/computation/acp.ma".
+
+(* ABSTRACT COMPUTATION PROPERTIES ******************************************)
+
+(* Note: this is Girard's CR1 *)
+definition S1 ≝ λRP,C:lenv→predicate term.
+                ∀L,T. C L T → RP L T.
+
+(* Note: this is Tait's iii, or Girard's CR4 *)
+definition S2 ≝ λRR:lenv→relation term. λRS:relation term. λRP,C:lenv→predicate term.
+                ∀L,Vs. all … (RP L) Vs →
+                ∀T. 𝐒⦃T⦄ → NF … (RR L) RS T → C L (ⒶVs.T).
+
+(* Note: this is Tait's ii *)
+definition S3 ≝ λRP,C:lenv→predicate term.
+                ∀a,L,Vs,V,T,W. C L (ⒶVs. ⓓ{a}V. T) → RP L W → C L (ⒶVs. ⓐV. ⓛ{a}W. T).
+
+definition S4 ≝ λRP,C:lenv→predicate term. ∀L,K,Vs,V1,V2,i.
+                C L (ⒶVs. V2) → ⇧[0, i + 1] V1 ≡ V2 →
+                ⇩[0, i] L ≡ K. ⓓV1 → C L (Ⓐ Vs. #i).
+
+definition S5 ≝ λRP,C:lenv→predicate term.
+                ∀L,V1s,V2s. ⇧[0, 1] V1s ≡ V2s →
+                ∀a,V,T. C (L. ⓓV) (ⒶV2s. T) → RP L V → C L (ⒶV1s. ⓓ{a}V. T).
+
+definition S6 ≝ λRP,C:lenv→predicate term.
+                ∀L,Vs,T,W. C L (ⒶVs. T) → RP L W → C L (ⒶVs. ⓝW. T).
+
+definition S7 ≝ λC:lenv→predicate term. ∀L2,L1,T1,d,e.
+                C L1 T1 → ∀T2. ⇩[d, e] L2 ≡ L1 → ⇧[d, e] T1 ≡ T2 → C L2 T2.
+
+definition S7s ≝ λC:lenv→predicate term.
+                 ∀L1,L2,des. ⇩*[des] L2 ≡ L1 →
+                 ∀T1,T2. ⇧*[des] T1 ≡ T2 → C L1 T1 → C L2 T2.
+
+(* properties of the abstract candidate of reducibility *)
+record acr (RR:lenv->relation term) (RS:relation term) (RP,C:lenv→predicate term) : Prop ≝
+{ s1: S1 RP C;
+  s2: S2 RR RS RP C;
+  s3: S3 RP C;
+  s4: S4 RP C;
+  s5: S5 RP C;
+  s6: S6 RP C;
+  s7: S7 C
+}.
+
+(* the abstract candidate of reducibility associated to an atomic arity *)
+let rec aacr (RP:lenv→predicate term) (A:aarity) (L:lenv) on A: predicate term ≝
+λT. match A with
+[ AAtom     ⇒ RP L T
+| APair B A ⇒ ∀L0,V0,T0,des. aacr RP B L0 V0 → ⇩*[des] L0 ≡ L → ⇧*[des] T ≡ T0 →
+              aacr RP A L0 (ⓐV0. T0)
+].
+
+interpretation
+   "candidate of reducibility of an atomic arity (abstract)"
+   'InEInt RP L T A = (aacr RP A L T).
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was: sc3_lift1 *)
+lemma acr_lifts: ∀C. S7 C → S7s C.
+#C #HC #L1 #L2 #des #H elim H -L1 -L2 -des
+[ #L #T1 #T2 #H #HT1
+  <(lifts_inv_nil … H) -H //
+| #L1 #L #L2 #des #d #e #_ #HL2 #IHL #T2 #T1 #H #HLT2
+  elim (lifts_inv_cons … H) -H /3 width=9/
+]
+qed.
+
+lemma rp_lifts: ∀RR,RS,RP. acr RR RS RP (λL,T. RP L T) →
+                ∀des,L0,L,V,V0. ⇩*[des] L0 ≡ L → ⇧*[des] V ≡ V0 →
+                RP L V → RP L0 V0.
+#RR #RS #RP #HRP #des #L0 #L #V #V0 #HL0 #HV0 #HV 
+@acr_lifts /width=6/
+@(s7 … HRP)
+qed.
+
+(* Basic_1: was only: sns3_lifts1 *)
+lemma rp_liftsv_all: ∀RR,RS,RP. acr RR RS RP (λL,T. RP L T) →
+                     ∀des,L0,L,Vs,V0s. ⇧*[des] Vs ≡ V0s → ⇩*[des] L0 ≡ L →
+                     all … (RP L) Vs → all … (RP L0) V0s.
+#RR #RS #RP #HRP #des #L0 #L #Vs #V0s #H elim H -Vs -V0s normalize //
+#T1s #T2s #T1 #T2 #HT12 #_ #IHT2s #HL0 * #HT1 #HT1s
+@conj /2 width=1/ /2 width=6 by rp_lifts/
+qed.
+
+(* Basic_1: was: 
+   sc3_sn3 sc3_abst sc3_appl sc3_abbr sc3_bind sc3_cast sc3_lift
+*) 
+lemma aacr_acr: ∀RR,RS,RP. acp RR RS RP → acr RR RS RP (λL,T. RP L T) →
+                ∀A. acr RR RS RP (aacr RP A).
+#RR #RS #RP #H1RP #H2RP #A elim A -A normalize //
+#B #A #IHB #IHA @mk_acr normalize
+[ #L #T #H
+  lapply (H ? (⋆0) ? ⟠ ? ? ?) -H
+  [1,3: // |2,4: skip
+  | @(s2 … IHB … ◊) // /2 width=2/
+  | #H @(cp3 … H1RP … 0) @(s1 … IHA) //
+  ]
+| #L #Vs #HVs #T #H1T #H2T #L0 #V0 #X #des #HB #HL0 #H
+  elim (lifts_inv_applv1 … H) -H #V0s #T0 #HV0s #HT0 #H destruct
+  lapply (s1 … IHB … HB) #HV0
+  @(s2 … IHA … (V0 @ V0s)) /2 width=4 by lifts_simple_dx/ /3 width=6/
+| #a #L #Vs #U #T #W #HA #HW #L0 #V0 #X #des #HB #HL0 #H
+  elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct
+  elim (lifts_inv_flat1 … HY) -HY #U0 #X #HU0 #HX #H destruct
+  elim (lifts_inv_bind1 … HX) -HX #W0 #T0 #HW0 #HT0 #H destruct
+  @(s3 … IHA … (V0 @ V0s)) /2 width=6 by rp_lifts/ /4 width=5/
+| #L #K #Vs #V1 #V2 #i #HA #HV12 #HLK #L0 #V0 #X #des #HB #HL0 #H
+  elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct
+  elim (lifts_inv_lref1 … HY) -HY #i0 #Hi0 #H destruct
+  elim (ldrops_ldrop_trans … HL0 … HLK) #X #des0 #i1 #HL02 #H #Hi1 #Hdes0
+  >(at_mono … Hi1 … Hi0) in HL02; -i1 #HL02
+  elim (ldrops_inv_skip2 … Hdes0 … H) -H -des0 #L2 #W1 #des0 #Hdes0 #HLK #HVW1 #H destruct
+  elim (lift_total W1 0 (i0 + 1)) #W2 #HW12
+  elim (lifts_lift_trans  … Hdes0 … HVW1 … HW12) // -Hdes0 -Hi0 #V3 #HV13 #HVW2
+  >(lift_mono … HV13 … HV12) in HVW2; -V3 #HVW2
+  @(s4 … IHA … (V0 @ V0s) … HW12 HL02) /3 width=4/
+| #L #V1s #V2s #HV12s #a #V #T #HA #HV #L0 #V10 #X #des #HB #HL0 #H
+  elim (lifts_inv_applv1 … H) -H #V10s #Y #HV10s #HY #H destruct
+  elim (lifts_inv_bind1 … HY) -HY #V0 #T0 #HV0 #HT0 #H destruct
+  elim (lift_total V10 0 1) #V20 #HV120
+  elim (liftv_total 0 1 V10s) #V20s #HV120s
+  @(s5 … IHA … (V10 @ V10s) (V20 @ V20s)) /2 width=1/ /2 width=6 by rp_lifts/
+  @(HA … (des + 1)) /2 width=1/
+  [ @(s7 … IHB … HB … HV120) /2 width=1/
+  | @lifts_applv //
+    elim (liftsv_liftv_trans_le … HV10s … HV120s) -V10s #V10s #HV10s #HV120s
+    >(liftv_mono … HV12s … HV10s) -V1s //
+  ]
+| #L #Vs #T #W #HA #HW #L0 #V0 #X #des #HB #HL0 #H
+  elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct
+  elim (lifts_inv_flat1 … HY) -HY #W0 #T0 #HW0 #HT0 #H destruct
+  @(s6 … IHA … (V0 @ V0s)) /2 width=6 by rp_lifts/ /3 width=4/
+| /3 width=7/
+]
+qed.
+
+lemma aacr_abst: ∀RR,RS,RP. acp RR RS RP → acr RR RS RP (λL,T. RP L T) →
+                 ∀a,L,W,T,A,B. RP L W → (
+                    ∀L0,V0,T0,des. ⇩*[des] L0 ≡ L → ⇧*[des + 1] T ≡ T0 →
+                                   ⦃L0, V0⦄ ϵ[RP] 〚B〛 → ⦃L0. ⓓV0, T0⦄ ϵ[RP] 〚A〛
+                 ) →
+                 ⦃L, ⓛ{a}W. T⦄ ϵ[RP] 〚②B. A〛.
+#RR #RS #RP #H1RP #H2RP #a #L #W #T #A #B #HW #HA #L0 #V0 #X #des #HB #HL0 #H
+lapply (aacr_acr … H1RP H2RP A) #HCA
+lapply (aacr_acr … H1RP H2RP B) #HCB
+elim (lifts_inv_bind1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct
+lapply (s1 … HCB) -HCB #HCB
+@(s3 … HCA … ◊) /2 width=6 by rp_lifts/
+@(s5 … HCA … ◊ ◊) // /2 width=1/ /2 width=3/
+qed.
+
+(* Basic_1: removed theorems 2: sc3_arity_gen sc3_repl *)
+(* Basic_1: removed local theorems 1: sc3_sn3_abst *)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cpe.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cpe.ma
new file mode 100644 (file)
index 0000000..285e6e4
--- /dev/null
@@ -0,0 +1,35 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/cprs.ma".
+include "basic_2/computation/csn.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL EVALUATION ON TERMS **************************)
+
+definition cpe: lenv → relation term ≝
+                λL,T1,T2. L ⊢ T1 ➡* T2 ∧ L ⊢ 𝐍⦃T2⦄.
+
+interpretation "context-sensitive parallel evaluation (term)"
+   'PEval L T1 T2 = (cpe L T1 T2).
+
+(* Basic_properties *********************************************************)
+
+(* Basic_1: was: nf2_sn3 *)
+lemma cpe_csn: ∀L,T1. L ⊢ ⬊* T1 → ∃T2. L ⊢ T1 ➡* 𝐍⦃T2⦄.
+#L #T1 #H @(csn_ind … H) -T1
+#T1 #_ #IHT1
+elim (cnf_dec L T1) /3 width=3/
+* #T #H1T1 #H2T1
+elim (IHT1 … H1T1 H2T1) -IHT1 -H2T1 #T2 * /4 width=3/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cpe_cpe.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cpe_cpe.ma
new file mode 100644 (file)
index 0000000..ec77078
--- /dev/null
@@ -0,0 +1,28 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/cprs_cprs.ma".
+include "basic_2/computation/cpe.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL EVALUATION ON TERMS **************************)
+
+(* Main properties *********************************************************)
+
+(* Basic_1: was: nf2_pr3_confluence *)
+theorem cpe_mono: ∀L,T,T1. L ⊢ T ➡* 𝐍⦃T1⦄ → ∀T2. L ⊢ T ➡* 𝐍⦃T2⦄ → T1 = T2.
+#L #T #T1 * #H1T1 #H2T1 #T2 * #H1T2 #H2T2
+elim (cprs_conf … H1T1 … H1T2) -T #T #HT1
+>(cprs_inv_cnf1 … HT1 H2T1) -T1 #HT2
+>(cprs_inv_cnf1 … HT2 H2T2) -T2 //
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs.ma
new file mode 100644 (file)
index 0000000..ae0c1ae
--- /dev/null
@@ -0,0 +1,110 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/cnf.ma".
+include "basic_2/computation/tprs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
+
+(* Basic_1: includes: pr3_pr2 *)
+definition cprs: lenv → relation term ≝
+                 λL. TC … (cpr L).
+
+interpretation "context-sensitive parallel computation (term)"
+   'PRedStar L T1 T2 = (cprs L T1 T2).
+
+(* Basic eliminators ********************************************************)
+
+lemma cprs_ind: ∀L,T1. ∀R:predicate term. R T1 →
+                (∀T,T2. L ⊢ T1 ➡* T → L ⊢ T ➡ T2 → R T → R T2) →
+                ∀T2. L ⊢ T1 ➡* T2 → R T2.
+#L #T1 #R #HT1 #IHT1 #T2 #HT12
+@(TC_star_ind … HT1 IHT1 … HT12) //
+qed-.
+
+lemma cprs_ind_dx: ∀L,T2. ∀R:predicate term. R T2 →
+                   (∀T1,T. L ⊢ T1 ➡ T → L ⊢ T ➡* T2 → R T → R T1) →
+                   ∀T1. L ⊢ T1 ➡* T2 → R T1.
+#L #T2 #R #HT2 #IHT2 #T1 #HT12
+@(TC_star_ind_dx … HT2 IHT2 … HT12) //
+qed-.
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was: pr3_refl *)
+lemma cprs_refl: ∀L,T. L ⊢ T ➡* T.
+/2 width=1/ qed.
+
+lemma cprs_strap1: ∀L,T1,T,T2.
+                   L ⊢ T1 ➡* T → L ⊢ T ➡ T2 → L ⊢ T1 ➡* T2.
+/2 width=3/ qed.
+
+(* Basic_1: was: pr3_step *)
+lemma cprs_strap2: ∀L,T1,T,T2.
+                   L ⊢ T1 ➡ T → L ⊢ T ➡* T2 → L ⊢ T1 ➡* T2.
+/2 width=3/ qed.
+
+(* Note: it does not hold replacing |L1| with |L2| *)
+lemma cprs_lsubs_trans: ∀L1,T1,T2. L1 ⊢ T1 ➡* T2 →
+                        ∀L2. L2 ≼ [0, |L1|] L1 → L2 ⊢ T1 ➡* T2.
+/3 width=3/
+qed.
+
+(* Basic_1: was only: pr3_thin_dx *)
+lemma cprs_flat_dx: ∀I,L,V1,V2. L ⊢ V1 ➡ V2 → ∀T1,T2. L ⊢ T1 ➡* T2 →
+                    L ⊢ ⓕ{I} V1. T1 ➡* ⓕ{I} V2. T2.
+#I #L #V1 #V2 #HV12 #T1 #T2 #HT12 @(cprs_ind … HT12) -T2 /3 width=1/
+#T #T2 #_ #HT2 #IHT2
+@(cprs_strap1 … IHT2) -IHT2 /2 width=1/
+qed.
+
+(* Basic_1: was: pr3_pr1 *)
+lemma tprs_cprs: ∀T1,T2. T1 ➡* T2 → ∀L. L ⊢ T1 ➡* T2.
+#T1 #T2 #H @(tprs_ind … H) -T2 /2 width=1/ /3 width=3/
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+(* Basic_1: was: pr3_gen_sort *)
+lemma cprs_inv_sort1: ∀L,U2,k. L ⊢ ⋆k ➡* U2 → U2 = ⋆k.
+#L #U2 #k #H @(cprs_ind … H) -U2 //
+#U2 #U #_ #HU2 #IHU2 destruct
+>(cpr_inv_sort1 … HU2) -HU2 //
+qed-.
+
+(* Basic_1: was: pr3_gen_cast *)
+lemma cprs_inv_cast1: ∀L,W1,T1,U2. L ⊢ ⓝW1.T1 ➡* U2 → L ⊢ T1 ➡* U2 ∨
+                      ∃∃W2,T2. L ⊢ W1 ➡* W2 & L ⊢ T1 ➡* T2 & U2 = ⓝW2.T2.
+#L #W1 #T1 #U2 #H @(cprs_ind … H) -U2 /3 width=5/
+#U2 #U #_ #HU2 * /3 width=3/ *
+#W #T #HW1 #HT1 #H destruct
+elim (cpr_inv_cast1 … HU2) -HU2 /3 width=3/ *
+#W2 #T2 #HW2 #HT2 #H destruct /4 width=5/
+qed-.
+
+(* Basic_1: was: nf2_pr3_unfold *)
+lemma cprs_inv_cnf1: ∀L,T,U. L ⊢ T ➡* U → L ⊢ 𝐍⦃T⦄ → T = U.
+#L #T #U #H @(cprs_ind_dx … H) -T //
+#T0 #T #H1T0 #_ #IHT #H2T0
+lapply (H2T0 … H1T0) -H1T0 #H destruct /2 width=1/
+qed-.
+
+lemma tprs_inv_cnf1: ∀T,U. T ➡* U → ⋆ ⊢ 𝐍⦃T⦄ → T = U.
+/3 width=3 by tprs_cprs, cprs_inv_cnf1/ qed-.
+
+(* Basic_1: removed theorems 10:
+   clear_pr3_trans pr3_cflat pr3_gen_bind
+   pr3_head_1 pr3_head_2 pr3_head_21 pr3_head_12
+   pr3_iso_appl_bind pr3_iso_appls_appl_bind pr3_iso_appls_bind
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_aaa.ma
new file mode 100644 (file)
index 0000000..e04e3c7
--- /dev/null
@@ -0,0 +1,25 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/cpr_aaa.ma".
+include "basic_2/computation/cprs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
+
+(* Properties about atomic arity assignment on terms ************************)
+
+lemma aaa_cprs_conf: ∀L,T1,A. L ⊢ T1 ⁝ A → ∀T2. L ⊢ T1 ➡* T2 → L ⊢ T2 ⁝ A.
+#L #T1 #A #HT1 #T2 #HT12
+@(TC_Conf3 … HT1 ? HT12) /2 width=3/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_cprs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_cprs.ma
new file mode 100644 (file)
index 0000000..8f94b0f
--- /dev/null
@@ -0,0 +1,150 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/cpr_lift.ma".
+include "basic_2/reducibility/cpr_cpr.ma".
+include "basic_2/reducibility/lfpr_cpr.ma".
+include "basic_2/computation/cprs_lfpr.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
+
+(* Advanced properties ******************************************************)
+
+lemma cprs_abst_dx: ∀L,V1,V2. L ⊢ V1 ➡ V2 → ∀V,T1,T2.
+                    L.ⓛV ⊢ T1 ➡* T2 → ∀a. L ⊢ ⓛ{a}V1. T1 ➡* ⓛ{a}V2. T2.
+#L #V1 #V2 #HV12 #V #T1 #T2 #HT12 #a @(cprs_ind … HT12) -T2
+[ /3 width=2/
+| /3 width=6 by cprs_strap1, cpr_abst/ (**) (* /3 width=6/ is too slow *)
+]
+qed.
+
+lemma cprs_abbr1_dx: ∀L,V1,V2. L ⊢ V1 ➡ V2 → ∀T1,T2. L. ⓓV1 ⊢ T1 ➡* T2 →
+                     ∀a. L ⊢ ⓓ{a}V1. T1 ➡* ⓓ{a}V2. T2.
+#L #V1 #V2 #HV12 #T1 #T2 #HT12 #a @(cprs_ind_dx … HT12) -T1
+[ /3 width=5/
+| #T1 #T #HT1 #_ #IHT1
+  @(cprs_strap2 … IHT1) -IHT1 /2 width=1/
+]
+qed.
+
+lemma cpr_abbr1: ∀L,V1,V2. L ⊢ V1 ➡ V2 → ∀T1,T2. L. ⓓV1 ⊢ T1 ➡ T2 →
+                 ∀a. L ⊢ ⓓ{a}V1. T1 ➡* ⓓ{a}V2. T2.
+/3 width=1/ qed.
+
+lemma cpr_abbr2: ∀L,V1,V2. L ⊢ V1 ➡ V2 → ∀T1,T2. L. ⓓV2 ⊢ T1 ➡ T2 →
+                 ∀a. L ⊢ ⓓ{a}V1. T1 ➡* ⓓ{a}V2. T2.
+#L #V1 #V2 #HV12 #T1 #T2 #HT12
+lapply (lfpr_cpr_trans (L. ⓓV1) … HT12) /2 width=1/
+qed.
+
+(* Basic_1: was: pr3_strip *)
+lemma cprs_strip: ∀L,T1,T. L ⊢ T ➡* T1 → ∀T2. L ⊢ T ➡ T2 →
+                  ∃∃T0. L ⊢ T1 ➡ T0 & L ⊢ T2 ➡* T0.
+/3 width=3/ 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,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 /4 width=7/
+  | #a #V #V2 #W0 #W2 #T #T2 #HV0 #HW02 #HT2 #HV2 #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-.
+
+(* Main propertis ***********************************************************)
+
+(* Basic_1: was: pr3_confluence *)
+theorem cprs_conf: ∀L,T1,T. L ⊢ T ➡* T1 → ∀T2. L ⊢ T ➡* T2 →
+                   ∃∃T0. L ⊢ T1 ➡* T0 & L ⊢ T2 ➡* T0.
+/3 width=3/ qed.
+
+(* Basic_1: was: pr3_t *)
+theorem cprs_trans: ∀L,T1,T. L ⊢ T1 ➡* T → ∀T2. L ⊢ T ➡* T2 → L ⊢ T1 ➡* T2.
+/2 width=3/ qed.
+
+(* Basic_1: was: pr3_flat *)
+lemma cprs_flat: ∀I,L,T1,T2. L ⊢ T1 ➡* T2 → ∀V1,V2. L ⊢ V1 ➡* V2 →
+                 L ⊢ ⓕ{I} V1. T1 ➡* ⓕ{I} V2. T2.
+#I #L #T1 #T2 #HT12 #V1 #V2 #HV12 @(cprs_ind … HV12) -V2 /2 width=1/
+#V #V2 #_ #HV2 #IHV1
+@(cprs_trans … IHV1) -IHV1 /2 width=1/
+qed.
+
+lemma cprs_abst: ∀L,V1,V2. L ⊢ V1 ➡* V2 → ∀V,T1,T2.
+                 L.ⓛV ⊢ T1 ➡* T2 → ∀a. L ⊢ ⓛ{a}V1. T1 ➡* ⓛ{a}V2. T2.
+#L #V1 #V2 #HV12 #V #T1 #T2 #HT12 #a @(cprs_ind … HV12) -V2
+[ lapply (cprs_lsubs_trans … HT12 (L.ⓛV1) ?) -HT12 /2 width=2/
+| #V0 #V2 #_ #HV02 #IHV01
+  @(cprs_trans … IHV01) -V1 /2 width=2/
+]
+qed.
+
+lemma cprs_abbr1: ∀L,V1,T1,T2. L. ⓓV1 ⊢ T1 ➡* T2 → ∀V2. L ⊢ V1 ➡* V2 →
+                  ∀a.L ⊢ ⓓ{a}V1. T1 ➡* ⓓ{a}V2. T2.
+#L #V1 #T1 #T2 #HT12 #V2 #HV12 #a @(cprs_ind … HV12) -V2 /2 width=1/
+#V #V2 #_ #HV2 #IHV1
+@(cprs_trans … IHV1) -IHV1 /2 width=1/
+qed.
+
+lemma cprs_abbr2_dx: ∀L,V1,V2. L ⊢ V1 ➡ V2 → ∀T1,T2. L. ⓓV2 ⊢ T1 ➡* T2 →
+                     ∀a. L ⊢ ⓓ{a}V1. T1 ➡* ⓓ{a}V2. T2.
+#L #V1 #V2 #HV12 #T1 #T2 #HT12 #a @(cprs_ind_dx … HT12) -T1
+[ /2 width=1/
+| #T1 #T #HT1 #_ #IHT1
+  lapply (lfpr_cpr_trans (L. ⓓV1) … HT1) -HT1 /2 width=1/ #HT1
+  @(cprs_trans … IHT1) -IHT1 /2 width=1/
+]
+qed.
+
+lemma cprs_abbr2: ∀L,V1,V2. L ⊢ V1 ➡* V2 → ∀T1,T2. L. ⓓV2 ⊢ T1 ➡* T2 →
+                  ∀a. L ⊢ ⓓ{a}V1. T1 ➡* ⓓ{a}V2. T2.
+#L #V1 #V2 #HV12 @(cprs_ind … HV12) -V2 /2 width=1/
+#V #V2 #_ #HV2 #IHV1 #T1 #T2 #HT12 #a
+lapply (IHV1 T1 T1 ? a) -IHV1 // #HV1
+@(cprs_trans … HV1) -HV1 /2 width=1/
+qed.
+
+lemma cprs_beta_dx: ∀L,V1,V2,W,T1,T2.
+                    L ⊢ V1 ➡ V2 → L.ⓛW ⊢ T1 ➡* T2 →
+                    ∀a.L ⊢ ⓐV1.ⓛ{a}W.T1 ➡* ⓓ{a}V2.T2.
+#L #V1 #V2 #W #T1 #T2 #HV12 #HT12 #a @(cprs_ind … HT12) -T2
+[ /3 width=1/
+| -HV12 #T #T2 #_ #HT2 #IHT1
+  lapply (cpr_lsubs_trans … HT2 (L.ⓓV2) ?) -HT2 /2 width=1/ #HT2
+  @(cprs_trans … IHT1) -V1 -W -T1 /3 width=1/
+]
+qed.
+
+(* Basic_1: was only: pr3_pr2_pr3_t pr3_wcpr0_t *)
+lemma lcpr_cprs_trans: ∀L1,L2. ⦃L1⦄ ➡ ⦃L2⦄ →
+                       ∀T1,T2. L2 ⊢ T1 ➡* T2 → L1 ⊢ T1 ➡* T2.
+#L1 #L2 #HL12 #T1 #T2 #H @(cprs_ind … H) -T2 //
+#T #T2 #_ #HT2 #IHT2
+@(cprs_trans … IHT2) /2 width=3/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_delift.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_delift.ma
new file mode 100644 (file)
index 0000000..6b78926
--- /dev/null
@@ -0,0 +1,37 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/cpr_delift.ma".
+include "basic_2/reducibility/cpr_cpr.ma".
+include "basic_2/computation/cprs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
+
+(* Properties on inverse basic term relocation ******************************)
+
+(* Note: this should be stated with tprs *)
+lemma cprs_zeta_delift: ∀L,V,T1,T2. L.ⓓV ⊢ ▼*[O, 1] T1 ≡ T2 → L ⊢ +ⓓV.T1 ➡* T2.
+#L #V #T1 #T2 * #T #HT1 #HT2
+@(cprs_strap2 … (+ⓓV.T)) [ /3 width=3/ | @inj /3 width=3/ ] (**) (* explicit constructor, /5 width=3/ is too slow *)
+qed.
+
+(* Basic_1: was only: pr3_gen_cabbr *)
+lemma thin_cprs_delift_conf: ∀L,U1,U2. L ⊢ U1 ➡* U2 →
+                             ∀K,d,e. ▼*[d, e] L ≡ K → ∀T1. L ⊢ ▼*[d, e] U1 ≡ T1 →
+                             ∃∃T2. K ⊢ T1 ➡* T2 & L ⊢ ▼*[d, e] U2 ≡ T2.
+#L #U1 #U2 #H @(cprs_ind … H) -U2 /2 width=3/
+#U #U2 #_ #HU2 #IHU1 #K #d #e #HLK #T1 #HTU1
+elim (IHU1 … HLK … HTU1) -U1 #T #HT1 #HUT
+elim (thin_cpr_delift_conf … HU2 … HLK … HUT) -U -HLK /3 width=3/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_lfpr.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_lfpr.ma
new file mode 100644 (file)
index 0000000..a066435
--- /dev/null
@@ -0,0 +1,46 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/ltpr_tps.ma".
+include "basic_2/reducibility/cpr_ltpss.ma".
+include "basic_2/reducibility/lfpr.ma".
+include "basic_2/computation/cprs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
+
+(* Properties concerning focalized parallel reduction on local environments *)
+
+lemma ltpr_tpss_trans: ∀L1,L2. L1 ➡ L2 → ∀T1,T2,d,e. L2 ⊢ T1 ▶* [d, e] T2 →
+                       ∃∃T. L1 ⊢ T1 ▶* [d, e] T & L1 ⊢ T ➡* T2.
+#L1 #L2 #HL12 #T1 #T2 #d #e #H @(tpss_ind … H) -T2
+[ /2 width=3/
+| #T #T2 #_ #HT2 * #T0 #HT10 #HT0
+  elim (ltpr_tps_trans … HT2 … HL12) -L2 #T3 #HT3 #HT32
+  @(ex2_1_intro … HT10) -T1 (**) (* explicit constructors *)
+  @(cprs_strap1 … T3 …) /2 width=1/ -HT32
+  @(cprs_strap1 … HT0) -HT0 /3 width=3/
+]
+qed.
+
+(* Basic_1: was just: pr3_pr0_pr2_t *)
+lemma ltpr_cpr_trans: ∀L1,L2. L1 ➡ L2 → ∀T1,T2. L2 ⊢ T1 ➡ T2 → L1 ⊢ T1 ➡* T2.
+#L1 #L2 #HL12 #T1 #T2 * #T #HT1
+<(ltpr_fwd_length … HL12) #HT2
+elim (ltpr_tpss_trans … HL12 … HT2) -L2 /3 width=3/
+qed.
+
+(* Basic_1: was just: pr3_pr2_pr2_t *)
+lemma lfpr_cpr_trans: ∀L1,L2. ⦃L1⦄ ➡ ⦃L2⦄ → ∀T1,T2. L2 ⊢ T1 ➡ T2 → L1 ⊢ T1 ➡* T2.
+#L1 #L2 * /3 width=7/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_lfprs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_lfprs.ma
new file mode 100644 (file)
index 0000000..33620d0
--- /dev/null
@@ -0,0 +1,56 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/cprs_cprs.ma".
+include "basic_2/computation/lfprs_lfprs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
+
+(* Properties on focalized computation for local environments ***************)
+
+(* Basic_1: was just: pr3_pr3_pr3_t *)
+lemma lfprs_cprs_trans: ∀L1,L2. ⦃L1⦄ ➡* ⦃L2⦄ →
+                        ∀T1,T2. L2 ⊢ T1 ➡* T2 → L1 ⊢ T1 ➡* T2.
+#L1 #L2 #HL12 @(lfprs_ind … HL12) -L2 // /3 width=3/
+qed.
+
+lemma lfprs_cpr_trans: ∀L1,L2. ⦃L1⦄ ➡* ⦃L2⦄ →
+                       ∀T1,T2. L2 ⊢ T1 ➡ T2 → L1 ⊢ T1 ➡* T2.
+/3 width=3 by lfprs_cprs_trans, inj/ qed.
+
+(* Advanced inversion lemmas ************************************************)
+
+(* 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 &
+                                U2 = ⓓ{a}V2. T2
+                      ) ∨
+                      ∃∃T2. L. ⓓV1 ⊢ T1 ➡* T2 & ⇧[0, 1] U2 ≡ T2 & a = true.
+#a #L #V1 #T1 #U2 #H @(cprs_ind … H) -U2 /3 width=5/
+#U0 #U2 #_ #HU02 * *
+[ #V0 #T0 #HV10 #HT10 #H destruct
+  elim (cpr_inv_abbr1 … HU02) -HU02 *
+  [ #V #V2 #T2 #HV0 #HV2 #HT02 #H destruct
+    lapply (cpr_intro … HV0 … HV2) -HV2 #HV02
+    lapply (ltpr_cpr_trans (L.ⓓV0) … HT02) /2 width=1/ -V #HT02
+    lapply (lfprs_cprs_trans (L. ⓓV1) … HT02) -HT02 /2 width=1/ /4 width=5/
+  | #T2 #HT02 #HUT2
+    lapply (lfprs_cpr_trans (L.ⓓV1) … HT02) -HT02 /2 width=1/ -V0 #HT02
+    lapply (cprs_trans … HT10 … HT02) -T0 /3 width=3/
+  ]
+| #U1 #HTU1 #HU01
+  elim (lift_total U2 0 1) #U #HU2
+  lapply (cpr_lift (L.ⓓV1) … HU01 … HU2 HU02) -U0 /2 width=1/ /4 width=3/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_lift.ma
new file mode 100644 (file)
index 0000000..36ce0ef
--- /dev/null
@@ -0,0 +1,78 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/cpr_lift.ma".
+include "basic_2/computation/cprs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
+
+(* Advanced inversion lemmas ************************************************)
+
+(* Basic_1: was: pr3_gen_lref *)
+lemma cprs_inv_lref1: ∀L,T2,i. L ⊢ #i ➡* T2 →
+                      T2 = #i ∨
+                      ∃∃K,V1,T1. ⇩[0, i] L ≡ K. ⓓV1 &
+                                 K ⊢ V1 ➡* T1 &
+                                 ⇧[0, i + 1] T1 ≡ T2 &
+                                 i < |L|.
+#L #T2 #i #H @(cprs_ind … H) -T2 /2 width=1/
+#T #T2 #_ #HT2 *
+[ #H destruct
+  elim (cpr_inv_lref1 … HT2) -HT2 /2 width=1/
+  * #K #V1 #T1 #HLK #HVT1 #HT12 #Hi
+  @or_intror @(ex4_3_intro … HLK … HT12) // /3 width=3/ (**) (* explicit constructors *)
+| * #K #V1 #T1 #HLK #HVT1 #HT1 #Hi
+  lapply (ldrop_fwd_ldrop2 … HLK) #H0LK
+  elim (cpr_inv_lift1 … H0LK … HT1 … HT2) -H0LK -T /4 width=6/
+]
+qed-.
+
+(* Basic_1: was: pr3_gen_abst *)
+lemma cprs_inv_abst1: ∀I,W,a,L,V1,T1,U2. L ⊢ ⓛ{a}V1. T1 ➡* U2 →
+                      ∃∃V2,T2. L ⊢ V1 ➡* V2 & L. ⓑ{I} W ⊢ T1 ➡* T2 &
+                               U2 = ⓛ{a}V2. T2.
+#I #W #a #L #V1 #T1 #U2 #H @(cprs_ind … H) -U2 /2 width=5/
+#U #U2 #_ #HU2 * #V #T #HV1 #HT1 #H destruct
+elim (cpr_inv_abst1 … HU2 I W) -HU2 #V2 #T2 #HV2 #HT2 #H destruct  /3 width=5/
+qed-.
+
+lemma cprs_inv_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_inv_abst1 I W … H) -H #V #T #HV1 #HT1 #H destruct /2 width=1/
+qed-.
+
+(* Relocation properties ****************************************************)
+
+(* Basic_1: was: pr3_lift *)
+lemma cprs_lift: ∀L,K,d,e. ⇩[d, e] L ≡ K → ∀T1,U1. ⇧[d, e] T1 ≡ U1 →
+                 ∀T2. K ⊢ T1 ➡* T2 → ∀U2. ⇧[d, e] T2 ≡ U2 →
+                 L ⊢ U1 ➡* U2.
+#L #K #d #e #HLK #T1 #U1 #HTU1 #T2 #HT12 @(cprs_ind … HT12) -T2
+[ -HLK #T2 #HT12
+   <(lift_mono … HTU1 … HT12) -T1 //
+| -HTU1 #T #T2 #_ #HT2 #IHT2 #U2 #HTU2
+  elim (lift_total T d e) #U #HTU
+  lapply (cpr_lift … HLK … HTU … HTU2 … HT2) -T2 -HLK /3 width=3/
+]
+qed.
+
+(* Basic_1: was: pr3_gen_lift *)
+lemma cprs_inv_lift1: ∀L,K,d,e. ⇩[d, e] L ≡ K →
+                      ∀T1,U1. ⇧[d, e] T1 ≡ U1 → ∀U2. L ⊢ U1 ➡* U2 →
+                      ∃∃T2. ⇧[d, e] T2 ≡ U2 & K ⊢ T1 ➡* T2.
+#L #K #d #e #HLK #T1 #U1 #HTU1 #U2 #HU12 @(cprs_ind … HU12) -U2 /2 width=3/
+-HTU1 #U #U2 #_ #HU2 * #T #HTU #HT1
+elim (cpr_inv_lift1 … HLK … HTU … HU2) -U -HLK /3 width=5/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_ltpr.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_ltpr.ma
new file mode 100644 (file)
index 0000000..2682a76
--- /dev/null
@@ -0,0 +1,32 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/cpr_ltpr.ma".
+include "basic_2/computation/cprs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
+
+(* Properties concerning parallel unfold on terms ***************************)
+
+(* Basic_1: was only: pr3_subst1 *)
+lemma cprs_tpss_ltpr: ∀L1,T1,U1,d,e. L1 ⊢ T1 ▶* [d, e] U1 →
+                      ∀L2. L1 ➡ L2 → ∀T2. L2 ⊢ T1 ➡* T2 →
+                      ∃∃U2. L2 ⊢ U1 ➡* U2 & L2 ⊢ T2 ▶* [d, e] U2.
+#L1 #T1 #U1 #d #e #HTU1 #L2 #HL12 #T2 #HT12 elim HT12 -T2
+[ #T2 #HT12
+  elim (cpr_tpss_ltpr … HL12 … HT12 … HTU1) -L1 -T1 /3 width=3/
+| #T #T2 #_ #HT2 * #U #HU1 #HTU
+  elim (cpr_tpss_ltpr … HT2 … HTU) -L1 -T // /3 width=3/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_tstc.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_tstc.ma
new file mode 100644 (file)
index 0000000..f7afb8d
--- /dev/null
@@ -0,0 +1,92 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/tstc.ma".
+include "basic_2/computation/cprs_lift.ma".
+include "basic_2/computation/cprs_lfprs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
+
+(* Forward lemmas involving same top term constructor ***********************)
+
+lemma cprs_fwd_cnf: ∀L,T. L ⊢ 𝐍⦃T⦄ → ∀U. L ⊢ T ➡* U → T ≃ U.
+#L #T #HT #U #H
+>(cprs_inv_cnf1 … H HT) -L -T //
+qed-.
+
+(* Basic_1: was: pr3_iso_beta *)
+lemma cprs_fwd_beta: ∀a,L,V,W,T,U. L ⊢ ⓐV. ⓛ{a}W. T ➡* U →
+                     ⓐV. ⓛ{a}W. T ≃ U ∨ L ⊢ ⓓ{a}V. T ➡* U.
+#a #L #V #W #T #U #H
+elim (cprs_inv_appl1 … H) -H *
+[ #V0 #T0 #_ #_ #H destruct /2 width=1/
+| #b #V0 #W0 #T0 #HV0 #HT0 #HU
+  elim (cprs_inv_abst1 Abbr V … HT0) -HT0 #W1 #T1 #_ #HT1 #H destruct -W1
+  @or_intror -W
+  @(cprs_trans … HU) -U /2 width=1/ (**) (* explicit constructor *)
+| #b #V1 #V2 #V0 #T1 #_ #_ #HT1 #_
+  elim (cprs_inv_abst1 Abbr V … HT1) -HT1 #W2 #T2 #_ #_ #H destruct
+]
+qed-.
+
+(* Note: probably this is an inversion lemma *)
+lemma cprs_fwd_delta: ∀L,K,V1,i. ⇩[0, i] L ≡ K. ⓓV1 →
+                      ∀V2. ⇧[0, i + 1] V1 ≡ V2 →
+                      ∀U. L ⊢ #i ➡* U →
+                      #i ≃ U ∨ L ⊢ V2 ➡* U.
+#L #K #V1 #i #HLK #V2 #HV12 #U #H
+elim (cprs_inv_lref1 … H) -H /2 width=1/
+* #K0 #V0 #U0 #HLK0 #HVU0 #HU0 #_
+lapply (ldrop_mono … HLK0 … HLK) -HLK0 #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK) -HLK /3 width=9/
+qed-.
+
+lemma cprs_fwd_theta: ∀a,L,V1,V,T,U. L ⊢ ⓐV1. ⓓ{a}V. T ➡* U →
+                      ∀V2. ⇧[0, 1] V1 ≡ V2 → ⓐV1. ⓓ{a}V. T ≃ U ∨
+                      L ⊢ ⓓ{a}V. ⓐV2. T ➡* U.
+#a #L #V1 #V #T #U #H #V2 #HV12
+elim (cprs_inv_appl1 … H) -H *
+[ -HV12 #V0 #T0 #_ #_ #H destruct /2 width=1/
+| #b #V0 #W #T0 #HV10 #HT0 #HU
+  elim (cprs_inv_abbr1 … HT0) -HT0 *
+  [ #V3 #T3 #_ #_ #H destruct
+  | #X #HT2 #H #H0 destruct
+    elim (lift_inv_bind1 … H) -H #W2 #T2 #HW2 #HT02 #H destruct
+    @or_intror @(cprs_trans … HU) -U (**) (* explicit constructor *)
+    @(cprs_trans … (+ⓓV.ⓐV2.ⓛ{b}W2.T2)) [ /3 width=1/ ] -T
+    @(cprs_strap2 … (ⓐV1.ⓛ{b}W.T0)) [ /5 width=7/ ] -V -V2 -W2 -T2
+    @(cprs_strap2 … (ⓓ{b}V1.T0)) [ /3 width=1/ ] -W /2 width=1/
+  ]
+| #b #V3 #V4 #V0 #T0 #HV13 #HV34 #HT0 #HU
+  @or_intror @(cprs_trans … HU) -U (**) (* explicit constructor *)
+  elim (cprs_inv_abbr1 … HT0) -HT0 *
+  [ #V5 #T5 #HV5 #HT5 #H destruct
+    lapply (cprs_lift (L.ⓓV) … HV12 … HV13 … HV34) -V1 -V3 /2 width=1/
+    /3 width=1/
+  | #X #HT1 #H #H0 destruct
+    elim (lift_inv_bind1 … H) -H #V5 #T5 #HV05 #HT05 #H destruct
+    lapply (cprs_lift (L.ⓓV0) … HV12 … HV13 … HV34) -V3 /2 width=1/ #HV24
+    @(cprs_trans … (+ⓓV.ⓐV2.ⓓ{b}V5.T5)) [ /3 width=1/ ] -T
+    @(cprs_strap2 … (ⓐV1.ⓓ{b}V0.T0)) [ /5 width=7/ ] -V -V5 -T5
+    @(cprs_strap2 … (ⓓ{b}V0.ⓐV2.T0)) [ /3 width=3/ ] -V1 /3 width=1/
+  ]
+]
+qed-.
+
+lemma cprs_fwd_tau: ∀L,W,T,U. L ⊢ ⓝW. T ➡* U →
+                    ⓝW. T ≃ U ∨ L ⊢ T ➡* U.
+#L #W #T #U #H
+elim (cprs_inv_cast1 … H) -H /2 width=1/ *
+#W0 #T0 #_ #_ #H destruct /2 width=1/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_tstc_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_tstc_vector.ma
new file mode 100644 (file)
index 0000000..fd3eb58
--- /dev/null
@@ -0,0 +1,157 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/tstc_vector.ma".
+include "basic_2/substitution/lift_vector.ma".
+include "basic_2/computation/cprs_tstc.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
+
+(* Vector form of forward lemmas involving same top term constructor ********)
+
+(* Basic_1: was just: nf2_iso_appls_lref *)
+lemma cprs_fwd_cnf_vector: ∀L,T.  𝐒⦃T⦄ → L ⊢ 𝐍⦃T⦄ → ∀Vs,U. L ⊢ ⒶVs.T ➡* U → ⒶVs.T ≃ U.
+#L #T #H1T #H2T #Vs elim Vs -Vs [ @(cprs_fwd_cnf … H2T) ] (**) (* /2 width=3 by cprs_fwd_cnf/ does not work *)
+#V #Vs #IHVs #U #H
+elim (cprs_inv_appl1 … H) -H *
+[ -IHVs #V0 #T0 #_ #_ #H destruct /2 width=1/
+| #a #V0 #W0 #T0 #HV0 #HT0 #HU
+  lapply (IHVs … HT0) -IHVs -HT0 #HT0
+  elim (tstc_inv_bind_appls_simple … HT0 ?) //
+| #a #V1 #V2 #V0 #T0 #HV1 #HV12 #HT0 #HU
+  lapply (IHVs … HT0) -IHVs -HT0 #HT0
+  elim (tstc_inv_bind_appls_simple … HT0 ?) //
+]
+qed-.
+
+(* Basic_1: was: pr3_iso_appls_beta *)
+lemma cprs_fwd_beta_vector: ∀a,L,Vs,V,W,T,U. L ⊢ ⒶVs. ⓐV. ⓛ{a}W. T ➡* U →
+                            ⒶVs. ⓐV. ⓛ{a}W. T ≃ U ∨ L ⊢ ⒶVs. ⓓ{a}V. T ➡* U.
+#a #L #Vs elim Vs -Vs /2 width=1 by cprs_fwd_beta/
+#V0 #Vs #IHVs #V #W #T #U #H
+elim (cprs_inv_appl1 … H) -H *
+[ -IHVs #V1 #T1 #_ #_ #H destruct /2 width=1/
+| #b #V1 #W1 #T1 #HV01 #HT1 #HU
+  elim (IHVs … HT1) -IHVs -HT1 #HT1
+  [ elim (tstc_inv_bind_appls_simple … HT1 ?) //
+  | @or_intror -W (**) (* explicit constructor *)
+    @(cprs_trans … HU) -U
+    @(cprs_strap1 … (ⓐV1.ⓛ{b}W1.T1)) [ /2 width=1/ ] -V -V0 -Vs -T /3 width=1/
+  ]
+| #b #V1 #V2 #V3 #T1 #HV01 #HV12 #HT1 #HU
+  elim (IHVs … HT1) -IHVs -HT1 #HT1
+  [ elim (tstc_inv_bind_appls_simple … HT1 ?) //
+  | @or_intror -W (**) (* explicit constructor *)
+    @(cprs_trans … HU) -U
+    @(cprs_strap1 … (ⓐV1.ⓓ{b}V3.T1)) [ /2 width=1/ ] -V -V0 -Vs -T /3 width=3/
+  ]
+]
+qed-.
+
+lemma cprs_fwd_delta_vector: ∀L,K,V1,i. ⇩[0, i] L ≡ K. ⓓV1 →
+                             ∀V2. ⇧[0, i + 1] V1 ≡ V2 →
+                             ∀Vs,U. L ⊢ ⒶVs.#i ➡* U →
+                             ⒶVs.#i ≃ U ∨ L ⊢ ⒶVs.V2 ➡* U.
+#L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs /2 width=4 by cprs_fwd_delta/
+#V #Vs #IHVs #U #H -K -V1
+elim (cprs_inv_appl1 … H) -H *
+[ -IHVs #V0 #T0 #_ #_ #H destruct /2 width=1/
+| #b #V0 #W0 #T0 #HV0 #HT0 #HU
+  elim (IHVs … HT0) -IHVs -HT0 #HT0
+  [ elim (tstc_inv_bind_appls_simple … HT0 ?) //
+  | @or_intror -i (**) (* explicit constructor *)
+    @(cprs_trans … HU) -U
+    @(cprs_strap1 … (ⓐV0.ⓛ{b}W0.T0)) [ /2 width=1/ ] -V -V2 -Vs /3 width=1/
+  ]
+| #b #V0 #V1 #V3 #T0 #HV0 #HV01 #HT0 #HU
+  elim (IHVs … HT0) -IHVs -HT0 #HT0
+  [ elim (tstc_inv_bind_appls_simple … HT0 ?) //
+  | @or_intror -i (**) (* explicit constructor *)
+    @(cprs_trans … HU) -U
+    @(cprs_strap1 … (ⓐV0.ⓓ{b}V3.T0)) [ /2 width=1/ ] -V -V2 -Vs /3 width=3/
+  ]
+]
+qed-.
+
+(* Basic_1: was: pr3_iso_appls_abbr *)
+lemma cprs_fwd_theta_vector: ∀L,V1s,V2s. ⇧[0, 1] V1s ≡ V2s →
+                             ∀a,V,T,U. L ⊢ ⒶV1s. ⓓ{a}V. T ➡* U →
+                             ⒶV1s. ⓓ{a}V. T ≃ U ∨ L ⊢ ⓓ{a}V. ⒶV2s. T ➡* U.
+#L #V1s #V2s * -V1s -V2s /3 width=1/
+#V1s #V2s #V1a #V2a #HV12a #HV12s #a
+generalize in match HV12a; -HV12a
+generalize in match V2a; -V2a
+generalize in match V1a; -V1a
+elim HV12s -V1s -V2s /2 width=1 by cprs_fwd_theta/
+#V1s #V2s #V1b #V2b #HV12b #_ #IHV12s #V1a #V2a #HV12a #V #T #U #H
+elim (cprs_inv_appl1 … H) -H *
+[ -IHV12s -HV12a -HV12b #V0 #T0 #_ #_ #H destruct /2 width=1/
+| #b #V0a #W0 #T0 #HV10a #HT0 #HU
+  elim (IHV12s … HV12b … HT0) -IHV12s -HT0 #HT0
+  [ -HV12a -HV12b -HV10a -HU
+    elim (tstc_inv_pair1 … HT0) #V1 #T1 #H destruct
+  | @or_intror -V1s (**) (* explicit constructor *)
+    @(cprs_trans … HU) -U
+    elim (cprs_inv_abbr1 … HT0) -HT0 *
+    [ -HV12a -HV12b -HV10a #V1 #T1 #_ #_ #H destruct
+    | -V1b #X #HT1 #H #H0 destruct
+      elim (lift_inv_bind1 … H) -H #W1 #T1 #HW01 #HT01 #H destruct
+      @(cprs_trans … (+ⓓV.ⓐV2a.ⓛ{b}W1.T1)) [ /3 width=1/ ] -T -V2b -V2s
+      @(cprs_strap2 … (ⓐV1a.ⓛ{b}W0.T0)) [ /5 width=7/ ] -V -V2a -W1 -T1
+      @(cprs_strap2 … (ⓓ{b}V1a.T0)) [ /3 width=1/ ] -W0 /2 width=1/
+    ]
+  ]
+| #b #V0a #Va #V0 #T0 #HV10a #HV0a #HT0 #HU
+  elim (IHV12s … HV12b … HT0) -HV12b -IHV12s -HT0 #HT0
+  [ -HV12a -HV10a -HV0a -HU
+    elim (tstc_inv_pair1 … HT0) #V1 #T1 #H destruct
+  | @or_intror -V1s -V1b (**) (* explicit constructor *)
+    @(cprs_trans … HU) -U
+    elim (cprs_inv_abbr1 … HT0) -HT0 *
+    [ #V1 #T1 #HV1 #HT1 #H destruct
+      lapply (cprs_lift (L.ⓓV) … HV12a … HV10a … HV0a) -V1a -V0a [ /2 width=1/ ] #HV2a
+      @(cprs_trans … (ⓓ{a}V.ⓐV2a.T1)) [ /3 width=1/ ] -T -V2b -V2s /3 width=1/
+    | #X #HT1 #H #H0 destruct
+      elim (lift_inv_bind1 … H) -H #V1 #T1 #HW01 #HT01 #H destruct
+      lapply (cprs_lift (L.ⓓV0) … HV12a … HV10a … HV0a) -V0a [ /2 width=1/ ] #HV2a
+      @(cprs_trans … (+ⓓV.ⓐV2a.ⓓ{b}V1.T1)) [ /3 width=1/ ] -T -V2b -V2s
+      @(cprs_strap2 … (ⓐV1a.ⓓ{b}V0.T0)) [ /5 width=7/ ] -V -V1 -T1
+      @(cprs_strap2 … (ⓓ{b}V0.ⓐV2a.T0)) [ /3 width=3/ ] -V1a /3 width=1/
+    ]
+  ]
+]  
+qed-.
+
+(* Basic_1: was: pr3_iso_appls_cast *)
+lemma cprs_fwd_tau_vector: ∀L,Vs,W,T,U. L ⊢ ⒶVs. ⓝW. T ➡* U →
+                           ⒶVs. ⓝW. T ≃ U ∨ L ⊢ ⒶVs. T ➡* U.
+#L #Vs elim Vs -Vs /2 width=1 by cprs_fwd_tau/
+#V #Vs #IHVs #W #T #U #H
+elim (cprs_inv_appl1 … H) -H *
+[ -IHVs #V0 #T0 #_ #_ #H destruct /2 width=1/
+| #b #V0 #W0 #T0 #HV0 #HT0 #HU
+  elim (IHVs … HT0) -IHVs -HT0 #HT0
+  [ elim (tstc_inv_bind_appls_simple … HT0 ?) //
+  | @or_intror -W (**) (* explicit constructor *)
+    @(cprs_trans … HU) -U
+    @(cprs_strap1 … (ⓐV0.ⓛ{b}W0.T0)) [ /2 width=1/ ] -V -Vs -T /3 width=1/
+  ]
+| #b #V0 #V1 #V2 #T0 #HV0 #HV01 #HT0 #HU
+  elim (IHVs … HT0) -IHVs -HT0 #HT0
+  [ elim (tstc_inv_bind_appls_simple … HT0 ?) //
+  | @or_intror -W (**) (* explicit constructor *)
+    @(cprs_trans … HU) -U
+    @(cprs_strap1 … (ⓐV0.ⓓ{b}V2.T0)) [ /2 width=1/ ] -V -Vs -T /3 width=3/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/csn.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/csn.ma
new file mode 100644 (file)
index 0000000..3ed3101
--- /dev/null
@@ -0,0 +1,87 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/cnf.ma".
+
+(* CONTEXT-SENSITIVE STRONGLY NORMALIZING TERMS *****************************)
+
+definition csn: lenv → predicate term ≝ λL. SN … (cpr L) (eq …).
+
+interpretation
+   "context-sensitive strong normalization (term)"
+   'SN L T = (csn L T).
+
+(* Basic eliminators ********************************************************)
+
+lemma csn_ind: ∀L. ∀R:predicate term.
+               (∀T1. L ⊢ ⬊* T1 →
+                     (∀T2. L ⊢ T1 ➡ T2 → (T1 = T2 → ⊥) → R T2) →
+                     R T1
+               ) →
+               ∀T. L ⊢ ⬊* T → R T.
+#L #R #H0 #T1 #H elim H -T1 #T1 #HT1 #IHT1
+@H0 -H0 /3 width=1/ -IHT1 /4 width=1/
+qed-.
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was: sn3_pr2_intro *)
+lemma csn_intro: ∀L,T1.
+                 (∀T2. L ⊢ T1 ➡ T2 → (T1 = T2 → ⊥) → L ⊢ ⬊* T2) → L ⊢ ⬊* T1.
+/4 width=1/ qed.
+
+(* Basic_1: was: sn3_nf2 *)
+lemma csn_cnf: ∀L,T. L ⊢ 𝐍⦃T⦄ → L ⊢ ⬊* T.
+/2 width=1/ qed.
+
+lemma csn_cpr_trans: ∀L,T1. L ⊢ ⬊* T1 → ∀T2. L ⊢ T1 ➡ T2 → L ⊢ ⬊* T2.
+#L #T1 #H elim H -T1 #T1 #HT1 #IHT1 #T2 #HLT12
+@csn_intro #T #HLT2 #HT2
+elim (term_eq_dec T1 T2) #HT12
+[ -IHT1 -HLT12 destruct /3 width=1/
+| -HT1 -HT2 /3 width=4/
+qed.
+
+(* Basic_1: was: sn3_cast *)
+lemma csn_cast: ∀L,W. L ⊢ ⬊* W → ∀T. L ⊢ ⬊* T → L ⊢ ⬊* ⓝW. T.
+#L #W #HW elim HW -W #W #_ #IHW #T #HT @(csn_ind … HT) -T #T #HT #IHT
+@csn_intro #X #H1 #H2
+elim (cpr_inv_cast1 … H1) -H1
+[ * #W0 #T0 #HLW0 #HLT0 #H destruct
+  elim (eq_false_inv_tpair_sn … H2) -H2
+  [ /3 width=3/
+  | -HLW0 * #H destruct /3 width=1/ 
+  ]
+| /3 width=3/
+]
+qed.
+
+(* Basic forward lemmas *****************************************************)
+
+fact csn_fwd_flat_dx_aux: ∀L,U. L ⊢ ⬊* U → ∀I,V,T. U = ⓕ{I} V. T → L ⊢ ⬊* T.
+#L #U #H elim H -H #U0 #_ #IH #I #V #T #H destruct
+@csn_intro #T2 #HLT2 #HT2
+@(IH (ⓕ{I} V. T2)) -IH // /2 width=1/ -HLT2 #H destruct /2 width=1/
+qed.
+
+(* Basic_1: was: sn3_gen_flat *)
+lemma csn_fwd_flat_dx: ∀I,L,V,T. L ⊢ ⬊* ⓕ{I} V. T → L ⊢ ⬊* T.
+/2 width=5/ qed-.
+
+(* Basic_1: removed theorems 14:
+            sn3_cdelta
+            sn3_gen_cflat sn3_cflat sn3_cpr3_trans sn3_shift sn3_change
+            sn3_appl_cast sn3_appl_beta sn3_appl_lref sn3_appl_abbr
+            sn3_appl_appls sn3_bind sn3_appl_bind sn3_appls_bind
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/csn_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/csn_aaa.ma
new file mode 100644 (file)
index 0000000..67744a0
--- /dev/null
@@ -0,0 +1,25 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/acp_aaa.ma".
+include "basic_2/computation/csn_tstc_vector.ma".
+
+(* CONTEXT-SENSITIVE STRONGLY NORMALIZING TERMS *****************************)
+
+(* Properties concerning atomic arity assignment ****************************)
+
+lemma csn_aaa: ∀L,T,A. L ⊢ T ⁝ A → L ⊢ ⬊* T.
+#L #T #A #H
+@(acp_aaa … csn_acp csn_acr … H)
+qed. 
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/csn_alt.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/csn_alt.ma
new file mode 100644 (file)
index 0000000..eeba707
--- /dev/null
@@ -0,0 +1,97 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/cprs.ma".
+include "basic_2/computation/csn.ma".
+
+(* CONTEXT-SENSITIVE STRONGLY NORMALIZING TERMS *****************************)
+
+(* alternative definition of csn *)
+definition csna: lenv → predicate term ≝ λL. SN … (cprs L) (eq …).
+
+interpretation
+   "context-sensitive strong normalization (term) alternative"
+   'SNAlt L T = (csna L T).
+
+(* Basic eliminators ********************************************************)
+
+lemma csna_ind: ∀L. ∀R:predicate term.
+                (∀T1. L ⊢ ⬊⬊* T1 →
+                      (∀T2. L ⊢ T1 ➡* T2 → (T1 = T2 → ⊥) → R T2) → R T1
+                ) →
+                ∀T. L ⊢ ⬊⬊* T → R T.
+#L #R #H0 #T1 #H elim H -T1 #T1 #HT1 #IHT1
+@H0 -H0 /3 width=1/ -IHT1 /4 width=1/
+qed-.
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was: sn3_intro *)
+lemma csna_intro: ∀L,T1.
+                  (∀T2. L ⊢ T1 ➡* T2 → (T1 = T2 → ⊥) → L ⊢ ⬊⬊* T2) → L ⊢ ⬊⬊* T1.
+/4 width=1/ qed.
+
+fact csna_intro_aux: ∀L,T1.
+                     (∀T,T2. L ⊢ T ➡* T2 → T1 = T → (T1 = T2 → ⊥) → L ⊢ ⬊⬊* T2) → L ⊢ ⬊⬊* T1.
+/4 width=3/ qed-.
+
+(* Basic_1: was: sn3_pr3_trans (old version) *)
+lemma csna_cprs_trans: ∀L,T1. L ⊢ ⬊⬊* T1 → ∀T2. L ⊢ T1 ➡* T2 → L ⊢ ⬊⬊* T2.
+#L #T1 #H elim H -T1 #T1 #HT1 #IHT1 #T2 #HLT12
+@csna_intro #T #HLT2 #HT2
+elim (term_eq_dec T1 T2) #HT12
+[ -IHT1 -HLT12 destruct /3 width=1/
+| -HT1 -HT2 /3 width=4/
+qed.
+
+(* Basic_1: was: sn3_pr2_intro (old version) *)
+lemma csna_intro_cpr: ∀L,T1.
+                      (∀T2. L ⊢ T1 ➡ T2 → (T1 = T2 → ⊥) → L ⊢ ⬊⬊* T2) →
+                      L ⊢ ⬊⬊* T1.
+#L #T1 #H
+@csna_intro_aux #T #T2 #H @(cprs_ind_dx … H) -T
+[ -H #H destruct #H
+  elim (H ?) //
+| #T0 #T #HLT1 #HLT2 #IHT #HT10 #HT12 destruct
+  elim (term_eq_dec T0 T) #HT0
+  [ -HLT1 -HLT2 -H /3 width=1/
+  | -IHT -HT12 /4 width=3/
+  ]
+] 
+qed.
+
+(* Main properties **********************************************************)
+
+theorem csn_csna: ∀L,T. L ⊢ ⬊* T → L ⊢ ⬊⬊* T.
+#L #T #H @(csn_ind … H) -T /4 width=1/
+qed.
+
+theorem csna_csn: ∀L,T. L ⊢ ⬊⬊* T → L ⊢ ⬊* T.
+#L #T #H @(csna_ind … H) -T /4 width=1/
+qed.
+
+(* Basic_1: was: sn3_pr3_trans *)
+lemma csn_cprs_trans: ∀L,T1. L ⊢ ⬊* T1 → ∀T2. L ⊢ T1 ➡* T2 → L ⊢ ⬊* T2.
+/4 width=3/ qed.
+
+(* Main eliminators *********************************************************)
+
+lemma csn_ind_alt: ∀L. ∀R:predicate term.
+                   (∀T1. L ⊢ ⬊* T1 →
+                         (∀T2. L ⊢ T1 ➡* T2 → (T1 = T2 → ⊥) → R T2) → R T1
+                   ) →
+                   ∀T. L ⊢ ⬊* T → R T.
+#L #R #H0 #T1 #H @(csna_ind … (csn_csna … H)) -T1 #T1 #HT1 #IHT1
+@H0 -H0 /2 width=1/ -HT1 /3 width=1/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/csn_cpr.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/csn_cpr.ma
new file mode 100644 (file)
index 0000000..ccfd601
--- /dev/null
@@ -0,0 +1,41 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/cpr_cpr.ma".
+include "basic_2/computation/csn.ma".
+
+(* CONTEXT-SENSITIVE STRONGLY NORMALIZING TERMS *****************************)
+
+(* Advanced forvard lemmas **************************************************)
+
+fact csn_fwd_pair_sn_aux: ∀L,U. L ⊢ ⬊* U → ∀I,V,T. U = ②{I} V. T → L ⊢ ⬊* V.
+#L #U #H elim H -H #U0 #_ #IH #I #V #T #H destruct
+@csn_intro #V2 #HLV2 #HV2
+@(IH (②{I} V2. T)) -IH // /2 width=1/ -HLV2 #H destruct /2 width=1/
+qed.
+
+(* Basic_1: was: sn3_gen_head *)
+lemma csn_fwd_pair_sn: ∀I,L,V,T. L ⊢ ⬊* ②{I} V. T → L ⊢ ⬊* V.
+/2 width=5/ qed.
+
+fact csn_fwd_bind_dx_aux: ∀L,U. L ⊢ ⬊* U →
+                          ∀a,I,V,T. U = ⓑ{a,I} V. T → L. ⓑ{I} V ⊢ ⬊* T.
+#L #U #H elim H -H #U0 #_ #IH #a #I #V #T #H destruct
+@csn_intro #T2 #HLT2 #HT2
+@(IH (ⓑ{a,I} V. T2)) -IH // /2 width=1/ -HLT2 #H destruct /2 width=1/
+qed.
+
+(* Basic_1: was: sn3_gen_bind *)
+lemma csn_fwd_bind_dx: ∀a,I,L,V,T. L ⊢ ⬊* ⓑ{a,I} V. T → L. ⓑ{I} V ⊢ ⬊* T.
+/2 width=4/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/csn_cpr_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/csn_cpr_vector.ma
new file mode 100644 (file)
index 0000000..70c00eb
--- /dev/null
@@ -0,0 +1,26 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/csn_cpr.ma".
+include "basic_2/computation/csn_vector.ma".
+
+(* Advanced forward lemmas **************************************************)
+
+lemma csn_fwd_applv: ∀L,T,Vs. L ⊢ ⬊* Ⓐ Vs. T → L ⊢ ⬊* Vs ∧ L ⊢ ⬊* T.
+#L #T #Vs elim Vs -Vs /2 width=1/
+#V #Vs #IHVs #HVs
+lapply (csn_fwd_pair_sn … HVs) #HV
+lapply (csn_fwd_flat_dx … HVs) -HVs #HVs
+elim (IHVs HVs) -IHVs -HVs /3 width=1/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/csn_lfpr.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/csn_lfpr.ma
new file mode 100644 (file)
index 0000000..444dcf8
--- /dev/null
@@ -0,0 +1,147 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/tstc_tstc.ma".
+include "basic_2/computation/cprs_cprs.ma".
+include "basic_2/computation/csn_lift.ma".
+include "basic_2/computation/csn_cpr.ma".
+include "basic_2/computation/csn_alt.ma".
+
+(* CONTEXT-SENSITIVE STRONGLY NORMALIZING TERMS *****************************)
+
+(* Advanced properties ******************************************************)
+
+lemma csn_lfpr_conf: ∀L1,L2. ⦃L1⦄ ➡ ⦃L2⦄ → ∀T. L1 ⊢ ⬊* T → L2 ⊢ ⬊* T.
+#L1 #L2 #HL12 #T #H @(csn_ind_alt … H) -T #T #_ #IHT
+@csn_intro #T0 #HLT0 #HT0
+@IHT /2 width=2/ -IHT -HT0 /2 width=3/
+qed.
+
+lemma csn_abbr: ∀a,L,V. L ⊢ ⬊* V → ∀T. L. ⓓV ⊢ ⬊* T → L ⊢ ⬊* ⓓ{a}V. T.
+#a #L #V #HV elim HV -V #V #_ #IHV #T #HT @(csn_ind_alt … HT) -T #T #HT #IHT
+@csn_intro #X #H1 #H2
+elim (cpr_inv_abbr1 … H1) -H1 *
+[ #V0 #V1 #T1 #HLV0 #HLV01 #HLT1 #H destruct
+  lapply (cpr_intro … HLV0 HLV01) -HLV01 #HLV1
+  lapply (ltpr_cpr_trans (L. ⓓV) … HLT1) /2 width=1/ -V0 #HLT1
+  elim (eq_false_inv_tpair_sn … H2) -H2
+  [ #HV1 @IHV // /2 width=1/ -HV1
+    @(csn_lfpr_conf (L. ⓓV)) /2 width=1/ -HLV1 /2 width=3/
+  | -IHV -HLV1 * #H destruct /3 width=1/
+  ]
+| -IHV -IHT -H2 #T0 #HLT0 #HT0
+  lapply (csn_cpr_trans … HT … HLT0) -T #HLT0
+  lapply (csn_inv_lift … HLT0 … HT0) -T0 /2 width=3/
+]
+qed.
+
+fact csn_appl_beta_aux: ∀a,L,W. L ⊢ ⬊* W → ∀U. L ⊢ ⬊* U →
+                        ∀V,T. U = ⓓ{a}V. T → L ⊢ ⬊* ⓐV. ⓛ{a}W. T.
+#a #L #W #H elim H -W #W #_ #IHW #X #H @(csn_ind_alt … H) -X #X #HVT #IHVT #V #T #H destruct
+lapply (csn_fwd_pair_sn … HVT) #HV
+lapply (csn_fwd_bind_dx … HVT) #HT -HVT
+@csn_intro #X #H #H2
+elim (cpr_inv_appl1 … H) -H *
+[ #V0 #Y #HLV0 #H #H0 destruct
+  elim (cpr_inv_abst1 … H Abbr V) -H #W0 #T0 #HLW0 #HLT0 #H destruct
+  elim (eq_false_inv_beta … H2) -H2
+  [ -IHVT #HW0 @IHW -IHW [1,5: // |3: skip ] -HLW0 /2 width=1/ -HW0
+    @csn_abbr /2 width=3/ -HV
+    @(csn_lfpr_conf (L. ⓓV)) /2 width=1/ -V0 /2 width=3/
+  | -IHW -HLW0 -HV -HT * #H #HVT0 destruct
+    @(IHVT … HVT0) -IHVT -HVT0 // /2 width=1/
+  ]
+| -IHW -IHVT -H2 #b #V0 #W0 #T0 #T1 #HLV0 #HLT01 #H1 #H2 destruct
+  lapply (lfpr_cpr_trans (L. ⓓV) … HLT01) -HLT01 /2 width=1/ #HLT01
+  @csn_abbr /2 width=3/ -HV
+  @(csn_lfpr_conf (L. ⓓV)) /2 width=1/ -V0 /2 width=3/
+| -IHW -IHVT -HV -HT -H2 #b #V0 #V1 #W0 #W1 #T0 #T1 #_ #_ #_ #_ #H destruct
+]
+qed.
+
+(* Basic_1: was: sn3_beta *)
+lemma csn_appl_beta: ∀a,L,W. L ⊢ ⬊* W → ∀V,T. L ⊢ ⬊* ⓓ{a}V. T →
+                     L ⊢ ⬊* ⓐV. ⓛ{a}W. T.
+/2 width=3/ qed.
+
+fact csn_appl_theta_aux: ∀a,L,U. L ⊢ ⬊* U → ∀V1,V2. ⇧[0, 1] V1 ≡ V2 →
+                         ∀V,T. U = ⓓ{a}V. ⓐV2. T → L ⊢ ⬊* ⓐV1. ⓓ{a}V. T.
+#a #L #X #H @(csn_ind_alt … H) -X #X #HVT #IHVT #V1 #V2 #HV12 #V #T #H destruct
+lapply (csn_fwd_pair_sn … HVT) #HV
+lapply (csn_fwd_bind_dx … HVT) -HVT #HVT
+@csn_intro #X #HL #H
+elim (cpr_inv_appl1 … HL) -HL *
+[ -HV #V0 #Y #HLV10 #HL #H0 destruct
+  elim (cpr_inv_abbr1 … HL) -HL *
+  [ #V3 #V4 #T3 #HV3 #HLV34 #HLT3 #H0 destruct
+    lapply (cpr_intro … HV3 HLV34) -HLV34 #HLV34
+    elim (lift_total V0 0 1) #V5 #HV05
+    elim (term_eq_dec (ⓓ{a}V.ⓐV2.T) (ⓓ{a}V4.ⓐV5.T3))
+    [ -IHVT #H0 destruct
+      elim (eq_false_inv_tpair_sn … H) -H
+      [ -HLV10 -HLV34 -HV3 -HLT3 -HVT
+        >(lift_inj … HV12 … HV05) -V5
+        #H elim (H ?) //
+      | * #_ #H elim (H ?) //
+      ]
+    | -H -HVT #H
+      lapply (cpr_lift (L. ⓓV) … HV12 … HV05 HLV10) -HLV10 -HV12 /2 width=1/ #HV25
+      lapply (ltpr_cpr_trans (L. ⓓV) … HLT3) /2 width=1/ -HLT3 #HLT3
+      @(IHVT … H … HV05) -IHVT // -H -HV05 /3 width=1/
+    ]
+  | -H -IHVT #T0 #HLT0 #HT0 #H0 destruct
+    lapply (csn_cpr_trans … HVT (ⓐV2.T0) ?) /2 width=1/ -T #HVT0
+    lapply (csn_inv_lift L … 1 HVT0 ? ? ?) -HVT0 [ /2 width=4/ |2,3: skip | /2 width=1/ ] -V2 -T0 #HVY
+    @(csn_cpr_trans … HVY) /2 width=1/
+  ]
+| -HV -HV12 -HVT -IHVT -H #b #V0 #W0 #T0 #T1 #_ #_ #H destruct
+| -IHVT -H #b #V0 #V3 #W0 #W1 #T0 #T1 #HLV10 #HLW01 #HLT01 #HV03 #H1 #H2 destruct
+  lapply (cpr_lift (L. ⓓW0) … HV12 … HV03 HLV10) -HLV10 -HV12 -HV03 /2 width=1/ #HLV23
+  lapply (lfpr_cpr_trans (L. ⓓW0) … HLT01) -HLT01 /2 width=1/ #HLT01
+  @csn_abbr /2 width=3/ -HV
+  @(csn_lfpr_conf (L. ⓓW0)) /2 width=1/ -W1
+  @(csn_cprs_trans … HVT) -HVT /2 width=1/
+]
+qed.
+
+lemma csn_appl_theta: ∀a,V1,V2. ⇧[0, 1] V1 ≡ V2 →
+                      ∀L,V,T. L ⊢ ⬊* ⓓ{a}V. ⓐV2. T → L ⊢ ⬊* ⓐV1. ⓓ{a}V. T.
+/2 width=5/ qed.
+
+(* Basic_1: was only: sn3_appl_appl *)
+lemma csn_appl_simple_tstc: ∀L,V. L ⊢ ⬊* V → ∀T1.
+                            L ⊢ ⬊* T1 →
+                            (∀T2. L ⊢ T1 ➡* T2 → (T1 ≃ T2 → ⊥) → L ⊢ ⬊* ⓐV. T2) →
+                            𝐒⦃T1⦄ → L ⊢ ⬊* ⓐV. T1.
+#L #V #H @(csn_ind … H) -V #V #_ #IHV #T1 #H @(csn_ind … H) -T1 #T1 #H1T1 #IHT1 #H2T1 #H3T1
+@csn_intro #X #HL #H
+elim (cpr_inv_appl1_simple … HL ?) -HL //
+#V0 #T0 #HLV0 #HLT10 #H0 destruct
+elim (eq_false_inv_tpair_sn … H) -H
+[ -IHT1 #HV0
+  @(csn_cpr_trans … (ⓐV0.T1)) /2 width=1/ -HLT10
+  @IHV -IHV // -H1T1 -H3T1 /2 width=1/ -HV0
+  #T2 #HLT12 #HT12
+  @(csn_cpr_trans … (ⓐV.T2)) /2 width=1/ -HLV0
+  @H2T1 -H2T1 // -HLT12 /2 width=1/
+| -IHV -H1T1 -HLV0 * #H #H1T10 destruct
+  elim (tstc_dec T1 T0) #H2T10
+  [ @IHT1 -IHT1 // /2 width=1/ -H1T10 /2 width=3/ -H3T1
+    #T2 #HLT02 #HT02
+    @H2T1 -H2T1 /2 width=3/ -HLT10 -HLT02 /3 width=3/
+  | -IHT1 -H3T1 -H1T10
+    @H2T1 -H2T1 /2 width=1/
+  ]
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/csn_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/csn_lift.ma
new file mode 100644 (file)
index 0000000..4fd784d
--- /dev/null
@@ -0,0 +1,111 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/cnf_lift.ma".
+include "basic_2/computation/acp.ma".
+include "basic_2/computation/csn.ma".
+
+(* CONTEXT-SENSITIVE STRONGLY NORMALIZING TERMS *****************************)
+
+(* Relocation properties ****************************************************)
+
+(* Basic_1: was: sn3_lift *)
+lemma csn_lift: ∀L2,L1,T1,d,e. L1 ⊢ ⬊* T1 →
+                ∀T2. ⇩[d, e] L2 ≡ L1 → ⇧[d, e] T1 ≡ T2 → L2 ⊢ ⬊* T2.
+#L2 #L1 #T1 #d #e #H elim H -T1 #T1 #_ #IHT1 #T2 #HL21 #HT12
+@csn_intro #T #HLT2 #HT2
+elim (cpr_inv_lift1 … HL21 … HT12 … HLT2) -HLT2 #T0 #HT0 #HLT10
+@(IHT1 … HLT10) // -L1 -L2 #H destruct
+>(lift_mono … HT0 … HT12) in HT2; -T1 /2 width=1/
+qed.
+
+(* Basic_1: was: sn3_gen_lift *)
+lemma csn_inv_lift: ∀L2,L1,T1,d,e. L1 ⊢ ⬊* T1 →
+                    ∀T2. ⇩[d, e] L1 ≡ L2 → ⇧[d, e] T2 ≡ T1 → L2 ⊢ ⬊* T2.
+#L2 #L1 #T1 #d #e #H elim H -T1 #T1 #_ #IHT1 #T2 #HL12 #HT21
+@csn_intro #T #HLT2 #HT2
+elim (lift_total T d e) #T0 #HT0
+lapply (cpr_lift … HL12 … HT21 … HT0 HLT2) -HLT2 #HLT10
+@(IHT1 … HLT10) // -L1 -L2 #H destruct
+>(lift_inj … HT0 … HT21) in HT2; -T1 /2 width=1/
+qed.
+
+(* Advanced properties ******************************************************)
+
+(* Basic_1: was: sn3_abbr *)
+lemma csn_lref_abbr: ∀L,K,V,i. ⇩[0, i] L ≡ K. ⓓV → K ⊢ ⬊* V → L ⊢ ⬊* #i.
+#L #K #V #i #HLK #HV
+@csn_intro #X #H #Hi
+elim (cpr_inv_lref1 … H) -H
+[ #H destruct elim (Hi ?) //
+| -Hi * #K0 #V0 #V1 #HLK0 #HV01 #HV1 #_
+  lapply (ldrop_mono … HLK0 … HLK) -HLK #H destruct
+  lapply (ldrop_fwd_ldrop2 … HLK0) -HLK0 #HLK
+  @(csn_lift … HLK HV1) -HLK -HV1
+  @(csn_cpr_trans … HV) -HV
+  @(cpr_intro … HV01) -HV01 //
+]
+qed.
+
+lemma csn_abst: ∀a,L,W. L ⊢ ⬊* W → ∀I,V,T. L. ⓑ{I} V ⊢ ⬊* T → L ⊢ ⬊* ⓛ{a}W. T.
+#a #L #W #HW elim HW -W #W #_ #IHW #I #V #T #HT @(csn_ind … HT) -T #T #HT #IHT
+@csn_intro #X #H1 #H2
+elim (cpr_inv_abst1 … H1 I V) -H1
+#W0 #T0 #HLW0 #HLT0 #H destruct
+elim (eq_false_inv_tpair_sn … H2) -H2
+[ /3 width=5/
+| -HLW0 * #H destruct /3 width=1/
+]
+qed.
+
+lemma csn_appl_simple: ∀L,V. L ⊢ ⬊* V → ∀T1.
+                       (∀T2. L ⊢ T1 ➡ T2 → (T1 = T2 → ⊥) → L ⊢ ⬊* ⓐV. T2) →
+                       𝐒⦃T1⦄ → L ⊢ ⬊* ⓐV. T1.
+#L #V #H @(csn_ind … H) -V #V #_ #IHV #T1 #IHT1 #HT1
+@csn_intro #X #H1 #H2
+elim (cpr_inv_appl1_simple … H1 ?) // -H1
+#V0 #T0 #HLV0 #HLT10 #H destruct
+elim (eq_false_inv_tpair_dx … H2) -H2
+[ -IHV -HT1 #HT10
+  @(csn_cpr_trans … (ⓐV.T0)) /2 width=1/ -HLV0
+  @IHT1 -IHT1 // /2 width=1/
+| -HLT10 * #H #HV0 destruct
+  @IHV -IHV // -HT1 /2 width=1/ -HV0
+  #T2 #HLT02 #HT02
+  @(csn_cpr_trans … (ⓐV.T2)) /2 width=1/ -HLV0
+  @IHT1 -IHT1 // -HLT02 /2 width=1/
+]
+qed.
+
+(* Advanced inversion lemmas ************************************************)
+
+(* Basic_1: was: sn3_gen_def *)
+lemma csn_inv_lref_abbr: ∀L,K,V,i. ⇩[0, i] L ≡ K. ⓓV → L ⊢ ⬊* #i → K ⊢ ⬊* V.
+#L #K #V #i #HLK #Hi
+elim (lift_total V 0 (i+1)) #V0 #HV0
+lapply (ldrop_fwd_ldrop2 … HLK) #H0LK
+@(csn_inv_lift … H0LK … HV0) -H0LK
+@(csn_cpr_trans … Hi) -Hi /2 width=6/
+qed-.
+
+(* Main properties **********************************************************)
+
+theorem csn_acp: acp cpr (eq …) (csn …).
+@mk_acp
+[ /2 width=1/
+| /2 width=3/
+| /2 width=5/
+| @cnf_lift
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/csn_tstc_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/csn_tstc_vector.ma
new file mode 100644 (file)
index 0000000..cfee668
--- /dev/null
@@ -0,0 +1,117 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/acp_cr.ma".
+include "basic_2/computation/cprs_tstc_vector.ma".
+include "basic_2/computation/csn_lfpr.ma".
+include "basic_2/computation/csn_vector.ma".
+
+(* CONTEXT-SENSITIVE STRONGLY NORMALIZING TERM VECTORS **********************)
+
+(* Advanced properties ******************************************************)
+
+(* Basic_1: was only: sn3_appls_lref *)
+lemma csn_applv_cnf: ∀L,T. 𝐒⦃T⦄ → L ⊢ 𝐍⦃T⦄ → 
+                     ∀Vs. L ⊢ ⬊* Vs → L ⊢ ⬊* ⒶVs.T.
+#L #T #H1T #H2T #Vs elim Vs -Vs [ #_ @(csn_cnf … H2T) ] (**) (* /2 width=1/ does not work *)
+#V #Vs #IHV #H
+elim (csnv_inv_cons … H) -H #HV #HVs
+@csn_appl_simple_tstc // -HV /2 width=1/ -IHV -HVs
+#X #H #H0
+lapply (cprs_fwd_cnf_vector … H) -H // -H1T -H2T #H
+elim (H0 ?) -H0 //
+qed.
+
+(* Basic_1: was: sn3_appls_beta *)
+lemma csn_applv_beta: ∀a,L,W. L ⊢ ⬊* W →
+                      ∀Vs,V,T. L ⊢ ⬊* ⒶVs.ⓓ{a}V.T →
+                      L ⊢ ⬊* ⒶVs. ⓐV.ⓛ{a}W. T.
+#a #L #W #HW #Vs elim Vs -Vs /2 width=1/ -HW
+#V0 #Vs #IHV #V #T #H1T
+lapply (csn_fwd_pair_sn … H1T) #HV0
+lapply (csn_fwd_flat_dx … H1T) #H2T
+@csn_appl_simple_tstc // -HV0 /2 width=1/ -IHV -H2T
+#X #H #H0
+elim (cprs_fwd_beta_vector … H) -H #H
+[ -H1T elim (H0 ?) -H0 //
+| -H0 @(csn_cprs_trans … H1T) -H1T /2 width=1/
+]
+qed.
+
+lemma csn_applv_delta: ∀L,K,V1,i. ⇩[0, i] L ≡ K. ⓓV1 →
+                       ∀V2. ⇧[0, i + 1] V1 ≡ V2 →
+                       ∀Vs.L ⊢ ⬊* (ⒶVs. V2) → L ⊢ ⬊* (ⒶVs. #i).
+#L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs
+[ #H
+  lapply (ldrop_fwd_ldrop2 … HLK) #HLK0
+  lapply (csn_inv_lift … H … HLK0 HV12) -V2 -HLK0 /2 width=4/
+| #V #Vs #IHV #H1T
+  lapply (csn_fwd_pair_sn … H1T) #HV
+  lapply (csn_fwd_flat_dx … H1T) #H2T
+  @csn_appl_simple_tstc // -HV /2 width=1/ -IHV -H2T
+  #X #H #H0
+  elim (cprs_fwd_delta_vector … HLK … HV12 … H) -HLK -HV12 -H #H
+  [ -H1T elim (H0 ?) -H0 //
+  | -H0 @(csn_cprs_trans … H1T) -H1T /2 width=1/
+  ]
+]
+qed.
+
+(* Basic_1: was: sn3_appls_abbr *) 
+lemma csn_applv_theta: ∀a,L,V1s,V2s. ⇧[0, 1] V1s ≡ V2s →
+                       ∀V,T. L ⊢ ⬊* ⓓ{a}V. ⒶV2s. T → L ⊢ ⬊* V →
+                       L ⊢ ⬊* ⒶV1s. ⓓ{a}V. T.
+#a #L #V1s #V2s * -V1s -V2s /2 width=1/
+#V1s #V2s #V1 #V2 #HV12 #H 
+generalize in match HV12; -HV12 generalize in match V2; -V2 generalize in match V1; -V1
+elim H -V1s -V2s /2 width=3/
+#V1s #V2s #V1 #V2 #HV12 #HV12s #IHV12s #W1 #W2 #HW12 #V #T #H #HV
+lapply (csn_appl_theta … HW12 … H) -H -HW12 #H
+lapply (csn_fwd_pair_sn … H) #HW1
+lapply (csn_fwd_flat_dx … H) #H1
+@csn_appl_simple_tstc // -HW1 /2 width=3/ -IHV12s -HV -H1 #X #H1 #H2
+elim (cprs_fwd_theta_vector … (V2@V2s) … H1) -H1 /2 width=1/ -HV12s -HV12
+[ -H #H elim (H2 ?) -H2 //
+| -H2 #H1 @(csn_cprs_trans … H) -H /2 width=1/
+]
+qed.
+
+(* Basic_1: was: sn3_appls_cast *)
+lemma csn_applv_tau: ∀L,W. L ⊢ ⬊* W →
+                     ∀Vs,T. L ⊢ ⬊* ⒶVs. T →
+                     L ⊢ ⬊* ⒶVs. ⓝW. T.
+#L #W #HW #Vs elim Vs -Vs /2 width=1/ -HW
+#V #Vs #IHV #T #H1T
+lapply (csn_fwd_pair_sn … H1T) #HV
+lapply (csn_fwd_flat_dx … H1T) #H2T
+@csn_appl_simple_tstc // -HV /2 width=1/ -IHV -H2T
+#X #H #H0
+elim (cprs_fwd_tau_vector … H) -H #H
+[ -H1T elim (H0 ?) -H0 //
+| -H0 @(csn_cprs_trans … H1T) -H1T /2 width=1/
+]
+qed.
+
+theorem csn_acr: acr cpr (eq …) (csn …) (λL,T. L ⊢ ⬊* T).
+@mk_acr //
+[ /3 width=1/
+| /2 width=1/
+| /2 width=6/
+| #L #V1 #V2 #HV12 #a #V #T #H #HVT
+  @(csn_applv_theta … HV12) -HV12 //
+  @(csn_abbr) //
+| /2 width=1/
+| @csn_lift
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/csn_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/csn_vector.ma
new file mode 100644 (file)
index 0000000..7c26ef4
--- /dev/null
@@ -0,0 +1,30 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/term_vector.ma".
+include "basic_2/computation/csn.ma".
+
+(* CONTEXT-SENSITIVE STRONGLY NORMALIZING TERM VECTORS **********************)
+
+definition csnv: lenv → predicate (list term) ≝
+                 λL. all … (csn L).
+
+interpretation
+   "context-sensitive strong normalization (term vector)"
+   'SN L Ts = (csnv L Ts).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma csnv_inv_cons: ∀L,T,Ts. L ⊢ ⬊* T @ Ts → L ⊢ ⬊* T ∧ L ⊢ ⬊* Ts.
+normalize // qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fprs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/fprs.ma
new file mode 100644 (file)
index 0000000..61c7207
--- /dev/null
@@ -0,0 +1,47 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/fpr.ma".
+
+(* CONTEXT-FREE PARALLEL COMPUTATION ON CLOSURES ****************************)
+
+definition fprs: bi_relation lenv term ≝ bi_TC … fpr.
+
+interpretation "context-free parallel computation (closure)"
+   'FocalizedPRedStar L1 T1 L2 T2 = (fprs L1 T1 L2 T2).
+
+(* Basic eliminators ********************************************************)
+
+lemma fprs_ind: ∀L1,T1. ∀R:relation2 lenv term. R L1 T1 →
+                (∀L,L2,T,T2. ⦃L1, T1⦄ ➡* ⦃L, T⦄ → ⦃L, T⦄ ➡ ⦃L2, T2⦄ → R L T → R L2 T2) →
+                ∀L2,T2. ⦃L1, T1⦄ ➡* ⦃L2, T2⦄ → R L2 T2.
+/3 width=7 by bi_TC_star_ind/ qed-.
+
+lemma fprs_ind_dx: ∀L2,T2. ∀R:relation2 lenv term. R L2 T2 →
+                   (∀L1,L,T1,T. ⦃L1, T1⦄ ➡ ⦃L, T⦄ → ⦃L, T⦄ ➡* ⦃L2, T2⦄ → R L T → R L1 T1) →
+                   ∀L1,T1. ⦃L1, T1⦄ ➡* ⦃L2, T2⦄ → R L1 T1.
+/3 width=7 by bi_TC_star_ind_dx/ qed-.
+
+(* Basic properties *********************************************************)
+
+lemma fprs_refl: bi_reflexive … fprs.
+/2 width=1/ qed.
+
+lemma fprs_strap1: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ➡* ⦃L, T⦄ → ⦃L, T⦄ ➡ ⦃L2, T2⦄ →
+                   ⦃L1, T1⦄ ➡* ⦃L2, T2⦄.
+/2 width=4/ qed.
+
+lemma fprs_strap2: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ➡ ⦃L, T⦄ → ⦃L, T⦄ ➡* ⦃L2, T2⦄ →
+                   ⦃L1, T1⦄ ➡* ⦃L2, T2⦄.
+/2 width=4/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fprs_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/fprs_aaa.ma
new file mode 100644 (file)
index 0000000..b76637f
--- /dev/null
@@ -0,0 +1,26 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/cfpr_aaa.ma".
+include "basic_2/computation/fprs.ma".
+
+(* CONTEXT-FREE PARALLEL COMPUTATION ON CLOSURES ****************************)
+
+(* Properties about atomic arity assignment on terms ************************)
+
+lemma aaa_fprs_conf: ∀L1,T1,A. L1 ⊢ T1 ⁝ A →
+                     ∀L2,T2. ⦃L1, T1⦄ ➡* ⦃L2, T2⦄ → L2 ⊢ T2 ⁝ A.
+#L1 #T1 #A #HT1 #L2 #T2 #HLT12
+@(bi_TC_Conf3 … HT1 ?? HLT12) /2 width=4/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fprs_cprs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/fprs_cprs.ma
new file mode 100644 (file)
index 0000000..4e7a633
--- /dev/null
@@ -0,0 +1,70 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/fpr_cpr.ma".
+include "basic_2/computation/cprs.ma".
+include "basic_2/computation/fprs.ma".
+
+(* CONTEXT-FREE PARALLEL COMPUTATION ON CLOSURES ****************************)
+
+(* Properties on context-sensitive parallel computation for terms ***********)
+
+lemma cprs_fprs: ∀L,T1,T2. L ⊢ T1 ➡* T2 → ⦃L, T1⦄ ➡* ⦃L, T2⦄.
+#L #T1 #T2 #H @(cprs_ind … H) -T2 // /3 width=4/
+qed.
+(*
+(* Advanced propertis *******************************************************)
+
+lamma fpr_bind_sn: ∀L1,L2,V1,V2. ⦃L1, V1⦄ ➡ ⦃L2, V2⦄ → ∀T1,T2. T1 ➡ T2 →
+                   ∀a,I. ⦃L1, ⓑ{a,I}V1.T1⦄ ➡ ⦃L2, ⓑ{a,I}V2.T2⦄.
+#L1 #L2 #V1 #V2 #H #T1 #T2 #HT12 #a #I
+elim (fpr_inv_all … H) /3 width=4/
+qed.
+
+(* Advanced forward lemmas **************************************************)
+
+lamma fpr_fwd_shift_bind_minus: ∀I1,I2,L1,L2,V1,V2,T1,T2.
+                                ⦃L1, -ⓑ{I1}V1.T1⦄ ➡ ⦃L2, -ⓑ{I2}V2.T2⦄ →
+                                ⦃L1, V1⦄ ➡ ⦃L2, V2⦄ ∧ I1 = I2.
+* #I2 #L1 #L2 #V1 #V2 #T1 #T2 #H
+elim (fpr_inv_all … H) -H #L #HL1 #H #HL2
+[ elim (cpr_inv_abbr1 … H) -H *
+  [ #V #V0 #T #HV1 #HV0 #_ #H destruct /4 width=4/
+  | #T #_ #_ #H destruct
+  ]
+| elim (cpr_inv_abst1 … H Abst V2) -H
+  #V #T #HV1 #_ #H destruct /3 width=4/
+]
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lamma fpr_inv_pair1: ∀I,K1,L2,V1,T1,T2. ⦃K1.ⓑ{I}V1, T1⦄ ➡ ⦃L2, T2⦄ →
+                     ∃∃K2,V2. ⦃K1, V1⦄  ➡ ⦃K2, V2⦄ &
+                              ⦃K1, -ⓑ{I}V1.T1⦄ ➡ ⦃K2, -ⓑ{I}V2.T2⦄  &
+                              L2 = K2.ⓑ{I}V2.
+#I1 #K1 #X #V1 #T1 #T2 #H
+elim (fpr_fwd_pair1 … H) -H #I2 #K2 #V2 #HT12 #H destruct
+elim (fpr_fwd_shift_bind_minus … HT12) #HV12 #H destruct /2 width=5/
+qed-.
+
+lamma fpr_inv_pair3: ∀I,L1,K2,V2,T1,T2. ⦃L1, T1⦄ ➡ ⦃K2.ⓑ{I}V2, T2⦄ →
+                     ∃∃K1,V1. ⦃K1, V1⦄  ➡ ⦃K2, V2⦄ &
+                              ⦃K1, -ⓑ{I}V1.T1⦄ ➡ ⦃K2, -ⓑ{I}V2.T2⦄  &
+                              L1 = K1.ⓑ{I}V1.
+#I2 #X #K2 #V2 #T1 #T2 #H
+elim (fpr_fwd_pair3 … H) -H #I1 #K1 #V1 #HT12 #H destruct
+elim (fpr_fwd_shift_bind_minus … HT12) #HV12 #H destruct /2 width=5/
+qed-.
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fprs_fprs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/fprs_fprs.ma
new file mode 100644 (file)
index 0000000..e0c1b30
--- /dev/null
@@ -0,0 +1,34 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/fpr_fpr.ma".
+include "basic_2/computation/fprs.ma".
+
+(* CONTEXT-FREE PARALLEL COMPUTATION ON CLOSURES ****************************)
+
+(* Advanced properties ******************************************************)
+
+lemma fprs_strip: ∀L0,L1,T0,T1. ⦃L0, T0⦄ ➡ ⦃L1, T1⦄ →
+                  ∀L2,T2. ⦃L0, T0⦄ ➡* ⦃L2, T2⦄ →
+                  ∃∃L,T. ⦃L1, T1⦄ ➡* ⦃L, T⦄ & ⦃L2, T2⦄ ➡ ⦃L, T⦄.
+#H1 #H2 #H3 #H4 #H5 #H6 #H7 #H8
+/2 width=4/ qed.
+
+(* Main propertis ***********************************************************)
+
+theorem fprs_conf: bi_confluent … fprs.
+/2 width=4/ qed.
+
+theorem fprs_trans: bi_transitive … fprs.
+/2 width=4/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lfprs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lfprs.ma
new file mode 100644 (file)
index 0000000..a193f3c
--- /dev/null
@@ -0,0 +1,50 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/lfpr.ma".
+
+(* FOCALIZED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *********************)
+
+definition lfprs: relation lenv ≝ TC … lfpr.
+
+interpretation
+  "focalized parallel computation (environment)"
+  'FocalizedPRedStar L1 L2 = (lfprs L1 L2).
+
+(* Basic eliminators ********************************************************)
+
+lemma lfprs_ind: ∀L1. ∀R:predicate lenv. R L1 →
+                 (∀L,L2. ⦃L1⦄ ➡* ⦃L⦄ → ⦃L⦄ ➡ ⦃L2⦄ → R L → R L2) →
+                 ∀L2. ⦃L1⦄ ➡* ⦃L2⦄ → R L2.
+#L1 #R #HL1 #IHL1 #L2 #HL12
+@(TC_star_ind … HL1 IHL1 … HL12) //
+qed-.
+
+lemma lfprs_ind_dx: ∀L2. ∀R:predicate lenv. R L2 →
+                    (∀L1,L. ⦃L1⦄ ➡ ⦃L⦄ → ⦃L⦄ ➡* ⦃L2⦄ → R L → R L1) →
+                    ∀L1. ⦃L1⦄ ➡* ⦃L2⦄ → R L1.
+#L2 #R #HL2 #IHL2 #L1 #HL12
+@(TC_star_ind_dx … HL2 IHL2 … HL12) //
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma lfprs_refl: ∀L. ⦃L⦄ ➡* ⦃L⦄.
+/2 width=1/ qed.
+
+lemma lfprs_strap1: ∀L1,L,L2. ⦃L1⦄ ➡* ⦃L⦄ → ⦃L⦄ ➡ ⦃L2⦄ → ⦃L1⦄ ➡* ⦃L2⦄.
+/2 width=3/ qed.
+
+lemma lfprs_strap2: ∀L1,L,L2. ⦃L1⦄ ➡ ⦃L⦄ → ⦃L⦄ ➡* ⦃L2⦄ → ⦃L1⦄ ➡* ⦃L2⦄.
+/2 width=3/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lfprs_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lfprs_aaa.ma
new file mode 100644 (file)
index 0000000..5c6cd31
--- /dev/null
@@ -0,0 +1,25 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/lfpr_aaa.ma".
+include "basic_2/computation/lfprs.ma".
+
+(* FOCALIZED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *********************)
+
+(* Properties about atomic arity assignment on terms ************************)
+
+lemma aaa_lfprs_conf: ∀L1,T,A. L1 ⊢ T ⁝ A → ∀L2. ⦃L1⦄ ➡* ⦃L2⦄ → L2 ⊢ T ⁝ A.
+#L1 #T #A #HT #L2 #HL12
+@(TC_Conf3 … (λL,A. L ⊢ T ⁝ A) … HT ? HL12) /2 width=3/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lfprs_cprs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lfprs_cprs.ma
new file mode 100644 (file)
index 0000000..b0f7c4a
--- /dev/null
@@ -0,0 +1,27 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/lfpr_cpr.ma".
+include "basic_2/computation/cprs.ma".
+include "basic_2/computation/lfprs.ma".
+
+(* FOCALIZED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *********************)
+
+(* Advanced properties ******************************************************)
+
+lemma lfprs_pair_dx: ∀I,L1,L2. ⦃L1⦄ ➡ ⦃L2⦄ → ∀V1,V2. L2 ⊢ V1 ➡* V2 →
+                     ⦃L1. ⓑ{I} V1⦄ ➡* ⦃L2. ⓑ{I} V2⦄.
+#I #L1 #L2 #HL12 #V1 #V2 #H @(cprs_ind … H) -V2
+/3 width=1/ /3 width=5/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lfprs_lfprs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lfprs_lfprs.ma
new file mode 100644 (file)
index 0000000..e3866fd
--- /dev/null
@@ -0,0 +1,40 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/lfpr_lfpr.ma".
+include "basic_2/computation/lfprs_cprs.ma".
+
+(* FOCALIZED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *********************)
+
+(* Advanced properties ******************************************************)
+
+lemma lfprs_strip: ∀L,L1. ⦃L⦄ ➡* ⦃L1⦄ → ∀L2. ⦃L⦄ ➡ ⦃L2⦄ →
+                   ∃∃L0. ⦃L1⦄ ➡ ⦃L0⦄ & ⦃L2⦄ ➡* ⦃L0⦄.
+/3 width=3/ qed.
+
+(* Main properties **********************************************************)
+
+theorem lfprs_conf: ∀L,L1. ⦃L⦄ ➡* ⦃L1⦄ → ∀L2. ⦃L⦄ ➡* ⦃L2⦄ →
+                    ∃∃L0. ⦃L1⦄ ➡* ⦃L0⦄ & ⦃L2⦄ ➡* ⦃L0⦄.
+/3 width=3/ qed.
+
+theorem lfprs_trans: ∀L1,L. ⦃L1⦄ ➡* ⦃L⦄ → ∀L2. ⦃L⦄ ➡* ⦃L2⦄ → ⦃L1⦄ ➡* ⦃L2⦄.
+/2 width=3/ qed.
+
+lemma lfprs_pair: ∀L1,L2. ⦃L1⦄ ➡* ⦃L2⦄ → ∀V1,V2. L2 ⊢ V1 ➡* V2 →
+                  ∀I. ⦃L1. ⓑ{I} V1⦄ ➡* ⦃L2. ⓑ{I} V2⦄.
+#L1 #L2 #H @(lfprs_ind … H) -L2 /2 width=1/
+#L #L2 #_ #HL2 #IHL1 #V1 #V2 #HV12 #I
+@(lfprs_trans … (L.ⓑ{I}V1)) /2 width=1/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lsubc.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lsubc.ma
new file mode 100644 (file)
index 0000000..bcf6c77
--- /dev/null
@@ -0,0 +1,106 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/aaa.ma".
+include "basic_2/computation/acp_cr.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR ABSTRACT CANDIDATES OF REDUCIBILITY *****)
+
+inductive lsubc (RP:lenv→predicate term): relation lenv ≝
+| lsubc_atom: lsubc RP (⋆) (⋆)
+| lsubc_pair: ∀I,L1,L2,V. lsubc RP L1 L2 → lsubc RP (L1. ⓑ{I} V) (L2. ⓑ{I} V)
+| lsubc_abbr: ∀L1,L2,V,W,A. ⦃L1, V⦄ ϵ[RP] 〚A〛 → L2 ⊢ W ⁝ A →
+              lsubc RP L1 L2 → lsubc RP (L1. ⓓV) (L2. ⓛW)
+.
+
+interpretation
+  "local environment refinement (abstract candidates of reducibility)"
+  'CrSubEq L1 RP L2 = (lsubc RP L1 L2).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact lsubc_inv_atom1_aux: ∀RP,L1,L2. L1 ⊑[RP] L2 → L1 = ⋆ → L2 = ⋆.
+#RP #L1 #L2 * -L1 -L2
+[ //
+| #I #L1 #L2 #V #_ #H destruct
+| #L1 #L2 #V #W #A #_ #_ #_ #H destruct
+]
+qed.
+
+(* Basic_1: was: csubc_gen_sort_r *)
+lemma lsubc_inv_atom1: ∀RP,L2. ⋆ ⊑[RP] L2 → L2 = ⋆.
+/2 width=4/ qed-.
+
+fact lsubc_inv_pair1_aux: ∀RP,L1,L2. L1 ⊑[RP] L2 → ∀I,K1,V. L1 = K1. ⓑ{I} V →
+                          (∃∃K2. K1 ⊑[RP] K2 & L2 = K2. ⓑ{I} V) ∨
+                          ∃∃K2,W,A. ⦃K1, V⦄ ϵ[RP] 〚A〛 & K2 ⊢ W ⁝ A &
+                                    K1 ⊑[RP] K2 &
+                                    L2 = K2. ⓛW & I = Abbr.
+#RP #L1 #L2 * -L1 -L2
+[ #I #K1 #V #H destruct
+| #J #L1 #L2 #V #HL12 #I #K1 #W #H destruct /3 width=3/
+| #L1 #L2 #V1 #W2 #A #HV1 #HW2 #HL12 #I #K1 #V #H destruct /3 width=7/
+]
+qed.
+
+(* Basic_1: was: csubc_gen_head_r *)
+lemma lsubc_inv_pair1: ∀RP,I,K1,L2,V. K1. ⓑ{I} V ⊑[RP] L2 →
+                       (∃∃K2. K1 ⊑[RP] K2 & L2 = K2. ⓑ{I} V) ∨
+                       ∃∃K2,W,A. ⦃K1, V⦄ ϵ[RP] 〚A〛 & K2 ⊢ W ⁝ A &
+                                 K1 ⊑[RP] K2 &
+                                 L2 = K2. ⓛW & I = Abbr.
+/2 width=3/ qed-.
+
+fact lsubc_inv_atom2_aux: ∀RP,L1,L2. L1 ⊑[RP] L2 → L2 = ⋆ → L1 = ⋆.
+#RP #L1 #L2 * -L1 -L2
+[ //
+| #I #L1 #L2 #V #_ #H destruct
+| #L1 #L2 #V #W #A #_ #_ #_ #H destruct
+]
+qed.
+
+(* Basic_1: was: csubc_gen_sort_l *)
+lemma lsubc_inv_atom2: ∀RP,L1. L1 ⊑[RP] ⋆ → L1 = ⋆.
+/2 width=4/ qed-.
+
+fact lsubc_inv_pair2_aux: ∀RP,L1,L2. L1 ⊑[RP] L2 → ∀I,K2,W. L2 = K2. ⓑ{I} W →
+                          (∃∃K1. K1 ⊑[RP] K2 & L1 = K1. ⓑ{I} W) ∨
+                          ∃∃K1,V,A. ⦃K1, V⦄ ϵ[RP] 〚A〛 & K2 ⊢ W ⁝ A &
+                                    K1 ⊑[RP] K2 &
+                                    L1 = K1. ⓓV & I = Abst.
+#RP #L1 #L2 * -L1 -L2
+[ #I #K2 #W #H destruct
+| #J #L1 #L2 #V #HL12 #I #K2 #W #H destruct /3 width=3/
+| #L1 #L2 #V1 #W2 #A #HV1 #HW2 #HL12 #I #K2 #W #H destruct /3 width=7/
+]
+qed.
+
+(* Basic_1: was: csubc_gen_head_l *)
+lemma lsubc_inv_pair2: ∀RP,I,L1,K2,W. L1 ⊑[RP] K2. ⓑ{I} W →
+                       (∃∃K1. K1 ⊑[RP] K2 & L1 = K1. ⓑ{I} W) ∨
+                       ∃∃K1,V,A. ⦃K1, V⦄ ϵ[RP] 〚A〛 & K2 ⊢ W ⁝ A &
+                                 K1 ⊑[RP] K2 &
+                                 L1 = K1. ⓓV & I = Abst.
+/2 width=3/ qed-.
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was: csubc_refl *)
+lemma lsubc_refl: ∀RP,L. L ⊑[RP] L.
+#RP #L elim L -L // /2 width=1/
+qed.
+
+(* Basic_1: removed theorems 3:
+            csubc_clear_conf csubc_getl_conf csubc_csuba
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lsubc_ldrop.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lsubc_ldrop.ma
new file mode 100644 (file)
index 0000000..a7c7c7a
--- /dev/null
@@ -0,0 +1,67 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/aaa_lift.ma".
+include "basic_2/computation/lsubc.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR ABSTRACT CANDIDATES OF REDUCIBILITY *****)
+
+(* Properties concerning basic local environment slicing ********************)
+
+(* Basic_1: was: csubc_drop_conf_O *)
+(* Note: the constant 0 can not be generalized *)
+lemma lsubc_ldrop_O1_trans: ∀RP,L1,L2. L1 ⊑[RP] L2 → ∀K2,e. ⇩[0, e] L2 ≡ K2 →
+                            ∃∃K1. ⇩[0, e] L1 ≡ K1 & K1 ⊑[RP] K2.
+#RP #L1 #L2 #H elim H -L1 -L2
+[ #X #e #H
+  >(ldrop_inv_atom1 … H) -H /2 width=3/
+| #I #L1 #L2 #V #_ #IHL12 #X #e #H
+  elim (ldrop_inv_O1 … H) -H * #He #H destruct
+  [ elim (IHL12 L2 0 ?) -IHL12 // #X #H <(ldrop_inv_refl … H) -H /3 width=3/
+  | elim (IHL12 … H) -L2 /3 width=3/
+  ]
+| #L1 #L2 #V #W #A #HV #HW #_ #IHL12 #X #e #H
+  elim (ldrop_inv_O1 … H) -H * #He #H destruct
+  [ elim (IHL12 L2 0 ?) -IHL12 // #X #H <(ldrop_inv_refl … H) -H /3 width=7/
+  | elim (IHL12 … H) -L2 /3 width=3/
+  ]
+qed-.
+
+(* Basic_1: was: csubc_drop_conf_rev *)
+lemma ldrop_lsubc_trans: ∀RR,RS,RP.
+                         acp RR RS RP → acr RR RS RP (λL,T. RP L T) →
+                         ∀L1,K1,d,e. ⇩[d, e] L1 ≡ K1 → ∀K2. K1 ⊑[RP] K2 →
+                         ∃∃L2. L1 ⊑[RP] L2 & ⇩[d, e] L2 ≡ K2.
+#RR #RS #RP #Hacp #Hacr #L1 #K1 #d #e #H elim H -L1 -K1 -d -e
+[ #d #e #X #H
+  >(lsubc_inv_atom1 … H) -H /2 width=3/
+| #L1 #I #V1 #X #H
+  elim (lsubc_inv_pair1 … H) -H *
+  [ #K1 #HLK1 #H destruct /3 width=3/
+  | #K1 #W1 #A #HV1 #HW1 #HLK1 #H1 #H2 destruct /3 width=3/
+  ]
+| #L1 #K1 #I #V1 #e #_ #IHLK1 #K2 #HK12
+  elim (IHLK1 … HK12) -K1 /3 width=5/
+| #L1 #K1 #I #V1 #V2 #d #e #HLK1 #HV21 #IHLK1 #X #H
+  elim (lsubc_inv_pair1 … H) -H *
+  [ #K2 #HK12 #H destruct
+    elim (IHLK1 … HK12) -K1 /3 width=5/
+  | #K2 #W2 #A #HV2 #HW2 #HK12 #H1 #H2 destruct
+    elim (IHLK1 … HK12) #K #HL1K #HK2
+    lapply (aacr_acr … Hacp Hacr A) -Hacp -Hacr #HA
+    lapply (s7 … HA … HV2 … HLK1 HV21) -HV2
+    elim (lift_total W2 d e) /4 width=9/
+  ]
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lsubc_ldrops.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lsubc_ldrops.ma
new file mode 100644 (file)
index 0000000..4e26322
--- /dev/null
@@ -0,0 +1,32 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/lsubc_ldrop.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR ABSTRACT CANDIDATES OF REDUCIBILITY *****)
+
+(* Properties concerning generic local environment slicing ******************)
+
+(* Basic_1: was: csubc_drop1_conf_rev *)
+lemma ldrops_lsubc_trans: ∀RR,RS,RP.
+                          acp RR RS RP → acr RR RS RP (λL,T. RP L T) →
+                          ∀L1,K1,des. ⇩*[des] L1 ≡ K1 → ∀K2. K1 ⊑[RP] K2 →
+                          ∃∃L2. L1 ⊑[RP] L2 & ⇩*[des] L2 ≡ K2.
+#RR #RS #RP #Hacp #Hacr #L1 #K1 #des #H elim H -L1 -K1 -des
+[ /2 width=3/
+| #L1 #L #K1 #des #d #e #_ #HLK1 #IHL #K2 #HK12
+  elim (ldrop_lsubc_trans … Hacp Hacr … HLK1 … HK12) -Hacp -Hacr -K1 #K #HLK #HK2
+  elim (IHL … HLK) -IHL -HLK /3 width=5/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lsubc_lsuba.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lsubc_lsuba.ma
new file mode 100644 (file)
index 0000000..aad454f
--- /dev/null
@@ -0,0 +1,26 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/lsuba.ma".
+include "basic_2/computation/acp_aaa.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR ABSTRACT CANDIDATES OF REDUCIBILITY *****)
+
+(* properties concerning lenv refinement for atomic arity assignment ********)
+
+lemma lsubc_lsuba: ∀RR,RS,RP. acp RR RS RP → acr RR RS RP (λL,T. RP L T) →
+                   ∀L1,L2. L1 ⁝⊑ L2 → L1 ⊑[RP] L2.
+#RR #RS #RP #H1RP #H2RP #L1 #L2 #H elim H -L1 -L2
+// /2 width=1/ /3 width=4/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/ltprs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/ltprs.ma
new file mode 100644 (file)
index 0000000..b7b0e10
--- /dev/null
@@ -0,0 +1,81 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/ltpr.ma".
+include "basic_2/computation/tprs.ma".
+
+(* CONTEXT-FREE PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ******************)
+
+definition ltprs: relation lenv ≝ TC … ltpr.
+
+interpretation
+  "context-free parallel computation (environment)"
+  'PRedStar L1 L2 = (ltprs L1 L2).
+
+(* Basic eliminators ********************************************************)
+
+lemma ltprs_ind: ∀L1. ∀R:predicate lenv. R L1 →
+                 (∀L,L2. L1 ➡* L → L ➡ L2 → R L → R L2) →
+                 ∀L2. L1 ➡* L2 → R L2.
+#L1 #R #HL1 #IHL1 #L2 #HL12
+@(TC_star_ind … HL1 IHL1 … HL12) //
+qed-.
+
+lemma ltprs_ind_dx: ∀L2. ∀R:predicate lenv. R L2 →
+                    (∀L1,L. L1 ➡ L → L ➡* L2 → R L → R L1) →
+                    ∀L1. L1 ➡* L2 → R L1.
+#L2 #R #HL2 #IHL2 #L1 #HL12
+@(TC_star_ind_dx … HL2 IHL2 … HL12) //
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma ltprs_refl: reflexive … ltprs.
+/2 width=1/ qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma ltprs_inv_atom1: ∀L2. ⋆ ➡* L2 → L2 = ⋆.
+#L2 #H @(ltprs_ind … H) -L2 //
+#L #L2 #_ #HL2 #IHL1 destruct
+>(ltpr_inv_atom1 … HL2) -L2 //
+qed-.
+
+lemma ltprs_inv_pair1: ∀I,K1,L2,V1. K1. ⓑ{I} V1 ➡* L2 →
+                       ∃∃K2,V2. K1 ➡* K2 & V1 ➡* V2 & L2 = K2. ⓑ{I} V2.
+#I #K1 #L2 #V1 #H @(ltprs_ind … H) -L2 /2 width=5/
+#L #L2 #_ #HL2 * #K #V #HK1 #HV1 #H destruct
+elim (ltpr_inv_pair1 … HL2) -HL2 #K2 #V2 #HK2 #HV2 #H destruct /3 width=5/
+qed-.
+
+lemma ltprs_inv_atom2: ∀L1. L1 ➡* ⋆ → L1 = ⋆.
+#L1 #H @(ltprs_ind_dx … H) -L1 //
+#L1 #L #HL1 #_ #IHL2 destruct
+>(ltpr_inv_atom2 … HL1) -L1 //
+qed-.
+
+lemma ltprs_inv_pair2: ∀I,L1,K2,V2. L1 ➡* K2. ⓑ{I} V2 →
+                       ∃∃K1,V1. K1 ➡* K2 & V1 ➡* V2 & L1 = K1. ⓑ{I} V1.
+#I #L1 #K2 #V2 #H @(ltprs_ind_dx … H) -L1 /2 width=5/
+#L1 #L #HL1 #_ * #K #V #HK2 #HV2 #H destruct
+elim (ltpr_inv_pair2 … HL1) -HL1 #K1 #V1 #HK1 #HV1 #H destruct /3 width=5/
+qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma ltprs_fwd_length: ∀L1,L2. L1 ➡* L2 → |L1| = |L2|.
+#L1 #L2 #H @(ltprs_ind … H) -L2 //
+#L #L2 #_ #HL2 #IHL1
+>IHL1 -L1 >(ltpr_fwd_length … HL2) -HL2 //
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/ltprs_alt.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/ltprs_alt.ma
new file mode 100644 (file)
index 0000000..7d532c9
--- /dev/null
@@ -0,0 +1,34 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/ltprs.ma".
+
+(* CONTEXT-FREE PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ******************)
+
+(* alternative definition of ltprs *)
+definition ltprsa: relation lenv ≝ lpx tprs.
+
+interpretation
+  "context-free parallel computation (environment) alternative"
+  'PRedStarAlt L1 L2 = (ltprsa L1 L2).
+
+(* Basic properties *********************************************************)
+
+lemma ltprs_ltprsa: ∀L1,L2. L1 ➡* L2 → L1 ➡➡* L2.
+/2 width=1/ qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma ltprsa_ltprs: ∀L1,L2. L1 ➡➡* L2 → L1 ➡* L2.
+/2 width=1/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/ltprs_ldrop.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/ltprs_ldrop.ma
new file mode 100644 (file)
index 0000000..a7c3200
--- /dev/null
@@ -0,0 +1,27 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/ltpr_ldrop.ma".
+include "basic_2/computation/ltprs.ma".
+
+(* CONTEXT-FREE PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ******************)
+
+lemma ltprs_ldrop_conf: dropable_sn ltprs.
+/2 width=3/ qed.
+
+lemma ldrop_ltprs_trans: dedropable_sn ltprs.
+/2 width=3/ qed.
+
+lemma ltprs_ldrop_trans_O1: dropable_dx ltprs.
+/2 width=3/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/ltprs_ltprs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/ltprs_ltprs.ma
new file mode 100644 (file)
index 0000000..e529ee3
--- /dev/null
@@ -0,0 +1,32 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/ltpr_ltpr.ma".
+include "basic_2/computation/ltprs.ma".
+
+(* CONTEXT-FREE PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ******************)
+
+(* Advanced properties ******************************************************)
+
+lemma ltprs_strip: ∀L1. ∀L:term. L ➡* L1 → ∀L2. L ➡ L2 →
+                   ∃∃L0. L1 ➡ L0 & L2 ➡* L0.
+/3 width=3/ qed.
+
+(* Main properties **********************************************************)
+
+theorem ltprs_conf: Confluent … ltprs.
+/3 width=3/ qed.
+
+theorem ltprs_trans: Transitive … ltprs.
+/2 width=3/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/tprs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/tprs.ma
new file mode 100644 (file)
index 0000000..b094e66
--- /dev/null
@@ -0,0 +1,87 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/tpr.ma".
+
+(* CONTEXT-FREE PARALLEL COMPUTATION ON TERMS *******************************)
+
+(* Basic_1: includes: pr1_pr0 *)
+definition tprs: relation term ≝ TC … tpr.
+
+interpretation "context-free parallel computation (term)"
+   'PRedStar T1 T2 = (tprs T1 T2).
+
+(* Basic eliminators ********************************************************)
+
+lemma tprs_ind: ∀T1. ∀R:predicate term. R T1 →
+                (∀T,T2. T1 ➡* T → T ➡ T2 → R T → R T2) →
+                ∀T2. T1 ➡* T2 → R T2.
+#T1 #R #HT1 #IHT1 #T2 #HT12
+@(TC_star_ind … HT1 IHT1 … HT12) //
+qed-.
+
+lemma tprs_ind_dx: ∀T2. ∀R:predicate term. R T2 →
+                   (∀T1,T. T1 ➡ T → T ➡* T2 → R T → R T1) →
+                   ∀T1. T1 ➡* T2 → R T1.
+#T2 #R #HT2 #IHT2 #T1 #HT12
+@(TC_star_ind_dx … HT2 IHT2 … HT12) //
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma tprs_refl: reflexive … tprs.
+/2 width=1/ qed.
+
+lemma tprs_strap1: ∀T1,T,T2. T1 ➡* T → T ➡ T2 → T1 ➡* T2.
+/2 width=3/ qed.
+
+lemma tprs_strap2: ∀T1,T,T2. T1 ➡ T → T ➡* T2 → T1 ➡* T2.
+/2 width=3/ qed.
+
+(* Basic_1: was only: pr1_head_1 *)
+lemma tprs_pair_sn: ∀I,T1,T2. T1 ➡ T2 → ∀V1,V2. V1 ➡* V2 →
+                    ②{I} V1. T1 ➡* ②{I} V2. T2.
+* [ #a ] #I #T1 #T2 #HT12 #V1 #V2 #H @(tprs_ind … H) -V2
+[1,3: /3 width=1/
+|2,4: #V #V2 #_ #HV2 #IHV1
+      @(tprs_strap1 … IHV1) -IHV1 /2 width=1/
+]
+qed.
+
+(* Basic_1: was only: pr1_head_2 *)
+lemma tprs_pair_dx: ∀I,V1,V2. V1 ➡ V2 → ∀T1,T2. T1 ➡* T2 →
+                    ②{I} V1. T1 ➡* ②{I} V2. T2.
+* [ #a ] #I #V1 #V2 #HV12 #T1 #T2 #H @(tprs_ind … H) -T2
+[1,3: /3 width=1/
+|2,4: #T #T2 #_ #HT2 #IHT1
+      @(tprs_strap1 … IHT1) -IHT1 /2 width=1/
+]
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma tprs_inv_atom1: ∀U2,k. ⋆k ➡* U2 → U2 = ⋆k.
+#U2 #k #H @(tprs_ind … H) -U2 //
+#U #U2 #_ #HU2 #IHU1 destruct
+>(tpr_inv_atom1 … HU2) -HU2 //
+qed-.
+
+lemma tprs_inv_cast1: ∀W1,T1,U2. ⓝW1.T1 ➡* U2 → T1 ➡* U2 ∨
+                      ∃∃W2,T2. W1 ➡* W2 & T1 ➡* T2 & U2 = ⓝW2.T2.
+#W1 #T1 #U2 #H @(tprs_ind … H) -U2 /3 width=5/
+#U #U2 #_ #HU2 * /3 width=3/ *
+#W #T #HW1 #HT1 #H destruct
+elim (tpr_inv_cast1 … HU2) -HU2 /3 width=3/ *
+#W2 #T2 #HW2 #HT2 #H destruct /4 width=5/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/tprs_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/tprs_lift.ma
new file mode 100644 (file)
index 0000000..d0d1734
--- /dev/null
@@ -0,0 +1,43 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/tpr_lift.ma".
+include "basic_2/computation/tprs.ma".
+
+(* CONTEXT-FREE PARALLEL COMPUTATION ON TERMS *******************************)
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma tprs_inv_abst1: ∀a,V1,T1,U2. ⓛ{a}V1. T1 ➡* U2 →
+                      ∃∃V2,T2. V1 ➡* V2 & T1 ➡* T2 & U2 = ⓛ{a}V2. T2.
+#a #V1 #T1 #U2 #H @(tprs_ind … H) -U2 /2 width=5/
+#U #U2 #_ #HU2 * #V #T #HV1 #HT1 #H destruct
+elim (tpr_inv_abst1 … HU2) -HU2 #V2 #T2 #HV2 #HT2 #H destruct /3 width=5/
+qed-.
+
+lemma tprs_inv_abst: ∀a,V1,V2,T1,T2. ⓛ{a}V1. T1 ➡* ⓛ{a}V2. T2 →
+                     V1 ➡* V2 ∧ T1 ➡* T2.
+#a #V1 #V2 #T1 #T2 #H
+elim (tprs_inv_abst1 … H) -H #V #T #HV1 #HT1 #H destruct /2 width=1/
+qed-.
+
+(* Relocation properties ****************************************************)
+
+(* Note: this was missing in basic_1 *)
+lemma tprs_lift: t_liftable tprs.
+/3 width=7/ qed.
+
+(* Note: this was missing in basic_1 *)
+lemma tprs_inv_lift1: t_deliftable_sn tprs.
+/3 width=3 by tpr_inv_lift1, t_deliftable_sn_TC/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/tprs_tprs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/tprs_tprs.ma
new file mode 100644 (file)
index 0000000..2322445
--- /dev/null
@@ -0,0 +1,43 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/tpr_tpr.ma".
+include "basic_2/computation/tprs.ma".
+
+(* CONTEXT-FREE PARALLEL COMPUTATION ON TERMS *******************************)
+
+(* Advanced properties ******************************************************)
+
+(* Basic_1: was: pr1_strip *)
+lemma tprs_strip: ∀T1,T. T ➡* T1 → ∀T2. T ➡ T2 →
+                  ∃∃T0. T1 ➡ T0 & T2 ➡* T0.
+/3 width=3/ qed.
+
+(* Main propertis ***********************************************************)
+
+(* Basic_1: was: pr1_confluence *)
+theorem tprs_conf: Confluent … tprs.
+/3 width=3/ qed.
+
+(* Basic_1: was: pr1_t *)
+theorem tprs_trans: Transitive … tprs.
+/2 width=3/ qed.
+
+(* Basic_1: was: pr1_comp *)
+lemma tprs_pair: ∀I,V1,V2. V1 ➡* V2 → ∀T1,T2. T1 ➡* T2 →
+                 ②{I} V1. T1 ➡* ②{I} V2. T2.
+#I #V1 #V2 #H @(tprs_ind … H) -V2 /2 width=1/
+#V #V2 #_ #HV2 #IHV1 #T1 #T2 #HT12
+@(tprs_trans … (②{I}V.T2)) /2 width=1/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/xprs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/xprs.ma
new file mode 100644 (file)
index 0000000..854c5da
--- /dev/null
@@ -0,0 +1,64 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/lsubss.ma".
+include "basic_2/reducibility/xpr.ma".
+(*
+include "basic_2/reducibility/cnf.ma".
+*)
+(* EXTENDED PARALLEL COMPUTATION ON TERMS ***********************************)
+
+definition xprs: ∀h. sd h → lenv → relation term ≝
+                 λh,g,L. TC … (xpr h g L).
+
+interpretation "extended parallel computation (term)"
+   'XPRedStar h g L T1 T2 = (xprs h g L T1 T2).
+
+(* Basic eliminators ********************************************************)
+
+lemma xprs_ind: ∀h,g,L,T1. ∀R:predicate term. R T1 →
+                (∀T,T2. ⦃h, L⦄ ⊢ T1 •➡*[g] T → ⦃h, L⦄ ⊢ T •➡[g] T2 → R T → R T2) →
+                ∀T2. ⦃h, L⦄ ⊢ T1 •➡*[g] T2 → R T2.
+#h #g #L #T1 #R #HT1 #IHT1 #T2 #HT12
+@(TC_star_ind … HT1 IHT1 … HT12) //
+qed-.
+
+lemma xprs_ind_dx: ∀h,g,L,T2. ∀R:predicate term. R T2 →
+                   (∀T1,T. ⦃h, L⦄ ⊢ T1 •➡[g] T → ⦃h, L⦄ ⊢ T •➡*[g] T2 → R T → R T1) →
+                   ∀T1. ⦃h, L⦄ ⊢ T1 •➡*[g] T2 → R T1.
+#h #g #L #T2 #R #HT2 #IHT2 #T1 #HT12
+@(TC_star_ind_dx … HT2 IHT2 … HT12) //
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma xprs_refl: ∀h,g,L. reflexive … (xprs h g L).
+/2 width=1/ qed.
+
+lemma xprs_strap1: ∀h,g,L,T1,T,T2.
+                   ⦃h, L⦄ ⊢ T1 •➡*[g] T → ⦃h, L⦄ ⊢ T •➡[g] T2 → ⦃h, L⦄ ⊢ T1 •➡*[g] T2.
+/2 width=3/ qed.
+
+lemma xprs_strap2: ∀h,g,L,T1,T,T2.
+                   ⦃h, L⦄ ⊢ T1 •➡[g] T → ⦃h, L⦄ ⊢ T •➡*[g] T2 → ⦃h, L⦄ ⊢ T1 •➡*[g] T2.
+/2 width=3/ qed.
+
+(* Basic inversion lemmas ***************************************************)
+(*
+axiom xprs_inv_cnf1: ∀L,T,U. L ⊢ T ➡* U → L ⊢ 𝐍⦃T⦄ → T = U.
+#L #T #U #H @(xprs_ind_dx … H) -T //
+#T0 #T #H1T0 #_ #IHT #H2T0
+lapply (H2T0 … H1T0) -H1T0 #H destruct /2 width=1/
+qed-.
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/xprs_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/xprs_aaa.ma
new file mode 100644 (file)
index 0000000..5beb8fe
--- /dev/null
@@ -0,0 +1,24 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/xpr_aaa.ma".
+include "basic_2/computation/xprs.ma".
+
+(* EXTENDED PARALLEL COMPUTATION ON TERMS ***********************************)
+
+(* Properties on atomic arity assignment for terms **************************)
+
+lemma xprs_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 #H @(xprs_ind … H) -U // /2 width=5/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/xprs_cprs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/xprs_cprs.ma
new file mode 100644 (file)
index 0000000..13a4f88
--- /dev/null
@@ -0,0 +1,24 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/cprs.ma".
+include "basic_2/computation/xprs.ma".
+
+(* EXTENDED PARALLEL COMPUTATION ON TERMS ***********************************)
+
+(* properties on context sensitive parallel computation for terms ***********)
+
+lemma cprs_xprs: ∀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.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/xprs_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/xprs_lift.ma
new file mode 100644 (file)
index 0000000..cb151a1
--- /dev/null
@@ -0,0 +1,50 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/xpr_lift.ma".
+include "basic_2/computation/cprs.ma".
+include "basic_2/computation/xprs.ma".
+
+(* EXTENDED PARALLEL COMPUTATION ON TERMS ***********************************)
+
+(* Advanced forward lemmas **************************************************)
+
+lemma xprs_fwd_abst1: ∀h,g,a,L,V1,T1,U2. ⦃h, L⦄ ⊢ ⓛ{a}V1. T1 •➡*[g] U2 →
+                      ∃∃V2,T2. L ⊢ V1 ➡* V2 & U2 = ⓛ{a}V2. T2.
+#h #g #a #L #V1 #T1 #U2 #H @(xprs_ind … H) -U2 /2 width=4/
+#U #U2 #_ #HU2 * #V #T #HV1 #H destruct
+elim (xpr_inv_abst1 … HU2) -HU2 #V2 #T2 #HV2 #_ #H destruct /3 width=4/
+qed-.
+
+(* Relocation properties ****************************************************)
+
+lemma xprs_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 #HT12 @(xprs_ind … HT12) -T2
+[ -HLK #T2 #HT12
+   <(lift_mono … HTU1 … HT12) -T1 //
+| -HTU1 #T #T2 #_ #HT2 #IHT2 #U2 #HTU2
+  elim (lift_total T d e) #U #HTU
+  lapply (xpr_lift … HLK … HTU … HTU2 … HT2) -T2 -HLK /3 width=3/
+]
+qed.
+
+lemma xprs_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 #HU12 @(xprs_ind … HU12) -U2 /2 width=3/
+-HTU1 #U #U2 #_ #HU2 * #T #HTU #HT1
+elim (xpr_inv_lift1 … HLK … HTU … HU2) -U -HLK /3 width=5/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/xprs_lsubss.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/xprs_lsubss.ma
new file mode 100644 (file)
index 0000000..c883c14
--- /dev/null
@@ -0,0 +1,27 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/xpr_lsubss.ma".
+include "basic_2/computation/xprs.ma".
+
+(* EXTENDED PARALLEL COMPUTATION ON TERMS ***********************************)
+
+(* Properties on lenv ref for stratified type assignment ********************)
+
+lemma lsubss_xprs_trans: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 →
+                         ∀T1,T2. ⦃h, L2⦄ ⊢ T1 •➡*[g] T2 → ⦃h, L1⦄ ⊢ T1 •➡*[g] T2.
+#h #g #L1 #L2 #HL12 #T1 #T2 #H @(xprs_ind … H) -T2 //
+#T #T2 #_ #HT2 #IHT1
+lapply (lsubss_xpr_trans … HL12 … HT2) -L2 /2 width=3/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/xprs_xprs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/xprs_xprs.ma
new file mode 100644 (file)
index 0000000..9593f05
--- /dev/null
@@ -0,0 +1,20 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/xprs.ma".
+
+(* EXTENDED PARALLEL COMPUTATION ON TERMS ***********************************)
+
+theorem xprs_trans: ∀h,g,L. transitive … (xprs h g L).
+/2 width=3/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/conversion/cpc.ma b/matita/matita/contribs/lambdadelta/basic_2/conversion/cpc.ma
new file mode 100644 (file)
index 0000000..5fb614a
--- /dev/null
@@ -0,0 +1,39 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/cpr.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL CONVERSION ON TERMS ***************************)
+
+definition cpc: lenv → relation term ≝
+   λL,T1,T2. L ⊢ T1 ➡ T2 ∨ L ⊢ T2 ➡ T1.
+
+interpretation
+   "context-sensitive parallel conversion (term)"
+   'PConv L T1 T2 = (cpc L T1 T2).
+
+(* Basic properties *********************************************************)
+
+lemma cpc_refl: ∀L. reflexive … (cpc L).
+/2 width=1/ qed.
+
+lemma cpc_sym: ∀L. symmetric … (cpc L).
+#L #T1 #T2 * /2 width=1/
+qed.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma cpc_fwd_cpr: ∀L,T1,T2. L ⊢ T1 ⬌ T2 → ∃∃T. L ⊢ T1 ➡ T & L ⊢ T2 ➡ T.
+#L #T1 #T2 * /2 width=3/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/conversion/cpc_cpc.ma b/matita/matita/contribs/lambdadelta/basic_2/conversion/cpc_cpc.ma
new file mode 100644 (file)
index 0000000..dcea07a
--- /dev/null
@@ -0,0 +1,23 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/conversion/cpc.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL CONVERSION ON TERMS ***************************)
+
+(* Main properties **********************************************************)
+
+theorem cpc_conf: ∀L,T0,T1,T2. L ⊢ T0 ⬌ T1 → L ⊢ T0 ⬌ T2 →
+                  ∃∃T. L ⊢ T1 ⬌ T & L ⊢ T2 ⬌ T.
+/3 width=3/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/conversion/fpc.ma b/matita/matita/contribs/lambdadelta/basic_2/conversion/fpc.ma
new file mode 100644 (file)
index 0000000..f552d58
--- /dev/null
@@ -0,0 +1,40 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/fpr.ma".
+
+(* CONTEXT-FREE PARALLEL CONVERSION ON CLOSURES *****************************)
+
+definition fpc: bi_relation lenv term ≝
+   λL1,T1,L2,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ ∨ ⦃L2, T2⦄ ➡ ⦃L1, T1⦄.
+
+interpretation
+   "context-free parallel conversion (closure)"
+   'FocalizedPConv L1 T1 L2 T2 = (fpc L1 T1 L2 T2).
+
+(* Basic properties *********************************************************)
+
+lemma fpc_refl: bi_reflexive … fpc.
+/2 width=1/ qed.
+
+lemma fpc_sym: bi_symmetric … fpc.
+#L1 #L2 #T1 #T2 * /2 width=1/
+qed.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma fpc_fwd_fpr: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⬌ ⦃L2, T2⦄ →
+                   ∃∃L,T. ⦃L1, T1⦄ ➡ ⦃L, T⦄ & ⦃L2, T2⦄ ➡ ⦃L, T⦄.
+#L1 #L2 #T1 #T2 * /2 width=4/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/conversion/fpc_fpc.ma b/matita/matita/contribs/lambdadelta/basic_2/conversion/fpc_fpc.ma
new file mode 100644 (file)
index 0000000..22fc16f
--- /dev/null
@@ -0,0 +1,24 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/conversion/fpc.ma".
+
+(* CONTEXT-FREE PARALLEL CONVERSION ON CLOSURES *****************************)
+
+(* Main properties **********************************************************)
+
+theorem fpc_conf: ∀L0,L1,T0,T1. ⦃L0, T0⦄ ⬌ ⦃L1, T1⦄ →
+                  ∀L2,T2. ⦃L0, T0⦄ ⬌ ⦃L2, T2⦄ →
+                  ∃∃L,T. ⦃L1, T1⦄ ⬌ ⦃L, T⦄ & ⦃L2, T2⦄ ⬌ ⦃L, T⦄.
+/3 width=4/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/conversion/lfpc.ma b/matita/matita/contribs/lambdadelta/basic_2/conversion/lfpc.ma
new file mode 100644 (file)
index 0000000..273873a
--- /dev/null
@@ -0,0 +1,37 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/lfpr.ma".
+
+(* FOCALIZED PARALLEL CONVERSION ON LOCAL ENVIRONMENTS **********************)
+
+definition lfpc: relation lenv ≝
+   λL1,L2. ⦃L1⦄ ➡ ⦃L2⦄ ∨ ⦃L2⦄ ➡ ⦃L1⦄.
+
+interpretation
+   "focalized parallel conversion (local environment)"
+   'FocalizedPConv L1 L2 = (lfpc L1 L2).
+
+(* Basic properties *********************************************************)
+
+lemma lfpc_refl: ∀L. ⦃L⦄ ⬌ ⦃L⦄.
+/2 width=1/ qed.
+
+lemma lfpc_sym: ∀L1,L2. ⦃L1⦄ ⬌ ⦃L2⦄ → ⦃L2⦄ ⬌ ⦃L1⦄.
+#L1 #L2 * /2 width=1/
+qed.
+
+lemma lfpc_lfpr: ∀L1,L2. ⦃L1⦄ ⬌ ⦃L2⦄ → ∃∃L. ⦃L1⦄ ➡ ⦃L⦄ & ⦃L2⦄ ➡ ⦃L⦄.
+#L1 #L2 * /2 width=3/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/conversion/lfpc_lfpc.ma b/matita/matita/contribs/lambdadelta/basic_2/conversion/lfpc_lfpc.ma
new file mode 100644 (file)
index 0000000..69e444a
--- /dev/null
@@ -0,0 +1,23 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/conversion/lfpc.ma".
+
+(* FOCALIZED PARALLEL CONVERSION ON LOCAL ENVIRONMENTS **********************)
+
+(* Main properties **********************************************************)
+
+theorem lfpc_conf: ∀L0,L1,L2. ⦃L0⦄ ⬌ ⦃L1⦄ → ⦃L0⦄ ⬌ ⦃L2⦄ →
+                   ∃∃L. ⦃L1⦄ ⬌ ⦃L⦄ & ⦃L2⦄ ⬌ ⦃L⦄.
+/3 width=3/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv.ma
new file mode 100644 (file)
index 0000000..2be5715
--- /dev/null
@@ -0,0 +1,101 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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.ma".
+include "basic_2/computation/xprs.ma".
+include "basic_2/equivalence/cpcs.ma".
+
+(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
+
+inductive snv (h:sh) (g:sd h): lenv → predicate term ≝
+| snv_sort: ∀L,k. snv h g L (⋆k)
+| snv_lref: ∀I,L,K,V,i. ⇩[0, i] L ≡ K.ⓑ{I}V → snv h g K V → snv h g L (#i)
+| snv_bind: ∀a,I,L,V,T. snv h g L V → snv h g (L.ⓑ{I}V) T → snv h g L (ⓑ{a,I}V.T)
+| snv_appl: ∀a,L,V,W,W0,T,U,l. snv h g L V → snv h g L T →
+            ⦃h, L⦄ ⊢ V •[g, l + 1] W → L ⊢ W ➡* W0 →
+            ⦃h, L⦄ ⊢ T •➡*[g] ⓛ{a}W0.U → snv h g L (ⓐV.T)
+| snv_cast: ∀L,W,T,U,l. snv h g L W → snv h g L T →
+            ⦃h, L⦄ ⊢ T •[g, l + 1] U → L ⊢ U ⬌* W → snv h g L (ⓝW.T)
+.
+
+interpretation "stratified native validity (term)"
+   'NativeValid h g L T = (snv h g L T).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact snv_inv_lref_aux: ∀h,g,L,X. ⦃h, L⦄ ⊩ X :[g] → ∀i. X = #i →
+                       ∃∃I,K,V. ⇩[0, i] L ≡ K.ⓑ{I}V & ⦃h, K⦄ ⊩ V :[g].
+#h #g #L #X * -L -X
+[ #L #k #i #H destruct
+| #I #L #K #V #i0 #HLK #HV #i #H destruct /2 width=5/
+| #a #I #L #V #T #_ #_ #i #H destruct
+| #a #L #V #W #W0 #T #U #l #_ #_ #_ #_ #_ #i #H destruct
+| #L #W #T #U #l #_ #_ #_ #_ #i #H destruct
+]
+qed.
+
+lemma snv_inv_lref: ∀h,g,L,i. ⦃h, L⦄ ⊩ #i :[g] →
+                    ∃∃I,K,V. ⇩[0, i] L ≡ K.ⓑ{I}V & ⦃h, K⦄ ⊩ V :[g].
+/2 width=3/ qed-.
+
+fact snv_inv_bind_aux: ∀h,g,L,X. ⦃h, L⦄ ⊩ X :[g] → ∀a,I,V,T. X = ⓑ{a,I}V.T →
+                       ⦃h, L⦄ ⊩ V :[g] ∧ ⦃h, L.ⓑ{I}V⦄ ⊩ T :[g].
+#h #g #L #X * -L -X
+[ #L #k #a #I #V #T #H destruct
+| #I0 #L #K #V0 #i #_ #_ #a #I #V #T #H destruct
+| #b #I0 #L #V0 #T0 #HV0 #HT0 #a #I #V #T #H destruct /2 width=1/
+| #b #L #V0 #W0 #W00 #T0 #U0 #l #_ #_ #_ #_ #_ #a #I #V #T #H destruct
+| #L #W0 #T0 #U0 #l #_ #_ #_ #_ #a #I #V #T #H destruct
+]
+qed.
+
+lemma snv_inv_bind: ∀h,g,a,I,L,V,T. ⦃h, L⦄ ⊩ ⓑ{a,I}V.T :[g] →
+                        ⦃h, L⦄ ⊩ V :[g] ∧ ⦃h, L.ⓑ{I}V⦄ ⊩ T :[g].
+/2 width=4/ qed-.
+
+fact snv_inv_appl_aux: ∀h,g,L,X. ⦃h, L⦄ ⊩ X :[g] → ∀V,T. X = ⓐV.T →
+                       ∃∃a,W,W0,U,l. ⦃h, L⦄ ⊩ V :[g] & ⦃h, L⦄ ⊩ T :[g] &
+                                   ⦃h, L⦄ ⊢ V •[g, l + 1] W & L ⊢ W ➡* W0 &
+                                   ⦃h, L⦄ ⊢ T •➡*[g] ⓛ{a}W0.U.
+#h #g #L #X * -L -X
+[ #L #k #V #T #H destruct
+| #I #L #K #V0 #i #_ #_ #V #T #H destruct
+| #a #I #L #V0 #T0 #_ #_ #V #T #H destruct
+| #a #L #V0 #W0 #W00 #T0 #U0 #l #HV0 #HT0 #HVW0 #HW00 #HTU0 #V #T #H destruct /2 width=8/
+| #L #W0 #T0 #U0 #l #_ #_ #_ #_ #V #T #H destruct
+]
+qed.
+
+lemma snv_inv_appl: ∀h,g,L,V,T. ⦃h, L⦄ ⊩ ⓐV.T :[g] →
+                    ∃∃a,W,W0,U,l. ⦃h, L⦄ ⊩ V :[g] & ⦃h, L⦄ ⊩ T :[g] &
+                                ⦃h, L⦄ ⊢ V •[g, l + 1] W & L ⊢ W ➡* W0 &
+                                ⦃h, L⦄ ⊢ T •➡*[g] ⓛ{a}W0.U.
+/2 width=3/ qed-.
+
+fact snv_inv_cast_aux: ∀h,g,L,X. ⦃h, L⦄ ⊩ X :[g] → ∀W,T. X = ⓝW.T →
+                       ∃∃U,l. ⦃h, L⦄ ⊩ W :[g] & ⦃h, L⦄ ⊩ T :[g] & 
+                              ⦃h, L⦄ ⊢ T •[g, l + 1] U & L ⊢ U ⬌* W.
+#h #g #L #X * -L -X
+[ #L #k #W #T #H destruct
+| #I #L #K #V #i #_ #_ #W #T #H destruct
+| #a #I #L #V #T0 #_ #_ #W #T #H destruct
+| #a #L #V #W0 #W00 #T0 #U #l #_ #_ #_ #_ #_ #W #T #H destruct
+| #L #W0 #T0 #U0 #l #HW0 #HT0 #HTU0 #HUW0 #W #T #H destruct /2 width=4/
+]
+qed.
+
+lemma snv_inv_cast: ∀h,g,L,W,T. ⦃h, L⦄ ⊩ ⓝW.T :[g] →
+                    ∃∃U,l. ⦃h, L⦄ ⊩ W :[g] & ⦃h, L⦄ ⊩ T :[g] &
+                           ⦃h, L⦄ ⊢ T •[g, l + 1] U & L ⊢ U ⬌* W.
+/2 width=3/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_aaa.ma
new file mode 100644 (file)
index 0000000..3d4761d
--- /dev/null
@@ -0,0 +1,42 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/csn_aaa.ma".
+include "basic_2/computation/xprs_aaa.ma".
+include "basic_2/computation/xprs_cprs.ma".
+include "basic_2/equivalence/cpcs_aaa.ma".
+include "basic_2/dynamic/snv.ma".
+
+(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
+
+(* Properties on atomic arity assignment for terms **************************)
+
+lemma snv_aaa: ∀h,g,L,T. ⦃h, L⦄ ⊩ T :[g] → ∃A. L ⊢ T ⁝ A.
+#h #g #L #T #H elim H -L -T
+[ /2 width=2/
+| #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 (xprs_aaa h g … HV W0 ?) [ /3 width=3/ ] -W #HW0
+  lapply (xprs_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
+  lapply (aaa_cpcs_mono … HUW A … HW) -HUW /2 width=7/ -HTU #H destruct /3 width=3/
+]
+qed-.
+
+lemma snv_csn: ∀h,g,L,T. ⦃h, L⦄ ⊩ T :[g] → L ⊢ ⬊* T.
+#h #g #L #T #H elim (snv_aaa … H) -H /2 width=2/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lift.ma
new file mode 100644 (file)
index 0000000..6d79ef5
--- /dev/null
@@ -0,0 +1,79 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/xprs_lift.ma".
+include "basic_2/equivalence/cpcs_cpcs.ma".
+include "basic_2/dynamic/snv.ma".
+
+(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
+
+(* Relocation properties ****************************************************)
+
+lemma snv_lift: ∀h,g,K,T. ⦃h, K⦄ ⊩ T :[g] → ∀L,d,e. ⇩[d, e] L ≡ K →
+                ∀U. ⇧[d, e] T ≡ U → ⦃h, L⦄ ⊩ U :[g].
+#h #g #K #T #H elim H -K -T
+[ #K #k #L #d #e #_ #X #H
+  >(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
+    /3 width=8/
+  | lapply (ldrop_trans_ge … HLK … HK0 ?) -K // -Hid /3 width=8/
+  ]
+| #a #I #K #V #T #_ #_ #IHV #IHT #L #d #e #HLK #X #H
+  elim (lift_inv_bind1 … H) -H #W #U #HVW #HTU #H destruct
+  /4 width=4/
+| #a #K #V #V0 #V1 #T #T1 #l #_ #_ #HV0 #HV01 #HT1 #IHV #IHT #L #d #e #HLK #X #H
+  elim (lift_inv_flat1 … H) -H #W #U #HVW #HTU #H destruct
+  elim (lift_total V0 d e) #W0 #HVW0
+  elim (lift_total V1 d e) #W1 #HVW1
+  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/ ]
+  @(xprs_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
+  @(snv_cast … W l) [ /2 width=4/ | /2 width=4/ | /2 width=9/ | /2 width=9/ ]
+]
+qed.
+
+lemma snv_inv_lift: ∀h,g,L,U. ⦃h, L⦄ ⊩ U :[g] → ∀K,d,e. ⇩[d, e] L ≡ K →
+                    ∀T. ⇧[d, e] T ≡ U → ⦃h, K⦄ ⊩ T :[g].
+#h #g #L #U #H elim H -L -U
+[ #L #k #K #d #e #_ #X #H
+  >(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
+    /3 width=8/
+  | lapply (ldrop_conf_ge … HLK … HL0 ?) -L // -Hid /3 width=8/
+  ]
+| #a #I #L #W #U #_ #_ #IHW #IHU #K #d #e #HLK #X #H
+  elim (lift_inv_bind2 … H) -H #V #T #HVW #HTU #H destruct /4 width=4/
+| #a #L #W #W0 #W1 #U #U1 #l #_ #_ #HW0 #HW01 #HU1 #IHW #IHU #K #d #e #HLK #X #H
+  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 … HLK … HVW0 … HW01) -W0 #V1 #HVW1 #HV01
+  elim (xprs_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
+  elim (lift_inv_flat2 … H) -H #V0 #T #HVW0 #HTU #H destruct
+  elim (ssta_inv_lift1 … HUW … HLK … HTU) -HUW #V #HTV #HVW
+  lapply (cpcs_inv_lift … HLK … HVW … HVW0 ?) // -W /3 width=4/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ssta.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ssta.ma
new file mode 100644 (file)
index 0000000..d96994e
--- /dev/null
@@ -0,0 +1,51 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/dynamic/snv.ma".
+
+(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
+
+(* Properties on stratified static type assignment for terms ****************)
+
+lemma snv_ssta: ∀h,g,L,T. ⦃h, L⦄ ⊩ T :[g] → ∃∃U,l. ⦃h, L⦄ ⊢ T •[g, l] U.
+#h #g #L #T #H elim H -L -T
+[ #L #k elim (deg_total h g k) /3 width=3/
+| * #L #K #V #i #HLK #_ * #W #l0 #HVW
+  [ elim (lift_total W 0 (i+1)) /3 width=8/
+  | elim (lift_total V 0 (i+1)) /3 width=8/
+  ]
+| #a #I #L #V #T #_ #_ #_ * /3 width=3/
+| #a #L #V #W #W1 #T0 #T1 #l #_ #_ #_ #_ #_ #_ * /3 width=3/
+| #L #W #T #U #l #_ #_ #HTU #_ #_ #_ /3 width=3/ (**) (* auto fails without the last #_ *) 
+]
+qed-.
+
+fact snv_ssta_conf_aux: ∀h,g,L,T. (
+                           ∀L0,T0. ⦃h, L0⦄ ⊩ T0 :[g] →
+                           ∀U0,l. ⦃h, L0⦄ ⊢ T0 •[g, l + 1] U0 →
+                           #{L0, T0} < #{L, T} → ⦃h, L0⦄ ⊩ U0 :[g]
+                        ) →
+                        ∀L0,T0. ⦃h, L0⦄ ⊩ T0 :[g] →
+                        ∀U0,l. ⦃h, L0⦄ ⊢ T0 •[g, l + 1] U0 →
+                        L0 = L → T0 = T → ⦃h, L0⦄ ⊩ U0 :[g].
+#h #g #L #T #IH1 #L0 #T0 * -L0 -T0
+[
+|
+|
+| #a #L0 #V #W #W0 #T0 #V0 #l0 #HV #HT0 #HVW #HW0 #HTV0 #X #l #H #H1 #H2 destruct
+  elim (ssta_inv_appl1 … H) -H #U0 #HTU0 #H destruct
+  lapply (IH1 … HT0 … HTU0 ?) // #HU0
+  @(snv_appl … HV HU0 HVW HW0) -HV -HU0 -HVW -HW0
+| #L0 #W #T0 #W0 #l0 #_ #HT0 #_ #_ #U0 #l #H #H1 #H2 destruct -W0
+  lapply (ssta_inv_cast1 … H) -H /2 width=5/
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs.ma
new file mode 100644 (file)
index 0000000..9d9ceb9
--- /dev/null
@@ -0,0 +1,94 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/conversion/cpc.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
+
+definition cpcs: lenv → relation term ≝
+                 λL. TC … (cpc L).
+
+interpretation "context-sensitive parallel equivalence (term)"
+   'PConvStar L T1 T2 = (cpcs L T1 T2).
+
+(* Basic eliminators ********************************************************)
+
+lemma cpcs_ind: ∀L,T1. ∀R:predicate term. R T1 →
+                (∀T,T2. L ⊢ T1 ⬌* T → L ⊢ T ⬌ T2 → R T → R T2) →
+                ∀T2. L ⊢ T1 ⬌* T2 → R T2.
+#L #T1 #R #HT1 #IHT1 #T2 #HT12 @(TC_star_ind … HT1 IHT1 … HT12) //
+qed-.
+
+lemma cpcs_ind_dx: ∀L,T2. ∀R:predicate term. R T2 →
+                   (∀T1,T. L ⊢ T1 ⬌ T → L ⊢ T ⬌* T2 → R T → R T1) →
+                   ∀T1. L ⊢ T1 ⬌* T2 → R T1.
+#L #T2 #R #HT2 #IHT2 #T1 #HT12
+@(TC_star_ind_dx … HT2 IHT2 … HT12) //
+qed-.
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was: pc3_refl *)
+lemma cpcs_refl: ∀L. reflexive … (cpcs L).
+/2 width=1/ qed.
+
+(* Basic_1: was: pc3_s *)
+lemma cpcs_sym: ∀L. symmetric … (cpcs L).
+/3 width=1/ qed.
+
+lemma cpcs_strap1: ∀L,T1,T,T2. L ⊢ T1 ⬌* T → L ⊢ T ⬌ T2 → L ⊢ T1 ⬌* T2.
+/2 width=3/ qed.
+
+lemma cpcs_strap2: ∀L,T1,T,T2. L ⊢ T1 ⬌ T → L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
+/2 width=3/ qed.
+
+(* Basic_1: was: pc3_pr2_r *)
+lemma cpcs_cpr_dx: ∀L,T1,T2. L ⊢ T1 ➡ T2 → L ⊢ T1 ⬌* T2.
+/3 width=1/ qed.
+
+lemma cpcs_tpr_dx: ∀L,T1,T2. T1 ➡ T2 → L ⊢ T1 ⬌* T2.
+/3 width=1/ qed.
+
+(* Basic_1: was: pc3_pr2_x *)
+lemma cpcs_cpr_sn: ∀L,T1,T2. L ⊢ T2 ➡ T1 → L ⊢ T1 ⬌* T2.
+/3 width=1/ qed.
+
+lemma cpcs_tpr_sn: ∀L,T1,T2. T2 ➡ T1 → L ⊢ T1 ⬌* T2.
+/3 width=1/ qed.
+
+lemma cpcs_cpr_strap1: ∀L,T1,T. L ⊢ T1 ⬌* T → ∀T2. L ⊢ T ➡ T2 → L ⊢ T1 ⬌* T2.
+/3 width=3/ qed.
+
+(* Basic_1: was: pc3_pr2_u *)
+lemma cpcs_cpr_strap2: ∀L,T1,T. L ⊢ T1 ➡ T → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
+/3 width=3/ qed.
+
+lemma cpcs_cpr_div: ∀L,T1,T. L ⊢ T1 ⬌* T → ∀T2. L ⊢ T2 ➡ T → L ⊢ T1 ⬌* T2.
+/3 width=3/ qed.
+
+lemma cpr_div: ∀L,T1,T. L ⊢ T1 ➡ T → ∀T2. L ⊢ T2 ➡ T → L ⊢ T1 ⬌* T2.
+/3 width=3/ qed-.
+
+(* Basic_1: was: pc3_pr2_u2 *)
+lemma cpcs_cpr_conf: ∀L,T1,T. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
+/3 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
+   Basic_1: removed local theorems 6:
+            pc3_left_pr3 pc3_left_trans pc3_left_sym pc3_left_pc3 pc3_pc3_left
+            pc3_wcpr0_t_aux
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_aaa.ma
new file mode 100644 (file)
index 0000000..363b8ac
--- /dev/null
@@ -0,0 +1,30 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/cprs_aaa.ma".
+include "basic_2/equivalence/cpcs_cpcs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
+
+(* Main properties about atomic arity assignment on terms *******************)
+
+theorem aaa_cpcs_mono: ∀L,T1,T2. L ⊢ T1 ⬌* T2 →
+                       ∀A1. L ⊢ T1 ⁝ A1 → ∀A2. L ⊢ T2 ⁝ A2 →
+                       A1 = A2.
+#L #T1 #T2 #HT12 #A1 #HA1 #A2 #HA2
+elim (cpcs_inv_cprs … HT12) -HT12 #T #HT1 #HT2
+lapply (aaa_cprs_conf … HA1 … HT1) -T1 #HA1
+lapply (aaa_cprs_conf … HA2 … HT2) -T2 #HA2
+lapply (aaa_mono … HA1 … HA2) -L -T //
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_cpcs.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_cpcs.ma
new file mode 100644 (file)
index 0000000..ac9de93
--- /dev/null
@@ -0,0 +1,204 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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_lift.ma".
+include "basic_2/computation/cprs_cprs.ma".
+include "basic_2/conversion/cpc_cpc.ma".
+include "basic_2/equivalence/cpcs_cprs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma cpcs_inv_cprs: ∀L,T1,T2. L ⊢ T1 ⬌* T2 →
+                     ∃∃T. L ⊢ T1 ➡* T & L ⊢ T2 ➡* T.
+#L #T1 #T2 #H @(cpcs_ind … H) -T2
+[ /3 width=3/
+| #T #T2 #_ #HT2 * #T0 #HT10 elim HT2 -HT2 #HT2 #HT0
+  [ elim (cprs_strip … HT0 … HT2) -T #T #HT0 #HT2
+    lapply (cprs_strap1 … HT10 … HT0) -T0 /2 width=3/
+  | lapply (cprs_strap2 … HT2 … HT0) -T /2 width=3/
+  ]
+]
+qed-.
+
+(* Basic_1: was: pc3_gen_sort *)
+lemma cpcs_inv_sort: ∀L,k1,k2. L ⊢ ⋆k1 ⬌* ⋆k2 → k1 = k2.
+#L #k1 #k2 #H
+elim (cpcs_inv_cprs … H) -H #T #H1
+>(cprs_inv_sort1 … H1) -T #H2
+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_inv_abst1 Abst W … H2) -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_inv_abst1 I V … H1) -H1 #W0 #T0 #HW10 #HT10 #H destruct
+elim (cprs_inv_abst1 I V … H2) -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_inv_abst1 Abst W1 … H1) -H1 #W2 #T2 #HW12 #HT12 #H destruct
+@(ex2_2_intro … H2) -H2 /2 width=2/ (**) (* explicit constructor, /3 width=6/ is slow *)
+qed-.
+
+lemma cpcs_inv_abst2: ∀a,L,W1,T1,T. L ⊢ T ⬌* ⓛ{a}W1.T1 →
+                      ∃∃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_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 →
+                     L ⊢ U1 ⬌* U2 → K ⊢ T1 ⬌* T2.
+#L #K #d #e #HLK #T1 #U1 #HTU1 #T2 #U2 #HTU2 #HU12
+elim (cpcs_inv_cprs … HU12) -HU12 #U #HU1 #HU2
+elim (cprs_inv_lift1 … HLK … HTU1 … HU1) -U1 #T #HTU #HT1
+elim (cprs_inv_lift1 … HLK … HTU2 … HU2) -L -U2 #X #HXU
+>(lift_inj … HXU … HTU) -X -U -d -e /2 width=3/
+qed-.
+
+(* Advanced properties ******************************************************)
+
+lemma cpr_cprs_conf: ∀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/
+qed-.
+
+lemma cprs_cpr_conf: ∀L,T,T1,T2. L ⊢ T ➡* T1 → L ⊢ T ➡ T2 → L ⊢ T2 ⬌* T1.
+#L #T #T1 #T2 #HT1 #HT2
+elim (cprs_strip … HT1 … HT2) /2 width=3 by cprs_cpr_div/
+qed-.
+
+lemma cprs_conf: ∀L,T,T1,T2. L ⊢ T ➡* T1 → L ⊢ T ➡* T2 → L ⊢ T1 ⬌* T2.
+#L #T #T1 #T2 #HT1 #HT2
+elim (cprs_conf … HT1 … HT2) /2 width=3/
+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.
+#L #V1 #V2 #HV12 #T1 #T2 #HT12 #I
+elim (cpcs_inv_cprs … HV12) -HV12 #V #HV1 #HV2
+elim (cpcs_inv_cprs … HT12) -HT12 /3 width=5 by cprs_flat, cprs_div/ (**) (* /3 width=5/ is too slow *)
+qed.
+
+lemma cpcs_flat_dx_tpr_rev: ∀L,V1,V2. V2 ➡ V1 → ∀T1,T2. L ⊢ T1 ⬌* T2 →
+                            ∀I. L ⊢ ⓕ{I}V1. T1 ⬌* ⓕ{I}V2. T2.
+/3 width=1/ qed.
+
+lemma cpcs_abst: ∀a,L,V1,V2. L ⊢ V1 ⬌* V2 →
+                 ∀V,T1,T2. L.ⓛV ⊢ T1 ⬌* T2 → L ⊢ ⓛ{a}V1. T1 ⬌* ⓛ{a}V2. T2.
+#a #L #V1 #V2 #HV12 #V #T1 #T2 #HT12
+elim (cpcs_inv_cprs … HV12) -HV12
+elim (cpcs_inv_cprs … HT12) -HT12
+/3 width=6 by cprs_div, cprs_abst/ (**) (* /3 width=6/ is a bit slow *)
+qed.
+
+lemma cpcs_abbr_dx: ∀a,L,V,T1,T2. L.ⓓV ⊢ T1 ⬌* T2 → L ⊢ ⓓ{a}V. T1 ⬌* ⓓ{a}V. T2.
+#a #L #V #T1 #T2 #HT12
+elim (cpcs_inv_cprs … HT12) -HT12 /3 width=5 by cprs_div, cprs_abbr1/ (**) (* /3 width=5/ 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 * /2 width=1/ /2 width=2/ qed.
+
+lemma cpcs_abbr_sn: ∀a,L,V1,V2,T. L ⊢ V1 ⬌* V2 → L ⊢ ⓓ{a}V1. T ⬌* ⓓ{a}V2. T.
+#a #L #V1 #V2 #T #HV12
+elim (cpcs_inv_cprs … HV12) -HV12 /3 width=5 by cprs_div, cprs_abbr1/ (**) (* /3 width=5/ is a bit slow *)
+qed.
+
+lemma cpcs_bind_sn: ∀a,I,L,V1,V2,T. L ⊢ V1 ⬌* V2 → L ⊢ ⓑ{a,I}V1. T ⬌* ⓑ{a,I}V2. T.
+#a * /2 width=1/ /2 width=2/ qed.
+
+lemma cpcs_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 #HT12
+elim (cpcs_inv_cprs … HT12) -HT12 #T #HT1 #HT2
+lapply (cprs_beta_dx … HV12 HT1 a) -HV12 -HT1 #HT1
+lapply (cprs_lsubs_trans … HT2 (L.ⓓV2) ?) -HT2 /2 width=1/ #HT2
+@(cprs_div … HT1) /2 width=1/
+qed.
+
+lemma cpcs_beta_dx_tpr_rev: ∀a,L,V1,V2,W,T1,T2.
+                            V1 ➡ V2 → L.ⓛW ⊢ T2 ⬌* T1 →
+                            L ⊢ ⓓ{a}V2.T2 ⬌* ⓐV1.ⓛ{a}W.T1.
+/4 width=1/ qed.
+
+(* Note: it does not hold replacing |L1| with |L2| *)
+lemma cpcs_lsubs_trans: ∀L1,T1,T2. L1 ⊢ T1 ⬌* T2 →
+                        ∀L2. L2 ≼ [0, |L1|] L1 → L2 ⊢ T1 ⬌* T2.
+#L1 #T1 #T2 #HT12
+elim (cpcs_inv_cprs … HT12) -HT12
+/3 width=5 by cprs_div, cprs_lsubs_trans/ (**) (* /3 width=5/ is a bit slow *)
+qed.
+
+(* Basic_1: was: pc3_lift *)
+lemma cpcs_lift: ∀L,K,d,e. ⇩[d, e] L ≡ K →
+                 ∀T1,U1. ⇧[d, e] T1 ≡ U1 → ∀T2,U2. ⇧[d, e] T2 ≡ U2 →
+                 K ⊢ T1 ⬌* T2 → L ⊢ U1 ⬌* U2.
+#L #K #d #e #HLK #T1 #U1 #HTU1 #T2 #U2 #HTU2 #HT12
+elim (cpcs_inv_cprs … HT12) -HT12 #T #HT1 #HT2
+elim (lift_total T d e) #U #HTU
+lapply (cprs_lift … HLK … HTU1 … HT1 … HTU) -T1 #HU1
+lapply (cprs_lift … HLK … HTU2 … HT2 … HTU) -K -T2 -T -d -e /2 width=3/
+qed.
+
+lemma cpcs_strip: ∀L,T1,T. L ⊢ T ⬌* T1 → ∀T2. L ⊢ T ⬌ T2 →
+                  ∃∃T0. L ⊢ T1 ⬌ T0 & L ⊢ T2 ⬌* T0.
+/3 width=3/ qed.
+
+(* Main properties **********************************************************)
+
+(* Basic_1: was pc3_t *)
+theorem cpcs_trans: ∀L,T1,T. L ⊢ T1 ⬌* T → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
+/2 width=3/ qed.
+
+theorem cpcs_canc_sn: ∀L,T,T1,T2. L ⊢ T ⬌* T1 → L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
+/3 width=3 by cpcs_trans, cpcs_sym/ qed. (**) (* /3 width=3/ is too slow *)
+
+theorem cpcs_canc_dx: ∀L,T,T1,T2. L ⊢ T1 ⬌* T → L ⊢ T2 ⬌* T → L ⊢ T1 ⬌* T2.
+/3 width=3 by cpcs_trans, cpcs_sym/ qed. (**) (* /3 width=3/ is too slow *)
+
+lemma cpcs_abbr1: ∀a,L,V1,V2. L ⊢ V1 ⬌* V2 → ∀T1,T2. L.ⓓV1 ⊢ T1 ⬌* T2 →
+                  L ⊢ ⓓ{a}V1. T1 ⬌* ⓓ{a}V2. T2.
+#a #L #V1 #V2 #HV12 #T1 #T2 #HT12
+@(cpcs_trans … (ⓓ{a}V1.T2)) /2 width=1/
+qed.
+
+lemma cpcs_abbr2: ∀a,L,V1,V2. L ⊢ V1 ⬌* V2 → ∀T1,T2. L.ⓓV2 ⊢ T1 ⬌* T2 →
+                  L ⊢ ⓓ{a}V1. T1 ⬌* ⓓ{a}V2. T2.
+#a #L #V1 #V2 #HV12 #T1 #T2 #HT12
+@(cpcs_trans … (ⓓ{a}V2.T1)) /2 width=1/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_cprs.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_cprs.ma
new file mode 100644 (file)
index 0000000..cb1f5d7
--- /dev/null
@@ -0,0 +1,59 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/cprs.ma".
+include "basic_2/equivalence/cpcs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
+
+(* Properties about context sensitive computation on terms ******************)
+
+(* Basic_1: was: pc3_pr3_r *)
+lemma cpcs_cprs_dx: ∀L,T1,T2. L ⊢ T1 ➡* T2 → L ⊢ T1 ⬌* T2.
+#L #T1 #T2 #H @(cprs_ind … H) -T2 /width=1/ /3 width=3/
+qed.
+
+(* Basic_1: was: pc3_pr3_x *)
+lemma cpcs_cprs_sn: ∀L,T1,T2. L ⊢ T2 ➡* T1 → L ⊢ T1 ⬌* T2.
+#L #T1 #T2 #H @(cprs_ind_dx … H) -T2 /width=1/ /3 width=3/
+qed.
+
+lemma cpcs_cprs_strap1: ∀L,T1,T. L ⊢ T1 ⬌* T → ∀T2. L ⊢ T ➡* T2 → L ⊢ T1 ⬌* T2.
+#L #T1 #T #HT1 #T2 #H @(cprs_ind … H) -T2 /width=1/ /2 width=3/
+qed.
+
+lemma cpcs_cprs_strap2: ∀L,T1,T. L ⊢ T1 ➡* T → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
+#L #T1 #T #H #T2 #HT2 @(cprs_ind_dx … H) -T1 /width=1/ /2 width=3/
+qed.
+
+lemma cpcs_cprs_div: ∀L,T1,T. L ⊢ T1 ⬌* T → ∀T2. L ⊢ T2 ➡* T → L ⊢ T1 ⬌* T2.
+#L #T1 #T #HT1 #T2 #H @(cprs_ind_dx … H) -T2 /width=1/ /2 width=3/
+qed.
+
+(* Basic_1: was: pc3_pr3_conf *)
+lemma cpcs_cprs_conf: ∀L,T1,T. L ⊢ T ➡* T1 → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
+#L #T1 #T #H #T2 #HT2 @(cprs_ind … H) -T1 /width=1/ /2 width=3/
+qed.
+
+(* Basic_1: was: pc3_pr3_t *)
+(* Basic_1: note: pc3_pr3_t should be renamed *)
+lemma cprs_div: ∀L,T1,T. L ⊢ T1 ➡* T → ∀T2. L ⊢ T2 ➡* T → L ⊢ T1 ⬌* T2.
+#L #T1 #T #HT1 #T2 #H @(cprs_ind_dx … H) -T2 /2 width=1/ /2 width=3/
+qed.
+
+lemma cprs_cpr_div: ∀L,T1,T. L ⊢ T1 ➡* T → ∀T2. L ⊢ T2 ➡ T → L ⊢ T1 ⬌* T2.
+/3 width=5 by step, cprs_div/ qed-.
+
+lemma cpr_cprs_div: ∀L,T1,T. L ⊢ T1 ➡ T → ∀T2. L ⊢ T2 ➡* T → L ⊢ T1 ⬌* T2.
+/3 width=3 by step, cprs_div/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_delift.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_delift.ma
new file mode 100644 (file)
index 0000000..7012ec1
--- /dev/null
@@ -0,0 +1,37 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/delift_lift.ma".
+include "basic_2/unfold/delift_delift.ma".
+include "basic_2/computation/cprs_delift.ma".
+include "basic_2/equivalence/cpcs_cpcs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
+
+(* Properties on inverse basic term relocation ******************************)
+
+lemma cpcs_zeta_delift_comm: ∀L,V,T1,T2. L.ⓓV ⊢ ▼*[O, 1] T1 ≡ T2 →
+                             L ⊢ T2 ⬌* +ⓓV.T1.
+/3 width=1/ qed.
+
+(* Basic_1: was only: pc3_gen_cabbr *)
+lemma thin_cpcs_delift_mono: ∀L,U1,U2. L ⊢ U1 ⬌* U2 →
+                             ∀K,d,e. ▼*[d, e] L ≡ K → ∀T1. L ⊢ ▼*[d, e] U1 ≡ T1 →
+                             ∀T2. L ⊢ ▼*[d, e] U2 ≡ T2 → K ⊢ T1 ⬌* T2.
+#L #U1 #U2 #H #K #d #e #HLK #T1 #HTU1 #T2 #HTU2
+elim (cpcs_inv_cprs … H) -H #U #HU1 #HU2
+elim (thin_cprs_delift_conf … HU1 … HLK … HTU1) -U1 #T #HT1 #HUT
+elim (thin_cprs_delift_conf … HU2 … HLK … HTU2) -U2 -HLK #X #HT2 #H
+lapply (delift_mono … H … HUT) -L #H destruct /2 width=3/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpr.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpr.ma
new file mode 100644 (file)
index 0000000..13713e5
--- /dev/null
@@ -0,0 +1,43 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/cpr_ltpr.ma".
+include "basic_2/equivalence/cpcs_cpcs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
+
+(* Properties about context-free parallel reduction on local environments ***)
+
+(* Basic_1: was only: pc3_pr0_pr2_t *)
+(* Basic_1: note: pc3_pr0_pr2_t should be renamed *)
+lemma ltpr_cpr_conf: ∀L1,L2. L1 ➡ L2 → ∀T1,T2. L1 ⊢ T1 ➡ T2 → L2 ⊢ T1 ⬌* T2.
+#L1 #L2 #HL12 #T1 #T2 #HT12
+elim (cpr_ltpr_conf_eq … HT12 … HL12) -L1 #T #HT1 #HT2
+@(cprs_div … T) /2 width=1/ /3 width=1/ (**) (* /4 width=3/ is too long *)
+qed.
+
+(* Basic_1: was: pc3_wcpr0_t *)
+(* Basic_1: note: pc3_wcpr0_t should be renamed *)
+lemma ltpr_cprs_conf: ∀L1,L2. L1 ➡ L2 → ∀T1,T2. L1 ⊢ T1 ➡* T2 → L2 ⊢ T1 ⬌* T2.
+#L1 #L2 #HL12 #T1 #T2 #H @(cprs_ind … H) -T2 //
+#T #T2 #_ #HT2 #IHT1
+@(cpcs_trans … IHT1) -T1 /2 width=3/
+qed.
+
+(* Basic_1: was: pc3_wcpr0 *)
+lemma ltpr_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 #T #HT1 #HT2
+@(cpcs_canc_dx … T) /2 width=3/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss.ma
new file mode 100644 (file)
index 0000000..4338566
--- /dev/null
@@ -0,0 +1,42 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/equivalence/cpcs_cpcs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
+
+(* Properties concerning partial unfold on local environments ***************)
+
+lemma ltpss_dx_cpr_conf: ∀L1,L2,d,e. L1 ▶* [d, e] L2 →
+                         ∀T1,T2. L1 ⊢ T1 ➡ T2 → L2 ⊢ T1 ⬌* T2.
+#L1 #L2 #d #e #HL12 #T1 #T2 *
+lapply (ltpss_dx_weak_all … HL12)
+>(ltpss_dx_fwd_length … HL12) -HL12 #HL12 #T #HT1 #HT2
+elim (ltpss_dx_tpss_conf … HT2 … HL12) -L1 #T0 #HT0 #HT20
+@(cprs_div … T0) /3 width=3/ (**) (* /4/ is too slow *)
+qed.
+
+lemma ltpss_dx_cprs_conf: ∀L1,L2,d,e. L1 ▶* [d, e] L2 →
+                          ∀T1,T2. L1 ⊢ T1 ➡* T2 → L2 ⊢ T1 ⬌* T2.
+#L1 #L2 #d #e #HL12 #T1 #T2 #H @(cprs_ind … H) -T2 //
+#T #T2 #_ #HT2 #IHT1
+@(cpcs_trans … IHT1) -T1 /2 width=5/
+qed.
+
+lemma ltpss_dx_cpcs_conf: ∀L1,L2,d,e. L1 ▶* [d, e] L2 →
+                          ∀T1,T2. L1 ⊢ T1 ⬌* T2 → L2 ⊢ T1 ⬌* T2.
+#L1 #L2 #d #e #HL12 #T1 #T2 #H
+elim (cpcs_inv_cprs … H) -H #T #HT1 #HT2
+@(cpcs_canc_dx … T) /2 width=5/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/fpcs.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/fpcs.ma
new file mode 100644 (file)
index 0000000..c0e0235
--- /dev/null
@@ -0,0 +1,73 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/conversion/fpc.ma".
+
+(* CONTEXT-FREE PARALLEL EQUIVALENCE ON CLOSURES ****************************)
+
+definition fpcs: bi_relation lenv term ≝ bi_TC … fpc.
+
+interpretation "context-free parallel equivalence (closure)"
+   'FocalizedPConvStar L1 T1 L2 T2 = (fpcs L1 T1 L2 T2).
+
+(* Basic eliminators ********************************************************)
+
+lemma fpcs_ind: ∀L1,T1. ∀R:relation2 lenv term. R L1 T1 →
+                (∀L,L2,T,T2. ⦃L1, T1⦄ ⬌* ⦃L, T⦄ → ⦃L, T⦄ ⬌ ⦃L2, T2⦄ → R L T → R L2 T2) →
+                ∀L2,T2. ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄ → R L2 T2.
+/3 width=7 by bi_TC_star_ind/ qed-.
+
+lemma fpcs_ind_dx: ∀L2,T2. ∀R:relation2 lenv term. R L2 T2 →
+                   (∀L1,L,T1,T. ⦃L1, T1⦄ ⬌ ⦃L, T⦄ → ⦃L, T⦄ ⬌* ⦃L2, T2⦄ → R L T → R L1 T1) →
+                   ∀L1,T1. ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄ → R L1 T1.
+/3 width=7 by bi_TC_star_ind_dx/ qed-.
+
+(* Basic properties *********************************************************)
+
+lemma fpcs_refl: bi_reflexive … fpcs.
+/2 width=1/ qed.
+
+lemma fpcs_sym: bi_symmetric … fpcs.
+/3 width=1/ qed.
+
+lemma fpcs_strap1: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⬌* ⦃L, T⦄ → ⦃L, T⦄ ⬌ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+/2 width=4/ qed.
+
+lemma fpcs_strap2: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⬌ ⦃L, T⦄ → ⦃L, T⦄ ⬌* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+/2 width=4/ qed.
+
+lemma fpcs_fpr_dx: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+/3 width=1/ qed.
+
+lemma fpcs_fpr_sn: ∀L1,L2,T1,T2. ⦃L2, T2⦄ ➡ ⦃L1, T1⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+/3 width=1/ qed.
+
+lemma fpcs_fpr_strap1: ∀L1,L,T1,T. ⦃L1, T1⦄ ⬌* ⦃L, T⦄ →
+                       ∀L2,T2. ⦃L, T⦄ ➡ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+/3 width=4/ qed.
+
+lemma fpcs_fpr_strap2: ∀L1,L,T1,T. ⦃L1, T1⦄ ➡ ⦃L, T⦄ →
+                       ∀L2,T2. ⦃L, T⦄ ⬌* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+/3 width=4/ qed.
+
+lemma fpcs_fpr_div: ∀L1,L,T1,T. ⦃L1, T1⦄ ⬌* ⦃L, T⦄ →
+                    ∀L2,T2. ⦃L2, T2⦄ ➡ ⦃L, T⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+/3 width=4/ qed.
+
+lemma fpr_div: ∀L1,L,T1,T. ⦃L1, T1⦄ ➡ ⦃L, T⦄ → ∀L2,T2. ⦃L2, T2⦄ ➡ ⦃L, T⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+/3 width=4/ qed-.
+
+lemma fpcs_fpr_conf: ∀L1,L,T1,T. ⦃L, T⦄ ➡ ⦃L1, T1⦄ →
+                     ∀L2,T2. ⦃L, T⦄ ⬌* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+/3 width=4/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/fpcs_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/fpcs_aaa.ma
new file mode 100644 (file)
index 0000000..9f4327b
--- /dev/null
@@ -0,0 +1,30 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/fprs_aaa.ma".
+include "basic_2/equivalence/fpcs_fpcs.ma".
+
+(* CONTEXT-FREE PARALLEL EQUIVALENCE ON CLOSURES ****************************)
+
+(* Main properties about atomic arity assignment on terms *******************)
+
+theorem aaa_fpcs_mono: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄ →
+                       ∀A1. L1 ⊢ T1 ⁝ A1 → ∀A2. L2 ⊢ T2 ⁝ A2 →
+                       A1 = A2.
+#L1 #L2 #T1 #T2 #H12 #A1 #HT1 #A2 #HT2
+elim (fpcs_inv_fprs … H12) -H12 #L #T #H1 #H2
+lapply (aaa_fprs_conf … HT1 … H1) -L1 -T1 #HT1
+lapply (aaa_fprs_conf … HT2 … H2) -L2 -T2 #HT2
+lapply (aaa_mono … HT1 … HT2) -L -T //
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/fpcs_cpcs.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/fpcs_cpcs.ma
new file mode 100644 (file)
index 0000000..4b51a70
--- /dev/null
@@ -0,0 +1,26 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/fprs_cprs.ma".
+include "basic_2/equivalence/cpcs_cpcs.ma".
+include "basic_2/equivalence/fpcs_fprs.ma".
+
+(* CONTEXT-FREE PARALLEL EQUIVALENCE ON CLOSURES ****************************)
+
+(* Properties on context-sensitive parallel equivalence for terms ***********)
+
+lemma cpcs_fpcs: ∀L,T1,T2. L ⊢ T1 ⬌* T2 → ⦃L, T1⦄ ⬌* ⦃L, T2⦄.
+#L #T1 #T2 #H
+elim (cpcs_inv_cprs … H) -H /3 width=4 by fprs_div, cprs_fprs/ (**) (* too slow without trace *)
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/fpcs_fpcs.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/fpcs_fpcs.ma
new file mode 100644 (file)
index 0000000..270e8dc
--- /dev/null
@@ -0,0 +1,66 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/fprs_fprs.ma".
+include "basic_2/conversion/fpc_fpc.ma".
+include "basic_2/equivalence/fpcs_fprs.ma".
+
+(* CONTEXT-FREE PARALLEL EQUIVALENCE ON CLOSURES ****************************)
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma fpcs_inv_fprs: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄ →
+                     ∃∃L,T. ⦃L1, T1⦄ ➡* ⦃L, T⦄ & ⦃L2, T2⦄ ➡* ⦃L, T⦄.
+#L1 #L2 #T1 #T2 #H @(fpcs_ind … H) -L2 -T2
+[ /3 width=4/
+| #L #L2 #T #T2 #_ #HT2 * #L0 #T0 #HT10 elim HT2 -HT2 #HT2 #HT0
+  [ elim (fprs_strip … HT2 … HT0) -L -T #L #T #HT2 #HT0
+    lapply (fprs_strap1 … HT10 … HT0) -L0 -T0 /2 width=4/
+  | lapply (fprs_strap2 … HT2 … HT0) -L -T /2 width=4/
+  ]
+]
+qed-.
+
+(* Advanced properties ******************************************************)
+
+lemma fpr_fprs_conf: ∀L,L1,L2,T,T1,T2. ⦃L, T⦄ ➡* ⦃L1, T1⦄ → ⦃L, T⦄ ➡ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+#L #L1 #L2 #T #T1 #T2 #HT1 #HT2
+elim (fprs_strip … HT2 … HT1) /2 width=4 by fpr_fprs_div/
+qed-.
+
+lemma fprs_fpr_conf: ∀L,L1,L2,T,T1,T2. ⦃L, T⦄ ➡* ⦃L1, T1⦄ → ⦃L, T⦄ ➡ ⦃L2, T2⦄ → ⦃L2, T2⦄ ⬌* ⦃L1, T1⦄.
+#L #L1 #L2 #T #T1 #T2 #HT1 #HT2
+elim (fprs_strip … HT2 … HT1) /2 width=4 by fprs_fpr_div/
+qed-.
+
+lemma fprs_conf: ∀L,L1,L2,T,T1,T2. ⦃L, T⦄ ➡* ⦃L1, T1⦄ → ⦃L, T⦄ ➡* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+#L #L1 #L2 #T #T1 #T2 #HT1 #HT2
+elim (fprs_conf … HT1 … HT2) /2 width=4/
+qed-.
+
+lemma fpcs_strip: ∀L0,L1,T0,T1. ⦃L0, T0⦄ ⬌ ⦃L1, T1⦄ →
+                  ∀L2,T2. ⦃L0, T0⦄ ⬌* ⦃L2, T2⦄ →
+                  ∃∃L,T. ⦃L1, T1⦄ ⬌* ⦃L, T⦄ & ⦃L2, T2⦄ ⬌ ⦃L, T⦄.
+/3 width=4/ qed.
+
+(* Main properties **********************************************************)
+
+theorem fpcs_trans: bi_transitive … fpcs.
+/2 width=4/ qed.
+
+theorem fpcs_canc_sn: ∀L,L1,L2,T,T1,T2. ⦃L, T⦄ ⬌* ⦃L1, T1⦄ → ⦃L, T⦄ ⬌* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+/3 width=4 by fpcs_trans, fpcs_sym/ qed. (**) (* /3 width=3/ is too slow *)
+
+theorem fpcs_canc_dx: ∀L1,L2,L,T1,T2,T. ⦃L1, T1⦄ ⬌* ⦃L, T⦄ → ⦃L2, T2⦄ ⬌* ⦃L, T⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+/3 width=4 by fpcs_trans, fpcs_sym/ qed. (**) (* /3 width=3/ is too slow *)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/fpcs_fprs.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/fpcs_fprs.ma
new file mode 100644 (file)
index 0000000..1d3f71f
--- /dev/null
@@ -0,0 +1,55 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/fprs.ma".
+include "basic_2/equivalence/fpcs.ma".
+
+(* CONTEXT-FREE PARALLEL EQUIVALENCE ON CLOSURES ****************************)
+
+(* Properties on context-free parallel computation for closures *************)
+
+(* Note: lemma 1000 *)
+lemma fpcs_fprs_dx: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ➡* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+#L1 #L2 #T1 #T2 #H @(fprs_ind … H) -L2 -T2 /width=1/ /3 width=4/
+qed.
+
+lemma fpcs_fprs_sn: ∀L1,L2,T1,T2. ⦃L2, T2⦄ ➡* ⦃L1, T1⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+#L1 #L2 #T1 #T2 #H @(fprs_ind_dx … H) -L2 -T2 /width=1/ /3 width=4/
+qed.
+
+lemma fpcs_fprs_strap1: ∀L1,L,T1,T. ⦃L1, T1⦄ ⬌* ⦃L, T⦄ → ∀L2,T2. ⦃L, T⦄ ➡* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+#L1 #L #T1 #T #HT1 #L2 #T2 #H @(fprs_ind … H) -L2 -T2 /width=1/ /2 width=4/
+qed.
+
+lemma fpcs_fprs_strap2: ∀L1,L,T1,T. ⦃L1, T1⦄ ➡* ⦃L, T⦄ → ∀L2,T2. ⦃L, T⦄ ⬌* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+#L1 #L #T1 #T #H #L2 #T2 #HT2 @(fprs_ind_dx … H) -L1 -T1 /width=1/ /2 width=4/
+qed.
+
+lemma fpcs_fprs_div: ∀L1,L,T1,T. ⦃L1, T1⦄ ⬌* ⦃L, T⦄ → ∀L2,T2. ⦃L2, T2⦄ ➡* ⦃L, T⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+#L1 #L #T1 #T #HT1 #L2 #T2 #H @(fprs_ind_dx … H) -L2 -T2 /width=1/ /2 width=4/
+qed.
+
+lemma fpcs_fprs_conf: ∀L1,L,T1,T. ⦃L, T⦄ ➡* ⦃L1, T1⦄ → ∀L2,T2. ⦃L, T⦄ ⬌* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+#L1 #L #T1 #T #H #T2 #HT2 @(fprs_ind … H) -L1 -T1 /width=1/ /3 width=4 by fpcs_fpr_conf/ (**) (* /2 width=4/ does not work *)
+qed.
+
+lemma fprs_div: ∀L1,L,T1,T. ⦃L1, T1⦄ ➡* ⦃L, T⦄ → ∀L2,T2. ⦃L2, T2⦄ ➡* ⦃L, T⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+#L1 #L #T1 #T #HT1 #T2 #L2 #H @(fprs_ind_dx … H) -L2 -T2 /2 width=1/ /2 width=4/
+qed.
+
+lemma fprs_fpr_div: ∀L1,L,T1,T. ⦃L1, T1⦄ ➡* ⦃L, T⦄ → ∀L2,T2. ⦃L2, T2⦄ ➡ ⦃L, T⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+/3 width=7 by bi_step, fprs_div/ qed-.
+
+lemma fpr_fprs_div: ∀L1,L,T1,T. ⦃L1, T1⦄ ➡ ⦃L, T⦄ → ∀L2,T2. ⦃L2, T2⦄ ➡* ⦃L, T⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
+/3 width=4 by bi_step, fprs_div/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/lfpcs.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/lfpcs.ma
new file mode 100644 (file)
index 0000000..fded17b
--- /dev/null
@@ -0,0 +1,69 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/conversion/lfpc.ma".
+
+(* FOCALIZED PARALLEL EQUIVALENCE ON LOCAL ENVIRONMENTS *********************)
+
+definition lfpcs: relation lenv ≝ TC … lfpc.
+
+interpretation "focalized parallel equivalence (local environment)"
+   'FocalizedPConvStar L1 L2 = (lfpcs L1 L2).
+
+(* Basic eliminators ********************************************************)
+
+lemma lfpcs_ind: ∀L1. ∀R:predicate lenv. R L1 →
+                 (∀L,L2. ⦃L1⦄ ⬌* ⦃L⦄ → ⦃L⦄ ⬌ ⦃L2⦄ → R L → R L2) →
+                 ∀L2. ⦃L1⦄ ⬌* ⦃L2⦄ → R L2.
+#L1 #R #HL1 #IHL1 #L2 #HL12 @(TC_star_ind … HL1 IHL1 … HL12) //
+qed-.
+
+lemma lfpcs_ind_dx: ∀L2. ∀R:predicate lenv. R L2 →
+                    (∀L1,L. ⦃L1⦄ ⬌ ⦃L⦄ → ⦃L⦄ ⬌* ⦃L2⦄ → R L → R L1) →
+                    ∀L1. ⦃L1⦄ ⬌* ⦃L2⦄ → R L1.
+#L2 #R #HL2 #IHL2 #L1 #HL12
+@(TC_star_ind_dx … HL2 IHL2 … HL12) //
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma lfpcs_refl: reflexive … lfpcs.
+/2 width=1/ qed.
+
+lemma lfprs_sym: symmetric … lfpcs.
+/3 width=1/ qed.
+
+lemma lfpcs_strap1: ∀L1,L,L2. ⦃L1⦄ ⬌* ⦃L⦄ → ⦃L⦄ ⬌ ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
+/2 width=3/ qed.
+
+lemma lfpcs_strap2: ∀L1,L,L2. ⦃L1⦄ ⬌ ⦃L⦄ → ⦃L⦄ ⬌* ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
+/2 width=3/ qed.
+
+lemma lfpcs_lfpr_dx: ∀L1,L2. ⦃L1⦄ ➡ ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
+/3 width=1/ qed.
+
+lemma lfpcs_lfpr_sn: ∀L1,L2. ⦃L2⦄ ➡ ⦃L1⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
+/3 width=1/ qed.
+
+lemma lfpcs_lfpr_strap1: ∀L1,L. ⦃L1⦄ ⬌* ⦃L⦄ → ∀L2. ⦃L⦄ ➡ ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
+/3 width=3/ qed.
+
+lemma lfpcs_lfpr_strap2: ∀L1,L. ⦃L1⦄ ➡ ⦃L⦄ → ∀L2. ⦃L⦄ ⬌* ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
+/3 width=3/ qed.
+
+lemma lfpcs_lfpr_div: ∀L1,L. ⦃L1⦄ ⬌* ⦃L⦄ → ∀L2. ⦃L2⦄ ➡ ⦃L⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
+/3 width=3/ qed.
+
+lemma lfpcs_lfpr_conf: ∀L1,L. ⦃L⦄ ➡ ⦃L1⦄ → ∀L2. ⦃L⦄ ⬌* ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
+/3 width=3/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/lfpcs_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/lfpcs_aaa.ma
new file mode 100644 (file)
index 0000000..b7cea0b
--- /dev/null
@@ -0,0 +1,30 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/lfprs_aaa.ma".
+include "basic_2/equivalence/lfpcs_lfpcs.ma".
+
+(* FOCALIZED PARALLEL EQUIVALENCE ON LOCAL ENVIRONMENTS *********************)
+
+(* Main properties about atomic arity assignment on terms *******************)
+
+theorem aaa_lfpcs_mono: ∀L1,L2. ⦃L1⦄ ⬌* ⦃L2⦄ →
+                        ∀T,A1. L1 ⊢ T ⁝ A1 → ∀A2. L2 ⊢ T ⁝ A2 →
+                        A1 = A2.
+#L1 #L2 #HL12 #T #A1 #HT1 #A2 #HT2
+elim (lfpcs_inv_lfprs … HL12) -HL12 #L #HL1 #HL2
+lapply (aaa_lfprs_conf … HT1 … HL1) -L1 #HT1
+lapply (aaa_lfprs_conf … HT2 … HL2) -L2 #HT2
+lapply (aaa_mono … HT1 … HT2) -L -T //
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/lfpcs_lfpcs.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/lfpcs_lfpcs.ma
new file mode 100644 (file)
index 0000000..434068e
--- /dev/null
@@ -0,0 +1,50 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/lfprs_lfprs.ma".
+include "basic_2/conversion/lfpc_lfpc.ma".
+include "basic_2/equivalence/lfpcs_lfprs.ma".
+
+(* FOCALIZED PARALLEL EQUIVALENCE ON LOCAL ENVIRONMENTS *********************)
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma lfpcs_inv_lfprs: ∀L1,L2. ⦃L1⦄ ⬌* ⦃L2⦄ →
+                       ∃∃L. ⦃L1⦄ ➡* ⦃L⦄ & ⦃L2⦄ ➡* ⦃L⦄.
+#L1 #L2 #H @(lfpcs_ind … H) -L2
+[ /3 width=3/
+| #L #L2 #_ #HL2 * #L0 #HL10 elim HL2 -HL2 #HL2 #HL0
+  [ elim (lfprs_strip … HL0 … HL2) -L #L #HL0 #HL2
+    lapply (lfprs_strap1 … HL10 … HL0) -L0 /2 width=3/
+  | lapply (lfprs_strap2 … HL2 … HL0) -L /2 width=3/
+  ]
+]
+qed-.
+
+(* Advanced properties ******************************************************)
+
+lemma lfpcs_strip: ∀L,L1. ⦃L⦄ ⬌* ⦃L1⦄ → ∀L2. ⦃L⦄ ⬌ ⦃L2⦄ →
+                   ∃∃L0. ⦃L1⦄ ⬌ ⦃L0⦄ & ⦃L2⦄ ⬌* ⦃L0⦄.
+/3 width=3/ qed.
+
+(* Main properties **********************************************************)
+
+theorem lfpcs_trans: ∀L1,L. ⦃L1⦄ ⬌* ⦃L⦄ → ∀L2. ⦃L⦄ ⬌* ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
+/2 width=3/ qed.
+
+theorem lfpcs_canc_sn: ∀L,L1,L2. ⦃L⦄ ⬌* ⦃L1⦄ → ⦃L⦄ ⬌* ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
+/3 width=3 by lfpcs_trans, lfprs_sym/ qed.
+
+theorem lfpcs_canc_dx: ∀L,L1,L2. ⦃L1⦄ ⬌* ⦃L⦄ → ⦃L2⦄ ⬌* ⦃L⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
+/3 width=3 by lfpcs_trans, lfprs_sym/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/lfpcs_lfprs.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/lfpcs_lfprs.ma
new file mode 100644 (file)
index 0000000..baf2caf
--- /dev/null
@@ -0,0 +1,48 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/lfprs.ma".
+include "basic_2/equivalence/lfpcs.ma".
+
+(* FOCALIZED PARALLEL EQUIVALENCE ON LOCAL ENVIRONMENTS *********************)
+
+(* Properties on focalized computation for local environments ***************)
+
+lemma lfpcs_lfprs_dx: ∀L1,L2. ⦃L1⦄ ➡* ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
+#L1 #L2 #H @(lfprs_ind … H) -L2 /width=1/ /3 width=3/
+qed.
+
+lemma lfpcs_lfprs_sn: ∀L1,L2. ⦃L2⦄ ➡* ⦃L1⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
+#L1 #L2 #H @(lfprs_ind_dx … H) -L2 /width=1/ /3 width=3/
+qed.
+
+lemma lfpcs_lfprs_strap1: ∀L1,L. ⦃L1⦄ ⬌* ⦃L⦄ → ∀L2. ⦃L⦄ ➡* ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
+#L1 #L #HL1 #L2 #H @(lfprs_ind … H) -L2 /width=1/ /2 width=3/
+qed.
+
+lemma lfpcs_lfprs_strap2: ∀L1,L. ⦃L1⦄ ➡* ⦃L⦄ → ∀L2. ⦃L⦄ ⬌* ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
+#L1 #L #H #L2 #HL2 @(lfprs_ind_dx … H) -L1 /width=1/ /2 width=3/
+qed.
+
+lemma lfpcs_lfprs_div: ∀L1,L. ⦃L1⦄ ⬌* ⦃L⦄ → ∀L2. ⦃L2⦄ ➡* ⦃L⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
+#L1 #L #HL1 #L2 #H @(lfprs_ind_dx … H) -L2 /width=1/ /2 width=3/
+qed.
+
+lemma lfpcs_lfprs_conf: ∀L1,L. ⦃L⦄ ➡* ⦃L1⦄ → ∀L2. ⦃L⦄ ⬌* ⦃L2⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
+#L1 #L #H #L2 #HL2 @(lfprs_ind … H) -L1 /width=1/ /2 width=3/
+qed.
+
+lemma lfprs_div: ∀L1,L. ⦃L1⦄ ➡* ⦃L⦄ → ∀L2. ⦃L2⦄ ➡* ⦃L⦄ → ⦃L1⦄ ⬌* ⦃L2⦄.
+#L1 #L #HL1 #L2 #H @(lfprs_ind_dx … H) -L2 /2 width=1/ /2 width=3/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/lsubse.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/lsubse.ma
new file mode 100644 (file)
index 0000000..6719c7a
--- /dev/null
@@ -0,0 +1,114 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/ssta.ma".
+include "basic_2/computation/cprs.ma".
+include "basic_2/equivalence/cpcs.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR CONTEXT-SENSITIVE PARALLEL EQUIVALENCE **)
+
+(* Note: this is not transitive *)
+inductive lsubse (h:sh) (g:sd h): relation lenv ≝
+| lsubse_atom: lsubse h g (⋆) (⋆)
+| lsubse_pair: ∀I,L1,L2,V. lsubse h g L1 L2 →
+               lsubse h g (L1. ⓑ{I} V) (L2. ⓑ{I} V)
+| lsubse_abbr: ∀L1,L2,V1,V2,W1,W2,l. L1 ⊢ W1 ⬌* W2 →
+               ⦃h, L1⦄ ⊢ V1 •[g, l + 1] W1 → ⦃h, L2⦄ ⊢ W2 •[g, l] V2 →
+               lsubse h g L1 L2 → lsubse h g (L1. ⓓV1) (L2. ⓛW2)
+.
+
+interpretation
+  "local environment refinement (context-sensitive parallel equivalence)"
+  'CrSubEqSE h g L1 L2 = (lsubse h g L1 L2).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact lsubse_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 lsubse_inv_atom1: ∀h,g,L2. h ⊢ ⋆ ⊢•⊑[g] L2 → L2 = ⋆.
+/2 width=5 by lsubse_inv_atom1_aux/ qed-.
+
+fact lsubse_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 lsubse_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 lsubse_inv_pair1_aux/ qed-.
+
+fact lsubse_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 lsubse_inv_atom2: ∀h,g,L1. h ⊢ L1 ⊢•⊑[g] ⋆ → L1 = ⋆.
+/2 width=5 by lsubse_inv_atom2_aux/ qed-.
+
+fact lsubse_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 lsubse_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 lsubse_inv_pair2_aux/ qed-.
+
+(* Basic_forward lemmas *****************************************************)
+
+lemma lsubse_fwd_lsubs1: ∀h,g,L1,L2. h ⊢ L1 ⊢•⊑[g] L2 → L1 ≼[0, |L1|] L2.
+#h #g #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
+qed-.
+
+lemma lsubse_fwd_lsubs2: ∀h,g,L1,L2. h ⊢ L1 ⊢•⊑[g] L2 → L1 ≼[0, |L2|] L2.
+#h #g #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma lsubse_refl: ∀h,g,L. h ⊢ L ⊢•⊑[g] L.
+#h #g #L elim L -L // /2 width=1/
+qed.
+
+lemma lsubse_cprs_trans: ∀h,g,L1,L2. h ⊢ L1 ⊢•⊑[g] L2 →
+                         ∀T1,T2. L2 ⊢ T1 ➡* T2 → L1 ⊢ T1 ➡* T2.
+/3 width=5 by lsubse_fwd_lsubs2, cprs_lsubs_trans/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/lsubse_cpcs.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/lsubse_cpcs.ma
new file mode 100644 (file)
index 0000000..2cc3ce0
--- /dev/null
@@ -0,0 +1,25 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/equivalence/cpcs_cpcs.ma".
+include "basic_2/equivalence/lsubse.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR CONTEXT-SENSITIVE PARALLEL EQUIVALENCE **)
+
+(* Properties on context-sensitive parallel equivalence for terms ***********)
+
+lemma lsubse_cpcs_trans: ∀h,g,L1,L2. h ⊢ L1 ⊢•⊑[g] L2 →
+                         ∀T1,T2. L2 ⊢ T1 ⬌* T2 → L1 ⊢ T1 ⬌* T2.
+/3 width=5 by lsubse_fwd_lsubs2, cpcs_lsubs_trans/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/lsubse_ldrop.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/lsubse_ldrop.ma
new file mode 100644 (file)
index 0000000..729f4b6
--- /dev/null
@@ -0,0 +1,65 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/equivalence/lsubse.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR CONTEXT-SENSITIVE PARALLEL EQUIVALENCE **)
+
+(* Properties concerning basic local environment slicing ********************)
+
+(* Note: the constant 0 cannot be generalized *)
+lemma lsubse_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 … H) -H * #He #HLK1
+  [ destruct
+    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … 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 … H) -H * #He #HLK1
+  [ destruct
+    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=6/
+  | elim (IHL12 … HLK1) -L1 /3 width=3/
+  ]
+]
+qed-.
+
+(* Note: the constant 0 cannot be generalized *)
+lemma lsubse_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 … H) -H * #He #HLK2
+  [ destruct
+    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … 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 … H) -H * #He #HLK2
+  [ destruct
+    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=6/
+  | elim (IHL12 … HLK2) -L2 /3 width=3/
+  ]
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/lsubse_ssta.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/lsubse_ssta.ma
new file mode 100644 (file)
index 0000000..b5dc3f5
--- /dev/null
@@ -0,0 +1,26 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(*
+include "basic_2/computation/xprs_lsubss.ma".
+*)
+include "basic_2/equivalence/lsubse.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR CONTEXT-SENSITIVE PARALLEL EQUIVALENCE **)
+
+(* Properties on stratified native type assignment **************************)
+
+axiom lsubse_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.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/csup/csup.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/csup/csup.etc
new file mode 100644 (file)
index 0000000..dcfe086
--- /dev/null
@@ -0,0 +1,157 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+notation "hvbox( ⦃ L1, break T1 ⦄ > break ⦃ L2 , break T2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'SupTerm $L1 $T1 $L2 $T2 }.
+
+include "basic_2/substitution/ldrop.ma".
+
+(* SUPCLOSURE ***************************************************************)
+
+inductive csup: bi_relation lenv term ≝
+| csup_lref   : ∀I,L,K,V,i. ⇩[0, i] L ≡ K.ⓑ{I}V → csup L (#i) K V
+| csup_bind_sn: ∀a,I,L,V,T. csup L (ⓑ{a,I}V.T) L V
+| csup_bind_dx: ∀a,I,L,V,T. csup L (ⓑ{a,I}V.T) (L.ⓑ{I}V) T
+| csup_flat_sn: ∀I,L,V,T.   csup L (ⓕ{I}V.T) L V
+| csup_flat_dx: ∀I,L,V,T.   csup L (ⓕ{I}V.T) L T
+.
+
+interpretation
+   "structural predecessor (closure)"
+   'SupTerm L1 T1 L2 T2 = (csup L1 T1 L2 T2).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact csup_inv_atom1_aux: ∀L1,L2,T1,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ → ∀J. T1 = ⓪{J} →
+                         ∃∃I,i. ⇩[0, i] L1 ≡ L2.ⓑ{I}T2 & J = LRef i.
+#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2
+[ #I #L #K #V #i #HLK #J #H destruct /2 width=4/
+| #a #I #L #V #T #J #H destruct
+| #a #I #L #V #T #J #H destruct
+| #I #L #V #T #J #H destruct
+| #I #L #V #T #J #H destruct
+]
+qed-.
+
+lemma csup_inv_atom1: ∀J,L1,L2,T2. ⦃L1, ⓪{J}⦄ > ⦃L2, T2⦄ →
+                      ∃∃I,i. ⇩[0, i] L1 ≡ L2.ⓑ{I}T2 & J = LRef i.
+/2 width=3 by csup_inv_atom1_aux/ qed-.
+
+fact csup_inv_bind1_aux: ∀L1,L2,T1,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ →
+                         ∀b,J,W,U. T1 = ⓑ{b,J}W.U →
+                         (L2 = L1 ∧ T2 = W) ∨
+                         (L2 = L1.ⓑ{J}W ∧ T2 = U).
+#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2
+[ #I #L #K #V #i #_ #b #J #W #U #H destruct
+| #a #I #L #V #T #b #J #W #U #H destruct /3 width=1/
+| #a #I #L #V #T #b #J #W #U #H destruct /3 width=1/
+| #I #L #V #T #b #J #W #U #H destruct
+| #I #L #V #T #b #J #W #U #H destruct
+]
+qed-.
+
+lemma csup_inv_bind1: ∀b,J,L1,L2,W,U,T2. ⦃L1, ⓑ{b,J}W.U⦄ > ⦃L2, T2⦄ →
+                      (L2 = L1 ∧ T2 = W) ∨
+                      (L2 = L1.ⓑ{J}W ∧ T2 = U).
+/2 width=4 by csup_inv_bind1_aux/ qed-.
+
+fact csup_inv_flat1_aux: ∀L1,L2,T1,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ →
+                         ∀J,W,U. T1 = ⓕ{J}W.U →
+                         L2 = L1 ∧ (T2 = W ∨ T2 = U).
+#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2
+[ #I #L #K #V #i #_ #J #W #U #H destruct
+| #a #I #L #V #T #J #W #U #H destruct
+| #a #I #L #V #T #J #W #U #H destruct
+| #I #L #V #T #J #W #U #H destruct /3 width=1/
+| #I #L #V #T #J #W #U #H destruct /3 width=1/
+]
+qed-.
+
+lemma csup_inv_flat1: ∀J,L1,L2,W,U,T2. ⦃L1, ⓕ{J}W.U⦄ > ⦃L2, T2⦄ →
+                      L2 = L1 ∧ (T2 = W ∨ T2 = U).
+/2 width=4 by csup_inv_flat1_aux/ qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma csup_fwd_cw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ → #{L2, T2} < #{L1, T1}.
+#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2 /width=1/ /2 width=4 by ldrop_pair2_fwd_cw/
+qed-.
+
+lemma csup_fwd_ldrop: ∀L1,L2,T1,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ →
+                      ∃i. ⇩[0, i] L1 ≡ L2 ∨ ⇩[0, i] L2 ≡ L1.
+#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2 /3 width=2/ /4 width=2/
+#I #L1 #K1 #V1 #i #HLK1
+lapply (ldrop_fwd_ldrop2 … HLK1) -HLK1 /3 width=2/
+qed-. 
+
+(* Advanced forward lemmas **************************************************)
+
+lemma lift_csup_trans_eq: ∀T1,U1,d,e. ⇧[d, e] T1 ≡ U1 →
+                          ∀L,U2. ⦃L, U1⦄ > ⦃L, U2⦄ → 
+                          ∃T2. ⇧[d, e] T2 ≡ U2.
+#T1 #U1 #d #e * -T1 -U1 -d -e
+[5: #a #I #V1 #W1 #T1 #U1 #d #e #HVW1 #_ #L #X #H
+    elim (csup_inv_bind1 … H) -H *
+    [ #_ #H destruct /2 width=2/
+    | #H elim (discr_lpair_x_xy … H)
+    ]
+|6: #I #V1 #W1 #T1 #U1 #d #e #HVW1 #HUT1 #L #X #H
+    elim (csup_inv_flat1 … H) -H #_ * #H destruct /2 width=2/
+]
+#i #d #e [2,3: #_ ] #L #X #H
+elim (csup_inv_atom1 … H) -H #I #j #HL #H destruct
+lapply (ldrop_pair2_fwd_cw … HL X) -HL #H
+elim (lt_refl_false … H)
+qed-.
+(*
+lemma lift_csup_trans_gt: ∀L1,L2,U1,U2. ⦃L1, U1⦄ > ⦃L2, U2⦄ →
+                          ⇩[0, 1] L2 ≡ L1 → ∀T1,d,e. ⇧[d, e] T1 ≡ U1 →
+                          ∃T2. ⇧[d + 1, e] T2 ≡ U2.
+#L1 #L2 #U1 #U2 * -L1 -L2 -U1 -U2
+[ #I #L1 #K1 #V #i #HLK1 #HKL1
+  lapply (ldrop_fwd_lw … HLK1) -HLK1 #HLK1
+  lapply (ldrop_fwd_lw … HKL1) -HKL1 #HKL1
+  lapply (transitive_le … HLK1 HKL1) -L1 normalize #H
+  
+  
+| #a
+| #a
+]
+#I #L1 #W1 #U1 #HL1
+  
+
+
+ #X #d #e #H
+  lapply (ldrop_inv_refl … HL1) -HL1
+| #a #I #L1 #W1 #U1 #j #HL1 #X #d #e #H
+  lapply (ldrop_inv_ldrop1 … HL1)
+
+  elim (lift_inv_bind2 … H) -H #W2 #U2 #HW21 #HU21 #H destruct 
+   
+
+ /3 width=2/ /4 width=2/
+
+*)
+
+
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma csup_inv_lref2_be: ∀L,U,i. ⦃L, U⦄ > ⦃L, #i⦄ →
+                         ∀T,d,e. ⇧[d, e] T ≡ U → d ≤ i → i < d + e → ⊥.
+#L #U #i #H #T #d #e #HTU #Hdi #Hide
+elim (lift_csup_trans_eq … HTU … H) -H -T #T #H
+elim (lift_inv_lref2_be … H ? ?) //
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/csup/csup_csup.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/csup/csup_csup.etc
new file mode 100644 (file)
index 0000000..813cb96
--- /dev/null
@@ -0,0 +1,49 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/ldrop_ldrop.ma".
+include "basic_2/substitution/csup.ma".
+
+(* SUPCLOSURE ***************************************************************)
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma csup_inv_ldrop: ∀L1,L2,T1,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ →
+                      ∀J,W,j. ⇩[0, j] L1 ≡ L2.ⓑ{J}W → T1 = #j ∧ T2 = W.
+#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2
+[ #I #L #K #V #i #HLKV #J #W #j #HLKW
+  elim (ldrop_conf_div … HLKV … HLKW) -L /2 width=1/
+| #a
+| #a
+]
+#I #L #V #T #J #W #j #H
+lapply (ldrop_pair2_fwd_cw … H W) -H #H
+[2: lapply (transitive_lt (#{L,W}) … H) /2 width=1/ -H #H ]
+elim (lt_refl_false … H)
+qed-.
+
+(* Main forward lemmas ******************************************************)
+
+theorem csup_trans_fwd_refl: ∀L,L0,T1,T2. ⦃L, T1⦄ > ⦃L0, T2⦄ →
+                             ∀T3. ⦃L0, T2⦄ > ⦃L, T3⦄ →
+                             L = L0 ∨ ⦃L, T1⦄ > ⦃L, T3⦄.
+#L #L0 #T1 #T2 * -L -L0 -T1 -T2 /2 width=1/
+[ #I #L0 #K0 #V0 #i #HLK0 #T3 #H
+  lapply (ldrop_pair2_fwd_cw … HLK0 T3) -HLK0 #H1
+  lapply (csup_fwd_cw … H) -H #H2
+  lapply (transitive_lt … H1 H2) -H1 -H2 #H
+  elim (lt_refl_false … H)
+| #a #I #L0 #V2 #T2 #T3 #HT23
+  elim (csup_inv_ldrop … HT23 I V2 0 ?) -HT23 // #H1 #H2 destruct /2 width=1/
+  qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/csup/csupp.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/csup/csupp.etc
new file mode 100644 (file)
index 0000000..c28eaea
--- /dev/null
@@ -0,0 +1,64 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+notation "hvbox( ⦃ L1, break T1 ⦄ > + break ⦃ L2 , break T2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'SupTermPlus $L1 $T1 $L2 $T2 }.
+
+include "basic_2/substitution/csup.ma".
+
+(* PLUS-ITERATED SUPCLOSURE *************************************************)
+
+definition csupp: bi_relation lenv term ≝ bi_TC … csup.
+
+interpretation "plus-iterated structural predecessor (closure)"
+   'SupTermPlus L1 T1 L2 T2 = (csupp L1 T1 L2 T2).
+
+(* Basic eliminators ********************************************************)
+
+lemma csupp_ind: ∀L1,T1. ∀R:relation2 lenv term.
+                 (∀L2,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ → R L2 T2) →
+                 (∀L,T,L2,T2. ⦃L1, T1⦄ >+ ⦃L, T⦄ → ⦃L, T⦄ > ⦃L2, T2⦄ → R L T → R L2 T2) →
+                 ∀L2,T2. ⦃L1, T1⦄ >+ ⦃L2, T2⦄ → R L2 T2.
+#L1 #T1 #R #IH1 #IH2 #L2 #T2 #H
+@(bi_TC_ind … IH1 IH2 ? ? H)
+qed-.
+
+lemma csupp_ind_dx: ∀L2,T2. ∀R:relation2 lenv term.
+                    (∀L1,T1. ⦃L1, T1⦄ > ⦃L2, T2⦄ → R L1 T1) →
+                    (∀L1,L,T1,T. ⦃L1, T1⦄ > ⦃L, T⦄ → ⦃L, T⦄ >+ ⦃L2, T2⦄ → R L T → R L1 T1) →
+                    ∀L1,T1. ⦃L1, T1⦄ >+ ⦃L2, T2⦄ → R L1 T1.
+#L2 #T2 #R #IH1 #IH2 #L1 #T1 #H
+@(bi_TC_ind_dx … IH1 IH2 ? ? H)
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma csup_csupp: ∀L1,L2,T1,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ → ⦃L1, T1⦄ >+ ⦃L2, T2⦄.
+/2 width=1/ qed.
+
+lemma csupp_strap1: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ >+ ⦃L, T⦄ → ⦃L, T⦄ > ⦃L2, T2⦄ →
+                    ⦃L1, T1⦄ >+ ⦃L2, T2⦄.
+/2 width=4/ qed.
+
+lemma csupp_strap2: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ > ⦃L, T⦄ → ⦃L, T⦄ >+ ⦃L2, T2⦄ →
+                    ⦃L1, T1⦄ >+ ⦃L2, T2⦄.
+/2 width=4/ qed.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma csupp_fwd_cw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ >+ ⦃L2, T2⦄ → #{L2, T2} < #{L1, T1}.
+#L1 #L2 #T1 #T2 #H @(csupp_ind … H) -L2 -T2
+/3 width=3 by csup_fwd_cw, transitive_lt/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/csup/csupp_csupp.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/csup/csupp_csupp.etc
new file mode 100644 (file)
index 0000000..5afdb68
--- /dev/null
@@ -0,0 +1,22 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/csupp.ma".
+
+(* PLUS-ITERATED SUPCLOSURE *************************************************)
+
+(* Main propertis ***********************************************************)
+
+theorem csupp_trans: bi_transitive … csupp.
+/2 width=4/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/csup/csups.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/csup/csups.etc
new file mode 100644 (file)
index 0000000..7f58794
--- /dev/null
@@ -0,0 +1,107 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+notation "hvbox( ⦃ L1, break T1 ⦄ > * break ⦃ L2 , break T2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'SupTermStar $L1 $T1 $L2 $T2 }.
+
+include "basic_2/substitution/csup.ma".
+include "basic_2/unfold/csupp.ma".
+
+(* STAR-ITERATED SUPCLOSURE *************************************************)
+
+definition csups: bi_relation lenv term ≝ bi_star … csup.
+
+interpretation "star-iterated structural predecessor (closure)"
+   'SupTermStar L1 T1 L2 T2 = (csups L1 T1 L2 T2).
+
+(* Basic eliminators ********************************************************)
+
+lemma csups_ind: ∀L1,T1. ∀R:relation2 lenv term. R L1 T1 →
+                 (∀L,L2,T,T2. ⦃L1, T1⦄ >* ⦃L, T⦄ → ⦃L, T⦄ > ⦃L2, T2⦄ → R L T → R L2 T2) →
+                 ∀L2,T2. ⦃L1, T1⦄ >* ⦃L2, T2⦄ → R L2 T2.
+#L1 #T1 #R #IH1 #IH2 #L2 #T2 #H
+@(bi_star_ind … IH1 IH2 ? ? H)
+qed-.
+
+lemma csups_ind_dx: ∀L2,T2. ∀R:relation2 lenv term. R L2 T2 →
+                    (∀L1,L,T1,T. ⦃L1, T1⦄ > ⦃L, T⦄ → ⦃L, T⦄ >* ⦃L2, T2⦄ → R L T → R L1 T1) →
+                    ∀L1,T1. ⦃L1, T1⦄ >* ⦃L2, T2⦄ → R L1 T1.
+#L2 #T2 #R #IH1 #IH2 #L1 #T1 #H
+@(bi_star_ind_dx … IH1 IH2 ? ? H)
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma csups_refl: bi_reflexive … csups.
+/2 width=1/ qed.
+
+lemma csupp_csups: ∀L1,L2,T1,T2. ⦃L1, T1⦄ >+ ⦃L2, T2⦄ → ⦃L1, T1⦄ >* ⦃L2, T2⦄.
+/2 width=1/ qed.
+
+lemma csup_csups: ∀L1,L2,T1,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ → ⦃L1, T1⦄ >* ⦃L2, T2⦄.
+/2 width=1/ qed.
+
+lemma csups_strap1: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ >* ⦃L, T⦄ → ⦃L, T⦄ > ⦃L2, T2⦄ →
+                    ⦃L1, T1⦄ >* ⦃L2, T2⦄.
+/2 width=4/ qed.
+
+lemma csups_strap2: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ > ⦃L, T⦄ → ⦃L, T⦄ >* ⦃L2, T2⦄ →
+                    ⦃L1, T1⦄ >* ⦃L2, T2⦄.
+/2 width=4/ qed.
+
+lemma csups_csupp_csupp: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ >* ⦃L, T⦄ →
+                         ⦃L, T⦄ >+ ⦃L2, T2⦄ → ⦃L1, T1⦄ >+ ⦃L2, T2⦄.
+/2 width=4/ qed.
+
+lemma csupp_csups_csupp: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ >+ ⦃L, T⦄ →
+                          ⦃L, T⦄ >* ⦃L2, T2⦄ → ⦃L1, T1⦄ >+ ⦃L2, T2⦄.
+/2 width=4/ qed.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma csups_fwd_cw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ >* ⦃L2, T2⦄ → #{L2, T2} ≤ #{L1, T1}.
+#L1 #L2 #T1 #T2 #H @(csups_ind … H) -L2 -T2 //
+/4 width=3 by csup_fwd_cw, lt_to_le_to_lt, lt_to_le/ (**) (* slow even with trace *)
+qed-.
+
+(* Advanced inversion lemmas for csupp **************************************)
+
+lemma csupp_inv_atom1_csups: ∀J,L1,L2,T2. ⦃L1, ⓪{J}⦄ >+ ⦃L2, T2⦄ →
+                             ∃∃I,K,V,i. ⇩[0, i] L1 ≡ K.ⓑ{I}V &
+                             ⦃K, V⦄ >* ⦃L2, T2⦄ & J = LRef i.
+#J #L1 #L2 #T2 #H @(csupp_ind … H) -L2 -T2
+[ #L2 #T2 #H
+  elim (csup_inv_atom1 … H) -H * #i #HL12 #H destruct /2 width=7/
+| #L #T #L2 #T2 #_ #HT2 * #I #K #V #i #HLK #HVT #H destruct /3 width=8/
+]
+qed-.
+
+lemma csupp_inv_bind1_csups: ∀b,J,L1,L2,W,U,T2. ⦃L1, ⓑ{b,J}W.U⦄ >+ ⦃L2, T2⦄ →
+                             ⦃L1, W⦄ >* ⦃L2, T2⦄ ∨ ⦃L1.ⓑ{J}W, U⦄ >* ⦃L2, T2⦄.
+#b #J #L1 #L2 #W #U #T2 #H @(csupp_ind … H) -L2 -T2
+[ #L2 #T2 #H
+  elim (csup_inv_bind1 … H) -H * #H1 #H2 destruct /2 width=1/
+| #L #T #L2 #T2 #_ #HT2 * /3 width=4/
+]
+qed-.
+
+lemma csupp_inv_flat1_csups: ∀J,L1,L2,W,U,T2. ⦃L1, ⓕ{J}W.U⦄ >+ ⦃L2, T2⦄ →
+                             ⦃L1, W⦄ >* ⦃L2, T2⦄ ∨ ⦃L1, U⦄ >* ⦃L2, T2⦄.
+#J #L1 #L2 #W #U #T2 #H @(csupp_ind … H) -L2 -T2
+[ #L2 #T2 #H
+  elim (csup_inv_flat1 … H) -H #H1 * #H2 destruct /2 width=1/
+| #L #T #L2 #T2 #_ #HT2 * /3 width=4/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/csup/csups_csups.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/csup/csups_csups.etc
new file mode 100644 (file)
index 0000000..aa54d9b
--- /dev/null
@@ -0,0 +1,62 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/csup_csup.ma".
+include "basic_2/unfold/csups.ma".
+
+(* STAR-ITERATED SUPCLOSURE *************************************************)
+
+(* Advanced forward lemmas **************************************************)
+
+(*
+lemma csupp_strap2_fwd_refl: ∀L,L0,T1,T2. ⦃L, T1⦄ > ⦃L0, T2⦄ →
+                             ∀T3. ⦃L0, T2⦄ >+ ⦃L, T3⦄ →
+                             L = L0 ∨ ⦃L, T1⦄ >+ ⦃L, T3⦄.
+#L #L0 #T1 #T2 * -L -L0 -T1 -T2 /2 width=1/
+[ #I #L0 #K0 #V0 #i #HLK0 #T3 #H
+  lapply (ldrop_pair2_fwd_cw … HLK0 T3) -HLK0 #H1
+  lapply (csupp_fwd_cw … H) -H #H2
+  lapply (transitive_lt … H1 H2) -H1 -H2 #H
+  elim (lt_refl_false … H)
+| #a #I #L0 #V2 #T2 #T3 #HT23
+  /3 width=5/
+
+  elim (csup_inv_ldrop … HT23 I V2 0 ?) -HT23 // #H1 #H2 destruct /2 width=1/
+  qed-.
+
+
+
+
+
+
+
+
+lemma csups_strap1_fwd_refl: ∀L,L0,T1,T2. ⦃L, T1⦄ >* ⦃L0, T2⦄ →
+                             ∀T3. ⦃L0, T2⦄ > ⦃L, T3⦄ → L = L0.
+#L #L0 #T1 #T2 #H @(csups_ind_dx … H) -L -T1 //
+#L1 #L #T1 #T #HL1 #_ #IHL0 #T3 #HL0
+lapply (csup_trans_fwd_refl … HL10) … HL0) -T2
+*) 
+lemma lift_csups_trans_aux: ∀T1,U1,d,e. ⇧[d, e] T1 ≡ U1 →
+                            ∀L1,L2,U2. ⦃L1, U1⦄ >* ⦃L2, U2⦄ → L1 = L2 →
+                            ∃T2. ⇧[d, e] T2 ≡ U2.
+#T1 #U1 #d #e #HTU1 #L1 #L2 #U2 #H @(csups_ind … H) -L2 -U2 /2 width=2/ -T1
+#L #L2 #U #U2 #HL1 #HL2 #IHL1 #H destruct
+
+* -T1 -U1 -d -e
+
+(* Main propertis ***********************************************************)
+
+theorem csups_trans: bi_transitive … csups.
+/2 width=4/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/csup/ypr.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/csup/ypr.etc
new file mode 100644 (file)
index 0000000..f1510ab
--- /dev/null
@@ -0,0 +1,41 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+notation "hvbox( h ⊢ break ⦃ L1, break T1 ⦄ • ⥸ break [ g ] break ⦃ L2 , break T2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'YPRed $h $g $L1 $T1 $L2 $T2 }.
+
+include "basic_2/substitution/csup.ma".
+include "basic_2/reducibility/xpr.ma".
+
+(* HYPER PARALLEL REDUCTION ON CLOSURES *************************************)
+
+inductive ypr (h) (g) (L1) (T1): relation2 lenv term ≝
+| ypr_cpr : ∀T2. L1 ⊢ T1 ➡ T2 → ypr h g L1 T1 L1 T2
+| ypr_ssta: ∀T2,l. ⦃h, L1⦄ ⊢ T1 •[g, l + 1] T2 → ypr h g L1 T1 L1 T2
+| ypr_csup: ∀L2,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ → ypr h g L1 T1 L2 T2
+. 
+
+interpretation
+   "hyper parallel reduction (closure)"
+   'YPRed h g L1 T1 L2 T2 = (ypr h g L1 T1 L2 T2).
+
+(* Basic properties *********************************************************)
+
+lemma ypr_refl: ∀h,g. bi_reflexive … (ypr h g).
+/2 width=1/ qed.
+
+lemma xpr_ypr: ∀h,g,L,T1,T2. ⦃h, L⦄ ⊢ T1 •➡[g] T2 → h ⊢ ⦃L, T1⦄ •⥸[g] ⦃L, T2⦄.
+#h #g #L #T1 #T2 * /2 width=1/ /2 width=2/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/csup/yprs.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/csup/yprs.etc
new file mode 100644 (file)
index 0000000..86dc0c1
--- /dev/null
@@ -0,0 +1,52 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+notation "hvbox( h ⊢ break ⦃ L1, break T1 ⦄ • ⥸  * break [ g ] break ⦃ L2 , break T2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'YPRedStar $h $g $L1 $T1 $L2 $T2 }.
+
+include "basic_2/reducibility/ypr.ma".
+
+(* HYPER PARALLEL COMPUTATION ON CLOSURES ***********************************)
+
+definition yprs: ∀h. sd h → bi_relation lenv term ≝
+                 λh,g. bi_TC … (ypr h g).
+
+interpretation "hyper parallel computation (closure)"
+   'YPRedStar h g L1 T1 L2 T2 = (yprs h g L1 T1 L2 T2).
+
+(* Basic eliminators ********************************************************)
+
+lemma yprs_ind: ∀h,g,L1,T1. ∀R:relation2 lenv term. R L1 T1 →
+                (∀L,L2,T,T2. h ⊢ ⦃L1, T1⦄ •⥸*[g] ⦃L, T⦄ → h ⊢ ⦃L, T⦄ •⥸[g] ⦃L2, T2⦄ → R L T → R L2 T2) →
+                ∀L2,T2. h ⊢ ⦃L1, T1⦄ •⥸*[g] ⦃L2, T2⦄ → R L2 T2.
+/3 width=7 by bi_TC_star_ind/ qed-.
+
+lemma yprs_ind_dx: ∀h,g,L2,T2. ∀R:relation2 lenv term. R L2 T2 →
+                   (∀L1,L,T1,T. h ⊢ ⦃L1, T1⦄ •⥸[g] ⦃L, T⦄ → h ⊢ ⦃L, T⦄ •⥸*[g] ⦃L2, T2⦄ → R L T → R L1 T1) →
+                   ∀L1,T1. h ⊢ ⦃L1, T1⦄ •⥸*[g] ⦃L2, T2⦄ → R L1 T1.
+/3 width=7 by bi_TC_star_ind_dx/ qed-.
+
+(* Basic properties *********************************************************)
+
+lemma yprs_refl: ∀h,g. bi_reflexive … (yprs h g).
+/2 width=1/ qed.
+
+lemma yprs_strap1: ∀h,g,L1,L,L2,T1,T,T2. h ⊢ ⦃L1, T1⦄ •⥸*[g] ⦃L, T⦄ →
+                   h ⊢ ⦃L, T⦄ •⥸[g] ⦃L2, T2⦄ → h ⊢ ⦃L1, T1⦄ •⥸*[g] ⦃L2, T2⦄.
+/2 width=4/ qed.
+
+lemma yprs_strap2: ∀h,g,L1,L,L2,T1,T,T2. h ⊢ ⦃L1, T1⦄ •⥸[g] ⦃L, T⦄ →
+                   h ⊢ ⦃L, T⦄ •⥸*[g] ⦃L2, T2⦄ → h ⊢ ⦃L1, T1⦄ •⥸*[g] ⦃L2, T2⦄.
+/2 width=4/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/csup/yprs_csups.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/csup/yprs_csups.etc
new file mode 100644 (file)
index 0000000..08c939d
--- /dev/null
@@ -0,0 +1,25 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/csups.ma".
+include "basic_2/computation/yprs.ma".
+
+(* HYPER PARALLEL COMPUTATION ON CLOSURES ***********************************)
+
+(* Properties on iterated supclosure ****************************************)
+
+lemma csups_yprs: ∀h,g,L1,L2,T1,T2. ⦃L1, T1⦄ >* ⦃L2, T2⦄ →
+                  h ⊢ ⦃L1, T1⦄ •⥸*[g] ⦃L2, T2⦄.
+#h #g #L1 #L2 #T1 #T2 #H @(csups_ind … H) -L2 -T2 /3 width=1/ /3 width=4/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/csup/yprs_xprs.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/csup/yprs_xprs.etc
new file mode 100644 (file)
index 0000000..2feb88a
--- /dev/null
@@ -0,0 +1,28 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/xprs_cprs.ma".
+include "basic_2/computation/yprs.ma".
+
+(* HYPER PARALLEL COMPUTATION ON CLOSURES ***********************************)
+
+(* Properties on extended parallel computation for terms ********************)
+
+lemma xprs_yprs: ∀h,g,L,T1,T2. ⦃h, L⦄ ⊢ T1 •➡*[g] T2 →
+                 h ⊢ ⦃L, T1⦄ •⥸*[g] ⦃L, T2⦄.
+#h #g #L #T1 #T2 #H @(xprs_ind … H) -T2 // /3 width=4/
+qed.
+
+lemma cprs_yprs: ∀h,g,L,T1,T2. L ⊢ T1 ➡* T2 → h ⊢ ⦃L, T1⦄ •⥸*[g] ⦃L, T2⦄.
+/3 width=1/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/csup/yprs_yprs.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/csup/yprs_yprs.etc
new file mode 100644 (file)
index 0000000..d737dd8
--- /dev/null
@@ -0,0 +1,20 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/yprs.ma".
+
+(* HYPER PARALLEL COMPUTATION ON TERMS **************************************)
+
+theorem yprs_trans: ∀h,g. bi_transitive … (yprs h g).
+/2 width=4/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/csup/ysteps.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/csup/ysteps.etc
new file mode 100644 (file)
index 0000000..149e789
--- /dev/null
@@ -0,0 +1,47 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+notation "hvbox( h ⊢ break ⦃ L1, break T1 ⦄ • ⭃ * break [ g ] break ⦃ L2 , break T2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'YPRedStepStar $h $g $L1 $T1 $L2 $T2 }.
+
+include "basic_2/substitution/csup.ma".
+include "basic_2/computation/yprs.ma".
+
+(* ITERATED STEP OF HYPER PARALLEL COMPUTATION ON CLOSURES ******************)
+
+inductive ysteps (h) (g) (L1) (T1) (L2) (T2): Prop ≝
+| ysteps_intro: h ⊢ ⦃L1, T1⦄ •⥸*[g] ⦃L2, T2⦄ → (L1 = L2 → T1 = T2 → ⊥) →
+                ysteps h g L1 T1 L2 T2
+.
+
+interpretation "iterated step of hyper parallel computation (closure)"
+   'YPRedStepStar h g L1 T1 L2 T2 = (ysteps h g L1 T1 L2 T2).
+
+(* Basic properties *********************************************************)
+
+lemma ssta_ysteps: ∀h,g,L,T,U,l. ⦃h, L⦄ ⊢ T •[g, l + 1] U →
+                   h ⊢ ⦃L, T⦄ •⭃*[g] ⦃L, U⦄.
+#h #g #L #T #U #l #HTU
+@ysteps_intro /3 width=2/ #_ #H destruct
+elim (ssta_inv_refl … HTU)
+qed.
+
+lemma csup_ysteps: ∀h,g,L1,L2,T1,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ →
+                   h ⊢ ⦃L1, T1⦄ •⭃*[g] ⦃L2, T2⦄.
+#h #g #L1 #L2 #T1 #T2 #H
+lapply (csup_fwd_cw … H) #H1
+@ysteps_intro /3 width=1/ -H #H2 #H3 destruct
+elim (lt_refl_false … H1)
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/csup/ysteps_csups.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/csup/ysteps_csups.etc
new file mode 100644 (file)
index 0000000..2e48f39
--- /dev/null
@@ -0,0 +1,28 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/yprs_csups.ma".
+include "basic_2/computation/ysteps.ma".
+
+(* ITERATED STEP OF HYPER PARALLEL COMPUTATION ON CLOSURES ******************)
+
+(* Properties on iterated supclosure ****************************************)
+
+lemma csups_ysteps: ∀h,g,L1,L2,T1,T2. ⦃L1, T1⦄ >* ⦃L2, T2⦄ →
+                    h ⊢ ⦃L1, T1⦄ •⭃*[g] ⦃L2, T2⦄.
+#h #g #L1 #L2 #T1 #T2 #H
+lapply (csups_fwd_cw … H) #H1
+@ysteps_intro /2 width=1/ -H #H2 #H3 destruct
+elim (lt_refl_false … H1)
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/hod/ntas.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/hod/ntas.etc
new file mode 100644 (file)
index 0000000..8cfaa34
--- /dev/null
@@ -0,0 +1,57 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+notation "hvbox( ⦃ h , break L ⦄ ⊢ break term 46 T1 : : * break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'NativeTypeStarAlt $h $L $T1 $T2 }.
+
+include "basic_2/dynamic/nta.ma".
+
+(* HIGHER ORDER NATIVE TYPE ASSIGNMENT ON TERMS *****************************)
+
+definition ntas: sh → lenv → relation term ≝
+                 λh,L. star … (nta h L).
+
+interpretation "higher order native type assignment (term)"
+   'NativeTypeStar h L T U = (ntas h L T U).
+
+(* Basic eliminators ********************************************************)
+(*
+lemma cprs_ind: ∀L,T1. ∀R:predicate term. R T1 →
+                (∀T,T2. L ⊢ T1 ➡* T → L ⊢ T ➡ T2 → R T → R T2) →
+                ∀T2. L ⊢ T1 ➡* T2 → R T2.
+#L #T1 #R #HT1 #IHT1 #T2 #HT12
+@(TC_star_ind … HT1 IHT1 … HT12) //
+qed-.
+*)
+axiom ntas_ind_dx: ∀h,L,T2. ∀R:predicate term. R T2 →
+                   (∀T1,T. ⦃h, L⦄ ⊢ T1 : T → ⦃h, L⦄ ⊢ T :* T2 → R T → R T1) →
+                   ∀T1. ⦃h, L⦄ ⊢ T1 :* T2 → R T1.
+(*
+#h #L #T2 #R #HT2 #IHT2 #T1 #HT12
+@(star_ind_dx … HT2 IHT2 … HT12) //
+qed-.
+*)
+(* Basic properties *********************************************************)
+
+lemma ntas_refl: ∀h,L,T. ⦃h, L⦄ ⊢ T :* T.
+// qed.
+
+lemma ntas_strap1: ∀h,L,T1,T,T2.
+                   ⦃h, L⦄ ⊢ T1 :* T → ⦃h, L⦄  ⊢ T : T2 → ⦃h, L⦄  ⊢ T1 :* T2.
+/2 width=3/ qed.
+
+lemma ntas_strap2: ∀h,L,T1,T,T2.
+                   ⦃h, L⦄  ⊢ T1 : T → ⦃h, L⦄ ⊢ T :* T2 → ⦃h, L⦄ ⊢ T1 :* T2.
+/2 width=3/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/hod/ntas_lift.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/hod/ntas_lift.etc
new file mode 100644 (file)
index 0000000..1adced7
--- /dev/null
@@ -0,0 +1,71 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/dynamic/nta_lift.ma".
+include "basic_2/hod/ntas.ma".
+
+(* HIGHER ORDER NATIVE TYPE ASSIGNMENT ON TERMS *****************************)
+
+(* Advanced properties on native type assignment for terms ******************)
+
+lemma nta_pure_ntas: ∀h,L,U,W,Y. ⦃h, L⦄ ⊢ U :* ⓛW.Y → ∀T. ⦃h, L⦄ ⊢ T : U →
+                     ∀V. ⦃h, L⦄ ⊢ V : W →  ⦃h, L⦄ ⊢ ⓐV.T : ⓐV.U.
+#h #L #U #W #Y #H @(ntas_ind_dx … H) -U /2 width=1/ /3 width=2/
+qed.
+
+axiom pippo: ∀h,L,T,W,Y. ⦃h, L⦄ ⊢ T :* ⓛW.Y → ∀U. ⦃h, L⦄ ⊢ T : U →
+             ∃Z. ⦃h, L⦄ ⊢ U :* ⓛW.Z.
+(* REQUIRES SUBJECT CONVERSION
+#h #L #T #W #Y #H @(ntas_ind_dx … H) -T
+[ #U #HYU
+  elim (nta_fwd_correct … HYU) #U0 #HU0 
+  elim (nta_inv_bind1 … HYU) #W0 #Y0 #HW0 #HY0 #HY0U
+*)
+
+(* Advanced inversion lemmas on native type assignment for terms ************)
+
+fact nta_inv_pure1_aux: ∀h,L,Z,U. ⦃h, L⦄ ⊢ Z : U → ∀X,Y. Z = ⓐY.X →
+                        ∃∃W,V,T. ⦃h, L⦄ ⊢ Y : W & ⦃h, L⦄ ⊢ X : V &
+                                 L ⊢ ⓐY.V ⬌* U & ⦃h, L⦄ ⊢ V :* ⓛW.T.
+#h #L #Z #U #H elim H -L -Z -U
+[ #L #k #X #Y #H destruct
+| #L #K #V #W #U #i #_ #_ #_ #_ #X #Y #H destruct
+| #L #K #W #V #U #i #_ #_ #_ #_ #X #Y #H destruct
+| #I #L #V #W #T #U #_ #_ #_ #_ #X #Y #H destruct
+| #L #V #W #Z #U #HVW #HZU #_ #_ #X #Y #H destruct /2 width=7/
+| #L #V #W #Z #U #HZU #_ #_ #IHUW #X #Y #H destruct
+  elim (IHUW U Y ?) -IHUW // /3 width=9/
+| #L #Z #U #_ #_ #X #Y #H destruct
+| #L #Z #U1 #U2 #V2 #_ #HU12 #_ #IHTU1 #_ #X #Y #H destruct
+  elim (IHTU1 ???) -IHTU1 [4: // |2,3: skip ] #W #V #T #HYW #HXV #HU1 #HVT
+  lapply (cpcs_trans … HU1 … HU12) -U1 /2 width=7/
+]
+qed.
+
+(* Basic_1: was only: ty3_gen_appl *)
+lemma nta_inv_pure1: ∀h,L,Y,X,U. ⦃h, L⦄ ⊢ ⓐY.X : U →
+                     ∃∃W,V,T. ⦃h, L⦄ ⊢ Y : W & ⦃h, L⦄ ⊢ X : V &
+                              L ⊢ ⓐY.V ⬌* U & ⦃h, L⦄ ⊢ V :* ⓛW.T.
+/2 width=3/ qed-.
+
+axiom nta_inv_appl1: ∀h,L,Z,Y,X,U. ⦃h, L⦄ ⊢ ⓐZ.ⓛY.X : U →
+                     ∃∃W. ⦃h, L⦄ ⊢ Z : Y & ⦃h, L⦄ ⊢ ⓛY.X : ⓛY.W &
+                     L ⊢ ⓐZ.ⓛY.W ⬌* U.
+(* REQUIRES SUBJECT REDUCTION
+#h #L #Z #Y #X #U #H
+elim (nta_inv_pure1 … H) -H #W #V #T #HZW #HXV #HVU #HVT
+elim (nta_inv_bind1 … HXV) -HXV #Y0 #X0 #HY0 #HX0 #HX0V
+lapply (cpcs_trans … (ⓐZ.ⓛY.X0) … HVU) -HVU /2 width=1/ -HX0V #HX0U
+@(ex3_1_intro … HX0U) /2 width=2/
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lenv_px/lcpcs.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lenv_px/lcpcs.etc
new file mode 100644 (file)
index 0000000..d815739
--- /dev/null
@@ -0,0 +1,48 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+notation "hvbox( L1 ⊢ ⬌* break term 46 L2 )"
+   non associative with precedence 45
+   for @{ 'CPConvStar $L1 $L2 }.
+
+include "basic_2/grammar/lenv_px_sn.ma".
+include "basic_2/equivalence/cpcs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON LOCAL ENVIRONMENTS *************)
+
+definition lcpcs: relation lenv ≝ lpx_sn … cpcs.
+
+interpretation "context-sensitive parallel equivalence (local environment)"
+   'CPConvStar L1 L2 = (lcpcs L1 L2).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma lcpcs_inv_atom1: ∀L2. ⋆ ⊢ ⬌* L2 → L2 = ⋆.
+/2 width=2 by lpx_sn_inv_atom1/ qed-.
+
+lemma lcpcs_inv_pair1: ∀I,K1,V1,L2. K1. ⓑ{I} V1 ⊢ ⬌* L2 →
+                       ∃∃K2,V2. K1 ⊢ ⬌* K2 & K1 ⊢ V1 ⬌* V2 & L2 = K2. ⓑ{I} V2.
+/2 width=1 by lpx_sn_inv_pair1/ qed-.
+
+lemma lcpcs_inv_atom2: ∀L1. L1 ⊢ ⬌* ⋆ → L1 = ⋆.
+/2 width=2 by lpx_sn_inv_atom2/ qed-.
+
+lemma lcpcs_inv_pair2: ∀I,L1,K2,V2. L1 ⊢ ⬌* K2. ⓑ{I} V2 →
+                       ∃∃K1,V1. K1 ⊢ ⬌* K2 & K1 ⊢ V1 ⬌* V2 & L1 = K1. ⓑ{I} V1.
+/2 width=1 by lpx_sn_inv_pair2/ qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma lcpcs_fwd_length: ∀L1,L2. L1 ⊢ ⬌* L2 → |L1| = |L2|.
+/2 width=2 by lpx_sn_fwd_length/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lenv_px/lcpcs_ltpr.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lenv_px/lcpcs_ltpr.etc
new file mode 100644 (file)
index 0000000..ecc6be8
--- /dev/null
@@ -0,0 +1,24 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/ltpr.ma".
+include "basic_2/equivalence/lcpcs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON LOCAL ENVIRONMENTS *************)
+
+(* Properties on context-free parallel reduction for local environments *****)
+
+lemma ltpr_lcpcs: ∀L1,L2. L1 ➡ L2 → L1 ⊢ ⬌* L2.
+#L1 #L2 #H elim H -L1 -L2 // /4 width=1/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lenv_px/lenv_px_sn.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lenv_px/lenv_px_sn.etc
new file mode 100644 (file)
index 0000000..fddab03
--- /dev/null
@@ -0,0 +1,75 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/lenv_length.ma".
+
+(* SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS **********)
+
+inductive lpx_sn (R:lenv→relation term): relation lenv ≝
+| lpx_sn_stom: lpx_sn R (⋆) (⋆)
+| lpx_sn_pair: ∀I,K1,K2,V1,V2.
+               lpx_sn R K1 K2 → R K1 V1 V2 → lpx_sn R (K1. ⓑ{I} V1) (K2. ⓑ{I} V2)
+.
+
+(* Basic inversion lemmas ***************************************************)
+
+fact lpx_sn_inv_atom1_aux: ∀R,L1,L2. lpx_sn R L1 L2 → L1 = ⋆ → L2 = ⋆.
+#R #L1 #L2 * -L1 -L2
+[ //
+| #I #K1 #K2 #V1 #V2 #_ #_ #H destruct
+]
+qed-.
+
+lemma lpx_sn_inv_atom1: ∀R,L2. lpx_sn R (⋆) L2 → L2 = ⋆.
+/2 width=4 by lpx_sn_inv_atom1_aux/ qed-.
+
+fact lpx_sn_inv_pair1_aux: ∀R,L1,L2. lpx_sn R L1 L2 → ∀I,K1,V1. L1 = K1. ⓑ{I} V1 →
+                           ∃∃K2,V2. lpx_sn R K1 K2 & R K1 V1 V2 & L2 = K2. ⓑ{I} V2.
+#R #L1 #L2 * -L1 -L2
+[ #J #K1 #V1 #H destruct
+| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #L #W #H destruct /2 width=5/
+]
+qed-.
+
+lemma lpx_sn_inv_pair1: ∀R,I,K1,V1,L2. lpx_sn R (K1. ⓑ{I} V1) L2 →
+                        ∃∃K2,V2. lpx_sn R K1 K2 & R K1 V1 V2 & L2 = K2. ⓑ{I} V2.
+/2 width=3 by lpx_sn_inv_pair1_aux/ qed-.
+
+fact lpx_sn_inv_atom2_aux: ∀R,L1,L2. lpx_sn R L1 L2 → L2 = ⋆ → L1 = ⋆.
+#R #L1 #L2 * -L1 -L2
+[ //
+| #I #K1 #K2 #V1 #V2 #_ #_ #H destruct
+]
+qed-.
+
+lemma lpx_sn_inv_atom2: ∀R,L1. lpx_sn R L1 (⋆) → L1 = ⋆.
+/2 width=4 by lpx_sn_inv_atom2_aux/ qed-.
+
+fact lpx_sn_inv_pair2_aux: ∀R,L1,L2. lpx_sn R L1 L2 → ∀I,K2,V2. L2 = K2. ⓑ{I} V2 →
+                           ∃∃K1,V1. lpx_sn R K1 K2 & R K1 V1 V2 & L1 = K1. ⓑ{I} V1.
+#R #L1 #L2 * -L1 -L2
+[ #J #K2 #V2 #H destruct
+| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #K #W #H destruct /2 width=5/
+]
+qed-.
+
+lemma lpx_sn_inv_pair2: ∀R,I,L1,K2,V2. lpx_sn R L1 (K2. ⓑ{I} V2) →
+                        ∃∃K1,V1. lpx_sn R K1 K2 & R K1 V1 V2 & L1 = K1. ⓑ{I} V1.
+/2 width=3 by lpx_sn_inv_pair2_aux/ qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma lpx_sn_fwd_length: ∀R,L1,L2. lpx_sn R L1 L2 → |L1| = |L2|.
+#R #L1 #L2 #H elim H -L1 -L2 normalize //
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lsubn/lsubn_lsubn.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lsubn/lsubn_lsubn.etc
new file mode 100644 (file)
index 0000000..9ef3dda
--- /dev/null
@@ -0,0 +1,36 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/dynamic/lsubn_nta.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR NATIVE TYPE ASSIGNMENT ******************)
+
+(* Main properties **********************************************************)
+
+(* Note: new property *)
+theorem lsubn_trans: ∀h,L1,L. h ⊢ L1 :⊑ L → ∀L2. h ⊢ L :⊑ L2 → h ⊢ L1 :⊑ L2.
+#h #L1 #L #H elim H -L1 -L
+[ #X #H >(lsubn_inv_atom1 … H) -H //
+| #I #L1 #L #V #HL1 #H1W #IHL1 #X #H
+  elim (lsubn_inv_pair1 … H) -H * #L2
+  [ #HL2 #H #H2W destruct /4 width=1/
+  | #W #H1VW #H2VW #HL2 #H1 #H2 destruct /3 width=3/
+  ]
+| #L1 #L #V1 #W1 #H1VW1 #H2VW1 #HL1 #IHL1 #X #H
+  elim (lsubn_inv_pair1 … H) -H * #L2
+  [ #HL2 #H #HW destruct /3 width=1/
+  | #V #_ #_ #_ #_ #H destruct
+  ]
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lsubsv/lsubsv.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lsubsv/lsubsv.etc
new file mode 100644 (file)
index 0000000..2512226
--- /dev/null
@@ -0,0 +1,112 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/dynamic/snv.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************)
+
+(* Note: this is not transitive *)
+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] → L1 ⊢ W2 ⬌* W1 → 
+               ⦃h, L1⦄ ⊢ V1 •[g, l + 1] W1 → ⦃h, L2⦄ ⊢ W2 •[g, l] V2 →
+               lsubsv h g L1 L2 → lsubsv h g (L1. ⓓV1) (L2. ⓛW2)
+.
+
+interpretation
+  "local environment refinement (stratified native validity)"
+  'CrSubEqV h g L1 L2 = (lsubsv h g L1 L2).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact lsubsv_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 lsubsv_inv_atom1: ∀h,g,L2. h ⊢ ⋆ ⊩:⊑[g] L2 → L2 = ⋆.
+/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,W1,W2,V2,l. ⦃h, K1⦄ ⊩ V1 :[g] & ⦃h, K1⦄ ⊢ V1 •[g,l+1] W1 & ⦃h, K2⦄ ⊢ W2 •[g,l] V2 &
+                                            K1 ⊢ W2 ⬌* W1 & 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 #HV1 #HW21 #HVW1 #HWV2 #HL12 #J #K1 #U1 #H destruct /3 width=10/
+]
+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,W1,W2,V2,l. ⦃h, K1⦄ ⊩ V1 :[g] & ⦃h, K1⦄ ⊢ V1 •[g,l+1] W1 & ⦃h, K2⦄ ⊢ W2 •[g,l] V2 &
+                                         K1 ⊢ W2 ⬌* W1 & h ⊢ K1 ⊩:⊑[g] K2 & L2 = K2. ⓛW2 & I = Abbr.
+/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
+]
+qed-.
+
+lemma lsubsv_inv_atom2: ∀h,g,L1. h ⊢ L1 ⊩:⊑[g] ⋆ → L1 = ⋆.
+/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 & ⦃h, K2⦄ ⊢ W2 •[g,l] V2 &
+                                            K1 ⊢ W2 ⬌* W1 & 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 #HV #HW21 #HVW1 #HWV2 #HL12 #J #K2 #U2 #H destruct /3 width=11/
+]
+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 & ⦃h, K2⦄ ⊢ W2 •[g,l] V2 &
+                                         K1 ⊢ W2 ⬌* W1 & h ⊢ K1 ⊩:⊑[g] K2 & L1 = K1. ⓓV1 & I = Abst.
+/2 width=3 by lsubsv_inv_pair2_aux/ qed-.
+
+(* Basic_forward lemmas *****************************************************)
+
+lemma lsubsv_fwd_lsubs1: ∀h,g,L1,L2. h ⊢ L1 ⊩:⊑[g] L2 → L1 ≼[0, |L1|] L2.
+#h #g #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
+qed-.
+
+lemma lsubsv_fwd_lsubs2: ∀h,g,L1,L2. h ⊢ L1 ⊩:⊑[g] L2 → L1 ≼[0, |L2|] L2.
+#h #g #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma lsubsv_refl: ∀h,g,L. h ⊢ L ⊩:⊑[g] L.
+#h #g #L elim L -L // /2 width=1/
+qed.
+
+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_lsubs2, cprs_lsubs_trans/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lsubsv/lsubsv_cpcs.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lsubsv/lsubsv_cpcs.etc
new file mode 100644 (file)
index 0000000..87a72e0
--- /dev/null
@@ -0,0 +1,25 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/equivalence/cpcs_cpcs.ma".
+include "basic_2/dynamic/lsubsv.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************)
+
+(* Properties on context-sensitive parallel equivalence for terms ***********)
+
+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_lsubs2, cpcs_lsubs_trans/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lsubsv/lsubsv_ldrop.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lsubsv/lsubsv_ldrop.etc
new file mode 100644 (file)
index 0000000..2c3381f
--- /dev/null
@@ -0,0 +1,65 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/dynamic/lsubsv.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************)
+
+(* Properties concerning basic local environment slicing ********************)
+
+(* Note: the constant 0 cannot be generalized *)
+lemma lsubsv_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 … H) -H * #He #HLK1
+  [ destruct
+    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+  | elim (IHL12 … HLK1) -L1 /3 width=3/
+  ]
+| #L1 #L2 #V1 #V2 #W1 #W2 #l #HV1 #HW21 #HVW1 #HWV2 #_ #IHL12 #K1 #e #H
+  elim (ldrop_inv_O1 … H) -H * #He #HLK1
+  [ destruct
+    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=6/
+  | elim (IHL12 … HLK1) -L1 /3 width=3/
+  ]
+]
+qed.
+
+(* Note: the constant 0 cannot be generalized *)
+lemma lsubsv_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 … H) -H * #He #HLK2
+  [ destruct
+    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+  | elim (IHL12 … HLK2) -L2 /3 width=3/
+  ]
+| #L1 #L2 #V1 #V2 #W1 #W2 #l #HV #HW21 #HVW1 #HWV2 #_ #IHL12 #K2 #e #H
+  elim (ldrop_inv_O1 … H) -H * #He #HLK2
+  [ destruct
+    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=6/
+  | elim (IHL12 … HLK2) -L2 /3 width=3/
+  ]
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lsubsv/lsubsv_snv.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lsubsv/lsubsv_snv.etc
new file mode 100644 (file)
index 0000000..e5bd995
--- /dev/null
@@ -0,0 +1,52 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/dynamic/lsubsv_ldrop.ma".
+include "basic_2/dynamic/lsubsv_ssta.ma".
+include "basic_2/dynamic/lsubsv_cpcs.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************)
+
+(* Properties concerning stratified native validity *************************)
+
+axiom lsubsv_xprs_trans: ∀h,g,L1,L2. h ⊢ L1 ⊩:⊑[g] L2 →
+                         ∀T1,T2. ⦃h, L2⦄ ⊢ T1 •➡*[g] T2 → ⦃h, L1⦄ ⊢ T1 •➡*[g] T2.
+(*
+/3 width=3 by lsubsv_fwd_lsubss, lsubss_xprs_trans/ qed-.
+*)
+axiom lsubsv_snv_trans: ∀h,g,L2,T. ⦃h, L2⦄ ⊩ T :[g] →
+                        ∀L1. h ⊢ L1 ⊩:⊑[g] L2 → ⦃h, L1⦄ ⊩ T :[g].
+(*
+#h #g #L2 #T #H elim H -L2 -T //
+[ #I2 #L2 #K2 #V2 #i #HLK2 #_ #IHV2 #L1 #HL12
+  elim (lsubsv_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
+  elim (lsubsv_inv_pair2 … H) -H * #K1 [ | -IHV2 ]
+  [ #HK12 #H destruct /3 width=5/
+  | #V1 #l #HV1 #_ #_ #_ #H destruct /2 width=5/
+  ]
+| #a #I #L2 #V #T #_ #_ #IHV #IHT #L1 #HL12 /4 width=1/
+| #a #L2 #V #W #W0 #T #U #l #_ #_ #HVW #HW0 #HTU #IHV #IHT #L1 #HL12
+  lapply (IHV … HL12) -IHV #HV
+  lapply (IHT … HL12) -IHT #HT
+  lapply (lsubsv_ssta_trans … HVW … HL12) -HVW #HVW
+  lapply (lsubsv_cprs_trans … HL12 … HW0) -HW0 #HW0
+  lapply (lsubsv_xprs_trans … HL12 … HTU) -HL12 -HTU /2 width=8/
+| #L2 #W #T #U #l #_ #_ #HTU #HWU #IHW #IHT #L1 #HL12
+  lapply (IHW … HL12) -IHW #HW
+  lapply (IHT … HL12) -IHT #HT
+  lapply (lsubsv_ssta_trans … HTU … HL12) -HTU #HTU
+  lapply (lsubsv_cpcs_trans … HL12 … HWU) -HL12 -HWU /2 width=4/
+]
+qed-.
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lsubsv/lsubsv_ssta.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lsubsv/lsubsv_ssta.etc
new file mode 100644 (file)
index 0000000..1e5b5fd
--- /dev/null
@@ -0,0 +1,24 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/xprs_lsubss.ma".
+include "basic_2/dynamic/lsubsv.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************)
+
+(* Properties on stratified native type assignment **************************)
+
+axiom lsubsv_ssta_trans: ∀h,g,L2,T,U2,l. ⦃h, L2⦄ ⊢ T •[g,l] U2 →
+                         ∀L1. h ⊢ L1 ⊩:⊑[g] L2 →
+                         ∃∃U1. L1 ⊢ U2 ⬌* U1 & ⦃h, L1⦄ ⊢ T •[g,l] U1.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/nta/lsubn.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/nta/lsubn.etc
new file mode 100644 (file)
index 0000000..c4359c3
--- /dev/null
@@ -0,0 +1,118 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The 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 L2 )"
+   non associative with precedence 45
+   for @{ 'CrSubEqN $h $L1 $L2 }.
+
+notation "hvbox( h ⊢ break term 46 L1 : : ⊑ break term 46 L2 )"
+   non associative with precedence 45
+   for @{ 'CrSubEqNAlt $h $L1 $L2 }.
+
+include "basic_2/dynamic/nta.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR NATIVE TYPE ASSIGNMENT ******************)
+
+(* Note: may not be transitive *)
+inductive lsubn (h:sh): relation lenv ≝
+| lsubn_atom: lsubn h (⋆) (⋆)
+| lsubn_pair: ∀I,L1,L2,W. lsubn h L1 L2 → lsubn h (L1. ⓑ{I} W) (L2. ⓑ{I} W)
+| lsubn_abbr: ∀L1,L2,V,W. ⦃h, L1⦄ ⊢ V : W → ⦃h, L2⦄ ⊢ V : W →
+              lsubn h L1 L2 → lsubn h (L1. ⓓV) (L2. ⓛW)
+.
+
+interpretation
+  "local environment refinement (native type assigment)"
+  'CrSubEqN h L1 L2 = (lsubn h L1 L2).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact lsubn_inv_atom1_aux: ∀h,L1,L2. h ⊢ L1 :⊑ L2 → L1 = ⋆ → L2 = ⋆.
+#h #L1 #L2 * -L1 -L2
+[ //
+| #I #L1 #L2 #V #_ #H destruct
+| #L1 #L2 #V #W #_ #_ #_ #H destruct
+]
+qed.
+
+lemma lsubn_inv_atom1: ∀h,L2. h ⊢ ⋆ :⊑ L2 → L2 = ⋆.
+/2 width=4/ qed-.
+
+fact lsubn_inv_pair1_aux: ∀h,L1,L2. h ⊢ L1 :⊑ L2 → ∀I,K1,V. L1 = K1. ⓑ{I} V →
+                          (∃∃K2. h ⊢ K1 :⊑ K2 & L2 = K2. ⓑ{I} V) ∨
+                          ∃∃K2,W. ⦃h, K1⦄ ⊢ V : W & ⦃h, K2⦄ ⊢ V : W &
+                                  h ⊢ K1 :⊑ K2 & L2 = K2. ⓛW & I = Abbr.
+#h #L1 #L2 * -L1 -L2
+[ #I #K1 #V #H destruct
+| #J #L1 #L2 #V #HL12 #I #K1 #W #H destruct /3 width=3/
+| #L1 #L2 #V #W #H1VW #H2VW #HL12 #I #K1 #V1 #H destruct /3 width=7/
+]
+qed.
+
+lemma lsubn_inv_pair1: ∀h,I,K1,L2,V. h ⊢ K1. ⓑ{I} V :⊑ L2 →
+                       (∃∃K2. h ⊢ K1 :⊑ K2 & L2 = K2. ⓑ{I} V) ∨
+                       ∃∃K2,W. ⦃h, K1⦄ ⊢ V : W & ⦃h, K2⦄ ⊢ V : W &
+                               h ⊢ K1 :⊑ K2 & L2 = K2. ⓛW & I = Abbr.
+/2 width=3/ qed-.
+
+fact lsubn_inv_atom2_aux: ∀h,L1,L2. h ⊢ L1 :⊑ L2 → L2 = ⋆ → L1 = ⋆.
+#h #L1 #L2 * -L1 -L2
+[ //
+| #I #L1 #L2 #V #_ #H destruct
+| #L1 #L2 #V #W #_ #_ #_ #H destruct
+]
+qed.
+
+lemma lsubc_inv_atom2: ∀h,L1. h ⊢ L1 :⊑ ⋆ → L1 = ⋆.
+/2 width=4/ qed-.
+
+fact lsubn_inv_pair2_aux: ∀h,L1,L2. h ⊢ L1 :⊑ L2 → ∀I,K2,W. L2 = K2. ⓑ{I} W →
+                          (∃∃K1. h ⊢ K1 :⊑ K2 & L1 = K1. ⓑ{I} W) ∨
+                          ∃∃K1,V. ⦃h, K1⦄ ⊢ V : W & ⦃h, K2⦄ ⊢ V : W &
+                                  h ⊢ K1 :⊑ K2 & L1 = K1. ⓓV & I = Abst.
+#h #L1 #L2 * -L1 -L2
+[ #I #K2 #W #H destruct
+| #J #L1 #L2 #V #HL12 #I #K2 #W #H destruct /3 width=3/
+| #L1 #L2 #V #W #H1VW #H2VW #HL12 #I #K2 #W2 #H destruct /3 width=7/
+]
+qed.
+
+(* Basic_1: was: csubt_gen_bind *)
+lemma lsubn_inv_pair2: ∀h,I,L1,K2,W. h ⊢ L1 :⊑ K2. ⓑ{I} W →
+                       (∃∃K1. h ⊢ K1 :⊑ K2 & L1 = K1. ⓑ{I} W) ∨
+                       ∃∃K1,V. ⦃h, K1⦄ ⊢ V : W & ⦃h, K2⦄ ⊢ V : W &
+                               h ⊢ K1 :⊑ K2 & L1 = K1. ⓓV & I = Abst.
+/2 width=3/ qed-.
+
+(* Basic_forward lemmas *****************************************************)
+
+lemma lsubn_fwd_lsubs1: ∀h,L1,L2. h ⊢ L1 :⊑ L2 → L1 ≼[0, |L1|] L2.
+#h #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
+qed-.
+
+lemma lsubn_fwd_lsubs2: ∀h,L1,L2. h ⊢ L1 :⊑ L2 → L1 ≼[0, |L2|] L2.
+#h #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
+qed-.
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was: csubt_refl *)
+lemma lsubn_refl: ∀h,L. h ⊢ L :⊑ L.
+#h #L elim L -L // /2 width=1/
+qed.
+
+(* Basic_1: removed theorems 6:
+            csubt_gen_flat csubt_drop_flat csubt_clear_conf
+            csubt_getl_abbr csubt_getl_abst csubt_ty3_ld
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/nta/lsubn_cpcs.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/nta/lsubn_cpcs.etc
new file mode 100644 (file)
index 0000000..5f610bc
--- /dev/null
@@ -0,0 +1,34 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/equivalence/cpcs_cpcs.ma".
+include "basic_2/dynamic/lsubn.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR NATIVE TYPE ASSIGNMENT ******************)
+
+(* Properties on context-sensitive parallel equivalence for terms ***********)
+
+(* Basic_1: was: csubt_pr2 *)
+lemma cpr_lsubn_trans: ∀h,L1,L2. h ⊢ L1 :⊑ L2 →
+                       ∀T1,T2. L2 ⊢ T1 ➡ T2 → L1 ⊢ T1 ➡ T2.
+/3 width=4 by lsubn_fwd_lsubs2, cpr_lsubs_trans/ qed.
+
+lemma cprs_lsubn_trans: ∀h,L1,L2. h ⊢ L1 :⊑ L2 →
+                        ∀T1,T2. L2 ⊢ T1 ➡* T2 → L1 ⊢ T1 ➡* T2.
+/3 width=4 by lsubn_fwd_lsubs2, cprs_lsubs_trans/ qed.
+
+(* Basic_1: was: csubt_pc3 *)
+lemma cpcs_lsubn_trans: ∀h,L1,L2. h ⊢ L1 :⊑ L2 →
+                        ∀T1,T2. L2 ⊢ T1 ⬌* T2 → L1 ⊢ T1 ⬌* T2.
+/3 width=4 by lsubn_fwd_lsubs2, cpcs_lsubs_trans/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/nta/lsubn_ldrop.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/nta/lsubn_ldrop.etc
new file mode 100644 (file)
index 0000000..a16fff6
--- /dev/null
@@ -0,0 +1,64 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/dynamic/lsubn.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR NATIVE TYPE ASSIGNMENT ******************)
+
+(* Properties concerning basic local environment slicing ********************)
+
+(* Note: the constant 0 cannot be generalized *)
+lemma lsubn_ldrop_O1_conf: ∀h,L1,L2. h ⊢ L1 :⊑ L2 → ∀K1,e. ⇩[0, e] L1 ≡ K1 →
+                           ∃∃K2. h ⊢ K1 :⊑ K2 & ⇩[0, e] L2 ≡ K2.
+#h #L1 #L2 #H elim H -L1 -L2
+[ /2 width=3/
+| #I #L1 #L2 #V #_ #IHL12 #K1 #e #H
+  elim (ldrop_inv_O1 … H) -H * #He #HLK1
+  [ destruct
+    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+  | elim (IHL12 … HLK1) -L1 /3 width=3/
+  ]
+| #L1 #L2 #V #W #H1VW #H2VW #_ #IHL12 #K1 #e #H
+  elim (ldrop_inv_O1 … H) -H * #He #HLK1
+  [ destruct
+    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+  | elim (IHL12 … HLK1) -L1 /3 width=3/
+  ]
+]
+qed.
+
+(* Note: the constant 0 cannot be generalized *)
+(* Basic_1: was only: csubt_drop_abbr csubt_drop_abst *)
+lemma lsubn_ldrop_O1_trans: ∀h,L1,L2. h ⊢ L1 :⊑ L2 → ∀K2,e. ⇩[0, e] L2 ≡ K2 →
+                            ∃∃K1. h ⊢ K1 :⊑ K2 & ⇩[0, e] L1 ≡ K1.
+#h #L1 #L2 #H elim H -L1 -L2
+[ /2 width=3/
+| #I #L1 #L2 #V #_ #IHL12 #K2 #e #H
+  elim (ldrop_inv_O1 … H) -H * #He #HLK2
+  [ destruct
+    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+  | elim (IHL12 … HLK2) -L2 /3 width=3/
+  ]
+| #L1 #L2 #V #W #H1VW #H2VW #_ #IHL12 #K2 #e #H
+  elim (ldrop_inv_O1 … H) -H * #He #HLK2
+  [ destruct
+    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+  | elim (IHL12 … HLK2) -L2 /3 width=3/
+  ]
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/nta/lsubn_nta.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/nta/lsubn_nta.etc
new file mode 100644 (file)
index 0000000..5832b00
--- /dev/null
@@ -0,0 +1,47 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/dynamic/nta_nta.ma".
+include "basic_2/dynamic/lsubn_ldrop.ma".
+include "basic_2/dynamic/lsubn_cpcs.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR NATIVE TYPE ASSIGNMENT ******************)
+
+(* Properties concerning atomic arity assignment ****************************)
+
+(* Note: the corresponding confluence property does not hold *)
+(* Basic_1: was: csubt_ty3 *)
+lemma lsubn_nta_trans: ∀h,L2,T,U. ⦃h, L2⦄ ⊢ T : U → ∀L1. h ⊢ L1 :⊑ L2 →
+                       ⦃h, L1⦄ ⊢ T : U.
+#h #L2 #T #U #H elim H -L2 -T -U
+[ //
+| #L2 #K2 #V2 #W2 #U2 #i #HLK2 #_ #WU2 #IHVW2 #L1 #HL12
+  elim (lsubn_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
+  elim (lsubn_inv_pair2 … H) -H * #K1
+  [ #HK12 #H destruct /3 width=6/
+  | #V1 #_ #_ #_ #_ #H destruct
+  ]
+| #L2 #K2 #W2 #V2 #U2 #i #HLK2 #_ #HWU2 #IHWV2 #L1 #HL12
+  elim (lsubn_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
+  elim (lsubn_inv_pair2 … H) -H * #K1 [ | -IHWV2 ]
+  [ #HK12 #H destruct /3 width=6/
+  | #V1 #H1V1W2 #_ #_ #H #_ destruct /2 width=6/
+  ]
+| /4 width=2/
+| /3 width=1/
+| /3 width=2/
+| /3 width=1/
+| /4 width=6/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta.etc
new file mode 100644 (file)
index 0000000..fa4a8ed
--- /dev/null
@@ -0,0 +1,53 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/sh.ma".
+include "basic_2/equivalence/cpcs.ma".
+
+(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
+
+inductive nta (h:sh): lenv → relation term ≝
+| nta_sort: ∀L,k. nta h L (⋆k) (⋆(next h k))
+| nta_ldef: ∀L,K,V,W,U,i. ⇩[0, i] L ≡ K. ⓓV → nta h K V W →
+            ⇧[0, i + 1] W ≡ U → nta h L (#i) U
+| nta_ldec: ∀L,K,W,V,U,i. ⇩[0, i] L ≡ K. ⓛW → nta h K W V →
+            ⇧[0, i + 1] W ≡ U → nta h L (#i) U
+| nta_bind: ∀I,L,V,W,T,U. nta h L V W → nta h (L. ⓑ{I} V) T U →
+            nta h L (ⓑ{I}V.T) (ⓑ{I}V.U)
+| nta_appl: ∀L,V,W,T,U. nta h L V W → nta h L (ⓛW.T) (ⓛW.U) →
+            nta h L (ⓐV.ⓛW.T) (ⓐV.ⓛW.U)
+| nta_pure: ∀L,V,W,T,U. nta h L T U → nta h L (ⓐV.U) W →
+            nta h L (ⓐV.T) (ⓐV.U)
+| nta_cast: ∀L,T,U. nta h L T U → nta h L (ⓝU. T) U
+| nta_conv: ∀L,T,U1,U2,V2. nta h L T U1 → L ⊢ U1 ⬌* U2 → nta h L U2 V2 →
+            nta h L T U2
+.
+
+interpretation "native type assignment (term)"
+   'NativeType h L T U = (nta h L T U).
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was: ty3_cast *)
+lemma nta_cast_old: ∀h,L,W,T,U.
+                    ⦃h, L⦄ ⊢ T : U → ⦃h, L⦄ ⊢ U : W → ⦃h, L⦄ ⊢ ⓝU.T : ⓝW.U.
+/4 width=3/ qed.
+
+(* Basic_1: was: ty3_typecheck *)
+lemma nta_typecheck: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∃T0. ⦃h, L⦄ ⊢ ⓝU.T : T0.
+/3 width=2/ qed.
+
+(* Basic_1: removed theorems 4:
+            ty3_getl_subst0 ty3_fsubst0 ty3_csubst0 ty3_subst0
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_aaa.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_aaa.etc
new file mode 100644 (file)
index 0000000..9628569
--- /dev/null
@@ -0,0 +1,49 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/computation/csn_aaa.ma".
+include "basic_2/equivalence/lcpcs_aaa.ma".
+include "basic_2/dynamic/nta.ma".
+
+(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
+
+(* Forward lemmas on atomic arity assignment for terms **********************)
+
+lemma nta_fwd_aaa: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∃∃A. L ⊢ T ⁝ A & L ⊢ U ⁝ A.
+#h #L #T #U #H elim H -L -T -U
+[ /2 width=3/
+| #L #K #V #W #U #i #HLK #_ #HWU * #B #HV #HW
+  lapply (ldrop_fwd_ldrop2 … HLK) /3 width=9/
+| #L #K #W #V #U #i #HLK #_ #HWU * #B #HW #_ -V
+  lapply (ldrop_fwd_ldrop2 … HLK) /3 width=9/
+| * #L #V #W #T #U #_ #_ * #B #HV #HW * #A #HT #HU
+  [ /3 width=3/ | /3 width=5/ ]
+| #L #V #W #T #U #_ #_ * #B #HV #HW * #X #H1 #H2
+  elim (aaa_inv_abst … H1) -H1 #B1 #A1 #HW1 #HT #H destruct
+  elim (aaa_inv_abst … H2) -H2 #B2 #A #_ #HU #H destruct
+  lapply (aaa_mono … HW1 … HW) -HW1 #H destruct /4 width=5/
+| #L #V #W #T #U #_ #_ * #X #HT #HUX * #A #H #_ -W
+  elim (aaa_inv_appl … H) -H #B #HV #HUA
+  lapply (aaa_mono … HUA … HUX) -HUX #H destruct /3 width=5/
+| #L #T #U #_ * #A #HT #HU /3 width=3/
+| #L #T #U1 #U2 #V2 #_ #HU12 #_ * #X #HT #HU1 * #A #HU2 #_
+  lapply (aaa_cpcs_mono … HU12 … HU1 … HU2) -U1 #H destruct /2 width=3/
+]
+qed-.
+
+(* Note: this is the stong normalization property *)
+(* Basic_1: was only: ty3_sn3 *)
+theorem nta_fwd_csn: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → L ⊢ ⬇* T ∧ L ⊢ ⬇* U.
+#h #L #T #U #H elim (nta_fwd_aaa … H) -H /3 width=2/
+qed-. 
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_alt.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_alt.etc
new file mode 100644 (file)
index 0000000..8cbd595
--- /dev/null
@@ -0,0 +1,190 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/equivalence/cpcs_cpcs.ma".
+include "basic_2/dynamic/nta.ma".
+
+(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
+
+(* alternative definition of nta *)
+inductive ntaa (h:sh): lenv → relation term ≝
+| ntaa_sort: ∀L,k. ntaa h L (⋆k) (⋆(next h k))
+| ntaa_ldef: ∀L,K,V,W,U,i. ⇩[0, i] L ≡ K. ⓓV → ntaa h K V W →
+             ⇧[0, i + 1] W ≡ U → ntaa h L (#i) U
+| ntaa_ldec: ∀L,K,W,V,U,i. ⇩[0, i] L ≡ K. ⓛW → ntaa h K W V →
+             ⇧[0, i + 1] W ≡ U → ntaa h L (#i) U
+| ntaa_bind: ∀I,L,V,W,T,U. ntaa h L V W → ntaa h (L. ⓑ{I} V) T U →
+             ntaa h L (ⓑ{I}V.T) (ⓑ{I}V.U)
+| ntaa_appl: ∀L,V,W,T,U. ntaa h L V W → ntaa h L (ⓛW.T) (ⓛW.U) →
+             ntaa h L (ⓐV.ⓛW.T) (ⓐV.ⓛW.U)
+| ntaa_pure: ∀L,V,W,T,U. ntaa h L T U → ntaa h L (ⓐV.U) W →
+             ntaa h L (ⓐV.T) (ⓐV.U)
+| ntaa_cast: ∀L,T,U,W. ntaa h L T U → ntaa h L U W → ntaa h L (ⓝU. T) U
+| ntaa_conv: ∀L,T,U1,U2,V2. ntaa h L T U1 → L ⊢ U1 ⬌* U2 → ntaa h L U2 V2 →
+             ntaa h L T U2
+.
+
+interpretation "native type assignment (term) alternative"
+   'NativeTypeAlt h L T U = (ntaa h L T U).
+
+(* Advanced inversion lemmas ************************************************)
+
+fact ntaa_inv_bind1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T :: U → ∀J,X,Y. T = ⓑ{J}Y.X →
+                         ∃∃Z1,Z2. ⦃h, L⦄ ⊢ Y :: Z1 & ⦃h, L.ⓑ{J}Y⦄ ⊢ X :: Z2 &
+                                  L ⊢ ⓑ{J}Y.Z2 ⬌* U.
+#h #L #T #U #H elim H -L -T -U
+[ #L #k #J #X #Y #H destruct
+| #L #K #V #W #U #i #_ #_ #_ #_ #J #X #Y #H destruct
+| #L #K #W #V #U #i #_ #_ #_ #_ #J #X #Y #H destruct
+| #I #L #V #W #T #U #HVW #HTU #_ #_ #J #X #Y #H destruct /2 width=3/
+| #L #V #W #T #U #_ #_ #_ #_ #J #X #Y #H destruct
+| #L #V #W #T #U #_ #_ #_ #_ #J #X #Y #H destruct
+| #L #T #U #W #_ #_ #_ #_ #J #X #Y #H destruct
+| #L #T #U1 #U2 #V2 #_ #HU12 #_ #IHTU1 #_ #J #X #Y #H destruct
+  elim (IHTU1 ????) -IHTU1 [5: // |2,3,4: skip ] #Z1 #Z2 #HZ1 #HZ2 #HU1
+  lapply (cpcs_trans … HU1 … HU12) -U1 /2 width=3/
+]
+qed.
+
+lemma ntaa_inv_bind1: ∀h,J,L,Y,X,U. ⦃h, L⦄ ⊢ ⓑ{J}Y.X :: U →
+                      ∃∃Z1,Z2. ⦃h, L⦄ ⊢ Y :: Z1 & ⦃h, L.ⓑ{J}Y⦄ ⊢ X :: Z2 &
+                               L ⊢ ⓑ{J}Y.Z2 ⬌* U.
+/2 width=3/ qed-.                            
+
+lemma ntaa_nta: ∀h,L,T,U. ⦃h, L⦄ ⊢ T :: U → ⦃h, L⦄ ⊢ T : U.
+#h #L #T #U #H elim H -L -T -U
+// /2 width=1/ /2 width=2/ /2 width=3/ /2 width=6/
+qed-.
+
+(* Properties on relocation *************************************************)
+
+lemma ntaa_lift: ∀h,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 :: U1 → ∀L2,d,e. ⇩[d, e] L2 ≡ L1 →
+                 ∀T2. ⇧[d, e] T1 ≡ T2 → ∀U2. ⇧[d, e] U1 ≡ U2 → ⦃h, L2⦄ ⊢ T2 :: U2.
+#h #L1 #T1 #U1 #H elim H -L1 -T1 -U1
+[ #L1 #k #L2 #d #e #HL21 #X1 #H1 #X2 #H2
+  >(lift_inv_sort1 … H1) -X1
+  >(lift_inv_sort1 … H2) -X2 //
+| #L1 #K1 #V1 #W1 #W #i #HLK1 #_ #HW1 #IHVW1 #L2 #d #e #HL21 #X #H #U2 #HWU2
+  elim (lift_inv_lref1 … H) * #Hid #H destruct
+  [ elim (lift_trans_ge … HW1 … HWU2 ?) -W // #W2 #HW12 #HWU2
+    elim (ldrop_trans_le … HL21 … HLK1 ?) -L1 /2 width=2/ #X #HLK2 #H
+    elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K2 #V2 #HK21 #HV12 #H destruct
+    /3 width=8/
+  | lapply (lift_trans_be … HW1 … HWU2 ? ?) -W // /2 width=1/ #HW1U2
+    lapply (ldrop_trans_ge … HL21 … HLK1 ?) -L1 // -Hid /3 width=8/
+  ]
+| #L1 #K1 #W1 #V1 #W #i #HLK1 #_ #HW1 #IHWV1 #L2 #d #e #HL21 #X #H #U2 #HWU2
+  elim (lift_inv_lref1 … H) * #Hid #H destruct
+  [ elim (lift_trans_ge … HW1 … HWU2 ?) -W // <minus_plus #W #HW1 #HWU2
+    elim (ldrop_trans_le … HL21 … HLK1 ?) -L1 /2 width=2/ #X #HLK2 #H
+    elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K2 #W2 #HK21 #HW12 #H destruct
+    lapply (lift_mono … HW1 … HW12) -HW1 #H destruct
+    elim (lift_total V1 (d-i-1) e) /3 width=8/
+  | lapply (lift_trans_be … HW1 … HWU2 ? ?) -W // /2 width=1/ #HW1U2
+    lapply (ldrop_trans_ge … HL21 … HLK1 ?) -L1 // -Hid /3 width=8/
+  ]
+| #I #L1 #V1 #W1 #T1 #U1 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL21 #X1 #H1 #X2 #H2
+  elim (lift_inv_bind1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H destruct
+  elim (lift_inv_bind1 … H2) -H2 #X #U2 #H1 #HU12 #H2 destruct
+  lapply (lift_mono … H1 … HV12) -H1 #H destruct
+  elim (lift_total W1 d e) /4 width=6/
+| #L1 #V1 #W1 #T1 #U1 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL21 #X1 #H1 #X2 #H2
+  elim (lift_inv_flat1 … H1) -H1 #V2 #X #HV12 #H1 #H destruct
+  elim (lift_inv_bind1 … H1) -H1 #W2 #T2 #HW12 #HT12 #H destruct
+  elim (lift_inv_flat1 … H2) -H2 #Y2 #X #HY #H2 #H destruct
+  elim (lift_inv_bind1 … H2) -H2 #X2 #U2 #HX #HU12 #H destruct
+  lapply (lift_mono … HY … HV12) -HY #H destruct
+  lapply (lift_mono … HX … HW12) -HX #H destruct /4 width=6/
+| #L1 #V1 #W1 #T1 #U1 #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL21 #X1 #H1 #X2 #H2
+  elim (lift_inv_flat1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H destruct
+  elim (lift_inv_flat1 … H2) -H2 #X #U2 #H1 #HU12 #H2 destruct
+  lapply (lift_mono … H1 … HV12) -H1 #H destruct
+  elim (lift_total W1 d e) /4 width=6/
+| #L1 #T1 #U1 #W1 #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL21 #X #H #U2 #HU12
+  elim (lift_inv_flat1 … H) -H #X2 #T2 #HUX2 #HT12 #H destruct
+  lapply (lift_mono … HUX2 … HU12) -HUX2 #H destruct
+  elim (lift_total W1 d e) /3 width=6/
+| #L1 #T1 #U11 #U12 #V12 #_ #HU112 #_ #IHTU11 #IHUV12 #L2 #d #e #HL21 #U1 #HTU1 #U2 #HU12
+  elim (lift_total U11 d e) #U #HU11
+  elim (lift_total V12 d e) #V22 #HV122
+  lapply (cpcs_lift … HL21 … HU11 … HU12 HU112) -HU112 /3 width=6/
+]
+qed.
+
+(* Advanced forvard lemmas **************************************************)
+
+lemma ntaa_fwd_correct: ∀h,L,T,U. ⦃h, L⦄ ⊢ T :: U → ∃T0. ⦃h, L⦄ ⊢ U :: T0.
+#h #L #T #U #H elim H -L -T -U
+[ /2 width=2/
+| #L #K #V #W #W0 #i #HLK #_ #HW0 * #V0 #HWV0
+  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
+  elim (lift_total V0 0 (i+1)) /3 width=10/
+| #L #K #W #V #V0 #i #HLK #HWV #HWV0 #_
+  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
+  elim (lift_total V 0 (i+1)) /3 width=10/
+| #I #L #V #W #T #U #HVW #_ #_ * /3 width=2/
+| #L #V #W #T #U #HVW #_ #_ * #X #H
+  elim (ntaa_inv_bind1 … H) -H /4 width=2/
+| #L #V #W #T #U #_ #HUW * #T0 #HUT0 /3 width=2/
+| /2 width=2/
+| /2 width=2/
+]
+qed-.
+
+(* Advanced properties ******************************************************)
+
+lemma nta_ntaa: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ⦃h, L⦄ ⊢ T :: U.
+#h #L #T #U #H elim H -L -T -U
+// /2 width=1/ /2 width=2/ /2 width=3/ /2 width=6/
+#L #T #U #_ #HTU
+elim (ntaa_fwd_correct … HTU) /2 width=2/
+qed.
+
+(* Advanced eliminators *****************************************************)
+
+lemma nta_ind_alt: ∀h. ∀R:lenv→relation term.
+   (∀L,k. R L ⋆k ⋆(next h k)) →
+   (∀L,K,V,W,U,i.
+      ⇩[O, i] L ≡ K.ⓓV → ⦃h, K⦄ ⊢ V : W → ⇧[O, i + 1] W ≡ U →
+      R K V W → R L (#i) U 
+   ) →
+   (∀L,K,W,V,U,i.
+      ⇩[O, i] L ≡ K.ⓛW → ⦃h, K⦄ ⊢ W : V → ⇧[O, i + 1] W ≡ U →
+      R K W V → R L (#i) U
+   ) →
+   (∀I,L,V,W,T,U.
+      ⦃h, L⦄ ⊢ V : W → ⦃h, L.ⓑ{I}V⦄ ⊢ T : U →
+      R L V W → R (L.ⓑ{I}V) T U → R L (ⓑ{I}V.T) (ⓑ{I}V.U)
+   ) →
+   (∀L,V,W,T,U.
+      ⦃h, L⦄ ⊢ V : W → ⦃h, L⦄ ⊢ (ⓛW.T):(ⓛW.U) →
+      R L V W →R L (ⓛW.T) (ⓛW.U) →R L (ⓐV.ⓛW.T) (ⓐV.ⓛW.U)
+   ) →
+   (∀L,V,W,T,U.
+      ⦃h, L⦄ ⊢ T : U → ⦃h, L⦄ ⊢ (ⓐV.U) : W →
+      R L T U → R L (ⓐV.U) W → R L (ⓐV.T) (ⓐV.U)
+   ) →
+   (∀L,T,U,W.
+      ⦃h, L⦄ ⊢ T : U → ⦃h, L⦄ ⊢ U : W →
+      R L T U → R L U W → R L (ⓝU.T) U
+   ) →
+   (∀L,T,U1,U2,V2.
+      ⦃h, L⦄ ⊢ T : U1 → L ⊢ U1 ⬌* U2 → ⦃h, L⦄ ⊢ U2 : V2 →
+      R L T U1 →R L U2 V2 →R L T U2
+   ) →
+   ∀L,T,U. ⦃h, L⦄ ⊢ T : U → R L T U.
+#h #R #H1 #H2 #H3 #H4 #H5 #H6 #H7 #H8 #L #T #U #H elim (nta_ntaa … H) -L -T -U
+// /3 width=1 by ntaa_nta/ /3 width=3 by ntaa_nta/ /3 width=4 by ntaa_nta/
+/3 width=7 by ntaa_nta/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_lift.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_lift.etc
new file mode 100644 (file)
index 0000000..57e06a1
--- /dev/null
@@ -0,0 +1,144 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/dynamic/nta_alt.ma".
+
+(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
+
+(* Advanced inversion lemmas ************************************************)
+
+fact nta_inv_sort1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∀k0. T = ⋆k0 →
+                        L ⊢ ⋆(next h k0) ⬌* U.
+#h #L #T #U #H elim H -L -T -U
+[ #L #k #k0 #H destruct //
+| #L #K #V #W #U #i #_ #_ #_ #_ #k0 #H destruct
+| #L #K #W #V #U #i #_ #_ #_ #_ #k0 #H destruct
+| #I #L #V #W #T #U #_ #_ #_ #_ #k0 #H destruct
+| #L #V #W #T #U #_ #_ #_ #_ #k0 #H destruct
+| #L #V #W #T #U #_ #_ #_ #_ #k0 #H destruct
+| #L #T #U #_ #_ #k0 #H destruct
+| #L #T #U1 #U2 #V2 #_ #HU12 #_ #IHTU1 #_ #k0 #H destruct
+  lapply (IHTU1 ??) -IHTU1 [ // | skip ] #Hk0
+  lapply (cpcs_trans … Hk0 … HU12) -U1 //
+]
+qed.
+
+(* Basic_1: was: ty3_gen_sort *)
+lemma nta_inv_sort1: ∀h,L,U,k. ⦃h, L⦄ ⊢ ⋆k : U → L ⊢ ⋆(next h k) ⬌* U.
+/2 width=3/ qed-.
+
+fact nta_inv_lref1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∀j. T = #j →
+                        (∃∃K,V,W,U0. ⇩[0, j] L ≡ K. ⓓV & ⦃h, K⦄ ⊢ V : W &
+                                     ⇧[0, j + 1] W ≡ U0 & L ⊢ U0 ⬌* U
+                        ) ∨
+                        (∃∃K,W,V,U0. ⇩[0, j] L ≡ K. ⓛW & ⦃h, K⦄ ⊢ W : V &
+                                     ⇧[0, j + 1] W ≡ U0 & L ⊢ U0 ⬌* U
+                        ).
+#h #L #T #U #H elim H -L -T -U
+[ #L #k #j #H destruct
+| #L #K #V #W #U #i #HLK #HVW #HWU #_ #j #H destruct /3 width=8/
+| #L #K #W #V #U #i #HLK #HWV #HWU #_ #j #H destruct /3 width=8/
+| #I #L #V #W #T #U #_ #_ #_ #_ #j #H destruct
+| #L #V #W #T #U #_ #_ #_ #_ #j #H destruct
+| #L #V #W #T #U #_ #_ #_ #_ #j #H destruct
+| #L #T #U #_ #_ #j #H destruct
+| #L #T #U1 #U2 #V2 #_ #HU12 #_ #IHTU1 #_ #j #H destruct
+  elim (IHTU1 ??) -IHTU1 [4: // |2: skip ] * #K #V #W #U0 #HLK #HVW #HWU0 #HU01
+  lapply (cpcs_trans … HU01 … HU12) -U1 /3 width=8/
+]
+qed.
+
+(* Basic_1: was ty3_gen_lref *)
+lemma nta_inv_lref1: ∀h,L,U,i. ⦃h, L⦄ ⊢ #i : U →
+                     (∃∃K,V,W,U0. ⇩[0, i] L ≡ K. ⓓV & ⦃h, K⦄ ⊢ V : W &
+                                  ⇧[0, i + 1] W ≡ U0 & L ⊢ U0 ⬌* U
+                     ) ∨
+                     (∃∃K,W,V,U0. ⇩[0, i] L ≡ K. ⓛW & ⦃h, K⦄ ⊢ W : V &
+                                  ⇧[0, i + 1] W ≡ U0 & L ⊢ U0 ⬌* U
+                     ).
+/2 width=3/ qed-.
+
+(* Basic_1: was: ty3_gen_bind *)
+lemma nta_inv_bind1: ∀h,I,L,Y,X,U. ⦃h, L⦄ ⊢ ⓑ{I}Y.X : U →
+                     ∃∃Z1,Z2. ⦃h, L⦄ ⊢ Y : Z1 & ⦃h, L.ⓑ{I}Y⦄ ⊢ X : Z2 &
+                              L ⊢ ⓑ{I}Y.Z2 ⬌* U.
+#h #I #L #Y #X #U #H
+elim (ntaa_inv_bind1 … (nta_ntaa … H)) -H /3 width=3 by ntaa_nta, ex3_2_intro/
+qed-.
+
+fact nta_inv_cast1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∀X,Y. T = ⓝY.X →
+                     ⦃h, L⦄ ⊢ X : Y ∧ L ⊢ Y ⬌* U.
+#h #L #T #U #H elim H -L -T -U
+[ #L #k #X #Y #H destruct
+| #L #K #V #W #U #i #_ #_ #_ #_ #X #Y #H destruct
+| #L #K #W #V #U #i #_ #_ #_ #_ #X #Y #H destruct
+| #I #L #V #W #T #U #_ #_ #_ #_ #X #Y #H destruct
+| #L #V #W #T #U #_ #_ #_ #_ #X #Y #H destruct
+| #L #V #W #T #U #_ #_ #_ #_ #X #Y #H destruct
+| #L #T #U #HTU #_ #X #Y #H destruct /2 width=1/
+| #L #T #U1 #U2 #V2 #_ #HU12 #_ #IHTU1 #_ #X #Y #H destruct
+  elim (IHTU1 ???) -IHTU1 [4: // |2,3: skip ] #HXY #HU1
+  lapply (cpcs_trans … HU1 … HU12) -U1 /2 width=1/
+]
+qed.
+
+(* Basic_1: was: ty3_gen_cast *)
+lemma nta_inv_cast1: ∀h,L,X,Y,U. ⦃h, L⦄ ⊢ ⓝY.X : U →  ⦃h, L⦄ ⊢ X : Y ∧ L ⊢ Y ⬌* U.
+/2 width=3/ qed-.
+
+(* Advanced forvard lemmas **************************************************)
+
+fact nta_fwd_pure1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∀X,Y. T = ⓐY.X →
+                        ∃∃V,W. ⦃h, L⦄ ⊢ Y : W & ⦃h, L⦄ ⊢ X : V & L ⊢ ⓐY.V ⬌* U.
+#h #L #T #U #H elim H -L -T -U
+[ #L #k #X #Y #H destruct
+| #L #K #V #W #U #i #_ #_ #_ #_ #X #Y #H destruct
+| #L #K #W #V #U #i #_ #_ #_ #_ #X #Y #H destruct
+| #I #L #V #W #T #U #_ #_ #_ #_ #X #Y #H destruct
+| #L #V #W #T #U #HVW #HTU #_ #_ #X #Y #H destruct /2 width=3/
+| #L #V #W #T #U #HTU #_ #_ #IHUW #X #Y #H destruct
+  elim (IHUW U Y ?) -IHUW // /2 width=3/
+| #L #T #U #_ #_ #X #Y #H destruct
+| #L #T #U1 #U2 #V2 #_ #HU12 #_ #IHTU1 #_ #X #Y #H destruct
+  elim (IHTU1 ???) -IHTU1 [4: // |2,3: skip ] #V #W #HYW #HXV #HU1
+  lapply (cpcs_trans … HU1 … HU12) -U1 /2 width=3/
+]
+qed.
+
+lemma nta_fwd_pure1: ∀h,L,X,Y,U. ⦃h, L⦄ ⊢ ⓐY.X : U →
+                     ∃∃V,W. ⦃h, L⦄ ⊢ Y : W & ⦃h, L⦄ ⊢ X : V & L ⊢ ⓐY.V ⬌* U.
+/2 width=3/ qed-.
+
+(* Basic_1: was: ty3_correct *)
+lemma nta_fwd_correct: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∃T0. ⦃h, L⦄ ⊢ U : T0.
+#h #L #T #U #H
+elim (ntaa_fwd_correct … (nta_ntaa … H)) -H /3 width=2 by ntaa_nta, ex_intro/
+qed-.
+
+(* Advanced properties ******************************************************)
+
+(* Basic_1: was: ty3_appl *)
+lemma nta_appl_old: ∀h,L,V,W,T,U. ⦃h, L⦄ ⊢ V : W → ⦃h, L⦄ ⊢ T : ⓛW.U →
+                    ⦃h, L⦄ ⊢ ⓐV.T : ⓐV.ⓛW.U.
+#h #L #V #W #T #U #HVW #HTU
+elim (nta_fwd_correct … HTU) #X #H
+elim (nta_inv_bind1 … H) -H /4 width=2/
+qed.
+
+(* Properties on relocation *************************************************)
+
+(* Basic_1: was: ty3_lift *)
+lemma nta_lift: ∀h,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 : U1 → ∀L2,d,e. ⇩[d, e] L2 ≡ L1 →
+                ∀T2. ⇧[d, e] T1 ≡ T2 → ∀U2. ⇧[d, e] U1 ≡ U2 → ⦃h, L2⦄ ⊢ T2 : U2.
+/4 width=9 by ntaa_nta, nta_ntaa, ntaa_lift/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_ltpr.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_ltpr.etc
new file mode 100644 (file)
index 0000000..c461e9f
--- /dev/null
@@ -0,0 +1,235 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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_delift.ma".
+include "basic_2/dynamic/nta.ma".
+(*
+lemma pippo: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∀X,Y. L ⊢ T ➡* ⓛX.Y →
+             ∃Z. L ⊢ U ➡* ⓛX.Z.
+#h #L #T #U #H elim H -L -T -U
+[
+|
+|
+|
+| #L #V #W #T #U #_ #_ #IHVW #IHTU #X #Y #H  
+| #L #V #W #T #U #_ #HUW #IHTU #IHUW #X #Y #HTY
+  elim (cprs_inv_appl_abst … HTY) -HTY #W1 #T1 #W2 #T2 #HT1 #HT12 #HYT2
+  elim (IHTU … HT1) -IHTU -HT1 #U1 #HU1 
+  
+  
+   *
+  [ #V0 #T0 #_ #_ #H destruct
+  | #V0 #W0 #T0 #HV0 #HT0 #HTY
+    elim (IHTU … HT0) -IHTU -HT0 #Z #HUZ
+    elim (cprs_inv_abbr1 … HTY) -HTY *
+    [ #V1 #T1 #_ #_ #H destruct #X0  
+
+*)
+
+(*
+
+include "basic_2/computation/cprs_lcprs.ma".
+
+
+
+
+include "basic_2/dynamic/nta_ltpss.ma".
+include "basic_2/dynamic/nta_thin.ma".
+include "basic_2/dynamic/lsubn_nta.ma".
+
+include "basic_2/hod/ntas_lift.ma".
+
+  
+  elim (nta_inv_pure1 … HUW) -HUW #V0 #U0 #U1 #HV0 #HU0 #HU0W #HU01
+  @(ex2_2_intro … HYW)
+  [2: 
+
+
+axiom pippo_aux: ∀h,L,Z,U. ⦃h, L⦄ ⊢ Z : U → ∀Y,X. Z = ⓐY.X →
+                 ∀W,T. L ⊢ X ➡* ⓛW.T → ⦃h, L⦄ ⊢ Y : W.
+#h #L #Z #U #H elim H -L -Z -U
+[
+|
+|
+|
+|
+| #L #V #W #T #U #HTU #_ #_ #IHUW #Y #X #H #W0 #T0 #HX destruct 
+  lapply (IHUW Y U ? ?) -IHUW -W // #T 
+  @(ex2_2_intro … HYW)
+  [2: 
+
+axiom pippo: ∀h,L,V,X,U. ⦃h, L⦄ ⊢ ⓐV.X : U →
+             ∃∃W,T. L ⊢ X ➡* ⓛW.T & ⦃h, L⦄ ⊢ V : W.
+#h #L #V #X #Y #H 
+
+*)
+(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
+
+(* Properties on context-free parallel reduction for local environments ******)
+(*
+axiom nta_ltpr_cprs_conf: ∀h,L1,T1,U. ⦃h, L1⦄ ⊢ T1 : U → ∀L2. L1 ➡ L2 →
+                          ∀T2. L2 ⊢ T1 ➡* T2 → ⦃h, L2⦄ ⊢ T2 : U.
+#h #L1 #T1 #U #H @(nta_ind_alt … H) -L1 -T1 -U
+[ #L1 #k #L2 #_ #T2 #H
+  >(cprs_inv_sort1 … H) -H //
+|
+|
+|
+|
+| #L1 #V1 #W1 #T1 #U1 #_ #_ #IHTU1 #IHUW1 #L2 #HL12 #T2 #H
+  elim (cprs_inv_appl1 … H) -H *
+  [ #V2 #T0 #HV12 #HT10 #H destruct
+    elim (nta_fwd_correct h L2 (ⓐV1.T1) (ⓐV1.U1) ?) [2: /3 width=2/ ] #U
+    @(nta_conv … (ⓐV2.U1)) (* /2 width=1/*) [ /4 width=2/] (**) (* explicit constructor, /5 width=5/ is too slow *)
+  | #V2 #W2 #T0 #HV12 #HT10 #HT02
+    lapply (IHTU1 … HL12 (ⓛW2.T0) ?) -IHTU1 /2 width=1/ -HT10 #H
+    elim (nta_inv_bind1 … H) -H #W #U0 #HW2 #HTU0 #HU01
+    elim (cpcs_inv_abst1 … HU01) -HU01 #W #U #HU1 #HU0
+    lapply (IHUW1 … HL12 (ⓐV2.ⓛW.U) ?) -IHUW1 -HL12 /2 width=1/ -HV12 #H
+    
+    
+    
+    elim (nta_fwd_pure1 … H) -H #W0 #U2 #HVU2 #H #HW01
+    elim (nta_inv_bind1 … H) -H #W3 #U3 #HW3 #HU3 #H
+    elim (cpcs_inv_abst1 … H) -H #W4 #U4  
+*)      
+(*
+axiom nta_ltpr_tpr_conf: ∀h,L1,T1,U. ⦃h, L1⦄ ⊢ T1 : U → ∀L2. L1 ➡ L2 →
+                         ∀T2. T1 ➡ T2 → ⦃h, L2⦄ ⊢ T2 : U.
+#h #L1 #T1 #U #H @(nta_ind_alt … H) -L1 -T1 -U
+[ #L1 #k #L2 #_ #T2 #H
+  >(tpr_inv_atom1 … H) -H //
+| #L1 #K1 #V1 #W #U #i #HLK1 #_ #HWU #IHV1 #L2 #HL12 #T2 #H
+  >(tpr_inv_atom1 … H) -T2
+  elim (ltpr_ldrop_conf … HLK1 … HL12) -HLK1 -HL12 #X #HLK2 #H
+  elim (ltpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct /3 width=6/
+| #L1 #K1 #W1 #V1 #U1 #i #HLK1 #HWV1 #HWU1 #IHWV1 #L2 #HL12 #T2 #H
+  >(tpr_inv_atom1 … H) -T2
+  elim (ltpr_ldrop_conf … HLK1 … HL12) -HLK1 -HL12 #X #HLK2 #H
+  elim (ltpr_inv_pair1 … H) -H #K2 #W2 #HK12 #HW12 #H destruct
+  lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
+  elim (lift_total V1 0 (i+1)) #W #HW
+  lapply (nta_lift h … HLK … HWU1 … HW) /2 width=1/ -HLK -HW
+  elim (lift_total W2 0 (i+1)) #U2 #HWU2
+  lapply (tpr_lift … HW12 … HWU1 … HWU2) -HWU1 #HU12
+  @(nta_conv … U2) /2 width=1/ /3 width=6/ (**) (* explicit constructor, /3 width=6/ is too slow *)
+| #I #L1 #V1 #W1 #T1 #U1 #_ #_ #IHVW1 #IHTU1 #L2 #HL12 #X #H
+  elim (tpr_inv_bind1 … H) -H *
+  [ #V2 #T0 #T2 #HV12 #HT10 #HT02 #H destruct
+    lapply (IHVW1 … HL12 … HV12) #HV2W1
+    lapply (IHVW1 L2 … V1 ?) // -IHVW1 #HWV1
+    lapply (IHTU1 (L2.ⓑ{I}V2) … HT10) -HT10 /2 width=1/ #HT0U1
+    lapply (IHTU1 (L2.ⓑ{I}V1) ? T1 ?) -IHTU1 // /2 width=1/ -HL12 #H
+    lapply (tps_lsubs_trans … HT02 (L2.ⓑ{I}V2) ?) -HT02 /2 width=1/ #HT02
+    lapply (nta_tps_conf … HT0U1 … HT02) -T0 #HT2U1
+    elim (nta_fwd_correct … H) -H #U2 #HU12
+    @(nta_conv … (ⓑ{I}V2.U1)) /2 width=2/ /3 width=1/ (**) (* explicit constructor, /4 width=6/ is too slow *)
+  | #T #HT1 #HTX #H destruct
+    lapply (IHVW1 … HL12 V1 ?) -IHVW1 // #HVW1
+    elim (lift_total X 0 1) #Y #HXY
+    lapply (tpr_lift … HTX … HT1 … HXY) -T #H
+    lapply (IHTU1 (L2.ⓓV1) … H) -T1 /2 width=1/ -L1 #H
+    elim (nta_fwd_correct … H) #T1 #HUT1
+    elim (nta_thin_conf … H L2 0 (0+1) ? ?) -H /2 width=1/ /3 width=1/ #T #U #HTU #H
+    normalize in ⊢ (??%??? → ?); #HU1
+    lapply (delift_inv_lift1_eq … H L2 … HXY) -Y /2 width=1/ #H destruct
+    @(nta_conv … U) // /2 width=2/
+  ]
+| #L1 #V1 #W1 #T1 #U1 #_ #_ #IHVW1 #IHTU1 #L2 #HL12 #X #H
+  elim (tpr_inv_appl1 … H) -H *
+  [ #V2 #Y #HV12 #HY #H destruct
+    elim (tpr_inv_abst1 … HY) -HY #W2 #T2 #HW12 #HT12 #H destruct
+    lapply (IHTU1 L2 ? (ⓛW1.T1) ?) // #H
+    elim (nta_fwd_correct … H) -H #X #H
+    elim (nta_inv_bind1 … H) -H #W #U #HW #HU #_
+    @(nta_conv … (ⓐV2.ⓛW1.U1)) /4 width=2/ (**) (* explicit constructor, /5 width=5/ is too slow *)
+  | #V2 #W2 #T0 #T2 #HV12 #HT02 #H1 #H2 destruct
+    lapply (IHVW1 … HL12 … HV12) #HVW2
+    lapply (IHVW1 … HL12 V1 ?) -IHVW1 // #HV1W2
+    lapply (IHTU1 … HL12 (ⓛW2.T2) ?) -IHTU1 -HL12 /2 width=1/ -HT02 #H1
+    elim (nta_fwd_correct … H1) #T #H2
+    elim (nta_inv_bind1 … H1) -H1 #W #U2 #HW2 #HTU2 #H
+    elim (cpcs_inv_abst … H Abst W2) -H #_ #HU21
+    elim (nta_inv_bind1 … H2) -H2 #W0 #U0 #_ #H #_ -T -W0
+    lapply (lsubn_nta_trans … HTU2 (L2.ⓓV2) ?) -HTU2 /2 width=1/ #HTU2
+    @(nta_conv … (ⓓV2.U2)) /2 width=2/ /3 width=2/ (**) (* explicit constructor, /4 width=5/ is too slow *)
+  | #V0 #V2 #W0 #W2 #T0 #T2 #_ #_ #_ #_ #H destruct
+  ]
+| #L1 #V1 #W1 #T1 #U1 #_ #_ #IHTU1 #IHUW1 #L2 #HL12 #X #H
+  elim (tpr_inv_appl1 … H) -H *
+  [ #V2 #T2 #HV12 #HT12 #H destruct
+    elim (nta_fwd_correct h L2 (ⓐV1.T1) (ⓐV1.U1) ?) [2: /3 width=2/ ] #U
+    @(nta_conv … (ⓐV2.U1)) /2 width=1/ /4 width=2/ (**) (* explicit constructor, /5 width=5/ is too slow *)
+  | #V2 #W2 #T0 #T2 #HV12 #HT02 #H1 #H2 destruct
+    lapply (IHTU1 … HL12 (ⓛW2.T2) ?) -IHTU1 /2 width=1/ -T0 #H
+    elim (nta_inv_bind1 … H) -H #W #U2 #HW2 #HTU2 #HU21
+    lapply (IHUW1 … HL12 (ⓐV2.U1) ?) -IHUW1 -HL12 /2 width=1/ #H
+    elim (nta_inv_pure1 … H) -H #V0 #U0 #U #HV20 #HU10 #HU0W1 #HU0
+    @(nta_conv … (ⓓV2.U2))
+    [2: @nta_bind //
+        @(lsubn_nta_trans … HTU2) @lsubn_abbr //
+(*
+    lapply (IH … HV1 … HL12 … HV12) -HV1 -HV12 /width=5/ #HB
+    lapply (IH … HB0  … HL12 W2 ?) -HB0 /width=5/ #HB0
+    lapply (IH … HA0 … (L2.ⓛW2) … HT02) -IH -HA0 -HT02 /width=5/ -T0 /2 width=1/ -L1 -V1 /4 width=7/
+*)
+*)
+(*
+axiom pippo: ⦃h, L⦄ ⊢ ⓐV.X : Y →
+             ∃∃W,T. L ⊢ X ➡* ⓛW.T & ⦃h, L⦄ ⊢ ⓐV : W.
+
+*)
+(* SEGMENT 2
+| #L1 #T1 #U1 #W1 #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_flat1 … H) -H #U2 #T2 #HU12 #HT12 #H destruct
+  lapply (cpr_tpss … HU12) /4 width=4/
+| #L1 #T1 #U11 #U12 #U #_ #HU112 #_ #IHTU11 #IHU12 #L2 #d #e #HL12 #T2 #HT12
+  @(nta_conv … U11) /2 width=5/ (**) (* explicot constructor, /3 width=7/ is too slow *)
+]
+qed.
+*)
+
+(* SEGMENT 3
+fact nta_ltpr_tpr_conf_aux: ∀h,L,T,L1,T1,U. ⦃h, L1⦄ ⊢ T1 : U → L = L1 → T = T1 →
+                            ∀L2. L1 ➡ L2 → ∀T2. T1 ➡ T2 → ⦃h, L2⦄ ⊢ T2 : U.
+  
+  
+  | #V0 #V2 #W0 #W2 #T0 #T2 #HV10 #HW02 #HT02 #HV02 #H1 #H2 destruct
+    elim (nta_inv_abbr … HT1) -HT1 #B0 #HW0 #HT0
+    lapply (IH … HW0  … HL12 … HW02) -HW0 /width=5/ #HW2
+    lapply (IH … HV1 … HL12 … HV10) -HV1 -HV10 /width=5/ #HV0
+    lapply (IH … HT0 … (L2.ⓓW2) … HT02) -IH -HT0 -HT02 /width=5/ -V1 -T0 /2 width=1/ -L1 -W0 #HT2
+    @(nta_abbr … HW2) -HW2
+    @(nta_appl … HT2) -HT2 /3 width=7/ (**) (* explict constructors, /5 width=7/ is too slow *)
+  ]
+| #L1 #V1 #T1 #A #HV1 #HT1 #H1 #H2 #L2 #HL12 #X #H destruct
+  elim (tpr_inv_cast1 … H) -H
+  [ * #V2 #T2 #HV12 #HT12 #H destruct
+    lapply (IH … HV1 … HL12 … HV12) -HV1 -HV12 /width=5/ #HV2
+    lapply (IH … HT1 … HL12 … HT12) -IH -HT1 -HL12 -HT12 /width=5/ -L1 -V1 -T1 /2 width=1/
+  | -HV1 #HT1X
+     lapply (IH … HT1 … HL12 … HT1X) -IH -HT1 -HL12 -HT1X /width=5/
+  ]
+]
+qed.
+
+/2 width=9/ qed.
+
+axiom nta_ltpr_conf: ∀L1,T,A. L1 ⊢ T : A → ∀L2. L1 ➡ L2 → L2 ⊢ T : A.
+/2 width=5/ qed.
+
+axiom nta_tpr_conf: ∀L,T1,A. L ⊢ T1 : A → ∀T2. T1 ➡ T2 → L ⊢ T2 : A.
+/2 width=5/ qed.
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_ltpss.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_ltpss.etc
new file mode 100644 (file)
index 0000000..828fd82
--- /dev/null
@@ -0,0 +1,121 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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_ltpss.ma".
+include "basic_2/dynamic/nta_nta.ma".
+
+(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
+
+(* Properties about parallel unfold *****************************************)
+
+lemma nta_ltpss_tpss_conf: ∀h,L1,T1,U. ⦃h, L1⦄ ⊢ T1 : U →
+                           ∀L2,d,e. L1 ▶* [d, e] L2 →
+                           ∀T2. L2 ⊢ T1 ▶* [d, e] T2 → ⦃h, L2⦄ ⊢ T2 : U.
+#h #L1 #T1 #U #H @(nta_ind_alt … H) -L1 -T1 -U
+[ #L1 #k #L2 #d #e #_ #T2 #H
+  >(tpss_inv_sort1 … H) -H //
+| #L1 #K1 #V1 #W #U #i #HLK1 #_ #HWU #IHV1 #L2 #d #e #HL12 #T2 #H
+  elim (tpss_inv_lref1 … H) -H
+  [ #H destruct
+    elim (lt_or_ge i d) #Hdi
+    [ elim (ltpss_ldrop_conf_le … HL12 … HLK1 ?) -L1 /2 width=2/ #X #H #HLK2
+      elim (ltpss_inv_tpss11 … H ?) -H /2 width=1/ -Hdi #K2 #V2 #HK12 #HV12 #H destruct
+      /3 width=7/
+    | elim (lt_or_ge i (d + e)) #Hide [ | -Hdi ]
+      [ elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HLK2
+        elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K2 #V2 #HK12 #HV12 #H destruct
+        /3 width=7/
+      | lapply (ltpss_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /3 width=7/
+      ]
+    ]
+  | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #HVW2 #HWT2
+    elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HL2K0
+    elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K0 #V0 #HK12 #HV12 #H destruct
+    lapply (ldrop_mono … HL2K0 … HLK2) -HL2K0 #H destruct
+    lapply (ldrop_fwd_ldrop2 … HLK2) -HLK2 #HLK2
+    lapply (tpss_trans_eq … HV12 HVW2) -V2 /3 width=9/
+  ]
+| #L1 #K1 #W1 #V1 #U1 #i #HLK1 #HWV1 #HWU1 #IHWV1 #L2 #d #e #HL12 #T2 #H
+  elim (tpss_inv_lref1 … H) -H [ | -HWV1 -HWU1 -IHWV1 ]
+  [ #H destruct
+    elim (lift_total V1 0 (i+1)) #W #HW
+    elim (lt_or_ge i d) #Hdi [ -HWV1 ]
+    [ elim (ltpss_ldrop_conf_le … HL12 … HLK1 ?) -L1 /2 width=2/ #X #H #HLK2
+      elim (ltpss_inv_tpss11 … H ?) -H /2 width=1/ -Hdi #K2 #W2 #HK12 #HW12 #H destruct
+      lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
+      lapply (nta_lift h … HLK … HWU1 … HW) /2 width=4/ -HW
+      elim (lift_total W2 0 (i+1)) #U2 #HWU2
+      lapply (tpss_lift_ge … HW12 … HLK … HWU1 … HWU2) -HLK -HWU1 // #HU12
+      lapply (cpr_tpss … HU12) -HU12 #HU12
+      @(nta_conv … U2) /2 width=1/ /3 width=6/ (**) (* explicit constructor, /4 width=6/ is too slow *)
+    | elim (lt_or_ge i (d + e)) #Hide [ -HWV1 | -IHWV1 -HW -Hdi ]
+      [ elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HLK2
+        elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K2 #W2 #HK12 #HW12 #H destruct
+        lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
+        lapply (nta_lift h … HLK … HWU1 … HW) /2 width=4/ -HW
+        elim (lift_total W2 0 (i+1)) #U2 #HWU2
+        lapply (tpss_lift_ge … HW12 … HLK … HWU1 … HWU2) -HLK -HWU1 // #HU12
+        lapply (cpr_tpss … HU12) -HU12 #HU12
+        @(nta_conv … U2) /2 width=1/ /3 width=6/ (**) (* explicit constructor, /4 width=6/ is too slow *)
+      | lapply (ltpss_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /2 width=6/
+      ]
+    ]
+  | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #_ #_
+    elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HL2K0
+    elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K0 #V0 #_ #_ #H destruct
+    lapply (ldrop_mono … HL2K0 … HLK2) -HL2K0 -HLK2 #H destruct
+  ]
+| #I #L1 #V1 #W1 #T1 #U1 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+  lapply (cpr_tpss … HV12) #HV
+  lapply (IHTU1 (L2.ⓑ{I}V1) (d+1) e ? T1 ?) // /2 width=1/ #H
+  elim (nta_fwd_correct … H) -H #U2 #HU12
+  @(nta_conv … (ⓑ{I}V2.U1)) /3 width=2/ /3 width=4/ /4 width=4/ (**) (* explicit constructor, /5 width=6/ is too slow *)
+| #L1 #V1 #W1 #T1 #U1 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_flat1 … H) -H #V2 #Y #HV12 #HY #H destruct
+  elim (tpss_inv_bind1 … HY) -HY #W2 #T2 #HW12 #HT12 #H destruct
+  lapply (cpr_tpss … HV12) #HV
+  lapply (IHTU1 L2 d e ? (ⓛW1.T1) ?) // #H
+  elim (nta_fwd_correct … H) -H #X #H
+  elim (nta_inv_bind1 … H) -H #W #U #HW #HU #_
+  @(nta_conv … (ⓐV2.ⓛW1.U1)) /3 width=2/ /3 width=4/ /4 width=5/ (**) (* explicit constructor, /5 width=5/ is too slow *)
+| #L1 #V1 #W1 #T1 #U1 #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+  lapply (cpr_tpss … HV12) #HV
+  elim (nta_fwd_correct h L2 (ⓐV1.T1) (ⓐV1.U1) ?) [2: /3 width=4/ ] #U #HU
+  @(nta_conv … (ⓐV2.U1)) // /3 width=1/ /4 width=5/ (**) (* explicit constructor, /5 width=5/ is too slow *)
+| #L1 #T1 #U1 #W1 #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_flat1 … H) -H #U2 #T2 #HU12 #HT12 #H destruct
+  lapply (cpr_tpss … HU12) /4 width=4/
+| #L1 #T1 #U11 #U12 #U #_ #HU112 #_ #IHTU11 #IHU12 #L2 #d #e #HL12 #T2 #HT12
+  @(nta_conv … U11) /2 width=5/ (**) (* explicot constructor, /3 width=7/ is too slow *)
+]
+qed.
+
+lemma nta_ltpss_tps_conf: ∀h,L1,T1,U. ⦃h, L1⦄ ⊢ T1 : U →
+                          ∀L2,d,e. L1 ▶* [d, e] L2 →
+                          ∀T2. L2 ⊢ T1 ▶ [d, e] T2 → ⦃h, L2⦄ ⊢ T2 : U.
+/3 width=7/ qed.
+
+lemma nta_ltpss_conf: ∀h,L1,T,U. ⦃h, L1⦄ ⊢ T : U →
+                      ∀L2,d,e. L1 ▶* [d, e] L2 → ⦃h, L2⦄ ⊢ T : U.
+/2 width=7/ qed.
+
+lemma nta_tpss_conf: ∀h,L,T1,U. ⦃h, L⦄ ⊢ T1 : U →
+                     ∀T2,d,e. L ⊢ T1 ▶* [d, e] T2 → ⦃h, L⦄ ⊢ T2 : U.
+/2 width=7/ qed.
+
+lemma nta_tps_conf: ∀h,L,T1,U. ⦃h, L⦄ ⊢ T1 : U →
+                    ∀T2,d,e. L ⊢ T1 ▶ [d, e] T2 → ⦃h, L⦄ ⊢ T2 : U.
+/2 width=7/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_nta.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_nta.etc
new file mode 100644 (file)
index 0000000..05eb6c5
--- /dev/null
@@ -0,0 +1,59 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/dynamic/nta_lift.ma".
+
+(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
+
+(* Main properties **********************************************************)
+
+(* Basic_1: was: ty3_unique *)
+theorem nta_mono: ∀h,L,T,U1. ⦃h, L⦄ ⊢ T : U1 → ∀U2. ⦃h, L⦄ ⊢ T : U2 →
+                  L ⊢ U1 ⬌* U2.
+#h #L #T #U1 #H elim H -L -T -U1
+[ #L #k #X #H
+  lapply (nta_inv_sort1 … H) -H //
+| #L #K #V #W11 #W12 #i #HLK #_ #HW112 #IHVW11 #X #H
+  elim (nta_inv_lref1 … H) -H * #K0 #V0 #W21 #W22 #HLK0 #HVW21 #HW212 #HX
+  lapply (ldrop_mono … HLK0 … HLK) -HLK0 #H destruct
+  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
+  @(cpcs_trans … HX) -X /3 width=9 by cpcs_lift/ (**) (* to slow without trace *)
+| #L #K #W #V1 #V #i #HLK #_ #HWV #_ #X #H
+  elim (nta_inv_lref1 … H) -H * #K0 #W0 #V2 #V0 #HLK0 #_ #HWV0 #HX
+  lapply (ldrop_mono … HLK0 … HLK) -HLK0 -HLK #H destruct
+  lapply (lift_mono … HWV0 … HWV) -HWV0 -HWV #H destruct //
+| #I #L #V #W1 #T #U1 #_ #_ #_ #IHTU1 #X #H
+  elim (nta_inv_bind1 … H) -H #W2 #U2 #_ #HTU2 #H
+  @(cpcs_trans … H) -X /3 width=1/
+| #L #V #W1 #T #U1 #_ #_ #_ #IHTU1 #X #H
+  elim (nta_fwd_pure1 … H) -H #U2 #W2 #_ #HTU2 #H
+  @(cpcs_trans … H) -X /3 width=1/
+| #L #V #W1 #T #U1 #_ #_ #IHTU1 #_ #X #H
+  elim (nta_fwd_pure1 … H) -H #U2 #W2 #_ #HTU2 #H
+  @(cpcs_trans … H) -X /3 width=1/
+| #L #T #U1 #_ #_ #X #H
+  elim (nta_inv_cast1 … H) -H //
+| #L #T #U11 #U12 #V12 #_ #HU112 #_ #IHTU11 #_ #U2 #HTU2
+  @(cpcs_canc_sn … HU112) -U12 /2 width=1/
+]
+qed-.
+
+(* Advanced properties ******************************************************)
+
+lemma nta_cast_alt: ∀h,L,T,W,U. ⦃h, L⦄ ⊢ T : W → ⦃h, L⦄ ⊢ T : U →
+             ⦃h, L⦄ ⊢ ⓝW.T : U.
+#h #L #T #W #U #HTW #HTU
+lapply (nta_mono … HTW … HTU) #HWU
+elim (nta_fwd_correct … HTU) -HTU /3 width=3/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_sta.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_sta.etc
new file mode 100644 (file)
index 0000000..6268b98
--- /dev/null
@@ -0,0 +1,42 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/sta.ma".
+include "basic_2/equivalence/cpcs_cpcs.ma".
+include "basic_2/dynamic/nta.ma".
+
+(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
+
+(* Properties on static type assignment *************************************)
+
+lemma nta_fwd_sta: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U →
+                   ∃∃U0. ⦃h, L⦄ ⊢ T • U0 & L ⊢ U0 ⬌* U.
+#h #L #T #U #H elim H -L -T -U
+[ /2 width=3/
+| #L #K #V #W1 #V1 #i #HLK #_ #HWV1 * #W0 #HVW0 #HW01
+  elim (lift_total W0 0 (i+1)) #V0 #HWV0
+  lapply (ldrop_fwd_ldrop2 … HLK) #HLK0
+  lapply (cpcs_lift … HLK0 … HWV0 … HWV1 HW01) -HLK0 -HWV1 -HW01 /3 width=6/
+| #L #K #W #V1 #W1 #i #HLK #HWV1 #HW1 * /3 width=6/
+| #I #L #V #W #T #U #_ #_ * #W0 #_ #_ * /3 width=3/
+| #L #V #W #T #U #_ #_ * #W0 #_ #HW0 * #X #H #HX
+  elim (sta_inv_bind1 … H) -H #U0 #HTU0 #H destruct
+  @(ex2_1_intro … (ⓐV.ⓛW.U0)) /2 width=1/ /3 width=1/
+| #L #V #W #T #U #_ #_ * #U0 #HTU0 #HU0 #_ -W
+  @(ex2_1_intro … (ⓐV.U0)) /2 width=1/
+| #L #T #U #HTU * #U0 #HTU0 #HU0 /3 width=3/
+| #L #T #U1 #U2 #V2 #_ #HU12 #_ * #U0 #HTU0 #HU01 #_
+  lapply (cpcs_trans … HU01 … HU12) -U1 /2 width=3/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_thin.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_thin.etc
new file mode 100644 (file)
index 0000000..f927f84
--- /dev/null
@@ -0,0 +1,116 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/thin_ldrop.ma".
+include "basic_2/equivalence/cpcs_delift.ma".
+include "basic_2/dynamic/nta_lift.ma".
+
+(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
+
+(* Properties on basic local environment thinning ***************************)
+
+(* Note: this is known as the substitution lemma *)
+(* Basic_1: was only: ty3_gen_cabbr *)
+lemma nta_thin_conf: ∀h,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 : U1 →
+                     ∀L2,d,e. ≽ [d, e] L1 → L1 ▼*[d, e] ≡ L2 →
+                     ∃∃T2,U2. ⦃h, L2⦄ ⊢ T2 : U2 &
+                              L1 ⊢ T1 ▼*[d, e] ≡ T2 & L1 ⊢ U1 ▼*[d, e] ≡ U2.
+#h #L1 #T1 #U1 #H elim H -L1 -T1 -U1
+[ /2 width=5/
+| #L1 #K1 #V1 #W1 #U1 #i #HLK1 #HVW1 #HWU1 #IHVW1 #L2 #d #e #HL1 #HL12
+  elim (lt_or_ge i d) #Hdi [ -HVW1 ]
+  [ lapply (sfr_ldrop_trans_ge … HLK1 … HL1 ?) -HL1 /2 width=2/ #H
+    lapply (sfr_inv_skip … H ?) -H /2 width=1/ #HK1
+    elim (thin_ldrop_conf_le … HL12 … HLK1 ?) -HL12 /2 width=2/ #X #H #HLK2
+    elim (thin_inv_delift1 … H ?) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
+    elim (IHVW1 … HK1 HK12) -IHVW1 -HK1 -HK12 #X2 #W2 #HVW2 #H #HW12
+    lapply (delift_mono … H … HV12) -H -HV12 #H destruct
+    elim (lift_total W2 0 (i+1)) #U2 #HWU2
+    lapply (ldrop_fwd_ldrop2 … HLK1) -V1 #HLK1
+    lapply (delift_lift_ge … HW12 … HLK1 HWU1 … HWU2) -HW12 -HLK1 -HWU1 //
+    >minus_plus <plus_minus_m_m // /3 width=6/
+  | elim (lt_or_ge i (d+e)) #Hide [ -HVW1 | -Hdi -IHVW1 -HL1 ]
+    [ lapply (sfr_ldrop_trans_be_up … HLK1 … HL1 ? ?) -HL1 // /2 width=2/ <minus_n_O #H
+      elim (sfr_inv_bind … H ?) -H /2 width=1/ #HK1 #_
+      elim (thin_ldrop_conf_be … HL12 … HLK1 ? ?) -HL12 /2 width=2/ #K2 #H #HLK2
+      lapply (thin_inv_thin1 … H ?) -H /2 width=1/ #HK12
+      elim (IHVW1 … HK1 HK12) -IHVW1 -HK1 -HK12 #V2 #W2 #HVW2 #HV12 #HW12
+      elim (lift_total V2 0 d) #T2 #HVT2
+      elim (lift_total W2 0 d) #U2 #HWU2
+      elim (lift_total W2 0 (i+1)) #U #HW2U
+      lapply (nta_lift … HVW2 … HLK2 … HVT2 … HWU2) -HVW2 -HLK2 #HTU2
+      lapply (ldrop_fwd_ldrop2 … HLK1) #HLK0
+      lapply (delift_lift_ge … HW12 … HLK0 HWU1 … HW2U) -HW12 -HLK0 -HWU1 // >minus_plus #HU1
+      lapply (lift_conf_be … HWU2 … HW2U ?) -W2 /2 width=1/ #HU2
+      lapply (delift_lift_div_be … HU1 … HU2 ? ?) -U // /2 width=1/ /3 width=8/
+    | lapply (transitive_le … (i+1) Hide ?) /2 width=1/ #Hdei
+      lapply (thin_ldrop_conf_ge … HL12 … HLK1 ?) -HL12 -HLK1 // #HL2K1
+      elim (lift_split … HWU1 d (i+1-e) ? ? ?) -HWU1 // /2 width=1/ #W
+      <plus_minus in ⊢ (??%??→?); /2 width=2/ #HW1
+      <minus_minus // /2 width=2/ -Hdei >commutative_plus <minus_n_n /3 width=6/
+    ]
+  ]
+| #L1 #K1 #W1 #V1 #U1 #i #HLK1 #HWV1 #HWU1 #IHWV1 #L2 #d #e #HL1 #HL12
+  elim (lt_or_ge i d) #Hdi [ -HWV1 | -IHWV1 ]
+  [ lapply (sfr_ldrop_trans_ge … HLK1 … HL1 ?) -HL1 /2 width=2/ #H
+    lapply (sfr_inv_skip … H ?) -H /2 width=1/ #HK1
+    elim (thin_ldrop_conf_le … HL12 … HLK1 ?) -HL12 /2 width=2/ #X #H #HLK2
+    elim (thin_inv_delift1 … H ?) -H /2 width=1/ #K2 #W2 #HK12 #HW12 #H destruct
+    elim (IHWV1 … HK1 HK12) -IHWV1 -HK1 -HK12 #X2 #V2 #HWV2 #H #_
+    lapply (delift_mono … H … HW12) -H #H destruct
+    elim (lift_total W2 0 (i+1)) #U2 #HWU2
+    lapply (ldrop_fwd_ldrop2 … HLK1) -HLK1 #HLK1
+    lapply (delift_lift_ge … HW12 … HLK1 HWU1 … HWU2) -HW12 -HLK1 -HWU1 //
+    >minus_plus <plus_minus_m_m // /3 width=6/
+  | elim (lt_or_ge i (d+e)) #Hide [ -HWV1 -HWU1 -HL12 | -Hdi -HL1 ]
+    [ lapply (sfr_inv_ldrop … HLK1 … HL1 ? ?) -HLK1 -HL1 // -Hdi -Hide #H destruct 
+    | lapply (transitive_le … (i+1) Hide ?) /2 width=1/ #Hdei
+      lapply (thin_ldrop_conf_ge … HL12 … HLK1 ?) -HL12 -HLK1 // #HL2K1
+      elim (lift_split … HWU1 d (i+1-e) ? ? ?) -HWU1 // /2 width=1/ #W
+      <plus_minus in ⊢ (??%??→?); /2 width=2/ #HW1
+      <minus_minus // /2 width=2/ -Hdei >commutative_plus <minus_n_n /3 width=6/
+    ]
+  ]
+| #I #L1 #V1 #W1 #T1 #U1 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL1 #HL12
+  elim (IHVW1 … HL1 HL12) -IHVW1 #V2 #W2 #HVW2 #HV12 #_
+  elim (IHTU1 (L2.ⓑ{I}V2) (d+1) e ? ?) -IHTU1 /2 width=1/ -HL1 -HL12 #T2 #U2 #HTU2 #HT12 #HU12
+  lapply (delift_lsubs_trans … HT12 (L1.ⓑ{I}V2) ?) -HT12 /2 width=1/
+  lapply (delift_lsubs_trans … HU12 (L1.ⓑ{I}V2) ?) -HU12 /2 width=1/ /3 width=7/
+| #L1 #V1 #W1 #T1 #U1 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL1 #HL12
+  elim (IHVW1 … HL1 HL12) -IHVW1 #V2 #W2 #HVW2 #HV12 #HW12
+  elim (IHTU1 … HL1 HL12) -IHTU1 -HL1 -HL12 #X2 #Y2 #HXY2 #HX2 #HY2
+  elim (delift_inv_bind1 … HX2) -HX2 #Z21 #T2 #HZ21 #HT12 #H destruct
+  elim (delift_inv_bind1 … HY2) -HY2 #Z22 #U2 #HZ22 #HU12 #H destruct
+  lapply (delift_mono … HZ21 … HW12) -HZ21 #H destruct
+  lapply (delift_mono … HZ22 … HW12) -HZ22 #H destruct
+  @(ex3_2_intro … (ⓐV2.ⓛW2.T2) (ⓐV2.ⓛW2.U2)) /3 width=1/ (**) (* explict constructor, /4 depth=?/ is too slow *)
+| #L1 #V1 #W1 #T1 #U1 #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL1 #HL12
+  elim (IHTU1 … HL1 HL12) -IHTU1 #T2 #U2 #HTU2 #HT12 #HU12
+  elim (IHUW1 … HL1 HL12) -IHUW1 -HL1 -HL12 #X2 #W2 #HXW2 #H #HW12
+  elim (delift_inv_flat1 … H) -H #V2 #Y2 #HV12 #HY2 #H destruct
+  lapply (delift_mono … HY2 … HU12) -HY2 #H destruct /3 width=7/
+| #L1 #T1 #U1 #_ #IHTU1 #L2 #d #e #HL1 #HL12
+  elim (IHTU1 … HL1 HL12) -IHTU1 -HL1 -HL12 /3 width=5/
+| #L1 #T1 #U11 #U12 #V1 #_ #HU112 #_ #IHT1 #IHU12 #L2 #d #e #HL1 #HL12
+  elim (IHT1 … HL1 HL12) -IHT1 #T2 #U21 #HT2 #HT12 #HU121
+  elim (IHU12 … HL1 HL12) -IHU12 -HL1 #U22 #V2 #HU22 #HU122 #_
+  lapply (thin_cpcs_delift_mono … HU112 … HL12 … HU121 … HU122) -HU112 -HL12 -HU121 /3 width=5/
+]
+qed.
+
+lemma nta_ldrop_conf: ∀h,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 : U1 →
+                      ∀L2,d,e. ≽ [d, e] L1 → ⇩[d, e] L1 ≡ L2 →
+                      ∃∃T2,U2. ⦃h, L2⦄ ⊢ T2 : U2 &
+                               L1 ⊢ T1 ▼*[d, e] ≡ T2 & L1 ⊢ U1 ▼*[d, e] ≡ U2.
+/3 width=1/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/snta/lsubsn.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/snta/lsubsn.etc
new file mode 100644 (file)
index 0000000..f6b5450
--- /dev/null
@@ -0,0 +1,110 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+notation "hvbox( h ⊢ break term 46 L1 : ⊑ [ ] break term 46 L2 )"
+   non associative with precedence 45
+   for @{ 'StratifiedCrSubEqN $h $L1 $L2 }.
+
+include "basic_2/dynamic/snta.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE TYPE ASSIGNMENT *******)
+
+(* Note: may not be transitive *)
+inductive lsubsn (h:sh): relation lenv ≝
+| lsubsn_atom: lsubsn h (⋆) (⋆)
+| lsubsn_pair: ∀I,L1,L2,W. lsubsn h L1 L2 →
+               lsubsn h (L1. ⓑ{I} W) (L2. ⓑ{I} W)
+| lsubsn_abbr: ∀L1,L2,V,W,l. ⦃h, L1⦄ ⊢ V :[l+1] W → ⦃h, L2⦄ ⊢ V :[l+1] W →
+               lsubsn h L1 L2 → lsubsn h (L1. ⓓV) (L2. ⓛW)
+.
+
+interpretation
+  "local environment refinement (stratified native type assigment)"
+  'StratifiedCrSubEqN h L1 L2 = (lsubsn h L1 L2).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact lsubsn_inv_atom1_aux: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 → L1 = ⋆ → L2 = ⋆.
+#h #L1 #L2 * -L1 -L2
+[ //
+| #I #L1 #L2 #V #_ #H destruct
+| #L1 #L2 #V #W #l #_ #_ #_ #H destruct
+]
+qed.
+
+lemma lsubsn_inv_atom1: ∀h,L2. h ⊢ ⋆ :⊑[] L2 → L2 = ⋆.
+/2 width=5/ qed-.
+
+fact lsubsn_inv_pair1_aux: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 →
+                           ∀I,K1,V. L1 = K1. ⓑ{I} V →
+                           (∃∃K2. h ⊢ K1 :⊑[] K2 & L2 = K2. ⓑ{I} V) ∨
+                           ∃∃K2,W,l. ⦃h, K1⦄ ⊢ V :[l+1] W & ⦃h, K2⦄ ⊢ V :[l+1] W &
+                                     h ⊢ K1 :⊑[] K2 & L2 = K2. ⓛW & I = Abbr.
+#h #L1 #L2 * -L1 -L2
+[ #I #K1 #V #H destruct
+| #J #L1 #L2 #V #HL12 #I #K1 #W #H destruct /3 width=3/
+| #L1 #L2 #V #W #l #H1VW #H2VW #HL12 #I #K1 #V1 #H destruct /3 width=7/
+]
+qed.
+
+lemma lsubsn_inv_pair1: ∀h,I,K1,L2,V. h ⊢ K1. ⓑ{I} V :⊑[] L2 →
+                        (∃∃K2. h ⊢ K1 :⊑[] K2 & L2 = K2. ⓑ{I} V) ∨
+                        ∃∃K2,W,l. ⦃h, K1⦄ ⊢ V :[l+1] W & ⦃h, K2⦄ ⊢ V :[l+1] W &
+                                  h ⊢ K1 :⊑[] K2 & L2 = K2. ⓛW & I = Abbr.
+/2 width=3/ qed-.
+
+fact lsubsn_inv_atom2_aux: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 → L2 = ⋆ → L1 = ⋆.
+#h #L1 #L2 * -L1 -L2
+[ //
+| #I #L1 #L2 #V #_ #H destruct
+| #L1 #L2 #V #W #l #_ #_ #_ #H destruct
+]
+qed.
+
+lemma lsubsn_inv_atom2: ∀h,L1. h ⊢ L1 :⊑[] ⋆ → L1 = ⋆.
+/2 width=5/ qed-.
+
+fact lsubsn_inv_pair2_aux: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 →
+                           ∀I,K2,W. L2 = K2. ⓑ{I} W →
+                           (∃∃K1. h ⊢ K1 :⊑[] K2 & L1 = K1. ⓑ{I} W) ∨
+                           ∃∃K1,V,l. ⦃h, K1⦄ ⊢ V :[l+1] W & ⦃h, K2⦄ ⊢ V :[l+1] W &
+                                     h ⊢ K1 :⊑[] K2 & L1 = K1. ⓓV & I = Abst.
+#h #L1 #L2 * -L1 -L2
+[ #I #K2 #W #H destruct
+| #J #L1 #L2 #V #HL12 #I #K2 #W #H destruct /3 width=3/
+| #L1 #L2 #V #W #l #H1VW #H2VW #HL12 #I #K2 #W2 #H destruct /3 width=7/
+]
+qed.
+
+lemma lsubsn_inv_pair2: ∀h,I,L1,K2,W. h ⊢ L1 :⊑[] K2. ⓑ{I} W →
+                        (∃∃K1. h ⊢ K1 :⊑[] K2 & L1 = K1. ⓑ{I} W) ∨
+                        ∃∃K1,V,l. ⦃h, K1⦄ ⊢ V :[l+1] W & ⦃h, K2⦄ ⊢ V :[l+1] W &
+                                  h ⊢ K1 :⊑[] K2 & L1 = K1. ⓓV & I = Abst.
+/2 width=3/ qed-.
+
+(* Basic_forward lemmas *****************************************************)
+
+lemma lsubsn_fwd_lsubs1: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 → L1 ≼[0, |L1|] L2.
+#h #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
+qed-.
+
+lemma lsubsn_fwd_lsubs2: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 → L1 ≼[0, |L2|] L2.
+#h #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma lsubsn_refl: ∀h,L. h ⊢ L :⊑[] L.
+#h #L elim L -L // /2 width=1/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/snta/lsubsn_cpcs.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/snta/lsubsn_cpcs.etc
new file mode 100644 (file)
index 0000000..38f7e17
--- /dev/null
@@ -0,0 +1,32 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/equivalence/cpcs_cpcs.ma".
+include "basic_2/dynamic/lsubsn.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE TYPE ASSIGNMENT *******)
+
+(* Properties on context-sensitive parallel equivalence for terms ***********)
+
+lemma cpr_lsubsn_trans: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 →
+                        ∀T1,T2. L2 ⊢ T1 ➡ T2 → L1 ⊢ T1 ➡ T2.
+/3 width=5 by lsubsn_fwd_lsubs2, cpr_lsubs_trans/ qed-.
+
+lemma cprs_lsubsn_trans: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 →
+                         ∀T1,T2. L2 ⊢ T1 ➡* T2 → L1 ⊢ T1 ➡* T2.
+/3 width=5 by lsubsn_fwd_lsubs2, cprs_lsubs_trans/ qed-.
+
+lemma cpcs_lsubsn_trans: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 →
+                         ∀T1,T2. L2 ⊢ T1 ⬌* T2 → L1 ⊢ T1 ⬌* T2.
+/3 width=5 by lsubsn_fwd_lsubs2, cpcs_lsubs_trans/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/snta/lsubsn_ldrop.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/snta/lsubsn_ldrop.etc
new file mode 100644 (file)
index 0000000..0928837
--- /dev/null
@@ -0,0 +1,65 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/dynamic/lsubsn.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE TYPE ASSIGNMENT *******)
+
+(* Properties concerning basic local environment slicing ********************)
+
+(* Note: the constant 0 cannot be generalized *)
+lemma lsubsn_ldrop_O1_conf: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 →
+                            ∀K1,e. ⇩[0, e] L1 ≡ K1 →
+                            ∃∃K2. h ⊢ K1 :⊑[] K2 & ⇩[0, e] L2 ≡ K2.
+#h #L1 #L2 #H elim H -L1 -L2
+[ /2 width=3/
+| #I #L1 #L2 #V #_ #IHL12 #K1 #e #H
+  elim (ldrop_inv_O1 … H) -H * #He #HLK1
+  [ destruct
+    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+  | elim (IHL12 … HLK1) -L1 /3 width=3/
+  ]
+| #L1 #L2 #V #W #l #H1VW #H2VW #_ #IHL12 #K1 #e #H
+  elim (ldrop_inv_O1 … H) -H * #He #HLK1
+  [ destruct
+    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+  | elim (IHL12 … HLK1) -L1 /3 width=3/
+  ]
+]
+qed.
+
+(* Note: the constant 0 cannot be generalized *)
+lemma lsubsn_ldrop_O1_trans: ∀h,L1,L2. h ⊢ L1 :⊑[] L2 →
+                             ∀K2,e. ⇩[0, e] L2 ≡ K2 →
+                             ∃∃K1. h ⊢ K1 :⊑[] K2 & ⇩[0, e] L1 ≡ K1.
+#h #L1 #L2 #H elim H -L1 -L2
+[ /2 width=3/
+| #I #L1 #L2 #V #_ #IHL12 #K2 #e #H
+  elim (ldrop_inv_O1 … H) -H * #He #HLK2
+  [ destruct
+    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+  | elim (IHL12 … HLK2) -L2 /3 width=3/
+  ]
+| #L1 #L2 #V #W #l #H1VW #H2VW #_ #IHL12 #K2 #e #H
+  elim (ldrop_inv_O1 … H) -H * #He #HLK2
+  [ destruct
+    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+  | elim (IHL12 … HLK2) -L2 /3 width=3/
+  ]
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/snta/lsubsn_snta.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/snta/lsubsn_snta.etc
new file mode 100644 (file)
index 0000000..c621530
--- /dev/null
@@ -0,0 +1,49 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/dynamic/snta_snta.ma".
+include "basic_2/dynamic/lsubsn_ldrop.ma".
+include "basic_2/dynamic/lsubsn_cpcs.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE TYPE ASSIGNMENT *******)
+
+(* Properties concerning stratified native type assignment ******************)
+
+(* Note: the corresponding confluence property does not hold *)
+lemma lsubsn_snta_trans: ∀h,L2,T,U,l. ⦃h, L2⦄ ⊢ T :[l] U →
+                         ∀L1. h ⊢ L1 :⊑[] L2 → ⦃h, L1⦄ ⊢ T :[l] U.
+#h #L2 #T #U #l #H elim H -L2 -T -U -l
+[ //
+| #L2 #K2 #V2 #W2 #U2 #i #l #HLK2 #_ #WU2 #IHVW2 #L1 #HL12
+  elim (lsubsn_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
+  elim (lsubsn_inv_pair2 … H) -H * #K1
+  [ #HK12 #H destruct /3 width=6/
+  | #V1 #l0 #_ #_ #_ #_ #H destruct
+  ]
+| #L2 #K2 #W2 #V2 #U2 #i #l #HLK2 #HWV2 #HWU2 #IHWV2 #L1 #HL12
+  elim (lsubsn_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
+  elim (lsubsn_inv_pair2 … H) -H * #K1 [ -HWV2 | -IHWV2 ]
+  [ #HK12 #H destruct /3 width=6/
+  | #V1 #l0 #H1 #H2 #_ #H #_ destruct
+    elim (snta_fwd_correct … H2) -H2 #V #H
+    elim (snta_mono … HWV2 … H) -HWV2 -H /2 width=6/
+  ]
+| /4 width=3/
+| /3 width=2/
+| /3 width=2/
+| /3 width=1/
+| #L2 #T #U1 #U2 #V2 #l #_ #HU12 #_ #IHTU1 #IHUV2 #L1 #HL12
+  lapply (cpcs_lsubsn_trans … HL12 … HU12) -HU12 /3 width=3/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/snta/snta.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/snta/snta.etc
new file mode 100644 (file)
index 0000000..71ed421
--- /dev/null
@@ -0,0 +1,48 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+notation "hvbox( ⦃ h , break L ⦄ ⊢ break term 46 T1 : * break [ l ] break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'NativeTypeStar $h $l $L $T1 $T2 }.
+
+notation "hvbox( ⦃ h , break L ⦄ ⊢ break term 46 T1 : break [ l ] break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'StratifiedNativeType $h $l $L $T1 $T2 }.
+
+include "basic_2/static/sh.ma".
+include "basic_2/equivalence/cpcs.ma".
+
+(* STRATIFIED NATIVE TYPE ASSIGNMENT ON TERMS *******************************)
+
+inductive snta (h:sh): nat → lenv → relation term ≝
+| snta_sort: ∀L,k. snta h 0 L (⋆k) (⋆(next h k))
+| snta_ldef: ∀L,K,V,W,U,i,l. ⇩[0, i] L ≡ K. ⓓV → snta h l K V W →
+             ⇧[0, i + 1] W ≡ U → snta h l L (#i) U
+| snta_ldec: ∀L,K,W,V,U,i,l. ⇩[0, i] L ≡ K. ⓛW → snta h l K W V →
+             ⇧[0, i + 1] W ≡ U → snta h (l+1) L (#i) U
+| snta_bind: ∀I,L,V,W,T,U,l1,l2. snta h l1 L V W → snta h l2 (L. ⓑ{I} V) T U →
+             snta h l2 L (ⓑ{I}V.T) (ⓑ{I}V.U)
+| snta_appl: ∀L,V,W1,W2,T,U,l1,l2. snta h (l1+1) L V W2 →
+             snta h l2 L (ⓛW1.T) (ⓛW2.U) →
+             snta h l2 L (ⓐV.ⓛW1.T) (ⓐV.ⓛW2.U)
+| snta_pure: ∀L,V,T,U,W,l. snta h (l+1) L T U → snta h l L (ⓐV.U) W →
+             snta h (l+1) L (ⓐV.T) (ⓐV.U)
+| snta_cast: ∀L,T,U,W,l1,l2. snta h l2 L T U → snta h l1 L U W →
+             snta h l2 L (ⓝU.T) U
+| snta_conv: ∀L,T,U1,U2,V2,l. snta h l L T U1 → L ⊢ U1 ⬌* U2 →
+             snta h (l-1) L U2 V2 → snta h l L T U2
+.
+
+interpretation "stratified native type assignment (term)"
+   'StratifiedNativeType h l L T U = (snta h l L T U).
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/snta/snta_lift.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/snta/snta_lift.etc
new file mode 100644 (file)
index 0000000..424bfe8
--- /dev/null
@@ -0,0 +1,238 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/equivalence/cpcs_cpcs.ma".
+include "basic_2/dynamic/snta.ma".
+
+(* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
+
+(* Advanced inversion lemmas ************************************************)
+
+fact snta_inv_sort1_aux: ∀h,L,T,U,l. ⦃h, L⦄ ⊢ T :[l] U → ∀k0. T = ⋆k0 →
+                         l = 0 ∧ L ⊢ ⋆(next h k0) ⬌* U.
+#h #L #T #U #l #H elim H -L -T -U -l
+[ #L #k #k0 #H destruct /2 width=1/
+| #L #K #V #W #U #i #l #_ #_ #_ #_ #k0 #H destruct
+| #L #K #W #V #U #i #l #_ #_ #_ #_ #k0 #H destruct
+| #I #L #V #W #T #U #l1 #l2 #_ #_ #_ #_ #k0 #H destruct
+| #L #V #W1 #W2 #T #U #l1 #l2 #_ #_ #_ #_ #k0 #H destruct
+| #L #V #T #U #W #l #_ #_ #_ #_ #k0 #H destruct
+| #L #T #U #W #l1 #l2 #_ #_ #_ #_ #k0 #H destruct
+| #L #T #U1 #U2 #V2 #l #_ #HU12 #_ #IHTU1 #_ #k0 #H destruct
+  elim (IHTU1 ??) -IHTU1 [3: // |2: skip ] #H #Hk0
+  lapply (cpcs_trans … Hk0 … HU12) -U1 /2 width=1/
+]
+qed.
+
+lemma snta_inv_sort1: ∀h,L,U,k,l. ⦃h, L⦄ ⊢ ⋆k :[l] U →
+                      l = 0 ∧ L ⊢ ⋆(next h k) ⬌* U.
+/2 width=4/ qed-.
+
+fact snta_inv_lref1_aux: ∀h,L,T,U,l. ⦃h, L⦄ ⊢ T :[l] U → ∀j. T = #j →
+                         (∃∃K,V,W,U0. ⇩[0, j] L ≡ K. ⓓV & ⦃h, K⦄ ⊢ V :[l] W &
+                                      ⇧[0, j + 1] W ≡ U0 & L ⊢ U0 ⬌* U
+                         ) ∨
+                         (∃∃K,W,V,U0. ⇩[0, j] L ≡ K. ⓛW & ⦃h, K⦄ ⊢ W :[l-1] V &
+                                      ⇧[0, j + 1] W ≡ U0 & l > 0 & L ⊢ U0 ⬌* U
+                         ).
+#h #L #T #U #l #H elim H -L -T -U -l
+[ #L #k #j #H destruct
+| #L #K #V #W #U #i #l #HLK #HVW #HWU #_ #j #H destruct /3 width=8/
+| #L #K #W #V #U #i #l #HLK #HWV #HWU #_ #j #H destruct /3 width=8/
+| #I #L #V #W #T #U #l1 #l2 #_ #_ #_ #_ #j #H destruct
+| #L #V #W1 #W2 #T #U #l1 #l2 #_ #_ #_ #_ #j #H destruct
+| #L #V #T #U #W #l #_ #_ #_ #_ #j #H destruct
+| #L #T #U #W #l1 #l2 #_ #_ #_ #_ #j #H destruct
+| #L #T #U1 #U2 #V2 #l #_ #HU12 #_ #IHTU1 #_ #j #H destruct
+  elim (IHTU1 ??) -IHTU1 [4: // |2: skip ] * #K #V #W #U0 #HLK #HVW #HWU0 [2: #H ] #HU01
+  lapply (cpcs_trans … HU01 … HU12) -U1 /3 width=8/
+]
+qed.
+
+lemma snta_inv_lref1: ∀h,L,U,i,l. ⦃h, L⦄ ⊢ #i :[l] U →
+                     (∃∃K,V,W,U0. ⇩[0, i] L ≡ K. ⓓV & ⦃h, K⦄ ⊢ V :[l] W &
+                                  ⇧[0, i + 1] W ≡ U0 & L ⊢ U0 ⬌* U
+                     ) ∨
+                     (∃∃K,W,V,U0. ⇩[0, i] L ≡ K. ⓛW & ⦃h, K⦄ ⊢ W :[l-1] V &
+                                  ⇧[0, i + 1] W ≡ U0 & l > 0 & L ⊢ U0 ⬌* U
+                     ).
+/2 width=3/ qed-.
+
+fact snta_inv_bind1_aux: ∀h,L,T,U,l. ⦃h, L⦄ ⊢ T :[l] U → ∀J,X,Y. T = ⓑ{J}Y.X →
+                         ∃∃Z1,Z2,l0. ⦃h, L⦄ ⊢ Y :[l0] Z1 &
+                                  ⦃h, L.ⓑ{J}Y⦄ ⊢ X :[l] Z2 &
+                                  L ⊢ ⓑ{J}Y.Z2 ⬌* U.
+#h #L #T #U #l #H elim H -L -T -U -l
+[ #L #k #J #X #Y #H destruct
+| #L #K #V #W #U #i #l #_ #_ #_ #_ #J #X #Y #H destruct
+| #L #K #W #V #U #i #l #_ #_ #_ #_ #J #X #Y #H destruct
+| #I #L #V #W #T #U #l1 #l2 #HVW #HTU #_ #_ #J #X #Y #H destruct /2 width=3/
+| #L #V #W1 #W2 #T #U #l1 #l2 #_ #_ #_ #_ #J #X #Y #H destruct
+| #L #V #T #U #W #l #_ #_ #_ #_ #J #X #Y #H destruct
+| #L #T #U #W #l1 #l2 #_ #_ #_ #_ #J #X #Y #H destruct
+| #L #T #U1 #U2 #V2 #l #_ #HU12 #_ #IHTU1 #_ #J #X #Y #H destruct
+  elim (IHTU1 ????) -IHTU1 [5: // |2,3,4: skip ] #Z1 #Z2 #l0 #HZ1 #HZ2 #HU1
+  lapply (cpcs_trans … HU1 … HU12) -U1 /2 width=3/
+]
+qed.
+
+lemma snta_inv_bind1: ∀h,J,L,Y,X,U,l. ⦃h, L⦄ ⊢ ⓑ{J}Y.X :[l] U →
+                      ∃∃Z1,Z2,l0. ⦃h, L⦄ ⊢ Y :[l0] Z1 & ⦃h, L.ⓑ{J}Y⦄ ⊢ X :[l] Z2 &
+                                  L ⊢ ⓑ{J}Y.Z2 ⬌* U.
+/2 width=3/ qed-.
+
+fact snta_inv_cast1_aux: ∀h,L,T,U,l. ⦃h, L⦄ ⊢ T :[l] U → ∀X,Y. T = ⓝY.X →
+                      ⦃h, L⦄ ⊢ X :[l] Y ∧ L ⊢ Y ⬌* U.
+#h #L #T #U #l #H elim H -L -T -U -l
+[ #L #k #X #Y #H destruct
+| #L #K #V #W #U #i #l #_ #_ #_ #_ #X #Y #H destruct
+| #L #K #W #V #U #i #l #_ #_ #_ #_ #X #Y #H destruct
+| #I #L #V #W #T #U #l1 #l2 #_ #_ #_ #_ #X #Y #H destruct
+| #L #V #W1 #W2 #T #U #l1 #l2 #_ #_ #_ #_ #X #Y #H destruct
+| #L #V #T #U #W #l #_ #_ #_ #_ #X #Y #H destruct
+| #L #T #U #W #l1 #l2 #HTU #_ #_ #_ #X #Y #H destruct /2 width=1/
+| #L #T #U1 #U2 #V2 #l #_ #HU12 #_ #IHTU1 #_ #X #Y #H destruct
+  elim (IHTU1 ???) -IHTU1 [4: // |2,3: skip ] #HXY #HU1
+  lapply (cpcs_trans … HU1 … HU12) -U1 /2 width=1/
+]
+qed.
+
+lemma snta_inv_cast1: ∀h,L,X,Y,U,l. ⦃h, L⦄ ⊢ ⓝY.X :[l] U →
+                      ⦃h, L⦄ ⊢ X :[l] Y ∧ L ⊢ Y ⬌* U.
+/2 width=3/ qed-.
+
+(* Properties on relocation *************************************************)
+
+lemma snta_lift: ∀h,L1,T1,U1,l. ⦃h, L1⦄ ⊢ T1 :[l] U1 →
+                 ∀L2,d,e. ⇩[d, e] L2 ≡ L1 →
+                 ∀T2. ⇧[d, e] T1 ≡ T2 → ∀U2. ⇧[d, e] U1 ≡ U2 →
+                 ⦃h, L2⦄ ⊢ T2 :[l] U2.
+#h #L1 #T1 #U1 #l #H elim H -L1 -T1 -U1 -l
+[ #L1 #k #L2 #d #e #HL21 #X1 #H1 #X2 #H2
+  >(lift_inv_sort1 … H1) -X1
+  >(lift_inv_sort1 … H2) -X2 //
+| #L1 #K1 #V1 #W1 #W #i #l #HLK1 #_ #HW1 #IHVW1 #L2 #d #e #HL21 #X #H #U2 #HWU2
+  elim (lift_inv_lref1 … H) * #Hid #H destruct
+  [ elim (lift_trans_ge … HW1 … HWU2 ?) -W // #W2 #HW12 #HWU2
+    elim (ldrop_trans_le … HL21 … HLK1 ?) -L1 /2 width=2/ #X #HLK2 #H
+    elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K2 #V2 #HK21 #HV12 #H destruct
+    /3 width=8/
+  | lapply (lift_trans_be … HW1 … HWU2 ? ?) -W // /2 width=1/ #HW1U2
+    lapply (ldrop_trans_ge … HL21 … HLK1 ?) -L1 // -Hid /3 width=8/
+  ]
+| #L1 #K1 #W1 #V1 #W #i #l #HLK1 #_ #HW1 #IHWV1 #L2 #d #e #HL21 #X #H #U2 #HWU2
+  elim (lift_inv_lref1 … H) * #Hid #H destruct
+  [ elim (lift_trans_ge … HW1 … HWU2 ?) -W // <minus_plus #W #HW1 #HWU2
+    elim (ldrop_trans_le … HL21 … HLK1 ?) -L1 /2 width=2/ #X #HLK2 #H
+    elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K2 #W2 #HK21 #HW12 #H destruct
+    lapply (lift_mono … HW1 … HW12) -HW1 #H destruct
+    elim (lift_total V1 (d-i-1) e) /3 width=8/
+  | lapply (lift_trans_be … HW1 … HWU2 ? ?) -W // /2 width=1/ #HW1U2
+    lapply (ldrop_trans_ge … HL21 … HLK1 ?) -L1 // -Hid /3 width=8/
+  ]
+| #I #L1 #V1 #W1 #T1 #U1 #l1 #l2 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL21 #X1 #H1 #X2 #H2
+  elim (lift_inv_bind1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H destruct
+  elim (lift_inv_bind1 … H2) -H2 #X #U2 #H1 #HU12 #H2 destruct
+  lapply (lift_mono … H1 … HV12) -H1 #H destruct
+  elim (lift_total W1 d e) /4 width=6/
+| #L1 #V1 #W11 #W12 #T1 #U1 #l1 #l2 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL21 #X1 #H1 #X2 #H2
+  elim (lift_inv_flat1 … H1) -H1 #V2 #X #HV12 #H1 #H destruct
+  elim (lift_inv_bind1 … H1) -H1 #W21 #T2 #HW121 #HT12 #H destruct
+  elim (lift_inv_flat1 … H2) -H2 #Y2 #X #HY #H2 #H destruct
+  elim (lift_inv_bind1 … H2) -H2 #W22 #U2 #HW122 #HU12 #H destruct
+  lapply (lift_mono … HY … HV12) -HY #H destruct /4 width=6/
+| #L1 #V1 #T1 #U1 #W1 #l #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL21 #X1 #H1 #X2 #H2
+  elim (lift_inv_flat1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H destruct
+  elim (lift_inv_flat1 … H2) -H2 #X #U2 #H1 #HU12 #H2 destruct
+  lapply (lift_mono … H1 … HV12) -H1 #H destruct
+  elim (lift_total W1 d e) #W2 #HW12 /4 width=6/
+| #L1 #T1 #U1 #W1 #l1 #l2 #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL21 #X #H #U2 #HU12
+  elim (lift_inv_flat1 … H) -H #X2 #T2 #HUX2 #HT12 #H destruct
+  lapply (lift_mono … HUX2 … HU12) -HUX2 #H destruct
+  elim (lift_total W1 d e) /3 width=6/
+| #L1 #T1 #U11 #U12 #V12 #l #_ #HU112 #_ #IHTU11 #IHUV12 #L2 #d #e #HL21 #U1 #HTU1 #U2 #HU12
+  elim (lift_total U11 d e) #U #HU11
+  elim (lift_total V12 d e) #V22 #HV122
+  lapply (cpcs_lift … HL21 … HU11 … HU12 HU112) -HU112 /3 width=6/
+]
+qed.
+
+(* Advanced forvard lemmas **************************************************)
+
+fact snta_fwd_pure1_aux: ∀h,L,T,U,l. ⦃h, L⦄ ⊢ T :[l] U → ∀X,Y. T = ⓐY.X →
+                         ∃∃V,W,l0. ⦃h, L⦄ ⊢ Y :[l0+1] W & ⦃h, L⦄ ⊢ X :[l] V &
+                                   L ⊢ ⓐY.V ⬌* U.
+#h #L #T #U #l #H elim H -L -T -U -l
+[ #L #k #X #Y #H destruct
+| #L #K #V #W #U #i #l #_ #_ #_ #_ #X #Y #H destruct
+| #L #K #W #V #U #i #l #_ #_ #_ #_ #X #Y #H destruct
+| #I #L #V #W #T #U #l1 #l2 #_ #_ #_ #_ #X #Y #H destruct
+| #L #V #W1 #W2 #T #U #l1 #l2 #HVW2 #HTU #_ #_ #X #Y #H destruct /2 width=3/
+| #L #V #T #U #W #l #HTU #_ #_ #IHU #X #Y #H destruct
+  elim (IHU U Y ?) -IHU // /3 width=3/
+| #L #T #U #W #l1 #l2 #_ #_ #_ #_ #X #Y #H destruct
+| #L #T #U1 #U2 #V2 #l #_ #HU12 #_ #IHTU1 #_ #X #Y #H destruct
+  elim (IHTU1 ???) -IHTU1 [4: // |2,3: skip ] #V #W #l0 #HYW #HXV #HU1
+  lapply (cpcs_trans … HU1 … HU12) -U1 /2 width=3/
+]
+qed.
+
+lemma snta_fwd_pure1: ∀h,L,X,Y,U,l. ⦃h, L⦄ ⊢ ⓐY.X :[l] U →
+                      ∃∃V,W,l0. ⦃h, L⦄ ⊢ Y :[l0+1] W & ⦃h, L⦄ ⊢ X :[l] V &
+                                L ⊢ ⓐY.V ⬌* U.
+/2 width=3/ qed-.
+
+lemma snta_fwd_correct: ∀h,L,T,U,l. ⦃h, L⦄ ⊢ T :[l] U →
+                        ∃T0. ⦃h, L⦄ ⊢ U :[l-1] T0.
+#h #L #T #U #l #H elim H -L -T -U -l
+[ /2 width=2/
+| #L #K #V #W #W0 #i #l #HLK #_ #HW0 * #V0 #HWV0
+  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
+  elim (lift_total V0 0 (i+1)) /3 width=10/
+| #L #K #W #V #V0 #i #l #HLK #HWV #HWV0 #_
+  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
+  elim (lift_total V 0 (i+1)) /3 width=10/
+| #I #L #V #W #T #U #l1 #l2 #HVW #_ #_ * /3 width=3/
+| #L #V #W1 #W2 #T #U #l1 #l2 #HVW2 #_ #_ * #X #H
+  elim (snta_inv_bind1 … H) -H /4 width=5/   
+| /3 width=2/
+| /2 width=2/
+| /2 width=2/
+]
+qed-.
+
+(* Advanced properties ******************************************************)
+
+lemma snta_cast_short: ∀h,L,T,U,l. ⦃h, L⦄ ⊢ T :[l] U → ⦃h, L⦄ ⊢ ⓝU.T :[l] U.
+#h #L #T #U #l #HTU
+elim (snta_fwd_correct … HTU) /2 width=3/
+qed.
+
+lemma snta_typecheck: ∀h,L,T,U,l. ⦃h, L⦄ ⊢ T :[l] U →
+                      ∃T0. ⦃h, L⦄ ⊢ ⓝU.T :[l] T0.
+/3 width=2/ qed.
+
+lemma snta_cast_old: ∀h,L,W,T,U,l.
+                    ⦃h, L⦄ ⊢ T :[l] U → ⦃h, L⦄ ⊢ U :[l-1] W → ⦃h, L⦄ ⊢ ⓝU.T :[l] ⓝW.U.
+#h #L #W #T #U #l #HTU #HUW
+@(snta_conv … U) /2 width=2/ /3 width=1/ (**) (* /4 width=3/ is a bit slow *)
+qed.
+
+lemma snta_appl_old: ∀h,L,V,W,T,U,l1,l2.
+                     ⦃h, L⦄ ⊢ V :[l1+1] W → ⦃h, L⦄ ⊢ T :[l2+1] ⓛW.U →
+                     ⦃h, L⦄ ⊢ ⓐV.T :[l2+1] ⓐV.ⓛW.U.
+#h #L #V #W #T #U #l1 #l2 #HVW #HTU
+elim (snta_fwd_correct … HTU) #X #H
+elim (snta_inv_bind1 … H) -H /4 width=5/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/snta/snta_ltpr.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/snta/snta_ltpr.etc
new file mode 100644 (file)
index 0000000..77b62e4
--- /dev/null
@@ -0,0 +1,278 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/snta_ltpss.ma".
+include "basic_2/dynamic/snta_thin.ma".
+include "basic_2/dynamic/lsubsn_snta.ma".
+
+(* STRATIFIED NATIVE TYPE ASSIGNMENT ON TERMS *******************************)
+(*
+lemma snta_fwd_abst: ∀h,L,W1,W2,T,U,l2. ⦃h, L⦄ ⊢ ⓛW1.T :[l2] ⓛW2.U →
+                     ∃∃V1,V2,l1. ⦃h, L⦄ ⊢ W1 :[l1] V1 & ⦃h, L⦄ ⊢ W2 :[l1] V2 &
+                                 L ⊢ W1 ⬌* W2.
+#h #L #W1 #W2 #T #U #l2 #HTU
+elim (snta_fwd_correct … HTU) #X #H
+elim (snta_inv_bind1 … H) -H #W #T0 #l #HW2 #_ #_ -X
+elim (snta_inv_bind1 … HTU) -HTU #V1 #U0 #l0 #HWV1 #_ #H
+elim (cpcs_inv_abst … H Abst W1) -H
+#HW12 #_ -U0
+@(ex3_3_intro … HWV1 … HW12)
+[3: @(snta_conv … HTU0 HU0) 
+
+ /3 width=3/
+
+*)
+(*
+#h #L #V #T #U #l2 #HTU
+elim (snta_fwd_correct … HTU) #X #H
+elim (snta_inv_bind1 … H) -H #W #T0 #l1 #HVW #HUT0 #_ -X
+elim (snta_inv_bind1 … HTU) -HTU #W0 #U0 #l0 #_ #HTU0 #H -l0
+elim (cpcs_inv_abst … H Abst V) -H /3 width=3/
+qed-.
+*)
+(*
+lemma snta_fwd_appl1_sound_aux: ∀h,l0. (∀L1,L2,T1,T2,U,l.
+                                        l < l0 → ⦃h, L1⦄ ⊢ T1 :[l] U →
+                                        L1 ➡ L2 → L2 ⊢ T1 ➡* T2 → ⦃h, L2⦄ ⊢ T2 :[l] U
+                                       ) →
+                                ∀L,T,U,l2. ⦃h, L⦄ ⊢ T :[l2] U →
+                                ∀Z,Y,X1. T = ⓐZ.ⓛY.X1 → l0 = l2 →
+                                ∃l1. ⦃h, L⦄ ⊢ Z :[l1+1] Y.
+#h #l0 #IH #L #T #U #l2 #H elim H -L -T -U -l2
+[
+|
+|
+|
+| #L #V #W1 #W2 #T #U #l1 #l2 #HVW2 #HTU #_ #_ #Z #Y #X1 #H1 #H2 destruct -IH
+  elim (snta_fwd_abst … HTU) -X1 -U -l2 #Y0 #W0 #l0 #HY0 #H1 #HYW2
+  elim (snta_fwd_correct … HVW2) #W #H2
+  elim (snta_mono … H1 … H2) -H1 -H2 #H #_ destruct -W0 -W /4 width=6/
+| #L #V #T #U #W #l #HTU #HUW #Z #Y #X1 #X2 #H1 #H2 #H3 destruct
+  elim (snta_inv_abst_sn … HTU) -HTU #Y0 #l0 #HY0 #HX12
+|
+| #L #T #U1 #U2 #V2 #l #HTU1 #HU12 #HUV2 #Z #Y #X1 #X2 #H1 #H2 #H3 destruct
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+lemma snta_inv_appl_aux: ∀h,l0. (∀L1,L2,T1,T2,U,l.
+                                 l < l0 + 1 → ⦃h, L1⦄ ⊢ T1 :[l] U →
+                                 L1 ➡ L2 → L2 ⊢ T1 ➡* T2 → ⦃h, L2⦄ ⊢ T2 :[l] U
+                                ) →
+                         ∀L,T,U,l2. ⦃h, L⦄ ⊢ T :[l2] U →
+                         ∀Z,Y,X1,X2. T = ⓐZ.ⓛY.X1 → U = ⓐZ.ⓛY.X2 → l0 = l2 →
+                         ∃∃l1. ⦃h, L⦄ ⊢ Z :[l1+1] Y & ⦃h, L.ⓛY⦄ ⊢ X1 :[l2] X2.
+#h #l0 #IH #L #T #U #l2 * -L -T -U -l2
+[
+|
+|
+|
+| #L #V #W1 #W2 #T #U #l1 #l2 #HVW2 #HTU #Z #Y #X1 #X2 #H1 #H2 #H3 destruct -IH
+  elim (snta_inv_abst … HTU) -HTU /2 width=2/
+| #L #V #T #U #W #l #HTU #HUW #Z #Y #X1 #X2 #H1 #H2 #H3 destruct
+  elim (snta_inv_abst … HTU) -HTU #Y0 #l0 #HY0 #HX12
+|
+| #L #T #U1 #U2 #V2 #l #HTU1 #HU12 #HUV2 #Z #Y #X1 #X2 #H1 #H2 #H3 destruct
+  
+   /2 width=2/
+
+
+axiom pippo: ∀h,l0. (∀L1,L2,T1,T2,U,l.
+                l < l0 + 1 → ⦃h, L1⦄ ⊢ T1 :[l] U →
+                L1 ➡ L2 → L2 ⊢ T1 ➡* T2 → ⦃h, L2⦄ ⊢ T2 :[l] U
+             ) →
+             ∀L,T1,U1,l. ⦃h, L⦄ ⊢ T1 :[l] U1 →
+             ∀V2,W2,T2. L ⊢ T1 ➡* ⓐV2.ⓛW2.T2 → l0 = l →
+             ∃l0. ⦃h, L2⦄ ⊢ V2 :[l0+1] W2.
+(*
+#h #l #IH #L1 #T1 #U1 #l1 * -L1 -T1 -U1 -l1
+[
+|
+|
+|
+| #L1 #V1 #W1 #T1 #U1 #l1 #HVW1 #HTU1 #Y1 #X1 #H1 #L2 #Y2 #HL12 #HY12 #Z2 #X2 #HX12 #H2 destruct
+  elim (IH ??? Y2 … HVW1 HL12 ?) -HVW1 // [2: /3 width=1/ ] -HY12 #l21 #HY2W1 #H1l21 #H2l21
+  elim (IH … HTU1 HL12 HX12) -IH -HTU1 -HL12 -HX12 // #l22 #H #_ #H2l22
+  elim (snta_inv_bind1 … H) -H #Z #X #HZ2 #_ #H
+  elim (cpcs_inv_abst … H Abst W1) -H #H #_
+  lapply (transitive_le … (l21+l22) … H1l21 ?) -H1l21 // #Hl21
+  @(ex3_1_intro … Hl21) [2: /3 width=1/ ]
+  @(snta_conv … W1) /2 width=2/ (**) (* explicit constructors *)
+| #L1 #V1 #T1 #U1 #W1 #l1 #HTU1 #HUW1 #Y1 #X1 #H1 #L2 #Y2 #HL12 #HY12 #Z2 #X2 #HX12 #H2 destruct
+
+*)
+(* Properties on context-free parallel reduction for local environments *****)
+*)
+fact snta_ltpr_tpr_conf_aux: ∀h,l0. (∀L1,L2,T1,T2,U,l.
+                                l < l0 → ⦃h, L1⦄ ⊢ T1 :[l] U →
+                                L1 ➡ L2 → L2 ⊢ T1 ➡* T2 → ⦃h, L2⦄ ⊢ T2 :[l] U
+                             ) →
+                             ∀L1,T1,U,l. ⦃h, L1⦄ ⊢ T1 :[l] U → ∀L2. L1 ➡ L2 →
+                             ∀T2. T1 ➡ T2 → l0 = l → ⦃h, L2⦄ ⊢ T2 :[l] U.
+#h #l0 #IH #L1 #T1 #U #l #H elim H -L1 -T1 -U -l
+[ #L1 #k1 #L2 #_ #T2 #H #_ -l0
+  >(tpr_inv_atom1 … H) -H //
+| #L1 #K1 #V1 #W #U #i1 #l #HLK1 #_ #HWU #IHV1 #L2 #HL12 #T2 #H #Hl -IH
+  >(tpr_inv_atom1 … H) -T2
+  elim (ltpr_ldrop_conf … HLK1 … HL12) -HLK1 -HL12 #X #HLK2 #H
+  elim (ltpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct /3 width=6/
+| #L1 #K1 #W1 #V1 #U1 #i1 #l #HLK1 #HWV1 #HWU1 #IHWV1 #L2 #HL12 #T2 #H #Hl -IH
+(*  
+  >(tpr_inv_atom1 … H) -T2
+  elim (ltpr_ldrop_conf … HLK1 … HL12) -HLK1 -HL12 #X #HLK2 #H
+  elim (ltpr_inv_pair1 … H) -H #K2 #W2 #HK12 #HW12 #H destruct
+  lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
+  elim (lift_total V1 0 (i+1)) #W #HW
+  lapply (snta_lift h … HLK … HWU1 … HW) /2 width=1/ -HLK -HW
+  elim (lift_total W2 0 (i+1)) #U2 #HWU2
+  lapply (tpr_lift … HW12 … HWU1 … HWU2) -HWU1 #HU12
+  @(snta_conv … U2) /2 width=1/ /3 width=6/ (**) (* explicit constructor, /3 width=6/ is too slow *)
+*)
+| #I #L1 #V1 #W1 #T1 #U1 #l1 #l2 #_ #_ #IHVW1 #IHTU1 #L2 #HL12 #X #H #Hl -IH
+(*  
+  elim (tpr_inv_bind1 … H) -H *
+  [ #V2 #T #T2 #HV12 #HT1 #HT2 #H destruct
+    lapply (IHVW1 … HL12 … HV12) #HV2W1
+    lapply (IHVW1 L2 … V1 ?) // -IHVW1 #HWV1
+    lapply (IHTU1 (L2.ⓑ{I}V2) … HT1) -HT1 /2 width=1/ #HTU1
+    lapply (IHTU1 (L2.ⓑ{I}V1) ? T1 ?) -IHTU1 // /2 width=1/ -HL12 #H
+    lapply (tps_lsubs_trans … HT2 (L2.ⓑ{I}V2) ?) -HT2 /2 width=1/ #HT2
+    lapply (snta_tps_conf … HTU1 … HT2) -T #HT2U1
+    elim (snta_fwd_correct … H) -H #U2 #HU12
+    @(snta_conv … (ⓑ{I}V2.U1)) /2 width=2/ /3 width=1/ (**) (* explicit constructor, /4 width=6/ is too slow *)
+  | #T #HT1 #HTX #H destruct
+    lapply (IHVW1 … HL12 V1 ?) -IHVW1 // #HVW1
+    lapply (IHTU1 (L2.ⓓV1) … HT1) -T1 /2 width=1/ -L1 #H
+    elim (snta_fwd_correct … H) #T1 #HUT1
+    elim (snta_ldrop_conf … H L2 0 1 ? ?) -H // /2 width=1/ #T0 #U0 #HTU0 #H #HU10
+    lapply (delift_inv_lift1_eq … H L2 … HTX) -H -HTX /2 width=1/ #H destruct
+    @(snta_conv … HTU0) /2 width=2/
+  ]
+*)
+| #L1 #V1 #W11 #W2 #T1 #U1 #l1 #l2 #_ #_ #IHVW1 #IHTU1 #L2 #HL12 #X #H #Hl -IH
+(*
+  elim (tpr_inv_appl1 … H) -H *
+  [ #V2 #Y #HV12 #HY #H destruct
+    elim (tpr_inv_abst1 … HY) -HY #W2 #T2 #HW12 #HT12 #H destruct
+    lapply (IHTU1 L2 ? (ⓛW1.T1) ?) // #H
+    elim (snta_fwd_correct … H) -H #X #H
+    elim (snta_inv_bind1 … H) -H #W #U #HW #HU #_
+    @(snta_conv … (ⓐV2.ⓛW1.U1)) /4 width=2/ (**) (* explicit constructor, /5 width=5/ is too slow *)
+  | #V2 #W2 #T0 #T2 #HV12 #HT02 #H1 #H2 destruct
+    lapply (IHVW1 … HL12 … HV12) #HVW2
+    lapply (IHVW1 … HL12 V1 ?) -IHVW1 // #HV1W2
+    lapply (IHTU1 … HL12 (ⓛW2.T2) ?) -IHTU1 -HL12 /2 width=1/ -HT02 #H1
+    elim (snta_fwd_correct … H1) #T #H2
+    elim (snta_inv_bind1 … H1) -H1 #W #U2 #HW2 #HTU2 #H
+    elim (cpcs_inv_abst … H Abst W2) -H #_ #HU21
+    elim (snta_inv_bind1 … H2) -H2 #W0 #U0 #_ #H #_ -T -W0
+    lapply (lsubsn_snta_trans … HTU2 (L2.ⓓV2) ?) -HTU2 /2 width=1/ #HTU2
+    @(snta_conv … (ⓓV2.U2)) /2 width=2/ /3 width=2/ (**) (* explicit constructor, /4 width=5/ is too slow *)
+  | #V0 #V2 #W0 #W2 #T0 #T2 #_ #_ #_ #_ #H destruct
+  ]
+*)
+| #L1 #V1 #T1 #U1 #W1 #l #_ #HUW1 #IHTU1 #_ #L2 #HL12 #X #H #Hl
+  elim (tpr_inv_appl1 … H) -H *
+  [ #V2 #T2 #HV12 #HT12 #H destruct
+    lapply (cpr_tpr … HV12 L2) #HV
+    elim (snta_fwd_correct h L2 (ⓐV1.T1) (ⓐV1.U1) (l+1) ?) [2: /3 width=6/ ] #U
+    @(snta_conv … (ⓐV2.U1)) /2 width=1/ -HV12 /4 width=8 by snta_pure, cprs_flat_dx/ (**) (* explicit constructor, /4 width=8/ is too slow without trace *)
+  | #V2 #W0 #T0 #T2 #HV12 #HT02 #H1 #H2 destruct
+    lapply (IHTU1 … HL12 (ⓛW0.T2) ? ?) -IHTU1 // /2 width=1/ -T0 #H1
+    lapply (IH … (ⓐV2.U1) … HUW1 HL12 ?) // /3 width=1/ #H2
+    lapply (snta_pure … H1 H2) -H2 #H
+    elim (snta_inv_bind1 … H1) -H1 #V0 #U2 #l1 #HWV0 #HTU2 #HU21
+    @(snta_conv … (ⓓV2.U2)) (**) (* explicit constructor *)
+    [2:
+(*
+        @snta_bind /3 width=2/ /3 width=6/ (**) (* /4 width=6/ is a bit slow *)
+*)
+    |3: @(cpcs_cpr_conf … (ⓐV1.ⓛW0.U2)) /2 width=1/
+    |4: /2 width=5/
+    | skip
+    ]
+(*
+    elim (snta_fwd_pure1 … H) -H #T1 #W2 #HVW2 #HUT1 #HTW1
+
+    elim (cpcs_inv_abst1 … HU21) #W3 #U3 #HU13 #H
+    elim (cprs_inv_abst … H Abst W0) -H #HW03 #_
+    elim (pippo … IH … HUW1 ? V2 W3 U3 HL12 ? ?) -IH -HUW1 -HL12 // /3 width=1/ -HU13 #l2 #HV2W3
+    lapply (snta_conv h L2 V2 W3 W0 V0 (l1+1) ? ? ?) /2 width=1/ -HV2W3 -HW03 -HWV0 #HV2W0    
+*)    
+(* SEGMENT 1.5
+    lapply (IH … HV1 … HL12 … HV12) -HV1 -HV12 /width=5/ #HB
+    lapply (IH … HB0  … HL12 W2 ?) -HB0 /width=5/ #HB0
+    lapply (IH … HA0 … (L2.ⓛW2) … HT02) -IH -HA0 -HT02 /width=5/ -T0 /2 width=1/ -L1 -V1 /4 width=7/
+    
+axiom pippo: ⦃h, L⦄ ⊢ ⓐV.X : Y →
+             ∃∃W,T. L ⊢ X ➡* ⓛW.T & ⦃h, L⦄ ⊢ ⓐV : W.
+
+*)
+(* SEGMENT 2
+| #L1 #T1 #U1 #W1 #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_flat1 … H) -H #U2 #T2 #HU12 #HT12 #H destruct
+  lapply (cpr_tpss … HU12) /4 width=4/
+| #L1 #T1 #U11 #U12 #U #_ #HU112 #_ #IHTU11 #IHU12 #L2 #d #e #HL12 #T2 #HT12
+  @(snta_conv … U11) /2 width=5/ (**) (* explicot constructor, /3 width=7/ is too slow *)
+]
+qed.
+*)
+
+(* SEGMENT 3
+fact snta_ltpr_tpr_conf_aux: ∀h,L,T,L1,T1,U. ⦃h, L1⦄ ⊢ T1 : U → L = L1 → T = T1 →
+                            ∀L2. L1 ➡ L2 → ∀T2. T1 ➡ T2 → ⦃h, L2⦄ ⊢ T2 : U.
+  
+  
+  | #V0 #V2 #W0 #W2 #T0 #T2 #HV10 #HW02 #HT02 #HV02 #H1 #H2 destruct
+    elim (snta_inv_abbr … HT1) -HT1 #B0 #HW0 #HT0
+    lapply (IH … HW0  … HL12 … HW02) -HW0 /width=5/ #HW2
+    lapply (IH … HV1 … HL12 … HV10) -HV1 -HV10 /width=5/ #HV0
+    lapply (IH … HT0 … (L2.ⓓW2) … HT02) -IH -HT0 -HT02 /width=5/ -V1 -T0 /2 width=1/ -L1 -W0 #HT2
+    @(snta_abbr … HW2) -HW2
+    @(snta_appl … HT2) -HT2 /3 width=7/ (**) (* explict constructors, /5 width=7/ is too slow *)
+  ]
+| #L1 #V1 #T1 #A #HV1 #HT1 #H1 #H2 #L2 #HL12 #X #H destruct
+  elim (tpr_inv_cast1 … H) -H
+  [ * #V2 #T2 #HV12 #HT12 #H destruct
+    lapply (IH … HV1 … HL12 … HV12) -HV1 -HV12 /width=5/ #HV2
+    lapply (IH … HT1 … HL12 … HT12) -IH -HT1 -HL12 -HT12 /width=5/ -L1 -V1 -T1 /2 width=1/
+  | -HV1 #HT1X
+     lapply (IH … HT1 … HL12 … HT1X) -IH -HT1 -HL12 -HT1X /width=5/
+  ]
+]
+qed.
+
+lemma snta_ltpr_tpr_conf: ∀h,L1,T1,U. ⦃h, L1⦄ ⊢ T1 : U → ∀L2. L1 ➡ L2 →
+                         ∀T2. T1 ➡ T2 → ⦃h, L2⦄ ⊢ T2 : U.
+
+/2 width=9/ qed.
+
+axiom snta_ltpr_conf: ∀L1,T,A. L1 ⊢ T : A → ∀L2. L1 ➡ L2 → L2 ⊢ T : A.
+/2 width=5/ qed.
+
+axiom snta_tpr_conf: ∀L,T1,A. L ⊢ T1 : A → ∀T2. T1 ➡ T2 → L ⊢ T2 : A.
+/2 width=5/ qed.
+*)
+*)*)
\ No newline at end of file
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/snta/snta_ltpss.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/snta/snta_ltpss.etc
new file mode 100644 (file)
index 0000000..0e5f393
--- /dev/null
@@ -0,0 +1,123 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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_ltpss.ma".
+include "basic_2/dynamic/snta_snta.ma".
+
+(* STRATIFIED NATIVE TYPE ASSIGNMENT ON TERMS *******************************)
+
+(* Properties about parallel unfold *****************************************)
+
+lemma snta_ltpss_tpss_conf: ∀h,L1,T1,U,l. ⦃h, L1⦄ ⊢ T1 :[l] U →
+                            ∀L2,d,e. L1 ▶* [d, e] L2 →
+                            ∀T2. L2 ⊢ T1 ▶* [d, e] T2 → ⦃h, L2⦄ ⊢ T2 :[l] U.
+#h #L1 #T1 #U #l #H elim H -L1 -T1 -U -l
+[ #L1 #k #L2 #d #e #_ #T2 #H
+  >(tpss_inv_sort1 … H) -H //
+| #L1 #K1 #V1 #W #U #i #l #HLK1 #_ #HWU #IHV1 #L2 #d #e #HL12 #T2 #H
+  elim (tpss_inv_lref1 … H) -H
+  [ #H destruct
+    elim (lt_or_ge i d) #Hdi
+    [ elim (ltpss_ldrop_conf_le … HL12 … HLK1 ?) -L1 /2 width=2/ #X #H #HLK2
+      elim (ltpss_inv_tpss11 … H ?) -H /2 width=1/ -Hdi #K2 #V2 #HK12 #HV12 #H destruct
+      /3 width=7/
+    | elim (lt_or_ge i (d + e)) #Hide [ | -Hdi ]
+      [ elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HLK2
+        elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K2 #V2 #HK12 #HV12 #H destruct
+        /3 width=7/
+      | lapply (ltpss_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /3 width=7/
+      ]
+    ]
+  | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #HVW2 #HWT2
+    elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HL2K0
+    elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K0 #V0 #HK12 #HV12 #H destruct
+    lapply (ldrop_mono … HL2K0 … HLK2) -HL2K0 #H destruct
+    lapply (ldrop_fwd_ldrop2 … HLK2) -HLK2 #HLK2
+    lapply (tpss_trans_eq … HV12 HVW2) -V2 /3 width=9/
+  ]
+| #L1 #K1 #W1 #V1 #U1 #i #l #HLK1 #HWV1 #HWU1 #IHWV1 #L2 #d #e #HL12 #T2 #H
+  elim (tpss_inv_lref1 … H) -H [ | -HWV1 -HWU1 -IHWV1 ]
+  [ #H destruct
+    elim (lift_total V1 0 (i+1)) #W #HW
+    elim (lt_or_ge i d) #Hdi [ -HWV1 ]
+    [ elim (ltpss_ldrop_conf_le … HL12 … HLK1 ?) -L1 /2 width=2/ #X #H #HLK2
+      elim (ltpss_inv_tpss11 … H ?) -H /2 width=1/ -Hdi #K2 #W2 #HK12 #HW12 #H destruct
+      lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
+      lapply (snta_lift h … HLK … HWU1 … HW) [ /2 width=4/ | skip ] -HW #H
+      elim (lift_total W2 0 (i+1)) #U2 #HWU2
+      lapply (tpss_lift_ge … HW12 … HLK … HWU1 … HWU2) -HLK -HWU1 // #HU12
+      lapply (cpr_tpss … HU12) -HU12 #HU12
+      @(snta_conv … U2) // /2 width=1/ /3 width=6/ (**) (* explicit constructor, /4 width=6/ is too slow *)
+    | elim (lt_or_ge i (d + e)) #Hide [ -HWV1 | -IHWV1 -HW -Hdi ]
+      [ elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HLK2
+        elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K2 #W2 #HK12 #HW12 #H destruct
+        lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
+        lapply (snta_lift h … HLK … HWU1 … HW) [ /2 width=4/ | skip ] -HW #H
+        elim (lift_total W2 0 (i+1)) #U2 #HWU2
+        lapply (tpss_lift_ge … HW12 … HLK … HWU1 … HWU2) -HLK -HWU1 // #HU12
+        lapply (cpr_tpss … HU12) -HU12 #HU12
+        @(snta_conv … U2) // /2 width=1/ /3 width=6/ (**) (* explicit constructor, /4 width=6/ is too slow *)
+      | lapply (ltpss_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /2 width=6/
+      ]
+    ]
+  | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #_ #_
+    elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HL2K0
+    elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K0 #V0 #_ #_ #H destruct
+    lapply (ldrop_mono … HL2K0 … HLK2) -HL2K0 -HLK2 #H destruct
+  ]
+| #I #L1 #V1 #W1 #T1 #U1 #l1 #l2 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+  lapply (cpr_tpss … HV12) #HV
+  lapply (IHTU1 (L2.ⓑ{I}V1) (d+1) e ? T1 ?) // /2 width=1/ #H
+  elim (snta_fwd_correct … H) -H #U2 #HU12
+  @(snta_conv … (ⓑ{I}V2.U1)) /3 width=2/ /3 width=4/ /4 width=4/ (**) (* explicit constructor, /5 width=6/ is too slow *)
+| #L1 #V1 #W11 #W12 #T1 #U1 #l1 #l2 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_flat1 … H) -H #V2 #Y #HV12 #HY #H destruct
+  elim (tpss_inv_bind1 … HY) -HY #W21 #T2 #HW121 #HT12 #H destruct
+  lapply (cpr_tpss … HV12) #HVV12
+  lapply (IHTU1 L2 d e ? (ⓛW21.T2) ?) -IHTU1 // /2 width=1/ -HW121 -HT12 #H0
+  elim (snta_fwd_correct … H0) #X #H
+  elim (snta_inv_bind1 … H) -H #W #U #l0 #HW #HU #_
+  @(snta_conv … (ⓐV2.ⓛW12.U1)) /3 width=2/ /3 width=4/ /3 width=5/ (**) (* explicit constructor, /4 width=5/ is too slow *)
+| #L1 #V1 #T1 #U1 #W1 #l #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+  lapply (cpr_tpss … HV12) #HV
+  elim (snta_fwd_correct h L2 (ⓐV1.T1) (ⓐV1.U1) (l+1) ?) [2: /3 width=4/ ] #U
+  @(snta_conv … (ⓐV2.U1)) /3 width=1/ /4 width=5/ (**) (* explicit constructor, /5 width=5/ is too slow *)
+| #L1 #T1 #U1 #W1 #l1 #l2 #HTU1 #HUW1 #IHTU1 #IHUW1 #L2 #d #e #HL12 #X #H
+  elim (snta_fwd_correct … HTU1) -HTU1 #U #H
+  elim (snta_mono … HUW1 … H) -HUW1 -H #H #_ -U destruct
+  elim (tpss_inv_flat1 … H) -H #U2 #T2 #HU12 #HT12 #H destruct
+  lapply (cpr_tpss … HU12) #HU /4 width=4/
+| #L1 #T1 #U11 #U12 #U #l #_ #HU112 #_ #IHTU11 #IHU12 #L2 #d #e #HL12 #T2 #HT12
+  @(snta_conv … U11) /2 width=5/ (**) (* explicit constructor, /3 width=7/ is too slow *)
+]
+qed.
+
+lemma snta_ltpss_tps_conf: ∀h,L1,T1,U,l. ⦃h, L1⦄ ⊢ T1 :[l] U →
+                           ∀L2,d,e. L1 ▶* [d, e] L2 →
+                           ∀T2. L2 ⊢ T1 ▶ [d, e] T2 → ⦃h, L2⦄ ⊢ T2 :[l] U.
+/3 width=7/ qed.
+
+lemma snta_ltpss_conf: ∀h,L1,T,U,l. ⦃h, L1⦄ ⊢ T :[l] U →
+                       ∀L2,d,e. L1 ▶* [d, e] L2 → ⦃h, L2⦄ ⊢ T :[l] U.
+/2 width=7/ qed.
+
+lemma snta_tpss_conf: ∀h,L,T1,U,l. ⦃h, L⦄ ⊢ T1 :[l] U →
+                      ∀T2,d,e. L ⊢ T1 ▶* [d, e] T2 → ⦃h, L⦄ ⊢ T2 :[l] U.
+/2 width=7/ qed.
+
+lemma snta_tps_conf: ∀h,L,T1,U,l. ⦃h, L⦄ ⊢ T1 :[l] U →
+                     ∀T2,d,e. L ⊢ T1 ▶ [d, e] T2 → ⦃h, L⦄ ⊢ T2 :[l] U.
+/2 width=7/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/snta/snta_snta.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/snta/snta_snta.etc
new file mode 100644 (file)
index 0000000..db71e11
--- /dev/null
@@ -0,0 +1,65 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/dynamic/snta_lift.ma".
+
+(* STRATIFIED NATIVE TYPE ASSIGNMENT ON TERMS *******************************)
+
+(* Main properties **********************************************************)
+
+theorem snta_mono: ∀h,L,T,U1,l1. ⦃h, L⦄ ⊢ T :[l1] U1 →
+                   ∀U2,l2. ⦃h, L⦄ ⊢ T :[l2] U2 → l1 = l2 ∧ L ⊢ U1 ⬌* U2.
+#h #L #T #U1 #l1 #H elim H -L -T -U1 -l1
+[ #L #k #X #l2 #H
+  lapply (snta_inv_sort1 … H) -H * /2 width=1/
+| #L #K #V #W11 #W12 #i #l1 #HLK #_ #HW112 #IHVW11 #X #l2 #H
+  elim (snta_inv_lref1 … H) -H * #K0 #V0 #W21 #W22 #HLK0 #HVW21 #HW212 #HX
+  lapply (ldrop_mono … HLK0 … HLK) -HLK0 #H destruct
+  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
+  elim (IHVW11 … HVW21) -IHVW11 -HVW21 #Hl12 #HW121
+  lapply (cpcs_lift … HLK … HW112 … HW212 ?) // -K -W11 -W21 /3 width=3/
+| #L #K #W #V1 #V #i #l1 #HLK #_ #HWV #IHWV1 #X #l2 #H
+  elim (snta_inv_lref1 … H) -H * #K0 #W0 #V2 #V0 #HLK0 #HW0V2 #HWV0 [2: #HL2 ] #HX
+  lapply (ldrop_mono … HLK0 … HLK) -HLK0 -HLK #H destruct
+  lapply (lift_mono … HWV0 … HWV) -HWV0 -HWV #H destruct
+  elim (IHWV1 … HW0V2) -IHWV1 -HW0V2 /3 width=1/
+| #I #L #V #W1 #T #U1 #l10 #l1 #_ #_ #_ #IHTU1 #X #l2 #H
+  elim (snta_inv_bind1 … H) -H #W2 #U2 #l20 #_ #HTU2 #H
+  elim (IHTU1 … HTU2) -IHTU1 -HTU2 #Hl12 #HU12
+  lapply (cpcs_trans … (ⓑ{I}V.U1) … H) -H /2 width=1/
+| #L #V #W #W1 #T #U1 #l10 #l1 #_ #_ #_ #IHTU1 #X #l2 #H
+  elim (snta_fwd_pure1 … H) -H #U2 #W2 #l20 #_ #HTU2 #H
+  elim (IHTU1 … HTU2) -IHTU1 -HTU2 #Hl12 #HU12
+  lapply (cpcs_trans … (ⓐV.ⓛW1.U1) … H) -H /2 width=1/
+| #L #V #T #U1 #W1 #l1 #_ #_ #IHTU1 #_ #X #l2 #H
+  elim (snta_fwd_pure1 … H) -H #U2 #W2 #l20 #_ #HTU2 #H
+  elim (IHTU1 … HTU2) -IHTU1 -HTU2 #Hl12 #HU12
+  lapply (cpcs_trans … (ⓐV.U1) … H) -H /2 width=1/
+| #L #T #U1 #W1 #l10 #l1 #_ #_ #IHTU1 #_ #X #l2 #H
+  elim (snta_inv_cast1 … H) -H #HTU1
+  elim (IHTU1 … HTU1) -IHTU1 -HTU1 /2 width=1/
+| #L #T #U11 #U12 #V12 #l1 #_ #HU112 #_ #IHTU11 #_ #U2 #l2 #HTU2
+  elim (IHTU11 … HTU2) -IHTU11 -HTU2 #Hl12 #H
+  lapply (cpcs_canc_sn … HU112 … H) -U11 /2 width=1/
+]
+qed-.
+
+(* Advanced properties ******************************************************)
+
+lemma snta_cast_alt: ∀h,L,T,W,U,l. ⦃h, L⦄ ⊢ T :[l] W → ⦃h, L⦄ ⊢ T :[l] U →
+             ⦃h, L⦄ ⊢ ⓝW.T :[l] U.
+#h #L #T #W #U #l #HTW #HTU
+elim (snta_mono … HTW … HTU) #_ #HWU
+elim (snta_fwd_correct … HTU) -HTU /3 width=3/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/snta/snta_thin.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/snta/snta_thin.etc
new file mode 100644 (file)
index 0000000..ceb5375
--- /dev/null
@@ -0,0 +1,116 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/thin_ldrop.ma".
+include "basic_2/equivalence/cpcs_delift.ma".
+include "basic_2/dynamic/snta_lift.ma".
+
+(* STRATIFIED NATIVE TYPE ASSIGNMENT ON TERMS *******************************)
+
+(* Properties on basic local environment thinning ***************************)
+
+(* Note: this is known as the substitution lemma *)
+lemma snta_thin_conf: ∀h,L1,T1,U1,l. ⦃h, L1⦄ ⊢ T1 :[l] U1 →
+                      ∀L2,d,e. ≽ [d, e] L1 → L1 ▼*[d, e] ≡ L2 →
+                      ∃∃T2,U2. ⦃h, L2⦄ ⊢ T2 :[l] U2 &
+                               L1 ⊢ T1 ▼*[d, e] ≡ T2 & L1 ⊢ U1 ▼*[d, e] ≡ U2.
+#h #L1 #T1 #U1 #l #H elim H -L1 -T1 -U1 -l
+[ /2 width=5/
+| #L1 #K1 #V1 #W1 #U1 #i #l #HLK1 #HVW1 #HWU1 #IHVW1 #L2 #d #e #HL1 #HL12
+  elim (lt_or_ge i d) #Hdi [ -HVW1 ]
+  [ lapply (sfr_ldrop_trans_ge … HLK1 … HL1 ?) -HL1 /2 width=2/ #H
+    lapply (sfr_inv_skip … H ?) -H /2 width=1/ #HK1
+    elim (thin_ldrop_conf_le … HL12 … HLK1 ?) -HL12 /2 width=2/ #X #H #HLK2
+    elim (thin_inv_delift1 … H ?) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
+    elim (IHVW1 … HK1 HK12) -IHVW1 -HK1 -HK12 #X2 #W2 #HVW2 #H #HW12
+    lapply (delift_mono … H … HV12) -H -HV12 #H destruct
+    elim (lift_total W2 0 (i+1)) #U2 #HWU2
+    lapply (ldrop_fwd_ldrop2 … HLK1) -V1 #HLK1
+    lapply (delift_lift_ge … HW12 … HLK1 HWU1 … HWU2) -HW12 -HLK1 -HWU1 //
+    >minus_plus <plus_minus_m_m // /3 width=6/
+  | elim (lt_or_ge i (d+e)) #Hide [ -HVW1 | -Hdi -IHVW1 -HL1 ]
+    [ lapply (sfr_ldrop_trans_be_up … HLK1 … HL1 ? ?) -HL1 // /2 width=2/ <minus_n_O #H
+      elim (sfr_inv_bind … H ?) -H /2 width=1/ #HK1 #_
+      elim (thin_ldrop_conf_be … HL12 … HLK1 ? ?) -HL12 /2 width=2/ #K2 #H #HLK2
+      lapply (thin_inv_thin1 … H ?) -H /2 width=1/ #HK12
+      elim (IHVW1 … HK1 HK12) -IHVW1 -HK1 -HK12 #V2 #W2 #HVW2 #HV12 #HW12
+      elim (lift_total V2 0 d) #T2 #HVT2
+      elim (lift_total W2 0 d) #U2 #HWU2
+      elim (lift_total W2 0 (i+1)) #U #HW2U
+      lapply (snta_lift … HVW2 … HLK2 … HVT2 … HWU2) -HVW2 -HLK2 #HTU2
+      lapply (ldrop_fwd_ldrop2 … HLK1) #HLK0
+      lapply (delift_lift_ge … HW12 … HLK0 HWU1 … HW2U) -HW12 -HLK0 -HWU1 // >minus_plus #HU1
+      lapply (lift_conf_be … HWU2 … HW2U ?) -W2 /2 width=1/ #HU2
+      lapply (delift_lift_div_be … HU1 … HU2 ? ?) -U // /2 width=1/ /3 width=8/
+    | lapply (transitive_le … (i+1) Hide ?) /2 width=1/ #Hdei
+      lapply (thin_ldrop_conf_ge … HL12 … HLK1 ?) -HL12 -HLK1 // #HL2K1
+      elim (lift_split … HWU1 d (i+1-e) ? ? ?) -HWU1 // /2 width=1/ #W
+      <plus_minus in ⊢ (??%??→?); /2 width=2/ #HW1
+      <minus_minus // /2 width=2/ -Hdei >commutative_plus <minus_n_n /3 width=6/
+    ]
+  ]
+| #L1 #K1 #W1 #V1 #U1 #i #l #HLK1 #HWV1 #HWU1 #IHWV1 #L2 #d #e #HL1 #HL12
+  elim (lt_or_ge i d) #Hdi [ -HWV1 | -IHWV1 ]
+  [ lapply (sfr_ldrop_trans_ge … HLK1 … HL1 ?) -HL1 /2 width=2/ #H
+    lapply (sfr_inv_skip … H ?) -H /2 width=1/ #HK1
+    elim (thin_ldrop_conf_le … HL12 … HLK1 ?) -HL12 /2 width=2/ #X #H #HLK2
+    elim (thin_inv_delift1 … H ?) -H /2 width=1/ #K2 #W2 #HK12 #HW12 #H destruct
+    elim (IHWV1 … HK1 HK12) -IHWV1 -HK1 -HK12 #X2 #V2 #HWV2 #H #_
+    lapply (delift_mono … H … HW12) -H #H destruct
+    elim (lift_total W2 0 (i+1)) #U2 #HWU2
+    lapply (ldrop_fwd_ldrop2 … HLK1) -HLK1 #HLK1
+    lapply (delift_lift_ge … HW12 … HLK1 HWU1 … HWU2) -HW12 -HLK1 -HWU1 //
+    >minus_plus <plus_minus_m_m // /3 width=6/
+  | elim (lt_or_ge i (d+e)) #Hide [ -HWV1 -HWU1 -HL12 | -Hdi -HL1 ]
+    [ lapply (sfr_inv_ldrop … HLK1 … HL1 ? ?) -HLK1 -HL1 // -Hdi -Hide #H destruct 
+    | lapply (transitive_le … (i+1) Hide ?) /2 width=1/ #Hdei
+      lapply (thin_ldrop_conf_ge … HL12 … HLK1 ?) -HL12 -HLK1 // #HL2K1
+      elim (lift_split … HWU1 d (i+1-e) ? ? ?) -HWU1 // /2 width=1/ #W
+      <plus_minus in ⊢ (??%??→?); /2 width=2/ #HW1
+      <minus_minus // /2 width=2/ -Hdei >commutative_plus <minus_n_n /3 width=6/
+    ]
+  ]
+| #I #L1 #V1 #W1 #T1 #U1 #l1 #l2 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL1 #HL12
+  elim (IHVW1 … HL1 HL12) -IHVW1 #V2 #W2 #HVW2 #HV12 #_
+  elim (IHTU1 (L2.ⓑ{I}V2) (d+1) e ? ?) -IHTU1 /2 width=1/ -HL1 -HL12 #T2 #U2 #HTU2 #HT12 #HU12
+  lapply (delift_lsubs_trans … HT12 (L1.ⓑ{I}V2) ?) -HT12 /2 width=1/
+  lapply (delift_lsubs_trans … HU12 (L1.ⓑ{I}V2) ?) -HU12 /2 width=1/ /3 width=7/
+| #L1 #V1 #W11 #W12 #T1 #U1 #l1 #l2 #_ #_ #IHVW1 #IHTU1 #L2 #d #e #HL1 #HL12
+  elim (IHVW1 … HL1 HL12) -IHVW1 #V2 #W22 #HVW2 #HV12 #HW122
+  elim (IHTU1 … HL1 HL12) -IHTU1 -HL1 -HL12 #X2 #Y2 #HXY2 #HX2 #HY2
+  elim (delift_inv_bind1 … HX2) -HX2 #W21 #T2 #W121 #HT12 #H destruct
+  elim (delift_inv_bind1 … HY2) -HY2 #X #U2 #HX #HU12 #H destruct
+  lapply (delift_mono … HX … HW122) -HX #H destruct
+  @(ex3_2_intro … (ⓐV2.ⓛW21.T2) (ⓐV2.ⓛW22.U2)) [ /2 width=2/ | 2,3: /3 width=1/ ] (**) (* explict constructor, /4 depth=?/ is too slow *)
+| #L1 #V1 #T1 #U1 #W1 #l #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL1 #HL12
+  elim (IHTU1 … HL1 HL12) -IHTU1 #T2 #U2 #HTU2 #HT12 #HU12
+  elim (IHUW1 … HL1 HL12) -IHUW1 -HL1 -HL12 #X2 #W2 #HXW2 #H #HW12
+  elim (delift_inv_flat1 … H) -H #V2 #Y2 #HV12 #HY2 #H destruct
+  lapply (delift_mono … HY2 … HU12) -HY2 #H destruct /3 width=7/
+| #L1 #T1 #U1 #W1 #l1 #l2 #_ #_ #IHTU1 #IHUW1 #L2 #d #e #HL1 #HL12
+  elim (IHTU1 … HL1 HL12) -IHTU1 #T2 #U2 #HTU2 #HT12 #HU12
+  elim (IHUW1 … HL1 HL12) -IHUW1 -HL1 -HL12 #Y2 #W2 #HUW2 #HY2 #HW12
+  lapply (delift_mono … HY2 … HU12) -HY2 #H destruct /3 width=5/
+| #L1 #T1 #U11 #U12 #V1 #l #_ #HU112 #_ #IHT1 #IHU12 #L2 #d #e #HL1 #HL12
+  elim (IHT1 … HL1 HL12) -IHT1 #T2 #U21 #HT2 #HT12 #HU121
+  elim (IHU12 … HL1 HL12) -IHU12 -HL1 #U22 #V2 #HU22 #HU122 #_
+  lapply (thin_cpcs_delift_mono … HU112 … HL12 … HU121 … HU122) -HU112 -HL12 -HU121 /3 width=5/
+]
+qed.
+
+lemma snta_ldrop_conf: ∀h,L1,T1,U1,l. ⦃h, L1⦄ ⊢ T1 :[l] U1 →
+                       ∀L2,d,e. ≽ [d, e] L1 → ⇩[d, e] L1 ≡ L2 →
+                       ∃∃T2,U2. ⦃h, L2⦄ ⊢ T2 :[l] U2 &
+                                L1 ⊢ T1 ▼*[d, e] ≡ T2 & L1 ⊢ U1 ▼*[d, e] ≡ U2.
+/3 width=1/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/sstas/sstas.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/sstas/sstas.etc
new file mode 100644 (file)
index 0000000..5954145
--- /dev/null
@@ -0,0 +1,110 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+notation "hvbox( ⦃ h , break L ⦄ ⊢ break term 46 T1 •* break [ g ] break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'StaticTypeStar $h $g $L $T1 $T2 }.
+
+include "basic_2/static/ssta.ma".
+
+(* ITERATED STRATIFIED STATIC TYPE ASSIGNMENTON TERMS ***********************)
+
+inductive sstas (h:sh) (g:sd h) (L:lenv): relation term ≝
+| sstas_refl: ∀T,U. ⦃h, L⦄ ⊢ T •[g, 0] U → sstas h g L T T
+| sstas_step: ∀T,U1,U2,l. ⦃h, L⦄ ⊢ T •[g, l+1] U1 → sstas h g L U1 U2 →
+              sstas h g L T U2.
+
+interpretation "stratified unwind (term)"
+   'StaticTypeStar h g L T U = (sstas h g L T U).
+
+(* Basic eliminators ********************************************************)
+
+fact sstas_ind_alt_aux: ∀h,g,L,U2. ∀R:predicate term.
+                        (∀T. ⦃h, L⦄ ⊢ U2 •[g , 0] T → R U2) →
+                        (∀T,U1,l. ⦃h, L⦄ ⊢ T •[g, l + 1] U1 →
+                                  ⦃h, L⦄ ⊢ U1 •* [g] U2 → R U1 → R T
+                        ) →
+                        ∀T,U. ⦃h, L⦄ ⊢ T •*[g] U → U = U2 → R T.
+#h #g #L #U2 #R #H1 #H2 #T #U #H elim H -H -T -U /2 width=2/ /3 width=5/
+qed-.
+
+lemma sstas_ind_alt: ∀h,g,L,U2. ∀R:predicate term.
+                     (∀T. ⦃h, L⦄ ⊢ U2 •[g , 0] T → R U2) →
+                     (∀T,U1,l. ⦃h, L⦄ ⊢ T •[g, l + 1] U1 →
+                               ⦃h, L⦄ ⊢ U1 •* [g] U2 → R U1 → R T
+                     ) →
+                     ∀T. ⦃h, L⦄ ⊢ T •*[g] U2 → R T.
+/3 width=9 by sstas_ind_alt_aux/ qed-.
+                         
+(* Basic inversion lemmas ***************************************************)
+
+fact sstas_inv_sort1_aux: ∀h,g,L,T,U. ⦃h, L⦄ ⊢ T •*[g] U → ∀k. T = ⋆k →
+                          ∀l. deg h g k l → U = ⋆((next h)^l k).
+#h #g #L #T #U #H @(sstas_ind_alt … H) -T
+[ #U0 #HU0 #k #H #l #Hkl destruct
+  elim (ssta_inv_sort1 … HU0) -L #HkO #_ -U0
+  >(deg_mono … Hkl HkO) -g -l //
+| #T0 #U0 #l0 #HTU0 #_ #IHU0 #k #H #l #Hkl destruct
+  elim (ssta_inv_sort1 … HTU0) -L #HkS #H destruct
+  lapply (deg_mono … Hkl HkS) -Hkl #H destruct
+  >(IHU0 (next h k) ? l0) -IHU0 // /2 width=1/ >iter_SO >iter_n_Sm //
+]
+qed.
+
+lemma sstas_inv_sort1: ∀h,g,L,U,k. ⦃h, L⦄ ⊢ ⋆k •*[g] U → ∀l. deg h g k l →
+                       U = ⋆((next h)^l k).
+/2 width=6/ qed-.
+
+fact sstas_inv_bind1_aux: ∀h,g,L,T,U. ⦃h, L⦄ ⊢ T •*[g] U →
+                          ∀J,X,Y. T = ⓑ{J}Y.X →
+                          ∃∃Z. ⦃h, L.ⓑ{J}Y⦄ ⊢ X •*[g] Z & U = ⓑ{J}Y.Z.
+#h #g #L #T #U #H @(sstas_ind_alt … H) -T
+[ #U0 #HU0 #J #X #Y #H destruct
+  elim (ssta_inv_bind1 … HU0) -HU0 #X0 #HX0 #H destruct /3 width=3/
+| #T0 #U0 #l #HTU0 #_ #IHU0 #J #X #Y #H destruct
+  elim (ssta_inv_bind1 … HTU0) -HTU0 #X0 #HX0 #H destruct
+  elim (IHU0 J X0 Y ?) -IHU0 // #X1 #HX01 #H destruct /3 width=4/
+]
+qed.
+
+lemma sstas_inv_bind1: ∀h,g,J,L,Y,X,U. ⦃h, L⦄ ⊢ ⓑ{J}Y.X •*[g] U →
+                       ∃∃Z. ⦃h, L.ⓑ{J}Y⦄ ⊢ X •*[g] Z & U = ⓑ{J}Y.Z.
+/2 width=3/ qed-.
+
+fact sstas_inv_appl1_aux: ∀h,g,L,T,U. ⦃h, L⦄ ⊢ T •*[g] U → ∀X,Y. T = ⓐY.X →
+                          ∃∃Z. ⦃h, L⦄ ⊢ X •*[g] Z & U = ⓐY.Z.
+#h #g #L #T #U #H @(sstas_ind_alt … H) -T
+[ #U0 #HU0 #X #Y #H destruct
+  elim (ssta_inv_appl1 … HU0) -HU0 #X0 #HX0 #H destruct /3 width=3/
+| #T0 #U0 #l #HTU0 #_ #IHU0 #X #Y #H destruct
+  elim (ssta_inv_appl1 … HTU0) -HTU0 #X0 #HX0 #H destruct
+  elim (IHU0 X0 Y ?) -IHU0 // #X1 #HX01 #H destruct /3 width=4/
+]
+qed.
+
+lemma sstas_inv_appl1: ∀h,g,L,Y,X,U. ⦃h, L⦄ ⊢ ⓐY.X •*[g] U →
+                       ∃∃Z. ⦃h, L⦄ ⊢ X •*[g] Z & U = ⓐY.Z.
+/2 width=3/ qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma sstas_fwd_correct: ∀h,g,L,T,U. ⦃h, L⦄ ⊢ T •*[g] U →
+                         ∃∃W. ⦃h, L⦄ ⊢ U •[g, 0] W & ⦃h, L⦄ ⊢ U •*[g] U.
+#h #g #L #T #U #H @(sstas_ind_alt … H) -T /2 width=1/ /3 width=2/
+qed-.
+
+(* Basic_1: removed theorems 7:
+            sty1_bind sty1_abbr sty1_appl sty1_cast2
+           sty1_lift sty1_correct sty1_trans
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/sstas/sstas_lift.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/sstas/sstas_lift.etc
new file mode 100644 (file)
index 0000000..838c7b6
--- /dev/null
@@ -0,0 +1,57 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/ssta_lift.ma".
+include "basic_2/unwind/sstas.ma".
+
+(* ITERATED STRATIFIED STATIC TYPE ASSIGNMENTON TERMS ***********************)
+
+(* Advanced properties ******************************************************)
+
+lemma sstas_total_S: ∀h,g,L,l,T,U. ⦃h, L⦄ ⊢ T•[g, l + 1]U →
+                     ∃∃W. ⦃h, L⦄ ⊢ T •*[g] W & ⦃h, L⦄ ⊢ U •*[g] W.
+#h #g #L #l @(nat_ind_plus … l) -l
+[ #T #U #HTU
+  elim (ssta_fwd_correct … HTU) /4 width=4/
+| #l #IHl #T #U #HTU
+  elim (ssta_fwd_correct … HTU) <minus_plus_m_m #V #HUV
+  elim (IHl … HUV) -IHl -HUV /3 width=4/
+]
+qed-.
+
+(* Properties on relocation *************************************************)
+
+lemma sstas_lift: ∀h,g,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 •*[g] U1 →
+                  ∀L2,d,e. ⇩[d, e] L2 ≡ L1 → ∀T2. ⇧[d, e] T1 ≡ T2 →
+                  ∀U2. ⇧[d, e] U1 ≡ U2 → ⦃h, L2⦄ ⊢ T2 •*[g] U2.
+#h #g #L1 #T1 #U1 #H @(sstas_ind_alt … H) -T1
+[ #T1 #HUT1 #L2 #d #e #HL21 #X #HX #U2 #HU12
+  >(lift_mono … HX … HU12) -X
+  elim (lift_total T1 d e) /3 width=10/
+| #T0 #U0 #l0 #HTU0 #_ #IHU01 #L2 #d #e #HL21 #T2 #HT02 #U2 #HU12
+  elim (lift_total U0 d e) /3 width=10/
+]
+qed.
+
+lemma sstas_inv_lift1: ∀h,g,L2,T2,U2. ⦃h, L2⦄ ⊢ T2 •*[g] U2 →
+                       ∀L1,d,e. ⇩[d, e] L2 ≡ L1 → ∀T1. ⇧[d, e] T1 ≡ T2 →
+                       ∃∃U1. ⦃h, L1⦄ ⊢ T1 •*[g] U1 & ⇧[d, e] U1 ≡ U2.
+#h #g #L2 #T2 #U2 #H @(sstas_ind_alt … H) -T2
+[ #T2 #HUT2 #L1 #d #e #HL21 #U1 #HU12
+  elim (ssta_inv_lift1 … HUT2 … HL21 … HU12) -HUT2 -HL21 /3 width=3/
+| #T0 #U0 #l0 #HTU0 #_ #IHU01 #L1 #d #e #HL21 #U1 #HU12
+  elim (ssta_inv_lift1 … HTU0 … HL21 … HU12) -HTU0 -HU12 #U #HU1 #HU0
+  elim (IHU01 … HL21 … HU0) -IHU01 -HL21 -U0 /3 width=4/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/sstas/sstas_ltpss.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/sstas/sstas_ltpss.etc
new file mode 100644 (file)
index 0000000..e0aa942
--- /dev/null
@@ -0,0 +1,55 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/ssta_ltpss.ma".
+include "basic_2/unwind/sstas.ma".
+
+(* ITERATED STRATIFIED STATIC TYPE ASSIGNMENTON TERMS ***********************)
+
+(* Properties about parallel unfold *****************************************)
+
+lemma sstas_ltpss_tpss_conf: ∀h,g,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 •*[g] U1 →
+                             ∀L2,d,e. L1 ▶* [d, e] L2 →
+                             ∀T2. L2 ⊢ T1 ▶* [d, e] T2 →
+                             ∃∃U2. ⦃h, L2⦄ ⊢ T2 •*[g] U2 &
+                                   L2 ⊢ U1 ▶* [d, e] U2.
+#h #g #L1 #T1 #U1 #H @(sstas_ind_alt … H) -T1
+[ #T1 #HUT1 #L2 #d #e #HL12 #U2 #HU12
+  elim (ssta_ltpss_tpss_conf … HUT1 … HL12 … HU12) -HUT1 -HL12 /3 width=3/
+| #T0 #U0 #l0 #HTU0 #_ #IHU01 #L2 #d #e #HL12 #T #HT0
+  elim (ssta_ltpss_tpss_conf … HTU0 … HL12 … HT0) -HTU0 -HT0 #U #HTU #HU0
+  elim (IHU01 … HL12 … HU0) -IHU01 -HL12 -U0 /3 width=4/
+]
+qed.
+
+lemma sstas_ltpss_tps_conf: ∀h,g,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 •*[g] U1 →
+                            ∀L2,d,e. L1 ▶* [d, e] L2 →
+                            ∀T2. L2 ⊢ T1 ▶ [d, e] T2 →
+                            ∃∃U2. ⦃h, L2⦄ ⊢ T2 •*[g] U2 & L2 ⊢ U1 ▶* [d, e] U2.
+/3 width=5/ qed.
+
+lemma sstas_ltpss_conf: ∀h,g,L1,T,U1. ⦃h, L1⦄ ⊢ T •*[g] U1 →
+                        ∀L2,d,e. L1 ▶* [d, e] L2 →
+                        ∃∃U2. ⦃h, L2⦄ ⊢ T •*[g] U2 & L2 ⊢ U1 ▶* [d, e] U2.
+/2 width=5/ qed.
+
+lemma sstas_tpss_conf: ∀h,g,L,T1,U1. ⦃h, L⦄ ⊢ T1 •*[g] U1 →
+                       ∀T2,d,e. L ⊢ T1 ▶* [d, e] T2 →
+                       ∃∃U2. ⦃h, L⦄ ⊢ T2 •*[g] U2 & L ⊢ U1 ▶* [d, e] U2.
+/2 width=5/ qed.
+
+lemma sstas_tps_conf: ∀h,g,L,T1,U1. ⦃h, L⦄ ⊢ T1 •*[g] U1 →
+                      ∀T2,d,e. L ⊢ T1 ▶ [d, e] T2 →
+                      ∃∃U2. ⦃h, L⦄ ⊢ T2 •*[g] U2 & L ⊢ U1 ▶* [d, e] U2.
+/2 width=5/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/sstas/sstas_sstas.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/sstas/sstas_sstas.etc
new file mode 100644 (file)
index 0000000..2f7e261
--- /dev/null
@@ -0,0 +1,74 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/delift_lift.ma".
+include "basic_2/static/ssta_ssta.ma".
+include "basic_2/unwind/sstas_lift.ma".
+
+(* ITERATED STRATIFIED STATIC TYPE ASSIGNMENTON TERMS ***********************)
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma sstas_inv_O: ∀h,g,L,T,U. ⦃h, L⦄ ⊢ T •*[g] U →
+                   ∀T0. ⦃h, L⦄ ⊢ T •[g , 0] T0 → U = T.
+#h #g #L #T #U #H @(sstas_ind_alt … H) -T //
+#T0 #U0 #l0 #HTU0 #_ #_ #T1 #HT01
+elim (ssta_mono … HTU0 … HT01) <plus_n_Sm #H destruct
+qed-.
+
+lemma sstas_inv_S: ∀h,g,L,T,U. ⦃h, L⦄ ⊢ T •*[g] U →
+                   ∀T0,l. ⦃h, L⦄ ⊢ T •[g , l+1] T0 → ⦃h, L⦄ ⊢ T0 •*[g] U.
+#h #g #L #T #U #H @(sstas_ind_alt … H) -T
+[ #U0 #HU0 #T #l #HUT
+  elim (ssta_mono … HUT … HU0) <plus_n_Sm #H destruct
+| #T0 #U0 #l0 #HTU0 #HU0 #_ #T #l #HT0
+  elim (ssta_mono … HT0 … HTU0) -T0 #_ #H destruct -l0 //
+]
+qed-.
+
+(* Main properties **********************************************************)
+
+theorem sstas_mono: ∀h,g,L,T,U1. ⦃h, L⦄ ⊢ T •*[g] U1 →
+                    ∀U2. ⦃h, L⦄ ⊢ T •*[g] U2 → U1 = U2.
+#h #g #L #T #U1 #H @(sstas_ind_alt … H) -T
+[ #T1 #HUT1 #U2 #HU12
+  >(sstas_inv_O … HU12 … HUT1) -h -L -T1 -U2 //
+| #T0 #U0 #l0 #HTU0 #_ #IHU01 #U2 #HU12
+  lapply (sstas_inv_S … HU12 … HTU0) -T0 -l0 /2 width=1/
+]
+qed-.
+
+(* More advancd inversion lemmas ********************************************)
+
+fact sstas_inv_lref1_aux: ∀h,g,L,T,U. ⦃h, L⦄ ⊢ T •*[g] U → ∀j. T = #j →
+                          ∃∃I,K,V,W. ⇩[0, j] L ≡ K. ⓑ{I}V & ⦃h, K⦄ ⊢ V •*[g] W &
+                                     L ⊢ ▼*[0, j + 1] U ≡ W.
+#h #g #L #T #U #H @(sstas_ind_alt … H) -T
+[ #T #HUT #j #H destruct
+  elim (ssta_inv_lref1 … HUT) -HUT * #K #V #W [2: #l] #HLK #HVW #HVT
+  [ <plus_n_Sm #H destruct
+  | /3 width=12/
+  ]
+| #T0 #U0 #l0 #HTU0 #HU0 #_ #j #H destruct
+  elim (ssta_inv_lref1 … HTU0) -HTU0 * #K #V #W [2: #l] #HLK #HVW #HVU0
+  [ #_ -HVW
+    lapply (ldrop_fwd_ldrop2 … HLK) #H
+    elim (sstas_inv_lift1 … HU0 … H … HVU0) -HU0 -H -HVU0 /3 width=7/
+  | elim (sstas_total_S … HVW) -HVW #T #HVT #HWT
+    lapply (ldrop_fwd_ldrop2 … HLK) #H
+    elim (sstas_inv_lift1 … HU0 … H … HVU0) -HU0 -H -HVU0 #X #HWX
+    >(sstas_mono … HWX … HWT) -X -W /3 width=7/
+  ]
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/sta/sta.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/sta/sta.etc
new file mode 100644 (file)
index 0000000..20302c6
--- /dev/null
@@ -0,0 +1,128 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/ldrop.ma".
+include "basic_2/static/sh.ma".
+
+(* STATIC TYPE ASSIGNMENT ON TERMS ******************************************)
+
+inductive sta (h:sh): lenv → relation term ≝
+| sta_sort: ∀L,k. sta h L (⋆k) (⋆(next h k))
+| sta_ldef: ∀L,K,V,W,U,i. ⇩[0, i] L ≡ K. ⓓV → sta h K V W →
+            ⇧[0, i + 1] W ≡ U → sta h L (#i) U
+| sta_ldec: ∀L,K,W,V,U,i. ⇩[0, i] L ≡ K. ⓛW → sta h K W V →
+            ⇧[0, i + 1] W ≡ U → sta h L (#i) U
+| sta_bind: ∀I,L,V,T,U. sta h (L. ⓑ{I} V) T U →
+            sta h L (ⓑ{I}V.T) (ⓑ{I}V.U)
+| sta_appl: ∀L,V,T,U. sta h L T U →
+            sta h L (ⓐV.T) (ⓐV.U)
+| sta_cast: ∀L,W,T,U. sta h L T U → sta h L (ⓝW. T) U
+.
+
+interpretation "static type assignment (term)"
+   'StaticType h L T U = (sta h L T U).
+
+(* Basic inversion lemmas ************************************************)
+
+fact sta_inv_sort1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T • U → ∀k0. T = ⋆k0 →
+                        U = ⋆(next h k0).
+#h #L #T #U * -L -T -U
+[ #L #k #k0 #H destruct //
+| #L #K #V #W #U #i #_ #_ #_ #k0 #H destruct
+| #L #K #W #V #U #i #_ #_ #_ #k0 #H destruct
+| #I #L #V #T #U #_ #k0 #H destruct
+| #L #V #T #U #_ #k0 #H destruct
+| #L #W #T #U #_ #k0 #H destruct
+qed.
+
+(* Basic_1: was: sty0_gen_sort *)
+lemma sta_inv_sort1: ∀h,L,U,k. ⦃h, L⦄ ⊢ ⋆k • U → U = ⋆(next h k).
+/2 width=4/ qed-.
+
+fact sta_inv_lref1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T • U → ∀j. T = #j →
+                        (∃∃K,V,W. ⇩[0, j] L ≡ K. ⓓV & ⦃h, K⦄ ⊢ V • W &
+                                  ⇧[0, j + 1] W ≡ U
+                        ) ∨
+                        (∃∃K,W,V. ⇩[0, j] L ≡ K. ⓛW & ⦃h, K⦄ ⊢ W • V &
+                                  ⇧[0, j + 1] W ≡ U
+                        ).
+#h #L #T #U * -L -T -U
+[ #L #k #j #H destruct
+| #L #K #V #W #U #i #HLK #HVW #HWU #j #H destruct /3 width=6/
+| #L #K #W #V #U #i #HLK #HWV #HWU #j #H destruct /3 width=6/
+| #I #L #V #T #U #_ #j #H destruct
+| #L #V #T #U #_ #j #H destruct
+| #L #W #T #U #_ #j #H destruct
+]
+qed.
+
+(* Basic_1: was sty0_gen_lref *)
+lemma sta_inv_lref1: ∀h,L,U,i. ⦃h, L⦄ ⊢ #i • U →
+                     (∃∃K,V,W. ⇩[0, i] L ≡ K. ⓓV & ⦃h, K⦄ ⊢ V • W &
+                               ⇧[0, i + 1] W ≡ U
+                     ) ∨
+                     (∃∃K,W,V. ⇩[0, i] L ≡ K. ⓛW & ⦃h, K⦄ ⊢ W • V &
+                               ⇧[0, i + 1] W ≡ U
+                     ).
+/2 width=3/ qed-.
+
+fact sta_inv_bind1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T • U → ∀J,X,Y. T = ⓑ{J}Y.X →
+                        ∃∃Z. ⦃h, L.ⓑ{J}Y⦄ ⊢ X • Z & U = ⓑ{J}Y.Z.
+#h #L #T #U * -L -T -U
+[ #L #k #J #X #Y #H destruct
+| #L #K #V #W #U #i #_ #_ #_ #J #X #Y #H destruct
+| #L #K #W #V #U #i #_ #_ #_ #J #X #Y #H destruct
+| #I #L #V #T #U #HTU #J #X #Y #H destruct /2 width=3/
+| #L #V #T #U #_ #J #X #Y #H destruct
+| #L #W #T #U #_ #J #X #Y #H destruct
+]
+qed.
+
+(* Basic_1: was: sty0_gen_bind *)
+lemma sta_inv_bind1: ∀h,J,L,Y,X,U. ⦃h, L⦄ ⊢ ⓑ{J}Y.X • U →
+                     ∃∃Z. ⦃h, L.ⓑ{J}Y⦄ ⊢ X • Z & U = ⓑ{J}Y.Z.
+/2 width=3/ qed-.
+
+fact sta_inv_appl1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T • U → ∀X,Y. T = ⓐY.X →
+                        ∃∃Z. ⦃h, L⦄ ⊢ X • Z & U = ⓐY.Z.
+#h #L #T #U * -L -T -U
+[ #L #k #X #Y #H destruct
+| #L #K #V #W #U #i #_ #_ #_ #X #Y #H destruct
+| #L #K #W #V #U #i #_ #_ #_ #X #Y #H destruct
+| #I #L #V #T #U #_ #X #Y #H destruct
+| #L #V #T #U #HTU #X #Y #H destruct /2 width=3/
+| #L #W #T #U #_ #X #Y #H destruct
+]
+qed.
+
+(* Basic_1: was: sty0_gen_appl *)
+lemma sta_inv_appl1: ∀h,L,Y,X,U. ⦃h, L⦄ ⊢ ⓐY.X • U →
+                     ∃∃Z. ⦃h, L⦄ ⊢ X • Z & U = ⓐY.Z.
+/2 width=3/ qed-.
+
+fact sta_inv_cast1_aux: ∀h,L,T,U. ⦃h, L⦄ ⊢ T • U → ∀X,Y. T = ⓝY.X →
+                     ⦃h, L⦄ ⊢ X • U.
+#h #L #T #U * -L -T -U
+[ #L #k #X #Y #H destruct
+| #L #K #V #W #U #i #_ #_ #_ #X #Y #H destruct
+| #L #K #W #V #U #i #_ #_ #_ #X #Y #H destruct
+| #I #L #V #T #U #_ #X #Y #H destruct
+| #L #V #T #U #_ #X #Y #H destruct
+| #L #W #T #U #HTU #X #Y #H destruct //
+]
+qed.
+
+(* Basic_1: was: sty0_gen_cast *)
+lemma sta_inv_cast1: ∀h,L,X,Y,U. ⦃h, L⦄ ⊢ ⓝY.X • U →  ⦃h, L⦄ ⊢ X • U.
+/2 width=4/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/sta/sta_lift.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/sta/sta_lift.etc
new file mode 100644 (file)
index 0000000..c9fbda0
--- /dev/null
@@ -0,0 +1,120 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/ldrop_ldrop.ma".
+include "basic_2/static/sta.ma".
+
+(* STATIC TYPE ASSIGNMENT ON TERMS ******************************************)
+
+(* Properties on relocation *************************************************)
+
+(* Basic_1: was: sty0_lift *)
+lemma sta_lift: ∀h,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 • U1 → ∀L2,d,e. ⇩[d, e] L2 ≡ L1 →
+                ∀T2. ⇧[d, e] T1 ≡ T2 → ∀U2. ⇧[d, e] U1 ≡ U2 → ⦃h, L2⦄ ⊢ T2 • U2.
+#h #L1 #T1 #U1 #H elim H -L1 -T1 -U1
+[ #L1 #k #L2 #d #e #HL21 #X1 #H1 #X2 #H2
+  >(lift_inv_sort1 … H1) -X1
+  >(lift_inv_sort1 … H2) -X2 //
+| #L1 #K1 #V1 #W1 #W #i #HLK1 #_ #HW1 #IHVW1 #L2 #d #e #HL21 #X #H #U2 #HWU2
+  elim (lift_inv_lref1 … H) * #Hid #H destruct
+  [ elim (lift_trans_ge … HW1 … HWU2 ?) -W // #W2 #HW12 #HWU2
+    elim (ldrop_trans_le … HL21 … HLK1 ?) -L1 /2 width=2/ #X #HLK2 #H
+    elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K2 #V2 #HK21 #HV12 #H destruct
+    /3 width=8/
+  | lapply (lift_trans_be … HW1 … HWU2 ? ?) -W // /2 width=1/ #HW1U2
+    lapply (ldrop_trans_ge … HL21 … HLK1 ?) -L1 // -Hid /3 width=8/
+  ]
+| #L1 #K1 #W1 #V1 #W #i #HLK1 #_ #HW1 #IHWV1 #L2 #d #e #HL21 #X #H #U2 #HWU2
+  elim (lift_inv_lref1 … H) * #Hid #H destruct
+  [ elim (lift_trans_ge … HW1 … HWU2 ?) -W // <minus_plus #W #HW1 #HWU2
+    elim (ldrop_trans_le … HL21 … HLK1 ?) -L1 /2 width=2/ #X #HLK2 #H
+    elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K2 #W2 #HK21 #HW12 #H destruct
+    lapply (lift_mono … HW1 … HW12) -HW1 #H destruct
+    elim (lift_total V1 (d-i-1) e) /3 width=8/
+  | lapply (lift_trans_be … HW1 … HWU2 ? ?) -W // /2 width=1/ #HW1U2
+    lapply (ldrop_trans_ge … HL21 … HLK1 ?) -L1 // -Hid /3 width=8/
+  ]
+| #I #L1 #V1 #T1 #U1 #_ #IHTU1 #L2 #d #e #HL21 #X1 #H1 #X2 #H2
+  elim (lift_inv_bind1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H destruct
+  elim (lift_inv_bind1 … H2) -H2 #X #U2 #H1 #HU12 #H2 destruct
+  lapply (lift_mono … H1 … HV12) -H1 #H destruct /4 width=5/
+| #L1 #V1 #T1 #U1 #_ #IHTU1 #L2 #d #e #HL21 #X1 #H1 #X2 #H2
+  elim (lift_inv_flat1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H destruct
+  elim (lift_inv_flat1 … H2) -H2 #X #U2 #H1 #HU12 #H2 destruct
+  lapply (lift_mono … H1 … HV12) -H1 #H destruct /4 width=5/
+| #L1 #W1 #T1 #U1 #_ #IHTU1 #L2 #d #e #HL21 #X #H #U2 #HU12
+  elim (lift_inv_flat1 … H) -H #W2 #T2 #_ #HT12 #H destruct /3 width=5/
+]
+qed.
+
+(* Note: apparently this was missing in basic_1 *)
+lemma sta_inv_lift1: ∀h,L2,T2,U2. ⦃h, L2⦄ ⊢ T2 • U2 → ∀L1,d,e. ⇩[d, e] L2 ≡ L1 →
+                     ∀T1. ⇧[d, e] T1 ≡ T2 →
+                     ∃∃U1. ⦃h, L1⦄ ⊢ T1 • U1 & ⇧[d, e] U1 ≡ U2.
+#h #L2 #T2 #U2 #H elim H -L2 -T2 -U2
+[ #L2 #k #L1 #d #e #_ #X #H
+  >(lift_inv_sort2 … H) -X /2 width=3/
+| #L2 #K2 #V2 #W2 #W #i #HLK2 #HVW2 #HW2 #IHVW2 #L1 #d #e #HL21 #X #H
+  elim (lift_inv_lref2 … H) * #Hid #H destruct [ -HVW2 | -IHVW2 ]
+  [ elim (ldrop_conf_lt … HL21 … HLK2 ?) -L2 // #K1 #V1 #HLK1 #HK21 #HV12
+    elim (IHVW2 … HK21 … HV12) -K2 -V2 #W1 #HVW1 #HW12
+    elim (lift_trans_le … HW12 … HW2 ?) -W2 // >minus_plus <plus_minus_m_m // -Hid /3 width=6/
+  | lapply (ldrop_conf_ge … HL21 … HLK2 ?) -L2 // #HL1K2
+    elim (le_inv_plus_l … Hid) -Hid #Hdie #ei
+    elim (lift_split … HW2 d (i-e+1) ? ? ?) -HW2 // [3: /2 width=1/ ]
+    [ #W0 #HW20 <le_plus_minus_comm // >minus_minus_m_m /2 width=1/ /3 width=6/
+    | <le_plus_minus_comm // /2 width=1/
+    ]
+  ]
+| #L2 #K2 #W2 #V2 #W #i #HLK2 #HWV2 #HW2 #IHWV2 #L1 #d #e #HL21 #X #H
+  elim (lift_inv_lref2 … H) * #Hid #H destruct [ -HWV2 | -IHWV2 ]
+  [ elim (ldrop_conf_lt … HL21 … HLK2 ?) -L2 // #K1 #W1 #HLK1 #HK21 #HW12
+    elim (IHWV2 … HK21 … HW12) -K2 #V1 #HWV1 #_
+    elim (lift_trans_le … HW12 … HW2 ?) -W2 // >minus_plus <plus_minus_m_m // -Hid /3 width=6/
+  | lapply (ldrop_conf_ge … HL21 … HLK2 ?) -L2 // #HL1K2
+    elim (le_inv_plus_l … Hid) -Hid #Hdie #ei
+    elim (lift_split … HW2 d (i-e+1) ? ? ?) -HW2 // [3: /2 width=1/ ]
+    [ #W0 #HW20 <le_plus_minus_comm // >minus_minus_m_m /2 width=1/ /3 width=6/
+    | <le_plus_minus_comm // /2 width=1/
+    ]
+  ]
+| #I #L2 #V2 #T2 #U2 #_ #IHTU2 #L1 #d #e #HL21 #X #H
+  elim (lift_inv_bind2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
+  elim (IHTU2 (L1.ⓑ{I}V1) … HT12) -IHTU2 -HT12 /2 width=1/ -HL21 /3 width=5/
+| #L2 #V2 #T2 #U2 #_ #IHTU2 #L1 #d #e #HL21 #X #H
+  elim (lift_inv_flat2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
+  elim (IHTU2 … HL21 … HT12) -L2 -HT12 /3 width=5/
+| #L2 #W2 #T2 #U2 #_ #IHTU2 #L1 #d #e #HL21 #X #H
+  elim (lift_inv_flat2 … H) -H #W1 #T1 #_ #HT12 #H destruct
+  elim (IHTU2 … HL21 … HT12) -L2 -HT12 /3 width=3/
+]
+qed.  
+
+(* Advanced forvard lemmas **************************************************)
+
+(* Basic_1: was: sty0_correct *)
+lemma sta_fwd_correct: ∀h,L,T,U. ⦃h, L⦄ ⊢ T • U → ∃T0. ⦃h, L⦄ ⊢ U • T0.
+#h #L #T #U #H elim H -L -T -U
+[ /2 width=2/
+| #L #K #V #W #W0 #i #HLK #_ #HW0 * #V0 #HWV0
+  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
+  elim (lift_total V0 0 (i+1)) /3 width=10/
+| #L #K #W #V #V0 #i #HLK #HWV #HWV0 #_
+  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
+  elim (lift_total V 0 (i+1)) /3 width=10/
+| #I #L #V #T #U #_ * /3 width=2/
+| #L #V #T #U #_ * #T0 #HUT0 /3 width=2/
+| #L #W #T #U #_ * /2 width=2/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/sta/sta_ltpss.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/sta/sta_ltpss.etc
new file mode 100644 (file)
index 0000000..b0232f5
--- /dev/null
@@ -0,0 +1,122 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/tpss_tpss.ma".
+include "basic_2/unfold/ltpss_tpss.ma".
+include "basic_2/static/sta_lift.ma".
+
+(* STATIC TYPE ASSIGNMENT ON TERMS ******************************************)
+
+(* Properties about parallel unfold *****************************************)
+
+lemma sta_ltpss_tpss_conf: ∀h,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 • U1 →
+                           ∀L2,d,e. L1 ▶* [d, e] L2 →
+                           ∀T2. L2 ⊢ T1 ▶* [d, e] T2 →
+                           ∃∃U2. ⦃h, L2⦄ ⊢ T2 • U2 & L2 ⊢ U1 ▶* [d, e] U2.
+#h #L1 #T1 #U #H elim H -L1 -T1 -U
+[ #L1 #k1 #L2 #d #e #_ #T2 #H
+  >(tpss_inv_sort1 … H) -H /2 width=3/
+| #L1 #K1 #V1 #W1 #U1 #i #HLK1 #HVW1 #HWU1 #IHVW1 #L2 #d #e #HL12 #T2 #H
+  elim (tpss_inv_lref1 … H) -H [ | -HVW1 ]
+  [ #H destruct
+    elim (lt_or_ge i d) #Hdi [ -HVW1 | ]
+    [ elim (ltpss_ldrop_conf_le … HL12 … HLK1 ?) -L1 /2 width=2/ #X #H #HLK2
+      elim (ltpss_inv_tpss11 … H ?) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
+      elim (IHVW1 … HK12 … HV12) -IHVW1 -HK12 -HV12 #W2 #HVW2 #HW12
+      lapply (ldrop_fwd_ldrop2 … HLK2) #H
+      elim (lift_total W2 0 (i+1)) #U2 #HWU2
+      lapply (tpss_lift_ge … HW12 … H … HWU1 … HWU2) // -HW12 -H -HWU1
+      >minus_plus <plus_minus_m_m // -Hdi /3 width=6/
+    | elim (lt_or_ge i (d + e)) #Hide [ -HVW1 | -Hdi -IHVW1 ]
+      [ elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HLK2
+        elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
+        elim (IHVW1 … HK12 … HV12) -IHVW1 -HK12 -HV12 #W2 #HVW2 #HW12
+        lapply (ldrop_fwd_ldrop2 … HLK2) #H
+        elim (lift_total W2 0 (i+1)) #U2 #HWU2
+        lapply (tpss_lift_ge … HW12 … H … HWU1 … HWU2) // -HW12 -H -HWU1 >minus_plus #H
+        lapply (tpss_weak … H d e ? ?) [1,2: normalize [ >commutative_plus <plus_minus_m_m // | /2 width=1/ ]] -Hdi -Hide /3 width=6/
+      | lapply (ltpss_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /3 width=6/
+      ]
+    ]
+  | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #HVW2 #HWT2
+    elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HL2K0
+    elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ #K0 #V0 #HK12 #HV12 #H destruct
+    lapply (ldrop_mono … HL2K0 … HLK2) -HL2K0 #H destruct
+    lapply (ldrop_fwd_ldrop2 … HLK2) -HLK2 #HLK2
+    lapply (tpss_trans_eq … HV12 HVW2) -V2 #HV1W2
+    elim (IHVW1 … HK12 … HV1W2) -IHVW1 -HK12 -HV1W2 #V2 #HWV2 #HW1V2
+    elim (lift_total V2 0 (i+1)) #U2 #HVU2
+    lapply (sta_lift … HWV2 … HLK2 … HWT2 … HVU2) -HWV2 -HWT2 #HTU2
+    lapply (tpss_lift_ge … HW1V2 … HLK2 … HWU1 … HVU2) // -HW1V2 -HLK2 -HWU1 -HVU2 >minus_plus #H
+    lapply (tpss_weak … H d e ? ?) [1,2: normalize [ >commutative_plus <plus_minus_m_m // | /2 width=1/ ]] -Hdi -Hide /2 width=3/
+  ]
+| #L1 #K1 #W1 #V1 #U1 #i #HLK1 #HWV1 #HWU1 #IHWV1 #L2 #d #e #HL12 #T2 #H
+  elim (tpss_inv_lref1 … H) -H [ | -HWV1 -HWU1 -IHWV1 ]
+  [ #H destruct
+    elim (lt_or_ge i d) #Hdi [ -HWV1 ]
+    [ elim (ltpss_ldrop_conf_le … HL12 … HLK1 ?) -L1 /2 width=2/ #X #H #HLK2
+      elim (ltpss_inv_tpss11 … H ?) -H /2 width=1/ #K2 #W2 #HK12 #HW12 #H destruct
+      elim (IHWV1 … HK12 … HW12) -IHWV1 -HK12 #V2 #HWV2 #_
+      lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
+      elim (lift_total W2 0 (i+1)) #U2 #HWU2
+      lapply (tpss_lift_ge … HW12 … HLK … HWU1 … HWU2) // -HW12 -HLK -HWU1
+      >minus_plus <plus_minus_m_m // -Hdi /3 width=6/
+    | elim (lt_or_ge i (d + e)) #Hide [ -HWV1 | -IHWV1 -Hdi ]
+      [ elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HLK2
+        elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ #K2 #W2 #HK12 #HW12 #H destruct
+        elim (IHWV1 … HK12 … HW12) -IHWV1 -HK12 #V2 #HWV2 #_
+        lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
+        elim (lift_total W2 0 (i+1)) #U2 #HWU2
+        lapply (tpss_lift_ge … HW12 … HLK … HWU1 … HWU2) // -HW12 -HLK -HWU1 >minus_plus #H
+        lapply (tpss_weak … H d e ? ?) [1,2: normalize [ >commutative_plus <plus_minus_m_m // | /2 width=1/ ]] -Hdi -Hide /3 width=6/
+      | lapply (ltpss_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /3 width=6/
+      ]
+    ]
+  | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #_ #_
+    elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HL2K0
+    elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K0 #V0 #_ #_ #H destruct
+    lapply (ldrop_mono … HL2K0 … HLK2) -HL2K0 -HLK2 #H destruct
+  ]
+| #I #L1 #V1 #T1 #U1 #_ #IHTU1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+  elim (IHTU1 … HT12) -IHTU1 -HT12 /2 width=1/ -HL12 /3 width=5/
+| #L1 #V1 #T1 #U1 #_ #IHTU1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+  elim (IHTU1 … HT12) -IHTU1 -HT12 // -HL12 /3 width=5/
+| #L1 #W1 #T1 #U1 #_ #IHTU1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_flat1 … H) -H #W2 #T2 #HW12 #HT12 #H destruct
+  elim (IHTU1 … HT12) -IHTU1 -HT12 // -HL12 /3 width=3/
+]
+qed.
+
+lemma sta_ltpss_tps_conf: ∀h,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 • U1 →
+                          ∀L2,d,e. L1 ▶* [d, e] L2 →
+                          ∀T2. L2 ⊢ T1 ▶ [d, e] T2 →
+                          ∃∃U2. ⦃h, L2⦄ ⊢ T2 • U2 & L2 ⊢ U1 ▶* [d, e] U2.
+/3 width=5/ qed.
+
+lemma sta_ltpss_conf: ∀h,L1,T,U1. ⦃h, L1⦄ ⊢ T • U1 →
+                      ∀L2,d,e. L1 ▶* [d, e] L2 →
+                      ∃∃U2. ⦃h, L2⦄ ⊢ T • U2 & L2 ⊢ U1 ▶* [d, e] U2.
+/2 width=5/ qed.
+
+lemma sta_tpss_conf: ∀h,L,T1,U1. ⦃h, L⦄ ⊢ T1 • U1 →
+                     ∀T2,d,e. L ⊢ T1 ▶* [d, e] T2 →
+                     ∃∃U2. ⦃h, L⦄ ⊢ T2 • U2 & L ⊢ U1 ▶* [d, e] U2.
+/2 width=5/ qed.
+
+lemma sta_tps_conf: ∀h,L,T1,U1. ⦃h, L⦄ ⊢ T1 • U1 →
+                    ∀T2,d,e. L ⊢ T1 ▶ [d, e] T2 →
+                    ∃∃U2. ⦃h, L⦄ ⊢ T2 • U2 & L ⊢ U1 ▶* [d, e] U2.
+/2 width=5/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/sta/sta_sta.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/sta/sta_sta.etc
new file mode 100644 (file)
index 0000000..cfbb192
--- /dev/null
@@ -0,0 +1,44 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/ldrop_ldrop.ma".
+include "basic_2/static/sta.ma".
+
+(* STATIC TYPE ASSIGNMENT ON TERMS ******************************************)
+
+(* Main properties **********************************************************)
+
+(* Note: apparently this was missing in basic_1 *)
+theorem sta_mono: ∀h,L,T,U1. ⦃h, L⦄ ⊢ T • U1 →
+                  ∀U2. ⦃h, L⦄ ⊢ T • U2 → U1 = U2.
+#h #L #T #U1 #H elim H -L -T -U1
+[ #L #k #X #H >(sta_inv_sort1 … H) -X //
+| #L #K #V #W #U1 #i #HLK #_ #HWU1 #IHVW #U2 #H
+  elim (sta_inv_lref1 … H) -H * #K0 #V0 #W0 #HLK0 #HVW0 #HW0U2
+  lapply (ldrop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct
+  lapply (IHVW … HVW0) -IHVW -HVW0 #H destruct
+  >(lift_mono … HWU1 … HW0U2) -W0 -U1 //
+| #L #K #W #V #U1 #i #HLK #_ #HWU1 #IHWV #U2 #H
+  elim (sta_inv_lref1 … H) -H * #K0 #W0 #V0 #HLK0 #HWV0 #HV0U2
+  lapply (ldrop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct
+  lapply (IHWV … HWV0) -IHWV -HWV0 #H destruct
+  >(lift_mono … HWU1 … HV0U2) -W -U1 //
+| #I #L #V #T #U1 #_ #IHTU1 #X #H
+  elim (sta_inv_bind1 … H) -H #U2 #HTU2 #H destruct /3 width=1/
+| #L #V #T #U1 #_ #IHTU1 #X #H
+  elim (sta_inv_appl1 … H) -H #U2 #HTU2 #H destruct /3 width=1/
+| #L #W #T #U1 #_ #IHTU1 #U2 #H
+  lapply (sta_inv_cast1 … H) -H /2 width=1/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/top/lenv_top.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/top/lenv_top.etc
new file mode 100644 (file)
index 0000000..ab90ceb
--- /dev/null
@@ -0,0 +1,68 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+notation "hvbox( T1 𝟙 break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'RTop $T1 $T2 }.
+
+include "basic_2/grammar/lenv_px.ma".
+
+(* POINTWISE EXTENSION OF TOP RELATION FOR TERMS ****************************)
+
+definition ttop: relation term ≝ λT1,T2. True.
+
+definition ltop: relation lenv ≝ lpx ttop.
+
+interpretation
+  "top reduction (environment)"
+  'RTop L1 L2 = (ltop L1 L2).
+
+(* Basic properties *********************************************************)
+
+lemma ltop_refl: reflexive … ltop.
+/2 width=1/ qed.
+
+lemma ltop_sym: symmetric … ltop.
+/2 width=1/ qed.
+
+lemma ltop_trans: transitive … ltop.
+/2 width=3/ qed.
+
+lemma ltop_append: ∀K1,K2. K1 𝟙 K2 → ∀L1,L2. L1 𝟙 L2 → L1 @@ K1 𝟙 L2 @@ K2.
+/2 width=1/ qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma ltop_inv_atom1: ∀L2. ⋆ 𝟙 L2 → L2 = ⋆.
+/2 width=2 by lpx_inv_atom1/ qed-.
+
+lemma ltop_inv_pair1: ∀K1,I,V1,L2. K1. ⓑ{I} V1 𝟙 L2 →
+                      ∃∃K2,V2. K1 𝟙 K2 & L2 = K2. ⓑ{I} V2.
+#K1 #I #V1 #L2 #H
+elim (lpx_inv_pair1 … H) -H /2 width=4/
+qed-.
+
+lemma ltop_inv_atom2: ∀L1. L1 𝟙 ⋆ → L1 = ⋆.
+/2 width=2 by lpx_inv_atom2/ qed-.
+
+lemma ltop_inv_pair2: ∀L1,K2,I,V2. L1 𝟙 K2. ⓑ{I} V2 →
+                      ∃∃K1,V1. K1 𝟙 K2 & L1 = K1. ⓑ{I} V1.
+#L1 #K2 #I #V2 #H
+elim (lpx_inv_pair2 … H) -H /2 width=4/
+qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma ltop_fwd_length: ∀L1,L2. L1 𝟙 L2 → |L1| = |L2|.
+/2 width=2 by lpx_fwd_length/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/aarity.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/aarity.ma
new file mode 100644 (file)
index 0000000..7489da1
--- /dev/null
@@ -0,0 +1,73 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* THE FORMAL SYSTEM λδ: MATITA SOURCE FILES
+ * Suggested invocation to start formal specifications with:
+ *   - Patience on me to gain peace and perfection! -
+ *)
+
+include "ground_2/star.ma".
+include "basic_2/notation.ma".
+
+(* ATOMIC ARITY *************************************************************)
+
+inductive aarity: Type[0] ≝
+  | AAtom: aarity                   (* atomic aarity construction *)
+  | APair: aarity → aarity → aarity (* binary aarity construction *)
+.
+
+interpretation "aarity construction (atomic)"
+   'Item0 = AAtom.
+
+interpretation "aarity construction (binary)"
+   'SnItem2 A1 A2 = (APair A1 A2).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma discr_apair_xy_x: ∀A,B. ②B. A = B → ⊥.
+#A #B elim B -B
+[ #H destruct
+| #Y #X #IHY #_ #H destruct
+  -H >e0 in e1; normalize (**) (* destruct: one quality is not simplified, the destucted equality is not erased *)
+  /2 width=1/
+]
+qed-.
+
+lemma discr_tpair_xy_y: ∀B,A. ②B. A = A → ⊥.
+#B #A elim A -A
+[ #H destruct
+| #Y #X #_ #IHX #H destruct
+  -H (**) (* destruct: the destucted equality is not erased *)
+  /2 width=1/
+]
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma aarity_eq_dec: ∀A1,A2:aarity. Decidable (A1 = A2).
+#A1 elim A1 -A1
+[ #A2 elim A2 -A2 /2 width=1/
+  #B2 #A2 #_ #_ @or_intror #H destruct
+| #B1 #A1 #IHB1 #IHA1 #A2 elim A2 -A2
+  [ -IHB1 -IHA1 @or_intror #H destruct
+  | #B2 #A2 #_ #_ elim (IHB1 B2) -IHB1
+    [ #H destruct elim (IHA1 A2) -IHA1
+      [ #H destruct /2 width=1/
+      | #HA12 @or_intror #H destruct /2 width=1/
+      ]
+    | -IHA1 #HB12 @or_intror #H destruct /2 width=1/
+    ]
+  ]
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/cl_shift.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/cl_shift.ma
new file mode 100644 (file)
index 0000000..bbdc8e7
--- /dev/null
@@ -0,0 +1,46 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/lenv_append.ma".
+
+(* SHIFT OF A CLOSURE *******************************************************)
+
+let rec shift L T on L ≝ match L with
+[ LAtom       ⇒ T
+| LPair L I V ⇒ shift L (-ⓑ{I} V. T)
+].
+
+interpretation "shift (closure)" 'Append L T = (shift L T).
+
+(* Basic properties *********************************************************)
+
+lemma shift_append_assoc: ∀L,K. ∀T:term. (L @@ K) @@ T = L @@ K @@ T.
+#L #K elim K -K // normalize //
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma shift_inj: ∀L1,L2. ∀T1,T2:term. L1 @@ T1 = L2 @@ T2 → |L1| = |L2| →
+                 L1 = L2 ∧ T1 = T2.
+#L1 elim L1 -L1
+[ * normalize /2 width=1/
+  #L2 #I2 #V2 #T1 #T2 #_ <plus_n_Sm #H destruct
+| #L1 #H1 #V1 #IH * normalize
+  [ #T1 #T2 #_ <plus_n_Sm #H destruct
+  | #L2 #I2 #V2 #T1 #T2 #H1 #H2
+    elim (IH … H1 ?) -IH -H1 /2 width=1/ -H2 #H1 #H2 destruct /2 width=1/
+  ]
+]
+qed-.
+  
\ No newline at end of file
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/cl_weight.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/cl_weight.ma
new file mode 100644 (file)
index 0000000..d9569d4
--- /dev/null
@@ -0,0 +1,68 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/lenv_weight.ma".
+include "basic_2/grammar/cl_shift.ma".
+
+(* WEIGHT OF A CLOSURE ******************************************************)
+
+definition fw: lenv → term → ? ≝ λL,T. #{L} + #{T}.
+
+interpretation "weight (closure)" 'Weight L T = (fw L T).
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was: flt_wf__q_ind *)
+
+(* Basic_1: was: flt_wf_ind *)
+axiom fw_ind: ∀R:relation2 lenv term.
+              (∀L2,T2. (∀L1,T1. #{L1,T1} < #{L2,T2} → R L1 T1) → R L2 T2) →
+              ∀L,T. R L T.
+
+(* Basic_1: was: flt_shift *)
+lemma fw_shift: ∀a,K,I,V,T. #{K. ⓑ{I} V, T} < #{K, ⓑ{a,I} V. T}.
+normalize //
+qed.
+
+lemma tw_shift: ∀L,T. #{L, T} ≤ #{L @@ T}.
+#L elim L //
+#K #I #V #IHL #T
+@transitive_le [3: @IHL |2: /2 width=2/ | skip ]
+qed.
+
+lemma fw_tpair_sn: ∀I,L,V,T. #{L, V} < #{L, ②{I}V.T}.
+normalize in ⊢ (?→?→?→?→?%%); //
+qed.
+
+lemma fw_tpair_dx: ∀I,L,V,T. #{L, T} < #{L, ②{I}V.T}.
+normalize in ⊢ (?→?→?→?→?%%); //
+qed.
+
+lemma fw_tpair_dx_sn: ∀I1,I2,L,V1,V2,T. #{L, V2} < #{L, ②{I1}V1.②{I2}V2.T}.
+normalize in ⊢ (?→?→?→?→?→?→?%%); /2 width=1/
+qed.
+
+lemma fw_tpair_sn_sn_shift: ∀I,I1,I2,L,V1,V2,T.
+                            #{L.ⓑ{I}V1, T} < #{L, ②{I1}V1.②{I2}V2.T}.
+normalize in ⊢ (?→?→?→?→?→?→?→?%%); /3 width=1/ 
+qed.
+
+lemma fw_tpair_sn_dx_shift: ∀I,I1,I2,L,V1,V2,T.
+                            #{L.ⓑ{I}V2, T} < #{L, ②{I1}V1.②{I2}V2.T}.
+normalize in ⊢ (?→?→?→?→?→?→?→?%%); /2 width=1/
+qed.
+
+(* Basic_1: removed theorems 6:
+            flt_thead_sx flt_thead_dx flt_arith0 flt_arith1 flt_arith2 flt_trans
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/genv.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/genv.ma
new file mode 100644 (file)
index 0000000..30b5dfd
--- /dev/null
@@ -0,0 +1,40 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "ground_2/list.ma".
+include "basic_2/grammar/term.ma".
+
+(* GLOBAL ENVIRONMENTS ******************************************************)
+
+(* global environments *)
+definition genv ≝ list2 bind2 term.
+
+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).
+
+interpretation "abbreviation (global environment)"
+   'DxAbbr L T = (cons2 bind2 term Abbr T L).
+
+interpretation "abstraction (global environment)"
+   'DxAbst L T = (cons2 bind2 term Abst T L).
+
+(* Basic properties *********************************************************)
+
+axiom genv_eq_dec: ∀T1,T2:genv. Decidable (T1 = T2).
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/item.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/item.ma
new file mode 100644 (file)
index 0000000..323f22f
--- /dev/null
@@ -0,0 +1,63 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "ground_2/arith.ma".
+include "basic_2/notation.ma".
+
+(* ITEMS ********************************************************************)
+
+(* atomic items *)
+inductive item0: Type[0] ≝
+   | Sort: nat → item0 (* sort: starting at 0 *)
+   | LRef: nat → item0 (* reference by index: starting at 0 *)
+   | GRef: nat → item0 (* reference by position: starting at 0 *)
+.
+
+(* binary binding items *)
+inductive bind2: Type[0] ≝
+  | Abbr: bind2 (* abbreviation *)
+  | Abst: bind2 (* abstraction *)
+.
+
+(* binary non-binding items *)
+inductive flat2: Type[0] ≝
+  | Appl: flat2 (* application *)
+  | Cast: flat2 (* explicit type annotation *)
+.
+
+(* binary items *)
+inductive item2: Type[0] ≝
+  | Bind2: bool → bind2 → item2 (* polarized binding item *)
+  | Flat2: flat2 → item2        (* non-binding item *)
+.
+
+(* Basic properties *********************************************************)
+
+axiom item0_eq_dec: ∀I1,I2:item0. Decidable (I1 = I2).
+
+(* Basic_1: was: bind_dec *)
+axiom bind2_eq_dec: ∀I1,I2:bind2. Decidable (I1 = I2).
+
+(* Basic_1: was: flat_dec *)
+axiom flat2_eq_dec: ∀I1,I2:flat2. Decidable (I1 = I2).
+
+(* Basic_1: was: kind_dec *)
+axiom item2_eq_dec: ∀I1,I2:item2. Decidable (I1 = I2).
+
+(* Basic_1: removed theorems 21:
+            s_S s_plus s_plus_sym s_minus minus_s_s s_le s_lt s_inj s_inc
+            s_arith0 s_arith1
+            r_S r_plus r_plus_sym r_minus r_dis s_r r_arith0 r_arith1
+            not_abbr_abst bind_dec_not
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/lenv.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/lenv.ma
new file mode 100644 (file)
index 0000000..9988b3d
--- /dev/null
@@ -0,0 +1,55 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/term.ma".
+
+(* LOCAL ENVIRONMENTS *******************************************************)
+
+(* local environments *)
+inductive lenv: Type[0] ≝
+| LAtom: lenv                       (* empty *)
+| LPair: lenv → bind2 → term → lenv (* binary binding construction *)
+.
+
+interpretation "sort (local environment)"
+   'Star = LAtom.
+
+interpretation "environment construction (binary)"
+   'DxItem2 L I T = (LPair L I T).
+
+interpretation "environment binding construction (binary)"
+   'DxBind2 L I T = (LPair L I T).
+
+interpretation "abbreviation (local environment)"
+   'DxAbbr L T = (LPair L Abbr T).
+
+interpretation "abstraction (local environment)"
+   'DxAbst L T = (LPair L Abst T).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma destruct_lpair_lpair: ∀I1,I2,L1,L2,V1,V2. L1.ⓑ{I1}V1 = L2.ⓑ{I2}V2 →
+                            ∧∧L1 = L2 & I1 = I2 & V1 = V2.
+#I1 #I2 #L1 #L2 #V1 #V2 #H destruct /2 width=1/
+qed-.
+
+lemma discr_lpair_x_xy: ∀I,V,L. L = L.ⓑ{I}V → ⊥.
+#I #V #L elim L -L
+[ #H destruct
+| #L #J #W #IHL #H
+  elim (destruct_lpair_lpair … H) -H #H1 #H2 #H3 destruct /2 width=1/ (**) (* destruct lemma needed *)
+]
+qed-.
+
+(* Basic_1: removed theorems 2: chead_ctail c_tail_ind *)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/lenv_append.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/lenv_append.ma
new file mode 100644 (file)
index 0000000..ab90ddf
--- /dev/null
@@ -0,0 +1,130 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/lenv_length.ma".
+
+(* LOCAL ENVIRONMENTS *******************************************************)
+
+let rec append L K on K ≝ match K with
+[ LAtom       ⇒ L
+| LPair K I V ⇒ (append L K). ⓑ{I} V
+].
+
+interpretation "append (local environment)" 'Append L1 L2 = (append L1 L2).
+
+(* Basic properties *********************************************************)
+
+lemma append_atom_sn: ∀L. ⋆ @@ L = L.
+#L elim L -L normalize //
+qed.
+
+lemma append_assoc: associative … append.
+#L1 #L2 #L3 elim L3 -L3 normalize //
+qed.
+
+lemma append_length: ∀L1,L2. |L1 @@ L2| = |L1| + |L2|.
+#L1 #L2 elim L2 -L2 normalize //
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma append_inj_sn: ∀K1,K2,L1,L2. L1 @@ K1 = L2 @@ K2 → |K1| = |K2| →
+                     L1 = L2 ∧ K1 = K2.
+#K1 elim K1 -K1
+[ * normalize /2 width=1/
+  #K2 #I2 #V2 #L1 #L2 #_ <plus_n_Sm #H destruct
+| #K1 #I1 #V1 #IH * normalize
+  [ #L1 #L2 #_ <plus_n_Sm #H destruct
+  | #K2 #I2 #V2 #L1 #L2 #H1 #H2
+    elim (destruct_lpair_lpair … H1) -H1 #H1 #H3 #H4 destruct (**) (* destruct lemma needed *)
+    elim (IH … H1 ?) -IH -H1 // -H2 /2 width=1/
+  ]
+]
+qed-.
+
+(* Note: lemma 750 *)
+lemma append_inj_dx: ∀K1,K2,L1,L2. L1 @@ K1 = L2 @@ K2 → |L1| = |L2| →
+                     L1 = L2 ∧ K1 = K2.
+#K1 elim K1 -K1
+[ * normalize /2 width=1/
+  #K2 #I2 #V2 #L1 #L2 #H1 #H2 destruct
+  normalize in H2; >append_length in H2; #H
+  elim (plus_xySz_x_false … H)
+| #K1 #I1 #V1 #IH * normalize
+  [ #L1 #L2 #H1 #H2 destruct
+    normalize in H2; >append_length in H2; #H
+    elim (plus_xySz_x_false … (sym_eq … H))
+  | #K2 #I2 #V2 #L1 #L2 #H1 #H2
+    elim (destruct_lpair_lpair … H1) -H1 #H1 #H3 #H4 destruct (**) (* destruct lemma needed *)
+    elim (IH … H1 ?) -IH -H1 // -H2 /2 width=1/
+  ]
+]
+qed-.
+
+lemma append_inv_refl_dx: ∀L,K. L @@ K = L → K = ⋆.
+#L #K #H
+elim (append_inj_dx … (⋆) … H ?) //
+qed-.
+
+lemma append_inv_pair_dx: ∀I,L,K,V. L @@ K = L.ⓑ{I}V → K = ⋆.ⓑ{I}V.
+#I #L #K #V #H
+elim (append_inj_dx … (⋆.ⓑ{I}V) … H ?) //
+qed-.
+
+lemma length_inv_pos_dx_append: ∀d,L. |L| = d + 1 →
+                                ∃∃I,K,V. |K| = d & L = ⋆.ⓑ{I}V @@ K.
+#d @(nat_ind_plus … d) -d
+[ #L #H 
+  elim (length_inv_pos_dx … H) -H #I #K #V #H
+  >(length_inv_zero_dx … H) -H #H destruct
+  @ex2_3_intro [4: /2 width=2/ |5: // |1,2,3: skip ] (**) (* /3/ does not work *)
+| #d #IHd #L #H
+  elim (length_inv_pos_dx … H) -H #I #K #V #H
+  elim (IHd … H) -IHd -H #I0 #K0 #V0 #H1 #H2 #H3 destruct
+  @(ex2_3_intro … (K0.ⓑ{I}V)) //
+]
+qed-.
+
+(* Basic_eliminators ********************************************************)
+
+fact lenv_ind_dx_aux: ∀R:predicate lenv. R ⋆ →
+                      (∀I,L,V. R L → R (⋆.ⓑ{I}V @@ L)) →
+                      ∀d,L. |L| = d → R L.
+#R #Hatom #Hpair #d @(nat_ind_plus … d) -d
+[ #L #H >(length_inv_zero_dx … H) -H //
+| #d #IH #L #H
+  elim (length_inv_pos_dx_append … H) -H #I #K #V #H1 #H2 destruct /3 width=1/
+]
+qed-.
+
+lemma lenv_ind_dx: ∀R:predicate lenv. R ⋆ →
+                   (∀I,L,V. R L → R (⋆.ⓑ{I}V @@ L)) →
+                   ∀L. R L.
+/3 width=2 by lenv_ind_dx_aux/ qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma length_inv_pos_sn_append: ∀d,L. 1 + d = |L| →
+                                ∃∃I,K,V. d = |K| & L = ⋆. ⓑ{I}V @@ K.
+#d >commutative_plus @(nat_ind_plus … d) -d
+[ #L #H elim (length_inv_pos_sn … H) -H #I #K #V #H1 #H2 destruct
+  >(length_inv_zero_sn … H1) -K
+  @(ex2_3_intro … (⋆)) // (**) (* explicit constructor *)
+| #d #IHd #L #H elim (length_inv_pos_sn … H) -H #I #K #V #H1 #H2 destruct
+  >H1 in IHd; -H1 #IHd
+  elim (IHd K ?) -IHd // #J #L #W #H1 #H2 destruct
+  @(ex2_3_intro … (L.ⓑ{I}V)) // (**) (* explicit constructor *)
+  >append_length /2 width=1/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/lenv_length.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/lenv_length.ma
new file mode 100644 (file)
index 0000000..faf6de0
--- /dev/null
@@ -0,0 +1,52 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/lenv.ma".
+
+(* LENGTH OF A LOCAL ENVIRONMENT ********************************************)
+
+let rec length L ≝ match L with
+[ LAtom       ⇒ 0
+| LPair L _ _ ⇒ length L + 1
+].
+
+interpretation "length (local environment)" 'card L = (length L).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma length_inv_zero_dx: ∀L. |L| = 0 → L = ⋆.
+* // #L #I #V normalize <plus_n_Sm #H destruct
+qed-.
+
+lemma length_inv_zero_sn: ∀L. 0 = |L| → L = ⋆.
+* // #L #I #V normalize <plus_n_Sm #H destruct
+qed-.
+
+lemma length_inv_pos_dx: ∀d,L. |L| = d + 1 →
+                         ∃∃I,K,V. |K| = d & L = K. ⓑ{I}V.
+#d *
+[ normalize <plus_n_Sm #H destruct
+| #K #I #V #H
+  lapply (injective_plus_l … H) -H /2 width=5/
+]
+qed-.
+
+lemma length_inv_pos_sn: ∀d,L. d + 1 = |L| →
+                         ∃∃I,K,V. d = |K| & L = K. ⓑ{I}V.
+#d *
+[ normalize <plus_n_Sm #H destruct
+| #K #I #V #H
+  lapply (injective_plus_l … H) -H /2 width=5/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/lenv_px.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/lenv_px.ma
new file mode 100644 (file)
index 0000000..4171062
--- /dev/null
@@ -0,0 +1,166 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/lenv_append.ma".
+
+(* POINTWISE EXTENSION OF A CONTEXT-FREE REALTION FOR TERMS *****************)
+
+inductive lpx (R:relation term): relation lenv ≝
+| lpx_stom: lpx R (⋆) (⋆)
+| lpx_pair: ∀I,K1,K2,V1,V2.
+            lpx R K1 K2 → R V1 V2 → lpx R (K1. ⓑ{I} V1) (K2. ⓑ{I} V2)
+.
+
+(* Basic inversion lemmas ***************************************************)
+
+fact lpx_inv_atom1_aux: ∀R,L1,L2. lpx R L1 L2 → L1 = ⋆ → L2 = ⋆.
+#R #L1 #L2 * -L1 -L2
+[ //
+| #I #K1 #K2 #V1 #V2 #_ #_ #H destruct
+]
+qed-.
+
+lemma lpx_inv_atom1: ∀R,L2. lpx R (⋆) L2 → L2 = ⋆.
+/2 width=4 by lpx_inv_atom1_aux/ qed-.
+
+fact lpx_inv_pair1_aux: ∀R,L1,L2. lpx R L1 L2 → ∀I,K1,V1. L1 = K1. ⓑ{I} V1 →
+                        ∃∃K2,V2. lpx R K1 K2 & R V1 V2 & L2 = K2. ⓑ{I} V2.
+#R #L1 #L2 * -L1 -L2
+[ #J #K1 #V1 #H destruct
+| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #L #W #H destruct /2 width=5/
+]
+qed-.
+
+lemma lpx_inv_pair1: ∀R,I,K1,V1,L2. lpx R (K1. ⓑ{I} V1) L2 →
+                     ∃∃K2,V2. lpx R K1 K2 & R V1 V2 & L2 = K2. ⓑ{I} V2.
+/2 width=3 by lpx_inv_pair1_aux/ qed-.
+
+fact lpx_inv_atom2_aux: ∀R,L1,L2. lpx R L1 L2 → L2 = ⋆ → L1 = ⋆.
+#R #L1 #L2 * -L1 -L2
+[ //
+| #I #K1 #K2 #V1 #V2 #_ #_ #H destruct
+]
+qed-.
+
+lemma lpx_inv_atom2: ∀R,L1. lpx R L1 (⋆) → L1 = ⋆.
+/2 width=4 by lpx_inv_atom2_aux/ qed-.
+
+fact lpx_inv_pair2_aux: ∀R,L1,L2. lpx R L1 L2 → ∀I,K2,V2. L2 = K2. ⓑ{I} V2 →
+                        ∃∃K1,V1. lpx R K1 K2 & R V1 V2 & L1 = K1. ⓑ{I} V1.
+#R #L1 #L2 * -L1 -L2
+[ #J #K2 #V2 #H destruct
+| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #K #W #H destruct /2 width=5/
+]
+qed-.
+
+lemma lpx_inv_pair2: ∀R,I,L1,K2,V2. lpx R L1 (K2. ⓑ{I} V2) →
+                     ∃∃K1,V1. lpx R K1 K2 & R V1 V2 & L1 = K1. ⓑ{I} V1.
+/2 width=3 by lpx_inv_pair2_aux/ qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma lpx_fwd_length: ∀R,L1,L2. lpx R L1 L2 → |L1| = |L2|.
+#R #L1 #L2 #H elim H -L1 -L2 normalize //
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma lpx_inv_append1: ∀R,L1,K1,L. lpx R (K1 @@ L1) L →
+                       ∃∃K2,L2. lpx R K1 K2 & lpx R L1 L2 & L = K2 @@ L2.
+#R #L1 elim L1 -L1 normalize
+[ #K1 #K2 #HK12
+  @(ex3_2_intro … K2 (⋆)) // (**) (* explicit constructor, /2 width=5/ does not work *) 
+| #L1 #I #V1 #IH #K1 #X #H
+  elim (lpx_inv_pair1 … H) -H #L #V2 #H1 #HV12 #H destruct
+  elim (IH … H1) -IH -H1 #K2 #L2 #HK12 #HL12 #H destruct
+  @(ex3_2_intro … HK12) [2: /2 width=2/ | skip | // ] (* explicit constructor, /3 width=5/ does not work *)
+]
+qed-.
+
+lemma lpx_inv_append2: ∀R,L2,K2,L. lpx R L (K2 @@ L2) →
+                       ∃∃K1,L1. lpx R K1 K2 & lpx R L1 L2 & L = K1 @@ L1.
+#R #L2 elim L2 -L2 normalize
+[ #K2 #K1 #HK12
+  @(ex3_2_intro … K1 (⋆)) // (**) (* explicit constructor, /2 width=5/ does not work *) 
+| #L2 #I #V2 #IH #K2 #X #H
+  elim (lpx_inv_pair2 … H) -H #L #V1 #H1 #HV12 #H destruct
+  elim (IH … H1) -IH -H1 #K1 #L1 #HK12 #HL12 #H destruct
+  @(ex3_2_intro … HK12) [2: /2 width=2/ | skip | // ] (* explicit constructor, /3 width=5/ does not work *)
+]
+qed-.   
+
+(* Basic properties *********************************************************)
+
+lemma lpx_refl: ∀R. reflexive ? R → reflexive … (lpx R).
+#R #HR #L elim L -L // /2 width=1/
+qed.
+
+lemma lpx_sym: ∀R. symmetric ? R → symmetric … (lpx R).
+#R #HR #L1 #L2 #H elim H -H // /3 width=1/
+qed.
+
+lemma lpx_trans: ∀R. Transitive ? R → Transitive … (lpx R).
+#R #HR #L1 #L #H elim H -L //
+#I #K1 #K #V1 #V #_ #HV1 #IHK1 #X #H
+elim (lpx_inv_pair1 … H) -H #K2 #V2 #HK2 #HV2 #H destruct /3 width=3/
+qed.
+
+lemma lpx_conf: ∀R. Confluent ? R → Confluent … (lpx R).
+#R #HR #L0 #L1 #H elim H -L1
+[ #X #H >(lpx_inv_atom1 … H) -X /2 width=3/
+| #I #K0 #K1 #V0 #V1 #_ #HV01 #IHK01 #X #H
+  elim (lpx_inv_pair1 … H) -H #K2 #V2 #HK02 #HV02 #H destruct
+  elim (IHK01 … HK02) -K0 #K #HK1 #HK2
+  elim (HR … HV01 … HV02) -HR -V0 /3 width=5/
+]
+qed.
+
+lemma lpx_TC_inj: ∀R,L1,L2. lpx R L1 L2 → lpx (TC … R) L1 L2. 
+#R #L1 #L2 #H elim H -L1 -L2 // /3 width=1/
+qed.
+
+lemma lpx_TC_step: ∀R,L1,L. lpx (TC … R) L1 L →
+                   ∀L2. lpx R L L2 → lpx (TC … R) L1 L2.
+#R #L1 #L #H elim H -L /2 width=1/
+#I #K1 #K #V1 #V #_ #HV1 #IHK1 #X #H
+elim (lpx_inv_pair1 … H) -H #K2 #V2 #HK2 #HV2 #H destruct /3 width=3/
+qed.
+
+lemma TC_lpx_pair_dx: ∀R. reflexive ? R →
+                      ∀I,K,V1,V2. TC … R V1 V2 →
+                      TC … (lpx R) (K.ⓑ{I}V1) (K.ⓑ{I}V2).
+#R #HR #I #K #V1 #V2 #H elim H -V2
+/4 width=5 by lpx_refl, lpx_pair, inj, step/ (**) (* too slow without trace *)
+qed.
+
+lemma TC_lpx_pair_sn: ∀R. reflexive ? R →
+                      ∀I,V,K1,K2. TC … (lpx R) K1 K2 →
+                      TC … (lpx R) (K1.ⓑ{I}V) (K2.ⓑ{I}V).
+#R #HR #I #V #K1 #K2 #H elim H -K2
+/4 width=5 by lpx_refl, lpx_pair, inj, step/ (**) (* too slow without trace *)
+qed.
+
+lemma lpx_TC: ∀R,L1,L2. TC … (lpx R) L1 L2 → lpx (TC … R) L1 L2.
+#R #L1 #L2 #H elim H -L2 /2 width=1/ /2 width=3/
+qed.
+
+lemma lpx_inv_TC: ∀R. reflexive ? R →
+                  ∀L1,L2. lpx (TC … R) L1 L2 → TC … (lpx R) L1 L2.
+#R #HR #L1 #L2 #H elim H -L1 -L2 /3 width=1/ /3 width=3/
+qed.
+
+lemma lpx_append: ∀R,K1,K2. lpx R K1 K2 → ∀L1,L2. lpx R L1 L2 →
+                  lpx R (L1 @@ K1) (L2 @@ K2).
+#R #K1 #K2 #H elim H -K1 -K2 // /3 width=1/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/lenv_px_bi.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/lenv_px_bi.ma
new file mode 100644 (file)
index 0000000..931d075
--- /dev/null
@@ -0,0 +1,88 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/lenv_length.ma".
+
+(* POINTWISE EXTENSION OF A FOCALIZED REALTION FOR TERMS ********************)
+
+inductive lpx_bi (R:bi_relation lenv term): relation lenv ≝
+| lpx_bi_stom: lpx_bi R (⋆) (⋆)
+| lpx_bi_pair: ∀I,K1,K2,V1,V2.
+               lpx_bi R K1 K2 → R K1 V1 K2 V2 →
+               lpx_bi R (K1. ⓑ{I} V1) (K2. ⓑ{I} V2)
+.
+
+(* Basic inversion lemmas ***************************************************)
+
+fact lpx_bi_inv_atom1_aux: ∀R,L1,L2. lpx_bi R L1 L2 → L1 = ⋆ → L2 = ⋆.
+#R #L1 #L2 * -L1 -L2
+[ //
+| #I #K1 #K2 #V1 #V2 #_ #_ #H destruct
+]
+qed-.
+
+lemma lpx_bi_inv_atom1: ∀R,L2. lpx_bi R (⋆) L2 → L2 = ⋆.
+/2 width=4 by lpx_bi_inv_atom1_aux/ qed-.
+
+fact lpx_bi_inv_pair1_aux: ∀R,L1,L2. lpx_bi R L1 L2 →
+                           ∀I,K1,V1. L1 = K1. ⓑ{I} V1 →
+                           ∃∃K2,V2. lpx_bi R K1 K2 &
+                                    R K1 V1 K2 V2 & L2 = K2. ⓑ{I} V2.
+#R #L1 #L2 * -L1 -L2
+[ #J #K1 #V1 #H destruct
+| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #L #W #H destruct /2 width=5/
+]
+qed-.
+
+lemma lpx_bi_inv_pair1: ∀R,I,K1,V1,L2. lpx_bi R (K1. ⓑ{I} V1) L2 →
+                        ∃∃K2,V2. lpx_bi R K1 K2 & R K1 V1 K2 V2 &
+                                 L2 = K2. ⓑ{I} V2.
+/2 width=3 by lpx_bi_inv_pair1_aux/ qed-.
+
+fact lpx_bi_inv_atom2_aux: ∀R,L1,L2. lpx_bi R L1 L2 → L2 = ⋆ → L1 = ⋆.
+#R #L1 #L2 * -L1 -L2
+[ //
+| #I #K1 #K2 #V1 #V2 #_ #_ #H destruct
+]
+qed-.
+
+lemma lpx_bi_inv_atom2: ∀R,L1. lpx_bi R L1 (⋆) → L1 = ⋆.
+/2 width=4 by lpx_bi_inv_atom2_aux/ qed-.
+
+fact lpx_bi_inv_pair2_aux: ∀R,L1,L2. lpx_bi R L1 L2 →
+                           ∀I,K2,V2. L2 = K2. ⓑ{I} V2 →
+                           ∃∃K1,V1. lpx_bi R K1 K2 & R K1 V1 K2 V2 &
+                                    L1 = K1. ⓑ{I} V1.
+#R #L1 #L2 * -L1 -L2
+[ #J #K2 #V2 #H destruct
+| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #K #W #H destruct /2 width=5/
+]
+qed-.
+
+lemma lpx_bi_inv_pair2: ∀R,I,L1,K2,V2. lpx_bi R L1 (K2. ⓑ{I} V2) →
+                        ∃∃K1,V1. lpx_bi R K1 K2 & R K1 V1 K2 V2 &
+                                 L1 = K1. ⓑ{I} V1.
+/2 width=3 by lpx_bi_inv_pair2_aux/ qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma lpx_bi_fwd_length: ∀R,L1,L2. lpx_bi R L1 L2 → |L1| = |L2|.
+#R #L1 #L2 #H elim H -L1 -L2 normalize //
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma lpx_bi_refl: ∀R. bi_reflexive ? ? R → reflexive … (lpx_bi R).
+#R #HR #L elim L -L // /2 width=1/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/lenv_weight.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/lenv_weight.ma
new file mode 100644 (file)
index 0000000..59e2e61
--- /dev/null
@@ -0,0 +1,39 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/term_weight.ma".
+include "basic_2/grammar/lenv.ma".
+
+(* WEIGHT OF A LOCAL ENVIRONMENT ********************************************)
+
+let rec lw L ≝ match L with
+[ LAtom       ⇒ 0
+| LPair L _ V ⇒ lw L + #{V}
+].
+
+interpretation "weight (local environment)" 'Weight L = (lw L).
+
+(* Basic properties *********************************************************)
+
+lemma lw_pair: ∀I,L,V. #{L} < #{(L.ⓑ{I}V)}.
+/3 width=1/ qed.
+
+(* Basic eliminators ********************************************************)
+
+axiom lw_ind: ∀R:predicate lenv.
+              (∀L2. (∀L1. #{L1} < #{L2} → R L1) → R L2) →
+              ∀L. R L.
+
+(* Basic_1: removed theorems 2: clt_cong clt_head clt_thead *)
+(* Basic_1: note: clt_thead should be renamed clt_ctail *)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/term.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/term.ma
new file mode 100644 (file)
index 0000000..5ccb5e4
--- /dev/null
@@ -0,0 +1,135 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/item.ma".
+
+(* TERMS ********************************************************************)
+
+(* terms *)
+inductive term: Type[0] ≝
+  | TAtom: item0 → term               (* atomic item construction *)
+  | TPair: item2 → term → term → term (* binary item construction *)
+.
+
+interpretation "term construction (atomic)"
+   'Item0 I = (TAtom I).
+
+interpretation "term construction (binary)"
+   'SnItem2 I T1 T2 = (TPair I T1 T2).
+
+interpretation "term binding construction (binary)"
+   'SnBind2 a I T1 T2 = (TPair (Bind2 a I) T1 T2).
+
+interpretation "term positive binding construction (binary)"
+   'SnBind2Pos I T1 T2 = (TPair (Bind2 true I) T1 T2).
+
+interpretation "term negative binding construction (binary)"
+   'SnBind2Neg I T1 T2 = (TPair (Bind2 false I) T1 T2).
+
+interpretation "term flat construction (binary)"
+   'SnFlat2 I T1 T2 = (TPair (Flat2 I) T1 T2).
+
+interpretation "sort (term)"
+   'Star k = (TAtom (Sort k)).
+
+interpretation "local reference (term)"
+   'LRef i = (TAtom (LRef i)).
+
+interpretation "global reference (term)"
+   'GRef p = (TAtom (GRef p)).
+
+interpretation "abbreviation (term)"
+   'SnAbbr a T1 T2 = (TPair (Bind2 a Abbr) T1 T2).
+
+interpretation "positive abbreviation (term)"
+   'SnAbbrPos T1 T2 = (TPair (Bind2 true Abbr) T1 T2).
+
+interpretation "negative abbreviation (term)"
+   'SnAbbrNeg T1 T2 = (TPair (Bind2 false Abbr) T1 T2).
+
+interpretation "abstraction (term)"
+   'SnAbst a T1 T2 = (TPair (Bind2 a Abst) T1 T2).
+
+interpretation "positive abstraction (term)"
+   'SnAbstPos T1 T2 = (TPair (Bind2 true Abst) T1 T2).
+
+interpretation "negative abstraction (term)"
+   'SnAbstNeg T1 T2 = (TPair (Bind2 false Abst) T1 T2).
+
+interpretation "application (term)"
+   'SnAppl T1 T2 = (TPair (Flat2 Appl) T1 T2).
+
+interpretation "native type annotation (term)"
+   'SnCast T1 T2 = (TPair (Flat2 Cast) T1 T2).
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was: term_dec *)
+axiom term_eq_dec: ∀T1,T2:term. Decidable (T1 = T2).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma discr_tpair_xy_x: ∀I,T,V. ②{I} V. T = V → ⊥.
+#I #T #V elim V -V
+[ #J #H destruct
+| #J #W #U #IHW #_ #H destruct
+  -H >e0 in e1; normalize (**) (* destruct: one quality is not simplified, the destucted equality is not erased *)
+  /2 width=1/
+]
+qed-.
+
+(* Basic_1: was: thead_x_y_y *)
+lemma discr_tpair_xy_y: ∀I,V,T. ②{I} V. T = T → ⊥.
+#I #V #T elim T -T
+[ #J #H destruct
+| #J #W #U #_ #IHU #H destruct
+  -H (**) (* destruct: the destucted equality is not erased *)
+  /2 width=1/
+]
+qed-.
+
+lemma eq_false_inv_tpair_sn: ∀I,V1,T1,V2,T2.
+                             (②{I} V1. T1 = ②{I} V2. T2 → ⊥) →
+                             (V1 = V2 → ⊥) ∨ (V1 = V2 ∧ (T1 = T2 → ⊥)).
+#I #V1 #T1 #V2 #T2 #H
+elim (term_eq_dec V1 V2) /3 width=1/ #HV12 destruct
+@or_intror @conj // #HT12 destruct /2 width=1/ 
+qed-.
+
+lemma eq_false_inv_tpair_dx: ∀I,V1,T1,V2,T2.
+                             (②{I} V1. T1 = ②{I} V2. T2 → ⊥) →
+                             (T1 = T2 → ⊥) ∨ (T1 = T2 ∧ (V1 = V2 → ⊥)).
+#I #V1 #T1 #V2 #T2 #H
+elim (term_eq_dec T1 T2) /3 width=1/ #HT12 destruct
+@or_intror @conj // #HT12 destruct /2 width=1/
+qed-.
+
+lemma eq_false_inv_beta: ∀a,V1,V2,W1,W2,T1,T2.
+                         (ⓐV1. ⓛ{a}W1. T1 = ⓐV2. ⓛ{a}W2 .T2 → ⊥) →
+                         (W1 = W2 → ⊥) ∨
+                         (W1 = W2 ∧ (ⓓ{a}V1. T1 = ⓓ{a}V2. T2 → ⊥)).
+#a #V1 #V2 #W1 #W2 #T1 #T2 #H
+elim (eq_false_inv_tpair_sn … H) -H
+[ #HV12 elim (term_eq_dec W1 W2) /3 width=1/
+  #H destruct @or_intror @conj // #H destruct /2 width=1/
+| * #H1 #H2 destruct
+  elim (eq_false_inv_tpair_sn … H2) -H2 /3 width=1/
+  * #H #HT12 destruct
+  @or_intror @conj // #H destruct /2 width=1/
+]
+qed.
+
+(* Basic_1: removed theorems 3:
+            not_void_abst not_abbr_void not_abst_void
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/term_simple.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/term_simple.ma
new file mode 100644 (file)
index 0000000..328dc55
--- /dev/null
@@ -0,0 +1,44 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/term.ma".
+
+(* SIMPLE (NEUTRAL) TERMS ***************************************************)
+
+inductive simple: predicate term ≝
+   | simple_atom: ∀I. simple (⓪{I})
+   | simple_flat: ∀I,V,T. simple (ⓕ{I} V. T)
+.
+
+interpretation "simple (term)" 'Simple T = (simple T).
+
+(* Basic inversion lemmas ***************************************************)
+(*
+lemma mt: ∀R1,R2:Prop. (R1 → R2) → (R2 → ⊥) → R1 → ⊥.
+/3 width=1/ qed.
+*)
+fact simple_inv_bind_aux: ∀T. 𝐒⦃T⦄ → ∀a,J,W,U. T = ⓑ{a,J} W. U → ⊥.
+#T * -T
+[ #I #a #J #W #U #H destruct
+| #I #V #T #a #J #W #U #H destruct
+]
+qed.
+
+lemma simple_inv_bind: ∀a,I,V,T. 𝐒⦃ⓑ{a,I} V. T⦄ → ⊥.
+/2 width=7/ qed-. (**) (* auto fails if mt is enabled *)
+
+lemma simple_inv_pair: ∀I,V,T.  𝐒⦃②{I}V.T⦄ → ∃J. I = Flat2 J.
+* /2 width=2/ #a #I #V #T #H
+elim (simple_inv_bind … H)
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/term_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/term_vector.ma
new file mode 100644 (file)
index 0000000..7169d1a
--- /dev/null
@@ -0,0 +1,33 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "ground_2/list.ma".
+include "basic_2/grammar/term_simple.ma".
+
+(* TERMS ********************************************************************)
+
+let rec applv Vs T on Vs ≝
+  match Vs with
+  [ nil        ⇒ T
+  | cons hd tl ⇒ ⓐhd. (applv tl T)
+  ].
+
+interpretation "application o vevtor (term)"
+   'SnApplV Vs T = (applv Vs T).
+
+(* properties concerning simple terms ***************************************)
+
+lemma applv_simple: ∀T,Vs.  𝐒⦃T⦄ → 𝐒⦃ⒶVs.T⦄.
+#T * //
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/term_weight.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/term_weight.ma
new file mode 100644 (file)
index 0000000..d8f39a3
--- /dev/null
@@ -0,0 +1,43 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/term.ma".
+
+(* WEIGHT OF A TERM *********************************************************)
+
+let rec tw T ≝ match T with
+[ TAtom _     ⇒ 1
+| TPair _ V T ⇒ tw V + tw T + 1
+].
+
+interpretation "weight (term)" 'Weight T = (tw T).
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was: tweight_lt *)
+lemma tw_pos: ∀T. 1 ≤ #{T}.
+#T elim T -T //
+qed.
+
+(* Basic eliminators ********************************************************)
+
+axiom tw_ind: ∀R:predicate term.
+              (∀T2. (∀T1. #{T1} < #{T2} → R T1) → R T2) →
+              ∀T. R T.
+
+(* Basic_1: removed theorems 11:
+            wadd_le wadd_lt wadd_O weight_le weight_eq weight_add_O
+            weight_add_S tlt_trans tlt_head_sx tlt_head_dx tlt_wf_ind
+            removed local theorems 1: q_ind
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/tshf.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/tshf.ma
new file mode 100644 (file)
index 0000000..a8873c1
--- /dev/null
@@ -0,0 +1,86 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/term_simple.ma".
+
+(* SAME HEAD TERM FORMS *****************************************************)
+
+inductive tshf: relation term ≝
+   | tshf_atom: ∀I. tshf (⓪{I}) (⓪{I})
+   | tshf_abbr: ∀V1,V2,T1,T2. tshf (-ⓓV1. T1) (-ⓓV2. T2)
+   | tshf_abst: ∀a,V1,V2,T1,T2. tshf (ⓛ{a}V1. T1) (ⓛ{a}V2. T2)
+   | tshf_appl: ∀V1,V2,T1,T2. tshf T1 T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄ →
+                tshf (ⓐV1. T1) (ⓐV2. T2)
+.
+
+interpretation "same head form (term)" 'napart T1 T2 = (tshf T1 T2).
+
+(* Basic properties *********************************************************)
+
+lemma tshf_sym: ∀T1,T2. T1 ≈ T2 → T2 ≈ T1.
+#T1 #T2 #H elim H -T1 -T2 /2 width=1/
+qed.
+
+lemma tshf_refl2: ∀T1,T2. T1 ≈ T2 → T2 ≈ T2.
+#T1 #T2 #H elim H -T1 -T2 // /2 width=1/
+qed.
+
+lemma tshf_refl1: ∀T1,T2. T1 ≈ T2 → T1 ≈ T1.
+/3 width=2/ qed.
+
+lemma simple_tshf_repl_dx: ∀T1,T2. T1 ≈ T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄.
+#T1 #T2 #H elim H -T1 -T2 //
+[ #V1 #V2 #T1 #T2 #H
+  elim (simple_inv_bind … H)
+| #a #V1 #V2 #T1 #T2 #H
+  elim (simple_inv_bind … H)
+]
+qed. (**) (* remove from index *)
+
+lemma simple_tshf_repl_sn: ∀T1,T2. T1 ≈ T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄.
+/3 width=3/ qed-.
+
+(* Basic inversion lemmas ***************************************************)
+
+fact tshf_inv_bind1_aux: ∀T1,T2. T1 ≈ T2 → ∀a,I,W1,U1. T1 = ⓑ{a,I}W1.U1 →
+                         ∃∃W2,U2. T2 = ⓑ{a,I}W2. U2 &
+                                  (Bind2 a I = Bind2 false Abbr ∨ I = Abst).
+#T1 #T2 * -T1 -T2
+[ #J #a #I #W1 #U1 #H destruct
+| #V1 #V2 #T1 #T2 #a #I #W1 #U1 #H destruct /3 width=3/
+| #b #V1 #V2 #T1 #T2 #a #I #W1 #U1 #H destruct /3 width=3/
+| #V1 #V2 #T1 #T2 #_ #_ #_ #a #I #W1 #U1 #H destruct
+]
+qed.
+
+lemma tshf_inv_bind1: ∀a,I,W1,U1,T2. ⓑ{a,I}W1.U1 ≈ T2 →
+                      ∃∃W2,U2. T2 = ⓑ{a,I}W2. U2 &
+                               (Bind2 a I = Bind2 false Abbr ∨ I = Abst).
+/2 width=5/ qed-.
+
+fact tshf_inv_flat1_aux: ∀T1,T2. T1 ≈ T2 → ∀I,W1,U1. T1 = ⓕ{I}W1.U1 →
+                         ∃∃W2,U2. U1 ≈ U2 & 𝐒⦃U1⦄ & 𝐒⦃U2⦄ &
+                                  I = Appl & T2 = ⓐW2. U2.
+#T1 #T2 * -T1 -T2
+[ #J #I #W1 #U1 #H destruct
+| #V1 #V2 #T1 #T2 #I #W1 #U1 #H destruct
+| #a #V1 #V2 #T1 #T2 #I #W1 #U1 #H destruct
+| #V1 #V2 #T1 #T2 #HT12 #HT1 #HT2 #I #W1 #U1 #H destruct /2 width=5/
+]
+qed.
+
+lemma tshf_inv_flat1: ∀I,W1,U1,T2. ⓕ{I}W1.U1 ≈ T2 →
+                      ∃∃W2,U2. U1 ≈ U2 & 𝐒⦃U1⦄ & 𝐒⦃U2⦄ &
+                               I = Appl & T2 = ⓐW2. U2.
+/2 width=4/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/tstc.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/tstc.ma
new file mode 100644 (file)
index 0000000..78a9b49
--- /dev/null
@@ -0,0 +1,107 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/term_simple.ma".
+
+(* SAME TOP TERM CONSTRUCTOR ************************************************)
+
+inductive tstc: relation term ≝
+   | tstc_atom: ∀I. tstc (⓪{I}) (⓪{I})
+   | tstc_pair: ∀I,V1,V2,T1,T2. tstc (②{I} V1. T1) (②{I} V2. T2)
+.
+
+interpretation "same top constructor (term)" 'Iso T1 T2 = (tstc T1 T2).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact tstc_inv_atom1_aux: ∀T1,T2. T1 ≃ T2 → ∀I. T1 = ⓪{I} → T2 = ⓪{I}.
+#T1 #T2 * -T1 -T2 //
+#J #V1 #V2 #T1 #T2 #I #H destruct
+qed.
+
+(* Basic_1: was: iso_gen_sort iso_gen_lref *)
+lemma tstc_inv_atom1: ∀I,T2. ⓪{I} ≃ T2 → T2 = ⓪{I}.
+/2 width=3/ qed-.
+
+fact tstc_inv_pair1_aux: ∀T1,T2. T1 ≃ T2 → ∀I,W1,U1. T1 = ②{I}W1.U1 →
+                         ∃∃W2,U2. T2 = ②{I}W2. U2.
+#T1 #T2 * -T1 -T2
+[ #J #I #W1 #U1 #H destruct
+| #J #V1 #V2 #T1 #T2 #I #W1 #U1 #H destruct /2 width=3/
+]
+qed.
+
+(* Basic_1: was: iso_gen_head *)
+lemma tstc_inv_pair1: ∀I,W1,U1,T2. ②{I}W1.U1 ≃ T2 →
+                      ∃∃W2,U2. T2 = ②{I}W2. U2.
+/2 width=5/ qed-.
+
+fact tstc_inv_atom2_aux: ∀T1,T2. T1 ≃ T2 → ∀I. T2 = ⓪{I} → T1 = ⓪{I}.
+#T1 #T2 * -T1 -T2 //
+#J #V1 #V2 #T1 #T2 #I #H destruct
+qed.
+
+lemma tstc_inv_atom2: ∀I,T1. T1 ≃ ⓪{I} → T1 = ⓪{I}.
+/2 width=3/ qed-.
+
+fact tstc_inv_pair2_aux: ∀T1,T2. T1 ≃ T2 → ∀I,W2,U2. T2 = ②{I}W2.U2 →
+                         ∃∃W1,U1. T1 = ②{I}W1. U1.
+#T1 #T2 * -T1 -T2
+[ #J #I #W2 #U2 #H destruct
+| #J #V1 #V2 #T1 #T2 #I #W2 #U2 #H destruct /2 width=3/
+]
+qed.
+
+lemma tstc_inv_pair2: ∀I,T1,W2,U2. T1 ≃ ②{I}W2.U2 →
+                      ∃∃W1,U1. T1 = ②{I}W1. U1.
+/2 width=5/ qed-.
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was: iso_refl *)
+lemma tstc_refl: ∀T. T ≃ T.
+#T elim T -T //
+qed.
+
+lemma tstc_sym: ∀T1,T2. T1 ≃ T2 → T2 ≃ T1.
+#T1 #T2 #H elim H -T1 -T2 //
+qed.
+
+lemma tstc_dec: ∀T1,T2. Decidable (T1 ≃ T2).
+* #I1 [2: #V1 #T1 ] * #I2 [2,4: #V2 #T2 ]
+[ elim (item2_eq_dec I1 I2) #HI12
+  [ destruct /2 width=1/
+  | @or_intror #H
+    elim (tstc_inv_pair1 … H) -H #V #T #H destruct /2 width=1/
+  ]
+| @or_intror #H
+  lapply (tstc_inv_atom1 … H) -H #H destruct
+| @or_intror #H
+  lapply (tstc_inv_atom2 … H) -H #H destruct
+| elim (item0_eq_dec I1 I2) #HI12
+  [ destruct /2 width=1/
+  | @or_intror #H
+    lapply (tstc_inv_atom2 … H) -H #H destruct /2 width=1/
+  ]
+]
+qed.
+
+lemma simple_tstc_repl_dx: ∀T1,T2. T1 ≃ T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄.
+#T1 #T2 * -T1 -T2 //
+#I #V1 #V2 #T1 #T2 #H
+elim (simple_inv_pair … H) -H #J #H destruct //
+qed. (**) (* remove from index *)
+
+lemma simple_tstc_repl_sn: ∀T1,T2. T1 ≃ T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄.
+/3 width=3/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/tstc_tstc.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/tstc_tstc.ma
new file mode 100644 (file)
index 0000000..df6fe37
--- /dev/null
@@ -0,0 +1,32 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/tstc.ma".
+
+(* SAME TOP TERM CONSTRUCTOR ************************************************)
+
+(* Main properties **********************************************************)
+
+(* Basic_1: was: iso_trans *)
+theorem tstc_trans: ∀T1,T. T1 ≃ T → ∀T2. T ≃ T2 → T1 ≃ T2.
+#T1 #T * -T1 -T //
+#I #V1 #V #T1 #T #X #H
+elim (tstc_inv_pair1 … H) -H #V2 #T2 #H destruct //
+qed.
+
+theorem tstc_canc_sn: ∀T,T1. T ≃ T1 → ∀T2. T ≃ T2 → T1 ≃ T2.
+/3 width=3/ qed.
+
+theorem tstc_canc_dx: ∀T1,T. T1 ≃ T → ∀T2. T2 ≃ T → T1 ≃ T2.
+/3 width=3/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/grammar/tstc_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/grammar/tstc_vector.ma
new file mode 100644 (file)
index 0000000..1e35292
--- /dev/null
@@ -0,0 +1,33 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/term_vector.ma".
+include "basic_2/grammar/tstc.ma".
+
+(* SAME TOP TERM CONSTRUCTOR ************************************************)
+
+(* Advanced inversion lemmas ************************************************)
+
+(* Basic_1: was only: iso_flats_lref_bind_false iso_flats_flat_bind_false *)
+lemma tstc_inv_bind_appls_simple: ∀a,I,Vs,V2,T1,T2. ⒶVs.T1 ≃ ⓑ{a,I} V2. T2 →
+                                  𝐒⦃T1⦄ → ⊥.
+#a #I #Vs #V2 #T1 #T2 #H
+elim (tstc_inv_pair2 … H) -H #V0 #T0
+elim Vs -Vs normalize
+[ #H destruct #H
+  @(simple_inv_bind … H)
+| #V #Vs #_ #H destruct
+]
+qed.
+
diff --git a/matita/matita/contribs/lambdadelta/basic_2/names.txt b/matita/matita/contribs/lambdadelta/basic_2/names.txt
new file mode 100644 (file)
index 0000000..6c34328
--- /dev/null
@@ -0,0 +1,48 @@
+NAMING CONVENTIONS FOR METAVARIABLES
+
+A,B    : arity
+C,D    : candidate of reducibility
+E,F    : RTM environment
+G      : global environment 
+H      : reserved: transient premise
+IH     : reserved: inductive premise
+I,J    : item
+K,L    : local environment
+M,N    : reserved: future use
+O,P,Q  :
+R      : generic predicate (relation)
+S      : RTM stack
+T,U,V,W: term
+X,Y,Z  : reserved: transient objet denoted by a capital letter
+
+a,b    : binder polarity
+c      : reserved: future use (lambda_delta 3)
+d      : relocation depth
+e      : relocation height
+f      :
+g      : sort degree parameter
+h      : sort hierarchy parameter
+i,j    : local reference position index (de Bruijn's)
+k      : sort index
+l      : term degree
+m,n    : reserved: future use
+o      :
+p,q    : global reference position
+r,s    :
+t,u    : local reference position level (de Bruijn's)
+v,w    :
+x,y,z  : reserved: transient objet denoted by a small letter
+
+NAMING CONVENTIONS FOR CONSTRUCTORS
+
+0: atomic
+2: binary
+
+A: application to vector
+
+a: application
+b: binder
+d: abbreviation
+f: flat
+l: abstraction
+n: native type annotation
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation.ma b/matita/matita/contribs/lambdadelta/basic_2/notation.ma
new file mode 100644 (file)
index 0000000..3ff8f21
--- /dev/null
@@ -0,0 +1,475 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+(* Grammar ******************************************************************)
+
+notation "⓪"
+ non associative with precedence 90
+ for @{ 'Item0 }.
+
+notation "hvbox( ⓪ { term 46 I } )"
+ non associative with precedence 90
+ for @{ 'Item0 $I }.
+
+notation "⋆"
+ non associative with precedence 90
+ for @{ 'Star }.
+
+notation "hvbox( ⋆ term 90 k )"
+ non associative with precedence 90
+ for @{ 'Star $k }.
+
+notation "hvbox( # term 90 i )"
+ non associative with precedence 90
+ for @{ 'LRef $i }.
+
+notation "hvbox( § term 90 p )"
+ non associative with precedence 90
+ 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 , 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 } 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 } 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( T . break ④ { term 46 I } break { term 46 T1 , break term 46 T2 , break term 46 T3 } )"
+ non associative with precedence 50
+ for @{ 'DxItem4 $T $I $T1 $T2 $T3 }.
+
+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( L ⊢ break term 46 T1 ≈ break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'Hom $L $T1 $T2 }.
+
+notation "hvbox( T1 ≃ break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'Iso $T1 $T2 }.
+
+(* Substitution *************************************************************)
+
+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( T1 break ≼ [ term 46 d , break term 46 e ] break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'SubEq $T1 $d $e $T2 }.
+
+notation "hvbox( ≽ [ term 46 d , break term 46 e ] break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'SubEqBottom $d $e $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 @{ 'RestSupTerm $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 }.
+
+notation "hvbox( L ⊢ break term 46 T1 break ▶ [ term 46 d , break term 46 e ] break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'PSubst $L $T1 $d $e $T2 }.
+
+(* Unfold *******************************************************************)
+
+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 @{ 'RestSupTermPlus $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 @{ 'RestSupTermStar $L1 $T1 $L2 $T2 }.
+
+notation "hvbox( T1 break ▶ * [ term 46 d , break term 46 e ] break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'PSubstStar $T1 $d $e $T2 }.
+
+notation "hvbox( L ⊢ break term 46 T1 break ▶ * [ term 46 d , break term 46 e ] break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'PSubstStar $L $T1 $d $e $T2 }.
+
+notation "hvbox( L ⊢ break term 46 T1 break ▶ ▶ * [ term 46 d , break term 46 e ] break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'PSubstStarAlt $L $T1 $d $e $T2 }.
+
+notation "hvbox( T1 break ⊢ ▶ * [ term 46 d , break term 46 e ] break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'PSubstStarSn $T1 $d $e $T2 }.
+
+notation "hvbox( T1 break ⊢ ▶ ▶ * [ term 46 d , break term 46 e ] break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'PSubstStarSnAlt $T1 $d $e $T2 }.
+
+notation "hvbox( ▼ * [ term 46 d , break term 46 e ] break term 46 T1 ≡ break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'TSubst $T1 $d $e $T2 }.
+
+notation "hvbox( L ⊢ break ▼ * [ term 46 d , break term 46 e ] break term 46 T1 ≡ break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'TSubst $L $T1 $d $e $T2 }.
+
+notation "hvbox( ▼ ▼ * [ term 46 d , break term 46 e ] break term 46 T1 ≡ break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'TSubstAlt $T1 $d $e $T2 }.
+
+notation "hvbox( L ⊢ break ▼ ▼ * [ term 46 d , break term 46 e ] break term 46 T1 ≡ break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'TSubstAlt $L $T1 $d $e $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 $L $T1 $T2 }.
+
+notation "hvbox( h ⊢ break term 46 L1 • ⊑ [ term 46 g ] break term 46 L2 )"
+   non associative with precedence 45
+   for @{ 'CrSubEqS $h $g $L1 $L2 }.
+
+(* Unwind *******************************************************************)
+
+notation "hvbox( L1 ⊢ ⧫ * break term 46 T ≡ break term 46 L2 )"
+   non associative with precedence 45
+   for @{ 'Unwind $L1 $T $L2 }.
+
+(* Reducibility *************************************************************)
+
+notation "hvbox( L ⊢ break 𝐑 ⦃ term 46 T ⦄ )"
+   non associative with precedence 45
+   for @{ 'Reducible $L $T }.
+
+notation "hvbox( L ⊢ break 𝐈 ⦃ term 46 T ⦄ )"
+   non associative with precedence 45
+   for @{ 'NotReducible $L $T }.
+
+notation "hvbox( L ⊢ break 𝐍 ⦃ term 46 T ⦄ )"
+   non associative with precedence 45
+   for @{ 'Normal $L $T }.
+
+(* this might be removed *)
+notation "hvbox( 𝐇𝐑 ⦃ term 46 T ⦄ )"
+   non associative with precedence 45
+   for @{ 'HdReducible $T }.
+
+(* this might be removed *)
+notation "hvbox( L ⊢ break 𝐇𝐑 ⦃ term 46 T ⦄ )"
+   non associative with precedence 45
+   for @{ 'HdReducible $L $T }.
+
+(* this might be removed *)
+notation "hvbox( 𝐇𝐈 ⦃ term 46 T ⦄ )"
+   non associative with precedence 45
+   for @{ 'NotHdReducible $T }.
+
+(* this might be removed *)
+notation "hvbox( L ⊢ break 𝐇𝐈 ⦃ term 46 T ⦄ )"
+   non associative with precedence 45
+   for @{ 'NotHdReducible $L $T }.
+
+(* this might be removed *)
+notation "hvbox( 𝐇𝐍 ⦃ term 46 T ⦄ )"
+   non associative with precedence 45
+   for @{ 'HdNormal $T }.
+
+(* this might be removed *)
+notation "hvbox( L ⊢ break 𝐇𝐍 ⦃ term 46 T ⦄ )"
+   non associative with precedence 45
+   for @{ 'HdNormal $L $T }.
+
+notation "hvbox( T1 ➡ break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'PRed $T1 $T2 }.
+
+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 L1 ⦄ ➡ break ⦃ term 46 L2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'FocalizedPRed $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 @{ 'FocalizedPRed $L1 $T1 $L2 $T2 }.
+
+notation "hvbox( L ⊢ break ⦃ term 46 L1, break term 46 T1 ⦄ ➡ break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'FocalizedPRed $L $L1 $T1 $L2 $T2 }.
+
+notation "hvbox( ⦃ term 46 L1 ⦄ ➡ ➡ break ⦃ term 46 L2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'FocalizedPRedAlt $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 @{ 'XPRed $h $g $L $T1 $T2 }.
+
+(* Computation **************************************************************)
+
+notation "hvbox( T1 ➡ * break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'PRedStar $T1 $T2 }.
+
+notation "hvbox( L ⊢ break term 46 T1 ➡ * break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'PRedStar $L $T1 $T2 }.
+
+notation "hvbox( T1 ➡ ➡ * break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'PRedStarAlt $T1 $T2 }.
+
+notation "hvbox( ⦃ term 46 L1 ⦄ ➡ * break ⦃ term 46 L2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'FocalizedPRedStar $L1 $L2 }.
+
+notation "hvbox( ⦃ term 46 L1 , term 46 T1 ⦄ ➡ * break ⦃ term 46 L2 , term 46 T2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'FocalizedPRedStar $L1 $T1 $L2 $T2 }.
+
+notation "hvbox( ⦃ term 46 L1 ⦄ ➡ ➡ * break ⦃ term 46 L2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'FocalizedPRedStarAlt $L1 $L2 }.
+
+notation "hvbox( ⦃ term 46 L1 , term 46 T1 ⦄ ➡ ➡ * break ⦃ term 46 L2 , term 46 T2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'FocalizedPRedStarAlt $L1 $T1 $L2 $T2 }.
+
+notation "hvbox( L ⊢ break term 46 T1 ➡ * break 𝐍 ⦃ Tterm 46 2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'PEval $L $T1 $T2 }.
+
+notation "hvbox( ⬊ * term 46 T )"
+   non associative with precedence 45
+   for @{ 'SN $T }.
+
+notation "hvbox( L ⊢ ⬊ * break term 46 T )"
+   non associative with precedence 45
+   for @{ 'SN $L $T }.
+
+notation "hvbox( L ⊢ ⬊ ⬊ * break term 46 T )"
+   non associative with precedence 45
+   for @{ 'SNAlt $L $T }.
+
+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( ⦃ 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 @{ 'XPRedStar $h $g $L $T1 $T2 }.
+
+notation "hvbox( ⦃ term 46 h , break term 46 L ⦄ ⊢ • ⬊ * break [ term 46 g ] break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'XSN $h $g $L $T }.
+
+(* Conversion ***************************************************************)
+
+notation "hvbox( L ⊢ break term 46 T1 ⬌ break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'PConv $L $T1 $T2 }.
+
+notation "hvbox( ⦃ term 46 L1 ⦄ ⬌ break ⦃ term 46 L2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'FocalizedPConv $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 @{ 'FocalizedPConv $L1 $T1 $L2 $T2 }.
+
+notation "hvbox( ⦃ term 46 L1 ⦄ ⬌ ⬌ break ⦃ term 46 L2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'FocalizedPConvAlt $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 @{ 'FocalizedPConvAlt $L1 $T1 $L2 $T2 }.
+
+(* 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 ⊢ • ⊑ [ term 46 g ] break term 46 L2 )"
+   non associative with precedence 45
+   for @{ 'CrSubEqSE $h $g $L1 $L2 }.
+
+notation "hvbox( ⦃ term 46 L1 ⦄ ⬌ * break ⦃ term 46 L2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'FocalizedPConvStar $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 @{ 'FocalizedPConvStar $L1 $T1 $L2 $T2 }.
+
+notation "hvbox( ⦃ term 46 L1 ⦄ ⬌ ⬌ * break ⦃ term 46 L2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'FocalizedPConvStarAlt $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 @{ 'FocalizedPConvStarAlt $L1 $T1 $L2 $T2 }.
+
+(* 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 ⊩ : ⊑ [ term 46 g ] break term 46 L2 )"
+   non associative with precedence 45
+   for @{ 'CrSubEqV $h $g $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 }.
+
+(* 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 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr.ma
new file mode 100644 (file)
index 0000000..95c01d1
--- /dev/null
@@ -0,0 +1,55 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/cpr.ma".
+include "basic_2/reducibility/fpr.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON CLOSURES *************************)
+
+definition cfpr: lenv → bi_relation lenv term ≝
+                 λL,L1,T1,L2,T2. |L1| = |L2| ∧ L ⊢ L1 @@ T1 ➡ L2 @@ T2.
+
+interpretation
+   "context-sensitive parallel reduction (closure)"
+   'FocalizedPRed L L1 T1 L2 T2 = (cfpr L L1 T1 L2 T2).
+
+(* Basic properties *********************************************************)
+
+lemma cfpr_refl: ∀L. bi_reflexive … (cfpr L).
+/2 width=1/ qed.
+
+lemma fpr_cfpr: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ → ⋆ ⊢ ⦃L1, T1⦄ ➡ ⦃L2, T2⦄.
+#L1 #L2 #T1 #T2 * /3 width=1/ 
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma cfpr_inv_atom1: ∀L,L2,T1,T2. L ⊢ ⦃⋆, T1⦄ ➡ ⦃L2, T2⦄ → L ⊢ T1 ➡ T2 ∧ L2 = ⋆.
+#L #L2 #T1 #T2 * #H >(length_inv_zero_sn … H) /2 width=1/
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma fpr_inv_pair1_sn: ∀I,K1,L2,V1,T1,T2. ⦃⋆.ⓑ{I}V1@@K1, T1⦄ ➡ ⦃L2, T2⦄ →
+                        ∃∃K2,V2. V1 ➡ V2 &
+                                 ⋆.ⓑ{I}V2 ⊢ ⦃K1, T1⦄ ➡ ⦃K2, T2⦄  &
+                                 L2 = ⋆.ⓑ{I}V2@@K2.
+#I1 #K1 #L2 #V1 #T1 #T2 * >append_length #H
+elim (length_inv_pos_sn_append … H) -H #I2 #K2 #V2 #HK12 #H destruct
+>shift_append_assoc >shift_append_assoc normalize in ⊢ (%→?); #H 
+elim (tpr_inv_bind1 … H) -H *
+[ #V0 #T #T0 #HV10 #HT1 #HT0 #H destruct /5 width=5/
+| #T0 #_ #_ #H destruct
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr_aaa.ma
new file mode 100644 (file)
index 0000000..4c9b8ac
--- /dev/null
@@ -0,0 +1,27 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/cpr_aaa.ma".
+include "basic_2/reducibility/cfpr_cpr.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON CLOSURES *************************)
+
+(* Properties about atomic arity assignment on terms ************************)
+
+lemma aaa_fpr_conf: ∀L1,T1,A. L1 ⊢ T1 ⁝ A →
+                    ∀L2,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ → L2 ⊢ T2 ⁝ A.
+#L1 #T1 #A #HT1 #L2 #T2 #H
+elim (fpr_inv_all … H) -H 
+/4 width=5 by aaa_cpr_conf, aaa_ltpr_conf, aaa_ltpss_sn_conf/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr_cfpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr_cfpr.ma
new file mode 100644 (file)
index 0000000..f442be2
--- /dev/null
@@ -0,0 +1,26 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/cpr_cpr.ma".
+include "basic_2/reducibility/cfpr.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON CLOSURES *************************)
+
+(* Main properties **********************************************************)
+
+theorem cfpr_conf: ∀L. bi_confluent … (cfpr L).
+#L #L0 #L1 #T0 #T1 * #HL01 #HT01 #L2 #T2 * >HL01 #HL12 #HT02
+elim (cpr_conf … HT01 HT02) -L0 -T0 #X #H1 #H2
+elim (cpr_fwd_shift1 … H1) #L0 #T0 #HL10 #H destruct /3 width=5/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr_cpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr_cpr.ma
new file mode 100644 (file)
index 0000000..a46c977
--- /dev/null
@@ -0,0 +1,65 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/ltpss_sn_alt.ma".
+include "basic_2/reducibility/cpr_tpss.ma".
+include "basic_2/reducibility/cpr_cpr.ma".
+include "basic_2/reducibility/cfpr_ltpss.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON CLOSURES *************************)
+
+(* Advanced properties ******************************************************)
+
+lemma fpr_all: ∀L1,L. L1 ➡ L → ∀L2,T1,T2. L ⊢ T1 ➡ T2 →
+               L ⊢ ▶* [0, |L|] L2 → ⦃L1, T1⦄ ➡ ⦃L2, T2⦄.
+#L1 #L #H elim H -L1 -L
+[ #L2 #T1 #T2 #HT12 #HL2
+  lapply (ltpss_sn_inv_atom1 … HL2) -HL2 #H destruct
+  lapply (cpr_inv_atom … HT12) -HT12 /2 width=1/
+| #I #L1 #L #V1 #V #_ #HV1 #IH #X #T1 #T2 #HT12 #H
+  elim (ltpss_sn_inv_tpss21 … H ?) -H // <minus_plus_m_m #L2 #V2 #HL2 #HV2 #H destruct
+  lapply (cpr_bind_dx false … HV1 HT12) -HV1 -HT12 #HT12
+  lapply (cpr_tpss_trans … HT12 (-ⓑ{I}V2.T2) ?) -HT12 /2 width=1/ -HV2 /3 width=1/
+]
+qed.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma cfpr_inv_all: ∀L1,L2,L0,T1,T2. L0 ⊢ ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ →
+                    ∃∃L. L0 @@ L1 ➡ L0 @@ L & L0 @@ L ⊢ T1 ➡ T2 &
+                         L0 @@ L ⊢ ▶* [0, |L0| + |L|] L0 @@ L2.
+#L1 @(lenv_ind_dx … L1) -L1
+[ #L2 #L0 #T1 #T2 #H
+  elim (cfpr_inv_atom1 … H) -H #HT12 #H destruct /3 width=4/
+| #I #L1 #V1 #IH #X #L0 #T1 #T2 #H
+  elim (cfpr_inv_pair1 … H) -H #L2 #V #V2 #HV1 #HV2 #HT12 #H destruct
+  elim (IH … HT12) -IH -HT12 #L #HL1 #HT12 #HL2
+  elim (ltpr_inv_append1 … HL1) -HL1 #X #Y #HX #HY #H
+  lapply (ltpr_fwd_length … HX) -HX #HX
+  elim (append_inj_dx … H ?) -H // -HX #_ #H destruct -X
+  lapply (ltpss_sn_fwd_length … HL2) >append_length >append_length #H
+  lapply (injective_plus_r … H) -H #H
+  @(ex3_1_intro … (⋆.ⓑ{I}V@@Y)) <append_assoc // -HT12
+  <append_assoc [ /3 width=1/ ] -HV1 -HY
+  >append_length <associative_plus
+  @(ltpss_sn_dx_trans_eq … HL2) -HL2 >H -H >commutative_plus /3 width=1/
+]
+qed-.
+
+lemma fpr_inv_all: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ →
+                   ∃∃L. L1 ➡ L & L ⊢ T1 ➡ T2 & L ⊢ ▶* [0, |L|] L2.
+#L1 #L2 #T1 #T2 #H
+lapply (fpr_cfpr … H) -H #H
+elim (cfpr_inv_all … H) -H /2 width=4/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr_ltpss.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr_ltpss.ma
new file mode 100644 (file)
index 0000000..4249113
--- /dev/null
@@ -0,0 +1,39 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/cpr_lift.ma".
+include "basic_2/reducibility/cpr_ltpss.ma".
+include "basic_2/reducibility/cfpr.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON CLOSURES *************************)
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma cfpr_inv_pair1: ∀I,L,K1,L2,V1,T1,T2. L ⊢ ⦃⋆.ⓑ{I}V1@@K1, T1⦄ ➡ ⦃L2, T2⦄ →
+                      ∃∃K2,V,V2. V1 ➡ V & L ⊢ V ▶* [0, |L|] V2 &
+                                 L.ⓑ{I}V ⊢ ⦃K1, T1⦄ ➡ ⦃K2, T2⦄  &
+                                 L2 = ⋆.ⓑ{I}V2@@K2.
+* #L #K1 #L2 #V1 #T1 #T2 * >append_length #H
+elim (length_inv_pos_sn_append … H) -H #I2 #K2 #V2 #HK12 #H destruct
+>shift_append_assoc >shift_append_assoc normalize in ⊢ (??%%→?); #H 
+[ elim (cpr_inv_abbr1 … H) -H *
+  [ #V #V0 #T0 #HV1 #HV0 #HT10 #H destruct /3 width=7/
+  | #T0 #_ #_ #H destruct
+  ]
+| elim (cpr_inv_abst1 … H Abst V2) -H
+  #V #T * #V0 #HV10 #HV0 #HT1 #H destruct
+  lapply (ltpss_sn_cpr_trans (L.ⓛV0) … 0 (|L|+1) … HT1) -HT1 /2 width=1/ #HT12
+  /3 width=7/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cif.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cif.ma
new file mode 100644 (file)
index 0000000..0ea9d51
--- /dev/null
@@ -0,0 +1,71 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/crf.ma".
+
+(* CONTEXT-SENSITIVE IRREDUCIBLE TERMS **************************************)
+
+definition cif: lenv → predicate term ≝ λL,T. L ⊢ 𝐑⦃T⦄ → ⊥.
+
+interpretation "context-sensitive irreducibility (term)"
+   'NotReducible L T = (cif L T).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma cif_inv_delta: ∀L,K,V,i. ⇩[0, i] L ≡ K.ⓓV → L ⊢ 𝐈⦃#i⦄ → ⊥.
+/3 width=3/ qed-.
+
+lemma cif_inv_ri2: ∀I,L,V,T. ri2 I → L ⊢ 𝐈⦃②{I}V.T⦄ → ⊥.
+/3 width=1/ qed-.
+
+lemma cif_inv_ib2: ∀a,I,L,V,T. ib2 a I → L ⊢ 𝐈⦃ⓑ{a,I}V.T⦄ →
+                   L ⊢ 𝐈⦃V⦄ ∧ L.ⓑ{I}V ⊢ 𝐈⦃T⦄.
+/4 width=1/ qed-.
+
+lemma cif_inv_bind: ∀a,I,L,V,T. L ⊢ 𝐈⦃ⓑ{a,I}V.T⦄ →
+                    ∧∧ L ⊢ 𝐈⦃V⦄ & L.ⓑ{I}V ⊢ 𝐈⦃T⦄ & ib2 a I.
+#a * [ elim a -a ]
+[ #L #V #T #H elim (H ?) -H /3 width=1/
+|*: #L #V #T #H elim (cif_inv_ib2 … H) -H /2 width=1/ /3 width=1/
+]  
+qed-.
+
+lemma cif_inv_appl: ∀L,V,T. L ⊢ 𝐈⦃ⓐV.T⦄ → ∧∧ L ⊢ 𝐈⦃V⦄ & L ⊢ 𝐈⦃T⦄ & 𝐒⦃T⦄.
+#L #V #T #HVT @and3_intro /3 width=1/
+generalize in match HVT; -HVT elim T -T //
+* // #a * #U #T #_ #_ #H elim (H ?) -H /2 width=1/
+qed-.
+
+lemma cif_inv_flat: ∀I,L,V,T. L ⊢ 𝐈⦃ⓕ{I}V.T⦄ →
+                    ∧∧ L ⊢ 𝐈⦃V⦄ & L ⊢ 𝐈⦃T⦄ & 𝐒⦃T⦄ & I = Appl.
+* #L #V #T #H
+[ elim (cif_inv_appl … H) -H /2 width=1/
+| elim (cif_inv_ri2 … H) -H /2 width=1/
+]
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma tif_atom: ∀I. ⋆ ⊢ 𝐈⦃⓪{I}⦄.
+/2 width=2 by trf_inv_atom/ qed.
+
+lemma cif_ib2: ∀a,I,L,V,T. ib2 a I → L ⊢ 𝐈⦃V⦄ → L.ⓑ{I}V ⊢ 𝐈⦃T⦄ → L ⊢ 𝐈⦃ⓑ{a,I}V.T⦄.
+#a #I #L #V #T #HI #HV #HT #H
+elim (crf_inv_ib2 … HI H) -HI -H /2 width=1/
+qed.
+
+lemma cif_appl: ∀L,V,T. L ⊢ 𝐈⦃V⦄ → L ⊢ 𝐈⦃T⦄ →  𝐒⦃T⦄ → L ⊢ 𝐈⦃ⓐV.T⦄.
+#L #V #T #HV #HT #H1 #H2
+elim (crf_inv_appl … H2) -H2 /2 width=1/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cif_append.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cif_append.ma
new file mode 100644 (file)
index 0000000..45fd178
--- /dev/null
@@ -0,0 +1,34 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/crf_append.ma".
+include "basic_2/reducibility/cif.ma".
+
+(* CONTEXT-SENSITIVE IRREDUCIBLE TERMS **************************************)
+
+(* Advanved properties ******************************************************)
+
+lemma cif_labst_last: ∀L,T,W. L ⊢ 𝐈⦃T⦄  → ⋆.ⓛW @@ L ⊢ 𝐈⦃T⦄.
+/3 width=2 by crf_inv_labst_last/ qed.
+
+lemma cif_tif: ∀T,W. ⋆ ⊢ 𝐈⦃T⦄ → ⋆.ⓛW ⊢ 𝐈⦃T⦄.
+/3 width=2 by crf_inv_trf/ qed.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma cif_inv_labst_last: ∀L,T,W. ⋆.ⓛW @@ L ⊢ 𝐈⦃T⦄  → L ⊢ 𝐈⦃T⦄.
+/3 width=1/ qed-.
+
+lemma cif_inv_tif: ∀T,W. ⋆.ⓛW ⊢ 𝐈⦃T⦄  → ⋆ ⊢ 𝐈⦃T⦄.
+/3 width=1/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cnf.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cnf.ma
new file mode 100644 (file)
index 0000000..02bbcf8
--- /dev/null
@@ -0,0 +1,66 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/cpr.ma".
+
+(* CONTEXT-SENSITIVE NORMAL TERMS *******************************************)
+
+definition cnf: lenv → predicate term ≝ λL. NF … (cpr L) (eq …).
+
+interpretation
+   "context-sensitive normality (term)"
+   'Normal L T = (cnf L T).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma cnf_inv_appl: ∀L,V,T. L ⊢ 𝐍⦃ⓐV.T⦄ → ∧∧ L ⊢ 𝐍⦃V⦄ & L ⊢ 𝐍⦃T⦄ & 𝐒⦃T⦄.
+#L #V1 #T1 #HVT1 @and3_intro
+[ #V2 #HV2 lapply (HVT1 (ⓐV2.T1) ?) -HVT1 /2 width=1/ -HV2 #H destruct //
+| #T2 #HT2 lapply (HVT1 (ⓐV1.T2) ?) -HVT1 /2 width=1/ -HT2 #H destruct //
+| generalize in match HVT1; -HVT1 elim T1 -T1 * // #a * #W1 #U1 #_ #_ #H
+  [ elim (lift_total V1 0 1) #V2 #HV12
+    lapply (H (ⓓ{a}W1.ⓐV2.U1) ?) -H /3 width=3/ -HV12 #H destruct
+  | lapply (H (ⓓ{a}V1.U1) ?) -H /3 width=1/ #H destruct
+]
+qed-.
+
+lemma cnf_inv_zeta: ∀L,V,T. L ⊢ 𝐍⦃+ⓓV.T⦄ → ⊥.
+#L #V #T #H elim (is_lift_dec T 0 1)
+[ * #U #HTU
+  lapply (H U ?) -H /3 width=3 by cpr_tpr, tpr_zeta/ #H destruct (**) (* auto too slow without trace *)
+  elim (lift_inv_pair_xy_y … HTU)
+| #HT
+  elim (tps_full (⋆) V T (⋆. ⓓV) 0 ?) // #T2 #T1 #HT2 #HT12
+  lapply (H (+ⓓV.T2) ?) -H /3 width=3 by cpr_tpr, tpr_delta/ -HT2 #H destruct /3 width=2/ (**) (* auto too slow without trace *)
+]
+qed.
+
+lemma cnf_inv_tau: ∀L,V,T. L ⊢ 𝐍⦃ⓝV.T⦄ → ⊥.
+#L #V #T #H lapply (H T ?) -H /2 width=1/ #H
+@discr_tpair_xy_y //
+qed-.
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was: nf2_sort *)
+lemma cnf_sort: ∀L,k. L ⊢ 𝐍⦃⋆k⦄.
+#L #k #X #H
+>(cpr_inv_sort1 … H) //
+qed.
+
+(* Basic_1: was: nf2_dec *)
+axiom cnf_dec: ∀L,T1. L ⊢ 𝐍⦃T1⦄ ∨
+               ∃∃T2. L ⊢ T1 ➡ T2 & (T1 = T2 → ⊥).
+
+(* Basic_1: removed theorems 1: nf2_abst_shift *)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cnf_cif.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cnf_cif.ma
new file mode 100644 (file)
index 0000000..51ce95a
--- /dev/null
@@ -0,0 +1,106 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/reducibility/cif.ma".
+include "basic_2/reducibility/cnf_lift.ma".
+
+(* CONTEXT-SENSITIVE NORMAL TERMS *******************************************)
+
+(* Main properties **********************************************************)
+
+lemma tps_cif_eq: ∀L,T1,T2,d,e. L ⊢ T1 ▶[d, e] T2 → L ⊢ 𝐈⦃T1⦄ → T1 = T2.
+#L #T1 #T2 #d #e #H elim H -L -T1 -T2 -d -e
+[ //
+| #L #K #V #W #i #d #e #_ #_ #HLK #_ #H -d -e
+  elim (cif_inv_delta … HLK ?) //
+| #L #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #H
+  elim (cif_inv_bind … H) -H #HV1 #HT1 * #H destruct
+  lapply (IHV12 … HV1) -IHV12 -HV1 #H destruct /3 width=1/
+| #L #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #H
+  elim (cif_inv_flat … H) -H #HV1 #HT1 #_ #_ /3 width=1/
+]
+qed.
+
+lemma tpss_cif_eq: ∀L,T1,T2,d,e. L ⊢ T1 ▶*[d, e] T2 → L ⊢ 𝐈⦃T1⦄ → T1 = T2.
+#L #T1 #T2 #d #e #H @(tpss_ind … H) -T2 //
+#T #T2 #_ #HT2 #IHT1 #HT1
+lapply (IHT1 HT1) -IHT1 #H destruct /2 width=5/
+qed.
+
+lemma tpr_cif_eq: ∀T1,T2. T1 ➡ T2 → ∀L. L ⊢ 𝐈⦃T1⦄ → T1 = T2.
+#T1 #T2 #H elim H -T1 -T2
+[ //
+| * #V1 #V2 #T1 #T2 #_ #_ #IHV1 #IHT1 #L #H
+  [ elim (cif_inv_appl … H) -H #HV1 #HT1 #_
+    >IHV1 -IHV1 // -HV1 >IHT1 -IHT1 //
+  | elim (cif_inv_ri2 … H) /2 width=1/
+  ]
+| #a #V1 #V2 #W #T1 #T2 #_ #_ #_ #_ #L #H
+  elim (cif_inv_appl … H) -H #_ #_ #H
+  elim (simple_inv_bind … H)
+| #a * #V1 #V2 #T1 #T #T2 #_ #_ #HT2 #IHV1 #IHT1 #L #H
+  [ lapply (tps_lsubs_trans … HT2 (L.ⓓV2) ?) -HT2 /2 width=1/ #HT2
+    elim (cif_inv_bind … H) -H #HV1 #HT1 * #H destruct
+    lapply (IHV1 … HV1) -IHV1 -HV1 #H destruct
+    lapply (IHT1 … HT1) -IHT1 #H destruct
+    lapply (tps_cif_eq … HT2 ?) -HT2 //
+  | <(tps_inv_refl_SO2 … HT2 ?) -HT2 //
+    elim (cif_inv_ib2 … H) -H /2 width=1/ /3 width=2/
+  ]
+| #a #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #_ #L #H
+  elim (cif_inv_appl … H) -H #_ #_ #H
+  elim (simple_inv_bind … H)
+| #V1 #T1 #T #T2 #_ #_ #_ #L #H
+  elim (cif_inv_ri2 … H) /2 width=1/
+| #V1 #T1 #T2 #_ #_ #L #H
+  elim (cif_inv_ri2 … H) /2 width=1/
+]
+qed.
+
+lemma cpr_cif_eq: ∀L,T1,T2. L ⊢ T1 ➡ T2 → L ⊢ 𝐈⦃T1⦄ → T1 = T2.
+#L #T1 #T2 * #T0 #HT10 #HT02 #HT1
+lapply (tpr_cif_eq … HT10 … HT1) -HT10 #H destruct /2 width=5/
+qed.
+
+theorem cif_cnf: ∀L,T. L ⊢ 𝐈⦃T⦄ → L ⊢ 𝐍⦃T⦄.
+/3 width=3/ qed.
+
+(* Note: this property is unusual *)
+lemma cnf_crf_false: ∀L,T. L ⊢ 𝐑⦃T⦄ → L ⊢ 𝐍⦃T⦄ → ⊥.
+#L #T #H elim H -L -T
+[ #L #K #V #i #HLK #H
+  elim (cnf_inv_delta … HLK H)
+| #L #V #T #_ #IHV #H
+  elim (cnf_inv_appl … H) -H /2 width=1/
+| #L #V #T #_ #IHT #H
+  elim (cnf_inv_appl … H) -H /2 width=1/
+| #I #L #V #T * #H1 #H2 destruct
+  [ elim (cnf_inv_zeta … H2)
+  | elim (cnf_inv_tau … H2)
+  ]
+|5,6: #a * [ elim a ] #L #V #T * #H1 #_ #IH #H2 destruct
+  [1,3: elim (cnf_inv_abbr … H2) -H2 /2 width=1/
+  |*: elim (cnf_inv_abst … H2) -H2 /2 width=1/
+  ]
+| #a #L #V #W #T #H
+  elim (cnf_inv_appl … H) -H #_ #_ #H
+  elim (simple_inv_bind … H)
+| #a #L #V #W #T #H 
+  elim (cnf_inv_appl … H) -H #_ #_ #H
+  elim (simple_inv_bind … H)
+]
+qed.
+
+theorem cnf_cif: ∀L,T. L ⊢ 𝐍⦃T⦄ → L ⊢ 𝐈⦃T⦄.
+/2 width=4/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cnf_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cnf_lift.ma
new file mode 100644 (file)
index 0000000..0e1a855
--- /dev/null
@@ -0,0 +1,85 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/cpr_lift.ma".
+include "basic_2/reducibility/cpr_cpr.ma".
+include "basic_2/reducibility/cnf.ma".
+
+(* CONTEXT-SENSITIVE NORMAL TERMS *******************************************)
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma cnf_inv_delta: ∀L,K,V,i. ⇩[0, i] L ≡ K.ⓓV → L ⊢ 𝐍⦃#i⦄ → ⊥.
+#L #K #V #i #HLK #H
+elim (lift_total V 0 (i+1)) #W #HVW
+lapply (H W ?) -H [ /3 width=6/ ] -HLK #H destruct
+elim (lift_inv_lref2_be … HVW ? ?) -HVW //
+qed-.
+
+lemma cnf_inv_abst: ∀a,L,V,T. L ⊢ 𝐍⦃ⓛ{a}V.T⦄ → L ⊢ 𝐍⦃V⦄ ∧ L.ⓛV ⊢ 𝐍⦃T⦄.
+#a #L #V1 #T1 #HVT1 @conj
+[ #V2 #HV2 lapply (HVT1 (ⓛ{a}V2.T1) ?) -HVT1 /2 width=2/ -HV2 #H destruct //
+| #T2 #HT2 lapply (HVT1 (ⓛ{a}V1.T2) ?) -HVT1 /2 width=2/ -HT2 #H destruct //
+]
+qed-.
+
+lemma cnf_inv_abbr: ∀L,V,T. L ⊢ 𝐍⦃-ⓓV.T⦄ → L ⊢ 𝐍⦃V⦄ ∧ L.ⓓV ⊢ 𝐍⦃T⦄.
+#L #V1 #T1 #HVT1 @conj
+[ #V2 #HV2 lapply (HVT1 (-ⓓV2.T1) ?) -HVT1 /2 width=2/ -HV2 #H destruct //
+| #T2 #HT2 lapply (HVT1 (-ⓓV1.T2) ?) -HVT1 /2 width=2/ -HT2 #H destruct //
+]
+qed-.
+
+(* Advanced properties ******************************************************)
+
+(* Basic_1: was only: nf2_csort_lref *)
+lemma cnf_lref_atom: ∀L,i. ⇩[0, i] L ≡ ⋆ → L  ⊢ 𝐍⦃#i⦄.
+#L #i #HLK #X #H
+elim (cpr_inv_lref1 … H) // *
+#K0 #V0 #V1 #HLK0 #_ #_ #_
+lapply (ldrop_mono … HLK … HLK0) -L #H destruct
+qed.
+
+(* Basic_1: was: nf2_lref_abst *)
+lemma cnf_lref_abst: ∀L,K,V,i. ⇩[0, i] L ≡ K. ⓛV → L ⊢ 𝐍⦃#i⦄.
+#L #K #V #i #HLK #X #H
+elim (cpr_inv_lref1 … H) // *
+#K0 #V0 #V1 #HLK0 #_ #_ #_
+lapply (ldrop_mono … HLK … HLK0) -L #H destruct
+qed.
+
+(* Basic_1: was: nf2_abst *)
+lemma cnf_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_inv_abst1 … H I V) -H #W0 #T0 #HW0 #HT0 #H destruct
+>(HW … HW0) -W0 >(HT … HT0) -T0 //
+qed.
+
+(* Basic_1: was only: nf2_appl_lref *)
+lemma cnf_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
+>(HV … HV0) -V0 >(HT … HT0) -T0 //
+qed.
+
+(* Relocation properties ****************************************************)
+
+(* Basic_1: was: nf2_lift *)
+lemma cnf_lift: ∀L0,L,T,T0,d,e.
+                L ⊢ 𝐍⦃T⦄ → ⇩[d, e] L0 ≡ L → ⇧[d, e] T ≡ T0 → L0 ⊢ 𝐍⦃T0⦄.
+#L0 #L #T #T0 #d #e #HLT #HL0 #HT0 #X #H
+elim (cpr_inv_lift1 … HL0 … HT0 … H) -L0 #T1 #HT10 #HT1
+<(HLT … HT1) in HT0; -L #HT0
+>(lift_mono … HT10 … HT0) -T1 -X //
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr.ma
new file mode 100644 (file)
index 0000000..22fbfc1
--- /dev/null
@@ -0,0 +1,103 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/tpss.ma".
+include "basic_2/reducibility/tpr.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
+
+(* Basic_1: includes: pr2_delta1 *)
+definition cpr: lenv → relation term ≝
+   λL,T1,T2. ∃∃T. T1 ➡ T & L ⊢ T ▶* [0, |L|] T2.
+
+interpretation
+   "context-sensitive parallel reduction (term)"
+   'PRed L T1 T2 = (cpr L T1 T2).
+
+(* Basic properties *********************************************************)
+
+lemma cpr_intro: ∀L,T1,T,T2,d,e. T1 ➡ T → L ⊢ T ▶* [d, e] T2 → L ⊢ T1 ➡ T2.
+/4 width=3/ qed-.
+
+(* Basic_1: was by definition: pr2_free *)
+lemma cpr_tpr: ∀T1,T2. T1 ➡ T2 → ∀L. L ⊢ T1 ➡ T2.
+/2 width=3/ qed.
+
+lemma cpr_tpss: ∀L,T1,T2,d,e. L ⊢ T1 ▶* [d, e] T2 → L ⊢ T1 ➡ T2.
+/3 width=5/ qed.
+
+lemma cpr_refl: ∀L,T. L ⊢ T ➡ T.
+/2 width=1/ qed.
+
+(* Note: new property *)
+(* Basic_1: was only: pr2_thin_dx *) 
+lemma cpr_flat: ∀I,L,V1,V2,T1,T2.
+                L ⊢ V1 ➡ V2 → L ⊢ T1 ➡ T2 → L ⊢ ⓕ{I} V1. T1 ➡ ⓕ{I} V2. T2.
+#I #L #V1 #V2 #T1 #T2 * #V #HV1 #HV2 * /3 width=5/
+qed.
+
+lemma cpr_cast: ∀L,V,T1,T2.
+                L ⊢ T1 ➡ T2 → L ⊢ ⓝV. T1 ➡ T2.
+#L #V #T1 #T2 * /3 width=3/
+qed.
+
+(* Note: it does not hold replacing |L1| with |L2| *)
+(* Basic_1: was only: pr2_change *)
+lemma cpr_lsubs_trans: ∀L1,T1,T2. L1 ⊢ T1 ➡ T2 →
+                       ∀L2. L2 ≼ [0, |L1|] L1 → L2 ⊢ T1 ➡ T2.
+#L1 #T1 #T2 * #T #HT1 #HT2 #L2 #HL12 
+lapply (tpss_lsubs_trans … HT2 … HL12) -HT2 -HL12 /3 width=4/
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+(* Basic_1: was: pr2_gen_csort *)
+lemma cpr_inv_atom: ∀T1,T2. ⋆ ⊢ T1 ➡ T2 → T1 ➡ T2.
+#T1 #T2 * #T #HT normalize #HT2
+<(tpss_inv_refl_O2 … HT2) -HT2 //
+qed-.
+
+(* Basic_1: was: pr2_gen_sort *)
+lemma cpr_inv_sort1: ∀L,T2,k. L ⊢ ⋆k ➡ T2 → T2 = ⋆k.
+#L #T2 #k * #X #H
+>(tpr_inv_atom1 … H) -H #H
+>(tpss_inv_sort1 … H) -H //
+qed-.
+
+(* Basic_1: was: pr2_gen_cast *)
+lemma cpr_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 * #X #H #HU2
+elim (tpr_inv_cast1 … H) -H /3 width=3/
+* #V #T #HV1 #HT1 #H destruct
+elim (tpss_inv_flat1 … HU2) -HU2 #V2 #T2 #HV2 #HT2 #H destruct /4 width=5/
+qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma cpr_fwd_shift1: ∀L,L1,T1,T. L ⊢ L1 @@ T1 ➡ T →
+                      ∃∃L2,T2. |L1| = |L2| & T = L2 @@ T2.
+#L #L1 #T1 #T * #X #H1 #H2
+elim (tpr_fwd_shift1 … H1) -H1 #L0 #T0 #HL10 #H destruct
+elim (tpss_fwd_shift1 … H2) -H2 #L2 #T2 #HL02 #H destruct /2 width=4/
+qed-.
+
+(* Basic_1: removed theorems 6: 
+            pr2_head_2 pr2_cflat pr2_gen_cflat clear_pr2_trans
+            pr2_gen_ctail pr2_ctail
+   Basic_1: removed local theorems 3:
+            pr2_free_free pr2_free_delta pr2_delta_delta
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_aaa.ma
new file mode 100644 (file)
index 0000000..7c12733
--- /dev/null
@@ -0,0 +1,25 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/aaa_ltpss_sn.ma".
+include "basic_2/reducibility/ltpr_aaa.ma".
+include "basic_2/reducibility/cpr.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
+
+(* Properties about atomic arity assignment on terms ************************)
+
+lemma aaa_cpr_conf: ∀L,T1,A. L ⊢ T1 ⁝ A → ∀T2. L ⊢ T1 ➡ T2 → L ⊢ T2 ⁝ A.
+#L #T1 #A #HT1 #T2 * /3 width=5/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_cpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_cpr.ma
new file mode 100644 (file)
index 0000000..8d2eb1f
--- /dev/null
@@ -0,0 +1,63 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/tpr_tpr.ma".
+include "basic_2/reducibility/cpr.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
+
+(* Advanced properties ******************************************************)
+
+lemma cpr_bind_sn: ∀a,I,L,V1,V2,T1,T2. L ⊢ V1 ➡ V2 → T1 ➡ T2 →
+                   L ⊢ ⓑ{a,I} V1. T1 ➡ ⓑ{a,I} V2. T2.
+#a #I #L #V1 #V2 #T1 #T2 * #V #HV1 #HV2 #HT12
+@ex2_1_intro [2: @(tpr_delta … HV1 HT12) | skip ] /2 width=3/ (* /3 width=5/ is too slow *)
+qed.
+
+(* Basic_1: was only: pr2_gen_cbind *)
+lemma cpr_bind_dx: ∀a,I,L,V1,V2,T1,T2. V1 ➡ V2 → L. ⓑ{I} V2 ⊢ T1 ➡ T2 →
+                   L ⊢ ⓑ{a,I} V1. T1 ➡ ⓑ{a,I} V2. T2.
+#a #I #L #V1 #V2 #T1 #T2 #HV12 * #T #HT1 normalize #HT2
+elim (tpss_split_up … HT2 1 ? ?) -HT2 // #T0 <minus_n_O #HT0 normalize <minus_plus_m_m #HT02
+lapply (tpss_lsubs_trans … HT0 (⋆. ⓑ{I} V2) ?) -HT0 /2 width=1/ #HT0
+lapply (tpss_inv_SO2 … HT0) -HT0 #HT0
+@ex2_1_intro [2: @(tpr_delta … HV12 HT1 HT0) | skip | /2 width=1/ ] (**) (* /3 width=5/ is too slow *)
+qed.
+
+(* Basic_1: was only: pr2_head_1 *) 
+lemma cpr_pair_sn: ∀I,L,V1,V2,T1,T2. L ⊢ V1 ➡ V2 → T1 ➡ T2 →
+                   L ⊢ ②{I} V1. T1 ➡ ②{I} V2. T2.
+* /2 width=1/ /3 width=1/
+qed.
+
+(* Advanced forward lemmas **************************************************)
+
+lemma cpr_shift_fwd: ∀L,T1,T2. L ⊢ T1 ➡ T2 → L @@ T1 ➡ L @@ T2.
+#L elim L -L
+[ #T1 #T2 #HT12 @(cpr_inv_atom … HT12)
+| normalize /3 width=1/
+].
+qed-.
+
+(* Main properties **********************************************************)
+
+(* Basic_1: was: pr2_confluence *)
+theorem cpr_conf: ∀L,U0,T1,T2. L ⊢ U0 ➡ T1 → L ⊢ U0 ➡ T2 →
+                  ∃∃T. L ⊢ T1 ➡ T & L ⊢ T2 ➡ T.
+#L #U0 #T1 #T2 * #U1 #HU01 #HUT1 * #U2 #HU02 #HUT2
+elim (tpr_conf … HU01 HU02) -U0 #U #HU1 #HU2 
+elim (tpr_tpss_ltpr ? L … HU1 … HUT1) -U1 // #U1 #HTU1 #HU1
+elim (tpr_tpss_ltpr ? L … HU2 … HUT2) -U2 // #U2 #HTU2 #HU2
+elim (tpss_conf_eq … HU1 … HU2) -U /3 width=5/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_delift.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_delift.ma
new file mode 100644 (file)
index 0000000..04eb4ae
--- /dev/null
@@ -0,0 +1,37 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/thin_delift.ma".
+include "basic_2/reducibility/tpr_delift.ma".
+include "basic_2/reducibility/cpr.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
+
+(* Properties on inverse basic term relocation ******************************)
+
+(* Basic_1: was only: pr2_gen_cabbr *)
+lemma thin_cpr_delift_conf: ∀L,U1,U2. L ⊢ U1 ➡ U2 →
+                            ∀K,d,e. ▼*[d, e] L ≡ K → ∀T1. L ⊢ ▼*[d, e] U1 ≡ T1 →
+                            ∃∃T2. K ⊢ T1 ➡ T2 & L ⊢ ▼*[d, e] U2 ≡ T2.
+#L #U1 #U2 * #U #HU1 #HU2 #K #d #e #HLK #T1 #HTU1
+elim (tpr_delift_conf … HU1 … HTU1) -U1 #T #HT1 #HUT
+elim (le_or_ge (|L|) d) #Hd
+[ elim (thin_delift_tpss_conf_le … HU2 … HUT … HLK ?)
+| elim (le_or_ge (|L|) (d+e)) #Hde
+  [ elim (thin_delift_tpss_conf_le_up … HU2 … HUT … HLK ? ? ?)
+  | elim (thin_delift_tpss_conf_be … HU2 … HUT … HLK ? ?)
+  ]
+] -U -HLK // -Hd [2,3: -Hde] #T2 #HT2
+lapply (cpr_intro … HT1 HT2) -T /2 width=3/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_lift.ma
new file mode 100644 (file)
index 0000000..b54510e
--- /dev/null
@@ -0,0 +1,166 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/tpss_lift.ma".
+include "basic_2/reducibility/tpr_lift.ma".
+include "basic_2/reducibility/cpr.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
+
+(* Advanced properties ******************************************************)
+
+lemma cpr_cdelta: ∀L,K,V1,W1,W2,i.
+                  ⇩[0, i] L ≡ K. ⓓV1 → K ⊢ V1 ▶* [0, |L| - i - 1] W1 →
+                  ⇧[0, i + 1] W1 ≡ W2 → L ⊢ #i ➡ W2.
+#L #K #V1 #W1 #W2 #i #HLK #HVW1 #HW12
+lapply (ldrop_fwd_ldrop2_length … HLK) #Hi
+@ex2_1_intro [2: // | skip | @tpss_subst /width=6/ ] (**) (* /3 width=6/ is too slow *)
+qed.
+
+lemma cpr_abst: ∀L,V1,V2. L ⊢ V1 ➡ V2 → ∀V,T1,T2.
+                L.ⓛV ⊢ T1 ➡ T2 → ∀a. L ⊢ ⓛ{a}V1. T1 ➡ ⓛ{a}V2. T2.
+#L #V1 #V2 * #V0 #HV10 #HV02 #V #T1 #T2 * #T0 #HT10 #HT02 #a
+lapply (tpss_inv_S2 … HT02 L V ?) -HT02 // #HT02
+lapply (tpss_lsubs_trans … HT02 (L.ⓛV2) ?) -HT02 /2 width=1/ #HT02
+@(ex2_1_intro … (ⓛ{a}V0.T0)) /2 width=1/ (* explicit constructors *)
+qed.
+
+lemma cpr_beta: ∀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 * #V #HV1 #HV2 * #T #HT1 #HT2
+lapply (tpss_inv_S2 … HT2 L W ?) -HT2 // #HT2
+lapply (tpss_lsubs_trans … HT2 (L.ⓓV2) ?) -HT2 /2 width=1/ #HT2
+@(ex2_1_intro … (ⓓ{a}V.T)) /2 width=1/ (**) (* explicit constructor, /3/ is too slow *)
+qed.
+
+lemma cpr_beta_dx: ∀a,L,V1,V2,W,T1,T2.
+                   V1 ➡ V2 → L.ⓛW ⊢ T1 ➡ T2 → L ⊢ ⓐV1.ⓛ{a}W.T1 ➡ ⓓ{a}V2.T2.
+/3 width=1/ qed.
+
+(* Advanced inversion lemmas ************************************************)
+
+(* Basic_1: was: pr2_gen_lref *)
+lemma cpr_inv_lref1: ∀L,T2,i. L ⊢ #i ➡ T2 →
+                     T2 = #i ∨
+                     ∃∃K,V1,T1. ⇩[0, i] L ≡ K. ⓓV1 &
+                                K ⊢ V1 ▶* [0, |L| - i - 1] T1 &
+                                ⇧[0, i + 1] T1 ≡ T2 &
+                                i < |L|.
+#L #T2 #i * #X #H
+>(tpr_inv_atom1 … H) -H #H
+elim (tpss_inv_lref1 … H) -H /2 width=1/
+* /3 width=6/
+qed-.
+
+(* Basic_1: was pr2_gen_abbr *)
+lemma cpr_inv_abbr1: ∀a,L,V1,T1,U2. L ⊢ ⓓ{a}V1. T1 ➡ U2 →
+                     (∃∃V,V2,T2. V1 ➡ V & L ⊢ V ▶* [O, |L|] V2 &
+                                 L. ⓓV ⊢ T1 ➡ T2 &
+                                 U2 = ⓓ{a}V2. T2
+                      ) ∨
+                      ∃∃T2. L.ⓓV1 ⊢ T1 ➡ T2 & ⇧[0,1] U2 ≡ T2 & a = true.
+#a #L #V1 #T1 #Y * #X #H1 #H2
+elim (tpr_inv_abbr1 … H1) -H1 *
+[ #V #T #T0 #HV1 #HT1 #HT0 #H destruct
+  elim (tpss_inv_bind1 … H2) -H2 #V2 #T2 #HV2 #HT02 #H destruct
+  lapply (tps_lsubs_trans … HT0 (L. ⓓV) ?) -HT0 /2 width=1/ #HT0
+  lapply (tps_weak_all … HT0) -HT0 #HT0
+  lapply (tpss_lsubs_trans … HT02 (L. ⓓV) ?) -HT02 /2 width=1/ #HT02
+  lapply (tpss_weak_all … HT02) -HT02 #HT02
+  lapply (tpss_strap2 … HT0 HT02) -T0 /4 width=7/
+| #T2 #HT12 #HXT2 #H destruct
+  elim (lift_total Y 0 1) #Z #HYZ
+  lapply (tpss_lift_ge … H2 (L.ⓓV1) … HXT2 … HYZ) -X // /2 width=1/ #H
+  lapply (cpr_intro … HT12 … H) -T2 /3 width=3/
+]
+qed-.
+
+(* Basic_1: was: pr2_gen_abst *)
+lemma cpr_inv_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 #Y * #X #H1 #H2 #I #W
+elim (tpr_inv_abst1 … H1) -H1 #V #T #HV1 #HT1 #H destruct
+elim (tpss_inv_bind1 … H2) -H2 #V2 #T2 #HV2 #HT2 #H destruct
+lapply (tpss_lsubs_trans … HT2 (L. ⓑ{I} W) ?) -HT2 /2 width=1/ /4 width=5/
+qed-.
+
+(* Basic_1: was pr2_gen_appl *)
+lemma cpr_inv_appl1: ∀L,V1,U0,U2. L ⊢ ⓐV1. U0 ➡ U2 →
+                     ∨∨ ∃∃V2,T2.              L ⊢ V1 ➡ V2 & L ⊢ U0 ➡ T2 &
+                                              U2 = ⓐV2. T2
+                      | ∃∃a,V2,W,T1,T2.       L ⊢ V1 ➡ V2 & L. ⓓV2 ⊢ T1 ➡ T2 &
+                                              U0 = ⓛ{a}W. T1 &
+                                              U2 = ⓓ{a}V2. T2
+                      | ∃∃a,V2,V,W1,W2,T1,T2. L ⊢ V1 ➡ V2 & L ⊢ W1 ➡ W2 & L. ⓓW2 ⊢ T1 ➡ T2 &
+                                              ⇧[0,1] V2 ≡ V &
+                                              U0 = ⓓ{a}W1. T1 &
+                                              U2 = ⓓ{a}W2. ⓐV. T2.
+#L #V1 #U0 #Y * #X #H1 #H2
+elim (tpr_inv_appl1 … H1) -H1 *
+[ #V #U #HV1 #HU0 #H destruct
+  elim (tpss_inv_flat1 … H2) -H2 #V2 #U2 #HV2 #HU2 #H destruct /4 width=5/
+| #a #V #W #T0 #T #HV1 #HT0 #H #H1 destruct
+  elim (tpss_inv_bind1 … H2) -H2 #V2 #T2 #HV2 #HT2 #H destruct
+  lapply (tpss_weak … HT2 0 (|L|+1) ? ?) -HT2 // /4 width=9/
+| #a #V0 #V #W #W0 #T #T0 #HV10 #HW0 #HT0 #HV0 #H #H1 destruct
+  elim (tpss_inv_bind1 … H2) -H2 #W2 #X #HW02 #HX #HY destruct
+  elim (tpss_inv_flat1 … HX) -HX #V2 #T2 #HV2 #HT2 #H destruct
+  elim (tpss_inv_lift1_ge … HV2 … HV0 ?) -V // [3: /2 width=1/ |2: skip ] #V <minus_plus_m_m
+  lapply (tpss_weak … HT2 0 (|L|+1) ? ?) -HT2 // /4 width=13/
+]
+qed-.
+
+(* Note: the main property of simple terms *)
+lemma cpr_inv_appl1_simple: ∀L,V1,T1,U. L ⊢ ⓐV1. T1 ➡ U → 𝐒⦃T1⦄ →
+                            ∃∃V2,T2. L ⊢ V1 ➡ V2 & L ⊢ T1 ➡ T2 &
+                                     U = ⓐV2. T2.
+#L #V1 #T1 #U #H #HT1
+elim (cpr_inv_appl1 … H) -H *
+[ /2 width=5/
+| #a #V2 #W #W1 #W2 #_ #_ #H #_ destruct
+  elim (simple_inv_bind … HT1)
+| #a #V2 #V #W1 #W2 #U1 #U2 #_ #_ #_ #_ #H #_ destruct
+  elim (simple_inv_bind … HT1)
+]
+qed-.
+     
+(* Relocation properties ****************************************************)
+
+(* Basic_1: was: pr2_lift *)
+lemma cpr_lift: ∀L,K,d,e. ⇩[d, e] L ≡ K →
+                ∀T1,U1. ⇧[d, e] T1 ≡ U1 → ∀T2,U2. ⇧[d, e] T2 ≡ U2 →
+                K ⊢ T1 ➡ T2 → L ⊢ U1 ➡ U2.
+#L #K #d #e #HLK #T1 #U1 #HTU1 #T2 #U2 #HTU2 * #T #HT1 #HT2
+elim (lift_total T d e) #U #HTU
+lapply (tpr_lift … HT1 … HTU1 … HTU) -T1 #HU1
+elim (lt_or_ge (|K|) d) #HKd
+[ lapply (tpss_lift_le … HT2 … HLK HTU … HTU2) -T2 -T -HLK [ /2 width=2/ | /3 width=4/ ]
+| lapply (tpss_lift_be … HT2 … HLK HTU … HTU2) -T2 -T -HLK // /3 width=4/
+]
+qed.
+
+(* Basic_1: was: pr2_gen_lift *)
+lemma cpr_inv_lift1: ∀L,K,d,e. ⇩[d, e] L ≡ K →
+                     ∀T1,U1. ⇧[d, e] T1 ≡ U1 → ∀U2. L ⊢ U1 ➡ U2 →
+                     ∃∃T2. ⇧[d, e] T2 ≡ U2 & K ⊢ T1 ➡ T2.
+#L #K #d #e #HLK #T1 #U1 #HTU1 #U2 * #U #HU1 #HU2
+elim (tpr_inv_lift1 … HU1 … HTU1) -U1 #T #HTU #T1
+elim (lt_or_ge (|L|) d) #HLd
+[ elim (tpss_inv_lift1_le … HU2 … HLK … HTU ?) -U -HLK [ /5 width=4/ | /2 width=2/ ]
+| elim (lt_or_ge (|L|) (d + e)) #HLde
+  [ elim (tpss_inv_lift1_be_up … HU2 … HLK … HTU ? ?) -U -HLK // [ /5 width=4/ | /2 width=2/ ] 
+  | elim (tpss_inv_lift1_be … HU2 … HLK … HTU ? ?) -U -HLK // /5 width=4/
+  ]
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpr.ma
new file mode 100644 (file)
index 0000000..d3e75f8
--- /dev/null
@@ -0,0 +1,46 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/tpr_tpss.ma".
+include "basic_2/reducibility/cpr.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
+
+(* Properties concerning parallel unfold on terms ***************************)
+
+(* Note: we could invoke tpss_weak_all instead of ltpr_fwd_length *)
+(* Basic_1: was only: pr2_subst1 *)
+lemma cpr_tpss_ltpr: ∀L1,L2. L1 ➡ L2 → ∀T1,T2. L2 ⊢ T1 ➡ T2 →
+                     ∀d,e,U1. L1 ⊢ T1 ▶* [d, e] U1 →
+                     ∃∃U2. L2 ⊢ U1 ➡ U2 & L2 ⊢ T2 ▶* [d, e] U2.
+#L1 #L2 #HL12 #T1 #T2 * #T #HT1 #HT2 #d #e #U1 #HTU1
+elim (tpr_tpss_ltpr … HL12 … HT1 … HTU1) -L1 -HT1 #U #HU1 #HTU
+elim (tpss_conf_eq … HT2 … HTU) -T /3 width=3/
+qed.
+
+lemma cpr_ltpr_conf_eq: ∀L1,T1,T2. L1 ⊢ T1 ➡ T2 → ∀L2. L1 ➡ L2 →
+                        ∃∃T. L2 ⊢ T1 ➡ T & T2 ➡ T.
+#L1 #T1 #T2 * #T #HT1 #HT2 #L2 #HL12
+>(ltpr_fwd_length … HL12) in HT2; #HT2
+elim (tpr_tpss_ltpr … HL12 … HT2) -L1 /3 width=3/
+qed.
+
+lemma cpr_ltpr_conf_tpss: ∀L1,L2. L1 ➡ L2 → ∀T1,T2. L1 ⊢ T1 ➡ T2 →
+                          ∀d,e,U1. L1 ⊢ T1 ▶* [d, e] U1 →
+                          ∃∃U2. L2 ⊢ U1 ➡ U2 & L2 ⊢ T2 ➡ U2.
+#L1 #L2 #HL12 #T1 #T2 #HT12 #d #e #U1 #HTU1
+elim (cpr_ltpr_conf_eq … HT12 … HL12) -HT12 #T #HT1 #HT2
+elim (cpr_tpss_ltpr … HL12 … HT1 … HTU1) -L1 -HT1 #U2 #HU12 #HTU2
+lapply (tpss_weak_all … HTU2) -HTU2 #HTU2 /3 width=5/ (**) (* /4 width=5/ is too slow *)
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpss.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpss.ma
new file mode 100644 (file)
index 0000000..b728d9d
--- /dev/null
@@ -0,0 +1,27 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/ltpss_sn_ltpss_sn.ma".
+include "basic_2/reducibility/cpr.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
+
+(* Properties concerning partial unfold on local environments ***************)
+
+lemma ltpss_sn_cpr_trans: ∀L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 →
+                          ∀T1,T2. L2 ⊢ T1 ➡ T2 → L1 ⊢ T1 ➡ T2.
+#L1 #L2 #d #e #HL12 #T1 #T2 *
+lapply (ltpss_sn_weak_all … HL12)
+<(ltpss_sn_fwd_length … HL12) -HL12 /3 width=5/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_tpss.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_tpss.ma
new file mode 100644 (file)
index 0000000..e5afe87
--- /dev/null
@@ -0,0 +1,30 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/tpss_tpss.ma".
+include "basic_2/reducibility/cpr.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
+
+(* Properties on partial unfold for terms ***********************************)
+
+lemma cpr_tpss_trans: ∀L,T1,T. L ⊢ T1 ➡ T →
+                      ∀T2. L ⊢ T ▶* [O, |L|] T2 → L ⊢ T1 ➡ T2.
+#L #T1 #T * #T0 #HT10 #HT0 #T2 #HT2
+lapply (tpss_trans_eq … HT0 HT2) -T /2 width=3/
+qed.
+
+lemma cpr_tps_trans: ∀L,T1,T. L ⊢ T1 ➡ T →
+                     ∀T2. L ⊢ T ▶ [O, |L|] T2 → L ⊢ T1 ➡ T2.
+/3 width=3/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/crf.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/crf.ma
new file mode 100644 (file)
index 0000000..5015f03
--- /dev/null
@@ -0,0 +1,116 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/ldrop.ma".
+
+(* CONTEXT-SENSITIVE REDUCIBLE TERMS ****************************************)
+
+(* reducible binary items *)
+definition ri2: item2 → Prop ≝
+                λI. I = Bind2 true Abbr ∨ I = Flat2 Cast.
+
+(* irreducible binary binders *)
+definition ib2: bool → bind2 → Prop ≝
+                λa,I. I = Abst ∨ Bind2 a I = Bind2 false Abbr.
+
+(* reducible terms *)
+inductive crf: lenv → predicate term ≝
+| crf_delta  : ∀L,K,V,i. ⇩[0, i] L ≡ K.ⓓV → crf L (#i)
+| crf_appl_sn: ∀L,V,T. crf L V → crf L (ⓐV. T)
+| crf_appl_dx: ∀L,V,T. crf L T → crf L (ⓐV. T)
+| crf_ri2    : ∀I,L,V,T. ri2 I → crf L (②{I}V. T)
+| crf_ib2_sn : ∀a,I,L,V,T. ib2 a I → crf L V → crf L (ⓑ{a,I}V. T)
+| crf_ib2_dx : ∀a,I,L,V,T. ib2 a I → crf (L.ⓑ{I}V) T → crf L (ⓑ{a,I}V. T)
+| crf_beta   : ∀a,L,V,W,T. crf L (ⓐV. ⓛ{a}W. T)
+| crf_theta  : ∀a,L,V,W,T. crf L (ⓐV. ⓓ{a}W. T)
+.
+
+interpretation
+   "context-sensitive reducibility (term)"
+   'Reducible L T = (crf L T).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact trf_inv_atom_aux: ∀I,L,T. L ⊢ 𝐑⦃T⦄ → L = ⋆ → T = ⓪{I} → ⊥.
+#I #L #T * -L -T
+[ #L #K #V #i #HLK #H1 #H2 destruct
+  lapply (ldrop_inv_atom1 … HLK) -HLK #H destruct
+| #L #V #T #_ #_ #H destruct
+| #L #V #T #_ #_ #H destruct
+| #J #L #V #T #_ #_ #H destruct
+| #a #J #L #V #T #_ #_ #_ #H destruct
+| #a #J #L #V #T #_ #_ #_ #H destruct
+| #a #L #V #W #T #_ #H destruct
+| #a #L #V #W #T #_ #H destruct
+]
+qed.
+
+lemma trf_inv_atom: ∀I. ⋆ ⊢ 𝐑⦃⓪{I}⦄ → ⊥.
+/2 width=6/ qed-.
+
+fact trf_inv_lref_aux: ∀L,T. L ⊢ 𝐑⦃T⦄ → ∀i. T = #i → ∃∃K,V. ⇩[0, i] L ≡ K.ⓓV.
+#L #T * -L -T
+[ #L #K #V #j #HLK #i #H destruct /2 width=3/
+| #L #V #T #_ #i #H destruct
+| #L #V #T #_ #i #H destruct
+| #J #L #V #T #_ #i #H destruct
+| #a #J #L #V #T #_ #_ #i #H destruct
+| #a #J #L #V #T #_ #_ #i #H destruct
+| #a #L #V #W #T #i #H destruct
+| #a #L #V #W #T #i #H destruct
+]
+qed.
+
+lemma trf_inv_lref: ∀L,i. L ⊢ 𝐑⦃#i⦄ → ∃∃K,V. ⇩[0, i] L ≡ K.ⓓV.
+/2 width=3/ qed-.
+
+fact crf_inv_ib2_aux: ∀a,I,L,W,U,T. ib2 a I → L ⊢ 𝐑⦃T⦄ → T = ⓑ{a,I}W. U →
+                      L ⊢ 𝐑⦃W⦄ ∨ L.ⓑ{I}W ⊢ 𝐑⦃U⦄.
+#a #I #L #W #U #T #HI * -T
+[ #L #K #V #i #_ #H destruct
+| #L #V #T #_ #H destruct
+| #L #V #T #_ #H destruct
+| #J #L #V #T #H1 #H2 destruct
+  elim H1 -H1 #H destruct
+  elim HI -HI #H destruct
+| #b #J #L #V #T #_ #HV #H destruct /2 width=1/
+| #b #J #L #V #T #_ #HT #H destruct /2 width=1/
+| #b #L #V #W #T #H destruct
+| #b #L #V #W #T #H destruct
+]
+qed.
+
+lemma crf_inv_ib2: ∀a,I,L,W,T. ib2 a I → L ⊢ 𝐑⦃ⓑ{a,I}W.T⦄ →
+                   L ⊢ 𝐑⦃W⦄ ∨ L.ⓑ{I}W ⊢ 𝐑⦃T⦄.
+/2 width=5/ qed-.
+
+fact crf_inv_appl_aux: ∀L,W,U,T. L ⊢ 𝐑⦃T⦄ → T = ⓐW. U →
+                       ∨∨ L ⊢ 𝐑⦃W⦄ | L ⊢ 𝐑⦃U⦄ | (𝐒⦃U⦄ → ⊥).
+#L #W #U #T * -T
+[ #L #K #V #i #_ #H destruct
+| #L #V #T #HV #H destruct /2 width=1/
+| #L #V #T #HT #H destruct /2 width=1/
+| #J #L #V #T #H1 #H2 destruct
+  elim H1 -H1 #H destruct
+| #a #I #L #V #T #_ #_ #H destruct
+| #a #I #L #V #T #_ #_ #H destruct
+| #a #L #V #W0 #T #H destruct
+  @or3_intro2 #H elim (simple_inv_bind … H)
+| #a #L #V #W0 #T #H destruct
+  @or3_intro2 #H elim (simple_inv_bind … H)
+]
+qed.
+
+lemma crf_inv_appl: ∀L,V,T. L ⊢ 𝐑⦃ⓐV.T⦄ → ∨∨ L ⊢ 𝐑⦃V⦄ | L ⊢ 𝐑⦃T⦄ | (𝐒⦃T⦄ → ⊥).
+/2 width=3/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/crf_append.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/crf_append.ma
new file mode 100644 (file)
index 0000000..f50b97e
--- /dev/null
@@ -0,0 +1,56 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/ldrop_append.ma".
+include "basic_2/reducibility/crf.ma".
+
+(* CONTEXT-SENSITIVE REDUCIBLE TERMS ****************************************)
+
+(* Advanved properties ******************************************************)
+
+lemma crf_labst_last: ∀L,T,W. L ⊢ 𝐑⦃T⦄  → ⋆.ⓛW @@ L ⊢ 𝐑⦃T⦄.
+#L #T #W #H elim H -L -T /2 width=1/
+#L #K #V #i #HLK
+lapply (ldrop_fwd_ldrop2_length … HLK) #Hi
+lapply (ldrop_O1_append_sn_le … HLK … (⋆.ⓛW)) -HLK /2 width=2/ -Hi /2 width=3/
+qed.
+
+lemma crf_trf: ∀T,W. ⋆ ⊢ 𝐑⦃T⦄ → ⋆.ⓛW ⊢ 𝐑⦃T⦄.
+#T #W #H lapply (crf_labst_last … W H) //
+qed.
+
+(* Advanced inversion lemmas ************************************************)
+
+fact crf_inv_labst_last_aux: ∀L1,T,W. L1 ⊢ 𝐑⦃T⦄  →
+                             ∀L2. L1 = ⋆.ⓛW @@ L2 → L2 ⊢ 𝐑⦃T⦄.
+#L1 #T #W #H elim H -L1 -T /2 width=1/ /3 width=1/
+[ #L1 #K1 #V1 #i #HLK1 #L2 #H destruct
+  lapply (ldrop_fwd_ldrop2_length … HLK1)
+  >append_length >commutative_plus normalize in ⊢ (??% → ?); #H
+  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/
+  | lapply (ldrop_O1_inv_append1_ge … HLK1 ?) -HLK1 // <minus_n_n #H
+    lapply (ldrop_inv_refl … H) -H #H destruct
+  ]
+| #a #I #L1 #V #T #HI #_ #IHT #L2 #H destruct /3 width=1/
+]
+qed.
+
+lemma crf_inv_labst_last: ∀L,T,W. ⋆.ⓛW @@ L ⊢ 𝐑⦃T⦄  → L ⊢ 𝐑⦃T⦄.
+/2 width=4/ qed-.
+
+lemma crf_inv_trf: ∀T,W. ⋆.ⓛW ⊢ 𝐑⦃T⦄  → ⋆ ⊢ 𝐑⦃T⦄.
+/2 width=4/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/fpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/fpr.ma
new file mode 100644 (file)
index 0000000..3910615
--- /dev/null
@@ -0,0 +1,64 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/tpr.ma".
+
+(* CONTEXT-FREE PARALLEL REDUCTION ON CLOSURES ******************************)
+
+definition fpr: bi_relation lenv term ≝
+                λL1,T1,L2,T2. |L1| = |L2| ∧ L1 @@ T1 ➡ L2 @@ T2.
+
+interpretation
+   "context-free parallel reduction (closure)"
+   'FocalizedPRed L1 T1 L2 T2 = (fpr L1 T1 L2 T2).
+
+(* Basic properties *********************************************************)
+
+lemma fpr_refl: bi_reflexive … fpr.
+/2 width=1/ qed.
+
+lemma fpr_shift: ∀I1,I2,L1,L2,V1,V2,T1,T2.
+                 ⦃L1, -ⓑ{I1}V1.T1⦄ ➡ ⦃L2, -ⓑ{I2}V2.T2⦄ →
+                 ⦃L1.ⓑ{I1}V1, T1⦄ ➡ ⦃L2.ⓑ{I2}V2, T2⦄.
+#I1 #I2 #L1 #L2 #V1 #V2 #T1 #T2 * #HL12 #HT12
+@conj // normalize // (**) (* explicit constructor *)
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma fpr_inv_atom1: ∀L2,T1,T2. ⦃⋆, T1⦄ ➡ ⦃L2, T2⦄ → T1 ➡ T2 ∧ L2 = ⋆.
+#L2 #T1 #T2 * #H
+lapply (length_inv_zero_sn … H) -H #H destruct /2 width=1/
+qed-.
+
+lemma fpr_inv_atom3: ∀L1,T1,T2. ⦃L1,T1⦄ ➡ ⦃⋆,T2⦄ → T1 ➡ T2 ∧ L1 = ⋆.
+#L1 #T1 #T2 * #H
+lapply (length_inv_zero_dx … H) -H #H destruct /2 width=1/
+qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma fpr_fwd_pair1: ∀I1,K1,L2,V1,T1,T2. ⦃K1.ⓑ{I1}V1, T1⦄ ➡ ⦃L2, T2⦄ →
+                     ∃∃I2,K2,V2. ⦃K1, -ⓑ{I1}V1.T1⦄ ➡ ⦃K2, -ⓑ{I2}V2.T2⦄  &
+                                 L2 = K2.ⓑ{I2}V2.
+#I1 #K1 #L2 #V1 #T1 #T2 * #H
+elim (length_inv_pos_sn … H) -H #I2 #K2 #V2 #HK12 #H destruct /3 width=5/
+qed-.
+
+lemma fpr_fwd_pair3: ∀I2,L1,K2,V2,T1,T2. ⦃L1, T1⦄ ➡ ⦃K2.ⓑ{I2}V2, T2⦄ →
+                     ∃∃I1,K1,V1. ⦃K1, -ⓑ{I1}V1.T1⦄ ➡ ⦃K2, -ⓑ{I2}V2.T2⦄  &
+                                 L1 = K1.ⓑ{I1}V1.
+#I2 #L1 #K2 #V2 #T1 #T2 * #H
+elim (length_inv_pos_dx … H) -H #I1 #K1 #V1 #HK12 #H destruct /3 width=5/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/fpr_cpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/fpr_cpr.ma
new file mode 100644 (file)
index 0000000..0de0b98
--- /dev/null
@@ -0,0 +1,66 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/cfpr_cpr.ma".
+
+(* CONTEXT-FREE PARALLEL REDUCTION ON CLOSURES ******************************)
+
+(* Properties on context-sensitive parallel reduction for terms *************)
+
+lemma cpr_fpr: ∀L,T1,T2. L ⊢ T1 ➡ T2 → ⦃L, T1⦄ ➡ ⦃L, T2⦄.
+/2 width=4/ qed.
+
+(* Advanced propertis *******************************************************)
+
+lemma fpr_bind_sn: ∀L1,L2,V1,V2. ⦃L1, V1⦄ ➡ ⦃L2, V2⦄ → ∀T1,T2. T1 ➡ T2 →
+                   ∀a,I. ⦃L1, ⓑ{a,I}V1.T1⦄ ➡ ⦃L2, ⓑ{a,I}V2.T2⦄.
+#L1 #L2 #V1 #V2 #H #T1 #T2 #HT12 #a #I
+elim (fpr_inv_all … H) /3 width=4/
+qed.
+
+(* Advanced forward lemmas **************************************************)
+
+lemma fpr_fwd_shift_bind_minus: ∀I1,I2,L1,L2,V1,V2,T1,T2.
+                                ⦃L1, -ⓑ{I1}V1.T1⦄ ➡ ⦃L2, -ⓑ{I2}V2.T2⦄ →
+                                ⦃L1, V1⦄ ➡ ⦃L2, V2⦄ ∧ I1 = I2.
+* #I2 #L1 #L2 #V1 #V2 #T1 #T2 #H
+elim (fpr_inv_all … H) -H #L #HL1 #H #HL2
+[ elim (cpr_inv_abbr1 … H) -H *
+  [ #V #V0 #T #HV1 #HV0 #_ #H destruct /4 width=4/
+  | #T #_ #_ #H destruct
+  ]
+| elim (cpr_inv_abst1 … H Abst V2) -H
+  #V #T #HV1 #_ #H destruct /3 width=4/
+]
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma fpr_inv_pair1: ∀I,K1,L2,V1,T1,T2. ⦃K1.ⓑ{I}V1, T1⦄ ➡ ⦃L2, T2⦄ →
+                     ∃∃K2,V2. ⦃K1, V1⦄  ➡ ⦃K2, V2⦄ &
+                              ⦃K1, -ⓑ{I}V1.T1⦄ ➡ ⦃K2, -ⓑ{I}V2.T2⦄  &
+                              L2 = K2.ⓑ{I}V2.
+#I1 #K1 #X #V1 #T1 #T2 #H
+elim (fpr_fwd_pair1 … H) -H #I2 #K2 #V2 #HT12 #H destruct
+elim (fpr_fwd_shift_bind_minus … HT12) #HV12 #H destruct /2 width=5/
+qed-.
+
+lemma fpr_inv_pair3: ∀I,L1,K2,V2,T1,T2. ⦃L1, T1⦄ ➡ ⦃K2.ⓑ{I}V2, T2⦄ →
+                     ∃∃K1,V1. ⦃K1, V1⦄  ➡ ⦃K2, V2⦄ &
+                              ⦃K1, -ⓑ{I}V1.T1⦄ ➡ ⦃K2, -ⓑ{I}V2.T2⦄  &
+                              L1 = K1.ⓑ{I}V1.
+#I2 #X #K2 #V2 #T1 #T2 #H
+elim (fpr_fwd_pair3 … H) -H #I1 #K1 #V1 #HT12 #H destruct
+elim (fpr_fwd_shift_bind_minus … HT12) #HV12 #H destruct /2 width=5/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/fpr_fpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/fpr_fpr.ma
new file mode 100644 (file)
index 0000000..3f7ac2c
--- /dev/null
@@ -0,0 +1,26 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/tpr_tpr.ma".
+include "basic_2/reducibility/fpr.ma".
+
+(* CONTEXT-FREE PARALLEL REDUCTION ON CLOSURES ******************************)
+
+(* Main properties **********************************************************)
+
+theorem fpr_conf: bi_confluent … fpr.
+#L0 #L1 #T0 #T1 * #HL01 #HT01 #L2 #T2 * >HL01 #HL12 #HT02
+elim (tpr_conf … HT01 HT02) -L0 -T0 #X #H1 #H2
+elim (tpr_fwd_shift1 … H1) #L #T #HL1 #H destruct /3 width=5/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/lfpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/lfpr.ma
new file mode 100644 (file)
index 0000000..5e1ba79
--- /dev/null
@@ -0,0 +1,41 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/ltpss_sn.ma".
+include "basic_2/reducibility/ltpr.ma".
+
+(* FOCALIZED PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ***********************)
+
+definition lfpr: relation lenv ≝
+   λL1,L2. ∃∃L. L1 ➡ L & L ⊢ ▶* [0, |L|] L2
+.
+
+interpretation
+  "focalized parallel reduction (environment)"
+  'FocalizedPRed L1 L2 = (lfpr L1 L2).
+
+(* Basic properties *********************************************************)
+
+(* Note: lemma 250 *)
+lemma lfpr_refl: ∀L. ⦃L⦄ ➡ ⦃L⦄.
+/2 width=3/ qed.
+
+lemma ltpss_sn_lfpr: ∀L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 → ⦃L1⦄ ➡ ⦃L2⦄.
+/3 width=5/ qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma lfpr_inv_atom1: ∀L2. ⦃⋆⦄ ➡ ⦃L2⦄ → L2 = ⋆.
+#L2 * #L #HL >(ltpr_inv_atom1 … HL) -HL #HL2 >(ltpss_sn_inv_atom1 … HL2) -HL2 //
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/lfpr_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/lfpr_aaa.ma
new file mode 100644 (file)
index 0000000..6f6c49d
--- /dev/null
@@ -0,0 +1,25 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/aaa_ltpss_sn.ma".
+include "basic_2/reducibility/ltpr_aaa.ma".
+include "basic_2/reducibility/lfpr.ma".
+
+(* FOCALIZED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS **********************)
+
+(* Properties about atomic arity assignment on terms ************************)
+
+lemma aaa_lfpr_conf: ∀L1,T,A. L1 ⊢ T ⁝ A → ∀L2. ⦃L1⦄ ➡ ⦃L2⦄ → L2 ⊢ T ⁝ A.
+#L1 #T #A #HT #L2 * /3 width=5/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/lfpr_alt.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/lfpr_alt.ma
new file mode 100644 (file)
index 0000000..adff7ad
--- /dev/null
@@ -0,0 +1,79 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/lenv_px_bi.ma".
+include "basic_2/reducibility/fpr_cpr.ma".
+include "basic_2/reducibility/lfpr_fpr.ma".
+
+(* FOCALIZED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS **********************)
+
+(* alternative definition *)
+definition lfpra: relation lenv ≝ lpx_bi fpr.
+
+interpretation
+  "focalized parallel reduction (environment) alternative"
+  'FocalizedPRedAlt L1 L2 = (lfpra L1 L2).
+
+(* Basic properties *********************************************************)
+
+lemma lfpra_refl: reflexive … lfpra.
+/2 width=1/ qed.
+
+lemma fpr_lfpra: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ → ⦃L1⦄ ➡➡ ⦃L2⦄.
+#L1 elim L1 -L1
+[ #L2 #T1 #T2 #H
+  elim (fpr_inv_atom1 … H) -H #_ #H destruct //
+| #L1 #I #V1 #IH #L2 #T1 #T2 #H
+  elim (fpr_inv_pair1 … H) -H #L #V #HV1 #HL1 #H destruct /3 width=3/
+]
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma lfpra_inv_atom1: ∀L2. ⦃⋆⦄ ➡➡ ⦃L2⦄ → L2 = ⋆.
+/2 width=2 by lpx_bi_inv_atom1/ qed-.
+
+lemma lfpra_inv_pair1: ∀K1,I,V1,L2. ⦃K1. ⓑ{I} V1⦄ ➡➡ ⦃L2⦄ →
+                       ∃∃K2,V2. ⦃K1⦄ ➡➡ ⦃K2⦄ & ⦃K1, V1⦄ ➡ ⦃K2, V2⦄ &
+                                L2 = K2. ⓑ{I} V2.
+/2 width=1 by lpx_bi_inv_pair1/ qed-.
+
+lemma lfpra_inv_atom2: ∀L1. ⦃L1⦄ ➡➡ ⦃⋆⦄ → L1 = ⋆.
+/2 width=2 by lpx_bi_inv_atom2/ qed-.
+
+lemma lfpra_inv_pair2: ∀L1,K2,I,V2. ⦃L1⦄ ➡➡ ⦃K2. ⓑ{I} V2⦄ →
+                       ∃∃K1,V1. ⦃K1⦄ ➡➡ ⦃K2⦄ & ⦃K1, V1⦄ ➡ ⦃K2, V2⦄ &
+                                L1 = K1. ⓑ{I} V1.
+/2 width=1 by lpx_bi_inv_pair2/ qed-.
+
+lemma lfpra_inv_fpr: ∀L1,L2. ⦃L1⦄ ➡➡ ⦃L2⦄ → ∀T.⦃L1, T⦄ ➡ ⦃L2, T⦄.
+#L1 #L2 * -L1 -L2 // /3 width=1/
+qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma lfpra_fwd_length: ∀L1,L2. ⦃L1⦄ ➡➡ ⦃L2⦄ → |L1| = |L2|.
+/2 width=2 by lpx_bi_fwd_length/ qed-.
+
+(* Main properties **********************************************************)
+
+theorem lfpr_lfpra: ∀L1,L2. ⦃L1⦄ ➡ ⦃L2⦄ → ⦃L1⦄ ➡➡ ⦃L2⦄.
+#L1 #L2 #H
+lapply (lfpr_inv_fpr … H (⋆0)) -H /2 width=3/
+qed.
+
+theorem lfpra_lfpr: ∀L1,L2. ⦃L1⦄ ➡➡ ⦃L2⦄ → ⦃L1⦄ ➡ ⦃L2⦄.
+#L1 #L2 #H
+lapply (lfpra_inv_fpr … H (⋆0)) -H /2 width=3/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/lfpr_cpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/lfpr_cpr.ma
new file mode 100644 (file)
index 0000000..2a40f58
--- /dev/null
@@ -0,0 +1,29 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/ltpss_sn_ltpss_sn.ma".
+include "basic_2/reducibility/cpr.ma".
+include "basic_2/reducibility/lfpr.ma".
+
+(* FOCALIZED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS **********************)
+
+(* Advanced properties ****************************************************)
+
+lemma lfpr_pair_cpr: ∀L1,L2. ⦃L1⦄ ➡ ⦃L2⦄ → ∀V1,V2. L2 ⊢ V1 ➡ V2 →
+                     ∀I. ⦃L1. ⓑ{I} V1⦄ ➡ ⦃L2. ⓑ{I} V2⦄.
+#L1 #L2 * #L #HL1 #HL2 #V1 #V2 *
+<(ltpss_sn_fwd_length … HL2) #V #HV1 #HV2 #I
+lapply (ltpss_sn_tpss_trans_eq … HV2 … HL2) -HV2 #V2
+@(ex2_1_intro … (L.ⓑ{I}V)) /2 width=1/ (**) (* explicit constructor *)
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/lfpr_fpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/lfpr_fpr.ma
new file mode 100644 (file)
index 0000000..9a226be
--- /dev/null
@@ -0,0 +1,31 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/lfpr.ma".
+include "basic_2/reducibility/cfpr_cpr.ma".
+
+(* FOCALIZED PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ***********************)
+
+(* Inversion lemmas on context-free parallel reduction for closures *********)
+
+lemma fpr_lfpr: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ → ⦃L1⦄ ➡ ⦃L2⦄.
+#L1 #L2 #T1 #T2 #H
+elim (fpr_inv_all … H) -H /2 width=3/
+qed. 
+
+(* Inversion lemmas on context-free parallel reduction for closures *********)
+
+lemma lfpr_inv_fpr: ∀L1,L2. ⦃L1⦄ ➡ ⦃L2⦄ → ∀T. ⦃L1, T⦄ ➡ ⦃L2, T⦄.
+#L1 #L2 * /2 width=4/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/lfpr_lfpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/lfpr_lfpr.ma
new file mode 100644 (file)
index 0000000..7031e79
--- /dev/null
@@ -0,0 +1,39 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/ltpr_ltpss_sn.ma".
+include "basic_2/reducibility/ltpr_ltpr.ma".
+include "basic_2/reducibility/lfpr.ma".
+
+(* FOCALIZED PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ***********************)
+
+(* Main properties **********************************************************)
+
+theorem lfpr_conf: ∀L0,L1,L2. ⦃L0⦄ ➡ ⦃L1⦄ → ⦃L0⦄ ➡ ⦃L2⦄ →
+                   ∃∃L. ⦃L1⦄ ➡ ⦃L⦄ & ⦃L2⦄ ➡ ⦃L⦄.
+#K0 #L1 #L2 * #K1 #HK01 #HKL1 * #K2 #HK02 #HKL2
+lapply (ltpr_fwd_length … HK01) #H
+>(ltpr_fwd_length … HK02) in H; #H
+elim (ltpr_conf … HK01 … HK02) -K0 #K #HK1 #HK2
+lapply (ltpss_sn_fwd_length … HKL1) #H1
+lapply (ltpss_sn_fwd_length … HKL2) #H2
+>H1 in HKL1 H; -H1 #HKL1
+>H2 in HKL2; -H2 #HKL2 #H
+elim (ltpr_ltpss_sn_conf … HKL1 … HK1) -K1 #K1 #HK1 #HLK1
+elim (ltpr_ltpss_sn_conf … HKL2 … HK2) -K2 #K2 #HK2 #HLK2
+elim (ltpss_sn_conf … HK1 … HK2) -K #K #HK1 #HK2
+lapply (ltpr_fwd_length … HLK1) #H1
+lapply (ltpr_fwd_length … HLK2) #H2
+/3 width=5/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/ltpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/ltpr.ma
new file mode 100644 (file)
index 0000000..a910ea7
--- /dev/null
@@ -0,0 +1,67 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/lenv_px.ma".
+include "basic_2/reducibility/tpr.ma".
+
+(* CONTEXT-FREE PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ********************)
+
+definition ltpr: relation lenv ≝ lpx tpr.
+
+interpretation
+  "context-free parallel reduction (environment)"
+  'PRed L1 L2 = (ltpr L1 L2).
+
+(* Basic properties *********************************************************)
+
+lemma ltpr_refl: reflexive … ltpr.
+/2 width=1/ qed.
+
+lemma ltpr_append: ∀K1,K2. K1 ➡ K2 → ∀L1,L2:lenv. L1 ➡ L2 → K1 @@ L1 ➡ K2 @@ L2.
+/2 width=1/ qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+(* Basic_1: was: wcpr0_gen_sort *)
+lemma ltpr_inv_atom1: ∀L2. ⋆ ➡ L2 → L2 = ⋆.
+/2 width=2 by lpx_inv_atom1/ qed-.
+
+(* Basic_1: was: wcpr0_gen_head *)
+lemma ltpr_inv_pair1: ∀K1,I,V1,L2. K1. ⓑ{I} V1 ➡ L2 →
+                      ∃∃K2,V2. K1 ➡ K2 & V1 ➡ V2 & L2 = K2. ⓑ{I} V2.
+/2 width=1 by lpx_inv_pair1/ qed-.
+
+lemma ltpr_inv_atom2: ∀L1. L1 ➡ ⋆ → L1 = ⋆.
+/2 width=2 by lpx_inv_atom2/ qed-.
+
+lemma ltpr_inv_pair2: ∀L1,K2,I,V2. L1 ➡ K2. ⓑ{I} V2 →
+                      ∃∃K1,V1. K1 ➡ K2 & V1 ➡ V2 & L1 = K1. ⓑ{I} V1.
+/2 width=1 by lpx_inv_pair2/ qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma ltpr_fwd_length: ∀L1,L2. L1 ➡ L2 → |L1| = |L2|.
+/2 width=2 by lpx_fwd_length/ qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma ltpr_inv_append1: ∀K1,L1. ∀L:lenv. K1 @@ L1 ➡ L →
+                        ∃∃K2,L2. K1 ➡ K2 & L1 ➡ L2 & L = K2 @@ L2.
+/2 width=1 by lpx_inv_append1/ qed-.
+
+lemma ltpr_inv_append2: ∀L:lenv. ∀K2,L2. L ➡ K2 @@ L2 →
+                        ∃∃K1,L1. K1 ➡ K2 & L1 ➡ L2 & L = K1 @@ L1.
+/2 width=1 by lpx_inv_append2/ qed-.
+
+(* Basic_1: removed theorems 2: wcpr0_getl wcpr0_getl_back *)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/ltpr_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/ltpr_aaa.ma
new file mode 100644 (file)
index 0000000..b45dbb9
--- /dev/null
@@ -0,0 +1,86 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/aaa_ltpss_dx.ma".
+include "basic_2/static/lsuba_aaa.ma".
+include "basic_2/reducibility/ltpr_ldrop.ma".
+
+(* CONTEXT-FREE PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ********************)
+
+(* Properties about atomic arity assignment on terms ************************)
+
+fact aaa_ltpr_tpr_conf_aux: ∀L,T,L1,T1,A. L1 ⊢ T1 ⁝ A → L = L1 → T = T1 →
+                            ∀L2. L1 ➡ L2 → ∀T2. T1 ➡ T2 → L2 ⊢ T2 ⁝ A.
+#L #T @(fw_ind … L T) -L -T #L #T #IH
+#L1 #T1 #A * -L1 -T1 -A
+[ -IH #L1 #k #H1 #H2 #L2 #_ #T2 #H destruct
+  >(tpr_inv_atom1 … H) -H //
+| #I #L1 #K1 #V1 #B #i #HLK1 #HK1 #H1 #H2 #L2 #HL12 #T2 #H destruct
+  >(tpr_inv_atom1 … H) -T2
+  lapply (ldrop_pair2_fwd_fw … HLK1 (#i)) #HKV1
+  elim (ltpr_ldrop_conf … HLK1 … HL12) -HLK1 -HL12 #X #H #HLK2
+  elim (ltpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct
+  lapply (IH … HKV1 … HK1 … HK12 … HV12) // -L1 -K1 -V1 /2 width=5/
+| #a #L1 #V1 #T1 #B #A #HB #HA #H1 #H2 #L2 #HL12 #X #H destruct
+  elim (tpr_inv_abbr1 … H) -H *
+  [ #V2 #T #T2 #HV12 #HT1 #HT2 #H destruct
+    lapply (tps_lsubs_trans … HT2 (L2.ⓓV2) ?) -HT2 /2 width=1/ #HT2
+    lapply (IH … HB … HL12 … HV12) -HB /width=5/ #HB
+    lapply (IH … HA … (L2.ⓓV2) … HT1) -IH -HA -HT1 /width=5/ -T1 /2 width=1/ -L1 -V1 /3 width=5/
+  | -B #T #HT1 #HXT #H destruct
+    lapply (IH … HA … (L2.ⓓV1) … HT1) /width=5/ -T1 /2 width=1/ -L1 #HA
+    @(aaa_inv_lift … HA … HXT) /2 width=1/
+  ]
+| #a #L1 #V1 #T1 #B #A #HB #HA #H1 #H2 #L2 #HL12 #X #H destruct
+  elim (tpr_inv_abst1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+  lapply (IH … HB … HL12 … HV12) -HB /width=5/ #HB
+  lapply (IH … HA … (L2.ⓛV2) … HT12) -IH -HA -HT12 /width=5/ -T1 /2 width=1/
+| #L1 #V1 #T1 #B #A #HV1 #HT1 #H1 #H2 #L2 #HL12 #X #H destruct
+  elim (tpr_inv_appl1 … H) -H *
+  [ #V2 #T2 #HV12 #HT12 #H destruct
+    lapply (IH … HV1 … HL12 … HV12) -HV1 -HV12 /width=5/ #HB
+    lapply (IH … HT1 … HL12 … HT12) -IH -HT1 -HL12 -HT12 /width=5/ /2 width=3/
+  | #a #V2 #W2 #T0 #T2 #HV12 #HT02 #H1 #H2 destruct
+    elim (aaa_inv_abst … HT1) -HT1 #B0 #A0 #HB0 #HA0 #H destruct
+    lapply (IH … HV1 … HL12 … HV12) -HV1 -HV12 /width=5/ #HB
+    lapply (IH … HB0  … HL12 W2 ?) -HB0 /width=5/ #HB0
+    lapply (IH … HA0 … (L2.ⓛW2) … HT02) -IH -HA0 -HT02 [2,4: // |3,5: skip ] /2 width=1/ -T0 -L1 -V1 /4 width=7/
+  | #a #V0 #V2 #W0 #W2 #T0 #T2 #HV10 #HW02 #HT02 #HV02 #H1 #H2 destruct
+    elim (aaa_inv_abbr … HT1) -HT1 #B0 #HW0 #HT0
+    lapply (IH … HW0  … HL12 … HW02) -HW0 /width=5/ #HW2
+    lapply (IH … HV1 … HL12 … HV10) -HV1 -HV10 /width=5/ #HV0
+    lapply (IH … HT0 … (L2.ⓓW2) … HT02) -IH -HT0 -HT02 [2,4: // |3,5: skip ] /2 width=1/ -V1 -T0 -L1 -W0 #HT2
+    @(aaa_abbr … HW2) -HW2
+    @(aaa_appl … HT2) -HT2 /3 width=7/ (**) (* explict constructors, /5 width=7/ is too slow *)
+  ]
+| #L1 #V1 #T1 #A #HV1 #HT1 #H1 #H2 #L2 #HL12 #X #H destruct
+  elim (tpr_inv_cast1 … H) -H
+  [ * #V2 #T2 #HV12 #HT12 #H destruct
+    lapply (IH … HV1 … HL12 … HV12) -HV1 -HV12 /width=5/ #HV2
+    lapply (IH … HT1 … HL12 … HT12) -IH -HT1 -HL12 -HT12 /width=5/ -L1 -V1 -T1 /2 width=1/
+  | -HV1 #HT1X
+     lapply (IH … HT1 … HL12 … HT1X) -IH -HT1 -HL12 -HT1X /width=5/
+  ]
+]
+qed.
+
+lemma aaa_ltpr_tpr_conf: ∀L1,T1,A. L1 ⊢ T1 ⁝ A → ∀L2. L1 ➡ L2 →
+                         ∀T2. T1 ➡ T2 → L2 ⊢ T2 ⁝ A.
+/2 width=9/ qed.
+
+lemma aaa_ltpr_conf: ∀L1,T,A. L1 ⊢ T ⁝ A → ∀L2. L1 ➡ L2 → L2 ⊢ T ⁝ A.
+/2 width=5/ qed.
+
+lemma aaa_tpr_conf: ∀L,T1,A. L ⊢ T1 ⁝ A → ∀T2. T1 ➡ T2 → L ⊢ T2 ⁝ A.
+/2 width=5/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/ltpr_ldrop.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/ltpr_ldrop.ma
new file mode 100644 (file)
index 0000000..9452797
--- /dev/null
@@ -0,0 +1,30 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/ldrop_lpx.ma".
+include "basic_2/reducibility/tpr_lift.ma".
+include "basic_2/reducibility/ltpr.ma".
+
+(* CONTEXT-FREE PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ********************)
+
+(* Basic_1: was: wcpr0_drop *)
+lemma ltpr_ldrop_conf: dropable_sn ltpr.
+/3 width=3 by lpx_deliftable_dropable, tpr_inv_lift1/ qed.
+
+(* Basic_1: was: wcpr0_drop_back *)
+lemma ldrop_ltpr_trans: dedropable_sn ltpr.
+/2 width=3/ qed.
+
+lemma ltpr_ldrop_trans_O1: dropable_dx ltpr.
+/2 width=3/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/ltpr_ltpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/ltpr_ltpr.ma
new file mode 100644 (file)
index 0000000..4a27a6e
--- /dev/null
@@ -0,0 +1,29 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/tpr_tpr.ma".
+include "basic_2/reducibility/ltpr.ma".
+
+(* CONTEXT-FREE PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ********************)
+
+(* Main properties **********************************************************)
+
+theorem ltpr_conf: ∀L0:lenv. ∀L1. L0 ➡ L1 → ∀L2. L0 ➡ L2 →
+                   ∃∃L. L1 ➡ L & L2 ➡ L.
+#L0 #L1 #H elim H -L0 -L1 /2 width=3/
+#I #K0 #K1 #V0 #V1 #_ #HV01 #IHK01 #L2 #H
+elim (ltpr_inv_pair1 … H) -H #K2 #V2 #HK02 #HV02 #H destruct
+elim (IHK01 … HK02) -K0 #K #HK1 #HK2
+elim (tpr_conf … HV01 HV02) -V0 /3 width=5/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/ltpr_ltpss_dx.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/ltpr_ltpss_dx.ma
new file mode 100644 (file)
index 0000000..cee1cb4
--- /dev/null
@@ -0,0 +1,36 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/tpr_tpss.ma".
+
+(* CONTEXT-FREE PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ********************)
+
+(* Properties concerning dx parallel unfold on local environments ***********)
+
+lemma ltpr_ltpss_dx_conf: ∀L1,K1,d,e. L1 ▶* [d, e] K1 → ∀L2. L1 ➡ L2 →
+                          ∃∃K2. L2 ▶* [d, e] K2 & K1 ➡ K2.
+#L1 #K1 #d #e #H elim H -L1 -K1 -d -e
+[ /2 width=3/
+| #L1 #I #V1 #X #H
+  elim (ltpr_inv_pair1 … H) -H #L2 #V2 #HL12 #HV12 #H destruct /3 width=5/
+| #L1 #K1 #I #V1 #W1 #e #_ #HVW1 #IHLK1 #X #H
+  elim (ltpr_inv_pair1 … H) -H #L2 #V2 #HL12 #HV12 #H destruct
+  elim (IHLK1 … HL12) -L1 #K2 #HLK2 #HK12
+  elim (tpr_tpss_ltpr … HK12 … HV12 … HVW1) -V1 /3 width=5/
+| #L1 #K1 #I #V1 #W1 #d #e #_ #HVW1 #IHLK1 #X #H
+  elim (ltpr_inv_pair1 … H) -H #L2 #V2 #HL12 #HV12 #H destruct
+  elim (IHLK1 … HL12) -L1 #K2 #HLK2 #HK12
+  elim (tpr_tpss_ltpr … HK12 … HV12 … HVW1) -V1 /3 width=5/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/ltpr_ltpss_sn.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/ltpr_ltpss_sn.ma
new file mode 100644 (file)
index 0000000..8237623
--- /dev/null
@@ -0,0 +1,31 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/ltpss_sn_alt.ma".
+include "basic_2/reducibility/ltpr_ltpss_dx.ma".
+
+(* CONTEXT-FREE PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ********************)
+
+(* Properties on sn parallel unfold on local environments *******************)
+
+(* Note: this can also be proved like ltpr_ltpss_dx_conf *) 
+lemma ltpr_ltpss_sn_conf: ∀L1,K1,d,e. L1 ⊢ ▶* [d, e] K1 → ∀L2. L1 ➡ L2 →
+                          ∃∃K2. L2 ⊢ ▶* [d, e] K2 & K1 ➡ K2.
+#L1 #K1 #d #e #H
+lapply (ltpss_sn_ltpssa … H) -H #H
+@(ltpssa_ind … H) -K1 /2 width=3/
+#K #K1 #_ #HK1 #IHK #L2 #HL12
+elim (IHK … HL12) -L1 #K2 #HLK2 #HK2
+elim (ltpr_ltpss_dx_conf … HK1 … HK2) -K /3 width=3/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/ltpr_tps.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/ltpr_tps.ma
new file mode 100644 (file)
index 0000000..75792ee
--- /dev/null
@@ -0,0 +1,55 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/ltpr_ldrop.ma".
+
+(* CONTEXT-FREE PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ********************)
+
+(* Properties concerning parallel substitution on terms *********************)
+
+lemma ltpr_tps_trans: ∀L2,T1,T2,d,e. L2 ⊢ T1 ▶ [d, e] T2 → ∀L1. L1 ➡ L2 →
+                      ∃∃T. L1 ⊢ T1 ▶ [d, e] T & T ➡ T2.
+#L2 #T1 #T2 #d #e #H elim H -L2 -T1 -T2 -d -e
+[ /2 width=3/
+| #L2 #K2 #V2 #W2 #i #d #e #Hdi #Hide #HLK2 #HVW2 #L1 #HL12
+  elim (ltpr_ldrop_trans_O1 … HL12 … HLK2) -L2 #X #HLK1 #H
+  elim (ltpr_inv_pair2 … H) -H #K1 #V1 #HK12 #HV12 #H destruct -K2
+  elim (lift_total V1 0 (i+1)) #W1 #HVW1
+  lapply (tpr_lift … HV12 … HVW1 … HVW2) -V2 /3 width=4/
+| #L2 #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #L1 #HL12
+  elim (IHV12 … HL12) -IHV12 #V #HV1 #HV2
+  elim (IHT12 (L1.ⓑ{I}V) ?) /2 width=1/ -L2 /3 width=5/
+| #L2 #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #L1 #HL12
+  elim (IHV12 … HL12) -IHV12
+  elim (IHT12 … HL12) -L2 /3 width=5/
+]
+qed.
+
+lemma ltpr_tps_conf: ∀L1,T1,T2,d,e. L1 ⊢ T1 ▶ [d, e] T2 → ∀L2. L1 ➡ L2 →
+                     ∃∃T. L2 ⊢ T1 ▶ [d, e] T & T2 ➡ T.
+#L1 #T1 #T2 #d #e #H elim H -L1 -T1 -T2 -d -e
+[ /2 width=3/
+| #L1 #K1 #V1 #W1 #i #d #e #Hdi #Hide #HLK1 #HVW1 #L2 #HL12
+  elim (ltpr_ldrop_conf … HLK1 … HL12) -L1 #X #H #HLK2
+  elim (ltpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct -K1
+  elim (lift_total V2 0 (i+1)) #W2 #HVW2
+  lapply (tpr_lift … HV12 … HVW1 … HVW2) -V1 /3 width=4/
+| #L1 #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #L2 #HL12
+  elim (IHV12 … HL12) -IHV12 #V #HV1 #HV2
+  elim (IHT12 (L2.ⓑ{I}V) ?) /2 width=1/ -L1 /3 width=5/
+| #L1 #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #L2 #HL12
+  elim (IHV12 … HL12) -IHV12
+  elim (IHT12 … HL12) -L1 /3 width=5/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/thnf.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/thnf.ma
new file mode 100644 (file)
index 0000000..ab86426
--- /dev/null
@@ -0,0 +1,56 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/tshf.ma".
+include "basic_2/reducibility/tpr.ma".
+
+(* CONTEXT-FREE WEAK HEAD NORMAL TERMS **************************************)
+
+definition thnf: predicate term ≝ NF … tpr tshf.
+
+interpretation
+   "context-free head normality (term)"
+   'HdNormal T = (thnf T).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma thnf_inv_tshf: ∀T. 𝐇𝐍⦃T⦄ → T ≈ T.
+normalize /2 width=1/
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma tpr_tshf: ∀T1,T2. T1 ➡ T2 → T1 ≈ T1 → T1 ≈ T2.
+#T1 #T2 #H elim H -T1 -T2 //
+[ #I #V1 #V2 #T1 #T2 #_ #_ #_ #IHT12 #H
+  elim (tshf_inv_flat1 … H) -H #W2 #U2 #HT1U2 #HT1 #_ #H1 #H2 destruct
+  lapply (IHT12 HT1U2) -IHT12 -HT1U2 #HUT2
+  lapply (simple_tshf_repl_dx … HUT2 HT1) /2 width=1/
+| #a #V1 #V2 #W #T1 #T2 #_ #_ #_ #_ #H
+  elim (tshf_inv_flat1 … H) -H #W2 #U2 #_ #H
+  elim (simple_inv_bind … H)
+| #a #I #V1 #V2 #T1 #T #T2 #_ #_ #_ #_ #_ #H
+  elim (tshf_inv_bind1 … H) -H #W2 #U2 #H1 * #H2 destruct //
+| #a #V2 #V1 #V #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #_ #H
+  elim (tshf_inv_flat1 … H) -H #U1 #U2 #_ #H
+  elim (simple_inv_bind … H)
+| #V #T #T1 #T2 #_ #_ #_ #H
+  elim (tshf_inv_bind1 … H) -H #W2 #U2 #H1 * #H2 destruct
+| #V #T1 #T2 #_ #_ #H
+  elim (tshf_inv_flat1 … H) -H #W2 #U2 #_ #_ #_ #H destruct
+]
+qed.
+
+lemma thnf_tshf: ∀T. T ≈ T → 𝐇𝐍⦃T⦄.
+/3 width=1/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/tpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/tpr.ma
new file mode 100644 (file)
index 0000000..957b5f3
--- /dev/null
@@ -0,0 +1,229 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/tps.ma".
+
+(* CONTEXT-FREE PARALLEL REDUCTION ON TERMS *********************************)
+
+(* Basic_1: includes: pr0_delta1 *)
+inductive tpr: relation term ≝
+| tpr_atom : ∀I. tpr (⓪{I}) (⓪{I})
+| tpr_flat : ∀I,V1,V2,T1,T2. tpr V1 V2 → tpr T1 T2 →
+             tpr (ⓕ{I} V1. T1) (ⓕ{I} V2. T2)
+| tpr_beta : ∀a,V1,V2,W,T1,T2.
+             tpr V1 V2 → tpr T1 T2 → tpr (ⓐV1. ⓛ{a}W. T1) (ⓓ{a}V2. T2)
+| tpr_delta: ∀a,I,V1,V2,T1,T,T2.
+             tpr V1 V2 → tpr T1 T → ⋆. ⓑ{I} V2 ⊢ T ▶ [0, 1] T2 →
+             tpr (ⓑ{a,I} V1. T1) (ⓑ{a,I} V2. T2)
+| tpr_theta: ∀a,V,V1,V2,W1,W2,T1,T2.
+             tpr V1 V2 → ⇧[0,1] V2 ≡ V → tpr W1 W2 → tpr T1 T2 →
+             tpr (ⓐV1. ⓓ{a}W1. T1) (ⓓ{a}W2. ⓐV. T2)
+| tpr_zeta : ∀V,T1,T,T2. tpr T1 T → ⇧[0, 1] T2 ≡ T → tpr (+ⓓV. T1) T2
+| tpr_tau  : ∀V,T1,T2. tpr T1 T2 → tpr (ⓝV. T1) T2
+.
+
+interpretation
+   "context-free parallel reduction (term)"
+   'PRed T1 T2 = (tpr T1 T2).
+
+(* Basic properties *********************************************************)
+
+lemma tpr_bind: ∀a,I,V1,V2,T1,T2. V1 ➡ V2 → T1 ➡ T2 → ⓑ{a,I} V1. T1 ➡ ⓑ{a,I} V2. T2.
+/2 width=3/ qed.
+
+(* Basic_1: was by definition: pr0_refl *)
+lemma tpr_refl: reflexive … tpr.
+#T elim T -T //
+#I elim I -I /2 width=1/
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+fact tpr_inv_atom1_aux: ∀U1,U2. U1 ➡ U2 → ∀I. U1 = ⓪{I} → U2 = ⓪{I}.
+#U1 #U2 * -U1 -U2
+[ //
+| #I #V1 #V2 #T1 #T2 #_ #_ #k #H destruct
+| #a #V1 #V2 #W #T1 #T2 #_ #_ #k #H destruct
+| #a #I #V1 #V2 #T1 #T #T2 #_ #_ #_ #k #H destruct
+| #a #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #k #H destruct
+| #V #T1 #T #T2 #_ #_ #k #H destruct
+| #V #T1 #T2 #_ #k #H destruct
+]
+qed.
+
+(* Basic_1: was: pr0_gen_sort pr0_gen_lref *)
+lemma tpr_inv_atom1: ∀I,U2. ⓪{I} ➡ U2 → U2 = ⓪{I}.
+/2 width=3/ qed-.
+
+fact tpr_inv_bind1_aux: ∀U1,U2. U1 ➡ U2 → ∀a,I,V1,T1. U1 = ⓑ{a,I} V1. T1 →
+                        (∃∃V2,T,T2. V1 ➡ V2 & T1 ➡ T &
+                                    ⋆.  ⓑ{I} V2 ⊢ T ▶ [0, 1] T2 &
+                                    U2 = ⓑ{a,I} V2. T2
+                        ) ∨
+                        ∃∃T. T1 ➡ T & ⇧[0, 1] U2 ≡ T & a = true & I = Abbr.
+#U1 #U2 * -U1 -U2
+[ #J #a #I #V #T #H destruct
+| #I1 #V1 #V2 #T1 #T2 #_ #_ #a #I #V #T #H destruct
+| #b #V1 #V2 #W #T1 #T2 #_ #_ #a #I #V #T #H destruct
+| #b #I1 #V1 #V2 #T1 #T #T2 #HV12 #HT1 #HT2 #a #I0 #V0 #T0 #H destruct /3 width=7/
+| #b #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #a #I0 #V0 #T0 #H destruct
+| #V #T1 #T #T2 #HT1 #HT2 #a #I0 #V0 #T0 #H destruct /3 width=3/
+| #V #T1 #T2 #_ #a #I0 #V0 #T0 #H destruct
+]
+qed.
+
+lemma tpr_inv_bind1: ∀V1,T1,U2,a,I. ⓑ{a,I} V1. T1 ➡ U2 →
+                     (∃∃V2,T,T2. V1 ➡ V2 & T1 ➡ T &
+                                 ⋆.  ⓑ{I} V2 ⊢ T ▶ [0, 1] T2 &
+                                 U2 = ⓑ{a,I} V2. T2
+                     ) ∨
+                     ∃∃T. T1 ➡ T & ⇧[0,1] U2 ≡ T & a = true & I = Abbr.
+/2 width=3/ qed-.
+
+(* Basic_1: was pr0_gen_abbr *)
+lemma tpr_inv_abbr1: ∀a,V1,T1,U2. ⓓ{a}V1. T1 ➡ U2 →
+                     (∃∃V2,T,T2. V1 ➡ V2 & T1 ➡ T &
+                                 ⋆.  ⓓV2 ⊢ T ▶ [0, 1] T2 &
+                                 U2 = ⓓ{a}V2. T2
+                      ) ∨
+                      ∃∃T. T1 ➡ T & ⇧[0, 1] U2 ≡ T & a = true.
+#a #V1 #T1 #U2 #H
+elim (tpr_inv_bind1 … H) -H * /3 width=7/
+qed-.
+
+fact tpr_inv_flat1_aux: ∀U1,U2. U1 ➡ U2 → ∀I,V1,U0. U1 = ⓕ{I} V1. U0 →
+                        ∨∨ ∃∃V2,T2.              V1 ➡ V2 & U0 ➡ T2 &
+                                                 U2 = ⓕ{I} V2. T2
+                         | ∃∃a,V2,W,T1,T2.       V1 ➡ V2 & T1 ➡ T2 &
+                                                 U0 = ⓛ{a}W. T1 &
+                                                 U2 = ⓓ{a}V2. T2 & I = Appl
+                         | ∃∃a,V2,V,W1,W2,T1,T2. V1 ➡ V2 & W1 ➡ W2 & T1 ➡ T2 &
+                                                 ⇧[0,1] V2 ≡ V &
+                                                 U0 = ⓓ{a}W1. T1 &
+                                                 U2 = ⓓ{a}W2. ⓐV. T2 &
+                                                 I = Appl
+                         |                       (U0 ➡ U2 ∧ I = Cast).
+#U1 #U2 * -U1 -U2
+[ #I #J #V #T #H destruct
+| #I #V1 #V2 #T1 #T2 #HV12 #HT12 #J #V #T #H destruct /3 width=5/
+| #a #V1 #V2 #W #T1 #T2 #HV12 #HT12 #J #V #T #H destruct /3 width=9/
+| #a #I #V1 #V2 #T1 #T #T2 #_ #_ #_ #J #V0 #T0 #H destruct
+| #a #V #V1 #V2 #W1 #W2 #T1 #T2 #HV12 #HV2 #HW12 #HT12 #J #V0 #T0 #H destruct /3 width=13/
+| #V #T1 #T #T2 #_ #_ #J #V0 #T0 #H destruct
+| #V #T1 #T2 #HT12 #J #V0 #T0 #H destruct /3 width=1/
+]
+qed.
+
+lemma tpr_inv_flat1: ∀V1,U0,U2,I. ⓕ{I} V1. U0 ➡ U2 →
+                     ∨∨ ∃∃V2,T2.              V1 ➡ V2 & U0 ➡ T2 &
+                                              U2 = ⓕ{I} V2. T2
+                      | ∃∃a,V2,W,T1,T2.       V1 ➡ V2 & T1 ➡ T2 &
+                                              U0 = ⓛ{a}W. T1 &
+                                              U2 = ⓓ{a}V2. T2 & I = Appl
+                      | ∃∃a,V2,V,W1,W2,T1,T2. V1 ➡ V2 & W1 ➡ W2 & T1 ➡ T2 &
+                                              ⇧[0,1] V2 ≡ V &
+                                              U0 = ⓓ{a}W1. T1 &
+                                              U2 = ⓓ{a}W2. ⓐV. T2 &
+                                              I = Appl
+                      |                       (U0 ➡ U2 ∧ I = Cast).
+/2 width=3/ qed-.
+
+(* Basic_1: was pr0_gen_appl *)
+lemma tpr_inv_appl1: ∀V1,U0,U2. ⓐV1. U0 ➡ U2 →
+                     ∨∨ ∃∃V2,T2.              V1 ➡ V2 & U0 ➡ T2 &
+                                              U2 = ⓐV2. T2
+                      | ∃∃a,V2,W,T1,T2.       V1 ➡ V2 & T1 ➡ T2 &
+                                              U0 = ⓛ{a}W. T1 &
+                                              U2 = ⓓ{a}V2. T2
+                      | ∃∃a,V2,V,W1,W2,T1,T2. V1 ➡ V2 & W1 ➡ W2 & T1 ➡ T2 &
+                                              ⇧[0,1] V2 ≡ V &
+                                              U0 = ⓓ{a}W1. T1 &
+                                              U2 = ⓓ{a}W2. ⓐV. T2.
+#V1 #U0 #U2 #H
+elim (tpr_inv_flat1 … H) -H *
+/3 width=5/ /3 width=9/ /3 width=13/
+#_ #H destruct
+qed-.
+
+(* Note: the main property of simple terms *)
+lemma tpr_inv_appl1_simple: ∀V1,T1,U. ⓐV1. T1 ➡ U → 𝐒⦃T1⦄ →
+                            ∃∃V2,T2. V1 ➡ V2 & T1 ➡ T2 &
+                                     U = ⓐV2. T2.
+#V1 #T1 #U #H #HT1
+elim (tpr_inv_appl1 … H) -H *
+[ /2 width=5/
+| #a #V2 #W #W1 #W2 #_ #_ #H #_ destruct
+  elim (simple_inv_bind … HT1)
+| #a #V2 #V #W1 #W2 #U1 #U2 #_ #_ #_ #_ #H #_ destruct
+  elim (simple_inv_bind … HT1)
+]
+qed-.
+
+(* Basic_1: was: pr0_gen_cast *)
+lemma tpr_inv_cast1: ∀V1,T1,U2. ⓝV1. T1 ➡ U2 →
+                       (∃∃V2,T2. V1 ➡ V2 & T1 ➡ T2 & U2 = ⓝV2. T2)
+                     ∨ T1 ➡ U2.
+#V1 #T1 #U2 #H
+elim (tpr_inv_flat1 … H) -H * /3 width=5/ #a #V2 #W #W1 #W2
+[ #_ #_ #_ #_ #H destruct
+| #T2 #U1 #_ #_ #_ #_ #_ #_ #H destruct
+]
+qed-.
+
+fact tpr_inv_lref2_aux: ∀T1,T2. T1 ➡ T2 → ∀i. T2 = #i →
+                        ∨∨        T1 = #i
+                         | ∃∃V,T. T ➡ #(i+1) & T1 = +ⓓV. T
+                         | ∃∃V,T. T ➡ #i & T1 = ⓝV. T.
+#T1 #T2 * -T1 -T2
+[ #I #i #H destruct /2 width=1/
+| #I #V1 #V2 #T1 #T2 #_ #_ #i #H destruct
+| #a #V1 #V2 #W #T1 #T2 #_ #_ #i #H destruct
+| #a #I #V1 #V2 #T1 #T #T2 #_ #_ #_ #i #H destruct
+| #a #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #i #H destruct
+| #V #T1 #T #T2 #HT1 #HT2 #i #H destruct
+  lapply (lift_inv_lref1_ge … HT2 ?) -HT2 // #H destruct /3 width=4/
+| #V #T1 #T2 #HT12 #i #H destruct /3 width=4/
+]
+qed.
+
+lemma tpr_inv_lref2: ∀T1,i. T1 ➡ #i →
+                     ∨∨        T1 = #i
+                      | ∃∃V,T. T ➡ #(i+1) & T1 = +ⓓV. T
+                      | ∃∃V,T. T ➡ #i & T1 = ⓝV. T.
+/2 width=3/ qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma tpr_fwd_shift1: ∀L1,T1,T. L1 @@ T1 ➡ T →
+                      ∃∃L2,T2. |L1| = |L2| & T = L2 @@ T2.
+#L1 @(lenv_ind_dx … L1) -L1 normalize
+[ #T1 #T #HT1
+  @(ex2_2_intro … (⋆)) // (**) (* explicit constructor *)
+| #I #L1 #V1 #IH #T1 #X
+  >shift_append_assoc normalize #H
+  elim (tpr_inv_bind1 … H) -H *
+  [ #V0 #T0 #X0 #_ #HT10 #H0 #H destruct
+    elim (IH … HT10) -IH -T1 #L #T #HL1 #H destruct
+    elim (tps_fwd_shift1 … H0) -T #L2 #T2 #HL2 #H destruct
+    >append_length >HL1 >HL2 -L1 -L
+    @(ex2_2_intro … (⋆.ⓑ{I}V0@@L2) T2) [ >append_length ] // /2 width=3/ (**) (* explicit constructor *)
+  | #T #_ #_ #H destruct
+  ]
+]
+qed-.
+
+(* Basic_1: removed theorems 3:
+            pr0_subst0_back pr0_subst0_fwd pr0_subst0
+   Basic_1: removed local theorems: 1: pr0_delta_tau
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/tpr_delift.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/tpr_delift.ma
new file mode 100644 (file)
index 0000000..99e621d
--- /dev/null
@@ -0,0 +1,27 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/delift.ma".
+include "basic_2/reducibility/tpr_tpss.ma".
+
+(* CONTEXT-FREE PARALLEL REDUCTION ON TERMS *********************************)
+
+(* Properties on inverse basic term relocation ******************************)
+
+lemma tpr_delift_conf: ∀U1,U2. U1 ➡ U2 → ∀L,T1,d,e. L ⊢ ▼*[d, e] U1 ≡ T1 →
+                       ∃∃T2. T1 ➡ T2 & L ⊢ ▼*[d, e] U2 ≡ T2.
+#U1 #U2 #HU12 #L #T1 #d #e * #W1 #HUW1 #HTW1
+elim (tpr_tpss_conf … HU12 … HUW1) -U1 #U1 #HWU1 #HU21
+elim (tpr_inv_lift1 … HWU1 … HTW1) -W1 /3 width=5/
+qed. 
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/tpr_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/tpr_lift.ma
new file mode 100644 (file)
index 0000000..b4d7606
--- /dev/null
@@ -0,0 +1,118 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/tps_lift.ma".
+include "basic_2/reducibility/tpr.ma".
+
+(* CONTEXT-FREE PARALLEL REDUCTION ON TERMS *********************************)
+
+(* Relocation properties ****************************************************)
+
+(* Basic_1: was: pr0_lift *)
+lemma tpr_lift: t_liftable tpr.
+#T1 #T2 #H elim H -T1 -T2
+[ * #i #U1 #d #e #HU1 #U2 #HU2
+  lapply (lift_mono … HU1 … HU2) -HU1 #H destruct
+  [ lapply (lift_inv_sort1 … HU2) -HU2 #H destruct //
+  | lapply (lift_inv_lref1 … HU2) * * #Hid #H destruct //
+  | lapply (lift_inv_gref1 … HU2) -HU2 #H destruct //
+  ]
+| #I #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #X1 #d #e #HX1 #X2 #HX2
+  elim (lift_inv_flat1 … HX1) -HX1 #W1 #U1 #HVW1 #HTU1 #HX1 destruct
+  elim (lift_inv_flat1 … HX2) -HX2 #W2 #U2 #HVW2 #HTU2 #HX2 destruct /3 width=4/
+| #a #V1 #V2 #W #T1 #T2 #_ #_ #IHV12 #IHT12 #X1 #d #e #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 /3 width=4/
+| #a #I #V1 #V2 #T1 #T #T2 #_ #_ #HT2 #IHV12 #IHT1 #X1 #d #e #HX1 #X2 #HX2
+  elim (lift_inv_bind1 … HX1) -HX1 #W1 #U1 #HVW1 #HTU1 #HX1 destruct
+  elim (lift_inv_bind1 … HX2) -HX2 #W2 #U0 #HVW2 #HTU0 #HX2 destruct
+  elim (lift_total T (d + 1) e) #U #HTU
+  @tpr_delta
+  [4: @(tps_lift_le … HT2 … HTU HTU0 ?) /2 width=1/ |1: skip |2: /2 width=4/ |3: /2 width=4/ ] (**) (*/3. is too slow *)
+| #a #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #HV2 #_ #_ #IHV12 #IHW12 #IHT12 #X1 #d #e #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 ?) -V // /3 width=4/
+| #V #T1 #T #T2 #_ #HT2 #IHT1 #X #d #e #H #U2 #HTU2
+  elim (lift_inv_bind1 … H) -H #V3 #T3 #_ #HT13 #H destruct -V
+  elim (lift_conf_O1 … HTU2 … HT2) -T2 /3 width=4/
+| #V #T1 #T2 #_ #IHT12 #X #d #e #HX #T #HT2
+  elim (lift_inv_flat1 … HX) -HX #V0 #T0 #_ #HT0 #HX destruct /3 width=4/
+]
+qed.
+
+(* Basic_1: was: pr0_gen_lift *)
+lemma tpr_inv_lift1: t_deliftable_sn tpr.
+#T1 #T2 #H elim H -T1 -T2
+[ * #i #X #d #e #HX
+  [ lapply (lift_inv_sort2 … HX) -HX #H destruct /2 width=3/
+  | lapply (lift_inv_lref2 … HX) -HX * * #Hid #H destruct /3 width=3/
+  | lapply (lift_inv_gref2 … HX) -HX #H destruct /2 width=3/
+  ]
+| #I #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #X #d #e #HX
+  elim (lift_inv_flat2 … HX) -HX #V0 #T0 #HV01 #HT01 #HX destruct
+  elim (IHV12 … HV01) -V1
+  elim (IHT12 … HT01) -T1 /3 width=5/
+| #a #V1 #V2 #W1 #T1 #T2 #_ #_ #IHV12 #IHT12 #X #d #e #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 … HV01) -V1
+  elim (IHT12 … HT01) -T1 /3 width=5/
+| #a #I #V1 #V2 #T1 #T #T2 #_ #_ #HT2 #IHV12 #IHT1 #X #d #e #HX
+  elim (lift_inv_bind2 … HX) -HX #W1 #U1 #HWV1 #HUT1 #HX destruct
+  elim (IHV12 … HWV1) -V1 #W2 #HWV2 #HW12
+  elim (IHT1 … HUT1) -T1 #U #HUT #HU1
+  elim (tps_inv_lift1_le … HT2 … HUT ?) -T // [3: /2 width=5/ |2: skip ] #U2 #HU2 #HUT2
+  @ex2_1_intro  [2: /2 width=2/ |1: skip |3: /2 width=3/ ] (**) (* /3 width=5/ is slow *)
+| #a #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #HV2 #_ #_ #IHV12 #IHW12 #IHT12 #X #d #e #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 … HV01) -V1 #V3 #HV32 #HV03
+  elim (IHW12 … HW01) -W1 #W3 #HW32 #HW03
+  elim (IHT12 … HT01) -T1 #T3 #HT32 #HT03
+  elim (lift_trans_le … HV32 … HV2 ?) -V2 // #V2 #HV32 #HV2
+  @ex2_1_intro [2: /3 width=2/ |1: skip |3: /2 width=3/ ] (**) (* /4 width=5/ is slow *)
+| #V #T1 #T #T2 #_ #HT2 #IHT1 #X #d #e #HX
+  elim (lift_inv_bind2 … HX) -HX #V3 #T3 #_ #HT31 #H destruct
+  elim (IHT1 … HT31) -T1 #T1 #HT1 #HT31
+  elim (lift_div_le … HT2 … HT1 ?) -T // /3 width=5/
+| #V #T1 #T2 #_ #IHT12 #X #d #e #HX
+  elim (lift_inv_flat2 … HX) -HX #V0 #T0 #_ #HT01 #H destruct
+  elim (IHT12 … HT01) -T1 /3 width=3/
+]
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+fact tpr_inv_abst1_aux: ∀U1,U2. U1 ➡ U2 → ∀a,V1,T1. U1 = ⓛ{a}V1. T1 →
+                        ∃∃V2,T2. V1 ➡ V2 & T1 ➡ T2 & U2 = ⓛ{a}V2. T2.
+#U1 #U2 * -U1 -U2
+[ #I #a #V #T #H destruct
+| #I #V1 #V2 #T1 #T2 #_ #_ #a #V #T #H destruct
+| #b #V1 #V2 #W #T1 #T2 #_ #_ #a #V #T #H destruct
+| #b #I #V1 #V2 #T1 #T #T2 #HV12 #HT1 #HT2 #a #V0 #T0 #H destruct
+  <(tps_inv_refl_SO2 … HT2 ? ? ?) -T2 /2 width=5/
+| #b #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #a #V0 #T0 #H destruct
+| #V #T1 #T #T2 #_ #_ #a #V0 #T0 #H destruct
+| #V #T1 #T2 #_ #a #V0 #T0 #H destruct
+]
+qed.
+
+(* Basic_1: was pr0_gen_abst *)
+lemma tpr_inv_abst1: ∀a,V1,T1,U2. ⓛ{a}V1. T1 ➡ U2 →
+                     ∃∃V2,T2. V1 ➡ V2 & T1 ➡ T2 & U2 = ⓛ{a}V2. T2.
+/2 width=3/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/tpr_tpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/tpr_tpr.ma
new file mode 100644 (file)
index 0000000..1522d00
--- /dev/null
@@ -0,0 +1,283 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/reducibility/tpr_tpss.ma".
+
+(* CONTEXT-FREE PARALLEL REDUCTION ON TERMS *********************************)
+
+(* Confluence lemmas ********************************************************)
+
+fact tpr_conf_atom_atom: ∀I. ∃∃X. ⓪{I} ➡ X & ⓪{I} ➡ X.
+/2 width=3/ qed.
+
+fact tpr_conf_flat_flat:
+   ∀I,V0,V1,T0,T1,V2,T2. (
+      ∀X0:term. #{X0} < #{V0} + #{T0} + 1 →
+      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
+      ∃∃X. X1 ➡ X & X2 ➡ X
+   ) →
+   V0 ➡ V1 → V0 ➡ V2 → T0 ➡ T1 → T0 ➡ T2 →
+   ∃∃T0. ⓕ{I} V1. T1 ➡ T0 & ⓕ{I} V2. T2 ➡ T0.
+#I #V0 #V1 #T0 #T1 #V2 #T2 #IH #HV01 #HV02 #HT01 #HT02
+elim (IH … HV01 … HV02) -HV01 -HV02 // #V #HV1 #HV2
+elim (IH … HT01 … HT02) -HT01 -HT02 -IH // /3 width=5/
+qed.
+
+fact tpr_conf_flat_beta:
+   ∀a,V0,V1,T1,V2,W0,U0,T2. (
+      ∀X0:term. #{X0} < #{V0} + (#{W0} + #{U0} + 1) + 1 →
+      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
+      ∃∃X. X1 ➡ X & X2 ➡ X
+   ) →
+   V0 ➡ V1 → V0 ➡ V2 →
+   U0 ➡ T2 → ⓛ{a}W0. U0 ➡ T1 →
+   ∃∃X. ⓐV1. T1 ➡ X & ⓓ{a}V2. T2 ➡ X.
+#a #V0 #V1 #T1 #V2 #W0 #U0 #T2 #IH #HV01 #HV02 #HT02 #H
+elim (tpr_inv_abst1 … H) -H #W1 #U1 #HW01 #HU01 #H destruct
+elim (IH … HV01 … HV02) -HV01 -HV02 /2 width=1/ #V #HV1 #HV2
+elim (IH … HT02 … HU01) -HT02 -HU01 -IH /2 width=1/ /3 width=5/
+qed.
+
+(* Basic-1: was:
+            pr0_cong_upsilon_refl pr0_cong_upsilon_zeta
+            pr0_cong_upsilon_cong pr0_cong_upsilon_delta
+*)
+fact tpr_conf_flat_theta:
+   ∀a,V0,V1,T1,V2,V,W0,W2,U0,U2. (
+      ∀X0:term. #{X0} < #{V0} + (#{W0} + #{U0} + 1) + 1 →
+      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
+      ∃∃X. X1 ➡ X & X2 ➡ X
+   ) →
+   V0 ➡ V1 → V0 ➡ V2 → ⇧[O,1] V2 ≡ V →
+   W0 ➡ W2 → U0 ➡ U2 →  ⓓ{a}W0. U0 ➡ T1 →
+   ∃∃X. ⓐV1. T1 ➡ X & ⓓ{a}W2. ⓐV. U2 ➡ X.
+#a #V0 #V1 #T1 #V2 #V #W0 #W2 #U0 #U2 #IH #HV01 #HV02 #HV2 #HW02 #HU02 #H
+elim (IH … HV01 … HV02) -HV01 -HV02 /2 width=1/ #VV #HVV1 #HVV2
+elim (lift_total VV 0 1) #VVV #HVV
+lapply (tpr_lift … HVV2 … HV2 … HVV) #HVVV
+elim (tpr_inv_abbr1 … H) -H *
+(* case 1: delta *)
+[ -HV2 -HVV2 #WW2 #UU2 #UU #HWW2 #HUU02 #HUU2 #H destruct
+  elim (IH … HW02 … HWW2) -HW02 -HWW2 /2 width=1/ #W #HW02 #HWW2
+  elim (IH … HU02 … HUU02) -HU02 -HUU02 -IH /2 width=1/ #U #HU2 #HUUU2
+  elim (tpr_tps_bind … HWW2 HUUU2 … HUU2) -UU2 #UUU #HUUU2 #HUUU1
+  @ex2_1_intro
+  [2: @tpr_theta [6: @HVV |7: @HWW2 |8: @HUUU2 |1,2,3,4: skip | // ]
+  |1:skip
+  |3: @tpr_delta [3: @tpr_flat |1: skip ] /2 width=5/
+  ] (**) (* /5 width=14/ is too slow *)
+(* case 3: zeta *)
+| -HV2 -HW02 -HVV2 #U1 #HU01 #HTU1
+  elim (IH … HU01 … HU02) -HU01 -HU02 -IH // -U0 #U #HU1 #HU2
+  elim (tpr_inv_lift1 … HU1 … HTU1) -U1 #UU #HUU #HT1UU #H destruct
+  @(ex2_1_intro … (ⓐVV.UU)) /2 width=1/ /3 width=5/ (**) (* /4 width=9/ is too slow *)
+]
+qed.
+
+fact tpr_conf_flat_cast:
+   ∀X2,V0,V1,T0,T1. (
+      ∀X0:term. #{X0} < #{V0} + #{T0} + 1 →
+      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
+      ∃∃X. X1 ➡ X & X2 ➡ X
+   ) →
+   V0 ➡ V1 → T0 ➡ T1 → T0 ➡ X2 →
+   ∃∃X. ⓝV1. T1 ➡ X & X2 ➡ X.
+#X2 #V0 #V1 #T0 #T1 #IH #_ #HT01 #HT02
+elim (IH … HT01 … HT02) -HT01 -HT02 -IH // /3 width=3/
+qed.
+
+fact tpr_conf_beta_beta:
+   ∀a. ∀W0:term. ∀V0,V1,T0,T1,V2,T2. (
+      ∀X0:term. #{X0} < #{V0} + (#{W0} + #{T0} + 1) + 1 →
+      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
+      ∃∃X. X1 ➡ X & X2 ➡ X
+   ) →
+   V0 ➡ V1 → V0 ➡ V2 → T0 ➡ T1 → T0 ➡ T2 →
+   ∃∃X. ⓓ{a}V1. T1 ➡X & ⓓ{a}V2. T2 ➡ X.
+#a #W0 #V0 #V1 #T0 #T1 #V2 #T2 #IH #HV01 #HV02 #HT01 #HT02
+elim (IH … HV01 … HV02) -HV01 -HV02 /2 width=1/
+elim (IH … HT01 … HT02) -HT01 -HT02 -IH /2 width=1/ /3 width=5/
+qed.
+
+(* Basic_1: was: pr0_cong_delta pr0_delta_delta *)
+fact tpr_conf_delta_delta:
+   ∀a,I1,V0,V1,T0,T1,TT1,V2,T2,TT2. (
+      ∀X0:term. #{X0} < #{V0} + #{T0} + 1 →
+      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
+      ∃∃X. X1 ➡ X & X2 ➡ X
+   ) →
+   V0 ➡ V1 → V0 ➡ V2 → T0 ➡ T1 → T0 ➡ T2 →
+   ⋆. ⓑ{I1} V1 ⊢ T1 ▶ [O, 1] TT1 →
+   ⋆. ⓑ{I1} V2 ⊢ T2 ▶ [O, 1] TT2 →
+   ∃∃X. ⓑ{a,I1} V1. TT1 ➡ X & ⓑ{a,I1} V2. TT2 ➡ X.
+#a #I1 #V0 #V1 #T0 #T1 #TT1 #V2 #T2 #TT2 #IH #HV01 #HV02 #HT01 #HT02 #HTT1 #HTT2
+elim (IH … HV01 … HV02) -HV01 -HV02 // #V #HV1 #HV2
+elim (IH … HT01 … HT02) -HT01 -HT02 -IH // #T #HT1 #HT2
+elim (tpr_tps_bind … HV1 HT1 … HTT1) -T1 #U1 #TTU1 #HTU1
+elim (tpr_tps_bind … HV2 HT2 … HTT2) -T2 #U2 #TTU2 #HTU2
+elim (tps_conf_eq … HTU1 … HTU2) -T #U #HU1 #HU2
+@ex2_1_intro [2,3: @tpr_delta |1: skip ] /width=10/ (**) (* /3 width=10/ is too slow *)
+qed.
+
+fact tpr_conf_delta_zeta:
+   ∀X2,V0,V1,T0,T1,TT1,T2. (
+      ∀X0:term. #{X0} < #{V0} + #{T0} + 1 →
+      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
+      ∃∃X. X1 ➡ X & X2 ➡ X
+   ) →
+   V0 ➡ V1 → T0 ➡ T1 → ⋆. ⓓV1 ⊢ T1 ▶ [O,1] TT1 →
+   T0 ➡ T2 → ⇧[O, 1] X2 ≡ T2 →
+   ∃∃X. +ⓓV1. TT1 ➡ X & X2 ➡ X.
+#X2 #V0 #V1 #T0 #T1 #TT1 #T2 #IH #_ #HT01 #HTT1 #HT02 #HXT2
+elim (IH … HT01 … HT02) -IH -HT01 -HT02 // -V0 -T0 #T #HT1 #HT2
+elim (tpr_tps_bind ? ? V1 … HT1 HTT1) -T1 // #TT #HTT1 #HTT
+elim (tpr_inv_lift1 … HT2 … HXT2) -T2 #X #HXT #HX2
+lapply (tps_inv_lift1_eq … HTT … HXT) -HTT #H destruct /3 width=3/
+qed.
+
+(* Basic_1: was: pr0_upsilon_upsilon *)
+fact tpr_conf_theta_theta:
+   ∀a,VV1,V0,V1,W0,W1,T0,T1,V2,VV2,W2,T2. (
+      ∀X0:term. #{X0} < #{V0} + (#{W0} + #{T0} + 1) + 1 →
+      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
+      ∃∃X. X1 ➡ X & X2 ➡ X
+   ) →
+   V0 ➡ V1 → V0 ➡ V2 → W0 ➡ W1 → W0 ➡ W2 → T0 ➡ T1 → T0 ➡ T2 →
+   ⇧[O, 1] V1 ≡ VV1 → ⇧[O, 1] V2 ≡ VV2 →
+   ∃∃X. ⓓ{a}W1. ⓐVV1. T1 ➡ X & ⓓ{a}W2. ⓐVV2. T2 ➡ X.
+#a #VV1 #V0 #V1 #W0 #W1 #T0 #T1 #V2 #VV2 #W2 #T2 #IH #HV01 #HV02 #HW01 #HW02 #HT01 #HT02 #HVV1 #HVV2
+elim (IH … HV01 … HV02) -HV01 -HV02 /2 width=1/ #V #HV1 #HV2
+elim (IH … HW01 … HW02) -HW01 -HW02 /2 width=1/ #W #HW1 #HW2
+elim (IH … HT01 … HT02) -HT01 -HT02 -IH /2 width=1/ #T #HT1 #HT2
+elim (lift_total V 0 1) #VV #HVV
+lapply (tpr_lift … HV1 … HVV1 … HVV) -V1 #HVV1
+lapply (tpr_lift … HV2 … HVV2 … HVV) -V2 -HVV #HVV2
+@ex2_1_intro [2,3: @tpr_bind |1:skip ] /2 width=5/ (**) (* /4 width=5/ is too slow *)
+qed.
+
+fact tpr_conf_zeta_zeta:
+   ∀V0:term. ∀X2,TT0,T0,T1,TT2. (
+      ∀X0:term. #{X0} < #{V0} + #{TT0} + 1 →
+      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
+      ∃∃X. X1 ➡ X & X2 ➡ X
+   ) →
+   TT0 ➡ T0 → ⇧[O, 1] T1 ≡ T0 →
+   TT0 ➡ TT2 → ⇧[O, 1] X2 ≡ TT2 →
+   ∃∃X. T1 ➡ X & X2 ➡ X.
+#V0 #X2 #TT0 #T0 #T1 #TT2 #IH #HTT0 #HT10 #HTT02 #HXTT2
+elim (IH … HTT0 … HTT02) -IH -HTT0 -HTT02 // -V0 -TT0 #T #HT0 #HTT2
+elim (tpr_inv_lift1 … HT0 … HT10) -T0 #T0 #HT0 #HT10
+elim (tpr_inv_lift1 … HTT2 … HXTT2) -TT2 #TT2 #HTT2 #HXTT2
+lapply (lift_inj … HTT2 … HT0) -HTT2 #H destruct /2 width=3/
+qed.
+
+fact tpr_conf_tau_tau:
+   ∀V0,T0:term. ∀X2,T1. (
+      ∀X0:term. #{X0} < #{V0} + #{T0} + 1 →
+      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
+      ∃∃X. X1 ➡ X & X2 ➡ X
+   ) →
+   T0 ➡ T1 → T0 ➡ X2 →
+   ∃∃X. T1 ➡ X & X2 ➡ X.
+#V0 #T0 #X2 #T1 #IH #HT01 #HT02
+elim (IH … HT01 … HT02) -HT01 -HT02 -IH // /2 width=3/
+qed.
+
+(* Confluence ***************************************************************)
+
+fact tpr_conf_aux:
+   ∀Y0:term. (
+      ∀X0:term. #{X0} < #{Y0} →
+      ∀X1,X2. X0 ➡ X1 → X0 ➡ X2 →
+      ∃∃X. X1 ➡ X & X2 ➡ X
+         ) →
+   ∀X0,X1,X2. X0 ➡ X1 → X0 ➡ X2 → X0 = Y0 →
+   ∃∃X. X1 ➡ X & X2 ➡ X.
+#Y0 #IH #X0 #X1 #X2 * -X0 -X1
+[ #I1 #H1 #H2 destruct
+  lapply (tpr_inv_atom1 … H1) -H1
+(* case 1: atom, atom *)
+  #H1 destruct //
+| #I #V0 #V1 #T0 #T1 #HV01 #HT01 #H1 #H2 destruct
+  elim (tpr_inv_flat1 … H1) -H1 *
+(* case 2: flat, flat *)
+  [ #V2 #T2 #HV02 #HT02 #H destruct
+    /3 width=7 by tpr_conf_flat_flat/ (**) (* /3 width=7/ is too slow *)
+(* case 3: flat, beta *)
+  | #b #V2 #W #U0 #T2 #HV02 #HT02 #H1 #H2 #H3 destruct
+    /3 width=8 by tpr_conf_flat_beta/ (**) (* /3 width=8/ is too slow *)
+(* case 4: flat, theta *)
+  | #b #V2 #V #W0 #W2 #U0 #U2 #HV02 #HW02 #HT02 #HV2 #H1 #H2 #H3 destruct
+    /3 width=11 by tpr_conf_flat_theta/ (**) (* /3 width=11/ is too slow *)
+(* case 5: flat, tau *)
+  | #HT02 #H destruct
+    /3 width=6 by tpr_conf_flat_cast/ (**) (* /3 width=6/ is too slow *)
+  ]
+| #a #V0 #V1 #W0 #T0 #T1 #HV01 #HT01 #H1 #H2 destruct
+  elim (tpr_inv_appl1 … H1) -H1 *
+(* case 6: beta, flat (repeated) *)
+  [ #V2 #T2 #HV02 #HT02 #H destruct
+    @ex2_1_comm /3 width=8 by tpr_conf_flat_beta/
+(* case 7: beta, beta *)
+  | #b #V2 #WW0 #TT0 #T2 #HV02 #HT02 #H1 #H2 destruct
+    /3 width=8 by tpr_conf_beta_beta/ (**) (* /3 width=8/ is too slow *)
+(* case 8, beta, theta (excluded) *)
+  | #b #V2 #VV2 #WW0 #W2 #TT0 #T2 #_ #_ #_ #_ #H destruct
+  ]
+| #a #I1 #V0 #V1 #T0 #T1 #TT1 #HV01 #HT01 #HTT1 #H1 #H2 destruct
+  elim (tpr_inv_bind1 … H1) -H1 *
+(* case 9: delta, delta *)
+  [ #V2 #T2 #TT2 #HV02 #HT02 #HTT2 #H destruct
+    /3 width=11 by tpr_conf_delta_delta/ (**) (* /3 width=11/ is too slow *)
+(* case 10: delta, zeta *)
+  | #T2 #HT20 #HTX2 #H1 #H2 destruct
+    /3 width=10 by tpr_conf_delta_zeta/ (**) (* /3 width=10/ is too slow *)
+  ]
+| #a #VV1 #V0 #V1 #W0 #W1 #T0 #T1 #HV01 #HVV1 #HW01 #HT01 #H1 #H2 destruct
+  elim (tpr_inv_appl1 … H1) -H1 *
+(* case 11: theta, flat (repeated) *)
+  [ #V2 #T2 #HV02 #HT02 #H destruct
+    @ex2_1_comm /3 width=11 by tpr_conf_flat_theta/
+(* case 12: theta, beta (repeated) *)
+  | #b #V2 #WW0 #TT0 #T2 #_ #_ #H destruct
+(* case 13: theta, theta *)
+  | #b #V2 #VV2 #WW0 #W2 #TT0 #T2 #V02 #HW02 #HT02 #HVV2 #H1 #H2 destruct
+    /3 width=14 by tpr_conf_theta_theta/ (**) (* /3 width=14/ is too slow *)
+  ]
+| #V0 #TT0 #T0 #T1 #HTT0 #HT01 #H1 #H2 destruct
+  elim (tpr_inv_abbr1 … H1) -H1 *
+(* case 14: zeta, delta (repeated) *)
+  [ #V2 #TT2 #T2 #HV02 #HTT02 #HTT2 #H destruct
+    @ex2_1_comm /3 width=10 by tpr_conf_delta_zeta/
+(* case 15: zeta, zeta *)
+  | #TT2 #HTT02 #HXTT2
+    /3 width=9 by tpr_conf_zeta_zeta/ (**) (* /3 width=9/ is too slow *)
+  ]
+| #V0 #T0 #T1 #HT01 #H1 #H2 destruct
+  elim (tpr_inv_cast1 … H1) -H1
+(* case 16: tau, flat (repeated) *)
+  [ * #V2 #T2 #HV02 #HT02 #H destruct
+    @ex2_1_comm /3 width=6 by tpr_conf_flat_cast/
+(* case 17: tau, tau *)
+  | #HT02
+    /3 width=5 by tpr_conf_tau_tau/
+  ]
+]
+qed.
+
+(* Basic_1: was: pr0_confluence *)
+theorem tpr_conf: ∀T0:term. ∀T1,T2. T0 ➡ T1 → T0 ➡ T2 →
+                  ∃∃T. T1 ➡ T & T2 ➡ T.
+#T @(tw_ind … T) -T /3 width=6 by tpr_conf_aux/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/tpr_tps.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/tpr_tps.ma
new file mode 100644 (file)
index 0000000..12cf13c
--- /dev/null
@@ -0,0 +1,57 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/reducibility/ltpr_ldrop.ma".
+
+(* CONTEXT-FREE PARALLEL REDUCTION ON TERMS *********************************)
+
+(* Properties on parallel substitution for terms ****************************)
+
+(* Basic_1: was: pr0_subst1_fwd *)
+lemma ltpr_tpr_conf: ∀L1,T,U1,d,e. L1 ⊢ T ▶ [d, e] U1 → ∀L2. L1 ➡ L2 →
+                     ∃∃U2. U1 ➡ U2 & L2 ⊢ T ▶ [d, e] U2.
+#L1 #T #U1 #d #e #H elim H -L1 -T -U1 -d -e
+[ /2 width=3/
+| #L1 #K1 #V1 #W1 #i #d #e #Hdi #Hide #HLK1 #HVW1 #L2 #HL12
+  elim (ltpr_ldrop_conf … HLK1 … HL12) -L1 #X #H #HLK2
+  elim (ltpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct -K1
+  elim (lift_total V2 0 (i+1)) #W2 #HVW2
+  lapply (tpr_lift … HV12 … HVW1 … HVW2) -V1 /3 width=6/
+| #L1 #a #I #V #W1 #T #U1 #d #e #_ #_ #IHV #IHT #L2 #HL12
+  elim (IHV … HL12) -IHV #W2 #HW12
+  elim (IHT (L2.ⓑ{I}W2) ?) -IHT /2 width=1/ -L1 /3 width=5/
+| #L1 #I #V #W1 #T #U1 #d #e #_ #_ #IHV #IHT #L2 #HL12
+  elim (IHV … HL12) -IHV
+  elim (IHT … HL12) -IHT -HL12 /3 width=5/
+]
+qed.
+
+(* Basic_1: was: pr0_subst1_back *)
+lemma ltpr_tps_trans: ∀L2,T,U2,d,e. L2 ⊢ T ▶ [d, e] U2 → ∀L1. L1 ➡ L2 →
+                      ∃∃U1. U1 ➡ U2 & L1 ⊢ T ▶ [d, e] U1.
+#L2 #T #U2 #d #e #H elim H -L2 -T -U2 -d -e
+[ /2 width=3/
+| #L2 #K2 #V2 #W2 #i #d #e #Hdi #Hide #HLK2 #HVW2 #L1 #HL12
+  elim (ltpr_ldrop_trans_O1 … HL12 … HLK2) -L2 #X #HLK1 #H
+  elim (ltpr_inv_pair2 … H) -H #K1 #V1 #HK12 #HV12 #H destruct -K2
+  elim (lift_total V1 0 (i+1)) #W1 #HVW1
+  lapply (tpr_lift … HV12 … HVW1 … HVW2) -V2 /3 width=6/
+| #L2 #a #I #V #W2 #T #U2 #d #e #_ #_ #IHV #IHT #L1 #HL12
+  elim (IHV … HL12) -IHV #W1 #HW12
+  elim (IHT (L1.ⓑ{I}W1) ?) -IHT /2 width=1/ -L2 /3 width=5/
+| #L2 #I #V #W2 #T #U2 #d #e #_ #_ #IHV #IHT #L1 #HL12
+  elim (IHV … HL12) -IHV
+  elim (IHT … HL12) -IHT -HL12 /3 width=5/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/tpr_tpss.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/tpr_tpss.ma
new file mode 100644 (file)
index 0000000..e1ead4e
--- /dev/null
@@ -0,0 +1,91 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/ltpss_dx_ltpss_dx.ma".
+include "basic_2/reducibility/tpr_tps.ma".
+
+(* CONTEXT-FREE PARALLEL REDUCTION ON TERMS *********************************)
+
+(* Unfold properties ********************************************************)
+
+(* Basic_1: was: pr0_subst1 *)
+lemma tpr_tps_ltpr: ∀T1,T2. T1 ➡ T2 →
+                    ∀L1,d,e,U1. L1 ⊢ T1 ▶ [d, e] U1 →
+                    ∀L2. L1 ➡ L2 →
+                    ∃∃U2. U1 ➡ U2 & L2 ⊢ T2 ▶* [d, e] U2.
+#T1 #T2 #H elim H -T1 -T2
+[ #I #L1 #d #e #U1 #H #L2 #HL12
+  elim (ltpr_tpr_conf … H … HL12) -L1 /3 width=3/
+| #I #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L1 #d #e #X #H #L2 #HL12
+  elim (tps_inv_flat1 … H) -H #W1 #U1 #HVW1 #HTU1 #H destruct
+  elim (IHV12 … HVW1 … HL12) -V1
+  elim (IHT12 … HTU1 … HL12) -T1 -HL12 /3 width=5/
+| #a #V1 #V2 #W #T1 #T2 #_ #_ #IHV12 #IHT12 #L1 #d #e #X #H #L2 #HL12
+  elim (tps_inv_flat1 … H) -H #VV1 #Y #HVV1 #HY #HX destruct
+  elim (tps_inv_bind1 … HY) -HY #WW #TT1 #_ #HTT1 #H destruct
+  elim (IHV12 … HVV1 … HL12) -V1 #VV2 #HVV12 #HVV2
+  elim (IHT12 … HTT1 (L2. ⓛWW) ?) -T1 /2 width=1/ -HL12 #TT2 #HTT12 #HTT2
+  lapply (tpss_lsubs_trans … HTT2 (L2. ⓓVV2) ?) -HTT2 /3 width=5/
+| #a #I #V1 #V2 #T1 #T #T2 #HV12 #_ #HT2 #IHV12 #IHT1 #L1 #d #e #X #H #L2 #HL12
+  elim (tps_inv_bind1 … H) -H #W1 #U1 #HVW1 #HTU1 #H destruct
+  elim (IHV12 … HVW1 … HL12) -V1 #W2 #HW12 #HVW2
+  elim (IHT1 … HTU1 (L2. ⓑ{I} W2) ?) -T1 /2 width=1/ -HL12 #U #HU1 #HTU
+  elim (tpss_strip_neq … HTU … HT2 ?) -T /2 width=1/ #U2 #HU2 #HTU2
+  lapply (tps_lsubs_trans … HU2 (L2. ⓑ{I} V2) ?) -HU2 /2 width=1/ #HU2
+  elim (ltpss_dx_tps_conf … HU2 (L2. ⓑ{I} W2) (d + 1) e ?) -HU2 /2 width=1/ #U3 #HU3 #HU23
+  lapply (tps_lsubs_trans … HU3 (⋆. ⓑ{I} W2) ?) -HU3 /2 width=1/ #HU3
+  lapply (tpss_lsubs_trans … HU23 (L2. ⓑ{I} W2) ?) -HU23 /2 width=1/ #HU23
+  lapply (tpss_trans_eq … HTU2 … HU23) -U2 /3 width=5/
+| #a #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #HV2 #_ #_ #IHV12 #IHW12 #IHT12 #L1 #d #e #X #H #L2 #HL12
+  elim (tps_inv_flat1 … H) -H #VV1 #Y #HVV1 #HY #HX destruct
+  elim (tps_inv_bind1 … HY) -HY #WW1 #TT1 #HWW1 #HTT1 #H destruct
+  elim (IHV12 … HVV1 … HL12) -V1 #VV2 #HVV12 #HVV2
+  elim (IHW12 … HWW1 … HL12) -W1 #WW2 #HWW12 #HWW2
+  elim (IHT12 … HTT1 (L2. ⓓWW2) ?) -T1 /2 width=1/ -HL12 #TT2 #HTT12 #HTT2
+  elim (lift_total VV2 0 1) #VV #H2VV
+  lapply (tpss_lift_ge … HVV2 (L2. ⓓWW2) … HV2 … H2VV) -V2 /2 width=1/ #HVV
+  @ex2_1_intro [2: @tpr_theta |1: skip |3: @tpss_bind [2: @tpss_flat ] ] /width=11/ (**) (* /4 width=11/ is too slow *)
+| #V #T1 #T #T2 #_ #HT2 #IHT1 #L1 #d #e #X #H #L2 #HL12
+  elim (tps_inv_bind1 … H) -H #W #U1 #_ #HTU1 #H destruct -V
+  elim (IHT1 … HTU1 (L2.ⓓW) ?) -T1 /2 width=1/ -HL12 #U #HU1 #HTU
+  elim (tpss_inv_lift1_ge … HTU L2 … HT2 ?) -T <minus_plus_m_m /3 width=3/
+| #V1 #T1 #T2 #_ #IHT12 #L1 #d #e #X #H #L2 #HL12
+  elim (tps_inv_flat1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct
+  elim (IHT12 … HTT1 … HL12) -T1 -HL12 /3 width=3/
+]
+qed.
+
+lemma tpr_tps_bind: ∀I,V1,V2,T1,T2,U1. V1 ➡ V2 → T1 ➡ T2 →
+                    ⋆. ⓑ{I} V1 ⊢ T1 ▶ [0, 1] U1 →
+                    ∃∃U2. U1 ➡ U2 & ⋆. ⓑ{I} V2 ⊢ T2 ▶ [0, 1] U2.
+#I #V1 #V2 #T1 #T2 #U1 #HV12 #HT12 #HTU1
+elim (tpr_tps_ltpr … HT12 … HTU1 (⋆. ⓑ{I} V2) ?) -T1 /2 width=1/ -V1 #U2 #HU12 #HTU2
+lapply (tpss_inv_SO2 … HTU2) -HTU2 /2 width=3/
+qed.
+
+lemma tpr_tpss_ltpr: ∀L1,L2. L1 ➡ L2 → ∀T1,T2. T1 ➡ T2 →
+                     ∀d,e,U1. L1 ⊢ T1 ▶* [d, e] U1 →
+                     ∃∃U2. U1 ➡ U2 & L2 ⊢ T2 ▶* [d, e] U2.
+#L1 #L2 #HL12 #T1 #T2 #HT12 #d #e #U1 #HTU1 @(tpss_ind … HTU1) -U1
+[ /2 width=3/
+| -HT12 #U #U1 #_ #HU1 * #T #HUT #HT2
+  elim (tpr_tps_ltpr … HUT … HU1 … HL12) -U -HL12 #U2 #HU12 #HTU2
+  lapply (tpss_trans_eq … HT2 … HTU2) -T /2 width=3/
+]
+qed.
+
+lemma tpr_tpss_conf: ∀T1,T2. T1 ➡ T2 →
+                     ∀L,U1,d,e. L ⊢ T1 ▶* [d, e] U1 →
+                     ∃∃U2. U1 ➡ U2 & L ⊢ T2 ▶* [d, e] U2.
+/2 width=5/ qed. 
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/xpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/xpr.ma
new file mode 100644 (file)
index 0000000..7375349
--- /dev/null
@@ -0,0 +1,32 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/ssta.ma".
+include "basic_2/reducibility/cpr.ma".
+
+(* EXTENDED PARALLEL REDUCTION ON TERMS *************************************)
+
+inductive xpr (h) (g) (L) (T1) (T2): Prop ≝
+| xpr_cpr : L ⊢ T1 ➡ T2 → xpr h g L T1 T2
+| xpr_ssta: ∀l. ⦃h, L⦄ ⊢ T1 •[g, l + 1] T2 → xpr h g L T1 T2
+.
+
+interpretation
+   "extended parallel reduction (term)"
+   'XPRed h g L T1 T2 = (xpr h g L T1 T2).
+
+(* Basic properties *********************************************************)
+
+lemma xpr_refl: ∀h,g,L. reflexive … (xpr h g L).
+/2 width=1/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/xpr_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/xpr_aaa.ma
new file mode 100644 (file)
index 0000000..98fe013
--- /dev/null
@@ -0,0 +1,25 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/ssta_aaa.ma".
+include "basic_2/reducibility/cpr_aaa.ma".
+include "basic_2/reducibility/xpr.ma".
+
+(* EXTENDED PARALLEL REDUCTION ON TERMS *************************************)
+
+(* Properties on atomic arity assignment for terms **************************)
+
+lemma xpr_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 * /2 width=3/ /2 width=6/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/xpr_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/xpr_lift.ma
new file mode 100644 (file)
index 0000000..8f5deca
--- /dev/null
@@ -0,0 +1,48 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/ssta_lift.ma".
+include "basic_2/reducibility/cpr_lift.ma".
+include "basic_2/reducibility/xpr.ma".
+
+(* EXTENDED PARALLEL REDUCTION ON TERMS *************************************)
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma xpr_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 *
+[ #H elim (cpr_inv_abst1 … H Abst V1) /3 width=5/
+| #l #H elim (ssta_inv_bind1 … H) /3 width=5/
+]
+qed-.
+
+(* Relocation properties ****************************************************)
+
+lemma xpr_lift: ∀L,K,d,e. ⇩[d, e] L ≡ K →
+                ∀T1,U1. ⇧[d, e] T1 ≡ U1 → ∀T2,U2. ⇧[d, e] T2 ≡ U2 →
+                ∀h,g. ⦃h, K⦄ ⊢ T1 •➡[g] T2 → ⦃h, L⦄ ⊢ U1 •➡[g] U2.
+#L #K #d #e #HLK #T1 #U1 #HTU1 #T2 #U2 #HTU2 #h #g *
+/3 width=9/ /3 width=10/
+qed.
+
+lemma xpr_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 * [ #HU12 | #l #HU12 ]
+[ elim (cpr_inv_lift1 … HLK … HTU1 … HU12) -L -U1 /3 width=3/
+| elim (ssta_inv_lift1 … HU12 … HLK … HTU1) -L -U1 /3 width=4/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/xpr_lsubss.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/xpr_lsubss.ma
new file mode 100644 (file)
index 0000000..bc66cd2
--- /dev/null
@@ -0,0 +1,28 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/lsubss_ssta.ma".
+include "basic_2/reducibility/xpr.ma".
+
+(* EXTENDED PARALLEL REDUCTION ON TERMS *************************************)
+
+(* Properties on lenv ref for stratified type assignment ********************)
+
+lemma lsubss_xpr_trans: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 →
+                        ∀T1,T2. ⦃h, L2⦄ ⊢ T1 •➡[g] T2 → ⦃h, L1⦄ ⊢ T1 •➡[g] T2.
+#h #g #L1 #L2 #HL12 #T1 #T2 * [ | #l ] #HT12
+[ lapply (lsubss_fwd_lsubs2 … HL12) -HL12 /3 width=3/
+| /3 width=4/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/static/aaa.ma
new file mode 100644 (file)
index 0000000..7b48134
--- /dev/null
@@ -0,0 +1,128 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/aarity.ma".
+include "basic_2/substitution/ldrop.ma".
+
+(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
+
+inductive aaa: lenv → term → predicate aarity ≝
+| aaa_sort: ∀L,k. aaa L (⋆k) ⓪
+| aaa_lref: ∀I,L,K,V,B,i. ⇩[0, i] L ≡ K. ⓑ{I} V → aaa K V B → aaa L (#i) B
+| aaa_abbr: ∀a,L,V,T,B,A.
+            aaa L V B → aaa (L. ⓓV) T A → aaa L (ⓓ{a}V. T) A
+| aaa_abst: ∀a,L,V,T,B,A.
+            aaa L V B → aaa (L. ⓛV) T A → aaa L (ⓛ{a}V. T) (②B. A)
+| aaa_appl: ∀L,V,T,B,A. aaa L V B → aaa L T (②B. A) → aaa L (ⓐV. T) A
+| aaa_cast: ∀L,V,T,A. aaa L V A → aaa L T A → aaa L (ⓝV. T) A
+.
+
+interpretation "atomic arity assignment (term)"
+   'AtomicArity L T A = (aaa L T A).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact aaa_inv_sort_aux: ∀L,T,A. L ⊢ T ⁝ A → ∀k. T = ⋆k → A = ⓪.
+#L #T #A * -L -T -A
+[ //
+| #I #L #K #V #B #i #_ #_ #k #H destruct
+| #a #L #V #T #B #A #_ #_ #k #H destruct
+| #a #L #V #T #B #A #_ #_ #k #H destruct
+| #L #V #T #B #A #_ #_ #k #H destruct
+| #L #V #T #A #_ #_ #k #H destruct
+]
+qed.
+
+lemma aaa_inv_sort: ∀L,A,k. L ⊢ ⋆k ⁝ A → A = ⓪.
+/2 width=5/ qed-.
+
+fact aaa_inv_lref_aux: ∀L,T,A. L ⊢ T ⁝ A → ∀i. T = #i →
+                       ∃∃I,K,V. ⇩[0, i] L ≡ K. ⓑ{I} V & K ⊢ V ⁝ A.
+#L #T #A * -L -T -A
+[ #L #k #i #H destruct
+| #I #L #K #V #B #j #HLK #HB #i #H destruct /2 width=5/
+| #a #L #V #T #B #A #_ #_ #i #H destruct
+| #a #L #V #T #B #A #_ #_ #i #H destruct
+| #L #V #T #B #A #_ #_ #i #H destruct
+| #L #V #T #A #_ #_ #i #H destruct
+]
+qed.
+
+lemma aaa_inv_lref: ∀L,A,i. L ⊢ #i ⁝ A →
+                    ∃∃I,K,V. ⇩[0, i] L ≡ K. ⓑ{I} V & K ⊢ V ⁝ A.
+/2 width=3/ qed-.
+
+fact aaa_inv_abbr_aux: ∀L,T,A. L ⊢ T ⁝ A → ∀a,W,U. T = ⓓ{a}W. U →
+                       ∃∃B. L ⊢ W ⁝ B & L. ⓓW ⊢ U ⁝ A.
+#L #T #A * -L -T -A
+[ #L #k #a #W #U #H destruct
+| #I #L #K #V #B #i #_ #_ #a #W #U #H destruct
+| #b #L #V #T #B #A #HV #HT #a #W #U #H destruct /2 width=2/
+| #b #L #V #T #B #A #_ #_ #a #W #U #H destruct
+| #L #V #T #B #A #_ #_ #a #W #U #H destruct
+| #L #V #T #A #_ #_ #a #W #U #H destruct
+]
+qed.
+
+lemma aaa_inv_abbr: ∀a,L,V,T,A. L ⊢ ⓓ{a}V. T ⁝ A →
+                    ∃∃B. L ⊢ V ⁝ B & L. ⓓV ⊢ T ⁝ A.
+/2 width=4/ qed-.
+
+fact aaa_inv_abst_aux: ∀L,T,A. L ⊢ T ⁝ A → ∀a,W,U. T = ⓛ{a}W. U →
+                       ∃∃B1,B2. L ⊢ W ⁝ B1 & L. ⓛW ⊢ U ⁝ B2 & A = ②B1. B2.
+#L #T #A * -L -T -A
+[ #L #k #a #W #U #H destruct
+| #I #L #K #V #B #i #_ #_ #a #W #U #H destruct
+| #b #L #V #T #B #A #_ #_ #a #W #U #H destruct
+| #b #L #V #T #B #A #HV #HT #a #W #U #H destruct /2 width=5/
+| #L #V #T #B #A #_ #_ #a #W #U #H destruct
+| #L #V #T #A #_ #_ #a #W #U #H destruct
+]
+qed.
+
+lemma aaa_inv_abst: ∀a,L,W,T,A. L ⊢ ⓛ{a}W. T ⁝ A →
+                    ∃∃B1,B2. L ⊢ W ⁝ B1 & L. ⓛW ⊢ T ⁝ B2 & A = ②B1. B2.
+/2 width=4/ qed-.
+
+fact aaa_inv_appl_aux: ∀L,T,A. L ⊢ T ⁝ A → ∀W,U. T = ⓐW. U →
+                       ∃∃B. L ⊢ W ⁝ B & L ⊢ U ⁝ ②B. A.
+#L #T #A * -L -T -A
+[ #L #k #W #U #H destruct
+| #I #L #K #V #B #i #_ #_ #W #U #H destruct
+| #a #L #V #T #B #A #_ #_ #W #U #H destruct
+| #a #L #V #T #B #A #_ #_ #W #U #H destruct
+| #L #V #T #B #A #HV #HT #W #U #H destruct /2 width=3/
+| #L #V #T #A #_ #_ #W #U #H destruct
+]
+qed.
+
+lemma aaa_inv_appl: ∀L,V,T,A. L ⊢ ⓐV. T ⁝ A →
+                    ∃∃B. L ⊢ V ⁝ B & L ⊢ T ⁝ ②B. A.
+/2 width=3/ qed-.
+
+fact aaa_inv_cast_aux: ∀L,T,A. L ⊢ T ⁝ A → ∀W,U. T = ⓝW. U →
+                       L ⊢ W ⁝ A ∧ L ⊢ U ⁝ A.
+#L #T #A * -L -T -A
+[ #L #k #W #U #H destruct
+| #I #L #K #V #B #i #_ #_ #W #U #H destruct
+| #a #L #V #T #B #A #_ #_ #W #U #H destruct
+| #a #L #V #T #B #A #_ #_ #W #U #H destruct
+| #L #V #T #B #A #_ #_ #W #U #H destruct
+| #L #V #T #A #HV #HT #W #U #H destruct /2 width=1/
+]
+qed.
+
+lemma aaa_inv_cast: ∀L,W,T,A. L ⊢ ⓝW. T ⁝ A →
+                    L ⊢ W ⁝ A ∧ L ⊢ T ⁝ A.
+/2 width=3/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/aaa_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/static/aaa_aaa.ma
new file mode 100644 (file)
index 0000000..9d9017c
--- /dev/null
@@ -0,0 +1,39 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/ldrop_ldrop.ma".
+include "basic_2/static/aaa.ma".
+
+(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
+
+(* Main properties **********************************************************)
+
+theorem aaa_mono: ∀L,T,A1. L ⊢ T ⁝ A1 → ∀A2. L ⊢ T ⁝ A2 → A1 = A2.
+#L #T #A1 #H elim H -L -T -A1
+[ #L #k #A2 #H
+  >(aaa_inv_sort … H) -H //
+| #I1 #L #K1 #V1 #B #i #HLK1 #_ #IHA1 #A2 #H
+  elim (aaa_inv_lref … H) -H #I2 #K2 #V2 #HLK2 #HA2
+  lapply (ldrop_mono … HLK1 … HLK2) -L #H destruct /2 width=1/
+| #a #L #V #T #B1 #A1 #_ #_ #_ #IHA1 #A2 #H
+  elim (aaa_inv_abbr … H) -H /2 width=1/
+| #a #L #V1 #T1 #B1 #A1 #_ #_ #IHB1 #IHA1 #X #H
+  elim (aaa_inv_abst … H) -H #B2 #A2 #HB2 #HA2 #H destruct /3 width=1/
+| #L #V1 #T1 #B1 #A1 #_ #_ #_ #IHA1 #A2 #H
+  elim (aaa_inv_appl … H) -H #B2 #_ #HA2
+  lapply (IHA1 … HA2) -L #H destruct //
+| #L #V #T #A1 #_ #_ #_ #IHA1 #A2 #H
+  elim (aaa_inv_cast … H) -H /2 width=1/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/aaa_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/static/aaa_lift.ma
new file mode 100644 (file)
index 0000000..b40f1a9
--- /dev/null
@@ -0,0 +1,72 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/ldrop_ldrop.ma".
+include "basic_2/static/aaa.ma".
+
+(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
+
+(* Properties concerning basic relocation ***********************************)
+
+lemma aaa_lift: ∀L1,T1,A. L1 ⊢ T1 ⁝ A → ∀L2,d,e. ⇩[d, e] L2 ≡ L1 →
+                ∀T2. ⇧[d, e] T1 ≡ T2 → L2 ⊢ T2 ⁝ A.
+#L1 #T1 #A #H elim H -L1 -T1 -A
+[ #L1 #k #L2 #d #e #_ #T2 #H
+  >(lift_inv_sort1 … H) -H //
+| #I #L1 #K1 #V1 #B #i #HLK1 #_ #IHB #L2 #d #e #HL21 #T2 #H
+  elim (lift_inv_lref1 … H) -H * #Hid #H destruct
+  [ elim (ldrop_trans_le … HL21 … HLK1 ?) -L1 /2 width=2/ #X #HLK2 #H
+    elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K2 #V2 #HK21 #HV12 #H destruct
+    /3 width=8/
+  | lapply (ldrop_trans_ge … HL21 … HLK1 ?) -L1 // -Hid /3 width=8/
+  ]
+| #a #L1 #V1 #T1 #B #A #_ #_ #IHB #IHA #L2 #d #e #HL21 #X #H
+  elim (lift_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+  /4 width=4/
+| #a #L1 #V1 #T1 #B #A #_ #_ #IHB #IHA #L2 #d #e #HL21 #X #H
+  elim (lift_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+  /4 width=4/
+| #L1 #V1 #T1 #B #A #_ #_ #IHB #IHA #L2 #d #e #HL21 #X #H
+  elim (lift_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+  /3 width=4/
+| #L1 #V1 #T1 #A #_ #_ #IH1 #IH2 #L2 #d #e #HL21 #X #H
+  elim (lift_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+  /3 width=4/
+]
+qed.
+
+lemma aaa_inv_lift: ∀L2,T2,A. L2 ⊢ T2 ⁝ A → ∀L1,d,e. ⇩[d, e] L2 ≡ L1 →
+                    ∀T1. ⇧[d, e] T1 ≡ T2 → L1 ⊢ T1 ⁝ A.
+#L2 #T2 #A #H elim H -L2 -T2 -A
+[ #L2 #k #L1 #d #e #_ #T1 #H
+  >(lift_inv_sort2 … H) -H //
+| #I #L2 #K2 #V2 #B #i #HLK2 #_ #IHB #L1 #d #e #HL21 #T1 #H
+  elim (lift_inv_lref2 … H) -H * #Hid #H destruct
+  [ elim (ldrop_conf_lt … HL21 … HLK2 ?) -L2 // -Hid /3 width=8/
+  | lapply (ldrop_conf_ge … HL21 … HLK2 ?) -L2 // -Hid /3 width=8/
+  ]
+| #a #L2 #V2 #T2 #B #A #_ #_ #IHB #IHA #L1 #d #e #HL21 #X #H
+  elim (lift_inv_bind2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
+  /4 width=4/
+| #a #L2 #V2 #T2 #B #A #_ #_ #IHB #IHA #L1 #d #e #HL21 #X #H
+  elim (lift_inv_bind2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
+  /4 width=4/
+| #L2 #V2 #T2 #B #A #_ #_ #IHB #IHA #L1 #d #e #HL21 #X #H
+  elim (lift_inv_flat2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
+  /3 width=4/
+| #L2 #V2 #T2 #A #_ #_ #IH1 #IH2 #L1 #d #e #HL21 #X #H
+  elim (lift_inv_flat2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
+  /3 width=4/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/aaa_lifts.ma b/matita/matita/contribs/lambdadelta/basic_2/static/aaa_lifts.ma
new file mode 100644 (file)
index 0000000..7514f6d
--- /dev/null
@@ -0,0 +1,30 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/ldrops.ma".
+include "basic_2/static/aaa_lift.ma".
+
+(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
+
+(* Properties concerning generic relocation *********************************)
+
+lemma aaa_lifts: ∀L1,L2,T2,A,des. ⇩*[des] L2 ≡ L1 → ∀T1. ⇧*[des] T1 ≡ T2 →
+                                  L1 ⊢ T1 ⁝ A →  L2 ⊢ T2 ⁝ A.
+#L1 #L2 #T2 #A #des #H elim H -L1 -L2 -des
+[ #L #T1 #H #HT1
+  <(lifts_inv_nil … H) -H //
+| #L1 #L #L2 #des #d #e #_ #HL2 #IHL1 #T1 #H #HT1
+  elim (lifts_inv_cons … H) -H /3 width=9/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/aaa_ltpss_dx.ma b/matita/matita/contribs/lambdadelta/basic_2/static/aaa_ltpss_dx.ma
new file mode 100644 (file)
index 0000000..2f2d073
--- /dev/null
@@ -0,0 +1,79 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/tpss_tpss.ma".
+include "basic_2/unfold/ltpss_dx_ldrop.ma".
+include "basic_2/static/aaa_lift.ma".
+
+(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
+
+(* 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.
+#L1 #T1 #A #H elim H -L1 -T1 -A
+[ #L1 #k #L2 #d #e #_ #T2 #H
+  >(tpss_inv_sort1 … H) -H //
+| #I #L1 #K1 #V1 #B #i #HLK1 #_ #IHV1 #L2 #d #e #HL12 #T2 #H
+  elim (tpss_inv_lref1 … H) -H
+  [ #H destruct
+    elim (lt_or_ge i d) #Hdi
+    [ elim (ltpss_dx_ldrop_conf_le … HL12 … HLK1 ?) -L1 /2 width=2/ #X #H #HLK2
+      elim (ltpss_dx_inv_tpss11 … H ?) -H /2 width=1/ -Hdi #K2 #V2 #HK12 #HV12 #H destruct
+      /3 width=8 by aaa_lref/ (**) (* too slow without trace *)
+    | elim (lt_or_ge i (d + e)) #Hide
+      [ elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HLK2
+        elim (ltpss_dx_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K2 #V2 #HK12 #HV12 #H destruct
+        /3 width=8 by aaa_lref/ (**) (* too slow without trace *)
+      | -Hdi
+        lapply (ltpss_dx_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide
+        /3 width=8 by aaa_lref/ (**) (* too slow without trace *)
+      ]
+    ]
+  | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #HVW2 #HWT2
+    elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HL2K0
+    elim (ltpss_dx_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K0 #V0 #HK12 #HV12 #H destruct
+    lapply (ldrop_mono … HL2K0 … HLK2) -HL2K0 #H destruct
+    lapply (ldrop_fwd_ldrop2 … HLK2) -HLK2 #HLK2
+    lapply (tpss_trans_eq … HV12 HVW2) -V2 /3 width=7/
+  ]
+| #a #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct /4 width=4/
+| #a #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct /4 width=4/
+| #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct /3 width=4/
+| #L1 #V1 #T1 #A #_ #_ #IHV1 #IHT1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct /3 width=4/
+]
+qed.
+
+lemma aaa_ltpss_dx_tps_conf: ∀L1,T1,A. L1 ⊢ T1 ⁝ A →
+                             ∀L2,d,e. L1 ▶* [d, e] L2 →
+                             ∀T2. L2 ⊢ T1 ▶ [d, e] T2 → L2 ⊢ T2 ⁝ A.
+/3 width=7/ qed.
+
+lemma aaa_ltpss_dx_conf: ∀L1,T,A. L1 ⊢ T ⁝ A →
+                         ∀L2,d,e. L1 ▶* [d, e] L2 → L2 ⊢ T ⁝ A.
+/2 width=7/ qed.
+
+lemma aaa_tpss_conf: ∀L,T1,A. L ⊢ T1 ⁝ A →
+                     ∀T2,d,e. L ⊢ T1 ▶* [d, e] T2 → L ⊢ T2 ⁝ A.
+/2 width=7/ qed.
+
+lemma aaa_tps_conf: ∀L,T1,A. L ⊢ T1 ⁝ A →
+                    ∀T2,d,e. L ⊢ T1 ▶ [d, e] T2 → L ⊢ T2 ⁝ A.
+/2 width=7/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/aaa_ltpss_sn.ma b/matita/matita/contribs/lambdadelta/basic_2/static/aaa_ltpss_sn.ma
new file mode 100644 (file)
index 0000000..4f2a448
--- /dev/null
@@ -0,0 +1,37 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/ltpss_sn_alt.ma".
+include "basic_2/static/aaa_ltpss_dx.ma".
+
+(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
+
+(* Properties about sn parallel unfold **************************************)
+
+lemma aaa_ltpss_sn_conf: ∀L1,T,A. L1 ⊢ T ⁝ A →
+                         ∀L2,d,e. L1 ⊢ ▶* [d, e] L2 → L2 ⊢ T ⁝ A.
+#L1 #T #A #HT #L2 #d #e #HL12
+lapply (ltpss_sn_ltpssa … HL12) -HL12 #HL12
+@(TC_Conf3 … (λL,A. L ⊢ T ⁝ A) … HT ? HL12) /2 width=5/
+qed.
+
+lemma aaa_ltpss_sn_tpss_conf: ∀L1,T1,A. L1 ⊢ T1 ⁝ A →
+                              ∀L2,d,e. L1 ⊢ ▶* [d, e] L2 →
+                              ∀T2. L2 ⊢ T1 ▶* [d, e] T2 → L2 ⊢ T2 ⁝ A.
+/3 width=5/ qed.
+
+lemma aaa_ltpss_sn_tps_conf: ∀L1,T1,A. L1 ⊢ T1 ⁝ A →
+                             ∀L2,d,e. L1 ⊢ ▶* [d, e] L2 →
+                             ∀T2. L2 ⊢ T1 ▶ [d, e] T2 → L2 ⊢ T2 ⁝ A.
+/3 width=5/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsuba.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsuba.ma
new file mode 100644 (file)
index 0000000..aa4800f
--- /dev/null
@@ -0,0 +1,92 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/aaa.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR ATOMIC ARITY ASSIGNMENT *****************)
+
+inductive lsuba: relation lenv ≝
+| lsuba_atom: lsuba (⋆) (⋆)
+| lsuba_pair: ∀I,L1,L2,V. lsuba L1 L2 → lsuba (L1. ⓑ{I} V) (L2. ⓑ{I} V)
+| lsuba_abbr: ∀L1,L2,V,W,A. L1 ⊢ V ⁝ A → L2 ⊢ W ⁝ A →
+              lsuba L1 L2 → lsuba (L1. ⓓV) (L2. ⓛW)
+.
+
+interpretation
+  "local environment refinement (atomic arity assigment)"
+  'CrSubEqA L1 L2 = (lsuba L1 L2).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact lsuba_inv_atom1_aux: ∀L1,L2. L1 ⁝⊑ L2 → L1 = ⋆ → L2 = ⋆.
+#L1 #L2 * -L1 -L2
+[ //
+| #I #L1 #L2 #V #_ #H destruct
+| #L1 #L2 #V #W #A #_ #_ #_ #H destruct
+]
+qed.
+
+lemma lsuba_inv_atom1: ∀L2. ⋆ ⁝⊑ L2 → L2 = ⋆.
+/2 width=3/ qed-.
+
+fact lsuba_inv_pair1_aux: ∀L1,L2. L1 ⁝⊑ L2 → ∀I,K1,V. L1 = K1. ⓑ{I} V →
+                          (∃∃K2. K1 ⁝⊑ K2 & L2 = K2. ⓑ{I} V) ∨
+                          ∃∃K2,W,A. K1 ⊢ V ⁝ A & K2 ⊢ W ⁝ A & K1 ⁝⊑ K2 &
+                                    L2 = K2. ⓛW & I = Abbr.
+#L1 #L2 * -L1 -L2
+[ #I #K1 #V #H destruct
+| #J #L1 #L2 #V #HL12 #I #K1 #W #H destruct /3 width=3/
+| #L1 #L2 #V1 #W2 #A #HV1 #HW2 #HL12 #I #K1 #V #H destruct /3 width=7/
+]
+qed.
+
+lemma lsuba_inv_pair1: ∀I,K1,L2,V. K1. ⓑ{I} V ⁝⊑ L2 →
+                       (∃∃K2. K1 ⁝⊑ K2 & L2 = K2. ⓑ{I} V) ∨
+                       ∃∃K2,W,A. K1 ⊢ V ⁝ A & K2 ⊢ W ⁝ A & K1 ⁝⊑ K2 &
+                                 L2 = K2. ⓛW & I = Abbr.
+/2 width=3/ qed-.
+
+fact lsuba_inv_atom2_aux: ∀L1,L2. L1 ⁝⊑ L2 → L2 = ⋆ → L1 = ⋆.
+#L1 #L2 * -L1 -L2
+[ //
+| #I #L1 #L2 #V #_ #H destruct
+| #L1 #L2 #V #W #A #_ #_ #_ #H destruct
+]
+qed.
+
+lemma lsubc_inv_atom2: ∀L1. L1 ⁝⊑ ⋆ → L1 = ⋆.
+/2 width=3/ qed-.
+
+fact lsuba_inv_pair2_aux: ∀L1,L2. L1 ⁝⊑ L2 → ∀I,K2,W. L2 = K2. ⓑ{I} W →
+                          (∃∃K1. K1 ⁝⊑ K2 & L1 = K1. ⓑ{I} W) ∨
+                          ∃∃K1,V,A. K1 ⊢ V ⁝ A & K2 ⊢ W ⁝ A & K1 ⁝⊑ K2 &
+                                    L1 = K1. ⓓV & I = Abst.
+#L1 #L2 * -L1 -L2
+[ #I #K2 #W #H destruct
+| #J #L1 #L2 #V #HL12 #I #K2 #W #H destruct /3 width=3/
+| #L1 #L2 #V1 #W2 #A #HV1 #HW2 #HL12 #I #K2 #W #H destruct /3 width=7/
+]
+qed.
+
+lemma lsuba_inv_pair2: ∀I,L1,K2,W. L1 ⁝⊑ K2. ⓑ{I} W →
+                       (∃∃K1. K1 ⁝⊑ K2 & L1 = K1. ⓑ{I} W) ∨
+                       ∃∃K1,V,A. K1 ⊢ V ⁝ A & K2 ⊢ W ⁝ A & K1 ⁝⊑ K2 &
+                                 L1 = K1. ⓓV & I = Abst.
+/2 width=3/ qed-.
+
+(* Basic properties *********************************************************)
+
+lemma lsuba_refl: ∀L. L ⁝⊑ L.
+#L elim L -L // /2 width=1/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsuba_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsuba_aaa.ma
new file mode 100644 (file)
index 0000000..66e802a
--- /dev/null
@@ -0,0 +1,54 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/aaa_aaa.ma".
+include "basic_2/static/lsuba_ldrop.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR ATOMIC ARITY ASSIGNMENT *****************)
+
+(* Properties concerning atomic arity assignment ****************************)
+
+lemma lsuba_aaa_conf: ∀L1,V,A. L1 ⊢ V ⁝ A → ∀L2. L1 ⁝⊑ L2 → L2 ⊢ V ⁝ A.
+#L1 #V #A #H elim H -L1 -V -A
+[ //
+| #I #L1 #K1 #V1 #B #i #HLK1 #HV1B #IHV1 #L2 #HL12
+  elim (lsuba_ldrop_O1_conf … HL12 … HLK1) -L1 #X #H #HLK2
+  elim (lsuba_inv_pair1 … H) -H * #K2
+  [ #HK12 #H destruct /3 width=5/
+  | #V2 #A1 #HV1A1 #HV2 #_ #H1 #H2 destruct
+    >(aaa_mono … HV1B … HV1A1) -B -HV1A1 /2 width=5/
+  ]
+| /4 width=2/
+| /4 width=1/
+| /3 width=3/
+| /3 width=1/
+]
+qed.
+
+lemma lsuba_aaa_trans: ∀L2,V,A. L2 ⊢ V ⁝ A → ∀L1. L1 ⁝⊑ L2 → L1 ⊢ V ⁝ A.
+#L2 #V #A #H elim H -L2 -V -A
+[ //
+| #I #L2 #K2 #V2 #B #i #HLK2 #HV2B #IHV2 #L1 #HL12
+  elim (lsuba_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
+  elim (lsuba_inv_pair2 … H) -H * #K1
+  [ #HK12 #H destruct /3 width=5/
+  | #V1 #A1 #HV1 #HV2A1 #_ #H1 #H2 destruct
+    >(aaa_mono … HV2B … HV2A1) -B -HV2A1 /2 width=5/
+  ]
+| /4 width=2/
+| /4 width=1/
+| /3 width=3/
+| /3 width=1/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsuba_ldrop.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsuba_ldrop.ma
new file mode 100644 (file)
index 0000000..247a8b2
--- /dev/null
@@ -0,0 +1,63 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/lsuba.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR ATOMIC ARITY ASSIGNMENT *****************)
+
+(* Properties concerning basic local environment slicing ********************)
+
+(* Note: the constant 0 cannot be generalized *)
+lemma lsuba_ldrop_O1_conf: ∀L1,L2. L1 ⁝⊑ L2 → ∀K1,e. ⇩[0, e] L1 ≡ K1 →
+                           ∃∃K2. K1 ⁝⊑ K2 & ⇩[0, e] L2 ≡ K2.
+#L1 #L2 #H elim H -L1 -L2
+[ /2 width=3/
+| #I #L1 #L2 #V #_ #IHL12 #K1 #e #H
+  elim (ldrop_inv_O1 … H) -H * #He #HLK1
+  [ destruct
+    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+  | elim (IHL12 … HLK1) -L1 /3 width=3/
+  ]
+| #L1 #L2 #V #W #A #HV #HW #_ #IHL12 #K1 #e #H
+  elim (ldrop_inv_O1 … H) -H * #He #HLK1
+  [ destruct
+    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+  | elim (IHL12 … HLK1) -L1 /3 width=3/
+  ]
+]
+qed-.
+
+(* Note: the constant 0 cannot be generalized *)
+lemma lsuba_ldrop_O1_trans: ∀L1,L2. L1 ⁝⊑ L2 → ∀K2,e. ⇩[0, e] L2 ≡ K2 →
+                            ∃∃K1. K1 ⁝⊑ K2 & ⇩[0, e] L1 ≡ K1.
+#L1 #L2 #H elim H -L1 -L2
+[ /2 width=3/
+| #I #L1 #L2 #V #_ #IHL12 #K2 #e #H
+  elim (ldrop_inv_O1 … H) -H * #He #HLK2
+  [ destruct
+    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+  | elim (IHL12 … HLK2) -L2 /3 width=3/
+  ]
+| #L1 #L2 #V #W #A #HV #HW #_ #IHL12 #K2 #e #H
+  elim (ldrop_inv_O1 … H) -H * #He #HLK2
+  [ destruct
+    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+  | elim (IHL12 … HLK2) -L2 /3 width=3/
+  ]
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsuba_lsuba.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsuba_lsuba.ma
new file mode 100644 (file)
index 0000000..5d64516
--- /dev/null
@@ -0,0 +1,35 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/lsuba_aaa.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR ATOMIC ARITY ASSIGNMENT *****************)
+
+(* Main properties **********************************************************)
+
+theorem lsuba_trans: ∀L1,L. L1 ⁝⊑ L → ∀L2. L ⁝⊑ L2 → L1 ⁝⊑ L2.
+#L1 #L #H elim H -L1 -L
+[ #X #H >(lsuba_inv_atom1 … H) -H //
+| #I #L1 #L #V #HL1 #IHL1 #X #H
+  elim (lsuba_inv_pair1 … H) -H * #L2
+  [ #HL2 #H destruct /3 width=1/
+  | #V #A #HLV #HL2V #HL2 #H1 #H2 destruct /3 width=3/
+  ]
+| #L1 #L #V1 #W #A1 #HV1 #HW #HL1 #IHL1 #X #H
+  elim (lsuba_inv_pair1 … H) -H * #L2
+  [ #HL2 #H destruct /3 width=5/
+  | #V #A2 #_ #_ #_ #_ #H destruct
+  ]
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsubss.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsubss.ma
new file mode 100644 (file)
index 0000000..356d7fe
--- /dev/null
@@ -0,0 +1,106 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED STATIC TYPE ASSIGNMENT *******)
+
+(* Note: may not be transitive *)
+inductive lsubss (h:sh) (g:sd h): relation lenv ≝
+| lsubss_atom: lsubss h g (⋆) (⋆)
+| lsubss_pair: ∀I,L1,L2,W. lsubss h g L1 L2 →
+               lsubss h g (L1. ⓑ{I} W) (L2. ⓑ{I} W)
+| lsubss_abbr: ∀L1,L2,V,W,l. ⦃h, L1⦄ ⊢ V •[g, l+1] W → ⦃h, L2⦄ ⊢ V •[g, l+1] W →
+               lsubss h g L1 L2 → lsubss h g (L1. ⓓV) (L2. ⓛW)
+.
+
+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 #V #W #l #_ #_ #_ #H destruct
+]
+qed.
+
+lemma lsubss_inv_atom1: ∀h,g,L2. h ⊢ ⋆ •⊑[g] L2 → L2 = ⋆.
+/2 width=5/ qed-.
+
+fact lsubss_inv_pair1_aux: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 →
+                           ∀I,K1,V. L1 = K1. ⓑ{I} V →
+                           (∃∃K2. h ⊢ K1 •⊑[g] K2 & L2 = K2. ⓑ{I} V) ∨
+                           ∃∃K2,W,l. ⦃h, K1⦄ ⊢ V •[g,l+1] W & ⦃h, K2⦄ ⊢ V •[g,l+1] W &
+                                     h ⊢ K1 •⊑[g] K2 & L2 = K2. ⓛW & I = Abbr.
+#h #g #L1 #L2 * -L1 -L2
+[ #I #K1 #V #H destruct
+| #J #L1 #L2 #V #HL12 #I #K1 #W #H destruct /3 width=3/
+| #L1 #L2 #V #W #l #H1VW #H2VW #HL12 #I #K1 #V1 #H destruct /3 width=7/
+]
+qed.
+
+lemma lsubss_inv_pair1: ∀h,g,I,K1,L2,V. h ⊢ K1. ⓑ{I} V •⊑[g] L2 →
+                        (∃∃K2. h ⊢ K1 •⊑[g] K2 & L2 = K2. ⓑ{I} V) ∨
+                        ∃∃K2,W,l. ⦃h, K1⦄ ⊢ V •[g,l+1] W & ⦃h, K2⦄ ⊢ V •[g,l+1] W &
+                                  h ⊢ K1 •⊑[g] K2 & L2 = K2. ⓛW & I = Abbr.
+/2 width=3/ 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 #V #W #l #_ #_ #_ #H destruct
+]
+qed.
+
+lemma lsubss_inv_atom2: ∀h,g,L1. h ⊢ L1 •⊑[g] ⋆ → L1 = ⋆.
+/2 width=5/ qed-.
+
+fact lsubss_inv_pair2_aux: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 →
+                           ∀I,K2,W. L2 = K2. ⓑ{I} W →
+                           (∃∃K1. h ⊢ K1 •⊑[g] K2 & L1 = K1. ⓑ{I} W) ∨
+                           ∃∃K1,V,l. ⦃h, K1⦄ ⊢ V •[g,l+1] W & ⦃h, K2⦄ ⊢ V •[g,l+1] W &
+                                     h ⊢ K1 •⊑[g] K2 & L1 = K1. ⓓV & I = Abst.
+#h #g #L1 #L2 * -L1 -L2
+[ #I #K2 #W #H destruct
+| #J #L1 #L2 #V #HL12 #I #K2 #W #H destruct /3 width=3/
+| #L1 #L2 #V #W #l #H1VW #H2VW #HL12 #I #K2 #W2 #H destruct /3 width=7/
+]
+qed.
+
+lemma lsubss_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,l. ⦃h, K1⦄ ⊢ V •[g,l+1] W & ⦃h, K2⦄ ⊢ V •[g,l+1] W &
+                                  h ⊢ K1 •⊑[g] K2 & L1 = K1. ⓓV & I = Abst.
+/2 width=3/ qed-.
+
+(* Basic_forward lemmas *****************************************************)
+
+lemma lsubss_fwd_lsubs1: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 → L1 ≼[0, |L1|] L2.
+#h #g #L1 #L2 #H elim H -L1 -L2 // /2 width=1/
+qed-.
+
+lemma lsubss_fwd_lsubs2: ∀h,g,L1,L2. h ⊢ L1 •⊑[g] L2 → L1 ≼[0, |L2|] 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.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsubss_ldrop.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsubss_ldrop.ma
new file mode 100644 (file)
index 0000000..82ede61
--- /dev/null
@@ -0,0 +1,65 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/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 … H) -H * #He #HLK1
+  [ destruct
+    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+  | elim (IHL12 … HLK1) -L1 /3 width=3/
+  ]
+| #L1 #L2 #V #W #l #H1VW #H2VW #_ #IHL12 #K1 #e #H
+  elim (ldrop_inv_O1 … H) -H * #He #HLK1
+  [ destruct
+    elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+  | 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 … H) -H * #He #HLK2
+  [ destruct
+    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+  | elim (IHL12 … HLK2) -L2 /3 width=3/
+  ]
+| #L1 #L2 #V #W #l #H1VW #H2VW #_ #IHL12 #K2 #e #H
+  elim (ldrop_inv_O1 … H) -H * #He #HLK2
+  [ destruct
+    elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
+    <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+  | elim (IHL12 … HLK2) -L2 /3 width=3/
+  ]
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsubss_lsubss.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsubss_lsubss.ma
new file mode 100644 (file)
index 0000000..d9f9496
--- /dev/null
@@ -0,0 +1,36 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/lsubss_ssta.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR STATIC TYPE ASSIGNMENT ******************)
+
+(* Main properties **********************************************************)
+
+theorem lsubss_trans: ∀h,g,L1,L. h ⊢ L1 •⊑[g] L → ∀L2. h ⊢ L •⊑[g] L2 →
+                      h ⊢ L1 •⊑[g] L2.
+#h #g #L1 #L #H elim H -L1 -L
+[ #X #H >(lsubss_inv_atom1 … H) -H //
+| #I #L1 #L #W #HL1 #IHL1 #X #H
+  elim (lsubss_inv_pair1 … H) -H * #L2
+  [ #HL2 #H destruct /3 width=1/
+  | #V #l #H1WV #H2WV #HL2 #H1 #H2 destruct /3 width=3/
+  ]
+| #L1 #L #V1 #W1 #l #H1VW1 #H2VW1 #HL1 #IHL1 #X #H
+  elim (lsubss_inv_pair1 … H) -H * #L2
+  [ #HL2 #H destruct /3 width=5/
+  | #V #l0 #_ #_ #_ #_ #H destruct
+  ]
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsubss_ssta.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsubss_ssta.ma
new file mode 100644 (file)
index 0000000..f9c6289
--- /dev/null
@@ -0,0 +1,69 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/ssta_lift.ma".
+include "basic_2/static/ssta_ssta.ma".
+include "basic_2/static/lsubss_ldrop.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED STATIC TYPE ASSIGNMENT *******)
+
+(* Properties concerning stratified native type assignment ******************)
+
+lemma lsubss_ssta_trans: ∀h,g,L2,T,U,l. ⦃h, L2⦄ ⊢ T •[g,l] U →
+                         ∀L1. h ⊢ L1 •⊑[g] L2 → ⦃h, L1⦄ ⊢ T •[g,l] U.
+#h #g #L2 #T #U #l #H elim H -L2 -T -U -l
+[ /2 width=1/
+| #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 /3 width=6/
+  | #V1 #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 /3 width=6/
+  | #V1 #l0 #H1 #H2 #_ #H #_ destruct
+    elim (ssta_fwd_correct … H2) -H2 #V #H
+    elim (ssta_mono … HWV2 … H) -HWV2 -H /2 width=6/
+  ]
+| /4 width=1/
+| /3 width=1/
+| /3 width=1/
+]
+qed.
+
+lemma lsubss_ssta_conf: ∀h,g,L1,T,U,l. ⦃h, L1⦄ ⊢ T •[g,l] U →
+                        ∀L2. h ⊢ L1 •⊑[g] L2 → ⦃h, L2⦄ ⊢ T •[g,l] U.
+#h #g #L1 #T #U #l #H elim H -L1 -T -U -l
+[ /2 width=1/
+| #L1 #K1 #V1 #W1 #U1 #i #l #HLK1 #HVW1 #HWU1 #IHVW1 #L2 #HL12
+  elim (lsubss_ldrop_O1_conf … HL12 … HLK1) -L1 #X #H #HLK2
+  elim (lsubss_inv_pair1 … H) -H * #K2 [ -HVW1 | -IHVW1 ]
+  [ #HK12 #H destruct /3 width=6/
+  | #V2 #l0 #H1 #H2 #_ #H #_ destruct
+    elim (ssta_mono … HVW1 … H1) -HVW1 -H1 #H1 #H2 destruct
+    elim (ssta_fwd_correct … H2) -H2 /2 width=6/
+  ]
+| #L1 #K1 #W1 #V1 #U1 #i #l #HLK1 #_ #HWU1 #IHWV1 #L2 #HL12
+  elim (lsubss_ldrop_O1_conf … HL12 … HLK1) -L1 #X #H #HLK2
+  elim (lsubss_inv_pair1 … H) -H * #K2 [ | -HWU1 -IHWV1 -HLK2 ]
+  [ #HK12 #H destruct /3 width=6/
+  | #V2 #l0 #_ #_ #_ #_ #H destruct
+  ]
+| /4 width=1/
+| /3 width=1/
+| /3 width=1/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/sd.ma b/matita/matita/contribs/lambdadelta/basic_2/static/sd.ma
new file mode 100644 (file)
index 0000000..63143b1
--- /dev/null
@@ -0,0 +1,109 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/sh.ma".
+
+(* SORT DEGREE **************************************************************)
+
+(* sort degree specification *)
+record sd (h:sh): Type[0] ≝ {
+   deg      : relation nat;                            (* degree of the sort *)
+   deg_total: ∀k. ∃l. deg k l;                         (* functional relation axioms *)
+   deg_mono : ∀k,l1,l2. deg k l1 → deg k l2 → l1 = l2;
+   deg_next : ∀k,l. deg k l → deg (next h k) (l - 1)   (* compatibility condition *)
+}.
+
+(* Notable specifications ***************************************************)
+
+definition deg_O: relation nat ≝ λk,l. l = 0.
+
+definition sd_O: ∀h. sd h ≝ λh. mk_sd h deg_O ….
+// /2 width=1/ /2 width=2/ qed.
+
+inductive deg_SO (h:sh) (k:nat) (k0:nat): predicate nat ≝
+| deg_SO_pos : ∀l0. (next h)^l0 k0 = k → deg_SO h k k0 (l0 + 1)
+| deg_SO_zero: ((∃l0. (next h)^l0 k0 = k) → ⊥) → deg_SO h k k0 0
+.
+
+fact deg_SO_inv_pos_aux: ∀h,k,k0,l0. deg_SO h k k0 l0 → ∀l. l0 = l + 1 →
+                         (next h)^l k0 = k.
+#h #k #k0 #l0 * -l0
+[ #l0 #Hl0 #l #H
+  lapply (injective_plus_l … H) -H #H destruct //
+| #_ #l0 <plus_n_Sm #H destruct
+]
+qed.
+
+lemma deg_SO_inv_pos: ∀h,k,k0,l0. deg_SO h k k0 (l0 + 1) → (next h)^l0 k0 = k.
+/2 width=3/ qed-.
+
+lemma deg_SO_refl: ∀h,k. deg_SO h k k 1.
+#h #k @(deg_SO_pos … 0 ?) //
+qed.
+
+lemma deg_SO_gt: ∀h,k1,k2. k1 < k2 → deg_SO h k1 k2 0.
+#h #k1 #k2 #HK12 @deg_SO_zero * #l elim l -l normalize
+[ #H destruct
+  elim (lt_refl_false … HK12)
+| #l #_ #H
+  lapply (next_lt h ((next h)^l k2)) >H -H #H
+  lapply (transitive_lt … H HK12) -k1 #H1
+  lapply (nexts_le h k2 l) #H2
+  lapply (le_to_lt_to_lt … H2 H1) -h -l #H
+  elim (lt_refl_false … H)
+qed.
+
+definition sd_SO: ∀h. nat → sd h ≝ λh,k. mk_sd h (deg_SO h k) ….
+[ #k0
+  lapply (nexts_dec h k0 k) * [ * /3 width=2/ | /4 width=2/ ]
+| #K0 #l1 #l2 * [ #l01 ] #H1 * [1,3: #l02 ] #H2 //
+  [ < H2 in H1; -H2 #H
+    lapply (nexts_inj … H) -H #H destruct //
+  | elim (H1 ?) /2 width=2/
+  | elim (H2 ?) /2 width=2/
+  ]
+| #k0 #l0 *
+  [ #l #H destruct elim l -l normalize /2 width=1/
+  | #H1 @deg_SO_zero * #l #H2 destruct
+    @H1 -H1 @(ex_intro … (S l)) /2 width=1/ (**) (* explicit constructor *)
+  ]
+]
+qed.
+
+let rec sd_l (h:sh) (k:nat) (l:nat) on l : sd h ≝
+   match l with 
+   [ O   ⇒ sd_O h
+   | S l ⇒ match l with
+           [ O ⇒ sd_SO h k
+           | _ ⇒ sd_l h (next h k) l
+           ]
+   ].
+
+(* Basic properties *********************************************************)
+
+lemma deg_pred: ∀h,g,k,l. deg h g (next h k) (l + 1) → deg h g k (l + 2).
+#h #g #k #l #H1
+elim (deg_total h g k) #l0 #H0
+lapply (deg_next … H0) #H2
+lapply (deg_mono … H1 H2) -H1 -H2 #H
+<(associative_plus l 1 1) >H <plus_minus_m_m // /2 width=3 by transitive_le/
+qed.
+
+lemma sd_l_SS: ∀h,k,l. sd_l h k (l + 2) = sd_l h (next h k) (l + 1).
+#h #k #l <plus_n_Sm <plus_n_Sm //
+qed.
+
+lemma sd_l_correct: ∀h,l,k. deg h (sd_l h k l) k l.
+#h #l @(nat_ind_plus … l) -l // #l @(nat_ind_plus … l) -l // /3 width=1/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/sh.ma b/matita/matita/contribs/lambdadelta/basic_2/static/sh.ma
new file mode 100644 (file)
index 0000000..72df771
--- /dev/null
@@ -0,0 +1,36 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "ground_2/arith.ma".
+
+(* SORT HIERARCHY ***********************************************************)
+
+(* sort hierarchy specification *)
+record sh: Type[0] ≝ {
+   next   : nat → nat;     (* next sort in the hierarchy *)
+   next_lt: ∀k. k < next k (* strict monotonicity condition *)
+}.
+
+(* Basic properties *********************************************************)
+
+lemma nexts_le: ∀h,k,l. k ≤ (next h)^l k.
+#h #k #l elim l -l // normalize #l #IHl
+lapply (next_lt h ((next h)^l k)) #H
+lapply (le_to_lt_to_lt … IHl H) -IHl -H /2 width=2/
+qed.
+
+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.
+
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/ssta.ma b/matita/matita/contribs/lambdadelta/basic_2/static/ssta.ma
new file mode 100644 (file)
index 0000000..3cd0134
--- /dev/null
@@ -0,0 +1,184 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/ldrop.ma".
+include "basic_2/unfold/frsups.ma".
+include "basic_2/static/sd.ma".
+
+(* STRATIFIED STATIC TYPE ASSIGNMENT ON TERMS *******************************)
+
+inductive ssta (h:sh) (g:sd h): nat → lenv → relation term ≝
+| ssta_sort: ∀L,k,l. deg h g k l → ssta h g l L (⋆k) (⋆(next h k))
+| ssta_ldef: ∀L,K,V,W,U,i,l. ⇩[0, i] L ≡ K. ⓓV → ssta h g l K V W →
+             ⇧[0, i + 1] W ≡ U → ssta h g l L (#i) U
+| ssta_ldec: ∀L,K,W,V,U,i,l. ⇩[0, i] L ≡ K. ⓛW → ssta h g l K W V →
+             ⇧[0, i + 1] W ≡ U → ssta h g (l+1) L (#i) U
+| ssta_bind: ∀a,I,L,V,T,U,l. ssta h g l (L. ⓑ{I} V) T U →
+             ssta h g l L (ⓑ{a,I}V.T) (ⓑ{a,I}V.U)
+| ssta_appl: ∀L,V,T,U,l. ssta h g l L T U →
+             ssta h g l L (ⓐV.T) (ⓐV.U)
+| ssta_cast: ∀L,W,T,U,l. ssta h g l L T U → ssta h g l L (ⓝW. T) U
+.
+
+interpretation "stratified static type assignment (term)"
+   'StaticType h g l L T U = (ssta h g l L T U).
+
+(* Basic inversion lemmas ************************************************)
+
+fact ssta_inv_sort1_aux: ∀h,g,L,T,U,l. ⦃h, L⦄ ⊢ T •[g, l] U → ∀k0. T = ⋆k0 →
+                         deg h g k0 l ∧ U = ⋆(next h k0).
+#h #g #L #T #U #l * -L -T -U -l
+[ #L #k #l #Hkl #k0 #H destruct /2 width=1/
+| #L #K #V #W #U #i #l #_ #_ #_ #k0 #H destruct
+| #L #K #W #V #U #i #l #_ #_ #_ #k0 #H destruct
+| #a #I #L #V #T #U #l #_ #k0 #H destruct
+| #L #V #T #U #l #_ #k0 #H destruct
+| #L #W #T #U #l #_ #k0 #H destruct
+qed.
+
+(* Basic_1: was just: sty0_gen_sort *)
+lemma ssta_inv_sort1: ∀h,g,L,U,k,l. ⦃h, L⦄ ⊢ ⋆k •[g, l] U →
+                      deg h g k l ∧ U = ⋆(next h k).
+/2 width=4/ qed-.
+
+fact ssta_inv_lref1_aux: ∀h,g,L,T,U,l. ⦃h, L⦄ ⊢ T •[g, l] U → ∀j. T = #j →
+                         (∃∃K,V,W. ⇩[0, j] L ≡ K. ⓓV & ⦃h, K⦄ ⊢ V •[g, l] W &
+                                   ⇧[0, j + 1] W ≡ U
+                         ) ∨
+                         (∃∃K,W,V,l0. ⇩[0, j] L ≡ K. ⓛW & ⦃h, K⦄ ⊢ W •[g, l0] V &
+                                      ⇧[0, j + 1] W ≡ U & l = l0 + 1
+                         ).
+#h #g #L #T #U #l * -L -T -U -l
+[ #L #k #l #_ #j #H destruct
+| #L #K #V #W #U #i #l #HLK #HVW #HWU #j #H destruct /3 width=6/
+| #L #K #W #V #U #i #l #HLK #HWV #HWU #j #H destruct /3 width=8/
+| #a #I #L #V #T #U #l #_ #j #H destruct
+| #L #V #T #U #l #_ #j #H destruct
+| #L #W #T #U #l #_ #j #H destruct
+]
+qed.
+
+(* Basic_1: was just: sty0_gen_lref *)
+lemma ssta_inv_lref1: ∀h,g,L,U,i,l. ⦃h, L⦄ ⊢ #i •[g, l] U →
+                      (∃∃K,V,W. ⇩[0, i] L ≡ K. ⓓV & ⦃h, K⦄ ⊢ V •[g, l] W &
+                                ⇧[0, i + 1] W ≡ U
+                      ) ∨
+                      (∃∃K,W,V,l0. ⇩[0, i] L ≡ K. ⓛW & ⦃h, K⦄ ⊢ W •[g, l0] V &
+                                   ⇧[0, i + 1] W ≡ U & l = l0 + 1
+                      ).
+/2 width=3/ qed-.
+
+fact ssta_inv_bind1_aux: ∀h,g,L,T,U,l. ⦃h, L⦄ ⊢ T •[g, l] U →
+                         ∀a,I,X,Y. T = ⓑ{a,I}Y.X →
+                         ∃∃Z. ⦃h, L.ⓑ{I}Y⦄ ⊢ X •[g, l] Z & U = ⓑ{a,I}Y.Z.
+#h #g #L #T #U #l * -L -T -U -l
+[ #L #k #l #_ #a #I #X #Y #H destruct
+| #L #K #V #W #U #i #l #_ #_ #_ #a #I #X #Y #H destruct
+| #L #K #W #V #U #i #l #_ #_ #_ #a #I #X #Y #H destruct
+| #b #J #L #V #T #U #l #HTU #a #I #X #Y #H destruct /2 width=3/
+| #L #V #T #U #l #_ #a #I #X #Y #H destruct
+| #L #W #T #U #l #_ #a #I #X #Y #H destruct
+]
+qed.
+
+(* Basic_1: was just: sty0_gen_bind *)
+lemma ssta_inv_bind1: ∀h,g,a,I,L,Y,X,U,l. ⦃h, L⦄ ⊢ ⓑ{a,I}Y.X •[g, l] U →
+                      ∃∃Z. ⦃h, L.ⓑ{I}Y⦄ ⊢ X •[g, l] Z & U = ⓑ{a,I}Y.Z.
+/2 width=3/ qed-.
+
+fact ssta_inv_appl1_aux: ∀h,g,L,T,U,l. ⦃h, L⦄ ⊢ T •[g, l] U → ∀X,Y. T = ⓐY.X →
+                         ∃∃Z. ⦃h, L⦄ ⊢ X •[g, l] Z & U = ⓐY.Z.
+#h #g #L #T #U #l * -L -T -U -l
+[ #L #k #l #_ #X #Y #H destruct
+| #L #K #V #W #U #i #l #_ #_ #_ #X #Y #H destruct
+| #L #K #W #V #U #i #l #_ #_ #_ #X #Y #H destruct
+| #a #I #L #V #T #U #l #_ #X #Y #H destruct
+| #L #V #T #U #l #HTU #X #Y #H destruct /2 width=3/
+| #L #W #T #U #l #_ #X #Y #H destruct
+]
+qed.
+
+(* Basic_1: was just: sty0_gen_appl *)
+lemma ssta_inv_appl1: ∀h,g,L,Y,X,U,l. ⦃h, L⦄ ⊢ ⓐY.X •[g, l] U →
+                      ∃∃Z. ⦃h, L⦄ ⊢ X •[g, l] Z & U = ⓐY.Z.
+/2 width=3/ qed-.
+
+fact ssta_inv_cast1_aux: ∀h,g,L,T,U,l. ⦃h, L⦄ ⊢ T •[g, l] U →
+                         ∀X,Y. T = ⓝY.X → ⦃h, L⦄ ⊢ X •[g, l] U.
+#h #g #L #T #U #l * -L -T -U -l
+[ #L #k #l #_ #X #Y #H destruct
+| #L #K #V #W #U #l #i #_ #_ #_ #X #Y #H destruct
+| #L #K #W #V #U #l #i #_ #_ #_ #X #Y #H destruct
+| #a #I #L #V #T #U #l #_ #X #Y #H destruct
+| #L #V #T #U #l #_ #X #Y #H destruct
+| #L #W #T #U #l #HTU #X #Y #H destruct //
+]
+qed.
+
+(* Basic_1: was just: sty0_gen_cast *)
+lemma ssta_inv_cast1: ∀h,g,L,X,Y,U,l. ⦃h, L⦄ ⊢ ⓝY.X •[g, l] U →
+                      ⦃h, L⦄ ⊢ X •[g, l] U.
+/2 width=4/ qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma ssta_inv_frsupp: ∀h,g,L,T,U,l. ⦃h, L⦄ ⊢ T •[g, l] U → ⦃L, U⦄ ⧁+ ⦃L, T⦄ → ⊥.
+#h #g #L #T #U #l #H elim H -L -T -U -l
+[ #L #k #l #_ #H
+  elim (frsupp_inv_atom1_frsups … H)
+| #L #K #V #W #U #i #l #_ #_ #HWU #_ #H
+  elim (lift_frsupp_trans … (⋆) … H … HWU) -U #X #H
+  elim (lift_inv_lref2_be … H ? ?) -H //
+| #L #K #W #V #U #i #l #_ #_ #HWU #_ #H
+  elim (lift_frsupp_trans … (⋆) … H … HWU) -U #X #H
+  elim (lift_inv_lref2_be … H ? ?) -H //
+| #a #I #L #V #T #U #l #_ #IHTU #H
+  elim (frsupp_inv_bind1_frsups … H) -H #H [2: /4 width=4/ ] -IHTU
+  lapply (frsups_fwd_fw … H) -H normalize
+  <associative_plus <associative_plus #H
+  elim (le_plus_xySz_x_false … H)
+| #L #V #T #U #l #_ #IHTU #H
+  elim (frsupp_inv_flat1_frsups … H) -H #H [2: /4 width=4/ ] -IHTU
+  lapply (frsups_fwd_fw … H) -H normalize
+  <associative_plus <associative_plus #H
+  elim (le_plus_xySz_x_false … H)
+| /3 width=4/
+]
+qed-.
+
+fact ssta_inv_refl_aux: ∀h,g,L,T,U,l. ⦃h, L⦄ ⊢ T •[g, l] U → T = U → ⊥.
+#h #g #L #T #U #l #H elim H -L -T -U -l
+[ #L #k #l #_ #H
+  lapply (next_lt h k) destruct -H -e0 (**) (* destruct: these premises are not erased *)
+  <e1 -e1 #H elim (lt_refl_false … H)
+| #L #K #V #W #U #i #l #_ #_ #HWU #_ #H destruct
+  elim (lift_inv_lref2_be … HWU ? ?) -HWU //
+| #L #K #W #V #U #i #l #_ #_ #HWU #_ #H destruct
+  elim (lift_inv_lref2_be … HWU ? ?) -HWU //
+| #a #I #L #V #T #U #l #_ #IHTU #H destruct /2 width=1/
+| #L #V #T #U #l #_ #IHTU #H destruct /2 width=1/
+| #L #W #T #U #l #HTU #_ #H destruct
+  elim (ssta_inv_frsupp … HTU ?) -HTU /2 width=1/
+]
+qed-.
+
+lemma ssta_inv_refl: ∀h,g,T,L,l. ⦃h, L⦄ ⊢ T •[g, l] T → ⊥.
+/2 width=8 by ssta_inv_refl_aux/ qed-.
+
+lemma ssta_inv_frsups: ∀h,g,L,T,U,l. ⦃h, L⦄ ⊢ T •[g, l] U → ⦃L, U⦄ ⧁* ⦃L, T⦄ → ⊥.
+#h #g #L #T #U #L #HTU #H elim (frsups_inv_all … H) -H
+[ * #_ #H destruct /2 width=6 by ssta_inv_refl/
+| /2 width=8 by ssta_inv_frsupp/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/ssta_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/static/ssta_aaa.ma
new file mode 100644 (file)
index 0000000..d14083a
--- /dev/null
@@ -0,0 +1,41 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/aaa_lift.ma".
+include "basic_2/static/ssta.ma".
+
+(* STRATIFIED STATIC TYPE ASSIGNMENT ON TERMS *******************************)
+
+(* Properties on atomic arity assignment for terms **************************)
+
+lemma ssta_aaa: ∀h,g,L,T,A. L ⊢ T ⁝ A → ∀U,l. ⦃h, L⦄ ⊢ T •[g, l] U → L ⊢ U ⁝ A.
+#h #g #L #T #A #H elim H -L -T -A
+[ #L #k #U #l #H
+  elim (ssta_inv_sort1 … H) -H #_ #H destruct //
+| #I #L #K #V #B #i #HLK #HV #IHV #U #l #H
+  elim (ssta_inv_lref1 … H) -H * #K0 #V0 #W0 [2: #l0 ] #HLK0 #HVW0 #HU [ #H ]
+  lapply (ldrop_mono … HLK0 … HLK) -HLK0 #H0 destruct
+  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
+  @(aaa_lift … HLK … HU) -HU -L // -HV /2 width=2/
+| #a #L #V #T #B #A #HV #_ #_ #IHT #X #l #H
+  elim (ssta_inv_bind1 … H) -H #U #HTU #H destruct /3 width=2/
+| #a #L #V #T #B #A #HV #_ #_ #IHT #X #l #H
+  elim (ssta_inv_bind1 … H) -H #U #HTU #H destruct /3 width=2/
+| #L #V #T #B #A #HV #_ #_ #IHT #X #l #H
+  elim (ssta_inv_appl1 … H) -H #U #HTU #H destruct /3 width=3/
+| #L #V #T #A #_ #_ #IHV #IHT #X #l #H
+  lapply (ssta_inv_cast1 … H) -H /2 width=2/
+]
+qed.
+
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/ssta_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/static/ssta_lift.ma
new file mode 100644 (file)
index 0000000..e4f78ac
--- /dev/null
@@ -0,0 +1,122 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/ldrop_ldrop.ma".
+include "basic_2/static/ssta.ma".
+
+(* STRATIFIED STATIC TYPE ASSIGNMENT ON TERMS *******************************)
+
+(* Properties on relocation *************************************************)
+
+(* Basic_1: was just: sty0_lift *)
+lemma ssta_lift: ∀h,g,L1,T1,U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
+                 ∀L2,d,e. ⇩[d, e] L2 ≡ L1 → ∀T2. ⇧[d, e] T1 ≡ T2 →
+                 ∀U2. ⇧[d, e] U1 ≡ U2 → ⦃h, L2⦄ ⊢ T2 •[g, l] U2.
+#h #g #L1 #T1 #U1 #l #H elim H -L1 -T1 -U1 -l
+[ #L1 #k #l #Hkl #L2 #d #e #HL21 #X1 #H1 #X2 #H2
+  >(lift_inv_sort1 … H1) -X1
+  >(lift_inv_sort1 … H2) -X2 /2 width=1/
+| #L1 #K1 #V1 #W1 #W #i #l #HLK1 #_ #HW1 #IHVW1 #L2 #d #e #HL21 #X #H #U2 #HWU2
+  elim (lift_inv_lref1 … H) * #Hid #H destruct
+  [ elim (lift_trans_ge … HW1 … HWU2 ?) -W // #W2 #HW12 #HWU2
+    elim (ldrop_trans_le … HL21 … HLK1 ?) -L1 /2 width=2/ #X #HLK2 #H
+    elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K2 #V2 #HK21 #HV12 #H destruct
+    /3 width=8/
+  | lapply (lift_trans_be … HW1 … HWU2 ? ?) -W // /2 width=1/ #HW1U2
+    lapply (ldrop_trans_ge … HL21 … HLK1 ?) -L1 // -Hid /3 width=8/
+  ]
+| #L1 #K1 #W1 #V1 #W #i #l #HLK1 #_ #HW1 #IHWV1 #L2 #d #e #HL21 #X #H #U2 #HWU2
+  elim (lift_inv_lref1 … H) * #Hid #H destruct
+  [ elim (lift_trans_ge … HW1 … HWU2 ?) -W // <minus_plus #W #HW1 #HWU2
+    elim (ldrop_trans_le … HL21 … HLK1 ?) -L1 /2 width=2/ #X #HLK2 #H
+    elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K2 #W2 #HK21 #HW12 #H destruct
+    lapply (lift_mono … HW1 … HW12) -HW1 #H destruct
+    elim (lift_total V1 (d-i-1) e) /3 width=8/
+  | lapply (lift_trans_be … HW1 … HWU2 ? ?) -W // /2 width=1/ #HW1U2
+    lapply (ldrop_trans_ge … HL21 … HLK1 ?) -L1 // -Hid /3 width=8/
+  ]
+| #a #I #L1 #V1 #T1 #U1 #l #_ #IHTU1 #L2 #d #e #HL21 #X1 #H1 #X2 #H2
+  elim (lift_inv_bind1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H destruct
+  elim (lift_inv_bind1 … H2) -H2 #X #U2 #H1 #HU12 #H2 destruct
+  lapply (lift_mono … H1 … HV12) -H1 #H destruct /4 width=5/
+| #L1 #V1 #T1 #U1 #l #_ #IHTU1 #L2 #d #e #HL21 #X1 #H1 #X2 #H2
+  elim (lift_inv_flat1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H destruct
+  elim (lift_inv_flat1 … H2) -H2 #X #U2 #H1 #HU12 #H2 destruct
+  lapply (lift_mono … H1 … HV12) -H1 #H destruct /4 width=5/
+| #L1 #W1 #T1 #U1 #l #_ #IHTU1 #L2 #d #e #HL21 #X #H #U2 #HU12
+  elim (lift_inv_flat1 … H) -H #W2 #T2 #HW12 #HT12 #H destruct /3 width=5/
+]
+qed.
+
+(* Note: apparently this was missing in basic_1 *)
+lemma ssta_inv_lift1: ∀h,g,L2,T2,U2,l. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 →
+                      ∀L1,d,e. ⇩[d, e] L2 ≡ L1 → ∀T1. ⇧[d, e] T1 ≡ T2 →
+                      ∃∃U1. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 & ⇧[d, e] U1 ≡ U2.
+#h #g #L2 #T2 #U2 #l #H elim H -L2 -T2 -U2 -l
+[ #L2 #k #l #Hkl #L1 #d #e #_ #X #H
+  >(lift_inv_sort2 … H) -X /3 width=3/
+| #L2 #K2 #V2 #W2 #W #i #l #HLK2 #HVW2 #HW2 #IHVW2 #L1 #d #e #HL21 #X #H
+  elim (lift_inv_lref2 … H) * #Hid #H destruct [ -HVW2 | -IHVW2 ]
+  [ elim (ldrop_conf_lt … HL21 … HLK2 ?) -L2 // #K1 #V1 #HLK1 #HK21 #HV12
+    elim (IHVW2 … HK21 … HV12) -K2 -V2 #W1 #HVW1 #HW12
+    elim (lift_trans_le … HW12 … HW2 ?) -W2 // >minus_plus <plus_minus_m_m // -Hid /3 width=6/
+  | lapply (ldrop_conf_ge … HL21 … HLK2 ?) -L2 // #HL1K2
+    elim (le_inv_plus_l … Hid) -Hid #Hdie #ei
+    elim (lift_split … HW2 d (i-e+1) ? ? ?) -HW2 // [3: /2 width=1/ ]
+    [ #W0 #HW20 <le_plus_minus_comm // >minus_minus_m_m /2 width=1/ /3 width=6/
+    | <le_plus_minus_comm //
+    ]
+  ]
+| #L2 #K2 #W2 #V2 #W #i #l #HLK2 #HWV2 #HW2 #IHWV2 #L1 #d #e #HL21 #X #H
+  elim (lift_inv_lref2 … H) * #Hid #H destruct [ -HWV2 | -IHWV2 ]
+  [ elim (ldrop_conf_lt … HL21 … HLK2 ?) -L2 // #K1 #W1 #HLK1 #HK21 #HW12
+    elim (IHWV2 … HK21 … HW12) -K2 #V1 #HWV1 #_
+    elim (lift_trans_le … HW12 … HW2 ?) -W2 // >minus_plus <plus_minus_m_m // -Hid /3 width=6/
+  | lapply (ldrop_conf_ge … HL21 … HLK2 ?) -L2 // #HL1K2
+    elim (le_inv_plus_l … Hid) -Hid #Hdie #ei
+    elim (lift_split … HW2 d (i-e+1) ? ? ?) -HW2 // [3: /2 width=1/ ]
+    [ #W0 #HW20 <le_plus_minus_comm // >minus_minus_m_m /2 width=1/ /3 width=6/
+    | <le_plus_minus_comm //
+    ]
+  ]
+| #a #I #L2 #V2 #T2 #U2 #l #_ #IHTU2 #L1 #d #e #HL21 #X #H
+  elim (lift_inv_bind2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
+  elim (IHTU2 (L1.ⓑ{I}V1) … HT12) -IHTU2 -HT12 /2 width=1/ -HL21 /3 width=5/
+| #L2 #V2 #T2 #U2 #l #_ #IHTU2 #L1 #d #e #HL21 #X #H
+  elim (lift_inv_flat2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
+  elim (IHTU2 … HL21 … HT12) -L2 -HT12 /3 width=5/
+| #L2 #W2 #T2 #U2 #l #_ #IHTU2 #L1 #d #e #HL21 #X #H
+  elim (lift_inv_flat2 … H) -H #W1 #T1 #HW12 #HT12 #H destruct
+  elim (IHTU2 … HL21 … HT12) -L2 -HT12 /3 width=3/
+]
+qed.
+
+(* Advanced forvard lemmas **************************************************)
+
+(* Basic_1: was just: sty0_correct *)
+lemma ssta_fwd_correct: ∀h,g,L,T,U,l. ⦃h, L⦄ ⊢ T •[g, l] U →
+                        ∃T0. ⦃h, L⦄ ⊢ U •[g, l - 1] T0.
+#h #g #L #T #U #l #H elim H -L -T -U -l
+[ /4 width=2/
+| #L #K #V #W #W0 #i #l #HLK #_ #HW0 * #V0 #HWV0
+  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
+  elim (lift_total V0 0 (i+1)) /3 width=10/
+| #L #K #W #V #V0 #i #l #HLK #HWV #HWV0 #_
+  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
+  elim (lift_total V 0 (i+1)) /3 width=10/
+| #a #I #L #V #T #U #l #_ * /3 width=2/
+| #L #V #T #U #l #_ * #T0 #HUT0 /3 width=2/
+| #L #W #T #U #l #_ * /2 width=2/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/ssta_ltpss_dx.ma b/matita/matita/contribs/lambdadelta/basic_2/static/ssta_ltpss_dx.ma
new file mode 100644 (file)
index 0000000..ccc9ecc
--- /dev/null
@@ -0,0 +1,125 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/tpss_tpss.ma".
+include "basic_2/unfold/ltpss_dx_tpss.ma".
+include "basic_2/static/ssta_lift.ma".
+
+(* STRATIFIED STATIC TYPE ASSIGNMENT ON TERMS *******************************)
+
+(* Properties about dx parallel unfold **************************************)
+
+(* Note: apparently this was missing in basic_1 *)
+lemma ssta_ltpss_dx_tpss_conf: ∀h,g,L1,T1,U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
+                               ∀L2,d,e. L1 ▶* [d, e] L2 →
+                               ∀T2. L2 ⊢ T1 ▶* [d, e] T2 →
+                               ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 &
+                                     L2 ⊢ U1 ▶* [d, e] U2.
+#h #g #L1 #T1 #U #l #H elim H -L1 -T1 -U -l
+[ #L1 #k1 #l1 #Hkl1 #L2 #d #e #_ #T2 #H
+  >(tpss_inv_sort1 … H) -H /3 width=3/
+| #L1 #K1 #V1 #W1 #U1 #i #l #HLK1 #HVW1 #HWU1 #IHVW1 #L2 #d #e #HL12 #T2 #H
+  elim (tpss_inv_lref1 … H) -H [ | -HVW1 ]
+  [ #H destruct
+    elim (lt_or_ge i d) #Hdi [ -HVW1 | ]
+    [ elim (ltpss_dx_ldrop_conf_le … HL12 … HLK1 ?) -L1 /2 width=2/ #X #H #HLK2
+      elim (ltpss_dx_inv_tpss11 … H ?) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
+      elim (IHVW1 … HK12 … HV12) -IHVW1 -HK12 -HV12 #W2 #HVW2 #HW12
+      lapply (ldrop_fwd_ldrop2 … HLK2) #H
+      elim (lift_total W2 0 (i+1)) #U2 #HWU2
+      lapply (tpss_lift_ge … HW12 … H … HWU1 … HWU2) // -HW12 -H -HWU1
+      >minus_plus <plus_minus_m_m // -Hdi /3 width=6/
+    | elim (lt_or_ge i (d + e)) #Hide [ -HVW1 | -Hdi -IHVW1 ]
+      [ elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HLK2
+        elim (ltpss_dx_inv_tpss21 … H ?) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
+        elim (IHVW1 … HK12 … HV12) -IHVW1 -HK12 -HV12 #W2 #HVW2 #HW12
+        lapply (ldrop_fwd_ldrop2 … HLK2) #H
+        elim (lift_total W2 0 (i+1)) #U2 #HWU2
+        lapply (tpss_lift_ge … HW12 … H … HWU1 … HWU2) // -HW12 -H -HWU1 >minus_plus #H
+        lapply (tpss_weak … H d e ? ?) [1,2: normalize [ >commutative_plus <plus_minus_m_m // | /2 width=1/ ]] -Hdi -Hide /3 width=6/
+      | lapply (ltpss_dx_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /3 width=6/
+      ]
+    ]
+  | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #HVW2 #HWT2
+    elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HL2K0
+    elim (ltpss_dx_inv_tpss21 … H ?) -H /2 width=1/ #K0 #V0 #HK12 #HV12 #H destruct
+    lapply (ldrop_mono … HL2K0 … HLK2) -HL2K0 #H destruct
+    lapply (ldrop_fwd_ldrop2 … HLK2) -HLK2 #HLK2
+    lapply (tpss_trans_eq … HV12 HVW2) -V2 #HV1W2
+    elim (IHVW1 … HK12 … HV1W2) -IHVW1 -HK12 -HV1W2 #V2 #HWV2 #HW1V2
+    elim (lift_total V2 0 (i+1)) #U2 #HVU2
+    lapply (ssta_lift … HWV2 … HLK2 … HWT2 … HVU2) -HWV2 -HWT2 #HTU2
+    lapply (tpss_lift_ge … HW1V2 … HLK2 … HWU1 … HVU2) // -HW1V2 -HLK2 -HWU1 -HVU2 >minus_plus #H
+    lapply (tpss_weak … H d e ? ?) [1,2: normalize [ >commutative_plus <plus_minus_m_m // | /2 width=1/ ]] -Hdi -Hide /2 width=3/
+  ]
+| #L1 #K1 #W1 #V1 #U1 #i #l #HLK1 #HWV1 #HWU1 #IHWV1 #L2 #d #e #HL12 #T2 #H
+  elim (tpss_inv_lref1 … H) -H [ | -HWV1 -HWU1 -IHWV1 ]
+  [ #H destruct
+    elim (lt_or_ge i d) #Hdi [ -HWV1 ]
+    [ elim (ltpss_dx_ldrop_conf_le … HL12 … HLK1 ?) -L1 /2 width=2/ #X #H #HLK2
+      elim (ltpss_dx_inv_tpss11 … H ?) -H /2 width=1/ #K2 #W2 #HK12 #HW12 #H destruct
+      elim (IHWV1 … HK12 … HW12) -IHWV1 -HK12 #V2 #HWV2 #_
+      lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
+      elim (lift_total W2 0 (i+1)) #U2 #HWU2
+      lapply (tpss_lift_ge … HW12 … HLK … HWU1 … HWU2) // -HW12 -HLK -HWU1
+      >minus_plus <plus_minus_m_m // -Hdi /3 width=6/
+    | elim (lt_or_ge i (d + e)) #Hide [ -HWV1 | -IHWV1 -Hdi ]
+      [ elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HLK2
+        elim (ltpss_dx_inv_tpss21 … H ?) -H /2 width=1/ #K2 #W2 #HK12 #HW12 #H destruct
+        elim (IHWV1 … HK12 … HW12) -IHWV1 -HK12 #V2 #HWV2 #_
+        lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
+        elim (lift_total W2 0 (i+1)) #U2 #HWU2
+        lapply (tpss_lift_ge … HW12 … HLK … HWU1 … HWU2) // -HW12 -HLK -HWU1 >minus_plus #H
+        lapply (tpss_weak … H d e ? ?) [1,2: normalize [ >commutative_plus <plus_minus_m_m // | /2 width=1/ ]] -Hdi -Hide /3 width=6/
+      | lapply (ltpss_dx_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /3 width=6/
+      ]
+    ]
+  | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #_ #_
+    elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HL2K0
+    elim (ltpss_dx_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K0 #V0 #_ #_ #H destruct
+    lapply (ldrop_mono … HL2K0 … HLK2) -HL2K0 -HLK2 #H destruct
+  ]
+| #a #I #L1 #V1 #T1 #U1 #l #_ #IHTU1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+  elim (IHTU1 … HT12) -IHTU1 -HT12 /2 width=1/ -HL12 /3 width=5/
+| #L1 #V1 #T1 #U1 #l #_ #IHTU1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+  elim (IHTU1 … HT12) -IHTU1 -HT12 // -HL12 /3 width=5/
+| #L1 #W1 #T1 #U1 #l #_ #IHTU1 #L2 #d #e #HL12 #X #H
+  elim (tpss_inv_flat1 … H) -H #W2 #T2 #HW12 #HT12 #H destruct
+  elim (IHTU1 … HT12) -IHTU1 -HT12 // -HL12 /3 width=3/
+]
+qed.
+
+lemma ssta_ltpss_dx_tps_conf: ∀h,g,L1,T1,U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
+                              ∀L2,d,e. L1 ▶* [d, e] L2 →
+                              ∀T2. L2 ⊢ T1 ▶ [d, e] T2 →
+                              ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 &
+                                   L2 ⊢ U1 ▶* [d, e] U2.
+/3 width=5/ qed.
+
+lemma ssta_ltpss_dx_conf: ∀h,g,L1,T,U1,l. ⦃h, L1⦄ ⊢ T •[g, l] U1 →
+                          ∀L2,d,e. L1 ▶* [d, e] L2 →
+                          ∃∃U2. ⦃h, L2⦄ ⊢ T •[g, l] U2 & L2 ⊢ U1 ▶* [d, e] U2.
+/2 width=5/ qed.
+
+lemma ssta_tpss_conf: ∀h,g,L,T1,U1,l. ⦃h, L⦄ ⊢ T1 •[g, l] U1 →
+                      ∀T2,d,e. L ⊢ T1 ▶* [d, e] T2 →
+                      ∃∃U2. ⦃h, L⦄ ⊢ T2 •[g, l] U2 & L ⊢ U1 ▶* [d, e] U2.
+/2 width=5/ qed.
+
+lemma ssta_tps_conf: ∀h,g,L,T1,U1,l. ⦃h, L⦄ ⊢ T1 •[g, l] U1 →
+                     ∀T2,d,e. L ⊢ T1 ▶ [d, e] T2 →
+                     ∃∃U2. ⦃h, L⦄ ⊢ T2 •[g, l] U2 & L ⊢ U1 ▶* [d, e] U2.
+/2 width=5/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/ssta_ltpss_sn.ma b/matita/matita/contribs/lambdadelta/basic_2/static/ssta_ltpss_sn.ma
new file mode 100644 (file)
index 0000000..342a839
--- /dev/null
@@ -0,0 +1,53 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/ltpss_sn_alt.ma".
+include "basic_2/static/ssta_ltpss_dx.ma".
+
+(* STRATIFIED STATIC TYPE ASSIGNMENT ON TERMS *******************************)
+
+(* Properties about sn parallel unfold **************************************)
+
+lemma ssta_ltpss_sn_conf: ∀h,g,L1,T,U1,l. ⦃h, L1⦄ ⊢ T •[g, l] U1 →
+                          ∀L2,d,e. L1 ⊢ ▶* [d, e] L2 →
+                          ∃∃U2. ⦃h, L2⦄ ⊢ T •[g, l] U2 & L1 ⊢ U1 ▶* [d, e] U2.
+#h #g #L1 #T #U1 #l #HTU1 #L2 #d #e #HL12
+lapply (ltpss_sn_ltpssa … HL12) -HL12 #HL12
+@(ltpssa_ind … HL12) -L2 [ /2 width=3/ ] -HTU1
+#L #L2 #HL1 #HL2 * #U #HTU #HU1
+lapply (ltpssa_ltpss_sn … HL1) -HL1 #HL1
+elim (ssta_ltpss_dx_conf … HTU … HL2) -HTU #U2 #HTU2 #HU2
+lapply (ltpss_dx_tpss_trans_eq … HU2 … HL2) -HU2 -HL2 #HU2
+lapply (ltpss_sn_tpss_trans_eq … HU2 … HL1) -HU2 -HL1 #HU2
+lapply (tpss_trans_eq … HU1 HU2) -U /2 width=3/
+qed.
+
+lemma ssta_ltpss_sn_tpss_conf: ∀h,g,L1,T1,U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
+                               ∀L2,d,e. L1 ⊢ ▶* [d, e] L2 →
+                               ∀T2. L2 ⊢ T1 ▶* [d, e] T2 →
+                               ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 &
+                                     L1 ⊢ U1 ▶* [d, e] U2.
+#h #g #L1 #T1 #U1 #l #HTU1 #L2 #d #e #HL12 #T2 #HT12
+elim (ssta_ltpss_sn_conf … HTU1 … HL12) -HTU1 #U #HT1U #HU1
+elim (ssta_tpss_conf … HT1U … HT12) -T1 #U2 #HTU2 #HU2
+lapply (ltpss_sn_tpss_trans_eq … HU2 … HL12) -HU2 -HL12 #HU2
+lapply (tpss_trans_eq … HU1 HU2) -U /2 width=3/
+qed.
+
+lemma ssta_ltpss_sn_tps_conf: ∀h,g,L1,T1,U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 →
+                              ∀L2,d,e. L1 ⊢ ▶* [d, e] L2 →
+                              ∀T2. L2 ⊢ T1 ▶ [d, e] T2 →
+                              ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 &
+                                    L1 ⊢ U1 ▶* [d, e] U2.
+/3 width=3/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/ssta_ssta.ma b/matita/matita/contribs/lambdadelta/basic_2/static/ssta_ssta.ma
new file mode 100644 (file)
index 0000000..b20e436
--- /dev/null
@@ -0,0 +1,49 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/ldrop_ldrop.ma".
+include "basic_2/static/ssta.ma".
+
+(* STRATIFIED STATIC TYPE ASSIGNMENT ON TERMS *******************************)
+
+(* Main properties **********************************************************)
+
+(* Note: apparently this was missing in basic_1 *)
+theorem ssta_mono: ∀h,g,L,T,U1,l1. ⦃h, L⦄ ⊢ T •[g, l1] U1 →
+                   ∀U2,l2. ⦃h, L⦄ ⊢ T •[g, l2] U2 → l1 = l2 ∧ U1 = U2.
+#h #g #L #T #U1 #l1 #H elim H -L -T -U1 -l1
+[ #L #k #l #Hkl #X #l2 #H
+  elim (ssta_inv_sort1 … H) -H #Hkl2 #H destruct
+  >(deg_mono … Hkl2 … Hkl) -g -L -l2 /2 width=1/
+| #L #K #V #W #U1 #i #l1 #HLK #_ #HWU1 #IHVW #U2 #l2 #H
+  elim (ssta_inv_lref1 … H) -H * #K0 #V0 #W0 [2: #l0] #HLK0 #HVW0 #HW0U2
+  lapply (ldrop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct
+  lapply (IHVW … HVW0) -IHVW -HVW0 * #H1 #H2 destruct
+  >(lift_mono … HWU1 … HW0U2) -W0 -U1 /2 width=1/
+| #L #K #W #V #U1 #i #l1 #HLK #_ #HWU1 #IHWV #U2 #l2 #H
+  elim (ssta_inv_lref1 … H) -H * #K0 #W0 #V0 [2: #l0 ] #HLK0 #HWV0 #HV0U2
+  lapply (ldrop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct
+  lapply (IHWV … HWV0) -IHWV -HWV0 * #H1 #H2 destruct
+  >(lift_mono … HWU1 … HV0U2) -W -U1 /2 width=1/
+| #a #I #L #V #T #U1 #l1 #_ #IHTU1 #X #l2 #H
+  elim (ssta_inv_bind1 … H) -H #U2 #HTU2 #H destruct
+  elim (IHTU1 … HTU2) -T /3 width=1/
+| #L #V #T #U1 #l1 #_ #IHTU1 #X #l2 #H
+  elim (ssta_inv_appl1 … H) -H #U2 #HTU2 #H destruct
+  elim (IHTU1 … HTU2) -T /3 width=1/
+| #L #W1 #T #U1 #l1 #_ #IHTU1 #U2 #l2 #H
+  lapply (ssta_inv_cast1 … H) -H #HTU2
+  elim (IHTU1 … HTU2) -T /2 width=1/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/frsup.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/frsup.ma
new file mode 100644 (file)
index 0000000..31d6c9f
--- /dev/null
@@ -0,0 +1,119 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/cl_weight.ma".
+include "basic_2/substitution/lift.ma".
+
+(* RESTRICTED SUPCLOSURE ****************************************************)
+
+inductive frsup: bi_relation lenv term ≝
+| frsup_bind_sn: ∀a,I,L,V,T. frsup L (ⓑ{a,I}V.T) L V
+| frsup_bind_dx: ∀a,I,L,V,T. frsup L (ⓑ{a,I}V.T) (L.ⓑ{I}V) T
+| frsup_flat_sn: ∀I,L,V,T.   frsup L (ⓕ{I}V.T) L V
+| frsup_flat_dx: ∀I,L,V,T.   frsup L (ⓕ{I}V.T) L T
+.
+
+interpretation
+   "restricted structural predecessor (closure)"
+   'RestSupTerm L1 T1 L2 T2 = (frsup L1 T1 L2 T2).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact frsup_inv_atom1_aux: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ →
+                          ∀J. T1 = ⓪{J} → ⊥.
+#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2
+[ #a #I #L #V #T #J #H destruct
+| #a #I #L #V #T #J #H destruct
+| #I #L #V #T #J #H destruct
+| #I #L #V #T #J #H destruct
+]
+qed-.
+
+lemma frsup_inv_atom1: ∀J,L1,L2,T2. ⦃L1, ⓪{J}⦄ ⧁ ⦃L2, T2⦄ → ⊥.
+/2 width=7 by frsup_inv_atom1_aux/ qed-.
+
+fact frsup_inv_bind1_aux: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ →
+                          ∀b,J,W,U. T1 = ⓑ{b,J}W.U →
+                          (L2 = L1 ∧ T2 = W) ∨
+                          (L2 = L1.ⓑ{J}W ∧ T2 = U).
+#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2
+[ #a #I #L #V #T #b #J #W #U #H destruct /3 width=1/
+| #a #I #L #V #T #b #J #W #U #H destruct /3 width=1/
+| #I #L #V #T #b #J #W #U #H destruct
+| #I #L #V #T #b #J #W #U #H destruct
+]
+qed-.
+
+lemma frsup_inv_bind1: ∀b,J,L1,L2,W,U,T2. ⦃L1, ⓑ{b,J}W.U⦄ ⧁ ⦃L2, T2⦄ →
+                       (L2 = L1 ∧ T2 = W) ∨
+                       (L2 = L1.ⓑ{J}W ∧ T2 = U).
+/2 width=4 by frsup_inv_bind1_aux/ qed-.
+
+fact frsup_inv_flat1_aux: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ →
+                          ∀J,W,U. T1 = ⓕ{J}W.U →
+                          L2 = L1 ∧ (T2 = W ∨ T2 = U).
+#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2
+[ #a #I #L #V #T #J #W #U #H destruct
+| #a #I #L #V #T #J #W #U #H destruct
+| #I #L #V #T #J #W #U #H destruct /3 width=1/
+| #I #L #V #T #J #W #U #H destruct /3 width=1/
+]
+qed-.
+
+lemma frsup_inv_flat1: ∀J,L1,L2,W,U,T2. ⦃L1, ⓕ{J}W.U⦄ ⧁ ⦃L2, T2⦄ →
+                       L2 = L1 ∧ (T2 = W ∨ T2 = U).
+/2 width=4 by frsup_inv_flat1_aux/ qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma frsup_fwd_fw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ → #{L2, T2} < #{L1, T1}.
+#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2 /width=1/
+qed-.
+
+lemma frsup_fwd_lw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ → #{L1} ≤ #{L2}.
+#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2 /width=1/
+qed-.
+
+lemma frsup_fwd_tw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ → #{T2} < #{T1}.
+#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2 /width=1/ /2 width=1 by le_minus_to_plus/
+qed-.
+
+lemma frsup_fwd_append: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ → ∃L. L2 = L1 @@ L.
+#L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2
+[ #a
+| #a #I #L #V #_ @(ex_intro … (⋆.ⓑ{I}V)) //
+]
+#I #L #V #T @(ex_intro … (⋆)) //
+qed-.
+
+(* Advanced forward lemmas **************************************************)
+
+lemma lift_frsup_trans: ∀T1,U1,d,e. ⇧[d, e] T1 ≡ U1 →
+                        ∀L,K,U2. ⦃L, U1⦄ ⧁ ⦃L @@ K, U2⦄ →
+                        ∃T2. ⇧[d + |K|, e] T2 ≡ U2.
+#T1 #U1 #d #e * -T1 -U1 -d -e
+[5: #a #I #V1 #W1 #T1 #U1 #d #e #HVW1 #HTU1 #L #K #X #H
+    elim (frsup_inv_bind1 … H) -H *
+    [ -HTU1 #H1 #H2 destruct
+      >(append_inv_refl_dx … H1) -L -K normalize /2 width=2/
+    | -HVW1 #H1 #H2 destruct
+      >(append_inv_pair_dx … H1) -L -K normalize /2 width=2/
+    ]
+|6: #I #V1 #W1 #T1 #U1 #d #e #HVW1 #HUT1 #L #K #X #H
+    elim (frsup_inv_flat1 … H) -H #H1 * #H2 destruct
+    >(append_inv_refl_dx … H1) -L -K normalize /2 width=2/
+]
+#i #d #e [2,3: #_ ] #L #K #X #H
+elim (frsup_inv_atom1 … H)
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/gdrop.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/gdrop.ma
new file mode 100644 (file)
index 0000000..218389e
--- /dev/null
@@ -0,0 +1,80 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/genv.ma".
+
+(* GLOBAL ENVIRONMENT SLICING ***********************************************)
+
+inductive gdrop (e:nat): relation genv ≝
+| gdrop_gt: ∀G. |G| ≤ e → gdrop e G (⋆)
+| gdrop_eq: ∀G. |G| = e + 1 → gdrop e G G
+| gdrop_lt: ∀I,G1,G2,V. e < |G1| → gdrop e G1 G2 → gdrop e (G1. ⓑ{I} V) G2
+.
+
+interpretation "global slicing" 
+   'RDrop e G1 G2 = (gdrop e G1 G2).
+
+(* basic inversion lemmas ***************************************************)
+
+lemma gdrop_inv_gt: ∀G1,G2,e. ⇩[e] G1 ≡ G2 → |G1| ≤ e → G2 = ⋆.
+#G1 #G2 #e * -G1 -G2 //
+[ #G #H >H -H >commutative_plus #H
+  lapply (le_plus_to_le_r … 0 H) -H #H
+  lapply (le_n_O_to_eq … H) -H #H destruct
+| #I #G1 #G2 #V #H1 #_ #H2
+  lapply (le_to_lt_to_lt … H2 H1) -H2 -H1 normalize in ⊢ (? % ? → ?); >commutative_plus #H
+  lapply (lt_plus_to_lt_l … 0 H) -H #H
+  elim (lt_zero_false … H)
+]
+qed-.
+
+lemma gdrop_inv_eq: ∀G1,G2,e. ⇩[e] G1 ≡ G2 → |G1| = e + 1 → G1 = G2.
+#G1 #G2 #e * -G1 -G2 //
+[ #G #H1 #H2 >H2 in H1; -H2 >commutative_plus #H
+  lapply (le_plus_to_le_r … 0 H) -H #H
+  lapply (le_n_O_to_eq … H) -H #H destruct
+| #I #G1 #G2 #V #H1 #_ normalize #H2
+  <(injective_plus_l … H2) in H1; -H2 #H
+  elim (lt_refl_false … H)
+]
+qed-.
+
+fact gdrop_inv_lt_aux: ∀I,G,G1,G2,V,e. ⇩[e] G ≡ G2 → G = G1. ⓑ{I} V →
+                       e < |G1| → ⇩[e] G1 ≡ G2.
+#I #G #G1 #G2 #V #e * -G -G2
+[ #G #H1 #H destruct #H2
+  lapply (le_to_lt_to_lt … H1 H2) -H1 -H2 normalize in ⊢ (? % ? → ?); >commutative_plus #H
+  lapply (lt_plus_to_lt_l … 0 H) -H #H
+  elim (lt_zero_false … H)
+| #G #H1 #H2 destruct >(injective_plus_l … H1) -H1 #H
+  elim (lt_refl_false … H)
+| #J #G #G2 #W #_ #HG2 #H destruct //
+]
+qed.
+
+lemma gdrop_inv_lt: ∀I,G1,G2,V,e.
+                    ⇩[e] G1. ⓑ{I} V ≡ G2 → e < |G1| → ⇩[e] G1 ≡ G2.
+/2 width=5/ qed-.
+
+(* Basic properties *********************************************************)
+
+lemma gdrop_total: ∀e,G1. ∃G2. ⇩[e] G1 ≡ G2.
+#e #G1 elim G1 -G1 /3 width=2/
+#I #V #G1 * #G2 #HG12
+elim (lt_or_eq_or_gt e (|G1|)) #He
+[ /3 width=2/
+| destruct /3 width=2/
+| @ex_intro [2: @gdrop_gt normalize /2 width=1/ | skip ] (**) (* explicit constructor *)
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/gdrop_gdrop.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/gdrop_gdrop.ma
new file mode 100644 (file)
index 0000000..0bc1a40
--- /dev/null
@@ -0,0 +1,40 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/gdrop.ma".
+
+(* GLOBAL ENVIRONMENT SLICING ***********************************************)
+
+(* Main properties **********************************************************)
+
+theorem gdrop_mono: ∀G,G1,e. ⇩[e] G ≡ G1 → ∀G2. ⇩[e] G ≡ G2 → G1 = G2.
+#G #G1 #e #H elim H -G -G1
+[ #G #He #G2 #H
+  >(gdrop_inv_gt … H He) -H -He //
+| #G #He #G2 #H
+  >(gdrop_inv_eq … H He) -H -He //
+| #I #G #G1 #V #He #_ #IHG1 #G2 #H
+  lapply (gdrop_inv_lt … H He) -H -He /2 width=1/
+]
+qed-.
+
+lemma gdrop_dec: ∀G1,G2,e. Decidable (⇩[e] G1 ≡ G2).
+#G1 #G2 #e
+elim (gdrop_total e G1) #G #HG1
+elim (genv_eq_dec G G2) #HG2
+[ destruct /2 width=1/
+| @or_intror #HG12
+  lapply (gdrop_mono … HG1 … HG12) -HG1 -HG12 /2 width=1/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/ldrop.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/ldrop.ma
new file mode 100644 (file)
index 0000000..9511648
--- /dev/null
@@ -0,0 +1,313 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/cl_weight.ma".
+include "basic_2/substitution/lift.ma".
+include "basic_2/substitution/lsubs.ma".
+
+(* LOCAL ENVIRONMENT SLICING ************************************************)
+
+(* Basic_1: includes: drop_skip_bind *)
+inductive ldrop: nat → nat → relation lenv ≝
+| ldrop_atom : ∀d,e. ldrop d e (⋆) (⋆)
+| ldrop_pair : ∀L,I,V. ldrop 0 0 (L. ⓑ{I} V) (L. ⓑ{I} V)
+| ldrop_ldrop: ∀L1,L2,I,V,e. ldrop 0 e L1 L2 → ldrop 0 (e + 1) (L1. ⓑ{I} V) L2
+| ldrop_skip : ∀L1,L2,I,V1,V2,d,e.
+               ldrop d e L1 L2 → ⇧[d,e] V2 ≡ V1 →
+               ldrop (d + 1) e (L1. ⓑ{I} V1) (L2. ⓑ{I} V2)
+.
+
+interpretation "local slicing" 'RDrop d e L1 L2 = (ldrop d e L1 L2).
+
+definition l_liftable: (lenv → relation term) → Prop ≝
+                       λR. ∀K,T1,T2. R K T1 T2 → ∀L,d,e. ⇩[d, e] L ≡ K →
+                       ∀U1. ⇧[d, e] T1 ≡ U1 → ∀U2. ⇧[d, e] T2 ≡ U2 → R L U1 U2.
+
+definition l_deliftable_sn: (lenv → relation term) → Prop ≝
+                            λR. ∀L,U1,U2. R L U1 U2 → ∀K,d,e. ⇩[d, e] L ≡ K →
+                            ∀T1. ⇧[d, e] T1 ≡ U1 →
+                            ∃∃T2. ⇧[d, e] T2 ≡ U2 & R K T1 T2.
+
+definition dropable_sn: relation lenv → Prop ≝
+                        λR. ∀L1,K1,d,e. ⇩[d, e] L1 ≡ K1 → ∀L2. R L1 L2 →
+                        ∃∃K2. R K1 K2 & ⇩[d, e] L2 ≡ K2.
+
+definition dedropable_sn: relation lenv → Prop ≝
+                          λR. ∀L1,K1,d,e. ⇩[d, e] L1 ≡ K1 → ∀K2. R K1 K2 →
+                          ∃∃L2. R L1 L2 & ⇩[d, e] L2 ≡ K2.
+
+definition dropable_dx: relation lenv → Prop ≝
+                        λR. ∀L1,L2. R L1 L2 → ∀K2,e. ⇩[0, e] L2 ≡ K2 →
+                        ∃∃K1. ⇩[0, e] L1 ≡ K1 & R K1 K2.
+
+(* Basic inversion lemmas ***************************************************)
+
+fact ldrop_inv_refl_aux: ∀d,e,L1,L2. ⇩[d, e] L1 ≡ L2 → d = 0 → e = 0 → L1 = L2.
+#d #e #L1 #L2 * -d -e -L1 -L2
+[ //
+| //
+| #L1 #L2 #I #V #e #_ #_ >commutative_plus normalize #H destruct
+| #L1 #L2 #I #V1 #V2 #d #e #_ #_ >commutative_plus normalize #H destruct
+]
+qed.
+
+(* Basic_1: was: drop_gen_refl *)
+lemma ldrop_inv_refl: ∀L1,L2. ⇩[0, 0] L1 ≡ L2 → L1 = L2.
+/2 width=5/ qed-.
+
+fact ldrop_inv_atom1_aux: ∀d,e,L1,L2. ⇩[d, e] L1 ≡ L2 → L1 = ⋆ →
+                          L2 = ⋆.
+#d #e #L1 #L2 * -d -e -L1 -L2
+[ //
+| #L #I #V #H destruct
+| #L1 #L2 #I #V #e #_ #H destruct
+| #L1 #L2 #I #V1 #V2 #d #e #_ #_ #H destruct
+]
+qed.
+
+(* Basic_1: was: drop_gen_sort *)
+lemma ldrop_inv_atom1: ∀d,e,L2. ⇩[d, e] ⋆ ≡ L2 → L2 = ⋆.
+/2 width=5/ qed-.
+
+fact ldrop_inv_O1_aux: ∀d,e,L1,L2. ⇩[d, e] L1 ≡ L2 → d = 0 →
+                       ∀K,I,V. L1 = K. ⓑ{I} V → 
+                       (e = 0 ∧ L2 = K. ⓑ{I} V) ∨
+                       (0 < e ∧ ⇩[d, e - 1] K ≡ L2).
+#d #e #L1 #L2 * -d -e -L1 -L2
+[ #d #e #_ #K #I #V #H destruct
+| #L #I #V #_ #K #J #W #HX destruct /3 width=1/
+| #L1 #L2 #I #V #e #HL12 #_ #K #J #W #H destruct /3 width=1/
+| #L1 #L2 #I #V1 #V2 #d #e #_ #_ >commutative_plus normalize #H destruct
+]
+qed.
+
+lemma ldrop_inv_O1: ∀e,K,I,V,L2. ⇩[0, e] K. ⓑ{I} V ≡ L2 →
+                    (e = 0 ∧ L2 = K. ⓑ{I} V) ∨
+                    (0 < e ∧ ⇩[0, e - 1] K ≡ L2).
+/2 width=3/ qed-.
+
+lemma ldrop_inv_pair1: ∀K,I,V,L2. ⇩[0, 0] K. ⓑ{I} V ≡ L2 → L2 = K. ⓑ{I} V.
+#K #I #V #L2 #H
+elim (ldrop_inv_O1 … H) -H * // #H destruct
+elim (lt_refl_false … H)
+qed-.
+
+(* Basic_1: was: drop_gen_drop *)
+lemma ldrop_inv_ldrop1: ∀e,K,I,V,L2.
+                        ⇩[0, e] K. ⓑ{I} V ≡ L2 → 0 < e → ⇩[0, e - 1] K ≡ L2.
+#e #K #I #V #L2 #H #He
+elim (ldrop_inv_O1 … H) -H * // #H destruct
+elim (lt_refl_false … He)
+qed-.
+
+fact ldrop_inv_skip1_aux: ∀d,e,L1,L2. ⇩[d, e] L1 ≡ L2 → 0 < d →
+                          ∀I,K1,V1. L1 = K1. ⓑ{I} V1 →
+                          ∃∃K2,V2. ⇩[d - 1, e] K1 ≡ K2 &
+                                   ⇧[d - 1, e] V2 ≡ V1 & 
+                                   L2 = K2. ⓑ{I} V2.
+#d #e #L1 #L2 * -d -e -L1 -L2
+[ #d #e #_ #I #K #V #H destruct
+| #L #I #V #H elim (lt_refl_false … H)
+| #L1 #L2 #I #V #e #_ #H elim (lt_refl_false … H)
+| #X #L2 #Y #Z #V2 #d #e #HL12 #HV12 #_ #I #L1 #V1 #H destruct /2 width=5/
+]
+qed.
+
+(* Basic_1: was: drop_gen_skip_l *)
+lemma ldrop_inv_skip1: ∀d,e,I,K1,V1,L2. ⇩[d, e] K1. ⓑ{I} V1 ≡ L2 → 0 < d →
+                       ∃∃K2,V2. ⇩[d - 1, e] K1 ≡ K2 &
+                                ⇧[d - 1, e] V2 ≡ V1 & 
+                                L2 = K2. ⓑ{I} V2.
+/2 width=3/ qed-.
+
+fact ldrop_inv_skip2_aux: ∀d,e,L1,L2. ⇩[d, e] L1 ≡ L2 → 0 < d →
+                          ∀I,K2,V2. L2 = K2. ⓑ{I} V2 →
+                          ∃∃K1,V1. ⇩[d - 1, e] K1 ≡ K2 &
+                                   ⇧[d - 1, e] V2 ≡ V1 & 
+                                   L1 = K1. ⓑ{I} V1.
+#d #e #L1 #L2 * -d -e -L1 -L2
+[ #d #e #_ #I #K #V #H destruct
+| #L #I #V #H elim (lt_refl_false … H)
+| #L1 #L2 #I #V #e #_ #H elim (lt_refl_false … H)
+| #L1 #X #Y #V1 #Z #d #e #HL12 #HV12 #_ #I #L2 #V2 #H destruct /2 width=5/
+]
+qed.
+
+(* Basic_1: was: drop_gen_skip_r *)
+lemma ldrop_inv_skip2: ∀d,e,I,L1,K2,V2. ⇩[d, e] L1 ≡ K2. ⓑ{I} V2 → 0 < d →
+                       ∃∃K1,V1. ⇩[d - 1, e] K1 ≡ K2 & ⇧[d - 1, e] V2 ≡ V1 &
+                                L1 = K1. ⓑ{I} V1.
+/2 width=3/ qed-.
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was by definition: drop_refl *)
+lemma ldrop_refl: ∀L. ⇩[0, 0] L ≡ L.
+#L elim L -L //
+qed.
+
+lemma ldrop_ldrop_lt: ∀L1,L2,I,V,e.
+                      ⇩[0, e - 1] L1 ≡ L2 → 0 < e → ⇩[0, e] L1. ⓑ{I} V ≡ L2.
+#L1 #L2 #I #V #e #HL12 #He >(plus_minus_m_m e 1) // /2 width=1/
+qed.
+
+lemma ldrop_skip_lt: ∀L1,L2,I,V1,V2,d,e.
+                     ⇩[d - 1, e] L1 ≡ L2 → ⇧[d - 1, e] V2 ≡ V1 → 0 < d →
+                     ⇩[d, e] L1. ⓑ{I} V1 ≡ L2. ⓑ{I} V2.
+#L1 #L2 #I #V1 #V2 #d #e #HL12 #HV21 #Hd >(plus_minus_m_m d 1) // /2 width=1/
+qed.
+
+lemma ldrop_O1_le: ∀i,L. i ≤ |L| → ∃K. ⇩[0, i] L ≡ K.
+#i @(nat_ind_plus … i) -i /2 width=2/
+#i #IHi *
+[ #H lapply (le_n_O_to_eq … H) -H >commutative_plus normalize #H destruct 
+| #L #I #V normalize #H
+  elim (IHi L ?) -IHi /2 width=1/ -H /3 width=2/
+]
+qed.
+
+lemma ldrop_O1_lt: ∀L,i. i < |L| → ∃∃I,K,V. ⇩[0, i] L ≡ K.ⓑ{I}V.
+#L elim L -L
+[ #i #H elim (lt_zero_false … H)
+| #L #I #V #IHL #i @(nat_ind_plus … i) -i /2 width=4/
+  #i #_ normalize #H
+  elim (IHL i ? ) -IHL /2 width=1/ -H /3 width=4/
+]
+qed.
+
+lemma ldrop_lsubs_ldrop2_abbr: ∀L1,L2,d,e. L1 ≼ [d, e] L2 →
+                               ∀K2,V,i. ⇩[0, i] L2 ≡ K2. ⓓV →
+                               d ≤ i → i < d + e →
+                               ∃∃K1. K1 ≼ [0, d + e - i - 1] K2 &
+                                     ⇩[0, i] L1 ≡ K1. ⓓV.
+#L1 #L2 #d #e #H elim H -L1 -L2 -d -e
+[ #d #e #K1 #V #i #H
+  lapply (ldrop_inv_atom1 … H) -H #H destruct
+| #L1 #L2 #K1 #V #i #_ #_ #H
+  elim (lt_zero_false … H)
+| #L1 #L2 #V #e #HL12 #IHL12 #K1 #W #i #H #_ #Hie
+  elim (ldrop_inv_O1 … H) -H * #Hi #HLK1
+  [ -IHL12 -Hie destruct
+    <minus_n_O <minus_plus_m_m // /2 width=3/
+  | -HL12
+    elim (IHL12 … HLK1 ? ?) -IHL12 -HLK1 // /2 width=1/ -Hie >minus_minus_comm >arith_b1 // /4 width=3/
+  ]
+| #L1 #L2 #I #V1 #V2 #e #_ #IHL12 #K1 #W #i #H #_ #Hie
+  elim (ldrop_inv_O1 … H) -H * #Hi #HLK1
+  [ -IHL12 -Hie -Hi destruct
+  | elim (IHL12 … HLK1 ? ?) -IHL12 -HLK1 // /2 width=1/ -Hie >minus_minus_comm >arith_b1 // /3 width=3/
+  ]
+| #L1 #L2 #I1 #I2 #V1 #V2 #d #e #_ #IHL12 #K1 #V #i #H #Hdi >plus_plus_comm_23 #Hide
+  elim (le_inv_plus_l … Hdi) #Hdim #Hi
+  lapply (ldrop_inv_ldrop1 … H ?) -H // #HLK1
+  elim (IHL12 … HLK1 ? ?) -IHL12 -HLK1 // /2 width=1/ -Hdi -Hide >minus_minus_comm >arith_b1 // /3 width=3/
+]
+qed.
+
+lemma dropable_sn_TC: ∀R. dropable_sn R → dropable_sn (TC … R).
+#R #HR #L1 #K1 #d #e #HLK1 #L2 #H elim H -L2
+[ #L2 #HL12
+  elim (HR … HLK1 … HL12) -HR -L1 /3 width=3/
+| #L #L2 #_ #HL2 * #K #HK1 #HLK
+  elim (HR … HLK … HL2) -HR -L /3 width=3/
+]
+qed.
+
+lemma dedropable_sn_TC: ∀R. dedropable_sn R → dedropable_sn (TC … R).
+#R #HR #L1 #K1 #d #e #HLK1 #K2 #H elim H -K2
+[ #K2 #HK12
+  elim (HR … HLK1 … HK12) -HR -K1 /3 width=3/
+| #K #K2 #_ #HK2 * #L #HL1 #HLK
+  elim (HR … HLK … HK2) -HR -K /3 width=3/
+]
+qed.
+
+lemma dropable_dx_TC: ∀R. dropable_dx R → dropable_dx (TC … R).
+#R #HR #L1 #L2 #H elim H -L2
+[ #L2 #HL12 #K2 #e #HLK2
+  elim (HR … HL12 … HLK2) -HR -L2 /3 width=3/
+| #L #L2 #_ #HL2 #IHL1 #K2 #e #HLK2
+  elim (HR … HL2 … HLK2) -HR -L2 #K #HLK #HK2
+  elim (IHL1 … HLK) -L /3 width=5/
+]
+qed.
+
+(* Basic forvard lemmas *****************************************************)
+
+(* Basic_1: was: drop_S *)
+lemma ldrop_fwd_ldrop2: ∀L1,I2,K2,V2,e. ⇩[O, e] L1 ≡ K2. ⓑ{I2} V2 →
+                        ⇩[O, e + 1] L1 ≡ K2.
+#L1 elim L1 -L1
+[ #I2 #K2 #V2 #e #H lapply (ldrop_inv_atom1 … H) -H #H destruct
+| #K1 #I1 #V1 #IHL1 #I2 #K2 #V2 #e #H
+  elim (ldrop_inv_O1 … H) -H * #He #H
+  [ -IHL1 destruct /2 width=1/
+  | @ldrop_ldrop >(plus_minus_m_m e 1) // /2 width=3/
+  ]
+]
+qed-.
+
+lemma ldrop_fwd_lw: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → #{L2} ≤ #{L1}.
+#L1 #L2 #d #e #H elim H -L1 -L2 -d -e // normalize
+[ /2 width=3/
+| #L1 #L2 #I #V1 #V2 #d #e #_ #HV21 #IHL12
+  >(tw_lift … HV21) -HV21 /2 width=1/
+]
+qed-. 
+
+lemma ldrop_pair2_fwd_fw: ∀I,L,K,V,d,e. ⇩[d, e] L ≡ K. ⓑ{I} V →
+                          ∀T. #{K, V} < #{L, T}.
+#I #L #K #V #d #e #H #T
+lapply (ldrop_fwd_lw … H) -H #H
+@(le_to_lt_to_lt … H) -H /3 width=1/
+qed-.
+
+lemma ldrop_fwd_ldrop2_length: ∀L1,I2,K2,V2,e.
+                               ⇩[0, e] L1 ≡ K2. ⓑ{I2} V2 → e < |L1|.
+#L1 elim L1 -L1
+[ #I2 #K2 #V2 #e #H lapply (ldrop_inv_atom1 … H) -H #H destruct
+| #K1 #I1 #V1 #IHL1 #I2 #K2 #V2 #e #H
+  elim (ldrop_inv_O1 … H) -H * #He #H
+  [ -IHL1 destruct //
+  | lapply (IHL1 … H) -IHL1 -H #HeK1 whd in ⊢ (? ? %); /2 width=1/
+  ]
+]
+qed-.
+
+lemma ldrop_fwd_O1_length: ∀L1,L2,e. ⇩[0, e] L1 ≡ L2 → |L2| = |L1| - e.
+#L1 elim L1 -L1
+[ #L2 #e #H >(ldrop_inv_atom1 … H) -H //
+| #K1 #I1 #V1 #IHL1 #L2 #e #H
+  elim (ldrop_inv_O1 … H) -H * #He #H
+  [ -IHL1 destruct //
+  | lapply (IHL1 … H) -IHL1 -H #H >H -H normalize
+    >minus_le_minus_minus_comm //
+  ]
+]
+qed-.
+
+(* Basic_1: removed theorems 50:
+            drop_ctail drop_skip_flat 
+            cimp_flat_sx cimp_flat_dx cimp_bind cimp_getl_conf
+            drop_clear drop_clear_O drop_clear_S
+            clear_gen_sort clear_gen_bind clear_gen_flat clear_gen_flat_r
+            clear_gen_all clear_clear clear_mono clear_trans clear_ctail clear_cle
+            getl_ctail_clen getl_gen_tail clear_getl_trans getl_clear_trans
+            getl_clear_bind getl_clear_conf getl_dec getl_drop getl_drop_conf_lt
+            getl_drop_conf_ge getl_conf_ge_drop getl_drop_conf_rev
+            drop_getl_trans_lt drop_getl_trans_le drop_getl_trans_ge
+            getl_drop_trans getl_flt getl_gen_all getl_gen_sort getl_gen_O
+            getl_gen_S getl_gen_2 getl_gen_flat getl_gen_bind getl_conf_le
+            getl_trans getl_refl getl_head getl_flat getl_ctail getl_mono
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/ldrop_append.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/ldrop_append.ma
new file mode 100644 (file)
index 0000000..359d39c
--- /dev/null
@@ -0,0 +1,62 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/ldrop.ma".
+
+(* DROPPING *****************************************************************)
+
+(* Properties on append for local environments ******************************)
+
+fact ldrop_O1_append_sn_le_aux: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → 
+                                d = 0 → e ≤ |L1| →
+                                ∀L. ⇩[0, e] L @@ L1 ≡ L @@ L2.
+#L1 #L2 #d #e #H elim H -L1 -L2 -d -e normalize // /4 width=1/
+#d #e #_ #H #L -d
+lapply (le_n_O_to_eq … H) -H //
+qed-.
+
+lemma ldrop_O1_append_sn_le: ∀L1,L2,e. ⇩[0, e] L1 ≡ L2 → e ≤ |L1| →
+                             ∀L. ⇩[0, e] L @@ L1 ≡ L @@ L2.
+/2 width=3 by ldrop_O1_append_sn_le_aux/ qed.
+
+(* Inversion lemmas on append for local environments ************************)
+
+lemma ldrop_O1_inv_append1_ge: ∀K,L1,L2,e. ⇩[0, e] L1 @@ L2 ≡ K →
+                               |L2| ≤ e → ⇩[0, e - |L2|] L1 ≡ K.
+#K #L1 #L2 elim L2 -L2 normalize //
+#L2 #I #V #IHL2 #e #H #H1e
+elim (ldrop_inv_O1 … H) -H * #H2e #HL12 destruct
+[ lapply (le_n_O_to_eq … H1e) -H1e -IHL2
+  >commutative_plus normalize #H destruct
+| <minus_plus >minus_minus_comm /3 width=1/
+]
+qed-.
+
+lemma ldrop_O1_inv_append1_le: ∀K,L1,L2,e. ⇩[0, e] L1 @@ L2 ≡ K → e ≤ |L2| →
+                               ∀K2. ⇩[0, e] L2 ≡ K2 → K = L1 @@ K2.
+#K #L1 #L2 elim L2 -L2 normalize
+[ #e #H1 #H2 #K2 #H3
+  lapply (le_n_O_to_eq … H2) -H2 #H2
+  lapply (ldrop_inv_atom1 … H3) -H3 #H3 destruct
+  >(ldrop_inv_refl … H1) -H1 //
+| #L2 #I #V #IHL2 #e @(nat_ind_plus … e) -e [ -IHL2 ]
+  [ #H1 #_ #K2 #H2
+    lapply (ldrop_inv_refl … H1) -H1 #H1
+    lapply (ldrop_inv_refl … H2) -H2 #H2 destruct //
+  | #e #_ #H1 #H1e #K2 #H2
+    lapply (ldrop_inv_ldrop1 … H1 ?) -H1 //
+    lapply (ldrop_inv_ldrop1 … H2 ?) -H2 // /3 width=4/
+  ]
+]
+qed-. 
diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/ldrop_ldrop.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/ldrop_ldrop.ma
new file mode 100644 (file)
index 0000000..07d9c53
--- /dev/null
@@ -0,0 +1,176 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/lift_lift.ma".
+include "basic_2/substitution/ldrop.ma".
+
+(* DROPPING *****************************************************************)
+
+(* Main properties **********************************************************)
+
+(* Basic_1: was: drop_mono *)
+theorem ldrop_mono: ∀d,e,L,L1. ⇩[d, e] L ≡ L1 →
+                    ∀L2. ⇩[d, e] L ≡ L2 → L1 = L2.
+#d #e #L #L1 #H elim H -d -e -L -L1
+[ #d #e #L2 #H
+  >(ldrop_inv_atom1 … H) -L2 //
+| #K #I #V #L2 #HL12
+   <(ldrop_inv_refl … HL12) -L2 //
+| #L #K #I #V #e #_ #IHLK #L2 #H
+  lapply (ldrop_inv_ldrop1 … H ?) -H // /2 width=1/
+| #L #K1 #I #T #V1 #d #e #_ #HVT1 #IHLK1 #X #H
+  elim (ldrop_inv_skip1 … H ?) -H // <minus_plus_m_m #K2 #V2 #HLK2 #HVT2 #H destruct
+  >(lift_inj … HVT1 … HVT2) -HVT1 -HVT2
+  >(IHLK1 … HLK2) -IHLK1 -HLK2 //
+]
+qed-.
+
+(* Basic_1: was: drop_conf_ge *)
+theorem ldrop_conf_ge: ∀d1,e1,L,L1. ⇩[d1, e1] L ≡ L1 →
+                       ∀e2,L2. ⇩[0, e2] L ≡ L2 → d1 + e1 ≤ e2 →
+                       ⇩[0, e2 - e1] L1 ≡ L2.
+#d1 #e1 #L #L1 #H elim H -d1 -e1 -L -L1
+[ #d #e #e2 #L2 #H
+  >(ldrop_inv_atom1 … H) -L2 //
+| //
+| #L #K #I #V #e #_ #IHLK #e2 #L2 #H #He2
+  lapply (ldrop_inv_ldrop1 … H ?) -H /2 width=2/ #HL2
+  <minus_plus >minus_minus_comm /3 width=1/
+| #L #K #I #V1 #V2 #d #e #_ #_ #IHLK #e2 #L2 #H #Hdee2
+  lapply (transitive_le 1 … Hdee2) // #He2
+  lapply (ldrop_inv_ldrop1 … H ?) -H // -He2 #HL2
+  lapply (transitive_le (1 + e) … Hdee2) // #Hee2
+  @ldrop_ldrop_lt >minus_minus_comm /3 width=1/ (**) (* explicit constructor *)
+]
+qed.
+
+(* Note: apparently this was missing in basic_1 *)
+theorem ldrop_conf_be: ∀L0,L1,d1,e1. ⇩[d1, e1] L0 ≡ L1 →
+                       ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → d1 ≤ e2 → e2 ≤ d1 + e1 →
+                       ∃∃L. ⇩[0, d1 + e1 - e2] L2 ≡ L & ⇩[0, d1] L1 ≡ L.
+#L0 #L1 #d1 #e1 #H elim H -L0 -L1 -d1 -e1
+[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H /2 width=3/
+| normalize #L #I #V #L2 #e2 #HL2 #_ #He2
+  lapply (le_n_O_to_eq … He2) -He2 #H destruct
+  lapply (ldrop_inv_refl … HL2) -HL2 #H destruct /2 width=3/
+| normalize #L0 #K0 #I #V1 #e1 #HLK0 #IHLK0 #L2 #e2 #H #_ #He21
+  lapply (ldrop_inv_O1 … H) -H * * #He2 #HL20
+  [ -IHLK0 -He21 destruct <minus_n_O /3 width=3/
+  | -HLK0 <minus_le_minus_minus_comm //
+    elim (IHLK0 … HL20 ? ?) -L0 // /2 width=1/ /2 width=3/
+  ]
+| #L0 #K0 #I #V0 #V1 #d1 #e1 >plus_plus_comm_23 #_ #_ #IHLK0 #L2 #e2 #H #Hd1e2 #He2de1
+  elim (le_inv_plus_l … Hd1e2) #_ #He2
+  <minus_le_minus_minus_comm //
+  lapply (ldrop_inv_ldrop1 … H ?) -H // #HL02
+  elim (IHLK0 … HL02 ? ?) -L0 /2 width=1/ /3 width=3/
+]
+qed.
+
+(* Note: apparently this was missing in basic_1 *)
+theorem ldrop_conf_le: ∀L0,L1,d1,e1. ⇩[d1, e1] L0 ≡ L1 →
+                       ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → e2 ≤ d1 → 
+                       ∃∃L. ⇩[0, e2] L1 ≡ L & ⇩[d1 - e2, e1] L2 ≡ L.
+#L0 #L1 #d1 #e1 #H elim H -L0 -L1 -d1 -e1
+[ #d1 #e1 #L2 #e2 #H
+  lapply (ldrop_inv_atom1 … H) -H #H destruct /2 width=3/
+| #K0 #I #V0 #L2 #e2 #H1 #H2
+  lapply (le_n_O_to_eq … H2) -H2 #H destruct
+  lapply (ldrop_inv_pair1 … H1) -H1 #H destruct /2 width=3/
+| #K0 #K1 #I #V0 #e1 #HK01 #_ #L2 #e2 #H1 #H2
+  lapply (le_n_O_to_eq … H2) -H2 #H destruct
+  lapply (ldrop_inv_pair1 … H1) -H1 #H destruct /3 width=3/
+| #K0 #K1 #I #V0 #V1 #d1 #e1 #HK01 #HV10 #IHK01 #L2 #e2 #H #He2d1
+  elim (ldrop_inv_O1 … H) -H *
+  [ -IHK01 -He2d1 #H1 #H2 destruct /3 width=5/
+  | -HK01 -HV10 #He2 #HK0L2
+    elim (IHK01 … HK0L2 ?) -IHK01 -HK0L2 /2 width=1/ >minus_le_minus_minus_comm // /3 width=3/
+  ]
+]
+qed.
+
+(* Basic_1: was: drop_trans_ge *)
+theorem ldrop_trans_ge: ∀d1,e1,L1,L. ⇩[d1, e1] L1 ≡ L →
+                        ∀e2,L2. ⇩[0, e2] L ≡ L2 → d1 ≤ e2 → ⇩[0, e1 + e2] L1 ≡ L2.
+#d1 #e1 #L1 #L #H elim H -d1 -e1 -L1 -L
+[ #d #e #e2 #L2 #H
+  >(ldrop_inv_atom1 … H) -H -L2 //
+| //
+| /3 width=1/
+| #L1 #L2 #I #V1 #V2 #d #e #H_ #_ #IHL12 #e2 #L #H #Hde2
+  lapply (lt_to_le_to_lt 0 … Hde2) // #He2
+  lapply (lt_to_le_to_lt … (e + e2) He2 ?) // #Hee2
+  lapply (ldrop_inv_ldrop1 … H ?) -H // #HL2
+  @ldrop_ldrop_lt // >le_plus_minus // @IHL12 /2 width=1/ (**) (* explicit constructor *)
+]
+qed.
+
+(* Basic_1: was: drop_trans_le *)
+theorem ldrop_trans_le: ∀d1,e1,L1,L. ⇩[d1, e1] L1 ≡ L →
+                        ∀e2,L2. ⇩[0, e2] L ≡ L2 → e2 ≤ d1 →
+                        ∃∃L0. ⇩[0, e2] L1 ≡ L0 & ⇩[d1 - e2, e1] L0 ≡ L2.
+#d1 #e1 #L1 #L #H elim H -d1 -e1 -L1 -L
+[ #d #e #e2 #L2 #H
+  >(ldrop_inv_atom1 … H) -L2 /2 width=3/
+| #K #I #V #e2 #L2 #HL2 #H
+  lapply (le_n_O_to_eq … H) -H #H destruct /2 width=3/
+| #L1 #L2 #I #V #e #_ #IHL12 #e2 #L #HL2 #H
+  lapply (le_n_O_to_eq … H) -H #H destruct
+  elim (IHL12 … HL2 ?) -IHL12 -HL2 // #L0 #H #HL0
+  lapply (ldrop_inv_refl … H) -H #H destruct /3 width=5/
+| #L1 #L2 #I #V1 #V2 #d #e #HL12 #HV12 #IHL12 #e2 #L #H #He2d
+  elim (ldrop_inv_O1 … H) -H *
+  [ -He2d -IHL12 #H1 #H2 destruct /3 width=5/
+  | -HL12 -HV12 #He2 #HL2
+    elim (IHL12 … HL2 ?) -L2 [ >minus_le_minus_minus_comm // /3 width=3/ | /2 width=1/ ]
+  ]
+]
+qed.
+
+(* Basic_1: was: drop_conf_rev *)
+axiom ldrop_div: ∀e1,L1,L. ⇩[0, e1] L1 ≡ L → ∀e2,L2. ⇩[0, e2] L2 ≡ L →
+                 ∃∃L0. ⇩[0, e1] L0 ≡ L2 & ⇩[e1, e2] L0 ≡ L1.
+
+(* Basic_1: was: drop_conf_lt *)
+lemma ldrop_conf_lt: ∀d1,e1,L,L1. ⇩[d1, e1] L ≡ L1 →
+                     ∀e2,K2,I,V2. ⇩[0, e2] L ≡ K2. ⓑ{I} V2 →
+                     e2 < d1 → let d ≝ d1 - e2 - 1 in
+                     ∃∃K1,V1. ⇩[0, e2] L1 ≡ K1. ⓑ{I} V1 &
+                              ⇩[d, e1] K2 ≡ K1 & ⇧[d, e1] V1 ≡ V2.
+#d1 #e1 #L #L1 #H1 #e2 #K2 #I #V2 #H2 #He2d1
+elim (ldrop_conf_le … H1 … H2 ?) -L [2: /2 width=2/] #K #HL1K #HK2
+elim (ldrop_inv_skip1 … HK2 ?) -HK2 [2: /2 width=1/] #K1 #V1 #HK21 #HV12 #H destruct /2 width=5/
+qed.
+
+lemma ldrop_trans_ge_comm: ∀d1,e1,e2,L1,L2,L.
+                           ⇩[d1, e1] L1 ≡ L → ⇩[0, e2] L ≡ L2 → d1 ≤ e2 →
+                           ⇩[0, e2 + e1] L1 ≡ L2.
+#e1 #e1 #e2 >commutative_plus /2 width=5/
+qed.
+
+lemma ldrop_conf_div: ∀I1,L,K,V1,e1. ⇩[0, e1] L ≡ K. ⓑ{I1} V1 →
+                      ∀I2,V2,e2. ⇩[0, e2] L ≡ K. ⓑ{I2} V2 →
+                      ∧∧ e1 = e2 & I1 = I2 & V1 = V2.
+#I1 #L #K #V1 #e1 #HLK1 #I2 #V2 #e2 #HLK2
+elim (le_or_ge e1 e2) #He
+[ lapply (ldrop_conf_ge … HLK1 … HLK2 ?)
+| lapply (ldrop_conf_ge … HLK2 … HLK1 ?)
+] -HLK1 -HLK2 // #HK
+lapply (ldrop_fwd_O1_length … HK) #H
+elim (discr_minus_x_xy … H) -H
+[1,3: normalize <plus_n_Sm #H destruct ]
+#H >H in HK; #HK
+lapply (ldrop_inv_refl … HK) -HK #H destruct
+lapply (inv_eq_minus_O … H) -H /3 width=1/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/ldrop_lpx.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/ldrop_lpx.ma
new file mode 100644 (file)
index 0000000..2605b92
--- /dev/null
@@ -0,0 +1,68 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/lenv_px.ma".
+include "basic_2/substitution/ldrop.ma".
+
+(* DROPPING *****************************************************************)
+
+(* Properties on pointwise extension ****************************************)
+
+lemma lpx_deliftable_dropable: ∀R. t_deliftable_sn R → dropable_sn (lpx R).
+#R #HR #L1 #K1 #d #e #H elim H -L1 -K1 -d -e
+[ #d #e #X #H >(lpx_inv_atom1 … H) -H /2 width=3/
+| #K1 #I #V1 #X #H
+  elim (lpx_inv_pair1 … H) -H #L2 #V2 #HL12 #HV12 #H destruct /3 width=5/
+| #L1 #K1 #I #V1 #e #_ #IHLK1 #X #H
+  elim (lpx_inv_pair1 … H) -H #L2 #V2 #HL12 #HV12 #H destruct
+  elim (IHLK1 … HL12) -L1 /3 width=3/
+| #L1 #K1 #I #V1 #W1 #d #e #_ #HWV1 #IHLK1 #X #H
+  elim (lpx_inv_pair1 … H) -H #L2 #V2 #HL12 #HV12 #H destruct
+  elim (HR … HV12 … HWV1) -V1
+  elim (IHLK1 … HL12) -L1 /3 width=5/
+]
+qed.
+
+lemma lpx_liftable_dedropable: ∀R. reflexive ? R →
+                               t_liftable R → dedropable_sn (lpx R).
+#R #H1R #H2R #L1 #K1 #d #e #H elim H -L1 -K1 -d -e
+[ #d #e #X #H >(lpx_inv_atom1 … H) -H /2 width=3/
+| #K1 #I #V1 #X #H
+  elim (lpx_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct /3 width=5/
+| #L1 #K1 #I #V1 #e #_ #IHLK1 #K2 #HK12
+  elim (IHLK1 … HK12) -K1 /3 width=5/
+| #L1 #K1 #I #V1 #W1 #d #e #_ #HWV1 #IHLK1 #X #H
+  elim (lpx_inv_pair1 … H) -H #K2 #W2 #HK12 #HW12 #H destruct
+  elim (lift_total W2 d e) #V2 #HWV2
+  lapply (H2R … HW12 … HWV1 … HWV2) -W1
+  elim (IHLK1 … HK12) -K1 /3 width=5/
+]
+qed.
+
+fact lpx_dropable_aux: ∀R,L2,K2,d,e. ⇩[d, e] L2 ≡ K2 → ∀L1. lpx R L1 L2 →
+                       d = 0 → ∃∃K1. ⇩[0, e] L1 ≡ K1 & lpx R K1 K2.
+#R #L2 #K2 #d #e #H elim H -L2 -K2 -d -e
+[ #d #e #X #H >(lpx_inv_atom2 … H) -H /2 width=3/
+| #K2 #I #V2 #X #H
+  elim (lpx_inv_pair2 … H) -H #K1 #V1 #HK12 #HV12 #H destruct /3 width=5/
+| #L2 #K2 #I #V2 #e #_ #IHLK2 #X #H #_
+  elim (lpx_inv_pair2 … H) -H #L1 #V1 #HL12 #HV12 #H destruct
+  elim (IHLK2 … HL12 ?) -L2 // /3 width=3/
+| #L2 #K2 #I #V2 #W2 #d #e #_ #_ #_ #L1 #_
+  >commutative_plus normalize #H destruct
+]
+qed.
+
+lemma ltpr_dropable: ∀R. dropable_dx (lpx R).
+/2 width=5/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/ldrop_sfr.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/ldrop_sfr.ma
new file mode 100644 (file)
index 0000000..78a15d7
--- /dev/null
@@ -0,0 +1,92 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/lsubs_sfr.ma".
+include "basic_2/substitution/ldrop_ldrop.ma".
+
+(* DROPPING *****************************************************************)
+
+(* Inversion lemmas about local env. full refinement for substitution *******)
+
+(* Note: ldrop_ldrop not needed *)
+lemma sfr_inv_ldrop: ∀I,L,K,V,i. ⇩[0, i] L ≡ K. ⓑ{I}V → ∀d,e. ≽ [d, e] L →
+                     d ≤ i → i < d + e → I = Abbr.
+#I #L elim L -L
+[ #K #V #i #H
+  lapply (ldrop_inv_atom1 … H) -H #H destruct
+| #L #J #W #IHL #K #V #i #H
+  elim (ldrop_inv_O1 … H) -H *
+  [ -IHL #H1 #H2 #d #e #HL #Hdi #Hide destruct
+    lapply (le_n_O_to_eq … Hdi) -Hdi #H destruct
+    lapply (HL … (L.ⓓW) ?) -HL /2 width=1/ #H
+    elim (lsubs_inv_abbr2 … H ?) -H // -Hide #K #_ #H destruct //
+  | #Hi #HLK #d @(nat_ind_plus … d) -d
+    [ #e #H #_ #Hide
+      elim (sfr_inv_bind … H ?) -H [2: /2 width=2/ ] #HL #H destruct
+      @(IHL … HLK … HL) -IHL -HLK -HL // /2 width=1/
+    | #d #_ #e #H #Hdi #Hide
+      lapply (sfr_inv_skip … H ?) -H // #HL
+      @(IHL … HLK … HL) -IHL -HLK -HL /2 width=1/
+    ]
+  ]
+]
+qed-.
+
+(* Properties about local env. full refinement for substitution *************)
+
+(* Note: ldrop_ldrop not needed *)
+lemma sfr_ldrop: ∀L,d,e.
+                 (∀I,K,V,i. d ≤ i → i < d + e → ⇩[0, i] L ≡ K. ⓑ{I}V → I = Abbr) →
+                 ≽ [d, e] L.
+#L elim L -L //
+#L #I #V #IHL #d @(nat_ind_plus … d) -d
+[ #e @(nat_ind_plus … e) -e //
+  #e #_ #HH
+  >(HH I L V 0 ? ? ?) // /5 width=6/
+| /5 width=6/
+]
+qed.
+
+lemma sfr_ldrop_trans_le: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → ∀dd,ee. ≽ [dd, ee] L1 → 
+                          dd + ee ≤ d → ≽ [dd, ee] L2.
+#L1 #L2 #d #e #HL12 #dd #ee #HL1 #Hddee
+@sfr_ldrop #I #K2 #V2 #i #Hddi #Hiddee #HLK2
+lapply (lt_to_le_to_lt … Hiddee Hddee) -Hddee #Hid
+elim (ldrop_trans_le … HL12 … HLK2 ?) -L2 /2 width=2/ #X #HLK1 #H
+elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K1 #V1 #HK12 #HV21 #H destruct
+@(sfr_inv_ldrop … HLK1 … HL1) -L1 -K1 -V1 //
+qed.
+
+lemma sfr_ldrop_trans_be_up: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 →
+                             ∀dd,ee. ≽ [dd, ee] L1 →
+                             dd ≤ d + e → d + e ≤ dd + ee →
+                             ≽ [d, dd + ee - d - e] L2.
+#L1 #L2 #d #e #HL12 #dd #ee #HL1 #Hdde #Hddee
+@sfr_ldrop #I #K2 #V2 #i #Hdi #Hiddee #HLK2
+lapply (transitive_le ? ? (i+e)… Hdde ?) -Hdde /2 width=1/ #Hddie
+>commutative_plus in Hiddee; >minus_minus_comm <plus_minus_m_m /2 width=1/ -Hddee #Hiddee
+lapply (ldrop_trans_ge … HL12 … HLK2 ?) -L2 // -Hdi  #HL1K2
+@(sfr_inv_ldrop … HL1K2 … HL1) -L1 >commutative_plus // -Hddie /2 width=1/
+qed.
+
+lemma sfr_ldrop_trans_ge: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → ∀dd,ee. ≽ [dd, ee] L1 → 
+                          d + e ≤ dd → ≽ [dd - e, ee] L2.
+#L1 #L2 #d #e #HL12 #dd #ee #HL1 #Hddee
+@sfr_ldrop #I #K2 #V2 #i #Hddi #Hiddee #HLK2
+elim (le_inv_plus_l … Hddee) -Hddee #Hdde #Hedd
+>plus_minus in Hiddee; // #Hiddee
+lapply (transitive_le … Hdde Hddi) -Hdde #Hid
+lapply (ldrop_trans_ge … HL12 … HLK2 ?) -L2 // -Hid #HL1K2
+@(sfr_inv_ldrop … HL1K2 … HL1) -L1 >commutative_plus /2 width=1/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/lift.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/lift.ma
new file mode 100644 (file)
index 0000000..36c353b
--- /dev/null
@@ -0,0 +1,402 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/term_weight.ma".
+include "basic_2/grammar/term_simple.ma".
+
+(* BASIC TERM RELOCATION ****************************************************)
+
+(* Basic_1: includes:
+            lift_sort lift_lref_lt lift_lref_ge lift_bind lift_flat
+*)
+inductive lift: nat → nat → relation term ≝
+| lift_sort   : ∀k,d,e. lift d e (⋆k) (⋆k)
+| lift_lref_lt: ∀i,d,e. i < d → lift d e (#i) (#i)
+| lift_lref_ge: ∀i,d,e. d ≤ i → lift d e (#i) (#(i + e))
+| lift_gref   : ∀p,d,e. lift d e (§p) (§p)
+| lift_bind   : ∀a,I,V1,V2,T1,T2,d,e.
+                lift d e V1 V2 → lift (d + 1) e T1 T2 →
+                lift d e (ⓑ{a,I} V1. T1) (ⓑ{a,I} V2. T2)
+| lift_flat   : ∀I,V1,V2,T1,T2,d,e.
+                lift d e V1 V2 → lift d e T1 T2 →
+                lift d e (ⓕ{I} V1. T1) (ⓕ{I} V2. T2)
+.
+
+interpretation "relocation" 'RLift d e T1 T2 = (lift d e T1 T2).
+
+definition t_liftable: relation term → Prop ≝
+                       λR. ∀T1,T2. R T1 T2 → ∀U1,d,e. ⇧[d, e] T1 ≡ U1 →
+                       ∀U2. ⇧[d, e] T2 ≡ U2 → R U1 U2.
+
+definition t_deliftable_sn: relation term → Prop ≝
+                            λR. ∀U1,U2. R U1 U2 → ∀T1,d,e. ⇧[d, e] T1 ≡ U1 →
+                            ∃∃T2. ⇧[d, e] T2 ≡ U2 & R T1 T2.
+
+(* Basic inversion lemmas ***************************************************)
+
+fact lift_inv_refl_O2_aux: ∀d,e,T1,T2. ⇧[d, e] T1 ≡ T2 → e = 0 → T1 = T2.
+#d #e #T1 #T2 #H elim H -d -e -T1 -T2 // /3 width=1/
+qed.
+
+lemma lift_inv_refl_O2: ∀d,T1,T2. ⇧[d, 0] T1 ≡ T2 → T1 = T2.
+/2 width=4/ qed-.
+
+fact lift_inv_sort1_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 → ∀k. T1 = ⋆k → T2 = ⋆k.
+#d #e #T1 #T2 * -d -e -T1 -T2 //
+[ #i #d #e #_ #k #H destruct
+| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
+| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
+]
+qed.
+
+lemma lift_inv_sort1: ∀d,e,T2,k. ⇧[d,e] ⋆k ≡ T2 → T2 = ⋆k.
+/2 width=5/ qed-.
+
+fact lift_inv_lref1_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 → ∀i. T1 = #i →
+                         (i < d ∧ T2 = #i) ∨ (d ≤ i ∧ T2 = #(i + e)).
+#d #e #T1 #T2 * -d -e -T1 -T2
+[ #k #d #e #i #H destruct
+| #j #d #e #Hj #i #Hi destruct /3 width=1/
+| #j #d #e #Hj #i #Hi destruct /3 width=1/
+| #p #d #e #i #H destruct
+| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #i #H destruct
+| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #i #H destruct
+]
+qed.
+
+lemma lift_inv_lref1: ∀d,e,T2,i. ⇧[d,e] #i ≡ T2 →
+                      (i < d ∧ T2 = #i) ∨ (d ≤ i ∧ T2 = #(i + e)).
+/2 width=3/ qed-.
+
+lemma lift_inv_lref1_lt: ∀d,e,T2,i. ⇧[d,e] #i ≡ T2 → i < d → T2 = #i.
+#d #e #T2 #i #H elim (lift_inv_lref1 … H) -H * //
+#Hdi #_ #Hid lapply (le_to_lt_to_lt … Hdi Hid) -Hdi -Hid #Hdd
+elim (lt_refl_false … Hdd)
+qed-.
+
+lemma lift_inv_lref1_ge: ∀d,e,T2,i. ⇧[d,e] #i ≡ T2 → d ≤ i → T2 = #(i + e).
+#d #e #T2 #i #H elim (lift_inv_lref1 … H) -H * //
+#Hid #_ #Hdi lapply (le_to_lt_to_lt … Hdi Hid) -Hdi -Hid #Hdd
+elim (lt_refl_false … Hdd)
+qed-.
+
+fact lift_inv_gref1_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 → ∀p. T1 = §p → T2 = §p.
+#d #e #T1 #T2 * -d -e -T1 -T2 //
+[ #i #d #e #_ #k #H destruct
+| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
+| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
+]
+qed.
+
+lemma lift_inv_gref1: ∀d,e,T2,p. ⇧[d,e] §p ≡ T2 → T2 = §p.
+/2 width=5/ qed-.
+
+fact lift_inv_bind1_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 →
+                         ∀a,I,V1,U1. T1 = ⓑ{a,I} V1.U1 →
+                         ∃∃V2,U2. ⇧[d,e] V1 ≡ V2 & ⇧[d+1,e] U1 ≡ U2 &
+                                  T2 = ⓑ{a,I} V2. U2.
+#d #e #T1 #T2 * -d -e -T1 -T2
+[ #k #d #e #a #I #V1 #U1 #H destruct
+| #i #d #e #_ #a #I #V1 #U1 #H destruct
+| #i #d #e #_ #a #I #V1 #U1 #H destruct
+| #p #d #e #a #I #V1 #U1 #H destruct
+| #b #J #W1 #W2 #T1 #T2 #d #e #HW #HT #a #I #V1 #U1 #H destruct /2 width=5/
+| #J #W1 #W2 #T1 #T2 #d #e #_ #HT #a #I #V1 #U1 #H destruct
+]
+qed.
+
+lemma lift_inv_bind1: ∀d,e,T2,a,I,V1,U1. ⇧[d,e] ⓑ{a,I} V1. U1 ≡ T2 →
+                      ∃∃V2,U2. ⇧[d,e] V1 ≡ V2 & ⇧[d+1,e] U1 ≡ U2 &
+                               T2 = ⓑ{a,I} V2. U2.
+/2 width=3/ qed-.
+
+fact lift_inv_flat1_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 →
+                         ∀I,V1,U1. T1 = ⓕ{I} V1.U1 →
+                         ∃∃V2,U2. ⇧[d,e] V1 ≡ V2 & ⇧[d,e] U1 ≡ U2 &
+                                  T2 = ⓕ{I} V2. U2.
+#d #e #T1 #T2 * -d -e -T1 -T2
+[ #k #d #e #I #V1 #U1 #H destruct
+| #i #d #e #_ #I #V1 #U1 #H destruct
+| #i #d #e #_ #I #V1 #U1 #H destruct
+| #p #d #e #I #V1 #U1 #H destruct
+| #a #J #W1 #W2 #T1 #T2 #d #e #_ #_ #I #V1 #U1 #H destruct
+| #J #W1 #W2 #T1 #T2 #d #e #HW #HT #I #V1 #U1 #H destruct /2 width=5/
+]
+qed.
+
+lemma lift_inv_flat1: ∀d,e,T2,I,V1,U1. ⇧[d,e] ⓕ{I} V1. U1 ≡ T2 →
+                      ∃∃V2,U2. ⇧[d,e] V1 ≡ V2 & ⇧[d,e] U1 ≡ U2 &
+                               T2 = ⓕ{I} V2. U2.
+/2 width=3/ qed-.
+
+fact lift_inv_sort2_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 → ∀k. T2 = ⋆k → T1 = ⋆k.
+#d #e #T1 #T2 * -d -e -T1 -T2 //
+[ #i #d #e #_ #k #H destruct
+| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
+| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
+]
+qed.
+
+(* Basic_1: was: lift_gen_sort *)
+lemma lift_inv_sort2: ∀d,e,T1,k. ⇧[d,e] T1 ≡ ⋆k → T1 = ⋆k.
+/2 width=5/ qed-.
+
+fact lift_inv_lref2_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 → ∀i. T2 = #i →
+                         (i < d ∧ T1 = #i) ∨ (d + e ≤ i ∧ T1 = #(i - e)).
+#d #e #T1 #T2 * -d -e -T1 -T2
+[ #k #d #e #i #H destruct
+| #j #d #e #Hj #i #Hi destruct /3 width=1/
+| #j #d #e #Hj #i #Hi destruct <minus_plus_m_m /4 width=1/
+| #p #d #e #i #H destruct
+| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #i #H destruct
+| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #i #H destruct
+]
+qed.
+
+(* Basic_1: was: lift_gen_lref *)
+lemma lift_inv_lref2: ∀d,e,T1,i. ⇧[d,e] T1 ≡ #i →
+                      (i < d ∧ T1 = #i) ∨ (d + e ≤ i ∧ T1 = #(i - e)).
+/2 width=3/ qed-.
+
+(* Basic_1: was: lift_gen_lref_lt *)
+lemma lift_inv_lref2_lt: ∀d,e,T1,i. ⇧[d,e] T1 ≡ #i → i < d → T1 = #i.
+#d #e #T1 #i #H elim (lift_inv_lref2 … H) -H * //
+#Hdi #_ #Hid lapply (le_to_lt_to_lt … Hdi Hid) -Hdi -Hid #Hdd
+elim (lt_inv_plus_l … Hdd) -Hdd #Hdd
+elim (lt_refl_false … Hdd)
+qed-.
+
+(* Basic_1: was: lift_gen_lref_false *)
+lemma lift_inv_lref2_be: ∀d,e,T1,i. ⇧[d,e] T1 ≡ #i →
+                         d ≤ i → i < d + e → ⊥.
+#d #e #T1 #i #H elim (lift_inv_lref2 … H) -H *
+[ #H1 #_ #H2 #_ | #H2 #_ #_ #H1 ]
+lapply (le_to_lt_to_lt … H2 H1) -H2 -H1 #H
+elim (lt_refl_false … H)
+qed-.
+
+(* Basic_1: was: lift_gen_lref_ge *)
+lemma lift_inv_lref2_ge: ∀d,e,T1,i. ⇧[d,e] T1 ≡ #i → d + e ≤ i → T1 = #(i - e).
+#d #e #T1 #i #H elim (lift_inv_lref2 … H) -H * //
+#Hid #_ #Hdi lapply (le_to_lt_to_lt … Hdi Hid) -Hdi -Hid #Hdd
+elim (lt_inv_plus_l … Hdd) -Hdd #Hdd
+elim (lt_refl_false … Hdd)
+qed-.
+
+fact lift_inv_gref2_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 → ∀p. T2 = §p → T1 = §p.
+#d #e #T1 #T2 * -d -e -T1 -T2 //
+[ #i #d #e #_ #k #H destruct
+| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
+| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
+]
+qed.
+
+lemma lift_inv_gref2: ∀d,e,T1,p. ⇧[d,e] T1 ≡ §p → T1 = §p.
+/2 width=5/ qed-.
+
+fact lift_inv_bind2_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 →
+                         ∀a,I,V2,U2. T2 = ⓑ{a,I} V2.U2 →
+                         ∃∃V1,U1. ⇧[d,e] V1 ≡ V2 & ⇧[d+1,e] U1 ≡ U2 &
+                                  T1 = ⓑ{a,I} V1. U1.
+#d #e #T1 #T2 * -d -e -T1 -T2
+[ #k #d #e #a #I #V2 #U2 #H destruct
+| #i #d #e #_ #a #I #V2 #U2 #H destruct
+| #i #d #e #_ #a #I #V2 #U2 #H destruct
+| #p #d #e #a #I #V2 #U2 #H destruct
+| #b #J #W1 #W2 #T1 #T2 #d #e #HW #HT #a #I #V2 #U2 #H destruct /2 width=5/
+| #J #W1 #W2 #T1 #T2 #d #e #_ #_ #a #I #V2 #U2 #H destruct
+]
+qed.
+
+(* Basic_1: was: lift_gen_bind *)
+lemma lift_inv_bind2: ∀d,e,T1,a,I,V2,U2. ⇧[d,e] T1 ≡ ⓑ{a,I} V2. U2 →
+                      ∃∃V1,U1. ⇧[d,e] V1 ≡ V2 & ⇧[d+1,e] U1 ≡ U2 &
+                               T1 = ⓑ{a,I} V1. U1.
+/2 width=3/ qed-.
+
+fact lift_inv_flat2_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 →
+                         ∀I,V2,U2. T2 = ⓕ{I} V2.U2 →
+                         ∃∃V1,U1. ⇧[d,e] V1 ≡ V2 & ⇧[d,e] U1 ≡ U2 &
+                                  T1 = ⓕ{I} V1. U1.
+#d #e #T1 #T2 * -d -e -T1 -T2
+[ #k #d #e #I #V2 #U2 #H destruct
+| #i #d #e #_ #I #V2 #U2 #H destruct
+| #i #d #e #_ #I #V2 #U2 #H destruct
+| #p #d #e #I #V2 #U2 #H destruct
+| #a #J #W1 #W2 #T1 #T2 #d #e #_ #_ #I #V2 #U2 #H destruct
+| #J #W1 #W2 #T1 #T2 #d #e #HW #HT #I #V2 #U2 #H destruct /2 width=5/
+]
+qed.
+
+(* Basic_1: was: lift_gen_flat *)
+lemma lift_inv_flat2: ∀d,e,T1,I,V2,U2. ⇧[d,e] T1 ≡  ⓕ{I} V2. U2 →
+                      ∃∃V1,U1. ⇧[d,e] V1 ≡ V2 & ⇧[d,e] U1 ≡ U2 &
+                               T1 = ⓕ{I} V1. U1.
+/2 width=3/ qed-.
+
+lemma lift_inv_pair_xy_x: ∀d,e,I,V,T. ⇧[d, e] ②{I} V. T ≡ V → ⊥.
+#d #e #J #V elim V -V
+[ * #i #T #H
+  [ lapply (lift_inv_sort2 … H) -H #H destruct
+  | elim (lift_inv_lref2 … H) -H * #_ #H destruct
+  | lapply (lift_inv_gref2 … H) -H #H destruct
+  ]
+| * [ #a ] #I #W2 #U2 #IHW2 #_ #T #H
+  [ elim (lift_inv_bind2 … H) -H #W1 #U1 #HW12 #_ #H destruct /2 width=2/
+  | elim (lift_inv_flat2 … H) -H #W1 #U1 #HW12 #_ #H destruct /2 width=2/
+  ]
+]
+qed-.
+
+lemma lift_inv_pair_xy_y: ∀I,T,V,d,e. ⇧[d, e] ②{I} V. T ≡ T → ⊥.
+#J #T elim T -T
+[ * #i #V #d #e #H
+  [ lapply (lift_inv_sort2 … H) -H #H destruct
+  | elim (lift_inv_lref2 … H) -H * #_ #H destruct
+  | lapply (lift_inv_gref2 … H) -H #H destruct
+  ]
+| * [ #a ] #I #W2 #U2 #_ #IHU2 #V #d #e #H
+  [ elim (lift_inv_bind2 … H) -H #W1 #U1 #_ #HU12 #H destruct /2 width=4/
+  | elim (lift_inv_flat2 … H) -H #W1 #U1 #_ #HU12 #H destruct /2 width=4/
+  ]
+]
+qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma tw_lift: ∀d,e,T1,T2. ⇧[d, e] T1 ≡ T2 → #{T1} = #{T2}.
+#d #e #T1 #T2 #H elim H -d -e -T1 -T2 normalize //
+qed-.
+
+lemma lift_simple_dx: ∀d,e,T1,T2. ⇧[d, e] T1 ≡ T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄.
+#d #e #T1 #T2 #H elim H -d -e -T1 -T2 //
+#a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #_ #_ #H
+elim (simple_inv_bind … H)
+qed-.
+
+lemma lift_simple_sn: ∀d,e,T1,T2. ⇧[d, e] T1 ≡ T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄.
+#d #e #T1 #T2 #H elim H -d -e -T1 -T2 //
+#a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #_ #_ #H
+elim (simple_inv_bind … H)
+qed-. 
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was: lift_lref_gt *)
+lemma lift_lref_ge_minus: ∀d,e,i. d + e ≤ i → ⇧[d, e] #(i - e) ≡ #i.
+#d #e #i #H >(plus_minus_m_m i e) in ⊢ (? ? ? ? %); /2 width=2/ /3 width=2/
+qed.
+
+lemma lift_lref_ge_minus_eq: ∀d,e,i,j. d + e ≤ i → j = i - e → ⇧[d, e] #j ≡ #i.
+/2 width=1/ qed-.
+
+(* Basic_1: was: lift_r *)
+lemma lift_refl: ∀T,d. ⇧[d, 0] T ≡ T.
+#T elim T -T
+[ * #i // #d elim (lt_or_ge i d) /2 width=1/
+| * /2 width=1/
+]
+qed.
+
+lemma lift_total: ∀T1,d,e. ∃T2. ⇧[d,e] T1 ≡ T2.
+#T1 elim T1 -T1
+[ * #i /2 width=2/ #d #e elim (lt_or_ge i d) /3 width=2/
+| * [ #a ] #I #V1 #T1 #IHV1 #IHT1 #d #e
+  elim (IHV1 d e) -IHV1 #V2 #HV12
+  [ elim (IHT1 (d+1) e) -IHT1 /3 width=2/
+  | elim (IHT1 d e) -IHT1 /3 width=2/
+  ]
+]
+qed.
+
+(* Basic_1: was: lift_free (right to left) *)
+lemma lift_split: ∀d1,e2,T1,T2. ⇧[d1, e2] T1 ≡ T2 →
+                  ∀d2,e1. d1 ≤ d2 → d2 ≤ d1 + e1 → e1 ≤ e2 →
+                  ∃∃T. ⇧[d1, e1] T1 ≡ T & ⇧[d2, e2 - e1] T ≡ T2.
+#d1 #e2 #T1 #T2 #H elim H -d1 -e2 -T1 -T2
+[ /3 width=3/
+| #i #d1 #e2 #Hid1 #d2 #e1 #Hd12 #_ #_
+  lapply (lt_to_le_to_lt … Hid1 Hd12) -Hd12 #Hid2 /4 width=3/
+| #i #d1 #e2 #Hid1 #d2 #e1 #_ #Hd21 #He12
+  lapply (transitive_le … (i+e1) Hd21 ?) /2 width=1/ -Hd21 #Hd21
+  >(plus_minus_m_m e2 e1 ?) // /3 width=3/
+| /3 width=3/
+| #a #I #V1 #V2 #T1 #T2 #d1 #e2 #_ #_ #IHV #IHT #d2 #e1 #Hd12 #Hd21 #He12
+  elim (IHV … Hd12 Hd21 He12) -IHV #V0 #HV0a #HV0b
+  elim (IHT (d2+1) … ? ? He12) /2 width=1/ /3 width=5/
+| #I #V1 #V2 #T1 #T2 #d1 #e2 #_ #_ #IHV #IHT #d2 #e1 #Hd12 #Hd21 #He12
+  elim (IHV … Hd12 Hd21 He12) -IHV #V0 #HV0a #HV0b
+  elim (IHT d2 … ? ? He12) // /3 width=5/
+]
+qed.
+
+(* Basic_1: was only: dnf_dec2 dnf_dec *)
+lemma is_lift_dec: ∀T2,d,e. Decidable (∃T1. ⇧[d,e] T1 ≡ T2).
+#T1 elim T1 -T1
+[ * [1,3: /3 width=2/ ] #i #d #e
+  elim (lt_dec i d) #Hid
+  [ /4 width=2/
+  | lapply (false_lt_to_le … Hid) -Hid #Hid
+    elim (lt_dec i (d + e)) #Hide
+    [ @or_intror * #T1 #H
+      elim (lift_inv_lref2_be … H Hid Hide)
+    | lapply (false_lt_to_le … Hide) -Hide /4 width=2/
+    ]
+  ]
+| * [ #a ] #I #V2 #T2 #IHV2 #IHT2 #d #e
+  [ elim (IHV2 d e) -IHV2
+    [ * #V1 #HV12 elim (IHT2 (d+1) e) -IHT2
+      [ * #T1 #HT12 @or_introl /3 width=2/
+      | -V1 #HT2 @or_intror * #X #H
+        elim (lift_inv_bind2 … H) -H /3 width=2/
+      ]
+    | -IHT2 #HV2 @or_intror * #X #H
+      elim (lift_inv_bind2 … H) -H /3 width=2/
+    ]
+  | elim (IHV2 d e) -IHV2
+    [ * #V1 #HV12 elim (IHT2 d e) -IHT2
+      [ * #T1 #HT12 /4 width=2/
+      | -V1 #HT2 @or_intror * #X #H
+        elim (lift_inv_flat2 … H) -H /3 width=2/
+      ]
+    | -IHT2 #HV2 @or_intror * #X #H
+      elim (lift_inv_flat2 … H) -H /3 width=2/
+    ]
+  ]
+]
+qed.
+
+lemma t_liftable_TC: ∀R. t_liftable R → t_liftable (TC … R).
+#R #HR #T1 #T2 #H elim H -T2
+[ /3 width=7/
+| #T #T2 #_ #HT2 #IHT1 #U1 #d #e #HTU1 #U2 #HTU2
+  elim (lift_total T d e) /3 width=9/
+]
+qed.
+
+lemma t_deliftable_sn_TC: ∀R. t_deliftable_sn R → t_deliftable_sn (TC … R).
+#R #HR #U1 #U2 #H elim H -U2
+[ #U2 #HU12 #T1 #d #e #HTU1
+  elim (HR … HU12 … HTU1) -U1 /3 width=3/
+| #U #U2 #_ #HU2 #IHU1 #T1 #d #e #HTU1
+  elim (IHU1 … HTU1) -U1 #T #HTU #HT1
+  elim (HR … HU2 … HTU) -U /3 width=5/
+]
+qed-. 
+
+(* Basic_1: removed theorems 7:
+            lift_head lift_gen_head
+            lift_weight_map lift_weight lift_weight_add lift_weight_add_O
+            lift_tlt_dx
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/lift_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/lift_lift.ma
new file mode 100644 (file)
index 0000000..3e18bff
--- /dev/null
@@ -0,0 +1,217 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/lift.ma".
+
+(* BASIC TERM RELOCATION ****************************************************)
+
+(* Main properies ***********************************************************)
+
+(* Basic_1: was: lift_inj *)
+theorem lift_inj: ∀d,e,T1,U. ⇧[d,e] T1 ≡ U → ∀T2. ⇧[d,e] T2 ≡ U → T1 = T2.
+#d #e #T1 #U #H elim H -d -e -T1 -U
+[ #k #d #e #X #HX
+  lapply (lift_inv_sort2 … HX) -HX //
+| #i #d #e #Hid #X #HX
+  lapply (lift_inv_lref2_lt … HX ?) -HX //
+| #i #d #e #Hdi #X #HX
+  lapply (lift_inv_lref2_ge … HX ?) -HX // /2 width=1/
+| #p #d #e #X #HX
+  lapply (lift_inv_gref2 … HX) -HX //
+| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #X #HX
+  elim (lift_inv_bind2 … HX) -HX #V #T #HV1 #HT1 #HX destruct /3 width=1/
+| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #X #HX
+  elim (lift_inv_flat2 … HX) -HX #V #T #HV1 #HT1 #HX destruct /3 width=1/
+]
+qed-.
+
+(* Basic_1: was: lift_gen_lift *)
+theorem lift_div_le: ∀d1,e1,T1,T. ⇧[d1, e1] T1 ≡ T →
+                     ∀d2,e2,T2. ⇧[d2 + e1, e2] T2 ≡ T →
+                     d1 ≤ d2 →
+                     ∃∃T0. ⇧[d1, e1] T0 ≡ T2 & ⇧[d2, e2] T0 ≡ T1.
+#d1 #e1 #T1 #T #H elim H -d1 -e1 -T1 -T
+[ #k #d1 #e1 #d2 #e2 #T2 #Hk #Hd12
+  lapply (lift_inv_sort2 … Hk) -Hk #Hk destruct /3 width=3/
+| #i #d1 #e1 #Hid1 #d2 #e2 #T2 #Hi #Hd12
+  lapply (lt_to_le_to_lt … Hid1 Hd12) -Hd12 #Hid2
+  lapply (lift_inv_lref2_lt … Hi ?) -Hi /2 width=3/ /3 width=3/
+| #i #d1 #e1 #Hid1 #d2 #e2 #T2 #Hi #Hd12
+  elim (lift_inv_lref2 … Hi) -Hi * #Hid2 #H destruct
+  [ -Hd12 lapply (lt_plus_to_lt_l … Hid2) -Hid2 #Hid2 /3 width=3/
+  | -Hid1 >plus_plus_comm_23 in Hid2; #H lapply (le_plus_to_le_r … H) -H #H
+    elim (le_inv_plus_l … H) -H #Hide2 #He2i
+    lapply (transitive_le … Hd12 Hide2) -Hd12 #Hd12
+    >le_plus_minus_comm // >(plus_minus_m_m i e2) in ⊢ (? ? ? %); // -He2i
+    /4 width=3/
+  ]
+| #p #d1 #e1 #d2 #e2 #T2 #Hk #Hd12
+  lapply (lift_inv_gref2 … Hk) -Hk #Hk destruct /3 width=3/
+| #a #I #W1 #W #U1 #U #d1 #e1 #_ #_ #IHW #IHU #d2 #e2 #T2 #H #Hd12
+  lapply (lift_inv_bind2 … H) -H * #W2 #U2 #HW2 #HU2 #H destruct
+  elim (IHW … HW2 ?) // -IHW -HW2 #W0 #HW2 #HW1
+  >plus_plus_comm_23 in HU2; #HU2 elim (IHU … HU2 ?) /2 width=1/ /3 width=5/
+| #I #W1 #W #U1 #U #d1 #e1 #_ #_ #IHW #IHU #d2 #e2 #T2 #H #Hd12
+  lapply (lift_inv_flat2 … H) -H * #W2 #U2 #HW2 #HU2 #H destruct
+  elim (IHW … HW2 ?) // -IHW -HW2 #W0 #HW2 #HW1
+  elim (IHU … HU2 ?) // /3 width=5/
+]
+qed.
+
+(* Note: apparently this was missing in basic_1 *)
+theorem lift_div_be: ∀d1,e1,T1,T. ⇧[d1, e1] T1 ≡ T →
+                     ∀e,e2,T2. ⇧[d1 + e, e2] T2 ≡ T →
+                     e ≤ e1 → e1 ≤ e + e2 →
+                     ∃∃T0. ⇧[d1, e] T0 ≡ T2 & ⇧[d1, e + e2 - e1] T0 ≡ T1.
+#d1 #e1 #T1 #T #H elim H -d1 -e1 -T1 -T
+[ #k #d1 #e1 #e #e2 #T2 #H >(lift_inv_sort2 … H) -H /2 width=3/
+| #i #d1 #e1 #Hid1 #e #e2 #T2 #H #He1 #He1e2
+  >(lift_inv_lref2_lt … H) -H [ /3 width=3/ | /2 width=3/ ]
+| #i #d1 #e1 #Hid1 #e #e2 #T2 #H #He1 #He1e2
+  elim (lt_or_ge (i+e1) (d1+e+e2)) #Hie1d1e2
+  [ elim (lift_inv_lref2_be … H ? ?) -H // /2 width=1/
+  | >(lift_inv_lref2_ge … H ?) -H //
+    lapply (le_plus_to_minus … Hie1d1e2) #Hd1e21i
+    elim (le_inv_plus_l … Hie1d1e2) -Hie1d1e2 #Hd1e12 #He2ie1
+    @ex2_1_intro [2: /2 width=1/ | skip ] -Hd1e12
+    @lift_lref_ge_minus_eq [ >plus_minus_commutative // | /2 width=1/ ]
+  ]
+| #p #d1 #e1 #e #e2 #T2 #H >(lift_inv_gref2 … H) -H /2 width=3/
+| #a #I #V1 #V #T1 #T #d1 #e1 #_ #_ #IHV1 #IHT1 #e #e2 #X #H #He1 #He1e2
+  elim (lift_inv_bind2 … H) -H #V2 #T2 #HV2 #HT2 #H destruct
+  elim (IHV1 … HV2 ? ?) -V // >plus_plus_comm_23 in HT2; #HT2
+  elim (IHT1 … HT2 ? ?) -T // -He1 -He1e2 /3 width=5/
+| #I #V1 #V #T1 #T #d1 #e1 #_ #_ #IHV1 #IHT1 #e #e2 #X #H #He1 #He1e2
+  elim (lift_inv_flat2 … H) -H #V2 #T2 #HV2 #HT2 #H destruct
+  elim (IHV1 … HV2 ? ?) -V //
+  elim (IHT1 … HT2 ? ?) -T // -He1 -He1e2 /3 width=5/
+]
+qed.
+
+theorem lift_mono: ∀d,e,T,U1. ⇧[d,e] T ≡ U1 → ∀U2. ⇧[d,e] T ≡ U2 → U1 = U2.
+#d #e #T #U1 #H elim H -d -e -T -U1
+[ #k #d #e #X #HX
+  lapply (lift_inv_sort1 … HX) -HX //
+| #i #d #e #Hid #X #HX 
+  lapply (lift_inv_lref1_lt … HX ?) -HX //
+| #i #d #e #Hdi #X #HX 
+  lapply (lift_inv_lref1_ge … HX ?) -HX //
+| #p #d #e #X #HX
+  lapply (lift_inv_gref1 … HX) -HX //
+| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #X #HX
+  elim (lift_inv_bind1 … HX) -HX #V #T #HV1 #HT1 #HX destruct /3 width=1/
+| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #X #HX
+  elim (lift_inv_flat1 … HX) -HX #V #T #HV1 #HT1 #HX destruct /3 width=1/
+]
+qed-.
+
+(* Basic_1: was: lift_free (left to right) *)
+theorem lift_trans_be: ∀d1,e1,T1,T. ⇧[d1, e1] T1 ≡ T →
+                       ∀d2,e2,T2. ⇧[d2, e2] T ≡ T2 →
+                       d1 ≤ d2 → d2 ≤ d1 + e1 → ⇧[d1, e1 + e2] T1 ≡ T2.
+#d1 #e1 #T1 #T #H elim H -d1 -e1 -T1 -T
+[ #k #d1 #e1 #d2 #e2 #T2 #HT2 #_ #_
+  >(lift_inv_sort1 … HT2) -HT2 //
+| #i #d1 #e1 #Hid1 #d2 #e2 #T2 #HT2 #Hd12 #_
+  lapply (lt_to_le_to_lt … Hid1 Hd12) -Hd12 #Hid2
+  lapply (lift_inv_lref1_lt … HT2 Hid2) /2 width=1/
+| #i #d1 #e1 #Hid1 #d2 #e2 #T2 #HT2 #_ #Hd21
+  lapply (lift_inv_lref1_ge … HT2 ?) -HT2
+  [ @(transitive_le … Hd21 ?) -Hd21 /2 width=1/
+  | -Hd21 /2 width=1/
+  ]
+| #p #d1 #e1 #d2 #e2 #T2 #HT2 #_ #_
+  >(lift_inv_gref1 … HT2) -HT2 //
+| #a #I #V1 #V2 #T1 #T2 #d1 #e1 #_ #_ #IHV12 #IHT12 #d2 #e2 #X #HX #Hd12 #Hd21
+  elim (lift_inv_bind1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct
+  lapply (IHV12 … HV20 ? ?) // -IHV12 -HV20 #HV10
+  lapply (IHT12 … HT20 ? ?) /2 width=1/
+| #I #V1 #V2 #T1 #T2 #d1 #e1 #_ #_ #IHV12 #IHT12 #d2 #e2 #X #HX #Hd12 #Hd21
+  elim (lift_inv_flat1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct
+  lapply (IHV12 … HV20 ? ?) // -IHV12 -HV20 #HV10
+  lapply (IHT12 … HT20 ? ?) // /2 width=1/
+]
+qed.
+
+(* Basic_1: was: lift_d (right to left) *)
+theorem lift_trans_le: ∀d1,e1,T1,T. ⇧[d1, e1] T1 ≡ T →
+                       ∀d2,e2,T2. ⇧[d2, e2] T ≡ T2 → d2 ≤ d1 →
+                       ∃∃T0. ⇧[d2, e2] T1 ≡ T0 & ⇧[d1 + e2, e1] T0 ≡ T2.
+#d1 #e1 #T1 #T #H elim H -d1 -e1 -T1 -T
+[ #k #d1 #e1 #d2 #e2 #X #HX #_
+  >(lift_inv_sort1 … HX) -HX /2 width=3/
+| #i #d1 #e1 #Hid1 #d2 #e2 #X #HX #_
+  lapply (lt_to_le_to_lt … (d1+e2) Hid1 ?) // #Hie2
+  elim (lift_inv_lref1 … HX) -HX * #Hid2 #HX destruct /3 width=3/ /4 width=3/
+| #i #d1 #e1 #Hid1 #d2 #e2 #X #HX #Hd21
+  lapply (transitive_le … Hd21 Hid1) -Hd21 #Hid2
+  lapply (lift_inv_lref1_ge … HX ?) -HX /2 width=3/ #HX destruct
+  >plus_plus_comm_23 /4 width=3/
+| #p #d1 #e1 #d2 #e2 #X #HX #_
+  >(lift_inv_gref1 … HX) -HX /2 width=3/
+| #a #I #V1 #V2 #T1 #T2 #d1 #e1 #_ #_ #IHV12 #IHT12 #d2 #e2 #X #HX #Hd21
+  elim (lift_inv_bind1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct
+  elim (IHV12 … HV20 ?) -IHV12 -HV20 //
+  elim (IHT12 … HT20 ?) -IHT12 -HT20 /2 width=1/ /3 width=5/
+| #I #V1 #V2 #T1 #T2 #d1 #e1 #_ #_ #IHV12 #IHT12 #d2 #e2 #X #HX #Hd21
+  elim (lift_inv_flat1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct
+  elim (IHV12 … HV20 ?) -IHV12 -HV20 //
+  elim (IHT12 … HT20 ?) -IHT12 -HT20 // /3 width=5/
+]
+qed.
+
+(* Basic_1: was: lift_d (left to right) *)
+theorem lift_trans_ge: ∀d1,e1,T1,T. ⇧[d1, e1] T1 ≡ T →
+                       ∀d2,e2,T2. ⇧[d2, e2] T ≡ T2 → d1 + e1 ≤ d2 →
+                       ∃∃T0. ⇧[d2 - e1, e2] T1 ≡ T0 & ⇧[d1, e1] T0 ≡ T2.
+#d1 #e1 #T1 #T #H elim H -d1 -e1 -T1 -T
+[ #k #d1 #e1 #d2 #e2 #X #HX #_
+  >(lift_inv_sort1 … HX) -HX /2 width=3/
+| #i #d1 #e1 #Hid1 #d2 #e2 #X #HX #Hded
+  lapply (lt_to_le_to_lt … (d1+e1) Hid1 ?) // #Hid1e
+  lapply (lt_to_le_to_lt … (d2-e1) Hid1 ?) /2 width=1/ #Hid2e
+  lapply (lt_to_le_to_lt … Hid1e Hded) -Hid1e -Hded #Hid2
+  lapply (lift_inv_lref1_lt … HX ?) -HX // #HX destruct /3 width=3/
+| #i #d1 #e1 #Hid1 #d2 #e2 #X #HX #_
+  elim (lift_inv_lref1 … HX) -HX * #Hied #HX destruct /4 width=3/
+| #p #d1 #e1 #d2 #e2 #X #HX #_
+  >(lift_inv_gref1 … HX) -HX /2 width=3/
+| #a #I #V1 #V2 #T1 #T2 #d1 #e1 #_ #_ #IHV12 #IHT12 #d2 #e2 #X #HX #Hded
+  elim (lift_inv_bind1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct
+  elim (IHV12 … HV20 ?) -IHV12 -HV20 //
+  elim (IHT12 … HT20 ?) -IHT12 -HT20 /2 width=1/ #T
+  <plus_minus /2 width=2/ /3 width=5/
+| #I #V1 #V2 #T1 #T2 #d1 #e1 #_ #_ #IHV12 #IHT12 #d2 #e2 #X #HX #Hded
+  elim (lift_inv_flat1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct
+  elim (IHV12 … HV20 ?) -IHV12 -HV20 //
+  elim (IHT12 … HT20 ?) -IHT12 -HT20 // /3 width=5/
+]
+qed.
+
+(* Advanced properties ******************************************************)
+
+lemma lift_conf_O1: ∀T,T1,d1,e1. ⇧[d1, e1] T ≡ T1 → ∀T2,e2. ⇧[0, e2] T ≡ T2 →
+                    ∃∃T0. ⇧[0, e2] T1 ≡ T0 & ⇧[d1 + e2, e1] T2 ≡ T0.
+#T #T1 #d1 #e1 #HT1 #T2 #e2 #HT2
+elim (lift_total T1 0 e2) #T0 #HT10
+elim (lift_trans_le … HT1 … HT10 ?) -HT1 // #X #HTX #HT20
+lapply (lift_mono … HTX … HT2) -T #H destruct /2 width=3/
+qed.
+
+lemma lift_conf_be: ∀T,T1,d,e1. ⇧[d, e1] T ≡ T1 → ∀T2,e2. ⇧[d, e2] T ≡ T2 →
+                    e1 ≤ e2 → ⇧[d + e1, e2 - e1] T1 ≡ T2.
+#T #T1 #d #e1 #HT1 #T2 #e2 #HT2 #He12
+elim (lift_split … HT2 (d+e1) e1 ? ? ?) -HT2 // #X #H
+>(lift_mono … H … HT1) -T //
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/lift_lift_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/lift_lift_vector.ma
new file mode 100644 (file)
index 0000000..cdc1112
--- /dev/null
@@ -0,0 +1,30 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/lift_lift.ma".
+include "basic_2/substitution/lift_vector.ma".
+
+(* BASIC TERM VECTOR RELOCATION *********************************************)
+
+(* Main properies ***********************************************************)
+
+theorem liftv_mono: ∀Ts,U1s,d,e. ⇧[d,e] Ts ≡ U1s →
+                    ∀U2s:list term. ⇧[d,e] Ts ≡ U2s → U1s = U2s.
+#Ts #U1s #d #e #H elim H -Ts -U1s
+[ #U2s #H >(liftv_inv_nil1 … H) -H //
+| #Ts #U1s #T #U1 #HTU1 #_ #IHTU1s #X #H destruct
+  elim (liftv_inv_cons1 … H) -H #U2 #U2s #HTU2 #HTU2s #H destruct
+  >(lift_mono … HTU1 … HTU2) -T /3 width=1/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/lift_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/lift_vector.ma
new file mode 100644 (file)
index 0000000..35ecb65
--- /dev/null
@@ -0,0 +1,62 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/term_vector.ma".
+include "basic_2/substitution/lift.ma".
+
+(* BASIC TERM VECTOR RELOCATION *********************************************)
+
+inductive liftv (d,e:nat) : relation (list term) ≝
+| liftv_nil : liftv d e ◊ ◊
+| liftv_cons: ∀T1s,T2s,T1,T2.
+              ⇧[d, e] T1 ≡ T2 → liftv d e T1s T2s →
+              liftv d e (T1 @ T1s) (T2 @ T2s)
+.
+
+interpretation "relocation (vector)" 'RLift d e T1s T2s = (liftv d e T1s T2s).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact liftv_inv_nil1_aux: ∀T1s,T2s,d,e. ⇧[d, e] T1s ≡ T2s → T1s = ◊ → T2s = ◊.
+#T1s #T2s #d #e * -T1s -T2s //
+#T1s #T2s #T1 #T2 #_ #_ #H destruct
+qed.
+
+lemma liftv_inv_nil1: ∀T2s,d,e. ⇧[d, e] ◊ ≡ T2s → T2s = ◊.
+/2 width=5/ qed-.
+
+fact liftv_inv_cons1_aux: ∀T1s,T2s,d,e. ⇧[d, e] T1s ≡ T2s →
+                          ∀U1,U1s. T1s = U1 @ U1s →
+                          ∃∃U2,U2s. ⇧[d, e] U1 ≡ U2 & ⇧[d, e] U1s ≡ U2s &
+                                    T2s = U2 @ U2s.
+#T1s #T2s #d #e * -T1s -T2s
+[ #U1 #U1s #H destruct
+| #T1s #T2s #T1 #T2 #HT12 #HT12s #U1 #U1s #H destruct /2 width=5/
+]
+qed.
+
+lemma liftv_inv_cons1: ∀U1,U1s,T2s,d,e. ⇧[d, e] U1 @ U1s ≡ T2s →
+                       ∃∃U2,U2s. ⇧[d, e] U1 ≡ U2 & ⇧[d, e] U1s ≡ U2s &
+                                 T2s = U2 @ U2s.
+/2 width=3/ qed-.
+
+(* Basic properties *********************************************************)
+
+lemma liftv_total: ∀d,e. ∀T1s:list term. ∃T2s. ⇧[d, e] T1s ≡ T2s.
+#d #e #T1s elim T1s -T1s
+[ /2 width=2/
+| #T1 #T1s * #T2s #HT12s
+  elim (lift_total T1 d e) /3 width=2/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/lsubs.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/lsubs.ma
new file mode 100644 (file)
index 0000000..f27883b
--- /dev/null
@@ -0,0 +1,194 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/lenv_length.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR SUBSTITUTION ****************************)
+
+inductive lsubs: nat → nat → relation lenv ≝
+| lsubs_sort: ∀d,e. lsubs d e (⋆) (⋆)
+| lsubs_OO:   ∀L1,L2. lsubs 0 0 L1 L2
+| lsubs_abbr: ∀L1,L2,V,e. lsubs 0 e L1 L2 →
+              lsubs 0 (e + 1) (L1. ⓓV) (L2.ⓓV)
+| lsubs_abst: ∀L1,L2,I,V1,V2,e. lsubs 0 e L1 L2 →
+              lsubs 0 (e + 1) (L1. ⓑ{I}V1) (L2. ⓛV2)
+| lsubs_skip: ∀L1,L2,I1,I2,V1,V2,d,e.
+              lsubs d e L1 L2 → lsubs (d + 1) e (L1. ⓑ{I1} V1) (L2. ⓑ{I2} V2)
+.
+
+interpretation
+  "local environment refinement (substitution)"
+  'SubEq L1 d e L2 = (lsubs d e L1 L2).
+
+definition lsubs_trans: ∀S. (lenv → relation S) → Prop ≝ λS,R.
+                        ∀L2,s1,s2. R L2 s1 s2 →
+                        ∀L1,d,e. L1 ≼ [d, e] L2 → R L1 s1 s2.
+
+(* Basic properties *********************************************************)
+
+lemma lsubs_bind_eq: ∀L1,L2,e. L1 ≼ [0, e] L2 → ∀I,V.
+                     L1. ⓑ{I} V ≼ [0, e + 1] L2.ⓑ{I} V.
+#L1 #L2 #e #HL12 #I #V elim I -I /2 width=1/
+qed.
+
+lemma lsubs_abbr_lt: ∀L1,L2,V,e. L1 ≼ [0, e - 1] L2 → 0 < e → 
+                     L1. ⓓV ≼ [0, e] L2.ⓓV.
+#L1 #L2 #V #e #HL12 #He >(plus_minus_m_m e 1) // /2 width=1/
+qed.
+
+lemma lsubs_abst_lt: ∀L1,L2,I,V1,V2,e. L1 ≼ [0, e - 1] L2 → 0 < e →
+                     L1. ⓑ{I}V1 ≼ [0, e] L2. ⓛV2.
+#L1 #L2 #I #V1 #V2 #e #HL12 #He >(plus_minus_m_m e 1) // /2 width=1/
+qed.
+
+lemma lsubs_skip_lt: ∀L1,L2,d,e. L1 ≼ [d - 1, e] L2 → 0 < d →
+                     ∀I1,I2,V1,V2. L1. ⓑ{I1} V1 ≼ [d, e] L2. ⓑ{I2} V2.
+#L1 #L2 #d #e #HL12 #Hd >(plus_minus_m_m d 1) // /2 width=1/
+qed.
+
+lemma lsubs_bind_lt: ∀I,L1,L2,V,e. L1 ≼ [0, e - 1] L2 → 0 < e → 
+                     L1. ⓓV ≼ [0, e] L2. ⓑ{I}V.
+* /2 width=1/ qed.
+
+lemma lsubs_refl: ∀d,e,L. L ≼ [d, e] L.
+#d elim d -d
+[ #e elim e -e // #e #IHe #L elim L -L // /2 width=1/
+| #d #IHd #e #L elim L -L // /2 width=1/
+]
+qed.
+
+lemma TC_lsubs_trans: ∀S,R. lsubs_trans S R → lsubs_trans S (λL. (TC … (R L))).
+#S #R #HR #L1 #s1 #s2 #H elim H -s2
+[ /3 width=5/
+| #s #s2 #_ #Hs2 #IHs1 #L2 #d #e #HL12
+  lapply (HR … Hs2 … HL12) -HR -Hs2 -HL12 /3 width=3/
+]
+qed.
+
+(* Basic inversion lemmas ***************************************************) 
+
+fact lsubs_inv_atom1_aux: ∀L1,L2,d,e. L1 ≼ [d, e] L2 → L1 = ⋆ →
+                          L2 = ⋆ ∨ (d = 0 ∧ e = 0).
+#L1 #L2 #d #e * -L1 -L2 -d -e
+[ /2 width=1/
+| /3 width=1/
+| #L1 #L2 #W #e #_ #H destruct
+| #L1 #L2 #I #W1 #W2 #e #_ #H destruct
+| #L1 #L2 #I1 #I2 #W1 #W2 #d #e #_ #H destruct
+]
+qed.
+
+lemma lsubs_inv_atom1: ∀L2,d,e. ⋆ ≼ [d, e] L2 →
+                       L2 = ⋆ ∨ (d = 0 ∧ e = 0).
+/2 width=3/ qed-.
+
+fact lsubs_inv_skip1_aux: ∀L1,L2,d,e. L1 ≼ [d, e] L2 →
+                          ∀I1,K1,V1. L1 = K1.ⓑ{I1}V1 → 0 < d →
+                          ∃∃I2,K2,V2. K1 ≼ [d - 1, e] K2 & L2 = K2.ⓑ{I2}V2.
+#L1 #L2 #d #e * -L1 -L2 -d -e
+[ #d #e #I1 #K1 #V1 #H destruct
+| #L1 #L2 #I1 #K1 #V1 #_ #H
+  elim (lt_zero_false … H)
+| #L1 #L2 #W #e #_ #I1 #K1 #V1 #_ #H
+  elim (lt_zero_false … H)
+| #L1 #L2 #I #W1 #W2 #e #_ #I1 #K1 #V1 #_ #H
+  elim (lt_zero_false … H)
+| #L1 #L2 #J1 #J2 #W1 #W2 #d #e #HL12 #I1 #K1 #V1 #H #_ destruct /2 width=5/
+]
+qed.
+
+lemma lsubs_inv_skip1: ∀I1,K1,L2,V1,d,e. K1.ⓑ{I1}V1 ≼ [d, e] L2 → 0 < d →
+                       ∃∃I2,K2,V2. K1 ≼ [d - 1, e] K2 & L2 = K2.ⓑ{I2}V2.
+/2 width=5/ qed-.
+
+fact lsubs_inv_atom2_aux: ∀L1,L2,d,e. L1 ≼ [d, e] L2 → L2 = ⋆ →
+                          L1 = ⋆ ∨ (d = 0 ∧ e = 0).
+#L1 #L2 #d #e * -L1 -L2 -d -e
+[ /2 width=1/
+| /3 width=1/
+| #L1 #L2 #W #e #_ #H destruct
+| #L1 #L2 #I #W1 #W2 #e #_ #H destruct
+| #L1 #L2 #I1 #I2 #W1 #W2 #d #e #_ #H destruct
+]
+qed.
+
+lemma lsubs_inv_atom2: ∀L1,d,e. L1 ≼ [d, e] ⋆ →
+                       L1 = ⋆ ∨ (d = 0 ∧ e = 0).
+/2 width=3/ qed-.
+
+fact lsubs_inv_abbr2_aux: ∀L1,L2,d,e. L1 ≼ [d, e] L2 →
+                          ∀K2,V. L2 = K2.ⓓV → d = 0 → 0 < e →
+                          ∃∃K1. K1 ≼ [0, e - 1] K2 & L1 = K1.ⓓV.
+#L1 #L2 #d #e * -L1 -L2 -d -e
+[ #d #e #K1 #V #H destruct
+| #L1 #L2 #K1 #V #_ #_ #H
+  elim (lt_zero_false … H)
+| #L1 #L2 #W #e #HL12 #K1 #V #H #_ #_ destruct /2 width=3/
+| #L1 #L2 #I #W1 #W2 #e #_ #K1 #V #H destruct
+| #L1 #L2 #I1 #I2 #W1 #W2 #d #e #_ #K1 #V #_ >commutative_plus normalize #H destruct
+]
+qed.
+
+lemma lsubs_inv_abbr2: ∀L1,K2,V,e. L1 ≼ [0, e] K2.ⓓV → 0 < e →
+                       ∃∃K1. K1 ≼ [0, e - 1] K2 & L1 = K1.ⓓV.
+/2 width=5/ qed-.
+
+fact lsubs_inv_skip2_aux: ∀L1,L2,d,e. L1 ≼ [d, e] L2 →
+                          ∀I2,K2,V2. L2 = K2.ⓑ{I2}V2 → 0 < d →
+                          ∃∃I1,K1,V1. K1 ≼ [d - 1, e] K2 & L1 = K1.ⓑ{I1}V1.
+#L1 #L2 #d #e * -L1 -L2 -d -e
+[ #d #e #I1 #K1 #V1 #H destruct
+| #L1 #L2 #I1 #K1 #V1 #_ #H
+  elim (lt_zero_false … H)
+| #L1 #L2 #W #e #_ #I1 #K1 #V1 #_ #H
+  elim (lt_zero_false … H)
+| #L1 #L2 #I #W1 #W2 #e #_ #I1 #K1 #V1 #_ #H
+  elim (lt_zero_false … H)
+| #L1 #L2 #J1 #J2 #W1 #W2 #d #e #HL12 #I1 #K1 #V1 #H #_ destruct /2 width=5/
+]
+qed.
+
+lemma lsubs_inv_skip2: ∀I2,L1,K2,V2,d,e. L1 ≼ [d, e] K2.ⓑ{I2}V2 → 0 < d →
+                       ∃∃I1,K1,V1. K1 ≼ [d - 1, e] K2 & L1 = K1.ⓑ{I1}V1.
+/2 width=5/ qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+fact lsubs_fwd_length_full1_aux: ∀L1,L2,d,e. L1 ≼ [d, e] L2 →
+                                 d = 0 → e = |L1| → |L1| ≤ |L2|.
+#L1 #L2 #d #e #H elim H -L1 -L2 -d -e normalize
+[ //
+| /2 width=1/
+| /3 width=1/
+| /3 width=1/
+| #L1 #L2 #_ #_ #_ #_ #d #e #_ #_ >commutative_plus normalize #H destruct
+]
+qed.
+
+lemma lsubs_fwd_length_full1: ∀L1,L2. L1 ≼ [0, |L1|] L2 → |L1| ≤ |L2|.
+/2 width=5/ qed-.
+
+fact lsubs_fwd_length_full2_aux: ∀L1,L2,d,e. L1 ≼ [d, e] L2 →
+                                 d = 0 → e = |L2| → |L2| ≤ |L1|.
+#L1 #L2 #d #e #H elim H -L1 -L2 -d -e normalize
+[ //
+| /2 width=1/
+| /3 width=1/
+| /3 width=1/
+| #L1 #L2 #_ #_ #_ #_ #d #e #_ #_ >commutative_plus normalize #H destruct
+]
+qed.
+
+lemma lsubs_fwd_length_full2: ∀L1,L2. L1 ≼ [0, |L2|] L2 → |L2| ≤ |L1|.
+/2 width=5/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/lsubs_sfr.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/lsubs_sfr.ma
new file mode 100644 (file)
index 0000000..b71f25e
--- /dev/null
@@ -0,0 +1,73 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/lsubs.ma".
+
+(* LOCAL ENVIRONMENT REFINEMENT FOR SUBSTITUTION ****************************)
+
+(* bottom element of the refinement *)
+definition sfr: nat → nat → predicate lenv ≝
+   λd,e. NF_sn … (lsubs d e) (lsubs d e …).
+
+interpretation
+   "local environment full refinement (substitution)"
+   'SubEqBottom d e L = (sfr d e L).
+
+(* Basic properties *********************************************************)
+
+lemma sfr_atom: ∀d,e. ≽ [d, e] ⋆.
+#d #e #L #H
+elim (lsubs_inv_atom2 … H) -H
+[ #H destruct //
+| * #H1 #H2 destruct //
+]
+qed.
+
+lemma sfr_OO: ∀L. ≽ [0, 0] L.
+// qed.
+
+lemma sfr_abbr: ∀L,V,e. ≽ [0, e] L → ≽ [0, e + 1] L.ⓓV.
+#L #V #e #HL #K #H
+elim (lsubs_inv_abbr2 … H ?) -H // <minus_plus_m_m #X #HLX #H destruct
+lapply (HL … HLX) -HL -HLX /2 width=1/
+qed.
+
+lemma sfr_abbr_O: ∀L,V. ≽[0,1] L.ⓓV.
+#L #V
+@(sfr_abbr … 0) //
+qed.
+
+lemma sfr_skip: ∀I,L,V,d,e. ≽ [d, e] L → ≽ [d + 1, e] L.ⓑ{I}V.
+#I #L #V #d #e #HL #K #H
+elim (lsubs_inv_skip2 … H ?) -H // <minus_plus_m_m #J #X #W #HLX #H destruct
+lapply (HL … HLX) -HL -HLX /2 width=1/
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma sfr_inv_bind: ∀I,L,V,e. ≽ [0, e] L.ⓑ{I}V → 0 < e →
+                    ≽ [0, e - 1] L ∧ I = Abbr.
+#I #L #V #e #HL #He
+lapply (HL (L.ⓓV) ?) /2 width=1/ #H
+elim (lsubs_inv_abbr2 … H ?) -H // #K #_ #H destruct
+@conj // #L #HKL
+lapply (HL (L.ⓓV) ?) -HL /2 width=1/ -HKL #H
+elim (lsubs_inv_abbr2 … H ?) -H // -He #X #HLX #H destruct //
+qed-.
+
+lemma sfr_inv_skip: ∀I,L,V,d,e. ≽ [d, e] L.ⓑ{I}V → 0 < d → ≽ [d - 1, e] L.
+#I #L #V #d #e #HL #Hd #K #HLK
+lapply (HL (K.ⓑ{I}V) ?) -HL /2 width=1/ -HLK #H
+elim (lsubs_inv_skip2 … H ?) -H // -Hd #J #X #W #HKX #H destruct //
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/tps.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/tps.ma
new file mode 100644 (file)
index 0000000..ab11536
--- /dev/null
@@ -0,0 +1,285 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/ldrop_append.ma".
+
+(* PARALLEL SUBSTITUTION ON TERMS *******************************************)
+
+inductive tps: nat → nat → lenv → relation term ≝
+| tps_atom : ∀L,I,d,e. tps d e L (⓪{I}) (⓪{I})
+| tps_subst: ∀L,K,V,W,i,d,e. d ≤ i → i < d + e →
+             ⇩[0, i] L ≡ K. ⓓV → ⇧[0, i + 1] V ≡ W → tps d e L (#i) W
+| tps_bind : ∀L,a,I,V1,V2,T1,T2,d,e.
+             tps d e L V1 V2 → tps (d + 1) e (L. ⓑ{I} V2) T1 T2 →
+             tps d e L (ⓑ{a,I} V1. T1) (ⓑ{a,I} V2. T2)
+| tps_flat : ∀L,I,V1,V2,T1,T2,d,e.
+             tps d e L V1 V2 → tps d e L T1 T2 →
+             tps d e L (ⓕ{I} V1. T1) (ⓕ{I} V2. T2)
+.
+
+interpretation "parallel substritution (term)"
+   'PSubst L T1 d e T2 = (tps d e L T1 T2).
+
+(* Basic properties *********************************************************)
+
+lemma tps_lsubs_trans: ∀L1,T1,T2,d,e. L1 ⊢ T1 ▶ [d, e] T2 →
+                       ∀L2. L2 ≼ [d, e] L1 → L2 ⊢ T1 ▶ [d, e] T2.
+#L1 #T1 #T2 #d #e #H elim H -L1 -T1 -T2 -d -e
+[ //
+| #L1 #K1 #V #W #i #d #e #Hdi #Hide #HLK1 #HVW #L2 #HL12
+  elim (ldrop_lsubs_ldrop2_abbr … HL12 … HLK1 ? ?) -HL12 -HLK1 // /2 width=4/
+| /4 width=1/
+| /3 width=1/
+]
+qed.
+
+lemma tps_refl: ∀T,L,d,e. L ⊢ T ▶ [d, e] T.
+#T elim T -T //
+#I elim I -I /2 width=1/
+qed.
+
+(* Basic_1: was: subst1_ex *)
+lemma tps_full: ∀K,V,T1,L,d. ⇩[0, d] L ≡ (K. ⓓV) →
+                ∃∃T2,T. L ⊢ T1 ▶ [d, 1] 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=4/
+| * [ #a ] #I #W1 #U1 #IHW1 #IHU1 #L #d #HLK
+  elim (IHW1 … HLK) -IHW1 #W2 #W #HW12 #HW2
+  [ elim (IHU1 (L. ⓑ{I} W2) (d+1) ?) -IHU1 /2 width=1/ -HLK /3 width=9/
+  | elim (IHU1 … HLK) -IHU1 -HLK /3 width=8/
+  ]
+]
+qed.
+
+lemma tps_weak: ∀L,T1,T2,d1,e1. L ⊢ T1 ▶ [d1, e1] T2 →
+                ∀d2,e2. d2 ≤ d1 → d1 + e1 ≤ d2 + e2 →
+                L ⊢ T1 ▶ [d2, e2] T2.
+#L #T1 #T2 #d1 #e1 #H elim H -L -T1 -T2 -d1 -e1
+[ //
+| #L #K #V #W #i #d1 #e1 #Hid1 #Hide1 #HLK #HVW #d2 #e2 #Hd12 #Hde12
+  lapply (transitive_le … Hd12 … Hid1) -Hd12 -Hid1 #Hid2
+  lapply (lt_to_le_to_lt … Hide1 … Hde12) -Hide1 /2 width=4/
+| /4 width=3/
+| /4 width=1/
+]
+qed.
+
+lemma tps_weak_top: ∀L,T1,T2,d,e.
+                    L ⊢ T1 ▶ [d, e] T2 → L ⊢ T1 ▶ [d, |L| - d] T2.
+#L #T1 #T2 #d #e #H elim H -L -T1 -T2 -d -e
+[ //
+| #L #K #V #W #i #d #e #Hdi #_ #HLK #HVW
+  lapply (ldrop_fwd_ldrop2_length … HLK) #Hi
+  lapply (le_to_lt_to_lt … Hdi Hi) /3 width=4/
+| normalize /2 width=1/
+| /2 width=1/
+]
+qed.
+
+lemma tps_weak_all: ∀L,T1,T2,d,e.
+                    L ⊢ T1 ▶ [d, e] T2 → L ⊢ T1 ▶ [0, |L|] T2.
+#L #T1 #T2 #d #e #HT12
+lapply (tps_weak … HT12 0 (d + e) ? ?) -HT12 // #HT12
+lapply (tps_weak_top … HT12) //
+qed.
+
+lemma tps_split_up: ∀L,T1,T2,d,e. L ⊢ T1 ▶ [d, e] T2 → ∀i. d ≤ i → i ≤ d + e →
+                    ∃∃T. L ⊢ T1 ▶ [d, i - d] T & L ⊢ T ▶ [i, d + e - i] T2.
+#L #T1 #T2 #d #e #H elim H -L -T1 -T2 -d -e
+[ /2 width=3/
+| #L #K #V #W #i #d #e #Hdi #Hide #HLK #HVW #j #Hdj #Hjde
+  elim (lt_or_ge i j)
+  [ -Hide -Hjde
+    >(plus_minus_m_m j d) in ⊢ (% → ?); // -Hdj /3 width=4/
+  | -Hdi -Hdj #Hid
+    generalize in match Hide; -Hide (**) (* rewriting in the premises, rewrites in the goal too *)
+    >(plus_minus_m_m … Hjde) in ⊢ (% → ?); -Hjde /4 width=4/
+  ]
+| #L #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #i #Hdi #Hide
+  elim (IHV12 i ? ?) -IHV12 // #V #HV1 #HV2
+  elim (IHT12 (i + 1) ? ?) -IHT12 /2 width=1/
+  -Hdi -Hide >arith_c1x #T #HT1 #HT2
+  lapply (tps_lsubs_trans … HT1 (L. ⓑ{I} V) ?) -HT1 /3 width=5/
+| #L #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #i #Hdi #Hide
+  elim (IHV12 i ? ?) -IHV12 // elim (IHT12 i ? ?) -IHT12 //
+  -Hdi -Hide /3 width=5/
+]
+qed.
+
+lemma tps_split_down: ∀L,T1,T2,d,e. L ⊢ T1 ▶ [d, e] T2 →
+                      ∀i. d ≤ i → i ≤ d + e →
+                      ∃∃T. L ⊢ T1 ▶ [i, d + e - i] T &
+                           L ⊢ T ▶ [d, i - d] T2.
+#L #T1 #T2 #d #e #H elim H -L -T1 -T2 -d -e
+[ /2 width=3/
+| #L #K #V #W #i #d #e #Hdi #Hide #HLK #HVW #j #Hdj #Hjde
+  elim (lt_or_ge i j)
+  [ -Hide -Hjde >(plus_minus_m_m j d) in ⊢ (% → ?); // -Hdj /4 width=4/
+  | -Hdi -Hdj
+    >(plus_minus_m_m (d+e) j) in Hide; // -Hjde /3 width=4/
+  ]
+| #L #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #i #Hdi #Hide
+  elim (IHV12 i ? ?) -IHV12 // #V #HV1 #HV2
+  elim (IHT12 (i + 1) ? ?) -IHT12 /2 width=1/
+  -Hdi -Hide >arith_c1x #T #HT1 #HT2
+  lapply (tps_lsubs_trans … HT1 (L. ⓑ{I} V) ?) -HT1 /3 width=5/
+| #L #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #i #Hdi #Hide
+  elim (IHV12 i ? ?) -IHV12 // elim (IHT12 i ? ?) -IHT12 //
+  -Hdi -Hide /3 width=5/
+]
+qed.
+
+lemma tps_append: ∀K,T1,T2,d,e. K ⊢ T1 ▶ [d, e] T2 →
+                  ∀L. L @@ K ⊢ T1 ▶ [d, e] T2.
+#K #T1 #T2 #d #e #H elim H -K -T1 -T2 -d -e // /2 width=1/
+#K #K0 #V #W #i #d #e #Hdi #Hide #HK0 #HVW #L
+lapply (ldrop_fwd_ldrop2_length … HK0) #H
+@(tps_subst … (L@@K0) … HVW) // (**) (* /3/ does not work *)
+@(ldrop_O1_append_sn_le … HK0) /2 width=2/
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+fact tps_inv_atom1_aux: ∀L,T1,T2,d,e. L ⊢ T1 ▶ [d, e] T2 → ∀I. T1 = ⓪{I} →
+                        T2 = ⓪{I} ∨
+                        ∃∃K,V,i. d ≤ i & i < d + e &
+                                 ⇩[O, i] L ≡ K. ⓓV &
+                                 ⇧[O, i + 1] V ≡ T2 &
+                                 I = LRef i.
+#L #T1 #T2 #d #e * -L -T1 -T2 -d -e
+[ #L #I #d #e #J #H destruct /2 width=1/
+| #L #K #V #T2 #i #d #e #Hdi #Hide #HLK #HVT2 #I #H destruct /3 width=8/
+| #L #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #J #H destruct
+| #L #I #V1 #V2 #T1 #T2 #d #e #_ #_ #J #H destruct
+]
+qed.
+
+lemma tps_inv_atom1: ∀L,T2,I,d,e. L ⊢ ⓪{I} ▶ [d, e] T2 →
+                     T2 = ⓪{I} ∨
+                     ∃∃K,V,i. d ≤ i & i < d + e &
+                              ⇩[O, i] L ≡ K. ⓓV &
+                              ⇧[O, i + 1] V ≡ T2 &
+                              I = LRef i.
+/2 width=3/ qed-.
+
+
+(* Basic_1: was: subst1_gen_sort *)
+lemma tps_inv_sort1: ∀L,T2,k,d,e. L ⊢ ⋆k ▶ [d, e] T2 → T2 = ⋆k.
+#L #T2 #k #d #e #H
+elim (tps_inv_atom1 … H) -H //
+* #K #V #i #_ #_ #_ #_ #H destruct
+qed-.
+
+(* Basic_1: was: subst1_gen_lref *)
+lemma tps_inv_lref1: ∀L,T2,i,d,e. L ⊢ #i ▶ [d, e] T2 →
+                     T2 = #i ∨
+                     ∃∃K,V. d ≤ i & i < d + e &
+                            ⇩[O, i] L ≡ K. ⓓV &
+                            ⇧[O, i + 1] V ≡ T2.
+#L #T2 #i #d #e #H
+elim (tps_inv_atom1 … H) -H /2 width=1/
+* #K #V #j #Hdj #Hjde #HLK #HVT2 #H destruct /3 width=4/
+qed-.
+
+lemma tps_inv_gref1: ∀L,T2,p,d,e. L ⊢ §p ▶ [d, e] T2 → T2 = §p.
+#L #T2 #p #d #e #H
+elim (tps_inv_atom1 … H) -H //
+* #K #V #i #_ #_ #_ #_ #H destruct
+qed-.
+
+fact tps_inv_bind1_aux: ∀d,e,L,U1,U2. L ⊢ U1 ▶ [d, e] U2 →
+                        ∀a,I,V1,T1. U1 = ⓑ{a,I} V1. T1 →
+                        ∃∃V2,T2. L ⊢ V1 ▶ [d, e] V2 & 
+                                 L. ⓑ{I} V2 ⊢ T1 ▶ [d + 1, e] T2 &
+                                 U2 = ⓑ{a,I} V2. T2.
+#d #e #L #U1 #U2 * -d -e -L -U1 -U2
+[ #L #k #d #e #a #I #V1 #T1 #H destruct
+| #L #K #V #W #i #d #e #_ #_ #_ #_ #a #I #V1 #T1 #H destruct
+| #L #b #J #V1 #V2 #T1 #T2 #d #e #HV12 #HT12 #a #I #V #T #H destruct /2 width=5/
+| #L #J #V1 #V2 #T1 #T2 #d #e #_ #_ #a #I #V #T #H destruct
+]
+qed.
+
+lemma tps_inv_bind1: ∀d,e,L,a,I,V1,T1,U2. L ⊢ ⓑ{a,I} V1. T1 ▶ [d, e] U2 →
+                     ∃∃V2,T2. L ⊢ V1 ▶ [d, e] V2 & 
+                              L. ⓑ{I} V2 ⊢ T1 ▶ [d + 1, e] T2 &
+                              U2 = ⓑ{a,I} V2. T2.
+/2 width=3/ qed-.
+
+fact tps_inv_flat1_aux: ∀d,e,L,U1,U2. L ⊢ U1 ▶ [d, e] U2 →
+                        ∀I,V1,T1. U1 = ⓕ{I} V1. T1 →
+                        ∃∃V2,T2. L ⊢ V1 ▶ [d, e] V2 & L ⊢ T1 ▶ [d, e] T2 &
+                                 U2 =  ⓕ{I} V2. T2.
+#d #e #L #U1 #U2 * -d -e -L -U1 -U2
+[ #L #k #d #e #I #V1 #T1 #H destruct
+| #L #K #V #W #i #d #e #_ #_ #_ #_ #I #V1 #T1 #H destruct
+| #L #a #J #V1 #V2 #T1 #T2 #d #e #_ #_ #I #V #T #H destruct
+| #L #J #V1 #V2 #T1 #T2 #d #e #HV12 #HT12 #I #V #T #H destruct /2 width=5/
+]
+qed.
+
+lemma tps_inv_flat1: ∀d,e,L,I,V1,T1,U2. L ⊢ ⓕ{I} V1. T1 ▶ [d, e] U2 →
+                     ∃∃V2,T2. L ⊢ V1 ▶ [d, e] V2 & L ⊢ T1 ▶ [d, e] T2 &
+                              U2 =  ⓕ{I} V2. T2.
+/2 width=3/ qed-.
+
+fact tps_inv_refl_O2_aux: ∀L,T1,T2,d,e. L ⊢ T1 ▶ [d, e] T2 → e = 0 → T1 = T2.
+#L #T1 #T2 #d #e #H elim H -L -T1 -T2 -d -e
+[ //
+| #L #K #V #W #i #d #e #Hdi #Hide #_ #_ #H destruct
+  lapply (le_to_lt_to_lt … Hdi … Hide) -Hdi -Hide <plus_n_O #Hdd
+  elim (lt_refl_false … Hdd)
+| /3 width=1/
+| /3 width=1/
+]
+qed.
+
+lemma tps_inv_refl_O2: ∀L,T1,T2,d. L ⊢ T1 ▶ [d, 0] T2 → T1 = T2.
+/2 width=6/ qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma tps_fwd_tw: ∀L,T1,T2,d,e. L ⊢ T1 ▶ [d, e] T2 → #{T1} ≤ #{T2}.
+#L #T1 #T2 #d #e #H elim H -L -T1 -T2 -d -e normalize
+/3 by monotonic_le_plus_l, le_plus/ (**) (* just /3 width=1/ is too slow *)
+qed-.
+
+lemma tps_fwd_shift1: ∀L1,L,T1,T,d,e. L ⊢ L1 @@ T1 ▶[d, e] T →
+                      ∃∃L2,T2. |L1| = |L2| & T = L2 @@ T2.
+#L1 @(lenv_ind_dx … L1) -L1 normalize
+[ #L #T1 #T #d #e #HT1
+  @(ex2_2_intro … (⋆)) // (**) (* explicit constructor *)
+| #I #L1 #V1 #IH #L #T1 #X #d #e
+  >shift_append_assoc normalize #H
+  elim (tps_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 25:
+            subst0_gen_sort subst0_gen_lref subst0_gen_head subst0_gen_lift_lt
+            subst0_gen_lift_false subst0_gen_lift_ge subst0_refl subst0_trans
+            subst0_lift_lt subst0_lift_ge subst0_lift_ge_S subst0_lift_ge_s
+            subst0_subst0 subst0_subst0_back subst0_weight_le subst0_weight_lt
+            subst0_confluence_neq subst0_confluence_eq subst0_tlt_head
+            subst0_confluence_lift subst0_tlt
+            subst1_head subst1_gen_head subst1_lift_S subst1_confluence_lift 
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/tps_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/tps_lift.ma
new file mode 100644 (file)
index 0000000..5ffc949
--- /dev/null
@@ -0,0 +1,294 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/ldrop_ldrop.ma".
+include "basic_2/substitution/tps.ma".
+
+(* PARTIAL SUBSTITUTION ON TERMS ********************************************)
+
+(* Advanced inversion lemmas ************************************************)
+
+fact tps_inv_S2_aux: ∀L,T1,T2,d,e1. L ⊢ T1 ▶ [d, e1] T2 → ∀e2. e1 = e2 + 1 → 
+                     ∀K,V. ⇩[0, d] L ≡ K. ⓛV → L ⊢ T1 ▶ [d + 1, e2] T2.
+#L #T1 #T2 #d #e1 #H elim H -L -T1 -T2 -d -e1
+[ //
+| #L #K0 #V0 #W #i #d #e1 #Hdi #Hide1 #HLK0 #HV0 #e2 #He12 #K #V #HLK destruct
+  elim (lt_or_ge i (d+1)) #HiSd
+  [ -Hide1 -HV0
+    lapply (le_to_le_to_eq … Hdi ?) /2 width=1/ #H destruct
+    lapply (ldrop_mono … HLK0 … HLK) #H destruct
+  | -V -Hdi /2 width=4/
+  ]
+| /4 width=3/
+| /3 width=3/
+]
+qed.
+
+lemma tps_inv_S2: ∀L,T1,T2,d,e. L ⊢ T1 ▶ [d, e + 1] T2 →
+                  ∀K,V. ⇩[0, d] L ≡ K. ⓛV → L ⊢ T1 ▶ [d + 1, e] T2.
+/2 width=3/ qed-.
+
+lemma tps_inv_refl_SO2: ∀L,T1,T2,d. L ⊢ T1 ▶ [d, 1] T2 →
+                        ∀K,V. ⇩[0, d] L ≡ K. ⓛV → T1 = T2.
+#L #T1 #T2 #d #HT12 #K #V #HLK
+lapply (tps_inv_S2 … T1 T2 … 0 … HLK) -K // -HT12 #HT12
+lapply (tps_inv_refl_O2 … HT12) -HT12 //
+qed-.
+
+(* Relocation properties ****************************************************)
+
+(* Basic_1: was: subst1_lift_lt *)
+lemma tps_lift_le: ∀K,T1,T2,dt,et. K ⊢ T1 ▶ [dt, et] T2 →
+                   ∀L,U1,U2,d,e. ⇩[d, e] L ≡ K →
+                   ⇧[d, e] T1 ≡ U1 → ⇧[d, e] T2 ≡ U2 →
+                   dt + et ≤ d →
+                   L ⊢ U1 ▶ [dt, et] U2.
+#K #T1 #T2 #dt #et #H elim H -K -T1 -T2 -dt -et
+[ #K #I #dt #et #L #U1 #U2 #d #e #_ #H1 #H2 #_
+  >(lift_mono … H1 … H2) -H1 -H2 //
+| #K #KV #V #W #i #dt #et #Hdti #Hidet #HKV #HVW #L #U1 #U2 #d #e #HLK #H #HWU2 #Hdetd
+  lapply (lt_to_le_to_lt … Hidet … Hdetd) -Hdetd #Hid
+  lapply (lift_inv_lref1_lt … H … Hid) -H #H destruct
+  elim (lift_trans_ge … HVW … HWU2 ?) -W // <minus_plus #W #HVW #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 #_ #HVY
+  >(lift_mono … HVY … HVW) -Y -HVW #H destruct /2 width=4/
+| #K #a #I #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #d #e #HLK #H1 #H2 #Hdetd
+  elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
+  elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct
+  @tps_bind [ /2 width=6/ | @IHT12 /2 width=6/ ] (**) (* /3 width=6/ is too slow, arith3 needed to avoid crash *)
+| #K #I #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #d #e #HLK #H1 #H2 #Hdetd
+  elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
+  elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct /3 width=6/
+]
+qed.
+
+lemma tps_lift_be: ∀K,T1,T2,dt,et. K ⊢ T1 ▶ [dt, et] T2 →
+                   ∀L,U1,U2,d,e. ⇩[d, e] L ≡ K →
+                   ⇧[d, e] T1 ≡ U1 → ⇧[d, e] T2 ≡ U2 →
+                   dt ≤ d → d ≤ dt + et →
+                   L ⊢ U1 ▶ [dt, et + e] U2.
+#K #T1 #T2 #dt #et #H elim H -K -T1 -T2 -dt -et
+[ #K #I #dt #et #L #U1 #U2 #d #e #_ #H1 #H2 #_ #_
+  >(lift_mono … H1 … H2) -H1 -H2 //
+| #K #KV #V #W #i #dt #et #Hdti #Hidet #HKV #HVW #L #U1 #U2 #d #e #HLK #H #HWU2 #Hdtd #_
+  elim (lift_inv_lref1 … H) -H * #Hid #H destruct
+  [ -Hdtd
+    lapply (lt_to_le_to_lt … (dt+et+e) Hidet ?) // -Hidet #Hidete
+    elim (lift_trans_ge … HVW … HWU2 ?) -W // <minus_plus #W #HVW #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 #_ #HVY
+    >(lift_mono … HVY … HVW) -V #H destruct /2 width=4/
+  | -Hdti
+    lapply (transitive_le … Hdtd Hid) -Hdtd #Hdti
+    lapply (lift_trans_be … HVW … HWU2 ? ?) -W // /2 width=1/ >plus_plus_comm_23 #HVU2
+    lapply (ldrop_trans_ge_comm … HLK … HKV ?) -K // -Hid /3 width=4/
+  ]
+| #K #a #I #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #d #e #HLK #H1 #H2 #Hdtd #Hddet
+  elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
+  elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct
+  @tps_bind [ /2 width=6/ | @IHT12 [3,4: // | skip |5,6: /2 width=1/ | /2 width=1/ ] 
+            ] (**) (* /3 width=6/ is too slow, simplification like tps_lift_le is too slow *)
+| #K #I #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #d #e #HLK #H1 #H2 #Hdetd
+  elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
+  elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct /3 width=6/
+]
+qed.
+
+(* Basic_1: was: subst1_lift_ge *)
+lemma tps_lift_ge: ∀K,T1,T2,dt,et. K ⊢ T1 ▶ [dt, et] T2 →
+                   ∀L,U1,U2,d,e. ⇩[d, e] L ≡ K →
+                   ⇧[d, e] T1 ≡ U1 → ⇧[d, e] T2 ≡ U2 →
+                   d ≤ dt →
+                   L ⊢ U1 ▶ [dt + e, et] U2.
+#K #T1 #T2 #dt #et #H elim H -K -T1 -T2 -dt -et
+[ #K #I #dt #et #L #U1 #U2 #d #e #_ #H1 #H2 #_
+  >(lift_mono … H1 … H2) -H1 -H2 //
+| #K #KV #V #W #i #dt #et #Hdti #Hidet #HKV #HVW #L #U1 #U2 #d #e #HLK #H #HWU2 #Hddt
+  lapply (transitive_le … Hddt … Hdti) -Hddt #Hid
+  lapply (lift_inv_lref1_ge … H … Hid) -H #H destruct
+  lapply (lift_trans_be … HVW … HWU2 ? ?) -W // /2 width=1/ >plus_plus_comm_23 #HVU2
+  lapply (ldrop_trans_ge_comm … HLK … HKV ?) -K // -Hid /3 width=4/
+| #K #a #I #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #d #e #HLK #H1 #H2 #Hddt
+  elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
+  elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct
+  @tps_bind [ /2 width=5/ | /3 width=5/ ] (**) (* explicit constructor *)
+| #K #I #V1 #V2 #T1 #T2 #dt #et #_ #_ #IHV12 #IHT12 #L #U1 #U2 #d #e #HLK #H1 #H2 #Hddt
+  elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1
+  elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct /3 width=5/
+]
+qed.
+
+(* Basic_1: was: subst1_gen_lift_lt *)
+lemma tps_inv_lift1_le: ∀L,U1,U2,dt,et. L ⊢ U1 ▶ [dt, et] U2 →
+                        ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                        dt + et ≤ d →
+                        ∃∃T2. K ⊢ T1 ▶ [dt, et] T2 & ⇧[d, e] T2 ≡ U2.
+#L #U1 #U2 #dt #et #H elim H -L -U1 -U2 -dt -et
+[ #L * #i #dt #et #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 #KV #V #W #i #dt #et #Hdti #Hidet #HLKV #HVW #K #d #e #HLK #T1 #H #Hdetd
+  lapply (lt_to_le_to_lt … Hidet … Hdetd) -Hdetd #Hid
+  lapply (lift_inv_lref2_lt … H … Hid) -H #H destruct
+  elim (ldrop_conf_lt … HLK … HLKV ?) -L // #L #U #HKL #_ #HUV
+  elim (lift_trans_le … HUV … HVW ?) -V // >minus_plus <plus_minus_m_m // -Hid /3 width=4/
+| #L #a #I #V1 #V2 #U1 #U2 #dt #et #_ #_ #IHV12 #IHU12 #K #d #e #HLK #X #H #Hdetd
+  elim (lift_inv_bind2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
+  elim (IHV12 … HLK … HWV1 ?) -V1 // #W2 #HW12 #HWV2
+  elim (IHU12 … HTU1 ?) -IHU12 -HTU1 [3: /2 width=1/ |4: @ldrop_skip // |2: skip ] -HLK -Hdetd (**) (* /3 width=5/ is too slow *)
+  /3 width=5/
+| #L #I #V1 #V2 #U1 #U2 #dt #et #_ #_ #IHV12 #IHU12 #K #d #e #HLK #X #H #Hdetd
+  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.
+
+lemma tps_inv_lift1_be: ∀L,U1,U2,dt,et. L ⊢ U1 ▶ [dt, et] U2 →
+                        ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                        dt ≤ d → d + e ≤ dt + et →
+                        ∃∃T2. K ⊢ T1 ▶ [dt, et - e] T2 & ⇧[d, e] T2 ≡ U2.
+#L #U1 #U2 #dt #et #H elim H -L -U1 -U2 -dt -et
+[ #L * #i #dt #et #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 #KV #V #W #i #dt #et #Hdti #Hidet #HLKV #HVW #K #d #e #HLK #T1 #H #Hdtd #Hdedet
+  lapply (le_fwd_plus_plus_ge … Hdtd … Hdedet) #Heet
+  elim (lift_inv_lref2 … H) -H * #Hid #H destruct
+  [ -Hdtd -Hidet
+    lapply (lt_to_le_to_lt … (dt + (et - e)) Hid ?) [ <le_plus_minus /2 width=1/ ] -Hdedet #Hidete
+    elim (ldrop_conf_lt … HLK … HLKV ?) -L // #L #U #HKL #_ #HUV
+    elim (lift_trans_le … HUV … HVW ?) -V // >minus_plus <plus_minus_m_m // -Hid /3 width=4/
+  | -Hdti -Hdedet
+    lapply (transitive_le … (i - e) Hdtd ?) /2 width=1/ -Hdtd #Hdtie
+    elim (le_inv_plus_l … Hid) #Hdie #Hei
+    lapply (ldrop_conf_ge … HLK … HLKV ?) -L // #HKV
+    elim (lift_split … HVW d (i - e + 1) ? ? ?) -HVW [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 #H
+    @ex2_1_intro [3: @H | skip | @tps_subst [3,5,6: // |1,2: skip | >commutative_plus >plus_minus // /2 width=1/ ] ] (**) (* explicit constructor, uses monotonic_lt_minus_l *)
+  ]
+| #L #a #I #V1 #V2 #U1 #U2 #dt #et #_ #_ #IHV12 #IHU12 #K #d #e #HLK #X #H #Hdtd #Hdedet
+  elim (lift_inv_bind2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
+  elim (IHV12 … HLK … HWV1 ? ?) -V1 // #W2 #HW12 #HWV2
+  elim (IHU12 … HTU1 ? ?) -U1 [5: @ldrop_skip // |2: skip |3: >plus_plus_comm_23 >(plus_plus_comm_23 dt) /2 width=1/ |4: /2 width=1/ ] (**) (* 29s without the rewrites *)
+  /3 width=5/
+| #L #I #V1 #V2 #U1 #U2 #dt #et #_ #_ #IHV12 #IHU12 #K #d #e #HLK #X #H #Hdtd #Hdedet
+  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.
+
+(* Basic_1: was: subst1_gen_lift_ge *)
+lemma tps_inv_lift1_ge: ∀L,U1,U2,dt,et. L ⊢ U1 ▶ [dt, et] U2 →
+                        ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                        d + e ≤ dt →
+                        ∃∃T2. K ⊢ T1 ▶ [dt - e, et] T2 & ⇧[d, e] T2 ≡ U2.
+#L #U1 #U2 #dt #et #H elim H -L -U1 -U2 -dt -et
+[ #L * #i #dt #et #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 #KV #V #W #i #dt #et #Hdti #Hidet #HLKV #HVW #K #d #e #HLK #T1 #H #Hdedt
+  lapply (transitive_le … Hdedt … Hdti) #Hdei
+  elim (le_inv_plus_l … Hdedt) -Hdedt #_ #Hedt
+  elim (le_inv_plus_l … Hdei) #Hdie #Hei
+  lapply (lift_inv_lref2_ge … H … Hdei) -H #H destruct
+  lapply (ldrop_conf_ge … HLK … HLKV ?) -L // #HKV
+  elim (lift_split … HVW d (i - e + 1) ? ? ?) -HVW [4: // |3: /2 width=1/ |2: /3 width=1/ ] -Hdei -Hdie 
+  #V0 #HV10 >plus_minus // <minus_minus // /2 width=1/ <minus_n_n <plus_n_O #H
+  @ex2_1_intro [3: @H | skip | @tps_subst [5,6: // |1,2: skip | /2 width=1/ | >plus_minus // /2 width=1/ ] ] (**) (* explicit constructor, uses monotonic_lt_minus_l *)
+| #L #a #I #V1 #V2 #U1 #U2 #dt #et #_ #_ #IHV12 #IHU12 #K #d #e #HLK #X #H #Hdetd
+  elim (lift_inv_bind2 … H) -H #W1 #T1 #HWV1 #HTU1 #H destruct
+  elim (le_inv_plus_l … Hdetd) #_ #Hedt
+  elim (IHV12 … HLK … HWV1 ?) -V1 // #W2 #HW12 #HWV2
+  elim (IHU12 … HTU1 ?) -U1 [4: @ldrop_skip // |2: skip |3: /2 width=1/ ]
+  <plus_minus // /3 width=5/
+| #L #I #V1 #V2 #U1 #U2 #dt #et #_ #_ #IHV12 #IHU12 #K #d #e #HLK #X #H #Hdetd
+  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.
+
+(* Basic_1: was: subst1_gen_lift_eq *)
+lemma tps_inv_lift1_eq: ∀L,U1,U2,d,e.
+                        L ⊢ U1 ▶ [d, e] U2 → ∀T1. ⇧[d, e] T1 ≡ U1 → U1 = U2.
+#L #U1 #U2 #d #e #H elim H -L -U1 -U2 -d -e
+[ //
+| #L #K #V #W #i #d #e #Hdi #Hide #_ #_ #T1 #H
+  elim (lift_inv_lref2 … H) -H * #H
+  [ lapply (le_to_lt_to_lt … Hdi … H) -Hdi -H #H
+    elim (lt_refl_false … H)
+  | lapply (lt_to_le_to_lt … Hide … H) -Hide -H #H
+    elim (lt_refl_false … H)
+  ]
+| #L #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #X #HX
+  elim (lift_inv_bind2 … HX) -HX #V #T #HV1 #HT1 #H destruct
+  >IHV12 // >IHT12 //
+| #L #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #X #HX
+  elim (lift_inv_flat2 … HX) -HX #V #T #HV1 #HT1 #H destruct
+  >IHV12 // >IHT12 //
+]
+qed.
+(*
+      Theorem subst0_gen_lift_rev_ge: (t1,v,u2,i,h,d:?) 
+                                      (subst0 i v t1 (lift h d u2)) ->
+                                      (le (plus d h) i) ->
+                                      (EX u1 | (subst0 (minus i h) v u1 u2) &
+                                              t1 = (lift h d u1)
+                                     ).
+
+
+      Theorem subst0_gen_lift_rev_lelt: (t1,v,u2,i,h,d:?)
+                                        (subst0 i v t1 (lift h d u2)) ->
+                                        (le d i) -> (lt i (plus d h)) ->
+                                       (EX u1 | t1 = (lift (minus (plus d h) (S i)) (S i) u1)).
+*)
+lemma tps_inv_lift1_ge_up: ∀L,U1,U2,dt,et. L ⊢ U1 ▶ [dt, et] U2 →
+                           ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                           d ≤ dt → dt ≤ d + e → d + e ≤ dt + et →
+                           ∃∃T2. K ⊢ T1 ▶ [d, dt + et - (d + e)] T2 & ⇧[d, e] T2 ≡ U2.
+#L #U1 #U2 #dt #et #HU12 #K #d #e #HLK #T1 #HTU1 #Hddt #Hdtde #Hdedet
+elim (tps_split_up … HU12 (d + e) ? ?) -HU12 // -Hdedet #U #HU1 #HU2
+lapply (tps_weak … HU1 d e ? ?) -HU1 // [ >commutative_plus /2 width=1/ ] -Hddt -Hdtde #HU1
+lapply (tps_inv_lift1_eq … HU1 … HTU1) -HU1 #HU1 destruct
+elim (tps_inv_lift1_ge … HU2 … HLK … HTU1 ?) -U -L // <minus_plus_m_m /2 width=3/
+qed.
+
+lemma tps_inv_lift1_be_up: ∀L,U1,U2,dt,et. L ⊢ U1 ▶ [dt, et] U2 →
+                           ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                           dt ≤ d → dt + et ≤ d + e →
+                           ∃∃T2. K ⊢ T1 ▶ [dt, d - dt] T2 & ⇧[d, e] T2 ≡ U2.
+#L #U1 #U2 #dt #et #HU12 #K #d #e #HLK #T1 #HTU1 #Hdtd #Hdetde
+lapply (tps_weak … HU12 dt (d + e - dt) ? ?) -HU12 // /2 width=3/ -Hdetde #HU12
+elim (tps_inv_lift1_be … HU12 … HLK … HTU1 ? ?) -U1 -L // /2 width=3/
+qed.
+
+lemma tps_inv_lift1_le_up: ∀L,U1,U2,dt,et. L ⊢ U1 ▶ [dt, et] U2 →
+                           ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                           dt ≤ d → d ≤ dt + et → dt + et ≤ d + e →
+                           ∃∃T2. K ⊢ T1 ▶ [dt, d - dt] T2 & ⇧[d, e] T2 ≡ U2.
+#L #U1 #U2 #dt #et #HU12 #K #d #e #HLK #T1 #HTU1 #Hdtd #Hddet #Hdetde
+elim (tps_split_up … HU12 d ? ?) -HU12 // #U #HU1 #HU2
+elim (tps_inv_lift1_le … HU1 … HLK … HTU1 ?) -U1 [2: >commutative_plus /2 width=1/ ] -Hdtd #T #HT1 #HTU
+lapply (tps_weak … HU2 d e ? ?) -HU2 // [ >commutative_plus <plus_minus_m_m // ] -Hddet -Hdetde #HU2
+lapply (tps_inv_lift1_eq … HU2 … HTU) -L #H destruct /2 width=3/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/tps_tps.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/tps_tps.ma
new file mode 100644 (file)
index 0000000..3882750
--- /dev/null
@@ -0,0 +1,132 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/tps_lift.ma".
+
+(* PARALLEL SUBSTITUTION ON TERMS *******************************************)
+
+(* Main properties **********************************************************)
+
+(* Basic_1: was: subst1_confluence_eq *)
+theorem tps_conf_eq: ∀L,T0,T1,d1,e1. L ⊢ T0 ▶ [d1, e1] T1 →
+                     ∀T2,d2,e2. L ⊢ T0 ▶ [d2, e2] T2 →
+                     ∃∃T. L ⊢ T1 ▶ [d2, e2] T & L ⊢ T2 ▶ [d1, e1] T.
+#L #T0 #T1 #d1 #e1 #H elim H -L -T0 -T1 -d1 -e1
+[ /2 width=3/
+| #L #K1 #V1 #T1 #i0 #d1 #e1 #Hd1 #Hde1 #HLK1 #HVT1 #T2 #d2 #e2 #H
+  elim (tps_inv_lref1 … H) -H
+  [ #HX destruct /4 width=4/
+  | -Hd1 -Hde1 * #K2 #V2 #_ #_ #HLK2 #HVT2
+    lapply (ldrop_mono … HLK1 … HLK2) -HLK1 -HLK2 #H destruct
+    >(lift_mono … HVT1 … HVT2) -HVT1 -HVT2 /2 width=3/
+  ]
+| #L #a #I #V0 #V1 #T0 #T1 #d1 #e1 #_ #_ #IHV01 #IHT01 #X #d2 #e2 #HX
+  elim (tps_inv_bind1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
+  lapply (tps_lsubs_trans … HT02 (L. ⓑ{I} V1) ?) -HT02 /2 width=1/ #HT02
+  elim (IHV01 … HV02) -V0 #V #HV1 #HV2
+  elim (IHT01 … HT02) -T0 #T #HT1 #HT2
+  lapply (tps_lsubs_trans … HT1 (L. ⓑ{I} V) ?) -HT1 /2 width=1/
+  lapply (tps_lsubs_trans … HT2 (L. ⓑ{I} V) ?) -HT2 /3 width=5/
+| #L #I #V0 #V1 #T0 #T1 #d1 #e1 #_ #_ #IHV01 #IHT01 #X #d2 #e2 #HX
+  elim (tps_inv_flat1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
+  elim (IHV01 … HV02) -V0
+  elim (IHT01 … HT02) -T0 /3 width=5/
+]
+qed.
+
+(* Basic_1: was: subst1_confluence_neq *)
+theorem tps_conf_neq: ∀L1,T0,T1,d1,e1. L1 ⊢ T0 ▶ [d1, e1] T1 →
+                      ∀L2,T2,d2,e2. L2 ⊢ T0 ▶ [d2, e2] T2 →
+                      (d1 + e1 ≤ d2 ∨ d2 + e2 ≤ d1) →
+                      ∃∃T. L2 ⊢ T1 ▶ [d2, e2] T & L1 ⊢ T2 ▶ [d1, e1] T.
+#L1 #T0 #T1 #d1 #e1 #H elim H -L1 -T0 -T1 -d1 -e1
+[ /2 width=3/
+| #L1 #K1 #V1 #T1 #i0 #d1 #e1 #Hd1 #Hde1 #HLK1 #HVT1 #L2 #T2 #d2 #e2 #H1 #H2
+  elim (tps_inv_lref1 … H1) -H1
+  [ #H destruct /4 width=4/
+  | -HLK1 -HVT1 * #K2 #V2 #Hd2 #Hde2 #_ #_ elim H2 -H2 #Hded
+    [ -Hd1 -Hde2
+      lapply (transitive_le … Hded Hd2) -Hded -Hd2 #H
+      lapply (lt_to_le_to_lt … Hde1 H) -Hde1 -H #H
+      elim (lt_refl_false … H)
+    | -Hd2 -Hde1
+      lapply (transitive_le … Hded Hd1) -Hded -Hd1 #H
+      lapply (lt_to_le_to_lt … Hde2 H) -Hde2 -H #H
+      elim (lt_refl_false … H)
+    ]
+  ]
+| #L1 #a #I #V0 #V1 #T0 #T1 #d1 #e1 #_ #_ #IHV01 #IHT01 #L2 #X #d2 #e2 #HX #H
+  elim (tps_inv_bind1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
+  elim (IHV01 … HV02 H) -V0 #V #HV1 #HV2
+  elim (IHT01 … HT02 ?) -T0
+  [ -H #T #HT1 #HT2
+    lapply (tps_lsubs_trans … HT1 (L2. ⓑ{I} V) ?) -HT1 /2 width=1/
+    lapply (tps_lsubs_trans … HT2 (L1. ⓑ{I} V) ?) -HT2 /2 width=1/ /3 width=5/
+  | -HV1 -HV2 >plus_plus_comm_23 >plus_plus_comm_23 in ⊢ (? ? %); elim H -H #H
+    [ @or_introl | @or_intror ] /2 by monotonic_le_plus_l/ (**) (* /3 / is too slow *)
+  ]
+| #L1 #I #V0 #V1 #T0 #T1 #d1 #e1 #_ #_ #IHV01 #IHT01 #L2 #X #d2 #e2 #HX #H
+  elim (tps_inv_flat1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
+  elim (IHV01 … HV02 H) -V0
+  elim (IHT01 … HT02 H) -T0 -H /3 width=5/
+]
+qed.
+
+(* Note: the constant 1 comes from tps_subst *)
+(* Basic_1: was: subst1_trans *)
+theorem tps_trans_ge: ∀L,T1,T0,d,e. L ⊢ T1 ▶ [d, e] T0 →
+                      ∀T2. L ⊢ T0 ▶ [d, 1] T2 → 1 ≤ e →
+                      L ⊢ T1 ▶ [d, e] T2.
+#L #T1 #T0 #d #e #H elim H -L -T1 -T0 -d -e
+[ #L #I #d #e #T2 #H #He
+  elim (tps_inv_atom1 … H) -H
+  [ #H destruct //
+  | * #K #V #i #Hd2i #Hide2 #HLK #HVT2 #H destruct
+    lapply (lt_to_le_to_lt … (d + e) Hide2 ?) /2 width=4/
+  ]
+| #L #K #V #V2 #i #d #e #Hdi #Hide #HLK #HVW #T2 #HVT2 #He
+  lapply (tps_weak … HVT2 0 (i +1) ? ?) -HVT2 /2 width=1/ #HVT2
+  <(tps_inv_lift1_eq … HVT2 … HVW) -HVT2 /2 width=4/
+| #L #a #I #V1 #V0 #T1 #T0 #d #e #_ #_ #IHV10 #IHT10 #X #H #He
+  elim (tps_inv_bind1 … H) -H #V2 #T2 #HV02 #HT02 #H destruct
+  lapply (tps_lsubs_trans … HT02 (L. ⓑ{I} V0) ?) -HT02 /2 width=1/ #HT02
+  lapply (IHT10 … HT02 He) -T0 #HT12
+  lapply (tps_lsubs_trans … HT12 (L. ⓑ{I} V2) ?) -HT12 /2 width=1/ /3 width=1/
+| #L #I #V1 #V0 #T1 #T0 #d #e #_ #_ #IHV10 #IHT10 #X #H #He
+  elim (tps_inv_flat1 … H) -H #V2 #T2 #HV02 #HT02 #H destruct /3 width=1/
+]
+qed.
+
+theorem tps_trans_down: ∀L,T1,T0,d1,e1. L ⊢ T1 ▶ [d1, e1] T0 →
+                        ∀T2,d2,e2. L ⊢ T0 ▶ [d2, e2] T2 → d2 + e2 ≤ d1 →
+                        ∃∃T. L ⊢ T1 ▶ [d2, e2] T & L ⊢ T ▶ [d1, e1] T2.
+#L #T1 #T0 #d1 #e1 #H elim H -L -T1 -T0 -d1 -e1
+[ /2 width=3/
+| #L #K #V #W #i1 #d1 #e1 #Hdi1 #Hide1 #HLK #HVW #T2 #d2 #e2 #HWT2 #Hde2d1
+  lapply (transitive_le … Hde2d1 Hdi1) -Hde2d1 #Hde2i1
+  lapply (tps_weak … HWT2 0 (i1 + 1) ? ?) -HWT2 normalize /2 width=1/ -Hde2i1 #HWT2
+  <(tps_inv_lift1_eq … HWT2 … HVW) -HWT2 /4 width=4/
+| #L #a #I #V1 #V0 #T1 #T0 #d1 #e1 #_ #_ #IHV10 #IHT10 #X #d2 #e2 #HX #de2d1
+  elim (tps_inv_bind1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
+  lapply (tps_lsubs_trans … HT02 (L. ⓑ{I} V0) ?) -HT02 /2 width=1/ #HT02
+  elim (IHV10 … HV02 ?) -IHV10 -HV02 // #V
+  elim (IHT10 … HT02 ?) -T0 /2 width=1/ #T #HT1 #HT2
+  lapply (tps_lsubs_trans … HT1 (L. ⓑ{I} V) ?) -HT1 /2 width=1/
+  lapply (tps_lsubs_trans … HT2 (L. ⓑ{I} V2) ?) -HT2 /2 width=1/ /3 width=6/
+| #L #I #V1 #V0 #T1 #T0 #d1 #e1 #_ #_ #IHV10 #IHT10 #X #d2 #e2 #HX #de2d1
+  elim (tps_inv_flat1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct
+  elim (IHV10 … HV02 ?) -V0 //
+  elim (IHT10 … HT02 ?) -T0 // /3 width=6/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/delift.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/delift.ma
new file mode 100644 (file)
index 0000000..e8ac23d
--- /dev/null
@@ -0,0 +1,108 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/tpss.ma".
+
+(* INVERSE BASIC TERM RELOCATION  *******************************************)
+
+definition delift: nat → nat → lenv → relation term ≝
+                   λd,e,L,T1,T2. ∃∃T. L ⊢ T1 ▶* [d, e] T & ⇧[d, e] T2 ≡ T.
+
+interpretation "inverse basic relocation (term)"
+   'TSubst L T1 d e T2 = (delift d e L T1 T2).
+
+(* Basic properties *********************************************************)
+
+lemma lift_delift: ∀T1,T2,d,e. ⇧[d, e] T1 ≡ T2 →
+                   ∀L. L ⊢ ▼*[d, e] T2 ≡ T1.
+/2 width=3/ qed.
+
+lemma delift_refl_O2: ∀L,T,d. L ⊢ ▼*[d, 0] T ≡ T.
+/2 width=3/ qed.
+
+lemma delift_lsubs_trans: ∀L1,T1,T2,d,e. L1 ⊢ ▼*[d, e] T1 ≡ T2 →
+                          ∀L2. L2 ≼ [d, e] L1 → L2 ⊢ ▼*[d, e] T1 ≡ T2.
+#L1 #T1 #T2 #d #e * /3 width=3/
+qed.
+
+lemma delift_sort: ∀L,d,e,k. L ⊢ ▼*[d, e] ⋆k ≡ ⋆k.
+/2 width=3/ qed.
+
+lemma delift_lref_lt: ∀L,d,e,i. i < d → L ⊢ ▼*[d, e] #i ≡ #i.
+/3 width=3/ qed.
+
+lemma delift_lref_ge: ∀L,d,e,i. d + e ≤ i → L ⊢ ▼*[d, e] #i ≡ #(i - e).
+/3 width=3/ qed.
+
+lemma delift_gref: ∀L,d,e,p. L ⊢ ▼*[d, e] §p ≡ §p.
+/2 width=3/ qed.
+
+lemma delift_bind: ∀a,I,L,V1,V2,T1,T2,d,e.
+                   L ⊢ ▼*[d, e] V1 ≡ V2 → L. ⓑ{I} V2 ⊢ ▼*[d+1, e] T1 ≡ T2 →
+                   L ⊢ ▼*[d, e] ⓑ{a,I} V1. T1 ≡ ⓑ{a,I} V2. T2.
+#a #I #L #V1 #V2 #T1 #T2 #d #e * #V #HV1 #HV2 * #T #HT1 #HT2
+lapply (tpss_lsubs_trans … HT1 (L. ⓑ{I} V) ?) -HT1 /2 width=1/ /3 width=5/
+qed.
+
+lemma delift_flat: ∀I,L,V1,V2,T1,T2,d,e.
+                   L ⊢ ▼*[d, e] V1 ≡ V2 → L ⊢ ▼*[d, e] T1 ≡ T2 →
+                   L ⊢ ▼*[d, e] ⓕ{I} V1. T1 ≡ ⓕ{I} V2. T2.
+#I #L #V1 #V2 #T1 #T2 #d #e * #V #HV1 #HV2 * /3 width=5/
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma delift_inv_sort1: ∀L,U2,d,e,k. L ⊢ ▼*[d, e] ⋆k ≡ U2 → U2 = ⋆k.
+#L #U2 #d #e #k * #U #HU
+>(tpss_inv_sort1 … HU) -HU #HU2
+>(lift_inv_sort2 … HU2) -HU2 //
+qed-.
+
+lemma delift_inv_gref1: ∀L,U2,d,e,p. L ⊢ ▼*[d, e] §p ≡ U2 → U2 = §p.
+#L #U #d #e #p * #U #HU
+>(tpss_inv_gref1 … HU) -HU #HU2
+>(lift_inv_gref2 … HU2) -HU2 //
+qed-.
+
+lemma delift_inv_bind1: ∀a,I,L,V1,T1,U2,d,e. L ⊢ ▼*[d, e] ⓑ{a,I} V1. T1 ≡ U2 →
+                        ∃∃V2,T2. L ⊢ ▼*[d, e] V1 ≡ V2 &
+                                 L. ⓑ{I} V2 ⊢ ▼*[d+1, e] T1 ≡ T2 &
+                                 U2 = ⓑ{a,I} V2. T2.
+#a #I #L #V1 #T1 #U2 #d #e * #U #HU #HU2
+elim (tpss_inv_bind1 … HU) -HU #V #T #HV1 #HT1 #X destruct
+elim (lift_inv_bind2 … HU2) -HU2 #V2 #T2 #HV2 #HT2
+lapply (tpss_lsubs_trans … HT1 (L. ⓑ{I} V2) ?) -HT1 /2 width=1/ /3 width=5/
+qed-.
+
+lemma delift_inv_flat1: ∀I,L,V1,T1,U2,d,e. L ⊢ ▼*[d, e] ⓕ{I} V1. T1 ≡ U2 →
+                        ∃∃V2,T2. L ⊢ ▼*[d, e] V1 ≡ V2 &
+                                 L ⊢ ▼*[d, e] T1 ≡ T2 &
+                                 U2 = ⓕ{I} V2. T2.
+#I #L #V1 #T1 #U2 #d #e * #U #HU #HU2
+elim (tpss_inv_flat1 … HU) -HU #V #T #HV1 #HT1 #X destruct
+elim (lift_inv_flat2 … HU2) -HU2 /3 width=5/
+qed-.
+
+lemma delift_inv_refl_O2: ∀L,T1,T2,d. L ⊢ ▼*[d, 0] T1 ≡ T2 → T1 = T2.
+#L #T1 #T2 #d * #T #HT1
+>(tpss_inv_refl_O2 … HT1) -HT1 #HT2
+>(lift_inv_refl_O2 … HT2) -HT2 //
+qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma delift_fwd_tw: ∀L,T1,T2,d,e. L ⊢ ▼*[d, e] T1 ≡ T2 → #{T1} ≤ #{T2}.
+#L #T1 #T2 #d #e * #T #HT1 #HT2
+>(tw_lift … HT2) -T2 /2 width=4 by tpss_fwd_tw /
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/delift_alt.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/delift_alt.ma
new file mode 100644 (file)
index 0000000..9a3eb1b
--- /dev/null
@@ -0,0 +1,100 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/delift_lift.ma".
+
+(* INVERSE BASIC TERM RELOCATION  *******************************************)
+
+(* alternative definition of inverse basic term relocation *)
+inductive delifta: nat → nat → lenv → relation term ≝
+| delifta_sort   : ∀L,d,e,k. delifta d e L (⋆k) (⋆k)
+| delifta_lref_lt: ∀L,d,e,i. i < d → delifta d e L (#i) (#i)
+| delifta_lref_be: ∀L,K,V1,V2,W2,i,d,e. d ≤ i → i < d + e →
+                   ⇩[0, i] L ≡ K. ⓓV1 → delifta 0 (d + e - i - 1) K V1 V2 →
+                   ⇧[0, d] V2 ≡ W2 → delifta d e L (#i) W2
+| delifta_lref_ge: ∀L,d,e,i. d + e ≤ i → delifta d e L (#i) (#(i - e))
+| delifta_gref   : ∀L,d,e,p. delifta d e L (§p) (§p)
+| delifta_bind   : ∀L,a,I,V1,V2,T1,T2,d,e.
+                   delifta d e L V1 V2 → delifta (d + 1) e (L. ⓑ{I} V2) T1 T2 →
+                   delifta d e L (ⓑ{a,I} V1. T1) (ⓑ{a,I} V2. T2)
+| delifta_flat   : ∀L,I,V1,V2,T1,T2,d,e.
+                   delifta d e L V1 V2 → delifta d e L T1 T2 →
+                   delifta d e L (ⓕ{I} V1. T1) (ⓕ{I} V2. T2)
+.
+
+interpretation "inverse basic relocation (term) alternative"
+   'TSubstAlt L T1 d e T2 = (delifta d e L T1 T2).
+
+(* Basic properties *********************************************************)
+
+lemma delifta_lsubs_trans: ∀L1,T1,T2,d,e. L1 ⊢ ▼▼*[d, e] T1 ≡ T2 →
+                           ∀L2. L2 ≼ [d, e] L1 → L2 ⊢ ▼▼*[d, e] T1 ≡ T2.
+#L1 #T1 #T2 #d #e #H elim H -L1 -T1 -T2 -d -e // /2 width=1/
+[ #L1 #K1 #V1 #V2 #W2 #i #d #e #Hdi #Hide #HLK1 #_ #HVW2 #IHV12 #L2 #HL12
+  elim (ldrop_lsubs_ldrop2_abbr … HL12 … HLK1 ? ?) -HL12 -HLK1 // /3 width=6/
+| /4 width=1/
+| /3 width=1/
+]
+qed.
+
+lemma delift_delifta: ∀L,T1,T2,d,e. L ⊢ ▼*[d, e] T1 ≡ T2 → L ⊢ ▼▼*[d, e] T1 ≡ T2.
+#L #T1 @(fw_ind … L T1) -L -T1 #L #T1 elim T1 -T1
+[ * #i #IH #T2 #d #e #H
+  [ >(delift_inv_sort1 … H) -H //
+  | elim (delift_inv_lref1 … H) -H * /2 width=1/
+    #K #V1 #V2 #Hdi #Hide #HLK #HV12 #HVT2
+    lapply (ldrop_pair2_fwd_fw … HLK) #H
+    lapply (IH … HV12) // -H /2 width=6/
+  | >(delift_inv_gref1 … H) -H //
+  ]
+| * [ #a ] #I #V1 #T1 #_ #_ #IH #X #d #e #H
+  [ elim (delift_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+    lapply (delift_lsubs_trans … HT12 (L.ⓑ{I}V1) ?) -HT12 /2 width=1/ #HT12
+    lapply (IH … HV12) -HV12 // #HV12
+    lapply (IH … HT12) -IH -HT12 /2 width=1/ #HT12
+    lapply (delifta_lsubs_trans … HT12 (L.ⓑ{I}V2) ?) -HT12 /2 width=1/
+  | elim (delift_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+    lapply (IH … HV12) -HV12 //
+    lapply (IH … HT12) -IH -HT12 // /2 width=1/
+  ]
+]
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma delifta_delift: ∀L,T1,T2,d,e. L ⊢ ▼▼*[d, e] T1 ≡ T2 → L ⊢ ▼*[d, e] T1 ≡ T2.
+#L #T1 #T2 #d #e #H elim H -L -T1 -T2 -d -e // /2 width=1/ /2 width=6/
+qed-. 
+
+lemma delift_ind_alt: ∀R:ℕ→ℕ→lenv→relation term.
+                      (∀L,d,e,k. R d e L (⋆k) (⋆k)) →
+                      (∀L,d,e,i. i < d → R d e L (#i) (#i)) →
+                      (∀L,K,V1,V2,W2,i,d,e. d ≤ i → i < d + e →
+                       ⇩[O, i] L ≡ K.ⓓV1 → K ⊢ ▼*[O, d + e - i - 1] V1 ≡ V2 →
+                       ⇧[O, d] V2 ≡ W2 → R O (d+e-i-1) K V1 V2 → R d e L #i W2
+                      ) →
+                      (∀L,d,e,i. d + e ≤ i → R d e L (#i) (#(i - e))) →
+                      (∀L,d,e,p. R d e L (§p) (§p)) →
+                      (∀L,a,I,V1,V2,T1,T2,d,e. L ⊢ ▼*[d, e] V1 ≡ V2 →
+                       L.ⓑ{I}V2 ⊢ ▼*[d + 1, e] T1 ≡ T2 → R d e L V1 V2 →
+                       R (d+1) e (L.ⓑ{I}V2) T1 T2 → R d e L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2)
+                      ) →
+                      (∀L,I,V1,V2,T1,T2,d,e. L ⊢ ▼*[d, e] V1 ≡ V2 →
+                       L⊢ ▼*[d, e] T1 ≡ T2 → R d e L V1 V2 →
+                       R d e L T1 T2 → R d e L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2)
+                      ) →
+                      ∀d,e,L,T1,T2. L ⊢ ▼*[d, e] T1 ≡ T2 → R d e L T1 T2.
+#R #H1 #H2 #H3 #H4 #H5 #H6 #H7 #d #e #L #T1 #T2 #H elim (delift_delifta … H) -L -T1 -T2 -d -e
+// /2 width=1 by delifta_delift/ /3 width=1 by delifta_delift/ /3 width=7 by delifta_delift/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/delift_delift.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/delift_delift.ma
new file mode 100644 (file)
index 0000000..a5c5635
--- /dev/null
@@ -0,0 +1,29 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/tpss_tpss.ma".
+include "basic_2/unfold/delift.ma".
+
+(* INVERSE BASIC TERM RELOCATION  *******************************************)
+
+(* Main properties **********************************************************)
+
+theorem delift_mono: ∀L,T,T1,T2,d,e.
+                     L ⊢ ▼*[d, e] T ≡ T1 → L ⊢ ▼*[d, e] T ≡ T2 → T1 = T2.
+#L #T #T1 #T2 #d #e * #U1 #H1TU1 #H2TU1 * #U2 #H1TU2 #H2TU2
+elim (tpss_conf_eq … H1TU1 … H1TU2) -T #U #HU1 #HU2
+lapply (tpss_inv_lift1_eq … HU1 … H2TU1) -HU1 #H destruct
+lapply (tpss_inv_lift1_eq … HU2 … H2TU2) -HU2 #H destruct
+lapply (lift_inj … H2TU1 … H2TU2) //
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/delift_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/delift_lift.ma
new file mode 100644 (file)
index 0000000..01ee610
--- /dev/null
@@ -0,0 +1,167 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/ldrop_sfr.ma".
+include "basic_2/unfold/tpss_lift.ma".
+include "basic_2/unfold/delift.ma".
+
+(* INVERSE BASIC TERM RELOCATION  *******************************************)
+
+(* Advanced properties ******************************************************)
+
+lemma delift_lref_be: ∀L,K,V1,V2,U2,i,d,e. d ≤ i → i < d + e →
+                      ⇩[0, i] L ≡ K. ⓓV1 → K ⊢ ▼*[0, d + e - i - 1] V1 ≡ V2 →
+                      ⇧[0, d] V2 ≡ U2 → L ⊢ ▼*[d, e] #i ≡ U2.
+#L #K #V1 #V2 #U2 #i #d #e #Hdi #Hide #HLK * #V #HV1 #HV2 #HVU2
+elim (lift_total V 0 (i+1)) #U #HVU
+lapply (lift_trans_be … HV2 … HVU ? ?) -HV2 // >minus_plus <plus_minus_m_m /2 width=1/ #HV2U 
+lapply (lift_conf_be … HVU2 … HV2U ?) //
+>commutative_plus in ⊢ (??%??→?); <minus_plus_m_m /3 width=6/ 
+qed.
+
+fact sfr_delift_aux: ∀L,T,T1,d,e. d + e ≤ |L| → ≽ [d, e] L → T = T1 →
+                     ∃T2. L ⊢ ▼*[d, e] T1 ≡ T2.
+#L #T @(fw_ind … L T) -L -T #L #T #IH * * /2 width=2/
+[ #i #d #e #Hde #HL #H destruct
+  elim (lt_or_ge i d) #Hdi [ /3 width=2/ ]
+  elim (lt_or_ge i (d+e)) #Hide [2: /3 width=2/ ]
+  lapply (lt_to_le_to_lt … Hide Hde) #Hi
+  elim (ldrop_O1_lt … Hi) -Hi #I #K #V1 #HLK
+  lapply (sfr_inv_ldrop … HLK … HL ? ?) // #H destruct
+  lapply (ldrop_pair2_fwd_fw … HLK (#i)) #HKL
+  lapply (ldrop_fwd_ldrop2 … HLK) #HLK0
+  lapply (ldrop_fwd_O1_length … HLK0) #H
+  lapply (sfr_ldrop_trans_be_up … HLK0 … HL ? ?) -HLK0 -HL
+  [1,2: /2 width=1/ | <minus_n_O <minus_plus ] #HK
+  elim (IH … HKL … HK ?) -IH -HKL -HK
+  [3: // |2: skip |4: >H -H /2 width=1/ ] -Hde -H #V2 #V12 (**) (* H erased two times *)
+  elim (lift_total V2 0 d) /3 width=7/
+| #a #I #V1 #T1 #d #e #Hde #HL #H destruct
+  elim (IH … V1 … Hde HL ?) [2,4: // |3: skip ] #V2 #HV12
+  elim (IH (L.ⓑ{I}V1) T1 ? ? (d+1) e ? ? ?) -IH [3,6: // |2: skip |4,5: /2 width=1/ ] -Hde -HL #T2 #HT12
+  lapply (delift_lsubs_trans … HT12 (L.ⓑ{I}V2) ?) -HT12 /2 width=1/ /3 width=4/
+| #I #V1 #T1 #d #e #Hde #HL #H destruct
+  elim (IH … V1 … Hde HL ?) [2,4: // |3: skip ] #V2 #HV12
+  elim (IH … T1 … Hde HL ?) -IH -Hde -HL [3,4: // |2: skip ] /3 width=2/
+]
+qed.
+
+lemma sfr_delift: ∀L,T1,d,e. d + e ≤ |L| → ≽ [d, e] L →
+                  ∃T2. L ⊢ ▼*[d, e] T1 ≡ T2.
+/2 width=2/ qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma delift_inv_lref1_lt: ∀L,U2,i,d,e. L ⊢ ▼*[d, e] #i ≡ U2 → i < d → U2 = #i.
+#L #U2 #i #d #e * #U #HU #HU2 #Hid
+elim (tpss_inv_lref1 … HU) -HU
+[ #H destruct >(lift_inv_lref2_lt … HU2) //
+| * #K #V1 #V2 #Hdi
+  lapply (lt_to_le_to_lt … Hid Hdi) -Hid -Hdi #Hi
+  elim (lt_refl_false … Hi)
+]
+qed-.
+
+lemma delift_inv_lref1_be: ∀L,U2,d,e,i. L ⊢ ▼*[d, e] #i ≡ U2 →
+                           d ≤ i → i < d + e →
+                           ∃∃K,V1,V2. ⇩[0, i] L ≡ K. ⓓV1 &
+                                      K ⊢ ▼*[0, d + e - i - 1] V1 ≡ V2 &
+                                      ⇧[0, d] V2 ≡ U2.
+#L #U2 #d #e #i * #U #HU #HU2 #Hdi #Hide
+elim (tpss_inv_lref1 … HU) -HU
+[ #H destruct elim (lift_inv_lref2_be … HU2 ? ?) //
+| * #K #V1 #V #_ #_ #HLK #HV1 #HVU
+  elim (lift_div_be … HVU … HU2 ? ?) -U // /2 width=1/ /3 width=6/
+]
+qed-.
+
+lemma delift_inv_lref1_ge: ∀L,U2,i,d,e. L ⊢ ▼*[d, e] #i ≡ U2 →
+                           d + e ≤ i → U2 = #(i - e).
+#L #U2 #i #d #e * #U #HU #HU2 #Hdei
+elim (tpss_inv_lref1 … HU) -HU
+[ #H destruct >(lift_inv_lref2_ge … HU2) //
+| * #K #V1 #V2 #_ #Hide
+  lapply (lt_to_le_to_lt … Hide Hdei) -Hide -Hdei #Hi
+  elim (lt_refl_false … Hi)
+]
+qed-.
+
+lemma delift_inv_lref1: ∀L,U2,i,d,e. L ⊢ ▼*[d, e] #i ≡ U2 →
+                        ∨∨ (i < d ∧ U2 = #i) 
+                        |  (∃∃K,V1,V2. d ≤ i & i < d + e &
+                                       ⇩[0, i] L ≡ K. ⓓV1 &
+                                       K ⊢ ▼*[0, d + e - i - 1] V1 ≡ V2 &
+                                       ⇧[0, d] V2 ≡ U2
+                           )
+                        |  (d + e ≤ i ∧ U2 = #(i - e)).
+#L #U2 #i #d #e #H
+elim (lt_or_ge i d) #Hdi
+[ elim (delift_inv_lref1_lt … H Hdi) -H /3 width=1/
+| elim (lt_or_ge i (d+e)) #Hide
+  [ elim (delift_inv_lref1_be … H Hdi Hide) -H /3 width=6/
+  | elim (delift_inv_lref1_ge … H Hide) -H /3 width=1/
+  ]
+]
+qed-.
+
+(* Properties on basic term relocation **************************************)
+
+lemma delift_lift_le: ∀K,T1,T2,dt,et. K ⊢ ▼*[dt, et] T1 ≡ T2 →
+                      ∀L,U1,d,e. dt + et ≤ d → ⇩[d, e] L ≡ K →
+                      ⇧[d, e] T1 ≡ U1 → ∀U2. ⇧[d - et, e] T2 ≡ U2 →
+                      L ⊢ ▼*[dt, et] U1 ≡ U2.
+#K #T1 #T2 #dt #et * #T #HT1 #HT2 #L #U1 #d #e #Hdetd #HLK #HTU1 #U2 #HTU2
+elim (lift_total T d e) #U #HTU
+lapply (tpss_lift_le … HT1 … HLK HTU1 … HTU) -T1 -HLK // #HU1
+elim (lift_trans_ge … HT2 … HTU ?) -T // -Hdetd #T #HT2 #HTU
+>(lift_mono … HTU2 … HT2) -T2 /2 width=3/
+qed.
+
+lemma delift_lift_be: ∀K,T1,T2,dt,et. K ⊢ ▼*[dt, et] T1 ≡ T2 →
+                      ∀L,U1,d,e. dt ≤ d → d ≤ dt + et →
+                      ⇩[d, e] L ≡ K → ⇧[d, e] T1 ≡ U1 →
+                      L ⊢ ▼*[dt, et + e] U1 ≡ T2.
+#K #T1 #T2 #dt #et * #T #HT1 #HT2 #L #U1 #d #e #Hdtd #Hddet #HLK #HTU1
+elim (lift_total T d e) #U #HTU
+lapply (tpss_lift_be … HT1 … HLK HTU1 … HTU) -T1 -HLK // #HU1
+lapply (lift_trans_be … HT2 … HTU ? ?) -T // -Hdtd -Hddet /2 width=3/
+qed.
+
+lemma delift_lift_ge: ∀K,T1,T2,dt,et. K ⊢ ▼*[dt, et] T1 ≡ T2 →
+                      ∀L,U1,d,e. d ≤ dt → ⇩[d, e] L ≡ K →
+                      ⇧[d, e] T1 ≡ U1 → ∀U2. ⇧[d, e] T2 ≡ U2 →
+                      L ⊢ ▼*[dt + e, et] U1 ≡ U2.
+#K #T1 #T2 #dt #et * #T #HT1 #HT2 #L #U1 #d #e #Hddt #HLK #HTU1 #U2 #HTU2
+elim (lift_total T d e) #U #HTU
+lapply (tpss_lift_ge … HT1 … HLK HTU1 … HTU) -T1 -HLK // #HU1
+elim (lift_trans_le … HT2 … HTU ?) -T // -Hddt #T #HT2 #HTU
+>(lift_mono … HTU2 … HT2) -T2 /2 width=3/
+qed.
+
+lemma delift_inv_lift1_eq: ∀L,U1,T2,d,e. L ⊢ ▼*[d, e] U1 ≡ T2 →
+                           ∀K. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 → T1 = T2.
+#L #U1 #T2 #d #e * #U2 #HU12 #HTU2 #K #HLK #T1 #HTU1
+lapply (tpss_inv_lift1_eq … HU12 … HTU1) -L -K #H destruct
+lapply (lift_inj … HTU1 … HTU2) -U2 //
+qed-.
+
+lemma delift_lift_div_be: ∀L,T1,T,d,e,i. L ⊢ ▼*[i, d + e - i] T1 ≡ T →
+                          ∀T2. ⇧[d, i - d] T2 ≡ T → d ≤ i → i ≤ d + e →
+                          L ⊢ ▼*[d, e] T1 ≡ T2.
+#L #T1 #T #d #e #i * #T0 #HT10 #HT0 #T2 #HT2 #Hdi #Hide
+lapply (tpss_weak … HT10 d e ? ?) -HT10 // [ >commutative_plus /2 width=1/ ] #HT10
+lapply (lift_trans_be … HT2 … HT0 ? ?) -T //
+>commutative_plus >commutative_plus in ⊢ (? ? (? % ?) ? ? → ?);
+<minus_le_minus_minus_comm // <plus_minus_m_m [ /2 width=3/ | /2 width=1/ ]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/delift_ltpss.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/delift_ltpss.ma
new file mode 100644 (file)
index 0000000..a0ac3cf
--- /dev/null
@@ -0,0 +1,33 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/ltpss_sn_alt.ma".
+include "basic_2/unfold/delift.ma".
+
+(* INVERSE BASIC TERM RELOCATION  *******************************************)
+
+(* Properties on sn partial unfold on local environments ********************)
+
+lemma delift_ltpss_sn_conf_eq: ∀L,T1,T2,d,e. L ⊢ ▼*[d, e] T1 ≡ T2 →
+                               ∀K. L ⊢ ▶* [d, e] K → K ⊢ ▼*[d, e] T1 ≡ T2.
+#L #T1 #T2 #d #e * #T #HT1 #HT2 #K #HLK
+elim (ltpss_sn_tpss_conf … HT1 … HLK) -HT1 -HLK #T0 #HT10 #HT0
+lapply (tpss_inv_lift1_eq … HT0 … HT2) -HT0 #H destruct /2 width=3/
+qed.
+
+lemma ltpss_sn_delift_trans_eq: ∀L,K,d,e. L ⊢ ▶* [d, e] K →
+                                ∀T1,T2. K ⊢ ▼*[d, e] T1 ≡ T2 → L ⊢ ▼*[d, e] T1 ≡ T2.
+#L #K #d #e #HLK #T1 #T2 * #T #HT1 #HT2 
+lapply (ltpss_sn_tpss_trans_eq … HT1 … HLK) -K /2 width=3/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/delift_tpss.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/delift_tpss.ma
new file mode 100644 (file)
index 0000000..cebcf82
--- /dev/null
@@ -0,0 +1,92 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/tpss_tpss.ma".
+include "basic_2/unfold/delift.ma".
+
+(* INVERSE BASIC TERM RELOCATION  *******************************************)
+
+(* Properties on partial unfold on terms ************************************)
+
+lemma delift_tpss_conf_le: ∀L,U1,U2,d,e. L ⊢ U1 ▶* [d, e] U2 →
+                           ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
+                           ∀K. ⇩[dd, ee] L ≡ K → d + e ≤ dd →
+                           ∃∃T2. K ⊢ T1 ▶* [d, e] T2 & L ⊢ ▼*[dd, ee] U2 ≡ T2.
+#L #U1 #U2 #d #e #HU12 #T1 #dd #ee * #X1 #HUX1 #HTX1 #K #HLK #H1
+elim (tpss_conf_eq … HU12 … HUX1) -U1 #U1 #HU21 #HXU1
+elim (tpss_inv_lift1_le … HXU1 … HLK … HTX1 ?) -X1 -HLK // -H1 /3 width=5/
+qed.
+
+lemma delift_tps_conf_le: ∀L,U1,U2,d,e. L ⊢ U1 ▶ [d, e] U2 →
+                          ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
+                          ∀K. ⇩[dd, ee] L ≡ K → d + e ≤ dd →
+                          ∃∃T2. K ⊢ T1 ▶* [d, e] T2 & L ⊢ ▼*[dd, ee] U2 ≡ T2.
+/3 width=3/ qed.
+
+lemma delift_tpss_conf_le_up: ∀L,U1,U2,d,e. L ⊢ U1 ▶* [d, e] U2 →
+                              ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
+                              ∀K. ⇩[dd, ee] L ≡ K →
+                              d ≤ dd → dd ≤ d + e → d + e ≤ dd + ee →
+                              ∃∃T2. K ⊢ T1 ▶* [d, dd - d] T2 &
+                                    L ⊢ ▼*[dd, ee] U2 ≡ T2.
+#L #U1 #U2 #d #e #HU12 #T1 #dd #ee * #X1 #HUX1 #HTX1 #K #HLK #H1 #H2 #H3
+elim (tpss_conf_eq … HU12 … HUX1) -U1 #U1 #HU21 #HXU1
+elim (tpss_inv_lift1_le_up … HXU1 … HLK … HTX1 ? ? ?) -X1 -HLK // -H1 -H2 -H3 /3 width=5/
+qed.
+
+lemma delift_tps_conf_le_up: ∀L,U1,U2,d,e. L ⊢ U1 ▶ [d, e] U2 →
+                             ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
+                             ∀K. ⇩[dd, ee] L ≡ K →
+                             d ≤ dd → dd ≤ d + e → d + e ≤ dd + ee →
+                             ∃∃T2. K ⊢ T1 ▶* [d, dd - d] T2 &
+                                   L ⊢ ▼*[dd, ee] U2 ≡ T2.
+/3 width=6/ qed.
+
+lemma delift_tpss_conf_be: ∀L,U1,U2,d,e. L ⊢ U1 ▶* [d, e] U2 →
+                           ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
+                           ∀K. ⇩[dd, ee] L ≡ K → d ≤ dd → dd + ee ≤ d + e →
+                           ∃∃T2. K ⊢ T1 ▶* [d, e - ee] T2 &
+                                 L ⊢ ▼*[dd, ee] U2 ≡ T2.
+#L #U1 #U2 #d #e #HU12 #T1 #dd #ee * #X1 #HUX1 #HTX1 #K #HLK #H1 #H2
+elim (tpss_conf_eq … HU12 … HUX1) -U1 #U1 #HU21 #HXU1
+elim (tpss_inv_lift1_be … HXU1 … HLK … HTX1 ? ?) -X1 -HLK // -H1 -H2 /3 width=5/
+qed.
+
+lemma delift_tps_conf_be: ∀L,U1,U2,d,e. L ⊢ U1 ▶ [d, e] U2 →
+                          ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
+                          ∀K. ⇩[dd, ee] L ≡ K → d ≤ dd → dd + ee ≤ d + e →
+                          ∃∃T2. K ⊢ T1 ▶* [d, e - ee] T2 &
+                                L ⊢ ▼*[dd, ee] U2 ≡ T2.
+/3 width=3/ qed.
+
+lemma delift_tpss_conf_eq: ∀L,U1,U2,d,e. L ⊢ U1 ▶* [d, e] U2 →
+                           ∀T. L ⊢ ▼*[d, e] U1 ≡ T → L ⊢ ▼*[d, e] U2 ≡ T.
+#L #U1 #U2 #d #e #HU12 #T * #X1 #HUX1 #HTX1
+elim (tpss_conf_eq … HU12 … HUX1) -U1 #U1 #HU21 #HXU1
+lapply (tpss_inv_lift1_eq … HXU1 … HTX1) -HXU1 #H destruct /2 width=3/
+qed.
+
+lemma delift_tps_conf_eq: ∀L,U1,U2,d,e. L ⊢ U1 ▶ [d, e] U2 →
+                          ∀T. L ⊢ ▼*[d, e] U1 ≡ T → L ⊢ ▼*[d, e] U2 ≡ T.
+/3 width=3/ qed.
+
+lemma tpss_delift_trans_eq: ∀L,U1,U2,d,e. L ⊢ U1 ▶* [d, e] U2 →
+                            ∀T. L ⊢ ▼*[d, e] U2 ≡ T → L ⊢ ▼*[d, e] U1 ≡ T.
+#L #U1 #U2 #d #e #HU12 #T * #X1 #HUX1 #HTX1
+lapply (tpss_trans_eq … HU12 … HUX1) -U2 /2 width=3/
+qed.
+
+lemma tps_delift_trans_eq: ∀L,U1,U2,d,e. L ⊢ U1 ▶ [d, e] U2 →
+                           ∀T. L ⊢ ▼*[d, e] U2 ≡ T → L ⊢ ▼*[d, e] U1 ≡ T.
+/3 width=3/ qed.                            
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/frsupp.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/frsupp.ma
new file mode 100644 (file)
index 0000000..9cfee7c
--- /dev/null
@@ -0,0 +1,107 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/frsup.ma".
+
+(* PLUS-ITERATED RESTRICTED SUPCLOSURE **************************************)
+
+definition frsupp: bi_relation lenv term ≝ bi_TC … frsup.
+
+interpretation "plus-iterated restricted structural predecessor (closure)"
+   'RestSupTermPlus L1 T1 L2 T2 = (frsupp L1 T1 L2 T2).
+
+(* Basic eliminators ********************************************************)
+
+lemma frsupp_ind: ∀L1,T1. ∀R:relation2 lenv term.
+                  (∀L2,T2. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ → R L2 T2) →
+                  (∀L,T,L2,T2. ⦃L1, T1⦄ ⧁+ ⦃L, T⦄ → ⦃L, T⦄ ⧁ ⦃L2, T2⦄ → R L T → R L2 T2) →
+                  ∀L2,T2. ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄ → R L2 T2.
+#L1 #T1 #R #IH1 #IH2 #L2 #T2 #H
+@(bi_TC_ind … IH1 IH2 ? ? H)
+qed-.
+
+lemma frsupp_ind_dx: ∀L2,T2. ∀R:relation2 lenv term.
+                     (∀L1,T1. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ → R L1 T1) →
+                     (∀L1,L,T1,T. ⦃L1, T1⦄ ⧁ ⦃L, T⦄ → ⦃L, T⦄ ⧁+ ⦃L2, T2⦄ → R L T → R L1 T1) →
+                     ∀L1,T1. ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄ → R L1 T1.
+#L2 #T2 #R #IH1 #IH2 #L1 #T1 #H
+@(bi_TC_ind_dx … IH1 IH2 ? ? H)
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma frsup_frsupp: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄.
+/2 width=1/ qed.
+
+lemma frsupp_strap1: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⧁+ ⦃L, T⦄ → ⦃L, T⦄ ⧁ ⦃L2, T2⦄ →
+                     ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄.
+/2 width=4/ qed.
+
+lemma frsupp_strap2: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⧁ ⦃L, T⦄ → ⦃L, T⦄ ⧁+ ⦃L2, T2⦄ →
+                     ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄.
+/2 width=4/ qed.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma frsupp_fwd_fw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄ → #{L2, T2} < #{L1, T1}.
+#L1 #L2 #T1 #T2 #H @(frsupp_ind … H) -L2 -T2
+/3 width=3 by frsup_fwd_fw, transitive_lt/
+qed-.
+
+lemma frsupp_fwd_lw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄ → #{L1} ≤ #{L2}.
+#L1 #L2 #T1 #T2 #H @(frsupp_ind … H) -L2 -T2
+/2 width=3 by frsup_fwd_lw/ (**) (* /3 width=5 by frsup_fwd_lw, transitive_le/ is too slow *)
+#L #T #L2 #T2 #_ #HL2 #HL1
+lapply (frsup_fwd_lw … HL2) -HL2 /2 width=3 by transitive_le/
+qed-.
+
+lemma frsupp_fwd_tw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄ → #{T2} < #{T1}.
+#L1 #L2 #T1 #T2 #H @(frsupp_ind … H) -L2 -T2
+/3 width=3 by frsup_fwd_tw, transitive_lt/
+qed-.
+
+lemma frsupp_fwd_append: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄ → ∃L. L2 = L1 @@ L.
+#L1 #L2 #T1 #T2 #H @(frsupp_ind … H) -L2 -T2 /2 width=3 by frsup_fwd_append/
+#L #T #L2 #T2 #_ #HL2 * #K1 #H destruct
+elim (frsup_fwd_append … HL2) -HL2 #K2 #H destruct /2 width=2/
+qed-.
+
+(* Advanced forward lemmas **************************************************)
+
+fact lift_frsupp_trans_aux: ∀L2,U0. (
+                               ∀L,K,U1,U2. ⦃L, U1⦄ ⧁+ ⦃L @@ K, U2⦄ →
+                               ∀T1,d,e. ⇧[d, e] T1 ≡ U1 →
+                               #{L, U1} < #{L2, U0} → 
+                               ∃T2. ⇧[d + |K|, e] T2 ≡ U2
+                            ) →
+                            ∀L1,K,U1,U2. ⦃L1, U1⦄ ⧁+ ⦃L2 @@ K, U2⦄ →
+                            ∀T1,d,e. ⇧[d, e] T1 ≡ U1 →
+                            L2 = L1 → U0 = U1 →
+                            ∃T2. ⇧[d + |K|, e] T2 ≡ U2.
+#L2 #U0 #IH #L1 #X #U1 #U2 #H @(frsupp_ind_dx … H) -L1 -U1 /2 width=5 by lift_frsup_trans/
+#L1 #L #U1 #U #HL1 #HL2 #_ #T1 #d #e #HTU1 #H1 #H2 destruct
+elim (frsup_fwd_append … HL1) #K1 #H destruct
+elim (frsupp_fwd_append … HL2) #K >append_assoc #H
+elim (append_inj_dx … H ?) -H // #_ #H destruct
+<append_assoc in HL2; #HL2
+elim (lift_frsup_trans … HTU1 … HL1) -T1 #T #HTU
+lapply (frsup_fwd_fw … HL1) -HL1 #HL1
+elim (IH … HL2 … HTU ?) -IH -HL2 -T // -L1 -U1 -U /2 width=2/
+qed-.
+
+lemma lift_frsupp_trans: ∀L,U1,K,U2. ⦃L, U1⦄ ⧁+ ⦃L @@ K, U2⦄ →
+                         ∀T1,d,e. ⇧[d, e] T1 ≡ U1 →
+                         ∃T2. ⇧[d + |K|, e] T2 ≡ U2.
+#L #U1 @(fw_ind … L U1) -L -U1 /3 width=10 by lift_frsupp_trans_aux/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/frsupp_frsupp.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/frsupp_frsupp.ma
new file mode 100644 (file)
index 0000000..92efe26
--- /dev/null
@@ -0,0 +1,22 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/frsupp.ma".
+
+(* PLUS-ITERATED RESTRICTED SUPCLOSURE **************************************)
+
+(* Main propertis ***********************************************************)
+
+theorem frsupp_trans: bi_transitive … frsupp.
+/2 width=4/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/frsups.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/frsups.ma
new file mode 100644 (file)
index 0000000..5923d60
--- /dev/null
@@ -0,0 +1,133 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/frsupp.ma".
+
+(* STAR-ITERATED RESTRICTED SUPCLOSURE **************************************)
+
+definition frsups: bi_relation lenv term ≝ bi_star … frsup.
+
+interpretation "star-iterated restricted structural predecessor (closure)"
+   'RestSupTermStar L1 T1 L2 T2 = (frsups L1 T1 L2 T2).
+
+(* Basic eliminators ********************************************************)
+
+lemma frsups_ind: ∀L1,T1. ∀R:relation2 lenv term. R L1 T1 →
+                  (∀L,L2,T,T2. ⦃L1, T1⦄ ⧁* ⦃L, T⦄ → ⦃L, T⦄ ⧁ ⦃L2, T2⦄ → R L T → R L2 T2) →
+                  ∀L2,T2. ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄ → R L2 T2.
+#L1 #T1 #R #IH1 #IH2 #L2 #T2 #H
+@(bi_star_ind … IH1 IH2 ? ? H)
+qed-.
+
+lemma frsups_ind_dx: ∀L2,T2. ∀R:relation2 lenv term. R L2 T2 →
+                     (∀L1,L,T1,T. ⦃L1, T1⦄ ⧁ ⦃L, T⦄ → ⦃L, T⦄ ⧁* ⦃L2, T2⦄ → R L T → R L1 T1) →
+                     ∀L1,T1. ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄ → R L1 T1.
+#L2 #T2 #R #IH1 #IH2 #L1 #T1 #H
+@(bi_star_ind_dx … IH1 IH2 ? ? H)
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma frsups_refl: bi_reflexive … frsups.
+/2 width=1/ qed.
+
+lemma frsupp_frsups: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄.
+/2 width=1/ qed.
+
+lemma frsup_frsups: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄.
+/2 width=1/ qed.
+
+lemma frsups_strap1: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⧁* ⦃L, T⦄ → ⦃L, T⦄ ⧁ ⦃L2, T2⦄ →
+                     ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄.
+/2 width=4/ qed.
+
+lemma frsups_strap2: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⧁ ⦃L, T⦄ → ⦃L, T⦄ ⧁* ⦃L2, T2⦄ →
+                     ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄.
+/2 width=4/ qed.
+
+lemma frsups_frsupp_frsupp: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⧁* ⦃L, T⦄ →
+                            ⦃L, T⦄ ⧁+ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄.
+/2 width=4/ qed.
+
+lemma frsupp_frsups_frsupp: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⧁+ ⦃L, T⦄ →
+                            ⦃L, T⦄ ⧁* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄.
+/2 width=4/ qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma frsups_inv_all: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄ →
+                      (L1 = L2 ∧ T1 = T2) ∨ ⦃L1, T1⦄ ⧁+ ⦃L2, T2⦄.
+#L1 #L2 #T1 #T2 * /2 width=1/
+qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma frsups_fwd_fw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄ → #{L2, T2} ≤ #{L1, T1}.
+#L1 #L2 #T1 #T2 #H elim (frsups_inv_all … H) -H [ * // ]
+/3 width=1 by frsupp_fwd_fw, lt_to_le/
+qed-.
+
+lemma frsups_fwd_lw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄ → #{L1} ≤ #{L2}.
+#L1 #L2 #T1 #T2 #H elim (frsups_inv_all … H) -H [ * // ]
+/2 width=3 by frsupp_fwd_lw/
+qed-.
+
+lemma frsups_fwd_tw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄ → #{T2} ≤ #{T1}.
+#L1 #L2 #T1 #T2 #H elim (frsups_inv_all … H) -H [ * // ]
+/3 width=3 by frsupp_fwd_tw, lt_to_le/
+qed-.
+
+lemma frsups_fwd_append: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⧁* ⦃L2, T2⦄ → ∃L. L2 = L1 @@ L.
+#L1 #L2 #T1 #T2 #H elim (frsups_inv_all … H) -H
+[ * #H1 #H2 destruct
+  @(ex_intro … (⋆)) //
+| /2 width=3 by frsupp_fwd_append/
+qed-.
+
+(* Advanced forward lemmas ***************************************************)
+
+lemma lift_frsups_trans: ∀T1,U1,d,e. ⇧[d, e] T1 ≡ U1 →
+                         ∀L,K,U2. ⦃L, U1⦄ ⧁* ⦃L @@ K, U2⦄ →
+                         ∃T2. ⇧[d + |K|, e] T2 ≡ U2.
+#T1 #U1 #d #e #HTU1 #L #K #U2 #H elim (frsups_inv_all … H) -H
+[ * #H1 #H2 destruct
+  >(append_inv_refl_dx … (sym_eq … H1)) -H1 normalize /2 width=2/
+| /2 width=5 by lift_frsupp_trans/
+]
+qed-.
+
+(* Advanced inversion lemmas for frsupp **************************************)
+
+lemma frsupp_inv_atom1_frsups: ∀J,L1,L2,T2. ⦃L1, ⓪{J}⦄ ⧁+ ⦃L2, T2⦄ → ⊥.
+#J #L1 #L2 #T2 #H @(frsupp_ind … H) -L2 -T2 //
+#L2 #T2 #H elim (frsup_inv_atom1 … H)
+qed-.
+
+lemma frsupp_inv_bind1_frsups: ∀b,J,L1,L2,W,U,T2. ⦃L1, ⓑ{b,J}W.U⦄ ⧁+ ⦃L2, T2⦄ →
+                               ⦃L1, W⦄ ⧁* ⦃L2, T2⦄ ∨ ⦃L1.ⓑ{J}W, U⦄ ⧁* ⦃L2, T2⦄.
+#b #J #L1 #L2 #W #U #T2 #H @(frsupp_ind … H) -L2 -T2
+[ #L2 #T2 #H
+  elim (frsup_inv_bind1 … H) -H * #H1 #H2 destruct /2 width=1/
+| #L #T #L2 #T2 #_ #HT2 * /3 width=4/
+]
+qed-.
+
+lemma frsupp_inv_flat1_frsups: ∀J,L1,L2,W,U,T2. ⦃L1, ⓕ{J}W.U⦄ ⧁+ ⦃L2, T2⦄ →
+                               ⦃L1, W⦄ ⧁* ⦃L2, T2⦄ ∨ ⦃L1, U⦄ ⧁* ⦃L2, T2⦄.
+#J #L1 #L2 #W #U #T2 #H @(frsupp_ind … H) -L2 -T2
+[ #L2 #T2 #H
+  elim (frsup_inv_flat1 … H) -H #H1 * #H2 destruct /2 width=1/
+| #L #T #L2 #T2 #_ #HT2 * /3 width=4/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/frsups_frsups.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/frsups_frsups.ma
new file mode 100644 (file)
index 0000000..e7b7de2
--- /dev/null
@@ -0,0 +1,22 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/frsups.ma".
+
+(* STAR-ITERATED RESTRICTED SUPCLOSURE **************************************)
+
+(* Main propertis ***********************************************************)
+
+theorem frsups_trans: bi_transitive … frsups.
+/2 width=4/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/gr2.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/gr2.ma
new file mode 100644 (file)
index 0000000..562b795
--- /dev/null
@@ -0,0 +1,73 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/grammar/term_vector.ma".
+
+(* GENERIC RELOCATION WITH PAIRS ********************************************)
+
+inductive at: list2 nat nat → relation nat ≝
+| at_nil: ∀i. at ⟠ i i
+| at_lt : ∀des,d,e,i1,i2. i1 < d →
+          at des i1 i2 → at ({d, e} @ des) i1 i2
+| at_ge : ∀des,d,e,i1,i2. d ≤ i1 →
+          at des (i1 + e) i2 → at ({d, e} @ des) i1 i2
+.
+
+interpretation "application (generic relocation with pairs)"
+   'RAt i1 des i2 = (at des i1 i2).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact at_inv_nil_aux: ∀des,i1,i2. @⦃i1, des⦄ ≡ i2 → des = ⟠ → i1 = i2.
+#des #i1 #i2 * -des -i1 -i2
+[ //
+| #des #d #e #i1 #i2 #_ #_ #H destruct
+| #des #d #e #i1 #i2 #_ #_ #H destruct
+]
+qed.
+
+lemma at_inv_nil: ∀i1,i2. @⦃i1, ⟠⦄ ≡ i2 → i1 = i2.
+/2 width=3/ qed-.
+
+fact at_inv_cons_aux: ∀des,i1,i2. @⦃i1, des⦄ ≡ i2 →
+                      ∀d,e,des0. des = {d, e} @ des0 →
+                      i1 < d ∧ @⦃i1, des0⦄ ≡ i2 ∨
+                      d ≤ i1 ∧ @⦃i1 + e, des0⦄ ≡ i2.
+#des #i1 #i2 * -des -i1 -i2
+[ #i #d #e #des #H destruct
+| #des1 #d1 #e1 #i1 #i2 #Hid1 #Hi12 #d2 #e2 #des2 #H destruct /3 width=1/
+| #des1 #d1 #e1 #i1 #i2 #Hdi1 #Hi12 #d2 #e2 #des2 #H destruct /3 width=1/
+]
+qed.
+
+lemma at_inv_cons: ∀des,d,e,i1,i2. @⦃i1, {d, e} @ des⦄ ≡ i2 →
+                   i1 < d ∧ @⦃i1, des⦄ ≡ i2 ∨
+                   d ≤ i1 ∧ @⦃i1 + e, des⦄ ≡ i2.
+/2 width=3/ qed-.
+
+lemma at_inv_cons_lt: ∀des,d,e,i1,i2. @⦃i1, {d, e} @ des⦄ ≡ i2 →
+                      i1 < d → @⦃i1, des⦄ ≡ i2.
+#des #d #e #i1 #e2 #H
+elim (at_inv_cons … H) -H * // #Hdi1 #_ #Hi1d
+lapply (le_to_lt_to_lt … Hdi1 Hi1d) -Hdi1 -Hi1d #Hd
+elim (lt_refl_false … Hd)
+qed-.
+
+lemma at_inv_cons_ge: ∀des,d,e,i1,i2. @⦃i1, {d, e} @ des⦄ ≡ i2 →
+                      d ≤ i1 → @⦃i1 + e, des⦄ ≡ i2.
+#des #d #e #i1 #e2 #H
+elim (at_inv_cons … H) -H * // #Hi1d #_ #Hdi1
+lapply (le_to_lt_to_lt … Hdi1 Hi1d) -Hdi1 -Hi1d #Hd
+elim (lt_refl_false … Hd)
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/gr2_gr2.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/gr2_gr2.ma
new file mode 100644 (file)
index 0000000..20ce856
--- /dev/null
@@ -0,0 +1,29 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/gr2.ma".
+
+(* GENERIC RELOCATION WITH PAIRS ********************************************)
+
+(* Main properties **********************************************************)
+
+theorem at_mono: ∀des,i,i1. @⦃i, des⦄ ≡ i1 → ∀i2. @⦃i, des⦄ ≡ i2 → i1 = i2.
+#des #i #i1 #H elim H -des -i -i1
+[ #i #x #H <(at_inv_nil … H) -x //
+| #des #d #e #i #i1 #Hid #_ #IHi1 #x #H
+  lapply (at_inv_cons_lt … H Hid) -H -Hid /2 width=1/
+| #des #d #e #i #i1 #Hdi #_ #IHi1 #x #H
+  lapply (at_inv_cons_ge … H Hdi) -H -Hdi /2 width=1/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/gr2_minus.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/gr2_minus.ma
new file mode 100644 (file)
index 0000000..6138548
--- /dev/null
@@ -0,0 +1,76 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/gr2.ma".
+
+(* GENERIC RELOCATION WITH PAIRS ********************************************)
+
+inductive minuss: nat → relation (list2 nat nat) ≝
+| minuss_nil: ∀i. minuss i ⟠ ⟠ 
+| minuss_lt : ∀des1,des2,d,e,i. i < d → minuss i des1 des2 →
+              minuss i ({d, e} @ des1) ({d - i, e} @ des2)
+| minuss_ge : ∀des1,des2,d,e,i. d ≤ i → minuss (e + i) des1 des2 →
+              minuss i ({d, e} @ des1) des2
+.
+
+interpretation "minus (generic relocation with pairs)"
+   'RMinus des1 i des2 = (minuss i des1 des2).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact minuss_inv_nil1_aux: ∀des1,des2,i. des1 ▭ i ≡ des2 → des1 = ⟠ → des2 = ⟠.
+#des1 #des2 #i * -des1 -des2 -i
+[ //
+| #des1 #des2 #d #e #i #_ #_ #H destruct
+| #des1 #des2 #d #e #i #_ #_ #H destruct
+]
+qed.
+
+lemma minuss_inv_nil1: ∀des2,i. ⟠ ▭ i ≡ des2 → des2 = ⟠.
+/2 width=4/ qed-.
+
+fact minuss_inv_cons1_aux: ∀des1,des2,i. des1 ▭ i ≡ des2 →
+                           ∀d,e,des. des1 = {d, e} @ des →
+                           d ≤ i ∧ des ▭ e + i ≡ des2 ∨
+                           ∃∃des0. i < d & des ▭ i ≡ des0 &
+                                   des2 = {d - i, e} @ des0.
+#des1 #des2 #i * -des1 -des2 -i
+[ #i #d #e #des #H destruct 
+| #des1 #des #d1 #e1 #i1 #Hid1 #Hdes #d2 #e2 #des2 #H destruct /3 width=3/
+| #des1 #des #d1 #e1 #i1 #Hdi1 #Hdes #d2 #e2 #des2 #H destruct /3 width=1/
+]
+qed.
+
+lemma minuss_inv_cons1: ∀des1,des2,d,e,i. {d, e} @ des1 ▭ i ≡ des2 →
+                        d ≤ i ∧ des1 ▭ e + i ≡ des2 ∨
+                        ∃∃des. i < d & des1 ▭ i ≡ des &
+                               des2 = {d - i, e} @ des.
+/2 width=3/ qed-.
+
+lemma minuss_inv_cons1_ge: ∀des1,des2,d,e,i. {d, e} @ des1 ▭ i ≡ des2 →
+                           d ≤ i → des1 ▭ e + i ≡ des2.
+#des1 #des2 #d #e #i #H
+elim (minuss_inv_cons1 … H) -H * // #des #Hid #_ #_ #Hdi
+lapply (lt_to_le_to_lt … Hid Hdi) -Hid -Hdi #Hi
+elim (lt_refl_false … Hi)
+qed-.
+
+lemma minuss_inv_cons1_lt: ∀des1,des2,d,e,i. {d, e} @ des1 ▭ i ≡ des2 →
+                           i < d → 
+                           ∃∃des. des1 ▭ i ≡ des & des2 = {d - i, e} @ des.
+#des1 #des2 #d #e #i #H
+elim (minuss_inv_cons1 … H) -H * /2 width=3/ #Hdi #_ #Hid
+lapply (lt_to_le_to_lt … Hid Hdi) -Hid -Hdi #Hi
+elim (lt_refl_false … Hi)
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/gr2_plus.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/gr2_plus.ma
new file mode 100644 (file)
index 0000000..bd8d1a9
--- /dev/null
@@ -0,0 +1,40 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/gr2.ma".
+
+(* GENERIC RELOCATION WITH PAIRS ********************************************)
+
+let rec pluss (des:list2 nat nat) (i:nat) on des ≝ match des with
+[ nil2          ⇒ ⟠
+| cons2 d e des ⇒ {d + i, e} @ pluss des i
+].
+
+interpretation "plus (generic relocation with pairs)"
+   'plus x y = (pluss x y).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma pluss_inv_nil2: ∀i,des. des + i = ⟠ → des = ⟠.
+#i * // normalize
+#d #e #des #H destruct
+qed.
+
+lemma pluss_inv_cons2: ∀i,d,e,des2,des. des + i = {d, e} @ des2 →
+                       ∃∃des1. des1 + i = des2 & des = {d - i, e} @ des1.
+#i #d #e #des2 * normalize
+[ #H destruct
+| #d1 #e1 #des1 #H destruct /2 width=3/ 
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/ldrops.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/ldrops.ma
new file mode 100644 (file)
index 0000000..b899bd2
--- /dev/null
@@ -0,0 +1,90 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/ldrop.ma".
+include "basic_2/unfold/gr2_minus.ma".
+include "basic_2/unfold/lifts.ma".
+
+(* GENERIC LOCAL ENVIRONMENT SLICING ****************************************)
+
+inductive ldrops: list2 nat nat → relation lenv ≝
+| ldrops_nil : ∀L. ldrops ⟠ L L
+| ldrops_cons: ∀L1,L,L2,des,d,e.
+               ldrops des L1 L → ⇩[d,e] L ≡ L2 → ldrops ({d, e} @ des) L1 L2
+.
+
+interpretation "generic local environment slicing"
+   'RDropStar des T1 T2 = (ldrops des T1 T2).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact ldrops_inv_nil_aux: ∀L1,L2,des. ⇩*[des] L1 ≡ L2 → des = ⟠ → L1 = L2.
+#L1 #L2 #des * -L1 -L2 -des //
+#L1 #L #L2 #d #e #des #_ #_ #H destruct
+qed.
+
+(* Basic_1: was: drop1_gen_pnil *)
+lemma ldrops_inv_nil: ∀L1,L2. ⇩*[⟠] L1 ≡ L2 → L1 = L2.
+/2 width=3/ qed-.
+
+fact ldrops_inv_cons_aux: ∀L1,L2,des. ⇩*[des] L1 ≡ L2 →
+                          ∀d,e,tl. des = {d, e} @ tl →
+                          ∃∃L. ⇩*[tl] L1 ≡ L & ⇩[d, e] L ≡ L2.
+#L1 #L2 #des * -L1 -L2 -des
+[ #L #d #e #tl #H destruct
+| #L1 #L #L2 #des #d #e #HT1 #HT2 #hd #he #tl #H destruct
+  /2 width=3/
+qed.
+
+(* Basic_1: was: drop1_gen_pcons *)
+lemma ldrops_inv_cons: ∀L1,L2,d,e,des. ⇩*[{d, e} @ des] L1 ≡ L2 →
+                       ∃∃L. ⇩*[des] L1 ≡ L & ⇩[d, e] L ≡ L2.
+/2 width=3/ qed-.
+
+lemma ldrops_inv_skip2: ∀I,des,i,des2. des ▭ i ≡ des2 →
+                        ∀L1,K2,V2. ⇩*[des2] L1 ≡ K2. ⓑ{I} V2 →
+                        ∃∃K1,V1,des1. des + 1 ▭ i + 1 ≡ des1 + 1 &
+                                      ⇩*[des1] K1 ≡ K2 &
+                                      ⇧*[des1] V2 ≡ V1 &
+                                      L1 = K1. ⓑ{I} V1.
+#I #des #i #des2 #H elim H -des -i -des2
+[ #i #L1 #K2 #V2 #H
+  >(ldrops_inv_nil … H) -L1 /2 width=7/
+| #des #des2 #d #e #i #Hid #_ #IHdes2 #L1 #K2 #V2 #H
+  elim (ldrops_inv_cons … H) -H #L #HL1 #H
+  elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ #K #V >minus_plus #HK2 #HV2 #H destruct
+  elim (IHdes2 … HL1) -IHdes2 -HL1 #K1 #V1 #des1 #Hdes1 #HK1 #HV1 #X destruct
+  @(ex4_3_intro … K1 V1 … ) // [3,4: /2 width=7/ | skip ]
+  normalize >plus_minus // @minuss_lt // /2 width=1/ (**) (* explicit constructors, /3 width=1/ is a bit slow *)
+| #des #des2 #d #e #i #Hid #_ #IHdes2 #L1 #K2 #V2 #H
+  elim (IHdes2 … H) -IHdes2 -H #K1 #V1 #des1 #Hdes1 #HK1 #HV1 #X destruct
+  /4 width=7/
+]
+qed-.
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was: drop1_skip_bind *)
+lemma ldrops_skip: ∀L1,L2,des. ⇩*[des] L1 ≡ L2 → ∀V1,V2. ⇧*[des] V2 ≡ V1 →
+                   ∀I. ⇩*[des + 1] L1. ⓑ{I} V1 ≡ L2. ⓑ{I} V2.
+#L1 #L2 #des #H elim H -L1 -L2 -des
+[ #L #V1 #V2 #HV12 #I
+  >(lifts_inv_nil … HV12) -HV12 //
+| #L1 #L #L2 #des #d #e #_ #HL2 #IHL #V1 #V2 #H #I
+  elim (lifts_inv_cons … H) -H /3 width=5/
+].
+qed.
+
+(* Basic_1: removed theorems 1: drop1_getl_trans
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/ldrops_ldrop.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/ldrops_ldrop.ma
new file mode 100644 (file)
index 0000000..6ca2f73
--- /dev/null
@@ -0,0 +1,35 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/ldrop_ldrop.ma".
+include "basic_2/unfold/ldrops.ma".
+
+(* GENERIC LOCAL ENVIRONMENT SLICING ****************************************)
+
+(* Properties concerning basic local environment slicing ********************)
+
+lemma ldrops_ldrop_trans: ∀L1,L,des. ⇩*[des] L1 ≡ L → ∀L2,i. ⇩[0, i] L ≡ L2 →
+                          ∃∃L0,des0,i0. ⇩[0, i0] L1 ≡ L0 & ⇩*[des0] L0 ≡ L2 &
+                                        @⦃i, des⦄ ≡ i0 & des ▭ i ≡ des0.
+#L1 #L #des #H elim H -L1 -L -des
+[ /2 width=7/
+| #L1 #L3 #L #des3 #d #e #_ #HL3 #IHL13 #L2 #i #HL2
+  elim (lt_or_ge i d) #Hid
+  [ elim (ldrop_trans_le … HL3 … HL2 ?) -L /2 width=2/ #L #HL3 #HL2
+    elim (IHL13 … HL3) -L3 /3 width=7/
+  | lapply (ldrop_trans_ge … HL3 … HL2 ?) -L // #HL32
+    elim (IHL13 … HL32) -L3 /3 width=7/
+  ]
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/ldrops_ldrops.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/ldrops_ldrops.ma
new file mode 100644 (file)
index 0000000..7709561
--- /dev/null
@@ -0,0 +1,25 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/ldrops_ldrop.ma".
+
+(* GENERIC LOCAL ENVIRONMENT SLICING ****************************************)
+
+(* Main properties **********************************************************)
+
+(* Basic_1: was: drop1_trans *)
+theorem ldrops_trans: ∀L,L2,des2. ⇩*[des2] L ≡ L2 → ∀L1,des1. ⇩*[des1] L1 ≡ L →
+                      ⇩*[des2 @@ des1] L1 ≡ L2.
+#L #L2 #des2 #H elim H -L -L2 -des2 // /3 width=3/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/lifts.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/lifts.ma
new file mode 100644 (file)
index 0000000..40158ac
--- /dev/null
@@ -0,0 +1,150 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/lift.ma".
+include "basic_2/unfold/gr2_plus.ma".
+
+(* GENERIC TERM RELOCATION **************************************************)
+
+inductive lifts: list2 nat nat → relation term ≝
+| lifts_nil : ∀T. lifts ⟠ T T
+| lifts_cons: ∀T1,T,T2,des,d,e.
+              ⇧[d,e] T1 ≡ T → lifts des T T2 → lifts ({d, e} @ des) T1 T2
+.
+
+interpretation "generic relocation (term)"
+   'RLiftStar des T1 T2 = (lifts des T1 T2).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact lifts_inv_nil_aux: ∀T1,T2,des. ⇧*[des] T1 ≡ T2 → des = ⟠ → T1 = T2.
+#T1 #T2 #des * -T1 -T2 -des //
+#T1 #T #T2 #d #e #des #_ #_ #H destruct
+qed.
+
+lemma lifts_inv_nil: ∀T1,T2. ⇧*[⟠] T1 ≡ T2 → T1 = T2.
+/2 width=3/ qed-.
+
+fact lifts_inv_cons_aux: ∀T1,T2,des. ⇧*[des] T1 ≡ T2 →
+                         ∀d,e,tl. des = {d, e} @ tl →
+                         ∃∃T. ⇧[d, e] T1 ≡ T & ⇧*[tl] T ≡ T2.
+#T1 #T2 #des * -T1 -T2 -des
+[ #T #d #e #tl #H destruct
+| #T1 #T #T2 #des #d #e #HT1 #HT2 #hd #he #tl #H destruct
+  /2 width=3/
+qed.
+
+lemma lifts_inv_cons: ∀T1,T2,d,e,des. ⇧*[{d, e} @ des] T1 ≡ T2 →
+                      ∃∃T. ⇧[d, e] T1 ≡ T & ⇧*[des] T ≡ T2.
+/2 width=3/ qed-.
+
+(* Basic_1: was: lift1_sort *)
+lemma lifts_inv_sort1: ∀T2,k,des. ⇧*[des] ⋆k ≡ T2 → T2 = ⋆k.
+#T2 #k #des elim des -des
+[ #H <(lifts_inv_nil … H) -H //
+| #d #e #des #IH #H
+  elim (lifts_inv_cons … H) -H #X #H
+  >(lift_inv_sort1 … H) -H /2 width=1/
+]
+qed-.
+
+(* Basic_1: was: lift1_lref *)
+lemma lifts_inv_lref1: ∀T2,des,i1. ⇧*[des] #i1 ≡ T2 →
+                       ∃∃i2. @⦃i1, des⦄ ≡ i2 & T2 = #i2.
+#T2 #des elim des -des
+[ #i1 #H <(lifts_inv_nil … H) -H /2 width=3/
+| #d #e #des #IH #i1 #H
+  elim (lifts_inv_cons … H) -H #X #H1 #H2
+  elim (lift_inv_lref1 … H1) -H1 * #Hdi1 #H destruct
+  elim (IH … H2) -IH -H2 /3 width=3/
+]
+qed-.
+
+lemma lifts_inv_gref1: ∀T2,p,des. ⇧*[des] §p ≡ T2 → T2 = §p.
+#T2 #p #des elim des -des
+[ #H <(lifts_inv_nil … H) -H //
+| #d #e #des #IH #H
+  elim (lifts_inv_cons … H) -H #X #H
+  >(lift_inv_gref1 … H) -H /2 width=1/
+]
+qed-.
+
+(* Basic_1: was: lift1_bind *)
+lemma lifts_inv_bind1: ∀a,I,T2,des,V1,U1. ⇧*[des] ⓑ{a,I} V1. U1 ≡ T2 →
+                       ∃∃V2,U2. ⇧*[des] V1 ≡ V2 & ⇧*[des + 1] U1 ≡ U2 &
+                                T2 = ⓑ{a,I} V2. U2.
+#a #I #T2 #des elim des -des
+[ #V1 #U1 #H
+  <(lifts_inv_nil … H) -H /2 width=5/
+| #d #e #des #IHdes #V1 #U1 #H
+  elim (lifts_inv_cons … H) -H #X #H #HT2
+  elim (lift_inv_bind1 … H) -H #V #U #HV1 #HU1 #H destruct
+  elim (IHdes … HT2) -IHdes -HT2 #V2 #U2 #HV2 #HU2 #H destruct
+  /3 width=5/
+]
+qed-.
+
+(* Basic_1: was: lift1_flat *)
+lemma lifts_inv_flat1: ∀I,T2,des,V1,U1. ⇧*[des] ⓕ{I} V1. U1 ≡ T2 →
+                       ∃∃V2,U2. ⇧*[des] V1 ≡ V2 & ⇧*[des] U1 ≡ U2 &
+                                T2 = ⓕ{I} V2. U2.
+#I #T2 #des elim des -des
+[ #V1 #U1 #H
+  <(lifts_inv_nil … H) -H /2 width=5/
+| #d #e #des #IHdes #V1 #U1 #H
+  elim (lifts_inv_cons … H) -H #X #H #HT2
+  elim (lift_inv_flat1 … H) -H #V #U #HV1 #HU1 #H destruct
+  elim (IHdes … HT2) -IHdes -HT2 #V2 #U2 #HV2 #HU2 #H destruct
+  /3 width=5/
+]
+qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma lifts_simple_dx: ∀T1,T2,des. ⇧*[des] T1 ≡ T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄.
+#T1 #T2 #des #H elim H -T1 -T2 -des // /3 width=5 by lift_simple_dx/
+qed-.
+
+lemma lifts_simple_sn: ∀T1,T2,des. ⇧*[des] T1 ≡ T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄.
+#T1 #T2 #des #H elim H -T1 -T2 -des // /3 width=5 by lift_simple_sn/
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma lifts_bind: ∀a,I,T2,V1,V2,des. ⇧*[des] V1 ≡ V2 →
+                  ∀T1. ⇧*[des + 1] T1 ≡ T2 →
+                  ⇧*[des] ⓑ{a,I} V1. T1 ≡ ⓑ{a,I} V2. T2.
+#a #I #T2 #V1 #V2 #des #H elim H -V1 -V2 -des
+[ #V #T1 #H >(lifts_inv_nil … H) -H //
+| #V1 #V #V2 #des #d #e #HV1 #_ #IHV #T1 #H
+  elim (lifts_inv_cons … H) -H /3 width=3/
+]
+qed.
+
+lemma lifts_flat: ∀I,T2,V1,V2,des. ⇧*[des] V1 ≡ V2 →
+                  ∀T1. ⇧*[des] T1 ≡ T2 →
+                  ⇧*[des] ⓕ{I} V1. T1 ≡ ⓕ{I} V2. T2.
+#I #T2 #V1 #V2 #des #H elim H -V1 -V2 -des
+[ #V #T1 #H >(lifts_inv_nil … H) -H //
+| #V1 #V #V2 #des #d #e #HV1 #_ #IHV #T1 #H
+  elim (lifts_inv_cons … H) -H /3 width=3/
+]
+qed.
+
+lemma lifts_total: ∀des,T1. ∃T2. ⇧*[des] T1 ≡ T2.
+#des elim des -des /2 width=2/
+#d #e #des #IH #T1
+elim (lift_total T1 d e) #T #HT1
+elim (IH T) -IH /3 width=4/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/lifts_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/lifts_lift.ma
new file mode 100644 (file)
index 0000000..6ad3ff0
--- /dev/null
@@ -0,0 +1,59 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/lift_lift.ma".
+include "basic_2/unfold/gr2_minus.ma".
+include "basic_2/unfold/lifts.ma".
+
+(* GENERIC TERM RELOCATION **************************************************)
+
+(* Properties concerning basic term relocation ******************************)
+
+(* Basic_1: was: lift1_xhg (right to left) *)
+lemma lifts_lift_trans_le: ∀T1,T,des. ⇧*[des] T1 ≡ T → ∀T2. ⇧[0, 1] T ≡ T2 →
+                           ∃∃T0. ⇧[0, 1] T1 ≡ T0 & ⇧*[des + 1] T0 ≡ T2.
+#T1 #T #des #H elim H -T1 -T -des
+[ /2 width=3/
+| #T1 #T3 #T #des #d #e #HT13 #_ #IHT13 #T2 #HT2
+  elim (IHT13 … HT2) -T #T #HT3 #HT2
+  elim (lift_trans_le … HT13 … HT3 ?) -T3 // /3 width=5/
+]
+qed-.
+
+(* Basic_1: was: lift1_free (right to left) *)
+lemma lifts_lift_trans: ∀des,i,i0. @⦃i, des⦄ ≡ i0 → 
+                        ∀des0. des + 1 ▭ i + 1 ≡ des0 + 1 →
+                        ∀T1,T0. ⇧*[des0] T1 ≡ T0 →
+                        ∀T2. ⇧[O, i0 + 1] T0 ≡ T2 →
+                        ∃∃T. ⇧[0, i + 1] T1 ≡ T & ⇧*[des] T ≡ T2.
+#des elim des -des normalize
+[ #i #x #H1 #des0 #H2 #T1 #T0 #HT10 #T2
+  <(at_inv_nil … H1) -x #HT02
+  lapply (minuss_inv_nil1 … H2) -H2 #H
+  >(pluss_inv_nil2 … H) in HT10; -des0 #H
+  >(lifts_inv_nil … H) -T1 /2 width=3/
+| #d #e #des #IHdes #i #i0 #H1 #des0 #H2 #T1 #T0 #HT10 #T2 #HT02
+  elim (at_inv_cons … H1) -H1 * #Hid #Hi0
+  [ elim (minuss_inv_cons1_lt … H2 ?) -H2 [2: /2 width=1/ ] #des1 #Hdes1 <minus_le_minus_minus_comm // <minus_plus_m_m #H
+    elim (pluss_inv_cons2 … H) -H #des2 #H1 #H2 destruct
+    elim (lifts_inv_cons … HT10) -HT10 #T >minus_plus #HT1 #HT0
+    elim (IHdes … Hi0 … Hdes1 … HT0 … HT02) -IHdes -Hi0 -Hdes1 -T0 #T0 #HT0 #HT02
+    elim (lift_trans_le … HT1 … HT0 ?) -T /2 width=1/ #T #HT1 <plus_minus_m_m /2 width=1/ /3 width=5/
+  | >commutative_plus in Hi0; #Hi0
+    lapply (minuss_inv_cons1_ge … H2 ?) -H2 [ /2 width=1/ ] <associative_plus #Hdes0
+    elim (IHdes … Hi0 … Hdes0 … HT10 … HT02) -IHdes -Hi0 -Hdes0 -T0 #T0 #HT0 #HT02
+    elim (lift_split … HT0 d (i+1) ? ? ?) -HT0 /2 width=1/ /3 width=5/
+  ]
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/lifts_lift_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/lifts_lift_vector.ma
new file mode 100644 (file)
index 0000000..bbd3b1d
--- /dev/null
@@ -0,0 +1,35 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/lift_lift_vector.ma".
+include "basic_2/unfold/lifts_lift.ma".
+include "basic_2/unfold/lifts_vector.ma".
+
+(* GENERIC RELOCATION *******************************************************)
+
+(* Main properties **********************************************************)
+
+(* Basic_1: was: lifts1_xhg (right to left) *)
+lemma liftsv_liftv_trans_le: ∀T1s,Ts,des. ⇧*[des] T1s ≡ Ts →
+                             ∀T2s:list term. ⇧[0, 1] Ts ≡ T2s →
+                             ∃∃T0s. ⇧[0, 1] T1s ≡ T0s & ⇧*[des + 1] T0s ≡ T2s. 
+#T1s #Ts #des #H elim H -T1s -Ts
+[ #T1s #H
+  >(liftv_inv_nil1 … H) -T1s /2 width=3/
+| #T1s #Ts #T1 #T #HT1 #_ #IHT1s #X #H
+  elim (liftv_inv_cons1 … H) -H #T2 #T2s #HT2 #HT2s #H destruct
+  elim (IHT1s … HT2s) -Ts #Ts #HT1s #HT2s
+  elim (lifts_lift_trans_le … HT1 … HT2) -T /3 width=5/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/lifts_lifts.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/lifts_lifts.ma
new file mode 100644 (file)
index 0000000..72948f0
--- /dev/null
@@ -0,0 +1,25 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/lifts_lift.ma".
+
+(* GENERIC RELOCATION *******************************************************)
+
+(* Main properties **********************************************************)
+
+(* Basic_1: was: lift1_lift1 (left to right) *)
+theorem lifts_trans: ∀T1,T,des1. ⇧*[des1] T1 ≡ T → ∀T2:term. ∀des2. ⇧*[des2] T ≡ T2 →
+                     ⇧*[des1 @@ des2] T1 ≡ T2.
+#T1 #T #des1 #H elim H -T1 -T -des1 // /3 width=3/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/lifts_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/lifts_vector.ma
new file mode 100644 (file)
index 0000000..9ea173a
--- /dev/null
@@ -0,0 +1,53 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/lift_vector.ma".
+include "basic_2/unfold/lifts.ma".
+
+(* GENERIC TERM VECTOR RELOCATION *******************************************)
+
+inductive liftsv (des:list2 nat nat) : relation (list term) ≝
+| liftsv_nil : liftsv des ◊ ◊
+| liftsv_cons: ∀T1s,T2s,T1,T2.
+               ⇧*[des] T1 ≡ T2 → liftsv des T1s T2s →
+               liftsv des (T1 @ T1s) (T2 @ T2s)
+.
+
+interpretation "generic relocation (vector)"
+   'RLiftStar des T1s T2s = (liftsv des T1s T2s).
+
+(* Basic inversion lemmas ***************************************************)
+
+(* Basic_1: was: lifts1_flat (left to right) *)
+lemma lifts_inv_applv1: ∀V1s,U1,T2,des. ⇧*[des] Ⓐ V1s. U1 ≡ T2 →
+                        ∃∃V2s,U2. ⇧*[des] V1s ≡ V2s & ⇧*[des] U1 ≡ U2 &
+                                  T2 = Ⓐ V2s. U2.
+#V1s elim V1s -V1s normalize
+[ #T1 #T2 #des #HT12
+  @(ex3_2_intro) [3,4: // |1,2: skip | // ] (**) (* explicit constructor *)
+| #V1 #V1s #IHV1s #T1 #X #des #H
+  elim (lifts_inv_flat1 … H) -H #V2 #Y #HV12 #HY #H destruct
+  elim (IHV1s … HY) -IHV1s -HY #V2s #T2 #HV12s #HT12 #H destruct
+  @(ex3_2_intro) [4: // |3: /2 width=2/ |1,2: skip | // ] (**) (* explicit constructor *)
+]
+qed-.
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was: lifts1_flat (right to left) *)
+lemma lifts_applv: ∀V1s,V2s,des. ⇧*[des] V1s ≡ V2s →
+                   ∀T1,T2. ⇧*[des] T1 ≡ T2 →
+                   ⇧*[des] Ⓐ V1s. T1 ≡ Ⓐ V2s. T2.
+#V1s #V2s #des #H elim H -V1s -V2s // /3 width=1/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_dx.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_dx.ma
new file mode 100644 (file)
index 0000000..6ba09b9
--- /dev/null
@@ -0,0 +1,274 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/tpss.ma".
+
+(* DX PARALLEL UNFOLD ON LOCAL ENVIRONMENTS *********************************)
+
+(* Basic_1: includes: csubst1_bind *)
+inductive ltpss_dx: nat → nat → relation lenv ≝
+| ltpss_dx_atom : ∀d,e. ltpss_dx d e (⋆) (⋆)
+| ltpss_dx_pair : ∀L,I,V. ltpss_dx 0 0 (L. ⓑ{I} V) (L. ⓑ{I} V)
+| ltpss_dx_tpss2: ∀L1,L2,I,V1,V2,e.
+                  ltpss_dx 0 e L1 L2 → L2 ⊢ V1 ▶* [0, e] V2 →
+                  ltpss_dx 0 (e + 1) (L1. ⓑ{I} V1) (L2. ⓑ{I} V2)
+| ltpss_dx_tpss1: ∀L1,L2,I,V1,V2,d,e.
+                  ltpss_dx d e L1 L2 → L2 ⊢ V1 ▶* [d, e] V2 →
+                  ltpss_dx (d + 1) e (L1. ⓑ{I} V1) (L2. ⓑ{I} V2)
+.
+
+interpretation "parallel unfold (local environment, dx variant)"
+   'PSubstStar L1 d e L2 = (ltpss_dx d e L1 L2).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact ltpss_dx_inv_refl_O2_aux: ∀d,e,L1,L2. L1 ▶* [d, e] L2 → e = 0 → L1 = L2.
+#d #e #L1 #L2 #H elim H -d -e -L1 -L2 //
+[ #L1 #L2 #I #V1 #V2 #e #_ #_ #_ >commutative_plus normalize #H destruct
+| #L1 #L2 #I #V1 #V2 #d #e #_ #HV12 #IHL12 #He destruct
+  >(IHL12 ?) -IHL12 // >(tpss_inv_refl_O2 … HV12) //
+]
+qed.
+
+lemma ltpss_dx_inv_refl_O2: ∀d,L1,L2. L1 ▶* [d, 0] L2 → L1 = L2.
+/2 width=4/ qed-.
+
+fact ltpss_dx_inv_atom1_aux: ∀d,e,L1,L2.
+                             L1 ▶* [d, e] L2 → L1 = ⋆ → L2 = ⋆.
+#d #e #L1 #L2 * -d -e -L1 -L2
+[ //
+| #L #I #V #H destruct
+| #L1 #L2 #I #V1 #V2 #e #_ #_ #H destruct
+| #L1 #L2 #I #V1 #V2 #d #e #_ #_ #H destruct
+]
+qed.
+
+lemma ltpss_dx_inv_atom1: ∀d,e,L2. ⋆ ▶* [d, e] L2 → L2 = ⋆.
+/2 width=5/ qed-.
+
+fact ltpss_dx_inv_tpss21_aux: ∀d,e,L1,L2. L1 ▶* [d, e] L2 → d = 0 → 0 < e →
+                              ∀K1,I,V1. L1 = K1. ⓑ{I} V1 →
+                              ∃∃K2,V2. K1 ▶* [0, e - 1] K2 &
+                                       K2 ⊢ V1 ▶* [0, e - 1] V2 &
+                                       L2 = K2. ⓑ{I} V2.
+#d #e #L1 #L2 * -d -e -L1 -L2
+[ #d #e #_ #_ #K1 #I #V1 #H destruct
+| #L1 #I #V #_ #H elim (lt_refl_false … H)
+| #L1 #L2 #I #V1 #V2 #e #HL12 #HV12 #_ #_ #K1 #J #W1 #H destruct /2 width=5/
+| #L1 #L2 #I #V1 #V2 #d #e #_ #_ >commutative_plus normalize #H destruct
+]
+qed.
+
+lemma ltpss_dx_inv_tpss21: ∀e,K1,I,V1,L2. K1. ⓑ{I} V1 ▶* [0, e] L2 → 0 < e →
+                           ∃∃K2,V2. K1 ▶* [0, e - 1] K2 &
+                                    K2 ⊢ V1 ▶* [0, e - 1] V2 &
+                                    L2 = K2. ⓑ{I} V2.
+/2 width=5/ qed-.
+
+fact ltpss_dx_inv_tpss11_aux: ∀d,e,L1,L2. L1 ▶* [d, e] L2 → 0 < d →
+                              ∀I,K1,V1. L1 = K1. ⓑ{I} V1 →
+                              ∃∃K2,V2. K1 ▶* [d - 1, e] K2 &
+                                       K2 ⊢ V1 ▶* [d - 1, e] V2 &
+                                       L2 = K2. ⓑ{I} V2.
+#d #e #L1 #L2 * -d -e -L1 -L2
+[ #d #e #_ #I #K1 #V1 #H destruct
+| #L #I #V #H elim (lt_refl_false … H)
+| #L1 #L2 #I #V1 #V2 #e #_ #_ #H elim (lt_refl_false … H)
+| #L1 #L2 #I #V1 #V2 #d #e #HL12 #HV12 #_ #J #K1 #W1 #H destruct /2 width=5/
+]
+qed.
+
+lemma ltpss_dx_inv_tpss11: ∀d,e,I,K1,V1,L2. K1. ⓑ{I} V1 ▶* [d, e] L2 → 0 < d →
+                           ∃∃K2,V2. K1 ▶* [d - 1, e] K2 &
+                                    K2 ⊢ V1 ▶* [d - 1, e] V2 &
+                                    L2 = K2. ⓑ{I} V2.
+/2 width=3/ qed-.
+
+fact ltpss_dx_inv_atom2_aux: ∀d,e,L1,L2.
+                             L1 ▶* [d, e] L2 → L2 = ⋆ → L1 = ⋆.
+#d #e #L1 #L2 * -d -e -L1 -L2
+[ //
+| #L #I #V #H destruct
+| #L1 #L2 #I #V1 #V2 #e #_ #_ #H destruct
+| #L1 #L2 #I #V1 #V2 #d #e #_ #_ #H destruct
+]
+qed.
+
+lemma ltpss_dx_inv_atom2: ∀d,e,L1. L1 ▶* [d, e] ⋆ → L1 = ⋆.
+/2 width=5/ qed-.
+
+fact ltpss_dx_inv_tpss22_aux: ∀d,e,L1,L2. L1 ▶* [d, e] L2 → d = 0 → 0 < e →
+                              ∀K2,I,V2. L2 = K2. ⓑ{I} V2 →
+                              ∃∃K1,V1. K1 ▶* [0, e - 1] K2 &
+                                       K2 ⊢ V1 ▶* [0, e - 1] V2 &
+                                       L1 = K1. ⓑ{I} V1.
+#d #e #L1 #L2 * -d -e -L1 -L2
+[ #d #e #_ #_ #K1 #I #V1 #H destruct
+| #L1 #I #V #_ #H elim (lt_refl_false … H)
+| #L1 #L2 #I #V1 #V2 #e #HL12 #HV12 #_ #_ #K2 #J #W2 #H destruct /2 width=5/
+| #L1 #L2 #I #V1 #V2 #d #e #_ #_ >commutative_plus normalize #H destruct
+]
+qed.
+
+lemma ltpss_dx_inv_tpss22: ∀e,L1,K2,I,V2. L1 ▶* [0, e] K2. ⓑ{I} V2 → 0 < e →
+                           ∃∃K1,V1. K1 ▶* [0, e - 1] K2 &
+                                    K2 ⊢ V1 ▶* [0, e - 1] V2 &
+                                    L1 = K1. ⓑ{I} V1.
+/2 width=5/ qed-.
+
+fact ltpss_dx_inv_tpss12_aux: ∀d,e,L1,L2. L1 ▶* [d, e] L2 → 0 < d →
+                              ∀I,K2,V2. L2 = K2. ⓑ{I} V2 →
+                              ∃∃K1,V1. K1 ▶* [d - 1, e] K2 &
+                                       K2 ⊢ V1 ▶* [d - 1, e] V2 &
+                                       L1 = K1. ⓑ{I} V1.
+#d #e #L1 #L2 * -d -e -L1 -L2
+[ #d #e #_ #I #K2 #V2 #H destruct
+| #L #I #V #H elim (lt_refl_false … H)
+| #L1 #L2 #I #V1 #V2 #e #_ #_ #H elim (lt_refl_false … H)
+| #L1 #L2 #I #V1 #V2 #d #e #HL12 #HV12 #_ #J #K2 #W2 #H destruct /2 width=5/
+]
+qed.
+
+lemma ltpss_dx_inv_tpss12: ∀L1,K2,I,V2,d,e. L1 ▶* [d, e] K2. ⓑ{I} V2 → 0 < d →
+                           ∃∃K1,V1. K1 ▶* [d - 1, e] K2 &
+                                    K2 ⊢ V1 ▶* [d - 1, e] V2 &
+                                    L1 = K1. ⓑ{I} V1.
+/2 width=3/ qed-.
+
+(* Basic properties *********************************************************)
+
+lemma ltpss_dx_tps2: ∀L1,L2,I,V1,V2,e.
+                     L1 ▶* [0, e] L2 → L2 ⊢ V1 ▶ [0, e] V2 →
+                     L1. ⓑ{I} V1 ▶* [0, e + 1] L2. ⓑ{I} V2.
+/3 width=1/ qed.
+
+lemma ltpss_dx_tps1: ∀L1,L2,I,V1,V2,d,e.
+                     L1 ▶* [d, e] L2 → L2 ⊢ V1 ▶ [d, e] V2 →
+                     L1. ⓑ{I} V1 ▶* [d + 1, e] L2. ⓑ{I} V2.
+/3 width=1/ qed.
+
+lemma ltpss_dx_tpss2_lt: ∀L1,L2,I,V1,V2,e.
+                         L1 ▶* [0, e - 1] L2 → L2 ⊢ V1 ▶* [0, e - 1] V2 →
+                         0 < e → L1. ⓑ{I} V1 ▶* [0, e] L2. ⓑ{I} V2.
+#L1 #L2 #I #V1 #V2 #e #HL12 #HV12 #He
+>(plus_minus_m_m e 1) /2 width=1/
+qed.
+
+lemma ltpss_dx_tpss1_lt: ∀L1,L2,I,V1,V2,d,e.
+                         L1 ▶* [d - 1, e] L2 → L2 ⊢ V1 ▶* [d - 1, e] V2 →
+                         0 < d → L1. ⓑ{I} V1 ▶* [d, e] L2. ⓑ{I} V2.
+#L1 #L2 #I #V1 #V2 #d #e #HL12 #HV12 #Hd
+>(plus_minus_m_m d 1) /2 width=1/
+qed.
+
+lemma ltpss_dx_tps2_lt: ∀L1,L2,I,V1,V2,e.
+                        L1 ▶* [0, e - 1] L2 → L2 ⊢ V1 ▶ [0, e - 1] V2 →
+                        0 < e → L1. ⓑ{I} V1 ▶* [0, e] L2. ⓑ{I} V2.
+/3 width=1/ qed.
+
+lemma ltpss_dx_tps1_lt: ∀L1,L2,I,V1,V2,d,e.
+                        L1 ▶* [d - 1, e] L2 → L2 ⊢ V1 ▶ [d - 1, e] V2 →
+                        0 < d → L1. ⓑ{I} V1 ▶* [d, e] L2. ⓑ{I} V2.
+/3 width=1/ qed.
+
+(* Basic_1: was by definition: csubst1_refl *)
+lemma ltpss_dx_refl: ∀L,d,e. L ▶* [d, e] L.
+#L elim L -L //
+#L #I #V #IHL * /2 width=1/ * /2 width=1/
+qed.
+
+lemma ltpss_dx_weak: ∀L1,L2,d1,e1. L1 ▶* [d1, e1] L2 →
+                     ∀d2,e2. d2 ≤ d1 → d1 + e1 ≤ d2 + e2 → L1 ▶* [d2, e2] L2.
+#L1 #L2 #d1 #e1 #H elim H -L1 -L2 -d1 -e1 //
+[ #L1 #L2 #I #V1 #V2 #e1 #_ #HV12 #IHL12 #d2 #e2 #Hd2 #Hde2
+  lapply (le_n_O_to_eq … Hd2) #H destruct normalize in Hde2;
+  lapply (lt_to_le_to_lt 0 … Hde2) // #He2
+  lapply (le_plus_to_minus_r … Hde2) -Hde2 /3 width=5/
+| #L1 #L2 #I #V1 #V2 #d1 #e1 #_ #HV12 #IHL12 #d2 #e2 #Hd21 #Hde12
+  >plus_plus_comm_23 in Hde12; #Hde12
+  elim (le_to_or_lt_eq 0 d2 ?) // #H destruct
+  [ lapply (le_plus_to_minus_r … Hde12) -Hde12 <plus_minus // #Hde12
+    lapply (le_plus_to_minus … Hd21) -Hd21 #Hd21 /3 width=5/
+  | -Hd21 normalize in Hde12;
+    lapply (lt_to_le_to_lt 0 … Hde12) // #He2
+    lapply (le_plus_to_minus_r … Hde12) -Hde12
+    /3 width=5 by ltpss_dx_tpss2_lt, tpss_weak/ (**) (* /3 width=5/ used to work *)
+  ]
+]
+qed.
+
+lemma ltpss_dx_weak_all: ∀L1,L2,d,e. L1 ▶* [d, e] L2 → L1 ▶* [0, |L2|] L2.
+#L1 #L2 #d #e #H elim H -L1 -L2 -d -e
+// /3 width=2/ /3 width=3/
+qed.
+
+fact ltpss_dx_append_le_aux: ∀K1,K2,d,x. K1 ▶* [d, x] K2 → x = |K1| - d →
+                             ∀L1,L2,e. L1 ▶* [0, e] L2 → d ≤ |K1| →
+                             L1 @@ K1 ▶* [d, x + e] L2 @@ K2.
+#K1 #K2 #d #x #H elim H -K1 -K2 -d -x
+[ #d #x #H1 #L1 #L2 #e #HL12 #H2 destruct
+  lapply (le_n_O_to_eq … H2) -H2 #H destruct //
+| #K #I #V <minus_n_O normalize <plus_n_Sm #H destruct
+| #K1 #K2 #I #V1 #V2 #x #_ #HV12 <minus_n_O #IHK12 <minus_n_O #H #L1 #L2 #e #HL12 #_
+  lapply (injective_plus_l … H) -H #H destruct >plus_plus_comm_23
+  /4 width=5 by ltpss_dx_tpss2, tpss_append, tpss_weak, monotonic_le_plus_r/ (**) (* too slow without trace *)
+| #K1 #K2 #I #V1 #V2 #d #x #_ #HV12 #IHK12 normalize <minus_le_minus_minus_comm // <minus_plus_m_m #H1 #L1 #L2 #e #HL12 #H2 destruct
+  lapply (le_plus_to_le_r … H2) -H2 #Hd
+  /4 width=5 by ltpss_dx_tpss1, tpss_append, tpss_weak, monotonic_le_plus_r/ (**) (* too slow without trace *)
+]
+qed-.
+
+lemma ltpss_dx_append_le: ∀K1,K2,d. K1 ▶* [d, |K1| - d] K2 →
+                          ∀L1,L2,e. L1 ▶* [0, e] L2 → d ≤ |K1| →
+                          L1 @@ K1 ▶* [d, |K1| - d + e] L2 @@ K2.
+/2 width=1 by ltpss_dx_append_le_aux/ qed.
+
+lemma ltpss_dx_append_zero: ∀K1,K2. K1 ▶* [0, |K1|] K2 →
+                            ∀L1,L2,e. L1 ▶* [0, e] L2 →
+                            L1 @@ K1 ▶* [0, |K1| + e] L2 @@ K2.
+/2 width=1/ qed.
+
+lemma ltpss_dx_append_ge: ∀K1,K2,d,e. K1 ▶* [d, e] K2 →
+                          ∀L1,L2. L1 ▶* [d - |K1|, e] L2 → |K1| ≤ d →
+                          L1 @@ K1 ▶* [d, e] L2 @@ K2.
+#K1 #K2 #d #e #H elim H -K1 -K2 -d -e
+[ #d #e #L1 #L2 <minus_n_O //
+| #K #I #V #L1 #L2 #_ #H 
+  lapply (le_n_O_to_eq … H) -H normalize <plus_n_Sm #H destruct
+| #K1 #K2 #I #V1 #V2 #e #_ #_ #_ #L1 #L2 #_ #H
+  lapply (le_n_O_to_eq … H) -H normalize <plus_n_Sm #H destruct
+| #K1 #K2 #I #V1 #V2 #d #e #_ #HV12 #IHK12 #L1 #L2
+  normalize <minus_le_minus_minus_comm // <minus_plus_m_m #HL12 #H
+  lapply (le_plus_to_le_r … H) -H /3 width=1/
+]
+qed.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma ltpss_dx_fwd_length: ∀L1,L2,d,e. L1 ▶* [d, e] L2 → |L1| = |L2|.
+#L1 #L2 #d #e #H elim H -L1 -L2 -d -e
+normalize //
+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
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_dx_ldrop.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_dx_ldrop.ma
new file mode 100644 (file)
index 0000000..4aa2f57
--- /dev/null
@@ -0,0 +1,131 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/ltpss_dx.ma".
+
+(* DX PARALLEL UNFOLD ON LOCAL ENVIRONMENTS *********************************)
+
+lemma ltpss_dx_ldrop_conf_ge: ∀L0,L1,d1,e1. L0 ▶* [d1, e1] L1 →
+                              ∀L2,e2. ⇩[0, e2] L0 ≡ L2 →
+                              d1 + e1 ≤ e2 → ⇩[0, e2] L1 ≡ L2.
+#L0 #L1 #d1 #e1 #H elim H -L0 -L1 -d1 -e1
+[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H //
+| //
+| normalize #K0 #K1 #I #V0 #V1 #e1 #_ #_ #IHK01 #L2 #e2 #H #He12
+  elim (le_inv_plus_l … He12) #_ #He2
+  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
+  lapply (IHK01 … HK0L2 ?) -K0 /2 width=1/
+| #K0 #K1 #I #V0 #V1 #d1 #e1 >plus_plus_comm_23 #_ #_ #IHK01 #L2 #e2 #H #Hd1e2
+  elim (le_inv_plus_l … Hd1e2) #_ #He2
+  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
+  lapply (IHK01 … HK0L2 ?) -K0 /2 width=1/
+]
+qed.
+
+lemma ltpss_dx_ldrop_trans_ge: ∀L1,L0,d1,e1. L1 ▶* [d1, e1] L0 →
+                               ∀L2,e2. ⇩[0, e2] L0 ≡ L2 →
+                               d1 + e1 ≤ e2 → ⇩[0, e2] L1 ≡ L2.
+#L1 #L0 #d1 #e1 #H elim H -L1 -L0 -d1 -e1
+[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H //
+| //
+| normalize #K1 #K0 #I #V1 #V0 #e1 #_ #_ #IHK10 #L2 #e2 #H #He12
+  elim (le_inv_plus_l … He12) #_ #He2
+  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
+  lapply (IHK10 … HK0L2 ?) -K0 /2 width=1/
+| #K0 #K1 #I #V1 #V0 #d1 #e1 >plus_plus_comm_23 #_ #_ #IHK10 #L2 #e2 #H #Hd1e2
+  elim (le_inv_plus_l … Hd1e2) #_ #He2
+  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
+  lapply (IHK10 … HK0L2 ?) -IHK10 -HK0L2 /2 width=1/
+]
+qed.
+
+lemma ltpss_dx_ldrop_conf_be: ∀L0,L1,d1,e1. L0 ▶* [d1, e1] L1 →
+                              ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → d1 ≤ e2 → e2 ≤ d1 + e1 →
+                              ∃∃L. L2 ▶* [0, d1 + e1 - e2] L & ⇩[0, e2] L1 ≡ L.
+#L0 #L1 #d1 #e1 #H elim H -L0 -L1 -d1 -e1
+[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H /2 width=3/
+| normalize #L #I #V #L2 #e2 #HL2 #_ #He2
+  lapply (le_n_O_to_eq … He2) -He2 #H destruct
+  lapply (ldrop_inv_refl … HL2) -HL2 #H destruct /2 width=3/
+| normalize #K0 #K1 #I #V0 #V1 #e1 #HK01 #HV01 #IHK01 #L2 #e2 #H #_ #He21
+  lapply (ldrop_inv_O1 … H) -H * * #He2 #HK0L2
+  [ -IHK01 -He21 destruct <minus_n_O /3 width=3/
+  | -HK01 -HV01 <minus_le_minus_minus_comm //
+    elim (IHK01 … HK0L2 ? ?) -K0 // /2 width=1/ /3 width=3/
+  ]
+| #K0 #K1 #I #V0 #V1 #d1 #e1 >plus_plus_comm_23 #_ #_ #IHK01 #L2 #e2 #H #Hd1e2 #He2de1
+  elim (le_inv_plus_l … Hd1e2) #_ #He2
+  <minus_le_minus_minus_comm //
+  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
+  elim (IHK01 … HK0L2 ? ?) -K0 /2 width=1/ /3 width=3/
+]
+qed.
+
+lemma ltpss_dx_ldrop_trans_be: ∀L1,L0,d1,e1. L1 ▶* [d1, e1] L0 →
+                               ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → d1 ≤ e2 → e2 ≤ d1 + e1 →
+                               ∃∃L. L ▶* [0, d1 + e1 - e2] L2 & ⇩[0, e2] L1 ≡ L.
+#L1 #L0 #d1 #e1 #H elim H -L1 -L0 -d1 -e1
+[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H /2 width=3/
+| normalize #L #I #V #L2 #e2 #HL2 #_ #He2
+  lapply (le_n_O_to_eq … He2) -He2 #H destruct
+  lapply (ldrop_inv_refl … HL2) -HL2 #H destruct /2 width=3/
+| normalize #K1 #K0 #I #V1 #V0 #e1 #HK10 #HV10 #IHK10 #L2 #e2 #H #_ #He21
+  lapply (ldrop_inv_O1 … H) -H * * #He2 #HK0L2
+  [ -IHK10 -He21 destruct <minus_n_O /3 width=3/
+  | -HK10 -HV10 <minus_le_minus_minus_comm //
+    elim (IHK10 … HK0L2 ? ?) -K0 // /2 width=1/ /3 width=3/
+  ]
+| #K1 #K0 #I #V1 #V0 #d1 #e1 >plus_plus_comm_23 #_ #_ #IHK10 #L2 #e2 #H #Hd1e2 #He2de1
+  elim (le_inv_plus_l … Hd1e2) #_ #He2
+  <minus_le_minus_minus_comm //
+  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
+  elim (IHK10 … HK0L2 ? ?) -K0 /2 width=1/ /3 width=3/
+]
+qed.
+
+lemma ltpss_dx_ldrop_conf_le: ∀L0,L1,d1,e1. L0 ▶* [d1, e1] L1 →
+                              ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → e2 ≤ d1 →
+                              ∃∃L. L2 ▶* [d1 - e2, e1] L & ⇩[0, e2] L1 ≡ L.
+#L0 #L1 #d1 #e1 #H elim H -L0 -L1 -d1 -e1
+[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H /2 width=3/
+| /2 width=3/
+| normalize #K0 #K1 #I #V0 #V1 #e1 #HK01 #HV01 #_ #L2 #e2 #H #He2
+  lapply (le_n_O_to_eq … He2) -He2 #He2 destruct
+  lapply (ldrop_inv_refl … H) -H #H destruct /3 width=3/
+| #K0 #K1 #I #V0 #V1 #d1 #e1 #HK01 #HV01 #IHK01 #L2 #e2 #H #He2d1
+  lapply (ldrop_inv_O1 … H) -H * * #He2 #HK0L2
+  [ -IHK01 -He2d1 destruct <minus_n_O /3 width=3/
+  | -HK01 -HV01 <minus_le_minus_minus_comm //
+    elim (IHK01 … HK0L2 ?) -K0 /2 width=1/ /3 width=3/
+  ]
+]
+qed.
+
+lemma ltpss_dx_ldrop_trans_le: ∀L1,L0,d1,e1. L1 ▶* [d1, e1] L0 →
+                               ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → e2 ≤ d1 →
+                               ∃∃L. L ▶* [d1 - e2, e1] L2 & ⇩[0, e2] L1 ≡ L.
+#L1 #L0 #d1 #e1 #H elim H -L1 -L0 -d1 -e1
+[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H /2 width=3/
+| /2 width=3/
+| normalize #K1 #K0 #I #V1 #V0 #e1 #HK10 #HV10 #_ #L2 #e2 #H #He2
+  lapply (le_n_O_to_eq … He2) -He2 #He2 destruct
+  lapply (ldrop_inv_refl … H) -H #H destruct /3 width=3/
+| #K1 #K0 #I #V1 #V0 #d1 #e1 #HK10 #HV10 #IHK10 #L2 #e2 #H #He2d1
+  lapply (ldrop_inv_O1 … H) -H * * #He2 #HK0L2
+  [ -IHK10 -He2d1 destruct <minus_n_O /3 width=3/
+  | -HK10 -HV10 <minus_le_minus_minus_comm //
+    elim (IHK10 … HK0L2 ?) -K0 /2 width=1/ /3 width=3/
+  ]
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_dx_ltpss_dx.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_dx_ltpss_dx.ma
new file mode 100644 (file)
index 0000000..5ea9f6b
--- /dev/null
@@ -0,0 +1,135 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/tpss_tpss.ma".
+include "basic_2/unfold/tpss_alt.ma".
+include "basic_2/unfold/ltpss_dx_tpss.ma".
+
+(* DX PARTIAL UNFOLD ON LOCAL ENVIRONMENTS **********************************)
+
+(* Advanced properties ******************************************************)
+
+lemma ltpss_dx_tpss_conf: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶* [d2, e2] U2 →
+                          ∀L1,d1,e1. L0 ▶* [d1, e1] L1 →
+                          ∃∃T. L1 ⊢ T2 ▶* [d2, e2] T &
+                               L1 ⊢ U2 ▶* [d1, e1] T.
+#L0 #T2 #U2 #d2 #e2 #H #L1 #d1 #e1 #HL01 @(tpss_ind … H) -U2 /2 width=3/
+#U #U2 #_ #HU2 * #X2 #HTX2 #HUX2
+elim (ltpss_dx_tps_conf … HU2 … HL01) -L0 #X1 #HUX1 #HU2X1
+elim (tpss_strip_eq … HUX2 … HUX1) -U #X #HX2 #HX1
+lapply (tpss_trans_eq … HU2X1 … HX1) -X1 /3 width=3/
+qed.
+
+lemma ltpss_dx_tpss_trans_down: ∀L0,L1,T2,U2,d1,e1,d2,e2. d2 + e2 ≤ d1 →
+                                L1 ▶* [d1, e1] L0 → L0 ⊢ T2 ▶* [d2, e2] U2 →
+                                ∃∃T. L1 ⊢ T2 ▶* [d2, e2] T & L0 ⊢ T ▶* [d1, e1] U2.
+#L0 #L1 #T2 #U2 #d1 #e1 #d2 #e2 #Hde2d1 #HL10 #H @(tpss_ind … H) -U2
+[ /2 width=3/
+| #U #U2 #_ #HU2 * #T #HT2 #HTU
+  elim (tpss_strap1_down … HTU … HU2 ?) -U // #U #HTU #HU2
+  elim (ltpss_dx_tps_trans … HTU … HL10) -HTU -HL10 #X #HTX #HXU
+  lapply (tpss_trans_eq … HXU HU2) -U /3 width=3/
+]
+qed.
+
+fact ltpss_dx_tpss_trans_eq_aux: ∀Y1,X2,L1,T2,U2,d,e.
+                                 L1 ⊢ T2 ▶* [d, e] U2 → ∀L0. L0 ▶* [d, e] L1 →
+                                 Y1 = L1 → X2 = T2 → L0 ⊢ T2 ▶* [d, e] U2.
+#Y1 #X2 @(fw_ind … Y1 X2) -Y1 -X2 #Y1 #X2 #IH
+#L1 #T2 #U2 #d #e #H @(tpss_ind_alt … H) -L1 -T2 -U2 -d -e
+[ //
+| #L1 #K1 #V1 #V2 #W2 #i #d #e #Hdi #Hide #HLK1 #HV12 #HVW2 #_ #L0 #HL01 #H1 #H2 destruct
+  lapply (ldrop_fwd_lw … HLK1) #H1 normalize in H1;
+  elim (ltpss_dx_ldrop_trans_be … HL01 … HLK1 ? ?) -HL01 -HLK1 // /2 width=2/ #X #H #HLK0
+  elim (ltpss_dx_inv_tpss22 … H ?) -H /2 width=1/ #K0 #V0 #HK01 #HV01 #H destruct
+  lapply (tpss_fwd_tw … HV01) #H2
+  lapply (transitive_le (#{K1} + #{V0}) … H1) -H1 /2 width=1/ -H2 #H
+  lapply (tpss_trans_eq … HV01 HV12) -V1 #HV02
+  lapply (IH … HV02 … HK01 ? ?) -IH -HV02 -HK01
+  [1,3: // |2,4: skip | normalize /2 width=1/ | /2 width=6/ ]
+| #L #a #I #V1 #V2 #T1 #T2 #d #e #HV12 #HT12 #_ #_ #L0 #HL0 #H1 #H2 destruct
+  lapply (tpss_lsubs_trans … HT12 (L. ⓑ{I} V1) ?) -HT12 /2 width=1/ #HT12
+  lapply (IH … HV12 … HL0 ? ?) -HV12 [1,3: // |2,4: skip |5: /2 width=2/ ] #HV12
+  lapply (IH … HT12 (L0. ⓑ{I} V1) ? ? ?) -IH -HT12 [1,3,5: /2 width=2/ |2,4: skip | normalize // ] -HL0 #HT12
+  lapply (tpss_lsubs_trans … HT12 (L0. ⓑ{I} V2) ?) -HT12 /2 width=1/
+| #L #I #V1 #V2 #T1 #T2 #d #e #HV12 #HT12 #_ #_ #L0 #HL0 #H1 #H2 destruct
+  lapply (IH … HV12 … HL0 ? ?) -HV12 [1,3: // |2,4: skip |5: /2 width=3/ ]
+  lapply (IH … HT12 … HL0 ? ?) -IH -HT12 [1,3,5: normalize // |2,4: skip ] -HL0 /2 width=1/
+]
+qed.
+
+lemma ltpss_dx_tpss_trans_eq: ∀L1,T2,U2,d,e. L1 ⊢ T2 ▶* [d, e] U2 →
+                              ∀L0. L0 ▶* [d, e] L1 → L0 ⊢ T2 ▶* [d, e] U2.
+/2 width=5/ qed.
+
+lemma ltpss_dx_tps_trans_eq: ∀L0,L1,T2,U2,d,e. L0 ▶* [d, e] L1 →
+                             L1 ⊢ T2 ▶ [d, e] U2 → L0 ⊢ T2 ▶* [d, e] U2.
+/3 width=3/ qed.
+
+(* Main properties **********************************************************)
+
+fact ltpss_dx_conf_aux: ∀K,K1,L1,d1,e1. K1 ▶* [d1, e1] L1 →
+                        ∀K2,L2,d2,e2. K2 ▶* [d2, e2] L2 → K1 = K → K2 = K →
+                        ∃∃L. L1 ▶* [d2, e2] L & L2 ▶* [d1, e1] L.
+#K @(lw_ind … K) -K #K #IH #K1 #L1 #d1 #e1 * -K1 -L1 -d1 -e1
+[ -IH /2 width=3/
+| -IH #K1 #I1 #V1 #K2 #L2 #d2 #e2 * -K2 -L2 -d2 -e2
+  [ /2 width=3/
+  | #K2 #I2 #V2 #H1 #H2 destruct /2 width=3/
+  | #K2 #L2 #I2 #W2 #V2 #e2 #HKL2 #HWV2 #H1 #H2 destruct /3 width=3/
+  | #K2 #L2 #I2 #W2 #V2 #d2 #e2 #HKL2 #HWV2 #H1 #H2 destruct /3 width=3/
+  ]
+| #K1 #L1 #I1 #W1 #V1 #e1 #HKL1 #HWV1 #K2 #L2 #d2 #e2 * -K2 -L2 -d2 -e2
+  [ -IH #d2 #e2 #H1 #H2 destruct
+  | -IH #K2 #I2 #V2 #H1 #H2 destruct /3 width=5/
+  | #K2 #L2 #I2 #W2 #V2 #e2 #HKL2 #HWV2 #H1 #H2 destruct
+    elim (IH … HKL1 … HKL2 ? ?) -IH [2,4: // |3: skip |5: /2 width=1/ ] -K1 #L #HL1 #HL2
+    elim (ltpss_dx_tpss_conf … HWV1 … HL1) #U1 #HWU1 #HVU1
+    elim (ltpss_dx_tpss_conf … HWV2 … HL2) #U2 #HWU2 #HVU2
+    elim (tpss_conf_eq … HWU1 … HWU2) -W1 #W #HU1W #HU2W
+    lapply (tpss_trans_eq … HVU1 HU1W) -U1
+    lapply (tpss_trans_eq … HVU2 HU2W) -U2 /3 width=5/
+  | #K2 #L2 #I2 #W2 #V2 #d2 #e2 #HKL2 #HWV2 #H1 #H2 destruct
+    elim (IH … HKL1 … HKL2 ? ?) -IH [2,4: // |3: skip |5: /2 width=1/ ] -K1 #L #HL1 #HL2
+    elim (ltpss_dx_tpss_conf … HWV1 … HL1) #U1 #HWU1 #HVU1
+    elim (ltpss_dx_tpss_conf … HWV2 … HL2) #U2 #HWU2 #HVU2
+    elim (tpss_conf_eq … HWU1 … HWU2) -W1 #W #HU1W #HU2W
+    lapply (tpss_trans_eq … HVU1 HU1W) -U1
+    lapply (tpss_trans_eq … HVU2 HU2W) -U2 /3 width=5/
+  ]
+| #K1 #L1 #I1 #W1 #V1 #d1 #e1 #HKL1 #HWV1 #K2 #L2 #d2 #e2 * -K2 -L2 -d2 -e2
+  [ -IH #d2 #e2 #H1 #H2 destruct
+  | -IH #K2 #I2 #V2 #H1 #H2 destruct /3 width=5/
+  | #K2 #L2 #I2 #W2 #V2 #e2 #HKL2 #HWV2 #H1 #H2 destruct
+    elim (IH … HKL1 … HKL2 ? ?) -IH [2,4: // |3: skip |5: /2 width=1/ ] -K1 #L #HL1 #HL2
+    elim (ltpss_dx_tpss_conf … HWV1 … HL1) #U1 #HWU1 #HVU1
+    elim (ltpss_dx_tpss_conf … HWV2 … HL2) #U2 #HWU2 #HVU2
+    elim (tpss_conf_eq … HWU1 … HWU2) -W1 #W #HU1W #HU2W
+    lapply (tpss_trans_eq … HVU1 HU1W) -U1
+    lapply (tpss_trans_eq … HVU2 HU2W) -U2 /3 width=5/
+  | #K2 #L2 #I2 #W2 #V2 #d2 #e2 #HKL2 #HWV2 #H1 #H2 destruct
+    elim (IH … HKL1 … HKL2 ? ?) -IH [2,4: // |3: skip |5: /2 width=1/ ] -K1 #L #HL1 #HL2
+    elim (ltpss_dx_tpss_conf … HWV1 … HL1) #U1 #HWU1 #HVU1
+    elim (ltpss_dx_tpss_conf … HWV2 … HL2) #U2 #HWU2 #HVU2
+    elim (tpss_conf_eq … HWU1 … HWU2) -W1 #W #HU1W #HU2W
+    lapply (tpss_trans_eq … HVU1 HU1W) -U1
+    lapply (tpss_trans_eq … HVU2 HU2W) -U2 /3 width=5/
+  ]
+]
+qed.
+
+theorem ltpss_dx_conf: ∀L0,L1,d1,e1. L0 ▶* [d1, e1] L1 →
+                       ∀L2,d2,e2. L0 ▶* [d2, e2] L2 →
+                       ∃∃L. L1 ▶* [d2, e2] L & L2 ▶* [d1, e1] L.
+/2 width=7/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_dx_tps.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_dx_tps.ma
new file mode 100644 (file)
index 0000000..b103066
--- /dev/null
@@ -0,0 +1,47 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/ltpss_dx_ldrop.ma".
+
+(* DX PARALLEL UNFOLD ON LOCAL ENVIRONMENTS *********************************)
+
+(* Properties concerning partial substitution on terms **********************)
+
+lemma ltpss_dx_tps_conf_ge: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶ [d2, e2] U2 →
+                            ∀L1,d1,e1. L0 ▶* [d1, e1] L1 → d1 + e1 ≤ d2 →
+                            L1 ⊢ T2 ▶ [d2, e2] U2.
+#L0 #T2 #U2 #d2 #e2 #H elim H -L0 -T2 -U2 -d2 -e2
+[ //
+| #L0 #K0 #V0 #W0 #i2 #d2 #e2 #Hdi2 #Hide2 #HLK0 #HVW0 #L1 #d1 #e1 #HL01 #Hde1d2
+  lapply (transitive_le … Hde1d2 Hdi2) -Hde1d2 #Hde1i2
+  lapply (ltpss_dx_ldrop_conf_ge … HL01 … HLK0 ?) -L0 // /2 width=4/
+| #L0 #a #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL01 #Hde1d2
+  @tps_bind [ /2 width=4/ | @IHTU2 -IHTU2 -IHVW2 [3: /2 by ltpss_dx_tpss1/ |1,2: skip | /2 width=1/ ] ] (**) (* explicit constructor *)
+| /3 width=4/
+]
+qed.
+
+lemma ltpss_dx_tps_trans_ge: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶ [d2, e2] U2 →
+                             ∀L1,d1,e1. L1 ▶* [d1, e1] L0 → d1 + e1 ≤ d2 →
+                             L1 ⊢ T2 ▶ [d2, e2] U2.
+#L0 #T2 #U2 #d2 #e2 #H elim H -L0 -T2 -U2 -d2 -e2
+[ //
+| #L0 #K0 #V0 #W0 #i2 #d2 #e2 #Hdi2 #Hide2 #HLK0 #HVW0 #L1 #d1 #e1 #HL10 #Hde1d2
+  lapply (transitive_le … Hde1d2 Hdi2) -Hde1d2 #Hde1i2
+  lapply (ltpss_dx_ldrop_trans_ge … HL10 … HLK0 ?) -L0 // /2 width=4/
+| #L0 #a #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL10 #Hde1d2
+  @tps_bind [ /2 width=4/ | @IHTU2 -IHTU2 -IHVW2 [3: /2 by ltpss_dx_tpss1/ |1,2: skip | /2 width=1/ ] ] (**) (* explicit constructor *)
+| /3 width=4/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_dx_tpss.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_dx_tpss.ma
new file mode 100644 (file)
index 0000000..c3840c3
--- /dev/null
@@ -0,0 +1,102 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/tpss_lift.ma".
+include "basic_2/unfold/ltpss_dx_tps.ma".
+
+(* DX PARALLEL UNFOLD ON LOCAL ENVIRONMENTS *********************************)
+
+(* Properties concerning partial unfold on terms ****************************)
+
+lemma ltpss_dx_tpss_conf_ge: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶* [d2, e2] U2 →
+                             ∀L1,d1,e1. L0 ▶* [d1, e1] L1 → d1 + e1 ≤ d2 →
+                             L1 ⊢ T2 ▶* [d2, e2] U2.
+#L0 #T2 #U2 #d2 #e2 #H #L1 #d1 #e1 #HL01 #Hde1d2 @(tpss_ind … H) -U2 //
+#U #U2 #_ #HU2 #IHU
+lapply (ltpss_dx_tps_conf_ge … HU2 … HL01 ?) -L0 // -Hde1d2 /2 width=3/
+qed.
+
+(* Basic_1: was: subst1_subst1_back *)
+lemma ltpss_dx_tps_conf: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶ [d2, e2] U2 →
+                         ∀L1,d1,e1. L0 ▶* [d1, e1] L1 →
+                         ∃∃T. L1 ⊢ T2 ▶ [d2, e2] T &
+                              L1 ⊢ U2 ▶* [d1, e1] T.
+#L0 #T2 #U2 #d2 #e2 #H elim H -L0 -T2 -U2 -d2 -e2
+[ /2 width=3/
+| #L0 #K0 #V0 #W0 #i2 #d2 #e2 #Hdi2 #Hide2 #HLK0 #HVW0 #L1 #d1 #e1 #HL01
+  elim (lt_or_ge i2 d1) #Hi2d1
+  [ elim (ltpss_dx_ldrop_conf_le … HL01 … HLK0 ?) -L0 /2 width=2/ #X #H #HLK1
+    elim (ltpss_dx_inv_tpss11 … H ?) -H /2 width=1/ #K1 #V1 #_ #HV01 #H destruct
+    lapply (ldrop_fwd_ldrop2 … HLK1) #H
+    elim (lift_total V1 0 (i2 + 1)) #W1 #HVW1
+    lapply (tpss_lift_ge … HV01 … H HVW0 … HVW1) -V0 -H // >minus_plus <plus_minus_m_m // /3 width=4/
+  | elim (lt_or_ge i2 (d1 + e1)) #Hde1i2
+    [ elim (ltpss_dx_ldrop_conf_be … HL01 … HLK0 ? ?) -L0 // /2 width=2/ #X #H #HLK1
+      elim (ltpss_dx_inv_tpss21 … H ?) -H /2 width=1/ #K1 #V1 #_ #HV01 #H destruct
+      lapply (ldrop_fwd_ldrop2 … HLK1) #H
+      elim (lift_total V1 0 (i2 + 1)) #W1 #HVW1
+      lapply (tpss_lift_ge … HV01 … H HVW0 … HVW1) -V0 -H // normalize #HW01
+      lapply (tpss_weak … HW01 d1 e1 ? ?) [2: /2 width=1/ |3: /3 width=4/ ] >minus_plus >commutative_plus /2 width=1/
+    | lapply (ltpss_dx_ldrop_conf_ge … HL01 … HLK0 ?) -L0 // /3 width=4/
+    ]
+  ]
+| #L0 #a #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL01
+  elim (IHVW2 … HL01) -IHVW2 #V #HV2 #HVW2
+  elim (IHTU2 (L1. ⓑ{I} V) (d1 + 1) e1 ?) -IHTU2 /2 width=1/ -HL01 /3 width=5/
+| #L0 #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL01
+  elim (IHVW2 … HL01) -IHVW2
+  elim (IHTU2 … HL01) -IHTU2 -HL01 /3 width=5/
+]
+qed.
+  
+lemma ltpss_dx_tpss_trans_ge: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶* [d2, e2] U2 →
+                              ∀L1,d1,e1. L1 ▶* [d1, e1] L0 → d1 + e1 ≤ d2 →
+                              L1 ⊢ T2 ▶* [d2, e2] U2.
+#L0 #T2 #U2 #d2 #e2 #H #L1 #d1 #e1 #HL01 #Hde1d2 @(tpss_ind … H) -U2 //
+#U #U2 #_ #HU2 #IHU
+lapply (ltpss_dx_tps_trans_ge … HU2 … HL01 ?) -L0 // -Hde1d2 /2 width=3/
+qed.
+
+(* Basic_1: was: subst1_subst1 *)
+lemma ltpss_dx_tps_trans: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶ [d2, e2] U2 →
+                          ∀L1,d1,e1. L1 ▶* [d1, e1] L0 →
+                          ∃∃T. L1 ⊢ T2 ▶ [d2, e2] T &
+                               L0 ⊢ T ▶* [d1, e1] U2.
+#L0 #T2 #U2 #d2 #e2 #H elim H -L0 -T2 -U2 -d2 -e2
+[ /2 width=3/
+| #L0 #K0 #V0 #W0 #i2 #d2 #e2 #Hdi2 #Hide2 #HLK0 #HVW0 #L1 #d1 #e1 #HL10
+  elim (lt_or_ge i2 d1) #Hi2d1
+  [ elim (ltpss_dx_ldrop_trans_le … HL10 … HLK0 ?) -HL10 /2 width=2/ #X #H #HLK1
+    elim (ltpss_dx_inv_tpss12 … H ?) -H /2 width=1/ #K1 #V1 #_ #HV01 #H destruct
+    lapply (ldrop_fwd_ldrop2 … HLK0) -HLK0 #H
+    elim (lift_total V1 0 (i2 + 1)) #W1 #HVW1
+    lapply (tpss_lift_ge … HV01 … H HVW1 … HVW0) -V0 -H // >minus_plus <plus_minus_m_m /2 width=1/ /3 width=4/
+  | elim (lt_or_ge i2 (d1 + e1)) #Hde1i2
+    [ elim (ltpss_dx_ldrop_trans_be … HL10 … HLK0 ? ?) -HL10 // /2 width=2/ #X #H #HLK1
+      elim (ltpss_dx_inv_tpss22 … H ?) -H /2 width=1/ #K1 #V1 #_ #HV01 #H destruct
+      lapply (ldrop_fwd_ldrop2 … HLK0) -HLK0 #H
+      elim (lift_total V1 0 (i2 + 1)) #W1 #HVW1
+      lapply (tpss_lift_ge … HV01 … H HVW1 … HVW0) -V0 -H // normalize #HW01
+      lapply (tpss_weak … HW01 d1 e1 ? ?) [2: /3 width=1/ |3: /3 width=4/ ] >minus_plus >commutative_plus /2 width=1/
+    | lapply (ltpss_dx_ldrop_trans_ge … HL10 … HLK0 ?) -HL10 -HLK0 // /3 width=4/
+    ]
+  ]
+| #L0 #a #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL10
+  elim (IHVW2 … HL10) -IHVW2 #V #HV2 #HVW2
+  elim (IHTU2 (L1. ⓑ{I} V) (d1 + 1) e1 ?) -IHTU2 /2 width=1/ -HL10 /3 width=5/
+| #L0 #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL10
+  elim (IHVW2 … HL10) -IHVW2
+  elim (IHTU2 … HL10) -IHTU2 -HL10 /3 width=5/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_sn.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_sn.ma
new file mode 100644 (file)
index 0000000..0d13a5a
--- /dev/null
@@ -0,0 +1,255 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/tpss.ma".
+
+(* SN PARALLEL UNFOLD ON LOCAL ENVIRONMENTS *********************************)
+
+inductive ltpss_sn: nat → nat → relation lenv ≝
+| ltpss_sn_atom : ∀d,e. ltpss_sn d e (⋆) (⋆)
+| ltpss_sn_pair : ∀L,I,V. ltpss_sn 0 0 (L. ⓑ{I} V) (L. ⓑ{I} V)
+| ltpss_sn_tpss2: ∀L1,L2,I,V1,V2,e.
+                  ltpss_sn 0 e L1 L2 → L1 ⊢ V1 ▶* [0, e] V2 →
+                  ltpss_sn 0 (e + 1) (L1. ⓑ{I} V1) (L2. ⓑ{I} V2)
+| ltpss_sn_tpss1: ∀L1,L2,I,V1,V2,d,e.
+                  ltpss_sn d e L1 L2 → L1 ⊢ V1 ▶* [d, e] V2 →
+                  ltpss_sn (d + 1) e (L1. ⓑ{I} V1) (L2. ⓑ{I} V2)
+.
+
+interpretation "parallel unfold (local environment, sn variant)"
+   'PSubstStarSn L1 d e L2 = (ltpss_sn d e L1 L2).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact ltpss_sn_inv_refl_O2_aux: ∀d,e,L1,L2. L1 ⊢ ▶* [d, e] L2 → e = 0 → L1 = L2.
+#d #e #L1 #L2 #H elim H -d -e -L1 -L2 //
+[ #L1 #L2 #I #V1 #V2 #e #_ #_ #_ >commutative_plus normalize #H destruct
+| #L1 #L2 #I #V1 #V2 #d #e #_ #HV12 #IHL12 #He destruct
+  >(IHL12 ?) -IHL12 // >(tpss_inv_refl_O2 … HV12) //
+]
+qed.
+
+lemma ltpss_sn_inv_refl_O2: ∀d,L1,L2. L1 ⊢ ▶* [d, 0] L2 → L1 = L2.
+/2 width=4/ qed-.
+
+fact ltpss_sn_inv_atom1_aux: ∀d,e,L1,L2.
+                             L1 ⊢ ▶* [d, e] L2 → L1 = ⋆ → L2 = ⋆.
+#d #e #L1 #L2 * -d -e -L1 -L2
+[ //
+| #L #I #V #H destruct
+| #L1 #L2 #I #V1 #V2 #e #_ #_ #H destruct
+| #L1 #L2 #I #V1 #V2 #d #e #_ #_ #H destruct
+]
+qed.
+
+lemma ltpss_sn_inv_atom1: ∀d,e,L2. ⋆ ⊢ ▶* [d, e] L2 → L2 = ⋆.
+/2 width=5/ qed-.
+
+fact ltpss_sn_inv_tpss21_aux: ∀d,e,L1,L2. L1 ⊢ ▶* [d, e] L2 → d = 0 → 0 < e →
+                              ∀K1,I,V1. L1 = K1. ⓑ{I} V1 →
+                              ∃∃K2,V2. K1 ⊢ ▶* [0, e - 1] K2 &
+                                       K1 ⊢ V1 ▶* [0, e - 1] V2 &
+                                       L2 = K2. ⓑ{I} V2.
+#d #e #L1 #L2 * -d -e -L1 -L2
+[ #d #e #_ #_ #K1 #I #V1 #H destruct
+| #L1 #I #V #_ #H elim (lt_refl_false … H)
+| #L1 #L2 #I #V1 #V2 #e #HL12 #HV12 #_ #_ #K1 #J #W1 #H destruct /2 width=5/
+| #L1 #L2 #I #V1 #V2 #d #e #_ #_ >commutative_plus normalize #H destruct
+]
+qed.
+
+lemma ltpss_sn_inv_tpss21: ∀e,K1,I,V1,L2. K1. ⓑ{I} V1 ⊢ ▶* [0, e] L2 → 0 < e →
+                           ∃∃K2,V2. K1 ⊢ ▶* [0, e - 1] K2 &
+                                    K1 ⊢ V1 ▶* [0, e - 1] V2 &
+                                    L2 = K2. ⓑ{I} V2.
+/2 width=5/ qed-.
+
+fact ltpss_sn_inv_tpss11_aux: ∀d,e,L1,L2. L1 ⊢ ▶* [d, e] L2 → 0 < d →
+                              ∀I,K1,V1. L1 = K1. ⓑ{I} V1 →
+                              ∃∃K2,V2. K1 ⊢ ▶* [d - 1, e] K2 &
+                                       K1 ⊢ V1 ▶* [d - 1, e] V2 &
+                                       L2 = K2. ⓑ{I} V2.
+#d #e #L1 #L2 * -d -e -L1 -L2
+[ #d #e #_ #I #K1 #V1 #H destruct
+| #L #I #V #H elim (lt_refl_false … H)
+| #L1 #L2 #I #V1 #V2 #e #_ #_ #H elim (lt_refl_false … H)
+| #L1 #L2 #I #V1 #V2 #d #e #HL12 #HV12 #_ #J #K1 #W1 #H destruct /2 width=5/
+]
+qed.
+
+lemma ltpss_sn_inv_tpss11: ∀d,e,I,K1,V1,L2. K1. ⓑ{I} V1 ⊢ ▶* [d, e] L2 → 0 < d →
+                           ∃∃K2,V2. K1 ⊢ ▶* [d - 1, e] K2 &
+                                    K1 ⊢ V1 ▶* [d - 1, e] V2 &
+                                    L2 = K2. ⓑ{I} V2.
+/2 width=3/ qed-.
+
+fact ltpss_sn_inv_atom2_aux: ∀d,e,L1,L2.
+                             L1 ⊢ ▶* [d, e] L2 → L2 = ⋆ → L1 = ⋆.
+#d #e #L1 #L2 * -d -e -L1 -L2
+[ //
+| #L #I #V #H destruct
+| #L1 #L2 #I #V1 #V2 #e #_ #_ #H destruct
+| #L1 #L2 #I #V1 #V2 #d #e #_ #_ #H destruct
+]
+qed.
+
+lemma ltpss_sn_inv_atom2: ∀d,e,L1. L1 ⊢ ▶* [d, e] ⋆ → L1 = ⋆.
+/2 width=5/ qed-.
+
+fact ltpss_sn_inv_tpss22_aux: ∀d,e,L1,L2. L1 ⊢ ▶* [d, e] L2 → d = 0 → 0 < e →
+                              ∀K2,I,V2. L2 = K2. ⓑ{I} V2 →
+                              ∃∃K1,V1. K1 ⊢ ▶* [0, e - 1] K2 &
+                                       K1 ⊢ V1 ▶* [0, e - 1] V2 &
+                                       L1 = K1. ⓑ{I} V1.
+#d #e #L1 #L2 * -d -e -L1 -L2
+[ #d #e #_ #_ #K1 #I #V1 #H destruct
+| #L1 #I #V #_ #H elim (lt_refl_false … H)
+| #L1 #L2 #I #V1 #V2 #e #HL12 #HV12 #_ #_ #K2 #J #W2 #H destruct /2 width=5/
+| #L1 #L2 #I #V1 #V2 #d #e #_ #_ >commutative_plus normalize #H destruct
+]
+qed.
+
+lemma ltpss_sn_inv_tpss22: ∀e,L1,K2,I,V2. L1 ⊢ ▶* [0, e] K2. ⓑ{I} V2 → 0 < e →
+                           ∃∃K1,V1. K1 ⊢ ▶* [0, e - 1] K2 &
+                                    K1 ⊢ V1 ▶* [0, e - 1] V2 &
+                                    L1 = K1. ⓑ{I} V1.
+/2 width=5/ qed-.
+
+fact ltpss_sn_inv_tpss12_aux: ∀d,e,L1,L2. L1 ⊢ ▶* [d, e] L2 → 0 < d →
+                              ∀I,K2,V2. L2 = K2. ⓑ{I} V2 →
+                              ∃∃K1,V1. K1 ⊢ ▶* [d - 1, e] K2 &
+                                       K1 ⊢ V1 ▶* [d - 1, e] V2 &
+                                       L1 = K1. ⓑ{I} V1.
+#d #e #L1 #L2 * -d -e -L1 -L2
+[ #d #e #_ #I #K2 #V2 #H destruct
+| #L #I #V #H elim (lt_refl_false … H)
+| #L1 #L2 #I #V1 #V2 #e #_ #_ #H elim (lt_refl_false … H)
+| #L1 #L2 #I #V1 #V2 #d #e #HL12 #HV12 #_ #J #K2 #W2 #H destruct /2 width=5/
+]
+qed.
+
+lemma ltpss_sn_inv_tpss12: ∀L1,K2,I,V2,d,e. L1 ⊢ ▶* [d, e] K2. ⓑ{I} V2 → 0 < d →
+                           ∃∃K1,V1. K1 ⊢ ▶* [d - 1, e] K2 &
+                                    K1 ⊢ V1 ▶* [d - 1, e] V2 &
+                                    L1 = K1. ⓑ{I} V1.
+/2 width=3/ qed-.
+
+(* Basic properties *********************************************************)
+
+lemma ltpss_sn_tps2: ∀L1,L2,I,V1,V2,e.
+                     L1 ⊢ ▶* [0, e] L2 → L1 ⊢ V1 ▶ [0, e] V2 →
+                     L1. ⓑ{I} V1 ⊢ ▶* [0, e + 1] L2. ⓑ{I} V2.
+/3 width=1/ qed.
+
+lemma ltpss_sn_tps1: ∀L1,L2,I,V1,V2,d,e.
+                     L1 ⊢ ▶* [d, e] L2 → L1 ⊢ V1 ▶ [d, e] V2 →
+                     L1. ⓑ{I} V1 ⊢ ▶* [d + 1, e] L2. ⓑ{I} V2.
+/3 width=1/ qed.
+
+lemma ltpss_sn_tpss2_lt: ∀L1,L2,I,V1,V2,e.
+                         L1 ⊢ ▶* [0, e - 1] L2 → L1 ⊢ V1 ▶* [0, e - 1] V2 →
+                         0 < e → L1. ⓑ{I} V1 ⊢ ▶* [0, e] L2. ⓑ{I} V2.
+#L1 #L2 #I #V1 #V2 #e #HL12 #HV12 #He
+>(plus_minus_m_m e 1) /2 width=1/
+qed.
+
+lemma ltpss_sn_tpss1_lt: ∀L1,L2,I,V1,V2,d,e.
+                         L1 ⊢ ▶* [d - 1, e] L2 → L1 ⊢ V1 ▶* [d - 1, e] V2 →
+                         0 < d → L1. ⓑ{I} V1 ⊢ ▶* [d, e] L2. ⓑ{I} V2.
+#L1 #L2 #I #V1 #V2 #d #e #HL12 #HV12 #Hd
+>(plus_minus_m_m d 1) /2 width=1/
+qed.
+
+lemma ltpss_sn_tps2_lt: ∀L1,L2,I,V1,V2,e.
+                        L1 ⊢ ▶* [0, e - 1] L2 → L1 ⊢ V1 ▶ [0, e - 1] V2 →
+                        0 < e → L1. ⓑ{I} V1 ⊢ ▶* [0, e] L2. ⓑ{I} V2.
+/3 width=1/ qed.
+
+lemma ltpss_sn_tps1_lt: ∀L1,L2,I,V1,V2,d,e.
+                        L1 ⊢ ▶* [d - 1, e] L2 → L1 ⊢ V1 ▶ [d - 1, e] V2 →
+                        0 < d → L1. ⓑ{I} V1 ⊢ ▶* [d, e] L2. ⓑ{I} V2.
+/3 width=1/ qed.
+
+lemma ltpss_sn_refl: ∀L,d,e. L ⊢ ▶* [d, e] L.
+#L elim L -L //
+#L #I #V #IHL * /2 width=1/ * /2 width=1/
+qed.
+
+lemma ltpss_sn_weak: ∀L1,L2,d1,e1. L1 ⊢ ▶* [d1, e1] L2 →
+                     ∀d2,e2. d2 ≤ d1 → d1 + e1 ≤ d2 + e2 → L1 ⊢ ▶* [d2, e2] L2.
+#L1 #L2 #d1 #e1 #H elim H -L1 -L2 -d1 -e1 //
+[ #L1 #L2 #I #V1 #V2 #e1 #_ #HV12 #IHL12 #d2 #e2 #Hd2 #Hde2
+  lapply (le_n_O_to_eq … Hd2) #H destruct normalize in Hde2;
+  lapply (lt_to_le_to_lt 0 … Hde2) // #He2
+  lapply (le_plus_to_minus_r … Hde2) -Hde2 /3 width=5/
+| #L1 #L2 #I #V1 #V2 #d1 #e1 #_ #HV12 #IHL12 #d2 #e2 #Hd21 #Hde12
+  >plus_plus_comm_23 in Hde12; #Hde12
+  elim (le_to_or_lt_eq 0 d2 ?) // #H destruct
+  [ lapply (le_plus_to_minus_r … Hde12) -Hde12 <plus_minus // #Hde12
+    lapply (le_plus_to_minus … Hd21) -Hd21 #Hd21 /3 width=5/
+  | -Hd21 normalize in Hde12;
+    lapply (lt_to_le_to_lt 0 … Hde12) // #He2
+    lapply (le_plus_to_minus_r … Hde12) -Hde12
+    /3 width=5 by ltpss_sn_tpss2_lt, tpss_weak/ (**) (* /3 width=5/ used to work *)
+  ]
+]
+qed.
+
+lemma ltpss_sn_weak_all: ∀L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 → L1 ⊢ ▶* [0, |L1|] L2.
+#L1 #L2 #d #e #H elim H -L1 -L2 -d -e
+// /3 width=2/ /3 width=3/
+qed.
+
+fact ltpss_sn_append_le_aux: ∀K1,K2,d,x. K1 ⊢ ▶* [d, x] K2 → x = |K1| - d →
+                             ∀L1,L2,e. L1 ⊢ ▶* [0, e] L2 → d ≤ |K1| →
+                             L1 @@ K1 ⊢ ▶* [d, x + e] L2 @@ K2.
+#K1 #K2 #d #x #H elim H -K1 -K2 -d -x
+[ #d #x #H1 #L1 #L2 #e #HL12 #H2 destruct
+  lapply (le_n_O_to_eq … H2) -H2 #H destruct //
+| #K #I #V <minus_n_O normalize <plus_n_Sm #H destruct
+| #K1 #K2 #I #V1 #V2 #x #_ #HV12 <minus_n_O #IHK12 <minus_n_O #H #L1 #L2 #e #HL12 #_
+  lapply (injective_plus_l … H) -H #H destruct >plus_plus_comm_23
+  /4 width=5 by ltpss_sn_tpss2, tpss_append, tpss_weak, monotonic_le_plus_r/ (**) (* too slow without trace *)
+| #K1 #K2 #I #V1 #V2 #d #x #_ #HV12 #IHK12 normalize <minus_le_minus_minus_comm // <minus_plus_m_m #H1 #L1 #L2 #e #HL12 #H2 destruct
+  lapply (le_plus_to_le_r … H2) -H2 #Hd
+  /4 width=5 by ltpss_sn_tpss1, tpss_append, tpss_weak, monotonic_le_plus_r/ (**) (* too slow without trace *)
+]
+qed-.
+
+lemma ltpss_sn_append_le: ∀K1,K2,d. K1 ⊢ ▶* [d, |K1| - d] K2 →
+                          ∀L1,L2,e. L1 ⊢ ▶* [0, e] L2 → d ≤ |K1| →
+                          L1 @@ K1 ⊢ ▶* [d, |K1| - d + e] L2 @@ K2.
+/2 width=1 by ltpss_sn_append_le_aux/ qed.
+
+lemma ltpss_sn_append_ge: ∀K1,K2,d,e. K1 ⊢ ▶* [d, e] K2 →
+                          ∀L1,L2. L1 ⊢ ▶* [d - |K1|, e] L2 → |K1| ≤ d →
+                          L1 @@ K1 ⊢ ▶* [d, e] L2 @@ K2.
+#K1 #K2 #d #e #H elim H -K1 -K2 -d -e
+[ #d #e #L1 #L2 <minus_n_O //
+| #K #I #V #L1 #L2 #_ #H 
+  lapply (le_n_O_to_eq … H) -H normalize <plus_n_Sm #H destruct
+| #K1 #K2 #I #V1 #V2 #e #_ #_ #_ #L1 #L2 #_ #H
+  lapply (le_n_O_to_eq … H) -H normalize <plus_n_Sm #H destruct
+| #K1 #K2 #I #V1 #V2 #d #e #_ #HV12 #IHK12 #L1 #L2
+  normalize <minus_le_minus_minus_comm // <minus_plus_m_m #HL12 #H
+  lapply (le_plus_to_le_r … H) -H /3 width=1/
+]
+qed.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma ltpss_sn_fwd_length: ∀L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 → |L1| = |L2|.
+#L1 #L2 #d #e #H elim H -L1 -L2 -d -e
+normalize //
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_sn_alt.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_sn_alt.ma
new file mode 100644 (file)
index 0000000..7a453d2
--- /dev/null
@@ -0,0 +1,156 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/ltpss_dx_ltpss_dx.ma".
+include "basic_2/unfold/ltpss_sn_ltpss_sn.ma".
+
+(* SN PARALLEL UNFOLD ON LOCAL ENVIRONMENTS *********************************)
+
+(* alternative definition of ltpss_sn *)
+definition ltpssa: nat → nat → relation lenv ≝
+                   λd,e. TC … (ltpss_dx d e).
+
+interpretation "parallel unfold (local environment, sn variant) alternative"
+   'PSubstStarSnAlt L1 d e L2 = (ltpssa d e L1 L2).
+
+(* Basic eliminators ********************************************************)
+
+lemma ltpssa_ind: ∀d,e,L1. ∀R:predicate lenv. R L1 →
+                  (∀L,L2. L1 ⊢ ▶▶* [d, e] L → L ▶* [d, e] L2 → R L → R L2) →
+                  ∀L2. L1 ⊢ ▶▶* [d, e] L2 → R L2.
+#d #e #L1 #R #HL1 #IHL1 #L2 #HL12 @(TC_star_ind … HL1 IHL1 … HL12) //
+qed-.
+
+lemma ltpssa_ind_dx: ∀d,e,L2. ∀R:predicate lenv. R L2 →
+                     (∀L1,L. L1 ▶* [d, e] L → L ⊢ ▶▶* [d, e] L2 → R L → R L1) →
+                     ∀L1. L1 ⊢ ▶▶* [d, e] L2 → R L1.
+#d #e #L2 #R #HL2 #IHL2 #L1 #HL12 @(TC_star_ind_dx … HL2 IHL2 … HL12) //
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma ltpssa_refl: ∀L,d,e. L ⊢ ▶▶* [d, e] L.
+/2 width=1/ qed.
+
+lemma ltpssa_tpss2: ∀I,L1,V1,V2,e. L1 ⊢ V1 ▶*[0, e] V2 →
+                    ∀L2. L1 ⊢ ▶▶* [0, e] L2 →
+                    L1.ⓑ{I}V1 ⊢ ▶▶* [O, e + 1] L2.ⓑ{I}V2.
+#I #L1 #V1 #V2 #e #HV12 #L2 #H @(ltpssa_ind … H) -L2
+[ /3 width=1/ | /3 width=5/ ]
+qed.
+
+lemma ltpssa_tpss1: ∀I,L1,V1,V2,d,e. L1 ⊢ V1 ▶*[d, e] V2 →
+                    ∀L2. L1 ⊢ ▶▶* [d, e] L2 →
+                    L1.ⓑ{I}V1 ⊢ ▶▶* [d + 1, e] L2.ⓑ{I}V2.
+#I #L1 #V1 #V2 #d #e #HV12 #L2 #H @(ltpssa_ind … H) -L2
+[ /3 width=1/ | /3 width=5/ ]
+qed.
+
+lemma ltpss_sn_ltpssa: ∀L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 → L1 ⊢ ▶▶* [d, e] L2.
+#L1 #L2 #d #e #H elim H -L1 -L2 -d -e // /2 width=1/
+qed.
+
+lemma ltpss_sn_dx_trans_eq: ∀L1,L,d,e. L1 ⊢ ▶* [d, e] L →
+                            ∀L2. L ▶* [d, e] L2 → L1 ⊢ ▶* [d, e] L2.
+#L1 #L #d #e #H elim H -L1 -L -d -e
+[ #d #e #X #H
+  lapply (ltpss_dx_inv_atom1 … H) -H #H destruct //
+| #L #I #V #X #H
+  lapply (ltpss_dx_inv_refl_O2 … H) -H #H destruct //
+| #L1 #L #I #V1 #V #e #_ #HV1 #IHL1 #X #H
+  elim (ltpss_dx_inv_tpss21 … H ?) -H // <minus_plus_m_m
+  #L2 #V2 #HL2 #HV2 #H destruct
+  lapply (IHL1 … HL2) -L #HL12
+  lapply (ltpss_sn_tpss_trans_eq … HV2 … HL12) -HV2 #HV2
+  lapply (tpss_trans_eq … HV1 HV2) -V /2 width=1/
+| #L1 #L #I #V1 #V #d #e #_ #HV1 #IHL1 #X #H
+  elim (ltpss_dx_inv_tpss11 … H ?) -H // <minus_plus_m_m
+  #L2 #V2 #HL2 #HV2 #H destruct
+  lapply (IHL1 … HL2) -L #HL12
+  lapply (ltpss_sn_tpss_trans_eq … HV2 … HL12) -HV2 #HV2
+  lapply (tpss_trans_eq … HV1 HV2) -V /2 width=1/
+]
+qed.
+
+lemma ltpss_dx_sn_trans_eq: ∀L1,L,d,e. L1 ▶* [d, e] L →
+                            ∀L2. L ⊢ ▶* [d, e] L2 → L1 ⊢ ▶* [d, e] L2.
+/3 width=3/ qed.
+
+lemma ltpssa_strip: ∀L0,L1,d1,e1. L0 ⊢ ▶▶* [d1, e1] L1 →
+                    ∀L2,d2,e2. L0 ▶* [d2, e2] L2 →
+                    ∃∃L. L1 ▶* [d2, e2] L & L2 ⊢ ▶▶* [d1, e1] L.
+/3 width=3/ qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma ltpssa_ltpss_sn: ∀L1,L2,d,e. L1 ⊢ ▶▶* [d, e] L2 → L1 ⊢ ▶* [d, e] L2.
+#L1 #L2 #d #e #H @(ltpssa_ind … H) -L2 // /2 width=3/
+qed-.
+
+(* Advanced properties ******************************************************)
+
+lemma ltpss_sn_strip: ∀L0,L1,d1,e1. L0 ⊢ ▶* [d1, e1] L1 →
+                      ∀L2,d2,e2. L0 ▶* [d2, e2] L2 →
+                      ∃∃L. L1 ▶* [d2, e2] L & L2 ⊢ ▶* [d1, e1] L.
+#L0 #L1 #d1 #e1 #H #L2 #d2 #e2 #HL02
+lapply (ltpss_sn_ltpssa … H) -H #HL01
+elim (ltpssa_strip … HL01 … HL02) -L0
+/3 width=3 by ltpssa_ltpss_sn, ex2_1_intro/
+qed.
+
+(* Note: this should go in ltpss_sn_ltpss_sn.ma *)
+lemma ltpss_sn_tpss_conf: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶* [d2, e2] U2 →
+                          ∀L1,d1,e1. L0 ⊢ ▶* [d1, e1] L1 →
+                          ∃∃T. L1 ⊢ T2 ▶* [d2, e2] T &
+                               L0 ⊢ U2 ▶* [d1, e1] T.
+#L0 #T2 #U2 #d2 #e2 #HTU2 #L1 #d1 #e1 #H
+lapply (ltpss_sn_ltpssa … H) -H #H @(ltpssa_ind … H) -L1 /2 width=3/ -HTU2
+#L #L1 #H #HL1 * #T #HT2 #HU2T
+lapply (ltpssa_ltpss_sn … H) -H #HL0
+lapply (ltpss_sn_dx_trans_eq … HL0 … HL1) -HL0 #HL01
+elim (ltpss_dx_tpss_conf … HT2 … HL1) -HT2 -HL1 #T0 #HT20 #HT0
+lapply (ltpss_sn_tpss_trans_eq … HT0 … HL01) -HT0 -HL01 #HT0
+lapply (tpss_trans_eq … HU2T HT0) -T /2 width=3/
+qed.
+
+(* Note: this should go in ltpss_sn_ltpss_sn.ma *)
+lemma ltpss_sn_tpss_trans_down: ∀L0,L1,T2,U2,d1,e1,d2,e2. d2 + e2 ≤ d1 →
+                                L1 ⊢ ▶* [d1, e1] L0 → L0 ⊢ T2 ▶* [d2, e2] U2 →
+                                ∃∃T. L1 ⊢ T2 ▶* [d2, e2] T & L1 ⊢ T ▶* [d1, e1] U2.
+#L0 #L1 #T2 #U2 #d1 #e1 #d2 #e2 #Hde2d1 #H #HTU2
+lapply (ltpss_sn_ltpssa … H) -H #HL10
+@(ltpssa_ind_dx … HL10) -L1 /2 width=3/ -HTU2
+#L1 #L #HL1 #_ * #T #HT2 #HTU2
+elim (ltpss_dx_tpss_trans_down … HL1 HT2) -HT2 // #T0 #HT20 #HT0 -Hde2d1
+lapply (tpss_trans_eq … HT0 HTU2) -T #HT0U2
+lapply (ltpss_dx_tpss_trans_eq … HT0U2 … HL1) -HT0U2 -HL1 /2 width=3/
+qed.
+
+(* Main properties **********************************************************)
+
+theorem ltpssa_conf: ∀L0,L1,d1,e1. L0 ⊢ ▶▶* [d1, e1] L1 →
+                     ∀L2,d2,e2. L0 ⊢ ▶▶* [d2, e2] L2 →
+                     ∃∃L. L1 ⊢ ▶▶* [d2, e2] L & L2 ⊢ ▶▶* [d1, e1] L.
+/3 width=3/ qed.
+
+(* Note: this should go in ltpss_sn_ltpss_sn.ma *)
+theorem ltpss_sn_conf: ∀L0,L1,d1,e1. L0 ⊢ ▶* [d1, e1] L1 →
+                       ∀L2,d2,e2. L0 ⊢ ▶* [d2, e2] L2 →
+                       ∃∃L. L1 ⊢ ▶* [d2, e2] L & L2 ⊢ ▶* [d1, e1] L.
+#L0 #L1 #d1 #e1 #H1 #L2 #d2 #e2 #H2
+lapply (ltpss_sn_ltpssa … H1) -H1 #HL01
+lapply (ltpss_sn_ltpssa … H2) -H2 #HL02
+elim (ltpssa_conf … HL01 … HL02) -L0
+/3 width=3 by ltpssa_ltpss_sn, ex2_1_intro/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_sn_ldrop.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_sn_ldrop.ma
new file mode 100644 (file)
index 0000000..d92978d
--- /dev/null
@@ -0,0 +1,131 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/ltpss_sn.ma".
+
+(* SN PARALLEL UNFOLD ON LOCAL ENVIRONMENTS *********************************)
+
+lemma ltpss_sn_ldrop_conf_ge: ∀L0,L1,d1,e1. L0 ⊢ ▶* [d1, e1] L1 →
+                              ∀L2,e2. ⇩[0, e2] L0 ≡ L2 →
+                              d1 + e1 ≤ e2 → ⇩[0, e2] L1 ≡ L2.
+#L0 #L1 #d1 #e1 #H elim H -L0 -L1 -d1 -e1
+[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H //
+| //
+| normalize #K0 #K1 #I #V0 #V1 #e1 #_ #_ #IHK01 #L2 #e2 #H #He12
+  elim (le_inv_plus_l … He12) #_ #He2
+  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
+  lapply (IHK01 … HK0L2 ?) -K0 /2 width=1/
+| #K0 #K1 #I #V0 #V1 #d1 #e1 >plus_plus_comm_23 #_ #_ #IHK01 #L2 #e2 #H #Hd1e2
+  elim (le_inv_plus_l … Hd1e2) #_ #He2
+  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
+  lapply (IHK01 … HK0L2 ?) -K0 /2 width=1/
+]
+qed.
+
+lemma ltpss_sn_ldrop_trans_ge: ∀L1,L0,d1,e1. L1 ⊢ ▶* [d1, e1] L0 →
+                               ∀L2,e2. ⇩[0, e2] L0 ≡ L2 →
+                               d1 + e1 ≤ e2 → ⇩[0, e2] L1 ≡ L2.
+#L1 #L0 #d1 #e1 #H elim H -L1 -L0 -d1 -e1
+[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H //
+| //
+| normalize #K1 #K0 #I #V1 #V0 #e1 #_ #_ #IHK10 #L2 #e2 #H #He12
+  elim (le_inv_plus_l … He12) #_ #He2
+  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
+  lapply (IHK10 … HK0L2 ?) -K0 /2 width=1/
+| #K0 #K1 #I #V1 #V0 #d1 #e1 >plus_plus_comm_23 #_ #_ #IHK10 #L2 #e2 #H #Hd1e2
+  elim (le_inv_plus_l … Hd1e2) #_ #He2
+  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
+  lapply (IHK10 … HK0L2 ?) -IHK10 -HK0L2 /2 width=1/
+]
+qed.
+
+lemma ltpss_sn_ldrop_conf_be: ∀L0,L1,d1,e1. L0 ⊢ ▶* [d1, e1] L1 →
+                              ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → d1 ≤ e2 → e2 ≤ d1 + e1 →
+                              ∃∃L. L2 ⊢ ▶* [0, d1 + e1 - e2] L & ⇩[0, e2] L1 ≡ L.
+#L0 #L1 #d1 #e1 #H elim H -L0 -L1 -d1 -e1
+[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H /2 width=3/
+| normalize #L #I #V #L2 #e2 #HL2 #_ #He2
+  lapply (le_n_O_to_eq … He2) -He2 #H destruct
+  lapply (ldrop_inv_refl … HL2) -HL2 #H destruct /2 width=3/
+| normalize #K0 #K1 #I #V0 #V1 #e1 #HK01 #HV01 #IHK01 #L2 #e2 #H #_ #He21
+  lapply (ldrop_inv_O1 … H) -H * * #He2 #HK0L2
+  [ -IHK01 -He21 destruct <minus_n_O /3 width=3/
+  | -HK01 -HV01 <minus_le_minus_minus_comm //
+    elim (IHK01 … HK0L2 ? ?) -K0 // /2 width=1/ /3 width=3/
+  ]
+| #K0 #K1 #I #V0 #V1 #d1 #e1 >plus_plus_comm_23 #_ #_ #IHK01 #L2 #e2 #H #Hd1e2 #He2de1
+  elim (le_inv_plus_l … Hd1e2) #_ #He2
+  <minus_le_minus_minus_comm //
+  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
+  elim (IHK01 … HK0L2 ? ?) -K0 /2 width=1/ /3 width=3/
+]
+qed.
+
+lemma ltpss_sn_ldrop_trans_be: ∀L1,L0,d1,e1. L1 ⊢ ▶* [d1, e1] L0 →
+                               ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → d1 ≤ e2 → e2 ≤ d1 + e1 →
+                               ∃∃L. L ⊢ ▶* [0, d1 + e1 - e2] L2 & ⇩[0, e2] L1 ≡ L.
+#L1 #L0 #d1 #e1 #H elim H -L1 -L0 -d1 -e1
+[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H /2 width=3/
+| normalize #L #I #V #L2 #e2 #HL2 #_ #He2
+  lapply (le_n_O_to_eq … He2) -He2 #H destruct
+  lapply (ldrop_inv_refl … HL2) -HL2 #H destruct /2 width=3/
+| normalize #K1 #K0 #I #V1 #V0 #e1 #HK10 #HV10 #IHK10 #L2 #e2 #H #_ #He21
+  lapply (ldrop_inv_O1 … H) -H * * #He2 #HK0L2
+  [ -IHK10 -He21 destruct <minus_n_O /3 width=3/
+  | -HK10 -HV10 <minus_le_minus_minus_comm //
+    elim (IHK10 … HK0L2 ? ?) -K0 // /2 width=1/ /3 width=3/
+  ]
+| #K1 #K0 #I #V1 #V0 #d1 #e1 >plus_plus_comm_23 #_ #_ #IHK10 #L2 #e2 #H #Hd1e2 #He2de1
+  elim (le_inv_plus_l … Hd1e2) #_ #He2
+  <minus_le_minus_minus_comm //
+  lapply (ldrop_inv_ldrop1 … H ?) -H // #HK0L2
+  elim (IHK10 … HK0L2 ? ?) -K0 /2 width=1/ /3 width=3/
+]
+qed.
+
+lemma ltpss_sn_ldrop_conf_le: ∀L0,L1,d1,e1. L0 ⊢ ▶* [d1, e1] L1 →
+                              ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → e2 ≤ d1 →
+                              ∃∃L. L2 ⊢ ▶* [d1 - e2, e1] L & ⇩[0, e2] L1 ≡ L.
+#L0 #L1 #d1 #e1 #H elim H -L0 -L1 -d1 -e1
+[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H /2 width=3/
+| /2 width=3/
+| normalize #K0 #K1 #I #V0 #V1 #e1 #HK01 #HV01 #_ #L2 #e2 #H #He2
+  lapply (le_n_O_to_eq … He2) -He2 #He2 destruct
+  lapply (ldrop_inv_refl … H) -H #H destruct /3 width=3/
+| #K0 #K1 #I #V0 #V1 #d1 #e1 #HK01 #HV01 #IHK01 #L2 #e2 #H #He2d1
+  lapply (ldrop_inv_O1 … H) -H * * #He2 #HK0L2
+  [ -IHK01 -He2d1 destruct <minus_n_O /3 width=3/
+  | -HK01 -HV01 <minus_le_minus_minus_comm //
+    elim (IHK01 … HK0L2 ?) -K0 /2 width=1/ /3 width=3/
+  ]
+]
+qed.
+
+lemma ltpss_sn_ldrop_trans_le: ∀L1,L0,d1,e1. L1 ⊢ ▶* [d1, e1] L0 →
+                               ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → e2 ≤ d1 →
+                               ∃∃L. L ⊢ ▶* [d1 - e2, e1] L2 & ⇩[0, e2] L1 ≡ L.
+#L1 #L0 #d1 #e1 #H elim H -L1 -L0 -d1 -e1
+[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H /2 width=3/
+| /2 width=3/
+| normalize #K1 #K0 #I #V1 #V0 #e1 #HK10 #HV10 #_ #L2 #e2 #H #He2
+  lapply (le_n_O_to_eq … He2) -He2 #He2 destruct
+  lapply (ldrop_inv_refl … H) -H #H destruct /3 width=3/
+| #K1 #K0 #I #V1 #V0 #d1 #e1 #HK10 #HV10 #IHK10 #L2 #e2 #H #He2d1
+  lapply (ldrop_inv_O1 … H) -H * * #He2 #HK0L2
+  [ -IHK10 -He2d1 destruct <minus_n_O /3 width=3/
+  | -HK10 -HV10 <minus_le_minus_minus_comm //
+    elim (IHK10 … HK0L2 ?) -K0 /2 width=1/ /3 width=3/
+  ]
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_sn_ltpss_sn.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_sn_ltpss_sn.ma
new file mode 100644 (file)
index 0000000..10a1901
--- /dev/null
@@ -0,0 +1,86 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/tpss_tpss.ma".
+include "basic_2/unfold/tpss_alt.ma".
+include "basic_2/unfold/ltpss_sn_tpss.ma".
+
+(* PARTIAL UNFOLD ON LOCAL ENVIRONMENTS *************************************)
+
+(* Advanced properties ******************************************************)
+
+fact ltpss_sn_tpss_trans_eq_aux: ∀Y1,X2,L1,T2,U2,d,e.
+                                 L1 ⊢ T2 ▶* [d, e] U2 → ∀L0. L0 ⊢ ▶* [d, e] L1 →
+                                 Y1 = L1 → X2 = T2 → L0 ⊢ T2 ▶* [d, e] U2.
+#Y1 #X2 @(fw_ind … Y1 X2) -Y1 -X2 #Y1 #X2 #IH
+#L1 #T2 #U2 #d #e #H @(tpss_ind_alt … H) -L1 -T2 -U2 -d -e
+[ //
+| #L1 #K1 #V1 #V2 #W2 #i #d #e #Hdi #Hide #HLK1 #HV12 #HVW2 #_ #L0 #HL01 #H1 #H2 destruct
+  lapply (ldrop_fwd_lw … HLK1) #H1 normalize in H1;
+  elim (ltpss_sn_ldrop_trans_be … HL01 … HLK1 ? ?) -HL01 -HLK1 // /2 width=2/ #X #H #HLK0
+  elim (ltpss_sn_inv_tpss22 … H ?) -H /2 width=1/ #K0 #V0 #HK01 #HV01 #H destruct
+  lapply (IH … HV12 … HK01 ? ?) -IH -HV12 -HK01 [1,3: // |2,4: skip | normalize /2 width=1/ ] #HV12 
+  lapply (tpss_trans_eq … HV01 HV12) -V1 /2 width=6/
+| #L #a #I #V1 #V2 #T1 #T2 #d #e #HV12 #HT12 #_ #_ #L0 #HL0 #H1 #H2 destruct
+  lapply (tpss_lsubs_trans … HT12 (L. ⓑ{I} V1) ?) -HT12 /2 width=1/ #HT12
+  lapply (IH … HV12 … HL0 ? ?) -HV12 [1,3: // |2,4: skip |5: /2 width=2/ ] #HV12
+  lapply (IH … HT12 (L0. ⓑ{I} V1) ? ? ?) -IH -HT12 [1,3,5: /2 width=2/ |2,4: skip | normalize // ] -HL0 #HT12
+  lapply (tpss_lsubs_trans … HT12 (L0. ⓑ{I} V2) ?) -HT12 /2 width=1/
+| #L #I #V1 #V2 #T1 #T2 #d #e #HV12 #HT12 #_ #_ #L0 #HL0 #H1 #H2 destruct
+  lapply (IH … HV12 … HL0 ? ?) -HV12 [1,3: // |2,4: skip |5: /2 width=3/ ]
+  lapply (IH … HT12 … HL0 ? ?) -IH -HT12 [1,3,5: normalize // |2,4: skip ] -HL0 /2 width=1/
+]
+qed.
+
+lemma ltpss_sn_tpss_trans_eq: ∀L1,T2,U2,d,e. L1 ⊢ T2 ▶* [d, e] U2 →
+                              ∀L0. L0 ⊢ ▶* [d, e] L1 → L0 ⊢ T2 ▶* [d, e] U2.
+/2 width=5/ qed.
+
+lemma ltpss_sn_tps_trans_eq: ∀L0,L1,T2,U2,d,e. L0 ⊢ ▶* [d, e] L1 →
+                             L1 ⊢ T2 ▶ [d, e] U2 → L0 ⊢ T2 ▶* [d, e] U2.
+/3 width=3/ qed.
+
+(* Main properties **********************************************************)
+
+theorem ltpss_sn_trans_eq: ∀L1,L,d,e. L1 ⊢ ▶* [d, e] L →
+                           ∀L2. L ⊢ ▶* [d, e] L2 → L1 ⊢ ▶* [d, e] L2.
+#L1 #L #d #e #H elim H -L1 -L -d -e //
+[ #L1 #L #I #V1 #V #e #HL1 #HV1 #IHL1 #X #H
+  elim (ltpss_sn_inv_tpss21 … H ?) -H // <minus_plus_m_m #L2 #V2 #HL2 #HV2 #H destruct
+  lapply (ltpss_sn_tpss_trans_eq … HV2 … HL1) -HV2 -HL1 #HV2
+  lapply (tpss_trans_eq … HV1 … HV2) -V /3 width=1/
+| #L1 #L #I #V1 #V #d #e #HL1 #HV1 #IHL1 #X #H
+  elim (ltpss_sn_inv_tpss11 … H ?) -H // <minus_plus_m_m #L2 #V2 #HL2 #HV2 #H destruct
+  lapply (ltpss_sn_tpss_trans_eq … HV2 … HL1) -HV2 -HL1 #HV2
+  lapply (tpss_trans_eq … HV1 … HV2) -V /3 width=1/
+]
+qed.
+
+(* Advanced forward lemmas **************************************************)
+
+lemma tps_fwd_shift1: ∀L1,L,T1,T,d,e. L ⊢ L1 @@ T1 ▶ [d, e] T →
+                      ∃∃L2,T2. L @@ L1 ⊢ ▶* [d + |L1|, e] L @@ L2 &
+                               L @@ L2 ⊢ T1 ▶ [d + |L1|, e] T2 &
+                               T = L2 @@ T2.
+#L1 @(lenv_ind_dx … L1) -L1
+[ #L #T1 #T #d #e #HT1
+  @ex3_2_intro [3: // |5: // |4: normalize /2 width=1/ |1,2: skip ] (**) (* /2 width=4/ does not work *)
+| #I #L1 #V1 #IH #L #T1 #T #d #e >shift_append_assoc #H
+  elim (tps_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+  elim (IH … HT12) -IH -HT12 #L2 #T #HL12 #HT1 #H destruct
+  <append_assoc >append_length <associative_plus
+  lapply (ltpss_sn_trans_eq (L.ⓑ{I}V1@@L1) … HL12) -HL12 /3 width=1/ #HL12
+  @(ex3_2_intro … (⋆.ⓑ{I}V2@@L2)) [4: /2 width=3/ | skip ] <append_assoc // (**) (* explicit constructor *)
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_sn_tps.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_sn_tps.ma
new file mode 100644 (file)
index 0000000..1de83c6
--- /dev/null
@@ -0,0 +1,47 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/ltpss_sn_ldrop.ma".
+
+(* SN PARALLEL UNFOLD ON LOCAL ENVIRONMENTS *********************************)
+
+(* Properties concerning partial substitution on terms **********************)
+
+lemma ltpss_sn_tps_conf_ge: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶ [d2, e2] U2 →
+                            ∀L1,d1,e1. L0 ⊢ ▶* [d1, e1] L1 → d1 + e1 ≤ d2 →
+                            L1 ⊢ T2 ▶ [d2, e2] U2.
+#L0 #T2 #U2 #d2 #e2 #H elim H -L0 -T2 -U2 -d2 -e2
+[ //
+| #L0 #K0 #V0 #W0 #i2 #d2 #e2 #Hdi2 #Hide2 #HLK0 #HVW0 #L1 #d1 #e1 #HL01 #Hde1d2
+  lapply (transitive_le … Hde1d2 Hdi2) -Hde1d2 #Hde1i2
+  lapply (ltpss_sn_ldrop_conf_ge … HL01 … HLK0 ?) -L0 // /2 width=4/
+| #L0 #a #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL01 #Hde1d2
+  @tps_bind [ /2 width=4/ | @IHTU2 -IHTU2 -IHVW2 [3: /2 by ltpss_sn_tpss1/ |1,2: skip | /2 width=1/ ] ] (**) (* explicit constructor *)
+| /3 width=4/
+]
+qed.
+
+lemma ltpss_sn_tps_trans_ge: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶ [d2, e2] U2 →
+                             ∀L1,d1,e1. L1 ⊢ ▶* [d1, e1] L0 → d1 + e1 ≤ d2 →
+                             L1 ⊢ T2 ▶ [d2, e2] U2.
+#L0 #T2 #U2 #d2 #e2 #H elim H -L0 -T2 -U2 -d2 -e2
+[ //
+| #L0 #K0 #V0 #W0 #i2 #d2 #e2 #Hdi2 #Hide2 #HLK0 #HVW0 #L1 #d1 #e1 #HL10 #Hde1d2
+  lapply (transitive_le … Hde1d2 Hdi2) -Hde1d2 #Hde1i2
+  lapply (ltpss_sn_ldrop_trans_ge … HL10 … HLK0 ?) -L0 // /2 width=4/
+| #L0 #a #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL10 #Hde1d2
+  @tps_bind [ /2 width=4/ | @IHTU2 -IHTU2 -IHVW2 [3: /2 by ltpss_sn_tpss1/ |1,2: skip | /2 width=1/ ] ] (**) (* explicit constructor *)
+| /3 width=4/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_sn_tpss.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/ltpss_sn_tpss.ma
new file mode 100644 (file)
index 0000000..0708932
--- /dev/null
@@ -0,0 +1,102 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/tpss_lift.ma".
+include "basic_2/unfold/ltpss_sn_tps.ma".
+
+(* SN PARALLEL UNFOLD ON LOCAL ENVIRONMENTS *********************************)
+
+(* Properties concerning partial unfold on terms ****************************)
+
+lemma ltpss_sn_tpss_conf_ge: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶* [d2, e2] U2 →
+                             ∀L1,d1,e1. L0 ⊢ ▶* [d1, e1] L1 → d1 + e1 ≤ d2 →
+                             L1 ⊢ T2 ▶* [d2, e2] U2.
+#L0 #T2 #U2 #d2 #e2 #H #L1 #d1 #e1 #HL01 #Hde1d2 @(tpss_ind … H) -U2 //
+#U #U2 #_ #HU2 #IHU
+lapply (ltpss_sn_tps_conf_ge … HU2 … HL01 ?) -L0 // -Hde1d2 /2 width=3/
+qed.
+
+lemma ltpss_sn_tps_conf: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶ [d2, e2] U2 →
+                         ∀L1,d1,e1. L0 ⊢ ▶* [d1, e1] L1 →
+                         ∃∃T. L1 ⊢ T2 ▶ [d2, e2] T &
+                              L0 ⊢ U2 ▶* [d1, e1] T.
+#L0 #T2 #U2 #d2 #e2 #H elim H -L0 -T2 -U2 -d2 -e2
+[ /2 width=3/
+| #L0 #K0 #V0 #W0 #i2 #d2 #e2 #Hdi2 #Hide2 #HLK0 #HVW0 #L1 #d1 #e1 #HL01
+  elim (lt_or_ge i2 d1) #Hi2d1
+  [ elim (ltpss_sn_ldrop_conf_le … HL01 … HLK0 ?) /2 width=2/ #X #H #HLK1
+    elim (ltpss_sn_inv_tpss11 … H ?) -H /2 width=1/ #K1 #V1 #_ #HV01 #H destruct
+    lapply (ldrop_fwd_ldrop2 … HLK0) -HLK0 #HLK0
+    elim (lift_total V1 0 (i2 + 1)) #W1 #HVW1
+    lapply (tpss_lift_ge … HV01 … HLK0 HVW0 … HVW1) -V0 -HLK0 // >minus_plus <plus_minus_m_m // /3 width=4/
+  | elim (lt_or_ge i2 (d1 + e1)) #Hde1i2
+    [ elim (ltpss_sn_ldrop_conf_be … HL01 … HLK0 ? ?) -HL01 // /2 width=2/ #X #H #HLK1
+      elim (ltpss_sn_inv_tpss21 … H ?) -H /2 width=1/ #K1 #V1 #_ #HV01 #H destruct
+      lapply (ldrop_fwd_ldrop2 … HLK0) -HLK0 #HLK0
+      elim (lift_total V1 0 (i2 + 1)) #W1 #HVW1
+      lapply (tpss_lift_ge … HV01 … HLK0 HVW0 … HVW1) -V0 -HLK0 // normalize #HW01
+      lapply (tpss_weak … HW01 d1 e1 ? ?) [2: /2 width=1/ |3: /3 width=4/ ] >minus_plus >commutative_plus /2 width=1/
+    | lapply (ltpss_sn_ldrop_conf_ge … HL01 … HLK0 ?) -HL01 -HLK0 // /3 width=4/
+    ]
+  ]
+| #L0 #a #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL01
+  elim (IHVW2 … HL01) -IHVW2 #V #HV2 #HVW2
+  elim (IHTU2 (L1. ⓑ{I} V) (d1 + 1) e1 ?) -IHTU2 /2 width=1/ -HL01 #T #HT2 #H
+  lapply (tpss_lsubs_trans … H (L0.ⓑ{I}V) ?) -H /2 width=1/ /3 width=5/
+| #L0 #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL01
+  elim (IHVW2 … HL01) -IHVW2
+  elim (IHTU2 … HL01) -IHTU2 -HL01 /3 width=5/
+]
+qed.
+
+lemma ltpss_sn_tpss_trans_ge: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶* [d2, e2] U2 →
+                              ∀L1,d1,e1. L1 ⊢ ▶* [d1, e1] L0 → d1 + e1 ≤ d2 →
+                              L1 ⊢ T2 ▶* [d2, e2] U2.
+#L0 #T2 #U2 #d2 #e2 #H #L1 #d1 #e1 #HL01 #Hde1d2 @(tpss_ind … H) -U2 //
+#U #U2 #_ #HU2 #IHU
+lapply (ltpss_sn_tps_trans_ge … HU2 … HL01 ?) -L0 // -Hde1d2 /2 width=3/
+qed.
+
+lemma ltpss_sn_tps_trans: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶ [d2, e2] U2 →
+                          ∀L1,d1,e1. L1 ⊢ ▶* [d1, e1] L0 →
+                          ∃∃T. L1 ⊢ T2 ▶ [d2, e2] T &
+                               L1 ⊢ T ▶* [d1, e1] U2.
+#L0 #T2 #U2 #d2 #e2 #H elim H -L0 -T2 -U2 -d2 -e2
+[ /2 width=3/
+| #L0 #K0 #V0 #W0 #i2 #d2 #e2 #Hdi2 #Hide2 #HLK0 #HVW0 #L1 #d1 #e1 #HL10
+  elim (lt_or_ge i2 d1) #Hi2d1
+  [ elim (ltpss_sn_ldrop_trans_le … HL10 … HLK0 ?) -L0 /2 width=2/ #X #H #HLK1
+    elim (ltpss_sn_inv_tpss12 … H ?) -H /2 width=1/ #K1 #V1 #_ #HV01 #H destruct
+    lapply (ldrop_fwd_ldrop2 … HLK1) #H
+    elim (lift_total V1 0 (i2 + 1)) #W1 #HVW1
+    lapply (tpss_lift_ge … HV01 … H HVW1 … HVW0) -V0 -H // >minus_plus <plus_minus_m_m /2 width=1/ /3 width=4/
+  | elim (lt_or_ge i2 (d1 + e1)) #Hde1i2
+    [ elim (ltpss_sn_ldrop_trans_be … HL10 … HLK0 ? ?) -L0 // /2 width=2/ #X #H #HLK1
+      elim (ltpss_sn_inv_tpss22 … H ?) -H /2 width=1/ #K1 #V1 #_ #HV01 #H destruct
+      lapply (ldrop_fwd_ldrop2 … HLK1) #H
+      elim (lift_total V1 0 (i2 + 1)) #W1 #HVW1
+      lapply (tpss_lift_ge … HV01 … H HVW1 … HVW0) -V0 -H // normalize #HW01
+      lapply (tpss_weak … HW01 d1 e1 ? ?) [2: /3 width=1/ |3: /3 width=4/ ] >minus_plus >commutative_plus /2 width=1/
+    | lapply (ltpss_sn_ldrop_trans_ge … HL10 … HLK0 ?) -HL10 -HLK0 // /3 width=4/
+    ]
+  ]
+| #L0 #a #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL10
+  elim (IHVW2 … HL10) -IHVW2 #V #HV2 #HVW2
+  elim (IHTU2 (L1. ⓑ{I} V) (d1 + 1) e1 ?) -IHTU2 /2 width=1/ -HL10 #T #HT2 #H
+  lapply (tpss_lsubs_trans … H (L1.ⓑ{I}W2) ?) -H /2 width=1/ /3 width=5/
+| #L0 #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL10
+  elim (IHVW2 … HL10) -IHVW2
+  elim (IHTU2 … HL10) -IHTU2 -HL10 /3 width=5/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/thin.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/thin.ma
new file mode 100644 (file)
index 0000000..65fb76f
--- /dev/null
@@ -0,0 +1,37 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/ltpss_sn.ma".
+
+(* BASIC LOCAL ENVIRONMENT THINNING *****************************************)
+
+definition thin: nat → nat → relation lenv ≝
+                 λd,e,L1,L2. ∃∃L. L1 ⊢ ▶* [d, e] L & ⇩[d, e] L ≡ L2.
+
+interpretation "basic thinning (local environment)"
+   'TSubst L1 d e L2 = (thin d e L1 L2).
+
+(* Basic properties *********************************************************)
+
+lemma ldrop_thin: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → ▼*[d, e] L1 ≡ L2.
+/2 width=3/ qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma thin_inv_thin1: ∀I,K1,V1,L2,e. ▼*[0, e] K1.ⓑ{I} V1 ≡ L2 → 0 < e →
+                      ▼*[0, e - 1] K1 ≡ L2.
+#I #K1 #V1 #L2 #e * #X #HK1 #HL2 #e
+elim (ltpss_sn_inv_tpss21 … HK1 ?) -HK1 // #K #V #HK1 #_ #H destruct
+lapply (ldrop_inv_ldrop1 … HL2 ?) -HL2 // /2 width=3/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/thin_delift.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/thin_delift.ma
new file mode 100644 (file)
index 0000000..b5ffc5e
--- /dev/null
@@ -0,0 +1,102 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/unfold/delift_tpss.ma".
+include "basic_2/unfold/delift_ltpss.ma".
+include "basic_2/unfold/thin.ma".
+
+(* BASIC DELIFT ON LOCAL ENVIRONMENTS ***************************************)
+
+(* Inversion lemmas on inverse basic term relocation ************************)
+
+lemma thin_inv_delift1: ∀I,K1,V1,L2,d,e. ▼*[d, e] K1. ⓑ{I} V1 ≡ L2 → 0 < d →
+                        ∃∃K2,V2. ▼*[d - 1, e] K1 ≡ K2 &
+                                 K1 ⊢ ▼*[d - 1, e] V1 ≡ V2 &
+                                 L2 = K2. ⓑ{I} V2.
+#I #K1 #V1 #L2 #d #e * #X #HK1 #HL2 #e
+elim (ltpss_sn_inv_tpss11 … HK1 ?) -HK1 // #K #V #HK1 #HV1 #H destruct
+elim (ldrop_inv_skip1 … HL2 ?) -HL2 // #K2 #V2 #HK2 #HV2 #H destruct /3 width=5/
+qed-.
+
+(* Properties on inverse basic term relocation ******************************)
+
+lemma thin_delift: ∀L1,L2,d,e. ▼*[d, e] L1 ≡ L2 → ∀V1,V2. L1 ⊢ ▼*[d, e] V1 ≡ V2 →
+                   ∀I. ▼*[d + 1, e] L1.ⓑ{I}V1 ≡ L2.ⓑ{I}V2.
+#L1 #L2 #d #e * #L #HL1 #HL2 #V1 #V2 * #V #HV1 #HV2 #I
+elim (ltpss_sn_tpss_conf … HV1 … HL1) -HV1 #V0 #HV10 #HV0
+lapply (tpss_inv_lift1_eq … HV0 … HV2) -HV0 #H destruct
+lapply (ltpss_sn_tpss_trans_eq … HV10 … HL1) -HV10 /3 width=5/
+qed.
+
+lemma thin_delift_tpss_conf_le: ∀L,U1,U2,d,e. L ⊢ U1 ▶* [d, e] U2 →
+                                ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
+                                ∀K. ▼*[dd, ee] L ≡ K → d + e ≤ dd →
+                                ∃∃T2. K ⊢ T1 ▶* [d, e] T2 &
+                                      L ⊢ ▼*[dd, ee] U2 ≡ T2.
+#L #U1 #U2 #d #e #HU12 #T1 #dd #ee #HUT1 #K * #Y #HLY #HYK #Hdedd
+lapply (delift_ltpss_sn_conf_eq … HUT1 … HLY) -HUT1 #HUT1
+elim (ltpss_sn_tpss_conf … HU12 … HLY) -HU12 #U #HU1 #HU2
+elim (delift_tpss_conf_le … HU1 … HUT1 … HYK ?) -HU1 -HUT1 -HYK // -Hdedd #T #HT1 #HUT
+lapply (ltpss_sn_delift_trans_eq … HLY … HUT) -HLY -HUT #HUT
+lapply (tpss_delift_trans_eq … HU2 … HUT) -U /2 width=3/
+qed.
+
+lemma thin_delift_tps_conf_le: ∀L,U1,U2,d,e. L ⊢ U1 ▶ [d, e] U2 →
+                               ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
+                               ∀K. ▼*[dd, ee] L ≡ K → d + e ≤ dd →
+                               ∃∃T2. K ⊢ T1 ▶* [d, e] T2 &
+                                     L ⊢ ▼*[dd, ee] U2 ≡ T2.
+/3 width=3/ qed.
+
+lemma thin_delift_tpss_conf_le_up: ∀L,U1,U2,d,e. L ⊢ U1 ▶* [d, e] U2 →
+                                   ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
+                                   ∀K. ▼*[dd, ee] L ≡ K →
+                                   d ≤ dd → dd ≤ d + e → d + e ≤ dd + ee →
+                                   ∃∃T2. K ⊢ T1 ▶* [d, dd - d] T2 &
+                                         L ⊢ ▼*[dd, ee] U2 ≡ T2.
+#L #U1 #U2 #d #e #HU12 #T1 #dd #ee #HUT1 #K * #Y #HLY #HYK #Hdd #Hdde #Hddee
+lapply (delift_ltpss_sn_conf_eq … HUT1 … HLY) -HUT1 #HUT1
+elim (ltpss_sn_tpss_conf … HU12 … HLY) -HU12 #U #HU1 #HU2
+elim (delift_tpss_conf_le_up … HU1 … HUT1 … HYK ? ? ?) -HU1 -HUT1 -HYK // -Hdd -Hdde -Hddee #T #HT1 #HUT
+lapply (ltpss_sn_delift_trans_eq … HLY … HUT) -HLY -HUT #HUT
+lapply (tpss_delift_trans_eq … HU2 … HUT) -U /2 width=3/
+qed.
+
+lemma thin_delift_tps_conf_le_up: ∀L,U1,U2,d,e. L ⊢ U1 ▶ [d, e] U2 →
+                                  ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
+                                  ∀K. ▼*[dd, ee] L ≡ K →
+                                  d ≤ dd → dd ≤ d + e → d + e ≤ dd + ee →
+                                  ∃∃T2. K ⊢ T1 ▶* [d, dd - d] T2 &
+                                        L ⊢ ▼*[dd, ee] U2 ≡ T2.
+/3 width=6 by thin_delift_tpss_conf_le_up, tpss_strap2/ qed. (**) (* too slow without trace *)
+
+lemma thin_delift_tpss_conf_be: ∀L,U1,U2,d,e. L ⊢ U1 ▶* [d, e] U2 →
+                                ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
+                                ∀K. ▼*[dd, ee] L ≡ K → d ≤ dd → dd + ee ≤ d + e →
+                                ∃∃T2. K ⊢ T1 ▶* [d, e - ee] T2 &
+                                      L ⊢ ▼*[dd, ee] U2 ≡ T2.
+#L #U1 #U2 #d #e #HU12 #T1 #dd #ee #HUT1 #K * #Y #HLY #HYK #Hdd #Hddee
+lapply (delift_ltpss_sn_conf_eq … HUT1 … HLY) -HUT1 #HUT1
+elim (ltpss_sn_tpss_conf … HU12 … HLY) -HU12 #U #HU1 #HU2
+elim (delift_tpss_conf_be … HU1 … HUT1 … HYK ? ?) -HU1 -HUT1 -HYK // -Hdd -Hddee #T #HT1 #HUT
+lapply (ltpss_sn_delift_trans_eq … HLY … HUT) -HLY -HUT #HUT
+lapply (tpss_delift_trans_eq … HU2 … HUT) -U /2 width=3/
+qed.
+
+lemma thin_delift_tps_conf_be: ∀L,U1,U2,d,e. L ⊢ U1 ▶ [d, e] U2 →
+                               ∀T1,dd,ee. L ⊢ ▼*[dd, ee] U1 ≡ T1 →
+                               ∀K. ▼*[dd, ee] L ≡ K → d ≤ dd → dd + ee ≤ d + e →
+                               ∃∃T2. K ⊢ T1 ▶* [d, e - ee] T2 &
+                                     L ⊢ ▼*[dd, ee] U2 ≡ T2.
+/3 width=3/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/thin_ldrop.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/thin_ldrop.ma
new file mode 100644 (file)
index 0000000..498660e
--- /dev/null
@@ -0,0 +1,59 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/ldrop_ldrop.ma".
+include "basic_2/unfold/ltpss_sn_ldrop.ma".
+include "basic_2/unfold/thin.ma".
+
+(* BASIC LOCAL ENVIRONMENT THINNING *****************************************)
+
+(* Properties on local environment slicing **********************************)
+
+lemma thin_ldrop_conf_ge: ∀L0,L1,d1,e1. ▼*[d1, e1] L0 ≡ L1 →
+                          ∀L2,e2. ⇩[0, e2] L0 ≡ L2 →
+                          d1 + e1 ≤ e2 → ⇩[0, e2 - e1] L1 ≡ L2.
+#L0 #L1 #d1 #e1 * /3 width=8 by ltpss_sn_ldrop_conf_ge, ldrop_conf_ge/
+qed.
+
+lemma thin_ldrop_conf_be: ∀L0,L1,d1,e1. ▼*[d1, e1] L0 ≡ L1 →
+                          ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → d1 ≤ e2 → e2 ≤ d1 + e1 →
+                          ∃∃L. ▼*[0, d1 + e1 - e2] L2 ≡ L & ⇩[0, d1] L1 ≡ L.
+#L0 #L1 #d1 #e1 * #L #HL0 #HL1 #L2 #e2 #HL02 #Hd1e2 #He2de1
+elim (ltpss_sn_ldrop_conf_be … HL0 … HL02 ? ?) -L0 // #L0 #HL20 #HL0
+elim (ldrop_conf_be … HL1 … HL0 ? ?) -L // -Hd1e2 -He2de1 /3 width=3/
+qed.
+
+lemma thin_ldrop_conf_le: ∀L0,L1,d1,e1. ▼*[d1, e1] L0 ≡ L1 →
+                          ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → e2 ≤ d1 →
+                          ∃∃L. ▼*[d1 - e2, e1] L2 ≡ L & ⇩[0, e2] L1 ≡ L.
+#L0 #L1 #d1 #e1 * #L #HL0 #HL1 #L2 #e2 #HL02 #He2d1
+elim (ltpss_sn_ldrop_conf_le … HL0 … HL02 ?) -L0 // #L0 #HL20 #HL0
+elim (ldrop_conf_le … HL1 … HL0 ?) -L // -He2d1 /3 width=3/
+qed.
+
+lemma thin_ldrop_trans_ge: ∀L1,L0,d1,e1. ▼*[d1, e1] L1 ≡ L0 →
+                           ∀L2,e2. ⇩[0, e2] L0 ≡ L2 →
+                           d1 ≤ e2 → ⇩[0, e1 + e2] L1 ≡ L2.
+#L1 #L0 #d1 #e1 * #L #HL1 #HL0 #L2 #e2 #HL02 #Hd1e2
+lapply (ldrop_trans_ge … HL0 … HL02 ?) -L0 // #HL2
+lapply (ltpss_sn_ldrop_trans_ge … HL1 … HL2 ?) -L // /2 width=1/
+qed.
+
+lemma thin_ldrop_trans_le: ∀L1,L0,d1,e1. ▼*[d1, e1] L1 ≡ L0 →
+                           ∀L2,e2. ⇩[0, e2] L0 ≡ L2 → e2 ≤ d1 →
+                           ∃∃L. ▼*[d1 - e2, e1] L ≡ L2 & ⇩[0, e2] L1 ≡ L.
+#L1 #L0 #d1 #e1 * #L #HL1 #HL0 #L2 #e2 #HL02 #He2d1
+elim (ldrop_trans_le … HL0 … HL02 He2d1) -L0 #L0 #HL0 #HL02
+elim (ltpss_sn_ldrop_trans_le … HL1 … HL0 He2d1) -L -He2d1 /3 width=3/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/tpss.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/tpss.ma
new file mode 100644 (file)
index 0000000..9391620
--- /dev/null
@@ -0,0 +1,182 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/tps.ma".
+
+(* PARTIAL UNFOLD ON TERMS **************************************************)
+
+definition tpss: nat → nat → lenv → relation term ≝
+                 λd,e,L. TC … (tps d e L).
+
+interpretation "partial unfold (term)"
+   'PSubstStar L T1 d e T2 = (tpss d e L T1 T2).
+
+(* Basic eliminators ********************************************************)
+
+lemma tpss_ind: ∀d,e,L,T1. ∀R:predicate term. R T1 →
+                (∀T,T2. L ⊢ T1 ▶* [d, e] T → L ⊢ T ▶ [d, e] T2 → R T → R T2) →
+                ∀T2. L ⊢ T1 ▶* [d, e] T2 → R T2.
+#d #e #L #T1 #R #HT1 #IHT1 #T2 #HT12
+@(TC_star_ind … HT1 IHT1 … HT12) //
+qed-.
+
+lemma tpss_ind_dx: ∀d,e,L,T2. ∀R:predicate term. R T2 →
+                   (∀T1,T. L ⊢ T1 ▶ [d, e] T → L ⊢ T ▶* [d, e] T2 → R T → R T1) →
+                   ∀T1. L ⊢ T1 ▶* [d, e] T2 → R T1.
+#d #e #L #T2 #R #HT2 #IHT2 #T1 #HT12
+@(TC_star_ind_dx … HT2 IHT2 … HT12) //
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma tpss_strap1: ∀L,T1,T,T2,d,e.
+                   L ⊢ T1 ▶* [d, e] T → L ⊢ T ▶ [d, e] T2 → L ⊢ T1 ▶* [d, e] T2. 
+/2 width=3/ qed.
+
+lemma tpss_strap2: ∀L,T1,T,T2,d,e.
+                   L ⊢ T1 ▶ [d, e] T → L ⊢ T ▶* [d, e] T2 → L ⊢ T1 ▶* [d, e] T2. 
+/2 width=3/ qed.
+
+lemma tpss_lsubs_trans: ∀L1,T1,T2,d,e. L1 ⊢ T1 ▶* [d, e] T2 →
+                        ∀L2. L2 ≼ [d, e] L1 → L2 ⊢ T1 ▶* [d, e] T2.
+/3 width=3/ qed.
+
+lemma tpss_refl: ∀d,e,L,T. L ⊢ T ▶* [d, e] T.
+/2 width=1/ qed.
+
+lemma tpss_bind: ∀L,V1,V2,d,e. L ⊢ V1 ▶* [d, e] V2 →
+                 ∀a,I,T1,T2. L. ⓑ{I} V2 ⊢ T1 ▶* [d + 1, e] T2 →
+                 L ⊢ ⓑ{a,I} V1. T1 ▶* [d, e] ⓑ{a,I} V2. T2.
+#L #V1 #V2 #d #e #HV12 elim HV12 -V2
+[ #V2 #HV12 #a #I #T1 #T2 #HT12 elim HT12 -T2
+  [ /3 width=5/
+  | #T #T2 #_ #HT2 #IHT @step /2 width=5/ (**) (* /3 width=5/ is too slow *)
+  ]
+| #V #V2 #_ #HV12 #IHV #a #I #T1 #T2 #HT12
+  lapply (tpss_lsubs_trans … HT12 (L. ⓑ{I} V) ?) -HT12 /2 width=1/ #HT12
+  lapply (IHV a … HT12) -IHV -HT12 #HT12 @step /2 width=5/ (**) (* /3 width=5/ is too slow *)
+]
+qed.
+
+lemma tpss_flat: ∀L,I,V1,V2,T1,T2,d,e.
+                 L ⊢ V1 ▶* [d, e] V2 → L ⊢ T1 ▶* [d, e] T2 →
+                 L ⊢ ⓕ{I} V1. T1 ▶* [d, e] ⓕ{I} V2. T2.
+#L #I #V1 #V2 #T1 #T2 #d #e #HV12 elim HV12 -V2
+[ #V2 #HV12 #HT12 elim HT12 -T2
+  [ /3 width=1/
+  | #T #T2 #_ #HT2 #IHT @step /2 width=5/ (**) (* /3 width=5/ is too slow *)
+  ]
+| #V #V2 #_ #HV12 #IHV #HT12
+  lapply (IHV … HT12) -IHV -HT12 #HT12 @step /2 width=5/ (**) (* /3 width=5/ is too slow *)
+]
+qed.
+
+lemma tpss_weak: ∀L,T1,T2,d1,e1. L ⊢ T1 ▶* [d1, e1] T2 →
+                 ∀d2,e2. d2 ≤ d1 → d1 + e1 ≤ d2 + e2 →
+                 L ⊢ T1 ▶* [d2, e2] T2.
+#L #T1 #T2 #d1 #e1 #H #d1 #d2 #Hd21 #Hde12 @(tpss_ind … H) -T2
+[ //
+| #T #T2 #_ #HT12 #IHT
+  lapply (tps_weak … HT12 … Hd21 Hde12) -HT12 -Hd21 -Hde12 /2 width=3/
+]
+qed.
+
+lemma tpss_weak_top: ∀L,T1,T2,d,e.
+                     L ⊢ T1 ▶* [d, e] T2 → L ⊢ T1 ▶* [d, |L| - d] T2.
+#L #T1 #T2 #d #e #H @(tpss_ind … H) -T2
+[ //
+| #T #T2 #_ #HT12 #IHT
+  lapply (tps_weak_top … HT12) -HT12 /2 width=3/
+]
+qed.
+
+lemma tpss_weak_all: ∀L,T1,T2,d,e.
+                     L ⊢ T1 ▶* [d, e] T2 → L ⊢ T1 ▶* [0, |L|] T2.
+#L #T1 #T2 #d #e #HT12
+lapply (tpss_weak … HT12 0 (d + e) ? ?) -HT12 // #HT12
+lapply (tpss_weak_top … HT12) //
+qed.
+
+lemma tpss_append: ∀K,T1,T2,d,e. K ⊢ T1 ▶* [d, e] T2 →
+                   ∀L. L @@ K ⊢ T1 ▶* [d, e] T2.
+#K #T1 #T2 #d #e #H @(tpss_ind … H) -T2 // /3 width=3/
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+(* Note: this can be derived from tpss_inv_atom1 *)
+lemma tpss_inv_sort1: ∀L,T2,k,d,e. L ⊢ ⋆k ▶* [d, e] T2 → T2 = ⋆k.
+#L #T2 #k #d #e #H @(tpss_ind … H) -T2
+[ //
+| #T #T2 #_ #HT2 #IHT destruct
+  >(tps_inv_sort1 … HT2) -HT2 //
+]
+qed-.
+
+(* Note: this can be derived from tpss_inv_atom1 *)
+lemma tpss_inv_gref1: ∀L,T2,p,d,e. L ⊢ §p ▶* [d, e] T2 → T2 = §p.
+#L #T2 #p #d #e #H @(tpss_ind … H) -T2
+[ //
+| #T #T2 #_ #HT2 #IHT destruct
+  >(tps_inv_gref1 … HT2) -HT2 //
+]
+qed-.
+
+lemma tpss_inv_bind1: ∀d,e,L,a,I,V1,T1,U2. L ⊢ ⓑ{a,I} V1. T1 ▶* [d, e] U2 →
+                      ∃∃V2,T2. L ⊢ V1 ▶* [d, e] V2 & 
+                               L. ⓑ{I} V2 ⊢ T1 ▶* [d + 1, e] T2 &
+                               U2 = ⓑ{a,I} V2. T2.
+#d #e #L #a #I #V1 #T1 #U2 #H @(tpss_ind … H) -U2
+[ /2 width=5/
+| #U #U2 #_ #HU2 * #V #T #HV1 #HT1 #H destruct
+  elim (tps_inv_bind1 … HU2) -HU2 #V2 #T2 #HV2 #HT2 #H
+  lapply (tpss_lsubs_trans … HT1 (L. ⓑ{I} V2) ?) -HT1 /2 width=1/ /3 width=5/
+]
+qed-.
+
+lemma tpss_inv_flat1: ∀d,e,L,I,V1,T1,U2. L ⊢ ⓕ{I} V1. T1 ▶* [d, e] U2 →
+                      ∃∃V2,T2. L ⊢ V1 ▶* [d, e] V2 & L ⊢ T1 ▶* [d, e] T2 &
+                               U2 =  ⓕ{I} V2. T2.
+#d #e #L #I #V1 #T1 #U2 #H @(tpss_ind … H) -U2
+[ /2 width=5/
+| #U #U2 #_ #HU2 * #V #T #HV1 #HT1 #H destruct
+  elim (tps_inv_flat1 … HU2) -HU2 /3 width=5/
+]
+qed-.
+
+lemma tpss_inv_refl_O2: ∀L,T1,T2,d. L ⊢ T1 ▶* [d, 0] T2 → T1 = T2.
+#L #T1 #T2 #d #H @(tpss_ind … H) -T2
+[ //
+| #T #T2 #_ #HT2 #IHT <(tps_inv_refl_O2 … HT2) -HT2 //
+]
+qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma tpss_fwd_tw: ∀L,T1,T2,d,e. L ⊢ T1 ▶* [d, e] T2 → #{T1} ≤ #{T2}.
+#L #T1 #T2 #d #e #H @(tpss_ind … H) -T2 //
+#T #T2 #_ #HT2 #IHT1
+lapply (tps_fwd_tw … HT2) -HT2 #HT2
+@(transitive_le … IHT1) //
+qed-.
+
+lemma tpss_fwd_shift1: ∀L,L1,T1,T,d,e. L ⊢ L1 @@ T1 ▶*[d, e] T →
+                       ∃∃L2,T2. |L1| = |L2| & T = L2 @@ T2.
+#L #L1 #T1 #T #d #e #H @(tpss_ind … H) -T
+[ /2 width=4/
+| #T #X #_ #H0 * #L0 #T0 #HL10 #H destruct
+  elim (tps_fwd_shift1 … H0) -H0 #L2 #T2 #HL02 #H destruct /2 width=4/
+]
+qed-.
+  
\ No newline at end of file
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/tpss_alt.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/tpss_alt.ma
new file mode 100644 (file)
index 0000000..ae1dcf6
--- /dev/null
@@ -0,0 +1,101 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||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/tpss_lift.ma".
+
+(* PARALLEL UNFOLD ON TERMS *************************************************)
+
+(* alternative definition of tpss *)
+inductive tpssa: nat → nat → lenv → relation term ≝
+| tpssa_atom : ∀L,I,d,e. tpssa d e L (⓪{I}) (⓪{I})
+| tpssa_subst: ∀L,K,V1,V2,W2,i,d,e. d ≤ i → i < d + e →
+               ⇩[0, i] L ≡ K. ⓓV1 → tpssa 0 (d + e - i - 1) K V1 V2 →
+               ⇧[0, i + 1] V2 ≡ W2 → tpssa d e L (#i) W2
+| tpssa_bind : ∀L,a,I,V1,V2,T1,T2,d,e.
+               tpssa d e L V1 V2 → tpssa (d + 1) e (L. ⓑ{I} V2) T1 T2 →
+               tpssa d e L (ⓑ{a,I} V1. T1) (ⓑ{a,I} V2. T2)
+| tpssa_flat : ∀L,I,V1,V2,T1,T2,d,e.
+               tpssa d e L V1 V2 → tpssa d e L T1 T2 →
+               tpssa d e L (ⓕ{I} V1. T1) (ⓕ{I} V2. T2)
+.
+
+interpretation "parallel unfold (term) alternative"
+   'PSubstStarAlt L T1 d e T2 = (tpssa d e L T1 T2).
+
+(* Basic properties *********************************************************)
+
+lemma tpssa_lsubs_trans: ∀L1,T1,T2,d,e. L1 ⊢ T1 ▶▶* [d, e] T2 →
+                         ∀L2. L2 ≼ [d, e] L1 → L2 ⊢ T1 ▶▶* [d, e] T2.
+#L1 #T1 #T2 #d #e #H elim H -L1 -T1 -T2 -d -e
+[ //
+| #L1 #K1 #V1 #V2 #W2 #i #d #e #Hdi #Hide #HLK1 #_ #HVW2 #IHV12 #L2 #HL12
+  elim (ldrop_lsubs_ldrop2_abbr … HL12 … HLK1 ? ?) -HL12 -HLK1 // /3 width=6/
+| /4 width=1/
+| /3 width=1/
+]
+qed.
+
+lemma tpssa_refl: ∀T,L,d,e. L ⊢ T ▶▶* [d, e] T.
+#T elim T -T //
+#I elim I -I /2 width=1/
+qed.
+
+lemma tpssa_tps_trans: ∀L,T1,T,d,e. L ⊢ T1 ▶▶* [d, e] T →
+                       ∀T2. L ⊢ T ▶ [d, e] T2 → L ⊢ T1 ▶▶* [d, e] T2.
+#L #T1 #T #d #e #H elim H -L -T1 -T -d -e
+[ #L #I #d #e #X #H
+  elim (tps_inv_atom1 … H) -H // * /2 width=6/
+| #L #K #V1 #V2 #W2 #i #d #e #Hdi #Hide #HLK #_ #HVW2 #IHV12 #T2 #H
+  lapply (ldrop_fwd_ldrop2 … HLK) #H0LK
+  lapply (tps_weak … H 0 (d+e) ? ?) -H // #H
+  elim (tps_inv_lift1_be … H … H0LK … HVW2 ? ?) -H -H0LK -HVW2 // /3 width=6/
+| #L #a #I #V1 #V #T1 #T #d #e #_ #_ #IHV1 #IHT1 #X #H
+  elim (tps_inv_bind1 … H) -H #V2 #T2 #HV2 #HT2 #H destruct
+  lapply (tps_lsubs_trans … HT2 (L.ⓑ{I}V) ?) -HT2 /2 width=1/ #HT2
+  lapply (IHV1 … HV2) -IHV1 -HV2 #HV12
+  lapply (IHT1 … HT2) -IHT1 -HT2 #HT12
+  lapply (tpssa_lsubs_trans … HT12 (L.ⓑ{I}V2) ?) -HT12 /2 width=1/
+| #L #I #V1 #V #T1 #T #d #e #_ #_ #IHV1 #IHT1 #X #H
+  elim (tps_inv_flat1 … H) -H #V2 #T2 #HV2 #HT2 #H destruct /3 width=1/
+]
+qed.
+
+lemma tpss_tpssa: ∀L,T1,T2,d,e. L ⊢ T1 ▶* [d, e] T2 → L ⊢ T1 ▶▶* [d, e] T2.
+#L #T1 #T2 #d #e #H @(tpss_ind … H) -T2 // /2 width=3/
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma tpssa_tpss: ∀L,T1,T2,d,e. L ⊢ T1 ▶▶* [d, e] T2 → L ⊢ T1 ▶* [d, e] T2.
+#L #T1 #T2 #d #e #H elim H -L -T1 -T2 -d -e // /2 width=6/
+qed-. 
+
+lemma tpss_ind_alt: ∀R:ℕ→ℕ→lenv→relation term.
+                    (∀L,I,d,e. R d e L (⓪{I}) (⓪{I})) →
+                    (∀L,K,V1,V2,W2,i,d,e. d ≤ i → i < d + e →
+                     ⇩[O, i] L ≡ K.ⓓV1 → K ⊢ V1 ▶* [O, d + e - i - 1] V2 →
+                     ⇧[O, i + 1] V2 ≡ W2 → R O (d+e-i-1) K V1 V2 → R d e L #i W2
+                    ) →
+                    (∀L,a,I,V1,V2,T1,T2,d,e. L ⊢ V1 ▶* [d, e] V2 →
+                     L.ⓑ{I}V2 ⊢ T1 ▶* [d + 1, e] T2 → R d e L V1 V2 →
+                     R (d+1) e (L.ⓑ{I}V2) T1 T2 → R d e L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2)
+                    ) →
+                    (∀L,I,V1,V2,T1,T2,d,e. L ⊢ V1 ▶* [d, e] V2 →
+                     L ⊢ T1 ▶* [d, e] T2 → R d e L V1 V2 →
+                     R d e L T1 T2 → R d e L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2)
+                    ) →
+                    ∀d,e,L,T1,T2. L ⊢ T1 ▶* [d, e] T2 → R d e L T1 T2.
+#R #H1 #H2 #H3 #H4 #d #e #L #T1 #T2 #H elim (tpss_tpssa … H) -L -T1 -T2 -d -e
+// /3 width=1 by tpssa_tpss/ /3 width=7 by tpssa_tpss/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/tpss_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/tpss_lift.ma
new file mode 100644 (file)
index 0000000..a68f86e
--- /dev/null
@@ -0,0 +1,196 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/tps_lift.ma".
+include "basic_2/unfold/tpss.ma".
+
+(* PARTIAL UNFOLD ON TERMS **************************************************)
+
+(* Advanced properties ******************************************************)
+
+lemma tpss_subst: ∀L,K,V,U1,i,d,e.
+                  d ≤ i → i < d + e →
+                  ⇩[0, i] L ≡ K. ⓓV → K ⊢ V ▶* [0, d + e - i - 1] U1 →
+                  ∀U2. ⇧[0, i + 1] U1 ≡ U2 → L ⊢ #i ▶* [d, e] U2.
+#L #K #V #U1 #i #d #e #Hdi #Hide #HLK #H @(tpss_ind … H) -U1
+[ /3 width=4/
+| #U #U1 #_ #HU1 #IHU #U2 #HU12
+  elim (lift_total U 0 (i+1)) #U0 #HU0
+  lapply (IHU … HU0) -IHU #H
+  lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
+  lapply (tps_lift_ge … HU1 … HLK HU0 HU12 ?) -HU1 -HLK -HU0 -HU12 // normalize #HU02
+  lapply (tps_weak … HU02 d e ? ?) -HU02 [ >minus_plus >commutative_plus /2 width=1/ | /2 width=1/ | /2 width=3/ ]
+]
+qed.
+
+(* Advanced inverion lemmas *************************************************)
+
+lemma tpss_inv_atom1: ∀L,T2,I,d,e. L ⊢ ⓪{I} ▶* [d, e] T2 →
+                      T2 = ⓪{I} ∨
+                      ∃∃K,V1,V2,i. d ≤ i & i < d + e &
+                                   ⇩[O, i] L ≡ K. ⓓV1 &
+                                   K ⊢ V1 ▶* [0, d + e - i - 1] V2 &
+                                   ⇧[O, i + 1] V2 ≡ T2 &
+                                   I = LRef i.
+#L #T2 #I #d #e #H @(tpss_ind … H) -T2
+[ /2 width=1/
+| #T #T2 #_ #HT2 *
+  [ #H destruct
+    elim (tps_inv_atom1 … HT2) -HT2 [ /2 width=1/ | * /3 width=10/ ]
+  | * #K #V1 #V #i #Hdi #Hide #HLK #HV1 #HVT #HI
+    lapply (ldrop_fwd_ldrop2 … HLK) #H
+    elim (tps_inv_lift1_ge_up … HT2 … H … HVT ? ? ?) normalize -HT2 -H -HVT [2,3,4: /2 width=1/ ] #V2 <minus_plus #HV2 #HVT2
+    @or_intror @(ex6_4_intro … Hdi Hide HLK … HVT2 HI) /2 width=3/ (**) (* /4 width=10/ is too slow *)
+  ]
+]
+qed-.
+
+lemma tpss_inv_lref1: ∀L,T2,i,d,e. L ⊢ #i ▶* [d, e] T2 →
+                      T2 = #i ∨
+                      ∃∃K,V1,V2. d ≤ i & i < d + e &
+                                 ⇩[O, i] L ≡ K. ⓓV1 &
+                                 K ⊢ V1 ▶* [0, d + e - i - 1] V2 &
+                                 ⇧[O, i + 1] V2 ≡ T2.
+#L #T2 #i #d #e #H
+elim (tpss_inv_atom1 … H) -H /2 width=1/
+* #K #V1 #V2 #j #Hdj #Hjde #HLK #HV12 #HVT2 #H destruct /3 width=6/
+qed-.
+
+lemma tpss_inv_S2: ∀L,T1,T2,d,e. L ⊢ T1 ▶* [d, e + 1] T2 →
+                   ∀K,V. ⇩[0, d] L ≡ K. ⓛV → L ⊢ T1 ▶* [d + 1, e] T2.
+#L #T1 #T2 #d #e #H #K #V #HLK @(tpss_ind … H) -T2 //
+#T #T2 #_ #HT2 #IHT
+lapply (tps_inv_S2 … HT2 … HLK) -HT2 -HLK /2 width=3/
+qed-.
+
+lemma tpss_inv_refl_SO2: ∀L,T1,T2,d. L ⊢ T1 ▶* [d, 1] T2 →
+                         ∀K,V. ⇩[0, d] L ≡ K. ⓛV → T1 = T2.
+#L #T1 #T2 #d #H #K #V #HLK @(tpss_ind … H) -T2 //
+#T #T2 #_ #HT2 #IHT <(tps_inv_refl_SO2 … HT2 … HLK) //
+qed-.
+
+(* Relocation properties ****************************************************)
+
+lemma tpss_lift_le: ∀K,T1,T2,dt,et. K ⊢ T1 ▶* [dt, et] T2 →
+                    ∀L,U1,d,e. dt + et ≤ d → ⇩[d, e] L ≡ K →
+                    ⇧[d, e] T1 ≡ U1 → ∀U2. ⇧[d, e] T2 ≡ U2 →
+                    L ⊢ U1 ▶* [dt, et] U2.
+#K #T1 #T2 #dt #et #H #L #U1 #d #e #Hdetd #HLK #HTU1 @(tpss_ind … H) -T2
+[ #U2 #H >(lift_mono … HTU1 … H) -H //
+| -HTU1 #T #T2 #_ #HT2 #IHT #U2 #HTU2
+  elim (lift_total T d e) #U #HTU
+  lapply (IHT … HTU) -IHT #HU1
+  lapply (tps_lift_le … HT2 … HLK HTU HTU2 ?) -HT2 -HLK -HTU -HTU2 // /2 width=3/
+]
+qed.
+
+lemma tpss_lift_be: ∀K,T1,T2,dt,et. K ⊢ T1 ▶* [dt, et] T2 →
+                    ∀L,U1,d,e. dt ≤ d → d ≤ dt + et →
+                    ⇩[d, e] L ≡ K → ⇧[d, e] T1 ≡ U1 →
+                    ∀U2. ⇧[d, e] T2 ≡ U2 → L ⊢ U1 ▶* [dt, et + e] U2.
+#K #T1 #T2 #dt #et #H #L #U1 #d #e #Hdtd #Hddet #HLK #HTU1 @(tpss_ind … H) -T2
+[ #U2 #H >(lift_mono … HTU1 … H) -H //
+| -HTU1 #T #T2 #_ #HT2 #IHT #U2 #HTU2
+  elim (lift_total T d e) #U #HTU
+  lapply (IHT … HTU) -IHT #HU1
+  lapply (tps_lift_be … HT2 … HLK HTU HTU2 ? ?) -HT2 -HLK -HTU -HTU2 // /2 width=3/
+]
+qed.
+
+lemma tpss_lift_ge: ∀K,T1,T2,dt,et. K ⊢ T1 ▶* [dt, et] T2 →
+                    ∀L,U1,d,e. d ≤ dt → ⇩[d, e] L ≡ K →
+                    ⇧[d, e] T1 ≡ U1 → ∀U2. ⇧[d, e] T2 ≡ U2 →
+                    L ⊢ U1 ▶* [dt + e, et] U2.
+#K #T1 #T2 #dt #et #H #L #U1 #d #e #Hddt #HLK #HTU1 @(tpss_ind … H) -T2
+[ #U2 #H >(lift_mono … HTU1 … H) -H //
+| -HTU1 #T #T2 #_ #HT2 #IHT #U2 #HTU2
+  elim (lift_total T d e) #U #HTU
+  lapply (IHT … HTU) -IHT #HU1
+  lapply (tps_lift_ge … HT2 … HLK HTU HTU2 ?) -HT2 -HLK -HTU -HTU2 // /2 width=3/
+]
+qed.
+
+lemma tpss_inv_lift1_le: ∀L,U1,U2,dt,et. L ⊢ U1 ▶* [dt, et] U2 →
+                         ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                         dt + et ≤ d →
+                         ∃∃T2. K ⊢ T1 ▶* [dt, et] T2 & ⇧[d, e] T2 ≡ U2.
+#L #U1 #U2 #dt #et #H #K #d #e #HLK #T1 #HTU1 #Hdetd @(tpss_ind … H) -U2
+[ /2 width=3/
+| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
+  elim (tps_inv_lift1_le … HU2 … HLK … HTU ?) -HU2 -HLK -HTU // /3 width=3/
+]
+qed.
+
+lemma tpss_inv_lift1_be: ∀L,U1,U2,dt,et. L ⊢ U1 ▶* [dt, et] U2 →
+                         ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                         dt ≤ d → d + e ≤ dt + et →
+                         ∃∃T2. K ⊢ T1 ▶* [dt, et - e] T2 & ⇧[d, e] T2 ≡ U2.
+#L #U1 #U2 #dt #et #H #K #d #e #HLK #T1 #HTU1 #Hdtd #Hdedet @(tpss_ind … H) -U2
+[ /2 width=3/
+| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
+  elim (tps_inv_lift1_be … HU2 … HLK … HTU ? ?) -HU2 -HLK -HTU // /3 width=3/
+]
+qed.
+
+lemma tpss_inv_lift1_ge: ∀L,U1,U2,dt,et. L ⊢ U1 ▶* [dt, et] U2 →
+                         ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                         d + e ≤ dt →
+                         ∃∃T2. K ⊢ T1 ▶* [dt - e, et] T2 & ⇧[d, e] T2 ≡ U2.
+#L #U1 #U2 #dt #et #H #K #d #e #HLK #T1 #HTU1 #Hdedt @(tpss_ind … H) -U2
+[ /2 width=3/
+| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
+  elim (tps_inv_lift1_ge … HU2 … HLK … HTU ?) -HU2 -HLK -HTU // /3 width=3/
+]
+qed.
+
+lemma tpss_inv_lift1_eq: ∀L,U1,U2,d,e.
+                         L ⊢ U1 ▶* [d, e] U2 → ∀T1. ⇧[d, e] T1 ≡ U1 → U1 = U2.
+#L #U1 #U2 #d #e #H #T1 #HTU1 @(tpss_ind … H) -U2 //
+#U #U2 #_ #HU2 #IHU destruct
+<(tps_inv_lift1_eq … HU2 … HTU1) -HU2 -HTU1 //
+qed.
+
+lemma tpss_inv_lift1_ge_up: ∀L,U1,U2,dt,et. L ⊢ U1 ▶* [dt, et] U2 →
+                            ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                            d ≤ dt → dt ≤ d + e → d + e ≤ dt + et →
+                            ∃∃T2. K ⊢ T1 ▶* [d, dt + et - (d + e)] T2 &
+                                 ⇧[d, e] T2 ≡ U2.
+#L #U1 #U2 #dt #et #H #K #d #e #HLK #T1 #HTU1 #Hddt #Hdtde #Hdedet @(tpss_ind … H) -U2
+[ /2 width=3/
+| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
+  elim (tps_inv_lift1_ge_up … HU2 … HLK … HTU ? ? ?) -HU2 -HLK -HTU // /3 width=3/
+]
+qed.
+
+lemma tpss_inv_lift1_be_up: ∀L,U1,U2,dt,et. L ⊢ U1 ▶* [dt, et] U2 →
+                            ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                            dt ≤ d → dt + et ≤ d + e →
+                            ∃∃T2. K ⊢ T1 ▶* [dt, d - dt] T2 & ⇧[d, e] T2 ≡ U2.
+#L #U1 #U2 #dt #et #H #K #d #e #HLK #T1 #HTU1 #Hdtd #Hdetde @(tpss_ind … H) -U2
+[ /2 width=3/
+| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
+  elim (tps_inv_lift1_be_up … HU2 … HLK … HTU ? ?) -HU2 -HLK -HTU // /3 width=3/
+]
+qed.
+
+lemma tpss_inv_lift1_le_up: ∀L,U1,U2,dt,et. L ⊢ U1 ▶* [dt, et] U2 →
+                            ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                            dt ≤ d → d ≤ dt + et → dt + et ≤ d + e →
+                            ∃∃T2. K ⊢ T1 ▶* [dt, d - dt] T2 & ⇧[d, e] T2 ≡ U2.
+#L #U1 #U2 #dt #et #H #K #d #e #HLK #T1 #HTU1 #Hdtd #Hddet #Hdetde @(tpss_ind … H) -U2
+[ /2 width=3/
+| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
+  elim (tps_inv_lift1_le_up … HU2 … HLK … HTU ? ? ?) -HU2 -HLK -HTU // /3 width=3/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/tpss_tpss.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/tpss_tpss.ma
new file mode 100644 (file)
index 0000000..3f41b00
--- /dev/null
@@ -0,0 +1,96 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/substitution/tps_tps.ma".
+include "basic_2/unfold/tpss_lift.ma".
+
+(* PARTIAL UNFOLD ON TERMS **************************************************)
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma tpss_inv_SO2: ∀L,T1,T2,d. L ⊢ T1 ▶* [d, 1] T2 → L ⊢ T1 ▶ [d, 1] T2.
+#L #T1 #T2 #d #H @(tpss_ind … H) -T2 //
+#T #T2 #_ #HT2 #IHT1
+lapply (tps_trans_ge … IHT1 … HT2 ?) //
+qed-.
+
+(* Advanced properties ******************************************************)
+
+lemma tpss_strip_eq: ∀L,T0,T1,d1,e1. L ⊢ T0 ▶* [d1, e1] T1 →
+                     ∀T2,d2,e2. L ⊢ T0 ▶ [d2, e2] T2 →
+                     ∃∃T. L ⊢ T1 ▶ [d2, e2] T & L ⊢ T2 ▶* [d1, e1] T.
+/3 width=3/ qed.
+
+lemma tpss_strip_neq: ∀L1,T0,T1,d1,e1. L1 ⊢ T0 ▶* [d1, e1] T1 →
+                      ∀L2,T2,d2,e2. L2 ⊢ T0 ▶ [d2, e2] T2 →
+                      (d1 + e1 ≤ d2 ∨ d2 + e2 ≤ d1) →
+                      ∃∃T. L2 ⊢ T1 ▶ [d2, e2] T & L1 ⊢ T2 ▶* [d1, e1] T.
+/3 width=3/ qed.
+
+lemma tpss_strap1_down: ∀L,T1,T0,d1,e1. L ⊢ T1 ▶* [d1, e1] T0 →
+                        ∀T2,d2,e2. L ⊢ T0 ▶ [d2, e2] T2 → d2 + e2 ≤ d1 →
+                        ∃∃T. L ⊢ T1 ▶ [d2, e2] T & L ⊢ T ▶* [d1, e1] T2.
+/3 width=3/ qed.
+
+lemma tpss_strap2_down: ∀L,T1,T0,d1,e1. L ⊢ T1 ▶ [d1, e1] T0 →
+                        ∀T2,d2,e2. L ⊢ T0 ▶* [d2, e2] T2 → d2 + e2 ≤ d1 →
+                        ∃∃T. L ⊢ T1 ▶* [d2, e2] T & L ⊢ T ▶ [d1, e1] T2.
+/3 width=3/ qed.
+
+lemma tpss_split_up: ∀L,T1,T2,d,e. L ⊢ T1 ▶* [d, e] T2 →
+                     ∀i. d ≤ i → i ≤ d + e →
+                     ∃∃T. L ⊢ T1 ▶* [d, i - d] T & L ⊢ T ▶* [i, d + e - i] T2.
+#L #T1 #T2 #d #e #H #i #Hdi #Hide @(tpss_ind … H) -T2
+[ /2 width=3/
+| #T #T2 #_ #HT12 * #T3 #HT13 #HT3
+  elim (tps_split_up … HT12 … Hdi Hide) -HT12 -Hide #T0 #HT0 #HT02
+  elim (tpss_strap1_down … HT3 … HT0 ?) -T [2: >commutative_plus /2 width=1/ ]
+  /3 width=7 by ex2_1_intro, step/ (**) (* just /3 width=7/ is too slow *)
+]
+qed.
+
+lemma tpss_inv_lift1_up: ∀L,U1,U2,dt,et. L ⊢ U1 ▶* [dt, et] U2 →
+                         ∀K,d,e. ⇩[d, e] L ≡ K → ∀T1. ⇧[d, e] T1 ≡ U1 →
+                         d ≤ dt → dt ≤ d + e → d + e ≤ dt + et →
+                         ∃∃T2. K ⊢ T1 ▶* [d, dt + et - (d + e)] T2 &
+                               ⇧[d, e] T2 ≡ U2.
+#L #U1 #U2 #dt #et #HU12 #K #d #e #HLK #T1 #HTU1 #Hddt #Hdtde #Hdedet
+elim (tpss_split_up … HU12 (d + e) ? ?) -HU12 // -Hdedet #U #HU1 #HU2
+lapply (tpss_weak … HU1 d e ? ?) -HU1 // [ >commutative_plus /2 width=1/ ] -Hddt -Hdtde #HU1
+lapply (tpss_inv_lift1_eq … HU1 … HTU1) -HU1 #HU1 destruct
+elim (tpss_inv_lift1_ge … HU2 … HLK … HTU1 ?) -HU2 -HLK -HTU1 // <minus_plus_m_m /2 width=3/
+qed.
+
+(* Main properties **********************************************************)
+
+theorem tpss_conf_eq: ∀L,T0,T1,d1,e1. L ⊢ T0 ▶* [d1, e1] T1 →
+                      ∀T2,d2,e2. L ⊢ T0 ▶* [d2, e2] T2 →
+                      ∃∃T. L ⊢ T1 ▶* [d2, e2] T & L ⊢ T2 ▶* [d1, e1] T.
+/3 width=3/ qed.
+
+theorem tpss_conf_neq: ∀L1,T0,T1,d1,e1. L1 ⊢ T0 ▶* [d1, e1] T1 →
+                       ∀L2,T2,d2,e2. L2 ⊢ T0 ▶* [d2, e2] T2 →
+                       (d1 + e1 ≤ d2 ∨ d2 + e2 ≤ d1) →
+                       ∃∃T. L2 ⊢ T1 ▶* [d2, e2] T & L1 ⊢ T2 ▶* [d1, e1] T.
+/3 width=3/ qed.
+
+theorem tpss_trans_eq: ∀L,T1,T,T2,d,e.
+                       L ⊢ T1 ▶* [d, e] T → L ⊢ T ▶* [d, e] T2 →
+                       L ⊢ T1 ▶* [d, e] T2.
+/2 width=3/ qed.
+
+theorem tpss_trans_down: ∀L,T1,T0,d1,e1. L ⊢ T1 ▶* [d1, e1] T0 →
+                         ∀T2,d2,e2. L ⊢ T0 ▶* [d2, e2] T2 → d2 + e2 ≤ d1 →
+                         ∃∃T. L ⊢ T1 ▶* [d2, e2] T & L ⊢ T ▶* [d1, e1] T2.
+/3 width=3/ qed.
diff --git a/matita/matita/contribs/lambdadelta/ground_2/arith.ma b/matita/matita/contribs/lambdadelta/ground_2/arith.ma
new file mode 100644 (file)
index 0000000..8afc445
--- /dev/null
@@ -0,0 +1,127 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "arithmetics/nat.ma".
+include "ground_2/star.ma".
+
+(* ARITHMETICAL PROPERTIES **************************************************)
+
+(* Equations ****************************************************************)
+
+lemma plus_n_2: ∀n. n + 2 = n + 1 + 1.
+// qed.
+
+lemma le_plus_minus: ∀m,n,p. p ≤ n → m + n - p = m + (n - p).
+/2 by plus_minus/ qed.
+
+lemma le_plus_minus_comm: ∀n,m,p. p ≤ m → m + n - p = m - p + n.
+/2 by plus_minus/ qed.
+
+lemma arith_b1: ∀a,b,c1. c1 ≤ b → a - c1 - (b - c1) = a - b.
+#a #b #c1 #H >minus_minus_comm >minus_le_minus_minus_comm //
+qed.
+
+lemma arith_b2: ∀a,b,c1,c2. c1 + c2 ≤ b → a - c1 - c2 - (b - c1 - c2) = a - b.
+#a #b #c1 #c2 #H >minus_plus >minus_plus >minus_plus /2 width=1/
+qed.
+
+lemma arith_c1x: ∀x,a,b,c1. x + c1 + a - (b + c1) = x + a - b.
+/3 by monotonic_le_minus_l, le_to_le_to_eq, le_n/ qed.
+
+lemma arith_h1: ∀a1,a2,b,c1. c1 ≤ a1 → c1 ≤ b →
+                a1 - c1 + a2 - (b - c1) = a1 + a2 - b.
+#a1 #a2 #b #c1 #H1 #H2 >plus_minus // /2 width=1/
+qed.
+
+(* Inversion & forward lemmas ***********************************************)
+
+axiom eq_nat_dec: ∀n1,n2:nat. Decidable (n1 = n2).
+
+axiom lt_dec: ∀n1,n2. Decidable (n1 < n2).
+
+lemma lt_or_eq_or_gt: ∀m,n. ∨∨ m < n | n = m | n < m.
+#m #n elim (lt_or_ge m n) /2 width=1/
+#H elim H -m /2 width=1/
+#m #Hm * #H /2 width=1/ /3 width=1/
+qed-.
+
+lemma lt_refl_false: ∀n. n < n → ⊥.
+#n #H elim (lt_to_not_eq … H) -H /2 width=1/
+qed-.
+
+lemma lt_zero_false: ∀n. n < 0 → ⊥.
+#n #H elim (lt_to_not_le … H) -H /2 width=1/
+qed-.
+
+lemma false_lt_to_le: ∀x,y. (x < y → ⊥) → y ≤ x.
+#x #y #H elim (decidable_lt x y) /2 width=1/
+#Hxy elim (H Hxy)
+qed-.
+
+lemma le_plus_xySz_x_false: ∀y,z,x. x + y + S z ≤ x → ⊥.
+#y #z #x elim x -x
+[ #H lapply (le_n_O_to_eq … H) -H
+  <plus_n_Sm #H destruct
+| /3 width=1 by le_S_S_to_le/
+]
+qed-.
+
+lemma plus_xySz_x_false: ∀z,x,y. x + y + S z = x → ⊥.
+/2 width=4 by le_plus_xySz_x_false/ qed-.
+
+(* Iterators ****************************************************************)
+
+(* Note: see also: lib/arithemetcs/bigops.ma *)
+let rec iter (n:nat) (B:Type[0]) (op: B → B) (nil: B) ≝
+  match n with
+   [ O   ⇒ nil
+   | S k ⇒ op (iter k B op nil)
+   ].
+
+interpretation "iterated function" 'exp op n = (iter n ? op).
+
+lemma iter_SO: ∀B:Type[0]. ∀f:B→B. ∀b,l. f^(l+1) b = f (f^l b).
+#B #f #b #l >commutative_plus //
+qed.
+
+lemma iter_n_Sm: ∀B:Type[0]. ∀f:B→B. ∀b,l. f^l (f b) = f (f^l b).
+#B #f #b #l elim l -l normalize //
+qed.
+
+(* Trichotomy operator ******************************************************)
+
+(* Note: this is "if eqb n1 n2 then a2 else if leb n1 n2 then a1 else a3" *)
+let rec tri (A:Type[0]) n1 n2 a1 a2 a3 on n1 : A ≝
+  match n1 with 
+  [ O    ⇒ match n2 with [ O ⇒ a2 | S n2 ⇒ a1 ]
+  | S n1 ⇒ match n2 with [ O ⇒ a3 | S n2 ⇒ tri A n1 n2 a1 a2 a3 ]
+  ].
+
+lemma tri_lt: ∀A,a1,a2,a3,n2,n1. n1 < n2 → tri A n1 n2 a1 a2 a3 = a1.
+#A #a1 #a2 #a3 #n2 elim n2 -n2
+[ #n1 #H elim (lt_zero_false … H)
+| #n2 #IH #n1 elim n1 -n1 // /3 width=1/
+]
+qed.
+
+lemma tri_eq: ∀A,a1,a2,a3,n. tri A n n a1 a2 a3 = a2.
+#A #a1 #a2 #a3 #n elim n -n normalize //
+qed.
+
+lemma tri_gt: ∀A,a1,a2,a3,n1,n2. n2 < n1 → tri A n1 n2 a1 a2 a3 = a3.
+#A #a1 #a2 #a3 #n1 elim n1 -n1
+[ #n2 #H elim (lt_zero_false … H)
+| #n1 #IH #n2 elim n2 -n2 // /3 width=1/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/ground_2/list.ma b/matita/matita/contribs/lambdadelta/ground_2/list.ma
new file mode 100644 (file)
index 0000000..9a5ac0a
--- /dev/null
@@ -0,0 +1,55 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "ground_2/arith.ma".
+
+(* LISTS ********************************************************************)
+
+inductive list (A:Type[0]) : Type[0] :=
+  | nil : list A
+  | cons: A → list A → list A.
+
+interpretation "nil (list)" 'Nil = (nil ?).
+
+interpretation "cons (list)" 'Cons hd tl = (cons ? hd tl).
+
+let rec all A (R:predicate A) (l:list A) on l ≝
+  match l with
+  [ nil        ⇒ ⊤
+  | cons hd tl ⇒ R hd ∧ all A R tl
+  ].
+
+inductive list2 (A1,A2:Type[0]) : Type[0] :=
+  | nil2 : list2 A1 A2
+  | cons2: A1 → A2 → list2 A1 A2 → list2 A1 A2.
+
+interpretation "nil (list of pairs)" 'Nil2 = (nil2 ? ?).
+
+interpretation "cons (list of pairs)" 'Cons hd1 hd2 tl = (cons2 ? ? hd1 hd2 tl).
+
+let rec append2 (A1,A2:Type[0]) (l1,l2:list2 A1 A2) on l1 ≝ match l1 with
+[ nil2           ⇒ l2
+| cons2 a1 a2 tl ⇒ {a1, a2} @ append2 A1 A2 tl l2
+].
+
+interpretation "append (list of pairs)"
+   'Append l1 l2 = (append2 ? ? l1 l2).
+
+let rec length2 (A1,A2:Type[0]) (l:list2 A1 A2) on l ≝ match l with
+[ nil2        ⇒ 0
+| cons2 _ _ l ⇒ length2 A1 A2 l + 1
+].
+
+interpretation "length (list of pairs)"
+   'card l = (length2 ? ? l).
diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation.ma b/matita/matita/contribs/lambdadelta/ground_2/notation.ma
new file mode 100644 (file)
index 0000000..4ac2e6e
--- /dev/null
@@ -0,0 +1,47 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+(* Logic ********************************************************************)
+
+notation "⊥"
+  non associative with precedence 90
+  for @{'false}.
+
+notation "⊤"
+  non associative with precedence 90
+  for @{'true}.
+
+(* Lists ********************************************************************)
+
+notation "◊"
+  non associative with precedence 90
+  for @{'Nil}.
+
+notation "hvbox( hd @ break tl )"
+  right associative with precedence 47
+  for @{'Cons $hd $tl}.
+
+notation "hvbox( l1 @@ break l2 )"
+  right associative with precedence 47
+  for @{'Append $l1 $l2 }.
+
+notation "⟠"
+  non associative with precedence 90
+  for @{'Nil2}.
+
+notation "hvbox( { hd1 , break hd2 } @ break tl )"
+  non associative with precedence 47
+  for @{'Cons $hd1 $hd2 $tl}.
diff --git a/matita/matita/contribs/lambdadelta/ground_2/star.ma b/matita/matita/contribs/lambdadelta/ground_2/star.ma
new file mode 100644 (file)
index 0000000..1e46a48
--- /dev/null
@@ -0,0 +1,158 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basics/star.ma".
+include "ground_2/xoa_props.ma".
+include "ground_2/notation.ma".
+
+(* PROPERTIES OF RELATIONS **************************************************)
+
+definition Decidable: Prop → Prop ≝ λR. R ∨ (R → ⊥).
+
+definition Confluent: ∀A. ∀R: relation A. Prop ≝ λA,R.
+                      ∀a0,a1. R a0 a1 → ∀a2. R a0 a2 →
+                      ∃∃a. R a1 a & R a2 a.
+
+definition Transitive: ∀A. ∀R: relation A. Prop ≝ λA,R.
+                       ∀a1,a0. R a1 a0 → ∀a2. R a0 a2 → R a1 a2.
+
+definition confluent2: ∀A. ∀R1,R2: relation A. Prop ≝ λA,R1,R2.
+                       ∀a0,a1. R1 a0 a1 → ∀a2. R2 a0 a2 →
+                       ∃∃a. R2 a1 a & R1 a2 a.
+
+definition transitive2: ∀A. ∀R1,R2: relation A. Prop ≝ λA,R1,R2.
+                        ∀a1,a0. R1 a1 a0 → ∀a2. R2 a0 a2 →
+                        ∃∃a. R2 a1 a & R1 a a2.
+
+definition bi_confluent:  ∀A,B. ∀R: bi_relation A B. Prop ≝ λA,B,R.
+                          ∀a0,a1,b0,b1. R a0 b0 a1 b1 → ∀a2,b2. R a0 b0 a2 b2 →
+                          ∃∃a,b. R a1 b1 a b & R a2 b2 a b.
+
+lemma TC_strip1: ∀A,R1,R2. confluent2 A R1 R2 →
+                 ∀a0,a1. TC … R1 a0 a1 → ∀a2. R2 a0 a2 →
+                 ∃∃a. R2 a1 a & TC … R1 a2 a.
+#A #R1 #R2 #HR12 #a0 #a1 #H elim H -a1
+[ #a1 #Ha01 #a2 #Ha02
+  elim (HR12 … Ha01 … Ha02) -HR12 -a0 /3 width=3/
+| #a #a1 #_ #Ha1 #IHa0 #a2 #Ha02
+  elim (IHa0 … Ha02) -a0 #a0 #Ha0 #Ha20
+  elim (HR12 … Ha1 … Ha0) -HR12 -a /4 width=3/
+]
+qed.
+
+lemma TC_strip2: ∀A,R1,R2. confluent2 A R1 R2 →
+                 ∀a0,a2. TC … R2 a0 a2 → ∀a1. R1 a0 a1 →
+                 ∃∃a. TC … R2 a1 a & R1 a2 a.
+#A #R1 #R2 #HR12 #a0 #a2 #H elim H -a2
+[ #a2 #Ha02 #a1 #Ha01
+  elim (HR12 … Ha01 … Ha02) -HR12 -a0 /3 width=3/
+| #a #a2 #_ #Ha2 #IHa0 #a1 #Ha01
+  elim (IHa0 … Ha01) -a0 #a0 #Ha10 #Ha0
+  elim (HR12 … Ha0 … Ha2) -HR12 -a /4 width=3/
+]
+qed.
+
+lemma TC_confluent2: ∀A,R1,R2.
+                     confluent2 A R1 R2 → confluent2 A (TC … R1) (TC … R2).
+#A #R1 #R2 #HR12 #a0 #a1 #H elim H -a1
+[ #a1 #Ha01 #a2 #Ha02
+  elim (TC_strip2 … HR12 … Ha02 … Ha01) -HR12 -a0 /3 width=3/
+| #a #a1 #_ #Ha1 #IHa0 #a2 #Ha02
+  elim (IHa0 … Ha02) -a0 #a0 #Ha0 #Ha20
+  elim (TC_strip2 … HR12 … Ha0 … Ha1) -HR12 -a /4 width=3/
+]
+qed.
+
+lemma TC_strap1: ∀A,R1,R2. transitive2 A R1 R2 →
+                 ∀a1,a0. TC … R1 a1 a0 → ∀a2. R2 a0 a2 →
+                 ∃∃a. R2 a1 a & TC … R1 a a2.
+#A #R1 #R2 #HR12 #a1 #a0 #H elim H -a0
+[ #a0 #Ha10 #a2 #Ha02
+  elim (HR12 … Ha10 … Ha02) -HR12 -a0 /3 width=3/
+| #a #a0 #_ #Ha0 #IHa #a2 #Ha02
+  elim (HR12 … Ha0 … Ha02) -HR12 -a0 #a0 #Ha0 #Ha02
+  elim (IHa … Ha0) -a /4 width=3/
+]
+qed.
+
+lemma TC_strap2: ∀A,R1,R2. transitive2 A R1 R2 →
+                 ∀a0,a2. TC … R2 a0 a2 → ∀a1. R1 a1 a0 →
+                 ∃∃a. TC … R2 a1 a & R1 a a2.
+#A #R1 #R2 #HR12 #a0 #a2 #H elim H -a2
+[ #a2 #Ha02 #a1 #Ha10
+  elim (HR12 … Ha10 … Ha02) -HR12 -a0 /3 width=3/
+| #a #a2 #_ #Ha02 #IHa #a1 #Ha10
+  elim (IHa … Ha10) -a0 #a0 #Ha10 #Ha0
+  elim (HR12 … Ha0 … Ha02) -HR12 -a /4 width=3/
+]
+qed.
+
+lemma TC_transitive2: ∀A,R1,R2.
+                      transitive2 A R1 R2 → transitive2 A (TC … R1) (TC … R2).
+#A #R1 #R2 #HR12 #a1 #a0 #H elim H -a0
+[ #a0 #Ha10 #a2 #Ha02
+  elim (TC_strap2 … HR12 … Ha02 … Ha10) -HR12 -a0 /3 width=3/
+| #a #a0 #_ #Ha0 #IHa #a2 #Ha02
+  elim (TC_strap2 … HR12 … Ha02 … Ha0) -HR12 -a0 #a0 #Ha0 #Ha02
+  elim (IHa … Ha0) -a /4 width=3/
+]
+qed.
+
+definition NF: ∀A. relation A → relation A → predicate A ≝
+   λA,R,S,a1. ∀a2. R a1 a2 → S a2 a1.
+
+inductive SN (A) (R,S:relation A): predicate A ≝
+| SN_intro: ∀a1. (∀a2. R a1 a2 → (S a2 a1 → ⊥) → SN A R S a2) → SN A R S a1
+.
+
+lemma NF_to_SN: ∀A,R,S,a. NF A R S a → SN A R S a.
+#A #R #S #a1 #Ha1
+@SN_intro #a2 #HRa12 #HSa12
+elim (HSa12 ?) -HSa12 /2 width=1/
+qed.
+
+definition NF_sn: ∀A. relation A → relation A → predicate A ≝
+   λA,R,S,a2. ∀a1. R a1 a2 → S a2 a1.
+
+inductive SN_sn (A) (R,S:relation A): predicate A ≝
+| SN_sn_intro: ∀a2. (∀a1. R a1 a2 → (S a2 a1 → ⊥) → SN_sn A R S a1) → SN_sn A R S a2
+.
+
+lemma NF_to_SN_sn: ∀A,R,S,a. NF_sn A R S a → SN_sn A R S a.
+#A #R #S #a2 #Ha2
+@SN_sn_intro #a1 #HRa12 #HSa12
+elim (HSa12 ?) -HSa12 /2 width=1/
+qed.
+
+lemma bi_TC_strip: ∀A,B,R. bi_confluent A B R →
+                   ∀a0,a1,b0,b1. R a0 b0 a1 b1 → ∀a2,b2. bi_TC … R a0 b0 a2 b2 →
+                   ∃∃a,b. bi_TC … R a1 b1 a b & R a2 b2 a b.
+#A #B #R #HR #a0 #a1 #b0 #b1 #H01 #a2 #b2 #H elim H -a2 -b2
+[ #a2 #b2 #H02
+  elim (HR … H01 … H02) -HR -a0 -b0 /3 width=4/
+| #a2 #b2 #a3 #b3 #_ #H23 * #a #b #H1 #H2
+  elim (HR … H23 … H2) -HR -a0 -b0 -a2 -b2 /3 width=4/
+]
+qed.
+
+lemma bi_TC_confluent: ∀A,B,R. bi_confluent A B R →
+                       bi_confluent A B (bi_TC … R).
+#A #B #R #HR #a0 #a1 #b0 #b1 #H elim H -a1 -b1
+[ #a1 #b1 #H01 #a2 #b2 #H02
+  elim (bi_TC_strip … HR … H01 … H02) -a0 -b0 /3 width=4/
+| #a1 #b1 #a3 #b3 #_ #H13 #IH #a2 #b2 #H02
+  elim (IH … H02) -a0 -b0 #a0 #b0 #H10 #H20
+  elim (bi_TC_strip … HR … H13 … H10) -a1 -b1 /3 width=7/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/ground_2/xoa.conf.xml b/matita/matita/contribs/lambdadelta/ground_2/xoa.conf.xml
new file mode 100644 (file)
index 0000000..c6a00c1
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<helm_registry>
+  <section name="matita">
+    <key name="rt_base_dir">$(MATITA_RT_BASE_DIR)</key>
+<!--
+    <key name="system">false</key>
+    <key name="map_unicode_to_tex">false</key>
+    <key name="do_heavy_checks">true</key>
+    <key name="include_path">lib</key>
+-->
+  </section>
+  <section name="xoa">
+    <key name="output_dir">contribs/lambda_delta/ground_2/</key>
+    <key name="objects">xoa</key>
+    <key name="notations">xoa_notation</key>
+    <key name="include">basics/pts.ma</key>
+    <key name="ex">1 2</key>
+    <key name="ex">1 3</key>
+    <key name="ex">2 1</key>
+    <key name="ex">2 2</key>
+    <key name="ex">2 3</key>
+    <key name="ex">3 1</key>
+    <key name="ex">3 2</key>
+    <key name="ex">3 3</key>
+    <key name="ex">3 4</key>
+    <key name="ex">4 1</key>
+    <key name="ex">4 2</key>
+    <key name="ex">4 3</key>
+    <key name="ex">4 4</key>
+    <key name="ex">4 5</key>
+    <key name="ex">5 2</key>
+    <key name="ex">5 3</key>
+    <key name="ex">5 4</key>
+    <key name="ex">5 5</key>
+    <key name="ex">6 4</key>
+    <key name="ex">6 5</key>
+    <key name="ex">6 6</key>
+    <key name="ex">6 7</key>
+    <key name="ex">7 7</key>
+    <key name="or">3</key>
+    <key name="or">4</key>
+    <key name="and">3</key>
+    <key name="and">4</key>
+  </section>
+</helm_registry>
diff --git a/matita/matita/contribs/lambdadelta/ground_2/xoa.ma b/matita/matita/contribs/lambdadelta/ground_2/xoa.ma
new file mode 100644 (file)
index 0000000..ac4c8f9
--- /dev/null
@@ -0,0 +1,239 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+(* multiple existental quantifier (1, 2) *)
+
+inductive ex1_2 (A0,A1:Type[0]) (P0:A0→A1→Prop) : Prop ≝
+   | ex1_2_intro: ∀x0,x1. P0 x0 x1 → ex1_2 ? ? ?
+.
+
+interpretation "multiple existental quantifier (1, 2)" 'Ex P0 = (ex1_2 ? ? P0).
+
+(* multiple existental quantifier (1, 3) *)
+
+inductive ex1_3 (A0,A1,A2:Type[0]) (P0:A0→A1→A2→Prop) : Prop ≝
+   | ex1_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → ex1_3 ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (1, 3)" 'Ex P0 = (ex1_3 ? ? ? P0).
+
+(* multiple existental quantifier (2, 1) *)
+
+inductive ex2_1 (A0:Type[0]) (P0,P1:A0→Prop) : Prop ≝
+   | ex2_1_intro: ∀x0. P0 x0 → P1 x0 → ex2_1 ? ? ?
+.
+
+interpretation "multiple existental quantifier (2, 1)" 'Ex P0 P1 = (ex2_1 ? P0 P1).
+
+(* multiple existental quantifier (2, 2) *)
+
+inductive ex2_2 (A0,A1:Type[0]) (P0,P1:A0→A1→Prop) : Prop ≝
+   | ex2_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → ex2_2 ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (2, 2)" 'Ex P0 P1 = (ex2_2 ? ? P0 P1).
+
+(* multiple existental quantifier (2, 3) *)
+
+inductive ex2_3 (A0,A1,A2:Type[0]) (P0,P1:A0→A1→A2→Prop) : Prop ≝
+   | ex2_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → ex2_3 ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (2, 3)" 'Ex P0 P1 = (ex2_3 ? ? ? P0 P1).
+
+(* multiple existental quantifier (3, 1) *)
+
+inductive ex3_1 (A0:Type[0]) (P0,P1,P2:A0→Prop) : Prop ≝
+   | ex3_1_intro: ∀x0. P0 x0 → P1 x0 → P2 x0 → ex3_1 ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (3, 1)" 'Ex P0 P1 P2 = (ex3_1 ? P0 P1 P2).
+
+(* multiple existental quantifier (3, 2) *)
+
+inductive ex3_2 (A0,A1:Type[0]) (P0,P1,P2:A0→A1→Prop) : Prop ≝
+   | ex3_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → P2 x0 x1 → ex3_2 ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (3, 2)" 'Ex P0 P1 P2 = (ex3_2 ? ? P0 P1 P2).
+
+(* multiple existental quantifier (3, 3) *)
+
+inductive ex3_3 (A0,A1,A2:Type[0]) (P0,P1,P2:A0→A1→A2→Prop) : Prop ≝
+   | ex3_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → ex3_3 ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (3, 3)" 'Ex P0 P1 P2 = (ex3_3 ? ? ? P0 P1 P2).
+
+(* multiple existental quantifier (3, 4) *)
+
+inductive ex3_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2:A0→A1→A2→A3→Prop) : Prop ≝
+   | ex3_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → ex3_4 ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (3, 4)" 'Ex P0 P1 P2 = (ex3_4 ? ? ? ? P0 P1 P2).
+
+(* multiple existental quantifier (4, 1) *)
+
+inductive ex4_1 (A0:Type[0]) (P0,P1,P2,P3:A0→Prop) : Prop ≝
+   | ex4_1_intro: ∀x0. P0 x0 → P1 x0 → P2 x0 → P3 x0 → ex4_1 ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (4, 1)" 'Ex P0 P1 P2 P3 = (ex4_1 ? P0 P1 P2 P3).
+
+(* multiple existental quantifier (4, 2) *)
+
+inductive ex4_2 (A0,A1:Type[0]) (P0,P1,P2,P3:A0→A1→Prop) : Prop ≝
+   | ex4_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → P2 x0 x1 → P3 x0 x1 → ex4_2 ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (4, 2)" 'Ex P0 P1 P2 P3 = (ex4_2 ? ? P0 P1 P2 P3).
+
+(* multiple existental quantifier (4, 3) *)
+
+inductive ex4_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3:A0→A1→A2→Prop) : Prop ≝
+   | ex4_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → ex4_3 ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (4, 3)" 'Ex P0 P1 P2 P3 = (ex4_3 ? ? ? P0 P1 P2 P3).
+
+(* multiple existental quantifier (4, 4) *)
+
+inductive ex4_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3:A0→A1→A2→A3→Prop) : Prop ≝
+   | ex4_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → ex4_4 ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (4, 4)" 'Ex P0 P1 P2 P3 = (ex4_4 ? ? ? ? P0 P1 P2 P3).
+
+(* multiple existental quantifier (4, 5) *)
+
+inductive ex4_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3:A0→A1→A2→A3→A4→Prop) : Prop ≝
+   | ex4_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → ex4_5 ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (4, 5)" 'Ex P0 P1 P2 P3 = (ex4_5 ? ? ? ? ? P0 P1 P2 P3).
+
+(* multiple existental quantifier (5, 2) *)
+
+inductive ex5_2 (A0,A1:Type[0]) (P0,P1,P2,P3,P4:A0→A1→Prop) : Prop ≝
+   | ex5_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → P2 x0 x1 → P3 x0 x1 → P4 x0 x1 → ex5_2 ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (5, 2)" 'Ex P0 P1 P2 P3 P4 = (ex5_2 ? ? P0 P1 P2 P3 P4).
+
+(* multiple existental quantifier (5, 3) *)
+
+inductive ex5_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→Prop) : Prop ≝
+   | ex5_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → P4 x0 x1 x2 → ex5_3 ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (5, 3)" 'Ex P0 P1 P2 P3 P4 = (ex5_3 ? ? ? P0 P1 P2 P3 P4).
+
+(* multiple existental quantifier (5, 4) *)
+
+inductive ex5_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→A3→Prop) : Prop ≝
+   | ex5_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → P4 x0 x1 x2 x3 → ex5_4 ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (5, 4)" 'Ex P0 P1 P2 P3 P4 = (ex5_4 ? ? ? ? P0 P1 P2 P3 P4).
+
+(* multiple existental quantifier (5, 5) *)
+
+inductive ex5_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→A3→A4→Prop) : Prop ≝
+   | ex5_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → P4 x0 x1 x2 x3 x4 → ex5_5 ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (5, 5)" 'Ex P0 P1 P2 P3 P4 = (ex5_5 ? ? ? ? ? P0 P1 P2 P3 P4).
+
+(* multiple existental quantifier (6, 4) *)
+
+inductive ex6_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→Prop) : Prop ≝
+   | ex6_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → P4 x0 x1 x2 x3 → P5 x0 x1 x2 x3 → ex6_4 ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (6, 4)" 'Ex P0 P1 P2 P3 P4 P5 = (ex6_4 ? ? ? ? P0 P1 P2 P3 P4 P5).
+
+(* multiple existental quantifier (6, 5) *)
+
+inductive ex6_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→Prop) : Prop ≝
+   | ex6_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → P4 x0 x1 x2 x3 x4 → P5 x0 x1 x2 x3 x4 → ex6_5 ? ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (6, 5)" 'Ex P0 P1 P2 P3 P4 P5 = (ex6_5 ? ? ? ? ? P0 P1 P2 P3 P4 P5).
+
+(* multiple existental quantifier (6, 6) *)
+
+inductive ex6_6 (A0,A1,A2,A3,A4,A5:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→A5→Prop) : Prop ≝
+   | ex6_6_intro: ∀x0,x1,x2,x3,x4,x5. P0 x0 x1 x2 x3 x4 x5 → P1 x0 x1 x2 x3 x4 x5 → P2 x0 x1 x2 x3 x4 x5 → P3 x0 x1 x2 x3 x4 x5 → P4 x0 x1 x2 x3 x4 x5 → P5 x0 x1 x2 x3 x4 x5 → ex6_6 ? ? ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (6, 6)" 'Ex P0 P1 P2 P3 P4 P5 = (ex6_6 ? ? ? ? ? ? P0 P1 P2 P3 P4 P5).
+
+(* multiple existental quantifier (6, 7) *)
+
+inductive ex6_7 (A0,A1,A2,A3,A4,A5,A6:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→A5→A6→Prop) : Prop ≝
+   | ex6_7_intro: ∀x0,x1,x2,x3,x4,x5,x6. P0 x0 x1 x2 x3 x4 x5 x6 → P1 x0 x1 x2 x3 x4 x5 x6 → P2 x0 x1 x2 x3 x4 x5 x6 → P3 x0 x1 x2 x3 x4 x5 x6 → P4 x0 x1 x2 x3 x4 x5 x6 → P5 x0 x1 x2 x3 x4 x5 x6 → ex6_7 ? ? ? ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (6, 7)" 'Ex P0 P1 P2 P3 P4 P5 = (ex6_7 ? ? ? ? ? ? ? P0 P1 P2 P3 P4 P5).
+
+(* multiple existental quantifier (7, 7) *)
+
+inductive ex7_7 (A0,A1,A2,A3,A4,A5,A6:Type[0]) (P0,P1,P2,P3,P4,P5,P6:A0→A1→A2→A3→A4→A5→A6→Prop) : Prop ≝
+   | ex7_7_intro: ∀x0,x1,x2,x3,x4,x5,x6. P0 x0 x1 x2 x3 x4 x5 x6 → P1 x0 x1 x2 x3 x4 x5 x6 → P2 x0 x1 x2 x3 x4 x5 x6 → P3 x0 x1 x2 x3 x4 x5 x6 → P4 x0 x1 x2 x3 x4 x5 x6 → P5 x0 x1 x2 x3 x4 x5 x6 → P6 x0 x1 x2 x3 x4 x5 x6 → ex7_7 ? ? ? ? ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (7, 7)" 'Ex P0 P1 P2 P3 P4 P5 P6 = (ex7_7 ? ? ? ? ? ? ? P0 P1 P2 P3 P4 P5 P6).
+
+(* multiple disjunction connective (3) *)
+
+inductive or3 (P0,P1,P2:Prop) : Prop ≝
+   | or3_intro0: P0 → or3 ? ? ?
+   | or3_intro1: P1 → or3 ? ? ?
+   | or3_intro2: P2 → or3 ? ? ?
+.
+
+interpretation "multiple disjunction connective (3)" 'Or P0 P1 P2 = (or3 P0 P1 P2).
+
+(* multiple disjunction connective (4) *)
+
+inductive or4 (P0,P1,P2,P3:Prop) : Prop ≝
+   | or4_intro0: P0 → or4 ? ? ? ?
+   | or4_intro1: P1 → or4 ? ? ? ?
+   | or4_intro2: P2 → or4 ? ? ? ?
+   | or4_intro3: P3 → or4 ? ? ? ?
+.
+
+interpretation "multiple disjunction connective (4)" 'Or P0 P1 P2 P3 = (or4 P0 P1 P2 P3).
+
+(* multiple conjunction connective (3) *)
+
+inductive and3 (P0,P1,P2:Prop) : Prop ≝
+   | and3_intro: P0 → P1 → P2 → and3 ? ? ?
+.
+
+interpretation "multiple conjunction connective (3)" 'And P0 P1 P2 = (and3 P0 P1 P2).
+
+(* multiple conjunction connective (4) *)
+
+inductive and4 (P0,P1,P2,P3:Prop) : Prop ≝
+   | and4_intro: P0 → P1 → P2 → P3 → and4 ? ? ? ?
+.
+
+interpretation "multiple conjunction connective (4)" 'And P0 P1 P2 P3 = (and4 P0 P1 P2 P3).
+
diff --git a/matita/matita/contribs/lambdadelta/ground_2/xoa_notation.ma b/matita/matita/contribs/lambdadelta/ground_2/xoa_notation.ma
new file mode 100644 (file)
index 0000000..6f614f2
--- /dev/null
@@ -0,0 +1,270 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (1, 2) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.λ${ident x1}.$P0) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) }.
+
+(* multiple existental quantifier (1, 3) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) }.
+
+(* multiple existental quantifier (2, 1) *)
+
+notation > "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.$P0) (λ${ident x0}.$P1) }.
+
+notation < "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.$P0) (λ${ident x0}:$T0.$P1) }.
+
+(* multiple existental quantifier (2, 2) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) }.
+
+(* multiple existental quantifier (2, 3) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) }.
+
+(* multiple existental quantifier (3, 1) *)
+
+notation > "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.$P0) (λ${ident x0}.$P1) (λ${ident x0}.$P2) }.
+
+notation < "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.$P0) (λ${ident x0}:$T0.$P1) (λ${ident x0}:$T0.$P2) }.
+
+(* multiple existental quantifier (3, 2) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) (λ${ident x0}.λ${ident x1}.$P2) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P2) }.
+
+(* multiple existental quantifier (3, 3) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) }.
+
+(* multiple existental quantifier (3, 4) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) }.
+
+(* multiple existental quantifier (4, 1) *)
+
+notation > "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.$P0) (λ${ident x0}.$P1) (λ${ident x0}.$P2) (λ${ident x0}.$P3) }.
+
+notation < "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.$P0) (λ${ident x0}:$T0.$P1) (λ${ident x0}:$T0.$P2) (λ${ident x0}:$T0.$P3) }.
+
+(* multiple existental quantifier (4, 2) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) (λ${ident x0}.λ${ident x1}.$P2) (λ${ident x0}.λ${ident x1}.$P3) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P3) }.
+
+(* multiple existental quantifier (4, 3) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) }.
+
+(* multiple existental quantifier (4, 4) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) }.
+
+(* multiple existental quantifier (4, 5) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) }.
+
+(* multiple existental quantifier (5, 2) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) (λ${ident x0}.λ${ident x1}.$P2) (λ${ident x0}.λ${ident x1}.$P3) (λ${ident x0}.λ${ident x1}.$P4) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P4) }.
+
+(* multiple existental quantifier (5, 3) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P4) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P4) }.
+
+(* multiple existental quantifier (5, 4) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P4) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P4) }.
+
+(* multiple existental quantifier (5, 5) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P4) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P4) }.
+
+(* multiple existental quantifier (6, 4) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P5) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P5) }.
+
+(* multiple existental quantifier (6, 5) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P5) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P5) }.
+
+(* multiple existental quantifier (6, 6) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P5) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P5) }.
+
+(* multiple existental quantifier (6, 7) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P5) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P5) }.
+
+(* multiple existental quantifier (7, 7) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P6) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P6) }.
+
+(* multiple disjunction connective (3) *)
+
+notation "hvbox(∨∨ term 29 P0 break | term 29 P1 break | term 29 P2)"
+ non associative with precedence 30
+ for @{ 'Or $P0 $P1 $P2 }.
+
+(* multiple disjunction connective (4) *)
+
+notation "hvbox(∨∨ term 29 P0 break | term 29 P1 break | term 29 P2 break | term 29 P3)"
+ non associative with precedence 30
+ for @{ 'Or $P0 $P1 $P2 $P3 }.
+
+(* multiple conjunction connective (3) *)
+
+notation "hvbox(∧∧ term 34 P0 break & term 34 P1 break & term 34 P2)"
+ non associative with precedence 35
+ for @{ 'And $P0 $P1 $P2 }.
+
+(* multiple conjunction connective (4) *)
+
+notation "hvbox(∧∧ term 34 P0 break & term 34 P1 break & term 34 P2 break & term 34 P3)"
+ non associative with precedence 35
+ for @{ 'And $P0 $P1 $P2 $P3 }.
+
diff --git a/matita/matita/contribs/lambdadelta/ground_2/xoa_props.ma b/matita/matita/contribs/lambdadelta/ground_2/xoa_props.ma
new file mode 100644 (file)
index 0000000..71216d1
--- /dev/null
@@ -0,0 +1,25 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basics/logic.ma".
+include "ground_2/xoa_notation.ma".
+include "ground_2/xoa.ma".
+
+interpretation "logical false" 'false = False.
+
+interpretation "logical true" 'true = True.
+
+lemma ex2_1_comm: ∀A0. ∀P0,P1:A0→Prop. (∃∃x0. P0 x0 & P1 x0) → ∃∃x0. P1 x0 & P0 x0.
+#A0 #P0 #P1 * /2 width=3/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/ma2etc.sh b/matita/matita/contribs/lambdadelta/ma2etc.sh
new file mode 100644 (file)
index 0000000..e546af7
--- /dev/null
@@ -0,0 +1 @@
+for FILE in `find $1 -name "*.ma"`; do svn mv $FILE ${FILE/%.ma/.etc} ; done
diff --git a/matita/matita/contribs/lambdadelta/orig.sh b/matita/matita/contribs/lambdadelta/orig.sh
new file mode 100644 (file)
index 0000000..83b1fa1
--- /dev/null
@@ -0,0 +1,4 @@
+F=`find $1 -name "*.ma" -or -name "*.txt"` 
+while read A A A; do
+   if grep -q "$A" $F; then true; else echo $A; fi
+done
diff --git a/matita/matita/contribs/lambdadelta/replace.sh b/matita/matita/contribs/lambdadelta/replace.sh
new file mode 100644 (file)
index 0000000..5e281b2
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+for MA in `find -name "*.ma"`; do
+   echo ${MA}; sed "s!$1!$2!g" ${MA} > ${MA}.new
+   if diff ${MA} ${MA}.new > /dev/null; 
+      then rm -f ${MA}.new; 
+      else mv -f ${MA} ${MA}.old; mv -f ${MA}.new ${MA};
+   fi
+done
+
+unset MA
diff --git a/matita/matita/contribs/lambdadelta/root b/matita/matita/contribs/lambdadelta/root
new file mode 100644 (file)
index 0000000..c41bf73
--- /dev/null
@@ -0,0 +1 @@
+baseuri=cic:/matita/lambda_delta/
index 5b430d7c651fd8521feedf30f8cf8531f0e3677e..e80380217218b13d13dc41a247c8bf503cb4bff8 100644 (file)
@@ -505,6 +505,19 @@ lemma f_ind: ∀A. ∀f:A→ℕ. ∀P:predicate A.
              (∀n. (∀a. f a < n → P a) → ∀a. f a = n → P a) → ∀a. P a.
 #A #f #P #H #a
 @(f_ind_aux … H) -H [2: // | skip ]
+qed-.
+
+fact f2_ind_aux: ∀A1,A2. ∀f:A1→A2→ℕ. ∀P:relation2 A1 A2.
+                 (∀n. (∀a1,a2. f a1 a2 < n → P a1 a2) → ∀a1,a2. f a1 a2 = n → P a1 a2) →
+                 ∀n,a1,a2. f a1 a2 = n → P a1 a2.
+#A1 #A2 #f #P #H #n @(nat_elim1 … n) -n #n /3 width=3/ (**) (* auto slow (34s) without #n *)
+qed-.
+
+lemma f2_ind: ∀A1,A2. ∀f:A1→A2→ℕ. ∀P:relation2 A1 A2.
+              (∀n. (∀a1,a2. f a1 a2 < n → P a1 a2) → ∀a1,a2. f a1 a2 = n → P a1 a2) →
+              ∀a1,a2. P a1 a2.
+#A1 #A2 #f #P #H #a1 #a2
+@(f2_ind_aux … H) -H [2: // | skip ]
 qed-. 
 
 (* More negated equalities **************************************************)