From d2545ffd201b1aa49887313791386add78fa8603 Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Fri, 17 Jan 2020 14:50:17 +0100 Subject: [PATCH] update in lambdadelta MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit + sources for λδ-2A added (with a correction) + sources for λδ-1A moved + λδ-related binaries moved here from web site directory --- .gitignore | 5 +- helm/www/lambdadelta/Makefile | 4 +- .../{basic_1 => basic_1A}/A/defs.ma | 2 +- .../{basic_1 => basic_1A}/A/fwd.ma | 2 +- .../{basic_1 => basic_1A}/C/defs.ma | 2 +- .../{basic_1 => basic_1A}/C/fwd.ma | 2 +- .../{basic_1 => basic_1A}/C/props.ma | 4 +- .../{basic_1 => basic_1A}/G/defs.ma | 2 +- .../{basic_1 => basic_1A}/T/dec.ma | 2 +- .../{basic_1 => basic_1A}/T/defs.ma | 2 +- .../{basic_1 => basic_1A}/T/fwd.ma | 2 +- .../{basic_1 => basic_1A}/T/props.ma | 2 +- .../{basic_1 => basic_1A}/aplus/defs.ma | 2 +- .../{basic_1 => basic_1A}/aplus/props.ma | 6 +- .../{basic_1 => basic_1A}/app/defs.ma | 2 +- .../{basic_1 => basic_1A}/aprem/defs.ma | 2 +- .../{basic_1 => basic_1A}/aprem/fwd.ma | 2 +- .../{basic_1 => basic_1A}/aprem/props.ma | 4 +- .../{basic_1 => basic_1A}/arity/aprem.ma | 6 +- .../{basic_1 => basic_1A}/arity/cimp.ma | 4 +- .../{basic_1 => basic_1A}/arity/defs.ma | 4 +- .../{basic_1 => basic_1A}/arity/fwd.ma | 6 +- .../{basic_1 => basic_1A}/arity/lift1.ma | 4 +- .../{basic_1 => basic_1A}/arity/pr3.ma | 12 +- .../{basic_1 => basic_1A}/arity/props.ma | 2 +- .../{basic_1 => basic_1A}/arity/subst0.ma | 12 +- .../{basic_1 => basic_1A}/asucc/defs.ma | 4 +- .../{basic_1 => basic_1A}/asucc/fwd.ma | 4 +- .../{basic_1 => basic_1A}/cimp/defs.ma | 2 +- .../{basic_1 => basic_1A}/cimp/props.ma | 4 +- .../{basic_1 => basic_1A}/clear/defs.ma | 2 +- .../{basic_1 => basic_1A}/clear/drop.ma | 4 +- .../{basic_1 => basic_1A}/clear/fwd.ma | 4 +- .../{basic_1 => basic_1A}/clear/props.ma | 2 +- .../{basic_1 => basic_1A}/clen/defs.ma | 4 +- .../{basic_1 => basic_1A}/clen/getl.ma | 4 +- .../{basic_1 => basic_1A}/cnt/defs.ma | 2 +- .../{basic_1 => basic_1A}/cnt/fwd.ma | 2 +- .../{basic_1 => basic_1A}/cnt/props.ma | 4 +- .../{basic_1 => basic_1A}/csuba/arity.ma | 8 +- .../{basic_1 => basic_1A}/csuba/clear.ma | 4 +- .../{basic_1 => basic_1A}/csuba/defs.ma | 2 +- .../{basic_1 => basic_1A}/csuba/drop.ma | 4 +- .../{basic_1 => basic_1A}/csuba/fwd.ma | 2 +- .../{basic_1 => basic_1A}/csuba/getl.ma | 6 +- .../{basic_1 => basic_1A}/csuba/props.ma | 4 +- .../{basic_1 => basic_1A}/csubc/arity.ma | 2 +- .../{basic_1 => basic_1A}/csubc/clear.ma | 4 +- .../{basic_1 => basic_1A}/csubc/csuba.ma | 4 +- .../{basic_1 => basic_1A}/csubc/defs.ma | 2 +- .../{basic_1 => basic_1A}/csubc/drop.ma | 4 +- .../{basic_1 => basic_1A}/csubc/drop1.ma | 2 +- .../{basic_1 => basic_1A}/csubc/fwd.ma | 2 +- .../{basic_1 => basic_1A}/csubc/getl.ma | 4 +- .../{basic_1 => basic_1A}/csubc/props.ma | 4 +- .../{basic_1 => basic_1A}/csubst0/clear.ma | 6 +- .../{basic_1 => basic_1A}/csubst0/defs.ma | 4 +- .../{basic_1 => basic_1A}/csubst0/drop.ma | 4 +- .../{basic_1 => basic_1A}/csubst0/fwd.ma | 4 +- .../{basic_1 => basic_1A}/csubst0/getl.ma | 6 +- .../{basic_1 => basic_1A}/csubst0/props.ma | 2 +- .../{basic_1 => basic_1A}/csubst1/defs.ma | 2 +- .../{basic_1 => basic_1A}/csubst1/fwd.ma | 8 +- .../{basic_1 => basic_1A}/csubst1/getl.ma | 8 +- .../{basic_1 => basic_1A}/csubst1/props.ma | 4 +- .../{basic_1 => basic_1A}/csubt/clear.ma | 4 +- .../{basic_1 => basic_1A}/csubt/csuba.ma | 2 +- .../{basic_1 => basic_1A}/csubt/defs.ma | 2 +- .../{basic_1 => basic_1A}/csubt/drop.ma | 4 +- .../{basic_1 => basic_1A}/csubt/fwd.ma | 2 +- .../{basic_1 => basic_1A}/csubt/getl.ma | 6 +- .../{basic_1 => basic_1A}/csubt/pc3.ma | 4 +- .../{basic_1 => basic_1A}/csubt/props.ma | 4 +- .../{basic_1 => basic_1A}/csubt/ty3.ma | 6 +- .../{basic_1 => basic_1A}/csubv/clear.ma | 4 +- .../{basic_1 => basic_1A}/csubv/defs.ma | 2 +- .../{basic_1 => basic_1A}/csubv/drop.ma | 6 +- .../{basic_1 => basic_1A}/csubv/fwd.ma | 2 +- .../{basic_1 => basic_1A}/csubv/getl.ma | 6 +- .../{basic_1 => basic_1A}/csubv/props.ma | 6 +- .../{basic_1 => basic_1A}/definitions.ma | 52 +- .../{basic_1 => basic_1A}/drop/defs.ma | 6 +- .../{basic_1 => basic_1A}/drop/fwd.ma | 8 +- .../{basic_1 => basic_1A}/drop/props.ma | 2 +- .../{basic_1 => basic_1A}/drop1/defs.ma | 4 +- .../{basic_1 => basic_1A}/drop1/fwd.ma | 2 +- .../{basic_1 => basic_1A}/drop1/getl.ma | 4 +- .../{basic_1 => basic_1A}/drop1/props.ma | 6 +- .../{basic_1 => basic_1A}/etc/performance.txt | 0 .../{basic_1 => basic_1A}/etc/planes.txt | 0 .../{basic_1 => basic_1A}/ex0/defs.ma | 4 +- .../{basic_1 => basic_1A}/ex0/fwd.ma | 2 +- .../{basic_1 => basic_1A}/ex0/props.ma | 6 +- .../{basic_1 => basic_1A}/ex1/defs.ma | 2 +- .../{basic_1 => basic_1A}/ex1/props.ma | 14 +- .../{basic_1 => basic_1A}/ex2/defs.ma | 2 +- .../{basic_1 => basic_1A}/ex2/props.ma | 8 +- .../{basic_1 => basic_1A}/flt/defs.ma | 2 +- .../{basic_1 => basic_1A}/flt/fwd.ma | 2 +- .../{basic_1 => basic_1A}/flt/props.ma | 4 +- .../{basic_1 => basic_1A}/fsubst0/defs.ma | 2 +- .../{basic_1 => basic_1A}/fsubst0/fwd.ma | 2 +- .../{basic_1 => basic_1A}/getl/clear.ma | 4 +- .../{basic_1 => basic_1A}/getl/dec.ma | 2 +- .../{basic_1 => basic_1A}/getl/defs.ma | 4 +- .../{basic_1 => basic_1A}/getl/drop.ma | 4 +- .../{basic_1 => basic_1A}/getl/flt.ma | 4 +- .../{basic_1 => basic_1A}/getl/fwd.ma | 6 +- .../{basic_1 => basic_1A}/getl/getl.ma | 4 +- .../{basic_1 => basic_1A}/getl/props.ma | 6 +- .../{basic_1 => basic_1A}/iso/defs.ma | 2 +- .../{basic_1 => basic_1A}/iso/fwd.ma | 4 +- .../{basic_1 => basic_1A}/iso/props.ma | 4 +- .../{basic_1 => basic_1A}/leq/asucc.ma | 2 +- .../{basic_1 => basic_1A}/leq/defs.ma | 2 +- .../{basic_1 => basic_1A}/leq/fwd.ma | 2 +- .../{basic_1 => basic_1A}/leq/props.ma | 4 +- .../{basic_1 => basic_1A}/lift/defs.ma | 4 +- .../{basic_1 => basic_1A}/lift/fwd.ma | 2 +- .../{basic_1 => basic_1A}/lift/props.ma | 6 +- .../{basic_1 => basic_1A}/lift/tlt.ma | 4 +- .../{basic_1 => basic_1A}/lift1/defs.ma | 2 +- .../{basic_1 => basic_1A}/lift1/drop1.ma | 4 +- .../{basic_1 => basic_1A}/lift1/props.ma | 4 +- .../{basic_1 => basic_1A}/llt/defs.ma | 2 +- .../{basic_1 => basic_1A}/llt/fwd.ma | 2 +- .../{basic_1 => basic_1A}/llt/props.ma | 4 +- .../{basic_1 => basic_1A}/next_plus/defs.ma | 2 +- .../{basic_1 => basic_1A}/next_plus/props.ma | 2 +- .../{basic_1 => basic_1A}/nf2/arity.ma | 4 +- .../{basic_1 => basic_1A}/nf2/dec.ma | 8 +- .../{basic_1 => basic_1A}/nf2/defs.ma | 2 +- .../{basic_1 => basic_1A}/nf2/fwd.ma | 8 +- .../{basic_1 => basic_1A}/nf2/iso.ma | 4 +- .../{basic_1 => basic_1A}/nf2/lift1.ma | 4 +- .../{basic_1 => basic_1A}/nf2/pr3.ma | 4 +- .../{basic_1 => basic_1A}/nf2/props.ma | 4 +- .../{basic_1 => basic_1A}/pc1/defs.ma | 2 +- .../{basic_1 => basic_1A}/pc1/props.ma | 4 +- .../{basic_1 => basic_1A}/pc3/dec.ma | 4 +- .../{basic_1 => basic_1A}/pc3/defs.ma | 2 +- .../{basic_1 => basic_1A}/pc3/fsubst0.ma | 6 +- .../{basic_1 => basic_1A}/pc3/fwd.ma | 2 +- .../{basic_1 => basic_1A}/pc3/left.ma | 2 +- .../{basic_1 => basic_1A}/pc3/nf2.ma | 4 +- .../{basic_1 => basic_1A}/pc3/pc1.ma | 6 +- .../{basic_1 => basic_1A}/pc3/props.ma | 4 +- .../{basic_1 => basic_1A}/pc3/subst1.ma | 4 +- .../{basic_1 => basic_1A}/pc3/wcpr0.ma | 4 +- .../{basic_1 => basic_1A}/pr0/dec.ma | 8 +- .../{basic_1 => basic_1A}/pr0/defs.ma | 2 +- .../{basic_1 => basic_1A}/pr0/fwd.ma | 4 +- .../{basic_1 => basic_1A}/pr0/pr0.ma | 6 +- .../{basic_1 => basic_1A}/pr0/props.ma | 4 +- .../{basic_1 => basic_1A}/pr0/subst0.ma | 4 +- .../{basic_1 => basic_1A}/pr0/subst1.ma | 4 +- .../{basic_1 => basic_1A}/pr1/defs.ma | 2 +- .../{basic_1 => basic_1A}/pr1/fwd.ma | 2 +- .../{basic_1 => basic_1A}/pr1/pr1.ma | 4 +- .../{basic_1 => basic_1A}/pr1/props.ma | 8 +- .../{basic_1 => basic_1A}/pr2/clen.ma | 4 +- .../{basic_1 => basic_1A}/pr2/defs.ma | 4 +- .../{basic_1 => basic_1A}/pr2/fwd.ma | 8 +- .../{basic_1 => basic_1A}/pr2/pr2.ma | 6 +- .../{basic_1 => basic_1A}/pr2/props.ma | 4 +- .../{basic_1 => basic_1A}/pr2/subst1.ma | 8 +- .../{basic_1 => basic_1A}/pr3/defs.ma | 2 +- .../{basic_1 => basic_1A}/pr3/fwd.ma | 4 +- .../{basic_1 => basic_1A}/pr3/iso.ma | 6 +- .../{basic_1 => basic_1A}/pr3/pr1.ma | 4 +- .../{basic_1 => basic_1A}/pr3/pr3.ma | 4 +- .../{basic_1 => basic_1A}/pr3/props.ma | 8 +- .../{basic_1 => basic_1A}/pr3/subst1.ma | 4 +- .../{basic_1 => basic_1A}/pr3/wcpr0.ma | 4 +- .../{basic_1 => basic_1A}/preamble.ma | 2 +- .../{basic_1 => basic_1A}/r/defs.ma | 2 +- .../{basic_1 => basic_1A}/r/props.ma | 4 +- .../contribs/lambdadelta/basic_1A/rect.txt | 3 + .../{basic_1 => basic_1A}/s/defs.ma | 2 +- .../{basic_1 => basic_1A}/s/fwd.ma | 2 +- .../{basic_1 => basic_1A}/s/props.ma | 2 +- .../{basic_1 => basic_1A}/sc3/arity.ma | 8 +- .../{basic_1 => basic_1A}/sc3/defs.ma | 6 +- .../{basic_1 => basic_1A}/sc3/props.ma | 22 +- .../{basic_1 => basic_1A}/sn3/defs.ma | 2 +- .../{basic_1 => basic_1A}/sn3/fwd.ma | 4 +- .../{basic_1 => basic_1A}/sn3/lift1.ma | 6 +- .../{basic_1 => basic_1A}/sn3/nf2.ma | 6 +- .../{basic_1 => basic_1A}/sn3/props.ma | 6 +- .../{basic_1 => basic_1A}/spare.ma | 2 +- .../{basic_1 => basic_1A}/sty0/defs.ma | 4 +- .../{basic_1 => basic_1A}/sty0/fwd.ma | 2 +- .../{basic_1 => basic_1A}/sty0/props.ma | 4 +- .../{basic_1 => basic_1A}/sty1/cnt.ma | 4 +- .../{basic_1 => basic_1A}/sty1/defs.ma | 2 +- .../{basic_1 => basic_1A}/sty1/fwd.ma | 2 +- .../{basic_1 => basic_1A}/sty1/props.ma | 4 +- .../{basic_1 => basic_1A}/subst/defs.ma | 2 +- .../{basic_1 => basic_1A}/subst/props.ma | 4 +- .../{basic_1 => basic_1A}/subst0/dec.ma | 4 +- .../{basic_1 => basic_1A}/subst0/defs.ma | 2 +- .../{basic_1 => basic_1A}/subst0/fwd.ma | 4 +- .../{basic_1 => basic_1A}/subst0/props.ma | 2 +- .../{basic_1 => basic_1A}/subst0/subst0.ma | 4 +- .../{basic_1 => basic_1A}/subst0/tlt.ma | 4 +- .../{basic_1 => basic_1A}/subst1/defs.ma | 2 +- .../{basic_1 => basic_1A}/subst1/fwd.ma | 4 +- .../{basic_1 => basic_1A}/subst1/props.ma | 4 +- .../{basic_1 => basic_1A}/subst1/subst1.ma | 4 +- .../{basic_1 => basic_1A}/theory.ma | 24 +- .../{basic_1 => basic_1A}/tlist/defs.ma | 2 +- .../{basic_1 => basic_1A}/tlist/fwd.ma | 2 +- .../{basic_1 => basic_1A}/tlist/props.ma | 2 +- .../{basic_1 => basic_1A}/tlt/defs.ma | 2 +- .../{basic_1 => basic_1A}/tlt/fwd.ma | 2 +- .../{basic_1 => basic_1A}/tlt/props.ma | 4 +- .../{basic_1 => basic_1A}/ty3/arity.ma | 6 +- .../{basic_1 => basic_1A}/ty3/arity_props.ma | 4 +- .../{basic_1 => basic_1A}/ty3/dec.ma | 8 +- .../{basic_1 => basic_1A}/ty3/defs.ma | 4 +- .../{basic_1 => basic_1A}/ty3/fsubst0.ma | 6 +- .../{basic_1 => basic_1A}/ty3/fwd.ma | 4 +- .../{basic_1 => basic_1A}/ty3/fwd_nf2.ma | 6 +- .../{basic_1 => basic_1A}/ty3/nf2.ma | 6 +- .../{basic_1 => basic_1A}/ty3/pr3.ma | 12 +- .../{basic_1 => basic_1A}/ty3/pr3_props.ma | 2 +- .../{basic_1 => basic_1A}/ty3/props.ma | 4 +- .../{basic_1 => basic_1A}/ty3/sty0.ma | 4 +- .../{basic_1 => basic_1A}/ty3/subst1.ma | 6 +- .../{basic_1 => basic_1A}/wcpr0/defs.ma | 4 +- .../{basic_1 => basic_1A}/wcpr0/fwd.ma | 2 +- .../{basic_1 => basic_1A}/wcpr0/getl.ma | 4 +- .../{basic_1 => basic_1A}/wf3/clear.ma | 4 +- .../{basic_1 => basic_1A}/wf3/defs.ma | 2 +- .../{basic_1 => basic_1A}/wf3/fwd.ma | 2 +- .../{basic_1 => basic_1A}/wf3/getl.ma | 4 +- .../{basic_1 => basic_1A}/wf3/props.ma | 4 +- .../{basic_1 => basic_1A}/wf3/ty3.ma | 2 +- .../lambdadelta/basic_2A/computation/cpre.ma | 35 ++ .../basic_2A/computation/cpre_cpre.ma | 28 + .../lambdadelta/basic_2A/computation/cprs.ma | 144 +++++ .../basic_2A/computation/cprs_cprs.ma | 155 ++++++ .../basic_2A/computation/cprs_lift.ma | 60 +++ .../lambdadelta/basic_2A/computation/cpxe.ma | 34 ++ .../lambdadelta/basic_2A/computation/cpxs.ma | 181 +++++++ .../basic_2A/computation/cpxs_aaa.ma | 29 ++ .../basic_2A/computation/cpxs_cpxs.ma | 187 +++++++ .../basic_2A/computation/cpxs_lift.ma | 124 +++++ .../basic_2A/computation/cpxs_lleq.ma | 39 ++ .../basic_2A/computation/cpxs_lreq.ma | 24 + .../basic_2A/computation/cpxs_tsts.ma | 107 ++++ .../basic_2A/computation/cpxs_tsts_vector.ma | 190 +++++++ .../lambdadelta/basic_2A/computation/csx.ma | 133 +++++ .../basic_2A/computation/csx_aaa.ma | 58 +++ .../basic_2A/computation/csx_alt.ma | 107 ++++ .../basic_2A/computation/csx_fpbs.ma | 33 ++ .../basic_2A/computation/csx_lift.ma | 119 +++++ .../basic_2A/computation/csx_lleq.ma | 30 ++ .../basic_2A/computation/csx_lpx.ma | 138 +++++ .../basic_2A/computation/csx_lpxs.ma | 25 + .../basic_2A/computation/csx_tsts_vector.ma | 128 +++++ .../basic_2A/computation/csx_vector.ma | 42 ++ .../lambdadelta/basic_2A/computation/fpbg.ma | 39 ++ .../basic_2A/computation/fpbg_fleq.ma | 73 +++ .../basic_2A/computation/fpbg_fpbg.ma | 22 + .../basic_2A/computation/fpbg_fpbs.ma | 68 +++ .../basic_2A/computation/fpbg_lift.ma | 24 + .../lambdadelta/basic_2A/computation/fpbs.ma | 161 ++++++ .../basic_2A/computation/fpbs_aaa.ma | 27 + .../basic_2A/computation/fpbs_alt.ma | 82 +++ .../basic_2A/computation/fpbs_fpb.ma | 41 ++ .../basic_2A/computation/fpbs_fpbs.ma | 22 + .../basic_2A/computation/fpbs_lift.ma | 36 ++ .../lambdadelta/basic_2A/computation/fsb.ma | 47 ++ .../basic_2A/computation/fsb_aaa.ma | 71 +++ .../basic_2A/computation/fsb_alt.ma | 82 +++ .../basic_2A/computation/fsb_csx.ma | 70 +++ .../lambdadelta/basic_2A/computation/gcp.ma | 58 +++ .../basic_2A/computation/gcp_aaa.ma | 93 ++++ .../basic_2A/computation/gcp_cr.ma | 169 ++++++ .../lambdadelta/basic_2A/computation/lcosx.ma | 77 +++ .../basic_2A/computation/lcosx_cpx.ma | 67 +++ .../lambdadelta/basic_2A/computation/lprs.ma | 71 +++ .../basic_2A/computation/lprs_cprs.ma | 142 +++++ .../basic_2A/computation/lprs_drop.ma | 29 ++ .../basic_2A/computation/lprs_lprs.ma | 31 ++ .../lambdadelta/basic_2A/computation/lpxs.ma | 74 +++ .../basic_2A/computation/lpxs_aaa.ma | 30 ++ .../basic_2A/computation/lpxs_cpxs.ma | 161 ++++++ .../basic_2A/computation/lpxs_drop.ma | 29 ++ .../basic_2A/computation/lpxs_lleq.ma | 141 +++++ .../basic_2A/computation/lpxs_lpxs.ma | 22 + .../lambdadelta/basic_2A/computation/lsubc.ma | 114 ++++ .../basic_2A/computation/lsubc_drop.ma | 70 +++ .../basic_2A/computation/lsubc_drops.ma | 31 ++ .../basic_2A/computation/lsubc_lsuba.ma | 26 + .../lambdadelta/basic_2A/computation/lsx.ma | 109 ++++ .../basic_2A/computation/lsx_alt.ma | 115 ++++ .../basic_2A/computation/lsx_csx.ma | 59 +++ .../basic_2A/computation/lsx_drop.ma | 96 ++++ .../basic_2A/computation/lsx_lpx.ma | 63 +++ .../basic_2A/computation/lsx_lpxs.ma | 62 +++ .../lambdadelta/basic_2A/computation/scpds.ma | 48 ++ .../basic_2A/computation/scpds_aaa.ma | 25 + .../basic_2A/computation/scpds_lift.ma | 36 ++ .../basic_2A/computation/scpds_scpds.ma | 93 ++++ .../lambdadelta/basic_2A/conversion/cpc.ma | 40 ++ .../basic_2A/conversion/cpc_cpc.ma | 23 + .../lambdadelta/basic_2A/dynamic/lsubsv.ma | 161 ++++++ .../basic_2A/dynamic/lsubsv_cpcs.ma | 25 + .../basic_2A/dynamic/lsubsv_lstas.ma | 98 ++++ .../basic_2A/dynamic/lsubsv_lsuba.ma | 32 ++ .../basic_2A/dynamic/lsubsv_lsubd.ma | 24 + .../basic_2A/dynamic/lsubsv_scpds.ma | 32 ++ .../basic_2A/dynamic/lsubsv_snv.ma | 44 ++ .../lambdadelta/basic_2A/dynamic/shnv.ma | 55 ++ .../lambdadelta/basic_2A/dynamic/snv.ma | 111 ++++ .../lambdadelta/basic_2A/dynamic/snv_aaa.ma | 50 ++ .../basic_2A/dynamic/snv_da_lpr.ma | 92 ++++ .../lambdadelta/basic_2A/dynamic/snv_fsb.ma | 24 + .../lambdadelta/basic_2A/dynamic/snv_lift.ma | 117 +++++ .../lambdadelta/basic_2A/dynamic/snv_lpr.ma | 119 +++++ .../lambdadelta/basic_2A/dynamic/snv_lstas.ma | 58 +++ .../basic_2A/dynamic/snv_lstas_lpr.ma | 139 +++++ .../basic_2A/dynamic/snv_preserve.ma | 94 ++++ .../lambdadelta/basic_2A/dynamic/snv_scpes.ma | 198 +++++++ .../lambdadelta/basic_2A/equivalence/cpcs.ma | 96 ++++ .../basic_2A/equivalence/cpcs_aaa.ma | 30 ++ .../basic_2A/equivalence/cpcs_cpcs.ma | 212 ++++++++ .../basic_2A/equivalence/cpcs_cprs.ma | 62 +++ .../lambdadelta/basic_2A/equivalence/scpes.ma | 37 ++ .../basic_2A/equivalence/scpes_aaa.ma | 29 ++ .../basic_2A/equivalence/scpes_cpcs.ma | 39 ++ .../basic_2A/equivalence/scpes_scpes.ma | 69 +++ .../basic_2A/examples/ex_cpr_omega.ma | 43 ++ .../basic_2A/examples/ex_fpbg_refl.ma | 54 ++ .../basic_2A/examples/ex_snv_eta.ma | 61 +++ .../basic_2A/examples/ex_sta_ldec.ma | 23 + .../lambdadelta/basic_2A/grammar/aarity.ma | 73 +++ .../basic_2A/grammar/cl_restricted_weight.ma | 51 ++ .../lambdadelta/basic_2A/grammar/cl_weight.ma | 49 ++ .../lambdadelta/basic_2A/grammar/genv.ma | 41 ++ .../lambdadelta/basic_2A/grammar/item.ma | 88 ++++ .../lambdadelta/basic_2A/grammar/lenv.ma | 68 +++ .../basic_2A/grammar/lenv_append.ma | 131 +++++ .../basic_2A/grammar/lenv_length.ma | 52 ++ .../basic_2A/grammar/lenv_weight.ma | 34 ++ .../lambdadelta/basic_2A/grammar/lreq.ma | 192 +++++++ .../lambdadelta/basic_2A/grammar/lreq_lreq.ma | 49 ++ .../lambdadelta/basic_2A/grammar/term.ma | 153 ++++++ .../basic_2A/grammar/term_simple.ma | 42 ++ .../basic_2A/grammar/term_vector.ma | 34 ++ .../basic_2A/grammar/term_weight.ma | 38 ++ .../lambdadelta/basic_2A/grammar/tsts.ma | 108 ++++ .../lambdadelta/basic_2A/grammar/tsts_tsts.ma | 32 ++ .../basic_2A/grammar/tsts_vector.ma | 31 ++ .../lambdadelta/basic_2A/multiple/cpys.ma | 166 ++++++ .../lambdadelta/basic_2A/multiple/cpys_alt.ma | 102 ++++ .../basic_2A/multiple/cpys_cpys.ma | 117 +++++ .../basic_2A/multiple/cpys_lift.ma | 226 ++++++++ .../lambdadelta/basic_2A/multiple/drops.ma | 122 +++++ .../basic_2A/multiple/drops_drop.ma | 35 ++ .../basic_2A/multiple/drops_drops.ma | 25 + .../lambdadelta/basic_2A/multiple/fleq.ma | 43 ++ .../basic_2A/multiple/fleq_fleq.ma | 34 ++ .../lambdadelta/basic_2A/multiple/fqup.ma | 109 ++++ .../basic_2A/multiple/fqup_fqup.ma | 22 + .../lambdadelta/basic_2A/multiple/fqus.ma | 83 +++ .../lambdadelta/basic_2A/multiple/fqus_alt.ma | 61 +++ .../basic_2A/multiple/fqus_fqus.ma | 22 + .../lambdadelta/basic_2A/multiple/frees.ma | 163 ++++++ .../basic_2A/multiple/frees_append.ma | 52 ++ .../basic_2A/multiple/frees_lift.ma | 160 ++++++ .../basic_2A/multiple/frees_lreq.ma | 32 ++ .../lambdadelta/basic_2A/multiple/lifts.ma | 150 ++++++ .../basic_2A/multiple/lifts_lift.ma | 59 +++ .../basic_2A/multiple/lifts_lift_vector.ma | 35 ++ .../basic_2A/multiple/lifts_lifts.ma | 25 + .../basic_2A/multiple/lifts_vector.ma | 53 ++ .../lambdadelta/basic_2A/multiple/lleq.ma | 160 ++++++ .../lambdadelta/basic_2A/multiple/lleq_alt.ma | 41 ++ .../basic_2A/multiple/lleq_alt_rec.ma | 54 ++ .../basic_2A/multiple/lleq_drop.ma | 150 ++++++ .../basic_2A/multiple/lleq_fqus.ma | 75 +++ .../basic_2A/multiple/lleq_lleq.ma | 39 ++ .../basic_2A/multiple/lleq_llor.ma | 41 ++ .../basic_2A/multiple/lleq_lreq.ma | 36 ++ .../lambdadelta/basic_2A/multiple/llor.ma | 40 ++ .../lambdadelta/basic_2A/multiple/llor_alt.ma | 74 +++ .../basic_2A/multiple/llor_drop.ma | 45 ++ .../lambdadelta/basic_2A/multiple/llpx_sn.ma | 209 ++++++++ .../basic_2A/multiple/llpx_sn_alt.ma | 62 +++ .../basic_2A/multiple/llpx_sn_alt_rec.ma | 250 +++++++++ .../basic_2A/multiple/llpx_sn_drop.ma | 431 +++++++++++++++ .../basic_2A/multiple/llpx_sn_frees.ma | 36 ++ .../basic_2A/multiple/llpx_sn_llor.ma | 34 ++ .../basic_2A/multiple/llpx_sn_lpx_sn.ma | 38 ++ .../basic_2A/multiple/llpx_sn_lreq.ma | 54 ++ .../basic_2A/multiple/llpx_sn_tc.ma | 26 + .../lambdadelta/basic_2A/multiple/mr2.ma | 74 +++ .../basic_2A/multiple/mr2_minus.ma | 76 +++ .../lambdadelta/basic_2A/multiple/mr2_mr2.ma | 29 ++ .../lambdadelta/basic_2A/multiple/mr2_plus.ma | 40 ++ .../notation/constructors/dxabbr_2.ma | 19 + .../notation/constructors/dxabst_2.ma | 19 + .../notation/constructors/dxbind2_3.ma | 23 + .../basic_2A/notation/constructors/gref_1.ma | 19 + .../basic_2A/notation/constructors/item0_0.ma | 19 + .../basic_2A/notation/constructors/item0_1.ma | 19 + .../basic_2A/notation/constructors/lref_1.ma | 19 + .../notation/constructors/snabbr_3.ma | 19 + .../notation/constructors/snabbrneg_2.ma | 19 + .../notation/constructors/snabbrpos_2.ma | 19 + .../notation/constructors/snabst_3.ma | 19 + .../notation/constructors/snabstneg_2.ma | 19 + .../notation/constructors/snabstpos_2.ma | 19 + .../notation/constructors/snappl_2.ma | 19 + .../notation/constructors/snbind2_4.ma | 19 + .../notation/constructors/snbind2neg_3.ma | 19 + .../notation/constructors/snbind2pos_3.ma | 19 + .../notation/constructors/sncast_2.ma | 19 + .../notation/constructors/snflat2_3.ma | 19 + .../notation/constructors/snitem2_2.ma | 19 + .../notation/constructors/snitem2_3.ma | 19 + .../basic_2A/notation/constructors/star_0.ma | 19 + .../basic_2A/notation/constructors/star_1.ma | 19 + .../basic_2A/notation/functions/snabbr_2.ma | 19 + .../basic_2A/notation/functions/snabst_2.ma | 19 + .../notation/functions/snapplvector_2.ma | 19 + .../basic_2A/notation/functions/snbind2_3.ma | 19 + .../basic_2A/notation/functions/weight_1.ma | 19 + .../basic_2A/notation/functions/weight_2.ma | 19 + .../basic_2A/notation/functions/weight_3.ma | 19 + .../lambdadelta/basic_2A/notation/notation.ma | 47 ++ .../notation/relations/atomicarity_4.ma | 19 + .../basic_2A/notation/relations/btpred_8.ma | 19 + .../notation/relations/btpredalt_8.ma | 19 + .../notation/relations/btpredproper_8.ma | 19 + .../notation/relations/btpredstar_8.ma | 19 + .../notation/relations/btpredstaralt_8.ma | 19 + .../basic_2A/notation/relations/btsn_5.ma | 19 + .../basic_2A/notation/relations/btsnalt_5.ma | 19 + .../basic_2A/notation/relations/cosn_5.ma | 19 + .../basic_2A/notation/relations/degree_6.ma | 19 + .../notation/relations/dpconvstar_8.ma | 19 + .../notation/relations/dpredstar_7.ma | 19 + .../basic_2A/notation/relations/freestar_4.ma | 19 + .../basic_2A/notation/relations/ineint_5.ma | 19 + .../relations/lazybtpredstarproper_8.ma | 19 + .../basic_2A/notation/relations/lazyeq_4.ma | 19 + .../basic_2A/notation/relations/lazyeq_7.ma | 19 + .../basic_2A/notation/relations/lazyor_5.ma | 19 + .../basic_2A/notation/relations/lrsubeq_4.ma | 19 + .../basic_2A/notation/relations/lrsubeqa_3.ma | 19 + .../basic_2A/notation/relations/lrsubeqc_2.ma | 19 + .../basic_2A/notation/relations/lrsubeqc_4.ma | 19 + .../basic_2A/notation/relations/lrsubeqd_5.ma | 19 + .../basic_2A/notation/relations/lrsubeqv_5.ma | 19 + .../basic_2A/notation/relations/midiso_4.ma | 19 + .../notation/relations/nativevalid_5.ma | 19 + .../notation/relations/nativevalid_6.ma | 19 + .../basic_2A/notation/relations/pconv_4.ma | 19 + .../notation/relations/pconvstar_4.ma | 19 + .../basic_2A/notation/relations/pred_4.ma | 19 + .../basic_2A/notation/relations/pred_6.ma | 19 + .../basic_2A/notation/relations/predeval_4.ma | 19 + .../basic_2A/notation/relations/predeval_6.ma | 19 + .../notation/relations/prednormal_3.ma | 19 + .../notation/relations/prednormal_5.ma | 19 + .../notation/relations/prednotreducible_3.ma | 19 + .../notation/relations/prednotreducible_5.ma | 19 + .../notation/relations/predreducible_3.ma | 19 + .../notation/relations/predreducible_5.ma | 19 + .../basic_2A/notation/relations/predsn_3.ma | 19 + .../basic_2A/notation/relations/predsn_5.ma | 19 + .../notation/relations/predsnstar_3.ma | 19 + .../notation/relations/predsnstar_5.ma | 19 + .../basic_2A/notation/relations/predstar_4.ma | 19 + .../basic_2A/notation/relations/predstar_6.ma | 19 + .../basic_2A/notation/relations/psubst_6.ma | 19 + .../notation/relations/psubststar_6.ma | 19 + .../notation/relations/psubststaralt_6.ma | 19 + .../basic_2A/notation/relations/rat_3.ma | 19 + .../basic_2A/notation/relations/rdrop_3.ma | 19 + .../basic_2A/notation/relations/rdrop_4.ma | 19 + .../basic_2A/notation/relations/rdrop_5.ma | 19 + .../notation/relations/rdropstar_3.ma | 19 + .../notation/relations/rdropstar_4.ma | 19 + .../basic_2A/notation/relations/rlift_4.ma | 19 + .../notation/relations/rliftstar_3.ma | 19 + .../basic_2A/notation/relations/rminus_3.ma | 19 + .../basic_2A/notation/relations/simple_1.ma | 19 + .../basic_2A/notation/relations/sn_5.ma | 19 + .../basic_2A/notation/relations/sn_6.ma | 19 + .../basic_2A/notation/relations/snalt_5.ma | 19 + .../basic_2A/notation/relations/snalt_6.ma | 19 + .../notation/relations/statictypestar_6.ma | 19 + .../basic_2A/notation/relations/supterm_6.ma | 19 + .../notation/relations/suptermopt_6.ma | 19 + .../notation/relations/suptermoptalt_6.ma | 19 + .../notation/relations/suptermplus_6.ma | 19 + .../notation/relations/suptermstar_6.ma | 19 + .../basic_2A/notation/relations/topiso_2.ma | 19 + .../basic_2A/notation/relations/unfold_4.ma | 19 + .../lambdadelta/basic_2A/reduction/cir.ma | 79 +++ .../basic_2A/reduction/cir_lift.ma | 28 + .../lambdadelta/basic_2A/reduction/cix.ma | 93 ++++ .../basic_2A/reduction/cix_lift.ma | 35 ++ .../lambdadelta/basic_2A/reduction/cnr.ma | 114 ++++ .../lambdadelta/basic_2A/reduction/cnr_cir.ma | 28 + .../lambdadelta/basic_2A/reduction/cnr_crr.ma | 46 ++ .../basic_2A/reduction/cnr_lift.ma | 49 ++ .../lambdadelta/basic_2A/reduction/cnx.ma | 136 +++++ .../lambdadelta/basic_2A/reduction/cnx_cix.ma | 28 + .../lambdadelta/basic_2A/reduction/cnx_crx.ma | 49 ++ .../basic_2A/reduction/cnx_lift.ma | 37 ++ .../lambdadelta/basic_2A/reduction/cpr.ma | 309 +++++++++++ .../lambdadelta/basic_2A/reduction/cpr_cir.ma | 49 ++ .../basic_2A/reduction/cpr_lift.ma | 110 ++++ .../basic_2A/reduction/cpr_llpx_sn.ma | 47 ++ .../lambdadelta/basic_2A/reduction/cpx.ma | 304 +++++++++++ .../lambdadelta/basic_2A/reduction/cpx_cix.ma | 52 ++ .../basic_2A/reduction/cpx_lift.ma | 264 ++++++++++ .../basic_2A/reduction/cpx_lleq.ma | 55 ++ .../basic_2A/reduction/cpx_llpx_sn.ma | 50 ++ .../basic_2A/reduction/cpx_lreq.ma | 32 ++ .../lambdadelta/basic_2A/reduction/crr.ma | 145 ++++++ .../basic_2A/reduction/crr_lift.ma | 74 +++ .../lambdadelta/basic_2A/reduction/crx.ma | 152 ++++++ .../basic_2A/reduction/crx_lift.ma | 78 +++ .../lambdadelta/basic_2A/reduction/fpb.ma | 40 ++ .../basic_2A/reduction/fpb_fleq.ma | 41 ++ .../basic_2A/reduction/fpb_lift.ma | 28 + .../basic_2A/reduction/fpb_lleq.ma | 34 ++ .../lambdadelta/basic_2A/reduction/fpbq.ma | 42 ++ .../basic_2A/reduction/fpbq_aaa.ma | 28 + .../basic_2A/reduction/fpbq_alt.ma | 86 +++ .../basic_2A/reduction/fpbq_lift.ma | 25 + .../lambdadelta/basic_2A/reduction/lpr.ma | 61 +++ .../basic_2A/reduction/lpr_drop.ma | 96 ++++ .../lambdadelta/basic_2A/reduction/lpr_lpr.ma | 357 +++++++++++++ .../lambdadelta/basic_2A/reduction/lpx.ma | 65 +++ .../lambdadelta/basic_2A/reduction/lpx_aaa.ma | 83 +++ .../basic_2A/reduction/lpx_drop.ma | 78 +++ .../basic_2A/reduction/lpx_frees.ma | 88 ++++ .../basic_2A/reduction/lpx_lleq.ma | 136 +++++ .../lambdadelta/basic_2A/static/aaa.ma | 145 ++++++ .../lambdadelta/basic_2A/static/aaa_aaa.ma | 39 ++ .../lambdadelta/basic_2A/static/aaa_fqus.ma | 63 +++ .../lambdadelta/basic_2A/static/aaa_lift.ma | 73 +++ .../lambdadelta/basic_2A/static/aaa_lifts.ma | 30 ++ .../lambdadelta/basic_2A/static/aaa_lleq.ma | 42 ++ .../lambdadelta/basic_2A/static/da.ma | 108 ++++ .../lambdadelta/basic_2A/static/da_aaa.ma | 31 ++ .../lambdadelta/basic_2A/static/da_da.ma | 38 ++ .../lambdadelta/basic_2A/static/da_lift.ma | 78 +++ .../lambdadelta/basic_2A/static/lsuba.ma | 144 +++++ .../lambdadelta/basic_2A/static/lsuba_aaa.ma | 56 ++ .../basic_2A/static/lsuba_lsuba.ma | 36 ++ .../lambdadelta/basic_2A/static/lsubd.ma | 151 ++++++ .../lambdadelta/basic_2A/static/lsubd_da.ma | 65 +++ .../basic_2A/static/lsubd_lsubd.ma | 36 ++ .../lambdadelta/basic_2A/static/lsubr.ma | 107 ++++ .../basic_2A/static/lsubr_lsubr.ma | 53 ++ .../lambdadelta/basic_2A/static/sd.ma | 131 +++++ .../lambdadelta/basic_2A/static/sh.ma | 44 ++ .../lambdadelta/basic_2A/substitution/cpy.ma | 296 +++++++++++ .../basic_2A/substitution/cpy_cpy.ma | 122 +++++ .../basic_2A/substitution/cpy_lift.ma | 249 +++++++++ .../basic_2A/substitution/cpy_nlift.ma | 66 +++ .../lambdadelta/basic_2A/substitution/drop.ma | 493 ++++++++++++++++++ .../basic_2A/substitution/drop_append.ma | 60 +++ .../basic_2A/substitution/drop_drop.ma | 208 ++++++++ .../basic_2A/substitution/drop_lreq.ma | 92 ++++ .../lambdadelta/basic_2A/substitution/fqu.ma | 90 ++++ .../lambdadelta/basic_2A/substitution/fquq.ma | 64 +++ .../basic_2A/substitution/fquq_alt.ma | 59 +++ .../lambdadelta/basic_2A/substitution/gget.ma | 81 +++ .../basic_2A/substitution/gget_gget.ma | 40 ++ .../lambdadelta/basic_2A/substitution/lift.ma | 393 ++++++++++++++ .../basic_2A/substitution/lift_lift.ma | 217 ++++++++ .../basic_2A/substitution/lift_lift_vector.ma | 30 ++ .../basic_2A/substitution/lift_neg.ma | 67 +++ .../basic_2A/substitution/lift_vector.ma | 62 +++ .../basic_2A/substitution/lpx_sn.ma | 89 ++++ .../basic_2A/substitution/lpx_sn_alt.ma | 125 +++++ .../basic_2A/substitution/lpx_sn_drop.ma | 104 ++++ .../basic_2A/substitution/lpx_sn_lpx_sn.ma | 48 ++ .../basic_2A/substitution/lpx_sn_tc.ma | 119 +++++ .../basic_2A/substitution/lsuby.ma | 237 +++++++++ .../basic_2A/substitution/lsuby_lsuby.ma | 32 ++ .../lambdadelta/basic_2A/unfold/lstas.ma | 190 +++++++ .../lambdadelta/basic_2A/unfold/lstas_aaa.ma | 54 ++ .../lambdadelta/basic_2A/unfold/lstas_da.ma | 95 ++++ .../lambdadelta/basic_2A/unfold/lstas_lift.ma | 183 +++++++ .../basic_2A/unfold/lstas_llpx_sn.ma | 44 ++ .../basic_2A/unfold/lstas_lstas.ma | 124 +++++ .../lambdadelta/basic_2A/unfold/unfold.ma | 35 ++ .../contribs}/lambdadelta/bin/Makefile.common | 0 .../matita/contribs}/lambdadelta/bin/a.ml | 0 .../contribs/lambdadelta/{ => bin}/hls.ml | 0 .../contribs}/lambdadelta/bin/index/Makefile | 0 .../contribs}/lambdadelta/bin/index/index.ml | 0 .../contribs}/lambdadelta/bin/inline/Makefile | 0 .../lambdadelta/bin/inline/inline.ml | 0 .../contribs}/lambdadelta/bin/xhtbl/Makefile | 0 .../contribs}/lambdadelta/bin/xhtbl/attr.ml | 0 .../contribs}/lambdadelta/bin/xhtbl/fold.ml | 0 .../contribs}/lambdadelta/bin/xhtbl/matrix.ml | 0 .../lambdadelta/bin/xhtbl/options.ml | 0 .../contribs}/lambdadelta/bin/xhtbl/pass1.ml | 0 .../contribs}/lambdadelta/bin/xhtbl/pass2.ml | 0 .../contribs}/lambdadelta/bin/xhtbl/pass3.ml | 0 .../contribs}/lambdadelta/bin/xhtbl/table.ml | 0 .../lambdadelta/bin/xhtbl/textLexer.mll | 0 .../lambdadelta/bin/xhtbl/textParser.mly | 0 .../lambdadelta/bin/xhtbl/textUnparser.ml | 0 .../contribs}/lambdadelta/bin/xhtbl/xhtbl.ml | 0 .../lambdadelta/bin/xhtbl/xmlUnparser.ml | 0 .../{ground_1 => ground_1A}/blt/defs.ma | 2 +- .../{ground_1 => ground_1A}/blt/props.ma | 2 +- .../{ground_1 => ground_1A}/definitions.ma | 6 +- .../{ground_1 => ground_1A}/ext/arith.ma | 2 +- .../{ground_1 => ground_1A}/ext/tactics.ma | 2 +- .../{ground_1 => ground_1A}/plist/defs.ma | 2 +- .../{ground_1 => ground_1A}/plist/props.ma | 2 +- .../{ground_1 => ground_1A}/preamble.ma | 2 +- .../{legacy_1 => ground_1A}/spare.ma | 2 +- .../{ground_1 => ground_1A}/theory.ma | 12 +- .../{ground_1 => ground_1A}/types/defs.ma | 2 +- .../{ground_1 => ground_1A}/types/fwd.ma | 2 +- .../{ground_1 => ground_1A}/types/props.ma | 2 +- .../lambdadelta/ground_2A/lib/arith.ma | 208 ++++++++ .../lambdadelta/ground_2A/lib/bool.ma | 38 ++ .../lambdadelta/ground_2A/lib/list.ma | 59 +++ .../lambdadelta/ground_2A/lib/lstar.ma | 20 + .../lambdadelta/ground_2A/lib/star.ma | 329 ++++++++++++ .../ground_2A/notation/constructors/cons_2.ma | 19 + .../ground_2A/notation/constructors/cons_3.ma | 19 + .../notation/constructors/infinity_0.ma | 20 + .../ground_2A/notation/constructors/nil_0.ma | 19 + .../ground_2A/notation/constructors/no_0.ma | 19 + .../ground_2A/notation/constructors/yes_0.ma | 19 + .../ground_2A/notation/functions/append_2.ma | 19 + .../notation/functions/predecessor_1.ma | 19 + .../notation/functions/successor_1.ma | 19 + .../ground_2A/notation/xoa/false_0.ma | 19 + .../ground_2A/notation/xoa/true_0.ma | 19 + .../ground_2A/notation/xoa2_notation.ma | 16 + .../ground_2A/notation/xoa_notation.ma | 326 ++++++++++++ .../contribs/lambdadelta/ground_2A/xoa/xoa.ma | 293 +++++++++++ .../lambdadelta/ground_2A/xoa/xoa2.ma | 20 + .../lambdadelta/ground_2A/xoa/xoa_props.ma | 22 + .../lambdadelta/ground_2A/ynat/ynat.ma | 34 ++ .../lambdadelta/ground_2A/ynat/ynat_le.ma | 136 +++++ .../lambdadelta/ground_2A/ynat/ynat_lt.ma | 182 +++++++ .../lambdadelta/ground_2A/ynat/ynat_max.ma | 58 +++ .../lambdadelta/ground_2A/ynat/ynat_min.ma | 52 ++ .../lambdadelta/ground_2A/ynat/ynat_minus.ma | 109 ++++ .../lambdadelta/ground_2A/ynat/ynat_plus.ma | 203 ++++++++ .../lambdadelta/ground_2A/ynat/ynat_pred.ma | 39 ++ .../lambdadelta/ground_2A/ynat/ynat_succ.ma | 84 +++ .../{legacy_1 => legacy_1A}/coq/defs.ma | 2 +- .../{legacy_1 => legacy_1A}/coq/fwd.ma | 2 +- .../{legacy_1 => legacy_1A}/coq/props.ma | 2 +- .../{legacy_1 => legacy_1A}/definitions.ma | 2 +- .../{legacy_1 => legacy_1A}/preamble.ma | 0 .../{ground_1 => legacy_1A}/spare.ma | 2 +- .../{legacy_1 => legacy_1A}/theory.ma | 2 +- 669 files changed, 27014 insertions(+), 531 deletions(-) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/A/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/A/fwd.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/C/defs.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/C/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/C/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/G/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/T/dec.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/T/defs.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/T/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/T/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/aplus/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/aplus/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/app/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/aprem/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/aprem/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/aprem/props.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/arity/aprem.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/arity/cimp.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/arity/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/arity/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/arity/lift1.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/arity/pr3.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/arity/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/arity/subst0.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/asucc/defs.ma (95%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/asucc/fwd.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/cimp/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/cimp/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/clear/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/clear/drop.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/clear/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/clear/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/clen/defs.ma (95%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/clen/getl.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/cnt/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/cnt/fwd.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/cnt/props.ma (96%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csuba/arity.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csuba/clear.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csuba/defs.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csuba/drop.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csuba/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csuba/getl.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csuba/props.ma (95%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubc/arity.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubc/clear.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubc/csuba.ma (96%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubc/defs.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubc/drop.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubc/drop1.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubc/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubc/getl.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubc/props.ma (95%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubst0/clear.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubst0/defs.ma (96%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubst0/drop.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubst0/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubst0/getl.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubst0/props.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubst1/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubst1/fwd.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubst1/getl.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubst1/props.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubt/clear.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubt/csuba.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubt/defs.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubt/drop.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubt/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubt/getl.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubt/pc3.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubt/props.ma (95%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubt/ty3.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubv/clear.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubv/defs.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubv/drop.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubv/fwd.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubv/getl.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/csubv/props.ma (95%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/definitions.ma (56%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/drop/defs.ma (94%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/drop/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/drop/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/drop1/defs.ma (96%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/drop1/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/drop1/getl.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/drop1/props.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/etc/performance.txt (100%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/etc/planes.txt (100%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/ex0/defs.ma (96%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/ex0/fwd.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/ex0/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/ex1/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/ex1/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/ex2/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/ex2/props.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/flt/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/flt/fwd.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/flt/props.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/fsubst0/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/fsubst0/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/getl/clear.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/getl/dec.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/getl/defs.ma (94%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/getl/drop.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/getl/flt.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/getl/fwd.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/getl/getl.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/getl/props.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/iso/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/iso/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/iso/props.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/leq/asucc.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/leq/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/leq/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/leq/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/lift/defs.ma (96%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/lift/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/lift/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/lift/tlt.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/lift1/defs.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/lift1/drop1.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/lift1/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/llt/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/llt/fwd.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/llt/props.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/next_plus/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/next_plus/props.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/nf2/arity.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/nf2/dec.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/nf2/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/nf2/fwd.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/nf2/iso.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/nf2/lift1.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/nf2/pr3.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/nf2/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pc1/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pc1/props.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pc3/dec.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pc3/defs.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pc3/fsubst0.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pc3/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pc3/left.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pc3/nf2.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pc3/pc1.ma (94%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pc3/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pc3/subst1.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pc3/wcpr0.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr0/dec.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr0/defs.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr0/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr0/pr0.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr0/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr0/subst0.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr0/subst1.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr1/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr1/fwd.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr1/pr1.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr1/props.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr2/clen.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr2/defs.ma (95%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr2/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr2/pr2.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr2/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr2/subst1.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr3/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr3/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr3/iso.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr3/pr1.ma (96%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr3/pr3.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr3/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr3/subst1.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/pr3/wcpr0.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/preamble.ma (96%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/r/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/r/props.ma (99%) create mode 100644 matita/matita/contribs/lambdadelta/basic_1A/rect.txt rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/s/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/s/fwd.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/s/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/sc3/arity.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/sc3/defs.ma (93%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/sc3/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/sn3/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/sn3/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/sn3/lift1.ma (96%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/sn3/nf2.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/sn3/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/spare.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/sty0/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/sty0/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/sty0/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/sty1/cnt.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/sty1/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/sty1/fwd.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/sty1/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/subst/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/subst/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/subst0/dec.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/subst0/defs.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/subst0/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/subst0/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/subst0/subst0.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/subst0/tlt.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/subst1/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/subst1/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/subst1/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/subst1/subst1.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/theory.ma (73%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/tlist/defs.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/tlist/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/tlist/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/tlt/defs.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/tlt/fwd.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/tlt/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/ty3/arity.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/ty3/arity_props.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/ty3/dec.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/ty3/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/ty3/fsubst0.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/ty3/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/ty3/fwd_nf2.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/ty3/nf2.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/ty3/pr3.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/ty3/pr3_props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/ty3/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/ty3/sty0.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/ty3/subst1.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/wcpr0/defs.ma (95%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/wcpr0/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/wcpr0/getl.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/wf3/clear.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/wf3/defs.ma (98%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/wf3/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/wf3/getl.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/wf3/props.ma (99%) rename matita/matita/contribs/lambdadelta/{basic_1 => basic_1A}/wf3/ty3.ma (99%) create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/cpre.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/cpre_cpre.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/cprs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/cprs_cprs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/cprs_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/cpxe.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_aaa.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_cpxs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_lleq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_lreq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_tsts.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_tsts_vector.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/csx.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/csx_aaa.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/csx_alt.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/csx_fpbs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lleq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lpx.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lpxs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/csx_tsts_vector.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/csx_vector.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_fleq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_fpbg.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_fpbs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_aaa.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_alt.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_fpb.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_fpbs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/fsb.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/fsb_aaa.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/fsb_alt.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/fsb_csx.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/gcp.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/gcp_aaa.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/gcp_cr.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lcosx.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lcosx_cpx.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lprs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lprs_cprs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lprs_drop.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lprs_lprs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_aaa.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_cpxs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_drop.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_lleq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_lpxs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc_drop.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc_drops.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc_lsuba.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lsx.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_alt.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_csx.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_drop.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_lpx.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_lpxs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/scpds.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/scpds_aaa.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/scpds_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/computation/scpds_scpds.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/conversion/cpc.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/conversion/cpc_cpc.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_cpcs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_lstas.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_lsuba.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_lsubd.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_scpds.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_snv.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/dynamic/shnv.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_aaa.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_da_lpr.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_fsb.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lpr.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lstas.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lstas_lpr.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_preserve.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_scpes.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/equivalence/cpcs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/equivalence/cpcs_aaa.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/equivalence/cpcs_cpcs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/equivalence/cpcs_cprs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes_aaa.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes_cpcs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes_scpes.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/examples/ex_cpr_omega.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/examples/ex_fpbg_refl.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/examples/ex_snv_eta.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/examples/ex_sta_ldec.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/grammar/aarity.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/grammar/cl_restricted_weight.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/grammar/cl_weight.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/grammar/genv.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/grammar/item.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv_append.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv_length.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv_weight.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/grammar/lreq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/grammar/lreq_lreq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/grammar/term.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/grammar/term_simple.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/grammar/term_vector.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/grammar/term_weight.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/grammar/tsts.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/grammar/tsts_tsts.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/grammar/tsts_vector.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys_alt.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys_cpys.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/drops.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/drops_drop.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/drops_drops.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/fleq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/fleq_fleq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/fqup.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/fqup_fqup.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/fqus.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/fqus_alt.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/fqus_fqus.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/frees.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/frees_append.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/frees_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/frees_lreq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_lift_vector.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_lifts.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_vector.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_alt.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_alt_rec.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_drop.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_fqus.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_lleq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_llor.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_lreq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/llor.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/llor_alt.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/llor_drop.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn_alt.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn_alt_rec.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn_drop.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn_frees.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn_llor.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn_lpx_sn.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn_lreq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn_tc.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2_minus.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2_mr2.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2_plus.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/dxabbr_2.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/dxabst_2.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/dxbind2_3.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/gref_1.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/item0_0.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/item0_1.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/lref_1.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabbr_3.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabbrneg_2.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabbrpos_2.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabst_3.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabstneg_2.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabstpos_2.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snappl_2.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snbind2_4.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snbind2neg_3.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snbind2pos_3.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/sncast_2.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snflat2_3.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snitem2_2.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snitem2_3.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/star_0.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/star_1.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snabbr_2.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snabst_2.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snapplvector_2.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snbind2_3.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/functions/weight_1.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/functions/weight_2.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/functions/weight_3.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/notation.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/atomicarity_4.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpred_8.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredalt_8.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredproper_8.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredstar_8.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredstaralt_8.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btsn_5.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btsnalt_5.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/cosn_5.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/degree_6.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/dpconvstar_8.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/dpredstar_7.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/freestar_4.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/ineint_5.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazybtpredstarproper_8.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazyeq_4.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazyeq_7.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazyor_5.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeq_4.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqa_3.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqc_2.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqc_4.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqd_5.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqv_5.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/midiso_4.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/nativevalid_5.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/nativevalid_6.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pconv_4.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pconvstar_4.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pred_4.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pred_6.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predeval_4.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predeval_6.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednormal_3.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednormal_5.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednotreducible_3.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednotreducible_5.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predreducible_3.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predreducible_5.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsn_3.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsn_5.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsnstar_3.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsnstar_5.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predstar_4.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predstar_6.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/psubst_6.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/psubststar_6.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/psubststaralt_6.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rat_3.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdrop_3.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdrop_4.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdrop_5.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdropstar_3.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdropstar_4.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rlift_4.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rliftstar_3.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rminus_3.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/simple_1.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/sn_5.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/sn_6.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/snalt_5.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/snalt_6.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/statictypestar_6.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/supterm_6.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermopt_6.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermoptalt_6.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermplus_6.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermstar_6.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/topiso_2.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/notation/relations/unfold_4.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cir.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cir_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cix.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cix_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_cir.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_crr.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx_cix.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx_crx.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cpr.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cpr_cir.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cpr_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cpr_llpx_sn.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cpx.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cpx_cix.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cpx_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cpx_lleq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cpx_llpx_sn.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/cpx_lreq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/crr.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/crr_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/crx.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/crx_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb_fleq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb_lleq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq_aaa.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq_alt.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/lpr.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/lpr_drop.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/lpr_lpr.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_aaa.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_drop.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_frees.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_lleq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/static/aaa.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/static/aaa_aaa.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/static/aaa_fqus.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/static/aaa_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/static/aaa_lifts.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/static/aaa_lleq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/static/da.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/static/da_aaa.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/static/da_da.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/static/da_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/static/lsuba.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/static/lsuba_aaa.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/static/lsuba_lsuba.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/static/lsubd.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/static/lsubd_da.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/static/lsubd_lsubd.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/static/lsubr.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/static/lsubr_lsubr.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/static/sd.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/static/sh.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy_cpy.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy_nlift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/drop.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/drop_append.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/drop_drop.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/drop_lreq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/fqu.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/fquq.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/fquq_alt.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/gget.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/gget_gget.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_lift_vector.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_neg.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_vector.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_alt.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_drop.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_lpx_sn.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_tc.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/lsuby.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/substitution/lsuby_lsuby.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/unfold/lstas.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/unfold/lstas_aaa.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/unfold/lstas_da.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/unfold/lstas_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/unfold/lstas_llpx_sn.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/unfold/lstas_lstas.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2A/unfold/unfold.ma rename {helm/www => matita/matita/contribs}/lambdadelta/bin/Makefile.common (100%) rename {helm/www => matita/matita/contribs}/lambdadelta/bin/a.ml (100%) rename matita/matita/contribs/lambdadelta/{ => bin}/hls.ml (100%) rename {helm/www => matita/matita/contribs}/lambdadelta/bin/index/Makefile (100%) rename {helm/www => matita/matita/contribs}/lambdadelta/bin/index/index.ml (100%) rename {helm/www => matita/matita/contribs}/lambdadelta/bin/inline/Makefile (100%) rename {helm/www => matita/matita/contribs}/lambdadelta/bin/inline/inline.ml (100%) rename {helm/www => matita/matita/contribs}/lambdadelta/bin/xhtbl/Makefile (100%) rename {helm/www => matita/matita/contribs}/lambdadelta/bin/xhtbl/attr.ml (100%) rename {helm/www => matita/matita/contribs}/lambdadelta/bin/xhtbl/fold.ml (100%) rename {helm/www => matita/matita/contribs}/lambdadelta/bin/xhtbl/matrix.ml (100%) rename {helm/www => matita/matita/contribs}/lambdadelta/bin/xhtbl/options.ml (100%) rename {helm/www => matita/matita/contribs}/lambdadelta/bin/xhtbl/pass1.ml (100%) rename {helm/www => matita/matita/contribs}/lambdadelta/bin/xhtbl/pass2.ml (100%) rename {helm/www => matita/matita/contribs}/lambdadelta/bin/xhtbl/pass3.ml (100%) rename {helm/www => matita/matita/contribs}/lambdadelta/bin/xhtbl/table.ml (100%) rename {helm/www => matita/matita/contribs}/lambdadelta/bin/xhtbl/textLexer.mll (100%) rename {helm/www => matita/matita/contribs}/lambdadelta/bin/xhtbl/textParser.mly (100%) rename {helm/www => matita/matita/contribs}/lambdadelta/bin/xhtbl/textUnparser.ml (100%) rename {helm/www => matita/matita/contribs}/lambdadelta/bin/xhtbl/xhtbl.ml (100%) rename {helm/www => matita/matita/contribs}/lambdadelta/bin/xhtbl/xmlUnparser.ml (100%) rename matita/matita/contribs/lambdadelta/{ground_1 => ground_1A}/blt/defs.ma (97%) rename matita/matita/contribs/lambdadelta/{ground_1 => ground_1A}/blt/props.ma (99%) rename matita/matita/contribs/lambdadelta/{ground_1 => ground_1A}/definitions.ma (91%) rename matita/matita/contribs/lambdadelta/{ground_1 => ground_1A}/ext/arith.ma (99%) rename matita/matita/contribs/lambdadelta/{ground_1 => ground_1A}/ext/tactics.ma (98%) rename matita/matita/contribs/lambdadelta/{ground_1 => ground_1A}/plist/defs.ma (98%) rename matita/matita/contribs/lambdadelta/{ground_1 => ground_1A}/plist/props.ma (98%) rename matita/matita/contribs/lambdadelta/{ground_1 => ground_1A}/preamble.ma (96%) rename matita/matita/contribs/lambdadelta/{legacy_1 => ground_1A}/spare.ma (97%) rename matita/matita/contribs/lambdadelta/{ground_1 => ground_1A}/theory.ma (83%) rename matita/matita/contribs/lambdadelta/{ground_1 => ground_1A}/types/defs.ma (99%) rename matita/matita/contribs/lambdadelta/{ground_1 => ground_1A}/types/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{ground_1 => ground_1A}/types/props.ma (97%) create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/lib/arith.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/lib/bool.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/lib/list.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/lib/lstar.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/lib/star.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/cons_2.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/cons_3.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/infinity_0.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/nil_0.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/no_0.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/yes_0.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/notation/functions/append_2.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/notation/functions/predecessor_1.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/notation/functions/successor_1.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/notation/xoa/false_0.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/notation/xoa/true_0.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/notation/xoa2_notation.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/notation/xoa_notation.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/xoa/xoa.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/xoa/xoa2.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/xoa/xoa_props.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_le.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_lt.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_max.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_min.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_minus.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_plus.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_pred.ma create mode 100644 matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_succ.ma rename matita/matita/contribs/lambdadelta/{legacy_1 => legacy_1A}/coq/defs.ma (98%) rename matita/matita/contribs/lambdadelta/{legacy_1 => legacy_1A}/coq/fwd.ma (99%) rename matita/matita/contribs/lambdadelta/{legacy_1 => legacy_1A}/coq/props.ma (99%) rename matita/matita/contribs/lambdadelta/{legacy_1 => legacy_1A}/definitions.ma (97%) rename matita/matita/contribs/lambdadelta/{legacy_1 => legacy_1A}/preamble.ma (100%) rename matita/matita/contribs/lambdadelta/{ground_1 => legacy_1A}/spare.ma (97%) rename matita/matita/contribs/lambdadelta/{legacy_1 => legacy_1A}/theory.ma (96%) diff --git a/.gitignore b/.gitignore index 224bc1923..c0ab80566 100644 --- a/.gitignore +++ b/.gitignore @@ -76,9 +76,8 @@ helm/www/lambdadelta/xslt/chc_45.xsl helm/www/lambdadelta/xslt/xhtbl.xsl matita/matita/contribs/lambdadelta/.depend -matita/matita/contribs/lambdadelta/nodes -matita/matita/contribs/lambdadelta/token -matita/matita/contribs/lambdadelta/2A +matita/matita/contribs/lambdadelta/bin/nodes +matita/matita/contribs/lambdadelta/bin/token matita/matita/contribs/lambdadelta/*/probe.txt matita/matita/contribs/lambdadelta/*/deps.txt matita/matita/contribs/lambdadelta/*/web/*_sum.tbl diff --git a/helm/www/lambdadelta/Makefile b/helm/www/lambdadelta/Makefile index c58e3f597..1acebccc5 100644 --- a/helm/www/lambdadelta/Makefile +++ b/helm/www/lambdadelta/Makefile @@ -15,9 +15,9 @@ SITEDIR = html HTMLDIR = html/lddl SRCDIR = web/home LDDLDIR = web/lddl -XHTBLDIR = bin/xhtbl -INDEXDIR = bin/index ETCDIR = etc +XHTBLDIR = $(ETCDIR)/lambdadelta/bin/xhtbl +INDEXDIR = $(ETCDIR)/lambdadelta/bin/index DOWNDIR = download XSLTDIR = xslt XMLDIR = xml diff --git a/matita/matita/contribs/lambdadelta/basic_1/A/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/A/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/A/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/A/defs.ma index dc435ca87..7f893aaa1 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/A/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/A/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/preamble.ma". +include "basic_1A/preamble.ma". inductive A: Type[0] \def | ASort: nat \to (nat \to A) diff --git a/matita/matita/contribs/lambdadelta/basic_1/A/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/A/fwd.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/A/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/A/fwd.ma index 9e2eb7d8e..64aa776cd 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/A/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/A/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/A/defs.ma". +include "basic_1A/A/defs.ma". implied rec lemma A_rect (P: (A \to Type[0])) (f: (\forall (n: nat).(\forall (n0: nat).(P (ASort n n0))))) (f0: (\forall (a: A).((P a) \to (\forall (a0: diff --git a/matita/matita/contribs/lambdadelta/basic_1/C/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/C/defs.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/C/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/C/defs.ma index 9d41d8ce5..aa1979967 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/C/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/C/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/T/defs.ma". +include "basic_1A/T/defs.ma". inductive C: Type[0] \def | CSort: nat \to C diff --git a/matita/matita/contribs/lambdadelta/basic_1/C/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/C/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/C/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/C/fwd.ma index 43d43fc71..3979a5b20 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/C/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/C/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/C/defs.ma". +include "basic_1A/C/defs.ma". implied rec lemma C_rect (P: (C \to Type[0])) (f: (\forall (n: nat).(P (CSort n)))) (f0: (\forall (c: C).((P c) \to (\forall (k: K).(\forall (t: T).(P diff --git a/matita/matita/contribs/lambdadelta/basic_1/C/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/C/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/C/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/C/props.ma index dacd5482b..2915384c9 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/C/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/C/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/C/fwd.ma". +include "basic_1A/C/fwd.ma". -include "basic_1/T/props.ma". +include "basic_1A/T/props.ma". lemma cle_r: \forall (c: C).(cle c c) diff --git a/matita/matita/contribs/lambdadelta/basic_1/G/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/G/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/G/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/G/defs.ma index ae81c7857..a79475028 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/G/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/G/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/preamble.ma". +include "basic_1A/preamble.ma". record G : Type[0] \def { next: (nat \to nat); diff --git a/matita/matita/contribs/lambdadelta/basic_1/T/dec.ma b/matita/matita/contribs/lambdadelta/basic_1A/T/dec.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/T/dec.ma rename to matita/matita/contribs/lambdadelta/basic_1A/T/dec.ma index ae783b822..6760101a0 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/T/dec.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/T/dec.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/T/fwd.ma". +include "basic_1A/T/fwd.ma". fact terms_props__bind_dec: \forall (b1: B).(\forall (b2: B).(or (eq B b1 b2) ((eq B b1 b2) \to (\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/T/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/T/defs.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/T/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/T/defs.ma index 0eeff13ba..554c4de72 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/T/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/T/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/preamble.ma". +include "basic_1A/preamble.ma". inductive B: Type[0] \def | Abbr: B diff --git a/matita/matita/contribs/lambdadelta/basic_1/T/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/T/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/T/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/T/fwd.ma index 5e1833cc1..570b70c3f 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/T/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/T/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/T/defs.ma". +include "basic_1A/T/defs.ma". implied rec lemma T_rect (P: (T \to Type[0])) (f: (\forall (n: nat).(P (TSort n)))) (f0: (\forall (n: nat).(P (TLRef n)))) (f1: (\forall (k: K).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/T/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/T/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/T/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/T/props.ma index 7b62a5a15..1011e4029 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/T/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/T/props.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/T/fwd.ma". +include "basic_1A/T/fwd.ma". lemma not_abbr_abst: not (eq B Abbr Abst) diff --git a/matita/matita/contribs/lambdadelta/basic_1/aplus/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/aplus/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/aplus/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/aplus/defs.ma index f339331a6..39f108055 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/aplus/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/aplus/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/asucc/defs.ma". +include "basic_1A/asucc/defs.ma". rec definition aplus (g: G) (a: A) (n: nat) on n: A \def match n with [O \Rightarrow a | (S n0) \Rightarrow (asucc g (aplus g a n0))]. diff --git a/matita/matita/contribs/lambdadelta/basic_1/aplus/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/aplus/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/aplus/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/aplus/props.ma index 73ec98cfa..d01417a98 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/aplus/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/aplus/props.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/aplus/defs.ma". +include "basic_1A/aplus/defs.ma". -include "basic_1/A/fwd.ma". +include "basic_1A/A/fwd.ma". -include "basic_1/next_plus/props.ma". +include "basic_1A/next_plus/props.ma". lemma aplus_reg_r: \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (h1: nat).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/app/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/app/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/app/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/app/defs.ma index 32ec12f51..af8b3b299 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/app/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/app/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/C/defs.ma". +include "basic_1A/C/defs.ma". rec definition cbk (c: C) on c: nat \def match c with [(CSort m) \Rightarrow m | (CHead c0 _ _) \Rightarrow (cbk c0)]. diff --git a/matita/matita/contribs/lambdadelta/basic_1/aprem/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/aprem/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/aprem/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/aprem/defs.ma index e3ea6cc87..3b979e0c4 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/aprem/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/aprem/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/A/defs.ma". +include "basic_1A/A/defs.ma". inductive aprem: nat \to (A \to (A \to Prop)) \def | aprem_zero: \forall (a1: A).(\forall (a2: A).(aprem O (AHead a1 a2) a1)) diff --git a/matita/matita/contribs/lambdadelta/basic_1/aprem/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/aprem/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/aprem/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/aprem/fwd.ma index 3f415a4c1..38eefdf78 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/aprem/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/aprem/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/aprem/defs.ma". +include "basic_1A/aprem/defs.ma". implied rec lemma aprem_ind (P: (nat \to (A \to (A \to Prop)))) (f: (\forall (a1: A).(\forall (a2: A).(P O (AHead a1 a2) a1)))) (f0: (\forall (a2: diff --git a/matita/matita/contribs/lambdadelta/basic_1/aprem/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/aprem/props.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/aprem/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/aprem/props.ma index 1932956b1..e43f53375 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/aprem/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/aprem/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/aprem/fwd.ma". +include "basic_1A/aprem/fwd.ma". -include "basic_1/leq/fwd.ma". +include "basic_1A/leq/fwd.ma". lemma aprem_repl: \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g a1 a2) \to (\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/arity/aprem.ma b/matita/matita/contribs/lambdadelta/basic_1A/arity/aprem.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/arity/aprem.ma rename to matita/matita/contribs/lambdadelta/basic_1A/arity/aprem.ma index 442660739..22be8e8d0 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/arity/aprem.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/arity/aprem.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/arity/props.ma". +include "basic_1A/arity/props.ma". -include "basic_1/arity/cimp.ma". +include "basic_1A/arity/cimp.ma". -include "basic_1/aprem/props.ma". +include "basic_1A/aprem/props.ma". lemma arity_aprem: \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a: A).((arity g c t diff --git a/matita/matita/contribs/lambdadelta/basic_1/arity/cimp.ma b/matita/matita/contribs/lambdadelta/basic_1A/arity/cimp.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/arity/cimp.ma rename to matita/matita/contribs/lambdadelta/basic_1A/arity/cimp.ma index e9222f5bb..9cad1a931 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/arity/cimp.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/arity/cimp.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/arity/fwd.ma". +include "basic_1A/arity/fwd.ma". -include "basic_1/cimp/props.ma". +include "basic_1A/cimp/props.ma". lemma arity_cimp_conf: \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (a: A).((arity g c1 diff --git a/matita/matita/contribs/lambdadelta/basic_1/arity/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/arity/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/arity/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/arity/defs.ma index b193fac10..e6be51c80 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/arity/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/arity/defs.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/leq/defs.ma". +include "basic_1A/leq/defs.ma". -include "basic_1/getl/defs.ma". +include "basic_1A/getl/defs.ma". inductive arity (g: G): C \to (T \to (A \to Prop)) \def | arity_sort: \forall (c: C).(\forall (n: nat).(arity g c (TSort n) (ASort O diff --git a/matita/matita/contribs/lambdadelta/basic_1/arity/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/arity/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/arity/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/arity/fwd.ma index 78211905a..8f6466eaf 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/arity/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/arity/fwd.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/arity/defs.ma". +include "basic_1A/arity/defs.ma". -include "basic_1/leq/asucc.ma". +include "basic_1A/leq/asucc.ma". -include "basic_1/getl/drop.ma". +include "basic_1A/getl/drop.ma". implied rec lemma arity_ind (g: G) (P: (C \to (T \to (A \to Prop)))) (f: (\forall (c: C).(\forall (n: nat).(P c (TSort n) (ASort O n))))) (f0: diff --git a/matita/matita/contribs/lambdadelta/basic_1/arity/lift1.ma b/matita/matita/contribs/lambdadelta/basic_1A/arity/lift1.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/arity/lift1.ma rename to matita/matita/contribs/lambdadelta/basic_1A/arity/lift1.ma index 7267b7817..8d52c974e 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/arity/lift1.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/arity/lift1.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/arity/props.ma". +include "basic_1A/arity/props.ma". -include "basic_1/drop1/fwd.ma". +include "basic_1A/drop1/fwd.ma". lemma arity_lift1: \forall (g: G).(\forall (a: A).(\forall (c2: C).(\forall (hds: diff --git a/matita/matita/contribs/lambdadelta/basic_1/arity/pr3.ma b/matita/matita/contribs/lambdadelta/basic_1A/arity/pr3.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/arity/pr3.ma rename to matita/matita/contribs/lambdadelta/basic_1A/arity/pr3.ma index 69dfef63d..fb730bebe 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/arity/pr3.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/arity/pr3.ma @@ -14,17 +14,17 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csuba/arity.ma". +include "basic_1A/csuba/arity.ma". -include "basic_1/pr3/fwd.ma". +include "basic_1A/pr3/fwd.ma". -include "basic_1/pr1/fwd.ma". +include "basic_1A/pr1/fwd.ma". -include "basic_1/wcpr0/getl.ma". +include "basic_1A/wcpr0/getl.ma". -include "basic_1/pr0/props.ma". +include "basic_1A/pr0/props.ma". -include "basic_1/arity/subst0.ma". +include "basic_1A/arity/subst0.ma". lemma arity_sred_wcpr0_pr0: \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (a: A).((arity g diff --git a/matita/matita/contribs/lambdadelta/basic_1/arity/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/arity/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/arity/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/arity/props.ma index fb8379af7..712c5fa68 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/arity/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/arity/props.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/arity/fwd.ma". +include "basic_1A/arity/fwd.ma". lemma node_inh: \forall (g: G).(\forall (n: nat).(\forall (k: nat).(ex_2 C T (\lambda (c: diff --git a/matita/matita/contribs/lambdadelta/basic_1/arity/subst0.ma b/matita/matita/contribs/lambdadelta/basic_1A/arity/subst0.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/arity/subst0.ma rename to matita/matita/contribs/lambdadelta/basic_1A/arity/subst0.ma index 334505b50..bdfb5e5ad 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/arity/subst0.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/arity/subst0.ma @@ -14,17 +14,17 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/arity/props.ma". +include "basic_1A/arity/props.ma". -include "basic_1/fsubst0/fwd.ma". +include "basic_1A/fsubst0/fwd.ma". -include "basic_1/csubst0/getl.ma". +include "basic_1A/csubst0/getl.ma". -include "basic_1/subst0/dec.ma". +include "basic_1A/subst0/dec.ma". -include "basic_1/subst0/fwd.ma". +include "basic_1A/subst0/fwd.ma". -include "basic_1/getl/getl.ma". +include "basic_1A/getl/getl.ma". lemma arity_gen_cvoid_subst0: \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a: A).((arity g c t diff --git a/matita/matita/contribs/lambdadelta/basic_1/asucc/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/asucc/defs.ma similarity index 95% rename from matita/matita/contribs/lambdadelta/basic_1/asucc/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/asucc/defs.ma index 520f8e375..182967265 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/asucc/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/asucc/defs.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/A/defs.ma". +include "basic_1A/A/defs.ma". -include "basic_1/G/defs.ma". +include "basic_1A/G/defs.ma". rec definition asucc (g: G) (l: A) on l: A \def match l with [(ASort n0 n) \Rightarrow (match n0 with [O \Rightarrow (ASort O (next g n)) | (S h) diff --git a/matita/matita/contribs/lambdadelta/basic_1/asucc/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/asucc/fwd.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/asucc/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/asucc/fwd.ma index e2edc783c..98dd03afd 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/asucc/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/asucc/fwd.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/asucc/defs.ma". +include "basic_1A/asucc/defs.ma". -include "basic_1/A/fwd.ma". +include "basic_1A/A/fwd.ma". lemma asucc_gen_sort: \forall (g: G).(\forall (h: nat).(\forall (n: nat).(\forall (a: A).((eq A diff --git a/matita/matita/contribs/lambdadelta/basic_1/cimp/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/cimp/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/cimp/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/cimp/defs.ma index 5d53fcf57..d39a85be6 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/cimp/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/cimp/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/getl/defs.ma". +include "basic_1A/getl/defs.ma". definition cimp: C \to (C \to Prop) diff --git a/matita/matita/contribs/lambdadelta/basic_1/cimp/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/cimp/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/cimp/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/cimp/props.ma index d26ec1381..231609f0e 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/cimp/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/cimp/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/cimp/defs.ma". +include "basic_1A/cimp/defs.ma". -include "basic_1/getl/getl.ma". +include "basic_1A/getl/getl.ma". lemma cimp_flat_sx: \forall (f: F).(\forall (c: C).(\forall (v: T).(cimp (CHead c (Flat f) v) diff --git a/matita/matita/contribs/lambdadelta/basic_1/clear/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/clear/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/clear/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/clear/defs.ma index 5428dde7d..ce009d9ab 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/clear/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/clear/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/C/defs.ma". +include "basic_1A/C/defs.ma". inductive clear: C \to (C \to Prop) \def | clear_bind: \forall (b: B).(\forall (e: C).(\forall (u: T).(clear (CHead e diff --git a/matita/matita/contribs/lambdadelta/basic_1/clear/drop.ma b/matita/matita/contribs/lambdadelta/basic_1A/clear/drop.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/clear/drop.ma rename to matita/matita/contribs/lambdadelta/basic_1A/clear/drop.ma index 4383e2650..4ecf9776a 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/clear/drop.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/clear/drop.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/clear/fwd.ma". +include "basic_1A/clear/fwd.ma". -include "basic_1/drop/fwd.ma". +include "basic_1A/drop/fwd.ma". lemma drop_clear: \forall (c1: C).(\forall (c2: C).(\forall (i: nat).((drop (S i) O c1 c2) \to diff --git a/matita/matita/contribs/lambdadelta/basic_1/clear/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/clear/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/clear/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/clear/fwd.ma index 1b05b45a8..1b12b5f7f 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/clear/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/clear/fwd.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/clear/defs.ma". +include "basic_1A/clear/defs.ma". -include "basic_1/C/fwd.ma". +include "basic_1A/C/fwd.ma". implied rec lemma clear_ind (P: (C \to (C \to Prop))) (f: (\forall (b: B).(\forall (e: C).(\forall (u: T).(P (CHead e (Bind b) u) (CHead e (Bind b) diff --git a/matita/matita/contribs/lambdadelta/basic_1/clear/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/clear/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/clear/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/clear/props.ma index 07e59e05d..e556d59a2 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/clear/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/clear/props.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/clear/fwd.ma". +include "basic_1A/clear/fwd.ma". lemma clear_clear: \forall (c1: C).(\forall (c2: C).((clear c1 c2) \to (clear c2 c2))) diff --git a/matita/matita/contribs/lambdadelta/basic_1/clen/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/clen/defs.ma similarity index 95% rename from matita/matita/contribs/lambdadelta/basic_1/clen/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/clen/defs.ma index 64209a6f7..ce6bcbfce 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/clen/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/clen/defs.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/C/defs.ma". +include "basic_1A/C/defs.ma". -include "basic_1/s/defs.ma". +include "basic_1A/s/defs.ma". rec definition clen (c: C) on c: nat \def match c with [(CSort _) \Rightarrow O | (CHead c0 k _) \Rightarrow (s k (clen c0))]. diff --git a/matita/matita/contribs/lambdadelta/basic_1/clen/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/clen/getl.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/clen/getl.ma rename to matita/matita/contribs/lambdadelta/basic_1A/clen/getl.ma index 55bad4ad9..665581c28 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/clen/getl.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/clen/getl.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/clen/defs.ma". +include "basic_1A/clen/defs.ma". -include "basic_1/getl/props.ma". +include "basic_1A/getl/props.ma". lemma getl_ctail_clen: \forall (b: B).(\forall (t: T).(\forall (c: C).(ex nat (\lambda (n: diff --git a/matita/matita/contribs/lambdadelta/basic_1/cnt/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/cnt/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/cnt/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/cnt/defs.ma index 149d125f9..f6a0dc54a 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/cnt/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/cnt/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/T/defs.ma". +include "basic_1A/T/defs.ma". inductive cnt: T \to Prop \def | cnt_sort: \forall (n: nat).(cnt (TSort n)) diff --git a/matita/matita/contribs/lambdadelta/basic_1/cnt/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/cnt/fwd.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/cnt/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/cnt/fwd.ma index 922737699..aadf1d739 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/cnt/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/cnt/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/cnt/defs.ma". +include "basic_1A/cnt/defs.ma". implied rec lemma cnt_ind (P: (T \to Prop)) (f: (\forall (n: nat).(P (TSort n)))) (f0: (\forall (t: T).((cnt t) \to ((P t) \to (\forall (k: K).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/cnt/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/cnt/props.ma similarity index 96% rename from matita/matita/contribs/lambdadelta/basic_1/cnt/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/cnt/props.ma index e18a4788e..531fe7263 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/cnt/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/cnt/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/cnt/fwd.ma". +include "basic_1A/cnt/fwd.ma". -include "basic_1/lift/props.ma". +include "basic_1A/lift/props.ma". lemma cnt_lift: \forall (t: T).((cnt t) \to (\forall (i: nat).(\forall (d: nat).(cnt (lift i diff --git a/matita/matita/contribs/lambdadelta/basic_1/csuba/arity.ma b/matita/matita/contribs/lambdadelta/basic_1A/csuba/arity.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/csuba/arity.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csuba/arity.ma index 7b35a4381..088ac63bb 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csuba/arity.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csuba/arity.ma @@ -14,13 +14,13 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csuba/getl.ma". +include "basic_1A/csuba/getl.ma". -include "basic_1/csuba/props.ma". +include "basic_1A/csuba/props.ma". -include "basic_1/arity/fwd.ma". +include "basic_1A/arity/fwd.ma". -include "basic_1/csubv/getl.ma". +include "basic_1A/csubv/getl.ma". lemma csuba_arity: \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (a: A).((arity g c1 diff --git a/matita/matita/contribs/lambdadelta/basic_1/csuba/clear.ma b/matita/matita/contribs/lambdadelta/basic_1A/csuba/clear.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/csuba/clear.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csuba/clear.ma index 06b1cc258..69f9d2f08 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csuba/clear.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csuba/clear.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csuba/fwd.ma". +include "basic_1A/csuba/fwd.ma". -include "basic_1/clear/fwd.ma". +include "basic_1A/clear/fwd.ma". lemma csuba_clear_conf: \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csuba g c1 c2) \to diff --git a/matita/matita/contribs/lambdadelta/basic_1/csuba/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/csuba/defs.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/csuba/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csuba/defs.ma index 948ee345d..59c2c7149 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csuba/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csuba/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/arity/defs.ma". +include "basic_1A/arity/defs.ma". inductive csuba (g: G): C \to (C \to Prop) \def | csuba_sort: \forall (n: nat).(csuba g (CSort n) (CSort n)) diff --git a/matita/matita/contribs/lambdadelta/basic_1/csuba/drop.ma b/matita/matita/contribs/lambdadelta/basic_1A/csuba/drop.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/csuba/drop.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csuba/drop.ma index 5a92a8ecd..74b30cec6 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csuba/drop.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csuba/drop.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csuba/fwd.ma". +include "basic_1A/csuba/fwd.ma". -include "basic_1/drop/fwd.ma". +include "basic_1A/drop/fwd.ma". lemma csuba_drop_abbr: \forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).((drop i diff --git a/matita/matita/contribs/lambdadelta/basic_1/csuba/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/csuba/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/csuba/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csuba/fwd.ma index b94c9c8d4..b99cd5945 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csuba/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csuba/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csuba/defs.ma". +include "basic_1A/csuba/defs.ma". implied rec lemma csuba_ind (g: G) (P: (C \to (C \to Prop))) (f: (\forall (n: nat).(P (CSort n) (CSort n)))) (f0: (\forall (c1: C).(\forall (c2: C).((csuba diff --git a/matita/matita/contribs/lambdadelta/basic_1/csuba/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/csuba/getl.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/csuba/getl.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csuba/getl.ma index 039992420..a8591bf15 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csuba/getl.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csuba/getl.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csuba/drop.ma". +include "basic_1A/csuba/drop.ma". -include "basic_1/csuba/clear.ma". +include "basic_1A/csuba/clear.ma". -include "basic_1/getl/clear.ma". +include "basic_1A/getl/clear.ma". lemma csuba_getl_abbr: \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/csuba/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/csuba/props.ma similarity index 95% rename from matita/matita/contribs/lambdadelta/basic_1/csuba/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csuba/props.ma index 0e60bfed5..145b0f179 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csuba/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csuba/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csuba/defs.ma". +include "basic_1A/csuba/defs.ma". -include "basic_1/C/fwd.ma". +include "basic_1A/C/fwd.ma". lemma csuba_refl: \forall (g: G).(\forall (c: C).(csuba g c c)) diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubc/arity.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubc/arity.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/csubc/arity.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubc/arity.ma index 63593633a..7871555c3 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubc/arity.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubc/arity.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubc/csuba.ma". +include "basic_1A/csubc/csuba.ma". lemma csubc_arity_conf: \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubc/clear.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubc/clear.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/csubc/clear.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubc/clear.ma index eaef555fd..5650cc9e7 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubc/clear.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubc/clear.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubc/fwd.ma". +include "basic_1A/csubc/fwd.ma". -include "basic_1/clear/fwd.ma". +include "basic_1A/clear/fwd.ma". lemma csubc_clear_conf: \forall (g: G).(\forall (c1: C).(\forall (e1: C).((clear c1 e1) \to (\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubc/csuba.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubc/csuba.ma similarity index 96% rename from matita/matita/contribs/lambdadelta/basic_1/csubc/csuba.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubc/csuba.ma index 9e1d3014e..48b71ed9d 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubc/csuba.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubc/csuba.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubc/fwd.ma". +include "basic_1A/csubc/fwd.ma". -include "basic_1/sc3/props.ma". +include "basic_1A/sc3/props.ma". lemma csubc_csuba: \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to (csuba diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubc/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubc/defs.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/csubc/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubc/defs.ma index e1f71a30f..e28634ebe 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubc/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubc/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/sc3/defs.ma". +include "basic_1A/sc3/defs.ma". inductive csubc (g: G): C \to (C \to Prop) \def | csubc_sort: \forall (n: nat).(csubc g (CSort n) (CSort n)) diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubc/drop.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubc/drop.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/csubc/drop.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubc/drop.ma index a0bb37e96..995cfee55 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubc/drop.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubc/drop.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubc/fwd.ma". +include "basic_1A/csubc/fwd.ma". -include "basic_1/sc3/props.ma". +include "basic_1A/sc3/props.ma". lemma csubc_drop_conf_O: \forall (g: G).(\forall (c1: C).(\forall (e1: C).(\forall (h: nat).((drop h diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubc/drop1.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubc/drop1.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/csubc/drop1.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubc/drop1.ma index 32574ea29..18a783c1e 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubc/drop1.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubc/drop1.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubc/drop.ma". +include "basic_1A/csubc/drop.ma". lemma drop1_csubc_trans: \forall (g: G).(\forall (hds: PList).(\forall (c2: C).(\forall (e2: diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubc/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubc/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/csubc/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubc/fwd.ma index 22f68a288..872521609 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubc/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubc/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubc/defs.ma". +include "basic_1A/csubc/defs.ma". implied rec lemma csubc_ind (g: G) (P: (C \to (C \to Prop))) (f: (\forall (n: nat).(P (CSort n) (CSort n)))) (f0: (\forall (c1: C).(\forall (c2: C).((csubc diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubc/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubc/getl.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/csubc/getl.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubc/getl.ma index 869c84320..16c59d2d7 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubc/getl.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubc/getl.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubc/drop.ma". +include "basic_1A/csubc/drop.ma". -include "basic_1/csubc/clear.ma". +include "basic_1A/csubc/clear.ma". lemma csubc_getl_conf: \forall (g: G).(\forall (c1: C).(\forall (e1: C).(\forall (i: nat).((getl i diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubc/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubc/props.ma similarity index 95% rename from matita/matita/contribs/lambdadelta/basic_1/csubc/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubc/props.ma index a419bad4c..8daf40269 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubc/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubc/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubc/defs.ma". +include "basic_1A/csubc/defs.ma". -include "basic_1/sc3/props.ma". +include "basic_1A/sc3/props.ma". lemma csubc_refl: \forall (g: G).(\forall (c: C).(csubc g c c)) diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubst0/clear.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/clear.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/csubst0/clear.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubst0/clear.ma index d70be313e..ab3e38cb4 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubst0/clear.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/clear.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubst0/props.ma". +include "basic_1A/csubst0/props.ma". -include "basic_1/csubst0/fwd.ma". +include "basic_1A/csubst0/fwd.ma". -include "basic_1/clear/fwd.ma". +include "basic_1A/clear/fwd.ma". lemma csubst0_clear_O: \forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 O v c1 c2) \to diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubst0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/defs.ma similarity index 96% rename from matita/matita/contribs/lambdadelta/basic_1/csubst0/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubst0/defs.ma index eec1e74b7..c25dafe0a 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubst0/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/defs.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/subst0/defs.ma". +include "basic_1A/subst0/defs.ma". -include "basic_1/C/defs.ma". +include "basic_1A/C/defs.ma". inductive csubst0: nat \to (T \to (C \to (C \to Prop))) \def | csubst0_snd: \forall (k: K).(\forall (i: nat).(\forall (v: T).(\forall (u1: diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubst0/drop.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/drop.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/csubst0/drop.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubst0/drop.ma index 2d759243f..4e2337b45 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubst0/drop.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/drop.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubst0/fwd.ma". +include "basic_1A/csubst0/fwd.ma". -include "basic_1/drop/fwd.ma". +include "basic_1A/drop/fwd.ma". lemma csubst0_drop_gt: \forall (n: nat).(\forall (i: nat).((lt i n) \to (\forall (c1: C).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubst0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/csubst0/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubst0/fwd.ma index a267513d1..3a888e17e 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubst0/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/fwd.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubst0/defs.ma". +include "basic_1A/csubst0/defs.ma". -include "basic_1/C/fwd.ma". +include "basic_1A/C/fwd.ma". implied rec lemma csubst0_ind (P: (nat \to (T \to (C \to (C \to Prop))))) (f: (\forall (k: K).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubst0/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/getl.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/csubst0/getl.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubst0/getl.ma index 894932961..ae6794f3c 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubst0/getl.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/getl.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubst0/clear.ma". +include "basic_1A/csubst0/clear.ma". -include "basic_1/csubst0/drop.ma". +include "basic_1A/csubst0/drop.ma". -include "basic_1/getl/fwd.ma". +include "basic_1A/getl/fwd.ma". lemma csubst0_getl_ge: \forall (i: nat).(\forall (n: nat).((le i n) \to (\forall (c1: C).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubst0/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/props.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/csubst0/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubst0/props.ma index bb427a677..a681912c7 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubst0/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/props.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubst0/defs.ma". +include "basic_1A/csubst0/defs.ma". lemma csubst0_snd_bind: \forall (b: B).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubst1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubst1/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/csubst1/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubst1/defs.ma index dcfa78456..8a384490b 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubst1/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubst1/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubst0/defs.ma". +include "basic_1A/csubst0/defs.ma". inductive csubst1 (i: nat) (v: T) (c1: C): C \to Prop \def | csubst1_refl: csubst1 i v c1 c1 diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubst1/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubst1/fwd.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/csubst1/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubst1/fwd.ma index c06340168..16c018af6 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubst1/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubst1/fwd.ma @@ -14,13 +14,13 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubst1/defs.ma". +include "basic_1A/csubst1/defs.ma". -include "basic_1/csubst0/fwd.ma". +include "basic_1A/csubst0/fwd.ma". -include "basic_1/subst1/defs.ma". +include "basic_1A/subst1/defs.ma". -include "basic_1/s/fwd.ma". +include "basic_1A/s/fwd.ma". implied lemma csubst1_ind: \forall (i: nat).(\forall (v: T).(\forall (c1: C).(\forall (P: ((C \to diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubst1/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubst1/getl.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/csubst1/getl.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubst1/getl.ma index 1d37fd761..4805e5f09 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubst1/getl.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubst1/getl.ma @@ -14,13 +14,13 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubst1/props.ma". +include "basic_1A/csubst1/props.ma". -include "basic_1/csubst0/getl.ma". +include "basic_1A/csubst0/getl.ma". -include "basic_1/subst1/props.ma". +include "basic_1A/subst1/props.ma". -include "basic_1/drop/props.ma". +include "basic_1A/drop/props.ma". lemma csubst1_getl_ge: \forall (i: nat).(\forall (n: nat).((le i n) \to (\forall (c1: C).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubst1/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubst1/props.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/csubst1/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubst1/props.ma index 349485a88..283eb28a4 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubst1/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubst1/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubst1/fwd.ma". +include "basic_1A/csubst1/fwd.ma". -include "basic_1/subst1/fwd.ma". +include "basic_1A/subst1/fwd.ma". theorem csubst1_head: \forall (k: K).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubt/clear.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubt/clear.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/csubt/clear.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubt/clear.ma index d2dc87dfe..86e44ecee 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubt/clear.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubt/clear.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubt/fwd.ma". +include "basic_1A/csubt/fwd.ma". -include "basic_1/clear/fwd.ma". +include "basic_1A/clear/fwd.ma". lemma csubt_clear_conf: \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubt/csuba.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubt/csuba.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/csubt/csuba.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubt/csuba.ma index 0de7f11cd..965116ee6 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubt/csuba.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubt/csuba.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/ty3/arity.ma". +include "basic_1A/ty3/arity.ma". lemma csubt_csuba: \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (csuba diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubt/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubt/defs.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/csubt/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubt/defs.ma index 35ef17fb0..f129a7477 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubt/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubt/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/ty3/defs.ma". +include "basic_1A/ty3/defs.ma". inductive csubt (g: G): C \to (C \to Prop) \def | csubt_sort: \forall (n: nat).(csubt g (CSort n) (CSort n)) diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubt/drop.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubt/drop.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/csubt/drop.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubt/drop.ma index 8d05e4b14..1dc494d93 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubt/drop.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubt/drop.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubt/fwd.ma". +include "basic_1A/csubt/fwd.ma". -include "basic_1/drop/fwd.ma". +include "basic_1A/drop/fwd.ma". lemma csubt_drop_flat: \forall (g: G).(\forall (f: F).(\forall (n: nat).(\forall (c1: C).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubt/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubt/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/csubt/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubt/fwd.ma index eb571467a..e3f35298d 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubt/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubt/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubt/defs.ma". +include "basic_1A/csubt/defs.ma". implied rec lemma csubt_ind (g: G) (P: (C \to (C \to Prop))) (f: (\forall (n: nat).(P (CSort n) (CSort n)))) (f0: (\forall (c1: C).(\forall (c2: C).((csubt diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubt/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubt/getl.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/csubt/getl.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubt/getl.ma index 7156f6296..14060308e 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubt/getl.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubt/getl.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubt/clear.ma". +include "basic_1A/csubt/clear.ma". -include "basic_1/csubt/drop.ma". +include "basic_1A/csubt/drop.ma". -include "basic_1/getl/clear.ma". +include "basic_1A/getl/clear.ma". lemma csubt_getl_abbr: \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubt/pc3.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubt/pc3.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/csubt/pc3.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubt/pc3.ma index 60a4452e3..ee965e4c6 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubt/pc3.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubt/pc3.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubt/getl.ma". +include "basic_1A/csubt/getl.ma". -include "basic_1/pc3/left.ma". +include "basic_1A/pc3/left.ma". lemma csubt_pr2: \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pr2 c1 diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubt/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubt/props.ma similarity index 95% rename from matita/matita/contribs/lambdadelta/basic_1/csubt/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubt/props.ma index 31221463f..c129b355a 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubt/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubt/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubt/defs.ma". +include "basic_1A/csubt/defs.ma". -include "basic_1/C/fwd.ma". +include "basic_1A/C/fwd.ma". lemma csubt_refl: \forall (g: G).(\forall (c: C).(csubt g c c)) diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubt/ty3.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubt/ty3.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/csubt/ty3.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubt/ty3.ma index 7b3094bd1..e78356cb4 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubt/ty3.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubt/ty3.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubt/pc3.ma". +include "basic_1A/csubt/pc3.ma". -include "basic_1/csubt/props.ma". +include "basic_1A/csubt/props.ma". -include "basic_1/ty3/fwd.ma". +include "basic_1A/ty3/fwd.ma". lemma csubt_ty3: \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c1 diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubv/clear.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubv/clear.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/csubv/clear.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubv/clear.ma index 4f4a01272..549995bff 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubv/clear.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubv/clear.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubv/fwd.ma". +include "basic_1A/csubv/fwd.ma". -include "basic_1/clear/fwd.ma". +include "basic_1A/clear/fwd.ma". lemma csubv_clear_conf: \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall (b1: diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubv/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubv/defs.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/csubv/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubv/defs.ma index fe704a1ac..35e9715ed 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubv/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubv/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/C/defs.ma". +include "basic_1A/C/defs.ma". inductive csubv: C \to (C \to Prop) \def | csubv_sort: \forall (n: nat).(csubv (CSort n) (CSort n)) diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubv/drop.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubv/drop.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/csubv/drop.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubv/drop.ma index 0fb7bbceb..dacf29d95 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubv/drop.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubv/drop.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubv/props.ma". +include "basic_1A/csubv/props.ma". -include "basic_1/csubv/fwd.ma". +include "basic_1A/csubv/fwd.ma". -include "basic_1/drop/fwd.ma". +include "basic_1A/drop/fwd.ma". lemma csubv_drop_conf: \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall (e1: diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubv/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubv/fwd.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/csubv/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubv/fwd.ma index 23883b412..9c09f1921 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubv/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubv/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubv/defs.ma". +include "basic_1A/csubv/defs.ma". implied rec lemma csubv_ind (P: (C \to (C \to Prop))) (f: (\forall (n: nat).(P (CSort n) (CSort n)))) (f0: (\forall (c1: C).(\forall (c2: C).((csubv diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubv/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubv/getl.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/csubv/getl.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubv/getl.ma index f648b2323..42214ebae 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubv/getl.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubv/getl.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubv/clear.ma". +include "basic_1A/csubv/clear.ma". -include "basic_1/csubv/drop.ma". +include "basic_1A/csubv/drop.ma". -include "basic_1/getl/fwd.ma". +include "basic_1A/getl/fwd.ma". lemma csubv_getl_conf: \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall (b1: diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubv/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubv/props.ma similarity index 95% rename from matita/matita/contribs/lambdadelta/basic_1/csubv/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/csubv/props.ma index eb8448a1a..126841bd2 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/csubv/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubv/props.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubv/defs.ma". +include "basic_1A/csubv/defs.ma". -include "basic_1/C/fwd.ma". +include "basic_1A/C/fwd.ma". -include "basic_1/T/props.ma". +include "basic_1A/T/props.ma". lemma csubv_bind_same: \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall (b: B).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/definitions.ma b/matita/matita/contribs/lambdadelta/basic_1A/definitions.ma similarity index 56% rename from matita/matita/contribs/lambdadelta/basic_1/definitions.ma rename to matita/matita/contribs/lambdadelta/basic_1A/definitions.ma index 010b9d252..5d67783d9 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/definitions.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/definitions.ma @@ -14,55 +14,55 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/tlt/defs.ma". +include "basic_1A/tlt/defs.ma". -include "basic_1/iso/defs.ma". +include "basic_1A/iso/defs.ma". -include "basic_1/clen/defs.ma". +include "basic_1A/clen/defs.ma". -include "basic_1/flt/defs.ma". +include "basic_1A/flt/defs.ma". -include "basic_1/app/defs.ma". +include "basic_1A/app/defs.ma". -include "basic_1/cnt/defs.ma". +include "basic_1A/cnt/defs.ma". -include "basic_1/cimp/defs.ma". +include "basic_1A/cimp/defs.ma". -include "basic_1/subst1/defs.ma". +include "basic_1A/subst1/defs.ma". -include "basic_1/subst/defs.ma". +include "basic_1A/subst/defs.ma". -include "basic_1/csubst1/defs.ma". +include "basic_1A/csubst1/defs.ma". -include "basic_1/fsubst0/defs.ma". +include "basic_1A/fsubst0/defs.ma". -include "basic_1/next_plus/defs.ma". +include "basic_1A/next_plus/defs.ma". -include "basic_1/sty1/defs.ma". +include "basic_1A/sty1/defs.ma". -include "basic_1/llt/defs.ma". +include "basic_1A/llt/defs.ma". -include "basic_1/aprem/defs.ma". +include "basic_1A/aprem/defs.ma". -include "basic_1/ex0/defs.ma". +include "basic_1A/ex0/defs.ma". -include "basic_1/wcpr0/defs.ma". +include "basic_1A/wcpr0/defs.ma". -include "basic_1/csubv/defs.ma". +include "basic_1A/csubv/defs.ma". -include "basic_1/csuba/defs.ma". +include "basic_1A/csuba/defs.ma". -include "basic_1/nf2/defs.ma". +include "basic_1A/nf2/defs.ma". -include "basic_1/ex2/defs.ma". +include "basic_1A/ex2/defs.ma". -include "basic_1/csubc/defs.ma". +include "basic_1A/csubc/defs.ma". -include "basic_1/pc1/defs.ma". +include "basic_1A/pc1/defs.ma". -include "basic_1/ex1/defs.ma". +include "basic_1A/ex1/defs.ma". -include "basic_1/csubt/defs.ma". +include "basic_1A/csubt/defs.ma". -include "basic_1/wf3/defs.ma". +include "basic_1A/wf3/defs.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_1/drop/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/drop/defs.ma similarity index 94% rename from matita/matita/contribs/lambdadelta/basic_1/drop/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/drop/defs.ma index 426f37070..84e6796ae 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/drop/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/drop/defs.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/C/defs.ma". +include "basic_1A/C/defs.ma". -include "basic_1/lift/defs.ma". +include "basic_1A/lift/defs.ma". -include "basic_1/r/defs.ma". +include "basic_1A/r/defs.ma". inductive drop: nat \to (nat \to (C \to (C \to Prop))) \def | drop_refl: \forall (c: C).(drop O O c c) diff --git a/matita/matita/contribs/lambdadelta/basic_1/drop/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/drop/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/drop/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/drop/fwd.ma index 0b7876eea..eba1cbd80 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/drop/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/drop/fwd.ma @@ -14,13 +14,13 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/drop/defs.ma". +include "basic_1A/drop/defs.ma". -include "basic_1/lift/fwd.ma". +include "basic_1A/lift/fwd.ma". -include "basic_1/r/props.ma". +include "basic_1A/r/props.ma". -include "basic_1/C/fwd.ma". +include "basic_1A/C/fwd.ma". implied rec lemma drop_ind (P: (nat \to (nat \to (C \to (C \to Prop))))) (f: (\forall (c: C).(P O O c c))) (f0: (\forall (k: K).(\forall (h: nat).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/drop/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/drop/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/drop/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/drop/props.ma index 1d662e8d4..2e17e17a3 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/drop/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/drop/props.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/drop/fwd.ma". +include "basic_1A/drop/fwd.ma". lemma drop_skip_bind: \forall (h: nat).(\forall (d: nat).(\forall (c: C).(\forall (e: C).((drop h diff --git a/matita/matita/contribs/lambdadelta/basic_1/drop1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/drop1/defs.ma similarity index 96% rename from matita/matita/contribs/lambdadelta/basic_1/drop1/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/drop1/defs.ma index 41b084879..629dba9cd 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/drop1/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/drop1/defs.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/drop/defs.ma". +include "basic_1A/drop/defs.ma". -include "basic_1/lift1/defs.ma". +include "basic_1A/lift1/defs.ma". inductive drop1: PList \to (C \to (C \to Prop)) \def | drop1_nil: \forall (c: C).(drop1 PNil c c) diff --git a/matita/matita/contribs/lambdadelta/basic_1/drop1/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/drop1/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/drop1/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/drop1/fwd.ma index 319591895..33ff6983b 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/drop1/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/drop1/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/drop1/defs.ma". +include "basic_1A/drop1/defs.ma". implied rec lemma drop1_ind (P: (PList \to (C \to (C \to Prop)))) (f: (\forall (c: C).(P PNil c c))) (f0: (\forall (c1: C).(\forall (c2: diff --git a/matita/matita/contribs/lambdadelta/basic_1/drop1/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/drop1/getl.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/drop1/getl.ma rename to matita/matita/contribs/lambdadelta/basic_1A/drop1/getl.ma index 83889c30a..6b0ed898d 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/drop1/getl.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/drop1/getl.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/drop1/fwd.ma". +include "basic_1A/drop1/fwd.ma". -include "basic_1/getl/drop.ma". +include "basic_1A/getl/drop.ma". lemma drop1_getl_trans: \forall (hds: PList).(\forall (c1: C).(\forall (c2: C).((drop1 hds c2 c1) diff --git a/matita/matita/contribs/lambdadelta/basic_1/drop1/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/drop1/props.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/drop1/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/drop1/props.ma index 41b61d8b6..b604d7d79 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/drop1/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/drop1/props.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/drop1/fwd.ma". +include "basic_1A/drop1/fwd.ma". -include "basic_1/drop/props.ma". +include "basic_1A/drop/props.ma". -include "basic_1/getl/defs.ma". +include "basic_1A/getl/defs.ma". lemma drop1_skip_bind: \forall (b: B).(\forall (e: C).(\forall (hds: PList).(\forall (c: diff --git a/matita/matita/contribs/lambdadelta/basic_1/etc/performance.txt b/matita/matita/contribs/lambdadelta/basic_1A/etc/performance.txt similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_1/etc/performance.txt rename to matita/matita/contribs/lambdadelta/basic_1A/etc/performance.txt diff --git a/matita/matita/contribs/lambdadelta/basic_1/etc/planes.txt b/matita/matita/contribs/lambdadelta/basic_1A/etc/planes.txt similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_1/etc/planes.txt rename to matita/matita/contribs/lambdadelta/basic_1A/etc/planes.txt diff --git a/matita/matita/contribs/lambdadelta/basic_1/ex0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/ex0/defs.ma similarity index 96% rename from matita/matita/contribs/lambdadelta/basic_1/ex0/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/ex0/defs.ma index 546e03916..43bdf85e1 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/ex0/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/ex0/defs.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/A/defs.ma". +include "basic_1A/A/defs.ma". -include "basic_1/G/defs.ma". +include "basic_1A/G/defs.ma". definition gz: G diff --git a/matita/matita/contribs/lambdadelta/basic_1/ex0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/ex0/fwd.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/ex0/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/ex0/fwd.ma index 248d07e06..e0236a516 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/ex0/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/ex0/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/ex0/defs.ma". +include "basic_1A/ex0/defs.ma". implied rec lemma leqz_ind (P: (A \to (A \to Prop))) (f: (\forall (h1: nat).(\forall (h2: nat).(\forall (n1: nat).(\forall (n2: nat).((eq nat (plus diff --git a/matita/matita/contribs/lambdadelta/basic_1/ex0/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/ex0/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/ex0/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/ex0/props.ma index c115f9d6b..072b79e7a 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/ex0/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/ex0/props.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/ex0/fwd.ma". +include "basic_1A/ex0/fwd.ma". -include "basic_1/leq/fwd.ma". +include "basic_1A/leq/fwd.ma". -include "basic_1/aplus/props.ma". +include "basic_1A/aplus/props.ma". lemma aplus_gz_le: \forall (k: nat).(\forall (h: nat).(\forall (n: nat).((le h k) \to (eq A diff --git a/matita/matita/contribs/lambdadelta/basic_1/ex1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/ex1/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/ex1/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/ex1/defs.ma index 4da7cc4d6..bf7a59159 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/ex1/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/ex1/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/C/defs.ma". +include "basic_1A/C/defs.ma". definition ex1_c: C diff --git a/matita/matita/contribs/lambdadelta/basic_1/ex1/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/ex1/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/ex1/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/ex1/props.ma index 91ce1745b..aea8bcbf1 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/ex1/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/ex1/props.ma @@ -14,19 +14,19 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/ex1/defs.ma". +include "basic_1A/ex1/defs.ma". -include "basic_1/ty3/fwd.ma". +include "basic_1A/ty3/fwd.ma". -include "basic_1/pc3/fwd.ma". +include "basic_1A/pc3/fwd.ma". -include "basic_1/nf2/pr3.ma". +include "basic_1A/nf2/pr3.ma". -include "basic_1/nf2/props.ma". +include "basic_1A/nf2/props.ma". -include "basic_1/arity/defs.ma". +include "basic_1A/arity/defs.ma". -include "basic_1/leq/props.ma". +include "basic_1A/leq/props.ma". fact ex1__leq_sort_SS: \forall (g: G).(\forall (k: nat).(\forall (n: nat).(leq g (ASort k n) (asucc diff --git a/matita/matita/contribs/lambdadelta/basic_1/ex2/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/ex2/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/ex2/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/ex2/defs.ma index 6524d3114..29b444d1b 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/ex2/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/ex2/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/C/defs.ma". +include "basic_1A/C/defs.ma". definition ex2_c: C diff --git a/matita/matita/contribs/lambdadelta/basic_1/ex2/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/ex2/props.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/ex2/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/ex2/props.ma index 42c2de646..01c8eed26 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/ex2/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/ex2/props.ma @@ -14,13 +14,13 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/ex2/defs.ma". +include "basic_1A/ex2/defs.ma". -include "basic_1/nf2/defs.ma". +include "basic_1A/nf2/defs.ma". -include "basic_1/pr2/fwd.ma". +include "basic_1A/pr2/fwd.ma". -include "basic_1/arity/fwd.ma". +include "basic_1A/arity/fwd.ma". lemma ex2_nf2: nf2 ex2_c ex2_t diff --git a/matita/matita/contribs/lambdadelta/basic_1/flt/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/flt/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/flt/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/flt/defs.ma index 71e1028ee..58047be6c 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/flt/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/flt/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/C/defs.ma". +include "basic_1A/C/defs.ma". definition fweight: C \to (T \to nat) diff --git a/matita/matita/contribs/lambdadelta/basic_1/flt/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/flt/fwd.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/flt/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/flt/fwd.ma index a25e73916..77fc7fa48 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/flt/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/flt/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/flt/defs.ma". +include "basic_1A/flt/defs.ma". fact flt_wf__q_ind: \forall (P: ((C \to (T \to Prop)))).(((\forall (n: nat).((\lambda (P0: ((C diff --git a/matita/matita/contribs/lambdadelta/basic_1/flt/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/flt/props.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/flt/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/flt/props.ma index 395bb94a7..e81e73404 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/flt/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/flt/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/flt/defs.ma". +include "basic_1A/flt/defs.ma". -include "basic_1/C/props.ma". +include "basic_1A/C/props.ma". lemma flt_thead_sx: \forall (k: K).(\forall (c: C).(\forall (u: T).(\forall (t: T).(flt c u c diff --git a/matita/matita/contribs/lambdadelta/basic_1/fsubst0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/fsubst0/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/fsubst0/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/fsubst0/defs.ma index 8d5cc21e0..d7b32c4e4 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/fsubst0/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/fsubst0/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubst0/defs.ma". +include "basic_1A/csubst0/defs.ma". inductive fsubst0 (i: nat) (v: T) (c1: C) (t1: T): C \to (T \to Prop) \def | fsubst0_snd: \forall (t2: T).((subst0 i v t1 t2) \to (fsubst0 i v c1 t1 c1 diff --git a/matita/matita/contribs/lambdadelta/basic_1/fsubst0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/fsubst0/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/fsubst0/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/fsubst0/fwd.ma index 59ca03b0b..f47769718 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/fsubst0/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/fsubst0/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/fsubst0/defs.ma". +include "basic_1A/fsubst0/defs.ma". implied lemma fsubst0_ind: \forall (i: nat).(\forall (v: T).(\forall (c1: C).(\forall (t1: T).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/getl/clear.ma b/matita/matita/contribs/lambdadelta/basic_1A/getl/clear.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/getl/clear.ma rename to matita/matita/contribs/lambdadelta/basic_1A/getl/clear.ma index 0915f5f57..86081168b 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/getl/clear.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/getl/clear.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/getl/props.ma". +include "basic_1A/getl/props.ma". -include "basic_1/clear/drop.ma". +include "basic_1A/clear/drop.ma". lemma clear_getl_trans: \forall (i: nat).(\forall (c2: C).(\forall (c3: C).((getl i c2 c3) \to diff --git a/matita/matita/contribs/lambdadelta/basic_1/getl/dec.ma b/matita/matita/contribs/lambdadelta/basic_1A/getl/dec.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/getl/dec.ma rename to matita/matita/contribs/lambdadelta/basic_1A/getl/dec.ma index a8f4df8bd..1a4ebcbe4 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/getl/dec.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/getl/dec.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/getl/props.ma". +include "basic_1A/getl/props.ma". lemma getl_dec: \forall (c: C).(\forall (i: nat).(or (ex_3 C B T (\lambda (e: C).(\lambda diff --git a/matita/matita/contribs/lambdadelta/basic_1/getl/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/getl/defs.ma similarity index 94% rename from matita/matita/contribs/lambdadelta/basic_1/getl/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/getl/defs.ma index 9a21c5ece..e9efe1073 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/getl/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/getl/defs.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/drop/defs.ma". +include "basic_1A/drop/defs.ma". -include "basic_1/clear/defs.ma". +include "basic_1A/clear/defs.ma". inductive getl (h: nat) (c1: C) (c2: C): Prop \def | getl_intro: \forall (e: C).((drop h O c1 e) \to ((clear e c2) \to (getl h diff --git a/matita/matita/contribs/lambdadelta/basic_1/getl/drop.ma b/matita/matita/contribs/lambdadelta/basic_1A/getl/drop.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/getl/drop.ma rename to matita/matita/contribs/lambdadelta/basic_1A/getl/drop.ma index 6b8d9a268..3e1444c37 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/getl/drop.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/getl/drop.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/getl/props.ma". +include "basic_1A/getl/props.ma". -include "basic_1/clear/drop.ma". +include "basic_1A/clear/drop.ma". lemma getl_drop: \forall (b: B).(\forall (c: C).(\forall (e: C).(\forall (u: T).(\forall (h: diff --git a/matita/matita/contribs/lambdadelta/basic_1/getl/flt.ma b/matita/matita/contribs/lambdadelta/basic_1A/getl/flt.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/getl/flt.ma rename to matita/matita/contribs/lambdadelta/basic_1A/getl/flt.ma index 63876304a..a6161f484 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/getl/flt.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/getl/flt.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/getl/fwd.ma". +include "basic_1A/getl/fwd.ma". -include "basic_1/flt/props.ma". +include "basic_1A/flt/props.ma". lemma getl_flt: \forall (b: B).(\forall (c: C).(\forall (e: C).(\forall (u: T).(\forall (i: diff --git a/matita/matita/contribs/lambdadelta/basic_1/getl/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/getl/fwd.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/getl/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/getl/fwd.ma index 7390775d3..ef6d598c4 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/getl/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/getl/fwd.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/getl/defs.ma". +include "basic_1A/getl/defs.ma". -include "basic_1/drop/fwd.ma". +include "basic_1A/drop/fwd.ma". -include "basic_1/clear/fwd.ma". +include "basic_1A/clear/fwd.ma". implied lemma getl_ind: \forall (h: nat).(\forall (c1: C).(\forall (c2: C).(\forall (P: diff --git a/matita/matita/contribs/lambdadelta/basic_1/getl/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/getl/getl.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/getl/getl.ma rename to matita/matita/contribs/lambdadelta/basic_1A/getl/getl.ma index 64e331905..389ee523e 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/getl/getl.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/getl/getl.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/getl/drop.ma". +include "basic_1A/getl/drop.ma". -include "basic_1/getl/clear.ma". +include "basic_1A/getl/clear.ma". lemma getl_conf_le: \forall (i: nat).(\forall (a: C).(\forall (c: C).((getl i c a) \to (\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/getl/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/getl/props.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/getl/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/getl/props.ma index 56592c5e6..5ae39bf77 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/getl/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/getl/props.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/getl/fwd.ma". +include "basic_1A/getl/fwd.ma". -include "basic_1/clear/props.ma". +include "basic_1A/clear/props.ma". -include "basic_1/drop/props.ma". +include "basic_1A/drop/props.ma". lemma getl_refl: \forall (b: B).(\forall (c: C).(\forall (u: T).(getl O (CHead c (Bind b) u) diff --git a/matita/matita/contribs/lambdadelta/basic_1/iso/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/iso/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/iso/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/iso/defs.ma index 54a5e01fc..46050e257 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/iso/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/iso/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/T/defs.ma". +include "basic_1A/T/defs.ma". inductive iso: T \to (T \to Prop) \def | iso_sort: \forall (n1: nat).(\forall (n2: nat).(iso (TSort n1) (TSort n2))) diff --git a/matita/matita/contribs/lambdadelta/basic_1/iso/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/iso/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/iso/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/iso/fwd.ma index fc3550a4c..99770710f 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/iso/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/iso/fwd.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/iso/defs.ma". +include "basic_1A/iso/defs.ma". -include "basic_1/tlist/defs.ma". +include "basic_1A/tlist/defs.ma". implied lemma iso_ind: \forall (P: ((T \to (T \to Prop)))).(((\forall (n1: nat).(\forall (n2: diff --git a/matita/matita/contribs/lambdadelta/basic_1/iso/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/iso/props.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/iso/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/iso/props.ma index baef0f833..8accf58ec 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/iso/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/iso/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/T/fwd.ma". +include "basic_1A/T/fwd.ma". -include "basic_1/iso/fwd.ma". +include "basic_1A/iso/fwd.ma". lemma iso_refl: \forall (t: T).(iso t t) diff --git a/matita/matita/contribs/lambdadelta/basic_1/leq/asucc.ma b/matita/matita/contribs/lambdadelta/basic_1A/leq/asucc.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/leq/asucc.ma rename to matita/matita/contribs/lambdadelta/basic_1A/leq/asucc.ma index 42005d6ba..9453c4136 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/leq/asucc.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/leq/asucc.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/leq/props.ma". +include "basic_1A/leq/props.ma". lemma asucc_repl: \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g a1 a2) \to (leq g diff --git a/matita/matita/contribs/lambdadelta/basic_1/leq/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/leq/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/leq/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/leq/defs.ma index 45a4288aa..8c0605c64 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/leq/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/leq/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/aplus/defs.ma". +include "basic_1A/aplus/defs.ma". inductive leq (g: G): A \to (A \to Prop) \def | leq_sort: \forall (h1: nat).(\forall (h2: nat).(\forall (n1: nat).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/leq/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/leq/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/leq/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/leq/fwd.ma index 4fc6915b4..939990ad0 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/leq/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/leq/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/leq/defs.ma". +include "basic_1A/leq/defs.ma". implied rec lemma leq_ind (g: G) (P: (A \to (A \to Prop))) (f: (\forall (h1: nat).(\forall (h2: nat).(\forall (n1: nat).(\forall (n2: nat).(\forall (k: diff --git a/matita/matita/contribs/lambdadelta/basic_1/leq/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/leq/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/leq/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/leq/props.ma index 6eec6578a..624a3b829 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/leq/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/leq/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/leq/fwd.ma". +include "basic_1A/leq/fwd.ma". -include "basic_1/aplus/props.ma". +include "basic_1A/aplus/props.ma". lemma leq_refl: \forall (g: G).(\forall (a: A).(leq g a a)) diff --git a/matita/matita/contribs/lambdadelta/basic_1/lift/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/lift/defs.ma similarity index 96% rename from matita/matita/contribs/lambdadelta/basic_1/lift/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/lift/defs.ma index 6c5959228..4f50119b7 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/lift/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/lift/defs.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/tlist/defs.ma". +include "basic_1A/tlist/defs.ma". -include "basic_1/s/defs.ma". +include "basic_1A/s/defs.ma". rec definition lref_map (f: (nat \to nat)) (d: nat) (t: T) on t: T \def match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match diff --git a/matita/matita/contribs/lambdadelta/basic_1/lift/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/lift/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/lift/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/lift/fwd.ma index beb400a3f..88a0ecbe5 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/lift/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/lift/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/lift/props.ma". +include "basic_1A/lift/props.ma". lemma lift_gen_sort: \forall (h: nat).(\forall (d: nat).(\forall (n: nat).(\forall (t: T).((eq T diff --git a/matita/matita/contribs/lambdadelta/basic_1/lift/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/lift/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/lift/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/lift/props.ma index 610e02018..7df81819d 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/lift/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/lift/props.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/lift/defs.ma". +include "basic_1A/lift/defs.ma". -include "basic_1/s/props.ma". +include "basic_1A/s/props.ma". -include "basic_1/T/fwd.ma". +include "basic_1A/T/fwd.ma". lemma lift_sort: \forall (n: nat).(\forall (h: nat).(\forall (d: nat).(eq T (lift h d (TSort diff --git a/matita/matita/contribs/lambdadelta/basic_1/lift/tlt.ma b/matita/matita/contribs/lambdadelta/basic_1A/lift/tlt.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/lift/tlt.ma rename to matita/matita/contribs/lambdadelta/basic_1A/lift/tlt.ma index 5adcfd6d8..bc2ad0ac6 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/lift/tlt.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/lift/tlt.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/lift/props.ma". +include "basic_1A/lift/props.ma". -include "basic_1/tlt/props.ma". +include "basic_1A/tlt/props.ma". lemma lift_weight_map: \forall (t: T).(\forall (h: nat).(\forall (d: nat).(\forall (f: ((nat \to diff --git a/matita/matita/contribs/lambdadelta/basic_1/lift1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/lift1/defs.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/lift1/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/lift1/defs.ma index 4ab258905..c65accaae 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/lift1/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/lift1/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/lift/defs.ma". +include "basic_1A/lift/defs.ma". rec definition trans (hds: PList) on hds: nat \to nat \def \lambda (i: nat).(match hds with [PNil \Rightarrow i | (PCons h d hds0) \Rightarrow (let diff --git a/matita/matita/contribs/lambdadelta/basic_1/lift1/drop1.ma b/matita/matita/contribs/lambdadelta/basic_1A/lift1/drop1.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/lift1/drop1.ma rename to matita/matita/contribs/lambdadelta/basic_1A/lift1/drop1.ma index f5839c798..d15754dc0 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/lift1/drop1.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/lift1/drop1.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/lift/props.ma". +include "basic_1A/lift/props.ma". -include "basic_1/drop1/defs.ma". +include "basic_1A/drop1/defs.ma". lemma lift1_lift1: \forall (is1: PList).(\forall (is2: PList).(\forall (t: T).(eq T (lift1 is1 diff --git a/matita/matita/contribs/lambdadelta/basic_1/lift1/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/lift1/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/lift1/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/lift1/props.ma index 286dfbee3..8ff7f4d96 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/lift1/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/lift1/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/lift1/defs.ma". +include "basic_1A/lift1/defs.ma". -include "basic_1/lift/props.ma". +include "basic_1A/lift/props.ma". lemma lift1_sort: \forall (n: nat).(\forall (is: PList).(eq T (lift1 is (TSort n)) (TSort n))) diff --git a/matita/matita/contribs/lambdadelta/basic_1/llt/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/llt/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/llt/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/llt/defs.ma index 7d5bc550a..819ba1b1e 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/llt/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/llt/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/A/defs.ma". +include "basic_1A/A/defs.ma". rec definition lweight (a: A) on a: nat \def match a with [(ASort _ _) \Rightarrow O | (AHead a1 a2) \Rightarrow (S (plus (lweight a1) (lweight diff --git a/matita/matita/contribs/lambdadelta/basic_1/llt/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/llt/fwd.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/llt/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/llt/fwd.ma index 8d45d3775..65e029b8d 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/llt/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/llt/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/llt/defs.ma". +include "basic_1A/llt/defs.ma". fact llt_wf__q_ind: \forall (P: ((A \to Prop))).(((\forall (n: nat).((\lambda (P0: ((A \to diff --git a/matita/matita/contribs/lambdadelta/basic_1/llt/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/llt/props.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/llt/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/llt/props.ma index 0c7cef628..4e7b48eb4 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/llt/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/llt/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/llt/defs.ma". +include "basic_1A/llt/defs.ma". -include "basic_1/leq/fwd.ma". +include "basic_1A/leq/fwd.ma". lemma lweight_repl: \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g a1 a2) \to (eq nat diff --git a/matita/matita/contribs/lambdadelta/basic_1/next_plus/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/next_plus/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/next_plus/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/next_plus/defs.ma index 04e15b3cc..ee23d9f32 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/next_plus/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/next_plus/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/G/defs.ma". +include "basic_1A/G/defs.ma". rec definition next_plus (g: G) (n: nat) (i: nat) on i: nat \def match i with [O \Rightarrow n | (S i0) \Rightarrow (next g (next_plus g n i0))]. diff --git a/matita/matita/contribs/lambdadelta/basic_1/next_plus/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/next_plus/props.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/next_plus/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/next_plus/props.ma index 2f42fc60e..52d078554 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/next_plus/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/next_plus/props.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/next_plus/defs.ma". +include "basic_1A/next_plus/defs.ma". lemma next_plus_assoc: \forall (g: G).(\forall (n: nat).(\forall (h1: nat).(\forall (h2: nat).(eq diff --git a/matita/matita/contribs/lambdadelta/basic_1/nf2/arity.ma b/matita/matita/contribs/lambdadelta/basic_1A/nf2/arity.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/nf2/arity.ma rename to matita/matita/contribs/lambdadelta/basic_1A/nf2/arity.ma index c5b3b0a64..dd9b38e42 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/nf2/arity.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/nf2/arity.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/nf2/fwd.ma". +include "basic_1A/nf2/fwd.ma". -include "basic_1/arity/subst0.ma". +include "basic_1A/arity/subst0.ma". lemma arity_nf2_inv_all: \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a: A).((arity g c t diff --git a/matita/matita/contribs/lambdadelta/basic_1/nf2/dec.ma b/matita/matita/contribs/lambdadelta/basic_1A/nf2/dec.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/nf2/dec.ma rename to matita/matita/contribs/lambdadelta/basic_1A/nf2/dec.ma index d7211841f..6f100f932 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/nf2/dec.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/nf2/dec.ma @@ -14,13 +14,13 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/nf2/defs.ma". +include "basic_1A/nf2/defs.ma". -include "basic_1/pr2/clen.ma". +include "basic_1A/pr2/clen.ma". -include "basic_1/pr0/dec.ma". +include "basic_1A/pr0/dec.ma". -include "basic_1/C/props.ma". +include "basic_1A/C/props.ma". lemma nf2_dec: \forall (c: C).(\forall (t1: T).(or (nf2 c t1) (ex2 T (\lambda (t2: T).((eq diff --git a/matita/matita/contribs/lambdadelta/basic_1/nf2/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/nf2/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/nf2/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/nf2/defs.ma index 5b4849d7a..de146696c 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/nf2/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/nf2/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr2/defs.ma". +include "basic_1A/pr2/defs.ma". definition nf2: C \to (T \to Prop) diff --git a/matita/matita/contribs/lambdadelta/basic_1/nf2/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/nf2/fwd.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/nf2/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/nf2/fwd.ma index 06487b713..6173e8670 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/nf2/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/nf2/fwd.ma @@ -14,13 +14,13 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/nf2/defs.ma". +include "basic_1A/nf2/defs.ma". -include "basic_1/pr2/clen.ma". +include "basic_1A/pr2/clen.ma". -include "basic_1/subst0/dec.ma". +include "basic_1A/subst0/dec.ma". -include "basic_1/T/props.ma". +include "basic_1A/T/props.ma". lemma nf2_gen_lref: \forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c diff --git a/matita/matita/contribs/lambdadelta/basic_1/nf2/iso.ma b/matita/matita/contribs/lambdadelta/basic_1A/nf2/iso.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/nf2/iso.ma rename to matita/matita/contribs/lambdadelta/basic_1A/nf2/iso.ma index 39b827580..84c0293ee 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/nf2/iso.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/nf2/iso.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/nf2/pr3.ma". +include "basic_1A/nf2/pr3.ma". -include "basic_1/iso/props.ma". +include "basic_1A/iso/props.ma". lemma nf2_iso_appls_lref: \forall (c: C).(\forall (i: nat).((nf2 c (TLRef i)) \to (\forall (vs: diff --git a/matita/matita/contribs/lambdadelta/basic_1/nf2/lift1.ma b/matita/matita/contribs/lambdadelta/basic_1A/nf2/lift1.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/nf2/lift1.ma rename to matita/matita/contribs/lambdadelta/basic_1A/nf2/lift1.ma index 9e680d7e8..99d265419 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/nf2/lift1.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/nf2/lift1.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/nf2/props.ma". +include "basic_1A/nf2/props.ma". -include "basic_1/drop1/fwd.ma". +include "basic_1A/drop1/fwd.ma". lemma nf2_lift1: \forall (e: C).(\forall (hds: PList).(\forall (c: C).(\forall (t: T).((drop1 diff --git a/matita/matita/contribs/lambdadelta/basic_1/nf2/pr3.ma b/matita/matita/contribs/lambdadelta/basic_1A/nf2/pr3.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/nf2/pr3.ma rename to matita/matita/contribs/lambdadelta/basic_1A/nf2/pr3.ma index 5c6a686e9..962d57b44 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/nf2/pr3.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/nf2/pr3.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/nf2/defs.ma". +include "basic_1A/nf2/defs.ma". -include "basic_1/pr3/pr3.ma". +include "basic_1A/pr3/pr3.ma". lemma nf2_pr3_unfold: \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr3 c t1 t2) \to ((nf2 c diff --git a/matita/matita/contribs/lambdadelta/basic_1/nf2/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/nf2/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/nf2/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/nf2/props.ma index ccaa9eb52..61c1e8eaa 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/nf2/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/nf2/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/nf2/defs.ma". +include "basic_1A/nf2/defs.ma". -include "basic_1/pr2/fwd.ma". +include "basic_1A/pr2/fwd.ma". lemma nf2_sort: \forall (c: C).(\forall (n: nat).(nf2 c (TSort n))) diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc1/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/pc1/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pc1/defs.ma index 7fb3cd29a..264293dc7 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pc1/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc1/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr1/defs.ma". +include "basic_1A/pr1/defs.ma". definition pc1: T \to (T \to Prop) diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc1/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc1/props.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/pc1/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pc1/props.ma index 86e794a79..57a605088 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pc1/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc1/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pc1/defs.ma". +include "basic_1A/pc1/defs.ma". -include "basic_1/pr1/pr1.ma". +include "basic_1A/pr1/pr1.ma". lemma pc1_pr0_r: \forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (pc1 t1 t2))) diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc3/dec.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc3/dec.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/pc3/dec.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pc3/dec.ma index c8cca3131..55ed35fb8 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pc3/dec.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc3/dec.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/ty3/arity_props.ma". +include "basic_1A/ty3/arity_props.ma". -include "basic_1/nf2/fwd.ma". +include "basic_1A/nf2/fwd.ma". theorem pc3_dec: \forall (g: G).(\forall (c: C).(\forall (u1: T).(\forall (t1: T).((ty3 g c diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc3/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc3/defs.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/pc3/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pc3/defs.ma index a0c97231e..22679602b 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pc3/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc3/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr3/defs.ma". +include "basic_1A/pr3/defs.ma". definition pc3: C \to (T \to (T \to Prop)) diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc3/fsubst0.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc3/fsubst0.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/pc3/fsubst0.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pc3/fsubst0.ma index 61df1500c..f8f6eb313 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pc3/fsubst0.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc3/fsubst0.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pc3/left.ma". +include "basic_1A/pc3/left.ma". -include "basic_1/fsubst0/fwd.ma". +include "basic_1A/fsubst0/fwd.ma". -include "basic_1/csubst0/getl.ma". +include "basic_1A/csubst0/getl.ma". lemma pc3_pr2_fsubst0: \forall (c1: C).(\forall (t1: T).(\forall (t: T).((pr2 c1 t1 t) \to (\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc3/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc3/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/pc3/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pc3/fwd.ma index 99239c2a7..775f6e069 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pc3/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc3/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pc3/props.ma". +include "basic_1A/pc3/props.ma". lemma pc3_gen_sort: \forall (c: C).(\forall (m: nat).(\forall (n: nat).((pc3 c (TSort m) (TSort diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc3/left.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc3/left.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/pc3/left.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pc3/left.ma index 579d42b24..a4a1aa0b0 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pc3/left.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc3/left.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pc3/props.ma". +include "basic_1A/pc3/props.ma". implied rec lemma pc3_left_ind (c: C) (P: (T \to (T \to Prop))) (f: (\forall (t: T).(P t t))) (f0: (\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc3/nf2.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc3/nf2.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/pc3/nf2.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pc3/nf2.ma index 3ce4180a1..cc79e08e5 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pc3/nf2.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc3/nf2.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pc3/defs.ma". +include "basic_1A/pc3/defs.ma". -include "basic_1/nf2/pr3.ma". +include "basic_1A/nf2/pr3.ma". lemma pc3_nf2: \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pc3 c t1 t2) \to ((nf2 c diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc3/pc1.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc3/pc1.ma similarity index 94% rename from matita/matita/contribs/lambdadelta/basic_1/pc3/pc1.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pc3/pc1.ma index a629475c6..75648cfc8 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pc3/pc1.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc3/pc1.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pc3/defs.ma". +include "basic_1A/pc3/defs.ma". -include "basic_1/pc1/defs.ma". +include "basic_1A/pc1/defs.ma". -include "basic_1/pr3/pr1.ma". +include "basic_1A/pr3/pr1.ma". lemma pc3_pc1: \forall (t1: T).(\forall (t2: T).((pc1 t1 t2) \to (\forall (c: C).(pc3 c t1 diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc3/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc3/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/pc3/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pc3/props.ma index 8d8693596..af2a30106 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pc3/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc3/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pc3/defs.ma". +include "basic_1A/pc3/defs.ma". -include "basic_1/pr3/pr3.ma". +include "basic_1A/pr3/pr3.ma". lemma clear_pc3_trans: \forall (c2: C).(\forall (t1: T).(\forall (t2: T).((pc3 c2 t1 t2) \to diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc3/subst1.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc3/subst1.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/pc3/subst1.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pc3/subst1.ma index 1df35129b..dc3ec3088 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pc3/subst1.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc3/subst1.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pc3/props.ma". +include "basic_1A/pc3/props.ma". -include "basic_1/pr3/subst1.ma". +include "basic_1A/pr3/subst1.ma". lemma pc3_gen_cabbr: \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pc3 c t1 t2) \to (\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc3/wcpr0.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc3/wcpr0.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/pc3/wcpr0.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pc3/wcpr0.ma index a72a7e90d..91d464fba 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pc3/wcpr0.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc3/wcpr0.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pc3/props.ma". +include "basic_1A/pc3/props.ma". -include "basic_1/wcpr0/getl.ma". +include "basic_1A/wcpr0/getl.ma". fact pc3_wcpr0__pc3_wcpr0_t_aux: \forall (c1: C).(\forall (c2: C).((wcpr0 c1 c2) \to (\forall (k: K).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr0/dec.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr0/dec.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/pr0/dec.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr0/dec.ma index 889e82034..b5ccaf4da 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr0/dec.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr0/dec.ma @@ -14,13 +14,13 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr0/props.ma". +include "basic_1A/pr0/props.ma". -include "basic_1/subst0/dec.ma". +include "basic_1A/subst0/dec.ma". -include "basic_1/T/dec.ma". +include "basic_1A/T/dec.ma". -include "basic_1/T/props.ma". +include "basic_1A/T/props.ma". lemma nf0_dec: \forall (t1: T).(or (\forall (t2: T).((pr0 t1 t2) \to (eq T t1 t2))) (ex2 T diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr0/defs.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/pr0/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr0/defs.ma index 5f6bd58fb..bcbc781ea 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr0/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr0/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/subst0/defs.ma". +include "basic_1A/subst0/defs.ma". inductive pr0: T \to (T \to Prop) \def | pr0_refl: \forall (t: T).(pr0 t t) diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr0/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/pr0/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr0/fwd.ma index ad2f0e886..bff7d0b24 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr0/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr0/fwd.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr0/defs.ma". +include "basic_1A/pr0/defs.ma". -include "basic_1/subst0/fwd.ma". +include "basic_1A/subst0/fwd.ma". implied rec lemma pr0_ind (P: (T \to (T \to Prop))) (f: (\forall (t: T).(P t t))) (f0: (\forall (u1: T).(\forall (u2: T).((pr0 u1 u2) \to ((P u1 u2) \to diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr0/pr0.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr0/pr0.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/pr0/pr0.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr0/pr0.ma index d3a8f78c9..9687b04a1 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr0/pr0.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr0/pr0.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr0/subst0.ma". +include "basic_1A/pr0/subst0.ma". -include "basic_1/lift/tlt.ma". +include "basic_1A/lift/tlt.ma". -include "basic_1/tlt/fwd.ma". +include "basic_1A/tlt/fwd.ma". fact pr0_confluence__pr0_cong_upsilon_refl: \forall (b: B).((not (eq B b Abst)) \to (\forall (u0: T).(\forall (u3: diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr0/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr0/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/pr0/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr0/props.ma index d1c31fcc7..ea8ea680c 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr0/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr0/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr0/fwd.ma". +include "basic_1A/pr0/fwd.ma". -include "basic_1/subst0/props.ma". +include "basic_1A/subst0/props.ma". lemma pr0_lift: \forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (\forall (h: nat).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr0/subst0.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr0/subst0.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/pr0/subst0.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr0/subst0.ma index 95fb67571..93ca2592b 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr0/subst0.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr0/subst0.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr0/props.ma". +include "basic_1A/pr0/props.ma". -include "basic_1/subst0/subst0.ma". +include "basic_1A/subst0/subst0.ma". lemma pr0_subst0_back: \forall (u2: T).(\forall (t1: T).(\forall (t2: T).(\forall (i: nat).((subst0 diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr0/subst1.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr0/subst1.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/pr0/subst1.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr0/subst1.ma index 05a93172a..4026d1552 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr0/subst1.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr0/subst1.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr0/subst0.ma". +include "basic_1A/pr0/subst0.ma". -include "basic_1/subst1/fwd.ma". +include "basic_1A/subst1/fwd.ma". lemma pr0_delta1: \forall (u1: T).(\forall (u2: T).((pr0 u1 u2) \to (\forall (t1: T).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr1/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/pr1/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr1/defs.ma index b466ad925..cdd942ddd 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr1/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr1/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr0/defs.ma". +include "basic_1A/pr0/defs.ma". inductive pr1: T \to (T \to Prop) \def | pr1_refl: \forall (t: T).(pr1 t t) diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr1/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr1/fwd.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/pr1/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr1/fwd.ma index 8c9640c9f..1dd22f17f 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr1/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr1/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr1/defs.ma". +include "basic_1A/pr1/defs.ma". implied rec lemma pr1_ind (P: (T \to (T \to Prop))) (f: (\forall (t: T).(P t t))) (f0: (\forall (t2: T).(\forall (t1: T).((pr0 t1 t2) \to (\forall (t3: diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr1/pr1.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr1/pr1.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/pr1/pr1.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr1/pr1.ma index 60dbdbfaa..84590146c 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr1/pr1.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr1/pr1.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr1/props.ma". +include "basic_1A/pr1/props.ma". -include "basic_1/pr0/pr0.ma". +include "basic_1A/pr0/pr0.ma". lemma pr1_strip: \forall (t0: T).(\forall (t1: T).((pr1 t0 t1) \to (\forall (t2: T).((pr0 t0 diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr1/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr1/props.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/pr1/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr1/props.ma index 97a5e45d8..496e650ba 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr1/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr1/props.ma @@ -14,13 +14,13 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr1/fwd.ma". +include "basic_1A/pr1/fwd.ma". -include "basic_1/pr0/subst1.ma". +include "basic_1A/pr0/subst1.ma". -include "basic_1/subst1/props.ma". +include "basic_1A/subst1/props.ma". -include "basic_1/T/props.ma". +include "basic_1A/T/props.ma". lemma pr1_pr0: \forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (pr1 t1 t2))) diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr2/clen.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr2/clen.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/pr2/clen.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr2/clen.ma index b518e4360..7c9747ec9 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr2/clen.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr2/clen.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr2/props.ma". +include "basic_1A/pr2/props.ma". -include "basic_1/clen/getl.ma". +include "basic_1A/clen/getl.ma". lemma pr2_gen_ctail: \forall (k: K).(\forall (c: C).(\forall (u: T).(\forall (t1: T).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr2/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr2/defs.ma similarity index 95% rename from matita/matita/contribs/lambdadelta/basic_1/pr2/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr2/defs.ma index 1bcb0b108..1683cd25a 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr2/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr2/defs.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr0/defs.ma". +include "basic_1A/pr0/defs.ma". -include "basic_1/getl/defs.ma". +include "basic_1A/getl/defs.ma". inductive pr2: C \to (T \to (T \to Prop)) \def | pr2_free: \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr2/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr2/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/pr2/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr2/fwd.ma index 1c19f4a2f..7f8553f1a 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr2/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr2/fwd.ma @@ -14,13 +14,13 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr2/defs.ma". +include "basic_1A/pr2/defs.ma". -include "basic_1/pr0/fwd.ma". +include "basic_1A/pr0/fwd.ma". -include "basic_1/getl/clear.ma". +include "basic_1A/getl/clear.ma". -include "basic_1/getl/drop.ma". +include "basic_1A/getl/drop.ma". implied lemma pr2_ind: \forall (P: ((C \to (T \to (T \to Prop))))).(((\forall (c: C).(\forall (t1: diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr2/pr2.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr2/pr2.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/pr2/pr2.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr2/pr2.ma index 3151fc53c..4d7a0920c 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr2/pr2.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr2/pr2.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr2/defs.ma". +include "basic_1A/pr2/defs.ma". -include "basic_1/pr0/pr0.ma". +include "basic_1A/pr0/pr0.ma". -include "basic_1/getl/fwd.ma". +include "basic_1A/getl/fwd.ma". fact pr2_confluence__pr2_free_free: \forall (c: C).(\forall (t0: T).(\forall (t1: T).(\forall (t2: T).((pr0 t0 diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr2/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr2/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/pr2/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr2/props.ma index 5677ca53e..d449b910f 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr2/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr2/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr2/fwd.ma". +include "basic_1A/pr2/fwd.ma". -include "basic_1/pr0/subst0.ma". +include "basic_1A/pr0/subst0.ma". lemma pr2_thin_dx: \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr2/subst1.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr2/subst1.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/pr2/subst1.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr2/subst1.ma index 8f1063f8e..95a98ab88 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr2/subst1.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr2/subst1.ma @@ -14,13 +14,13 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr2/fwd.ma". +include "basic_1A/pr2/fwd.ma". -include "basic_1/pr0/subst1.ma". +include "basic_1A/pr0/subst1.ma". -include "basic_1/csubst1/getl.ma". +include "basic_1A/csubst1/getl.ma". -include "basic_1/subst1/subst1.ma". +include "basic_1A/subst1/subst1.ma". lemma pr2_delta1: \forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr3/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr3/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/pr3/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr3/defs.ma index 7430c894d..57297e8d8 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr3/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr3/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr2/defs.ma". +include "basic_1A/pr2/defs.ma". inductive pr3 (c: C): T \to (T \to Prop) \def | pr3_refl: \forall (t: T).(pr3 c t t) diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr3/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr3/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/pr3/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr3/fwd.ma index 7f9e46419..99999bad6 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr3/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr3/fwd.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr3/defs.ma". +include "basic_1A/pr3/defs.ma". -include "basic_1/pr2/fwd.ma". +include "basic_1A/pr2/fwd.ma". implied rec lemma pr3_ind (c: C) (P: (T \to (T \to Prop))) (f: (\forall (t: T).(P t t))) (f0: (\forall (t2: T).(\forall (t1: T).((pr2 c t1 t2) \to diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr3/iso.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr3/iso.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/pr3/iso.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr3/iso.ma index c56ee4c23..dca56eeb2 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr3/iso.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr3/iso.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr3/props.ma". +include "basic_1A/pr3/props.ma". -include "basic_1/iso/props.ma". +include "basic_1A/iso/props.ma". -include "basic_1/tlist/fwd.ma". +include "basic_1A/tlist/fwd.ma". lemma pr3_iso_appls_abbr: \forall (c: C).(\forall (d: C).(\forall (w: T).(\forall (i: nat).((getl i c diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr3/pr1.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr3/pr1.ma similarity index 96% rename from matita/matita/contribs/lambdadelta/basic_1/pr3/pr1.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr3/pr1.ma index 04878c2b9..59d537da8 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr3/pr1.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr3/pr1.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr3/defs.ma". +include "basic_1A/pr3/defs.ma". -include "basic_1/pr1/fwd.ma". +include "basic_1A/pr1/fwd.ma". lemma pr3_pr1: \forall (t1: T).(\forall (t2: T).((pr1 t1 t2) \to (\forall (c: C).(pr3 c t1 diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr3/pr3.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr3/pr3.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/pr3/pr3.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr3/pr3.ma index d973e0eb2..5369615ab 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr3/pr3.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr3/pr3.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr3/props.ma". +include "basic_1A/pr3/props.ma". -include "basic_1/pr2/pr2.ma". +include "basic_1A/pr2/pr2.ma". lemma pr3_strip: \forall (c: C).(\forall (t0: T).(\forall (t1: T).((pr3 c t0 t1) \to (\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr3/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr3/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/pr3/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr3/props.ma index c9cf9c301..ee6ad8995 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr3/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr3/props.ma @@ -14,13 +14,13 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr3/fwd.ma". +include "basic_1A/pr3/fwd.ma". -include "basic_1/pr3/pr1.ma". +include "basic_1A/pr3/pr1.ma". -include "basic_1/pr2/props.ma". +include "basic_1A/pr2/props.ma". -include "basic_1/pr1/props.ma". +include "basic_1A/pr1/props.ma". lemma clear_pr3_trans: \forall (c2: C).(\forall (t1: T).(\forall (t2: T).((pr3 c2 t1 t2) \to diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr3/subst1.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr3/subst1.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/pr3/subst1.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr3/subst1.ma index 3c2e56c05..648ce77fa 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr3/subst1.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr3/subst1.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr3/fwd.ma". +include "basic_1A/pr3/fwd.ma". -include "basic_1/pr2/subst1.ma". +include "basic_1A/pr2/subst1.ma". lemma pr3_subst1: \forall (c: C).(\forall (e: C).(\forall (v: T).(\forall (i: nat).((getl i c diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr3/wcpr0.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr3/wcpr0.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/pr3/wcpr0.ma rename to matita/matita/contribs/lambdadelta/basic_1A/pr3/wcpr0.ma index fa49b9855..1b59a294a 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/pr3/wcpr0.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr3/wcpr0.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr3/props.ma". +include "basic_1A/pr3/props.ma". -include "basic_1/wcpr0/getl.ma". +include "basic_1A/wcpr0/getl.ma". lemma pr3_wcpr0_t: \forall (c1: C).(\forall (c2: C).((wcpr0 c2 c1) \to (\forall (t1: diff --git a/matita/matita/contribs/lambdadelta/basic_1/preamble.ma b/matita/matita/contribs/lambdadelta/basic_1A/preamble.ma similarity index 96% rename from matita/matita/contribs/lambdadelta/basic_1/preamble.ma rename to matita/matita/contribs/lambdadelta/basic_1A/preamble.ma index 2354bcc2b..6b4b1d5f5 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/preamble.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/preamble.ma @@ -12,4 +12,4 @@ (* *) (**************************************************************************) -include "ground_1/theory.ma". +include "ground_1A/theory.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_1/r/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/r/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/r/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/r/defs.ma index 6108d3c05..6018cddb5 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/r/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/r/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/T/defs.ma". +include "basic_1A/T/defs.ma". definition r: K \to (nat \to nat) diff --git a/matita/matita/contribs/lambdadelta/basic_1/r/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/r/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/r/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/r/props.ma index 6dc07a0e1..9b990e04b 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/r/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/r/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/r/defs.ma". +include "basic_1A/r/defs.ma". -include "basic_1/s/defs.ma". +include "basic_1A/s/defs.ma". lemma r_S: \forall (k: K).(\forall (i: nat).(eq nat (r k (S i)) (S (r k i)))) diff --git a/matita/matita/contribs/lambdadelta/basic_1A/rect.txt b/matita/matita/contribs/lambdadelta/basic_1A/rect.txt new file mode 100644 index 000000000..cba309af3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/rect.txt @@ -0,0 +1,3 @@ +T_rect +A_rect +C_rect diff --git a/matita/matita/contribs/lambdadelta/basic_1/s/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/s/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/s/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/s/defs.ma index 9a2f29db9..3b8980e8d 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/s/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/s/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/T/defs.ma". +include "basic_1A/T/defs.ma". definition s: K \to (nat \to nat) diff --git a/matita/matita/contribs/lambdadelta/basic_1/s/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/s/fwd.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/s/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/s/fwd.ma index deac2dbd3..12290a148 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/s/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/s/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/s/defs.ma". +include "basic_1A/s/defs.ma". lemma s_inj: \forall (k: K).(\forall (i: nat).(\forall (j: nat).((eq nat (s k i) (s k j)) diff --git a/matita/matita/contribs/lambdadelta/basic_1/s/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/s/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/s/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/s/props.ma index 75318f07a..6f57eeb0e 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/s/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/s/props.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/s/defs.ma". +include "basic_1A/s/defs.ma". lemma s_S: \forall (k: K).(\forall (i: nat).(eq nat (s k (S i)) (S (s k i)))) diff --git a/matita/matita/contribs/lambdadelta/basic_1/sc3/arity.ma b/matita/matita/contribs/lambdadelta/basic_1A/sc3/arity.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/sc3/arity.ma rename to matita/matita/contribs/lambdadelta/basic_1A/sc3/arity.ma index 373c81691..abeeb54fe 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/sc3/arity.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/sc3/arity.ma @@ -14,13 +14,13 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubc/arity.ma". +include "basic_1A/csubc/arity.ma". -include "basic_1/csubc/getl.ma". +include "basic_1A/csubc/getl.ma". -include "basic_1/csubc/drop1.ma". +include "basic_1A/csubc/drop1.ma". -include "basic_1/csubc/props.ma". +include "basic_1A/csubc/props.ma". lemma sc3_arity_csubc: \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (a: A).((arity g c1 diff --git a/matita/matita/contribs/lambdadelta/basic_1/sc3/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/sc3/defs.ma similarity index 93% rename from matita/matita/contribs/lambdadelta/basic_1/sc3/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/sc3/defs.ma index 417868bc4..fb12ab26a 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/sc3/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/sc3/defs.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/sn3/defs.ma". +include "basic_1A/sn3/defs.ma". -include "basic_1/arity/defs.ma". +include "basic_1A/arity/defs.ma". -include "basic_1/drop1/defs.ma". +include "basic_1A/drop1/defs.ma". rec definition sc3 (g: G) (a: A) on a: C \to (T \to Prop) \def \lambda (c: C).(\lambda (t: T).(match a with [(ASort h n) \Rightarrow (land (arity g c t diff --git a/matita/matita/contribs/lambdadelta/basic_1/sc3/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/sc3/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/sc3/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/sc3/props.ma index 80da46d3c..e77002ee4 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/sc3/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/sc3/props.ma @@ -14,27 +14,27 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/sc3/defs.ma". +include "basic_1A/sc3/defs.ma". -include "basic_1/sn3/lift1.ma". +include "basic_1A/sn3/lift1.ma". -include "basic_1/nf2/lift1.ma". +include "basic_1A/nf2/lift1.ma". -include "basic_1/csuba/arity.ma". +include "basic_1A/csuba/arity.ma". -include "basic_1/arity/lift1.ma". +include "basic_1A/arity/lift1.ma". -include "basic_1/arity/aprem.ma". +include "basic_1A/arity/aprem.ma". -include "basic_1/llt/props.ma". +include "basic_1A/llt/props.ma". -include "basic_1/llt/fwd.ma". +include "basic_1A/llt/fwd.ma". -include "basic_1/drop1/getl.ma". +include "basic_1A/drop1/getl.ma". -include "basic_1/drop1/props.ma". +include "basic_1A/drop1/props.ma". -include "basic_1/lift1/drop1.ma". +include "basic_1A/lift1/drop1.ma". lemma sc3_arity_gen: \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a: A).((sc3 g a c diff --git a/matita/matita/contribs/lambdadelta/basic_1/sn3/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/sn3/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/sn3/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/sn3/defs.ma index d9ba6092c..85a0b7d04 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/sn3/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/sn3/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr3/defs.ma". +include "basic_1A/pr3/defs.ma". inductive sn3 (c: C): T \to Prop \def | sn3_sing: \forall (t1: T).(((\forall (t2: T).((((eq T t1 t2) \to (\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/sn3/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/sn3/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/sn3/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/sn3/fwd.ma index fe603b59c..aab289095 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/sn3/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/sn3/fwd.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/sn3/defs.ma". +include "basic_1A/sn3/defs.ma". -include "basic_1/pr3/props.ma". +include "basic_1A/pr3/props.ma". implied rec lemma sn3_ind (c: C) (P: (T \to Prop)) (f: (\forall (t1: T).(((\forall (t2: T).((((eq T t1 t2) \to (\forall (P0: Prop).P0))) \to ((pr3 diff --git a/matita/matita/contribs/lambdadelta/basic_1/sn3/lift1.ma b/matita/matita/contribs/lambdadelta/basic_1A/sn3/lift1.ma similarity index 96% rename from matita/matita/contribs/lambdadelta/basic_1/sn3/lift1.ma rename to matita/matita/contribs/lambdadelta/basic_1A/sn3/lift1.ma index 71d9e93fe..67e02385d 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/sn3/lift1.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/sn3/lift1.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/sn3/props.ma". +include "basic_1A/sn3/props.ma". -include "basic_1/drop1/fwd.ma". +include "basic_1A/drop1/fwd.ma". -include "basic_1/lift1/props.ma". +include "basic_1A/lift1/props.ma". lemma sns3_lifts1: \forall (e: C).(\forall (hds: PList).(\forall (c: C).((drop1 hds c e) \to diff --git a/matita/matita/contribs/lambdadelta/basic_1/sn3/nf2.ma b/matita/matita/contribs/lambdadelta/basic_1A/sn3/nf2.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/sn3/nf2.ma rename to matita/matita/contribs/lambdadelta/basic_1A/sn3/nf2.ma index e00736172..e00ecab57 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/sn3/nf2.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/sn3/nf2.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/sn3/fwd.ma". +include "basic_1A/sn3/fwd.ma". -include "basic_1/nf2/dec.ma". +include "basic_1A/nf2/dec.ma". -include "basic_1/nf2/pr3.ma". +include "basic_1A/nf2/pr3.ma". lemma sn3_nf2: \forall (c: C).(\forall (t: T).((nf2 c t) \to (sn3 c t))) diff --git a/matita/matita/contribs/lambdadelta/basic_1/sn3/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/sn3/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/sn3/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/sn3/props.ma index 1e1406155..fdab5af75 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/sn3/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/sn3/props.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/sn3/nf2.ma". +include "basic_1A/sn3/nf2.ma". -include "basic_1/nf2/iso.ma". +include "basic_1A/nf2/iso.ma". -include "basic_1/pr3/iso.ma". +include "basic_1A/pr3/iso.ma". lemma sn3_pr3_trans: \forall (c: C).(\forall (t1: T).((sn3 c t1) \to (\forall (t2: T).((pr3 c t1 diff --git a/matita/matita/contribs/lambdadelta/basic_1/spare.ma b/matita/matita/contribs/lambdadelta/basic_1A/spare.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/spare.ma rename to matita/matita/contribs/lambdadelta/basic_1A/spare.ma index 58a624eef..372b4f4b1 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/spare.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/spare.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/theory.ma". +include "basic_1A/theory.ma". axiom pc3_gen_appls_sort_abst: \forall (c: C).(\forall (vs: TList).(\forall (w: T).(\forall (u: T).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/sty0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/sty0/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/sty0/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/sty0/defs.ma index e4e0ca832..b197b3c3c 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/sty0/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/sty0/defs.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/G/defs.ma". +include "basic_1A/G/defs.ma". -include "basic_1/getl/defs.ma". +include "basic_1A/getl/defs.ma". inductive sty0 (g: G): C \to (T \to (T \to Prop)) \def | sty0_sort: \forall (c: C).(\forall (n: nat).(sty0 g c (TSort n) (TSort diff --git a/matita/matita/contribs/lambdadelta/basic_1/sty0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/sty0/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/sty0/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/sty0/fwd.ma index 0d05ca147..951d79ade 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/sty0/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/sty0/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/sty0/defs.ma". +include "basic_1A/sty0/defs.ma". implied rec lemma sty0_ind (g: G) (P: (C \to (T \to (T \to Prop)))) (f: (\forall (c: C).(\forall (n: nat).(P c (TSort n) (TSort (next g n)))))) (f0: diff --git a/matita/matita/contribs/lambdadelta/basic_1/sty0/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/sty0/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/sty0/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/sty0/props.ma index f75c1c75a..cb79d692a 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/sty0/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/sty0/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/sty0/fwd.ma". +include "basic_1A/sty0/fwd.ma". -include "basic_1/getl/drop.ma". +include "basic_1A/getl/drop.ma". lemma sty0_lift: \forall (g: G).(\forall (e: C).(\forall (t1: T).(\forall (t2: T).((sty0 g e diff --git a/matita/matita/contribs/lambdadelta/basic_1/sty1/cnt.ma b/matita/matita/contribs/lambdadelta/basic_1A/sty1/cnt.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/sty1/cnt.ma rename to matita/matita/contribs/lambdadelta/basic_1A/sty1/cnt.ma index 54354378c..0e04ba751 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/sty1/cnt.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/sty1/cnt.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/sty1/props.ma". +include "basic_1A/sty1/props.ma". -include "basic_1/cnt/props.ma". +include "basic_1A/cnt/props.ma". lemma sty1_cnt: \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t: T).((sty0 g c diff --git a/matita/matita/contribs/lambdadelta/basic_1/sty1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/sty1/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/sty1/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/sty1/defs.ma index 9b98d8a56..21e78e8cf 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/sty1/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/sty1/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/sty0/defs.ma". +include "basic_1A/sty0/defs.ma". inductive sty1 (g: G) (c: C) (t1: T): T \to Prop \def | sty1_sty0: \forall (t2: T).((sty0 g c t1 t2) \to (sty1 g c t1 t2)) diff --git a/matita/matita/contribs/lambdadelta/basic_1/sty1/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/sty1/fwd.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/sty1/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/sty1/fwd.ma index 7307b49ff..6f7b14a5a 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/sty1/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/sty1/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/sty1/defs.ma". +include "basic_1A/sty1/defs.ma". implied rec lemma sty1_ind (g: G) (c: C) (t1: T) (P: (T \to Prop)) (f: (\forall (t2: T).((sty0 g c t1 t2) \to (P t2)))) (f0: (\forall (t: T).((sty1 diff --git a/matita/matita/contribs/lambdadelta/basic_1/sty1/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/sty1/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/sty1/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/sty1/props.ma index 0780b7eeb..9b8a08e0b 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/sty1/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/sty1/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/sty1/fwd.ma". +include "basic_1A/sty1/fwd.ma". -include "basic_1/sty0/props.ma". +include "basic_1A/sty0/props.ma". theorem sty1_trans: \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t: T).((sty1 g c diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/subst/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/subst/defs.ma index 8d9ed5f07..b8b69b86c 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/subst/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/lift/defs.ma". +include "basic_1A/lift/defs.ma". rec definition subst (d: nat) (v: T) (t: T) on t: T \def match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (match (blt i d) with [true diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/subst/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/subst/props.ma index 3ba9fc8e6..cedfac72b 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/subst/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/subst/defs.ma". +include "basic_1A/subst/defs.ma". -include "basic_1/subst0/fwd.ma". +include "basic_1A/subst0/fwd.ma". lemma subst_sort: \forall (v: T).(\forall (d: nat).(\forall (k: nat).(eq T (subst d v (TSort diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst0/dec.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst0/dec.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/subst0/dec.ma rename to matita/matita/contribs/lambdadelta/basic_1A/subst0/dec.ma index 93aa0736a..6f4a1bbb9 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/subst0/dec.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst0/dec.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/subst0/defs.ma". +include "basic_1A/subst0/defs.ma". -include "basic_1/lift/props.ma". +include "basic_1A/lift/props.ma". lemma dnf_dec2: \forall (t: T).(\forall (d: nat).(or (\forall (w: T).(ex T (\lambda (v: diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst0/defs.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/subst0/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/subst0/defs.ma index fca79e9d9..9c42c7088 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/subst0/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst0/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/lift/defs.ma". +include "basic_1A/lift/defs.ma". inductive subst0: nat \to (T \to (T \to (T \to Prop))) \def | subst0_lref: \forall (v: T).(\forall (i: nat).(subst0 i v (TLRef i) (lift diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst0/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/subst0/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/subst0/fwd.ma index 930835ccb..48868931c 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/subst0/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst0/fwd.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/subst0/defs.ma". +include "basic_1A/subst0/defs.ma". -include "basic_1/lift/fwd.ma". +include "basic_1A/lift/fwd.ma". implied rec lemma subst0_ind (P: (nat \to (T \to (T \to (T \to Prop))))) (f: (\forall (v: T).(\forall (i: nat).(P i v (TLRef i) (lift (S i) O v))))) (f0: diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst0/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst0/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/subst0/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/subst0/props.ma index 762f85762..38ab424ef 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/subst0/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst0/props.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/subst0/fwd.ma". +include "basic_1A/subst0/fwd.ma". lemma subst0_refl: \forall (u: T).(\forall (t: T).(\forall (d: nat).((subst0 d u t t) \to diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst0/subst0.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst0/subst0.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/subst0/subst0.ma rename to matita/matita/contribs/lambdadelta/basic_1A/subst0/subst0.ma index 99caee518..bbd13a671 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/subst0/subst0.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst0/subst0.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/subst0/props.ma". +include "basic_1A/subst0/props.ma". -include "basic_1/s/fwd.ma". +include "basic_1A/s/fwd.ma". theorem subst0_subst0: \forall (t1: T).(\forall (t2: T).(\forall (u2: T).(\forall (j: nat).((subst0 diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst0/tlt.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst0/tlt.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/subst0/tlt.ma rename to matita/matita/contribs/lambdadelta/basic_1A/subst0/tlt.ma index 2d32fcad4..5309cecf4 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/subst0/tlt.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst0/tlt.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/subst0/fwd.ma". +include "basic_1A/subst0/fwd.ma". -include "basic_1/lift/tlt.ma". +include "basic_1A/lift/tlt.ma". lemma subst0_weight_le: \forall (u: T).(\forall (t: T).(\forall (z: T).(\forall (d: nat).((subst0 d diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst1/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/subst1/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/subst1/defs.ma index e54fcfcd3..c11379b33 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/subst1/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst1/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/subst0/defs.ma". +include "basic_1A/subst0/defs.ma". inductive subst1 (i: nat) (v: T) (t1: T): T \to Prop \def | subst1_refl: subst1 i v t1 t1 diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst1/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst1/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/subst1/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/subst1/fwd.ma index 48d11a44e..9552eaa41 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/subst1/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst1/fwd.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/subst1/defs.ma". +include "basic_1A/subst1/defs.ma". -include "basic_1/subst0/fwd.ma". +include "basic_1A/subst0/fwd.ma". implied lemma subst1_ind: \forall (i: nat).(\forall (v: T).(\forall (t1: T).(\forall (P: ((T \to diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst1/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst1/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/subst1/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/subst1/props.ma index f7bf1d15c..7bd1ea271 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/subst1/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst1/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/subst1/fwd.ma". +include "basic_1A/subst1/fwd.ma". -include "basic_1/subst0/props.ma". +include "basic_1A/subst0/props.ma". theorem subst1_head: \forall (v: T).(\forall (u1: T).(\forall (u2: T).(\forall (i: nat).((subst1 diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst1/subst1.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst1/subst1.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/subst1/subst1.ma rename to matita/matita/contribs/lambdadelta/basic_1A/subst1/subst1.ma index 9558c841f..fb466dc5f 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/subst1/subst1.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst1/subst1.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/subst1/fwd.ma". +include "basic_1A/subst1/fwd.ma". -include "basic_1/subst0/subst0.ma". +include "basic_1A/subst0/subst0.ma". theorem subst1_subst1: \forall (t1: T).(\forall (t2: T).(\forall (u2: T).(\forall (j: nat).((subst1 diff --git a/matita/matita/contribs/lambdadelta/basic_1/theory.ma b/matita/matita/contribs/lambdadelta/basic_1A/theory.ma similarity index 73% rename from matita/matita/contribs/lambdadelta/basic_1/theory.ma rename to matita/matita/contribs/lambdadelta/basic_1A/theory.ma index 771c60e75..5ad07a599 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/theory.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/theory.ma @@ -14,27 +14,27 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/subst0/tlt.ma". +include "basic_1A/subst0/tlt.ma". -include "basic_1/subst/props.ma". +include "basic_1A/subst/props.ma". -include "basic_1/sty1/cnt.ma". +include "basic_1A/sty1/cnt.ma". -include "basic_1/ex0/props.ma". +include "basic_1A/ex0/props.ma". -include "basic_1/pr3/wcpr0.ma". +include "basic_1A/pr3/wcpr0.ma". -include "basic_1/ex2/props.ma". +include "basic_1A/ex2/props.ma". -include "basic_1/ex1/props.ma". +include "basic_1A/ex1/props.ma". -include "basic_1/ty3/sty0.ma". +include "basic_1A/ty3/sty0.ma". -include "basic_1/csubt/csuba.ma". +include "basic_1A/csubt/csuba.ma". -include "basic_1/ty3/fwd_nf2.ma". +include "basic_1A/ty3/fwd_nf2.ma". -include "basic_1/ty3/nf2.ma". +include "basic_1A/ty3/nf2.ma". -include "basic_1/wf3/props.ma". +include "basic_1A/wf3/props.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_1/tlist/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/tlist/defs.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/tlist/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/tlist/defs.ma index d0eed7f52..7d892e9d5 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/tlist/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/tlist/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/T/defs.ma". +include "basic_1A/T/defs.ma". inductive TList: Type[0] \def | TNil: TList diff --git a/matita/matita/contribs/lambdadelta/basic_1/tlist/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/tlist/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/tlist/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/tlist/fwd.ma index 65b3b604f..cced52618 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/tlist/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/tlist/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/tlist/props.ma". +include "basic_1A/tlist/props.ma". fact tslt_wf__q_ind: \forall (P: ((TList \to Prop))).(((\forall (n: nat).((\lambda (P0: ((TList diff --git a/matita/matita/contribs/lambdadelta/basic_1/tlist/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/tlist/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/tlist/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/tlist/props.ma index 267f9d9ad..b0a0b9908 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/tlist/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/tlist/props.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/tlist/defs.ma". +include "basic_1A/tlist/defs.ma". lemma theads_tapp: \forall (k: K).(\forall (v: T).(\forall (t: T).(\forall (vs: TList).(eq T diff --git a/matita/matita/contribs/lambdadelta/basic_1/tlt/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/tlt/defs.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/tlt/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/tlt/defs.ma index 174740042..d40e8fd36 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/tlt/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/tlt/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/T/defs.ma". +include "basic_1A/T/defs.ma". definition wadd: ((nat \to nat)) \to (nat \to (nat \to nat)) diff --git a/matita/matita/contribs/lambdadelta/basic_1/tlt/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/tlt/fwd.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/tlt/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/tlt/fwd.ma index f53eb19dc..06c790ae7 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/tlt/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/tlt/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/tlt/defs.ma". +include "basic_1A/tlt/defs.ma". fact tlt_wf__q_ind: \forall (P: ((T \to Prop))).(((\forall (n: nat).((\lambda (P0: ((T \to diff --git a/matita/matita/contribs/lambdadelta/basic_1/tlt/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/tlt/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/tlt/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/tlt/props.ma index 6df71b39e..bb9621f0f 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/tlt/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/tlt/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/T/fwd.ma". +include "basic_1A/T/fwd.ma". -include "basic_1/tlt/defs.ma". +include "basic_1A/tlt/defs.ma". lemma wadd_le: \forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/arity.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/arity.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/ty3/arity.ma rename to matita/matita/contribs/lambdadelta/basic_1A/ty3/arity.ma index 438021239..116241de8 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/arity.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/arity.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/ty3/pr3_props.ma". +include "basic_1A/ty3/pr3_props.ma". -include "basic_1/arity/pr3.ma". +include "basic_1A/arity/pr3.ma". -include "basic_1/asucc/fwd.ma". +include "basic_1A/asucc/fwd.ma". lemma ty3_arity: \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/arity_props.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/arity_props.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/ty3/arity_props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/ty3/arity_props.ma index fb0df9eb3..846d98c25 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/arity_props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/arity_props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/ty3/arity.ma". +include "basic_1A/ty3/arity.ma". -include "basic_1/sc3/arity.ma". +include "basic_1A/sc3/arity.ma". lemma ty3_predicative: \forall (g: G).(\forall (c: C).(\forall (v: T).(\forall (t: T).(\forall (u: diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/dec.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/dec.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/ty3/dec.ma rename to matita/matita/contribs/lambdadelta/basic_1A/ty3/dec.ma index 7b2c899d7..8a4f655ff 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/dec.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/dec.ma @@ -14,13 +14,13 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pc3/dec.ma". +include "basic_1A/pc3/dec.ma". -include "basic_1/getl/flt.ma". +include "basic_1A/getl/flt.ma". -include "basic_1/getl/dec.ma". +include "basic_1A/getl/dec.ma". -include "basic_1/flt/fwd.ma". +include "basic_1A/flt/fwd.ma". lemma ty3_inference: \forall (g: G).(\forall (c: C).(\forall (t1: T).(or (ex T (\lambda (t2: diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/defs.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_1/ty3/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/ty3/defs.ma index 25311087d..93ca1339e 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/defs.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/G/defs.ma". +include "basic_1A/G/defs.ma". -include "basic_1/pc3/defs.ma". +include "basic_1A/pc3/defs.ma". inductive ty3 (g: G): C \to (T \to (T \to Prop)) \def | ty3_conv: \forall (c: C).(\forall (t2: T).(\forall (t: T).((ty3 g c t2 t) diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/fsubst0.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/fsubst0.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/ty3/fsubst0.ma rename to matita/matita/contribs/lambdadelta/basic_1A/ty3/fsubst0.ma index d6d6beb92..582e50f87 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/fsubst0.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/fsubst0.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/ty3/props.ma". +include "basic_1A/ty3/props.ma". -include "basic_1/pc3/fsubst0.ma". +include "basic_1A/pc3/fsubst0.ma". -include "basic_1/getl/getl.ma". +include "basic_1A/getl/getl.ma". lemma ty3_fsubst0: \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t: T).((ty3 g c1 diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/ty3/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/ty3/fwd.ma index 318a97986..560c0df32 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/fwd.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/ty3/defs.ma". +include "basic_1A/ty3/defs.ma". -include "basic_1/pc3/props.ma". +include "basic_1A/pc3/props.ma". implied rec lemma ty3_ind (g: G) (P: (C \to (T \to (T \to Prop)))) (f: (\forall (c: C).(\forall (t2: T).(\forall (t: T).((ty3 g c t2 t) \to ((P c t2 diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/fwd_nf2.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/fwd_nf2.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/ty3/fwd_nf2.ma rename to matita/matita/contribs/lambdadelta/basic_1A/ty3/fwd_nf2.ma index d98b4020c..7d5c0bec2 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/fwd_nf2.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/fwd_nf2.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/ty3/arity_props.ma". +include "basic_1A/ty3/arity_props.ma". -include "basic_1/pc3/nf2.ma". +include "basic_1A/pc3/nf2.ma". -include "basic_1/nf2/fwd.ma". +include "basic_1A/nf2/fwd.ma". lemma ty3_gen_appl_nf2: \forall (g: G).(\forall (c: C).(\forall (w: T).(\forall (v: T).(\forall (x: diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/nf2.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/nf2.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/ty3/nf2.ma rename to matita/matita/contribs/lambdadelta/basic_1A/ty3/nf2.ma index f5a2ebb24..1dc0e1ab6 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/nf2.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/nf2.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/ty3/arity.ma". +include "basic_1A/ty3/arity.ma". -include "basic_1/pc3/nf2.ma". +include "basic_1A/pc3/nf2.ma". -include "basic_1/nf2/arity.ma". +include "basic_1A/nf2/arity.ma". definition ty3_nf2_inv_abst_premise: C \to (T \to (T \to Prop)) diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/pr3.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/pr3.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/ty3/pr3.ma rename to matita/matita/contribs/lambdadelta/basic_1A/ty3/pr3.ma index 33f41ebe8..6a6279fab 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/pr3.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/pr3.ma @@ -14,17 +14,17 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/csubt/ty3.ma". +include "basic_1A/csubt/ty3.ma". -include "basic_1/ty3/subst1.ma". +include "basic_1A/ty3/subst1.ma". -include "basic_1/ty3/fsubst0.ma". +include "basic_1A/ty3/fsubst0.ma". -include "basic_1/pc3/pc1.ma". +include "basic_1A/pc3/pc1.ma". -include "basic_1/pc3/wcpr0.ma". +include "basic_1A/pc3/wcpr0.ma". -include "basic_1/pc1/props.ma". +include "basic_1A/pc1/props.ma". lemma ty3_sred_wcpr0_pr0: \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t: T).((ty3 g c1 diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/pr3_props.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/pr3_props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/ty3/pr3_props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/ty3/pr3_props.ma index 0b897b4f9..f12ad3934 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/pr3_props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/pr3_props.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/ty3/pr3.ma". +include "basic_1A/ty3/pr3.ma". lemma ty3_cred_pr2: \forall (g: G).(\forall (c: C).(\forall (v1: T).(\forall (v2: T).((pr2 c v1 diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/ty3/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/ty3/props.ma index d9a82d40e..c5743094b 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/ty3/fwd.ma". +include "basic_1A/ty3/fwd.ma". -include "basic_1/pc3/fwd.ma". +include "basic_1A/pc3/fwd.ma". lemma ty3_lift: \forall (g: G).(\forall (e: C).(\forall (t1: T).(\forall (t2: T).((ty3 g e diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/sty0.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/sty0.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/ty3/sty0.ma rename to matita/matita/contribs/lambdadelta/basic_1A/ty3/sty0.ma index e590a65e0..13831436d 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/sty0.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/sty0.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/ty3/pr3_props.ma". +include "basic_1A/ty3/pr3_props.ma". -include "basic_1/sty0/fwd.ma". +include "basic_1A/sty0/fwd.ma". lemma ty3_sty0: \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t1: T).((ty3 g c u diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/subst1.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/subst1.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/ty3/subst1.ma rename to matita/matita/contribs/lambdadelta/basic_1A/ty3/subst1.ma index 43a6d483c..bc80f9973 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/subst1.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/subst1.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/ty3/props.ma". +include "basic_1A/ty3/props.ma". -include "basic_1/pc3/subst1.ma". +include "basic_1A/pc3/subst1.ma". -include "basic_1/getl/getl.ma". +include "basic_1A/getl/getl.ma". lemma ty3_gen_cabbr: \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c diff --git a/matita/matita/contribs/lambdadelta/basic_1/wcpr0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/wcpr0/defs.ma similarity index 95% rename from matita/matita/contribs/lambdadelta/basic_1/wcpr0/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/wcpr0/defs.ma index feef3e87d..c7dafeb5a 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/wcpr0/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/wcpr0/defs.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/pr0/defs.ma". +include "basic_1A/pr0/defs.ma". -include "basic_1/C/defs.ma". +include "basic_1A/C/defs.ma". inductive wcpr0: C \to (C \to Prop) \def | wcpr0_refl: \forall (c: C).(wcpr0 c c) diff --git a/matita/matita/contribs/lambdadelta/basic_1/wcpr0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/wcpr0/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/wcpr0/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/wcpr0/fwd.ma index 8d4ccb52e..bcdd0eefe 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/wcpr0/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/wcpr0/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/wcpr0/defs.ma". +include "basic_1A/wcpr0/defs.ma". implied rec lemma wcpr0_ind (P: (C \to (C \to Prop))) (f: (\forall (c: C).(P c c))) (f0: (\forall (c1: C).(\forall (c2: C).((wcpr0 c1 c2) \to ((P c1 c2) diff --git a/matita/matita/contribs/lambdadelta/basic_1/wcpr0/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/wcpr0/getl.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/wcpr0/getl.ma rename to matita/matita/contribs/lambdadelta/basic_1A/wcpr0/getl.ma index 2b43bb21a..c9f09e78e 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/wcpr0/getl.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/wcpr0/getl.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/wcpr0/fwd.ma". +include "basic_1A/wcpr0/fwd.ma". -include "basic_1/getl/props.ma". +include "basic_1A/getl/props.ma". lemma wcpr0_drop: \forall (c1: C).(\forall (c2: C).((wcpr0 c1 c2) \to (\forall (h: diff --git a/matita/matita/contribs/lambdadelta/basic_1/wf3/clear.ma b/matita/matita/contribs/lambdadelta/basic_1A/wf3/clear.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/wf3/clear.ma rename to matita/matita/contribs/lambdadelta/basic_1A/wf3/clear.ma index 0199af19e..09abc1f78 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/wf3/clear.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/wf3/clear.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/wf3/fwd.ma". +include "basic_1A/wf3/fwd.ma". -include "basic_1/clear/fwd.ma". +include "basic_1A/clear/fwd.ma". lemma wf3_clear_conf: \forall (c1: C).(\forall (c: C).((clear c1 c) \to (\forall (g: G).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/wf3/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/wf3/defs.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/basic_1/wf3/defs.ma rename to matita/matita/contribs/lambdadelta/basic_1A/wf3/defs.ma index df5eedc6c..263f236df 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/wf3/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/wf3/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/ty3/defs.ma". +include "basic_1A/ty3/defs.ma". inductive wf3 (g: G): C \to (C \to Prop) \def | wf3_sort: \forall (m: nat).(wf3 g (CSort m) (CSort m)) diff --git a/matita/matita/contribs/lambdadelta/basic_1/wf3/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/wf3/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/wf3/fwd.ma rename to matita/matita/contribs/lambdadelta/basic_1A/wf3/fwd.ma index d4718ec6e..972e33fbb 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/wf3/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/wf3/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/wf3/defs.ma". +include "basic_1A/wf3/defs.ma". implied rec lemma wf3_ind (g: G) (P: (C \to (C \to Prop))) (f: (\forall (m: nat).(P (CSort m) (CSort m)))) (f0: (\forall (c1: C).(\forall (c2: C).((wf3 g diff --git a/matita/matita/contribs/lambdadelta/basic_1/wf3/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/wf3/getl.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/wf3/getl.ma rename to matita/matita/contribs/lambdadelta/basic_1A/wf3/getl.ma index 9c5fc73f5..3b49f4c96 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/wf3/getl.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/wf3/getl.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/wf3/clear.ma". +include "basic_1A/wf3/clear.ma". -include "basic_1/ty3/dec.ma". +include "basic_1A/ty3/dec.ma". lemma wf3_getl_conf: \forall (b: B).(\forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall diff --git a/matita/matita/contribs/lambdadelta/basic_1/wf3/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/wf3/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/wf3/props.ma rename to matita/matita/contribs/lambdadelta/basic_1A/wf3/props.ma index aec1f02ef..a79898ab3 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/wf3/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/wf3/props.ma @@ -14,9 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/wf3/ty3.ma". +include "basic_1A/wf3/ty3.ma". -include "basic_1/app/defs.ma". +include "basic_1A/app/defs.ma". lemma wf3_total: \forall (g: G).(\forall (c1: C).(ex C (\lambda (c2: C).(wf3 g c1 c2)))) diff --git a/matita/matita/contribs/lambdadelta/basic_1/wf3/ty3.ma b/matita/matita/contribs/lambdadelta/basic_1A/wf3/ty3.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/basic_1/wf3/ty3.ma rename to matita/matita/contribs/lambdadelta/basic_1A/wf3/ty3.ma index 2958902bd..00239346c 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/wf3/ty3.ma +++ b/matita/matita/contribs/lambdadelta/basic_1A/wf3/ty3.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "basic_1/wf3/getl.ma". +include "basic_1A/wf3/getl.ma". lemma wf3_pr2_conf: \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pr2 c1 diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpre.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpre.ma new file mode 100644 index 000000000..99be99cf7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpre.ma @@ -0,0 +1,35 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/predeval_4.ma". +include "basic_2A/computation/cprs.ma". +include "basic_2A/computation/csx.ma". + +(* EVALUATION FOR CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS *************) + +definition cpre: relation4 genv lenv term term ≝ + λG,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 ∧ ⦃G, L⦄ ⊢ ➡ 𝐍⦃T2⦄. + +interpretation "evaluation for context-sensitive parallel reduction (term)" + 'PRedEval G L T1 T2 = (cpre G L T1 T2). + +(* Basic properties *********************************************************) + +(* Basic_1: was just: nf2_sn3 *) +lemma csx_cpre: ∀h,g,G,L,T1. ⦃G, L⦄ ⊢ ⬊*[h, g] T1 → ∃T2. ⦃G, L⦄ ⊢ T1 ➡* 𝐍⦃T2⦄. +#h #g #G #L #T1 #H @(csx_ind … H) -T1 +#T1 #_ #IHT1 elim (cnr_dec G L T1) /3 width=3 by ex_intro, conj/ +* #T #H1T1 #H2T1 elim (IHT1 … H2T1) -IHT1 -H2T1 /2 width=2 by cpr_cpx/ +#T2 * /4 width=3 by cprs_strap2, ex_intro, conj/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpre_cpre.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpre_cpre.ma new file mode 100644 index 000000000..672c9b0c5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpre_cpre.ma @@ -0,0 +1,28 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/cprs_cprs.ma". +include "basic_2A/computation/cpre.ma". + +(* EVALUATION FOR CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS *************) + +(* Main properties *********************************************************) + +(* Basic_1: was: nf2_pr3_confluence *) +theorem cpre_mono: ∀G,L,T,T1. ⦃G, L⦄ ⊢ T ➡* 𝐍⦃T1⦄ → ∀T2. ⦃G, L⦄ ⊢ T ➡* 𝐍⦃T2⦄ → T1 = T2. +#G #L #T #T1 * #H1T1 #H2T1 #T2 * #H1T2 #H2T2 +elim (cprs_conf … H1T1 … H1T2) -T #T #HT1 +>(cprs_inv_cnr1 … HT1 H2T1) -T1 #HT2 +>(cprs_inv_cnr1 … HT2 H2T2) -T2 // +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cprs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cprs.ma new file mode 100644 index 000000000..8d71a75c4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cprs.ma @@ -0,0 +1,144 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/predstar_4.ma". +include "basic_2A/reduction/cnr.ma". + +(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************) + +(* Basic_1: includes: pr1_pr0 *) +definition cprs: relation4 genv lenv term term ≝ + λG. LTC … (cpr G). + +interpretation "context-sensitive parallel computation (term)" + 'PRedStar G L T1 T2 = (cprs G L T1 T2). + +(* Basic eliminators ********************************************************) + +lemma cprs_ind: ∀G,L,T1. ∀R:predicate term. R T1 → + (∀T,T2. ⦃G, L⦄ ⊢ T1 ➡* T → ⦃G, L⦄ ⊢ T ➡ T2 → R T → R T2) → + ∀T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → R T2. +#G #L #T1 #R #HT1 #IHT1 #T2 #HT12 +@(TC_star_ind … HT1 IHT1 … HT12) // +qed-. + +lemma cprs_ind_dx: ∀G,L,T2. ∀R:predicate term. R T2 → + (∀T1,T. ⦃G, L⦄ ⊢ T1 ➡ T → ⦃G, L⦄ ⊢ T ➡* T2 → R T → R T1) → + ∀T1. ⦃G, L⦄ ⊢ T1 ➡* T2 → R T1. +#G #L #T2 #R #HT2 #IHT2 #T1 #HT12 +@(TC_star_ind_dx … HT2 IHT2 … HT12) // +qed-. + +(* Basic properties *********************************************************) + +(* Basic_1: was: pr3_pr2 *) +lemma cpr_cprs: ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡ T2 → ⦃G, L⦄ ⊢ T1 ➡* T2. +/2 width=1 by inj/ qed. + +(* Basic_1: was: pr3_refl *) +lemma cprs_refl: ∀G,L,T. ⦃G, L⦄ ⊢ T ➡* T. +/2 width=1 by cpr_cprs/ qed. + +lemma cprs_strap1: ∀G,L,T1,T,T2. + ⦃G, L⦄ ⊢ T1 ➡* T → ⦃G, L⦄ ⊢ T ➡ T2 → ⦃G, L⦄ ⊢ T1 ➡* T2. +normalize /2 width=3 by step/ qed-. + +(* Basic_1: was: pr3_step *) +lemma cprs_strap2: ∀G,L,T1,T,T2. + ⦃G, L⦄ ⊢ T1 ➡ T → ⦃G, L⦄ ⊢ T ➡* T2 → ⦃G, L⦄ ⊢ T1 ➡* T2. +normalize /2 width=3 by TC_strap/ qed-. + +lemma lsubr_cprs_trans: ∀G. lsub_trans … (cprs G) lsubr. +/3 width=5 by lsubr_cpr_trans, LTC_lsub_trans/ +qed-. + +(* Basic_1: was: pr3_pr1 *) +lemma tprs_cprs: ∀G,L,T1,T2. ⦃G, ⋆⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ T1 ➡* T2. +/2 width=3 by lsubr_cprs_trans/ qed. + +lemma cprs_bind_dx: ∀G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡ V2 → ∀I,T1,T2. ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ➡* T2 → + ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1. T1 ➡* ⓑ{a,I}V2. T2. +#G #L #V1 #V2 #HV12 #I #T1 #T2 #HT12 #a @(cprs_ind_dx … HT12) -T1 +/3 width=3 by cprs_strap2, cpr_cprs, cpr_pair_sn, cpr_bind/ qed. + +(* Basic_1: was only: pr3_thin_dx *) +lemma cprs_flat_dx: ∀I,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡ V2 → ∀T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → + ⦃G, L⦄ ⊢ ⓕ{I} V1. T1 ➡* ⓕ{I} V2. T2. +#I #G #L #V1 #V2 #HV12 #T1 #T2 #HT12 @(cprs_ind … HT12) -T2 +/3 width=5 by cprs_strap1, cpr_flat, cpr_cprs, cpr_pair_sn/ +qed. + +lemma cprs_flat_sn: ∀I,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡ T2 → ∀V1,V2. ⦃G, L⦄ ⊢ V1 ➡* V2 → + ⦃G, L⦄ ⊢ ⓕ{I} V1. T1 ➡* ⓕ{I} V2. T2. +#I #G #L #T1 #T2 #HT12 #V1 #V2 #H @(cprs_ind … H) -V2 +/3 width=3 by cprs_strap1, cpr_cprs, cpr_pair_sn, cpr_flat/ +qed. + +lemma cprs_zeta: ∀G,L,V,T1,T,T2. ⬆[0, 1] T2 ≡ T → + ⦃G, L.ⓓV⦄ ⊢ T1 ➡* T → ⦃G, L⦄ ⊢ +ⓓV.T1 ➡* T2. +#G #L #V #T1 #T #T2 #HT2 #H @(cprs_ind_dx … H) -T1 +/3 width=3 by cprs_strap2, cpr_cprs, cpr_bind, cpr_zeta/ +qed. + +lemma cprs_eps: ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → ∀V. ⦃G, L⦄ ⊢ ⓝV.T1 ➡* T2. +#G #L #T1 #T2 #H @(cprs_ind … H) -T2 +/3 width=3 by cprs_strap1, cpr_cprs, cpr_eps/ +qed. + +lemma cprs_beta_dx: ∀a,G,L,V1,V2,W1,W2,T1,T2. + ⦃G, L⦄ ⊢ V1 ➡ V2 → ⦃G, L⦄ ⊢ W1 ➡ W2 → ⦃G, L.ⓛW1⦄ ⊢ T1 ➡* T2 → + ⦃G, L⦄ ⊢ ⓐV1.ⓛ{a}W1.T1 ➡* ⓓ{a}ⓝW2.V2.T2. +#a #G #L #V1 #V2 #W1 #W2 #T1 #T2 #HV12 #HW12 * -T2 +/4 width=7 by cprs_strap1, cpr_cprs, cprs_bind_dx, cprs_flat_dx, cpr_beta/ +qed. + +lemma cprs_theta_dx: ∀a,G,L,V1,V,V2,W1,W2,T1,T2. + ⦃G, L⦄ ⊢ V1 ➡ V → ⬆[0, 1] V ≡ V2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ➡* T2 → + ⦃G, L⦄ ⊢ W1 ➡ W2 → ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}W1.T1 ➡* ⓓ{a}W2.ⓐV2.T2. +#a #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 * -T2 +/4 width=9 by cprs_strap1, cpr_cprs, cprs_bind_dx, cprs_flat_dx, cpr_theta/ +qed. + +(* Basic inversion lemmas ***************************************************) + +(* Basic_1: was: pr3_gen_sort *) +lemma cprs_inv_sort1: ∀G,L,U2,k. ⦃G, L⦄ ⊢ ⋆k ➡* U2 → U2 = ⋆k. +#G #L #U2 #k #H @(cprs_ind … H) -U2 // +#U2 #U #_ #HU2 #IHU2 destruct +>(cpr_inv_sort1 … HU2) -HU2 // +qed-. + +(* Basic_1: was: pr3_gen_cast *) +lemma cprs_inv_cast1: ∀G,L,W1,T1,U2. ⦃G, L⦄ ⊢ ⓝW1.T1 ➡* U2 → ⦃G, L⦄ ⊢ T1 ➡* U2 ∨ + ∃∃W2,T2. ⦃G, L⦄ ⊢ W1 ➡* W2 & ⦃G, L⦄ ⊢ T1 ➡* T2 & U2 = ⓝW2.T2. +#G #L #W1 #T1 #U2 #H @(cprs_ind … H) -U2 /3 width=5 by ex3_2_intro, or_intror/ +#U2 #U #_ #HU2 * /3 width=3 by cprs_strap1, or_introl/ * +#W #T #HW1 #HT1 #H destruct +elim (cpr_inv_cast1 … HU2) -HU2 /3 width=3 by cprs_strap1, or_introl/ * +#W2 #T2 #HW2 #HT2 #H destruct /4 width=5 by cprs_strap1, ex3_2_intro, or_intror/ +qed-. + +(* Basic_1: was: nf2_pr3_unfold *) +lemma cprs_inv_cnr1: ∀G,L,T,U. ⦃G, L⦄ ⊢ T ➡* U → ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄ → T = U. +#G #L #T #U #H @(cprs_ind_dx … H) -T // +#T0 #T #H1T0 #_ #IHT #H2T0 +lapply (H2T0 … H1T0) -H1T0 #H destruct /2 width=1 by/ +qed-. + +(* Basic_1: removed theorems 13: + pr1_head_1 pr1_head_2 pr1_comp + clear_pr3_trans pr3_cflat pr3_gen_bind + pr3_head_1 pr3_head_2 pr3_head_21 pr3_head_12 + pr3_iso_appl_bind pr3_iso_appls_appl_bind pr3_iso_appls_bind +*) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cprs_cprs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cprs_cprs.ma new file mode 100644 index 000000000..79500576b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cprs_cprs.ma @@ -0,0 +1,155 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/lpr_lpr.ma". +include "basic_2A/computation/cprs_lift.ma". + +(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************) + +(* Main properties **********************************************************) + +(* Basic_1: was: pr3_t *) +(* Basic_1: includes: pr1_t *) +theorem cprs_trans: ∀G,L. Transitive … (cprs G L). +normalize /2 width=3 by trans_TC/ qed-. + +(* Basic_1: was: pr3_confluence *) +(* Basic_1: includes: pr1_confluence *) +theorem cprs_conf: ∀G,L. confluent2 … (cprs G L) (cprs G L). +normalize /3 width=3 by cpr_conf, TC_confluent2/ qed-. + +theorem cprs_bind: ∀a,I,G,L,V1,V2,T1,T2. ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ V1 ➡* V2 → + ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡* ⓑ{a,I}V2.T2. +#a #I #G #L #V1 #V2 #T1 #T2 #HT12 #H @(cprs_ind … H) -V2 +/3 width=5 by cprs_trans, cprs_bind_dx/ +qed. + +(* Basic_1: was: pr3_flat *) +theorem cprs_flat: ∀I,G,L,V1,V2,T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ V1 ➡* V2 → + ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ➡* ⓕ{I}V2.T2. +#I #G #L #V1 #V2 #T1 #T2 #HT12 #H @(cprs_ind … H) -V2 +/3 width=3 by cprs_flat_dx, cprs_strap1, cpr_pair_sn/ +qed. + +theorem cprs_beta_rc: ∀a,G,L,V1,V2,W1,W2,T1,T2. + ⦃G, L⦄ ⊢ V1 ➡ V2 → ⦃G, L.ⓛW1⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ W1 ➡* W2 → + ⦃G, L⦄ ⊢ ⓐV1.ⓛ{a}W1.T1 ➡* ⓓ{a}ⓝW2.V2.T2. +#a #G #L #V1 #V2 #W1 #W2 #T1 #T2 #HV12 #HT12 #H @(cprs_ind … H) -W2 /2 width=1 by cprs_beta_dx/ +#W #W2 #_ #HW2 #IHW1 (**) (* fulla uto too slow 14s *) +@(cprs_trans … IHW1) -IHW1 /3 width=1 by cprs_flat_dx, cprs_bind/ +qed. + +theorem cprs_beta: ∀a,G,L,V1,V2,W1,W2,T1,T2. + ⦃G, L.ⓛW1⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ W1 ➡* W2 → ⦃G, L⦄ ⊢ V1 ➡* V2 → + ⦃G, L⦄ ⊢ ⓐV1.ⓛ{a}W1.T1 ➡* ⓓ{a}ⓝW2.V2.T2. +#a #G #L #V1 #V2 #W1 #W2 #T1 #T2 #HT12 #HW12 #H @(cprs_ind … H) -V2 /2 width=1 by cprs_beta_rc/ +#V #V2 #_ #HV2 #IHV1 +@(cprs_trans … IHV1) -IHV1 /3 width=1 by cprs_flat_sn, cprs_bind/ +qed. + +theorem cprs_theta_rc: ∀a,G,L,V1,V,V2,W1,W2,T1,T2. + ⦃G, L⦄ ⊢ V1 ➡ V → ⬆[0, 1] V ≡ V2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ➡* T2 → + ⦃G, L⦄ ⊢ W1 ➡* W2 → ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}W1.T1 ➡* ⓓ{a}W2.ⓐV2.T2. +#a #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 #HT12 #H @(cprs_ind … H) -W2 +/3 width=5 by cprs_trans, cprs_theta_dx, cprs_bind_dx/ +qed. + +theorem cprs_theta: ∀a,G,L,V1,V,V2,W1,W2,T1,T2. + ⬆[0, 1] V ≡ V2 → ⦃G, L⦄ ⊢ W1 ➡* W2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ➡* T2 → + ⦃G, L⦄ ⊢ V1 ➡* V → ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}W1.T1 ➡* ⓓ{a}W2.ⓐV2.T2. +#a #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV2 #HW12 #HT12 #H @(cprs_ind_dx … H) -V1 +/3 width=3 by cprs_trans, cprs_theta_rc, cprs_flat_dx/ +qed. + +(* Advanced inversion lemmas ************************************************) + +(* Basic_1: was pr3_gen_appl *) +lemma cprs_inv_appl1: ∀G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓐV1.T1 ➡* U2 → + ∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡* V2 & ⦃G, L⦄ ⊢ T1 ➡* T2 & + U2 = ⓐV2. T2 + | ∃∃a,W,T. ⦃G, L⦄ ⊢ T1 ➡* ⓛ{a}W.T & + ⦃G, L⦄ ⊢ ⓓ{a}ⓝW.V1.T ➡* U2 + | ∃∃a,V0,V2,V,T. ⦃G, L⦄ ⊢ V1 ➡* V0 & ⬆[0,1] V0 ≡ V2 & + ⦃G, L⦄ ⊢ T1 ➡* ⓓ{a}V.T & + ⦃G, L⦄ ⊢ ⓓ{a}V.ⓐV2.T ➡* U2. +#G #L #V1 #T1 #U2 #H @(cprs_ind … H) -U2 /3 width=5 by or3_intro0, ex3_2_intro/ +#U #U2 #_ #HU2 * * +[ #V0 #T0 #HV10 #HT10 #H destruct + elim (cpr_inv_appl1 … HU2) -HU2 * + [ #V2 #T2 #HV02 #HT02 #H destruct /4 width=5 by cprs_strap1, or3_intro0, ex3_2_intro/ + | #a #V2 #W #W2 #T #T2 #HV02 #HW2 #HT2 #H1 #H2 destruct + lapply (cprs_strap1 … HV10 … HV02) -V0 #HV12 + lapply (lsubr_cpr_trans … HT2 (L.ⓓⓝW.V1) ?) -HT2 + /5 width=5 by cprs_bind, cprs_flat_dx, cpr_cprs, lsubr_beta, ex2_3_intro, or3_intro1/ + | #a #V #V2 #W0 #W2 #T #T2 #HV0 #HV2 #HW02 #HT2 #H1 #H2 destruct + /5 width=10 by cprs_flat_sn, cprs_bind_dx, cprs_strap1, ex4_5_intro, or3_intro2/ + ] +| /4 width=9 by cprs_strap1, or3_intro1, ex2_3_intro/ +| /4 width=11 by cprs_strap1, or3_intro2, ex4_5_intro/ +] +qed-. + +(* Properties concerning sn parallel reduction on local environments ********) + +(* Basic_1: was just: pr3_pr2_pr2_t *) +(* Basic_1: includes: pr3_pr0_pr2_t *) +lemma lpr_cpr_trans: ∀G. s_r_transitive … (cpr G) (λ_. lpr G). +#G #L2 #T1 #T2 #HT12 elim HT12 -G -L2 -T1 -T2 +[ /2 width=3 by/ +| #G #L2 #K2 #V0 #V2 #W2 #i #HLK2 #_ #HVW2 #IHV02 #L1 #HL12 + elim (lpr_drop_trans_O1 … HL12 … HLK2) -L2 #X #HLK1 #H + elim (lpr_inv_pair2 … H) -H #K1 #V1 #HK12 #HV10 #H destruct + /4 width=6 by cprs_strap2, cprs_delta/ +|3,7: /4 width=1 by lpr_pair, cprs_bind, cprs_beta/ +|4,6: /3 width=1 by cprs_flat, cprs_eps/ +|5,8: /4 width=3 by lpr_pair, cprs_zeta, cprs_theta, cprs_strap1/ +] +qed-. + +lemma cpr_bind2: ∀G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡ V2 → ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ➡ T2 → + ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡* ⓑ{a,I}V2.T2. +/4 width=5 by lpr_cpr_trans, cprs_bind_dx, lpr_pair/ qed. + +(* Advanced properties ******************************************************) + +(* Basic_1: was only: pr3_pr2_pr3_t pr3_wcpr0_t *) +lemma lpr_cprs_trans: ∀G. s_rs_transitive … (cpr G) (λ_. lpr G). +#G @s_r_trans_LTC1 /2 width=3 by lpr_cpr_trans/ (**) (* full auto fails *) +qed-. + +(* Basic_1: was: pr3_strip *) +(* Basic_1: includes: pr1_strip *) +lemma cprs_strip: ∀G,L. confluent2 … (cprs G L) (cpr G L). +normalize /4 width=3 by cpr_conf, TC_strip1/ qed-. + +lemma cprs_lpr_conf_dx: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡* T1 → ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → + ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡* T & ⦃G, L1⦄ ⊢ T0 ➡* T. +#G #L0 #T0 #T1 #H @(cprs_ind … H) -T1 /2 width=3 by ex2_intro/ +#T #T1 #_ #HT1 #IHT0 #L1 #HL01 elim (IHT0 … HL01) +#T2 #HT2 #HT02 elim (lpr_cpr_conf_dx … HT1 … HL01) -L0 +#T3 #HT3 #HT13 elim (cprs_strip … HT2 … HT3) -T +/4 width=5 by cprs_strap2, cprs_strap1, ex2_intro/ +qed-. + +lemma cprs_lpr_conf_sn: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡* T1 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → + ∃∃T. ⦃G, L0⦄ ⊢ T1 ➡* T & ⦃G, L1⦄ ⊢ T0 ➡* T. +#G #L0 #T0 #T1 #HT01 #L1 #HL01 elim (cprs_lpr_conf_dx … HT01 … HL01) -HT01 +/3 width=3 by lpr_cprs_trans, ex2_intro/ +qed-. + +lemma cprs_bind2_dx: ∀G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡ V2 → + ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ➡* T2 → + ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡* ⓑ{a,I}V2.T2. +/4 width=5 by lpr_cprs_trans, cprs_bind_dx, lpr_pair/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cprs_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cprs_lift.ma new file mode 100644 index 000000000..635f1e237 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cprs_lift.ma @@ -0,0 +1,60 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/cpr_lift.ma". +include "basic_2A/computation/cprs.ma". + +(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************) + +(* Advanced properties ******************************************************) + +(* Note: apparently this was missing in basic_1 *) +lemma cprs_delta: ∀G,L,K,V,V2,i. + ⬇[i] L ≡ K.ⓓV → ⦃G, K⦄ ⊢ V ➡* V2 → + ∀W2. ⬆[0, i + 1] V2 ≡ W2 → ⦃G, L⦄ ⊢ #i ➡* W2. +#G #L #K #V #V2 #i #HLK #H elim H -V2 [ /3 width=6 by cpr_cprs, cpr_delta/ ] +#V1 #V2 #_ #HV12 #IHV1 #W2 #HVW2 +lapply (drop_fwd_drop2 … HLK) -HLK #HLK +elim (lift_total V1 0 (i+1)) /4 width=12 by cpr_lift, cprs_strap1/ +qed. + +(* Advanced inversion lemmas ************************************************) + +(* Basic_1: was: pr3_gen_lref *) +lemma cprs_inv_lref1: ∀G,L,T2,i. ⦃G, L⦄ ⊢ #i ➡* T2 → + T2 = #i ∨ + ∃∃K,V1,T1. ⬇[i] L ≡ K.ⓓV1 & ⦃G, K⦄ ⊢ V1 ➡* T1 & + ⬆[0, i + 1] T1 ≡ T2. +#G #L #T2 #i #H @(cprs_ind … H) -T2 /2 width=1 by or_introl/ +#T #T2 #_ #HT2 * +[ #H destruct + elim (cpr_inv_lref1 … HT2) -HT2 /2 width=1 by or_introl/ + * /4 width=6 by cpr_cprs, ex3_3_intro, or_intror/ +| * #K #V1 #T1 #HLK #HVT1 #HT1 + lapply (drop_fwd_drop2 … HLK) #H0LK + elim (cpr_inv_lift1 … HT2 … H0LK … HT1) -H0LK -T + /4 width=6 by cprs_strap1, ex3_3_intro, or_intror/ +] +qed-. + +(* Relocation properties ****************************************************) + +(* Basic_1: was: pr3_lift *) +lemma cprs_lift: ∀G. d_liftable (cprs G). +/3 width=10 by d_liftable_LTC, cpr_lift/ qed. + +(* Basic_1: was: pr3_gen_lift *) +lemma cprs_inv_lift1: ∀G. d_deliftable_sn (cprs G). +/3 width=6 by d_deliftable_sn_LTC, cpr_inv_lift1/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxe.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxe.ma new file mode 100644 index 000000000..1bec07a92 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxe.ma @@ -0,0 +1,34 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/predeval_6.ma". +include "basic_2A/computation/cpxs.ma". +include "basic_2A/computation/csx.ma". + +(* EVALUATION FOR CONTEXT-SENSITIVE EXTENDED PARALLEL REDUCTION ON TERMS ****) + +definition cpxe: ∀h. sd h → relation4 genv lenv term term ≝ + λh,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 ∧ ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T2⦄. + +interpretation "evaluation for context-sensitive extended parallel reduction (term)" + 'PRedEval h g G L T1 T2 = (cpxe h g G L T1 T2). + +(* Basic properties *********************************************************) + +lemma csx_cpxe: ∀h,g,G,L,T1. ⦃G, L⦄ ⊢ ⬊*[h, g] T1 → ∃T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] 𝐍⦃T2⦄. +#h #g #G #L #T1 #H @(csx_ind … H) -T1 +#T1 #_ #IHT1 elim (cnx_dec h g G L T1) /3 width=3 by ex_intro, conj/ +* #T #H1T1 #H2T1 elim (IHT1 … H1T1 H2T1) -IHT1 -H2T1 +#T2 * /4 width=3 by cpxs_strap2, ex_intro, conj/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs.ma new file mode 100644 index 000000000..173808baa --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs.ma @@ -0,0 +1,181 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/predstar_6.ma". +include "basic_2A/reduction/cnx.ma". +include "basic_2A/computation/cprs.ma". + +(* CONTEXT-SENSITIVE EXTENDED PARALLEL COMPUTATION ON TERMS *****************) + +definition cpxs: ∀h. sd h → relation4 genv lenv term term ≝ + λh,g,G. LTC … (cpx h g G). + +interpretation "extended context-sensitive parallel computation (term)" + 'PRedStar h g G L T1 T2 = (cpxs h g G L T1 T2). + +(* Basic eliminators ********************************************************) + +lemma cpxs_ind: ∀h,g,G,L,T1. ∀R:predicate term. R T1 → + (∀T,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T → ⦃G, L⦄ ⊢ T ➡[h, g] T2 → R T → R T2) → + ∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → R T2. +#h #g #L #G #T1 #R #HT1 #IHT1 #T2 #HT12 +@(TC_star_ind … HT1 IHT1 … HT12) // +qed-. + +lemma cpxs_ind_dx: ∀h,g,G,L,T2. ∀R:predicate term. R T2 → + (∀T1,T. ⦃G, L⦄ ⊢ T1 ➡[h, g] T → ⦃G, L⦄ ⊢ T ➡*[h, g] T2 → R T → R T1) → + ∀T1. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → R T1. +#h #g #G #L #T2 #R #HT2 #IHT2 #T1 #HT12 +@(TC_star_ind_dx … HT2 IHT2 … HT12) // +qed-. + +(* Basic properties *********************************************************) + +lemma cpxs_refl: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ➡*[h, g] T. +/2 width=1 by inj/ qed. + +lemma cpx_cpxs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2. +/2 width=1 by inj/ qed. + +lemma cpxs_strap1: ∀h,g,G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T → + ∀T2. ⦃G, L⦄ ⊢ T ➡[h, g] T2 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2. +normalize /2 width=3 by step/ qed. + +lemma cpxs_strap2: ∀h,g,G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡[h, g] T → + ∀T2. ⦃G, L⦄ ⊢ T ➡*[h, g] T2 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2. +normalize /2 width=3 by TC_strap/ qed. + +lemma lsubr_cpxs_trans: ∀h,g,G. lsub_trans … (cpxs h g G) lsubr. +/3 width=5 by lsubr_cpx_trans, LTC_lsub_trans/ +qed-. + +lemma cprs_cpxs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2. +#h #g #G #L #T1 #T2 #H @(cprs_ind … H) -T2 /3 width=3 by cpxs_strap1, cpr_cpx/ +qed. + +lemma cpxs_sort: ∀h,g,G,L,k,d1. deg h g k d1 → + ∀d2. d2 ≤ d1 → ⦃G, L⦄ ⊢ ⋆k ➡*[h, g] ⋆((next h)^d2 k). +#h #g #G #L #k #d1 #Hkd1 #d2 @(nat_ind_plus … d2) -d2 /2 width=1 by cpx_cpxs/ +#d2 #IHd2 #Hd21 >iter_SO +@(cpxs_strap1 … (⋆(iter d2 ℕ (next h) k))) +[ /3 width=3 by lt_to_le/ +| @(cpx_st … (d1-d2-1)) iter_SO // + ] +] +qed-. + +lemma cpxs_inv_cast1: ∀h,g,G,L,W1,T1,U2. ⦃G, L⦄ ⊢ ⓝW1.T1 ➡*[h, g] U2 → + ∨∨ ∃∃W2,T2. ⦃G, L⦄ ⊢ W1 ➡*[h, g] W2 & ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 & U2 = ⓝW2.T2 + | ⦃G, L⦄ ⊢ T1 ➡*[h, g] U2 + | ⦃G, L⦄ ⊢ W1 ➡*[h, g] U2. +#h #g #G #L #W1 #T1 #U2 #H @(cpxs_ind … H) -U2 /3 width=5 by or3_intro0, ex3_2_intro/ +#U2 #U #_ #HU2 * /3 width=3 by cpxs_strap1, or3_intro1, or3_intro2/ * +#W #T #HW1 #HT1 #H destruct +elim (cpx_inv_cast1 … HU2) -HU2 /3 width=3 by cpxs_strap1, or3_intro1, or3_intro2/ * +#W2 #T2 #HW2 #HT2 #H destruct +lapply (cpxs_strap1 … HW1 … HW2) -W +lapply (cpxs_strap1 … HT1 … HT2) -T /3 width=5 by or3_intro0, ex3_2_intro/ +qed-. + +lemma cpxs_inv_cnx1: ∀h,g,G,L,T,U. ⦃G, L⦄ ⊢ T ➡*[h, g] U → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → T = U. +#h #g #G #L #T #U #H @(cpxs_ind_dx … H) -T // +#T0 #T #H1T0 #_ #IHT #H2T0 +lapply (H2T0 … H1T0) -H1T0 #H destruct /2 width=1 by/ +qed-. + +lemma cpxs_neq_inv_step_sn: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 = T2 → ⊥) → + ∃∃T. ⦃G, L⦄ ⊢ T1 ➡[h, g] T & T1 = T → ⊥ & ⦃G, L⦄ ⊢ T ➡*[h, g] T2. +#h #g #G #L #T1 #T2 #H @(cpxs_ind_dx … H) -T1 +[ #H elim H -H // +| #T1 #T #H1 #H2 #IH2 #H12 elim (eq_term_dec T1 T) #H destruct + [ -H1 -H2 /3 width=1 by/ + | -IH2 /3 width=4 by ex3_intro/ (**) (* auto fails without clear *) + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_aaa.ma new file mode 100644 index 000000000..f753b2816 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_aaa.ma @@ -0,0 +1,29 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/lpx_aaa.ma". +include "basic_2A/computation/cpxs.ma". + +(* CONTEXT-SENSITIVE EXTENDED PARALLEL COMPUTATION ON TERMS *****************) + +(* Properties about atomic arity assignment on terms ************************) + +lemma cpxs_aaa_conf: ∀h,g,G,L,T1,A. ⦃G, L⦄ ⊢ T1 ⁝ A → + ∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L⦄ ⊢ T2 ⁝ A. +#h #g #G #L #T1 #A #HT1 #T2 #HT12 +@(TC_Conf3 … HT1 ? HT12) -A -T1 -T2 /2 width=5 by cpx_aaa_conf/ +qed-. + +lemma cprs_aaa_conf: ∀G,L,T1,A. ⦃G, L⦄ ⊢ T1 ⁝ A → ∀T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ T2 ⁝ A. +/3 width=5 by cpxs_aaa_conf, cprs_cpxs/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_cpxs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_cpxs.ma new file mode 100644 index 000000000..61002527e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_cpxs.ma @@ -0,0 +1,187 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/lpx_drop.ma". +include "basic_2A/computation/cpxs_lift.ma". + +(* CONTEXT-SENSITIVE EXTENDED PARALLEL COMPUTATION ON TERMS *****************) + +(* Main properties **********************************************************) + +theorem cpxs_trans: ∀h,g,G,L. Transitive … (cpxs h g G L). +normalize /2 width=3 by trans_TC/ qed-. + +theorem cpxs_bind: ∀h,g,a,I,G,L,V1,V2,T1,T2. ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ➡*[h, g] T2 → + ⦃G, L⦄ ⊢ V1 ➡*[h, g] V2 → + ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡*[h, g] ⓑ{a,I}V2.T2. +#h #g #a #I #G #L #V1 #V2 #T1 #T2 #HT12 #H @(cpxs_ind … H) -V2 +/3 width=5 by cpxs_trans, cpxs_bind_dx/ +qed. + +theorem cpxs_flat: ∀h,g,I,G,L,V1,V2,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → + ⦃G, L⦄ ⊢ V1 ➡*[h, g] V2 → + ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ➡*[h, g] ⓕ{I}V2.T2. +#h #g #I #G #L #V1 #V2 #T1 #T2 #HT12 #H @(cpxs_ind … H) -V2 +/3 width=5 by cpxs_trans, cpxs_flat_dx/ +qed. + +theorem cpxs_beta_rc: ∀h,g,a,G,L,V1,V2,W1,W2,T1,T2. + ⦃G, L⦄ ⊢ V1 ➡[h, g] V2 → ⦃G, L.ⓛW1⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L⦄ ⊢ W1 ➡*[h, g] W2 → + ⦃G, L⦄ ⊢ ⓐV1.ⓛ{a}W1.T1 ➡*[h, g] ⓓ{a}ⓝW2.V2.T2. +#h #g #a #G #L #V1 #V2 #W1 #W2 #T1 #T2 #HV12 #HT12 #H @(cpxs_ind … H) -W2 +/4 width=5 by cpxs_trans, cpxs_beta_dx, cpxs_bind_dx, cpx_pair_sn/ +qed. + +theorem cpxs_beta: ∀h,g,a,G,L,V1,V2,W1,W2,T1,T2. + ⦃G, L.ⓛW1⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L⦄ ⊢ W1 ➡*[h, g] W2 → ⦃G, L⦄ ⊢ V1 ➡*[h, g] V2 → + ⦃G, L⦄ ⊢ ⓐV1.ⓛ{a}W1.T1 ➡*[h, g] ⓓ{a}ⓝW2.V2.T2. +#h #g #a #G #L #V1 #V2 #W1 #W2 #T1 #T2 #HT12 #HW12 #H @(cpxs_ind … H) -V2 +/4 width=5 by cpxs_trans, cpxs_beta_rc, cpxs_bind_dx, cpx_flat/ +qed. + +theorem cpxs_theta_rc: ∀h,g,a,G,L,V1,V,V2,W1,W2,T1,T2. + ⦃G, L⦄ ⊢ V1 ➡[h, g] V → ⬆[0, 1] V ≡ V2 → + ⦃G, L.ⓓW1⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L⦄ ⊢ W1 ➡*[h, g] W2 → + ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}W1.T1 ➡*[h, g] ⓓ{a}W2.ⓐV2.T2. +#h #g #a #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 #HT12 #H @(cpxs_ind … H) -W2 +/3 width=5 by cpxs_trans, cpxs_theta_dx, cpxs_bind_dx/ +qed. + +theorem cpxs_theta: ∀h,g,a,G,L,V1,V,V2,W1,W2,T1,T2. + ⬆[0, 1] V ≡ V2 → ⦃G, L⦄ ⊢ W1 ➡*[h, g] W2 → + ⦃G, L.ⓓW1⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L⦄ ⊢ V1 ➡*[h, g] V → + ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}W1.T1 ➡*[h, g] ⓓ{a}W2.ⓐV2.T2. +#h #g #a #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV2 #HW12 #HT12 #H @(TC_ind_dx … V1 H) -V1 +/3 width=5 by cpxs_trans, cpxs_theta_rc, cpxs_flat_dx/ +qed. + +(* Advanced inversion lemmas ************************************************) + +lemma cpxs_inv_appl1: ∀h,g,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓐV1.T1 ➡*[h, g] U2 → + ∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡*[h, g] V2 & ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 & + U2 = ⓐV2. T2 + | ∃∃a,W,T. ⦃G, L⦄ ⊢ T1 ➡*[h, g] ⓛ{a}W.T & ⦃G, L⦄ ⊢ ⓓ{a}ⓝW.V1.T ➡*[h, g] U2 + | ∃∃a,V0,V2,V,T. ⦃G, L⦄ ⊢ V1 ➡*[h, g] V0 & ⬆[0,1] V0 ≡ V2 & + ⦃G, L⦄ ⊢ T1 ➡*[h, g] ⓓ{a}V.T & ⦃G, L⦄ ⊢ ⓓ{a}V.ⓐV2.T ➡*[h, g] U2. +#h #g #G #L #V1 #T1 #U2 #H @(cpxs_ind … H) -U2 [ /3 width=5 by or3_intro0, ex3_2_intro/ ] +#U #U2 #_ #HU2 * * +[ #V0 #T0 #HV10 #HT10 #H destruct + elim (cpx_inv_appl1 … HU2) -HU2 * + [ #V2 #T2 #HV02 #HT02 #H destruct /4 width=5 by cpxs_strap1, or3_intro0, ex3_2_intro/ + | #a #V2 #W #W2 #T #T2 #HV02 #HW2 #HT2 #H1 #H2 destruct + lapply (cpxs_strap1 … HV10 … HV02) -V0 #HV12 + lapply (lsubr_cpx_trans … HT2 (L.ⓓⓝW.V1) ?) -HT2 + /5 width=5 by cpxs_bind, cpxs_flat_dx, cpx_cpxs, lsubr_beta, ex2_3_intro, or3_intro1/ + | #a #V #V2 #W0 #W2 #T #T2 #HV0 #HV2 #HW02 #HT2 #H1 #H2 destruct + /5 width=10 by cpxs_flat_sn, cpxs_bind_dx, cpxs_strap1, ex4_5_intro, or3_intro2/ + ] +| /4 width=9 by cpxs_strap1, or3_intro1, ex2_3_intro/ +| /4 width=11 by cpxs_strap1, or3_intro2, ex4_5_intro/ +] +qed-. + +(* Properties on sn extended parallel reduction for local environments ******) + +lemma lpx_cpx_trans: ∀h,g,G. s_r_transitive … (cpx h g G) (λ_.lpx h g G). +#h #g #G #L2 #T1 #T2 #HT12 elim HT12 -G -L2 -T1 -T2 +[ /2 width=3 by/ +| /3 width=2 by cpx_cpxs, cpx_st/ +| #I #G #L2 #K2 #V0 #V2 #W2 #i #HLK2 #_ #HVW2 #IHV02 #L1 #HL12 + elim (lpx_drop_trans_O1 … HL12 … HLK2) -L2 #X #HLK1 #H + elim (lpx_inv_pair2 … H) -H #K1 #V1 #HK12 #HV10 #H destruct + /4 width=7 by cpxs_delta, cpxs_strap2/ +|4,9: /4 width=1 by cpxs_beta, cpxs_bind, lpx_pair/ +|5,7,8: /3 width=1 by cpxs_flat, cpxs_ct, cpxs_eps/ +| /4 width=3 by cpxs_zeta, lpx_pair/ +| /4 width=3 by cpxs_theta, cpxs_strap1, lpx_pair/ +] +qed-. + +lemma cpx_bind2: ∀h,g,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡[h, g] V2 → + ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ➡[h, g] T2 → + ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡*[h, g] ⓑ{a,I}V2.T2. +/4 width=5 by lpx_cpx_trans, cpxs_bind_dx, lpx_pair/ qed. + +(* Advanced properties ******************************************************) + +lemma lpx_cpxs_trans: ∀h,g,G. s_rs_transitive … (cpx h g G) (λ_.lpx h g G). +#h #g #G @s_r_trans_LTC1 /2 width=3 by lpx_cpx_trans/ (**) (* full auto fails *) +qed-. + +lemma cpxs_bind2_dx: ∀h,g,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡[h, g] V2 → + ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ➡*[h, g] T2 → + ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡*[h, g] ⓑ{a,I}V2.T2. +/4 width=5 by lpx_cpxs_trans, cpxs_bind_dx, lpx_pair/ qed. + +(* Properties on supclosure *************************************************) + +lemma fqu_cpxs_trans_neq: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 → (T2 = U2 → ⊥) → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐ ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +[ #I #G #L #V1 #V2 #HV12 #_ elim (lift_total V2 0 1) + #U2 #HVU2 @(ex3_intro … U2) + [1,3: /3 width=7 by fqu_drop, cpxs_delta, drop_pair, drop_drop/ + | #H destruct /2 width=7 by lift_inv_lref2_be/ + ] +| #I #G #L #V1 #T #V2 #HV12 #H @(ex3_intro … (②{I}V2.T)) + [1,3: /2 width=4 by fqu_pair_sn, cpxs_pair_sn/ + | #H0 destruct /2 width=1 by/ + ] +| #a #I #G #L #V #T1 #T2 #HT12 #H @(ex3_intro … (ⓑ{a,I}V.T2)) + [1,3: /2 width=4 by fqu_bind_dx, cpxs_bind/ + | #H0 destruct /2 width=1 by/ + ] +| #I #G #L #V #T1 #T2 #HT12 #H @(ex3_intro … (ⓕ{I}V.T2)) + [1,3: /2 width=4 by fqu_flat_dx, cpxs_flat/ + | #H0 destruct /2 width=1 by/ + ] +| #G #L #K #T1 #U1 #m #HLK #HTU1 #T2 #HT12 #H elim (lift_total T2 0 (m+1)) + #U2 #HTU2 @(ex3_intro … U2) + [1,3: /2 width=10 by cpxs_lift, fqu_drop/ + | #H0 destruct /3 width=5 by lift_inj/ +] +qed-. + +lemma fquq_cpxs_trans_neq: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 → (T2 = U2 → ⊥) → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐⸮ ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fquq_inv_gen … H12) -H12 +[ #H12 elim (fqu_cpxs_trans_neq … H12 … HTU2 H) -T2 + /3 width=4 by fqu_fquq, ex3_intro/ +| * #HG #HL #HT destruct /3 width=4 by ex3_intro/ +] +qed-. + +lemma fqup_cpxs_trans_neq: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 → (T2 = U2 → ⊥) → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐+ ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1 +[ #G1 #L1 #T1 #H12 #U2 #HTU2 #H elim (fqu_cpxs_trans_neq … H12 … HTU2 H) -T2 + /3 width=4 by fqu_fqup, ex3_intro/ +| #G #G1 #L #L1 #T #T1 #H1 #_ #IH12 #U2 #HTU2 #H elim (IH12 … HTU2 H) -T2 + #U1 #HTU1 #H #H12 elim (fqu_cpxs_trans_neq … H1 … HTU1 H) -T1 + /3 width=8 by fqup_strap2, ex3_intro/ +] +qed-. + +lemma fqus_cpxs_trans_neq: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 → (T2 = U2 → ⊥) → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐* ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fqus_inv_gen … H12) -H12 +[ #H12 elim (fqup_cpxs_trans_neq … H12 … HTU2 H) -T2 + /3 width=4 by fqup_fqus, ex3_intro/ +| * #HG #HL #HT destruct /3 width=4 by ex3_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_lift.ma new file mode 100644 index 000000000..cf538d2c5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_lift.ma @@ -0,0 +1,124 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/fqus_fqus.ma". +include "basic_2A/reduction/cpx_lift.ma". +include "basic_2A/computation/cpxs.ma". + +(* CONTEXT-SENSITIVE EXTENDED PARALLEL COMPUTATION ON TERMS *****************) + +(* Advanced properties ******************************************************) + +lemma cpxs_delta: ∀h,g,I,G,L,K,V,V2,i. + ⬇[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ➡*[h, g] V2 → + ∀W2. ⬆[0, i+1] V2 ≡ W2 → ⦃G, L⦄ ⊢ #i ➡*[h, g] W2. +#h #g #I #G #L #K #V #V2 #i #HLK #H elim H -V2 +[ /3 width=9 by cpx_cpxs, cpx_delta/ +| #V1 lapply (drop_fwd_drop2 … HLK) -HLK + elim (lift_total V1 0 (i+1)) /4 width=12 by cpx_lift, cpxs_strap1/ +] +qed. + +lemma lstas_cpxs: ∀h,g,G,L,T1,T2,d2. ⦃G, L⦄ ⊢ T1 •*[h, d2] T2 → + ∀d1. ⦃G, L⦄ ⊢ T1 ▪[h, g] d1 → d2 ≤ d1 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2. +#h #g #G #L #T1 #T2 #d2 #H elim H -G -L -T1 -T2 -d2 // +[ /3 width=3 by cpxs_sort, da_inv_sort/ +| #G #L #K #V1 #V2 #W2 #i #d2 #HLK #_ #HVW2 #IHV12 #d1 #H #Hd21 + elim (da_inv_lref … H) -H * #K0 #V0 [| #d0 ] #HLK0 + lapply (drop_mono … HLK0 … HLK) -HLK0 #H destruct /3 width=7 by cpxs_delta/ +| #G #L #K #V1 #V2 #W2 #i #d2 #HLK #_ #HVW2 #IHV12 #d1 #H #Hd21 + elim (da_inv_lref … H) -H * #K0 #V0 [| #d0 ] #HLK0 + lapply (drop_mono … HLK0 … HLK) -HLK0 #H destruct + #HV1 #H destruct lapply (le_plus_to_le_r … Hd21) -Hd21 + /3 width=7 by cpxs_delta/ +| /4 width=3 by cpxs_bind_dx, da_inv_bind/ +| /4 width=3 by cpxs_flat_dx, da_inv_flat/ +| /4 width=3 by cpxs_eps, da_inv_flat/ +] +qed. + +(* Advanced inversion lemmas ************************************************) + +lemma cpxs_inv_lref1: ∀h,g,G,L,T2,i. ⦃G, L⦄ ⊢ #i ➡*[h, g] T2 → + T2 = #i ∨ + ∃∃I,K,V1,T1. ⬇[i] L ≡ K.ⓑ{I}V1 & ⦃G, K⦄ ⊢ V1 ➡*[h, g] T1 & + ⬆[0, i+1] T1 ≡ T2. +#h #g #G #L #T2 #i #H @(cpxs_ind … H) -T2 /2 width=1 by or_introl/ +#T #T2 #_ #HT2 * +[ #H destruct + elim (cpx_inv_lref1 … HT2) -HT2 /2 width=1 by or_introl/ + * /4 width=7 by cpx_cpxs, ex3_4_intro, or_intror/ +| * #I #K #V1 #T1 #HLK #HVT1 #HT1 + lapply (drop_fwd_drop2 … HLK) #H0LK + elim (cpx_inv_lift1 … HT2 … H0LK … HT1) -H0LK -T + /4 width=7 by cpxs_strap1, ex3_4_intro, or_intror/ +] +qed-. + +(* Relocation properties ****************************************************) + +lemma cpxs_lift: ∀h,g,G. d_liftable (cpxs h g G). +/3 width=10 by cpx_lift, cpxs_strap1, d_liftable_LTC/ qed. + +lemma cpxs_inv_lift1: ∀h,g,G. d_deliftable_sn (cpxs h g G). +/3 width=6 by d_deliftable_sn_LTC, cpx_inv_lift1/ +qed-. + +(* Properties on supclosure *************************************************) + +lemma fqu_cpxs_trans: ∀h,g,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 → + ∀T1. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊐ ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 /2 width=3 by ex2_intro/ +#T #T2 #HT2 #_ #IHTU2 #T1 #HT1 elim (fqu_cpx_trans … HT1 … HT2) -T +#T #HT1 #HT2 elim (IHTU2 … HT2) -T2 /3 width=3 by cpxs_strap2, ex2_intro/ +qed-. + +lemma fquq_cpxs_trans: ∀h,g,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 → + ∀T1. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊐⸮ ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T2 #U2 #HTU2 #T1 #H elim (fquq_inv_gen … H) -H +[ #HT12 elim (fqu_cpxs_trans … HTU2 … HT12) /3 width=3 by fqu_fquq, ex2_intro/ +| * #H1 #H2 #H3 destruct /2 width=3 by ex2_intro/ +] +qed-. + +lemma fquq_lstas_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀U2,d1. ⦃G2, L2⦄ ⊢ T2 •*[h, d1] U2 → + ∀d2. ⦃G2, L2⦄ ⊢ T2 ▪[h, g] d2 → d1 ≤ d2 → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊐⸮ ⦃G2, L2, U2⦄. +/3 width=5 by fquq_cpxs_trans, lstas_cpxs/ qed-. + +lemma fqup_cpxs_trans: ∀h,g,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 → + ∀T1. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊐+ ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 /2 width=3 by ex2_intro/ +#T #T2 #HT2 #_ #IHTU2 #T1 #HT1 elim (fqup_cpx_trans … HT1 … HT2) -T +#U1 #HTU1 #H2 elim (IHTU2 … H2) -T2 /3 width=3 by cpxs_strap2, ex2_intro/ +qed-. + +lemma fqus_cpxs_trans: ∀h,g,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 → + ∀T1. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊐* ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T2 #U2 #HTU2 #T1 #H elim (fqus_inv_gen … H) -H +[ #HT12 elim (fqup_cpxs_trans … HTU2 … HT12) /3 width=3 by fqup_fqus, ex2_intro/ +| * #H1 #H2 #H3 destruct /2 width=3 by ex2_intro/ +] +qed-. + +lemma fqus_lstas_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ∀U2,d1. ⦃G2, L2⦄ ⊢ T2 •*[h, d1] U2 → + ∀d2. ⦃G2, L2⦄ ⊢ T2 ▪[h, g] d2 → d1 ≤ d2 → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊐* ⦃G2, L2, U2⦄. +/3 width=6 by fqus_cpxs_trans, lstas_cpxs/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_lleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_lleq.ma new file mode 100644 index 000000000..610f8842a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_lleq.ma @@ -0,0 +1,39 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/cpx_lleq.ma". +include "basic_2A/computation/cpxs.ma". + +(* CONTEXT-SENSITIVE EXTENDED PARALLEL COMPUTATION ON TERMS *****************) + +(* Properties on lazy equivalence for local environments ********************) + +lemma lleq_cpxs_trans: ∀h,g,G,L2,T1,T2. ⦃G, L2⦄ ⊢ T1 ➡*[h, g] T2 → + ∀L1. L1 ≡[T1, 0] L2 → ⦃G, L1⦄ ⊢ T1 ➡*[h, g] T2. +#h #g #G #L2 #T1 #T2 #H @(cpxs_ind_dx … H) -T1 +/4 width=6 by cpx_lleq_conf_dx, lleq_cpx_trans, cpxs_strap2/ +qed-. + +lemma cpxs_lleq_conf: ∀h,g,G,L2,T1,T2. ⦃G, L2⦄ ⊢ T1 ➡*[h, g] T2 → + ∀L1. L2 ≡[T1, 0] L1 → ⦃G, L1⦄ ⊢ T1 ➡*[h, g] T2. +/3 width=3 by lleq_cpxs_trans, lleq_sym/ qed-. + +lemma cpxs_lleq_conf_dx: ∀h,g,G,L2,T1,T2. ⦃G, L2⦄ ⊢ T1 ➡*[h, g] T2 → + ∀L1. L1 ≡[T1, 0] L2 → L1 ≡[T2, 0] L2. +#h #g #G #L2 #T1 #T2 #H @(cpxs_ind … H) -T2 /3 width=6 by cpx_lleq_conf_dx/ +qed-. + +lemma cpxs_lleq_conf_sn: ∀h,g,G,L1,T1,T2. ⦃G, L1⦄ ⊢ T1 ➡*[h, g] T2 → + ∀L2. L1 ≡[T1, 0] L2 → L1 ≡[T2, 0] L2. +/4 width=6 by cpxs_lleq_conf_dx, lleq_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_lreq.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_lreq.ma new file mode 100644 index 000000000..025cfdc2f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_lreq.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/cpx_lreq.ma". +include "basic_2A/computation/cpxs.ma". + +(* CONTEXT-SENSITIVE EXTENDED PARALLEL COMPUTATION ON TERMS *****************) + +(* Properties on equivalence for local environments *************************) + +lemma lreq_cpxs_trans: ∀h,g,G. lsub_trans … (cpxs h g G) (lreq 0 (∞)). +/3 width=5 by lreq_cpx_trans, LTC_lsub_trans/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_tsts.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_tsts.ma new file mode 100644 index 000000000..afe33affd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_tsts.ma @@ -0,0 +1,107 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/tsts.ma". +include "basic_2A/computation/lpxs_cpxs.ma". + +(* CONTEXT-SENSITIVE EXTENDED PARALLEL COMPUTATION ON TERMS *****************) + +(* Forward lemmas involving same top term structure *************************) + +lemma cpxs_fwd_cnx: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → ∀U. ⦃G, L⦄ ⊢ T ➡*[h, g] U → T ≂ U. +#h #g #G #L #T #HT #U #H +>(cpxs_inv_cnx1 … H HT) -G -L -T // +qed-. + +lemma cpxs_fwd_sort: ∀h,g,G,L,U,k. ⦃G, L⦄ ⊢ ⋆k ➡*[h, g] U → + ⋆k ≂ U ∨ ⦃G, L⦄ ⊢ ⋆(next h k) ➡*[h, g] U. +#h #g #G #L #U #k #H +elim (cpxs_inv_sort1 … H) -H #n #d generalize in match k; -k @(nat_ind_plus … n) -n +[ #k #_ #H -d destruct /2 width=1 by or_introl/ +| #n #IHn #k >plus_plus_comm_23 #Hnd #H destruct + lapply (deg_next_SO … Hnd) -Hnd #Hnd + elim (IHn … Hnd) -IHn + [ #H lapply (tsts_inv_atom1 … H) -H #H >H -H /2 width=1 by or_intror/ + | generalize in match Hnd; -Hnd @(nat_ind_plus … n) -n + /4 width=3 by cpxs_strap2, cpx_st, or_intror/ + | >iter_SO >iter_n_Sm // + ] +] +qed-. + +(* Basic_1: was just: pr3_iso_beta *) +lemma cpxs_fwd_beta: ∀h,g,a,G,L,V,W,T,U. ⦃G, L⦄ ⊢ ⓐV.ⓛ{a}W.T ➡*[h, g] U → + ⓐV.ⓛ{a}W.T ≂ U ∨ ⦃G, L⦄ ⊢ ⓓ{a}ⓝW.V.T ➡*[h, g] U. +#h #g #a #G #L #V #W #T #U #H +elim (cpxs_inv_appl1 … H) -H * +[ #V0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair, or_introl/ +| #b #W0 #T0 #HT0 #HU + elim (cpxs_inv_abst1 … HT0) -HT0 #W1 #T1 #HW1 #HT1 #H destruct + lapply (lsubr_cpxs_trans … HT1 (L.ⓓⓝW.V) ?) -HT1 + /5 width=3 by cpxs_trans, cpxs_bind, cpxs_pair_sn, lsubr_beta, or_intror/ +| #b #V1 #V2 #V0 #T1 #_ #_ #HT1 #_ + elim (cpxs_inv_abst1 … HT1) -HT1 #W2 #T2 #_ #_ #H destruct +] +qed-. + +(* Note: probably this is an inversion lemma *) +lemma cpxs_fwd_delta: ∀h,g,I,G,L,K,V1,i. ⬇[i] L ≡ K.ⓑ{I}V1 → + ∀V2. ⬆[0, i + 1] V1 ≡ V2 → + ∀U. ⦃G, L⦄ ⊢ #i ➡*[h, g] U → + #i ≂ U ∨ ⦃G, L⦄ ⊢ V2 ➡*[h, g] U. +#h #g #I #G #L #K #V1 #i #HLK #V2 #HV12 #U #H +elim (cpxs_inv_lref1 … H) -H /2 width=1 by or_introl/ +* #I0 #K0 #V0 #U0 #HLK0 #HVU0 #HU0 +lapply (drop_mono … HLK0 … HLK) -HLK0 #H destruct +/4 width=10 by cpxs_lift, drop_fwd_drop2, or_intror/ +qed-. + +lemma cpxs_fwd_theta: ∀h,g,a,G,L,V1,V,T,U. ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}V.T ➡*[h, g] U → + ∀V2. ⬆[0, 1] V1 ≡ V2 → ⓐV1.ⓓ{a}V.T ≂ U ∨ + ⦃G, L⦄ ⊢ ⓓ{a}V.ⓐV2.T ➡*[h, g] U. +#h #g #a #G #L #V1 #V #T #U #H #V2 #HV12 +elim (cpxs_inv_appl1 … H) -H * +[ -HV12 #V0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair, or_introl/ +| #b #W #T0 #HT0 #HU + elim (cpxs_inv_abbr1 … HT0) -HT0 * + [ #V3 #T3 #_ #_ #H destruct + | #X #HT2 #H #H0 destruct + elim (lift_inv_bind1 … H) -H #W2 #T2 #HW2 #HT02 #H destruct + @or_intror @(cpxs_trans … HU) -U (**) (* explicit constructor *) + @(cpxs_trans … (+ⓓV.ⓐV2.ⓛ{b}W2.T2)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T + @(cpxs_strap2 … (ⓐV1.ⓛ{b}W.T0)) [2: /2 width=1 by cpxs_beta_dx/ ] + /4 width=7 by cpx_zeta, lift_bind, lift_flat/ + ] +| #b #V3 #V4 #V0 #T0 #HV13 #HV34 #HT0 #HU + @or_intror @(cpxs_trans … HU) -U (**) (* explicit constructor *) + elim (cpxs_inv_abbr1 … HT0) -HT0 * + [ #V5 #T5 #HV5 #HT5 #H destruct + lapply (cpxs_lift … HV13 (L.ⓓV) … HV12 … HV34) -V1 -V3 + /3 width=2 by cpxs_flat, cpxs_bind, drop_drop/ + | #X #HT1 #H #H0 destruct + elim (lift_inv_bind1 … H) -H #V5 #T5 #HV05 #HT05 #H destruct + lapply (cpxs_lift … HV13 (L.ⓓV0) … HV12 … HV34) -V3 /2 width=2 by drop_drop/ #HV24 + @(cpxs_trans … (+ⓓV.ⓐV2.ⓓ{b}V5.T5)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T + @(cpxs_strap2 … (ⓐV1.ⓓ{b}V0.T0)) [ /4 width=7 by cpx_zeta, lift_bind, lift_flat/ ] -V -V5 -T5 + @(cpxs_strap2 … (ⓓ{b}V0.ⓐV2.T0)) /3 width=3 by cpxs_pair_sn, cpxs_bind_dx, cpr_cpx, cpr_theta/ + ] +] +qed-. + +lemma cpxs_fwd_cast: ∀h,g,G,L,W,T,U. ⦃G, L⦄ ⊢ ⓝW.T ➡*[h, g] U → + ∨∨ ⓝW. T ≂ U | ⦃G, L⦄ ⊢ T ➡*[h, g] U | ⦃G, L⦄ ⊢ W ➡*[h, g] U. +#h #g #G #L #W #T #U #H +elim (cpxs_inv_cast1 … H) -H /2 width=1 by or3_intro1, or3_intro2/ * +#W0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair, or3_intro0/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_tsts_vector.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_tsts_vector.ma new file mode 100644 index 000000000..70a66b9ab --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_tsts_vector.ma @@ -0,0 +1,190 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/tsts_vector.ma". +include "basic_2A/substitution/lift_vector.ma". +include "basic_2A/computation/cpxs_tsts.ma". + +(* CONTEXT-SENSITIVE EXTENDED PARALLEL COMPUTATION ON TERMS *****************) + +(* Vector form of forward lemmas involving same top term structure **********) + +(* Basic_1: was just: nf2_iso_appls_lref *) +lemma cpxs_fwd_cnx_vector: ∀h,g,G,L,T. 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → + ∀Vs,U. ⦃G, L⦄ ⊢ ⒶVs.T ➡*[h, g] U → ⒶVs.T ≂ U. +#h #g #G #L #T #H1T #H2T #Vs elim Vs -Vs [ @(cpxs_fwd_cnx … H2T) ] (**) (* /2 width=3 by cpxs_fwd_cnx/ does not work *) +#V #Vs #IHVs #U #H +elim (cpxs_inv_appl1 … H) -H * +[ -IHVs #V0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair/ +| #a #W0 #T0 #HT0 #HU + lapply (IHVs … HT0) -IHVs -HT0 #HT0 + elim (tsts_inv_bind_applv_simple … HT0) // +| #a #V1 #V2 #V0 #T0 #HV1 #HV12 #HT0 #HU + lapply (IHVs … HT0) -IHVs -HT0 #HT0 + elim (tsts_inv_bind_applv_simple … HT0) // +] +qed-. + +lemma cpxs_fwd_sort_vector: ∀h,g,G,L,k,Vs,U. ⦃G, L⦄ ⊢ ⒶVs.⋆k ➡*[h, g] U → + ⒶVs.⋆k ≂ U ∨ ⦃G, L⦄ ⊢ ⒶVs.⋆(next h k) ➡*[h, g] U. +#h #g #G #L #k #Vs elim Vs -Vs /2 width=1 by cpxs_fwd_sort/ +#V #Vs #IHVs #U #H +elim (cpxs_inv_appl1 … H) -H * +[ -IHVs #V1 #T1 #_ #_ #H destruct /2 width=1 by tsts_pair, or_introl/ +| #a #W1 #T1 #HT1 #HU + elim (IHVs … HT1) -IHVs -HT1 #HT1 + [ elim (tsts_inv_bind_applv_simple … HT1) // + | @or_intror (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + @(cpxs_strap1 … (ⓐV.ⓛ{a}W1.T1)) /3 width=1 by cpxs_flat_dx, cpr_cpx, cpr_beta/ + ] +| #a #V1 #V2 #V3 #T1 #HV01 #HV12 #HT1 #HU + elim (IHVs … HT1) -IHVs -HT1 #HT1 + [ elim (tsts_inv_bind_applv_simple … HT1) // + | @or_intror (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + @(cpxs_strap1 … (ⓐV1.ⓓ{a}V3.T1)) /3 width=3 by cpxs_flat, cpr_cpx, cpr_theta/ + ] +] +qed-. + + +(* Basic_1: was just: pr3_iso_appls_beta *) +lemma cpxs_fwd_beta_vector: ∀h,g,a,G,L,Vs,V,W,T,U. ⦃G, L⦄ ⊢ ⒶVs.ⓐV.ⓛ{a}W.T ➡*[h, g] U → + ⒶVs. ⓐV. ⓛ{a}W. T ≂ U ∨ ⦃G, L⦄ ⊢ ⒶVs.ⓓ{a}ⓝW.V.T ➡*[h, g] U. +#h #g #a #G #L #Vs elim Vs -Vs /2 width=1 by cpxs_fwd_beta/ +#V0 #Vs #IHVs #V #W #T #U #H +elim (cpxs_inv_appl1 … H) -H * +[ -IHVs #V1 #T1 #_ #_ #H destruct /2 width=1 by tsts_pair, or_introl/ +| #b #W1 #T1 #HT1 #HU + elim (IHVs … HT1) -IHVs -HT1 #HT1 + [ elim (tsts_inv_bind_applv_simple … HT1) // + | @or_intror (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + @(cpxs_strap1 … (ⓐV0.ⓛ{b}W1.T1)) /3 width=1 by cpxs_flat_dx, cpr_cpx, cpr_beta/ + ] +| #b #V1 #V2 #V3 #T1 #HV01 #HV12 #HT1 #HU + elim (IHVs … HT1) -IHVs -HT1 #HT1 + [ elim (tsts_inv_bind_applv_simple … HT1) // + | @or_intror (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + @(cpxs_strap1 … (ⓐV1.ⓓ{b}V3.T1)) /3 width=3 by cpxs_flat, cpr_cpx, cpr_theta/ + ] +] +qed-. + +lemma cpxs_fwd_delta_vector: ∀h,g,I,G,L,K,V1,i. ⬇[i] L ≡ K.ⓑ{I}V1 → + ∀V2. ⬆[0, i + 1] V1 ≡ V2 → + ∀Vs,U. ⦃G, L⦄ ⊢ ⒶVs.#i ➡*[h, g] U → + ⒶVs.#i ≂ U ∨ ⦃G, L⦄ ⊢ ⒶVs.V2 ➡*[h, g] U. +#h #g #I #G #L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs /2 width=5 by cpxs_fwd_delta/ +#V #Vs #IHVs #U #H -K -V1 +elim (cpxs_inv_appl1 … H) -H * +[ -IHVs #V0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair, or_introl/ +| #b #W0 #T0 #HT0 #HU + elim (IHVs … HT0) -IHVs -HT0 #HT0 + [ elim (tsts_inv_bind_applv_simple … HT0) // + | @or_intror -i (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + @(cpxs_strap1 … (ⓐV.ⓛ{b}W0.T0)) /3 width=1 by cpxs_flat_dx, cpr_cpx, cpr_beta/ + ] +| #b #V0 #V1 #V3 #T0 #HV0 #HV01 #HT0 #HU + elim (IHVs … HT0) -IHVs -HT0 #HT0 + [ elim (tsts_inv_bind_applv_simple … HT0) // + | @or_intror -i (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + @(cpxs_strap1 … (ⓐV0.ⓓ{b}V3.T0)) /3 width=3 by cpxs_flat, cpr_cpx, cpr_theta/ + ] +] +qed-. + +(* Basic_1: was just: pr3_iso_appls_abbr *) +lemma cpxs_fwd_theta_vector: ∀h,g,G,L,V1s,V2s. ⬆[0, 1] V1s ≡ V2s → + ∀a,V,T,U. ⦃G, L⦄ ⊢ ⒶV1s.ⓓ{a}V.T ➡*[h, g] U → + ⒶV1s. ⓓ{a}V. T ≂ U ∨ ⦃G, L⦄ ⊢ ⓓ{a}V.ⒶV2s.T ➡*[h, g] U. +#h #g #G #L #V1s #V2s * -V1s -V2s /3 width=1 by or_intror/ +#V1s #V2s #V1a #V2a #HV12a #HV12s #a +generalize in match HV12a; -HV12a +generalize in match V2a; -V2a +generalize in match V1a; -V1a +elim HV12s -V1s -V2s /2 width=1 by cpxs_fwd_theta/ +#V1s #V2s #V1b #V2b #HV12b #_ #IHV12s #V1a #V2a #HV12a #V #T #U #H +elim (cpxs_inv_appl1 … H) -H * +[ -IHV12s -HV12a -HV12b #V0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair, or_introl/ +| #b #W0 #T0 #HT0 #HU + elim (IHV12s … HV12b … HT0) -IHV12s -HT0 #HT0 + [ -HV12a -HV12b -HU + elim (tsts_inv_pair1 … HT0) #V1 #T1 #H destruct + | @or_intror -V1s (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + elim (cpxs_inv_abbr1 … HT0) -HT0 * + [ -HV12a -HV12b #V1 #T1 #_ #_ #H destruct + | -V1b #X #HT1 #H #H0 destruct + elim (lift_inv_bind1 … H) -H #W1 #T1 #HW01 #HT01 #H destruct + @(cpxs_trans … (+ⓓV.ⓐV2a.ⓛ{b}W1.T1)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T -V2b -V2s + @(cpxs_strap2 … (ⓐV1a.ⓛ{b}W0.T0)) + /4 width=7 by cpxs_beta_dx, cpx_zeta, lift_bind, lift_flat/ + ] + ] +| #b #V0a #Va #V0 #T0 #HV10a #HV0a #HT0 #HU + elim (IHV12s … HV12b … HT0) -HV12b -IHV12s -HT0 #HT0 + [ -HV12a -HV10a -HV0a -HU + elim (tsts_inv_pair1 … HT0) #V1 #T1 #H destruct + | @or_intror -V1s -V1b (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + elim (cpxs_inv_abbr1 … HT0) -HT0 * + [ #V1 #T1 #HV1 #HT1 #H destruct + lapply (cpxs_lift … HV10a (L.ⓓV) (Ⓕ) … HV12a … HV0a) -V1a -V0a [ /2 width=1 by drop_drop/ ] #HV2a + @(cpxs_trans … (ⓓ{a}V.ⓐV2a.T1)) /3 width=1 by cpxs_bind, cpxs_pair_sn, cpxs_flat_dx, cpxs_bind_dx/ + | #X #HT1 #H #H0 destruct + elim (lift_inv_bind1 … H) -H #V1 #T1 #HW01 #HT01 #H destruct + lapply (cpxs_lift … HV10a (L.ⓓV0) (Ⓕ) … HV12a … HV0a) -V0a [ /2 width=1 by drop_drop/ ] #HV2a + @(cpxs_trans … (+ⓓV.ⓐV2a.ⓓ{b}V1.T1)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T -V2b -V2s + @(cpxs_strap2 … (ⓐV1a.ⓓ{b}V0.T0)) [ /4 width=7 by cpx_zeta, lift_bind, lift_flat/ ] -V -V1 -T1 + @(cpxs_strap2 … (ⓓ{b}V0.ⓐV2a.T0)) /3 width=3 by cpxs_pair_sn, cpxs_bind_dx, cpr_cpx, cpr_theta/ + ] + ] +] +qed-. + +(* Basic_1: was just: pr3_iso_appls_cast *) +lemma cpxs_fwd_cast_vector: ∀h,g,G,L,Vs,W,T,U. ⦃G, L⦄ ⊢ ⒶVs.ⓝW.T ➡*[h, g] U → + ∨∨ ⒶVs. ⓝW. T ≂ U + | ⦃G, L⦄ ⊢ ⒶVs.T ➡*[h, g] U + | ⦃G, L⦄ ⊢ ⒶVs.W ➡*[h, g] U. +#h #g #G #L #Vs elim Vs -Vs /2 width=1 by cpxs_fwd_cast/ +#V #Vs #IHVs #W #T #U #H +elim (cpxs_inv_appl1 … H) -H * +[ -IHVs #V0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair, or3_intro0/ +| #b #W0 #T0 #HT0 #HU elim (IHVs … HT0) -IHVs -HT0 #HT0 + [ elim (tsts_inv_bind_applv_simple … HT0) // + | @or3_intro1 -W (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + @(cpxs_strap1 … (ⓐV.ⓛ{b}W0.T0)) /2 width=1 by cpxs_flat_dx, cpx_beta/ + | @or3_intro2 -T (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + @(cpxs_strap1 … (ⓐV.ⓛ{b}W0.T0)) /2 width=1 by cpxs_flat_dx, cpx_beta/ + ] +| #b #V0 #V1 #V2 #T0 #HV0 #HV01 #HT0 #HU + elim (IHVs … HT0) -IHVs -HT0 #HT0 + [ elim (tsts_inv_bind_applv_simple … HT0) // + | @or3_intro1 -W (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + @(cpxs_strap1 … (ⓐV0.ⓓ{b}V2.T0)) /2 width=3 by cpxs_flat, cpx_theta/ + | @or3_intro2 -T (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + @(cpxs_strap1 … (ⓐV0.ⓓ{b}V2.T0)) /2 width=3 by cpxs_flat, cpx_theta/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/csx.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx.ma new file mode 100644 index 000000000..b77127d50 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx.ma @@ -0,0 +1,133 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/sn_5.ma". +include "basic_2A/reduction/cnx.ma". + +(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERMS ********************) + +definition csx: ∀h. sd h → relation3 genv lenv term ≝ + λh,g,G,L. SN … (cpx h g G L) (eq …). + +interpretation + "context-sensitive extended strong normalization (term)" + 'SN h g G L T = (csx h g G L T). + +(* Basic eliminators ********************************************************) + +lemma csx_ind: ∀h,g,G,L. ∀R:predicate term. + (∀T1. ⦃G, L⦄ ⊢ ⬊*[h, g] T1 → + (∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → (T1 = T2 → ⊥) → R T2) → + R T1 + ) → + ∀T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → R T. +#h #g #G #L #R #H0 #T1 #H elim H -T1 +/5 width=1 by SN_intro/ +qed-. + +(* Basic properties *********************************************************) + +(* Basic_1: was just: sn3_pr2_intro *) +lemma csx_intro: ∀h,g,G,L,T1. + (∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊*[h, g] T2) → + ⦃G, L⦄ ⊢ ⬊*[h, g] T1. +/4 width=1 by SN_intro/ qed. + +lemma csx_cpx_trans: ∀h,g,G,L,T1. ⦃G, L⦄ ⊢ ⬊*[h, g] T1 → + ∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → ⦃G, L⦄ ⊢ ⬊*[h, g] T2. +#h #g #G #L #T1 #H @(csx_ind … H) -T1 #T1 #HT1 #IHT1 #T2 #HLT12 +elim (eq_term_dec T1 T2) #HT12 destruct /3 width=4 by/ +qed-. + +(* Basic_1: was just: sn3_nf2 *) +lemma cnx_csx: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → ⦃G, L⦄ ⊢ ⬊*[h, g] T. +/2 width=1 by NF_to_SN/ qed. + +lemma csx_sort: ∀h,g,G,L,k. ⦃G, L⦄ ⊢ ⬊*[h, g] ⋆k. +#h #g #G #L #k elim (deg_total h g k) +#d generalize in match k; -k @(nat_ind_plus … d) -d /3 width=6 by cnx_csx, cnx_sort/ +#d #IHd #k #Hkd lapply (deg_next_SO … Hkd) -Hkd +#Hkd @csx_intro #X #H #HX elim (cpx_inv_sort1 … H) -H +[ #H destruct elim HX // +| -HX * #d0 #_ #H destruct -d0 /2 width=1 by/ +] +qed. + +(* Basic_1: was just: sn3_cast *) +lemma csx_cast: ∀h,g,G,L,W. ⦃G, L⦄ ⊢ ⬊*[h, g] W → + ∀T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓝW.T. +#h #g #G #L #W #HW @(csx_ind … HW) -W #W #HW #IHW #T #HT @(csx_ind … HT) -T #T #HT #IHT +@csx_intro #X #H1 #H2 +elim (cpx_inv_cast1 … H1) -H1 +[ * #W0 #T0 #HLW0 #HLT0 #H destruct + elim (eq_false_inv_tpair_sn … H2) -H2 + [ /3 width=3 by csx_cpx_trans/ + | -HLW0 * #H destruct /3 width=1 by/ + ] +|2,3: /3 width=3 by csx_cpx_trans/ +] +qed. + +(* Basic forward lemmas *****************************************************) + +fact csx_fwd_pair_sn_aux: ∀h,g,G,L,U. ⦃G, L⦄ ⊢ ⬊*[h, g] U → + ∀I,V,T. U = ②{I}V.T → ⦃G, L⦄ ⊢ ⬊*[h, g] V. +#h #g #G #L #U #H elim H -H #U0 #_ #IH #I #V #T #H destruct +@csx_intro #V2 #HLV2 #HV2 +@(IH (②{I}V2.T)) -IH /2 width=3 by cpx_pair_sn/ -HLV2 +#H destruct /2 width=1 by/ +qed-. + +(* Basic_1: was just: sn3_gen_head *) +lemma csx_fwd_pair_sn: ∀h,g,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ②{I}V.T → ⦃G, L⦄ ⊢ ⬊*[h, g] V. +/2 width=5 by csx_fwd_pair_sn_aux/ qed-. + +fact csx_fwd_bind_dx_aux: ∀h,g,G,L,U. ⦃G, L⦄ ⊢ ⬊*[h, g] U → + ∀a,I,V,T. U = ⓑ{a,I}V.T → ⦃G, L.ⓑ{I}V⦄ ⊢ ⬊*[h, g] T. +#h #g #G #L #U #H elim H -H #U0 #_ #IH #a #I #V #T #H destruct +@csx_intro #T2 #HLT2 #HT2 +@(IH (ⓑ{a,I}V.T2)) -IH /2 width=3 by cpx_bind/ -HLT2 +#H destruct /2 width=1 by/ +qed-. + +(* Basic_1: was just: sn3_gen_bind *) +lemma csx_fwd_bind_dx: ∀h,g,a,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓑ{a,I}V.T → ⦃G, L.ⓑ{I}V⦄ ⊢ ⬊*[h, g] T. +/2 width=4 by csx_fwd_bind_dx_aux/ qed-. + +fact csx_fwd_flat_dx_aux: ∀h,g,G,L,U. ⦃G, L⦄ ⊢ ⬊*[h, g] U → + ∀I,V,T. U = ⓕ{I}V.T → ⦃G, L⦄ ⊢ ⬊*[h, g] T. +#h #g #G #L #U #H elim H -H #U0 #_ #IH #I #V #T #H destruct +@csx_intro #T2 #HLT2 #HT2 +@(IH (ⓕ{I}V.T2)) -IH /2 width=3 by cpx_flat/ -HLT2 +#H destruct /2 width=1 by/ +qed-. + +(* Basic_1: was just: sn3_gen_flat *) +lemma csx_fwd_flat_dx: ∀h,g,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓕ{I}V.T → ⦃G, L⦄ ⊢ ⬊*[h, g] T. +/2 width=5 by csx_fwd_flat_dx_aux/ qed-. + +lemma csx_fwd_bind: ∀h,g,a,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓑ{a,I}V.T → + ⦃G, L⦄ ⊢ ⬊*[h, g] V ∧ ⦃G, L.ⓑ{I}V⦄ ⊢ ⬊*[h, g] T. +/3 width=3 by csx_fwd_pair_sn, csx_fwd_bind_dx, conj/ qed-. + +lemma csx_fwd_flat: ∀h,g,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓕ{I}V.T → + ⦃G, L⦄ ⊢ ⬊*[h, g] V ∧ ⦃G, L⦄ ⊢ ⬊*[h, g] T. +/3 width=3 by csx_fwd_pair_sn, csx_fwd_flat_dx, conj/ qed-. + +(* Basic_1: removed theorems 14: + sn3_cdelta + sn3_gen_cflat sn3_cflat sn3_cpr3_trans sn3_shift sn3_change + sn3_appl_cast sn3_appl_beta sn3_appl_lref sn3_appl_abbr + sn3_appl_appls sn3_bind sn3_appl_bind sn3_appls_bind +*) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_aaa.ma new file mode 100644 index 000000000..7330de619 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_aaa.ma @@ -0,0 +1,58 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/gcp_aaa.ma". +include "basic_2A/computation/cpxs_aaa.ma". +include "basic_2A/computation/csx_tsts_vector.ma". + +(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERMS ********************) + +(* Main properties on atomic arity assignment *******************************) + +theorem aaa_csx: ∀h,g,G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ⦃G, L⦄ ⊢ ⬊*[h, g] T. +#h #g #G #L #T #A #H +@(gcr_aaa … (csx_gcp h g) (csx_gcr h g) … H) +qed. + +(* Advanced eliminators *****************************************************) + +fact aaa_ind_csx_aux: ∀h,g,G,L,A. ∀R:predicate term. + (∀T1. ⦃G, L⦄ ⊢ T1 ⁝ A → + (∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → (T1 = T2 → ⊥) → R T2) → R T1 + ) → + ∀T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ⦃G, L⦄ ⊢ T ⁝ A → R T. +#h #g #G #L #A #R #IH #T #H @(csx_ind … H) -T /4 width=5 by cpx_aaa_conf/ +qed-. + +lemma aaa_ind_csx: ∀h,g,G,L,A. ∀R:predicate term. + (∀T1. ⦃G, L⦄ ⊢ T1 ⁝ A → + (∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → (T1 = T2 → ⊥) → R T2) → R T1 + ) → + ∀T. ⦃G, L⦄ ⊢ T ⁝ A → R T. +/5 width=9 by aaa_ind_csx_aux, aaa_csx/ qed-. + +fact aaa_ind_csx_alt_aux: ∀h,g,G,L,A. ∀R:predicate term. + (∀T1. ⦃G, L⦄ ⊢ T1 ⁝ A → + (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 = T2 → ⊥) → R T2) → R T1 + ) → + ∀T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ⦃G, L⦄ ⊢ T ⁝ A → R T. +#h #g #G #L #A #R #IH #T #H @(csx_ind_alt … H) -T /4 width=5 by cpxs_aaa_conf/ +qed-. + +lemma aaa_ind_csx_alt: ∀h,g,G,L,A. ∀R:predicate term. + (∀T1. ⦃G, L⦄ ⊢ T1 ⁝ A → + (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 = T2 → ⊥) → R T2) → R T1 + ) → + ∀T. ⦃G, L⦄ ⊢ T ⁝ A → R T. +/5 width=9 by aaa_ind_csx_alt_aux, aaa_csx/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_alt.ma new file mode 100644 index 000000000..396dc0ee1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_alt.ma @@ -0,0 +1,107 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/snalt_5.ma". +include "basic_2A/computation/cpxs.ma". +include "basic_2A/computation/csx.ma". + +(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERMS ********************) + +(* alternative definition of csx *) +definition csxa: ∀h. sd h → relation3 genv lenv term ≝ + λh,g,G,L. SN … (cpxs h g G L) (eq …). + +interpretation + "context-sensitive extended strong normalization (term) alternative" + 'SNAlt h g G L T = (csxa h g G L T). + +(* Basic eliminators ********************************************************) + +lemma csxa_ind: ∀h,g,G,L. ∀R:predicate term. + (∀T1. ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T1 → + (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 = T2 → ⊥) → R T2) → R T1 + ) → + ∀T. ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T → R T. +#h #g #G #L #R #H0 #T1 #H elim H -T1 /5 width=1 by SN_intro/ +qed-. + +(* Basic properties *********************************************************) + +lemma csx_intro_cpxs: ∀h,g,G,L,T1. + (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊*[h, g] T2) → + ⦃G, L⦄ ⊢ ⬊*[h, g] T1. +/4 width=1 by cpx_cpxs, csx_intro/ qed. + +(* Basic_1: was just: sn3_intro *) +lemma csxa_intro: ∀h,g,G,L,T1. + (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T2) → + ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T1. +/4 width=1 by SN_intro/ qed. + +fact csxa_intro_aux: ∀h,g,G,L,T1. ( + ∀T,T2. ⦃G, L⦄ ⊢ T ➡*[h, g] T2 → T1 = T → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T2 + ) → ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T1. +/4 width=3 by csxa_intro/ qed-. + +(* Basic_1: was just: sn3_pr3_trans (old version) *) +lemma csxa_cpxs_trans: ∀h,g,G,L,T1. ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T1 → + ∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T2. +#h #g #G #L #T1 #H elim H -T1 #T1 #HT1 #IHT1 #T2 #HLT12 +@csxa_intro #T #HLT2 #HT2 +elim (eq_term_dec T1 T2) #HT12 +[ -IHT1 -HLT12 destruct /3 width=1 by/ +| -HT1 -HT2 /3 width=4 by/ +qed. + +(* Basic_1: was just: sn3_pr2_intro (old version) *) +lemma csxa_intro_cpx: ∀h,g,G,L,T1. ( + ∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T2 + ) → ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T1. +#h #g #G #L #T1 #H +@csxa_intro_aux #T #T2 #H @(cpxs_ind_dx … H) -T +[ -H #H destruct #H + elim H // +| #T0 #T #HLT1 #HLT2 #IHT #HT10 #HT12 destruct + elim (eq_term_dec T0 T) #HT0 + [ -HLT1 -HLT2 -H /3 width=1 by/ + | -IHT -HT12 /4 width=3 by csxa_cpxs_trans/ + ] +] +qed. + +(* Main properties **********************************************************) + +theorem csx_csxa: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T. +#h #g #G #L #T #H @(csx_ind … H) -T /4 width=1 by csxa_intro_cpx/ +qed. + +theorem csxa_csx: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T → ⦃G, L⦄ ⊢ ⬊*[h, g] T. +#h #g #G #L #T #H @(csxa_ind … H) -T /4 width=1 by cpx_cpxs, csx_intro/ +qed. + +(* Basic_1: was just: sn3_pr3_trans *) +lemma csx_cpxs_trans: ∀h,g,G,L,T1. ⦃G, L⦄ ⊢ ⬊*[h, g] T1 → + ∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L⦄ ⊢ ⬊*[h, g] T2. +#h #g #G #L #T1 #HT1 #T2 #H @(cpxs_ind … H) -T2 /2 width=3 by csx_cpx_trans/ +qed-. + +(* Main eliminators *********************************************************) + +lemma csx_ind_alt: ∀h,g,G,L. ∀R:predicate term. + (∀T1. ⦃G, L⦄ ⊢ ⬊*[h, g] T1 → + (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 = T2 → ⊥) → R T2) → R T1 + ) → + ∀T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → R T. +#h #g #G #L #R #H0 #T1 #H @(csxa_ind … (csx_csxa … H)) -T1 /4 width=1 by csxa_csx/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_fpbs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_fpbs.ma new file mode 100644 index 000000000..0d2f18aa3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_fpbs.ma @@ -0,0 +1,33 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/fpbs.ma". +include "basic_2A/computation/csx_lleq.ma". +include "basic_2A/computation/csx_lpx.ma". + +(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERMS ********************) + +(* Advanced properties ******************************************************) + +lemma csx_fpb_conf: ∀h,g,G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄ → ⦃G2, L2⦄ ⊢ ⬊*[h, g] T2. +#h #g #G1 #L1 #T1 #HT1 #G2 #L2 #T2 * +/2 width=5 by csx_cpx_trans, csx_fquq_conf, csx_lpx_conf, csx_lleq_conf/ +qed-. + +lemma csx_fpbs_conf: ∀h,g,G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → ⦃G2, L2⦄ ⊢ ⬊*[h, g] T2. +#h #g #G1 #L1 #T1 #HT1 #G2 #L2 #T2 #H @(fpbs_ind … H) -G2 -L2 -T2 +/2 width=5 by csx_fpb_conf/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lift.ma new file mode 100644 index 000000000..6bda54375 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lift.ma @@ -0,0 +1,119 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/cnx_lift.ma". +include "basic_2A/computation/gcp.ma". +include "basic_2A/computation/csx.ma". + +(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERMS ********************) + +(* Relocation properties ****************************************************) + +(* Basic_1: was just: sn3_lift *) +lemma csx_lift: ∀h,g,G,L2,L1,T1,s,l,m. ⦃G, L1⦄ ⊢ ⬊*[h, g] T1 → + ∀T2. ⬇[s, l, m] L2 ≡ L1 → ⬆[l, m] T1 ≡ T2 → ⦃G, L2⦄ ⊢ ⬊*[h, g] T2. +#h #g #G #L2 #L1 #T1 #s #l #m #H elim H -T1 #T1 #_ #IHT1 #T2 #HL21 #HT12 +@csx_intro #T #HLT2 #HT2 +elim (cpx_inv_lift1 … HLT2 … HL21 … HT12) -HLT2 #T0 #HT0 #HLT10 +@(IHT1 … HLT10) // -L1 -L2 #H destruct +>(lift_mono … HT0 … HT12) in HT2; -T1 /2 width=1 by/ +qed. + +(* Basic_1: was just: sn3_gen_lift *) +lemma csx_inv_lift: ∀h,g,G,L2,L1,T1,s,l,m. ⦃G, L1⦄ ⊢ ⬊*[h, g] T1 → + ∀T2. ⬇[s, l, m] L1 ≡ L2 → ⬆[l, m] T2 ≡ T1 → ⦃G, L2⦄ ⊢ ⬊*[h, g] T2. +#h #g #G #L2 #L1 #T1 #s #l #m #H elim H -T1 #T1 #_ #IHT1 #T2 #HL12 #HT21 +@csx_intro #T #HLT2 #HT2 +elim (lift_total T l m) #T0 #HT0 +lapply (cpx_lift … HLT2 … HL12 … HT21 … HT0) -HLT2 #HLT10 +@(IHT1 … HLT10) // -L1 -L2 #H destruct +>(lift_inj … HT0 … HT21) in HT2; -T1 /2 width=1 by/ +qed. + +(* Advanced inversion lemmas ************************************************) + +(* Basic_1: was: sn3_gen_def *) +lemma csx_inv_lref_bind: ∀h,g,I,G,L,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → + ⦃G, L⦄ ⊢ ⬊*[h, g] #i → ⦃G, K⦄ ⊢ ⬊*[h, g] V. +#h #g #I #G #L #K #V #i #HLK #Hi +elim (lift_total V 0 (i+1)) +/4 width=9 by csx_inv_lift, csx_cpx_trans, cpx_delta, drop_fwd_drop2/ +qed-. + +(* Advanced properties ******************************************************) + +(* Basic_1: was just: sn3_abbr *) +lemma csx_lref_bind: ∀h,g,I,G,L,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ ⬊*[h, g] V → ⦃G, L⦄ ⊢ ⬊*[h, g] #i. +#h #g #I #G #L #K #V #i #HLK #HV +@csx_intro #X #H #Hi +elim (cpx_inv_lref1 … H) -H +[ #H destruct elim Hi // +| -Hi * #I0 #K0 #V0 #V1 #HLK0 #HV01 #HV1 + lapply (drop_mono … HLK0 … HLK) -HLK #H destruct + /3 width=8 by csx_lift, csx_cpx_trans, drop_fwd_drop2/ +] +qed. + +lemma csx_appl_simple: ∀h,g,G,L,V. ⦃G, L⦄ ⊢ ⬊*[h, g] V → ∀T1. + (∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV.T2) → + 𝐒⦃T1⦄ → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV.T1. +#h #g #G #L #V #H @(csx_ind … H) -V #V #_ #IHV #T1 #IHT1 #HT1 +@csx_intro #X #H1 #H2 +elim (cpx_inv_appl1_simple … H1) // -H1 +#V0 #T0 #HLV0 #HLT10 #H destruct +elim (eq_false_inv_tpair_dx … H2) -H2 +[ -IHV -HT1 /4 width=3 by csx_cpx_trans, cpx_pair_sn/ +| -HLT10 * #H #HV0 destruct + @IHV /4 width=3 by csx_cpx_trans, cpx_pair_sn/ (**) (* full auto 17s *) +] +qed. + +lemma csx_fqu_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → ⦃G2, L2⦄ ⊢ ⬊*[h, g] T2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +/2 width=8 by csx_inv_lref_bind, csx_inv_lift, csx_fwd_flat_dx, csx_fwd_bind_dx, csx_fwd_pair_sn/ +qed-. + +lemma csx_fquq_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → ⦃G2, L2⦄ ⊢ ⬊*[h, g] T2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H12 #H elim (fquq_inv_gen … H12) -H12 +[ /2 width=5 by csx_fqu_conf/ +| * #HG #HL #HT destruct // +] +qed-. + +lemma csx_fqup_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → ⦃G2, L2⦄ ⊢ ⬊*[h, g] T2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +/3 width=5 by csx_fqu_conf/ +qed-. + +lemma csx_fqus_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → ⦃G2, L2⦄ ⊢ ⬊*[h, g] T2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H12 #H elim (fqus_inv_gen … H12) -H12 +[ /2 width=5 by csx_fqup_conf/ +| * #HG #HL #HT destruct // +] +qed-. + +(* Main properties **********************************************************) + +theorem csx_gcp: ∀h,g. gcp (cpx h g) (eq …) (csx h g). +#h #g @mk_gcp +[ normalize /3 width=13 by cnx_lift/ +| #G #L elim (deg_total h g 0) /3 width=8 by cnx_sort_iter, ex_intro/ +| /2 width=8 by csx_lift/ +| /2 width=3 by csx_fwd_flat_dx/ +] +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lleq.ma new file mode 100644 index 000000000..6e23a716e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lleq.ma @@ -0,0 +1,30 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/cpx_lleq.ma". +include "basic_2A/computation/csx.ma". + +(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERMS ********************) + +(* Properties on lazy equivalence for local environments ********************) + +lemma csx_lleq_conf: ∀h,g,G,L1,T. ⦃G, L1⦄ ⊢ ⬊*[h, g] T → + ∀L2. L1 ≡[T, 0] L2 → ⦃G, L2⦄ ⊢ ⬊*[h, g] T. +#h #g #G #L1 #T #H @(csx_ind … H) -T +/4 width=6 by csx_intro, cpx_lleq_conf_dx, lleq_cpx_trans/ +qed-. + +lemma csx_lleq_trans: ∀h,g,G,L1,L2,T. + L1 ≡[T, 0] L2 → ⦃G, L2⦄ ⊢ ⬊*[h, g] T → ⦃G, L1⦄ ⊢ ⬊*[h, g] T. +/3 width=3 by csx_lleq_conf, lleq_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lpx.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lpx.ma new file mode 100644 index 000000000..72e0bc13b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lpx.ma @@ -0,0 +1,138 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/tsts_tsts.ma". +include "basic_2A/computation/cpxs_cpxs.ma". +include "basic_2A/computation/csx_alt.ma". +include "basic_2A/computation/csx_lift.ma". + +(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERMS ********************) + +(* Advanced properties ******************************************************) + +lemma csx_lpx_conf: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → + ∀T. ⦃G, L1⦄ ⊢ ⬊*[h, g] T → ⦃G, L2⦄ ⊢ ⬊*[h, g] T. +#h #g #G #L1 #L2 #HL12 #T #H @(csx_ind_alt … H) -T +/4 width=3 by csx_intro, lpx_cpx_trans/ +qed-. + +lemma csx_abst: ∀h,g,a,G,L,W. ⦃G, L⦄ ⊢ ⬊*[h, g] W → + ∀T. ⦃G, L.ⓛW⦄ ⊢ ⬊*[h, g] T → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓛ{a}W.T. +#h #g #a #G #L #W #HW @(csx_ind … HW) -W #W #_ #IHW #T #HT @(csx_ind … HT) -T #T #HT #IHT +@csx_intro #X #H1 #H2 +elim (cpx_inv_abst1 … H1) -H1 +#W0 #T0 #HLW0 #HLT0 #H destruct +elim (eq_false_inv_tpair_sn … H2) -H2 +[ -IHT #H lapply (csx_cpx_trans … HLT0) // -HT + #HT0 lapply (csx_lpx_conf … (L.ⓛW0) … HT0) -HT0 /3 width=1 by lpx_pair/ +| -IHW -HLW0 -HT * #H destruct /3 width=1 by/ +] +qed. + +lemma csx_abbr: ∀h,g,a,G,L,V. ⦃G, L⦄ ⊢ ⬊*[h, g] V → + ∀T. ⦃G, L.ⓓV⦄ ⊢ ⬊*[h, g] T → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓓ{a}V. T. +#h #g #a #G #L #V #HV elim HV -V #V #_ #IHV #T #HT @(csx_ind_alt … HT) -T #T #HT #IHT +@csx_intro #X #H1 #H2 +elim (cpx_inv_abbr1 … H1) -H1 * +[ #V1 #T1 #HLV1 #HLT1 #H destruct + elim (eq_false_inv_tpair_sn … H2) -H2 + [ /4 width=5 by csx_cpx_trans, csx_lpx_conf, lpx_pair/ + | -IHV -HLV1 * #H destruct /3 width=1 by cpx_cpxs/ + ] +| -IHV -IHT -H2 + /3 width=8 by csx_cpx_trans, csx_inv_lift, drop_drop/ +] +qed. + +fact csx_appl_beta_aux: ∀h,g,a,G,L,U1. ⦃G, L⦄ ⊢ ⬊*[h, g] U1 → + ∀V,W,T1. U1 = ⓓ{a}ⓝW.V.T1 → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV.ⓛ{a}W.T1. +#h #g #a #G #L #X #H @(csx_ind … H) -X +#X #HT1 #IHT1 #V #W #T1 #H1 destruct +@csx_intro #X #H1 #H2 +elim (cpx_inv_appl1 … H1) -H1 * +[ -HT1 #V0 #Y #HLV0 #H #H0 destruct + elim (cpx_inv_abst1 … H) -H #W0 #T0 #HLW0 #HLT0 #H destruct + @IHT1 -IHT1 [4: // | skip |3: #H destruct /2 width=1 by/ ] -H2 + lapply (lsubr_cpx_trans … HLT0 (L.ⓓⓝW.V) ?) -HLT0 /3 width=1 by cpx_bind, cpx_flat, lsubr_beta/ +| -IHT1 -H2 #b #V0 #W0 #W2 #T0 #T2 #HLV0 #HLW02 #HLT02 #H1 #H3 destruct + lapply (lsubr_cpx_trans … HLT02 (L.ⓓⓝW0.V) ?) -HLT02 + /4 width=5 by csx_cpx_trans, cpx_bind, cpx_flat, lsubr_beta/ +| -HT1 -IHT1 -H2 #b #V0 #V1 #W0 #W1 #T0 #T3 #_ #_ #_ #_ #H destruct +] +qed-. + +(* Basic_1: was just: sn3_beta *) +lemma csx_appl_beta: ∀h,g,a,G,L,V,W,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓓ{a}ⓝW.V.T → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV.ⓛ{a}W.T. +/2 width=3 by csx_appl_beta_aux/ qed. + +fact csx_appl_theta_aux: ∀h,g,a,G,L,U. ⦃G, L⦄ ⊢ ⬊*[h, g] U → ∀V1,V2. ⬆[0, 1] V1 ≡ V2 → + ∀V,T. U = ⓓ{a}V.ⓐV2.T → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV1.ⓓ{a}V.T. +#h #g #a #G #L #X #H @(csx_ind_alt … H) -X #X #HVT #IHVT #V1 #V2 #HV12 #V #T #H destruct +lapply (csx_fwd_pair_sn … HVT) #HV +lapply (csx_fwd_bind_dx … HVT) -HVT #HVT +@csx_intro #X #HL #H +elim (cpx_inv_appl1 … HL) -HL * +[ -HV #V0 #Y #HLV10 #HL #H0 destruct + elim (cpx_inv_abbr1 … HL) -HL * + [ #V3 #T3 #HV3 #HLT3 #H0 destruct + elim (lift_total V0 0 1) #V4 #HV04 + elim (eq_term_dec (ⓓ{a}V.ⓐV2.T) (ⓓ{a}V3.ⓐV4.T3)) + [ -IHVT #H0 destruct + elim (eq_false_inv_tpair_sn … H) -H + [ -HLV10 -HV3 -HLT3 -HVT + >(lift_inj … HV12 … HV04) -V4 + #H elim H // + | * #_ #H elim H // + ] + | -H -HVT #H + lapply (cpx_lift … HLV10 (L.ⓓV) (Ⓕ) … HV12 … HV04) -HLV10 -HV12 /2 width=1 by drop_drop/ #HV24 + @(IHVT … H … HV04) -IHVT /4 width=1 by cpx_cpxs, cpx_bind, cpx_flat/ + ] + | -H -IHVT #T0 #HLT0 #HT0 #H0 destruct + lapply (csx_cpx_trans … HVT (ⓐV2.T0) ?) /2 width=1 by cpx_flat/ -T #HVT0 + lapply (csx_inv_lift … L … (Ⓕ) … 1 HVT0 ? ? ?) -HVT0 + /3 width=5 by csx_cpx_trans, cpx_pair_sn, drop_drop, lift_flat/ + ] +| -HV -HV12 -HVT -IHVT -H #b #V0 #W0 #W1 #T0 #T1 #_ #_ #_ #H destruct +| -IHVT -H #b #V0 #V3 #W0 #W1 #T0 #T1 #HLV10 #HV03 #HLW01 #HLT01 #H1 #H2 destruct + lapply (cpx_lift … HLV10 (L. ⓓW0) … HV12 … HV03) -HLV10 -HV12 -HV03 /2 width=2 by drop_drop/ #HLV23 + @csx_abbr /2 width=3 by csx_cpx_trans/ -HV + @(csx_lpx_conf … (L.ⓓW0)) /2 width=1 by lpx_pair/ -W1 + /4 width=5 by csx_cpxs_trans, cpx_cpxs, cpx_flat/ +] +qed-. + +lemma csx_appl_theta: ∀h,g,a,V1,V2. ⬆[0, 1] V1 ≡ V2 → + ∀G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓓ{a}V.ⓐV2.T → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV1.ⓓ{a}V.T. +/2 width=5 by csx_appl_theta_aux/ qed. + +(* Basic_1: was just: sn3_appl_appl *) +lemma csx_appl_simple_tsts: ∀h,g,G,L,V. ⦃G, L⦄ ⊢ ⬊*[h, g] V → ∀T1. ⦃G, L⦄ ⊢ ⬊*[h, g] T1 → + (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 ≂ T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV.T2) → + 𝐒⦃T1⦄ → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV.T1. +#h #g #G #L #V #H @(csx_ind … H) -V #V #_ #IHV #T1 #H @(csx_ind … H) -T1 #T1 #H1T1 #IHT1 #H2T1 #H3T1 +@csx_intro #X #HL #H +elim (cpx_inv_appl1_simple … HL) -HL // +#V0 #T0 #HLV0 #HLT10 #H0 destruct +elim (eq_false_inv_tpair_sn … H) -H +[ -IHT1 #HV0 + @(csx_cpx_trans … (ⓐV0.T1)) /2 width=1 by cpx_flat/ -HLT10 + @IHV -IHV /4 width=3 by csx_cpx_trans, cpx_pair_sn/ +| -IHV -H1T1 -HLV0 * #H #H1T10 destruct + elim (tsts_dec T1 T0) #H2T10 + [ @IHT1 -IHT1 /4 width=3 by cpxs_strap2, cpxs_strap1, tsts_canc_sn, simple_tsts_repl_dx/ + | -IHT1 -H3T1 -H1T10 /3 width=1 by cpx_cpxs/ + ] +] +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lpxs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lpxs.ma new file mode 100644 index 000000000..4128a4e08 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lpxs.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/csx_lpx.ma". +include "basic_2A/computation/lpxs.ma". + +(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERMS ********************) + +(* Properties on sn extended parallel computation for local environments ****) + +lemma csx_lpxs_conf: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → + ∀T. ⦃G, L1⦄ ⊢ ⬊*[h, g] T → ⦃G, L2⦄ ⊢ ⬊*[h, g] T. +#h #g #G #L1 #L2 #H @(lpxs_ind … H) -L2 /3 by lpxs_strap1, csx_lpx_conf/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_tsts_vector.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_tsts_vector.ma new file mode 100644 index 000000000..51345fb0f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_tsts_vector.ma @@ -0,0 +1,128 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/gcp_cr.ma". +include "basic_2A/computation/cpxs_tsts_vector.ma". +include "basic_2A/computation/csx_lpx.ma". +include "basic_2A/computation/csx_vector.ma". + +(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERM VECTORS *************) + +(* Advanced properties ******************************************************) + +(* Basic_1: was just: sn3_appls_lref *) +lemma csx_applv_cnx: ∀h,g,G,L,T. 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → + ∀Vs. ⦃G, L⦄ ⊢ ⬊*[h, g] Vs → ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶVs.T. +#h #g #G #L #T #H1T #H2T #Vs elim Vs -Vs [ #_ @(cnx_csx … H2T) ] (**) (* /2 width=1/ does not work *) +#V #Vs #IHV #H +elim (csxv_inv_cons … H) -H #HV #HVs +@csx_appl_simple_tsts /2 width=1 by applv_simple/ -IHV -HV -HVs +#X #H #H0 +lapply (cpxs_fwd_cnx_vector … H) -H // -H1T -H2T #H +elim (H0) -H0 // +qed. + +lemma csx_applv_sort: ∀h,g,G,L,k,Vs. ⦃G, L⦄ ⊢ ⬊*[h, g] Vs → ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶVs.⋆k. +#h #g #G #L #k elim (deg_total h g k) +#d generalize in match k; -k @(nat_ind_plus … d) -d [ /3 width=6 by csx_applv_cnx, cnx_sort, simple_atom/ ] +#d #IHd #k #Hkd lapply (deg_next_SO … Hkd) -Hkd +#Hkd #Vs elim Vs -Vs /2 width=1 by/ +#V #Vs #IHVs #HVVs +elim (csxv_inv_cons … HVVs) #HV #HVs +@csx_appl_simple_tsts /2 width=1 by applv_simple, simple_atom/ -IHVs -HV -HVs +#X #H #H0 +elim (cpxs_fwd_sort_vector … H) -H #H +[ elim H0 -H0 // +| -H0 @(csx_cpxs_trans … (Ⓐ(V@Vs).⋆(next h k))) /2 width=1 by cpxs_flat_dx/ +] +qed. + +(* Basic_1: was just: sn3_appls_beta *) +lemma csx_applv_beta: ∀h,g,a,G,L,Vs,V,W,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶVs.ⓓ{a}ⓝW.V.T → + ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶVs. ⓐV.ⓛ{a}W.T. +#h #g #a #G #L #Vs elim Vs -Vs /2 width=1 by csx_appl_beta/ +#V0 #Vs #IHV #V #W #T #H1T +lapply (csx_fwd_pair_sn … H1T) #HV0 +lapply (csx_fwd_flat_dx … H1T) #H2T +@csx_appl_simple_tsts /2 width=1 by applv_simple, simple_flat/ -IHV -HV0 -H2T +#X #H #H0 +elim (cpxs_fwd_beta_vector … H) -H #H +[ -H1T elim H0 -H0 // +| -H0 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/ +] +qed. + +lemma csx_applv_delta: ∀h,g,I,G,L,K,V1,i. ⬇[i] L ≡ K.ⓑ{I}V1 → + ∀V2. ⬆[0, i + 1] V1 ≡ V2 → + ∀Vs. ⦃G, L⦄ ⊢ ⬊*[h, g] (ⒶVs.V2) → ⦃G, L⦄ ⊢ ⬊*[h, g] (ⒶVs.#i). +#h #g #I #G #L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs +[ /4 width=12 by csx_inv_lift, csx_lref_bind, drop_fwd_drop2/ +| #V #Vs #IHV #H1T + lapply (csx_fwd_pair_sn … H1T) #HV + lapply (csx_fwd_flat_dx … H1T) #H2T + @csx_appl_simple_tsts /2 width=1 by applv_simple, simple_atom/ -IHV -HV -H2T + #X #H #H0 + elim (cpxs_fwd_delta_vector … HLK … HV12 … H) -HLK -HV12 -H #H + [ -H1T elim H0 -H0 // + | -H0 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/ + ] +] +qed. + +(* Basic_1: was just: sn3_appls_abbr *) +lemma csx_applv_theta: ∀h,g,a,G,L,V1s,V2s. ⬆[0, 1] V1s ≡ V2s → + ∀V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓓ{a}V.ⒶV2s.T → + ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶV1s.ⓓ{a}V.T. +#h #g #a #G #L #V1s #V2s * -V1s -V2s /2 width=1 by/ +#V1s #V2s #V1 #V2 #HV12 #H +generalize in match HV12; -HV12 generalize in match V2; -V2 generalize in match V1; -V1 +elim H -V1s -V2s /2 width=3 by csx_appl_theta/ +#V1s #V2s #V1 #V2 #HV12 #HV12s #IHV12s #W1 #W2 #HW12 #V #T #H +lapply (csx_appl_theta … HW12 … H) -H -HW12 #H +lapply (csx_fwd_pair_sn … H) #HW1 +lapply (csx_fwd_flat_dx … H) #H1 +@csx_appl_simple_tsts /2 width=3 by simple_flat/ -IHV12s -HW1 -H1 #X #H1 #H2 +elim (cpxs_fwd_theta_vector … (V2@V2s) … H1) -H1 /2 width=1 by liftv_cons/ -HV12s -HV12 +[ -H #H elim H2 -H2 // +| -H2 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/ +] +qed. + +(* Basic_1: was just: sn3_appls_cast *) +lemma csx_applv_cast: ∀h,g,G,L,Vs,W,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶVs.W → ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶVs.T → + ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶVs.ⓝW.T. +#h #g #G #L #Vs elim Vs -Vs /2 width=1 by csx_cast/ +#V #Vs #IHV #W #T #H1W #H1T +lapply (csx_fwd_pair_sn … H1W) #HV +lapply (csx_fwd_flat_dx … H1W) #H2W +lapply (csx_fwd_flat_dx … H1T) #H2T +@csx_appl_simple_tsts /2 width=1 by applv_simple, simple_flat/ -IHV -HV -H2W -H2T +#X #H #H0 +elim (cpxs_fwd_cast_vector … H) -H #H +[ -H1W -H1T elim H0 -H0 // +| -H1W -H0 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/ +| -H1T -H0 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/ +] +qed. + +theorem csx_gcr: ∀h,g. gcr (cpx h g) (eq …) (csx h g) (csx h g). +#h #g @mk_gcr // +[ /3 width=1 by csx_applv_cnx/ +|2,3,6: /2 width=1 by csx_applv_beta, csx_applv_sort, csx_applv_cast/ +| /2 width=7 by csx_applv_delta/ +| #G #L #V1s #V2s #HV12s #a #V #T #H #HV + @(csx_applv_theta … HV12s) -HV12s + @csx_abbr // +] +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_vector.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_vector.ma new file mode 100644 index 000000000..b45bc8b5e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_vector.ma @@ -0,0 +1,42 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/term_vector.ma". +include "basic_2A/computation/csx.ma". + +(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERM VECTORS *************) + +definition csxv: ∀h. sd h → relation3 genv lenv (list term) ≝ + λh,g,G,L. all … (csx h g G L). + +interpretation + "context-sensitive strong normalization (term vector)" + 'SN h g G L Ts = (csxv h g G L Ts). + +(* Basic inversion lemmas ***************************************************) + +lemma csxv_inv_cons: ∀h,g,G,L,T,Ts. ⦃G, L⦄ ⊢ ⬊*[h, g] T @ Ts → + ⦃G, L⦄ ⊢ ⬊*[h, g] T ∧ ⦃G, L⦄ ⊢ ⬊*[h, g] Ts. +normalize // qed-. + +(* Basic forward lemmas *****************************************************) + +lemma csx_fwd_applv: ∀h,g,G,L,T,Vs. ⦃G, L⦄ ⊢ ⬊*[h, g] Ⓐ Vs.T → + ⦃G, L⦄ ⊢ ⬊*[h, g] Vs ∧ ⦃G, L⦄ ⊢ ⬊*[h, g] T. +#h #g #G #L #T #Vs elim Vs -Vs /2 width=1 by conj/ +#V #Vs #IHVs #HVs +lapply (csx_fwd_pair_sn … HVs) #HV +lapply (csx_fwd_flat_dx … HVs) -HVs #HVs +elim (IHVs HVs) -IHVs -HVs /3 width=1 by conj/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg.ma new file mode 100644 index 000000000..0fc277169 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg.ma @@ -0,0 +1,39 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/lazybtpredstarproper_8.ma". +include "basic_2A/reduction/fpb.ma". +include "basic_2A/computation/fpbs.ma". + +(* "QRST" PROPER PARALLEL COMPUTATION FOR CLOSURES **************************) + +definition fpbg: ∀h. sd h → tri_relation genv lenv term ≝ + λh,g,G1,L1,T1,G2,L2,T2. + ∃∃G,L,T. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G, L, T⦄ & ⦃G, L, T⦄ ≥[h, g] ⦃G2, L2, T2⦄. + +interpretation "'qrst' proper parallel computation (closure)" + 'LazyBTPRedStarProper h g G1 L1 T1 G2 L2 T2 = (fpbg h g G1 L1 T1 G2 L2 T2). + +(* Basic properties *********************************************************) + +lemma fpb_fpbg: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +/2 width=5 by ex2_3_intro/ qed. + +lemma fpbg_fpbq_trans: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. + ⦃G1, L1, T1⦄ >≡[h, g] ⦃G, L, T⦄ → ⦃G, L, T⦄ ≽[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 * +/3 width=9 by fpbs_strap1, ex2_3_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_fleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_fleq.ma new file mode 100644 index 000000000..a4f2708a0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_fleq.ma @@ -0,0 +1,73 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/fleq_fleq.ma". +include "basic_2A/reduction/fpbq_alt.ma". +include "basic_2A/computation/fpbg.ma". + +(* "QRST" PROPER PARALLEL COMPUTATION FOR CLOSURES **************************) + +(* Properties on lazy equivalence for closures ******************************) + +lemma fpbg_fleq_trans: ∀h,g,G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G, L, T⦄ → + ∀G2,L2,T2. ⦃G, L, T⦄ ≡[0] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +/3 width=5 by fpbg_fpbq_trans, fleq_fpbq/ qed-. + +lemma fleq_fpbg_trans: ∀h,g,G,G2,L,L2,T,T2. ⦃G, L, T⦄ >≡[h, g] ⦃G2, L2, T2⦄ → + ∀G1,L1,T1. ⦃G1, L1, T1⦄ ≡[0] ⦃G, L, T⦄ → ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +#h #g #G #G2 #L #L2 #T #T2 * #G0 #L0 #T0 #H0 #H02 #G1 #L1 #T1 #H1 +elim (fleq_fpb_trans … H1 … H0) -G -L -T +/4 width=9 by fpbs_strap2, fleq_fpbq, ex2_3_intro/ +qed-. + +(* alternative definition of fpbs *******************************************) + +lemma fleq_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. + ⦃G1, L1, T1⦄ ≡[0] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 * /2 width=1 by lleq_fpbs/ +qed. + +lemma fpbg_fwd_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. + ⦃G1, L1, T1⦄ >≡[h,g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 * +/3 width=5 by fpbs_strap2, fpb_fpbq/ +qed-. + +lemma fpbs_fpbg: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≡[0] ⦃G2, L2, T2⦄ ∨ + ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind … H) -G2 -L2 -T2 +[ /2 width=1 by or_introl/ +| #G #G2 #L #L2 #T #T2 #_ #H2 * #H1 @(fpbq_ind_alt … H2) -H2 #H2 + [ /3 width=5 by fleq_trans, or_introl/ + | elim (fleq_fpb_trans … H1 … H2) -G -L -T + /4 width=5 by ex2_3_intro, or_intror, fleq_fpbs/ + | /3 width=5 by fpbg_fleq_trans, or_intror/ + | /4 width=5 by fpbg_fpbq_trans, fpb_fpbq, or_intror/ + ] +] +qed-. + +(* Advanced properties of "qrst" parallel computation on closures ***********) + +lemma fpbs_fpb_trans: ∀h,g,F1,F2,K1,K2,T1,T2. ⦃F1, K1, T1⦄ ≥[h, g] ⦃F2, K2, T2⦄ → + ∀G2,L2,U2. ⦃F2, K2, T2⦄ ≻[h, g] ⦃G2, L2, U2⦄ → + ∃∃G1,L1,U1. ⦃F1, K1, T1⦄ ≻[h, g] ⦃G1, L1, U1⦄ & ⦃G1, L1, U1⦄ ≥[h, g] ⦃G2, L2, U2⦄. +#h #g #F1 #F2 #K1 #K2 #T1 #T2 #H elim (fpbs_fpbg … H) -H +[ #H12 #G2 #L2 #U2 #H2 elim (fleq_fpb_trans … H12 … H2) -F2 -K2 -T2 + /3 width=5 by fleq_fpbs, ex2_3_intro/ +| * #H1 #H2 #H3 #H4 #H5 #H6 #H7 #H8 #H9 + @(ex2_3_intro … H4) -H4 /3 width=5 by fpbs_strap1, fpb_fpbq/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_fpbg.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_fpbg.ma new file mode 100644 index 000000000..9387b5f08 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_fpbg.ma @@ -0,0 +1,22 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/fpbg_fpbs.ma". + +(* "QRST" PROPER PARALLEL COMPUTATION FOR CLOSURES **************************) + +(* Main properties **********************************************************) + +theorem fpbg_trans: ∀h,g. tri_transitive … (fpbg h g). +/3 width=5 by fpbg_fpbs_trans, fpbg_fwd_fpbs/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_fpbs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_fpbs.ma new file mode 100644 index 000000000..366819fd1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_fpbs.ma @@ -0,0 +1,68 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/lpxs_lleq.ma". +include "basic_2A/computation/fpbs_lift.ma". +include "basic_2A/computation/fpbg_fleq.ma". + +(* "QRST" PROPER PARALLEL COMPUTATION FOR CLOSURES **************************) + +(* Properties on "qrst" parallel reduction on closures **********************) + +lemma fpb_fpbg_trans: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. + ⦃G1, L1, T1⦄ ≻[h, g] ⦃G, L, T⦄ → ⦃G, L, T⦄ >≡[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +/3 width=5 by fpbg_fwd_fpbs, ex2_3_intro/ qed-. + +lemma fpbq_fpbg_trans: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. + ⦃G1, L1, T1⦄ ≽[h, g] ⦃G, L, T⦄ → ⦃G, L, T⦄ >≡[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 @(fpbq_ind_alt … H1) -H1 +/2 width=5 by fleq_fpbg_trans, fpb_fpbg_trans/ +qed-. + +(* Properties on "qrst" parallel compuutation on closures *******************) + +lemma fpbs_fpbg_trans: ∀h,g,G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → + ∀G2,L2,T2. ⦃G, L, T⦄ >≡[h, g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G #L1 #L #T1 #T #H @(fpbs_ind … H) -G -L -T /3 width=5 by fpbq_fpbg_trans/ +qed-. + +(* Note: this is used in the closure proof *) +lemma fpbg_fpbs_trans: ∀h,g,G,G2,L,L2,T,T2. ⦃G, L, T⦄ ≥[h, g] ⦃G2, L2, T2⦄ → + ∀G1,L1,T1. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G, L, T⦄ → ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +#h #g #G #G2 #L #L2 #T #T2 #H @(fpbs_ind_dx … H) -G -L -T /3 width=5 by fpbg_fpbq_trans/ +qed-. + +(* Note: this is used in the closure proof *) +lemma fqup_fpbg: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim (fqup_inv_step_sn … H) -H +/3 width=5 by fqus_fpbs, fpb_fqu, ex2_3_intro/ +qed. + +lemma cpxs_fpbg: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → + (T1 = T2 → ⊥) → ⦃G, L, T1⦄ >≡[h, g] ⦃G, L, T2⦄. +#h #g #G #L #T1 #T2 #H #H0 elim (cpxs_neq_inv_step_sn … H … H0) -H -H0 +/4 width=5 by cpxs_fpbs, fpb_cpx, ex2_3_intro/ +qed. + +lemma lstas_fpbg: ∀h,g,G,L,T1,T2,d2. ⦃G, L⦄ ⊢ T1 •*[h, d2] T2 → (T1 = T2 → ⊥) → + ∀d1. d2 ≤ d1 → ⦃G, L⦄ ⊢ T1 ▪[h, g] d1 → ⦃G, L, T1⦄ >≡[h, g] ⦃G, L, T2⦄. +/3 width=5 by lstas_cpxs, cpxs_fpbg/ qed. + +lemma lpxs_fpbg: ∀h,g,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → + (L1 ≡[T, 0] L2 → ⊥) → ⦃G, L1, T⦄ >≡[h, g] ⦃G, L2, T⦄. +#h #g #G #L1 #L2 #T #H #H0 elim (lpxs_nlleq_inv_step_sn … H … H0) -H -H0 +/4 width=5 by fpb_lpx, lpxs_lleq_fpbs, ex2_3_intro/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_lift.ma new file mode 100644 index 000000000..aa27d1f90 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_lift.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/fpb_lift.ma". +include "basic_2A/computation/fpbg.ma". + +(* "QRST" PARALLEL COMPUTATION FOR CLOSURES *********************************) + +(* Advanced properties ******************************************************) + +lemma sta_fpbg: ∀h,g,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 ▪[h, g] d+1 → + ⦃G, L⦄ ⊢ T1 •*[h, 1] T2 → ⦃G, L, T1⦄ >≡[h, g] ⦃G, L, T2⦄. +/4 width=2 by fpb_fpbg, sta_fpb/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs.ma new file mode 100644 index 000000000..e72a56c3e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs.ma @@ -0,0 +1,161 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/btpredstar_8.ma". +include "basic_2A/multiple/fqus.ma". +include "basic_2A/reduction/fpbq.ma". +include "basic_2A/computation/cpxs.ma". +include "basic_2A/computation/lpxs.ma". + +(* "QRST" PARALLEL COMPUTATION FOR CLOSURES *********************************) + +definition fpbs: ∀h. sd h → tri_relation genv lenv term ≝ + λh,g. tri_TC … (fpbq h g). + +interpretation "'qrst' parallel computation (closure)" + 'BTPRedStar h g G1 L1 T1 G2 L2 T2 = (fpbs h g G1 L1 T1 G2 L2 T2). + +(* Basic eliminators ********************************************************) + +lemma fpbs_ind: ∀h,g,G1,L1,T1. ∀R:relation3 genv lenv term. R G1 L1 T1 → + (∀G,G2,L,L2,T,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → ⦃G, L, T⦄ ≽[h, g] ⦃G2, L2, T2⦄ → R G L T → R G2 L2 T2) → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2. +/3 width=8 by tri_TC_star_ind/ qed-. + +lemma fpbs_ind_dx: ∀h,g,G2,L2,T2. ∀R:relation3 genv lenv term. R G2 L2 T2 → + (∀G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G, L, T⦄ → ⦃G, L, T⦄ ≥[h, g] ⦃G2, L2, T2⦄ → R G L T → R G1 L1 T1) → + ∀G1,L1,T1. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → R G1 L1 T1. +/3 width=8 by tri_TC_star_ind_dx/ qed-. + +(* Basic properties *********************************************************) + +lemma fpbs_refl: ∀h,g. tri_reflexive … (fpbs h g). +/2 width=1 by tri_inj/ qed. + +lemma fpbq_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +/2 width=1 by tri_inj/ qed. + +lemma fpbs_strap1: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → + ⦃G, L, T⦄ ≽[h, g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +/2 width=5 by tri_step/ qed-. + +lemma fpbs_strap2: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G, L, T⦄ → + ⦃G, L, T⦄ ≥[h, g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +/2 width=5 by tri_TC_strap/ qed-. + +lemma fqup_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +/4 width=5 by fqu_fquq, fpbq_fquq, tri_step/ +qed. + +lemma fqus_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -G2 -L2 -T2 +/3 width=5 by fpbq_fquq, tri_step/ +qed. + +lemma cpxs_fpbs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L, T1⦄ ≥[h, g] ⦃G, L, T2⦄. +#h #g #G #L #T1 #T2 #H @(cpxs_ind … H) -T2 +/3 width=5 by fpbq_cpx, fpbs_strap1/ +qed. + +lemma lpxs_fpbs: ∀h,g,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → ⦃G, L1, T⦄ ≥[h, g] ⦃G, L2, T⦄. +#h #g #G #L1 #L2 #T #H @(lpxs_ind … H) -L2 +/3 width=5 by fpbq_lpx, fpbs_strap1/ +qed. + +lemma lleq_fpbs: ∀h,g,G,L1,L2,T. L1 ≡[T, 0] L2 → ⦃G, L1, T⦄ ≥[h, g] ⦃G, L2, T⦄. +/3 width=1 by fpbq_fpbs, fpbq_lleq/ qed. + +lemma cprs_fpbs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → ⦃G, L, T1⦄ ≥[h, g] ⦃G, L, T2⦄. +/3 width=1 by cprs_cpxs, cpxs_fpbs/ qed. + +lemma lprs_fpbs: ∀h,g,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡* L2 → ⦃G, L1, T⦄ ≥[h, g] ⦃G, L2, T⦄. +/3 width=1 by lprs_lpxs, lpxs_fpbs/ qed. + +lemma fpbs_fqus_trans: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → + ⦃G, L, T⦄ ⊐* ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H @(fqus_ind … H) -G2 -L2 -T2 +/3 width=5 by fpbs_strap1, fpbq_fquq/ +qed-. + +lemma fpbs_fqup_trans: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → + ⦃G, L, T⦄ ⊐+ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +/3 width=5 by fpbs_fqus_trans, fqup_fqus/ qed-. + +lemma fpbs_cpxs_trans: ∀h,g,G1,G,L1,L,T1,T,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → + ⦃G, L⦄ ⊢ T ➡*[h, g] T2 → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T2⦄. +#h #g #G1 #G #L1 #L #T1 #T #T2 #H1 #H @(cpxs_ind … H) -T2 +/3 width=5 by fpbs_strap1, fpbq_cpx/ +qed-. + +lemma fpbs_lpxs_trans: ∀h,g,G1,G,L1,L,L2,T1,T. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → + ⦃G, L⦄ ⊢ ➡*[h, g] L2 → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L2, T⦄. +#h #g #G1 #G #L1 #L #L2 #T1 #T #H1 #H @(lpxs_ind … H) -L2 +/3 width=5 by fpbs_strap1, fpbq_lpx/ +qed-. + +lemma fpbs_lleq_trans: ∀h,g,G1,G,L1,L,L2,T1,T. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → + L ≡[T, 0] L2 → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L2, T⦄. +/3 width=5 by fpbs_strap1, fpbq_lleq/ qed-. + +lemma fqus_fpbs_trans: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G, L, T⦄ ≥[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐* ⦃G, L, T⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H @(fqus_ind_dx … H) -G1 -L1 -T1 +/3 width=5 by fpbs_strap2, fpbq_fquq/ +qed-. + +lemma cpxs_fpbs_trans: ∀h,g,G1,G2,L1,L2,T1,T,T2. ⦃G1, L1, T⦄ ≥[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] T → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T #T2 #H1 #H @(cpxs_ind_dx … H) -T1 +/3 width=5 by fpbs_strap2, fpbq_cpx/ +qed-. + +lemma lpxs_fpbs_trans: ∀h,g,G1,G2,L1,L,L2,T1,T2. ⦃G1, L, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ ➡*[h, g] L → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L #L2 #T1 #T2 #H1 #H @(lpxs_ind_dx … H) -L1 +/3 width=5 by fpbs_strap2, fpbq_lpx/ +qed-. + +lemma lleq_fpbs_trans: ∀h,g,G1,G2,L1,L,L2,T1,T2. ⦃G1, L, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → + L1 ≡[T1, 0] L → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +/3 width=5 by fpbs_strap2, fpbq_lleq/ qed-. + +lemma cpxs_fqus_fpbs: ∀h,g,G1,G2,L1,L2,T1,T,T2. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] T → + ⦃G1, L1, T⦄ ⊐* ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +/3 width=5 by fpbs_fqus_trans, cpxs_fpbs/ qed. + +lemma cpxs_fqup_fpbs: ∀h,g,G1,G2,L1,L2,T1,T,T2. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] T → + ⦃G1, L1, T⦄ ⊐+ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +/3 width=5 by fpbs_fqup_trans, cpxs_fpbs/ qed. + +lemma fqus_lpxs_fpbs: ∀h,g,G1,G2,L1,L,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L, T2⦄ → + ⦃G2, L⦄ ⊢ ➡*[h, g] L2 → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +/3 width=3 by fpbs_lpxs_trans, fqus_fpbs/ qed. + +lemma cpxs_fqus_lpxs_fpbs: ∀h,g,G1,G2,L1,L,L2,T1,T,T2. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] T → + ⦃G1, L1, T⦄ ⊐* ⦃G2, L, T2⦄ → ⦃G2, L⦄ ⊢ ➡*[h, g] L2 → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +/3 width=5 by cpxs_fqus_fpbs, fpbs_lpxs_trans/ qed. + +lemma lpxs_lleq_fpbs: ∀h,g,G,L1,L,L2,T. ⦃G, L1⦄ ⊢ ➡*[h, g] L → + L ≡[T, 0] L2 → ⦃G, L1, T⦄ ≥[h, g] ⦃G, L2, T⦄. +/3 width=3 by lpxs_fpbs_trans, lleq_fpbs/ qed. + +(* Note: this is used in the closure proof *) +lemma cpr_lpr_fpbs: ∀h,g,G,L1,L2,T1,T2. ⦃G, L1⦄ ⊢ T1 ➡ T2 → ⦃G, L1⦄ ⊢ ➡ L2 → + ⦃G, L1, T1⦄ ≥[h, g] ⦃G, L2, T2⦄. +/4 width=5 by fpbs_strap1, fpbq_fpbs, lpr_fpbq, cpr_fpbq/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_aaa.ma new file mode 100644 index 000000000..58d34248e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_aaa.ma @@ -0,0 +1,27 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/fpbq_aaa.ma". +include "basic_2A/computation/fpbs.ma". + +(* "QRST" PARALLEL COMPUTATION FOR CLOSURES *********************************) + +(* Properties on atomic arity assignment for terms **************************) + +lemma fpbs_aaa_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → + ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind … H) -G2 -L2 -T2 /2 width=2 by ex_intro/ +#G #G2 #L #L2 #T #T2 #_ #H2 #IH1 #A #HA elim (IH1 … HA) -IH1 -A +/2 width=8 by fpbq_aaa_conf/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_alt.ma new file mode 100644 index 000000000..872928d5a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_alt.ma @@ -0,0 +1,82 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/btpredstaralt_8.ma". +include "basic_2A/multiple/lleq_fqus.ma". +include "basic_2A/computation/cpxs_lleq.ma". +include "basic_2A/computation/lpxs_lleq.ma". +include "basic_2A/computation/fpbs.ma". + +(* "QREST" PARALLEL COMPUTATION FOR CLOSURES ********************************) + +(* Note: alternative definition of fpbs *) +definition fpbsa: ∀h. sd h → tri_relation genv lenv term ≝ + λh,g,G1,L1,T1,G2,L2,T2. + ∃∃L0,L,T. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] T & + ⦃G1, L1, T⦄ ⊐* ⦃G2, L0, T2⦄ & + ⦃G2, L0⦄ ⊢ ➡*[h, g] L & L ≡[T2, 0] L2. + +interpretation "'big tree' parallel computation (closure) alternative" + 'BTPRedStarAlt h g G1 L1 T1 G2 L2 T2 = (fpbsa h g G1 L1 T1 G2 L2 T2). + +(* Basic properties *********************************************************) + +lemma fpb_fpbsa_trans: ∀h,g,G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G, L, T⦄ → + ∀G2,L2,T2. ⦃G, L, T⦄ ≥≥[h, g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G #L1 #L #T1 #T * -G -L -T [ #G #L #T #HG1 | #T #HT1 | #L #HL1 | #L #HL1 ] +#G2 #L2 #T2 * #L00 #L0 #T0 #HT0 #HG2 #HL00 #HL02 +[ elim (fquq_cpxs_trans … HT0 … HG1) -T + /3 width=7 by fqus_strap2, ex4_3_intro/ +| /3 width=7 by cpxs_strap2, ex4_3_intro/ +| lapply (lpx_cpxs_trans … HT0 … HL1) -HT0 #HT10 + elim (lpx_fqus_trans … HG2 … HL1) -L + /3 width=7 by lpxs_strap2, cpxs_trans, ex4_3_intro/ +| lapply (lleq_cpxs_trans … HT0 … HL1) -HT0 #HT0 + lapply (cpxs_lleq_conf_sn … HT0 … HL1) -HL1 #HL1 + elim (lleq_fqus_trans … HG2 … HL1) -L #K00 #HG12 #HKL00 + elim (lleq_lpxs_trans … HL00 … HKL00) -L00 + /3 width=9 by lleq_trans, ex4_3_intro/ +] +qed-. + +(* Main properties **********************************************************) + +theorem fpbs_fpbsa: ∀h,g,G1,G2,L1,L2,T1,T2. + ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind_dx … H) -G1 -L1 -T1 +/2 width=7 by fpb_fpbsa_trans, ex4_3_intro/ +qed. + +(* Main inversion lemmas ****************************************************) + +theorem fpbsa_inv_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. + ⦃G1, L1, T1⦄ ≥≥[h, g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 * +/3 width=5 by cpxs_fqus_lpxs_fpbs, fpbs_strap1, fpbq_lleq/ +qed-. + +(* Advanced properties ******************************************************) + +lemma fpbs_intro_alt: ∀h,g,G1,G2,L1,L0,L,L2,T1,T,T2. + ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] T → ⦃G1, L1, T⦄ ⊐* ⦃G2, L0, T2⦄ → + ⦃G2, L0⦄ ⊢ ➡*[h, g] L → L ≡[T2, 0] L2 → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ . +/3 width=7 by fpbsa_inv_fpbs, ex4_3_intro/ qed. + +(* Advanced inversion lemmas *************************************************) + +lemma fpbs_inv_alt: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → + ∃∃L0,L,T. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] T & + ⦃G1, L1, T⦄ ⊐* ⦃G2, L0, T2⦄ & + ⦃G2, L0⦄ ⊢ ➡*[h, g] L & L ≡[T2, 0] L2. +/2 width=1 by fpbs_fpbsa/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_fpb.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_fpb.ma new file mode 100644 index 000000000..634c21ae3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_fpb.ma @@ -0,0 +1,41 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/fpbq_alt.ma". +include "basic_2A/computation/fpbs_alt.ma". + +(* "QRST" PARALLEL COMPUTATION FOR CLOSURES *********************************) + +(* Properties on extended context-sensitive parallel computation for terms **) + +lemma fpbs_cpx_trans_neq: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡[h, g] U2 → (T2 = U2 → ⊥) → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡[h, g] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ≥[h, g] ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 #HnTU2 elim (fpbs_inv_alt … H) -H +#L00 #L0 #T0 #HT10 #H10 #HL00 #HL02 lapply (lleq_cpx_trans … HTU2 … HL02) -HTU2 +#HTU2 lapply (cpx_lleq_conf_sn … HTU2 … HL02) -HL02 +#HL02 lapply (lpxs_cpx_trans … HTU2 … HL00) -HTU2 +#HTU2 elim (fqus_cpxs_trans_neq … H10 … HTU2 HnTU2) -H10 -HTU2 -HnTU2 +#U0 #HTU0 #HnTU0 #HU02 elim (eq_term_dec T1 T0) #HnT10 destruct +[ -HT10 elim (cpxs_neq_inv_step_sn … HTU0 HnTU0) -HTU0 -HnTU0 +| -HnTU0 elim (cpxs_neq_inv_step_sn … HT10 HnT10) -HT10 -HnT10 +] +/4 width=10 by fpbs_intro_alt, cpxs_trans, ex3_intro/ +qed-. + +(* Properties on "rst" proper parallel reduction on closures ****************) + +lemma fpb_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +/3 width=1 by fpbq_fpbs, fpb_fpbq/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_fpbs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_fpbs.ma new file mode 100644 index 000000000..1f9a65437 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_fpbs.ma @@ -0,0 +1,22 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/fpbs.ma". + +(* "QRST" PARALLEL COMPUTATION FOR CLOSURES *********************************) + +(* Main properties **********************************************************) + +theorem fpbs_trans: ∀h,g. tri_transitive … (fpbs h g). +/2 width=5 by tri_TC_transitive/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_lift.ma new file mode 100644 index 000000000..4b538ed1d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_lift.ma @@ -0,0 +1,36 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/cpxs_lift.ma". +include "basic_2A/computation/fpbs.ma". + +(* "QRST" PARALLEL COMPUTATION FOR CLOSURES *********************************) + +(* Advanced properties ******************************************************) + +lemma lstas_fpbs: ∀h,g,G,L,T1,T2,d2. ⦃G, L⦄ ⊢ T1 •*[h, d2] T2 → + ∀d1. d2 ≤ d1 → ⦃G, L⦄ ⊢ T1 ▪[h, g] d1 → ⦃G, L, T1⦄ ≥[h, g] ⦃G, L, T2⦄. +/3 width=5 by cpxs_fpbs, lstas_cpxs/ qed. + +lemma sta_fpbs: ∀h,g,G,L,T,U,d. + ⦃G, L⦄ ⊢ T ▪[h, g] d+1 → ⦃G, L⦄ ⊢ T •*[h, 1] U → + ⦃G, L, T⦄ ≥[h, g] ⦃G, L, U⦄. +/2 width=5 by lstas_fpbs/ qed. + +(* Note: this is used in the closure proof *) +lemma cpr_lpr_sta_fpbs: ∀h,g,G,L1,L2,T1,T2,U2,d2. + ⦃G, L1⦄ ⊢ T1 ➡ T2 → ⦃G, L1⦄ ⊢ ➡ L2 → + ⦃G, L2⦄ ⊢ T2 ▪[h, g] d2+1 → ⦃G, L2⦄ ⊢ T2 •*[h, 1] U2 → + ⦃G, L1, T1⦄ ≥[h, g] ⦃G, L2, U2⦄. +/4 width=5 by fpbs_strap1, cpr_lpr_fpbs, sta_cpx, fpbq_cpx/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb.ma new file mode 100644 index 000000000..3425fd95d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb.ma @@ -0,0 +1,47 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/btsn_5.ma". +include "basic_2A/reduction/fpb.ma". +include "basic_2A/computation/csx.ma". + +(* "QRST" STRONGLY NORMALIZING CLOSURES *************************************) + +inductive fsb (h) (g): relation3 genv lenv term ≝ +| fsb_intro: ∀G1,L1,T1. ( + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → fsb h g G2 L2 T2 + ) → fsb h g G1 L1 T1 +. + +interpretation + "'qrst' strong normalization (closure)" + 'BTSN h g G L T = (fsb h g G L T). + +(* Basic eliminators ********************************************************) + +lemma fsb_ind_alt: ∀h,g. ∀R: relation3 …. ( + ∀G1,L1,T1. ⦥[h,g] ⦃G1, L1, T1⦄ → ( + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2 + ) → R G1 L1 T1 + ) → + ∀G,L,T. ⦥[h, g] ⦃G, L, T⦄ → R G L T. +#h #g #R #IH #G #L #T #H elim H -G -L -T +/4 width=1 by fsb_intro/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +lemma fsb_inv_csx: ∀h,g,G,L,T. ⦥[h, g] ⦃G, L, T⦄ → ⦃G, L⦄ ⊢ ⬊*[h, g] T. +#h #g #G #L #T #H elim H -G -L -T /5 width=1 by csx_intro, fpb_cpx/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb_aaa.ma new file mode 100644 index 000000000..ff566e3ab --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb_aaa.ma @@ -0,0 +1,71 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/fpbs_aaa.ma". +include "basic_2A/computation/csx_aaa.ma". +include "basic_2A/computation/fsb_csx.ma". + +(* "QRST" STRONGLY NORMALIZING CLOSURES *************************************) + +(* Main properties **********************************************************) + +(* Note: this is the "big tree" theorem ("RST" version) *) +theorem aaa_fsb: ∀h,g,G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ⦥[h, g] ⦃G, L, T⦄. +/3 width=2 by aaa_csx, csx_fsb/ qed. + +(* Note: this is the "big tree" theorem ("QRST" version) *) +theorem aaa_fsba: ∀h,g,G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ⦥⦥[h, g] ⦃G, L, T⦄. +/3 width=2 by fsb_fsba, aaa_fsb/ qed. + +(* Advanced eliminators on atomica arity assignment for terms ***************) + +fact aaa_ind_fpb_aux: ∀h,g. ∀R:relation3 genv lenv term. + (∀G1,L1,T1,A. ⦃G1, L1⦄ ⊢ T1 ⁝ A → + (∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) → + R G1 L1 T1 + ) → + ∀G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ∀A. ⦃G, L⦄ ⊢ T ⁝ A → R G L T. +#h #g #R #IH #G #L #T #H @(csx_ind_fpb … H) -G -L -T +#G1 #L1 #T1 #H1 #IH1 #A1 #HTA1 @IH -IH // +#G2 #L2 #T2 #H12 elim (fpbs_aaa_conf h g … G2 … L2 … T2 … HTA1) -A1 +/2 width=2 by fpb_fpbs/ +qed-. + +lemma aaa_ind_fpb: ∀h,g. ∀R:relation3 genv lenv term. + (∀G1,L1,T1,A. ⦃G1, L1⦄ ⊢ T1 ⁝ A → + (∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) → + R G1 L1 T1 + ) → + ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → R G L T. +/4 width=4 by aaa_ind_fpb_aux, aaa_csx/ qed-. + +fact aaa_ind_fpbg_aux: ∀h,g. ∀R:relation3 genv lenv term. + (∀G1,L1,T1,A. ⦃G1, L1⦄ ⊢ T1 ⁝ A → + (∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) → + R G1 L1 T1 + ) → + ∀G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ∀A. ⦃G, L⦄ ⊢ T ⁝ A → R G L T. +#h #g #R #IH #G #L #T #H @(csx_ind_fpbg … H) -G -L -T +#G1 #L1 #T1 #H1 #IH1 #A1 #HTA1 @IH -IH // +#G2 #L2 #T2 #H12 elim (fpbs_aaa_conf h g … G2 … L2 … T2 … HTA1) -A1 +/2 width=2 by fpbg_fwd_fpbs/ +qed-. + +lemma aaa_ind_fpbg: ∀h,g. ∀R:relation3 genv lenv term. + (∀G1,L1,T1,A. ⦃G1, L1⦄ ⊢ T1 ⁝ A → + (∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) → + R G1 L1 T1 + ) → + ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → R G L T. +/4 width=4 by aaa_ind_fpbg_aux, aaa_csx/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb_alt.ma new file mode 100644 index 000000000..e483e093a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb_alt.ma @@ -0,0 +1,82 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/btsnalt_5.ma". +include "basic_2A/computation/fpbg_fpbs.ma". +include "basic_2A/computation/fsb.ma". + +(* "QRST" STRONGLY NORMALIZING CLOSURES *************************************) + +(* Note: alternative definition of fsb *) +inductive fsba (h) (g): relation3 genv lenv term ≝ +| fsba_intro: ∀G1,L1,T1. ( + ∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄ → fsba h g G2 L2 T2 + ) → fsba h g G1 L1 T1. + +interpretation + "'big tree' strong normalization (closure) alternative" + 'BTSNAlt h g G L T = (fsba h g G L T). + +(* Basic eliminators ********************************************************) + +lemma fsba_ind_alt: ∀h,g. ∀R: relation3 …. ( + ∀G1,L1,T1. ⦥⦥[h,g] ⦃G1, L1, T1⦄ → ( + ∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2 + ) → R G1 L1 T1 + ) → + ∀G,L,T. ⦥⦥[h, g] ⦃G, L, T⦄ → R G L T. +#h #g #R #IH #G #L #T #H elim H -G -L -T +/4 width=1 by fsba_intro/ +qed-. + +(* Basic properties *********************************************************) + +lemma fsba_fpbs_trans: ∀h,g,G1,L1,T1. ⦥⦥[h, g] ⦃G1, L1, T1⦄ → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → ⦥⦥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #L1 #T1 #H @(fsba_ind_alt … H) -G1 -L1 -T1 +/4 width=5 by fsba_intro, fpbs_fpbg_trans/ +qed-. + +(* Main properties **********************************************************) + +theorem fsb_fsba: ∀h,g,G,L,T. ⦥[h, g] ⦃G, L, T⦄ → ⦥⦥[h, g] ⦃G, L, T⦄. +#h #g #G #L #T #H @(fsb_ind_alt … H) -G -L -T +#G1 #L1 #T1 #_ #IH @fsba_intro +#G2 #L2 #T2 * /3 width=5 by fsba_fpbs_trans/ +qed. + +(* Main inversion lemmas ****************************************************) + +theorem fsba_inv_fsb: ∀h,g,G,L,T. ⦥⦥[h, g] ⦃G, L, T⦄ → ⦥[h, g] ⦃G, L, T⦄. +#h #g #G #L #T #H @(fsba_ind_alt … H) -G -L -T +/4 width=1 by fsb_intro, fpb_fpbg/ +qed-. + +(* Advanced properties ******************************************************) + +lemma fsb_fpbs_trans: ∀h,g,G1,L1,T1. ⦥[h, g] ⦃G1, L1, T1⦄ → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → ⦥[h, g] ⦃G2, L2, T2⦄. +/4 width=5 by fsba_inv_fsb, fsb_fsba, fsba_fpbs_trans/ qed-. + +(* Advanced eliminators *****************************************************) + +lemma fsb_ind_fpbg: ∀h,g. ∀R:relation3 genv lenv term. + (∀G1,L1,T1. ⦥[h, g] ⦃G1, L1, T1⦄ → + (∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) → + R G1 L1 T1 + ) → + ∀G1,L1,T1. ⦥[h, g] ⦃G1, L1, T1⦄ → R G1 L1 T1. +#h #g #R #IH #G1 #L1 #T1 #H @(fsba_ind_alt h g … G1 L1 T1) +/3 width=1 by fsba_inv_fsb, fsb_fsba/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb_csx.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb_csx.ma new file mode 100644 index 000000000..074b53e93 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb_csx.ma @@ -0,0 +1,70 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/fpbs_fpb.ma". +include "basic_2A/computation/fpbs_fpbs.ma". +include "basic_2A/computation/csx_fpbs.ma". +include "basic_2A/computation/lsx_csx.ma". +include "basic_2A/computation/fsb_alt.ma". + +(* "QRST" STRONGLY NORMALIZING CLOSURES *************************************) + +(* Advanced propreties on context-sensitive extended normalizing terms ******) + +lemma csx_fsb_fpbs: ∀h,g,G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → ⦥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #L1 #T1 #H @(csx_ind … H) -T1 +#T1 #HT1 #IHc #G2 #L2 #T2 @(fqup_wf_ind … G2 L2 T2) -G2 -L2 -T2 +#G0 #L0 #T0 #IHu #H10 lapply (csx_fpbs_conf … H10) // -HT1 +#HT0 generalize in match IHu; -IHu generalize in match H10; -H10 +@(lsx_ind … (csx_lsx … HT0 0)) -L0 +#L0 #_ #IHd #H10 #IHu @fsb_intro +#G2 #L2 #T2 * -G2 -L2 -T2 [ -IHd -IHc | -IHu -IHd | ] +[ /4 width=5 by fpbs_fqup_trans, fqu_fqup/ +| #T2 #HT02 #HnT02 elim (fpbs_cpx_trans_neq … H10 … HT02 HnT02) -T0 + /3 width=4 by/ +| #L2 #HL02 #HnL02 @(IHd … HL02 HnL02) -IHd -HnL02 [ -IHu -IHc | ] + [ /3 width=3 by fpbs_lpxs_trans, lpx_lpxs/ + | #G3 #L3 #T3 #H03 #_ elim (lpx_fqup_trans … H03 … HL02) -L2 + #L4 #T4 elim (eq_term_dec T0 T4) [ -IHc | -IHu ] + [ #H destruct /5 width=5 by fsb_fpbs_trans, lpxs_fpbs, fpbs_fqup_trans, lpx_lpxs/ + | #HnT04 #HT04 #H04 #HL43 elim (cpxs_neq_inv_step_sn … HT04 HnT04) -HT04 -HnT04 + #T2 #HT02 #HnT02 #HT24 elim (fpbs_cpx_trans_neq … H10 … HT02 HnT02) -T0 + lapply (fpbs_intro_alt … G3 … L4 … L3 L3 … T3 … HT24 ? ? ?) -HT24 + /3 width=8 by fpbs_trans, lpx_lpxs, fqup_fqus/ (**) (* full auto too slow *) + ] + ] +] +qed. + +lemma csx_fsb: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ⦥[h, g] ⦃G, L, T⦄. +/2 width=5 by csx_fsb_fpbs/ qed. + +(* Advanced eliminators *****************************************************) + +lemma csx_ind_fpb: ∀h,g. ∀R:relation3 genv lenv term. + (∀G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → + (∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) → + R G1 L1 T1 + ) → + ∀G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → R G L T. +/4 width=4 by fsb_inv_csx, csx_fsb, fsb_ind_alt/ qed-. + +lemma csx_ind_fpbg: ∀h,g. ∀R:relation3 genv lenv term. + (∀G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → + (∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) → + R G1 L1 T1 + ) → + ∀G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → R G L T. +/4 width=4 by fsb_inv_csx, csx_fsb, fsb_ind_fpbg/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/gcp.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/gcp.ma new file mode 100644 index 000000000..2a217b515 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/gcp.ma @@ -0,0 +1,58 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/genv.ma". +include "basic_2A/multiple/drops.ma". + +(* GENERIC COMPUTATION PROPERTIES *******************************************) + +definition nf ≝ λRR:relation4 genv lenv term term. λRS:relation term. + λG,L,T. NF … (RR G L) RS T. + +definition candidate: Type[0] ≝ relation3 genv lenv term. + +definition CP0 ≝ λRR:relation4 genv lenv term term. λRS:relation term. + ∀G. d_liftable1 (nf RR RS G) (Ⓕ). + +definition CP1 ≝ λRR:relation4 genv lenv term term. λRS:relation term. + ∀G,L. ∃k. NF … (RR G L) RS (⋆k). + +definition CP2 ≝ λRP:candidate. ∀G. d_liftable1 (RP G) (Ⓕ). + +definition CP3 ≝ λRP:candidate. + ∀G,L,T,k. RP G L (ⓐ⋆k.T) → RP G L T. + +(* requirements for generic computation properties *) +record gcp (RR:relation4 genv lenv term term) (RS:relation term) (RP:candidate) : Prop ≝ +{ cp0: CP0 RR RS; + cp1: CP1 RR RS; + cp2: CP2 RP; + cp3: CP3 RP +}. + +(* Basic properties *********************************************************) + +(* Basic_1: was: nf2_lift1 *) +lemma gcp0_lifts: ∀RR,RS,RP. gcp RR RS RP → ∀G. d_liftables1 (nf RR RS G) (Ⓕ). +#RR #RS #RP #H #G @d1_liftable_liftables @(cp0 … H) +qed. + +lemma gcp2_lifts: ∀RR,RS,RP. gcp RR RS RP → ∀G. d_liftables1 (RP G) (Ⓕ). +#RR #RS #RP #H #G @d1_liftable_liftables @(cp2 … H) +qed. + +(* Basic_1: was only: sns3_lifts1 *) +lemma gcp2_lifts_all: ∀RR,RS,RP. gcp RR RS RP → ∀G. d_liftables1_all (RP G) (Ⓕ). +#RR #RS #RP #H #G @d1_liftables_liftables_all /2 width=7 by gcp2_lifts/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/gcp_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/gcp_aaa.ma new file mode 100644 index 000000000..1bbe0d510 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/gcp_aaa.ma @@ -0,0 +1,93 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/lifts_lifts.ma". +include "basic_2A/multiple/drops_drops.ma". +include "basic_2A/static/aaa_lifts.ma". +include "basic_2A/static/aaa_aaa.ma". +include "basic_2A/computation/lsubc_drops.ma". + +(* GENERIC COMPUTATION PROPERTIES *******************************************) + +(* Main properties **********************************************************) + +(* Basic_1: was: sc3_arity_csubc *) +theorem acr_aaa_csubc_lifts: ∀RR,RS,RP. + gcp RR RS RP → gcr RR RS RP RP → + ∀G,L1,T,A. ⦃G, L1⦄ ⊢ T ⁝ A → ∀L0,cs. ⬇*[Ⓕ, cs] L0 ≡ L1 → + ∀T0. ⬆*[cs] T ≡ T0 → ∀L2. G ⊢ L2 ⫃[RP] L0 → + ⦃G, L2, T0⦄ ϵ[RP] 〚A〛. +#RR #RS #RP #H1RP #H2RP #G #L1 #T #A #H elim H -G -L1 -T -A +[ #G #L #k #L0 #cs #HL0 #X #H #L2 #HL20 + >(lifts_inv_sort1 … H) -H + lapply (acr_gcr … H1RP H2RP (⓪)) #HAtom + lapply (s4 … HAtom G L2 (◊)) /2 width=1 by/ +| #I #G #L1 #K1 #V1 #B #i #HLK1 #HKV1B #IHB #L0 #cs #HL01 #X #H #L2 #HL20 + lapply (acr_gcr … H1RP H2RP B) #HB + elim (lifts_inv_lref1 … H) -H #i1 #Hi1 #H destruct + lapply (drop_fwd_drop2 … HLK1) #HK1b + elim (drops_drop_trans … HL01 … HLK1) #X #cs1 #i0 #HL0 #H #Hi0 #Hcs1 + >(at_mono … Hi1 … Hi0) -i1 + elim (drops_inv_skip2 … Hcs1 … H) -cs1 #K0 #V0 #cs0 #Hcs0 #HK01 #HV10 #H destruct + elim (lsubc_drop_O1_trans … HL20 … HL0) -HL0 #X #HLK2 #H + elim (lsubc_inv_pair2 … H) -H * + [ #K2 #HK20 #H destruct + elim (lift_total V0 0 (i0 +1)) #V #HV0 + elim (lifts_lift_trans … Hi0 … Hcs0 … HV10 … HV0) -HV10 #V2 #HV12 #HV2 + lapply (s5 … HB ? G ? ? (◊) … HV0 HLK2) /3 width=7 by drops_cons, lifts_cons/ (* Note: uses IHB HL20 V2 HV0 *) + | -HLK1 -IHB -HL01 -HL20 -HK1b -Hi0 -Hcs0 + #K2 #V2 #A2 #HKV2A #H1KV0A #H2KV0A #_ #H1 #H2 destruct + lapply (drop_fwd_drop2 … HLK2) #HLK2b + lapply (aaa_lifts … HK01 … HV10 HKV1B) -HKV1B -HK01 -HV10 #HKV0B + lapply (aaa_mono … H2KV0A … HKV0B) #H destruct -H2KV0A -HKV0B + elim (lift_total V0 0 (i0 +1)) #V3 #HV03 + elim (lift_total V2 0 (i0 +1)) #V #HV2 + lapply (s5 … HB ? G ? ? (◊) … (ⓝV3.V) … HLK2) /2 width=1 by lift_flat/ + lapply (s7 … HB G L2 (◊)) /3 width=7 by gcr_lift/ + ] +| #a #G #L #V #T #B #A #_ #_ #IHB #IHA #L0 #cs #HL0 #X #H #L2 #HL20 + elim (lifts_inv_bind1 … H) -H #V0 #T0 #HV0 #HT0 #H destruct + lapply (acr_gcr … H1RP H2RP A) #HA + lapply (acr_gcr … H1RP H2RP B) #HB + lapply (s1 … HB) -HB #HB + lapply (s6 … HA G L2 (◊) (◊)) /4 width=5 by lsubc_pair, drops_skip, liftv_nil/ +| #a #G #L #W #T #B #A #HLWB #_ #IHB #IHA #L0 #cs #HL0 #X #H #L2 #HL02 + elim (lifts_inv_bind1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct + @(acr_abst … H1RP H2RP) /2 width=5 by/ + #L3 #V3 #W3 #T3 #cs3 #HL32 #HW03 #HT03 #H1B #H2B + elim (drops_lsubc_trans … H1RP … HL32 … HL02) -L2 #L2 #HL32 #HL20 + lapply (aaa_lifts … L2 W3 … (cs @@ cs3) … HLWB) -HLWB /2 width=4 by drops_trans, lifts_trans/ #HLW2B + @(IHA (L2. ⓛW3) … (cs + 1 @@ cs3 + 1)) -IHA + /3 width=5 by lsubc_beta, drops_trans, drops_skip, lifts_trans/ +| #G #L #V #T #B #A #_ #_ #IHB #IHA #L0 #cs #HL0 #X #H #L2 #HL20 + elim (lifts_inv_flat1 … H) -H #V0 #T0 #HV0 #HT0 #H destruct + /3 width=10 by drops_nil, lifts_nil/ +| #G #L #V #T #A #_ #_ #IH1A #IH2A #L0 #cs #HL0 #X #H #L2 #HL20 + elim (lifts_inv_flat1 … H) -H #V0 #T0 #HV0 #HT0 #H destruct + lapply (acr_gcr … H1RP H2RP A) #HA + lapply (s7 … HA G L2 (◊)) /3 width=5 by/ +] +qed. + +(* Basic_1: was: sc3_arity *) +lemma acr_aaa: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → + ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ⦃G, L, T⦄ ϵ[RP] 〚A〛. +/2 width=8 by drops_nil, lifts_nil, acr_aaa_csubc_lifts/ qed. + +lemma gcr_aaa: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → + ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → RP G L T. +#RR #RS #RP #H1RP #H2RP #G #L #T #A #HT +lapply (acr_gcr … H1RP H2RP A) #HA +@(s1 … HA) /2 width=4 by acr_aaa/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/gcp_cr.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/gcp_cr.ma new file mode 100644 index 000000000..a35bc63d2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/gcp_cr.ma @@ -0,0 +1,169 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/ineint_5.ma". +include "basic_2A/grammar/aarity.ma". +include "basic_2A/multiple/mr2_mr2.ma". +include "basic_2A/multiple/lifts_lift_vector.ma". +include "basic_2A/multiple/drops_drop.ma". +include "basic_2A/computation/gcp.ma". + +(* GENERIC COMPUTATION PROPERTIES *******************************************) + +(* Note: this is Girard's CR1 *) +definition S1 ≝ λRP,C:candidate. + ∀G,L,T. C G L T → RP G L T. + +(* Note: this is Tait's iii, or Girard's CR4 *) +definition S2 ≝ λRR:relation4 genv lenv term term. λRS:relation term. λRP,C:candidate. + ∀G,L,Vs. all … (RP G L) Vs → + ∀T. 𝐒⦃T⦄ → NF … (RR G L) RS T → C G L (ⒶVs.T). + +(* Note: this generalizes Tait's ii *) +definition S3 ≝ λC:candidate. + ∀a,G,L,Vs,V,T,W. + C G L (ⒶVs.ⓓ{a}ⓝW.V.T) → C G L (ⒶVs.ⓐV.ⓛ{a}W.T). + +definition S4 ≝ λRP,C:candidate. + ∀G,L,Vs. all … (RP G L) Vs → ∀k. C G L (ⒶVs.⋆k). + +definition S5 ≝ λC:candidate. ∀I,G,L,K,Vs,V1,V2,i. + C G L (ⒶVs.V2) → ⬆[0, i+1] V1 ≡ V2 → + ⬇[i] L ≡ K.ⓑ{I}V1 → C G L (ⒶVs.#i). + +definition S6 ≝ λRP,C:candidate. + ∀G,L,V1s,V2s. ⬆[0, 1] V1s ≡ V2s → + ∀a,V,T. C G (L.ⓓV) (ⒶV2s.T) → RP G L V → C G L (ⒶV1s.ⓓ{a}V.T). + +definition S7 ≝ λC:candidate. + ∀G,L,Vs,T,W. C G L (ⒶVs.T) → C G L (ⒶVs.W) → C G L (ⒶVs.ⓝW.T). + +(* requirements for the generic reducibility candidate *) +record gcr (RR:relation4 genv lenv term term) (RS:relation term) (RP,C:candidate) : Prop ≝ +{ s1: S1 RP C; + s2: S2 RR RS RP C; + s3: S3 C; + s4: S4 RP C; + s5: S5 C; + s6: S6 RP C; + s7: S7 C +}. + +(* the functional construction for candidates *) +definition cfun: candidate → candidate → candidate ≝ + λC1,C2,G,K,T. ∀L,W,U,cs. + ⬇*[Ⓕ, cs] L ≡ K → ⬆*[cs] T ≡ U → C1 G L W → C2 G L (ⓐW.U). + +(* the reducibility candidate associated to an atomic arity *) +let rec acr (RP:candidate) (A:aarity) on A: candidate ≝ +match A with +[ AAtom ⇒ RP +| APair B A ⇒ cfun (acr RP B) (acr RP A) +]. + +interpretation + "candidate of reducibility of an atomic arity (abstract)" + 'InEInt RP G L T A = (acr RP A G L T). + +(* Basic properties *********************************************************) + +(* Basic 1: was: sc3_lift *) +lemma gcr_lift: ∀RR,RS,RP. gcp RR RS RP → ∀A,G. d_liftable1 (acr RP A G) (Ⓕ). +#RR #RS #RP #H #A elim A -A +/3 width=8 by cp2, drops_cons, lifts_cons/ +qed. + +(* Basic_1: was: sc3_lift1 *) +lemma gcr_lifts: ∀RR,RS,RP. gcp RR RS RP → ∀A,G. d_liftables1 (acr RP A G) (Ⓕ). +#RR #RS #RP #H #A #G @d1_liftable_liftables /2 width=7 by gcr_lift/ +qed. + +(* Basic_1: was: + sc3_sn3 sc3_abst sc3_appl sc3_abbr sc3_bind sc3_cast +*) +lemma acr_gcr: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → + ∀A. gcr RR RS RP (acr RP A). +#RR #RS #RP #H1RP #H2RP #A elim A -A // +#B #A #IHB #IHA @mk_gcr +[ #G #L #T #H + elim (cp1 … H1RP G L) #k #HK + lapply (H L (⋆k) T (◊) ? ? ?) -H // + [ lapply (s2 … IHB G L (◊) … HK) // + | /3 width=6 by s1, cp3/ + ] +| #G #L #Vs #HVs #T #H1T #H2T #L0 #V0 #X #cs #HL0 #H #HB + elim (lifts_inv_applv1 … H) -H #V0s #T0 #HV0s #HT0 #H destruct + lapply (s1 … IHB … HB) #HV0 + @(s2 … IHA … (V0 @ V0s)) + /3 width=14 by gcp2_lifts_all, gcp2_lifts, gcp0_lifts, lifts_simple_dx, conj/ +| #a #G #L #Vs #U #T #W #HA #L0 #V0 #X #cs #HL0 #H #HB + elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct + elim (lifts_inv_flat1 … HY) -HY #U0 #X #HU0 #HX #H destruct + elim (lifts_inv_bind1 … HX) -HX #W0 #T0 #HW0 #HT0 #H destruct + @(s3 … IHA … (V0 @ V0s)) /5 width=6 by lifts_applv, lifts_flat, lifts_bind/ +| #G #L #Vs #HVs #k #L0 #V0 #X #cs #HL0 #H #HB + elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct + >(lifts_inv_sort1 … HY) -Y + lapply (s1 … IHB … HB) #HV0 + @(s4 … IHA … (V0 @ V0s)) /3 width=7 by gcp2_lifts_all, conj/ +| #I #G #L #K #Vs #V1 #V2 #i #HA #HV12 #HLK #L0 #V0 #X #cs #HL0 #H #HB + elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct + elim (lifts_inv_lref1 … HY) -HY #i0 #Hi0 #H destruct + elim (drops_drop_trans … HL0 … HLK) #X #cs0 #i1 #HL02 #H #Hi1 #Hcs0 + >(at_mono … Hi1 … Hi0) in HL02; -i1 #HL02 + elim (drops_inv_skip2 … Hcs0 … H) -H -cs0 #L2 #W1 #cs0 #Hcs0 #HLK #HVW1 #H destruct + elim (lift_total W1 0 (i0 + 1)) #W2 #HW12 + elim (lifts_lift_trans … Hcs0 … HVW1 … HW12) // -Hcs0 -Hi0 #V3 #HV13 #HVW2 + >(lift_mono … HV13 … HV12) in HVW2; -V3 #HVW2 + @(s5 … IHA … (V0 @ V0s) … HW12 HL02) /3 width=5 by lifts_applv/ +| #G #L #V1s #V2s #HV12s #a #V #T #HA #HV #L0 #V10 #X #cs #HL0 #H #HB + elim (lifts_inv_applv1 … H) -H #V10s #Y #HV10s #HY #H destruct + elim (lifts_inv_bind1 … HY) -HY #V0 #T0 #HV0 #HT0 #H destruct + elim (lift_total V10 0 1) #V20 #HV120 + elim (liftv_total 0 1 V10s) #V20s #HV120s + @(s6 … IHA … (V10 @ V10s) (V20 @ V20s)) /3 width=7 by gcp2_lifts, liftv_cons/ + @(HA … (cs + 1)) /2 width=2 by drops_skip/ + [ @lifts_applv // + elim (liftsv_liftv_trans_le … HV10s … HV120s) -V10s #V10s #HV10s #HV120s + >(liftv_mono … HV12s … HV10s) -V1s // + | @(gcr_lift … H1RP … HB … HV120) /2 width=2 by drop_drop/ + ] +| #G #L #Vs #T #W #HA #HW #L0 #V0 #X #cs #HL0 #H #HB + elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct + elim (lifts_inv_flat1 … HY) -HY #W0 #T0 #HW0 #HT0 #H destruct + @(s7 … IHA … (V0 @ V0s)) /3 width=5 by lifts_applv/ +] +qed. + +lemma acr_abst: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → + ∀a,G,L,W,T,A,B. ⦃G, L, W⦄ ϵ[RP] 〚B〛 → ( + ∀L0,V0,W0,T0,cs. ⬇*[Ⓕ, cs] L0 ≡ L → ⬆*[cs] W ≡ W0 → ⬆*[cs + 1] T ≡ T0 → + ⦃G, L0, V0⦄ ϵ[RP] 〚B〛 → ⦃G, L0, W0⦄ ϵ[RP] 〚B〛 → ⦃G, L0.ⓓⓝW0.V0, T0⦄ ϵ[RP] 〚A〛 + ) → + ⦃G, L, ⓛ{a}W.T⦄ ϵ[RP] 〚②B.A〛. +#RR #RS #RP #H1RP #H2RP #a #G #L #W #T #A #B #HW #HA #L0 #V0 #X #cs #HL0 #H #HB +lapply (acr_gcr … H1RP H2RP A) #HCA +lapply (acr_gcr … H1RP H2RP B) #HCB +elim (lifts_inv_bind1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct +lapply (gcr_lifts … H1RP … HL0 … HW0 HW) -HW #HW0 +lapply (s3 … HCA … a G L0 (◊)) #H @H -H +lapply (s6 … HCA G L0 (◊) (◊) ?) // #H @H -H +[ @(HA … HL0) // +| lapply (s1 … HCB) -HCB #HCB + lapply (s7 … H2RP G L0 (◊)) /3 width=1 by/ +] +qed. + +(* Basic_1: removed theorems 2: sc3_arity_gen sc3_repl *) +(* Basic_1: removed local theorems 1: sc3_sn3_abst *) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lcosx.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lcosx.ma new file mode 100644 index 000000000..c77910134 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lcosx.ma @@ -0,0 +1,77 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/cosn_5.ma". +include "basic_2A/computation/lsx.ma". + +(* SN EXTENDED STRONGLY CONORMALIZING LOCAL ENVIRONMENTS ********************) + +inductive lcosx (h) (g) (G): relation2 ynat lenv ≝ +| lcosx_sort: ∀l. lcosx h g G l (⋆) +| lcosx_skip: ∀I,L,T. lcosx h g G 0 L → lcosx h g G 0 (L.ⓑ{I}T) +| lcosx_pair: ∀I,L,T,l. G ⊢ ⬊*[h, g, T, l] L → + lcosx h g G l L → lcosx h g G (⫯l) (L.ⓑ{I}T) +. + +interpretation + "sn extended strong conormalization (local environment)" + 'CoSN h g l G L = (lcosx h g G l L). + +(* Basic properties *********************************************************) + +lemma lcosx_O: ∀h,g,G,L. G ⊢ ~⬊*[h, g, 0] L. +#h #g #G #L elim L /2 width=1 by lcosx_skip/ +qed. + +lemma lcosx_drop_trans_lt: ∀h,g,G,L,l. G ⊢ ~⬊*[h, g, l] L → + ∀I,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → i < l → + G ⊢ ~⬊*[h, g, ⫰(l-i)] K ∧ G ⊢ ⬊*[h, g, V, ⫰(l-i)] K. +#h #g #G #L #l #H elim H -L -l +[ #l #J #K #V #i #H elim (drop_inv_atom1 … H) -H #H destruct +| #I #L #T #_ #_ #J #K #V #i #_ #H elim (ylt_yle_false … H) -H // +| #I #L #T #l #HT #HL #IHL #J #K #V #i #H #Hil + elim (drop_inv_O1_pair1 … H) -H * #Hi #HLK destruct + [ >ypred_succ /2 width=1 by conj/ + | lapply (ylt_pred … Hil ?) -Hil /2 width=1 by ylt_inj/ >ypred_succ #Hil + elim (IHL … HLK ?) -IHL -HLK yminus_SO2 // + <(ypred_succ l) in ⊢ (%→%→?); >yminus_pred /2 width=1 by ylt_inj, conj/ + ] +] +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact lcosx_inv_succ_aux: ∀h,g,G,L,x. G ⊢ ~⬊*[h, g, x] L → ∀l. x = ⫯l → + L = ⋆ ∨ + ∃∃I,K,V. L = K.ⓑ{I}V & G ⊢ ~⬊*[h, g, l] K & + G ⊢ ⬊*[h, g, V, l] K. +#h #g #G #L #l * -L -l /2 width=1 by or_introl/ +[ #I #L #T #_ #x #H elim (ysucc_inv_O_sn … H) +| #I #L #T #l #HT #HL #x #H <(ysucc_inj … H) -x + /3 width=6 by ex3_3_intro, or_intror/ +] +qed-. + +lemma lcosx_inv_succ: ∀h,g,G,L,l. G ⊢ ~⬊*[h, g, ⫯l] L → L = ⋆ ∨ + ∃∃I,K,V. L = K.ⓑ{I}V & G ⊢ ~⬊*[h, g, l] K & + G ⊢ ⬊*[h, g, V, l] K. +/2 width=3 by lcosx_inv_succ_aux/ qed-. + +lemma lcosx_inv_pair: ∀h,g,I,G,L,T,l. G ⊢ ~⬊*[h, g, ⫯l] L.ⓑ{I}T → + G ⊢ ~⬊*[h, g, l] L ∧ G ⊢ ⬊*[h, g, T, l] L. +#h #g #I #G #L #T #l #H elim (lcosx_inv_succ … H) -H +[ #H destruct +| * #Z #Y #X #H destruct /2 width=1 by conj/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lcosx_cpx.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lcosx_cpx.ma new file mode 100644 index 000000000..47de7c8bf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lcosx_cpx.ma @@ -0,0 +1,67 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_max.ma". +include "basic_2A/computation/lsx_drop.ma". +include "basic_2A/computation/lsx_lpx.ma". +include "basic_2A/computation/lsx_lpxs.ma". +include "basic_2A/computation/lcosx.ma". + +(* SN EXTENDED STRONGLY CONORMALIZING LOCAL ENVIRONMENTS ********************) + +(* Properties on extended context-sensitive parallel reduction for term *****) + +lemma lsx_cpx_trans_lcosx: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → + ∀l. G ⊢ ~⬊*[h, g, l] L → + G ⊢ ⬊*[h, g, T1, l] L → G ⊢ ⬊*[h, g, T2, l] L. +#h #g #G #L #T1 #T2 #H elim H -G -L -T1 -T2 // +[ #I #G #L #K #V1 #V2 #W2 #i #HLK #_ #HVW2 #IHV12 #l #HL #H + elim (ylt_split i l) #Hli [ -H | -HL ] + [ <(ymax_pre_sn l (⫯i)) /2 width=1 by ylt_fwd_le_succ/ + elim (lcosx_drop_trans_lt … HL … HLK) // -HL -Hli + lapply (drop_fwd_drop2 … HLK) -HLK /3 width=7 by lsx_lift_ge/ + | lapply (lsx_fwd_lref_be … H … HLK) // -H -Hli + lapply (drop_fwd_drop2 … HLK) -HLK + /4 width=10 by lsx_ge, lsx_lift_le/ + ] +| #a #I #G #L #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #l #HL #H + elim (lsx_inv_bind … H) -H #HV1 #HT1 + @lsx_bind /2 width=2 by/ (**) (* explicit constructor *) + @(lsx_lreq_conf … (L.ⓑ{I}V1)) /3 width=1 by lcosx_pair, lreq_succ/ +| #I #G #L #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #l #HL #H + elim (lsx_inv_flat … H) -H /3 width=1 by lsx_flat/ +| #G #L #V #U1 #U2 #T2 #_ #HTU2 #IHU12 #l #HL #H + elim (lsx_inv_bind … H) -H + /4 width=9 by lcosx_pair, lsx_inv_lift_ge, drop_drop/ +| #G #L #V #T1 #T2 #_ #IHT12 #l #HL #H + elim (lsx_inv_flat … H) -H /2 width=1 by/ +| #G #L #V1 #V2 #T #_ #IHV12 #l #HL #H + elim (lsx_inv_flat … H) -H /2 width=1 by/ +| #a #G #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #l #HL #H + elim (lsx_inv_flat … H) -H #HV1 #H + elim (lsx_inv_bind … H) -H #HW1 #HT1 + @lsx_bind /3 width=1 by lsx_flat/ (**) (* explicit constructor *) + @(lsx_lreq_conf … (L.ⓛW1)) /3 width=1 by lcosx_pair, lreq_succ/ +| #a #G #L #V1 #V2 #U2 #W1 #W2 #T1 #T2 #_ #HVU2 #_ #_ #IHV12 #IHW12 #IHT12 #l #HL #H + elim (lsx_inv_flat … H) -H #HV1 #H + elim (lsx_inv_bind … H) -H #HW1 #HT1 + @lsx_bind /2 width=1 by/ (**) (* explicit constructor *) + @lsx_flat [ /3 width=7 by lsx_lift_ge, drop_drop/ ] + @(lsx_lreq_conf … (L.ⓓW1)) /3 width=1 by lcosx_pair, lreq_succ/ +] +qed-. + +lemma lsx_cpx_trans_O: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → + G ⊢ ⬊*[h, g, T1, 0] L → G ⊢ ⬊*[h, g, T2, 0] L. +/2 width=3 by lsx_cpx_trans_lcosx/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs.ma new file mode 100644 index 000000000..c529d58d0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs.ma @@ -0,0 +1,71 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/predsnstar_3.ma". +include "basic_2A/substitution/lpx_sn_tc.ma". +include "basic_2A/reduction/lpr.ma". + +(* SN PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ****************************) + +definition lprs: relation3 genv lenv lenv ≝ + λG. TC … (lpr G). + +interpretation "parallel computation (local environment, sn variant)" + 'PRedSnStar G L1 L2 = (lprs G L1 L2). + +(* Basic eliminators ********************************************************) + +lemma lprs_ind: ∀G,L1. ∀R:predicate lenv. R L1 → + (∀L,L2. ⦃G, L1⦄ ⊢ ➡* L → ⦃G, L⦄ ⊢ ➡ L2 → R L → R L2) → + ∀L2. ⦃G, L1⦄ ⊢ ➡* L2 → R L2. +#G #L1 #R #HL1 #IHL1 #L2 #HL12 +@(TC_star_ind … HL1 IHL1 … HL12) // +qed-. + +lemma lprs_ind_dx: ∀G,L2. ∀R:predicate lenv. R L2 → + (∀L1,L. ⦃G, L1⦄ ⊢ ➡ L → ⦃G, L⦄ ⊢ ➡* L2 → R L → R L1) → + ∀L1. ⦃G, L1⦄ ⊢ ➡* L2 → R L1. +#G #L2 #R #HL2 #IHL2 #L1 #HL12 +@(TC_star_ind_dx … HL2 IHL2 … HL12) // +qed-. + +(* Basic properties *********************************************************) + +lemma lpr_lprs: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L1⦄ ⊢ ➡* L2. +/2 width=1 by inj/ qed. + +lemma lprs_refl: ∀G,L. ⦃G, L⦄ ⊢ ➡* L. +/2 width=1 by lpr_lprs/ qed. + +lemma lprs_strap1: ∀G,L1,L,L2. ⦃G, L1⦄ ⊢ ➡* L → ⦃G, L⦄ ⊢ ➡ L2 → ⦃G, L1⦄ ⊢ ➡* L2. +/2 width=3 by step/ qed-. + +lemma lprs_strap2: ∀G,L1,L,L2. ⦃G, L1⦄ ⊢ ➡ L → ⦃G, L⦄ ⊢ ➡* L2 → ⦃G, L1⦄ ⊢ ➡* L2. +/2 width=3 by TC_strap/ qed-. + +lemma lprs_pair_refl: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → ∀I,V. ⦃G, L1.ⓑ{I}V⦄ ⊢ ➡* L2.ⓑ{I}V. +/2 width=1 by TC_lpx_sn_pair_refl/ qed. + +(* Basic inversion lemmas ***************************************************) + +lemma lprs_inv_atom1: ∀G,L2. ⦃G, ⋆⦄ ⊢ ➡* L2 → L2 = ⋆. +/2 width=2 by TC_lpx_sn_inv_atom1/ qed-. + +lemma lprs_inv_atom2: ∀G,L1. ⦃G, L1⦄ ⊢ ➡* ⋆ → L1 = ⋆. +/2 width=2 by TC_lpx_sn_inv_atom2/ qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lprs_fwd_length: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → |L1| = |L2|. +/2 width=2 by TC_lpx_sn_fwd_length/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs_cprs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs_cprs.ma new file mode 100644 index 000000000..a96eaa23a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs_cprs.ma @@ -0,0 +1,142 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/cprs_cprs.ma". +include "basic_2A/computation/lprs.ma". + +(* SN PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ****************************) + +(* Advanced properties ******************************************************) + +lemma lprs_pair: ∀I,G,L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → + ∀V1,V2. ⦃G, L1⦄ ⊢ V1 ➡* V2 → ⦃G, L1.ⓑ{I}V1⦄ ⊢ ➡* L2.ⓑ{I}V2. +/2 width=1 by TC_lpx_sn_pair/ qed. + +(* Advanced inversion lemmas ************************************************) + +lemma lprs_inv_pair1: ∀I,G,K1,L2,V1. ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡* L2 → + ∃∃K2,V2. ⦃G, K1⦄ ⊢ ➡* K2 & ⦃G, K1⦄ ⊢ V1 ➡* V2 & + L2 = K2.ⓑ{I}V2. +/3 width=3 by TC_lpx_sn_inv_pair1, lpr_cprs_trans/ qed-. + +lemma lprs_inv_pair2: ∀I,G,L1,K2,V2. ⦃G, L1⦄ ⊢ ➡* K2.ⓑ{I}V2 → + ∃∃K1,V1. ⦃G, K1⦄ ⊢ ➡* K2 & ⦃G, K1⦄ ⊢ V1 ➡* V2 & + L1 = K1.ⓑ{I}V1. +/3 width=3 by TC_lpx_sn_inv_pair2, lpr_cprs_trans/ qed-. + +(* Advanced eliminators *****************************************************) + +lemma lprs_ind_alt: ∀G. ∀R:relation lenv. + R (⋆) (⋆) → ( + ∀I,K1,K2,V1,V2. + ⦃G, K1⦄ ⊢ ➡* K2 → ⦃G, K1⦄ ⊢ V1 ➡* V2 → + R K1 K2 → R (K1.ⓑ{I}V1) (K2.ⓑ{I}V2) + ) → + ∀L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → R L1 L2. +/3 width=4 by TC_lpx_sn_ind, lpr_cprs_trans/ qed-. + +(* Properties on context-sensitive parallel computation for terms ***********) + +lemma lprs_cpr_trans: ∀G. s_r_transitive … (cpr G) (λ_. lprs G). +/3 width=5 by s_r_trans_LTC2, lpr_cprs_trans/ qed-. + +(* Basic_1: was just: pr3_pr3_pr3_t *) +(* Note: alternative proof /3 width=5 by s_r_trans_LTC1, lprs_cpr_trans/ *) +lemma lprs_cprs_trans: ∀G. s_rs_transitive … (cpr G) (λ_. lprs G). +#G @s_r_to_s_rs_trans @s_r_trans_LTC2 +@s_rs_trans_TC1 /2 width=3 by lpr_cprs_trans/ (**) (* full auto too slow *) +qed-. + +lemma lprs_cprs_conf_dx: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡* T1 → + ∀L1. ⦃G, L0⦄ ⊢ ➡* L1 → + ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡* T & ⦃G, L1⦄ ⊢ T0 ➡* T. +#G #L0 #T0 #T1 #HT01 #L1 #H @(lprs_ind … H) -L1 /2 width=3 by ex2_intro/ +#L #L1 #_ #HL1 * #T #HT1 #HT0 -L0 +elim (cprs_lpr_conf_dx … HT1 … HL1) -HT1 #T2 #HT2 +elim (cprs_lpr_conf_dx … HT0 … HL1) -L #T3 #HT3 +elim (cprs_conf … HT2 … HT3) -T +/3 width=5 by cprs_trans, ex2_intro/ +qed-. + +lemma lprs_cpr_conf_dx: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → + ∀L1. ⦃G, L0⦄ ⊢ ➡* L1 → + ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡* T & ⦃G, L1⦄ ⊢ T0 ➡* T. +/3 width=3 by lprs_cprs_conf_dx, cpr_cprs/ qed-. + +(* Note: this can be proved on its own using lprs_ind_dx *) +lemma lprs_cprs_conf_sn: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡* T1 → + ∀L1. ⦃G, L0⦄ ⊢ ➡* L1 → + ∃∃T. ⦃G, L0⦄ ⊢ T1 ➡* T & ⦃G, L1⦄ ⊢ T0 ➡* T. +#G #L0 #T0 #T1 #HT01 #L1 #HL01 +elim (lprs_cprs_conf_dx … HT01 … HL01) -HT01 +/3 width=3 by lprs_cprs_trans, ex2_intro/ +qed-. + +lemma lprs_cpr_conf_sn: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → + ∀L1. ⦃G, L0⦄ ⊢ ➡* L1 → + ∃∃T. ⦃G, L0⦄ ⊢ T1 ➡* T & ⦃G, L1⦄ ⊢ T0 ➡* T. +/3 width=3 by lprs_cprs_conf_sn, cpr_cprs/ qed-. + +lemma cprs_bind2: ∀G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡* V2 → + ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ➡* T2 → + ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡* ⓑ{a,I}V2.T2. +/4 width=5 by lprs_cprs_trans, lprs_pair, cprs_bind/ qed. + +(* Inversion lemmas on context-sensitive parallel computation for terms *****) + +(* Basic_1: was: pr3_gen_abst *) +lemma cprs_inv_abst1: ∀a,G,L,W1,T1,U2. ⦃G, L⦄ ⊢ ⓛ{a}W1.T1 ➡* U2 → + ∃∃W2,T2. ⦃G, L⦄ ⊢ W1 ➡* W2 & ⦃G, L.ⓛW1⦄ ⊢ T1 ➡* T2 & + U2 = ⓛ{a}W2.T2. +#a #G #L #V1 #T1 #U2 #H @(cprs_ind … H) -U2 /2 width=5 by ex3_2_intro/ +#U0 #U2 #_ #HU02 * #V0 #T0 #HV10 #HT10 #H destruct +elim (cpr_inv_abst1 … HU02) -HU02 #V2 #T2 #HV02 #HT02 #H destruct +lapply (lprs_cpr_trans … HT02 (L.ⓛV1) ?) +/3 width=5 by lprs_pair, cprs_trans, cprs_strap1, ex3_2_intro/ +qed-. + +lemma cprs_inv_abst: ∀a,G,L,W1,W2,T1,T2. ⦃G, L⦄ ⊢ ⓛ{a}W1.T1 ➡* ⓛ{a}W2.T2 → + ⦃G, L⦄ ⊢ W1 ➡* W2 ∧ ⦃G, L.ⓛW1⦄ ⊢ T1 ➡* T2. +#a #G #L #W1 #W2 #T1 #T2 #H elim (cprs_inv_abst1 … H) -H +#W #T #HW1 #HT1 #H destruct /2 width=1 by conj/ +qed-. + +(* Basic_1: was pr3_gen_abbr *) +lemma cprs_inv_abbr1: ∀a,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓓ{a}V1.T1 ➡* U2 → ( + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡* V2 & ⦃G, L.ⓓV1⦄ ⊢ T1 ➡* T2 & + U2 = ⓓ{a}V2.T2 + ) ∨ + ∃∃T2. ⦃G, L.ⓓV1⦄ ⊢ T1 ➡* T2 & ⬆[0, 1] U2 ≡ T2 & a = true. +#a #G #L #V1 #T1 #U2 #H @(cprs_ind … H) -U2 /3 width=5 by ex3_2_intro, or_introl/ +#U0 #U2 #_ #HU02 * * +[ #V0 #T0 #HV10 #HT10 #H destruct + elim (cpr_inv_abbr1 … HU02) -HU02 * + [ #V2 #T2 #HV02 #HT02 #H destruct + lapply (lprs_cpr_trans … HT02 (L.ⓓV1) ?) + /4 width=5 by lprs_pair, cprs_trans, cprs_strap1, ex3_2_intro, or_introl/ + | #T2 #HT02 #HUT2 + lapply (lprs_cpr_trans … HT02 (L.ⓓV1) ?) -HT02 + /4 width=3 by lprs_pair, cprs_trans, ex3_intro, or_intror/ + ] +| #U1 #HTU1 #HU01 elim (lift_total U2 0 1) + #U #HU2 lapply (cpr_lift … HU02 (L.ⓓV1) … HU01 … HU2) -U0 + /4 width=3 by cprs_strap1, drop_drop, ex3_intro, or_intror/ +] +qed-. + +(* More advanced properties *************************************************) + +lemma lprs_pair2: ∀I,G,L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → + ∀V1,V2. ⦃G, L2⦄ ⊢ V1 ➡* V2 → ⦃G, L1.ⓑ{I}V1⦄ ⊢ ➡* L2.ⓑ{I}V2. +/3 width=3 by lprs_pair, lprs_cprs_trans/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs_drop.ma new file mode 100644 index 000000000..66465b6bf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs_drop.ma @@ -0,0 +1,29 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/lpr_drop.ma". +include "basic_2A/computation/lprs.ma". + +(* SN PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ****************************) + +(* Properties on local environment slicing ***********************************) + +lemma lprs_drop_conf: ∀G. dropable_sn (lprs G). +/3 width=3 by dropable_sn_TC, lpr_drop_conf/ qed-. + +lemma drop_lprs_trans: ∀G. dedropable_sn (lprs G). +/3 width=3 by dedropable_sn_TC, drop_lpr_trans/ qed-. + +lemma lprs_drop_trans_O1: ∀G. dropable_dx (lprs G). +/3 width=3 by dropable_dx_TC, lpr_drop_trans_O1/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs_lprs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs_lprs.ma new file mode 100644 index 000000000..cf5a6136b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs_lprs.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/lpr_lpr.ma". +include "basic_2A/computation/lprs.ma". + +(* SN PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ****************************) + +(* Advanced properties ******************************************************) + +lemma lprs_strip: ∀G. confluent2 … (lprs G) (lpr G). +/3 width=3 by TC_strip1, lpr_conf/ qed-. + +(* Main properties **********************************************************) + +theorem lprs_conf: ∀G. confluent2 … (lprs G) (lprs G). +/3 width=3 by TC_confluent2, lpr_conf/ qed-. + +theorem lprs_trans: ∀G. Transitive … (lprs G). +/2 width=3 by trans_TC/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs.ma new file mode 100644 index 000000000..3aca39a0d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs.ma @@ -0,0 +1,74 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/predsnstar_5.ma". +include "basic_2A/reduction/lpx.ma". +include "basic_2A/computation/lprs.ma". + +(* SN EXTENDED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *******************) + +definition lpxs: ∀h. sd h → relation3 genv lenv lenv ≝ + λh,g,G. TC … (lpx h g G). + +interpretation "extended parallel computation (local environment, sn variant)" + 'PRedSnStar h g G L1 L2 = (lpxs h g G L1 L2). + +(* Basic eliminators ********************************************************) + +lemma lpxs_ind: ∀h,g,G,L1. ∀R:predicate lenv. R L1 → + (∀L,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L → ⦃G, L⦄ ⊢ ➡[h, g] L2 → R L → R L2) → + ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → R L2. +#h #g #G #L1 #R #HL1 #IHL1 #L2 #HL12 +@(TC_star_ind … HL1 IHL1 … HL12) // +qed-. + +lemma lpxs_ind_dx: ∀h,g,G,L2. ∀R:predicate lenv. R L2 → + (∀L1,L. ⦃G, L1⦄ ⊢ ➡[h, g] L → ⦃G, L⦄ ⊢ ➡*[h, g] L2 → R L → R L1) → + ∀L1. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → R L1. +#h #g #G #L2 #R #HL2 #IHL2 #L1 #HL12 +@(TC_star_ind_dx … HL2 IHL2 … HL12) // +qed-. + +(* Basic properties *********************************************************) + +lemma lprs_lpxs: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2. +/3 width=3 by lpr_lpx, monotonic_TC/ qed. + +lemma lpx_lpxs: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2. +/2 width=1 by inj/ qed. + +lemma lpxs_refl: ∀h,g,G,L. ⦃G, L⦄ ⊢ ➡*[h, g] L. +/2 width=1 by lprs_lpxs/ qed. + +lemma lpxs_strap1: ∀h,g,G,L1,L,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L → ⦃G, L⦄ ⊢ ➡[h, g] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2. +/2 width=3 by step/ qed. + +lemma lpxs_strap2: ∀h,g,G,L1,L,L2. ⦃G, L1⦄ ⊢ ➡[h, g] L → ⦃G, L⦄ ⊢ ➡*[h, g] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2. +/2 width=3 by TC_strap/ qed. + +lemma lpxs_pair_refl: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → ∀I,V. ⦃G, L1.ⓑ{I}V⦄ ⊢ ➡*[h, g] L2.ⓑ{I}V. +/2 width=1 by TC_lpx_sn_pair_refl/ qed. + +(* Basic inversion lemmas ***************************************************) + +lemma lpxs_inv_atom1: ∀h,g,G,L2. ⦃G, ⋆⦄ ⊢ ➡*[h, g] L2 → L2 = ⋆. +/2 width=2 by TC_lpx_sn_inv_atom1/ qed-. + +lemma lpxs_inv_atom2: ∀h,g,G,L1. ⦃G, L1⦄ ⊢ ➡*[h, g] ⋆ → L1 = ⋆. +/2 width=2 by TC_lpx_sn_inv_atom2/ qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lpxs_fwd_length: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → |L1| = |L2|. +/2 width=2 by TC_lpx_sn_fwd_length/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_aaa.ma new file mode 100644 index 000000000..682e6d723 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_aaa.ma @@ -0,0 +1,30 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/lpx_aaa.ma". +include "basic_2A/computation/lpxs.ma". + +(* SN EXTENDED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *******************) + +(* Properties about atomic arity assignment on terms ************************) + +lemma lpxs_aaa_conf: ∀h,g,G,L1,T,A. ⦃G, L1⦄ ⊢ T ⁝ A → + ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → ⦃G, L2⦄ ⊢ T ⁝ A. +#h #g #G #L1 #T #A #HT #L2 #HL12 +@(TC_Conf3 … (λL,A. ⦃G, L⦄ ⊢ T ⁝ A) … HT ? HL12) /2 width=5 by lpx_aaa_conf/ +qed-. + +lemma lprs_aaa_conf: ∀G,L1,T,A. ⦃G, L1⦄ ⊢ T ⁝ A → + ∀L2. ⦃G, L1⦄ ⊢ ➡* L2 → ⦃G, L2⦄ ⊢ T ⁝ A. +/3 width=5 by lprs_lpxs, lpxs_aaa_conf/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_cpxs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_cpxs.ma new file mode 100644 index 000000000..c4ba7ccf0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_cpxs.ma @@ -0,0 +1,161 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/cpxs_cpxs.ma". +include "basic_2A/computation/lpxs.ma". + +(* SN EXTENDED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *******************) + +(* Advanced properties ******************************************************) + +lemma lpxs_pair: ∀h,g,I,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → + ∀V1,V2. ⦃G, L1⦄ ⊢ V1 ➡*[h, g] V2 → + ⦃G, L1.ⓑ{I}V1⦄ ⊢ ➡*[h, g] L2.ⓑ{I}V2. +/2 width=1 by TC_lpx_sn_pair/ qed. + +(* Advanced inversion lemmas ************************************************) + +lemma lpxs_inv_pair1: ∀h,g,I,G,K1,L2,V1. ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡*[h, g] L2 → + ∃∃K2,V2. ⦃G, K1⦄ ⊢ ➡*[h, g] K2 & ⦃G, K1⦄ ⊢ V1 ➡*[h, g] V2 & L2 = K2.ⓑ{I}V2. +/3 width=3 by TC_lpx_sn_inv_pair1, lpx_cpxs_trans/ qed-. + +lemma lpxs_inv_pair2: ∀h,g,I,G,L1,K2,V2. ⦃G, L1⦄ ⊢ ➡*[h, g] K2.ⓑ{I}V2 → + ∃∃K1,V1. ⦃G, K1⦄ ⊢ ➡*[h, g] K2 & ⦃G, K1⦄ ⊢ V1 ➡*[h, g] V2 & L1 = K1.ⓑ{I}V1. +/3 width=3 by TC_lpx_sn_inv_pair2, lpx_cpxs_trans/ qed-. + +(* Advanced eliminators *****************************************************) + +lemma lpxs_ind_alt: ∀h,g,G. ∀R:relation lenv. + R (⋆) (⋆) → ( + ∀I,K1,K2,V1,V2. + ⦃G, K1⦄ ⊢ ➡*[h, g] K2 → ⦃G, K1⦄ ⊢ V1 ➡*[h, g] V2 → + R K1 K2 → R (K1.ⓑ{I}V1) (K2.ⓑ{I}V2) + ) → + ∀L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → R L1 L2. +/3 width=4 by TC_lpx_sn_ind, lpx_cpxs_trans/ qed-. + +(* Properties on context-sensitive extended parallel computation for terms **) + +lemma lpxs_cpx_trans: ∀h,g,G. s_r_transitive … (cpx h g G) (λ_.lpxs h g G). +/3 width=5 by s_r_trans_LTC2, lpx_cpxs_trans/ qed-. + +(* Note: alternative proof: /3 width=5 by s_r_trans_TC1, lpxs_cpx_trans/ *) +lemma lpxs_cpxs_trans: ∀h,g,G. s_rs_transitive … (cpx h g G) (λ_.lpxs h g G). +#h #g #G @s_r_to_s_rs_trans @s_r_trans_LTC2 +@s_rs_trans_TC1 /2 width=3 by lpx_cpxs_trans/ (**) (* full auto too slow *) +qed-. + +lemma cpxs_bind2: ∀h,g,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡*[h, g] V2 → + ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ➡*[h, g] T2 → + ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡*[h, g] ⓑ{a,I}V2.T2. +/4 width=5 by lpxs_cpxs_trans, lpxs_pair, cpxs_bind/ qed. + +(* Inversion lemmas on context-sensitive ext parallel computation for terms *) + +lemma cpxs_inv_abst1: ∀h,g,a,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓛ{a}V1.T1 ➡*[h, g] U2 → + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡*[h, g] V2 & ⦃G, L.ⓛV1⦄ ⊢ T1 ➡*[h, g] T2 & + U2 = ⓛ{a}V2.T2. +#h #g #a #G #L #V1 #T1 #U2 #H @(cpxs_ind … H) -U2 /2 width=5 by ex3_2_intro/ +#U0 #U2 #_ #HU02 * #V0 #T0 #HV10 #HT10 #H destruct +elim (cpx_inv_abst1 … HU02) -HU02 #V2 #T2 #HV02 #HT02 #H destruct +lapply (lpxs_cpx_trans … HT02 (L.ⓛV1) ?) +/3 width=5 by lpxs_pair, cpxs_trans, cpxs_strap1, ex3_2_intro/ +qed-. + +lemma cpxs_inv_abbr1: ∀h,g,a,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓓ{a}V1.T1 ➡*[h, g] U2 → ( + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡*[h, g] V2 & ⦃G, L.ⓓV1⦄ ⊢ T1 ➡*[h, g] T2 & + U2 = ⓓ{a}V2.T2 + ) ∨ + ∃∃T2. ⦃G, L.ⓓV1⦄ ⊢ T1 ➡*[h, g] T2 & ⬆[0, 1] U2 ≡ T2 & a = true. +#h #g #a #G #L #V1 #T1 #U2 #H @(cpxs_ind … H) -U2 /3 width=5 by ex3_2_intro, or_introl/ +#U0 #U2 #_ #HU02 * * +[ #V0 #T0 #HV10 #HT10 #H destruct + elim (cpx_inv_abbr1 … HU02) -HU02 * + [ #V2 #T2 #HV02 #HT02 #H destruct + lapply (lpxs_cpx_trans … HT02 (L.ⓓV1) ?) + /4 width=5 by lpxs_pair, cpxs_trans, cpxs_strap1, ex3_2_intro, or_introl/ + | #T2 #HT02 #HUT2 + lapply (lpxs_cpx_trans … HT02 (L.ⓓV1) ?) -HT02 + /4 width=3 by lpxs_pair, cpxs_trans, ex3_intro, or_intror/ + ] +| #U1 #HTU1 #HU01 + elim (lift_total U2 0 1) #U #HU2 + /6 width=12 by cpxs_strap1, cpx_lift, drop_drop, ex3_intro, or_intror/ +] +qed-. + +(* More advanced properties *************************************************) + +lemma lpxs_pair2: ∀h,g,I,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → + ∀V1,V2. ⦃G, L2⦄ ⊢ V1 ➡*[h, g] V2 → ⦃G, L1.ⓑ{I}V1⦄ ⊢ ➡*[h, g] L2.ⓑ{I}V2. +/3 width=3 by lpxs_pair, lpxs_cpxs_trans/ qed. + +(* Properties on supclosure *************************************************) + +lemma lpx_fqup_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → + ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡*[h, g] T & ⦃G1, K1, T⦄ ⊐+ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +[ #G2 #L2 #T2 #H12 #K1 #HKL1 elim (lpx_fqu_trans … H12 … HKL1) -L1 + /3 width=5 by cpx_cpxs, fqu_fqup, ex3_2_intro/ +| #G #G2 #L #L2 #T #T2 #_ #H2 #IH1 #K1 #HLK1 elim (IH1 … HLK1) -L1 + #L0 #T0 #HT10 #HT0 #HL0 elim (lpx_fqu_trans … H2 … HL0) -L + #L #T3 #HT3 #HT32 #HL2 elim (fqup_cpx_trans … HT0 … HT3) -T + /3 width=7 by cpxs_strap1, fqup_strap1, ex3_2_intro/ +] +qed-. + +lemma lpx_fqus_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → + ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡*[h, g] T & ⦃G1, K1, T⦄ ⊐* ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -G2 -L2 -T2 [ /2 width=5 by ex3_2_intro/ ] +#G #G2 #L #L2 #T #T2 #_ #H2 #IH1 #K1 #HLK1 elim (IH1 … HLK1) -L1 +#L0 #T0 #HT10 #HT0 #HL0 elim (lpx_fquq_trans … H2 … HL0) -L +#L #T3 #HT3 #HT32 #HL2 elim (fqus_cpx_trans … HT0 … HT3) -T +/3 width=7 by cpxs_strap1, fqus_strap1, ex3_2_intro/ +qed-. + +lemma lpxs_fquq_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 → + ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡*[h, g] T & ⦃G1, K1, T⦄ ⊐⸮ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, g] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #HT12 #K1 #H @(lpxs_ind_dx … H) -K1 +[ /2 width=5 by ex3_2_intro/ +| #K1 #K #HK1 #_ * #L #T #HT1 #HT2 #HL2 -HT12 + lapply (lpx_cpxs_trans … HT1 … HK1) -HT1 + elim (lpx_fquq_trans … HT2 … HK1) -K + /3 width=7 by lpxs_strap2, cpxs_strap1, ex3_2_intro/ +] +qed-. + +lemma lpxs_fqup_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 → + ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡*[h, g] T & ⦃G1, K1, T⦄ ⊐+ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, g] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #HT12 #K1 #H @(lpxs_ind_dx … H) -K1 +[ /2 width=5 by ex3_2_intro/ +| #K1 #K #HK1 #_ * #L #T #HT1 #HT2 #HL2 -HT12 + lapply (lpx_cpxs_trans … HT1 … HK1) -HT1 + elim (lpx_fqup_trans … HT2 … HK1) -K + /3 width=7 by lpxs_strap2, cpxs_trans, ex3_2_intro/ +] +qed-. + +lemma lpxs_fqus_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 → + ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡*[h, g] T & ⦃G1, K1, T⦄ ⊐* ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, g] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -G2 -L2 -T2 /2 width=5 by ex3_2_intro/ +#G #G2 #L #L2 #T #T2 #_ #H2 #IH1 #K1 #HLK1 elim (IH1 … HLK1) -L1 +#L0 #T0 #HT10 #HT0 #HL0 elim (lpxs_fquq_trans … H2 … HL0) -L +#L #T3 #HT3 #HT32 #HL2 elim (fqus_cpxs_trans … HT3 … HT0) -T +/3 width=7 by cpxs_trans, fqus_strap1, ex3_2_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_drop.ma new file mode 100644 index 000000000..0382fb632 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_drop.ma @@ -0,0 +1,29 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/lpx_drop.ma". +include "basic_2A/computation/lpxs.ma". + +(* SN EXTENDED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *******************) + +(* Properties on local environment slicing ***********************************) + +lemma lpxs_drop_conf: ∀h,g,G. dropable_sn (lpxs h g G). +/3 width=3 by dropable_sn_TC, lpx_drop_conf/ qed-. + +lemma drop_lpxs_trans: ∀h,g,G. dedropable_sn (lpxs h g G). +/3 width=3 by dedropable_sn_TC, drop_lpx_trans/ qed-. + +lemma lpxs_drop_trans_O1: ∀h,g,G. dropable_dx (lpxs h g G). +/3 width=3 by dropable_dx_TC, lpx_drop_trans_O1/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_lleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_lleq.ma new file mode 100644 index 000000000..064ae9002 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_lleq.ma @@ -0,0 +1,141 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/lleq_lleq.ma". +include "basic_2A/reduction/lpx_lleq.ma". +include "basic_2A/computation/cpxs_lreq.ma". +include "basic_2A/computation/lpxs_drop.ma". +include "basic_2A/computation/lpxs_cpxs.ma". + +(* SN EXTENDED PARALLEL COMPUTATION FOR LOCAL ENVIRONMENTS ******************) + +(* Properties on lazy equivalence for local environments ********************) + +lemma lleq_lpxs_trans: ∀h,g,G,L2,K2. ⦃G, L2⦄ ⊢ ➡*[h, g] K2 → + ∀L1,T,l. L1 ≡[T, l] L2 → + ∃∃K1. ⦃G, L1⦄ ⊢ ➡*[h, g] K1 & K1 ≡[T, l] K2. +#h #g #G #L2 #K2 #H @(lpxs_ind … H) -K2 /2 width=3 by ex2_intro/ +#K #K2 #_ #HK2 #IH #L1 #T #l #HT elim (IH … HT) -L2 +#L #HL1 #HT elim (lleq_lpx_trans … HK2 … HT) -K +/3 width=3 by lpxs_strap1, ex2_intro/ +qed-. + +lemma lpxs_nlleq_inv_step_sn: ∀h,g,G,L1,L2,T,l. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → + ∃∃L,L0. ⦃G, L1⦄ ⊢ ➡[h, g] L & L1 ≡[T, l] L → ⊥ & ⦃G, L⦄ ⊢ ➡*[h, g] L0 & L0 ≡[T, l] L2. +#h #g #G #L1 #L2 #T #l #H @(lpxs_ind_dx … H) -L1 +[ #H elim H -H // +| #L1 #L #H1 #H2 #IH2 #H12 elim (lleq_dec T L1 L l) #H + [ -H1 -H2 elim IH2 -IH2 /3 width=3 by lleq_trans/ -H12 + #L0 #L3 #H1 #H2 #H3 #H4 lapply (lleq_nlleq_trans … H … H2) -H2 + #H2 elim (lleq_lpx_trans … H1 … H) -L + #L #H1 #H lapply (nlleq_lleq_div … H … H2) -H2 + #H2 elim (lleq_lpxs_trans … H3 … H) -L0 + /3 width=8 by lleq_trans, ex4_2_intro/ + | -H12 -IH2 /3 width=6 by ex4_2_intro/ + ] +] +qed-. + +lemma lpxs_lleq_fqu_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 → K1 ≡[T1, 0] L1 → + ∃∃K2. ⦃G1, K1, T1⦄ ⊐ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, g] L2 & K2 ≡[T2, 0] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +[ #I #G1 #L1 #V1 #X #H1 #H2 elim (lpxs_inv_pair2 … H1) -H1 + #K0 #V0 #H1KL1 #_ #H destruct + elim (lleq_inv_lref_ge_dx … H2 ? I L1 V1) -H2 // + #K1 #H #H2KL1 lapply (drop_inv_O2 … H) -H #H destruct + /2 width=4 by fqu_lref_O, ex3_intro/ +| * [ #a ] #I #G1 #L1 #V1 #T1 #K1 #HLK1 #H + [ elim (lleq_inv_bind … H) + | elim (lleq_inv_flat … H) + ] -H /2 width=4 by fqu_pair_sn, ex3_intro/ +| #a #I #G1 #L1 #V1 #T1 #K1 #HLK1 #H elim (lleq_inv_bind_O … H) -H + /3 width=4 by lpxs_pair, fqu_bind_dx, ex3_intro/ +| #I #G1 #L1 #V1 #T1 #K1 #HLK1 #H elim (lleq_inv_flat … H) -H + /2 width=4 by fqu_flat_dx, ex3_intro/ +| #G1 #L1 #L #T1 #U1 #m #HL1 #HTU1 #K1 #H1KL1 #H2KL1 + elim (drop_O1_le (Ⓕ) (m+1) K1) + [ #K #HK1 lapply (lleq_inv_lift_le … H2KL1 … HK1 HL1 … HTU1 ?) -H2KL1 // + #H2KL elim (lpxs_drop_trans_O1 … H1KL1 … HL1) -L1 + #K0 #HK10 #H1KL lapply (drop_mono … HK10 … HK1) -HK10 #H destruct + /3 width=4 by fqu_drop, ex3_intro/ + | lapply (drop_fwd_length_le2 … HL1) -L -T1 -g + lapply (lleq_fwd_length … H2KL1) // + ] +] +qed-. + +lemma lpxs_lleq_fquq_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 → K1 ≡[T1, 0] L1 → + ∃∃K2. ⦃G1, K1, T1⦄ ⊐⸮ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, g] L2 & K2 ≡[T2, 0] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #H1KL1 #H2KL1 +elim (fquq_inv_gen … H) -H +[ #H elim (lpxs_lleq_fqu_trans … H … H1KL1 H2KL1) -L1 + /3 width=4 by fqu_fquq, ex3_intro/ +| * #HG #HL #HT destruct /2 width=4 by ex3_intro/ +] +qed-. + +lemma lpxs_lleq_fqup_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 → K1 ≡[T1, 0] L1 → + ∃∃K2. ⦃G1, K1, T1⦄ ⊐+ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, g] L2 & K2 ≡[T2, 0] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +[ #G2 #L2 #T2 #H #K1 #H1KL1 #H2KL1 elim (lpxs_lleq_fqu_trans … H … H1KL1 H2KL1) -L1 + /3 width=4 by fqu_fqup, ex3_intro/ +| #G #G2 #L #L2 #T #T2 #_ #HT2 #IHT1 #K1 #H1KL1 #H2KL1 elim (IHT1 … H2KL1) // -L1 + #K #HT1 #H1KL #H2KL elim (lpxs_lleq_fqu_trans … HT2 … H1KL H2KL) -L + /3 width=5 by fqup_strap1, ex3_intro/ +] +qed-. + +lemma lpxs_lleq_fqus_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 → K1 ≡[T1, 0] L1 → + ∃∃K2. ⦃G1, K1, T1⦄ ⊐* ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, g] L2 & K2 ≡[T2, 0] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #H1KL1 #H2KL1 +elim (fqus_inv_gen … H) -H +[ #H elim (lpxs_lleq_fqup_trans … H … H1KL1 H2KL1) -L1 + /3 width=4 by fqup_fqus, ex3_intro/ +| * #HG #HL #HT destruct /2 width=4 by ex3_intro/ +] +qed-. + +fact lreq_lpxs_trans_lleq_aux: ∀h,g,G,L1,L0,l,m. L1 ⩬[l, m] L0 → m = ∞ → + ∀L2. ⦃G, L0⦄ ⊢ ➡*[h, g] L2 → + ∃∃L. L ⩬[l, m] L2 & ⦃G, L1⦄ ⊢ ➡*[h, g] L & + (∀T. L0 ≡[T, l] L2 ↔ L1 ≡[T, l] L). +#h #g #G #L1 #L0 #l #m #H elim H -L1 -L0 -l -m +[ #l #m #_ #L2 #H >(lpxs_inv_atom1 … H) -H + /3 width=5 by ex3_intro, conj/ +| #I1 #I0 #L1 #L0 #V1 #V0 #_ #_ #Hm destruct +| #I #L1 #L0 #V1 #m #HL10 #IHL10 #Hm #Y #H + elim (lpxs_inv_pair1 … H) -H #L2 #V2 #HL02 #HV02 #H destruct + lapply (ysucc_inv_Y_dx … Hm) -Hm #Hm + elim (IHL10 … HL02) // -IHL10 -HL02 #L #HL2 #HL1 #IH + @(ex3_intro … (L.ⓑ{I}V2)) /3 width=3 by lpxs_pair, lreq_cpxs_trans, lreq_pair/ + #T elim (IH T) #HL0dx #HL0sn + @conj #H @(lleq_lreq_repl … H) -H /3 width=1 by lreq_sym, lreq_pair_O_Y/ +| #I1 #I0 #L1 #L0 #V1 #V0 #l #m #HL10 #IHL10 #Hm #Y #H + elim (lpxs_inv_pair1 … H) -H #L2 #V2 #HL02 #HV02 #H destruct + elim (IHL10 … HL02) // -IHL10 -HL02 #L #HL2 #HL1 #IH + @(ex3_intro … (L.ⓑ{I1}V1)) /3 width=1 by lpxs_pair, lreq_succ/ + #T elim (IH T) #HL0dx #HL0sn + @conj #H @(lleq_lreq_repl … H) -H /3 width=1 by lreq_sym, lreq_succ/ +] +qed-. + +lemma lreq_lpxs_trans_lleq: ∀h,g,G,L1,L0,l. L1 ⩬[l, ∞] L0 → + ∀L2. ⦃G, L0⦄ ⊢ ➡*[h, g] L2 → + ∃∃L. L ⩬[l, ∞] L2 & ⦃G, L1⦄ ⊢ ➡*[h, g] L & + (∀T. L0 ≡[T, l] L2 ↔ L1 ≡[T, l] L). +/2 width=1 by lreq_lpxs_trans_lleq_aux/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_lpxs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_lpxs.ma new file mode 100644 index 000000000..09ddcfeba --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_lpxs.ma @@ -0,0 +1,22 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/lpxs.ma". + +(* SN EXTENDED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *******************) + +(* Main properties **********************************************************) + +theorem lpxs_trans: ∀h,g,G. Transitive … (lpxs h g G). +/2 width=3 by trans_TC/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc.ma new file mode 100644 index 000000000..a0bb73d7a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc.ma @@ -0,0 +1,114 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/lrsubeqc_4.ma". +include "basic_2A/static/lsubr.ma". +include "basic_2A/static/aaa.ma". +include "basic_2A/computation/gcp_cr.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR GENERIC REDUCIBILITY ********************) + +inductive lsubc (RP) (G): relation lenv ≝ +| lsubc_atom: lsubc RP G (⋆) (⋆) +| lsubc_pair: ∀I,L1,L2,V. lsubc RP G L1 L2 → lsubc RP G (L1.ⓑ{I}V) (L2.ⓑ{I}V) +| lsubc_beta: ∀L1,L2,V,W,A. ⦃G, L1, V⦄ ϵ[RP] 〚A〛 → ⦃G, L1, W⦄ ϵ[RP] 〚A〛 → ⦃G, L2⦄ ⊢ W ⁝ A → + lsubc RP G L1 L2 → lsubc RP G (L1. ⓓⓝW.V) (L2.ⓛW) +. + +interpretation + "local environment refinement (generic reducibility)" + 'LRSubEqC RP G L1 L2 = (lsubc RP G L1 L2). + +(* Basic inversion lemmas ***************************************************) + +fact lsubc_inv_atom1_aux: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → L1 = ⋆ → L2 = ⋆. +#RP #G #L1 #L2 * -L1 -L2 +[ // +| #I #L1 #L2 #V #_ #H destruct +| #L1 #L2 #V #W #A #_ #_ #_ #_ #H destruct +] +qed-. + +(* Basic_1: was just: csubc_gen_sort_r *) +lemma lsubc_inv_atom1: ∀RP,G,L2. G ⊢ ⋆ ⫃[RP] L2 → L2 = ⋆. +/2 width=5 by lsubc_inv_atom1_aux/ qed-. + +fact lsubc_inv_pair1_aux: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → ∀I,K1,X. L1 = K1.ⓑ{I}X → + (∃∃K2. G ⊢ K1 ⫃[RP] K2 & L2 = K2.ⓑ{I}X) ∨ + ∃∃K2,V,W,A. ⦃G, K1, V⦄ ϵ[RP] 〚A〛 & ⦃G, K1, W⦄ ϵ[RP] 〚A〛 & ⦃G, K2⦄ ⊢ W ⁝ A & + G ⊢ K1 ⫃[RP] K2 & + L2 = K2. ⓛW & X = ⓝW.V & I = Abbr. +#RP #G #L1 #L2 * -L1 -L2 +[ #I #K1 #V #H destruct +| #J #L1 #L2 #V #HL12 #I #K1 #W #H destruct /3 width=3 by ex2_intro, or_introl/ +| #L1 #L2 #V1 #W2 #A #HV1 #H1W2 #H2W2 #HL12 #I #K1 #V #H destruct /3 width=10 by ex7_4_intro, or_intror/ +] +qed-. + +(* Basic_1: was: csubc_gen_head_r *) +lemma lsubc_inv_pair1: ∀RP,I,G,K1,L2,X. G ⊢ K1.ⓑ{I}X ⫃[RP] L2 → + (∃∃K2. G ⊢ K1 ⫃[RP] K2 & L2 = K2.ⓑ{I}X) ∨ + ∃∃K2,V,W,A. ⦃G, K1, V⦄ ϵ[RP] 〚A〛 & ⦃G, K1, W⦄ ϵ[RP] 〚A〛 & ⦃G, K2⦄ ⊢ W ⁝ A & + G ⊢ K1 ⫃[RP] K2 & + L2 = K2.ⓛW & X = ⓝW.V & I = Abbr. +/2 width=3 by lsubc_inv_pair1_aux/ qed-. + +fact lsubc_inv_atom2_aux: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → L2 = ⋆ → L1 = ⋆. +#RP #G #L1 #L2 * -L1 -L2 +[ // +| #I #L1 #L2 #V #_ #H destruct +| #L1 #L2 #V #W #A #_ #_ #_ #_ #H destruct +] +qed-. + +(* Basic_1: was just: csubc_gen_sort_l *) +lemma lsubc_inv_atom2: ∀RP,G,L1. G ⊢ L1 ⫃[RP] ⋆ → L1 = ⋆. +/2 width=5 by lsubc_inv_atom2_aux/ qed-. + +fact lsubc_inv_pair2_aux: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → ∀I,K2,W. L2 = K2.ⓑ{I} W → + (∃∃K1. G ⊢ K1 ⫃[RP] K2 & L1 = K1. ⓑ{I} W) ∨ + ∃∃K1,V,A. ⦃G, K1, V⦄ ϵ[RP] 〚A〛 & ⦃G, K1, W⦄ ϵ[RP] 〚A〛 & ⦃G, K2⦄ ⊢ W ⁝ A & + G ⊢ K1 ⫃[RP] K2 & + L1 = K1.ⓓⓝW.V & I = Abst. +#RP #G #L1 #L2 * -L1 -L2 +[ #I #K2 #W #H destruct +| #J #L1 #L2 #V #HL12 #I #K2 #W #H destruct /3 width=3 by ex2_intro, or_introl/ +| #L1 #L2 #V1 #W2 #A #HV1 #H1W2 #H2W2 #HL12 #I #K2 #W #H destruct /3 width=8 by ex6_3_intro, or_intror/ +] +qed-. + +(* Basic_1: was just: csubc_gen_head_l *) +lemma lsubc_inv_pair2: ∀RP,I,G,L1,K2,W. G ⊢ L1 ⫃[RP] K2.ⓑ{I} W → + (∃∃K1. G ⊢ K1 ⫃[RP] K2 & L1 = K1.ⓑ{I} W) ∨ + ∃∃K1,V,A. ⦃G, K1, V⦄ ϵ[RP] 〚A〛 & ⦃G, K1, W⦄ ϵ[RP] 〚A〛 & ⦃G, K2⦄ ⊢ W ⁝ A & + G ⊢ K1 ⫃[RP] K2 & + L1 = K1.ⓓⓝW.V & I = Abst. +/2 width=3 by lsubc_inv_pair2_aux/ qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lsubc_fwd_lsubr: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → L1 ⫃ L2. +#RP #G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsubr_pair, lsubr_beta/ +qed-. + +(* Basic properties *********************************************************) + +(* Basic_1: was just: csubc_refl *) +lemma lsubc_refl: ∀RP,G,L. G ⊢ L ⫃[RP] L. +#RP #G #L elim L -L /2 width=1 by lsubc_pair/ +qed. + +(* Basic_1: removed theorems 3: + csubc_clear_conf csubc_getl_conf csubc_csuba +*) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc_drop.ma new file mode 100644 index 000000000..2eb945da9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc_drop.ma @@ -0,0 +1,70 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/aaa_lift.ma". +include "basic_2A/computation/lsubc.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR GENERIC REDUCIBILITY ********************) + +(* Properties concerning basic local environment slicing ********************) + +(* Basic_1: was: csubc_drop_conf_O *) +(* Note: the constant 0 can not be generalized *) +lemma lsubc_drop_O1_trans: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → ∀K2,s,m. ⬇[s, 0, m] L2 ≡ K2 → + ∃∃K1. ⬇[s, 0, m] L1 ≡ K1 & G ⊢ K1 ⫃[RP] K2. +#RP #G #L1 #L2 #H elim H -L1 -L2 +[ #X #s #m #H elim (drop_inv_atom1 … H) -H /4 width=3 by drop_atom, ex2_intro/ +| #I #L1 #L2 #V #_ #IHL12 #X #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #H destruct + [ elim (IHL12 L2 s 0) -IHL12 // #X #H <(drop_inv_O2 … H) -H + /3 width=3 by lsubc_pair, drop_pair, ex2_intro/ + | elim (IHL12 … H) -L2 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +| #L1 #L2 #V #W #A #HV #H1W #H2W #_ #IHL12 #X #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #H destruct + [ elim (IHL12 L2 s 0) -IHL12 // #X #H <(drop_inv_O2 … H) -H + /3 width=8 by lsubc_beta, drop_pair, ex2_intro/ + | elim (IHL12 … H) -L2 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +] +qed-. + +(* Basic_1: was: csubc_drop_conf_rev *) +lemma drop_lsubc_trans: ∀RR,RS,RP. gcp RR RS RP → + ∀G,L1,K1,l,m. ⬇[Ⓕ, l, m] L1 ≡ K1 → ∀K2. G ⊢ K1 ⫃[RP] K2 → + ∃∃L2. G ⊢ L1 ⫃[RP] L2 & ⬇[Ⓕ, l, m] L2 ≡ K2. +#RR #RS #RP #Hgcp #G #L1 #K1 #l #m #H elim H -L1 -K1 -l -m +[ #l #m #Hm #X #H elim (lsubc_inv_atom1 … H) -H + >Hm /2 width=3 by ex2_intro/ +| #L1 #I #V1 #X #H + elim (lsubc_inv_pair1 … H) -H * + [ #K1 #HLK1 #H destruct /3 width=3 by lsubc_pair, drop_pair, ex2_intro/ + | #K1 #V #W1 #A #HV1 #H1W1 #H2W1 #HLK1 #H1 #H2 #H3 destruct + /3 width=4 by lsubc_beta, drop_pair, ex2_intro/ + ] +| #I #L1 #K1 #V1 #m #_ #IHLK1 #K2 #HK12 + elim (IHLK1 … HK12) -K1 /3 width=5 by lsubc_pair, drop_drop, ex2_intro/ +| #I #L1 #K1 #V1 #V2 #l #m #HLK1 #HV21 #IHLK1 #X #H + elim (lsubc_inv_pair1 … H) -H * + [ #K2 #HK12 #H destruct + elim (IHLK1 … HK12) -K1 /3 width=5 by lsubc_pair, drop_skip, ex2_intro/ + | #K2 #V #W2 #A #HV2 #H1W2 #H2W2 #HK12 #H1 #H2 #H3 destruct + elim (lift_inv_flat1 … HV21) -HV21 #W3 #V3 #HW23 #HV3 #H destruct + elim (IHLK1 … HK12) #K #HL1K #HK2 + lapply (gcr_lift … Hgcp … HV2 … HLK1 … HV3) -HV2 + lapply (gcr_lift … Hgcp … H1W2 … HLK1 … HW23) -H1W2 + /4 width=11 by lsubc_beta, aaa_lift, drop_skip, ex2_intro/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc_drops.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc_drops.ma new file mode 100644 index 000000000..41c348151 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc_drops.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/lsubc_drop.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR GENERIC REDUCIBILITY ********************) + +(* Properties concerning generic local environment slicing ******************) + +(* Basic_1: was: csubc_drop1_conf_rev *) +lemma drops_lsubc_trans: ∀RR,RS,RP. gcp RR RS RP → + ∀G,L1,K1,cs. ⬇*[Ⓕ, cs] L1 ≡ K1 → ∀K2. G ⊢ K1 ⫃[RP] K2 → + ∃∃L2. G ⊢ L1 ⫃[RP] L2 & ⬇*[Ⓕ, cs] L2 ≡ K2. +#RR #RS #RP #Hgcp #G #L1 #K1 #cs #H elim H -L1 -K1 -cs +[ /2 width=3 by drops_nil, ex2_intro/ +| #L1 #L #K1 #cs #l #m #_ #HLK1 #IHL #K2 #HK12 + elim (drop_lsubc_trans … Hgcp … HLK1 … HK12) -Hgcp -K1 #K #HLK #HK2 + elim (IHL … HLK) -IHL -HLK /3 width=5 by drops_cons, ex2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc_lsuba.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc_lsuba.ma new file mode 100644 index 000000000..00a6d4d2b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc_lsuba.ma @@ -0,0 +1,26 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/lsuba.ma". +include "basic_2A/computation/gcp_aaa.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR GENERIC REDUCIBILITY ********************) + +(* properties concerning lenv refinement for atomic arity assignment ********) + +lemma lsuba_lsubc: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → + ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → G ⊢ L1 ⫃[RP] L2. +#RR #RS #RP #H1RP #H2RP #G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsubc_pair/ +#L1 #L2 #W #V #A #H elim (aaa_inv_cast … H) -H /3 width=4 by acr_aaa, lsubc_beta/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx.ma new file mode 100644 index 000000000..4f2afb775 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx.ma @@ -0,0 +1,109 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/sn_6.ma". +include "basic_2A/multiple/lleq.ma". +include "basic_2A/reduction/lpx.ma". + +(* SN EXTENDED STRONGLY NORMALIZING LOCAL ENVIRONMENTS **********************) + +definition lsx: ∀h. sd h → relation4 ynat term genv lenv ≝ + λh,g,l,T,G. SN … (lpx h g G) (lleq l T). + +interpretation + "extended strong normalization (local environment)" + 'SN h g l T G L = (lsx h g T l G L). + +(* Basic eliminators ********************************************************) + +lemma lsx_ind: ∀h,g,G,T,l. ∀R:predicate lenv. + (∀L1. G ⊢ ⬊*[h, g, T, l] L1 → + (∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → R L2) → + R L1 + ) → + ∀L. G ⊢ ⬊*[h, g, T, l] L → R L. +#h #g #G #T #l #R #H0 #L1 #H elim H -L1 +/5 width=1 by lleq_sym, SN_intro/ +qed-. + +(* Basic properties *********************************************************) + +lemma lsx_intro: ∀h,g,G,L1,T,l. + (∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → G ⊢ ⬊*[h, g, T, l] L2) → + G ⊢ ⬊*[h, g, T, l] L1. +/5 width=1 by lleq_sym, SN_intro/ qed. + +lemma lsx_atom: ∀h,g,G,T,l. G ⊢ ⬊*[h, g, T, l] ⋆. +#h #g #G #T #l @lsx_intro +#X #H #HT lapply (lpx_inv_atom1 … H) -H +#H destruct elim HT -HT // +qed. + +lemma lsx_sort: ∀h,g,G,L,l,k. G ⊢ ⬊*[h, g, ⋆k, l] L. +#h #g #G #L1 #l #k @lsx_intro +#L2 #HL12 #H elim H -H +/3 width=4 by lpx_fwd_length, lleq_sort/ +qed. + +lemma lsx_gref: ∀h,g,G,L,l,p. G ⊢ ⬊*[h, g, §p, l] L. +#h #g #G #L1 #l #p @lsx_intro +#L2 #HL12 #H elim H -H +/3 width=4 by lpx_fwd_length, lleq_gref/ +qed. + +lemma lsx_ge_up: ∀h,g,G,L,T,U,lt,l,m. lt ≤ yinj l + yinj m → + ⬆[l, m] T ≡ U → G ⊢ ⬊*[h, g, U, lt] L → G ⊢ ⬊*[h, g, U, l] L. +#h #g #G #L #T #U #lt #l #m #Hltlm #HTU #H @(lsx_ind … H) -L +/5 width=7 by lsx_intro, lleq_ge_up/ +qed-. + +lemma lsx_ge: ∀h,g,G,L,T,l1,l2. l1 ≤ l2 → + G ⊢ ⬊*[h, g, T, l1] L → G ⊢ ⬊*[h, g, T, l2] L. +#h #g #G #L #T #l1 #l2 #Hl12 #H @(lsx_ind … H) -L +/5 width=7 by lsx_intro, lleq_ge/ +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lsx_fwd_bind_sn: ∀h,g,a,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ⓑ{a,I}V.T, l] L → + G ⊢ ⬊*[h, g, V, l] L. +#h #g #a #I #G #L #V #T #l #H @(lsx_ind … H) -L +#L1 #_ #IHL1 @lsx_intro +#L2 #HL12 #HV @IHL1 /3 width=4 by lleq_fwd_bind_sn/ +qed-. + +lemma lsx_fwd_flat_sn: ∀h,g,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ⓕ{I}V.T, l] L → + G ⊢ ⬊*[h, g, V, l] L. +#h #g #I #G #L #V #T #l #H @(lsx_ind … H) -L +#L1 #_ #IHL1 @lsx_intro +#L2 #HL12 #HV @IHL1 /3 width=3 by lleq_fwd_flat_sn/ +qed-. + +lemma lsx_fwd_flat_dx: ∀h,g,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ⓕ{I}V.T, l] L → + G ⊢ ⬊*[h, g, T, l] L. +#h #g #I #G #L #V #T #l #H @(lsx_ind … H) -L +#L1 #_ #IHL1 @lsx_intro +#L2 #HL12 #HV @IHL1 /3 width=3 by lleq_fwd_flat_dx/ +qed-. + +lemma lsx_fwd_pair_sn: ∀h,g,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ②{I}V.T, l] L → + G ⊢ ⬊*[h, g, V, l] L. +#h #g * /2 width=4 by lsx_fwd_bind_sn, lsx_fwd_flat_sn/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +lemma lsx_inv_flat: ∀h,g,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ⓕ{I}V.T, l] L → + G ⊢ ⬊*[h, g, V, l] L ∧ G ⊢ ⬊*[h, g, T, l] L. +/3 width=3 by lsx_fwd_flat_sn, lsx_fwd_flat_dx, conj/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_alt.ma new file mode 100644 index 000000000..9468bedf2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_alt.ma @@ -0,0 +1,115 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/snalt_6.ma". +include "basic_2A/computation/lpxs_lleq.ma". +include "basic_2A/computation/lsx.ma". + +(* SN EXTENDED STRONGLY NORMALIZING LOCAL ENVIRONMENTS **********************) + +(* alternative definition of lsx *) +definition lsxa: ∀h. sd h → relation4 ynat term genv lenv ≝ + λh,g,l,T,G. SN … (lpxs h g G) (lleq l T). + +interpretation + "extended strong normalization (local environment) alternative" + 'SNAlt h g l T G L = (lsxa h g T l G L). + +(* Basic eliminators ********************************************************) + +lemma lsxa_ind: ∀h,g,G,T,l. ∀R:predicate lenv. + (∀L1. G ⊢ ⬊⬊*[h, g, T, l] L1 → + (∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → R L2) → + R L1 + ) → + ∀L. G ⊢ ⬊⬊*[h, g, T, l] L → R L. +#h #g #G #T #l #R #H0 #L1 #H elim H -L1 +/5 width=1 by lleq_sym, SN_intro/ +qed-. + +(* Basic properties *********************************************************) + +lemma lsxa_intro: ∀h,g,G,L1,T,l. + (∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → G ⊢ ⬊⬊*[h, g, T, l] L2) → + G ⊢ ⬊⬊*[h, g, T, l] L1. +/5 width=1 by lleq_sym, SN_intro/ qed. + +fact lsxa_intro_aux: ∀h,g,G,L1,T,l. + (∀L,L2. ⦃G, L⦄ ⊢ ➡*[h, g] L2 → L1 ≡[T, l] L → (L1 ≡[T, l] L2 → ⊥) → G ⊢ ⬊⬊*[h, g, T, l] L2) → + G ⊢ ⬊⬊*[h, g, T, l] L1. +/4 width=3 by lsxa_intro/ qed-. + +lemma lsxa_lleq_trans: ∀h,g,T,G,L1,l. G ⊢ ⬊⬊*[h, g, T, l] L1 → + ∀L2. L1 ≡[T, l] L2 → G ⊢ ⬊⬊*[h, g, T, l] L2. +#h #g #T #G #L1 #l #H @(lsxa_ind … H) -L1 +#L1 #_ #IHL1 #L2 #HL12 @lsxa_intro +#K2 #HLK2 #HnLK2 elim (lleq_lpxs_trans … HLK2 … HL12) -HLK2 +/5 width=4 by lleq_canc_sn, lleq_trans/ +qed-. + +lemma lsxa_lpxs_trans: ∀h,g,T,G,L1,l. G ⊢ ⬊⬊*[h, g, T, l] L1 → + ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → G ⊢ ⬊⬊*[h, g, T, l] L2. +#h #g #T #G #L1 #l #H @(lsxa_ind … H) -L1 #L1 #HL1 #IHL1 #L2 #HL12 +elim (lleq_dec T L1 L2 l) /3 width=4 by lsxa_lleq_trans/ +qed-. + +lemma lsxa_intro_lpx: ∀h,g,G,L1,T,l. + (∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → G ⊢ ⬊⬊*[h, g, T, l] L2) → + G ⊢ ⬊⬊*[h, g, T, l] L1. +#h #g #G #L1 #T #l #IH @lsxa_intro_aux +#L #L2 #H @(lpxs_ind_dx … H) -L +[ #H destruct #H elim H // +| #L0 #L elim (lleq_dec T L1 L l) /3 width=1 by/ + #HnT #HL0 #HL2 #_ #HT #_ elim (lleq_lpx_trans … HL0 … HT) -L0 + #L0 #HL10 #HL0 @(lsxa_lpxs_trans … HL2) -HL2 + /5 width=3 by lsxa_lleq_trans, lleq_trans/ +] +qed-. + +(* Main properties **********************************************************) + +theorem lsx_lsxa: ∀h,g,G,L,T,l. G ⊢ ⬊*[h, g, T, l] L → G ⊢ ⬊⬊*[h, g, T, l] L. +#h #g #G #L #T #l #H @(lsx_ind … H) -L +/4 width=1 by lsxa_intro_lpx/ +qed. + +(* Main inversion lemmas ****************************************************) + +theorem lsxa_inv_lsx: ∀h,g,G,L,T,l. G ⊢ ⬊⬊*[h, g, T, l] L → G ⊢ ⬊*[h, g, T, l] L. +#h #g #G #L #T #l #H @(lsxa_ind … H) -L +/4 width=1 by lsx_intro, lpx_lpxs/ +qed-. + +(* Advanced properties ******************************************************) + +lemma lsx_intro_alt: ∀h,g,G,L1,T,l. + (∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → G ⊢ ⬊*[h, g, T, l] L2) → + G ⊢ ⬊*[h, g, T, l] L1. +/6 width=1 by lsxa_inv_lsx, lsx_lsxa, lsxa_intro/ qed. + +lemma lsx_lpxs_trans: ∀h,g,G,L1,T,l. G ⊢ ⬊*[h, g, T, l] L1 → + ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → G ⊢ ⬊*[h, g, T, l] L2. +/4 width=3 by lsxa_inv_lsx, lsx_lsxa, lsxa_lpxs_trans/ qed-. + +(* Advanced eliminators *****************************************************) + +lemma lsx_ind_alt: ∀h,g,G,T,l. ∀R:predicate lenv. + (∀L1. G ⊢ ⬊*[h, g, T, l] L1 → + (∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → R L2) → + R L1 + ) → + ∀L. G ⊢ ⬊*[h, g, T, l] L → R L. +#h #g #G #T #l #R #IH #L #H @(lsxa_ind h g G T l … L) +/4 width=1 by lsxa_inv_lsx, lsx_lsxa/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_csx.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_csx.ma new file mode 100644 index 000000000..1d1966974 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_csx.ma @@ -0,0 +1,59 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/csx_lpxs.ma". +include "basic_2A/computation/lcosx_cpx.ma". + +(* SN EXTENDED STRONGLY NORMALIZING LOCAL ENVIRONMENTS **********************) + +(* Advanced properties ******************************************************) + +lemma lsx_lref_be_lpxs: ∀h,g,I,G,K1,V,i,l. l ≤ yinj i → ⦃G, K1⦄ ⊢ ⬊*[h, g] V → + ∀K2. G ⊢ ⬊*[h, g, V, 0] K2 → ⦃G, K1⦄ ⊢ ➡*[h, g] K2 → + ∀L2. ⬇[i] L2 ≡ K2.ⓑ{I}V → G ⊢ ⬊*[h, g, #i, l] L2. +#h #g #I #G #K1 #V #i #l #Hli #H @(csx_ind_alt … H) -V +#V0 #_ #IHV0 #K2 #H @(lsx_ind … H) -K2 +#K0 #HK0 #IHK0 #HK10 #L0 #HLK0 @lsx_intro +#L2 #HL02 #HnL02 elim (lpx_drop_conf … HLK0 … HL02) -HL02 +#Y #H #HLK2 elim (lpx_inv_pair1 … H) -H +#K2 #V2 #HK02 #HV02 #H destruct +elim (eq_term_dec V0 V2) #HnV02 destruct [ -IHV0 -HV02 -HK0 | -IHK0 -HnL02 -HLK0 ] +[ /4 width=8 by lpxs_strap1, lleq_lref/ +| @(IHV0 … HnV02 … HLK2) -IHV0 -HnV02 -HLK2 + /3 width=4 by lsx_cpx_trans_O, lsx_lpx_trans, lpxs_cpx_trans, lpxs_strap1/ (**) (* full auto too slow *) +] +qed. + +lemma lsx_lref_be: ∀h,g,I,G,K,V,i,l. l ≤ yinj i → ⦃G, K⦄ ⊢ ⬊*[h, g] V → + G ⊢ ⬊*[h, g, V, 0] K → + ∀L. ⬇[i] L ≡ K.ⓑ{I}V → G ⊢ ⬊*[h, g, #i, l] L. +/2 width=8 by lsx_lref_be_lpxs/ qed. + +(* Main properties **********************************************************) + +theorem csx_lsx: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ∀l. G ⊢ ⬊*[h, g, T, l] L. +#h #g #G #L #T @(fqup_wf_ind_eq … G L T) -G -L -T +#Z #Y #X #IH #G #L * * // +[ #i #HG #HL #HT #H #l destruct + elim (lt_or_ge i (|L|)) /2 width=1 by lsx_lref_free/ + elim (ylt_split i l) /2 width=1 by lsx_lref_skip/ + #Hli #Hi elim (drop_O1_lt (Ⓕ) … Hi) -Hi + #I #K #V #HLK lapply (csx_inv_lref_bind … HLK … H) -H + /4 width=6 by lsx_lref_be, fqup_lref/ +| #a #I #V #T #HG #HL #HT #H #l destruct + elim (csx_fwd_bind … H) -H /3 width=1 by lsx_bind/ +| #I #V #T #HG #HL #HT #H #l destruct + elim (csx_fwd_flat … H) -H /3 width=1 by lsx_flat/ +] +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_drop.ma new file mode 100644 index 000000000..8c02ca9ce --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_drop.ma @@ -0,0 +1,96 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/lleq_drop.ma". +include "basic_2A/reduction/lpx_drop.ma". +include "basic_2A/computation/lsx.ma". + +(* SN EXTENDED STRONGLY NORMALIZING LOCAL ENVIRONMENTS **********************) + +(* Advanced properties ******************************************************) + +lemma lsx_lref_free: ∀h,g,G,L,l,i. |L| ≤ i → G ⊢ ⬊*[h, g, #i, l] L. +#h #g #G #L1 #l #i #HL1 @lsx_intro +#L2 #HL12 #H elim H -H +/4 width=6 by lpx_fwd_length, lleq_free, le_repl_sn_conf_aux/ +qed. + +lemma lsx_lref_skip: ∀h,g,G,L,l,i. yinj i < l → G ⊢ ⬊*[h, g, #i, l] L. +#h #g #G #L1 #l #i #HL1 @lsx_intro +#L2 #HL12 #H elim H -H +/3 width=4 by lpx_fwd_length, lleq_skip/ +qed. + +(* Advanced forward lemmas **************************************************) + +lemma lsx_fwd_lref_be: ∀h,g,I,G,L,l,i. l ≤ yinj i → G ⊢ ⬊*[h, g, #i, l] L → + ∀K,V. ⬇[i] L ≡ K.ⓑ{I}V → G ⊢ ⬊*[h, g, V, 0] K. +#h #g #I #G #L #l #i #Hli #H @(lsx_ind … H) -L +#L1 #_ #IHL1 #K1 #V #HLK1 @lsx_intro +#K2 #HK12 #HnK12 lapply (drop_fwd_drop2 … HLK1) +#H2LK1 elim (drop_lpx_trans … H2LK1 … HK12) -H2LK1 -HK12 +#L2 #HL12 #H2LK2 #H elim (lreq_drop_conf_be … H … HLK1) -H /2 width=1 by ylt_inj/ +#Y #_ #HLK2 lapply (drop_fwd_drop2 … HLK2) +#HY lapply (drop_mono … HY … H2LK2) -HY -H2LK2 #H destruct +/4 width=10 by lleq_inv_lref_ge/ +qed-. + +(* Properties on relocation *************************************************) + +lemma lsx_lift_le: ∀h,g,G,K,T,U,lt,l,m. lt ≤ yinj l → + ⬆[l, m] T ≡ U → G ⊢ ⬊*[h, g, T, lt] K → + ∀L. ⬇[Ⓕ, l, m] L ≡ K → G ⊢ ⬊*[h, g, U, lt] L. +#h #g #G #K #T #U #lt #l #m #Hltl #HTU #H @(lsx_ind … H) -K +#K1 #_ #IHK1 #L1 #HLK1 @lsx_intro +#L2 #HL12 #HnU elim (lpx_drop_conf … HLK1 … HL12) -HL12 +/4 width=10 by lleq_lift_le/ +qed-. + +lemma lsx_lift_ge: ∀h,g,G,K,T,U,lt,l,m. yinj l ≤ lt → + ⬆[l, m] T ≡ U → G ⊢ ⬊*[h, g, T, lt] K → + ∀L. ⬇[Ⓕ, l, m] L ≡ K → G ⊢ ⬊*[h, g, U, lt + m] L. +#h #g #G #K #T #U #lt #l #m #Hllt #HTU #H @(lsx_ind … H) -K +#K1 #_ #IHK1 #L1 #HLK1 @lsx_intro +#L2 #HL12 #HnU elim (lpx_drop_conf … HLK1 … HL12) -HL12 +/4 width=9 by lleq_lift_ge/ +qed-. + +(* Inversion lemmas on relocation *******************************************) + +lemma lsx_inv_lift_le: ∀h,g,G,L,T,U,lt,l,m. lt ≤ yinj l → + ⬆[l, m] T ≡ U → G ⊢ ⬊*[h, g, U, lt] L → + ∀K. ⬇[Ⓕ, l, m] L ≡ K → G ⊢ ⬊*[h, g, T, lt] K. +#h #g #G #L #T #U #lt #l #m #Hltl #HTU #H @(lsx_ind … H) -L +#L1 #_ #IHL1 #K1 #HLK1 @lsx_intro +#K2 #HK12 #HnT elim (drop_lpx_trans … HLK1 … HK12) -HK12 +/4 width=10 by lleq_inv_lift_le/ +qed-. + +lemma lsx_inv_lift_be: ∀h,g,G,L,T,U,lt,l,m. yinj l ≤ lt → lt ≤ l + m → + ⬆[l, m] T ≡ U → G ⊢ ⬊*[h, g, U, lt] L → + ∀K. ⬇[Ⓕ, l, m] L ≡ K → G ⊢ ⬊*[h, g, T, l] K. +#h #g #G #L #T #U #lt #l #m #Hllt #Hltlm #HTU #H @(lsx_ind … H) -L +#L1 #_ #IHL1 #K1 #HLK1 @lsx_intro +#K2 #HK12 #HnT elim (drop_lpx_trans … HLK1 … HK12) -HK12 +/4 width=11 by lleq_inv_lift_be/ +qed-. + +lemma lsx_inv_lift_ge: ∀h,g,G,L,T,U,lt,l,m. yinj l + yinj m ≤ lt → + ⬆[l, m] T ≡ U → G ⊢ ⬊*[h, g, U, lt] L → + ∀K. ⬇[Ⓕ, l, m] L ≡ K → G ⊢ ⬊*[h, g, T, lt-m] K. +#h #g #G #L #T #U #lt #l #m #Hlmlt #HTU #H @(lsx_ind … H) -L +#L1 #_ #IHL1 #K1 #HLK1 @lsx_intro +#K2 #HK12 #HnT elim (drop_lpx_trans … HLK1 … HK12) -HK12 +/4 width=9 by lleq_inv_lift_ge/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_lpx.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_lpx.ma new file mode 100644 index 000000000..a50714b20 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_lpx.ma @@ -0,0 +1,63 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/lleq_lleq.ma". +include "basic_2A/reduction/lpx_lleq.ma". +include "basic_2A/computation/lsx.ma". + +(* SN EXTENDED STRONGLY NORMALIZING LOCAL ENVIRONMENTS **********************) + +(* Advanced properties ******************************************************) + +lemma lsx_lleq_trans: ∀h,g,T,G,L1,l. G ⊢ ⬊*[h, g, T, l] L1 → + ∀L2. L1 ≡[T, l] L2 → G ⊢ ⬊*[h, g, T, l] L2. +#h #g #T #G #L1 #l #H @(lsx_ind … H) -L1 +#L1 #_ #IHL1 #L2 #HL12 @lsx_intro +#K2 #HLK2 #HnLK2 elim (lleq_lpx_trans … HLK2 … HL12) -HLK2 +/5 width=4 by lleq_canc_sn, lleq_trans/ +qed-. + +lemma lsx_lpx_trans: ∀h,g,T,G,L1,l. G ⊢ ⬊*[h, g, T, l] L1 → + ∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → G ⊢ ⬊*[h, g, T, l] L2. +#h #g #T #G #L1 #l #H @(lsx_ind … H) -L1 #L1 #HL1 #IHL1 #L2 #HL12 +elim (lleq_dec T L1 L2 l) /3 width=4 by lsx_lleq_trans/ +qed-. + +lemma lsx_lreq_conf: ∀h,g,G,L1,T,l. G ⊢ ⬊*[h, g, T, l] L1 → + ∀L2. L1 ⩬[l, ∞] L2 → G ⊢ ⬊*[h, g, T, l] L2. +#h #g #G #L1 #T #l #H @(lsx_ind … H) -L1 +#L1 #_ #IHL1 #L2 #HL12 @lsx_intro +#L3 #HL23 #HnL23 elim (lreq_lpx_trans_lleq … HL12 … HL23) -HL12 -HL23 +#L0 #HL03 #HL10 #H elim (H T) -H /4 width=4 by/ +qed-. + +(* Advanced forward lemmas **************************************************) + +lemma lsx_fwd_bind_dx: ∀h,g,a,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ⓑ{a,I}V.T, l] L → + G ⊢ ⬊*[h, g, T, ⫯l] L.ⓑ{I}V. +#h #g #a #I #G #L #V1 #T #l #H @(lsx_ind … H) -L +#L1 #_ #IHL1 @lsx_intro +#Y #H #HT elim (lpx_inv_pair1 … H) -H +#L2 #V2 #HL12 #_ #H destruct +@(lsx_lreq_conf … (L2.ⓑ{I}V1)) /2 width=1 by lreq_succ/ +@IHL1 // #H @HT -IHL1 -HL12 -HT +@(lleq_lreq_trans … (L2.ⓑ{I}V1)) +/2 width=2 by lleq_fwd_bind_dx, lreq_succ/ +qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma lsx_inv_bind: ∀h,g,a,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ⓑ{a, I}V.T, l] L → + G ⊢ ⬊*[h, g, V, l] L ∧ G ⊢ ⬊*[h, g, T, ⫯l] L.ⓑ{I}V. +/3 width=4 by lsx_fwd_bind_sn, lsx_fwd_bind_dx, conj/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_lpxs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_lpxs.ma new file mode 100644 index 000000000..d77771eec --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_lpxs.ma @@ -0,0 +1,62 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/lpxs_lpxs.ma". +include "basic_2A/computation/lsx_alt.ma". + +(* SN EXTENDED STRONGLY NORMALIZING LOCAL ENVIRONMENTS **********************) + +(* Advanced properties ******************************************************) + +fact lsx_bind_lpxs_aux: ∀h,g,a,I,G,L1,V,l. G ⊢ ⬊*[h, g, V, l] L1 → + ∀Y,T. G ⊢ ⬊*[h, g, T, ⫯l] Y → + ∀L2. Y = L2.ⓑ{I}V → ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → + G ⊢ ⬊*[h, g, ⓑ{a,I}V.T, l] L2. +#h #g #a #I #G #L1 #V #l #H @(lsx_ind_alt … H) -L1 +#L1 #HL1 #IHL1 #Y #T #H @(lsx_ind_alt … H) -Y +#Y #HY #IHY #L2 #H #HL12 destruct @lsx_intro_alt +#L0 #HL20 lapply (lpxs_trans … HL12 … HL20) +#HL10 #H elim (nlleq_inv_bind … H) -H [ -HL1 -IHY | -HY -IHL1 ] +[ #HnV elim (lleq_dec V L1 L2 l) + [ #HV @(IHL1 … L0) /3 width=5 by lsx_lpxs_trans, lpxs_pair, lleq_canc_sn/ (**) (* full auto too slow *) + | -HnV -HL10 /4 width=5 by lsx_lpxs_trans, lpxs_pair/ + ] +| /3 width=4 by lpxs_pair/ +] +qed-. + +lemma lsx_bind: ∀h,g,a,I,G,L,V,l. G ⊢ ⬊*[h, g, V, l] L → + ∀T. G ⊢ ⬊*[h, g, T, ⫯l] L.ⓑ{I}V → + G ⊢ ⬊*[h, g, ⓑ{a,I}V.T, l] L. +/2 width=3 by lsx_bind_lpxs_aux/ qed. + +lemma lsx_flat_lpxs: ∀h,g,I,G,L1,V,l. G ⊢ ⬊*[h, g, V, l] L1 → + ∀L2,T. G ⊢ ⬊*[h, g, T, l] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → + G ⊢ ⬊*[h, g, ⓕ{I}V.T, l] L2. +#h #g #I #G #L1 #V #l #H @(lsx_ind_alt … H) -L1 +#L1 #HL1 #IHL1 #L2 #T #H @(lsx_ind_alt … H) -L2 +#L2 #HL2 #IHL2 #HL12 @lsx_intro_alt +#L0 #HL20 lapply (lpxs_trans … HL12 … HL20) +#HL10 #H elim (nlleq_inv_flat … H) -H [ -HL1 -IHL2 | -HL2 -IHL1 ] +[ #HnV elim (lleq_dec V L1 L2 l) + [ #HV @(IHL1 … L0) /3 width=3 by lsx_lpxs_trans, lleq_canc_sn/ (**) (* full auto too slow: 47s *) + | -HnV -HL10 /3 width=4 by lsx_lpxs_trans/ + ] +| /3 width=1 by/ +] +qed-. + +lemma lsx_flat: ∀h,g,I,G,L,V,l. G ⊢ ⬊*[h, g, V, l] L → + ∀T. G ⊢ ⬊*[h, g, T, l] L → G ⊢ ⬊*[h, g, ⓕ{I}V.T, l] L. +/2 width=3 by lsx_flat_lpxs/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds.ma new file mode 100644 index 000000000..f26ee0989 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds.ma @@ -0,0 +1,48 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/dpredstar_7.ma". +include "basic_2A/static/da.ma". +include "basic_2A/computation/cprs.ma". + +(* STRATIFIED DECOMPOSED PARALLEL COMPUTATION ON TERMS **********************) + +definition scpds: ∀h. sd h → nat → relation4 genv lenv term term ≝ + λh,g,d2,G,L,T1,T2. + ∃∃T,d1. d2 ≤ d1 & ⦃G, L⦄ ⊢ T1 ▪[h, g] d1 & ⦃G, L⦄ ⊢ T1 •*[h, d2] T & ⦃G, L⦄ ⊢ T ➡* T2. + +interpretation "stratified decomposed parallel computation (term)" + 'DPRedStar h g d G L T1 T2 = (scpds h g d G L T1 T2). + +(* Basic properties *********************************************************) + +lemma sta_cprs_scpds: ∀h,g,G,L,T1,T,T2,d. ⦃G, L⦄ ⊢ T1 ▪[h, g] d+1 → ⦃G, L⦄ ⊢ T1 •*[h, 1] T → + ⦃G, L⦄ ⊢ T ➡* T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, 1] T2. +/2 width=6 by ex4_2_intro/ qed. + +lemma lstas_scpds: ∀h,g,G,L,T1,T2,d1. ⦃G, L⦄ ⊢ T1 ▪[h, g] d1 → + ∀d2. d2 ≤ d1 → ⦃G, L⦄ ⊢ T1 •*[h, d2] T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d2] T2. +/2 width=6 by ex4_2_intro/ qed. + +lemma scpds_strap1: ∀h,g,G,L,T1,T,T2,d. + ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d] T → ⦃G, L⦄ ⊢ T ➡ T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d] T2. +#h #g #G #L #T1 #T #T2 #d * /3 width=8 by cprs_strap1, ex4_2_intro/ +qed. + +(* Basic forward lemmas *****************************************************) + +lemma scpds_fwd_cprs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 •*➡*[h, g, 0] T2 → + ⦃G, L⦄ ⊢ T1 ➡* T2. +#h #g #G #L #T1 #T2 * /3 width=3 by cprs_strap2, lstas_cpr/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds_aaa.ma new file mode 100644 index 000000000..3c325744a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds_aaa.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/unfold/lstas_aaa.ma". +include "basic_2A/computation/cpxs_aaa.ma". +include "basic_2A/computation/scpds.ma". + +(* STRATIFIED DECOMPOSED PARALLEL COMPUTATION ON TERMS **********************) + +(* Properties on atomic arity assignment for terms **************************) + +lemma scpds_aaa_conf: ∀h,g,G,L,d. Conf3 … (aaa G L) (scpds h g d G L). +#h #g #G #L #d #A #T #HT #U * /3 width=6 by lstas_aaa_conf, cprs_aaa_conf/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds_lift.ma new file mode 100644 index 000000000..29e09ca25 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds_lift.ma @@ -0,0 +1,36 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/da_lift.ma". +include "basic_2A/unfold/lstas_lift.ma". +include "basic_2A/computation/cprs_lift.ma". +include "basic_2A/computation/scpds.ma". + +(* STRATIFIED DECOMPOSED PARALLEL COMPUTATION ON TERMS **********************) + +(* Relocation properties ****************************************************) + +lemma scpds_lift: ∀h,g,G,d. d_liftable (scpds h g d G). +#h #g #G #d2 #K #T1 #T2 * #T #d1 #Hd21 #Hd1 #HT1 #HT2 #L #s #l #m +elim (lift_total T l m) +/3 width=15 by cprs_lift, da_lift, lstas_lift, ex4_2_intro/ +qed. + +lemma scpds_inv_lift1: ∀h,g,G,d. d_deliftable_sn (scpds h g d G). +#h #g #G #d2 #L #U1 #U2 * #U #d1 #Hd21 #Hd1 #HU1 #HU2 #K #s #l #m #HLK #T1 #HTU1 +lapply (da_inv_lift … Hd1 … HLK … HTU1) -Hd1 #Hd1 +elim (lstas_inv_lift1 … HU1 … HLK … HTU1) -U1 #T #HTU #HT1 +elim (cprs_inv_lift1 … HU2 … HLK … HTU) -U -L +/3 width=8 by ex4_2_intro, ex2_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds_scpds.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds_scpds.ma new file mode 100644 index 000000000..29abce7c3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds_scpds.ma @@ -0,0 +1,93 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/unfold/lstas_da.ma". +include "basic_2A/computation/lprs_cprs.ma". +include "basic_2A/computation/cpxs_cpxs.ma". +include "basic_2A/computation/scpds.ma". + +(* STRATIFIED DECOMPOSED PARALLEL COMPUTATION ON TERMS **********************) + +(* Advanced properties ******************************************************) + +lemma scpds_strap2: ∀h,g,G,L,T1,T,T2,d1,d. ⦃G, L⦄ ⊢ T1 ▪[h, g] d1+1 → + ⦃G, L⦄ ⊢ T1 •*[h, 1] T → ⦃G, L⦄ ⊢ T •*➡*[h, g, d] T2 → + ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d+1] T2. +#h #g #G #L #T1 #T #T2 #d1 #d #Hd1 #HT1 * +#T0 #d0 #Hd0 #HTd0 #HT0 #HT02 +lapply (lstas_da_conf … HT1 … Hd1) commutative_plus +/3 width=6 by le_S_S, ex4_2_intro/ +qed. + +lemma scpds_cprs_trans: ∀h,g,G,L,T1,T,T2,d. + ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d] T → ⦃G, L⦄ ⊢ T ➡* T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d] T2. +#h #g #G #L #T1 #T #T2 #d * /3 width=8 by cprs_trans, ex4_2_intro/ +qed-. + +lemma lstas_scpds_trans: ∀h,g,G,L,T1,T,T2,d1,d2,d. + d2 ≤ d1 → ⦃G, L⦄ ⊢ T1 ▪[h, g] d1 → + ⦃G, L⦄ ⊢ T1 •*[h, d2] T → ⦃G, L⦄ ⊢ T •*➡*[h, g, d] T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d2+d] T2. +#h #g #G #L #T1 #T #T2 #d1 #d2 #d #Hd21 #HTd1 #HT1 * #T0 #d0 #Hd0 #HTd0 #HT0 #HT02 +lapply (lstas_da_conf … HT1 … HTd1) #HTd12 +lapply (da_mono … HTd12 … HTd0) -HTd12 -HTd0 #H destruct +lapply (le_minus_to_plus_r … Hd21 Hd0) -Hd21 -Hd0 +/3 width=7 by lstas_trans, ex4_2_intro/ +qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma scpds_inv_abst1: ∀h,g,a,G,L,V1,T1,U2,d. ⦃G, L⦄ ⊢ ⓛ{a}V1.T1 •*➡*[h, g, d] U2 → + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡* V2 & ⦃G, L.ⓛV1⦄ ⊢ T1 •*➡*[h, g, d] T2 & + U2 = ⓛ{a}V2.T2. +#h #g #a #G #L #V1 #T1 #U2 #d2 * #X #d1 #Hd21 #Hd1 #H1 #H2 +lapply (da_inv_bind … Hd1) -Hd1 #Hd1 +elim (lstas_inv_bind1 … H1) -H1 #U #HTU1 #H destruct +elim (cprs_inv_abst1 … H2) -H2 #V2 #T2 #HV12 #HUT2 #H destruct +/3 width=6 by ex4_2_intro, ex3_2_intro/ +qed-. + +lemma scpds_inv_abbr_abst: ∀h,g,a1,a2,G,L,V1,W2,T1,T2,d. ⦃G, L⦄ ⊢ ⓓ{a1}V1.T1 •*➡*[h, g, d] ⓛ{a2}W2.T2 → + ∃∃T. ⦃G, L.ⓓV1⦄ ⊢ T1 •*➡*[h, g, d] T & ⬆[0, 1] ⓛ{a2}W2.T2 ≡ T & a1 = true. +#h #g #a1 #a2 #G #L #V1 #W2 #T1 #T2 #d2 * #X #d1 #Hd21 #Hd1 #H1 #H2 +lapply (da_inv_bind … Hd1) -Hd1 #Hd1 +elim (lstas_inv_bind1 … H1) -H1 #U1 #HTU1 #H destruct +elim (cprs_inv_abbr1 … H2) -H2 * +[ #V2 #U2 #HV12 #HU12 #H destruct +| /3 width=6 by ex4_2_intro, ex3_intro/ +] +qed-. + +lemma scpds_inv_lstas_eq: ∀h,g,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d] T2 → + ∀T. ⦃G, L⦄ ⊢ T1 •*[h, d] T → ⦃G, L⦄ ⊢ T ➡* T2. +#h #g #G #L #T1 #T2 #d2 * +#T0 #d1 #_ #_ #HT10 #HT02 #T #HT1 +lapply (lstas_mono … HT10 … HT1) #H destruct // +qed-. + +(* Advanced forward lemmas **************************************************) + +lemma scpds_fwd_cpxs: ∀h,g,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d] T2 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2. +#h #g #G #L #T1 #T2 #d * /3 width=5 by cpxs_trans, lstas_cpxs, cprs_cpxs/ +qed-. + +(* Main properties **********************************************************) + +theorem scpds_conf_eq: ∀h,g,G,L,T0,T1,d. ⦃G, L⦄ ⊢ T0 •*➡*[h, g, d] T1 → + ∀T2. ⦃G, L⦄ ⊢ T0 •*➡*[h, g, d] T2 → + ∃∃T. ⦃G, L⦄ ⊢ T1 ➡* T & ⦃G, L⦄ ⊢ T2 ➡* T. +#h #g #G #L #T0 #T1 #d0 * #U1 #d1 #_ #_ #H1 #HUT1 #T2 * #U2 #d2 #_ #_ #H2 #HUT2 -d1 -d2 +lapply (lstas_mono … H1 … H2) #H destruct -h -d0 /2 width=3 by cprs_conf/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/conversion/cpc.ma b/matita/matita/contribs/lambdadelta/basic_2A/conversion/cpc.ma new file mode 100644 index 000000000..a1bb87e6d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/conversion/cpc.ma @@ -0,0 +1,40 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/pconv_4.ma". +include "basic_2A/reduction/cpr.ma". + +(* CONTEXT-SENSITIVE PARALLEL CONVERSION ON TERMS ***************************) + +definition cpc: relation4 genv lenv term term ≝ + λG,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡ T2 ∨ ⦃G, L⦄ ⊢ T2 ➡ T1. + +interpretation + "context-sensitive parallel conversion (term)" + 'PConv G L T1 T2 = (cpc G L T1 T2). + +(* Basic properties *********************************************************) + +lemma cpc_refl: ∀G,L. reflexive … (cpc G L). +/2 width=1 by or_intror/ qed. + +lemma cpc_sym: ∀G,L. symmetric … (cpc L G). +#G #L #T1 #T2 * /2 width=1 by or_introl, or_intror/ +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma cpc_fwd_cpr: ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ⬌ T2 → ∃∃T. ⦃G, L⦄ ⊢ T1 ➡ T & ⦃G, L⦄ ⊢ T2 ➡ T. +#G #L #T1 #T2 * /2 width=3 by ex2_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/conversion/cpc_cpc.ma b/matita/matita/contribs/lambdadelta/basic_2A/conversion/cpc_cpc.ma new file mode 100644 index 000000000..3fe972a4b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/conversion/cpc_cpc.ma @@ -0,0 +1,23 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/conversion/cpc.ma". + +(* CONTEXT-SENSITIVE PARALLEL CONVERSION ON TERMS ***************************) + +(* Main properties **********************************************************) + +theorem cpc_conf: ∀G,L,T0,T1,T2. ⦃G, L⦄ ⊢ T0 ⬌ T1 → ⦃G, L⦄ ⊢ T0 ⬌ T2 → + ∃∃T. ⦃G, L⦄ ⊢ T1 ⬌ T & ⦃G, L⦄ ⊢ T2 ⬌ T. +/3 width=3 by cpc_sym, ex2_intro/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv.ma new file mode 100644 index 000000000..b2fb883ff --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv.ma @@ -0,0 +1,161 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/lrsubeqv_5.ma". +include "basic_2A/dynamic/shnv.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************) + +(* Note: this is not transitive *) +inductive lsubsv (h) (g) (G): relation lenv ≝ +| lsubsv_atom: lsubsv h g G (⋆) (⋆) +| lsubsv_pair: ∀I,L1,L2,V. lsubsv h g G L1 L2 → + lsubsv h g G (L1.ⓑ{I}V) (L2.ⓑ{I}V) +| lsubsv_beta: ∀L1,L2,W,V,d1. ⦃G, L1⦄ ⊢ ⓝW.V ¡[h, g, d1] → ⦃G, L2⦄ ⊢ W ¡[h, g] → + ⦃G, L1⦄ ⊢ V ▪[h, g] d1+1 → ⦃G, L2⦄ ⊢ W ▪[h, g] d1 → + lsubsv h g G L1 L2 → lsubsv h g G (L1.ⓓⓝW.V) (L2.ⓛW) +. + +interpretation + "local environment refinement (stratified native validity)" + 'LRSubEqV h g G L1 L2 = (lsubsv h g G L1 L2). + +(* Basic inversion lemmas ***************************************************) + +fact lsubsv_inv_atom1_aux: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → L1 = ⋆ → L2 = ⋆. +#h #g #G #L1 #L2 * -L1 -L2 +[ // +| #I #L1 #L2 #V #_ #H destruct +| #L1 #L2 #W #V #d1 #_ #_ #_ #_ #_ #H destruct +] +qed-. + +lemma lsubsv_inv_atom1: ∀h,g,G,L2. G ⊢ ⋆ ⫃¡[h, g] L2 → L2 = ⋆. +/2 width=6 by lsubsv_inv_atom1_aux/ qed-. + +fact lsubsv_inv_pair1_aux: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → + ∀I,K1,X. L1 = K1.ⓑ{I}X → + (∃∃K2. G ⊢ K1 ⫃¡[h, g] K2 & L2 = K2.ⓑ{I}X) ∨ + ∃∃K2,W,V,d1. ⦃G, K1⦄ ⊢ ⓝW.V ¡[h, g, d1] & ⦃G, K2⦄ ⊢ W ¡[h, g] & + ⦃G, K1⦄ ⊢ V ▪[h, g] d1+1 & ⦃G, K2⦄ ⊢ W ▪[h, g] d1 & + G ⊢ K1 ⫃¡[h, g] K2 & + I = Abbr & L2 = K2.ⓛW & X = ⓝW.V. +#h #g #G #L1 #L2 * -L1 -L2 +[ #J #K1 #X #H destruct +| #I #L1 #L2 #V #HL12 #J #K1 #X #H destruct /3 width=3 by ex2_intro, or_introl/ +| #L1 #L2 #W #V #d1 #HWV #HW #HVd1 #HWd1 #HL12 #J #K1 #X #H destruct /3 width=11 by or_intror, ex8_4_intro/ +] +qed-. + +lemma lsubsv_inv_pair1: ∀h,g,I,G,K1,L2,X. G ⊢ K1.ⓑ{I}X ⫃¡[h, g] L2 → + (∃∃K2. G ⊢ K1 ⫃¡[h, g] K2 & L2 = K2.ⓑ{I}X) ∨ + ∃∃K2,W,V,d1. ⦃G, K1⦄ ⊢ ⓝW.V ¡[h, g, d1] & ⦃G, K2⦄ ⊢ W ¡[h, g] & + ⦃G, K1⦄ ⊢ V ▪[h, g] d1+1 & ⦃G, K2⦄ ⊢ W ▪[h, g] d1 & + G ⊢ K1 ⫃¡[h, g] K2 & + I = Abbr & L2 = K2.ⓛW & X = ⓝW.V. +/2 width=3 by lsubsv_inv_pair1_aux/ qed-. + +fact lsubsv_inv_atom2_aux: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → L2 = ⋆ → L1 = ⋆. +#h #g #G #L1 #L2 * -L1 -L2 +[ // +| #I #L1 #L2 #V #_ #H destruct +| #L1 #L2 #W #V #d1 #_ #_ #_ #_ #_ #H destruct +] +qed-. + +lemma lsubsv_inv_atom2: ∀h,g,G,L1. G ⊢ L1 ⫃¡[h, g] ⋆ → L1 = ⋆. +/2 width=6 by lsubsv_inv_atom2_aux/ qed-. + +fact lsubsv_inv_pair2_aux: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → + ∀I,K2,W. L2 = K2.ⓑ{I}W → + (∃∃K1. G ⊢ K1 ⫃¡[h, g] K2 & L1 = K1.ⓑ{I}W) ∨ + ∃∃K1,V,d1. ⦃G, K1⦄ ⊢ ⓝW.V ¡[h, g, d1] & ⦃G, K2⦄ ⊢ W ¡[h, g] & + ⦃G, K1⦄ ⊢ V ▪[h, g] d1+1 & ⦃G, K2⦄ ⊢ W ▪[h, g] d1 & + G ⊢ K1 ⫃¡[h, g] K2 & I = Abst & L1 = K1.ⓓⓝW.V. +#h #g #G #L1 #L2 * -L1 -L2 +[ #J #K2 #U #H destruct +| #I #L1 #L2 #V #HL12 #J #K2 #U #H destruct /3 width=3 by ex2_intro, or_introl/ +| #L1 #L2 #W #V #d1 #HWV #HW #HVd1 #HWd1 #HL12 #J #K2 #U #H destruct /3 width=8 by or_intror, ex7_3_intro/ +] +qed-. + +lemma lsubsv_inv_pair2: ∀h,g,I,G,L1,K2,W. G ⊢ L1 ⫃¡[h, g] K2.ⓑ{I}W → + (∃∃K1. G ⊢ K1 ⫃¡[h, g] K2 & L1 = K1.ⓑ{I}W) ∨ + ∃∃K1,V,d1. ⦃G, K1⦄ ⊢ ⓝW.V ¡[h, g, d1] & ⦃G, K2⦄ ⊢ W ¡[h, g] & + ⦃G, K1⦄ ⊢ V ▪[h, g] d1+1 & ⦃G, K2⦄ ⊢ W ▪[h, g] d1 & + G ⊢ K1 ⫃¡[h, g] K2 & I = Abst & L1 = K1.ⓓⓝW.V. +/2 width=3 by lsubsv_inv_pair2_aux/ qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lsubsv_fwd_lsubr: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → L1 ⫃ L2. +#h #g #G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsubr_pair, lsubr_beta/ +qed-. + +(* Basic properties *********************************************************) + +lemma lsubsv_refl: ∀h,g,G,L. G ⊢ L ⫃¡[h, g] L. +#h #g #G #L elim L -L /2 width=1 by lsubsv_pair/ +qed. + +lemma lsubsv_cprs_trans: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → + ∀T1,T2. ⦃G, L2⦄ ⊢ T1 ➡* T2 → ⦃G, L1⦄ ⊢ T1 ➡* T2. +/3 width=6 by lsubsv_fwd_lsubr, lsubr_cprs_trans/ +qed-. + +(* Note: the constant 0 cannot be generalized *) +lemma lsubsv_drop_O1_conf: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → + ∀K1,s,m. ⬇[s, 0, m] L1 ≡ K1 → + ∃∃K2. G ⊢ K1 ⫃¡[h, g] K2 & ⬇[s, 0, m] L2 ≡ K2. +#h #g #G #L1 #L2 #H elim H -L1 -L2 +[ /2 width=3 by ex2_intro/ +| #I #L1 #L2 #V #_ #IHL12 #K1 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK1 + [ destruct + elim (IHL12 L1 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsubsv_pair, drop_pair, ex2_intro/ + | elim (IHL12 … HLK1) -L1 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +| #L1 #L2 #W #V #d1 #HWV #HW #HVd1 #HWd1 #_ #IHL12 #K1 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK1 + [ destruct + elim (IHL12 L1 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=4 by lsubsv_beta, drop_pair, ex2_intro/ + | elim (IHL12 … HLK1) -L1 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +] +qed-. + +(* Note: the constant 0 cannot be generalized *) +lemma lsubsv_drop_O1_trans: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → + ∀K2,s, m. ⬇[s, 0, m] L2 ≡ K2 → + ∃∃K1. G ⊢ K1 ⫃¡[h, g] K2 & ⬇[s, 0, m] L1 ≡ K1. +#h #g #G #L1 #L2 #H elim H -L1 -L2 +[ /2 width=3 by ex2_intro/ +| #I #L1 #L2 #V #_ #IHL12 #K2 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK2 + [ destruct + elim (IHL12 L2 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsubsv_pair, drop_pair, ex2_intro/ + | elim (IHL12 … HLK2) -L2 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +| #L1 #L2 #W #V #d1 #HWV #HW #HVd1 #HWd1 #_ #IHL12 #K2 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK2 + [ destruct + elim (IHL12 L2 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=4 by lsubsv_beta, drop_pair, ex2_intro/ + | elim (IHL12 … HLK2) -L2 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_cpcs.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_cpcs.ma new file mode 100644 index 000000000..0d0e80a75 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_cpcs.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/equivalence/cpcs_cpcs.ma". +include "basic_2A/dynamic/lsubsv.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************) + +(* Properties on context-sensitive parallel equivalence for terms ***********) + +lemma lsubsv_cpcs_trans: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → + ∀T1,T2. ⦃G, L2⦄ ⊢ T1 ⬌* T2 → ⦃G, L1⦄ ⊢ T1 ⬌* T2. +/3 width=6 by lsubsv_fwd_lsubr, lsubr_cpcs_trans/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_lstas.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_lstas.ma new file mode 100644 index 000000000..5837ff293 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_lstas.ma @@ -0,0 +1,98 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/equivalence/scpes_cpcs.ma". +include "basic_2A/dynamic/lsubsv.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************) + +(* Properties on nat-iterated static type assignment ************************) + +lemma lsubsv_lstas_trans: ∀h,g,G,L2,T,U2,d2. ⦃G, L2⦄ ⊢ T •*[h, d2] U2 → + ∀d1. d2 ≤ d1 → ⦃G, L2⦄ ⊢ T ▪[h, g] d1 → + ∀L1. G ⊢ L1 ⫃¡[h, g] L2 → + ∃∃U1. ⦃G, L1⦄ ⊢ T •*[h, d2] U1 & ⦃G, L1⦄ ⊢ U1 ⬌* U2. +#h #g #G #L2 #T #U #d2 #H elim H -G -L2 -T -U -d2 +[ /2 width=3 by ex2_intro/ +| #G #L2 #K2 #V #W #U #i #d2 #HLK2 #_ #HWU #IHVW #d1 #Hd21 #Hd1 #L1 #HL12 + elim (da_inv_lref … Hd1) -Hd1 * #K0 #V0 [| #d0 ] #HK0 #HV0 + lapply (drop_mono … HK0 … HLK2) -HK0 #H destruct + elim (lsubsv_drop_O1_trans … HL12 … HLK2) -L2 #Y #H #HLK1 + elim (lsubsv_inv_pair2 … H) -H * #K1 [ | -HWU -IHVW -HLK1 ] + [ #HK12 #H destruct + elim (IHVW … Hd21 HV0 … HK12) -K2 -d1 #T #HVT #HTW + lapply (drop_fwd_drop2 … HLK1) #H + elim (lift_total T 0 (i+1)) + /3 width=12 by lstas_ldef, cpcs_lift, ex2_intro/ + | #V0 #d0 #_ #_ #_ #_ #_ #H destruct + ] +| #G #L2 #K2 #V #W #i #HLK2 #_ #IHVW #d1 #_ #Hd1 #L1 #HL12 + elim (da_inv_lref … Hd1) -Hd1 * #K0 #V0 [| #d0 ] #HK0 #HV0 [| #H1 ] + lapply (drop_mono … HK0 … HLK2) -HK0 #H2 destruct + elim (lsubsv_drop_O1_trans … HL12 … HLK2) -L2 #Y #H #HLK1 + elim (lsubsv_inv_pair2 … H) -H * #K1 + [ #HK12 #H destruct + elim (IHVW … HV0 … HK12) -K2 /3 width=5 by lstas_zero, ex2_intro/ + | #V1 #d1 #_ #_ #HV1 #HV #HK12 #_ #H destruct + lapply (da_mono … HV0 … HV) -HV #H destruct + elim (da_lstas … HV1 0) -HV1 #W1 #HVW1 #_ + elim (lift_total W1 0 (i+1)) #U1 #HWU1 + elim (IHVW … HV0 … HK12) -K2 // #X #HVX #_ -W + @(ex2_intro … U1) /3 width=6 by lstas_cast, lstas_ldef/ (**) (* full auto too slow *) + @cpcs_cprs_sn @(cprs_delta … HLK1 … HWU1) + /4 width=2 by cprs_strap1, cpr_cprs, lstas_cpr, cpr_eps/ + ] +| #G #L2 #K2 #V #W #U #i #d2 #HLK2 #_ #HWU #IHVW #d1 #Hd21 #Hd1 #L1 #HL12 + elim (da_inv_lref … Hd1) -Hd1 * #K0 #V0 [| #d0 ] #HK0 #HV0 [| #H1 ] + lapply (drop_mono … HK0 … HLK2) -HK0 #H2 destruct + lapply (le_plus_to_le_r … Hd21) -Hd21 #Hd21 + elim (lsubsv_drop_O1_trans … HL12 … HLK2) -L2 #Y #H #HLK1 + elim (lsubsv_inv_pair2 … H) -H * #K1 + [ #HK12 #H destruct + elim (IHVW … Hd21 HV0 … HK12) -K2 -Hd21 #X + lapply (drop_fwd_drop2 … HLK1) + elim (lift_total X 0 (i+1)) + /3 width=12 by lstas_succ, cpcs_lift, ex2_intro/ + | #V1 #d1 #H0 #_ #HV1 #HV #HK12 #_ #H destruct + lapply (da_mono … HV0 … HV) -HV #H destruct + elim (shnv_inv_cast … H0) -H0 #_ #_ #H + lapply (H … Hd21) -H #HVV1 + elim (IHVW … Hd21 HV0 … HK12) -K2 -Hd21 #X #HVX #HXW + elim (da_lstas … HV1 (d2+1)) -HV1 #X1 #HVX1 #_ + lapply (scpes_inv_lstas_eq … HVV1 … HVX … HVX1) -HVV1 -HVX #HXX1 + lapply (cpcs_canc_sn … HXX1 … HXW) -X + elim (lift_total X1 0 (i+1)) + lapply (drop_fwd_drop2 … HLK1) + /4 width=12 by cpcs_lift, lstas_cast, lstas_ldef, ex2_intro/ + ] +| #a #I #G #L2 #V2 #T2 #U2 #d1 #_ #IHTU2 #d2 #Hd12 #Hd2 #L1 #HL12 + lapply (da_inv_bind … Hd2) -Hd2 #Hd2 + elim (IHTU2 … Hd2 (L1.ⓑ{I}V2) …) + /3 width=3 by lsubsv_pair, lstas_bind, cpcs_bind_dx, ex2_intro/ +| #G #L2 #V2 #T2 #U2 #d1 #_ #IHTU2 #d2 #Hd12 #Hd2 #L1 #HL12 + lapply (da_inv_flat … Hd2) -Hd2 #Hd2 + elim (IHTU2 … Hd2 … HL12) -L2 + /3 width=5 by lstas_appl, cpcs_flat, ex2_intro/ +| #G #L2 #W2 #T2 #U2 #d1 #_ #IHTU2 #d2 #Hd12 #Hd2 #L1 #HL12 + lapply (da_inv_flat … Hd2) -Hd2 #Hd2 + elim (IHTU2 … Hd2 … HL12) -L2 + /3 width=3 by lstas_cast, ex2_intro/ +] +qed-. + +lemma lsubsv_sta_trans: ∀h,g,G,L2,T,U2. ⦃G, L2⦄ ⊢ T •*[h, 1] U2 → + ∀d. ⦃G, L2⦄ ⊢ T ▪[h, g] d+1 → + ∀L1. G ⊢ L1 ⫃¡[h, g] L2 → + ∃∃U1. ⦃G, L1⦄ ⊢ T •*[h, 1] U1 & ⦃G, L1⦄ ⊢ U1 ⬌* U2. +/2 width=7 by lsubsv_lstas_trans/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_lsuba.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_lsuba.ma new file mode 100644 index 000000000..c157c756e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_lsuba.ma @@ -0,0 +1,32 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/equivalence/scpes_aaa.ma". +include "basic_2A/dynamic/snv_aaa.ma". +include "basic_2A/dynamic/lsubsv.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************) + +(* Forward lemmas on lenv refinement for atomic arity assignment ************) + +lemma lsubsv_fwd_lsuba: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → G ⊢ L1 ⫃⁝ L2. +#h #g #G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsuba_pair/ +#L1 #L2 #W #V #d1 #H #_ #_ #_ #_ #IHL12 +elim (shnv_inv_cast … H) -H #HW #HV #H +lapply (H 0 ?) // -d1 #HWV +elim (snv_fwd_aaa … HW) -HW #B #HW +elim (snv_fwd_aaa … HV) -HV #A #HV +lapply (scpes_aaa_mono … HWV … HW … HV) #H destruct +/4 width=5 by lsuba_aaa_conf, lsuba_beta, aaa_cast/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_lsubd.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_lsubd.ma new file mode 100644 index 000000000..a7d356199 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_lsubd.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/lsubd.ma". +include "basic_2A/dynamic/lsubsv.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************) + +(* Forward lemmas on lenv refinement for degree assignment ******************) + +lemma lsubsv_fwd_lsubd: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → G ⊢ L1 ⫃▪[h, g] L2. +#h #g #G #L1 #L2 #H elim H -L1 -L2 /2 width=3 by lsubd_pair, lsubd_beta/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_scpds.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_scpds.ma new file mode 100644 index 000000000..c079da445 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_scpds.ma @@ -0,0 +1,32 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/lsubd_da.ma". +include "basic_2A/dynamic/lsubsv_lsubd.ma". +include "basic_2A/dynamic/lsubsv_lstas.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************) + +(* Properties on decomposed extended parallel computation on terms **********) + +lemma lsubsv_scpds_trans: ∀h,g,G,L2,T1,T2,d. ⦃G, L2⦄ ⊢ T1 •*➡*[h, g, d] T2 → + ∀L1. G ⊢ L1 ⫃¡[h, g] L2 → + ∃∃T. ⦃G, L1⦄ ⊢ T1 •*➡*[h, g, d] T & ⦃G, L1⦄ ⊢ T2 ➡* T. +#h #g #G #L2 #T1 #T2 #d2 * #T #d1 #Hd21 #Hd1 #HT1 #HT2 #L1 #HL12 +lapply (lsubsv_cprs_trans … HL12 … HT2) -HT2 #HT2 +elim (lsubsv_lstas_trans … HT1 … Hd1 … HL12) // #T0 #HT10 #HT0 +lapply (cpcs_cprs_strap1 … HT0 … HT2) -T #HT02 +elim (cpcs_inv_cprs … HT02) -HT02 +/5 width=5 by lsubsv_fwd_lsubd, lsubd_da_trans, ex4_2_intro, ex2_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_snv.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_snv.ma new file mode 100644 index 000000000..d7be376b3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_snv.ma @@ -0,0 +1,44 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/dynamic/lsubsv_scpds.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************) + +(* Properties concerning stratified native validity *************************) + +lemma lsubsv_snv_trans: ∀h,g,G,L2,T. ⦃G, L2⦄ ⊢ T ¡[h, g] → + ∀L1. G ⊢ L1 ⫃¡[h, g] L2 → ⦃G, L1⦄ ⊢ T ¡[h, g]. +#h #g #G #L2 #T #H elim H -G -L2 -T // +[ #I #G #L2 #K2 #V #i #HLK2 #_ #IHV #L1 #HL12 + elim (lsubsv_drop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1 + elim (lsubsv_inv_pair2 … H) -H * #K1 + [ #HK12 #H destruct /3 width=5 by snv_lref/ + | #W #d #HVW #_ #_ #_ #_ #H1 #H2 destruct -IHV + /3 width=6 by shnv_inv_snv, snv_lref/ + ] +| #a #I #G #L2 #V #T #_ #_ #IHV #IHT #L1 #HL12 destruct + /4 width=1 by snv_bind, lsubsv_pair/ +| #a #G #L2 #V #W0 #T #U0 #d #_ #_ #HVW0 #HTU0 #IHV #IHT #L1 #HL12 + elim (lsubsv_scpds_trans … HVW0 … HL12) -HVW0 #V0 #HV0 #HWV0 + elim (lsubsv_scpds_trans … HTU0 … HL12) -HTU0 #X #HT0 #H + elim (cprs_inv_abst1 … H) -H #W #T0 #HW0 #_ #H destruct + elim (cprs_conf … HWV0 … HW0) -W0 + /4 width=10 by snv_appl, scpds_cprs_trans, cprs_bind/ +| #G #L2 #U #T #U0 #_ #_ #HU0 #HTU0 #IHU #IHT #L1 #HL12 + elim (lsubsv_scpds_trans … HTU0 … HL12) -HTU0 #X0 #HTX0 #H1 + elim (lsubsv_scpds_trans … HU0 … HL12) -HU0 #X #HUX #H2 + elim (cprs_conf … H1 … H2) -U0 /3 width=5 by snv_cast, scpds_cprs_trans/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/shnv.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/shnv.ma new file mode 100644 index 000000000..1c0bf77b5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/shnv.ma @@ -0,0 +1,55 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/nativevalid_6.ma". +include "basic_2A/equivalence/scpes.ma". +include "basic_2A/dynamic/snv.ma". + +(* STRATIFIED HIGHER NATIVE VALIDITY FOR TERMS ******************************) + +inductive shnv (h) (g) (d1) (G) (L): predicate term ≝ +| shnv_cast: ∀U,T. ⦃G, L⦄ ⊢ U ¡[h, g] → ⦃G, L⦄ ⊢ T ¡[h, g] → + (∀d2. d2 ≤ d1 → ⦃G, L⦄ ⊢ U •*⬌*[h, g, d2, d2+1] T) → + shnv h g d1 G L (ⓝU.T) +. + +interpretation "stratified higher native validity (term)" + 'NativeValid h g d G L T = (shnv h g d G L T). + +(* Basic inversion lemmas ***************************************************) + +fact shnv_inv_cast_aux: ∀h,g,G,L,X,d1. ⦃G, L⦄ ⊢ X ¡[h, g, d1] → ∀U,T. X = ⓝU.T → + ∧∧ ⦃G, L⦄ ⊢ U ¡[h, g] & ⦃G, L⦄ ⊢ T ¡[h, g] + & (∀d2. d2 ≤ d1 → ⦃G, L⦄ ⊢ U •*⬌*[h, g, d2, d2+1] T). +#h #g #G #L #X #d1 * -X +#U #T #HU #HT #HUT #U1 #T1 #H destruct /3 width=1 by and3_intro/ +qed-. + +lemma shnv_inv_cast: ∀h,g,G,L,U,T,d1. ⦃G, L⦄ ⊢ ⓝU.T ¡[h, g, d1] → + ∧∧ ⦃G, L⦄ ⊢ U ¡[h, g] & ⦃G, L⦄ ⊢ T ¡[h, g] + & (∀d2. d2 ≤ d1 → ⦃G, L⦄ ⊢ U •*⬌*[h, g, d2, d2+1] T). +/2 width=3 by shnv_inv_cast_aux/ qed-. + +lemma shnv_inv_snv: ∀h,g,G,L,T,d. ⦃G, L⦄ ⊢ T ¡[h, g, d] → ⦃G, L⦄ ⊢ T ¡[h, g]. +#h #g #G #L #T #d * -T +#U #T #HU #HT #HUT elim (HUT 0) -HUT /2 width=3 by snv_cast/ +qed-. + +(* Basic properties *********************************************************) + +lemma snv_shnv_cast: ∀h,g,G,L,U,T. ⦃G, L⦄ ⊢ ⓝU.T ¡[h, g] → ⦃G, L⦄ ⊢ ⓝU.T ¡[h, g, 0]. +#h #g #G #L #U #T #H elim (snv_inv_cast … H) -H +#U0 #HU #HT #HU0 #HTU0 @shnv_cast // -HU -HT +#d #H <(le_n_O_to_eq … H) -d /2 width=3 by scpds_div/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv.ma new file mode 100644 index 000000000..0e420b1e1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv.ma @@ -0,0 +1,111 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/nativevalid_5.ma". +include "basic_2A/computation/scpds.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* activate genv *) +inductive snv (h) (g): relation3 genv lenv term ≝ +| snv_sort: ∀G,L,k. snv h g G L (⋆k) +| snv_lref: ∀I,G,L,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → snv h g G K V → snv h g G L (#i) +| snv_bind: ∀a,I,G,L,V,T. snv h g G L V → snv h g G (L.ⓑ{I}V) T → snv h g G L (ⓑ{a,I}V.T) +| snv_appl: ∀a,G,L,V,W0,T,U0,d. snv h g G L V → snv h g G L T → + ⦃G, L⦄ ⊢ V •*➡*[h, g, 1] W0 → ⦃G, L⦄ ⊢ T •*➡*[h, g, d] ⓛ{a}W0.U0 → snv h g G L (ⓐV.T) +| snv_cast: ∀G,L,U,T,U0. snv h g G L U → snv h g G L T → + ⦃G, L⦄ ⊢ U •*➡*[h, g, 0] U0 → ⦃G, L⦄ ⊢ T •*➡*[h, g, 1] U0 → snv h g G L (ⓝU.T) +. + +interpretation "stratified native validity (term)" + 'NativeValid h g G L T = (snv h g G L T). + +(* Basic inversion lemmas ***************************************************) + +fact snv_inv_lref_aux: ∀h,g,G,L,X. ⦃G, L⦄ ⊢ X ¡[h, g] → ∀i. X = #i → + ∃∃I,K,V. ⬇[i] L ≡ K.ⓑ{I}V & ⦃G, K⦄ ⊢ V ¡[h, g]. +#h #g #G #L #X * -G -L -X +[ #G #L #k #i #H destruct +| #I #G #L #K #V #i0 #HLK #HV #i #H destruct /2 width=5 by ex2_3_intro/ +| #a #I #G #L #V #T #_ #_ #i #H destruct +| #a #G #L #V #W0 #T #U0 #d #_ #_ #_ #_ #i #H destruct +| #G #L #U #T #U0 #_ #_ #_ #_ #i #H destruct +] +qed-. + +lemma snv_inv_lref: ∀h,g,G,L,i. ⦃G, L⦄ ⊢ #i ¡[h, g] → + ∃∃I,K,V. ⬇[i] L ≡ K.ⓑ{I}V & ⦃G, K⦄ ⊢ V ¡[h, g]. +/2 width=3 by snv_inv_lref_aux/ qed-. + +fact snv_inv_gref_aux: ∀h,g,G,L,X. ⦃G, L⦄ ⊢ X ¡[h, g] → ∀p. X = §p → ⊥. +#h #g #G #L #X * -G -L -X +[ #G #L #k #p #H destruct +| #I #G #L #K #V #i #_ #_ #p #H destruct +| #a #I #G #L #V #T #_ #_ #p #H destruct +| #a #G #L #V #W0 #T #U0 #d #_ #_ #_ #_ #p #H destruct +| #G #L #U #T #U0 #_ #_ #_ #_ #p #H destruct +] +qed-. + +lemma snv_inv_gref: ∀h,g,G,L,p. ⦃G, L⦄ ⊢ §p ¡[h, g] → ⊥. +/2 width=8 by snv_inv_gref_aux/ qed-. + +fact snv_inv_bind_aux: ∀h,g,G,L,X. ⦃G, L⦄ ⊢ X ¡[h, g] → ∀a,I,V,T. X = ⓑ{a,I}V.T → + ⦃G, L⦄ ⊢ V ¡[h, g] ∧ ⦃G, L.ⓑ{I}V⦄ ⊢ T ¡[h, g]. +#h #g #G #L #X * -G -L -X +[ #G #L #k #b #Z #X1 #X2 #H destruct +| #I #G #L #K #V #i #_ #_ #b #Z #X1 #X2 #H destruct +| #a #I #G #L #V #T #HV #HT #b #Z #X1 #X2 #H destruct /2 width=1 by conj/ +| #a #G #L #V #W0 #T #U0 #d #_ #_ #_ #_ #b #Z #X1 #X2 #H destruct +| #G #L #U #T #U0 #_ #_ #_ #_ #b #Z #X1 #X2 #H destruct +] +qed-. + +lemma snv_inv_bind: ∀h,g,a,I,G,L,V,T. ⦃G, L⦄ ⊢ ⓑ{a,I}V.T ¡[h, g] → + ⦃G, L⦄ ⊢ V ¡[h, g] ∧ ⦃G, L.ⓑ{I}V⦄ ⊢ T ¡[h, g]. +/2 width=4 by snv_inv_bind_aux/ qed-. + +fact snv_inv_appl_aux: ∀h,g,G,L,X. ⦃G, L⦄ ⊢ X ¡[h, g] → ∀V,T. X = ⓐV.T → + ∃∃a,W0,U0,d. ⦃G, L⦄ ⊢ V ¡[h, g] & ⦃G, L⦄ ⊢ T ¡[h, g] & + ⦃G, L⦄ ⊢ V •*➡*[h, g, 1] W0 & ⦃G, L⦄ ⊢ T •*➡*[h, g, d] ⓛ{a}W0.U0. +#h #g #G #L #X * -L -X +[ #G #L #k #X1 #X2 #H destruct +| #I #G #L #K #V #i #_ #_ #X1 #X2 #H destruct +| #a #I #G #L #V #T #_ #_ #X1 #X2 #H destruct +| #a #G #L #V #W0 #T #U0 #d #HV #HT #HVW0 #HTU0 #X1 #X2 #H destruct /2 width=6 by ex4_4_intro/ +| #G #L #U #T #U0 #_ #_ #_ #_ #X1 #X2 #H destruct +] +qed-. + +lemma snv_inv_appl: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ⓐV.T ¡[h, g] → + ∃∃a,W0,U0,d. ⦃G, L⦄ ⊢ V ¡[h, g] & ⦃G, L⦄ ⊢ T ¡[h, g] & + ⦃G, L⦄ ⊢ V •*➡*[h, g, 1] W0 & ⦃G, L⦄ ⊢ T •*➡*[h, g, d] ⓛ{a}W0.U0. +/2 width=3 by snv_inv_appl_aux/ qed-. + +fact snv_inv_cast_aux: ∀h,g,G,L,X. ⦃G, L⦄ ⊢ X ¡[h, g] → ∀U,T. X = ⓝU.T → + ∃∃U0. ⦃G, L⦄ ⊢ U ¡[h, g] & ⦃G, L⦄ ⊢ T ¡[h, g] & + ⦃G, L⦄ ⊢ U •*➡*[h, g, 0] U0 & ⦃G, L⦄ ⊢ T •*➡*[h, g, 1] U0. +#h #g #G #L #X * -G -L -X +[ #G #L #k #X1 #X2 #H destruct +| #I #G #L #K #V #i #_ #_ #X1 #X2 #H destruct +| #a #I #G #L #V #T #_ #_ #X1 #X2 #H destruct +| #a #G #L #V #W0 #T #U0 #d #_ #_ #_ #_ #X1 #X2 #H destruct +| #G #L #U #T #U0 #HV #HT #HU0 #HTU0 #X1 #X2 #H destruct /2 width=3 by ex4_intro/ +] +qed-. + +lemma snv_inv_cast: ∀h,g,G,L,U,T. ⦃G, L⦄ ⊢ ⓝU.T ¡[h, g] → + ∃∃U0. ⦃G, L⦄ ⊢ U ¡[h, g] & ⦃G, L⦄ ⊢ T ¡[h, g] & + ⦃G, L⦄ ⊢ U •*➡*[h, g, 0] U0 & ⦃G, L⦄ ⊢ T •*➡*[h, g, 1] U0. +/2 width=3 by snv_inv_cast_aux/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_aaa.ma new file mode 100644 index 000000000..8c8144b8b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_aaa.ma @@ -0,0 +1,50 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/da_aaa.ma". +include "basic_2A/computation/scpds_aaa.ma". +include "basic_2A/dynamic/snv.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* Forward lemmas on atomic arity assignment for terms **********************) + +lemma snv_fwd_aaa: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ¡[h, g] → ∃A. ⦃G, L⦄ ⊢ T ⁝ A. +#h #g #G #L #T #H elim H -G -L -T +[ /2 width=2 by aaa_sort, ex_intro/ +| #I #G #L #K #V #i #HLK #_ * /3 width=6 by aaa_lref, ex_intro/ +| #a * #G #L #V #T #_ #_ * #B #HV * #A #HA /3 width=2 by aaa_abbr, aaa_abst, ex_intro/ +| #a #G #L #V #W0 #T #U0 #d #_ #_ #HVW0 #HTU0 * #B #HV * #X #HT + lapply (scpds_aaa_conf … HV … HVW0) -HVW0 #HW0 + lapply (scpds_aaa_conf … HT … HTU0) -HTU0 #H + elim (aaa_inv_abst … H) -H #B0 #A #H1 #HU #H2 destruct + lapply (aaa_mono … H1 … HW0) -W0 #H destruct /3 width=4 by aaa_appl, ex_intro/ +| #G #L #U #T #U0 #_ #_ #HU0 #HTU0 * #B #HU * #A #HT + lapply (scpds_aaa_conf … HU … HU0) -HU0 #HU0 + lapply (scpds_aaa_conf … HT … HTU0) -HTU0 #H + lapply (aaa_mono … H … HU0) -U0 #H destruct /3 width=3 by aaa_cast, ex_intro/ +] +qed-. + +(* Advanced forward lemmas **************************************************) + +lemma snv_fwd_da: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ¡[h, g] → ∃d. ⦃G, L⦄ ⊢ T ▪[h, g] d. +#h #g #G #L #T #H elim (snv_fwd_aaa … H) -H /2 width=2 by aaa_da/ +qed-. + +lemma snv_fwd_lstas: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ¡[h, g] → + ∀d. ∃U. ⦃G, L⦄ ⊢ T •*[h, d] U. +#h #g #G #L #T #H #d elim (snv_fwd_aaa … H) -H +#A #HT elim (aaa_lstas h … HT d) -HT /2 width=2 by ex_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_da_lpr.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_da_lpr.ma new file mode 100644 index 000000000..2c2ecce85 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_da_lpr.ma @@ -0,0 +1,92 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/lsubd_da.ma". +include "basic_2A/dynamic/snv_aaa.ma". +include "basic_2A/dynamic/snv_scpes.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* Properties on degree assignment for terms ********************************) + +fact da_cpr_lpr_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_lstas h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + ∀G1,L1,T1. G0 = G1 → L0 = L1 → T0 = T1 → IH_da_cpr_lpr h g G1 L1 T1. +#h #g #G0 #L0 #T0 #IH3 #IH2 #IH1 #G1 #L1 * * [|||| * ] +[ #k #_ #_ #_ #_ #d #H2 #X3 #H3 #L2 #_ -IH3 -IH2 -IH1 + lapply (da_inv_sort … H2) -H2 + lapply (cpr_inv_sort1 … H3) -H3 #H destruct /2 width=1 by da_sort/ +| #i #HG0 #HL0 #HT0 #H1 #d #H2 #X3 #H3 #L2 #HL12 destruct -IH3 -IH2 + elim (snv_inv_lref … H1) -H1 #I0 #K0 #X0 #H #HX0 + elim (da_inv_lref … H2) -H2 * #K1 [ #V1 | #W1 #d1 ] #HLK1 [ #HV1 | #HW1 #H ] destruct + lapply (drop_mono … H … HLK1) -H #H destruct + elim (cpr_inv_lref1 … H3) -H3 + [1,3: #H destruct + lapply (fqup_lref … G1 … HLK1) + elim (lpr_drop_conf … HLK1 … HL12) -HLK1 -HL12 #X #H #HLK2 + elim (lpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct + /4 width=10 by da_ldef, da_ldec, fqup_fpbg/ + |2,4: * #K0 #V0 #W0 #H #HVW0 #HW0 + lapply (drop_mono … H … HLK1) -H #H destruct + lapply (fqup_lref … G1 … HLK1) + elim (lpr_drop_conf … HLK1 … HL12) -HLK1 -HL12 #X #H #HLK2 + elim (lpr_inv_pair1 … H) -H #K2 #V2 #HK12 #_ #H destruct + lapply (drop_fwd_drop2 … HLK2) -V2 + /4 width=8 by da_lift, fqup_fpbg/ + ] +| #p #_ #_ #HT0 #H1 destruct -IH3 -IH2 -IH1 + elim (snv_inv_gref … H1) +| #a #I #V1 #T1 #HG0 #HL0 #HT0 #H1 #d #H2 #X3 #H3 #L2 #HL12 destruct -IH2 + elim (snv_inv_bind … H1) -H1 #_ #HT1 + lapply (da_inv_bind … H2) -H2 + elim (cpr_inv_bind1 … H3) -H3 * + [ #V2 #T2 #HV12 #HT12 #H destruct + /4 width=9 by da_bind, fqup_fpbg, lpr_pair/ + | #T2 #HT12 #HT2 #H1 #H2 destruct + /4 width=11 by da_inv_lift, fqup_fpbg, lpr_pair, drop_drop/ + ] +| #V1 #T1 #HG0 #HL0 #HT0 #H1 #d #H2 #X3 #H3 #L2 #HL12 destruct + elim (snv_inv_appl … H1) -H1 #b1 #W1 #U1 #d1 #HV1 #HT1 #HVW1 #HTU1 + lapply (da_inv_flat … H2) -H2 #Hd + elim (cpr_inv_appl1 … H3) -H3 * + [ #V2 #T2 #HV12 #HT12 #H destruct -IH3 -IH2 /4 width=7 by da_flat, fqup_fpbg/ + | #b #V2 #W #W2 #U #U2 #HV12 #HW2 #HU2 #H1 #H2 destruct + elim (snv_inv_bind … HT1) -HT1 #HW #HU + lapply (da_inv_bind … Hd) -Hd #Hd + elim (scpds_inv_abst1 … HTU1) -HTU1 #W3 #U3 #HW3 #_ #H destruct -U3 -d1 + elim (snv_fwd_da … HV1) #d1 #Hd1 + elim (snv_fwd_da … HW) #d0 #Hd0 + lapply (cprs_scpds_div … HW3 … Hd0 … 1 HVW1) -W3 #H + elim (da_scpes_aux … IH3 IH2 IH1 … Hd0 … Hd1 … H) -IH3 -IH2 -H /2 width=1 by fqup_fpbg/ #_ #H1 + (plus_minus_m_m d1 1) in Hd1; // -H1 #Hd1 + lapply (IH1 … HV1 … Hd1 … HV12 … HL12) -HV1 -Hd1 -HV12 [ /2 by fqup_fpbg/ ] + lapply (IH1 … Hd0 … HW2 … HL12) -Hd0 /2 width=1 by fqup_fpbg/ -HW + lapply (IH1 … HU … Hd … HU2 (L2.ⓛW2) ?) -IH1 -HU -Hd -HU2 [1,2: /2 by fqup_fpbg, lpr_pair/ ] -HL12 -HW2 + /4 width=6 by da_bind, lsubd_da_trans, lsubd_beta/ + | #b #V0 #V2 #W #W2 #U #U2 #HV10 #HV02 #HW2 #HU2 #H1 #H2 destruct -IH3 -IH2 -b1 -V0 -W1 -U1 -d1 -HV1 + elim (snv_inv_bind … HT1) -HT1 #_ + lapply (da_inv_bind … Hd) -Hd + /5 width=9 by da_bind, da_flat, fqup_fpbg, lpr_pair/ + ] +| #W1 #T1 #HG0 #HL0 #HT0 #H1 #d #H2 #X3 #H3 #L2 #HL12 destruct -IH3 -IH2 + elim (snv_inv_cast … H1) -H1 #U1 #HW1 #HT1 #HWU1 #HTU1 + lapply (da_inv_flat … H2) -H2 #Hd + elim (cpr_inv_cast1 … H3) -H3 + [ * #W2 #T2 #HW12 #HT12 #H destruct /4 width=7 by da_flat, fqup_fpbg/ + | /3 width=7 by fqup_fpbg/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_fsb.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_fsb.ma new file mode 100644 index 000000000..41ff4103f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_fsb.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/fsb_aaa.ma". +include "basic_2A/dynamic/snv_aaa.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* forward lemmas on "qrst" strongly normalizing closures *********************) + +lemma snv_fwd_fsb: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ¡[h, g] → ⦥[h, g] ⦃G, L, T⦄. +#h #g #G #L #T #H elim (snv_fwd_aaa … H) -H /2 width=2 by aaa_fsb/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lift.ma new file mode 100644 index 000000000..469484be8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lift.ma @@ -0,0 +1,117 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/fqus_alt.ma". +include "basic_2A/computation/scpds_lift.ma". +include "basic_2A/dynamic/snv.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* Relocation properties ****************************************************) + +lemma snv_lift: ∀h,g,G,K,T. ⦃G, K⦄ ⊢ T ¡[h, g] → ∀L,s,l,m. ⬇[s, l, m] L ≡ K → + ∀U. ⬆[l, m] T ≡ U → ⦃G, L⦄ ⊢ U ¡[h, g]. +#h #g #G #K #T #H elim H -G -K -T +[ #G #K #k #L #s #l #m #_ #X #H + >(lift_inv_sort1 … H) -X -K -l -m // +| #I #G #K #K0 #V #i #HK0 #_ #IHV #L #s #l #m #HLK #X #H + elim (lift_inv_lref1 … H) * #Hil #H destruct + [ elim (drop_trans_le … HLK … HK0) -K /2 width=2 by lt_to_le/ #X #HL0 #H + elim (drop_inv_skip2 … H) -H /2 width=1 by lt_plus_to_minus_r/ -Hil #L0 #W #HLK0 #HVW #H destruct + /3 width=9 by snv_lref/ + | lapply (drop_trans_ge … HLK … HK0 ?) -K + /3 width=9 by snv_lref, drop_inv_gen/ + ] +| #a #I #G #K #V #T #_ #_ #IHV #IHT #L #s #l #m #HLK #X #H + elim (lift_inv_bind1 … H) -H #W #U #HVW #HTU #H destruct + /4 width=5 by snv_bind, drop_skip/ +| #a #G #K #V #W0 #T #U0 #d #_ #_ #HVW0 #HTU0 #IHV #IHT #L #s #l #m #HLK #X #H + elim (lift_inv_flat1 … H) -H #W #U #HVW #HTU #H destruct + elim (lift_total W0 l m) + elim (lift_total U0 (l+1) m) + /4 width=17 by snv_appl, scpds_lift, lift_bind/ +| #G #K #V #T #U0 #_ #_ #HVU0 #HTU0 #IHV #IHT #L #s #l #m #HLK #X #H + elim (lift_inv_flat1 … H) -H #W #U #HVW #HTU #H destruct + elim (lift_total U0 l m) + /3 width=12 by snv_cast, scpds_lift/ +] +qed. + +lemma snv_inv_lift: ∀h,g,G,L,U. ⦃G, L⦄ ⊢ U ¡[h, g] → ∀K,s,l,m. ⬇[s, l, m] L ≡ K → + ∀T. ⬆[l, m] T ≡ U → ⦃G, K⦄ ⊢ T ¡[h, g]. +#h #g #G #L #U #H elim H -G -L -U +[ #G #L #k #K #s #l #m #_ #X #H + >(lift_inv_sort2 … H) -X -L -l -m // +| #I #G #L #L0 #W #i #HL0 #_ #IHW #K #s #l #m #HLK #X #H + elim (lift_inv_lref2 … H) * #Hil #H destruct + [ elim (drop_conf_le … HLK … HL0) -L /2 width=2 by lt_to_le/ #X #HK0 #H + elim (drop_inv_skip1 … H) -H /2 width=1 by lt_plus_to_minus_r/ -Hil #K0 #V #HLK0 #HVW #H destruct + /3 width=12 by snv_lref/ + | lapply (drop_conf_ge … HLK … HL0 ?) -L /3 width=9 by snv_lref/ + ] +| #a #I #G #L #W #U #_ #_ #IHW #IHU #K #s #l #m #HLK #X #H + elim (lift_inv_bind2 … H) -H #V #T #HVW #HTU #H destruct + /4 width=5 by snv_bind, drop_skip/ +| #a #G #L #W #W1 #U #U1 #d #_ #_ #HW1 #HU1 #IHW #IHU #K #s #l #m #HLK #X #H + elim (lift_inv_flat2 … H) -H #V #T #HVW #HTU #H destruct + elim (scpds_inv_lift1 … HW1 … HLK … HVW) -HW1 #W0 #HW01 #HVW0 + elim (scpds_inv_lift1 … HU1 … HLK … HTU) -HU1 #X #H #HTU0 + elim (lift_inv_bind2 … H) -H #Y #U0 #HY #HU01 #H destruct + lapply (lift_inj … HY … HW01) -HY #H destruct + /3 width=6 by snv_appl/ +| #G #L #W #U #U1 #_ #_ #HWU1 #HU1 #IHW #IHU #K #s #l #m #HLK #X #H + elim (lift_inv_flat2 … H) -H #V #T #HVW #HTU #H destruct + elim (scpds_inv_lift1 … HWU1 … HLK … HVW) -HWU1 #U0 #HU01 #HVU0 + elim (scpds_inv_lift1 … HU1 … HLK … HTU) -HU1 #X #HX #HTU0 + lapply (lift_inj … HX … HU01) -HX #H destruct + /3 width=5 by snv_cast/ +] +qed-. + +(* Properties on subclosure *************************************************) + +lemma snv_fqu_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ T1 ¡[h, g] → ⦃G2, L2⦄ ⊢ T2 ¡[h, g]. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +[ #I1 #G1 #L1 #V1 #H + elim (snv_inv_lref … H) -H #I2 #L2 #V2 #H #HV2 + lapply (drop_inv_O2 … H) -H #H destruct // +|2: * +|5,6: /3 width=8 by snv_inv_lift/ +] +[1,3: #a #I #G1 #L1 #V1 #T1 #H elim (snv_inv_bind … H) -H // +|2,4: * #G1 #L1 #V1 #T1 #H + [1,3: elim (snv_inv_appl … H) -H // + |2,4: elim (snv_inv_cast … H) -H // + ] +] +qed-. + +lemma snv_fquq_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ T1 ¡[h, g] → ⦃G2, L2⦄ ⊢ T2 ¡[h, g]. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim (fquq_inv_gen … H) -H [|*] +/2 width=5 by snv_fqu_conf/ +qed-. + +lemma snv_fqup_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ T1 ¡[h, g] → ⦃G2, L2⦄ ⊢ T2 ¡[h, g]. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +/3 width=5 by fqup_strap1, snv_fqu_conf/ +qed-. + +lemma snv_fqus_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ T1 ¡[h, g] → ⦃G2, L2⦄ ⊢ T2 ¡[h, g]. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim (fqus_inv_gen … H) -H [|*] +/2 width=5 by snv_fqup_conf/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lpr.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lpr.ma new file mode 100644 index 000000000..78f7e59f8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lpr.ma @@ -0,0 +1,119 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/dynamic/snv_lift.ma". +include "basic_2A/dynamic/snv_aaa.ma". +include "basic_2A/dynamic/snv_scpes.ma". +include "basic_2A/dynamic/lsubsv_snv.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* Properties on context-free parallel reduction for local environments *****) + +fact snv_cpr_lpr_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_lstas h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_lstas_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + ∀G1,L1,T1. G0 = G1 → L0 = L1 → T0 = T1 → IH_snv_cpr_lpr h g G1 L1 T1. +#h #g #G0 #L0 #T0 #IH4 #IH3 #IH2 #IH1 #G1 #L1 * * [|||| * ] +[ #k #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #_ destruct -IH4 -IH3 -IH2 -IH1 -H1 + >(cpr_inv_sort1 … H2) -X // +| #i #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #HL12 destruct -IH4 -IH3 -IH2 + elim (snv_inv_lref … H1) -H1 #I #K1 #V1 #HLK1 #HV1 + elim (lpr_drop_conf … HLK1 … HL12) -HL12 #X #H #HLK2 + elim (lpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct + lapply (fqup_lref … G1 … HLK1) #HKL + elim (cpr_inv_lref1 … H2) -H2 + [ #H destruct -HLK1 /4 width=10 by fqup_fpbg, snv_lref/ + | * #K0 #V0 #W0 #H #HVW0 #W0 -HV12 + lapply (drop_mono … H … HLK1) -HLK1 -H #H destruct + lapply (drop_fwd_drop2 … HLK2) -HLK2 /4 width=8 by fqup_fpbg, snv_lift/ + ] +| #p #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #HL12 destruct -IH4 -IH3 -IH2 -IH1 + elim (snv_inv_gref … H1) +| #a #I #V1 #T1 #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #HL12 destruct -IH4 -IH3 -IH2 + elim (snv_inv_bind … H1) -H1 #HV1 #HT1 + elim (cpr_inv_bind1 … H2) -H2 * + [ #V2 #T2 #HV12 #HT12 #H destruct /4 width=8 by fqup_fpbg, snv_bind, lpr_pair/ + | #T2 #HT12 #HXT2 #H1 #H2 destruct -HV1 + /4 width=10 by fqup_fpbg, snv_inv_lift, lpr_pair, drop_drop/ + ] +| #V1 #T1 #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #HL12 destruct + elim (snv_inv_appl … H1) -H1 #a #W1 #U1 #d0 #HV1 #HT1 #HVW1 #HTU1 + elim (cpr_inv_appl1 … H2) -H2 * + [ #V2 #T2 #HV12 #HT12 #H destruct -IH4 + lapply (IH1 … HV12 … HL12) /2 width=1 by fqup_fpbg/ #HV2 + lapply (IH1 … HT12 … HL12) /2 width=1 by fqup_fpbg/ #HT2 + elim (scpds_cpr_lpr_aux … IH2 IH3 … HVW1 … HV12 … HL12) /2 width=1 by fqup_fpbg/ -HVW1 -HV12 #XV #HVW2 #HXV + elim (scpds_cpr_lpr_aux … IH2 IH3 … HTU1 … HT12 … HL12) /2 width=1 by fqup_fpbg/ -HTU1 -HT12 #X #HTU2 #H + elim (cprs_inv_abst1 … H) -H #XW #U2 #HXW #_ #H destruct -IH1 -IH3 -IH2 -L1 + elim (cprs_conf … HXV … HXW) -W1 #W2 #HXV #HXW + lapply (scpds_cprs_trans … HVW2 … HXV) -XV + lapply (scpds_cprs_trans … (ⓛ{a}W2.U2) … HTU2 ?) + /2 width=7 by snv_appl, cprs_bind/ + | #b #V2 #W10 #W20 #T10 #T20 #HV12 #HW120 #HT120 #H1 #H2 destruct + elim (snv_inv_bind … HT1) -HT1 #HW10 #HT10 + elim (scpds_inv_abst1 … HTU1) -HTU1 #W30 #T30 #HW130 #_ #H destruct -T30 -d0 + elim (snv_fwd_da … HV1) #d #HV1d + elim (snv_fwd_da … HW10) #d0 #HW10d + lapply (cprs_scpds_div … HW130 … HW10d … 1 HVW1) -W30 #HVW10 + elim (da_scpes_aux … IH4 IH1 IH2 … HW10d … HV1d … HVW10) /2 width=1 by fqup_fpbg/ + #_ #Hd (plus_minus_m_m d 1) in HV1d; // -Hd #HV1d + lapply (scpes_cpr_lpr_aux … IH2 IH3 … HVW10 … HW120 … HV12 … HL12) /2 width=1 by fqup_fpbg/ -HVW10 #HVW20 + lapply (IH2 … HV1d … HV12 … HL12) /2 width=1 by fqup_fpbg/ -HV1d #HV2d + lapply (IH2 … HW10d … HW120 … HL12) /2 width=1 by fqup_fpbg/ -HW10d #HW20d + lapply (IH1 … HV12 … HL12) /2 width=1 by fqup_fpbg/ #HV2 + lapply (IH1 … HW120 … HL12) /2 width=1 by fqup_fpbg/ -HW10 #HW20 + lapply (IH1 … HT10 … HT120 … (L2.ⓛW20) ?) /2 width=1 by fqup_fpbg, lpr_pair/ -HT10 #HT20 + @snv_bind /2 width=1 by snv_cast_scpes/ + @(lsubsv_snv_trans … HT20) -HT20 + @(lsubsv_beta … (d-1)) // + @shnv_cast [1,2: // ] #d0 #Hd0 + lapply (scpes_le_aux … IH4 IH1 IH2 IH3 … HW20d … HV2d … d0 … HVW20) -IH4 -IH3 -IH2 -IH1 -HW20d -HV2d -HVW20 + /3 width=5 by fpbg_fpbs_trans, fqup_fpbg, cpr_lpr_fpbs, le_S_S/ + | #b #V0 #V2 #W0 #W2 #T0 #T2 #HV10 #HV02 #HW02 #HT02 #H1 #H2 destruct -IH4 + elim (snv_inv_bind … HT1) -HT1 #HW0 #HT0 + elim (scpds_inv_abbr_abst … HTU1) -HTU1 #X #HTU0 #HX #H destruct + elim (lift_inv_bind1 … HX) -HX #W3 #U3 #HW13 #_ #H destruct + elim (scpds_cpr_lpr_aux … IH2 IH3 … HVW1 … HV10 … HL12) /2 width=1 by fqup_fpbg/ -HVW1 #XV #HXV0 #HXVW1 + elim (scpds_cpr_lpr_aux … IH2 IH3 … HTU0 … HT02 (L2.ⓓW2)) /2 width=1 by fqup_fpbg, lpr_pair/ -HTU0 #X #HXT2 #H + elim (cprs_inv_abst1 … H) -H #W #U2 #HW3 #_ #H destruct -U3 + lapply (IH1 … HW02 … HL12) /2 width=1 by fqup_fpbg/ #HW2 + lapply (IH1 … HV10 … HL12) /2 width=1 by fqup_fpbg/ #HV0 + lapply (IH1 … HT02 (L2.ⓓW2) ?) /2 width=1 by fqup_fpbg, lpr_pair/ -L1 #HT2 + lapply (snv_lift … HV0 (L2.ⓓW2) (Ⓕ) … HV02) /2 width=1 by drop_drop/ -HV0 #HV2 + elim (lift_total XV 0 1) #XW #HXVW + lapply (scpds_lift … HXV0 (L2.ⓓW2) (Ⓕ) … HV02 … HXVW) /2 width=1 by drop_drop/ -V0 #HXWV2 + lapply (cprs_lift … HXVW1 (L2.ⓓW2) (Ⓕ) … HW13 … HXVW) /2 width=1 by drop_drop/ -W1 -XV #HXW3 + elim (cprs_conf … HXW3 … HW3) -W3 #W3 #HXW3 #HW3 + lapply (scpds_cprs_trans … HXWV2 … HXW3) -XW + lapply (scpds_cprs_trans … (ⓛ{a}W3.U2) … HXT2 ?) /2 width=1 by cprs_bind/ -W + /3 width=6 by snv_appl, snv_bind/ + ] +| #W1 #T1 #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #HL12 destruct -IH4 + elim (snv_inv_cast … H1) -H1 #U1 #HW1 #HT1 #HWU1 #HTU1 + elim (cpr_inv_cast1 … H2) -H2 + [ * #W2 #T2 #HW12 #HT12 #H destruct + elim (snv_fwd_da … HW1) #d #HW1d + lapply (scpds_div … HWU1 … HTU1) -U1 -d #HWT1 + lapply (scpes_cpr_lpr_aux … IH2 IH3 … HWT1 … HW12 … HT12 … HL12) /2 width=1 by fqup_fpbg/ + lapply (IH1 … HW12 … HL12) /2 width=1 by fqup_fpbg/ + lapply (IH1 … HT12 … HL12) /2 width=1 by fqup_fpbg/ -L1 + /2 width=1 by snv_cast_scpes/ + | #H -IH3 -IH2 -HW1 -U1 + lapply (IH1 … H … HL12) /2 width=1 by fqup_fpbg/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lstas.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lstas.ma new file mode 100644 index 000000000..a60439d16 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lstas.ma @@ -0,0 +1,58 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/dynamic/snv_lift.ma". +include "basic_2A/dynamic/snv_scpes.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* Properties on nat-iterated stratified static type assignment for terms ***) + +fact snv_lstas_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_lstas_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_lstas h g G1 L1 T1) → + ∀G1,L1,T1. G0 = G1 → L0 = L1 → T0 = T1 → IH_snv_lstas h g G1 L1 T1. +#h #g #G0 #L0 #T0 #IH4 #IH3 #IH2 #IH1 #G1 #L1 * * [|||| * ] +[ #k #HG0 #HL0 #HT0 #_ #d1 #d2 #Hd21 #Hd1 #X #H2 destruct -IH4 -IH3 -IH2 -IH1 + >(lstas_inv_sort1 … H2) -X // +| #i #HG0 #HL0 #HT0 #H1 #d1 #d2 #Hd21 #Hd1 #T #H2 destruct -IH4 -IH3 -IH2 + elim (snv_inv_lref … H1) -H1 #I0 #K0 #X0 #HLK0 #HX0 + elim (da_inv_lref … Hd1) -Hd1 * #K1 [ #V1 | #W1 #d0 ] #HLK1 [ #Hd1 | #Hd0 #H ] + lapply (drop_mono … HLK0 … HLK1) -HLK0 #H0 destruct + elim (lstas_inv_lref1 … H2) -H2 * #K #Y #X [3,6: #d ] #HLK #HYX [1,2: #HXT #H0 |3,5: #HXT |4,6: #H1 #H2 ] + lapply (drop_mono … HLK … HLK1) -HLK #H destruct + [ lapply (le_plus_to_le_r … Hd21) -Hd21 #Hd21 |3: -Hd21 ] + lapply (fqup_lref … G1 … HLK1) #H + lapply (drop_fwd_drop2 … HLK1) /4 width=8 by snv_lift, snv_lref, fqup_fpbg/ +| #p #HG0 #HL0 #HT0 #H1 #d1 #d2 #Hd21 #Hd1 #X #H2 destruct -IH4 -IH3 -IH2 -IH1 + elim (snv_inv_gref … H1) +| #a #I #V1 #T1 #HG0 #HL0 #HT0 #H1 #d1 #d2 #Hd21 #Hd1 #X #H2 destruct -IH4 -IH3 -IH2 + elim (snv_inv_bind … H1) -H1 #HV1 #HT1 + lapply (da_inv_bind … Hd1) -Hd1 #Hd1 + elim (lstas_inv_bind1 … H2) -H2 #U1 #HTU1 #H destruct /4 width=8 by fqup_fpbg, snv_bind/ +| #V1 #T1 #HG0 #HL0 #HT0 #H1 #d1 #d2 #Hd21 #Hd1 #X #H2 destruct + elim (snv_inv_appl … H1) -H1 #a #W1 #U1 #d0 #HV1 #HT1 #HVW1 #HTU1 + lapply (da_inv_flat … Hd1) -Hd1 #Hd1 + elim (lstas_inv_appl1 … H2) -H2 #T0 #HT10 #H destruct + lapply (IH1 … HT1 … Hd1 … HT10) /2 width=1 by fqup_fpbg/ #HT0 + lapply (lstas_scpds_aux … IH1 IH4 IH3 IH2 … Hd1 … HT10 … HTU1) -IH4 -IH3 -IH2 -IH1 /2 width=1 by fqup_fpbg/ -T1 -d1 #H + elim (scpes_inv_abst2 … H) -H /3 width=6 by snv_appl, scpds_cprs_trans/ +| #U1 #T1 #HG0 #HL0 #HT0 #H1 #d1 #d2 #Hd21 #Hd1 #X #H2 destruct -IH4 -IH3 -IH2 + elim (snv_inv_cast … H1) -H1 + lapply (da_inv_flat … Hd1) -Hd1 + lapply (lstas_inv_cast1 … H2) -H2 /3 width=8 by fqup_fpbg/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lstas_lpr.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lstas_lpr.ma new file mode 100644 index 000000000..401234263 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lstas_lpr.ma @@ -0,0 +1,139 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/dynamic/snv_aaa.ma". +include "basic_2A/dynamic/snv_scpes.ma". +include "basic_2A/dynamic/lsubsv_lstas.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* Properties on sn parallel reduction for local environments ***************) + +fact lstas_cpr_lpr_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_lstas h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_lstas_cpr_lpr h g G1 L1 T1) → + ∀G1,L1,T1. G0 = G1 → L0 = L1 → T0 = T1 → IH_lstas_cpr_lpr h g G1 L1 T1. +#h #g #G0 #L0 #T0 #IH4 #IH3 #IH2 #IH1 #G1 #L1 * * [|||| * ] +[ #k #_ #_ #_ #_ #d1 #d2 #_ #_ #X2 #H2 #X3 #H3 #L2 #_ -IH4 -IH3 -IH2 -IH1 + >(lstas_inv_sort1 … H2) -X2 + >(cpr_inv_sort1 … H3) -X3 /2 width=3 by ex2_intro/ +| #i #HG0 #HL0 #HT0 #H1 #d1 #d2 #Hd21 #Hd1 #X2 #H2 #X3 #H3 #L2 #HL12 destruct -IH4 -IH3 + elim (snv_inv_lref … H1) -H1 #I0 #K0 #X0 #HK0 #HX0 + elim (da_inv_lref … Hd1) -Hd1 * #K1 [ #V1 | #W1 #d ] #HLK1 [ #HVd1 | #HWd1 #H destruct ] + lapply (drop_mono … HK0 … HLK1) -HK0 #H destruct + elim (lstas_inv_lref1 … H2) -H2 * #K0 #V0 #X0 [3,6: #d0 ] #HK0 #HVX0 [1,2: #HX02 #H |3,5: #HX02 |4,6: #H1 #H2 ] destruct + lapply (drop_mono … HK0 … HLK1) -HK0 #H destruct + [ lapply (le_plus_to_le_r … Hd21) -Hd21 #Hd21 |3: -Hd21 ] + lapply (fqup_lref … G1 … HLK1) #HKV1 + elim (lpr_drop_conf … HLK1 … HL12) -HL12 #X #H #HLK2 + elim (lpr_inv_pair1 … H) -H #K2 [ #W2 | #W2 | #V2 ] #HK12 [ #HW12 | #HW12 | #HV12 ] #H destruct + lapply (drop_fwd_drop2 … HLK2) #H2 + elim (cpr_inv_lref1 … H3) -H3 + [1,3,5: #H destruct -HLK1 + |2,4,6: * #K #V #X #H #HVX #HX3 + lapply (drop_mono … H … HLK1) -H -HLK1 #H destruct + ] + [ lapply (IH2 … HWd1 … HW12 … HK12) /2 width=1 by fqup_fpbg/ -IH2 #H + elim (da_lstas … H d0) -H + elim (IH1 … HWd1 … HVX0 … HW12 … HK12) -IH1 -HVX0 /2 width=1 by fqup_fpbg/ #V2 #HWV2 #HV2 + elim (lift_total V2 0 (i+1)) + /3 width=12 by cpcs_lift, lstas_succ, ex2_intro/ + | elim (IH1 … HWd1 … HVX0 … HW12 … HK12) -IH1 -HVX0 + /3 width=5 by fqup_fpbg, lstas_zero, ex2_intro/ + | elim (IH1 … HVd1 … HVX0 … HV12 … HK12) -IH1 -HVd1 -HVX0 -HV12 -HK12 -IH2 /2 width=1 by fqup_fpbg/ #W2 #HVW2 #HW02 + elim (lift_total W2 0 (i+1)) + /4 width=12 by cpcs_lift, lstas_ldef, ex2_intro/ + | elim (IH1 … HVd1 … HVX0 … HVX … HK12) -IH1 -HVd1 -HVX0 -HVX -HK12 -IH2 -V2 /2 width=1 by fqup_fpbg/ -d1 #W2 #HXW2 #HW02 + elim (lift_total W2 0 (i+1)) + /3 width=12 by cpcs_lift, lstas_lift, ex2_intro/ + ] +| #p #_ #_ #HT0 #H1 destruct -IH4 -IH3 -IH2 -IH1 + elim (snv_inv_gref … H1) +| #a #I #V1 #T1 #HG0 #HL0 #HT0 #H1 #d1 #d2 #Hd21 #Hd1 #X2 #H2 #X3 #H3 #L2 #HL12 destruct -IH4 -IH3 -IH2 + elim (snv_inv_bind … H1) -H1 #_ #HT1 + lapply (da_inv_bind … Hd1) -Hd1 #Hd1 + elim (lstas_inv_bind1 … H2) -H2 #U1 #HTU1 #H destruct + elim (cpr_inv_bind1 … H3) -H3 * + [ #V2 #T2 #HV12 #HT12 #H destruct + elim (IH1 … Hd1 … HTU1 … HT12 (L2.ⓑ{I}V2)) -IH1 -Hd1 -HTU1 -HT12 /2 width=1 by fqup_fpbg, lpr_pair/ -T1 + /4 width=5 by cpcs_bind2, lpr_cpr_conf, lstas_bind, ex2_intro/ + | #T3 #HT13 #HXT3 #H1 #H2 destruct + elim (IH1 … Hd1 … HTU1 … HT13 (L2.ⓓV1)) -IH1 -Hd1 -HTU1 -HT13 /2 width=1 by fqup_fpbg, lpr_pair/ -T1 -HL12 #U3 #HTU3 #HU13 + elim (lstas_inv_lift1 … HTU3 L2 … HXT3) -T3 + /5 width=8 by cpcs_cpr_strap1, cpcs_bind1, cpr_zeta, drop_drop, ex2_intro/ + ] +| #V1 #T1 #HG0 #HL0 #HT0 #H1 #d1 #d2 #Hd21 #Hd1 #X2 #H2 #X3 #H3 #L2 #HL12 destruct + elim (snv_inv_appl … H1) -H1 #a #W1 #U1 #d0 #HV1 #HT1 #HVW1 #HTU1 + lapply (da_inv_flat … Hd1) -Hd1 #Hd1 + elim (lstas_inv_appl1 … H2) -H2 #X #HT1U #H destruct + elim (cpr_inv_appl1 … H3) -H3 * + [ #V2 #T2 #HV12 #HT12 #H destruct -a -d0 -W1 -U1 -HV1 -IH4 -IH3 -IH2 + elim (IH1 … Hd1 … HT1U … HT12 … HL12) -IH1 -Hd1 -HT1U + /4 width=5 by fqup_fpbg, cpcs_flat, lpr_cpr_conf, lstas_appl, ex2_intro/ + | #b #V2 #W2 #W3 #T2 #T3 #HV12 #HW23 #HT23 #H1 #H2 destruct + elim (snv_inv_bind … HT1) -HT1 #HW2 #HT2 + lapply (da_inv_bind … Hd1) -Hd1 #Hd1 + elim (lstas_inv_bind1 … HT1U) -HT1U #U #HT2U #H destruct + elim (scpds_inv_abst1 … HTU1) -HTU1 #W0 #U0 #HW20 #_ #H destruct -U0 -d0 + elim (snv_fwd_da … HW2) #d0 #HW2d + lapply (cprs_scpds_div … HW20 … HW2d … HVW1) -W0 #H21 + elim (snv_fwd_da … HV1) #d #HV1d + elim (da_scpes_aux … IH4 IH3 IH2 … HW2d … HV1d … H21) /2 width=1 by fqup_fpbg/ #_ #H + (plus_minus_m_m d 1) in HV1d; // -H #HV1d + lapply (scpes_cpr_lpr_aux … IH2 IH1 … H21 … HW23 … HV12 … HL12) -H21 /2 width=1 by fqup_fpbg/ #H32 + lapply (IH3 … HW23 … HL12) /2 width=1 by fqup_fpbg/ #HW3 + lapply (IH3 … HV12 … HL12) /2 width=1 by fqup_fpbg/ #HV2 + lapply (IH2 … HW2d … HW23 … HL12) /2 width=1 by fqup_fpbg/ -HW2 -HW2d #HW3d + lapply (IH2 … HV1d … HV12 … HL12) /2 width=1 by fqup_fpbg/ -HV1 -HV1d #HV2d + elim (IH1 … Hd1 … HT2U … HT23 (L2.ⓛW3)) -HT2U /2 width=1 by fqup_fpbg, lpr_pair/ #U3 #HTU3 #HU23 + elim (lsubsv_lstas_trans … g … HTU3 … Hd21 … (L2.ⓓⓝW3.V2)) -HTU3 + [ #U4 #HT3U4 #HU43 -IH1 -IH2 -IH3 -IH4 -d -d1 -HW3 -HV2 -HT2 + @(ex2_intro … (ⓓ{b}ⓝW3.V2.U4)) /2 width=1 by lstas_bind/ -HT3U4 + @(cpcs_canc_dx … (ⓓ{b}ⓝW3.V2.U3)) /2 width=1 by cpcs_bind_dx/ -HU43 + @(cpcs_cpr_strap1 … (ⓐV2.ⓛ{b}W3.U3)) /2 width=1 by cpr_beta/ + /4 width=3 by cpcs_flat, cpcs_bind2, lpr_cpr_conf/ + | -U3 + @(lsubsv_beta … (d-1)) /3 width=7 by fqup_fpbg/ + @shnv_cast [1,2: // ] #d0 #Hd0 + lapply (scpes_le_aux … IH4 IH3 IH2 IH1 … HW3d … HV2d … d0 … H32) -IH4 -IH3 -IH2 -IH1 -HW3d -HV2d -H32 + /3 width=5 by fpbg_fpbs_trans, fqup_fpbg, cpr_lpr_fpbs, le_S_S/ + | -IH1 -IH3 -IH4 /3 width=9 by fqup_fpbg, lpr_pair/ + ] + | #b #V0 #V2 #W0 #W2 #T0 #T2 #HV10 #HV02 #HW02 #HT02 #H1 #H2 destruct -a -d0 -W1 -HV1 -IH4 -IH3 -IH2 + elim (snv_inv_bind … HT1) -HT1 #_ #HT0 + lapply (da_inv_bind … Hd1) -Hd1 #Hd1 + elim (lstas_inv_bind1 … HT1U) -HT1U #U0 #HTU0 #H destruct + elim (IH1 … Hd1 … HTU0 … HT02 (L2.ⓓW2)) -IH1 -Hd1 -HTU0 /2 width=1 by fqup_fpbg, lpr_pair/ -T0 #U2 #HTU2 #HU02 + lapply (lpr_cpr_conf … HL12 … HV10) -HV10 #HV10 + lapply (lpr_cpr_conf … HL12 … HW02) -L1 #HW02 + lapply (cpcs_bind2 b … HW02 … HU02) -HW02 -HU02 #HU02 + lapply (cpcs_flat … HV10 … HU02 Appl) -HV10 -HU02 #HU02 + lapply (cpcs_cpr_strap1 … HU02 (ⓓ{b}W2.ⓐV2.U2) ?) + /4 width=3 by lstas_appl, lstas_bind, cpr_theta, ex2_intro/ + ] +| #W1 #T1 #HG0 #HL0 #HT0 #H1 #d1 #d2 #Hd21 #Hd1 #X2 #H2 #X3 #H3 #L2 #HL12 destruct -IH4 -IH3 -IH2 + elim (snv_inv_cast … H1) -H1 #U1 #_ #HT1 #_ #_ -U1 + lapply (da_inv_flat … Hd1) -Hd1 #Hd1 + lapply (lstas_inv_cast1 … H2) -H2 #HTU1 + elim (cpr_inv_cast1 … H3) -H3 + [ * #U2 #T2 #_ #HT12 #H destruct + elim (IH1 … Hd1 … HTU1 … HT12 … HL12) -IH1 -Hd1 -HTU1 -HL12 + /3 width=3 by fqup_fpbg, lstas_cast, ex2_intro/ + | #HT1X3 elim (IH1 … Hd1 … HTU1 … HT1X3 … HL12) -IH1 -Hd1 -HTU1 -HL12 + /2 width=3 by fqup_fpbg, ex2_intro/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_preserve.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_preserve.ma new file mode 100644 index 000000000..829e0016d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_preserve.ma @@ -0,0 +1,94 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/fsb_aaa.ma". +include "basic_2A/dynamic/snv_da_lpr.ma". +include "basic_2A/dynamic/snv_lstas.ma". +include "basic_2A/dynamic/snv_lstas_lpr.ma". +include "basic_2A/dynamic/snv_lpr.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* Main preservation properties *********************************************) + +lemma snv_preserve: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ¡[h, g] → + ∧∧ IH_da_cpr_lpr h g G L T + & IH_snv_cpr_lpr h g G L T + & IH_snv_lstas h g G L T + & IH_lstas_cpr_lpr h g G L T. +#h #g #G #L #T #HT elim (snv_fwd_aaa … HT) -HT +#A #HT @(aaa_ind_fpbg h g … HT) -G -L -T -A +#G #L #T #A #_ #IH -A @and4_intro +[ letin aux ≝ da_cpr_lpr_aux | letin aux ≝ snv_cpr_lpr_aux +| letin aux ≝ snv_lstas_aux | letin aux ≝ lstas_cpr_lpr_aux +] +@(aux … G L T) // #G0 #L0 #T0 #H elim (IH … H) -IH -H // +qed-. + +theorem da_cpr_lpr: ∀h,g,G,L,T. IH_da_cpr_lpr h g G L T. +#h #g #G #L #T #HT elim (snv_preserve … HT) /2 width=1 by/ +qed-. + +theorem snv_cpr_lpr: ∀h,g,G,L,T. IH_snv_cpr_lpr h g G L T. +#h #g #G #L #T #HT elim (snv_preserve … HT) /2 width=1 by/ +qed-. + +theorem snv_lstas: ∀h,g,G,L,T. IH_snv_lstas h g G L T. +#h #g #G #L #T #HT elim (snv_preserve … HT) /2 width=5 by/ +qed-. + +theorem lstas_cpr_lpr: ∀h,g,G,L,T. IH_lstas_cpr_lpr h g G L T. +#h #g #G #L #T #HT elim (snv_preserve … HT) /2 width=3 by/ +qed-. + +(* Advanced preservation properties *****************************************) + +lemma snv_cprs_lpr: ∀h,g,G,L1,T1. ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡* T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L2⦄ ⊢ T2 ¡[h, g]. +#h #g #G #L1 #T1 #HT1 #T2 #H +@(cprs_ind … H) -T2 /3 width=5 by snv_cpr_lpr/ +qed-. + +lemma da_cprs_lpr: ∀h,g,G,L1,T1. ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀d. ⦃G, L1⦄ ⊢ T1 ▪[h, g] d → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡* T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L2⦄ ⊢ T2 ▪[h, g] d. +#h #g #G #L1 #T1 #HT1 #d #Hd #T2 #H +@(cprs_ind … H) -T2 /3 width=6 by snv_cprs_lpr, da_cpr_lpr/ +qed-. + +lemma lstas_cprs_lpr: ∀h,g,G,L1,T1. ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀d1,d2. d2 ≤ d1 → ⦃G, L1⦄ ⊢ T1 ▪[h, g] d1 → + ∀U1. ⦃G, L1⦄ ⊢ T1 •*[h, d2] U1 → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡* T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → + ∃∃U2. ⦃G, L2⦄ ⊢ T2 •*[h, d2] U2 & ⦃G, L2⦄ ⊢ U1 ⬌* U2. +#h #g #G #L1 #T1 #HT1 #d1 #d2 #Hd21 #Hd1 #U1 #HTU1 #T2 #H +@(cprs_ind … H) -T2 [ /2 width=10 by lstas_cpr_lpr/ ] +#T #T2 #HT1T #HTT2 #IHT1 #L2 #HL12 +elim (IHT1 L1) // -IHT1 #U #HTU #HU1 +elim (lstas_cpr_lpr … g … Hd21 … HTU … HTT2 … HL12) -HTU -HTT2 +[2,3: /2 width=7 by snv_cprs_lpr, da_cprs_lpr/ ] -T1 -T -d1 +/4 width=5 by lpr_cpcs_conf, cpcs_trans, ex2_intro/ +qed-. + +lemma lstas_cpcs_lpr: ∀h,g,G,L1,T1. ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀d,d1. d ≤ d1 → ⦃G, L1⦄ ⊢ T1 ▪[h, g] d1 → ∀U1. ⦃G, L1⦄ ⊢ T1 •*[h, d] U1 → + ∀T2. ⦃G, L1⦄ ⊢ T2 ¡[h, g] → + ∀d2. d ≤ d2 → ⦃G, L1⦄ ⊢ T2 ▪[h, g] d2 → ∀U2. ⦃G, L1⦄ ⊢ T2 •*[h, d] U2 → + ⦃G, L1⦄ ⊢ T1 ⬌* T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L2⦄ ⊢ U1 ⬌* U2. +#h #g #G #L1 #T1 #HT1 #d #d1 #Hd1 #HTd1 #U1 #HTU1 #T2 #HT2 #d2 #Hd2 #HTd2 #U2 #HTU2 #H #L2 #HL12 +elim (cpcs_inv_cprs … H) -H #T #H1 #H2 +elim (lstas_cprs_lpr … HT1 … Hd1 HTd1 … HTU1 … H1 … HL12) -T1 #W1 #H1 #HUW1 +elim (lstas_cprs_lpr … HT2 … Hd2 HTd2 … HTU2 … H2 … HL12) -T2 #W2 #H2 #HUW2 +lapply (lstas_mono … H1 … H2) -h -T -d #H destruct /2 width=3 by cpcs_canc_dx/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_scpes.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_scpes.ma new file mode 100644 index 000000000..40f8b7b04 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_scpes.ma @@ -0,0 +1,198 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/fpbg_fpbs.ma". +include "basic_2A/equivalence/scpes_cpcs.ma". +include "basic_2A/equivalence/scpes_scpes.ma". +include "basic_2A/dynamic/snv.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* Inductive premises for the preservation results **************************) + +definition IH_snv_cpr_lpr: ∀h:sh. sd h → relation3 genv lenv term ≝ + λh,g,G,L1,T1. ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡ T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L2⦄ ⊢ T2 ¡[h, g]. + +definition IH_da_cpr_lpr: ∀h:sh. sd h → relation3 genv lenv term ≝ + λh,g,G,L1,T1. ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀d. ⦃G, L1⦄ ⊢ T1 ▪[h, g] d → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡ T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → + ⦃G, L2⦄ ⊢ T2 ▪[h, g] d. + +definition IH_lstas_cpr_lpr: ∀h:sh. sd h → relation3 genv lenv term ≝ + λh,g,G,L1,T1. ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀d1,d2. d2 ≤ d1 → ⦃G, L1⦄ ⊢ T1 ▪[h, g] d1 → + ∀U1. ⦃G, L1⦄ ⊢ T1 •*[h, d2] U1 → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡ T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → + ∃∃U2. ⦃G, L2⦄ ⊢ T2 •*[h, d2] U2 & ⦃G, L2⦄ ⊢ U1 ⬌* U2. + +definition IH_snv_lstas: ∀h:sh. sd h → relation3 genv lenv term ≝ + λh,g,G,L,T. ⦃G, L⦄ ⊢ T ¡[h, g] → + ∀d1,d2. d2 ≤ d1 → ⦃G, L⦄ ⊢ T ▪[h, g] d1 → + ∀U. ⦃G, L⦄ ⊢ T •*[h, d2] U → ⦃G, L⦄ ⊢ U ¡[h, g]. + +(* Properties for the preservation results **********************************) + +fact snv_cprs_lpr_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + ∀G,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L1, T1⦄ → ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡* T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L2⦄ ⊢ T2 ¡[h, g]. +#h #g #G0 #L0 #T0 #IH #G #L1 #T1 #HLT0 #HT1 #T2 #H +@(cprs_ind … H) -T2 /4 width=6 by fpbg_fpbs_trans, cprs_fpbs/ +qed-. + +fact da_cprs_lpr_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + ∀G,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L1, T1⦄ → ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀d. ⦃G, L1⦄ ⊢ T1 ▪[h, g] d → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡* T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L2⦄ ⊢ T2 ▪[h, g] d. +#h #g #G0 #L0 #T0 #IH2 #IH1 #G #L1 #T1 #HLT0 #HT1 #d #Hd #T2 #H +@(cprs_ind … H) -T2 /4 width=10 by snv_cprs_lpr_aux, fpbg_fpbs_trans, cprs_fpbs/ +qed-. + +fact da_scpds_lpr_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_lstas h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + ∀G,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L1, T1⦄ → ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀d1. ⦃G, L1⦄ ⊢ T1 ▪[h, g] d1 → + ∀T2,d2. ⦃G, L1⦄ ⊢ T1 •*➡*[h, g, d2] T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → + d2 ≤ d1 ∧ ⦃G, L2⦄ ⊢ T2 ▪[h, g] d1-d2. +#h #g #G0 #L0 #T0 #IH3 #IH2 #IH1 #G #L1 #T1 #HLT0 #HT1 #d1 #Hd1 #T2 #d2 * #T #d0 #Hd20 #H #HT1 #HT2 #L2 #HL12 +lapply (da_mono … H … Hd1) -H #H destruct +lapply (lstas_da_conf … HT1 … Hd1) #Hd12 +lapply (da_cprs_lpr_aux … IH2 IH1 … Hd12 … HT2 … HL12) -IH2 -IH1 -HT2 -HL12 +/3 width=8 by fpbg_fpbs_trans, lstas_fpbs, conj/ +qed-. + +fact da_scpes_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_lstas h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + ∀G,L,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L, T1⦄ → ⦃G, L⦄ ⊢ T1 ¡[h, g] → + ∀T2. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L, T2⦄ → ⦃G, L⦄ ⊢ T2 ¡[h, g] → + ∀d11. ⦃G, L⦄ ⊢ T1 ▪[h, g] d11 → ∀d12. ⦃G, L⦄ ⊢ T2 ▪[h, g] d12 → + ∀d21,d22. ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d21, d22] T2 → + ∧∧ d21 ≤ d11 & d22 ≤ d12 & d11 - d21 = d12 - d22. +#h #g #G0 #L0 #T0 #IH3 #IH2 #IH1 #G #L #T1 #HLT01 #HT1 #T2 #HLT02 #HT2 #d11 #Hd11 #d12 #Hd12 #d21 #d22 * #T #HT1 #HT2 +elim (da_scpds_lpr_aux … IH3 IH2 IH1 … Hd11 … HT1 … L) -Hd11 -HT1 // +elim (da_scpds_lpr_aux … IH3 IH2 IH1 … Hd12 … HT2 … L) -Hd12 -HT2 // +/3 width=7 by da_mono, and3_intro/ +qed-. + +fact lstas_cprs_lpr_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_lstas_cpr_lpr h g G1 L1 T1) → + ∀G,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L1, T1⦄ → ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀d1,d2. d2 ≤ d1 → ⦃G, L1⦄ ⊢ T1 ▪[h, g] d1 → + ∀U1. ⦃G, L1⦄ ⊢ T1 •*[h, d2] U1 → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡* T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → + ∃∃U2. ⦃G, L2⦄ ⊢ T2 •*[h, d2] U2 & ⦃G, L2⦄ ⊢ U1 ⬌* U2. +#h #g #G0 #L0 #T0 #IH3 #IH2 #IH1 #G #L1 #T1 #H01 #HT1 #d1 #d2 #Hd21 #Hd1 #U1 #HTU1 #T2 #H +@(cprs_ind … H) -T2 [ /2 width=10 by/ ] +#T #T2 #HT1T #HTT2 #IHT1 #L2 #HL12 +elim (IHT1 L1) // -IHT1 #U #HTU #HU1 +elim (IH1 … Hd21 … HTU … HTT2 … HL12) -IH1 -HTU -HTT2 +[2: /3 width=12 by da_cprs_lpr_aux/ +|3: /3 width=10 by snv_cprs_lpr_aux/ +|4: /3 width=5 by fpbg_fpbs_trans, cprs_fpbs/ +] -G0 -L0 -T0 -T1 -T -d1 +/4 width=5 by lpr_cpcs_conf, cpcs_trans, ex2_intro/ +qed-. + +fact scpds_cpr_lpr_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_lstas_cpr_lpr h g G1 L1 T1) → + ∀G,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L1, T1⦄ → ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀U1,d. ⦃G, L1⦄ ⊢ T1 •*➡*[h, g, d] U1 → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡ T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → + ∃∃U2. ⦃G, L2⦄ ⊢ T2 •*➡*[h, g, d] U2 & ⦃G, L2⦄ ⊢ U1 ➡* U2. +#h #g #G0 #L0 #T0 #IH2 #IH1 #G #L1 #T1 #H01 #HT1 #U1 #d2 * #W1 #d1 #Hd21 #HTd1 #HTW1 #HWU1 #T2 #HT12 #L2 #HL12 +elim (IH1 … H01 … HTW1 … HT12 … HL12) -IH1 // #W2 #HTW2 #HW12 +lapply (IH2 … H01 … HTd1 … HT12 … HL12) -L0 -T0 // -T1 +lapply (lpr_cprs_conf … HL12 … HWU1) -L1 #HWU1 +lapply (cpcs_canc_sn … HW12 HWU1) -W1 #H +elim (cpcs_inv_cprs … H) -H /3 width=6 by ex4_2_intro, ex2_intro/ +qed-. + +fact scpes_cpr_lpr_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_lstas_cpr_lpr h g G1 L1 T1) → + ∀G,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L1, T1⦄ → ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀T2. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L1, T2⦄ → ⦃G, L1⦄ ⊢ T2 ¡[h, g] → + ∀d1,d2. ⦃G, L1⦄ ⊢ T1 •*⬌*[h, g, d1, d2] T2 → + ∀U1. ⦃G, L1⦄ ⊢ T1 ➡ U1 → ∀U2. ⦃G, L1⦄ ⊢ T2 ➡ U2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → + ⦃G, L2⦄ ⊢ U1 •*⬌*[h, g, d1, d2] U2. +#h #g #G0 #L0 #T0 #IH2 #IH1 #G #L1 #T1 #H01 #HT1 #T2 #HT02 #HT2 #d1 #d2 * #T0 #HT10 #HT20 #U1 #HTU1 #U2 #HTU2 #L2 #HL12 +elim (scpds_cpr_lpr_aux … IH2 IH1 … HT10 … HTU1 … HL12) -HT10 -HTU1 // #X1 #HUX1 #H1 +elim (scpds_cpr_lpr_aux … IH2 IH1 … HT20 … HTU2 … HL12) -HT20 -HTU2 // #X2 #HUX2 #H2 +elim (cprs_conf … H1 … H2) -T0 +/3 width=5 by scpds_div, scpds_cprs_trans/ +qed-. + +fact lstas_scpds_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_lstas h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_lstas_cpr_lpr h g G1 L1 T1) → + ∀G,L,T. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L, T⦄ → ⦃G, L⦄ ⊢ T ¡[h, g] → + ∀d,d1. d1 ≤ d → ⦃G, L⦄ ⊢ T ▪[h, g] d → ∀T1. ⦃G, L⦄ ⊢ T •*[h, d1] T1 → + ∀T2,d2. ⦃G, L⦄ ⊢ T •*➡*[h, g, d2] T2 → ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d2-d1, d1-d2] T2. +#h #g #G0 #L0 #T0 #IH4 #IH3 #IH2 #IH1 #G #L #T #H0 #HT #d #d1 #Hd1 #HTd #T1 #HT1 #T2 #d2 * #X #d0 #Hd20 #H #HTX #HXT2 +lapply (da_mono … H … HTd) -H #H destruct +lapply (lstas_da_conf … HT1 … HTd) #HTd1 +lapply (lstas_da_conf … HTX … HTd) #HXd +lapply (da_cprs_lpr_aux … IH3 IH2 … HXd … HXT2 L ?) +[1,2,3: /3 width=8 by fpbg_fpbs_trans, lstas_fpbs/ ] #HTd2 +elim (le_or_ge d1 d2) #Hd12 >(eq_minus_O … Hd12) +[ elim (da_lstas … HTd2 0) #X2 #HTX2 #_ -IH4 -IH3 -IH2 -IH1 -H0 -HT -HTd -HXd + /5 width=6 by lstas_scpds, scpds_div, cprs_strap1, lstas_cpr, lstas_conf_le, monotonic_le_minus_l, ex4_2_intro/ +| elim (da_lstas … HTd1 0) #X1 #HTX1 #_ + lapply (lstas_conf_le … HTX … HT1) // #HXT1 -HT1 + elim (lstas_cprs_lpr_aux … IH3 IH2 IH1 … HXd … HXT1 … HXT2 L) -IH3 -IH2 -IH1 -HXd -HXT1 -HXT2 + /4 width=8 by cpcs_scpes, cpcs_cpr_conf, fpbg_fpbs_trans, lstas_fpbs, lstas_cpr, monotonic_le_minus_l/ +] +qed-. + +fact scpes_le_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_lstas h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_lstas_cpr_lpr h g G1 L1 T1) → + ∀G,L,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L, T1⦄ → ⦃G, L⦄ ⊢ T1 ¡[h, g] → + ∀T2. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L, T2⦄ → ⦃G, L⦄ ⊢ T2 ¡[h, g] → + ∀d11. ⦃G, L⦄ ⊢ T1 ▪[h, g] d11 → ∀d12. ⦃G, L⦄ ⊢ T2 ▪[h, g] d12 → + ∀d21,d22,d. d21 + d ≤ d11 → d22 + d ≤ d12 → + ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d21, d22] T2 → ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d21+d, d22+d] T2. +#h #g #G0 #L0 #T0 #IH4 #IH3 #IH2 #IH1 #G #L #T1 #H01 #HT1 #T2 #H02 #HT2 #d11 #Hd11 #Hd12 #Hd12 #d21 #d22 #d #H1 #H2 * #T0 #HT10 #HT20 +elim (da_lstas … Hd11 (d21+d)) #X1 #HTX1 #_ +elim (da_lstas … Hd12 (d22+d)) #X2 #HTX2 #_ +lapply (lstas_scpds_aux … IH4 IH3 IH2 IH1 … Hd11 … HTX1 … HT10) -HT10 +[1,2,3: // | >eq_minus_O [2: // ] eq_minus_O [2: // ] (cprs_inv_sort1 … H1) -T #H2 +lapply (cprs_inv_sort1 … H2) -L #H destruct // +qed-. + +lemma cpcs_inv_abst1: ∀a,G,L,W1,T1,T. ⦃G, L⦄ ⊢ ⓛ{a}W1.T1 ⬌* T → + ∃∃W2,T2. ⦃G, L⦄ ⊢ T ➡* ⓛ{a}W2.T2 & ⦃G, L⦄ ⊢ ⓛ{a}W1.T1 ➡* ⓛ{a}W2.T2. +#a #G #L #W1 #T1 #T #H +elim (cpcs_inv_cprs … H) -H #X #H1 #H2 +elim (cprs_inv_abst1 … H1) -H1 #W2 #T2 #HW12 #HT12 #H destruct +/3 width=6 by cprs_bind, ex2_2_intro/ +qed-. + +lemma cpcs_inv_abst2: ∀a,G,L,W1,T1,T. ⦃G, L⦄ ⊢ T ⬌* ⓛ{a}W1.T1 → + ∃∃W2,T2. ⦃G, L⦄ ⊢ T ➡* ⓛ{a}W2.T2 & ⦃G, L⦄ ⊢ ⓛ{a}W1.T1 ➡* ⓛ{a}W2.T2. +/3 width=1 by cpcs_inv_abst1, cpcs_sym/ qed-. + +(* Basic_1: was: pc3_gen_sort_abst *) +lemma cpcs_inv_sort_abst: ∀a,G,L,W,T,k. ⦃G, L⦄ ⊢ ⋆k ⬌* ⓛ{a}W.T → ⊥. +#a #G #L #W #T #k #H +elim (cpcs_inv_cprs … H) -H #X #H1 +>(cprs_inv_sort1 … H1) -X #H2 +elim (cprs_inv_abst1 … H2) -H2 #W0 #T0 #_ #_ #H destruct +qed-. + +(* Basic_1: was: pc3_gen_lift *) +lemma cpcs_inv_lift: ∀G,L,K,s,l,m. ⬇[s, l, m] L ≡ K → + ∀T1,U1. ⬆[l, m] T1 ≡ U1 → ∀T2,U2. ⬆[l, m] T2 ≡ U2 → + ⦃G, L⦄ ⊢ U1 ⬌* U2 → ⦃G, K⦄ ⊢ T1 ⬌* T2. +#G #L #K #s #l #m #HLK #T1 #U1 #HTU1 #T2 #U2 #HTU2 #HU12 +elim (cpcs_inv_cprs … HU12) -HU12 #U #HU1 #HU2 +elim (cprs_inv_lift1 … HU1 … HLK … HTU1) -U1 #T #HTU #HT1 +elim (cprs_inv_lift1 … HU2 … HLK … HTU2) -L -U2 #X #HXU +>(lift_inj … HXU … HTU) -X -U -l -m /2 width=3 by cprs_div/ +qed-. + +(* Advanced properties ******************************************************) + +lemma lpr_cpcs_trans: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡ L2 → + ∀T1,T2. ⦃G, L2⦄ ⊢ T1 ⬌* T2 → ⦃G, L1⦄ ⊢ T1 ⬌* T2. +#G #L1 #L2 #HL12 #T1 #T2 #H elim (cpcs_inv_cprs … H) -H +/4 width=5 by cprs_div, lpr_cprs_trans/ +qed-. + +lemma lprs_cpcs_trans: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → + ∀T1,T2. ⦃G, L2⦄ ⊢ T1 ⬌* T2 → ⦃G, L1⦄ ⊢ T1 ⬌* T2. +#G #L1 #L2 #HL12 #T1 #T2 #H elim (cpcs_inv_cprs … H) -H +/4 width=5 by cprs_div, lprs_cprs_trans/ +qed-. + +lemma cpr_cprs_conf_cpcs: ∀G,L,T,T1,T2. ⦃G, L⦄ ⊢ T ➡* T1 → ⦃G, L⦄ ⊢ T ➡ T2 → ⦃G, L⦄ ⊢ T1 ⬌* T2. +#G #L #T #T1 #T2 #HT1 #HT2 elim (cprs_strip … HT1 … HT2) -HT1 -HT2 +/2 width=3 by cpr_cprs_div/ +qed-. + +lemma cprs_cpr_conf_cpcs: ∀G,L,T,T1,T2. ⦃G, L⦄ ⊢ T ➡* T1 → ⦃G, L⦄ ⊢ T ➡ T2 → ⦃G, L⦄ ⊢ T2 ⬌* T1. +#G #L #T #T1 #T2 #HT1 #HT2 elim (cprs_strip … HT1 … HT2) -HT1 -HT2 +/2 width=3 by cprs_cpr_div/ +qed-. + +lemma cprs_conf_cpcs: ∀G,L,T,T1,T2. ⦃G, L⦄ ⊢ T ➡* T1 → ⦃G, L⦄ ⊢ T ➡* T2 → ⦃G, L⦄ ⊢ T1 ⬌* T2. +#G #L #T #T1 #T2 #HT1 #HT2 elim (cprs_conf … HT1 … HT2) -HT1 -HT2 +/2 width=3 by cprs_div/ +qed-. + +lemma lprs_cprs_conf: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → + ∀T1,T2. ⦃G, L1⦄ ⊢ T1 ➡* T2 → ⦃G, L2⦄ ⊢ T1 ⬌* T2. +#G #L1 #L2 #HL12 #T1 #T2 #HT12 elim (lprs_cprs_conf_dx … HT12 … HL12) -L1 +/2 width=3 by cprs_div/ +qed-. + +(* Basic_1: was: pc3_wcpr0_t *) +(* Basic_1: note: pc3_wcpr0_t should be renamed *) +(* Note: alternative proof /3 width=5 by lprs_cprs_conf, lpr_lprs/ *) +lemma lpr_cprs_conf: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡ L2 → + ∀T1,T2. ⦃G, L1⦄ ⊢ T1 ➡* T2 → ⦃G, L2⦄ ⊢ T1 ⬌* T2. +#G #L1 #L2 #HL12 #T1 #T2 #HT12 elim (cprs_lpr_conf_dx … HT12 … HL12) -L1 +/2 width=3 by cprs_div/ +qed-. + +(* Basic_1: was only: pc3_pr0_pr2_t *) +(* Basic_1: note: pc3_pr0_pr2_t should be renamed *) +lemma lpr_cpr_conf: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡ L2 → + ∀T1,T2. ⦃G, L1⦄ ⊢ T1 ➡ T2 → ⦃G, L2⦄ ⊢ T1 ⬌* T2. +/3 width=5 by lpr_cprs_conf, cpr_cprs/ qed-. + +(* Basic_1: was only: pc3_thin_dx *) +lemma cpcs_flat: ∀G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ⬌* V2 → ∀T1,T2. ⦃G, L⦄ ⊢ T1 ⬌* T2 → + ∀I. ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ⬌* ⓕ{I}V2.T2. +#G #L #V1 #V2 #HV12 #T1 #T2 #HT12 +elim (cpcs_inv_cprs … HV12) -HV12 +elim (cpcs_inv_cprs … HT12) -HT12 +/3 width=5 by cprs_flat, cprs_div/ +qed. + +lemma cpcs_flat_dx_cpr_rev: ∀G,L,V1,V2. ⦃G, L⦄ ⊢ V2 ➡ V1 → ∀T1,T2. ⦃G, L⦄ ⊢ T1 ⬌* T2 → + ∀I. ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ⬌* ⓕ{I}V2.T2. +/3 width=1 by cpr_cpcs_sn, cpcs_flat/ qed. + +lemma cpcs_bind_dx: ∀a,I,G,L,V,T1,T2. ⦃G, L.ⓑ{I}V⦄ ⊢ T1 ⬌* T2 → + ⦃G, L⦄ ⊢ ⓑ{a,I}V.T1 ⬌* ⓑ{a,I}V.T2. +#a #I #G #L #V #T1 #T2 #HT12 elim (cpcs_inv_cprs … HT12) -HT12 +/3 width=5 by cprs_div, cprs_bind/ +qed. + +lemma cpcs_bind_sn: ∀a,I,G,L,V1,V2,T. ⦃G, L⦄ ⊢ V1 ⬌* V2 → ⦃G, L⦄ ⊢ ⓑ{a,I}V1. T ⬌* ⓑ{a,I}V2. T. +#a #I #G #L #V1 #V2 #T #HV12 elim (cpcs_inv_cprs … HV12) -HV12 +/3 width=5 by cprs_div, cprs_bind/ +qed. + +lemma lsubr_cpcs_trans: ∀G,L1,T1,T2. ⦃G, L1⦄ ⊢ T1 ⬌* T2 → + ∀L2. L2 ⫃ L1 → ⦃G, L2⦄ ⊢ T1 ⬌* T2. +#G #L1 #T1 #T2 #HT12 elim (cpcs_inv_cprs … HT12) -HT12 +/3 width=5 by cprs_div, lsubr_cprs_trans/ +qed-. + +(* Basic_1: was: pc3_lift *) +lemma cpcs_lift: ∀G,L,K,s,l,m. ⬇[s, l, m] L ≡ K → + ∀T1,U1. ⬆[l, m] T1 ≡ U1 → ∀T2,U2. ⬆[l, m] T2 ≡ U2 → + ⦃G, K⦄ ⊢ T1 ⬌* T2 → ⦃G, L⦄ ⊢ U1 ⬌* U2. +#G #L #K #s #l #m #HLK #T1 #U1 #HTU1 #T2 #U2 #HTU2 #HT12 +elim (cpcs_inv_cprs … HT12) -HT12 #T #HT1 #HT2 +elim (lift_total T l m) /3 width=12 by cprs_div, cprs_lift/ +qed. + +lemma cpcs_strip: ∀G,L,T1,T. ⦃G, L⦄ ⊢ T ⬌* T1 → ∀T2. ⦃G, L⦄ ⊢ T ⬌ T2 → + ∃∃T0. ⦃G, L⦄ ⊢ T1 ⬌ T0 & ⦃G, L⦄ ⊢ T2 ⬌* T0. +#G #L #T1 #T @TC_strip1 /2 width=3 by cpc_conf/ qed-. + +(* More inversion lemmas ****************************************************) + +(* Note: there must be a proof suitable for llpr *) +lemma cpcs_inv_abst_sn: ∀a1,a2,G,L,W1,W2,T1,T2. ⦃G, L⦄ ⊢ ⓛ{a1}W1.T1 ⬌* ⓛ{a2}W2.T2 → + ∧∧ ⦃G, L⦄ ⊢ W1 ⬌* W2 & ⦃G, L.ⓛW1⦄ ⊢ T1 ⬌* T2 & a1 = a2. +#a1 #a2 #G #L #W1 #W2 #T1 #T2 #H +elim (cpcs_inv_cprs … H) -H #T #H1 #H2 +elim (cprs_inv_abst1 … H1) -H1 #W0 #T0 #HW10 #HT10 #H destruct +elim (cprs_inv_abst1 … H2) -H2 #W #T #HW2 #HT2 #H destruct +lapply (lprs_cprs_conf … (L.ⓛW) … HT2) /2 width=1 by lprs_pair/ -HT2 #HT2 +lapply (lprs_cpcs_trans … (L.ⓛW1) … HT2) /2 width=1 by lprs_pair/ -HT2 #HT2 +/4 width=3 by and3_intro, cprs_div, cpcs_cprs_div, cpcs_sym/ +qed-. + +lemma cpcs_inv_abst_dx: ∀a1,a2,G,L,W1,W2,T1,T2. ⦃G, L⦄ ⊢ ⓛ{a1}W1.T1 ⬌* ⓛ{a2}W2.T2 → + ∧∧ ⦃G, L⦄ ⊢ W1 ⬌* W2 & ⦃G, L.ⓛW2⦄ ⊢ T1 ⬌* T2 & a1 = a2. +#a1 #a2 #G #L #W1 #W2 #T1 #T2 #HT12 lapply (cpcs_sym … HT12) -HT12 +#HT12 elim (cpcs_inv_abst_sn … HT12) -HT12 /3 width=1 by cpcs_sym, and3_intro/ +qed-. + +(* Main properties **********************************************************) + +(* Basic_1: was pc3_t *) +theorem cpcs_trans: ∀G,L,T1,T. ⦃G, L⦄ ⊢ T1 ⬌* T → ∀T2. ⦃G, L⦄ ⊢ T ⬌* T2 → ⦃G, L⦄ ⊢ T1 ⬌* T2. +#G #L #T1 #T #HT1 #T2 @(trans_TC … HT1) qed-. + +theorem cpcs_canc_sn: ∀G,L,T,T1,T2. ⦃G, L⦄ ⊢ T ⬌* T1 → ⦃G, L⦄ ⊢ T ⬌* T2 → ⦃G, L⦄ ⊢ T1 ⬌* T2. +/3 width=3 by cpcs_trans, cpcs_sym/ qed-. + +theorem cpcs_canc_dx: ∀G,L,T,T1,T2. ⦃G, L⦄ ⊢ T1 ⬌* T → ⦃G, L⦄ ⊢ T2 ⬌* T → ⦃G, L⦄ ⊢ T1 ⬌* T2. +/3 width=3 by cpcs_trans, cpcs_sym/ qed-. + +lemma cpcs_bind1: ∀a,I,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ⬌* V2 → + ∀T1,T2. ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ⬌* T2 → + ⦃G, L⦄ ⊢ ⓑ{a,I}V1. T1 ⬌* ⓑ{a,I}V2. T2. +/3 width=3 by cpcs_trans, cpcs_bind_sn, cpcs_bind_dx/ qed. + +lemma cpcs_bind2: ∀a,I,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ⬌* V2 → + ∀T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ⬌* T2 → + ⦃G, L⦄ ⊢ ⓑ{a,I}V1. T1 ⬌* ⓑ{a,I}V2. T2. +/3 width=3 by cpcs_trans, cpcs_bind_sn, cpcs_bind_dx/ qed. + +(* Basic_1: was: pc3_wcpr0 *) +lemma lpr_cpcs_conf: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡ L2 → + ∀T1,T2. ⦃G, L1⦄ ⊢ T1 ⬌* T2 → ⦃G, L2⦄ ⊢ T1 ⬌* T2. +#G #L1 #L2 #HL12 #T1 #T2 #H elim (cpcs_inv_cprs … H) -H +/3 width=5 by cpcs_canc_dx, lpr_cprs_conf/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/equivalence/cpcs_cprs.ma b/matita/matita/contribs/lambdadelta/basic_2A/equivalence/cpcs_cprs.ma new file mode 100644 index 000000000..d66896b64 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/equivalence/cpcs_cprs.ma @@ -0,0 +1,62 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/cprs.ma". +include "basic_2A/equivalence/cpcs.ma". + +(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************) + +(* Properties about context sensitive computation on terms ******************) + +(* Basic_1: was: pc3_pr3_r *) +lemma cpcs_cprs_dx: ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ T1 ⬌* T2. +#G #L #T1 #T2 #H @(cprs_ind … H) -T2 +/3 width=3 by cpcs_cpr_strap1, cpcs_strap1, cpc_cpcs/ +qed. + +(* Basic_1: was: pc3_pr3_x *) +lemma cpcs_cprs_sn: ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T2 ➡* T1 → ⦃G, L⦄ ⊢ T1 ⬌* T2. +#G #L #T1 #T2 #H @(cprs_ind_dx … H) -T2 +/3 width=3 by cpcs_cpr_div, cpcs_strap1, cpcs_cprs_dx/ +qed. + +lemma cpcs_cprs_strap1: ∀G,L,T1,T. ⦃G, L⦄ ⊢ T1 ⬌* T → ∀T2. ⦃G, L⦄ ⊢ T ➡* T2 → ⦃G, L⦄ ⊢ T1 ⬌* T2. +#G #L #T1 #T #HT1 #T2 #H @(cprs_ind … H) -T2 /2 width=3 by cpcs_cpr_strap1/ +qed-. + +lemma cpcs_cprs_strap2: ∀G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡* T → ∀T2. ⦃G, L⦄ ⊢ T ⬌* T2 → ⦃G, L⦄ ⊢ T1 ⬌* T2. +#G #L #T1 #T #H #T2 #HT2 @(cprs_ind_dx … H) -T1 /2 width=3 by cpcs_cpr_strap2/ +qed-. + +lemma cpcs_cprs_div: ∀G,L,T1,T. ⦃G, L⦄ ⊢ T1 ⬌* T → ∀T2. ⦃G, L⦄ ⊢ T2 ➡* T → ⦃G, L⦄ ⊢ T1 ⬌* T2. +#G #L #T1 #T #HT1 #T2 #H @(cprs_ind_dx … H) -T2 /2 width=3 by cpcs_cpr_div/ +qed-. + +(* Basic_1: was: pc3_pr3_conf *) +lemma cpcs_cprs_conf: ∀G,L,T1,T. ⦃G, L⦄ ⊢ T ➡* T1 → ∀T2. ⦃G, L⦄ ⊢ T ⬌* T2 → ⦃G, L⦄ ⊢ T1 ⬌* T2. +#G #L #T1 #T #H #T2 #HT2 @(cprs_ind … H) -T1 /2 width=3 by cpcs_cpr_conf/ +qed-. + +(* Basic_1: was: pc3_pr3_t *) +(* Basic_1: note: pc3_pr3_t should be renamed *) +lemma cprs_div: ∀G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡* T → ∀T2. ⦃G, L⦄ ⊢ T2 ➡* T → ⦃G, L⦄ ⊢ T1 ⬌* T2. +#G #L #T1 #T #HT1 #T2 #H @(cprs_ind_dx … H) -T2 +/2 width=3 by cpcs_cpr_div, cpcs_cprs_dx/ +qed. + +lemma cprs_cpr_div: ∀G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡* T → ∀T2. ⦃G, L⦄ ⊢ T2 ➡ T → ⦃G, L⦄ ⊢ T1 ⬌* T2. +/3 width=5 by cpr_cprs, cprs_div/ qed-. + +lemma cpr_cprs_div: ∀G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡ T → ∀T2. ⦃G, L⦄ ⊢ T2 ➡* T → ⦃G, L⦄ ⊢ T1 ⬌* T2. +/3 width=3 by cpr_cprs, cprs_div/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes.ma b/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes.ma new file mode 100644 index 000000000..111eef91d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes.ma @@ -0,0 +1,37 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/dpconvstar_8.ma". +include "basic_2A/computation/scpds.ma". + +(* STRATIFIED DECOMPOSED PARALLEL EQUIVALENCE FOR TERMS *********************) + +definition scpes: ∀h. sd h → nat → nat → relation4 genv lenv term term ≝ + λh,g,d1,d2,G,L,T1,T2. + ∃∃T. ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d1] T & ⦃G, L⦄ ⊢ T2 •*➡*[h, g, d2] T. + +interpretation "stratified decomposed parallel equivalence (term)" + 'DPConvStar h g d1 d2 G L T1 T2 = (scpes h g d1 d2 G L T1 T2). + +(* Basic properties *********************************************************) + +lemma scpds_div: ∀h,g,G,L,T1,T2,T,d1,d2. + ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d1] T → ⦃G, L⦄ ⊢ T2 •*➡*[h, g, d2] T → + ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d1, d2] T2. +/2 width=3 by ex2_intro/ qed. + +lemma scpes_sym: ∀h,g,G,L,T1,T2,d1,d2. ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d1, d2] T2 → + ⦃G, L⦄ ⊢ T2 •*⬌*[h, g, d2, d1] T1. +#h #g #G #L #T1 #T2 #L1 #d2 * /2 width=3 by scpds_div/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes_aaa.ma new file mode 100644 index 000000000..3034f5b0e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes_aaa.ma @@ -0,0 +1,29 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/scpds_aaa.ma". +include "basic_2A/equivalence/scpes.ma". + +(* DECOMPOSED EXTENDED PARALLEL EQUIVALENCE FOR TERMS ***********************) + +(* Main inversion lemmas about atomic arity assignment on terms *************) + +theorem scpes_aaa_mono: ∀h,g,G,L,T1,T2,d1,d2. ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d1, d2] T2 → + ∀A1. ⦃G, L⦄ ⊢ T1 ⁝ A1 → ∀A2. ⦃G, L⦄ ⊢ T2 ⁝ A2 → + A1 = A2. +#h #g #G #L #T1 #T2 #d1 #d2 * #T #HT1 #HT2 #A1 #HA1 #A2 #HA2 +lapply (scpds_aaa_conf … HA1 … HT1) -T1 #HA1 +lapply (scpds_aaa_conf … HA2 … HT2) -T2 #HA2 +lapply (aaa_mono … HA1 … HA2) -L -T // +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes_cpcs.ma b/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes_cpcs.ma new file mode 100644 index 000000000..4e3af3cca --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes_cpcs.ma @@ -0,0 +1,39 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/scpds_scpds.ma". +include "basic_2A/equivalence/cpcs_cpcs.ma". +include "basic_2A/equivalence/scpes.ma". + +(* STRATIFIED DECOMPOSED PARALLEL EQUIVALENCE FOR TERMS *********************) + +(* Inversion lemmas on parallel equivalence for terms ***********************) + +lemma scpes_inv_lstas_eq: ∀h,g,G,L,T1,T2,d1,d2. ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d1, d2] T2 → + ∀U1. ⦃G, L⦄ ⊢ T1 •*[h, d1] U1 → + ∀U2. ⦃G, L⦄ ⊢ T2 •*[h, d2] U2 → ⦃G, L⦄ ⊢ U1 ⬌* U2. +#h #g #G #L #T1 #T2 #d1 #d2 * #T #HT1 #HT2 #U1 #HTU1 #U2 #HTU2 +/3 width=8 by scpds_inv_lstas_eq, cprs_div/ +qed-. + +(* Properties on parallel equivalence for terms *****************************) + +lemma cpcs_scpes: ∀h,g,G,L,T1,d11. ⦃G, L⦄ ⊢ T1 ▪[h, g] d11 → + ∀U1,d12. d12 ≤ d11 → ⦃G, L⦄ ⊢ T1 •*[h, d12] U1 → + ∀T2,d21. ⦃G, L⦄ ⊢ T2 ▪[h, g] d21 → + ∀U2,d22. d22 ≤ d21 → ⦃G, L⦄ ⊢ T2 •*[h, d22] U2 → + ⦃G, L⦄ ⊢ U1 ⬌* U2 → ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d12, d22] T2. +#h #g #G #L #T1 #d11 #HT1 #U1 #d12 #Hd121 #HTU1 #T2 #d21 #HT2 #U2 #d22 #Hd221 #HTU2 #HU12 +elim (cpcs_inv_cprs … HU12) -HU12 /3 width=6 by scpds_div, ex4_2_intro/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes_scpes.ma b/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes_scpes.ma new file mode 100644 index 000000000..c48ddd05f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes_scpes.ma @@ -0,0 +1,69 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/scpds_scpds.ma". +include "basic_2A/equivalence/scpes.ma". + +(* STRATIFIED DECOMPOSED PARALLEL EQUIVALENCE FOR TERMS *********************) + +(* Advanced inversion lemmas ************************************************) + +lemma scpes_inv_abst2: ∀h,g,a,G,L,T1,T2,W2,d1,d2. ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d1, d2] ⓛ{a}W2.T2 → + ∃∃W,T. ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d1] ⓛ{a}W.T & ⦃G, L⦄ ⊢ W2 ➡* W & + ⦃G, L.ⓛW2⦄ ⊢ T2 •*➡*[h, g, d2] T. +#h #g #a #G #L #T1 #T2 #W2 #d1 #d2 * #T0 #HT10 #H +elim (scpds_inv_abst1 … H) -H #W #T #HW2 #HT2 #H destruct /2 width=5 by ex3_2_intro/ +qed-. + +(* Advanced properties ******************************************************) + +lemma scpes_refl: ∀h,g,G,L,T,d1,d2. d2 ≤ d1 → ⦃G, L⦄ ⊢ T ▪[h, g] d1 → + ⦃G, L⦄ ⊢ T •*⬌*[h, g, d2, d2] T. +#h #g #G #L #T #d1 #d2 #Hd21 #Hd1 +elim (da_lstas … Hd1 … d2) #U #HTU #_ +/3 width=3 by scpds_div, lstas_scpds/ +qed. + +lemma lstas_scpes_trans: ∀h,g,G,L,T1,d0,d1. ⦃G, L⦄ ⊢ T1 ▪[h, g] d0 → d1 ≤ d0 → + ∀T. ⦃G, L⦄ ⊢ T1 •*[h, d1] T → + ∀T2,d,d2. ⦃G, L⦄ ⊢ T •*⬌*[h,g,d,d2] T2 → ⦃G, L⦄ ⊢ T1 •*⬌*[h,g,d1+d,d2] T2. +#h #g #G #L #T1 #d0 #d1 #Hd0 #Hd10 #T #HT1 #T2 #d #d2 * +/3 width=3 by scpds_div, lstas_scpds_trans/ qed-. + +(* Properties on parallel computation for terms *****************************) + +lemma cprs_scpds_div: ∀h,g,G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡* T → + ∀d. ⦃G, L⦄ ⊢ T1 ▪[h, g] d → + ∀T2,d2. ⦃G, L⦄ ⊢ T2 •*➡*[h, g, d2] T → + ⦃G, L⦄⊢ T1 •*⬌*[h, g, 0, d2] T2. +#h #g #G #L #T1 #T #HT1 #d #Hd elim (da_lstas … Hd 0) +#X1 #HTX1 #_ elim (cprs_strip … HT1 X1) -HT1 +/3 width=5 by scpds_strap1, scpds_div, lstas_cpr, ex4_2_intro/ +qed. + +(* Main properties **********************************************************) + +theorem scpes_trans: ∀h,g,G,L,T1,T,d1,d. ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d1, d] T → + ∀T2,d2. ⦃G, L⦄ ⊢ T •*⬌*[h, g, d, d2] T2 → ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d1, d2] T2. +#h #g #G #L #T1 #T #d1 #d * #X1 #HT1X1 #HTX1 #T2 #d2 * #X2 #HTX2 #HT2X2 +elim (scpds_conf_eq … HTX1 … HTX2) -T -d /3 width=5 by scpds_cprs_trans, scpds_div/ +qed-. + +theorem scpes_canc_sn: ∀h,g,G,L,T,T1,d,d1. ⦃G, L⦄ ⊢ T •*⬌*[h, g, d, d1] T1 → + ∀T2,d2. ⦃G, L⦄ ⊢ T •*⬌*[h, g, d, d2] T2 → ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d1, d2] T2. +/3 width=4 by scpes_trans, scpes_sym/ qed-. + +theorem scpes_canc_dx: ∀h,g,G,L,T1,T,d1,d. ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d1, d] T → + ∀T2,d2. ⦃G, L⦄ ⊢ T2 •*⬌*[h, g, d2, d] T → ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d1, d2] T2. +/3 width=4 by scpes_trans, scpes_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_cpr_omega.ma b/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_cpr_omega.ma new file mode 100644 index 000000000..5ddc266e1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_cpr_omega.ma @@ -0,0 +1,43 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/cpr.ma". + +(* EXAMPLES *****************************************************************) + +(* A reduction cycle in two steps: the term Omega ***************************) + +definition Delta: term → term ≝ λW. +ⓛW.ⓐ#0.#0. + +definition Omega1: term → term ≝ λW. ⓐ(Delta W).(Delta W). + +definition Omega2: term → term ≝ λW. +ⓓⓝW.(Delta W).ⓐ#0.#0. + +(* Basic properties *********************************************************) + +lemma Delta_lift: ∀W1,W2,l,m. ⬆[l, m] W1 ≡ W2 → + ⬆[l, m] (Delta W1) ≡ (Delta W2). +/4 width=1 by lift_flat, lift_bind, lift_lref_lt/ qed. + +(* Main properties **********************************************************) + +theorem cpr_Omega_12: ∀G,L,W. ⦃G, L⦄ ⊢ Omega1 W ➡ Omega2 W. +/2 width=1 by cpr_beta/ qed. + +theorem cpr_Omega_21: ∀G,L,W. ⦃G, L⦄ ⊢ Omega2 W ➡ Omega1 W. +#G #L #W1 elim (lift_total W1 0 1) #W2 #HW12 +@(cpr_zeta … (Omega1 W2)) /3 width=1 by Delta_lift, lift_flat/ +@cpr_flat @(cpr_delta … (Delta W1) ? 0) +[3,5,8,10: /2 width=2 by Delta_lift/ |4,9: /2 width=1 by cpr_eps/ |*: skip ] +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_fpbg_refl.ma b/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_fpbg_refl.ma new file mode 100644 index 000000000..3d8d971a6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_fpbg_refl.ma @@ -0,0 +1,54 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/fpbg_fpbs.ma". + +(* EXAMPLES *****************************************************************) + +(* Reflexivity of proper qrst-computation: the term ApplOmega ***************) + +definition ApplDelta: term → nat → term ≝ λW,k. +ⓛW.ⓐ⋆k.ⓐ#0.#0. + +definition ApplOmega1: term → nat → term ≝ λW,k. ⓐ(ApplDelta W k).(ApplDelta W k). + +definition ApplOmega2: term → nat → term ≝ λW,k. +ⓓⓝW.(ApplDelta W k).ⓐ⋆k.ⓐ#0.#0. + +definition ApplOmega3: term → nat → term ≝ λW,k. ⓐ⋆k.(ApplOmega1 W k). + +(* Basic properties *********************************************************) + +lemma ApplDelta_lift: ∀W1,W2,k,l,m. ⬆[l, m] W1 ≡ W2 → + ⬆[l, m] (ApplDelta W1 k) ≡ (ApplDelta W2 k). +/5 width=1 by lift_flat, lift_bind, lift_lref_lt/ qed. + +lemma cpr_ApplOmega_12: ∀G,L,W,k. ⦃G, L⦄ ⊢ ApplOmega1 W k ➡ ApplOmega2 W k. +/2 width=1 by cpr_beta/ qed. + +lemma cpr_ApplOmega_23: ∀G,L,W,k. ⦃G, L⦄ ⊢ ApplOmega2 W k ➡ ApplOmega3 W k. +#G #L #W1 #k elim (lift_total W1 0 1) #W2 #HW12 +@(cpr_zeta … (ApplOmega3 W2 k)) /4 width=1 by ApplDelta_lift, lift_flat/ +@cpr_flat // @cpr_flat @(cpr_delta … (ApplDelta W1 k) ? 0) +[3,5,8,10: /2 width=2 by ApplDelta_lift/ |4,9: /2 width=1 by cpr_eps/ |*: skip ] +qed. + +lemma cpxs_ApplOmega_13: ∀h,g,G,L,W,k. ⦃G, L⦄ ⊢ ApplOmega1 W k ➡*[h,g] ApplOmega3 W k. +/4 width=3 by cpxs_strap1, cpr_cpx/ qed. + +lemma fqup_ApplOmega_13: ∀G,L,W,k. ⦃G, L, ApplOmega3 W k⦄ ⊐+ ⦃G, L, ApplOmega1 W k⦄. +/2 width=1 by/ qed. + +(* Main properties **********************************************************) + +theorem fpbg_refl: ∀h,g,G,L,W,k. ⦃G, L, ApplOmega1 W k⦄ >≡[h,g] ⦃G, L, ApplOmega1 W k⦄. +/3 width=5 by fpbs_fpbg_trans, fqup_fpbg, cpxs_fpbs/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_snv_eta.ma b/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_snv_eta.ma new file mode 100644 index 000000000..65abf6352 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_snv_eta.ma @@ -0,0 +1,61 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/dynamic/snv.ma". + +(* EXAMPLES *****************************************************************) + +(* Extended validy (basic?_2) vs. restricted validity (basic_1) *************) + +(* extended validity of a closure, last arg of snv_appl > 1 *) +lemma snv_extended: ∀h,g,a,G,L,k. ⦃G, L.ⓛ⋆k.ⓛⓛ{a}⋆k.⋆k.ⓛ#0⦄ ⊢ ⓐ#2.#0 ¡[h, g]. +#h #g #a #G #L #k elim (deg_total h g k) +#d #Hd @(snv_appl … a … (⋆k) … (⋆k) (0+1+1)) +[ /4 width=5 by snv_lref, drop_drop_lt/ +| /4 width=13 by snv_bind, snv_lref/ +| /5 width=6 by lstas_scpds, lstas_succ, da_ldec, da_sort, drop_drop_lt/ +| @(lstas_scpds … (d+1+1)) + /5 width=11 by lstas_bind, lstas_succ, da_bind, da_ldec, da_sort, lift_bind/ +] +qed. + +(* restricted validity of the η-expanded closure, last arg of snv_appl = 1 **) +lemma snv_restricted: ∀h,g,a,G,L,k. ⦃G, L.ⓛ⋆k.ⓛⓛ{a}⋆k.⋆k.ⓛⓛ{a}⋆k.ⓐ#0.#1⦄ ⊢ ⓐ#2.#0 ¡[h, g]. +#h #g #a #G #L #k elim (deg_total h g k) +#d #Hd @(snv_appl … a … (⋆k) … (ⓐ#0.#2) (0+1)) +[ /4 width=5 by snv_lref, drop_drop_lt/ +| @snv_lref [4: // |1,2,3: skip ] + @snv_bind // + @(snv_appl … a … (⋆k) … (⋆k) (0+1)) + [ @snv_lref [4: // |1,2,3: skip ] // + | @snv_lref [4: /2 width=1 by drop_drop_lt/ |1,2,3: skip ] @snv_bind // + | @(lstas_scpds … (d+1)) /3 width=6 by da_sort, da_ldec, lstas_succ/ + | @(lstas_scpds … (d+1)) /3 width=8 by lstas_succ, lstas_bind, drop_drop, lift_bind/ + @da_ldec [3: /2 width=1 by drop_drop_lt/ |1,2: skip ] /3 width=1 by da_sort, da_bind/ + ] +| /5 width=6 by lstas_scpds, lstas_succ, da_ldec, da_sort, drop_drop_lt/ +| @(lstas_scpds … (d+1+1)) // + [ @da_ldec [3: // |1,2: skip ] + @da_bind @da_flat @da_ldec [3: /2 width=1 by drop_drop_lt/ |1,2: skip ] + /3 width=1 by da_sort, da_bind/ + | @lstas_succ [4: // |1,2: skip ] + [2: @lstas_bind | skip ] + [2: @lstas_appl | skip ] + [2: @lstas_zero + [4: /2 width=1 by drop_drop_lt/ |5: /2 width=2 by lstas_bind/ |*: skip ] + |1: skip ] + /4 width=2 by lift_flat, lift_bind, lift_lref_ge_minus, lift_lref_lt/ + ] +] +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_sta_ldec.ma b/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_sta_ldec.ma new file mode 100644 index 000000000..c680c74eb --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_sta_ldec.ma @@ -0,0 +1,23 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/unfold/lstas.ma". + +(* EXAMPLES *****************************************************************) + +(* Static type assignment (iterated vs primitive): the declared variable ****) + +(* basic_1: we have "L.ⓛⓝ⋆k1.⋆k2⦄ ⊢ #0 • ⓝ⋆k1.⋆k2". *) +theorem sta_ldec: ∀h,G,L,k1,k2. ⦃G, L.ⓛⓝ⋆k1.⋆k2⦄ ⊢ #0 •*[h, 1] ⋆k2. +/3 width=6 by lstas_sort, lstas_succ, lstas_cast, drop_pair/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/aarity.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/aarity.ma new file mode 100644 index 000000000..b980bc16a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/aarity.ma @@ -0,0 +1,73 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* THE FORMAL SYSTEM λδ: MATITA SOURCE FILES + * Initial invocation: - Patience on me to gain peace and perfection! - + *) + +include "ground_2A/lib/star.ma". +include "basic_2A/notation/constructors/item0_0.ma". +include "basic_2A/notation/constructors/snitem2_2.ma". + +(* ATOMIC ARITY *************************************************************) + +inductive aarity: Type[0] ≝ + | AAtom: aarity (* atomic aarity construction *) + | APair: aarity → aarity → aarity (* binary aarity construction *) +. + +interpretation "atomic arity construction (atomic)" + 'Item0 = AAtom. + +interpretation "atomic arity construction (binary)" + 'SnItem2 A1 A2 = (APair A1 A2). + +(* Basic inversion lemmas ***************************************************) + +fact destruct_apair_apair_aux: ∀A1,A2,B1,B2. ②B1.A1 = ②B2.A2 → B1 = B2 ∧ A1 = A2. +#A1 #A2 #B1 #B2 #H destruct /2 width=1 by conj/ +qed-. + +lemma discr_apair_xy_x: ∀A,B. ②B. A = B → ⊥. +#A #B elim B -B +[ #H destruct +| #Y #X #IHY #_ #H elim (destruct_apair_apair_aux … H) -H /2 width=1 by/ (**) (* destruct lemma needed *) +] +qed-. + +lemma discr_tpair_xy_y: ∀B,A. ②B. A = A → ⊥. +#B #A elim A -A +[ #H destruct +| #Y #X #_ #IHX #H elim (destruct_apair_apair_aux … H) -H /2 width=1 by/ (**) (* destruct lemma needed *) +] +qed-. + +(* Basic properties *********************************************************) + +lemma eq_aarity_dec: ∀A1,A2:aarity. Decidable (A1 = A2). +#A1 elim A1 -A1 +[ #A2 elim A2 -A2 /2 width=1 by or_introl/ + #B2 #A2 #_ #_ @or_intror #H destruct +| #B1 #A1 #IHB1 #IHA1 #A2 elim A2 -A2 + [ -IHB1 -IHA1 @or_intror #H destruct + | #B2 #A2 #_ #_ elim (IHB1 B2) -IHB1 + [ #H destruct elim (IHA1 A2) -IHA1 + [ #H destruct /2 width=1 by or_introl/ + | #HA12 @or_intror #H destruct /2 width=1 by/ + ] + | -IHA1 #HB12 @or_intror #H destruct /2 width=1 by/ + ] + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/cl_restricted_weight.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/cl_restricted_weight.ma new file mode 100644 index 000000000..49fd20d8d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/cl_restricted_weight.ma @@ -0,0 +1,51 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/functions/weight_2.ma". +include "basic_2A/grammar/lenv_weight.ma". + +(* WEIGHT OF A RESTRICTED CLOSURE *******************************************) + +definition rfw: lenv → term → ? ≝ λL,T. ♯{L} + ♯{T}. + +interpretation "weight (restricted closure)" 'Weight L T = (rfw L T). + +(* Basic properties *********************************************************) + +(* Basic_1: was: flt_shift *) +lemma rfw_shift: ∀a,I,K,V,T. ♯{K.ⓑ{I}V, T} < ♯{K, ⓑ{a,I}V.T}. +normalize // +qed. + +lemma rfw_tpair_sn: ∀I,L,V,T. ♯{L, V} < ♯{L, ②{I}V.T}. +normalize in ⊢ (?→?→?→?→?%%); // +qed. + +lemma rfw_tpair_dx: ∀I,L,V,T. ♯{L, T} < ♯{L, ②{I}V.T}. +normalize in ⊢ (?→?→?→?→?%%); // +qed. + +lemma rfw_lpair_sn: ∀I,L,V,T. ♯{L, V} < ♯{L.ⓑ{I}V, T}. +normalize /3 width=1 by monotonic_lt_plus_l, monotonic_le_plus_r/ +qed. + +lemma rfw_lpair_dx: ∀I,L,V,T. ♯{L, T} < ♯{L.ⓑ{I}V, T}. +normalize /3 width=1 by monotonic_lt_plus_l, monotonic_le_plus_r/ +qed. + +(* Basic_1: removed theorems 7: + flt_thead_sx flt_thead_dx flt_trans + flt_arith0 flt_arith1 flt_arith2 flt_wf_ind +*) +(* Basic_1: removed local theorems 1: q_ind *) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/cl_weight.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/cl_weight.ma new file mode 100644 index 000000000..72631a761 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/cl_weight.ma @@ -0,0 +1,49 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/functions/weight_3.ma". +include "basic_2A/grammar/lenv_weight.ma". +include "basic_2A/grammar/genv.ma". + +(* WEIGHT OF A CLOSURE ******************************************************) + +(* activate genv *) +definition fw: genv → lenv → term → ? ≝ λG,L,T. ♯{L} + ♯{T}. + +interpretation "weight (closure)" 'Weight G L T = (fw G L T). + +(* Basic properties *********************************************************) + +(* Basic_1: was: flt_shift *) +lemma fw_shift: ∀a,I,G,K,V,T. ♯{G, K.ⓑ{I}V, T} < ♯{G, K, ⓑ{a,I}V.T}. +normalize // +qed. + +lemma fw_tpair_sn: ∀I,G,L,V,T. ♯{G, L, V} < ♯{G, L, ②{I}V.T}. +normalize in ⊢ (?→?→?→?→?→?%%); // +qed. + +lemma fw_tpair_dx: ∀I,G,L,V,T. ♯{G, L, T} < ♯{G, L, ②{I}V.T}. +normalize in ⊢ (?→?→?→?→?→?%%); // +qed. + +lemma fw_lpair_sn: ∀I,G,L,V,T. ♯{G, L, V} < ♯{G, L.ⓑ{I}V, T}. +normalize /3 width=1 by monotonic_lt_plus_l, monotonic_le_plus_r/ +qed. + +(* Basic_1: removed theorems 7: + flt_thead_sx flt_thead_dx flt_trans + flt_arith0 flt_arith1 flt_arith2 flt_wf_ind +*) +(* Basic_1: removed local theorems 1: q_ind *) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/genv.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/genv.ma new file mode 100644 index 000000000..235b741bf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/genv.ma @@ -0,0 +1,41 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/lib/list.ma". +include "basic_2A/notation/constructors/star_0.ma". +include "basic_2A/notation/constructors/dxbind2_3.ma". +include "basic_2A/notation/constructors/dxabbr_2.ma". +include "basic_2A/notation/constructors/dxabst_2.ma". +include "basic_2A/grammar/term.ma". + +(* GLOBAL ENVIRONMENTS ******************************************************) + +(* global environments *) +definition genv ≝ list2 bind2 term. + +interpretation "sort (global environment)" + 'Star = (nil2 bind2 term). + +interpretation "global environment binding construction (binary)" + 'DxBind2 L I T = (cons2 bind2 term I T L). + +interpretation "abbreviation (global environment)" + 'DxAbbr L T = (cons2 bind2 term Abbr T L). + +interpretation "abstraction (global environment)" + 'DxAbst L T = (cons2 bind2 term Abst T L). + +(* Basic properties *********************************************************) + +axiom eq_genv_dec: ∀G1,G2:genv. Decidable (G1 = G2). diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/item.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/item.ma new file mode 100644 index 000000000..88d5cf57a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/item.ma @@ -0,0 +1,88 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/lib/bool.ma". +include "ground_2A/lib/arith.ma". + +(* ITEMS ********************************************************************) + +(* atomic items *) +inductive item0: Type[0] ≝ + | Sort: nat → item0 (* sort: starting at 0 *) + | LRef: nat → item0 (* reference by index: starting at 0 *) + | GRef: nat → item0 (* reference by position: starting at 0 *) +. + +(* binary binding items *) +inductive bind2: Type[0] ≝ + | Abbr: bind2 (* abbreviation *) + | Abst: bind2 (* abstraction *) +. + +(* binary non-binding items *) +inductive flat2: Type[0] ≝ + | Appl: flat2 (* application *) + | Cast: flat2 (* explicit type annotation *) +. + +(* binary items *) +inductive item2: Type[0] ≝ + | Bind2: bool → bind2 → item2 (* polarized binding item *) + | Flat2: flat2 → item2 (* non-binding item *) +. + +(* Basic inversion lemmas ***************************************************) + +fact destruct_sort_sort_aux: ∀k1,k2. Sort k1 = Sort k2 → k1 = k2. +#k1 #k2 #H destruct // +qed-. + +(* Basic properties *********************************************************) + +lemma eq_item0_dec: ∀I1,I2:item0. Decidable (I1 = I2). +* #i1 * #i2 [2,3,4,6,7,8: @or_intror #H destruct ] +elim (eq_nat_dec i1 i2) /2 width=1 by or_introl/ +#Hni12 @or_intror #H destruct /2 width=1 by/ +qed-. + +(* Basic_1: was: bind_dec *) +lemma eq_bind2_dec: ∀I1,I2:bind2. Decidable (I1 = I2). +* * /2 width=1 by or_introl/ +@or_intror #H destruct +qed-. + +(* Basic_1: was: flat_dec *) +lemma eq_flat2_dec: ∀I1,I2:flat2. Decidable (I1 = I2). +* * /2 width=1 by or_introl/ +@or_intror #H destruct +qed-. + +(* Basic_1: was: kind_dec *) +lemma eq_item2_dec: ∀I1,I2:item2. Decidable (I1 = I2). +* [ #a1 ] #I1 * [1,3: #a2 ] #I2 +[2,3: @or_intror #H destruct +| elim (eq_bool_dec a1 a2) #Ha + [ elim (eq_bind2_dec I1 I2) /2 width=1 by or_introl/ #HI ] + @or_intror #H destruct /2 width=1 by/ +| elim (eq_flat2_dec I1 I2) /2 width=1 by or_introl/ #HI + @or_intror #H destruct /2 width=1 by/ +] +qed-. + +(* Basic_1: removed theorems 21: + s_S s_plus s_plus_sym s_minus minus_s_s s_le s_lt s_inj s_inc + s_arith0 s_arith1 + r_S r_plus r_plus_sym r_minus r_dis s_r r_arith0 r_arith1 + not_abbr_abst bind_dec_not +*) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv.ma new file mode 100644 index 000000000..5de603568 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv.ma @@ -0,0 +1,68 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/constructors/star_0.ma". +include "basic_2A/notation/constructors/dxbind2_3.ma". +include "basic_2A/notation/constructors/dxabbr_2.ma". +include "basic_2A/notation/constructors/dxabst_2.ma". +include "basic_2A/grammar/term.ma". + +(* LOCAL ENVIRONMENTS *******************************************************) + +(* local environments *) +inductive lenv: Type[0] ≝ +| LAtom: lenv (* empty *) +| LPair: lenv → bind2 → term → lenv (* binary binding construction *) +. + +interpretation "sort (local environment)" + 'Star = LAtom. + +interpretation "local environment binding construction (binary)" + 'DxBind2 L I T = (LPair L I T). + +interpretation "abbreviation (local environment)" + 'DxAbbr L T = (LPair L Abbr T). + +interpretation "abstraction (local environment)" + 'DxAbst L T = (LPair L Abst T). + +(* Basic properties *********************************************************) + +lemma eq_lenv_dec: ∀L1,L2:lenv. Decidable (L1 = L2). +#L1 elim L1 -L1 [| #L1 #I1 #V1 #IHL1 ] * [2,4: #L2 #I2 #V2 ] +[1,4: @or_intror #H destruct +| elim (eq_bind2_dec I1 I2) #HI + [ elim (eq_term_dec V1 V2) #HV + [ elim (IHL1 L2) -IHL1 /2 width=1 by or_introl/ #HL ] + ] + @or_intror #H destruct /2 width=1 by/ +| /2 width=1 by or_introl/ +] +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact destruct_lpair_lpair_aux: ∀I1,I2,L1,L2,V1,V2. L1.ⓑ{I1}V1 = L2.ⓑ{I2}V2 → + ∧∧L1 = L2 & I1 = I2 & V1 = V2. +#I1 #I2 #L1 #L2 #V1 #V2 #H destruct /2 width=1 by and3_intro/ +qed-. + +lemma discr_lpair_x_xy: ∀I,V,L. L = L.ⓑ{I}V → ⊥. +#I #V #L elim L -L +[ #H destruct +| #L #J #W #IHL #H + elim (destruct_lpair_lpair_aux … H) -H #H1 #H2 #H3 destruct /2 width=1 by/ (**) (* destruct lemma needed *) +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv_append.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv_append.ma new file mode 100644 index 000000000..25273f9f2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv_append.ma @@ -0,0 +1,131 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/notation/functions/append_2.ma". +include "basic_2A/notation/functions/snbind2_3.ma". +include "basic_2A/notation/functions/snabbr_2.ma". +include "basic_2A/notation/functions/snabst_2.ma". +include "basic_2A/grammar/lenv_length.ma". + +(* LOCAL ENVIRONMENTS *******************************************************) + +let rec append L K on K ≝ match K with +[ LAtom ⇒ L +| LPair K I V ⇒ (append L K). ⓑ{I} V +]. + +interpretation "append (local environment)" 'Append L1 L2 = (append L1 L2). + +interpretation "local environment tail binding construction (binary)" + 'SnBind2 I T L = (append (LPair LAtom I T) L). + +interpretation "tail abbreviation (local environment)" + 'SnAbbr T L = (append (LPair LAtom Abbr T) L). + +interpretation "tail abstraction (local environment)" + 'SnAbst L T = (append (LPair LAtom Abst T) L). + +definition d_appendable_sn: predicate (lenv→relation term) ≝ λR. + ∀K,T1,T2. R K T1 T2 → ∀L. R (L @@ K) T1 T2. + +(* Basic properties *********************************************************) + +lemma append_atom_sn: ∀L. ⋆ @@ L = L. +#L elim L -L normalize // +qed. + +lemma append_assoc: associative … append. +#L1 #L2 #L3 elim L3 -L3 normalize // +qed. + +lemma append_length: ∀L1,L2. |L1 @@ L2| = |L1| + |L2|. +#L1 #L2 elim L2 -L2 normalize // +qed. + +lemma ltail_length: ∀I,L,V. |ⓑ{I}V.L| = |L| + 1. +#I #L #V >append_length // +qed. + +(* Basic_1: was just: chead_ctail *) +lemma lpair_ltail: ∀L,I,V. ∃∃J,K,W. L.ⓑ{I}V = ⓑ{J}W.K & |L| = |K|. +#L elim L -L /2 width=5 by ex2_3_intro/ +#L #Z #X #IHL #I #V elim (IHL Z X) -IHL +#J #K #W #H #_ >H -H >ltail_length +@(ex2_3_intro … J (K.ⓑ{I}V) W) // +qed-. + +(* Basic inversion lemmas ***************************************************) + +lemma append_inj_sn: ∀K1,K2,L1,L2. L1 @@ K1 = L2 @@ K2 → |K1| = |K2| → + L1 = L2 ∧ K1 = K2. +#K1 elim K1 -K1 +[ * normalize /2 width=1 by conj/ + #K2 #I2 #V2 #L1 #L2 #_ append_length in H2; #H + elim (plus_xySz_x_false … H) +| #K1 #I1 #V1 #IH * normalize + [ #L1 #L2 #H1 #H2 destruct + normalize in H2; >append_length in H2; #H + elim (plus_xySz_x_false … (sym_eq … H)) + | #K2 #I2 #V2 #L1 #L2 #H1 #H2 + elim (destruct_lpair_lpair_aux … H1) -H1 #H1 #H3 #H4 destruct (**) (* destruct lemma needed *) + elim (IH … H1) -IH -H1 /2 width=1 by conj/ + ] +] +qed-. + +lemma append_inv_refl_dx: ∀L,K. L @@ K = L → K = ⋆. +#L #K #H elim (append_inj_dx … (⋆) … H) // +qed-. + +lemma append_inv_pair_dx: ∀I,L,K,V. L @@ K = L.ⓑ{I}V → K = ⋆.ⓑ{I}V. +#I #L #K #V #H elim (append_inj_dx … (⋆.ⓑ{I}V) … H) // +qed-. + +lemma length_inv_pos_dx_ltail: ∀L,l. |L| = l + 1 → + ∃∃I,K,V. |K| = l & L = ⓑ{I}V.K. +#Y #l #H elim (length_inv_pos_dx … H) -H #I #L #V #Hl #HLK destruct +elim (lpair_ltail L I V) /2 width=5 by ex2_3_intro/ +qed-. + +lemma length_inv_pos_sn_ltail: ∀L,l. l + 1 = |L| → + ∃∃I,K,V. l = |K| & L = ⓑ{I}V.K. +#Y #l #H elim (length_inv_pos_sn … H) -H #I #L #V #Hl #HLK destruct +elim (lpair_ltail L I V) /2 width=5 by ex2_3_intro/ +qed-. + +(* Basic eliminators ********************************************************) + +(* Basic_1: was: c_tail_ind *) +lemma lenv_ind_alt: ∀R:predicate lenv. + R (⋆) → (∀I,L,T. R L → R (ⓑ{I}T.L)) → + ∀L. R L. +#R #IH1 #IH2 #L @(f_ind … length … L) -L #x #IHx * // -IH1 +#L #I #V normalize #H destruct elim (lpair_ltail L I V) /3 width=1 by/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv_length.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv_length.ma new file mode 100644 index 000000000..cefc9b049 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv_length.ma @@ -0,0 +1,52 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/lenv.ma". + +(* LENGTH OF A LOCAL ENVIRONMENT ********************************************) + +let rec length L ≝ match L with +[ LAtom ⇒ 0 +| LPair L _ _ ⇒ length L + 1 +]. + +interpretation "length (local environment)" 'card L = (length L). + +(* Basic inversion lemmas ***************************************************) + +lemma length_inv_zero_dx: ∀L. |L| = 0 → L = ⋆. +* // #L #I #V normalize ypred_succ /3 width=1 by lreq_pair/ +| #I1 #I2 #L1 #L2 #V1 #V2 #l #m #_ #IHL12 #m #H + lapply (lreq_inv_succ … H ?) -H // >yplus_succ2 >ypred_succ /3 width=1 by lreq_succ/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/term.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/term.ma new file mode 100644 index 000000000..7dfa16305 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/term.ma @@ -0,0 +1,153 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/constructors/item0_1.ma". +include "basic_2A/notation/constructors/snitem2_3.ma". +include "basic_2A/notation/constructors/snbind2_4.ma". +include "basic_2A/notation/constructors/snbind2pos_3.ma". +include "basic_2A/notation/constructors/snbind2neg_3.ma". +include "basic_2A/notation/constructors/snflat2_3.ma". +include "basic_2A/notation/constructors/star_1.ma". +include "basic_2A/notation/constructors/lref_1.ma". +include "basic_2A/notation/constructors/gref_1.ma". +include "basic_2A/notation/constructors/snabbr_3.ma". +include "basic_2A/notation/constructors/snabbrpos_2.ma". +include "basic_2A/notation/constructors/snabbrneg_2.ma". +include "basic_2A/notation/constructors/snabst_3.ma". +include "basic_2A/notation/constructors/snabstpos_2.ma". +include "basic_2A/notation/constructors/snabstneg_2.ma". +include "basic_2A/notation/constructors/snappl_2.ma". +include "basic_2A/notation/constructors/sncast_2.ma". +include "basic_2A/grammar/item.ma". + +(* TERMS ********************************************************************) + +(* terms *) +inductive term: Type[0] ≝ + | TAtom: item0 → term (* atomic item construction *) + | TPair: item2 → term → term → term (* binary item construction *) +. + +interpretation "term construction (atomic)" + 'Item0 I = (TAtom I). + +interpretation "term construction (binary)" + 'SnItem2 I T1 T2 = (TPair I T1 T2). + +interpretation "term binding construction (binary)" + 'SnBind2 a I T1 T2 = (TPair (Bind2 a I) T1 T2). + +interpretation "term positive binding construction (binary)" + 'SnBind2Pos I T1 T2 = (TPair (Bind2 true I) T1 T2). + +interpretation "term negative binding construction (binary)" + 'SnBind2Neg I T1 T2 = (TPair (Bind2 false I) T1 T2). + +interpretation "term flat construction (binary)" + 'SnFlat2 I T1 T2 = (TPair (Flat2 I) T1 T2). + +interpretation "sort (term)" + 'Star k = (TAtom (Sort k)). + +interpretation "local reference (term)" + 'LRef i = (TAtom (LRef i)). + +interpretation "global reference (term)" + 'GRef p = (TAtom (GRef p)). + +interpretation "abbreviation (term)" + 'SnAbbr a T1 T2 = (TPair (Bind2 a Abbr) T1 T2). + +interpretation "positive abbreviation (term)" + 'SnAbbrPos T1 T2 = (TPair (Bind2 true Abbr) T1 T2). + +interpretation "negative abbreviation (term)" + 'SnAbbrNeg T1 T2 = (TPair (Bind2 false Abbr) T1 T2). + +interpretation "abstraction (term)" + 'SnAbst a T1 T2 = (TPair (Bind2 a Abst) T1 T2). + +interpretation "positive abstraction (term)" + 'SnAbstPos T1 T2 = (TPair (Bind2 true Abst) T1 T2). + +interpretation "negative abstraction (term)" + 'SnAbstNeg T1 T2 = (TPair (Bind2 false Abst) T1 T2). + +interpretation "application (term)" + 'SnAppl T1 T2 = (TPair (Flat2 Appl) T1 T2). + +interpretation "native type annotation (term)" + 'SnCast T1 T2 = (TPair (Flat2 Cast) T1 T2). + +(* Basic properties *********************************************************) + +(* Basic_1: was: term_dec *) +lemma eq_term_dec: ∀T1,T2:term. Decidable (T1 = T2). +#T1 elim T1 -T1 #I1 [| #V1 #T1 #IHV1 #IHT1 ] * #I2 [2,4: #V2 #T2 ] +[1,4: @or_intror #H destruct +| elim (eq_item2_dec I1 I2) #HI + [ elim (IHV1 V2) -IHV1 #HV + [ elim (IHT1 T2) -IHT1 /2 width=1 by or_introl/ #HT ] + ] + @or_intror #H destruct /2 width=1 by/ +| elim (eq_item0_dec I1 I2) /2 width=1 by or_introl/ #HI + @or_intror #H destruct /2 width=1 by/ +] +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact destruct_tatom_tatom_aux: ∀I1,I2. ⓪{I1} = ⓪{I2} → I1 = I2. +#I1 #I2 #H destruct // +qed-. + +fact destruct_tpair_tpair_aux: ∀I1,I2,T1,T2,V1,V2. ②{I1}T1.V1 = ②{I2}T2.V2 → + ∧∧T1 = T2 & I1 = I2 & V1 = V2. +#I1 #I2 #T1 #T2 #V1 #V2 #H destruct /2 width=1 by and3_intro/ +qed-. + +lemma discr_tpair_xy_x: ∀I,T,V. ②{I} V. T = V → ⊥. +#I #T #V elim V -V +[ #J #H destruct +| #J #W #U #IHW #_ #H elim (destruct_tpair_tpair_aux … H) -H /2 width=1 by/ (**) (* destruct lemma needed *) +] +qed-. + +(* Basic_1: was: thead_x_y_y *) +lemma discr_tpair_xy_y: ∀I,V,T. ②{I} V. T = T → ⊥. +#I #V #T elim T -T +[ #J #H destruct +| #J #W #U #_ #IHU #H elim (destruct_tpair_tpair_aux … H) -H /2 width=1 by/ (**) (* destruct lemma needed *) +] +qed-. + +lemma eq_false_inv_tpair_sn: ∀I,V1,T1,V2,T2. + (②{I} V1. T1 = ②{I} V2. T2 → ⊥) → + (V1 = V2 → ⊥) ∨ (V1 = V2 ∧ (T1 = T2 → ⊥)). +#I #V1 #T1 #V2 #T2 #H +elim (eq_term_dec V1 V2) /3 width=1 by or_introl/ #HV12 destruct +@or_intror @conj // #HT12 destruct /2 width=1 by/ +qed-. + +lemma eq_false_inv_tpair_dx: ∀I,V1,T1,V2,T2. + (②{I} V1. T1 = ②{I} V2. T2 → ⊥) → + (T1 = T2 → ⊥) ∨ (T1 = T2 ∧ (V1 = V2 → ⊥)). +#I #V1 #T1 #V2 #T2 #H +elim (eq_term_dec T1 T2) /3 width=1 by or_introl/ #HT12 destruct +@or_intror @conj // #HT12 destruct /2 width=1 by/ +qed-. + +(* Basic_1: removed theorems 3: + not_void_abst not_abbr_void not_abst_void +*) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/term_simple.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/term_simple.ma new file mode 100644 index 000000000..434aea6cc --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/term_simple.ma @@ -0,0 +1,42 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/simple_1.ma". +include "basic_2A/grammar/term.ma". + +(* SIMPLE (NEUTRAL) TERMS ***************************************************) + +inductive simple: predicate term ≝ + | simple_atom: ∀I. simple (⓪{I}) + | simple_flat: ∀I,V,T. simple (ⓕ{I} V. T) +. + +interpretation "simple (term)" 'Simple T = (simple T). + +(* Basic inversion lemmas ***************************************************) + +fact simple_inv_bind_aux: ∀T. 𝐒⦃T⦄ → ∀a,J,W,U. T = ⓑ{a,J} W. U → ⊥. +#T * -T +[ #I #a #J #W #U #H destruct +| #I #V #T #a #J #W #U #H destruct +] +qed. + +lemma simple_inv_bind: ∀a,I,V,T. 𝐒⦃ⓑ{a,I} V. T⦄ → ⊥. +/2 width=7 by simple_inv_bind_aux/ qed-. + +lemma simple_inv_pair: ∀I,V,T. 𝐒⦃②{I}V.T⦄ → ∃J. I = Flat2 J. +* /2 width=2 by ex_intro/ #a #I #V #T #H +elim (simple_inv_bind … H) +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/term_vector.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/term_vector.ma new file mode 100644 index 000000000..f6b163371 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/term_vector.ma @@ -0,0 +1,34 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/lib/list.ma". +include "basic_2A/notation/functions/snapplvector_2.ma". +include "basic_2A/grammar/term_simple.ma". + +(* TERMS ********************************************************************) + +let rec applv Vs T on Vs ≝ + match Vs with + [ nil ⇒ T + | cons hd tl ⇒ ⓐhd. (applv tl T) + ]. + +interpretation "application to vector (term)" + 'SnApplVector Vs T = (applv Vs T). + +(* properties concerning simple terms ***************************************) + +lemma applv_simple: ∀T,Vs. 𝐒⦃T⦄ → 𝐒⦃ⒶVs.T⦄. +#T * // +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/term_weight.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/term_weight.ma new file mode 100644 index 000000000..0bedc4ee0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/term_weight.ma @@ -0,0 +1,38 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/functions/weight_1.ma". +include "basic_2A/grammar/term.ma". + +(* WEIGHT OF A TERM *********************************************************) + +let rec tw T ≝ match T with +[ TAtom _ ⇒ 1 +| TPair _ V T ⇒ tw V + tw T + 1 +]. + +interpretation "weight (term)" 'Weight T = (tw T). + +(* Basic properties *********************************************************) + +(* Basic_1: was: tweight_lt *) +lemma tw_pos: ∀T. 1 ≤ ♯{T}. +#T elim T -T // +qed. + +(* Basic_1: removed theorems 11: + wadd_le wadd_lt wadd_O weight_le weight_eq weight_add_O + weight_add_S tlt_trans tlt_head_sx tlt_head_dx tlt_wf_ind +*) +(* Basic_1: removed local theorems 1: q_ind *) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/tsts.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/tsts.ma new file mode 100644 index 000000000..80311fe76 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/tsts.ma @@ -0,0 +1,108 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/topiso_2.ma". +include "basic_2A/grammar/term_simple.ma". + +(* SAME TOP TERM STRUCTURE **************************************************) + +inductive tsts: relation term ≝ + | tsts_atom: ∀I. tsts (⓪{I}) (⓪{I}) + | tsts_pair: ∀I,V1,V2,T1,T2. tsts (②{I}V1.T1) (②{I}V2.T2) +. + +interpretation "same top structure (term)" 'TopIso T1 T2 = (tsts T1 T2). + +(* Basic inversion lemmas ***************************************************) + +fact tsts_inv_atom1_aux: ∀T1,T2. T1 ≂ T2 → ∀I. T1 = ⓪{I} → T2 = ⓪{I}. +#T1 #T2 * -T1 -T2 // +#J #V1 #V2 #T1 #T2 #I #H destruct +qed-. + +(* Basic_1: was: iso_gen_sort iso_gen_lref *) +lemma tsts_inv_atom1: ∀I,T2. ⓪{I} ≂ T2 → T2 = ⓪{I}. +/2 width=3 by tsts_inv_atom1_aux/ qed-. + +fact tsts_inv_pair1_aux: ∀T1,T2. T1 ≂ T2 → ∀I,W1,U1. T1 = ②{I}W1.U1 → + ∃∃W2,U2. T2 = ②{I}W2. U2. +#T1 #T2 * -T1 -T2 +[ #J #I #W1 #U1 #H destruct +| #J #V1 #V2 #T1 #T2 #I #W1 #U1 #H destruct /2 width=3 by ex1_2_intro/ +] +qed-. + +(* Basic_1: was: iso_gen_head *) +lemma tsts_inv_pair1: ∀I,W1,U1,T2. ②{I}W1.U1 ≂ T2 → + ∃∃W2,U2. T2 = ②{I}W2. U2. +/2 width=5 by tsts_inv_pair1_aux/ qed-. + +fact tsts_inv_atom2_aux: ∀T1,T2. T1 ≂ T2 → ∀I. T2 = ⓪{I} → T1 = ⓪{I}. +#T1 #T2 * -T1 -T2 // +#J #V1 #V2 #T1 #T2 #I #H destruct +qed-. + +lemma tsts_inv_atom2: ∀I,T1. T1 ≂ ⓪{I} → T1 = ⓪{I}. +/2 width=3 by tsts_inv_atom2_aux/ qed-. + +fact tsts_inv_pair2_aux: ∀T1,T2. T1 ≂ T2 → ∀I,W2,U2. T2 = ②{I}W2.U2 → + ∃∃W1,U1. T1 = ②{I}W1.U1. +#T1 #T2 * -T1 -T2 +[ #J #I #W2 #U2 #H destruct +| #J #V1 #V2 #T1 #T2 #I #W2 #U2 #H destruct /2 width=3 by ex1_2_intro/ +] +qed-. + +lemma tsts_inv_pair2: ∀I,T1,W2,U2. T1 ≂ ②{I}W2.U2 → + ∃∃W1,U1. T1 = ②{I}W1.U1. +/2 width=5 by tsts_inv_pair2_aux/ qed-. + +(* Basic properties *********************************************************) + +(* Basic_1: was: iso_refl *) +lemma tsts_refl: reflexive … tsts. +#T elim T -T // +qed. + +lemma tsts_sym: symmetric … tsts. +#T1 #T2 #H elim H -T1 -T2 // +qed-. + +lemma tsts_dec: ∀T1,T2. Decidable (T1 ≂ T2). +* #I1 [2: #V1 #T1 ] * #I2 [2,4: #V2 #T2 ] +[ elim (eq_item2_dec I1 I2) #HI12 + [ destruct /2 width=1 by tsts_pair, or_introl/ + | @or_intror #H + elim (tsts_inv_pair1 … H) -H #V #T #H destruct /2 width=1 by/ + ] +| @or_intror #H + lapply (tsts_inv_atom1 … H) -H #H destruct +| @or_intror #H + lapply (tsts_inv_atom2 … H) -H #H destruct +| elim (eq_item0_dec I1 I2) #HI12 + [ destruct /2 width=1 by or_introl/ + | @or_intror #H + lapply (tsts_inv_atom2 … H) -H #H destruct /2 width=1 by/ + ] +] +qed. + +lemma simple_tsts_repl_dx: ∀T1,T2. T1 ≂ T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄. +#T1 #T2 * -T1 -T2 // +#I #V1 #V2 #T1 #T2 #H +elim (simple_inv_pair … H) -H #J #H destruct // +qed-. + +lemma simple_tsts_repl_sn: ∀T1,T2. T1 ≂ T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄. +/3 width=3 by simple_tsts_repl_dx, tsts_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/tsts_tsts.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/tsts_tsts.ma new file mode 100644 index 000000000..50f829171 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/tsts_tsts.ma @@ -0,0 +1,32 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/tsts.ma". + +(* SAME TOP TERM STRUCTURE **************************************************) + +(* Main properties **********************************************************) + +(* Basic_1: was: iso_trans *) +theorem tsts_trans: Transitive … tsts. +#T1 #T * -T1 -T // +#I #V1 #V #T1 #T #X #H +elim (tsts_inv_pair1 … H) -H #V2 #T2 #H destruct // +qed-. + +theorem tsts_canc_sn: ∀T,T1. T ≂ T1 → ∀T2. T ≂ T2 → T1 ≂ T2. +/3 width=3 by tsts_trans, tsts_sym/ qed-. + +theorem tsts_canc_dx: ∀T1,T. T1 ≂ T → ∀T2. T2 ≂ T → T1 ≂ T2. +/3 width=3 by tsts_trans, tsts_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/tsts_vector.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/tsts_vector.ma new file mode 100644 index 000000000..c53a56dd6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/tsts_vector.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/term_vector.ma". +include "basic_2A/grammar/tsts.ma". + +(* SAME TOP TERM STRUCTURE **************************************************) + +(* Advanced inversion lemmas ************************************************) + +(* Basic_1: was only: iso_flats_lref_bind_false iso_flats_flat_bind_false *) +lemma tsts_inv_bind_applv_simple: ∀a,I,Vs,V2,T1,T2. ⒶVs.T1 ≂ ⓑ{a,I} V2. T2 → + 𝐒⦃T1⦄ → ⊥. +#a #I #Vs #V2 #T1 #T2 #H +elim (tsts_inv_pair2 … H) -H #V0 #T0 +elim Vs -Vs normalize +[ #H destruct #H /2 width=5 by simple_inv_bind/ +| #V #Vs #_ #H destruct +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys.ma new file mode 100644 index 000000000..6f3f953f9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys.ma @@ -0,0 +1,166 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/psubststar_6.ma". +include "basic_2A/substitution/cpy.ma". + +(* CONTEXT-SENSITIVE EXTENDED MULTIPLE SUBSTITUTION FOR TERMS ***************) + +definition cpys: ynat → ynat → relation4 genv lenv term term ≝ + λl,m,G. LTC … (cpy l m G). + +interpretation "context-sensitive extended multiple substritution (term)" + 'PSubstStar G L T1 l m T2 = (cpys l m G L T1 T2). + +(* Basic eliminators ********************************************************) + +lemma cpys_ind: ∀G,L,T1,l,m. ∀R:predicate term. R T1 → + (∀T,T2. ⦃G, L⦄ ⊢ T1 ▶*[l, m] T → ⦃G, L⦄ ⊢ T ▶[l, m] T2 → R T → R T2) → + ∀T2. ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 → R T2. +#G #L #T1 #l #m #R #HT1 #IHT1 #T2 #HT12 +@(TC_star_ind … HT1 IHT1 … HT12) // +qed-. + +lemma cpys_ind_dx: ∀G,L,T2,l,m. ∀R:predicate term. R T2 → + (∀T1,T. ⦃G, L⦄ ⊢ T1 ▶[l, m] T → ⦃G, L⦄ ⊢ T ▶*[l, m] T2 → R T → R T1) → + ∀T1. ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 → R T1. +#G #L #T2 #l #m #R #HT2 #IHT2 #T1 #HT12 +@(TC_star_ind_dx … HT2 IHT2 … HT12) // +qed-. + +(* Basic properties *********************************************************) + +lemma cpy_cpys: ∀G,L,T1,T2,l,m. ⦃G, L⦄ ⊢ T1 ▶[l, m] T2 → ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2. +/2 width=1 by inj/ qed. + +lemma cpys_strap1: ∀G,L,T1,T,T2,l,m. + ⦃G, L⦄ ⊢ T1 ▶*[l, m] T → ⦃G, L⦄ ⊢ T ▶[l, m] T2 → ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2. +normalize /2 width=3 by step/ qed-. + +lemma cpys_strap2: ∀G,L,T1,T,T2,l,m. + ⦃G, L⦄ ⊢ T1 ▶[l, m] T → ⦃G, L⦄ ⊢ T ▶*[l, m] T2 → ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2. +normalize /2 width=3 by TC_strap/ qed-. + +lemma lsuby_cpys_trans: ∀G,l,m. lsub_trans … (cpys l m G) (lsuby l m). +/3 width=5 by lsuby_cpy_trans, LTC_lsub_trans/ +qed-. + +lemma cpys_refl: ∀G,L,l,m. reflexive … (cpys l m G L). +/2 width=1 by cpy_cpys/ qed. + +lemma cpys_bind: ∀G,L,V1,V2,l,m. ⦃G, L⦄ ⊢ V1 ▶*[l, m] V2 → + ∀I,T1,T2. ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ▶*[⫯l, m] T2 → + ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ▶*[l, m] ⓑ{a,I}V2.T2. +#G #L #V1 #V2 #l #m #HV12 @(cpys_ind … HV12) -V2 +[ #I #T1 #T2 #HT12 @(cpys_ind … HT12) -T2 /3 width=5 by cpys_strap1, cpy_bind/ +| /3 width=5 by cpys_strap1, cpy_bind/ +] +qed. + +lemma cpys_flat: ∀G,L,V1,V2,l,m. ⦃G, L⦄ ⊢ V1 ▶*[l, m] V2 → + ∀T1,T2. ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 → + ∀I. ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ▶*[l, m] ⓕ{I}V2.T2. +#G #L #V1 #V2 #l #m #HV12 @(cpys_ind … HV12) -V2 +[ #T1 #T2 #HT12 @(cpys_ind … HT12) -T2 /3 width=5 by cpys_strap1, cpy_flat/ +| /3 width=5 by cpys_strap1, cpy_flat/ +qed. + +lemma cpys_weak: ∀G,L,T1,T2,l1,m1. ⦃G, L⦄ ⊢ T1 ▶*[l1, m1] T2 → + ∀l2,m2. l2 ≤ l1 → l1 + m1 ≤ l2 + m2 → + ⦃G, L⦄ ⊢ T1 ▶*[l2, m2] T2. +#G #L #T1 #T2 #l1 #m1 #H #l1 #l2 #Hl21 #Hlm12 @(cpys_ind … H) -T2 +/3 width=7 by cpys_strap1, cpy_weak/ +qed-. + +lemma cpys_weak_top: ∀G,L,T1,T2,l,m. + ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 → ⦃G, L⦄ ⊢ T1 ▶*[l, |L| - l] T2. +#G #L #T1 #T2 #l #m #H @(cpys_ind … H) -T2 +/3 width=4 by cpys_strap1, cpy_weak_top/ +qed-. + +lemma cpys_weak_full: ∀G,L,T1,T2,l,m. + ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 → ⦃G, L⦄ ⊢ T1 ▶*[0, |L|] T2. +#G #L #T1 #T2 #l #m #H @(cpys_ind … H) -T2 +/3 width=5 by cpys_strap1, cpy_weak_full/ +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma cpys_fwd_up: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶*[lt, mt] U2 → + ∀T1,l,m. ⬆[l, m] T1 ≡ U1 → + l ≤ lt → l + m ≤ lt + mt → + ∃∃T2. ⦃G, L⦄ ⊢ U1 ▶*[l+m, lt+mt-(l+m)] U2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #H #T1 #l #m #HTU1 #Hllt #Hlmlmt @(cpys_ind … H) -U2 +[ /2 width=3 by ex2_intro/ +| -HTU1 #U #U2 #_ #HU2 * #T #HU1 #HTU + elim (cpy_fwd_up … HU2 … HTU) -HU2 -HTU /3 width=3 by cpys_strap1, ex2_intro/ +] +qed-. + +lemma cpys_fwd_tw: ∀G,L,T1,T2,l,m. ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 → ♯{T1} ≤ ♯{T2}. +#G #L #T1 #T2 #l #m #H @(cpys_ind … H) -T2 // +#T #T2 #_ #HT2 #IHT1 lapply (cpy_fwd_tw … HT2) -HT2 +/2 width=3 by transitive_le/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +(* Note: this can be derived from cpys_inv_atom1 *) +lemma cpys_inv_sort1: ∀G,L,T2,k,l,m. ⦃G, L⦄ ⊢ ⋆k ▶*[l, m] T2 → T2 = ⋆k. +#G #L #T2 #k #l #m #H @(cpys_ind … H) -T2 // +#T #T2 #_ #HT2 #IHT1 destruct +>(cpy_inv_sort1 … HT2) -HT2 // +qed-. + +(* Note: this can be derived from cpys_inv_atom1 *) +lemma cpys_inv_gref1: ∀G,L,T2,p,l,m. ⦃G, L⦄ ⊢ §p ▶*[l, m] T2 → T2 = §p. +#G #L #T2 #p #l #m #H @(cpys_ind … H) -T2 // +#T #T2 #_ #HT2 #IHT1 destruct +>(cpy_inv_gref1 … HT2) -HT2 // +qed-. + +lemma cpys_inv_bind1: ∀a,I,G,L,V1,T1,U2,l,m. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ▶*[l, m] U2 → + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶*[l, m] V2 & + ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ▶*[⫯l, m] T2 & + U2 = ⓑ{a,I}V2.T2. +#a #I #G #L #V1 #T1 #U2 #l #m #H @(cpys_ind … H) -U2 +[ /2 width=5 by ex3_2_intro/ +| #U #U2 #_ #HU2 * #V #T #HV1 #HT1 #H destruct + elim (cpy_inv_bind1 … HU2) -HU2 #V2 #T2 #HV2 #HT2 #H + lapply (lsuby_cpy_trans … HT2 (L.ⓑ{I}V1) ?) -HT2 + /3 width=5 by cpys_strap1, lsuby_succ, ex3_2_intro/ +] +qed-. + +lemma cpys_inv_flat1: ∀I,G,L,V1,T1,U2,l,m. ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ▶*[l, m] U2 → + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶*[l, m] V2 & ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 & + U2 = ⓕ{I}V2.T2. +#I #G #L #V1 #T1 #U2 #l #m #H @(cpys_ind … H) -U2 +[ /2 width=5 by ex3_2_intro/ +| #U #U2 #_ #HU2 * #V #T #HV1 #HT1 #H destruct + elim (cpy_inv_flat1 … HU2) -HU2 + /3 width=5 by cpys_strap1, ex3_2_intro/ +] +qed-. + +lemma cpys_inv_refl_O2: ∀G,L,T1,T2,l. ⦃G, L⦄ ⊢ T1 ▶*[l, 0] T2 → T1 = T2. +#G #L #T1 #T2 #l #H @(cpys_ind … H) -T2 // +#T #T2 #_ #HT2 #IHT1 <(cpy_inv_refl_O2 … HT2) -HT2 // +qed-. + +lemma cpys_inv_lift1_eq: ∀G,L,U1,U2. ∀l,m:nat. + ⦃G, L⦄ ⊢ U1 ▶*[l, m] U2 → ∀T1. ⬆[l, m] T1 ≡ U1 → U1 = U2. +#G #L #U1 #U2 #l #m #H #T1 #HTU1 @(cpys_ind … H) -U2 +/2 width=7 by cpy_inv_lift1_eq/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys_alt.ma new file mode 100644 index 000000000..7d1274a91 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys_alt.ma @@ -0,0 +1,102 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/psubststaralt_6.ma". +include "basic_2A/multiple/cpys_lift.ma". + +(* CONTEXT-SENSITIVE EXTENDED MULTIPLE SUBSTITUTION FOR TERMS ***************) + +(* alternative definition of cpys *) +inductive cpysa: ynat → ynat → relation4 genv lenv term term ≝ +| cpysa_atom : ∀I,G,L,l,m. cpysa l m G L (⓪{I}) (⓪{I}) +| cpysa_subst: ∀I,G,L,K,V1,V2,W2,i,l,m. l ≤ yinj i → i < l+m → + ⬇[i] L ≡ K.ⓑ{I}V1 → cpysa 0 (⫰(l+m-i)) G K V1 V2 → + ⬆[0, i+1] V2 ≡ W2 → cpysa l m G L (#i) W2 +| cpysa_bind : ∀a,I,G,L,V1,V2,T1,T2,l,m. + cpysa l m G L V1 V2 → cpysa (⫯l) m G (L.ⓑ{I}V1) T1 T2 → + cpysa l m G L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2) +| cpysa_flat : ∀I,G,L,V1,V2,T1,T2,l,m. + cpysa l m G L V1 V2 → cpysa l m G L T1 T2 → + cpysa l m G L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2) +. + +interpretation + "context-sensitive extended multiple substritution (term) alternative" + 'PSubstStarAlt G L T1 l m T2 = (cpysa l m G L T1 T2). + +(* Basic properties *********************************************************) + +lemma lsuby_cpysa_trans: ∀G,l,m. lsub_trans … (cpysa l m G) (lsuby l m). +#G #l #m #L1 #T1 #T2 #H elim H -G -L1 -T1 -T2 -l -m +[ // +| #I #G #L1 #K1 #V1 #V2 #W2 #i #l #m #Hli #Hilm #HLK1 #_ #HVW2 #IHV12 #L2 #HL12 + elim (lsuby_drop_trans_be … HL12 … HLK1) -HL12 -HLK1 /3 width=7 by cpysa_subst/ +| /4 width=1 by lsuby_succ, cpysa_bind/ +| /3 width=1 by cpysa_flat/ +] +qed-. + +lemma cpysa_refl: ∀G,T,L,l,m. ⦃G, L⦄ ⊢ T ▶▶*[l, m] T. +#G #T elim T -T // +#I elim I -I /2 width=1 by cpysa_bind, cpysa_flat/ +qed. + +lemma cpysa_cpy_trans: ∀G,L,T1,T,l,m. ⦃G, L⦄ ⊢ T1 ▶▶*[l, m] T → + ∀T2. ⦃G, L⦄ ⊢ T ▶[l, m] T2 → ⦃G, L⦄ ⊢ T1 ▶▶*[l, m] T2. +#G #L #T1 #T #l #m #H elim H -G -L -T1 -T -l -m +[ #I #G #L #l #m #X #H + elim (cpy_inv_atom1 … H) -H // * /2 width=7 by cpysa_subst/ +| #I #G #L #K #V1 #V2 #W2 #i #l #m #Hli #Hilm #HLK #_ #HVW2 #IHV12 #T2 #H + lapply (drop_fwd_drop2 … HLK) #H0LK + lapply (cpy_weak … H 0 (l+m) ? ?) -H // #H + elim (cpy_inv_lift1_be … H … H0LK … HVW2) -H -H0LK -HVW2 + /3 width=7 by cpysa_subst, ylt_fwd_le_succ/ +| #a #I #G #L #V1 #V #T1 #T #l #m #_ #_ #IHV1 #IHT1 #X #H + elim (cpy_inv_bind1 … H) -H #V2 #T2 #HV2 #HT2 #H destruct + /5 width=5 by cpysa_bind, lsuby_cpy_trans, lsuby_succ/ +| #I #G #L #V1 #V #T1 #T #l #m #_ #_ #IHV1 #IHT1 #X #H + elim (cpy_inv_flat1 … H) -H #V2 #T2 #HV2 #HT2 #H destruct /3 width=1 by cpysa_flat/ +] +qed-. + +lemma cpys_cpysa: ∀G,L,T1,T2,l,m. ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 → ⦃G, L⦄ ⊢ T1 ▶▶*[l, m] T2. +/3 width=8 by cpysa_cpy_trans, cpys_ind/ qed. + +(* Basic inversion lemmas ***************************************************) + +lemma cpysa_inv_cpys: ∀G,L,T1,T2,l,m. ⦃G, L⦄ ⊢ T1 ▶▶*[l, m] T2 → ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2. +#G #L #T1 #T2 #l #m #H elim H -G -L -T1 -T2 -l -m +/2 width=7 by cpys_subst, cpys_flat, cpys_bind, cpy_cpys/ +qed-. + +(* Advanced eliminators *****************************************************) + +lemma cpys_ind_alt: ∀R:ynat→ynat→relation4 genv lenv term term. + (∀I,G,L,l,m. R l m G L (⓪{I}) (⓪{I})) → + (∀I,G,L,K,V1,V2,W2,i,l,m. l ≤ yinj i → i < l + m → + ⬇[i] L ≡ K.ⓑ{I}V1 → ⦃G, K⦄ ⊢ V1 ▶*[O, ⫰(l+m-i)] V2 → + ⬆[O, i+1] V2 ≡ W2 → R O (⫰(l+m-i)) G K V1 V2 → R l m G L (#i) W2 + ) → + (∀a,I,G,L,V1,V2,T1,T2,l,m. ⦃G, L⦄ ⊢ V1 ▶*[l, m] V2 → + ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ▶*[⫯l, m] T2 → R l m G L V1 V2 → + R (⫯l) m G (L.ⓑ{I}V1) T1 T2 → R l m G L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2) + ) → + (∀I,G,L,V1,V2,T1,T2,l,m. ⦃G, L⦄ ⊢ V1 ▶*[l, m] V2 → + ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 → R l m G L V1 V2 → + R l m G L T1 T2 → R l m G L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2) + ) → + ∀l,m,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 → R l m G L T1 T2. +#R #H1 #H2 #H3 #H4 #l #m #G #L #T1 #T2 #H elim (cpys_cpysa … H) -G -L -T1 -T2 -l -m +/3 width=8 by cpysa_inv_cpys/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys_cpys.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys_cpys.ma new file mode 100644 index 000000000..a01999d3f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys_cpys.ma @@ -0,0 +1,117 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/cpy_cpy.ma". +include "basic_2A/multiple/cpys_alt.ma". + +(* CONTEXT-SENSITIVE EXTENDED MULTIPLE SUBSTITUTION FOR TERMS ***************) + +(* Advanced inversion lemmas ************************************************) + +lemma cpys_inv_SO2: ∀G,L,T1,T2,l. ⦃G, L⦄ ⊢ T1 ▶*[l, 1] T2 → ⦃G, L⦄ ⊢ T1 ▶[l, 1] T2. +#G #L #T1 #T2 #l #H @(cpys_ind … H) -T2 /2 width=3 by cpy_trans_ge/ +qed-. + +(* Advanced properties ******************************************************) + +lemma cpys_strip_eq: ∀G,L,T0,T1,l1,m1. ⦃G, L⦄ ⊢ T0 ▶*[l1, m1] T1 → + ∀T2,l2,m2. ⦃G, L⦄ ⊢ T0 ▶[l2, m2] T2 → + ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[l2, m2] T & ⦃G, L⦄ ⊢ T2 ▶*[l1, m1] T. +normalize /3 width=3 by cpy_conf_eq, TC_strip1/ qed-. + +lemma cpys_strip_neq: ∀G,L1,T0,T1,l1,m1. ⦃G, L1⦄ ⊢ T0 ▶*[l1, m1] T1 → + ∀L2,T2,l2,m2. ⦃G, L2⦄ ⊢ T0 ▶[l2, m2] T2 → + (l1 + m1 ≤ l2 ∨ l2 + m2 ≤ l1) → + ∃∃T. ⦃G, L2⦄ ⊢ T1 ▶[l2, m2] T & ⦃G, L1⦄ ⊢ T2 ▶*[l1, m1] T. +normalize /3 width=3 by cpy_conf_neq, TC_strip1/ qed-. + +lemma cpys_strap1_down: ∀G,L,T1,T0,l1,m1. ⦃G, L⦄ ⊢ T1 ▶*[l1, m1] T0 → + ∀T2,l2,m2. ⦃G, L⦄ ⊢ T0 ▶[l2, m2] T2 → l2 + m2 ≤ l1 → + ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[l2, m2] T & ⦃G, L⦄ ⊢ T ▶*[l1, m1] T2. +normalize /3 width=3 by cpy_trans_down, TC_strap1/ qed. + +lemma cpys_strap2_down: ∀G,L,T1,T0,l1,m1. ⦃G, L⦄ ⊢ T1 ▶[l1, m1] T0 → + ∀T2,l2,m2. ⦃G, L⦄ ⊢ T0 ▶*[l2, m2] T2 → l2 + m2 ≤ l1 → + ∃∃T. ⦃G, L⦄ ⊢ T1 ▶*[l2, m2] T & ⦃G, L⦄ ⊢ T ▶[l1, m1] T2. +normalize /3 width=3 by cpy_trans_down, TC_strap2/ qed-. + +lemma cpys_split_up: ∀G,L,T1,T2,l,m. ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 → + ∀i. l ≤ i → i ≤ l + m → + ∃∃T. ⦃G, L⦄ ⊢ T1 ▶*[l, i - l] T & ⦃G, L⦄ ⊢ T ▶*[i, l + m - i] T2. +#G #L #T1 #T2 #l #m #H #i #Hli #Hilm @(cpys_ind … H) -T2 +[ /2 width=3 by ex2_intro/ +| #T #T2 #_ #HT12 * #T3 #HT13 #HT3 + elim (cpy_split_up … HT12 … Hilm) -HT12 -Hilm #T0 #HT0 #HT02 + elim (cpys_strap1_down … HT3 … HT0) -T /3 width=5 by cpys_strap1, ex2_intro/ + >ymax_pre_sn_comm // +] +qed-. + +lemma cpys_inv_lift1_up: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶*[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + l ≤ lt → lt ≤ yinj l + m → yinj l + m ≤ lt + mt → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[l, lt + mt - (yinj l + m)] T2 & + ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #HU12 #K #s #l #m #HLK #T1 #HTU1 #Hllt #Hltlm #Hlmlmt +elim (cpys_split_up … HU12 (l + m)) -HU12 // -Hlmlmt #U #HU1 #HU2 +lapply (cpys_weak … HU1 l m ? ?) -HU1 // [ >ymax_pre_sn_comm // ] -Hllt -Hltlm #HU1 +lapply (cpys_inv_lift1_eq … HU1 … HTU1) -HU1 #HU1 destruct +elim (cpys_inv_lift1_ge … HU2 … HLK … HTU1) -HU2 -HLK -HTU1 // +>yplus_minus_inj /2 width=3 by ex2_intro/ +qed-. + +(* Main properties **********************************************************) + +theorem cpys_conf_eq: ∀G,L,T0,T1,l1,m1. ⦃G, L⦄ ⊢ T0 ▶*[l1, m1] T1 → + ∀T2,l2,m2. ⦃G, L⦄ ⊢ T0 ▶*[l2, m2] T2 → + ∃∃T. ⦃G, L⦄ ⊢ T1 ▶*[l2, m2] T & ⦃G, L⦄ ⊢ T2 ▶*[l1, m1] T. +normalize /3 width=3 by cpy_conf_eq, TC_confluent2/ qed-. + +theorem cpys_conf_neq: ∀G,L1,T0,T1,l1,m1. ⦃G, L1⦄ ⊢ T0 ▶*[l1, m1] T1 → + ∀L2,T2,l2,m2. ⦃G, L2⦄ ⊢ T0 ▶*[l2, m2] T2 → + (l1 + m1 ≤ l2 ∨ l2 + m2 ≤ l1) → + ∃∃T. ⦃G, L2⦄ ⊢ T1 ▶*[l2, m2] T & ⦃G, L1⦄ ⊢ T2 ▶*[l1, m1] T. +normalize /3 width=3 by cpy_conf_neq, TC_confluent2/ qed-. + +theorem cpys_trans_eq: ∀G,L,T1,T,T2,l,m. + ⦃G, L⦄ ⊢ T1 ▶*[l, m] T → ⦃G, L⦄ ⊢ T ▶*[l, m] T2 → + ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2. +normalize /2 width=3 by trans_TC/ qed-. + +theorem cpys_trans_down: ∀G,L,T1,T0,l1,m1. ⦃G, L⦄ ⊢ T1 ▶*[l1, m1] T0 → + ∀T2,l2,m2. ⦃G, L⦄ ⊢ T0 ▶*[l2, m2] T2 → l2 + m2 ≤ l1 → + ∃∃T. ⦃G, L⦄ ⊢ T1 ▶*[l2, m2] T & ⦃G, L⦄ ⊢ T ▶*[l1, m1] T2. +normalize /3 width=3 by cpy_trans_down, TC_transitive2/ qed-. + +theorem cpys_antisym_eq: ∀G,L1,T1,T2,l,m. ⦃G, L1⦄ ⊢ T1 ▶*[l, m] T2 → + ∀L2. ⦃G, L2⦄ ⊢ T2 ▶*[l, m] T1 → T1 = T2. +#G #L1 #T1 #T2 #l #m #H @(cpys_ind_alt … H) -G -L1 -T1 -T2 // +[ #I1 #G #L1 #K1 #V1 #V2 #W2 #i #l #m #Hli #Hilm #_ #_ #HVW2 #_ #L2 #HW2 + elim (lt_or_ge (|L2|) (i+1)) #Hi [ -Hli -Hilm | ] + [ lapply (cpys_weak_full … HW2) -HW2 #HW2 + lapply (cpys_weak … HW2 0 (i+1) ? ?) -HW2 // + [ >yplus_O1 >yplus_O1 /3 width=1 by ylt_fwd_le, ylt_inj/ ] -Hi + #HW2 >(cpys_inv_lift1_eq … HW2) -HW2 // + | elim (drop_O1_le (Ⓕ) … Hi) -Hi #K2 #HLK2 + elim (cpys_inv_lift1_ge_up … HW2 … HLK2 … HVW2 ? ? ?) -HW2 -HLK2 -HVW2 + /2 width=1 by ylt_fwd_le_succ, yle_succ_dx/ -Hli -Hilm + #X #_ #H elim (lift_inv_lref2_be … H) -H // + ] +| #a #I #G #L1 #V1 #V2 #T1 #T2 #l #m #_ #_ #IHV12 #IHT12 #L2 #H elim (cpys_inv_bind1 … H) -H + #V #T #HV2 #HT2 #H destruct + lapply (IHV12 … HV2) #H destruct -IHV12 -HV2 /3 width=2 by eq_f2/ +| #I #G #L1 #V1 #V2 #T1 #T2 #l #m #_ #_ #IHV12 #IHT12 #L2 #H elim (cpys_inv_flat1 … H) -H + #V #T #HV2 #HT2 #H destruct /3 width=2 by eq_f2/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys_lift.ma new file mode 100644 index 000000000..d3f292a7f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys_lift.ma @@ -0,0 +1,226 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/cpy_lift.ma". +include "basic_2A/multiple/cpys.ma". + +(* CONTEXT-SENSITIVE EXTENDED MULTIPLE SUBSTITUTION FOR TERMS ***************) + +(* Advanced properties ******************************************************) + +lemma cpys_subst: ∀I,G,L,K,V,U1,i,l,m. + l ≤ yinj i → i < l + m → + ⬇[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ▶*[0, ⫰(l+m-i)] U1 → + ∀U2. ⬆[0, i+1] U1 ≡ U2 → ⦃G, L⦄ ⊢ #i ▶*[l, m] U2. +#I #G #L #K #V #U1 #i #l #m #Hli #Hilm #HLK #H @(cpys_ind … H) -U1 +[ /3 width=5 by cpy_cpys, cpy_subst/ +| #U #U1 #_ #HU1 #IHU #U2 #HU12 + elim (lift_total U 0 (i+1)) #U0 #HU0 + lapply (IHU … HU0) -IHU #H + lapply (drop_fwd_drop2 … HLK) -HLK #HLK + lapply (cpy_lift_ge … HU1 … HLK HU0 HU12 ?) -HU1 -HLK -HU0 -HU12 // #HU02 + lapply (cpy_weak … HU02 l m ? ?) -HU02 + [2,3: /2 width=3 by cpys_strap1, yle_succ_dx/ ] + >yplus_O1 ymax_pre_sn_comm /2 width=1 by ylt_fwd_le_succ/ +] +qed. + +lemma cpys_subst_Y2: ∀I,G,L,K,V,U1,i,l. + l ≤ yinj i → + ⬇[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ▶*[0, ∞] U1 → + ∀U2. ⬆[0, i+1] U1 ≡ U2 → ⦃G, L⦄ ⊢ #i ▶*[l, ∞] U2. +#I #G #L #K #V #U1 #i #l #Hli #HLK #HVU1 #U2 #HU12 +@(cpys_subst … HLK … HU12) >yminus_Y_inj // +qed. + +(* Advanced inversion lemmas *************************************************) + +lemma cpys_inv_atom1: ∀I,G,L,T2,l,m. ⦃G, L⦄ ⊢ ⓪{I} ▶*[l, m] T2 → + T2 = ⓪{I} ∨ + ∃∃J,K,V1,V2,i. l ≤ yinj i & i < l + m & + ⬇[i] L ≡ K.ⓑ{J}V1 & + ⦃G, K⦄ ⊢ V1 ▶*[0, ⫰(l+m-i)] V2 & + ⬆[O, i+1] V2 ≡ T2 & + I = LRef i. +#I #G #L #T2 #l #m #H @(cpys_ind … H) -T2 +[ /2 width=1 by or_introl/ +| #T #T2 #_ #HT2 * + [ #H destruct + elim (cpy_inv_atom1 … HT2) -HT2 [ /2 width=1 by or_introl/ | * /3 width=11 by ex6_5_intro, or_intror/ ] + | * #J #K #V1 #V #i #Hli #Hilm #HLK #HV1 #HVT #HI + lapply (drop_fwd_drop2 … HLK) #H + elim (cpy_inv_lift1_ge_up … HT2 … H … HVT) -HT2 -H -HVT + [2,3,4: /2 width=1 by ylt_fwd_le_succ, yle_succ_dx/ ] + /4 width=11 by cpys_strap1, ex6_5_intro, or_intror/ + ] +] +qed-. + +lemma cpys_inv_lref1: ∀G,L,T2,i,l,m. ⦃G, L⦄ ⊢ #i ▶*[l, m] T2 → + T2 = #i ∨ + ∃∃I,K,V1,V2. l ≤ i & i < l + m & + ⬇[i] L ≡ K.ⓑ{I}V1 & + ⦃G, K⦄ ⊢ V1 ▶*[0, ⫰(l+m-i)] V2 & + ⬆[O, i+1] V2 ≡ T2. +#G #L #T2 #i #l #m #H elim (cpys_inv_atom1 … H) -H /2 width=1 by or_introl/ +* #I #K #V1 #V2 #j #Hlj #Hjlm #HLK #HV12 #HVT2 #H destruct /3 width=7 by ex5_4_intro, or_intror/ +qed-. + +lemma cpys_inv_lref1_Y2: ∀G,L,T2,i,l. ⦃G, L⦄ ⊢ #i ▶*[l, ∞] T2 → + T2 = #i ∨ + ∃∃I,K,V1,V2. l ≤ i & ⬇[i] L ≡ K.ⓑ{I}V1 & + ⦃G, K⦄ ⊢ V1 ▶*[0, ∞] V2 & ⬆[O, i+1] V2 ≡ T2. +#G #L #T2 #i #l #H elim (cpys_inv_lref1 … H) -H /2 width=1 by or_introl/ +* >yminus_Y_inj /3 width=7 by or_intror, ex4_4_intro/ +qed-. + +lemma cpys_inv_lref1_drop: ∀G,L,T2,i,l,m. ⦃G, L⦄ ⊢ #i ▶*[l, m] T2 → + ∀I,K,V1. ⬇[i] L ≡ K.ⓑ{I}V1 → + ∀V2. ⬆[O, i+1] V2 ≡ T2 → + ∧∧ ⦃G, K⦄ ⊢ V1 ▶*[0, ⫰(l+m-i)] V2 + & l ≤ i + & i < l + m. +#G #L #T2 #i #l #m #H #I #K #V1 #HLK #V2 #HVT2 elim (cpys_inv_lref1 … H) -H +[ #H destruct elim (lift_inv_lref2_be … HVT2) -HVT2 -HLK // +| * #Z #Y #X1 #X2 #Hli #Hilm #HLY #HX12 #HXT2 + lapply (lift_inj … HXT2 … HVT2) -T2 #H destruct + lapply (drop_mono … HLY … HLK) -L #H destruct + /2 width=1 by and3_intro/ +] +qed-. + +(* Properties on relocation *************************************************) + +lemma cpys_lift_le: ∀G,K,T1,T2,lt,mt. ⦃G, K⦄ ⊢ T1 ▶*[lt, mt] T2 → + ∀L,U1,s,l,m. lt + mt ≤ yinj l → ⬇[s, l, m] L ≡ K → + ⬆[l, m] T1 ≡ U1 → ∀U2. ⬆[l, m] T2 ≡ U2 → + ⦃G, L⦄ ⊢ U1 ▶*[lt, mt] U2. +#G #K #T1 #T2 #lt #mt #H #L #U1 #s #l #m #Hlmtl #HLK #HTU1 @(cpys_ind … H) -T2 +[ #U2 #H >(lift_mono … HTU1 … H) -H // +| -HTU1 #T #T2 #_ #HT2 #IHT #U2 #HTU2 + elim (lift_total T l m) #U #HTU + lapply (IHT … HTU) -IHT #HU1 + lapply (cpy_lift_le … HT2 … HLK HTU HTU2 ?) -HT2 -HLK -HTU -HTU2 /2 width=3 by cpys_strap1/ +] +qed-. + +lemma cpys_lift_be: ∀G,K,T1,T2,lt,mt. ⦃G, K⦄ ⊢ T1 ▶*[lt, mt] T2 → + ∀L,U1,s,l,m. lt ≤ yinj l → l ≤ lt + mt → + ⬇[s, l, m] L ≡ K → ⬆[l, m] T1 ≡ U1 → + ∀U2. ⬆[l, m] T2 ≡ U2 → ⦃G, L⦄ ⊢ U1 ▶*[lt, mt + m] U2. +#G #K #T1 #T2 #lt #mt #H #L #U1 #s #l #m #Hltl #Hllmt #HLK #HTU1 @(cpys_ind … H) -T2 +[ #U2 #H >(lift_mono … HTU1 … H) -H // +| -HTU1 #T #T2 #_ #HT2 #IHT #U2 #HTU2 + elim (lift_total T l m) #U #HTU + lapply (IHT … HTU) -IHT #HU1 + lapply (cpy_lift_be … HT2 … HLK HTU HTU2 ? ?) -HT2 -HLK -HTU -HTU2 /2 width=3 by cpys_strap1/ +] +qed-. + +lemma cpys_lift_ge: ∀G,K,T1,T2,lt,mt. ⦃G, K⦄ ⊢ T1 ▶*[lt, mt] T2 → + ∀L,U1,s,l,m. yinj l ≤ lt → ⬇[s, l, m] L ≡ K → + ⬆[l, m] T1 ≡ U1 → ∀U2. ⬆[l, m] T2 ≡ U2 → + ⦃G, L⦄ ⊢ U1 ▶*[lt+m, mt] U2. +#G #K #T1 #T2 #lt #mt #H #L #U1 #s #l #m #Hllt #HLK #HTU1 @(cpys_ind … H) -T2 +[ #U2 #H >(lift_mono … HTU1 … H) -H // +| -HTU1 #T #T2 #_ #HT2 #IHT #U2 #HTU2 + elim (lift_total T l m) #U #HTU + lapply (IHT … HTU) -IHT #HU1 + lapply (cpy_lift_ge … HT2 … HLK HTU HTU2 ?) -HT2 -HLK -HTU -HTU2 /2 width=3 by cpys_strap1/ +] +qed-. + +(* Inversion lemmas for relocation ******************************************) + +lemma cpys_inv_lift1_le: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶*[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + lt + mt ≤ l → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[lt, mt] T2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #H #K #s #l #m #HLK #T1 #HTU1 #Hlmtl @(cpys_ind … H) -U2 +[ /2 width=3 by ex2_intro/ +| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU + elim (cpy_inv_lift1_le … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/ +] +qed-. + +lemma cpys_inv_lift1_be: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶*[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + lt ≤ l → yinj l + m ≤ lt + mt → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[lt, mt - m] T2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #H #K #s #l #m #HLK #T1 #HTU1 #Hltl #Hlmlmt @(cpys_ind … H) -U2 +[ /2 width=3 by ex2_intro/ +| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU + elim (cpy_inv_lift1_be … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/ +] +qed-. + +lemma cpys_inv_lift1_ge: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶*[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + yinj l + m ≤ lt → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[lt - m, mt] T2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #H #K #s #l #m #HLK #T1 #HTU1 #Hlmlt @(cpys_ind … H) -U2 +[ /2 width=3 by ex2_intro/ +| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU + elim (cpy_inv_lift1_ge … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/ +] +qed-. + +(* Advanced inversion lemmas on relocation **********************************) + +lemma cpys_inv_lift1_ge_up: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶*[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + l ≤ lt → lt ≤ yinj l + m → yinj l + m ≤ lt + mt → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[l, lt + mt - (yinj l + m)] T2 & + ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #H #K #s #l #m #HLK #T1 #HTU1 #Hllt #Hltlm #Hlmlmt @(cpys_ind … H) -U2 +[ /2 width=3 by ex2_intro/ +| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU + elim (cpy_inv_lift1_ge_up … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/ +] +qed-. + +lemma cpys_inv_lift1_be_up: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶*[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + lt ≤ l → lt + mt ≤ yinj l + m → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[lt, l - lt] T2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #H #K #s #l #m #HLK #T1 #HTU1 #Hltl #Hlmtlm @(cpys_ind … H) -U2 +[ /2 width=3 by ex2_intro/ +| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU + elim (cpy_inv_lift1_be_up … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/ +] +qed-. + +lemma cpys_inv_lift1_le_up: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶*[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + lt ≤ l → l ≤ lt + mt → lt + mt ≤ yinj l + m → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[lt, l - lt] T2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #H #K #s #l #m #HLK #T1 #HTU1 #Hltl #Hllmt #Hlmtlm @(cpys_ind … H) -U2 +[ /2 width=3 by ex2_intro/ +| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU + elim (cpy_inv_lift1_le_up … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/ +] +qed-. + +lemma cpys_inv_lift1_subst: ∀G,L,W1,W2,l,m. ⦃G, L⦄ ⊢ W1 ▶*[l, m] W2 → + ∀K,V1,i. ⬇[i+1] L ≡ K → ⬆[O, i+1] V1 ≡ W1 → + l ≤ yinj i → i < l + m → + ∃∃V2. ⦃G, K⦄ ⊢ V1 ▶*[O, ⫰(l+m-i)] V2 & ⬆[O, i+1] V2 ≡ W2. +#G #L #W1 #W2 #l #m #HW12 #K #V1 #i #HLK #HVW1 #Hli #Hilm +elim (cpys_inv_lift1_ge_up … HW12 … HLK … HVW1 ? ? ?) // +>yplus_O1 yplus_SO2 +[ >yminus_succ2 /2 width=3 by ex2_intro/ +| /2 width=1 by ylt_fwd_le_succ1/ +| /2 width=3 by yle_trans/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/drops.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/drops.ma new file mode 100644 index 000000000..a86afce84 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/drops.ma @@ -0,0 +1,122 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/rdropstar_3.ma". +include "basic_2A/notation/relations/rdropstar_4.ma". +include "basic_2A/substitution/drop.ma". +include "basic_2A/multiple/mr2_minus.ma". +include "basic_2A/multiple/lifts_vector.ma". + +(* ITERATED LOCAL ENVIRONMENT SLICING ***************************************) + +inductive drops (s:bool): list2 nat nat → relation lenv ≝ +| drops_nil : ∀L. drops s (◊) L L +| drops_cons: ∀L1,L,L2,cs,l,m. + drops s cs L1 L → ⬇[s, l, m] L ≡ L2 → drops s ({l, m} @ cs) L1 L2 +. + +interpretation "iterated slicing (local environment) abstract" + 'RDropStar s cs T1 T2 = (drops s cs T1 T2). +(* +interpretation "iterated slicing (local environment) general" + 'RDropStar des T1 T2 = (drops true des T1 T2). +*) + +definition d_liftable1: relation2 lenv term → predicate bool ≝ + λR,s. ∀K,T. R K T → ∀L,l,m. ⬇[s, l, m] L ≡ K → + ∀U. ⬆[l, m] T ≡ U → R L U. + +definition d_liftables1: relation2 lenv term → predicate bool ≝ + λR,s. ∀L,K,cs. ⬇*[s, cs] L ≡ K → + ∀T,U. ⬆*[cs] T ≡ U → R K T → R L U. + +definition d_liftables1_all: relation2 lenv term → predicate bool ≝ + λR,s. ∀L,K,cs. ⬇*[s, cs] L ≡ K → + ∀Ts,Us. ⬆*[cs] Ts ≡ Us → + all … (R K) Ts → all … (R L) Us. + +(* Basic inversion lemmas ***************************************************) + +fact drops_inv_nil_aux: ∀L1,L2,s,cs. ⬇*[s, cs] L1 ≡ L2 → cs = ◊ → L1 = L2. +#L1 #L2 #s #cs * -L1 -L2 -cs // +#L1 #L #L2 #l #m #cs #_ #_ #H destruct +qed-. + +(* Basic_1: was: drop1_gen_pnil *) +lemma drops_inv_nil: ∀L1,L2,s. ⬇*[s, ◊] L1 ≡ L2 → L1 = L2. +/2 width=4 by drops_inv_nil_aux/ qed-. + +fact drops_inv_cons_aux: ∀L1,L2,s,cs. ⬇*[s, cs] L1 ≡ L2 → + ∀l,m,tl. cs = {l, m} @ tl → + ∃∃L. ⬇*[s, tl] L1 ≡ L & ⬇[s, l, m] L ≡ L2. +#L1 #L2 #s #cs * -L1 -L2 -cs +[ #L #l #m #tl #H destruct +| #L1 #L #L2 #cs #l #m #HT1 #HT2 #l0 #m0 #tl #H destruct + /2 width=3 by ex2_intro/ +] +qed-. + +(* Basic_1: was: drop1_gen_pcons *) +lemma drops_inv_cons: ∀L1,L2,s,l,m,cs. ⬇*[s, {l, m} @ cs] L1 ≡ L2 → + ∃∃L. ⬇*[s, cs] L1 ≡ L & ⬇[s, l, m] L ≡ L2. +/2 width=3 by drops_inv_cons_aux/ qed-. + +lemma drops_inv_skip2: ∀I,s,cs,cs2,i. cs ▭ i ≡ cs2 → + ∀L1,K2,V2. ⬇*[s, cs2] L1 ≡ K2. ⓑ{I} V2 → + ∃∃K1,V1,cs1. cs + 1 ▭ i + 1 ≡ cs1 + 1 & + ⬇*[s, cs1] K1 ≡ K2 & + ⬆*[cs1] V2 ≡ V1 & + L1 = K1. ⓑ{I} V1. +#I #s #cs #cs2 #i #H elim H -cs -cs2 -i +[ #i #L1 #K2 #V2 #H + >(drops_inv_nil … H) -L1 /2 width=7 by lifts_nil, minuss_nil, ex4_3_intro, drops_nil/ +| #cs #cs2 #l #m #i #Hil #_ #IHcs2 #L1 #K2 #V2 #H + elim (drops_inv_cons … H) -H #L #HL1 #H + elim (drop_inv_skip2 … H) -H /2 width=1 by lt_plus_to_minus_r/ #K #V >minus_plus #HK2 #HV2 #H destruct + elim (IHcs2 … HL1) -IHcs2 -HL1 #K1 #V1 #cs1 #Hcs1 #HK1 #HV1 #X destruct + @(ex4_3_intro … K1 V1 … ) // [3,4: /2 width=7 by lifts_cons, drops_cons/ | skip ] + normalize >plus_minus /3 width=1 by minuss_lt, lt_minus_to_plus/ (**) (* explicit constructors *) +| #cs #cs2 #l #m #i #Hil #_ #IHcs2 #L1 #K2 #V2 #H + elim (IHcs2 … H) -IHcs2 -H #K1 #V1 #cs1 #Hcs1 #HK1 #HV1 #X destruct + /4 width=7 by minuss_ge, ex4_3_intro, le_S_S/ +] +qed-. + +(* Basic properties *********************************************************) + +(* Basic_1: was: drop1_skip_bind *) +lemma drops_skip: ∀L1,L2,s,cs. ⬇*[s, cs] L1 ≡ L2 → ∀V1,V2. ⬆*[cs] V2 ≡ V1 → + ∀I. ⬇*[s, cs + 1] L1.ⓑ{I}V1 ≡ L2.ⓑ{I}V2. +#L1 #L2 #s #cs #H elim H -L1 -L2 -cs +[ #L #V1 #V2 #HV12 #I + >(lifts_inv_nil … HV12) -HV12 // +| #L1 #L #L2 #cs #l #m #_ #HL2 #IHL #V1 #V2 #H #I + elim (lifts_inv_cons … H) -H /3 width=5 by drop_skip, drops_cons/ +]. +qed. + +lemma d1_liftable_liftables: ∀R,s. d_liftable1 R s → d_liftables1 R s. +#R #s #HR #L #K #cs #H elim H -L -K -cs +[ #L #T #U #H #HT <(lifts_inv_nil … H) -H // +| #L1 #L #L2 #cs #l #m #_ #HL2 #IHL #T2 #T1 #H #HLT2 + elim (lifts_inv_cons … H) -H /3 width=10 by/ +] +qed. + +lemma d1_liftables_liftables_all: ∀R,s. d_liftables1 R s → d_liftables1_all R s. +#R #s #HR #L #K #cs #HLK #Ts #Us #H elim H -Ts -Us normalize // +#Ts #Us #T #U #HTU #_ #IHTUs * /3 width=7 by conj/ +qed. + +(* Basic_1: removed theorems 1: drop1_getl_trans *) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/drops_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/drops_drop.ma new file mode 100644 index 000000000..2e938ac75 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/drops_drop.ma @@ -0,0 +1,35 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop_drop.ma". +include "basic_2A/multiple/drops.ma". + +(* ITERATED LOCAL ENVIRONMENT SLICING ***************************************) + +(* Properties concerning basic local environment slicing ********************) + +lemma drops_drop_trans: ∀L1,L,cs. ⬇*[Ⓕ, cs] L1 ≡ L → ∀L2,i. ⬇[i] L ≡ L2 → + ∃∃L0,cs0,i0. ⬇[i0] L1 ≡ L0 & ⬇*[Ⓕ, cs0] L0 ≡ L2 & + @⦃i, cs⦄ ≡ i0 & cs ▭ i ≡ cs0. +#L1 #L #cs #H elim H -L1 -L -cs +[ /2 width=7 by drops_nil, minuss_nil, at_nil, ex4_3_intro/ +| #L1 #L0 #L #cs #l #m #_ #HL0 #IHL0 #L2 #i #HL2 + elim (lt_or_ge i l) #Hil + [ elim (drop_trans_le … HL0 … HL2) -L /2 width=2 by lt_to_le/ + #L #HL0 #HL2 elim (IHL0 … HL0) -L0 /3 width=7 by drops_cons, minuss_lt, at_lt, ex4_3_intro/ + | lapply (drop_trans_ge … HL0 … HL2 ?) -L // #HL02 + elim (IHL0 … HL02) -L0 /3 width=7 by minuss_ge, at_ge, ex4_3_intro/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/drops_drops.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/drops_drops.ma new file mode 100644 index 000000000..03473dc91 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/drops_drops.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/drops_drop.ma". + +(* ITERATED LOCAL ENVIRONMENT SLICING ***************************************) + +(* Main properties **********************************************************) + +(* Basic_1: was: drop1_trans *) +theorem drops_trans: ∀L,L2,s,cs2. ⬇*[s, cs2] L ≡ L2 → ∀L1,cs1. ⬇*[s, cs1] L1 ≡ L → + ⬇*[s, cs2 @@ cs1] L1 ≡ L2. +#L #L2 #s #cs2 #H elim H -L -L2 -cs2 /3 width=3 by drops_cons/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/fleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fleq.ma new file mode 100644 index 000000000..cea4b650e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fleq.ma @@ -0,0 +1,43 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/lazyeq_7.ma". +include "basic_2A/grammar/genv.ma". +include "basic_2A/multiple/lleq.ma". + +(* LAZY EQUIVALENCE FOR CLOSURES ********************************************) + +inductive fleq (l) (G) (L1) (T): relation3 genv lenv term ≝ +| fleq_intro: ∀L2. L1 ≡[T, l] L2 → fleq l G L1 T G L2 T +. + +interpretation + "lazy equivalence (closure)" + 'LazyEq l G1 L1 T1 G2 L2 T2 = (fleq l G1 L1 T1 G2 L2 T2). + +(* Basic properties *********************************************************) + +lemma fleq_refl: ∀l. tri_reflexive … (fleq l). +/2 width=1 by fleq_intro/ qed. + +lemma fleq_sym: ∀l. tri_symmetric … (fleq l). +#l #G1 #L1 #T1 #G2 #L2 #T2 * /3 width=1 by fleq_intro, lleq_sym/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +lemma fleq_inv_gen: ∀G1,G2,L1,L2,T1,T2,l. ⦃G1, L1, T1⦄ ≡[l] ⦃G2, L2, T2⦄ → + ∧∧ G1 = G2 & L1 ≡[T1, l] L2 & T1 = T2. +#G1 #G2 #L1 #L2 #T1 #T2 #l * -G2 -L2 -T2 /2 width=1 by and3_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/fleq_fleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fleq_fleq.ma new file mode 100644 index 000000000..de886f6a4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fleq_fleq.ma @@ -0,0 +1,34 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/lleq_lleq.ma". +include "basic_2A/multiple/fleq.ma". + +(* LAZY EQUIVALENCE FOR CLOSURES *******************************************) + +(* Main properties **********************************************************) + +theorem fleq_trans: ∀l. tri_transitive … (fleq l). +#l #G1 #G #L1 #L #T1 #T * -G -L -T +#L #HT1 #G2 #L2 #T2 * -G2 -L2 -T2 +/3 width=3 by lleq_trans, fleq_intro/ +qed-. + +theorem fleq_canc_sn: ∀G,G1,G2,L,L1,L2,T,T1,T2,l. + ⦃G, L, T⦄ ≡[l] ⦃G1, L1, T1⦄→ ⦃G, L, T⦄ ≡[l] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≡[l] ⦃G2, L2, T2⦄. +/3 width=5 by fleq_trans, fleq_sym/ qed-. + +theorem fleq_canc_dx: ∀G1,G2,G,L1,L2,L,T1,T2,T,l. + ⦃G1, L1, T1⦄ ≡[l] ⦃G, L, T⦄ → ⦃G2, L2, T2⦄ ≡[l] ⦃G, L, T⦄ → ⦃G1, L1, T1⦄ ≡[l] ⦃G2, L2, T2⦄. +/3 width=5 by fleq_trans, fleq_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqup.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqup.ma new file mode 100644 index 000000000..764ba3866 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqup.ma @@ -0,0 +1,109 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/suptermplus_6.ma". +include "basic_2A/substitution/fqu.ma". + +(* PLUS-ITERATED SUPCLOSURE *************************************************) + +definition fqup: tri_relation genv lenv term ≝ tri_TC … fqu. + +interpretation "plus-iterated structural successor (closure)" + 'SupTermPlus G1 L1 T1 G2 L2 T2 = (fqup G1 L1 T1 G2 L2 T2). + +(* Basic properties *********************************************************) + +lemma fqu_fqup: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄. +/2 width=1 by tri_inj/ qed. + +lemma fqup_strap1: ∀G1,G,G2,L1,L,L2,T1,T,T2. + ⦃G1, L1, T1⦄ ⊐+ ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐ ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄. +/2 width=5 by tri_step/ qed. + +lemma fqup_strap2: ∀G1,G,G2,L1,L,L2,T1,T,T2. + ⦃G1, L1, T1⦄ ⊐ ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐+ ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄. +/2 width=5 by tri_TC_strap/ qed. + +lemma fqup_drop: ∀G1,G2,L1,K1,K2,T1,T2,U1,m. ⬇[m] L1 ≡ K1 → ⬆[0, m] T1 ≡ U1 → + ⦃G1, K1, T1⦄ ⊐+ ⦃G2, K2, T2⦄ → ⦃G1, L1, U1⦄ ⊐+ ⦃G2, K2, T2⦄. +#G1 #G2 #L1 #K1 #K2 #T1 #T2 #U1 #m #HLK1 #HTU1 #HT12 elim (eq_or_gt … m) #H destruct +[ >(drop_inv_O2 … HLK1) -L1 <(lift_inv_O2 … HTU1) -U1 // +| /3 width=5 by fqup_strap2, fqu_drop_lt/ +] +qed-. + +lemma fqup_lref: ∀I,G,L,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → ⦃G, L, #i⦄ ⊐+ ⦃G, K, V⦄. +/3 width=6 by fqu_lref_O, fqu_fqup, lift_lref_ge, fqup_drop/ qed. + +lemma fqup_pair_sn: ∀I,G,L,V,T. ⦃G, L, ②{I}V.T⦄ ⊐+ ⦃G, L, V⦄. +/2 width=1 by fqu_pair_sn, fqu_fqup/ qed. + +lemma fqup_bind_dx: ∀a,I,G,L,V,T. ⦃G, L, ⓑ{a,I}V.T⦄ ⊐+ ⦃G, L.ⓑ{I}V, T⦄. +/2 width=1 by fqu_bind_dx, fqu_fqup/ qed. + +lemma fqup_flat_dx: ∀I,G,L,V,T. ⦃G, L, ⓕ{I}V.T⦄ ⊐+ ⦃G, L, T⦄. +/2 width=1 by fqu_flat_dx, fqu_fqup/ qed. + +lemma fqup_flat_dx_pair_sn: ∀I1,I2,G,L,V1,V2,T. ⦃G, L, ⓕ{I1}V1.②{I2}V2.T⦄ ⊐+ ⦃G, L, V2⦄. +/2 width=5 by fqu_pair_sn, fqup_strap1/ qed. + +lemma fqup_bind_dx_flat_dx: ∀a,G,I1,I2,L,V1,V2,T. ⦃G, L, ⓑ{a,I1}V1.ⓕ{I2}V2.T⦄ ⊐+ ⦃G, L.ⓑ{I1}V1, T⦄. +/2 width=5 by fqu_flat_dx, fqup_strap1/ qed. + +lemma fqup_flat_dx_bind_dx: ∀a,I1,I2,G,L,V1,V2,T. ⦃G, L, ⓕ{I1}V1.ⓑ{a,I2}V2.T⦄ ⊐+ ⦃G, L.ⓑ{I2}V2, T⦄. +/2 width=5 by fqu_bind_dx, fqup_strap1/ qed. + +(* Basic eliminators ********************************************************) + +lemma fqup_ind: ∀G1,L1,T1. ∀R:relation3 …. + (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → R G2 L2 T2) → + (∀G,G2,L,L2,T,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐ ⦃G2, L2, T2⦄ → R G L T → R G2 L2 T2) → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → R G2 L2 T2. +#G1 #L1 #T1 #R #IH1 #IH2 #G2 #L2 #T2 #H +@(tri_TC_ind … IH1 IH2 G2 L2 T2 H) +qed-. + +lemma fqup_ind_dx: ∀G2,L2,T2. ∀R:relation3 …. + (∀G1,L1,T1. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → R G1 L1 T1) → + (∀G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ⊐ ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐+ ⦃G2, L2, T2⦄ → R G L T → R G1 L1 T1) → + ∀G1,L1,T1. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → R G1 L1 T1. +#G2 #L2 #T2 #R #IH1 #IH2 #G1 #L1 #T1 #H +@(tri_TC_ind_dx … IH1 IH2 G1 L1 T1 H) +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma fqup_fwd_fw: ∀G1,G2,L1,L2,T1,T2. + ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → ♯{G2, L2, T2} < ♯{G1, L1, T1}. +#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +/3 width=3 by fqu_fwd_fw, transitive_lt/ +qed-. + +(* Advanced eliminators *****************************************************) + +lemma fqup_wf_ind: ∀R:relation3 …. ( + ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → R G2 L2 T2) → + R G1 L1 T1 + ) → ∀G1,L1,T1. R G1 L1 T1. +#R #HR @(f3_ind … fw) #x #IHx #G1 #L1 #T1 #H destruct /4 width=1 by fqup_fwd_fw/ +qed-. + +lemma fqup_wf_ind_eq: ∀R:relation3 …. ( + ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → R G2 L2 T2) → + ∀G2,L2,T2. G1 = G2 → L1 = L2 → T1 = T2 → R G2 L2 T2 + ) → ∀G1,L1,T1. R G1 L1 T1. +#R #HR @(f3_ind … fw) #x #IHx #G1 #L1 #T1 #H destruct /4 width=7 by fqup_fwd_fw/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqup_fqup.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqup_fqup.ma new file mode 100644 index 000000000..642126fee --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqup_fqup.ma @@ -0,0 +1,22 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/fqup.ma". + +(* PLUS-ITERATED SUPCLOSURE *************************************************) + +(* Main properties **********************************************************) + +theorem fqup_trans: tri_transitive … fqup. +/2 width=5 by tri_TC_transitive/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqus.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqus.ma new file mode 100644 index 000000000..d99b4b971 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqus.ma @@ -0,0 +1,83 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/suptermstar_6.ma". +include "basic_2A/substitution/fquq.ma". +include "basic_2A/multiple/fqup.ma". + +(* STAR-ITERATED SUPCLOSURE *************************************************) + +definition fqus: tri_relation genv lenv term ≝ tri_TC … fquq. + +interpretation "star-iterated structural successor (closure)" + 'SupTermStar G1 L1 T1 G2 L2 T2 = (fqus G1 L1 T1 G2 L2 T2). + +(* Basic eliminators ********************************************************) + +lemma fqus_ind: ∀G1,L1,T1. ∀R:relation3 …. R G1 L1 T1 → + (∀G,G2,L,L2,T,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐⸮ ⦃G2, L2, T2⦄ → R G L T → R G2 L2 T2) → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → R G2 L2 T2. +#G1 #L1 #T1 #R #IH1 #IH2 #G2 #L2 #T2 #H +@(tri_TC_star_ind … IH1 IH2 G2 L2 T2 H) // +qed-. + +lemma fqus_ind_dx: ∀G2,L2,T2. ∀R:relation3 …. R G2 L2 T2 → + (∀G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐* ⦃G2, L2, T2⦄ → R G L T → R G1 L1 T1) → + ∀G1,L1,T1. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → R G1 L1 T1. +#G2 #L2 #T2 #R #IH1 #IH2 #G1 #L1 #T1 #H +@(tri_TC_star_ind_dx … IH1 IH2 G1 L1 T1 H) // +qed-. + +(* Basic properties *********************************************************) + +lemma fqus_refl: tri_reflexive … fqus. +/2 width=1 by tri_inj/ qed. + +lemma fquq_fqus: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄. +/2 width=1 by tri_inj/ qed. + +lemma fqus_strap1: ∀G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄. +/2 width=5 by tri_step/ qed-. + +lemma fqus_strap2: ∀G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐* ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄. +/2 width=5 by tri_TC_strap/ qed-. + +lemma fqus_drop: ∀G1,G2,K1,K2,T1,T2. ⦃G1, K1, T1⦄ ⊐* ⦃G2, K2, T2⦄ → + ∀L1,U1,m. ⬇[m] L1 ≡ K1 → ⬆[0, m] T1 ≡ U1 → + ⦃G1, L1, U1⦄ ⊐* ⦃G2, K2, T2⦄. +#G1 #G2 #K1 #K2 #T1 #T2 #H @(fqus_ind … H) -G2 -K2 -T2 +/3 width=5 by fqus_strap1, fquq_fqus, fquq_drop/ +qed-. + +lemma fqup_fqus: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +/3 width=5 by fqus_strap1, fquq_fqus, fqu_fquq/ +qed. + +(* Basic forward lemmas *****************************************************) + +lemma fqus_fwd_fw: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → ♯{G2, L2, T2} ≤ ♯{G1, L1, T1}. +#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -L2 -T2 +/3 width=3 by fquq_fwd_fw, transitive_le/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +lemma fqup_inv_step_sn: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ∃∃G,L,T. ⦃G1, L1, T1⦄ ⊐ ⦃G, L, T⦄ & ⦃G, L, T⦄ ⊐* ⦃G2, L2, T2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1 /2 width=5 by ex2_3_intro/ +#G1 #G #L1 #L #T1 #T #H1 #_ * /4 width=9 by fqus_strap2, fqu_fquq, ex2_3_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqus_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqus_alt.ma new file mode 100644 index 000000000..e9f707d1f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqus_alt.ma @@ -0,0 +1,61 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/fquq_alt.ma". +include "basic_2A/multiple/fqus.ma". + +(* STAR-ITERATED SUPCLOSURE *************************************************) + +(* Advanced inversion lemmas ************************************************) + +lemma fqus_inv_gen: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ ∨ (∧∧ G1 = G2 & L1 = L2 & T1 = T2). +#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -G2 -L2 -T2 // +#G #G2 #L #L2 #T #T2 #_ #H2 * elim (fquq_inv_gen … H2) -H2 +[ /3 width=5 by fqup_strap1, or_introl/ +| * #HG #HL #HT destruct /2 width=1 by or_introl/ +| #H2 * #HG #HL #HT destruct /3 width=1 by fqu_fqup, or_introl/ +| * #H1G #H1L #H1T * #H2G #H2L #H2T destruct /2 width=1 by or_intror/ +] +qed-. + +(* Advanced properties ******************************************************) + +lemma fqus_strap1_fqu: ∀G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐ ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄. +#G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 elim (fqus_inv_gen … H1) -H1 +[ /2 width=5 by fqup_strap1/ +| * #HG #HL #HT destruct /2 width=1 by fqu_fqup/ +] +qed-. + +lemma fqus_strap2_fqu: ∀G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐* ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄. +#G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 elim (fqus_inv_gen … H2) -H2 +[ /2 width=5 by fqup_strap2/ +| * #HG #HL #HT destruct /2 width=1 by fqu_fqup/ +] +qed-. + +lemma fqus_fqup_trans: ∀G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐+ ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄. +#G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 @(fqup_ind … H2) -H2 -G2 -L2 -T2 +/2 width=5 by fqus_strap1_fqu, fqup_strap1/ +qed-. + +lemma fqup_fqus_trans: ∀G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G, L, T⦄ → + ⦃G, L, T⦄ ⊐* ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄. +#G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 @(fqup_ind_dx … H1) -H1 -G1 -L1 -T1 +/3 width=5 by fqus_strap2_fqu, fqup_strap2/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqus_fqus.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqus_fqus.ma new file mode 100644 index 000000000..b14bd7548 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqus_fqus.ma @@ -0,0 +1,22 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/fqus.ma". + +(* STAR-ITERATED SUPCLOSURE *************************************************) + +(* Main properties **********************************************************) + +theorem fqus_trans: tri_transitive … fqus. +/2 width=5 by tri_TC_transitive/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/frees.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/frees.ma new file mode 100644 index 000000000..7a26437f6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/frees.ma @@ -0,0 +1,163 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_plus.ma". +include "basic_2A/notation/relations/freestar_4.ma". +include "basic_2A/substitution/lift_neg.ma". +include "basic_2A/substitution/drop.ma". + +(* CONTEXT-SENSITIVE FREE VARIABLES *****************************************) + +inductive frees: relation4 ynat lenv term nat ≝ +| frees_eq: ∀L,U,l,i. (∀T. ⬆[i, 1] T ≡ U → ⊥) → frees l L U i +| frees_be: ∀I,L,K,U,W,l,i,j. l ≤ yinj j → j < i → + (∀T. ⬆[j, 1] T ≡ U → ⊥) → ⬇[j]L ≡ K.ⓑ{I}W → + frees 0 K W (i-j-1) → frees l L U i. + +interpretation + "context-sensitive free variables (term)" + 'FreeStar L i l U = (frees l L U i). + +definition frees_trans: predicate (relation3 lenv term term) ≝ + λR. ∀L,U1,U2,i. R L U1 U2 → L ⊢ i ϵ 𝐅*[0]⦃U2⦄ → L ⊢ i ϵ 𝐅*[0]⦃U1⦄. + +(* Basic inversion lemmas ***************************************************) + +lemma frees_inv: ∀L,U,l,i. L ⊢ i ϵ 𝐅*[l]⦃U⦄ → + (∀T. ⬆[i, 1] T ≡ U → ⊥) ∨ + ∃∃I,K,W,j. l ≤ yinj j & j < i & (∀T. ⬆[j, 1] T ≡ U → ⊥) & + ⬇[j]L ≡ K.ⓑ{I}W & K ⊢ (i-j-1) ϵ 𝐅*[yinj 0]⦃W⦄. +#L #U #l #i * -L -U -l -i /4 width=9 by ex5_4_intro, or_intror, or_introl/ +qed-. + +lemma frees_inv_sort: ∀L,l,i,k. L ⊢ i ϵ 𝐅*[l]⦃⋆k⦄ → ⊥. +#L #l #i #k #H elim (frees_inv … H) -H [|*] /2 width=2 by/ +qed-. + +lemma frees_inv_gref: ∀L,l,i,p. L ⊢ i ϵ 𝐅*[l]⦃§p⦄ → ⊥. +#L #l #i #p #H elim (frees_inv … H) -H [|*] /2 width=2 by/ +qed-. + +lemma frees_inv_lref: ∀L,l,j,i. L ⊢ i ϵ 𝐅*[l]⦃#j⦄ → + j = i ∨ + ∃∃I,K,W. l ≤ yinj j & j < i & ⬇[j] L ≡ K.ⓑ{I}W & K ⊢ (i-j-1) ϵ 𝐅*[yinj 0]⦃W⦄. +#L #l #x #i #H elim (frees_inv … H) -H +[ /4 width=2 by nlift_inv_lref_be_SO, or_introl/ +| * #I #K #W #j #Hlj #Hji #Hnx #HLK #HW + >(nlift_inv_lref_be_SO … Hnx) -x /3 width=5 by ex4_3_intro, or_intror/ +] +qed-. + +lemma frees_inv_lref_free: ∀L,l,j,i. L ⊢ i ϵ 𝐅*[l]⦃#j⦄ → |L| ≤ j → j = i. +#L #l #j #i #H #Hj elim (frees_inv_lref … H) -H // +* #I #K #W #_ #_ #HLK lapply (drop_fwd_length_lt2 … HLK) -I +#H elim (lt_refl_false j) /2 width=3 by lt_to_le_to_lt/ +qed-. + +lemma frees_inv_lref_skip: ∀L,l,j,i. L ⊢ i ϵ 𝐅*[l]⦃#j⦄ → yinj j < l → j = i. +#L #l #j #i #H #Hjl elim (frees_inv_lref … H) -H // +* #I #K #W #Hlj elim (ylt_yle_false … Hlj) -Hlj // +qed-. + +lemma frees_inv_lref_ge: ∀L,l,j,i. L ⊢ i ϵ 𝐅*[l]⦃#j⦄ → i ≤ j → j = i. +#L #l #j #i #H #Hij elim (frees_inv_lref … H) -H // +* #I #K #W #_ #Hji elim (lt_refl_false j) -I -L -K -W -l /2 width=3 by lt_to_le_to_lt/ +qed-. + +lemma frees_inv_lref_lt: ∀L,l,j,i.L ⊢ i ϵ 𝐅*[l]⦃#j⦄ → j < i → + ∃∃I,K,W. l ≤ yinj j & ⬇[j] L ≡ K.ⓑ{I}W & K ⊢ (i-j-1) ϵ 𝐅*[yinj 0]⦃W⦄. +#L #l #j #i #H #Hji elim (frees_inv_lref … H) -H +[ #H elim (lt_refl_false j) // +| * /2 width=5 by ex3_3_intro/ +] +qed-. + +lemma frees_inv_bind: ∀a,I,L,W,U,l,i. L ⊢ i ϵ 𝐅*[l]⦃ⓑ{a,I}W.U⦄ → + L ⊢ i ϵ 𝐅*[l]⦃W⦄ ∨ L.ⓑ{I}W ⊢ i+1 ϵ 𝐅*[⫯l]⦃U⦄ . +#a #J #L #V #U #l #i #H elim (frees_inv … H) -H +[ #HnX elim (nlift_inv_bind … HnX) -HnX + /4 width=2 by frees_eq, or_intror, or_introl/ +| * #I #K #W #j #Hlj #Hji #HnX #HLK #HW elim (nlift_inv_bind … HnX) -HnX + [ /4 width=9 by frees_be, or_introl/ + | #HnT @or_intror @(frees_be … HnT) -HnT + [4,5,6: /2 width=1 by drop_drop, yle_succ, lt_minus_to_plus/ + |7: >minus_plus_plus_l // + |*: skip + ] + ] +] +qed-. + +lemma frees_inv_flat: ∀I,L,W,U,l,i. L ⊢ i ϵ 𝐅*[l]⦃ⓕ{I}W.U⦄ → + L ⊢ i ϵ 𝐅*[l]⦃W⦄ ∨ L ⊢ i ϵ 𝐅*[l]⦃U⦄ . +#J #L #V #U #l #i #H elim (frees_inv … H) -H +[ #HnX elim (nlift_inv_flat … HnX) -HnX + /4 width=2 by frees_eq, or_intror, or_introl/ +| * #I #K #W #j #Hlj #Hji #HnX #HLK #HW elim (nlift_inv_flat … HnX) -HnX + /4 width=9 by frees_be, or_intror, or_introl/ +] +qed-. + +(* Basic properties *********************************************************) + +lemma frees_lref_eq: ∀L,l,i. L ⊢ i ϵ 𝐅*[l]⦃#i⦄. +/3 width=7 by frees_eq, lift_inv_lref2_be/ qed. + +lemma frees_lref_be: ∀I,L,K,W,l,i,j. l ≤ yinj j → j < i → ⬇[j]L ≡ K.ⓑ{I}W → + K ⊢ i-j-1 ϵ 𝐅*[0]⦃W⦄ → L ⊢ i ϵ 𝐅*[l]⦃#j⦄. +/3 width=9 by frees_be, lift_inv_lref2_be/ qed. + +lemma frees_bind_sn: ∀a,I,L,W,U,l,i. L ⊢ i ϵ 𝐅*[l]⦃W⦄ → + L ⊢ i ϵ 𝐅*[l]⦃ⓑ{a,I}W.U⦄. +#a #I #L #W #U #l #i #H elim (frees_inv … H) -H [|*] +/4 width=9 by frees_be, frees_eq, nlift_bind_sn/ +qed. + +lemma frees_bind_dx: ∀a,I,L,W,U,l,i. L.ⓑ{I}W ⊢ i+1 ϵ 𝐅*[⫯l]⦃U⦄ → + L ⊢ i ϵ 𝐅*[l]⦃ⓑ{a,I}W.U⦄. +#a #J #L #V #U #l #i #H elim (frees_inv … H) -H +[ /4 width=9 by frees_eq, nlift_bind_dx/ +| * #I #K #W #j #Hlj #Hji #HnU #HLK #HW + elim (yle_inv_succ1 … Hlj) -Hlj (plus_minus_m_m j 1) in HnU; // (minus_plus_m_m (|K2|) 1) >H0 -H0 /2 width=1 by monotonic_le_minus_l2/ +] +qed. + +(* Inversion lemmas on append for local environments ************************) + +fact frees_inv_append_aux: ∀L,U,l,i. L ⊢ i ϵ 𝐅*[l]⦃U⦄ → ∀L1,L2. L = L1 @@ L2 → + i ≤ |L2| → L2 ⊢ i ϵ 𝐅*[l]⦃U⦄. +#L #U #l #i #H elim H -L -U -l -i /3 width=2 by frees_eq/ +#Z #L #Y #U #X #l #i #j #Hlj #Hji #HnU #HLY #_ #IHW #L1 #L2 #H #Hi destruct +elim (drop_O1_lt (Ⓕ) L2 j) [2: -Z -Y -L1 -X -U -l /2 width=3 by lt_to_le_to_lt/ ] +#I #K2 #W #HLK2 lapply (drop_fwd_length_minus2 … HLK2) normalize #H0 +lapply (drop_O1_inv_append1_le … HLY … HLK2) -HLY +[ -Z -I -Y -K2 -L1 -X -U -W -l /3 width=3 by lt_to_le, lt_to_le_to_lt/ +| normalize #H destruct + @(frees_be … HnU HLK2) -HnU -HLK2 // @IHW -IHW // + >(minus_plus_m_m (|K2|) 1) >H0 -H0 /2 width=1 by monotonic_le_minus_l2/ +] +qed-. + +lemma frees_inv_append: ∀L1,L2,U,l,i. L1 @@ L2 ⊢ i ϵ 𝐅*[l]⦃U⦄ → + i ≤ |L2| → L2 ⊢ i ϵ 𝐅*[l]⦃U⦄. +/2 width=4 by frees_inv_append_aux/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/frees_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/frees_lift.ma new file mode 100644 index 000000000..8a4fe4092 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/frees_lift.ma @@ -0,0 +1,160 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop_drop.ma". +include "basic_2A/multiple/frees.ma". + +(* CONTEXT-SENSITIVE FREE VARIABLES *****************************************) + +(* Advanced properties ******************************************************) + +lemma frees_dec: ∀L,U,l,i. Decidable (frees l L U i). +#L #U @(f2_ind … rfw … L U) -L -U +#x #IH #L * * +[ -IH /3 width=5 by frees_inv_sort, or_intror/ +| #j #Hx #l #i elim (lt_or_eq_or_gt i j) #Hji + [ -x @or_intror #H elim (lt_refl_false i) + lapply (frees_inv_lref_ge … H ?) -L -l /2 width=1 by lt_to_le/ + | -x /2 width=1 by or_introl/ + | elim (ylt_split j l) #Hli + [ -x @or_intror #H elim (lt_refl_false i) + lapply (frees_inv_lref_skip … H ?) -L // + | elim (lt_or_ge j (|L|)) #Hj + [ elim (drop_O1_lt (Ⓕ) L j) // -Hj #I #K #W #HLK destruct + elim (IH K W … 0 (i-j-1)) -IH [1,3: /3 width=5 by frees_lref_be, drop_fwd_rfw, or_introl/ ] #HnW + @or_intror #H elim (frees_inv_lref_lt … H) // #Z #Y #X #_ #HLY -l + lapply (drop_mono … HLY … HLK) -L #H destruct /2 width=1 by/ + | -x @or_intror #H elim (lt_refl_false i) + lapply (frees_inv_lref_free … H ?) -l // + ] + ] + ] +| -IH /3 width=5 by frees_inv_gref, or_intror/ +| #a #I #W #U #Hx #l #i destruct + elim (IH L W … l i) [1,3: /3 width=1 by frees_bind_sn, or_introl/ ] #HnW + elim (IH (L.ⓑ{I}W) U … (⫯l) (i+1)) -IH [1,3: /3 width=1 by frees_bind_dx, or_introl/ ] #HnU + @or_intror #H elim (frees_inv_bind … H) -H /2 width=1 by/ +| #I #W #U #Hx #l #i destruct + elim (IH L W … l i) [1,3: /3 width=1 by frees_flat_sn, or_introl/ ] #HnW + elim (IH L U … l i) -IH [1,3: /3 width=1 by frees_flat_dx, or_introl/ ] #HnU + @or_intror #H elim (frees_inv_flat … H) -H /2 width=1 by/ +] +qed-. + +lemma frees_S: ∀L,U,l,i. L ⊢ i ϵ 𝐅*[yinj l]⦃U⦄ → ∀I,K,W. ⬇[l] L ≡ K.ⓑ{I}W → + (K ⊢ i-l-1 ϵ 𝐅*[0]⦃W⦄ → ⊥) → L ⊢ i ϵ 𝐅*[⫯l]⦃U⦄. +#L #U #l #i #H elim (frees_inv … H) -H /3 width=2 by frees_eq/ +* #I #K #W #j #Hlj #Hji #HnU #HLK #HW #I0 #K0 #W0 #HLK0 #HnW0 +lapply (yle_inv_inj … Hlj) -Hlj #Hlj +elim (le_to_or_lt_eq … Hlj) -Hlj +[ -I0 -K0 -W0 /3 width=9 by frees_be, yle_inj/ +| -Hji -HnU #H destruct + lapply (drop_mono … HLK0 … HLK) #H destruct -I + elim HnW0 -L -U -HnW0 // +] +qed. + +(* Note: lemma 1250 *) +lemma frees_bind_dx_O: ∀a,I,L,W,U,i. L.ⓑ{I}W ⊢ i+1 ϵ 𝐅*[0]⦃U⦄ → + L ⊢ i ϵ 𝐅*[0]⦃ⓑ{a,I}W.U⦄. +#a #I #L #W #U #i #HU elim (frees_dec L W 0 i) +/4 width=5 by frees_S, frees_bind_dx, frees_bind_sn/ +qed. + +(* Properties on relocation *************************************************) + +lemma frees_lift_ge: ∀K,T,l,i. K ⊢ i ϵ𝐅*[l]⦃T⦄ → + ∀L,s,l0,m0. ⬇[s, l0, m0] L ≡ K → + ∀U. ⬆[l0, m0] T ≡ U → l0 ≤ i → + L ⊢ i+m0 ϵ 𝐅*[l]⦃U⦄. +#K #T #l #i #H elim H -K -T -l -i +[ #K #T #l #i #HnT #L #s #l0 #m0 #_ #U #HTU #Hl0i -K -s + @frees_eq #X #HXU elim (lift_div_le … HTU … HXU) -U /2 width=2 by/ +| #I #K #K0 #T #V #l #i #j #Hlj #Hji #HnT #HK0 #HV #IHV #L #s #l0 #m0 #HLK #U #HTU #Hl0i + elim (lt_or_ge j l0) #H1 + [ elim (drop_trans_lt … HLK … HK0) // -K #L0 #W #HL0 #HLK0 #HVW + @(frees_be … HL0) -HL0 -HV + /3 width=3 by lt_plus_to_minus_r, lt_to_le_to_lt/ + [ #X #HXU >(plus_minus_m_m l0 1) in HTU; /2 width=2 by ltn_to_ltO/ #HTU + elim (lift_div_le … HXU … HTU ?) -U /2 width=2 by monotonic_pred/ + | >minus_plus commutative_plus -HLK0 #HLK0 + @(frees_be … HLK0) -HLK0 -IHV + /2 width=1 by yle_plus_dx1_trans, lt_minus_to_plus/ + #X #HXU elim (lift_div_le … HTU … HXU) -U /2 width=2 by/ + ] +] +qed. + +(* Inversion lemmas on relocation *******************************************) + +lemma frees_inv_lift_be: ∀L,U,l,i. L ⊢ i ϵ 𝐅*[l]⦃U⦄ → + ∀K,s,l0,m0. ⬇[s, l0, m0+1] L ≡ K → + ∀T. ⬆[l0, m0+1] T ≡ U → l0 ≤ i → i ≤ l0 + m0 → ⊥. +#L #U #l #i #H elim H -L -U -l -i +[ #L #U #l #i #HnU #K #s #l0 #m0 #_ #T #HTU #Hl0i #Hilm0 + elim (lift_split … HTU i m0) -HTU /2 width=2 by/ +| #I #L #K0 #U #W #l #i #j #Hli #Hij #HnU #HLK0 #_ #IHW #K #s #l0 #m0 #HLK #T #HTU #Hl0i #Hilm0 + elim (lt_or_ge j l0) #H1 + [ elim (drop_conf_lt … HLK … HLK0) -L // #L0 #V #H #HKL0 #HVW + @(IHW … HKL0 … HVW) + [ /2 width=1 by monotonic_le_minus_l2/ + | >minus_plus >minus_plus >plus_minus /2 width=1 by monotonic_le_minus_l/ + ] + | elim (lift_split … HTU j m0) -HTU /3 width=3 by lt_to_le_to_lt, lt_to_le/ + ] +] +qed-. + +lemma frees_inv_lift_ge: ∀L,U,l,i. L ⊢ i ϵ 𝐅*[l]⦃U⦄ → + ∀K,s,l0,m0. ⬇[s, l0, m0] L ≡ K → + ∀T. ⬆[l0, m0] T ≡ U → l0 + m0 ≤ i → + K ⊢ i-m0 ϵ𝐅*[l-yinj m0]⦃T⦄. +#L #U #l #i #H elim H -L -U -l -i +[ #L #U #l #i #HnU #K #s #l0 #m0 #HLK #T #HTU #Hlm0i -L -s + elim (le_inv_plus_l … Hlm0i) -Hlm0i #Hl0im0 #Hm0i @frees_eq #X #HXT -K + elim (lift_trans_le … HXT … HTU) -T // minus_plus >minus_plus >plus_minus /2 width=1 by monotonic_le_minus_l/ + ] + | elim (lt_or_ge j (l0+m0)) [ >commutative_plus |] #H2 + [ -L -I -W lapply (lt_plus_to_minus ???? H2) // -H2 #H2 + elim (lift_split … HTU j (m0-1)) -HTU // + [ >minus_minus_associative /2 width=2 by ltn_to_ltO/ commutative_plus /3 width=1 by le_minus_to_plus, monotonic_pred/ + ] + | lapply (drop_conf_ge … HLK … HLK0 ?) // -L #HK0 + elim (le_inv_plus_l … H2) -H2 #H2 #Hm0j + @(frees_be … HK0) + [ /2 width=1 by monotonic_yle_minus_dx/ + | /2 width=1 by monotonic_lt_minus_l/ + | #X #HXT elim (lift_trans_le … HXT … HTU) -T // arith_b1 /2 width=5 by/ + ] + ] + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/frees_lreq.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/frees_lreq.ma new file mode 100644 index 000000000..c2f4be016 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/frees_lreq.ma @@ -0,0 +1,32 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop_lreq.ma". +include "basic_2A/multiple/frees.ma". + +(* CONTEXT-SENSITIVE FREE VARIABLES *****************************************) + +(* Properties on equivalence for local environments *************************) + +lemma lreq_frees_trans: ∀L2,U,l,i. L2 ⊢ i ϵ 𝐅*[l]⦃U⦄ → + ∀L1. L1 ⩬[l, ∞] L2 → L1 ⊢ i ϵ 𝐅*[l]⦃U⦄. +#L2 #U #l #i #H elim H -L2 -U -l -i /3 width=2 by frees_eq/ +#I2 #L2 #K2 #U #W2 #l #i #j #Hlj #Hji #HnU #HLK2 #_ #IHW2 #L1 #HL12 +elim (lreq_drop_trans_be … HL12 … HLK2) -L2 // >yminus_Y_inj #K1 #HK12 #HLK1 +lapply (lreq_inv_O_Y … HK12) -HK12 #H destruct /3 width=9 by frees_be/ +qed-. + +lemma frees_lreq_conf: ∀L1,U,l,i. L1 ⊢ i ϵ 𝐅*[l]⦃U⦄ → + ∀L2. L1 ⩬[l, ∞] L2 → L2 ⊢ i ϵ 𝐅*[l]⦃U⦄. +/3 width=3 by lreq_sym, lreq_frees_trans/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts.ma new file mode 100644 index 000000000..407a8d810 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts.ma @@ -0,0 +1,150 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/rliftstar_3.ma". +include "basic_2A/substitution/lift.ma". +include "basic_2A/multiple/mr2_plus.ma". + +(* GENERIC TERM RELOCATION **************************************************) + +inductive lifts: list2 nat nat → relation term ≝ +| lifts_nil : ∀T. lifts (◊) T T +| lifts_cons: ∀T1,T,T2,cs,l,m. + ⬆[l,m] T1 ≡ T → lifts cs T T2 → lifts ({l, m} @ cs) T1 T2 +. + +interpretation "generic relocation (term)" + 'RLiftStar cs T1 T2 = (lifts cs T1 T2). + +(* Basic inversion lemmas ***************************************************) + +fact lifts_inv_nil_aux: ∀T1,T2,cs. ⬆*[cs] T1 ≡ T2 → cs = ◊ → T1 = T2. +#T1 #T2 #cs * -T1 -T2 -cs // +#T1 #T #T2 #l #m #cs #_ #_ #H destruct +qed-. + +lemma lifts_inv_nil: ∀T1,T2. ⬆*[◊] T1 ≡ T2 → T1 = T2. +/2 width=3 by lifts_inv_nil_aux/ qed-. + +fact lifts_inv_cons_aux: ∀T1,T2,cs. ⬆*[cs] T1 ≡ T2 → + ∀l,m,tl. cs = {l, m} @ tl → + ∃∃T. ⬆[l, m] T1 ≡ T & ⬆*[tl] T ≡ T2. +#T1 #T2 #cs * -T1 -T2 -cs +[ #T #l #m #tl #H destruct +| #T1 #T #T2 #cs #l #m #HT1 #HT2 #l0 #m0 #tl #H destruct + /2 width=3 by ex2_intro/ +qed-. + +lemma lifts_inv_cons: ∀T1,T2,l,m,cs. ⬆*[{l, m} @ cs] T1 ≡ T2 → + ∃∃T. ⬆[l, m] T1 ≡ T & ⬆*[cs] T ≡ T2. +/2 width=3 by lifts_inv_cons_aux/ qed-. + +(* Basic_1: was: lift1_sort *) +lemma lifts_inv_sort1: ∀T2,k,cs. ⬆*[cs] ⋆k ≡ T2 → T2 = ⋆k. +#T2 #k #cs elim cs -cs +[ #H <(lifts_inv_nil … H) -H // +| #l #m #cs #IH #H + elim (lifts_inv_cons … H) -H #X #H + >(lift_inv_sort1 … H) -H /2 width=1 by/ +] +qed-. + +(* Basic_1: was: lift1_lref *) +lemma lifts_inv_lref1: ∀T2,cs,i1. ⬆*[cs] #i1 ≡ T2 → + ∃∃i2. @⦃i1, cs⦄ ≡ i2 & T2 = #i2. +#T2 #cs elim cs -cs +[ #i1 #H <(lifts_inv_nil … H) -H /2 width=3 by at_nil, ex2_intro/ +| #l #m #cs #IH #i1 #H + elim (lifts_inv_cons … H) -H #X #H1 #H2 + elim (lift_inv_lref1 … H1) -H1 * #Hli1 #H destruct + elim (IH … H2) -IH -H2 /3 width=3 by at_lt, at_ge, ex2_intro/ +] +qed-. + +lemma lifts_inv_gref1: ∀T2,p,cs. ⬆*[cs] §p ≡ T2 → T2 = §p. +#T2 #p #cs elim cs -cs +[ #H <(lifts_inv_nil … H) -H // +| #l #m #cs #IH #H + elim (lifts_inv_cons … H) -H #X #H + >(lift_inv_gref1 … H) -H /2 width=1 by/ +] +qed-. + +(* Basic_1: was: lift1_bind *) +lemma lifts_inv_bind1: ∀a,I,T2,cs,V1,U1. ⬆*[cs] ⓑ{a,I} V1. U1 ≡ T2 → + ∃∃V2,U2. ⬆*[cs] V1 ≡ V2 & ⬆*[cs + 1] U1 ≡ U2 & + T2 = ⓑ{a,I} V2. U2. +#a #I #T2 #cs elim cs -cs +[ #V1 #U1 #H + <(lifts_inv_nil … H) -H /2 width=5 by ex3_2_intro, lifts_nil/ +| #l #m #cs #IHcs #V1 #U1 #H + elim (lifts_inv_cons … H) -H #X #H #HT2 + elim (lift_inv_bind1 … H) -H #V #U #HV1 #HU1 #H destruct + elim (IHcs … HT2) -IHcs -HT2 #V2 #U2 #HV2 #HU2 #H destruct + /3 width=5 by ex3_2_intro, lifts_cons/ +] +qed-. + +(* Basic_1: was: lift1_flat *) +lemma lifts_inv_flat1: ∀I,T2,cs,V1,U1. ⬆*[cs] ⓕ{I} V1. U1 ≡ T2 → + ∃∃V2,U2. ⬆*[cs] V1 ≡ V2 & ⬆*[cs] U1 ≡ U2 & + T2 = ⓕ{I} V2. U2. +#I #T2 #cs elim cs -cs +[ #V1 #U1 #H + <(lifts_inv_nil … H) -H /2 width=5 by ex3_2_intro, lifts_nil/ +| #l #m #cs #IHcs #V1 #U1 #H + elim (lifts_inv_cons … H) -H #X #H #HT2 + elim (lift_inv_flat1 … H) -H #V #U #HV1 #HU1 #H destruct + elim (IHcs … HT2) -IHcs -HT2 #V2 #U2 #HV2 #HU2 #H destruct + /3 width=5 by ex3_2_intro, lifts_cons/ +] +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lifts_simple_dx: ∀T1,T2,cs. ⬆*[cs] T1 ≡ T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄. +#T1 #T2 #cs #H elim H -T1 -T2 -cs /3 width=5 by lift_simple_dx/ +qed-. + +lemma lifts_simple_sn: ∀T1,T2,cs. ⬆*[cs] T1 ≡ T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄. +#T1 #T2 #cs #H elim H -T1 -T2 -cs /3 width=5 by lift_simple_sn/ +qed-. + +(* Basic properties *********************************************************) + +lemma lifts_bind: ∀a,I,T2,V1,V2,cs. ⬆*[cs] V1 ≡ V2 → + ∀T1. ⬆*[cs + 1] T1 ≡ T2 → + ⬆*[cs] ⓑ{a,I} V1. T1 ≡ ⓑ{a,I} V2. T2. +#a #I #T2 #V1 #V2 #cs #H elim H -V1 -V2 -cs +[ #V #T1 #H >(lifts_inv_nil … H) -H // +| #V1 #V #V2 #cs #l #m #HV1 #_ #IHV #T1 #H + elim (lifts_inv_cons … H) -H /3 width=3 by lift_bind, lifts_cons/ +] +qed. + +lemma lifts_flat: ∀I,T2,V1,V2,cs. ⬆*[cs] V1 ≡ V2 → + ∀T1. ⬆*[cs] T1 ≡ T2 → + ⬆*[cs] ⓕ{I} V1. T1 ≡ ⓕ{I} V2. T2. +#I #T2 #V1 #V2 #cs #H elim H -V1 -V2 -cs +[ #V #T1 #H >(lifts_inv_nil … H) -H // +| #V1 #V #V2 #cs #l #m #HV1 #_ #IHV #T1 #H + elim (lifts_inv_cons … H) -H /3 width=3 by lift_flat, lifts_cons/ +] +qed. + +lemma lifts_total: ∀cs,T1. ∃T2. ⬆*[cs] T1 ≡ T2. +#cs elim cs -cs /2 width=2 by lifts_nil, ex_intro/ +#l #m #cs #IH #T1 elim (lift_total T1 l m) +#T #HT1 elim (IH T) -IH /3 width=4 by lifts_cons, ex_intro/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_lift.ma new file mode 100644 index 000000000..52f1a6395 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_lift.ma @@ -0,0 +1,59 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lift_lift.ma". +include "basic_2A/multiple/mr2_minus.ma". +include "basic_2A/multiple/lifts.ma". + +(* GENERIC TERM RELOCATION **************************************************) + +(* Properties concerning basic term relocation ******************************) + +(* Basic_1: was: lift1_xhg (right to left) *) +lemma lifts_lift_trans_le: ∀T1,T,cs. ⬆*[cs] T1 ≡ T → ∀T2. ⬆[0, 1] T ≡ T2 → + ∃∃T0. ⬆[0, 1] T1 ≡ T0 & ⬆*[cs + 1] T0 ≡ T2. +#T1 #T #cs #H elim H -T1 -T -cs +[ /2 width=3 by lifts_nil, ex2_intro/ +| #T1 #T3 #T #cs #l #m #HT13 #_ #IHT13 #T2 #HT2 + elim (IHT13 … HT2) -T #T #HT3 #HT2 + elim (lift_trans_le … HT13 … HT3) -T3 /3 width=5 by lifts_cons, ex2_intro/ +] +qed-. + +(* Basic_1: was: lift1_free (right to left) *) +lemma lifts_lift_trans: ∀cs,i,i0. @⦃i, cs⦄ ≡ i0 → + ∀cs0. cs + 1 ▭ i + 1 ≡ cs0 + 1 → + ∀T1,T0. ⬆*[cs0] T1 ≡ T0 → + ∀T2. ⬆[O, i0 + 1] T0 ≡ T2 → + ∃∃T. ⬆[0, i + 1] T1 ≡ T & ⬆*[cs] T ≡ T2. +#cs elim cs -cs normalize +[ #i #x #H1 #cs0 #H2 #T1 #T0 #HT10 #T2 + <(at_inv_nil … H1) -x #HT02 + lapply (minuss_inv_nil1 … H2) -H2 #H + >(pluss_inv_nil2 … H) in HT10; -cs0 #H + >(lifts_inv_nil … H) -T1 /2 width=3 by lifts_nil, ex2_intro/ +| #l #m #cs #IHcs #i #i0 #H1 #cs0 #H2 #T1 #T0 #HT10 #T2 #HT02 + elim (at_inv_cons … H1) -H1 * #Hil #Hi0 + [ elim (minuss_inv_cons1_lt … H2) -H2 [2: /2 width=1 by lt_minus_to_plus/ ] #cs1 #Hcs1 minus_plus #HT1 #HT0 + elim (IHcs … Hi0 … Hcs1 … HT0 … HT02) -IHcs -Hi0 -Hcs1 -T0 #T0 #HT0 #HT02 + elim (lift_trans_le … HT1 … HT0) -T /2 width=1 by/ #T #HT1 commutative_plus in Hi0; #Hi0 + lapply (minuss_inv_cons1_ge … H2 ?) -H2 [ /2 width=1 by le_S_S/ ] (liftv_inv_nil1 … H) -T1s /2 width=3 by liftsv_nil, liftv_nil, ex2_intro/ +| #T1s #Ts #T1 #T #HT1 #_ #IHT1s #X #H + elim (liftv_inv_cons1 … H) -H #T2 #T2s #HT2 #HT2s #H destruct + elim (IHT1s … HT2s) -Ts #Ts #HT1s #HT2s + elim (lifts_lift_trans_le … HT1 … HT2) -T /3 width=5 by liftsv_cons, liftv_cons, ex2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_lifts.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_lifts.ma new file mode 100644 index 000000000..5d27e9d10 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_lifts.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/lifts_lift.ma". + +(* GENERIC RELOCATION *******************************************************) + +(* Main properties **********************************************************) + +(* Basic_1: was: lift1_lift1 (left to right) *) +theorem lifts_trans: ∀T1,T,cs1. ⬆*[cs1] T1 ≡ T → ∀T2:term. ∀cs2. ⬆*[cs2] T ≡ T2 → + ⬆*[cs1 @@ cs2] T1 ≡ T2. +#T1 #T #cs1 #H elim H -T1 -T -cs1 /3 width=3 by lifts_cons/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_vector.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_vector.ma new file mode 100644 index 000000000..5d7cc9885 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_vector.ma @@ -0,0 +1,53 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lift_vector.ma". +include "basic_2A/multiple/lifts.ma". + +(* GENERIC TERM VECTOR RELOCATION *******************************************) + +inductive liftsv (cs:list2 nat nat) : relation (list term) ≝ +| liftsv_nil : liftsv cs (◊) (◊) +| liftsv_cons: ∀T1s,T2s,T1,T2. + ⬆*[cs] T1 ≡ T2 → liftsv cs T1s T2s → + liftsv cs (T1 @ T1s) (T2 @ T2s) +. + +interpretation "generic relocation (vector)" + 'RLiftStar cs T1s T2s = (liftsv cs T1s T2s). + +(* Basic inversion lemmas ***************************************************) + +(* Basic_1: was: lifts1_flat (left to right) *) +lemma lifts_inv_applv1: ∀V1s,U1,T2,cs. ⬆*[cs] Ⓐ V1s. U1 ≡ T2 → + ∃∃V2s,U2. ⬆*[cs] V1s ≡ V2s & ⬆*[cs] U1 ≡ U2 & + T2 = Ⓐ V2s. U2. +#V1s elim V1s -V1s normalize +[ #T1 #T2 #cs #HT12 + @ex3_2_intro [3,4: // |1,2: skip | // ] (**) (* explicit constructor *) +| #V1 #V1s #IHV1s #T1 #X #cs #H + elim (lifts_inv_flat1 … H) -H #V2 #Y #HV12 #HY #H destruct + elim (IHV1s … HY) -IHV1s -HY #V2s #T2 #HV12s #HT12 #H destruct + @(ex3_2_intro) [4: // |3: /2 width=2 by liftsv_cons/ |1,2: skip | // ] (**) (* explicit constructor *) +] +qed-. + +(* Basic properties *********************************************************) + +(* Basic_1: was: lifts1_flat (right to left) *) +lemma lifts_applv: ∀V1s,V2s,cs. ⬆*[cs] V1s ≡ V2s → + ∀T1,T2. ⬆*[cs] T1 ≡ T2 → + ⬆*[cs] Ⓐ V1s. T1 ≡ Ⓐ V2s. T2. +#V1s #V2s #cs #H elim H -V1s -V2s /3 width=1 by lifts_flat/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq.ma new file mode 100644 index 000000000..f8c737dc5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq.ma @@ -0,0 +1,160 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/lazyeq_4.ma". +include "basic_2A/multiple/llpx_sn.ma". + +(* LAZY EQUIVALENCE FOR LOCAL ENVIRONMENTS **********************************) + +definition ceq: relation3 lenv term term ≝ λL,T1,T2. T1 = T2. + +definition lleq: relation4 ynat term lenv lenv ≝ llpx_sn ceq. + +interpretation + "lazy equivalence (local environment)" + 'LazyEq T l L1 L2 = (lleq l T L1 L2). + +definition lleq_transitive: predicate (relation3 lenv term term) ≝ + λR. ∀L2,T1,T2. R L2 T1 T2 → ∀L1. L1 ≡[T1, 0] L2 → R L1 T1 T2. + +(* Basic inversion lemmas ***************************************************) + +lemma lleq_ind: ∀R:relation4 ynat term lenv lenv. ( + ∀L1,L2,l,k. |L1| = |L2| → R l (⋆k) L1 L2 + ) → ( + ∀L1,L2,l,i. |L1| = |L2| → yinj i < l → R l (#i) L1 L2 + ) → ( + ∀I,L1,L2,K1,K2,V,l,i. l ≤ yinj i → + ⬇[i] L1 ≡ K1.ⓑ{I}V → ⬇[i] L2 ≡ K2.ⓑ{I}V → + K1 ≡[V, yinj O] K2 → R (yinj O) V K1 K2 → R l (#i) L1 L2 + ) → ( + ∀L1,L2,l,i. |L1| = |L2| → |L1| ≤ i → |L2| ≤ i → R l (#i) L1 L2 + ) → ( + ∀L1,L2,l,p. |L1| = |L2| → R l (§p) L1 L2 + ) → ( + ∀a,I,L1,L2,V,T,l. + L1 ≡[V, l]L2 → L1.ⓑ{I}V ≡[T, ⫯l] L2.ⓑ{I}V → + R l V L1 L2 → R (⫯l) T (L1.ⓑ{I}V) (L2.ⓑ{I}V) → R l (ⓑ{a,I}V.T) L1 L2 + ) → ( + ∀I,L1,L2,V,T,l. + L1 ≡[V, l]L2 → L1 ≡[T, l] L2 → + R l V L1 L2 → R l T L1 L2 → R l (ⓕ{I}V.T) L1 L2 + ) → + ∀l,T,L1,L2. L1 ≡[T, l] L2 → R l T L1 L2. +#R #H1 #H2 #H3 #H4 #H5 #H6 #H7 #l #T #L1 #L2 #H elim H -L1 -L2 -T -l /2 width=8 by/ +qed-. + +lemma lleq_inv_bind: ∀a,I,L1,L2,V,T,l. L1 ≡[ⓑ{a,I}V.T, l] L2 → + L1 ≡[V, l] L2 ∧ L1.ⓑ{I}V ≡[T, ⫯l] L2.ⓑ{I}V. +/2 width=2 by llpx_sn_inv_bind/ qed-. + +lemma lleq_inv_flat: ∀I,L1,L2,V,T,l. L1 ≡[ⓕ{I}V.T, l] L2 → + L1 ≡[V, l] L2 ∧ L1 ≡[T, l] L2. +/2 width=2 by llpx_sn_inv_flat/ qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lleq_fwd_length: ∀L1,L2,T,l. L1 ≡[T, l] L2 → |L1| = |L2|. +/2 width=4 by llpx_sn_fwd_length/ qed-. + +lemma lleq_fwd_lref: ∀L1,L2,l,i. L1 ≡[#i, l] L2 → + ∨∨ |L1| ≤ i ∧ |L2| ≤ i + | yinj i < l + | ∃∃I,K1,K2,V. ⬇[i] L1 ≡ K1.ⓑ{I}V & + ⬇[i] L2 ≡ K2.ⓑ{I}V & + K1 ≡[V, yinj 0] K2 & l ≤ yinj i. +#L1 #L2 #l #i #H elim (llpx_sn_fwd_lref … H) /2 width=1 by or3_intro0, or3_intro1/ +* /3 width=7 by or3_intro2, ex4_4_intro/ +qed-. + +lemma lleq_fwd_drop_sn: ∀L1,L2,T,l. L1 ≡[l, T] L2 → ∀K1,i. ⬇[i] L1 ≡ K1 → + ∃K2. ⬇[i] L2 ≡ K2. +/2 width=7 by llpx_sn_fwd_drop_sn/ qed-. + +lemma lleq_fwd_drop_dx: ∀L1,L2,T,l. L1 ≡[l, T] L2 → ∀K2,i. ⬇[i] L2 ≡ K2 → + ∃K1. ⬇[i] L1 ≡ K1. +/2 width=7 by llpx_sn_fwd_drop_dx/ qed-. + +lemma lleq_fwd_bind_sn: ∀a,I,L1,L2,V,T,l. + L1 ≡[ⓑ{a,I}V.T, l] L2 → L1 ≡[V, l] L2. +/2 width=4 by llpx_sn_fwd_bind_sn/ qed-. + +lemma lleq_fwd_bind_dx: ∀a,I,L1,L2,V,T,l. + L1 ≡[ⓑ{a,I}V.T, l] L2 → L1.ⓑ{I}V ≡[T, ⫯l] L2.ⓑ{I}V. +/2 width=2 by llpx_sn_fwd_bind_dx/ qed-. + +lemma lleq_fwd_flat_sn: ∀I,L1,L2,V,T,l. + L1 ≡[ⓕ{I}V.T, l] L2 → L1 ≡[V, l] L2. +/2 width=3 by llpx_sn_fwd_flat_sn/ qed-. + +lemma lleq_fwd_flat_dx: ∀I,L1,L2,V,T,l. + L1 ≡[ⓕ{I}V.T, l] L2 → L1 ≡[T, l] L2. +/2 width=3 by llpx_sn_fwd_flat_dx/ qed-. + +(* Basic properties *********************************************************) + +lemma lleq_sort: ∀L1,L2,l,k. |L1| = |L2| → L1 ≡[⋆k, l] L2. +/2 width=1 by llpx_sn_sort/ qed. + +lemma lleq_skip: ∀L1,L2,l,i. yinj i < l → |L1| = |L2| → L1 ≡[#i, l] L2. +/2 width=1 by llpx_sn_skip/ qed. + +lemma lleq_lref: ∀I,L1,L2,K1,K2,V,l,i. l ≤ yinj i → + ⬇[i] L1 ≡ K1.ⓑ{I}V → ⬇[i] L2 ≡ K2.ⓑ{I}V → + K1 ≡[V, 0] K2 → L1 ≡[#i, l] L2. +/2 width=9 by llpx_sn_lref/ qed. + +lemma lleq_free: ∀L1,L2,l,i. |L1| ≤ i → |L2| ≤ i → |L1| = |L2| → L1 ≡[#i, l] L2. +/2 width=1 by llpx_sn_free/ qed. + +lemma lleq_gref: ∀L1,L2,l,p. |L1| = |L2| → L1 ≡[§p, l] L2. +/2 width=1 by llpx_sn_gref/ qed. + +lemma lleq_bind: ∀a,I,L1,L2,V,T,l. + L1 ≡[V, l] L2 → L1.ⓑ{I}V ≡[T, ⫯l] L2.ⓑ{I}V → + L1 ≡[ⓑ{a,I}V.T, l] L2. +/2 width=1 by llpx_sn_bind/ qed. + +lemma lleq_flat: ∀I,L1,L2,V,T,l. + L1 ≡[V, l] L2 → L1 ≡[T, l] L2 → L1 ≡[ⓕ{I}V.T, l] L2. +/2 width=1 by llpx_sn_flat/ qed. + +lemma lleq_refl: ∀l,T. reflexive … (lleq l T). +/2 width=1 by llpx_sn_refl/ qed. + +lemma lleq_Y: ∀L1,L2,T. |L1| = |L2| → L1 ≡[T, ∞] L2. +/2 width=1 by llpx_sn_Y/ qed. + +lemma lleq_sym: ∀l,T. symmetric … (lleq l T). +#l #T #L1 #L2 #H @(lleq_ind … H) -l -T -L1 -L2 +/2 width=7 by lleq_sort, lleq_skip, lleq_lref, lleq_free, lleq_gref, lleq_bind, lleq_flat/ +qed-. + +lemma lleq_ge_up: ∀L1,L2,U,lt. L1 ≡[U, lt] L2 → + ∀T,l,m. ⬆[l, m] T ≡ U → + lt ≤ l + m → L1 ≡[U, l] L2. +/2 width=6 by llpx_sn_ge_up/ qed-. + +lemma lleq_ge: ∀L1,L2,T,l1. L1 ≡[T, l1] L2 → ∀l2. l1 ≤ l2 → L1 ≡[T, l2] L2. +/2 width=3 by llpx_sn_ge/ qed-. + +lemma lleq_bind_O: ∀a,I,L1,L2,V,T. L1 ≡[V, 0] L2 → L1.ⓑ{I}V ≡[T, 0] L2.ⓑ{I}V → + L1 ≡[ⓑ{a,I}V.T, 0] L2. +/2 width=1 by llpx_sn_bind_O/ qed-. + +(* Advanceded properties on lazy pointwise extensions ************************) + +lemma llpx_sn_lrefl: ∀R. (∀L. reflexive … (R L)) → + ∀L1,L2,T,l. L1 ≡[T, l] L2 → llpx_sn R l T L1 L2. +/2 width=3 by llpx_sn_co/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_alt.ma new file mode 100644 index 000000000..97061d9b5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_alt.ma @@ -0,0 +1,41 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/llpx_sn_alt.ma". +include "basic_2A/multiple/lleq.ma". + +(* LAZY EQUIVALENCE FOR LOCAL ENVIRONMENTS **********************************) + +(* Alternative definition (not recursive) ***********************************) + +theorem lleq_intro_alt: ∀L1,L2,T,l. |L1| = |L2| → + (∀I1,I2,K1,K2,V1,V2,i. l ≤ yinj i → L1 ⊢ i ϵ 𝐅*[l]⦃T⦄ → + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → + I1 = I2 ∧ V1 = V2 + ) → L1 ≡[T, l] L2. +#L1 #L2 #T #l #HL12 #IH @llpx_sn_alt_inv_llpx_sn @conj // -HL12 +#I1 #I2 #K1 #K2 #V1 #V2 #i #Hil #HnT #HLK1 #HLK2 +@(IH … HnT HLK1 HLK2) -IH -HnT -HLK1 -HLK2 // +qed. + +theorem lleq_inv_alt: ∀L1,L2,T,l. L1 ≡[T, l] L2 → + |L1| = |L2| ∧ + ∀I1,I2,K1,K2,V1,V2,i. l ≤ yinj i → L1 ⊢ i ϵ 𝐅*[l]⦃T⦄ → + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → + I1 = I2 ∧ V1 = V2. +#L1 #L2 #T #l #H elim (llpx_sn_llpx_sn_alt … H) -H +#HL12 #IH @conj // +#I1 #I2 #K1 #K2 #V1 #V2 #i #Hil #HnT #HLK1 #HLK2 +@(IH … HnT HLK1 HLK2) -IH -HnT -HLK1 -HLK2 // +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_alt_rec.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_alt_rec.ma new file mode 100644 index 000000000..92a5ce66b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_alt_rec.ma @@ -0,0 +1,54 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/llpx_sn_alt_rec.ma". +include "basic_2A/multiple/lleq.ma". + +(* LAZY EQUIVALENCE FOR LOCAL ENVIRONMENTS **********************************) + +(* Alternative definition (recursive) ***************************************) + +theorem lleq_intro_alt_r: ∀L1,L2,T,l. |L1| = |L2| → + (∀I1,I2,K1,K2,V1,V2,i. l ≤ yinj i → (∀U. ⬆[i, 1] U ≡ T → ⊥) → + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → + ∧∧ I1 = I2 & V1 = V2 & K1 ≡[V1, 0] K2 + ) → L1 ≡[T, l] L2. +#L1 #L2 #T #l #HL12 #IH @llpx_sn_intro_alt_r // -HL12 +#I1 #I2 #K1 #K2 #V1 #V2 #i #Hil #HnT #HLK1 #HLK2 +elim (IH … HnT HLK1 HLK2) -IH -HnT -HLK1 -HLK2 /2 width=1 by and3_intro/ +qed. + +theorem lleq_ind_alt_r: ∀S:relation4 ynat term lenv lenv. + (∀L1,L2,T,l. |L1| = |L2| → ( + ∀I1,I2,K1,K2,V1,V2,i. l ≤ yinj i → (∀U. ⬆[i, 1] U ≡ T → ⊥) → + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → + ∧∧ I1 = I2 & V1 = V2 & K1 ≡[V1, 0] K2 & S 0 V1 K1 K2 + ) → S l T L1 L2) → + ∀L1,L2,T,l. L1 ≡[T, l] L2 → S l T L1 L2. +#S #IH1 #L1 #L2 #T #l #H @(llpx_sn_ind_alt_r … H) -L1 -L2 -T -l +#L1 #L2 #T #l #HL12 #IH2 @IH1 -IH1 // -HL12 +#I1 #I2 #K1 #K2 #V1 #V2 #i #Hil #HnT #HLK1 #HLK2 +elim (IH2 … HnT HLK1 HLK2) -IH2 -HnT -HLK1 -HLK2 /2 width=1 by and4_intro/ +qed-. + +theorem lleq_inv_alt_r: ∀L1,L2,T,l. L1 ≡[T, l] L2 → + |L1| = |L2| ∧ + ∀I1,I2,K1,K2,V1,V2,i. l ≤ yinj i → (∀U. ⬆[i, 1] U ≡ T → ⊥) → + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → + ∧∧ I1 = I2 & V1 = V2 & K1 ≡[V1, 0] K2. +#L1 #L2 #T #l #H elim (llpx_sn_inv_alt_r … H) -H +#HL12 #IH @conj // +#I1 #I2 #K1 #K2 #V1 #V2 #i #Hil #HnT #HLK1 #HLK2 +elim (IH … HnT HLK1 HLK2) -IH -HnT -HLK1 -HLK2 /2 width=1 by and3_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_drop.ma new file mode 100644 index 000000000..5bf3ddfc6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_drop.ma @@ -0,0 +1,150 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/llpx_sn_drop.ma". +include "basic_2A/multiple/lleq.ma". + +(* LAZY EQUIVALENCE FOR LOCAL ENVIRONMENTS **********************************) + +(* Advanced properties ******************************************************) + +lemma lleq_bind_repl_O: ∀I,L1,L2,V,T. L1.ⓑ{I}V ≡[T, 0] L2.ⓑ{I}V → + ∀J,W. L1 ≡[W, 0] L2 → L1.ⓑ{J}W ≡[T, 0] L2.ⓑ{J}W. +/2 width=7 by llpx_sn_bind_repl_O/ qed-. + +lemma lleq_dec: ∀T,L1,L2,l. Decidable (L1 ≡[T, l] L2). +/3 width=1 by llpx_sn_dec, eq_term_dec/ qed-. + +lemma lleq_llpx_sn_trans: ∀R. lleq_transitive R → + ∀L1,L2,T,l. L1 ≡[T, l] L2 → + ∀L. llpx_sn R l T L2 L → llpx_sn R l T L1 L. +#R #HR #L1 #L2 #T #l #H @(lleq_ind … H) -L1 -L2 -T -l +[1,2,5: /4 width=6 by llpx_sn_fwd_length, llpx_sn_gref, llpx_sn_skip, llpx_sn_sort, trans_eq/ +|4: /4 width=6 by llpx_sn_fwd_length, llpx_sn_free, le_repl_sn_conf_aux, trans_eq/ +| #I #L1 #L2 #K1 #K2 #V #l #i #Hli #HLK1 #HLK2 #HK12 #IHK12 #L #H elim (llpx_sn_inv_lref_ge_sn … H … HLK2) -H -HLK2 + /3 width=11 by llpx_sn_lref/ +| #a #I #L1 #L2 #V #T #l #_ #_ #IHV #IHT #L #H elim (llpx_sn_inv_bind … H) -H + /3 width=1 by llpx_sn_bind/ +| #I #L1 #L2 #V #T #l #_ #_ #IHV #IHT #L #H elim (llpx_sn_inv_flat … H) -H + /3 width=1 by llpx_sn_flat/ +] +qed-. + +lemma lleq_llpx_sn_conf: ∀R. lleq_transitive R → + ∀L1,L2,T,l. L1 ≡[T, l] L2 → + ∀L. llpx_sn R l T L1 L → llpx_sn R l T L2 L. +/3 width=3 by lleq_llpx_sn_trans, lleq_sym/ qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma lleq_inv_lref_ge_dx: ∀L1,L2,l,i. L1 ≡[#i, l] L2 → l ≤ i → + ∀I,K2,V. ⬇[i] L2 ≡ K2.ⓑ{I}V → + ∃∃K1. ⬇[i] L1 ≡ K1.ⓑ{I}V & K1 ≡[V, 0] K2. +#L1 #L2 #l #i #H #Hli #I #K2 #V #HLK2 elim (llpx_sn_inv_lref_ge_dx … H … HLK2) -L2 +/2 width=3 by ex2_intro/ +qed-. + +lemma lleq_inv_lref_ge_sn: ∀L1,L2,l,i. L1 ≡[#i, l] L2 → l ≤ i → + ∀I,K1,V. ⬇[i] L1 ≡ K1.ⓑ{I}V → + ∃∃K2. ⬇[i] L2 ≡ K2.ⓑ{I}V & K1 ≡[V, 0] K2. +#L1 #L2 #l #i #H #Hli #I1 #K1 #V #HLK1 elim (llpx_sn_inv_lref_ge_sn … H … HLK1) -L1 +/2 width=3 by ex2_intro/ +qed-. + +lemma lleq_inv_lref_ge_bi: ∀L1,L2,l,i. L1 ≡[#i, l] L2 → l ≤ i → + ∀I1,I2,K1,K2,V1,V2. + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → + ∧∧ I1 = I2 & K1 ≡[V1, 0] K2 & V1 = V2. +/2 width=8 by llpx_sn_inv_lref_ge_bi/ qed-. + +lemma lleq_inv_lref_ge: ∀L1,L2,l,i. L1 ≡[#i, l] L2 → l ≤ i → + ∀I,K1,K2,V. ⬇[i] L1 ≡ K1.ⓑ{I}V → ⬇[i] L2 ≡ K2.ⓑ{I}V → + K1 ≡[V, 0] K2. +#L1 #L2 #l #i #HL12 #Hli #I #K1 #K2 #V #HLK1 #HLK2 +elim (lleq_inv_lref_ge_bi … HL12 … HLK1 HLK2) // +qed-. + +lemma lleq_inv_S: ∀L1,L2,T,l. L1 ≡[T, l+1] L2 → + ∀I,K1,K2,V. ⬇[l] L1 ≡ K1.ⓑ{I}V → ⬇[l] L2 ≡ K2.ⓑ{I}V → + K1 ≡[V, 0] K2 → L1 ≡[T, l] L2. +/2 width=9 by llpx_sn_inv_S/ qed-. + +lemma lleq_inv_bind_O: ∀a,I,L1,L2,V,T. L1 ≡[ⓑ{a,I}V.T, 0] L2 → + L1 ≡[V, 0] L2 ∧ L1.ⓑ{I}V ≡[T, 0] L2.ⓑ{I}V. +/2 width=2 by llpx_sn_inv_bind_O/ qed-. + +(* Advanced forward lemmas **************************************************) + +lemma lleq_fwd_lref_dx: ∀L1,L2,l,i. L1 ≡[#i, l] L2 → + ∀I,K2,V. ⬇[i] L2 ≡ K2.ⓑ{I}V → + i < l ∨ + ∃∃K1. ⬇[i] L1 ≡ K1.ⓑ{I}V & K1 ≡[V, 0] K2 & l ≤ i. +#L1 #L2 #l #i #H #I #K2 #V #HLK2 elim (llpx_sn_fwd_lref_dx … H … HLK2) -L2 +[ | * ] /3 width=3 by ex3_intro, or_intror, or_introl/ +qed-. + +lemma lleq_fwd_lref_sn: ∀L1,L2,l,i. L1 ≡[#i, l] L2 → + ∀I,K1,V. ⬇[i] L1 ≡ K1.ⓑ{I}V → + i < l ∨ + ∃∃K2. ⬇[i] L2 ≡ K2.ⓑ{I}V & K1 ≡[V, 0] K2 & l ≤ i. +#L1 #L2 #l #i #H #I #K1 #V #HLK1 elim (llpx_sn_fwd_lref_sn … H … HLK1) -L1 +[ | * ] /3 width=3 by ex3_intro, or_intror, or_introl/ +qed-. + +lemma lleq_fwd_bind_O_dx: ∀a,I,L1,L2,V,T. L1 ≡[ⓑ{a,I}V.T, 0] L2 → + L1.ⓑ{I}V ≡[T, 0] L2.ⓑ{I}V. +/2 width=2 by llpx_sn_fwd_bind_O_dx/ qed-. + +(* Properties on relocation *************************************************) + +lemma lleq_lift_le: ∀K1,K2,T,lt. K1 ≡[T, lt] K2 → + ∀L1,L2,l,m. ⬇[Ⓕ, l, m] L1 ≡ K1 → ⬇[Ⓕ, l, m] L2 ≡ K2 → + ∀U. ⬆[l, m] T ≡ U → lt ≤ l → L1 ≡[U, lt] L2. +/3 width=10 by llpx_sn_lift_le, lift_mono/ qed-. + +lemma lleq_lift_ge: ∀K1,K2,T,lt. K1 ≡[T, lt] K2 → + ∀L1,L2,l,m. ⬇[Ⓕ, l, m] L1 ≡ K1 → ⬇[Ⓕ, l, m] L2 ≡ K2 → + ∀U. ⬆[l, m] T ≡ U → l ≤ lt → L1 ≡[U, lt+m] L2. +/2 width=9 by llpx_sn_lift_ge/ qed-. + +(* Inversion lemmas on relocation *******************************************) + +lemma lleq_inv_lift_le: ∀L1,L2,U,lt. L1 ≡[U, lt] L2 → + ∀K1,K2,l,m. ⬇[Ⓕ, l, m] L1 ≡ K1 → ⬇[Ⓕ, l, m] L2 ≡ K2 → + ∀T. ⬆[l, m] T ≡ U → lt ≤ l → K1 ≡[T, lt] K2. +/3 width=10 by llpx_sn_inv_lift_le, ex2_intro/ qed-. + +lemma lleq_inv_lift_be: ∀L1,L2,U,lt. L1 ≡[U, lt] L2 → + ∀K1,K2,l,m. ⬇[Ⓕ, l, m] L1 ≡ K1 → ⬇[Ⓕ, l, m] L2 ≡ K2 → + ∀T. ⬆[l, m] T ≡ U → l ≤ lt → lt ≤ yinj l + m → K1 ≡[T, l] K2. +/2 width=11 by llpx_sn_inv_lift_be/ qed-. + +lemma lleq_inv_lift_ge: ∀L1,L2,U,lt. L1 ≡[U, lt] L2 → + ∀K1,K2,l,m. ⬇[Ⓕ, l, m] L1 ≡ K1 → ⬇[Ⓕ, l, m] L2 ≡ K2 → + ∀T. ⬆[l, m] T ≡ U → yinj l + m ≤ lt → K1 ≡[T, lt-m] K2. +/2 width=9 by llpx_sn_inv_lift_ge/ qed-. + +(* Inversion lemmas on negated lazy quivalence for local environments *******) + +lemma nlleq_inv_bind: ∀a,I,L1,L2,V,T,l. (L1 ≡[ⓑ{a,I}V.T, l] L2 → ⊥) → + (L1 ≡[V, l] L2 → ⊥) ∨ (L1.ⓑ{I}V ≡[T, ⫯l] L2.ⓑ{I}V → ⊥). +/3 width=2 by nllpx_sn_inv_bind, eq_term_dec/ qed-. + +lemma nlleq_inv_flat: ∀I,L1,L2,V,T,l. (L1 ≡[ⓕ{I}V.T, l] L2 → ⊥) → + (L1 ≡[V, l] L2 → ⊥) ∨ (L1 ≡[T, l] L2 → ⊥). +/3 width=2 by nllpx_sn_inv_flat, eq_term_dec/ qed-. + +lemma nlleq_inv_bind_O: ∀a,I,L1,L2,V,T. (L1 ≡[ⓑ{a,I}V.T, 0] L2 → ⊥) → + (L1 ≡[V, 0] L2 → ⊥) ∨ (L1.ⓑ{I}V ≡[T, 0] L2.ⓑ{I}V → ⊥). +/3 width=2 by nllpx_sn_inv_bind_O, eq_term_dec/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_fqus.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_fqus.ma new file mode 100644 index 000000000..55c2dbcd0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_fqus.ma @@ -0,0 +1,75 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/fqus_alt.ma". +include "basic_2A/multiple/lleq_drop.ma". + +(* LAZY EQUIVALENCE FOR LOCAL ENVIRONMENTS **********************************) + +(* Properties on supclosure *************************************************) + +lemma lleq_fqu_trans: ∀G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐ ⦃G2, K2, U⦄ → + ∀L1. L1 ≡[T, 0] L2 → + ∃∃K1. ⦃G1, L1, T⦄ ⊐ ⦃G2, K1, U⦄ & K1 ≡[U, 0] K2. +#G1 #G2 #L2 #K2 #T #U #H elim H -G1 -G2 -L2 -K2 -T -U +[ #I #G #L2 #V #L1 #H elim (lleq_inv_lref_ge_dx … H … I L2 V) -H // + #K1 #H1 #H2 lapply (drop_inv_O2 … H1) -H1 + #H destruct /2 width=3 by fqu_lref_O, ex2_intro/ +| * [ #a ] #I #G #L2 #V #T #L1 #H + [ elim (lleq_inv_bind … H) + | elim (lleq_inv_flat … H) + ] -H + /2 width=3 by fqu_pair_sn, ex2_intro/ +| #a #I #G #L2 #V #T #L1 #H elim (lleq_inv_bind_O … H) -H + #H3 #H4 /2 width=3 by fqu_bind_dx, ex2_intro/ +| #I #G #L2 #V #T #L1 #H elim (lleq_inv_flat … H) -H + /2 width=3 by fqu_flat_dx, ex2_intro/ +| #G #L2 #K2 #T #U #m #HLK2 #HTU #L1 #HL12 + elim (drop_O1_le (Ⓕ) (m+1) L1) + [ /3 width=12 by fqu_drop, lleq_inv_lift_le, ex2_intro/ + | lapply (drop_fwd_length_le2 … HLK2) -K2 + lapply (lleq_fwd_length … HL12) -T -U // + ] +] +qed-. + +lemma lleq_fquq_trans: ∀G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐⸮ ⦃G2, K2, U⦄ → + ∀L1. L1 ≡[T, 0] L2 → + ∃∃K1. ⦃G1, L1, T⦄ ⊐⸮ ⦃G2, K1, U⦄ & K1 ≡[U, 0] K2. +#G1 #G2 #L2 #K2 #T #U #H #L1 #HL12 elim(fquq_inv_gen … H) -H +[ #H elim (lleq_fqu_trans … H … HL12) -L2 /3 width=3 by fqu_fquq, ex2_intro/ +| * #HG #HL #HT destruct /2 width=3 by ex2_intro/ +] +qed-. + +lemma lleq_fqup_trans: ∀G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐+ ⦃G2, K2, U⦄ → + ∀L1. L1 ≡[T, 0] L2 → + ∃∃K1. ⦃G1, L1, T⦄ ⊐+ ⦃G2, K1, U⦄ & K1 ≡[U, 0] K2. +#G1 #G2 #L2 #K2 #T #U #H @(fqup_ind … H) -G2 -K2 -U +[ #G2 #K2 #U #HTU #L1 #HL12 elim (lleq_fqu_trans … HTU … HL12) -L2 + /3 width=3 by fqu_fqup, ex2_intro/ +| #G #G2 #K #K2 #U #U2 #_ #HU2 #IHTU #L1 #HL12 elim (IHTU … HL12) -L2 + #K1 #HTU #HK1 elim (lleq_fqu_trans … HU2 … HK1) -K + /3 width=5 by fqup_strap1, ex2_intro/ +] +qed-. + +lemma lleq_fqus_trans: ∀G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐* ⦃G2, K2, U⦄ → + ∀L1. L1 ≡[T, 0] L2 → + ∃∃K1. ⦃G1, L1, T⦄ ⊐* ⦃G2, K1, U⦄ & K1 ≡[U, 0] K2. +#G1 #G2 #L2 #K2 #T #U #H #L1 #HL12 elim(fqus_inv_gen … H) -H +[ #H elim (lleq_fqup_trans … H … HL12) -L2 /3 width=3 by fqup_fqus, ex2_intro/ +| * #HG #HL #HT destruct /2 width=3 by ex2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_lleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_lleq.ma new file mode 100644 index 000000000..e1de9148e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_lleq.ma @@ -0,0 +1,39 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/lleq_drop.ma". + +(* LAZY EQUIVALENCE FOR LOCAL ENVIRONMENTS **********************************) + +(* Main properties **********************************************************) + +theorem lleq_trans: ∀l,T. Transitive … (lleq l T). +/2 width=3 by lleq_llpx_sn_trans/ qed-. + +theorem lleq_canc_sn: ∀L,L1,L2,T,l. L ≡[l, T] L1→ L ≡[l, T] L2 → L1 ≡[l, T] L2. +/3 width=3 by lleq_trans, lleq_sym/ qed-. + +theorem lleq_canc_dx: ∀L1,L2,L,T,l. L1 ≡[l, T] L → L2 ≡[l, T] L → L1 ≡[l, T] L2. +/3 width=3 by lleq_trans, lleq_sym/ qed-. + +(* Advanced properies on negated lazy equivalence *****************************) + +(* Note: for use in auto, works with /4 width=8/ so lleq_canc_sn is preferred *) +lemma lleq_nlleq_trans: ∀l,T,L1,L. L1 ≡[T, l] L → + ∀L2. (L ≡[T, l] L2 → ⊥) → (L1 ≡[T, l] L2 → ⊥). +/3 width=3 by lleq_canc_sn/ qed-. + +lemma nlleq_lleq_div: ∀l,T,L2,L. L2 ≡[T, l] L → + ∀L1. (L1 ≡[T, l] L → ⊥) → (L1 ≡[T, l] L2 → ⊥). +/3 width=3 by lleq_trans/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_llor.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_llor.ma new file mode 100644 index 000000000..665a3a16b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_llor.ma @@ -0,0 +1,41 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/llor.ma". +include "basic_2A/multiple/llpx_sn_frees.ma". +include "basic_2A/multiple/lleq_alt.ma". + +(* LAZY EQUIVALENCE FOR LOCAL ENVIRONMENTS **********************************) + +(* Properties on pointwise union for local environments **********************) + +lemma llpx_sn_llor_dx: ∀R. (s_r_confluent1 … R (llpx_sn R 0)) → (frees_trans R) → + ∀L1,L2,T,l. llpx_sn R l T L1 L2 → ∀L. L1 ⋓[T, l] L2 ≡ L → L2 ≡[T, l] L. +#R #H1R #H2R #L1 #L2 #T #l #H1 #L #H2 +lapply (llpx_sn_frees_trans … H1R H2R … H1) -H1R -H2R #HR +elim (llpx_sn_llpx_sn_alt … H1) -H1 #HL12 #IH1 +elim H2 -H2 #_ #HL1 #IH2 +@lleq_intro_alt // #I2 #I #K2 #K #V2 #V #i #Hi #HnT #HLK2 #HLK +lapply (drop_fwd_length_lt2 … HLK) #HiL +elim (drop_O1_lt (Ⓕ) L1 i) // -HiL #I1 #K1 #V1 #HLK1 +elim (IH1 … HLK1 HLK2) -IH1 /2 width=1 by/ #H #_ destruct +elim (IH2 … HLK1 HLK2 HLK) -IH2 -HLK1 -HLK2 -HLK * /2 width=1 by conj/ #H +[ elim (ylt_yle_false … H) -H // +| elim H -H /2 width=1 by/ +] +qed. + +lemma llpx_sn_llor_dx_sym: ∀R. (s_r_confluent1 … R (llpx_sn R 0)) → (frees_trans R) → + ∀L1,L2,T,l. llpx_sn R l T L1 L2 → ∀L. L1 ⋓[T, l] L2 ≡ L → L ≡[T, l] L2. +/3 width=6 by llpx_sn_llor_dx, lleq_sym/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_lreq.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_lreq.ma new file mode 100644 index 000000000..155c51572 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_lreq.ma @@ -0,0 +1,36 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/llpx_sn_lreq.ma". +include "basic_2A/multiple/lleq.ma". + +(* LAZY EQUIVALENCE FOR LOCAL ENVIRONMENTS **********************************) + +(* Properties on equivalence for local environments *************************) + +lemma lreq_lleq_trans: ∀L2,L,T,l. L2 ≡[T, l] L → + ∀L1. L1 ⩬[l, ∞] L2 → L1 ≡[T, l] L. +/2 width=3 by lreq_llpx_sn_trans/ qed-. + +lemma lleq_lreq_trans: ∀L,L1,T,l. L ≡[T, l] L1 → + ∀L2. L1 ⩬[l, ∞] L2 → L ≡[T, l] L2. +/2 width=3 by llpx_sn_lreq_trans/ qed-. + +lemma lleq_lreq_repl: ∀L1,L2,T,l. L1 ≡[T, l] L2 → ∀K1. K1 ⩬[l, ∞] L1 → + ∀K2. L2 ⩬[l, ∞] K2 → K1 ≡[T, l] K2. +/2 width=5 by llpx_sn_lreq_repl/ qed-. + +lemma lleq_bind_repl_SO: ∀I1,I2,L1,L2,V1,V2,T. L1.ⓑ{I1}V1 ≡[T, 0] L2.ⓑ{I2}V2 → + ∀J1,J2,W1,W2. L1.ⓑ{J1}W1 ≡[T, 1] L2.ⓑ{J2}W2. +/2 width=5 by llpx_sn_bind_repl_SO/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/llor.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llor.ma new file mode 100644 index 000000000..32634999c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llor.ma @@ -0,0 +1,40 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/lazyor_5.ma". +include "basic_2A/multiple/frees.ma". + +(* POINTWISE UNION FOR LOCAL ENVIRONMENTS ***********************************) + +definition llor: ynat → relation4 term lenv lenv lenv ≝ λl,T,L2,L1,L. + ∧∧ |L1| = |L2| & |L1| = |L| + & (∀I1,I2,I,K1,K2,K,V1,V2,V,i. + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → ⬇[i] L ≡ K.ⓑ{I}V → ∨∨ + (∧∧ yinj i < l & I1 = I & V1 = V) | + (∧∧ (L1 ⊢ i ϵ 𝐅*[l]⦃T⦄ → ⊥) & I1 = I & V1 = V) | + (∧∧ l ≤ yinj i & L1 ⊢ i ϵ 𝐅*[l]⦃T⦄ & I2 = I & V2 = V) + ). + +interpretation + "lazy union (local environment)" + 'LazyOr L1 T l L2 L = (llor l T L2 L1 L). + +(* Basic properties *********************************************************) + +(* Note: this can be proved by llor_skip *) +lemma llor_atom: ∀T,l. ⋆ ⋓[T, l] ⋆ ≡ ⋆. +#T #l @and3_intro // +#I1 #I2 #I #K1 #K2 #K #V1 #V2 #V #i #HLK1 +elim (drop_inv_atom1 … HLK1) -HLK1 #H destruct +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/llor_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llor_alt.ma new file mode 100644 index 000000000..ffea81440 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llor_alt.ma @@ -0,0 +1,74 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/frees_append.ma". +include "basic_2A/multiple/llor.ma". + +(* POINTWISE UNION FOR LOCAL ENVIRONMENTS ***********************************) + +(* Alternative definition ***************************************************) + +lemma llor_tail_frees: ∀L1,L2,L,U,l. L1 ⋓[U, l] L2 ≡ L → l ≤ yinj (|L1|) → + ∀I1,W1. ⓑ{I1}W1.L1 ⊢ |L1| ϵ 𝐅*[l]⦃U⦄ → + ∀I2,W2. ⓑ{I1}W1.L1 ⋓[U, l] ⓑ{I2}W2.L2 ≡ ⓑ{I2}W2.L. +#L1 #L2 #L #U #l * #HL12 #HL1 #IH #Hl #I1 #W1 #HU #I2 #W2 +@and3_intro [1,2: >ltail_length /2 width=1 by le_S_S/ ] +#J1 #J2 #J #K1 #K2 #K #V1 #V2 #V #i #HLK1 #HLK2 #HLK +lapply (drop_fwd_length_lt2 … HLK1) >ltail_length #H +lapply (lt_plus_SO_to_le … H) -H #H +elim (le_to_or_lt_eq … H) -H #H +[ elim (drop_O1_lt (Ⓕ) … H) #Z1 #Y1 #X1 #HLY1 + elim (drop_O1_lt (Ⓕ) L2 i) // #Z2 #Y2 #X2 #HLY2 + elim (drop_O1_lt (Ⓕ) L i) // #Z #Y #X #HLY + lapply (drop_O1_inv_append1_le … HLK1 … HLY1) /2 width=1 by lt_to_le/ -HLK1 normalize #H destruct + lapply (drop_O1_inv_append1_le … HLK2 … HLY2) /2 width=1 by lt_to_le/ -HLK2 normalize #H destruct + lapply (drop_O1_inv_append1_le … HLK … HLY) /2 width=1 by lt_to_le/ -HLK normalize #H destruct + elim (IH … HLY1 HLY2 HLY) -IH -HLY1 -HLY2 -HLY * + [ /3 width=1 by and3_intro, or3_intro0/ + | /6 width=2 by frees_inv_append, lt_to_le, or3_intro1, and3_intro/ + | /5 width=1 by frees_append, lt_to_le, or3_intro2, and4_intro/ + ] +| -IH -HLK1 destruct + lapply (drop_O1_inv_append1_le … HLK2 … (⋆) ?) // -HLK2 normalize #H destruct + lapply (drop_O1_inv_append1_le … HLK … (⋆) ?) // -HLK normalize #H destruct + /3 width=1 by or3_intro2, and4_intro/ +] +qed. + +lemma llor_tail_cofrees: ∀L1,L2,L,U,l. L1 ⋓[U, l] L2 ≡ L → + ∀I1,W1. (ⓑ{I1}W1.L1 ⊢ |L1| ϵ 𝐅*[l]⦃U⦄ → ⊥) → + ∀I2,W2. ⓑ{I1}W1.L1 ⋓[U, l] ⓑ{I2}W2.L2 ≡ ⓑ{I1}W1.L. +#L1 #L2 #L #U #l * #HL12 #HL1 #IH #I1 #W1 #HU #I2 #W2 +@and3_intro [1,2: >ltail_length /2 width=1 by le_S_S/ ] +#J1 #J2 #J #K1 #K2 #K #V1 #V2 #V #i #HLK1 #HLK2 #HLK +lapply (drop_fwd_length_lt2 … HLK1) >ltail_length #H +lapply (lt_plus_SO_to_le … H) -H #H +elim (le_to_or_lt_eq … H) -H #H +[ elim (drop_O1_lt (Ⓕ) … H) #Z1 #Y1 #X1 #HLY1 + elim (drop_O1_lt (Ⓕ) L2 i) // #Z2 #Y2 #X2 #HLY2 + elim (drop_O1_lt (Ⓕ) L i) // #Z #Y #X #HLY + lapply (drop_O1_inv_append1_le … HLK1 … HLY1) /2 width=1 by lt_to_le/ -HLK1 normalize #H destruct + lapply (drop_O1_inv_append1_le … HLK2 … HLY2) /2 width=1 by lt_to_le/ -HLK2 normalize #H destruct + lapply (drop_O1_inv_append1_le … HLK … HLY) /2 width=1 by lt_to_le/ -HLK normalize #H destruct + elim (IH … HLY1 HLY2 HLY) -IH -HLY1 -HLY2 -HLY * + [ /3 width=1 by and3_intro, or3_intro0/ + | /6 width=2 by frees_inv_append, lt_to_le, or3_intro1, and3_intro/ + | /5 width=1 by frees_append, lt_to_le, or3_intro2, and4_intro/ + ] +| -IH -HLK2 destruct + lapply (drop_O1_inv_append1_le … HLK1 … (⋆) ?) // -HLK1 normalize #H destruct + lapply (drop_O1_inv_append1_le … HLK … (⋆) ?) // -HLK normalize #H destruct + /4 width=1 by or3_intro1, and3_intro/ +] +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/llor_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llor_drop.ma new file mode 100644 index 000000000..8d0de6ff8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llor_drop.ma @@ -0,0 +1,45 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/frees_lift.ma". +include "basic_2A/multiple/llor_alt.ma". + +(* POINTWISE UNION FOR LOCAL ENVIRONMENTS ***********************************) + +(* Advanced properties ******************************************************) + +lemma llor_skip: ∀L1,L2,U,l. |L1| = |L2| → yinj (|L1|) ≤ l → L1 ⋓[U, l] L2 ≡ L1. +#L1 #L2 #U #l #HL12 #Hl @and3_intro // -HL12 +#I1 #I2 #I #K1 #K2 #K #W1 #W2 #W #i #HLK1 #_ #HLK -L2 -K2 +lapply (drop_mono … HLK … HLK1) -HLK #H destruct +lapply (drop_fwd_length_lt2 … HLK1) -K1 +/5 width=3 by ylt_yle_trans, ylt_inj, or3_intro0, and3_intro/ +qed. + +(* Note: lemma 1400 concludes the "big tree" theorem *) +lemma llor_total: ∀L1,L2,T,l. |L1| = |L2| → ∃L. L1 ⋓[T, l] L2 ≡ L. +#L1 @(lenv_ind_alt … L1) -L1 +[ #L2 #T #l #H >(length_inv_zero_sn … H) -L2 /2 width=2 by ex_intro/ +| #I1 #L1 #V1 #IHL1 #Y #T #l >ltail_length #H + elim (length_inv_pos_sn_ltail … H) -H #I2 #L2 #V2 #HL12 #H destruct + elim (ylt_split l (|ⓑ{I1}V1.L1|)) + [ elim (frees_dec (ⓑ{I1}V1.L1) T l (|L1|)) #HnU + elim (IHL1 L2 T l) // -IHL1 -HL12 + [ #L #HL12 >ltail_length /4 width=2 by llor_tail_frees, ylt_fwd_succ2, ex_intro/ + | /4 width=2 by llor_tail_cofrees, ex_intro/ + ] + | -IHL1 /4 width=2 by llor_skip, plus_minus_m_m, ex_intro/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn.ma new file mode 100644 index 000000000..9eb82fa14 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn.ma @@ -0,0 +1,209 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_plus.ma". +include "basic_2A/substitution/drop.ma". + +(* LAZY SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS ****) + +inductive llpx_sn (R:relation3 lenv term term): relation4 ynat term lenv lenv ≝ +| llpx_sn_sort: ∀L1,L2,l,k. |L1| = |L2| → llpx_sn R l (⋆k) L1 L2 +| llpx_sn_skip: ∀L1,L2,l,i. |L1| = |L2| → yinj i < l → llpx_sn R l (#i) L1 L2 +| llpx_sn_lref: ∀I,L1,L2,K1,K2,V1,V2,l,i. l ≤ yinj i → + ⬇[i] L1 ≡ K1.ⓑ{I}V1 → ⬇[i] L2 ≡ K2.ⓑ{I}V2 → + llpx_sn R (yinj 0) V1 K1 K2 → R K1 V1 V2 → llpx_sn R l (#i) L1 L2 +| llpx_sn_free: ∀L1,L2,l,i. |L1| ≤ i → |L2| ≤ i → |L1| = |L2| → llpx_sn R l (#i) L1 L2 +| llpx_sn_gref: ∀L1,L2,l,p. |L1| = |L2| → llpx_sn R l (§p) L1 L2 +| llpx_sn_bind: ∀a,I,L1,L2,V,T,l. + llpx_sn R l V L1 L2 → llpx_sn R (⫯l) T (L1.ⓑ{I}V) (L2.ⓑ{I}V) → + llpx_sn R l (ⓑ{a,I}V.T) L1 L2 +| llpx_sn_flat: ∀I,L1,L2,V,T,l. + llpx_sn R l V L1 L2 → llpx_sn R l T L1 L2 → llpx_sn R l (ⓕ{I}V.T) L1 L2 +. + +(* Basic inversion lemmas ***************************************************) + +fact llpx_sn_inv_bind_aux: ∀R,L1,L2,X,l. llpx_sn R l X L1 L2 → + ∀a,I,V,T. X = ⓑ{a,I}V.T → + llpx_sn R l V L1 L2 ∧ llpx_sn R (⫯l) T (L1.ⓑ{I}V) (L2.ⓑ{I}V). +#R #L1 #L2 #X #l * -L1 -L2 -X -l +[ #L1 #L2 #l #k #_ #b #J #W #U #H destruct +| #L1 #L2 #l #i #_ #_ #b #J #W #U #H destruct +| #I #L1 #L2 #K1 #K2 #V1 #V2 #l #i #_ #_ #_ #_ #_ #b #J #W #U #H destruct +| #L1 #L2 #l #i #_ #_ #_ #b #J #W #U #H destruct +| #L1 #L2 #l #p #_ #b #J #W #U #H destruct +| #a #I #L1 #L2 #V #T #l #HV #HT #b #J #W #U #H destruct /2 width=1 by conj/ +| #I #L1 #L2 #V #T #l #_ #_ #b #J #W #U #H destruct +] +qed-. + +lemma llpx_sn_inv_bind: ∀R,a,I,L1,L2,V,T,l. llpx_sn R l (ⓑ{a,I}V.T) L1 L2 → + llpx_sn R l V L1 L2 ∧ llpx_sn R (⫯l) T (L1.ⓑ{I}V) (L2.ⓑ{I}V). +/2 width=4 by llpx_sn_inv_bind_aux/ qed-. + +fact llpx_sn_inv_flat_aux: ∀R,L1,L2,X,l. llpx_sn R l X L1 L2 → + ∀I,V,T. X = ⓕ{I}V.T → + llpx_sn R l V L1 L2 ∧ llpx_sn R l T L1 L2. +#R #L1 #L2 #X #l * -L1 -L2 -X -l +[ #L1 #L2 #l #k #_ #J #W #U #H destruct +| #L1 #L2 #l #i #_ #_ #J #W #U #H destruct +| #I #L1 #L2 #K1 #K2 #V1 #V2 #l #i #_ #_ #_ #_ #_ #J #W #U #H destruct +| #L1 #L2 #l #i #_ #_ #_ #J #W #U #H destruct +| #L1 #L2 #l #p #_ #J #W #U #H destruct +| #a #I #L1 #L2 #V #T #l #_ #_ #J #W #U #H destruct +| #I #L1 #L2 #V #T #l #HV #HT #J #W #U #H destruct /2 width=1 by conj/ +] +qed-. + +lemma llpx_sn_inv_flat: ∀R,I,L1,L2,V,T,l. llpx_sn R l (ⓕ{I}V.T) L1 L2 → + llpx_sn R l V L1 L2 ∧ llpx_sn R l T L1 L2. +/2 width=4 by llpx_sn_inv_flat_aux/ qed-. + +(* Basic forward lemmas *****************************************************) + +lemma llpx_sn_fwd_length: ∀R,L1,L2,T,l. llpx_sn R l T L1 L2 → |L1| = |L2|. +#R #L1 #L2 #T #l #H elim H -L1 -L2 -T -l // +#I #L1 #L2 #K1 #K2 #V1 #V2 #l #i #_ #HLK1 #HLK2 #_ #_ #HK12 +lapply (drop_fwd_length … HLK1) -HLK1 +lapply (drop_fwd_length … HLK2) -HLK2 +normalize // +qed-. + +lemma llpx_sn_fwd_drop_sn: ∀R,L1,L2,T,l. llpx_sn R l T L1 L2 → + ∀K1,i. ⬇[i] L1 ≡ K1 → ∃K2. ⬇[i] L2 ≡ K2. +#R #L1 #L2 #T #l #H #K1 #i #HLK1 lapply (llpx_sn_fwd_length … H) -H +#HL12 lapply (drop_fwd_length_le2 … HLK1) -HLK1 /2 width=1 by drop_O1_le/ +qed-. + +lemma llpx_sn_fwd_drop_dx: ∀R,L1,L2,T,l. llpx_sn R l T L1 L2 → + ∀K2,i. ⬇[i] L2 ≡ K2 → ∃K1. ⬇[i] L1 ≡ K1. +#R #L1 #L2 #T #l #H #K2 #i #HLK2 lapply (llpx_sn_fwd_length … H) -H +#HL12 lapply (drop_fwd_length_le2 … HLK2) -HLK2 /2 width=1 by drop_O1_le/ +qed-. + +fact llpx_sn_fwd_lref_aux: ∀R,L1,L2,X,l. llpx_sn R l X L1 L2 → ∀i. X = #i → + ∨∨ |L1| ≤ i ∧ |L2| ≤ i + | yinj i < l + | ∃∃I,K1,K2,V1,V2. ⬇[i] L1 ≡ K1.ⓑ{I}V1 & + ⬇[i] L2 ≡ K2.ⓑ{I}V2 & + llpx_sn R (yinj 0) V1 K1 K2 & + R K1 V1 V2 & l ≤ yinj i. +#R #L1 #L2 #X #l * -L1 -L2 -X -l +[ #L1 #L2 #l #k #_ #j #H destruct +| #L1 #L2 #l #i #_ #Hil #j #H destruct /2 width=1 by or3_intro1/ +| #I #L1 #L2 #K1 #K2 #V1 #V2 #l #i #Hli #HLK1 #HLK2 #HK12 #HV12 #j #H destruct + /3 width=9 by or3_intro2, ex5_5_intro/ +| #L1 #L2 #l #i #HL1 #HL2 #_ #j #H destruct /3 width=1 by or3_intro0, conj/ +| #L1 #L2 #l #p #_ #j #H destruct +| #a #I #L1 #L2 #V #T #l #_ #_ #j #H destruct +| #I #L1 #L2 #V #T #l #_ #_ #j #H destruct +] +qed-. + +lemma llpx_sn_fwd_lref: ∀R,L1,L2,l,i. llpx_sn R l (#i) L1 L2 → + ∨∨ |L1| ≤ i ∧ |L2| ≤ i + | yinj i < l + | ∃∃I,K1,K2,V1,V2. ⬇[i] L1 ≡ K1.ⓑ{I}V1 & + ⬇[i] L2 ≡ K2.ⓑ{I}V2 & + llpx_sn R (yinj 0) V1 K1 K2 & + R K1 V1 V2 & l ≤ yinj i. +/2 width=3 by llpx_sn_fwd_lref_aux/ qed-. + +lemma llpx_sn_fwd_bind_sn: ∀R,a,I,L1,L2,V,T,l. llpx_sn R l (ⓑ{a,I}V.T) L1 L2 → + llpx_sn R l V L1 L2. +#R #a #I #L1 #L2 #V #T #l #H elim (llpx_sn_inv_bind … H) -H // +qed-. + +lemma llpx_sn_fwd_bind_dx: ∀R,a,I,L1,L2,V,T,l. llpx_sn R l (ⓑ{a,I}V.T) L1 L2 → + llpx_sn R (⫯l) T (L1.ⓑ{I}V) (L2.ⓑ{I}V). +#R #a #I #L1 #L2 #V #T #l #H elim (llpx_sn_inv_bind … H) -H // +qed-. + +lemma llpx_sn_fwd_flat_sn: ∀R,I,L1,L2,V,T,l. llpx_sn R l (ⓕ{I}V.T) L1 L2 → + llpx_sn R l V L1 L2. +#R #I #L1 #L2 #V #T #l #H elim (llpx_sn_inv_flat … H) -H // +qed-. + +lemma llpx_sn_fwd_flat_dx: ∀R,I,L1,L2,V,T,l. llpx_sn R l (ⓕ{I}V.T) L1 L2 → + llpx_sn R l T L1 L2. +#R #I #L1 #L2 #V #T #l #H elim (llpx_sn_inv_flat … H) -H // +qed-. + +lemma llpx_sn_fwd_pair_sn: ∀R,I,L1,L2,V,T,l. llpx_sn R l (②{I}V.T) L1 L2 → + llpx_sn R l V L1 L2. +#R * /2 width=4 by llpx_sn_fwd_flat_sn, llpx_sn_fwd_bind_sn/ +qed-. + +(* Basic properties *********************************************************) + +lemma llpx_sn_refl: ∀R. (∀L. reflexive … (R L)) → ∀T,L,l. llpx_sn R l T L L. +#R #HR #T #L @(f2_ind … rfw … L T) -L -T +#x #IH #L * * /3 width=1 by llpx_sn_sort, llpx_sn_gref, llpx_sn_bind, llpx_sn_flat/ +#i #Hx elim (lt_or_ge i (|L|)) /2 width=1 by llpx_sn_free/ +#HiL #l elim (ylt_split i l) /2 width=1 by llpx_sn_skip/ +elim (drop_O1_lt … HiL) -HiL destruct /4 width=9 by llpx_sn_lref, drop_fwd_rfw/ +qed-. + +lemma llpx_sn_Y: ∀R,T,L1,L2. |L1| = |L2| → llpx_sn R (∞) T L1 L2. +#R #T #L1 @(f2_ind … rfw … L1 T) -L1 -T +#x #IH #L1 * * /3 width=1 by llpx_sn_sort, llpx_sn_skip, llpx_sn_gref, llpx_sn_flat/ +#a #I #V1 #T1 #Hx #L2 #HL12 +@llpx_sn_bind /2 width=1 by/ (**) (* explicit constructor *) +@IH -IH // normalize /2 width=1 by eq_f2/ +qed-. + +lemma llpx_sn_ge_up: ∀R,L1,L2,U,lt. llpx_sn R lt U L1 L2 → ∀T,l,m. ⬆[l, m] T ≡ U → + lt ≤ l + m → llpx_sn R l U L1 L2. +#R #L1 #L2 #U #lt #H elim H -L1 -L2 -U -lt +[ #L1 #L2 #lt #k #HL12 #X #l #m #H #_ >(lift_inv_sort2 … H) -H /2 width=1 by llpx_sn_sort/ +| #L1 #L2 #lt #i #HL12 #Hilt #X #l #m #H #Hltlm + elim (lift_inv_lref2 … H) -H * #Hil #H destruct /3 width=1 by llpx_sn_skip, ylt_inj/ -HL12 + elim (ylt_yle_false … Hilt) -Hilt + @(yle_trans … Hltlm) /2 width=1 by yle_inj/ (**) (* full auto too slow 11s *) +| #I #L1 #L2 #K1 #K2 #W1 #W2 #lt #i #Hlti #HLK1 #HLK2 #HW1 #HW12 #_ #X #l #m #H #_ + elim (lift_inv_lref2 … H) -H * #Hil #H destruct + [ lapply (llpx_sn_fwd_length … HW1) -HW1 #HK12 + lapply (drop_fwd_length … HLK1) lapply (drop_fwd_length … HLK2) + normalize in ⊢ (%→%→?); -I -W1 -W2 -lt /3 width=1 by llpx_sn_skip, ylt_inj/ + | /4 width=9 by llpx_sn_lref, yle_inj, le_plus_b/ + ] +| /2 width=1 by llpx_sn_free/ +| #L1 #L2 #lt #p #HL12 #X #l #m #H #_ >(lift_inv_gref2 … H) -H /2 width=1 by llpx_sn_gref/ +| #a #I #L1 #L2 #W #U #lt #_ #_ #IHV #IHT #X #l #m #H #Hltlm destruct + elim (lift_inv_bind2 … H) -H #V #T #HVW >commutative_plus #HTU #H destruct + @(llpx_sn_bind) /2 width=4 by/ (**) (* full auto fails *) + @(IHT … HTU) /2 width=1 by yle_succ/ +| #I #L1 #L2 #W #U #lt #_ #_ #IHV #IHT #X #l #m #H #Hltlm destruct + elim (lift_inv_flat2 … H) -H #HVW #HTU #H destruct + /3 width=4 by llpx_sn_flat/ +] +qed-. + +(**) (* the minor premise comes first *) +lemma llpx_sn_ge: ∀R,L1,L2,T,l1,l2. l1 ≤ l2 → + llpx_sn R l1 T L1 L2 → llpx_sn R l2 T L1 L2. +#R #L1 #L2 #T #l1 #l2 * -l1 -l2 (**) (* destructed yle *) +/3 width=6 by llpx_sn_ge_up, llpx_sn_Y, llpx_sn_fwd_length, yle_inj/ +qed-. + +lemma llpx_sn_bind_O: ∀R,a,I,L1,L2,V,T. llpx_sn R 0 V L1 L2 → + llpx_sn R 0 T (L1.ⓑ{I}V) (L2.ⓑ{I}V) → + llpx_sn R 0 (ⓑ{a,I}V.T) L1 L2. +/3 width=3 by llpx_sn_ge, llpx_sn_bind/ qed-. + +lemma llpx_sn_co: ∀R1,R2. (∀L,T1,T2. R1 L T1 T2 → R2 L T1 T2) → + ∀L1,L2,T,l. llpx_sn R1 l T L1 L2 → llpx_sn R2 l T L1 L2. +#R1 #R2 #HR12 #L1 #L2 #T #l #H elim H -L1 -L2 -T -l +/3 width=9 by llpx_sn_sort, llpx_sn_skip, llpx_sn_lref, llpx_sn_free, llpx_sn_gref, llpx_sn_bind, llpx_sn_flat/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn_alt.ma new file mode 100644 index 000000000..5a2116ddd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn_alt.ma @@ -0,0 +1,62 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/frees.ma". +include "basic_2A/multiple/llpx_sn_alt_rec.ma". + +(* LAZY SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS ****) + +(* alternative definition of llpx_sn (not recursive) *) +definition llpx_sn_alt: relation3 lenv term term → relation4 ynat term lenv lenv ≝ + λR,l,T,L1,L2. |L1| = |L2| ∧ + (∀I1,I2,K1,K2,V1,V2,i. l ≤ yinj i → L1 ⊢ i ϵ 𝐅*[l]⦃T⦄ → + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → + I1 = I2 ∧ R K1 V1 V2 + ). + +(* Main properties **********************************************************) + +theorem llpx_sn_llpx_sn_alt: ∀R,T,L1,L2,l. llpx_sn R l T L1 L2 → llpx_sn_alt R l T L1 L2. +#R #U #L1 @(f2_ind … rfw … L1 U) -L1 -U +#x #IHx #L1 #U #Hx #L2 #l #H elim (llpx_sn_inv_alt_r … H) -H +#HL12 #IHU @conj // +#I1 #I2 #K1 #K2 #V1 #V2 #i #Hli #H #HLK1 #HLK2 elim (frees_inv … H) -H +[ -x #HnU elim (IHU … HnU HLK1 HLK2) -IHU -HnU -HLK1 -HLK2 /2 width=1 by conj/ +| * #J1 #K10 #W10 #j #Hlj #Hji #HnU #HLK10 #HnW10 destruct + lapply (drop_fwd_drop2 … HLK10) #H + lapply (drop_conf_ge … H … HLK1 ?) -H /2 width=1 by lt_to_le/ (minus_plus_m_m j (i+1)) in ⊢ (%→?); >commutative_plus (lift_inv_sort1 … H) -X + lapply (drop_fwd_length_eq2 … HLK1 HLK2 HK12) -K1 -K2 -l + /2 width=1 by llpx_sn_sort/ +| #K1 #K2 #l0 #i #HK12 #Hil0 #L1 #L2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_lref1 … H) -H + * #Hli #H destruct + [ lapply (drop_fwd_length_eq2 … HLK1 HLK2 HK12) -K1 -K2 -l + /2 width=1 by llpx_sn_skip/ + | elim (ylt_yle_false … Hil0) -L1 -L2 -K1 -K2 -m -Hil0 + /3 width=3 by yle_trans, yle_inj/ + ] +| #I #K1 #K2 #K11 #K22 #V1 #V2 #l0 #i #Hil0 #HK11 #HK22 #HK12 #HV12 #IHK12 #L1 #L2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_lref1 … H) -H + * #Hli #H destruct [ -HK12 | -IHK12 ] + [ elim (drop_trans_lt … HLK1 … HK11) // -K1 + elim (drop_trans_lt … HLK2 … HK22) // -Hli -K2 + /3 width=18 by llpx_sn_lref/ + | lapply (drop_trans_ge_comm … HLK1 … HK11 ?) // -K1 + lapply (drop_trans_ge_comm … HLK2 … HK22 ?) // -Hli -Hl0 -K2 + /3 width=9 by llpx_sn_lref, yle_plus_dx1_trans/ + ] +| #K1 #K2 #l0 #i #HK1 #HK2 #HK12 #L1 #L2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_lref1 … H) -H + * #Hil #H destruct + lapply (drop_fwd_length_eq2 … HLK1 HLK2 HK12) -HK12 + [ /3 width=7 by llpx_sn_free, drop_fwd_be/ + | lapply (drop_fwd_length … HLK1) -HLK1 #HLK1 + lapply (drop_fwd_length … HLK2) -HLK2 #HLK2 + @llpx_sn_free [ >HLK1 | >HLK2 ] -Hil -HLK1 -HLK2 /2 width=1 by monotonic_le_plus_r/ (**) (* explicit constructor *) + ] +| #K1 #K2 #l0 #p #HK12 #L1 #L2 #l #m #HLK1 #HLK2 #X #H #_ >(lift_inv_gref1 … H) -X + lapply (drop_fwd_length_eq2 … HLK1 HLK2 HK12) -K1 -K2 -l -m + /2 width=1 by llpx_sn_gref/ +| #a #I #K1 #K2 #V #T #l0 #_ #_ #IHV #IHT #L1 #L2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_bind1 … H) -H + #W #U #HVW #HTU #H destruct /4 width=6 by llpx_sn_bind, drop_skip, yle_succ/ +| #I #K1 #K2 #V #T #l0 #_ #_ #IHV #IHT #L1 #L2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_flat1 … H) -H + #W #U #HVW #HTU #H destruct /3 width=6 by llpx_sn_flat/ +] +qed-. + +lemma llpx_sn_lift_ge: ∀R,K1,K2,T,l0. llpx_sn R l0 T K1 K2 → + ∀L1,L2,l,m. ⬇[Ⓕ, l, m] L1 ≡ K1 → ⬇[Ⓕ, l, m] L2 ≡ K2 → + ∀U. ⬆[l, m] T ≡ U → l ≤ l0 → llpx_sn R (l0+m) U L1 L2. +#R #K1 #K2 #T #l0 #H elim H -K1 -K2 -T -l0 +[ #K1 #K2 #l0 #k #HK12 #L1 #L2 #l #m #HLK1 #HLK2 #X #H #_ >(lift_inv_sort1 … H) -X + lapply (drop_fwd_length_eq2 … HLK1 HLK2 HK12) -K1 -K2 -l + /2 width=1 by llpx_sn_sort/ +| #K1 #K2 #l0 #i #HK12 #Hil0 #L1 #L2 #l #m #HLK1 #HLK2 #X #H #_ elim (lift_inv_lref1 … H) -H + * #_ #H destruct + lapply (drop_fwd_length_eq2 … HLK1 HLK2 HK12) -K1 -K2 + [ /3 width=3 by llpx_sn_skip, ylt_plus_dx2_trans/ + | /3 width=3 by llpx_sn_skip, monotonic_ylt_plus_dx/ + ] +| #I #K1 #K2 #K11 #K22 #V1 #V2 #l0 #i #Hil0 #HK11 #HK22 #HK12 #HV12 #_ #L1 #L2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_lref1 … H) -H + * #Hil #H destruct + [ elim (ylt_yle_false … Hil0) -I -L1 -L2 -K1 -K2 -K11 -K22 -V1 -V2 -m -Hil0 + /3 width=3 by ylt_yle_trans, ylt_inj/ + | lapply (drop_trans_ge_comm … HLK1 … HK11 ?) // -K1 + lapply (drop_trans_ge_comm … HLK2 … HK22 ?) // -Hil -Hl0 -K2 + /3 width=9 by llpx_sn_lref, monotonic_yle_plus_dx/ + ] +| #K1 #K2 #l0 #i #HK1 #HK2 #HK12 #L1 #L2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_lref1 … H) -H + * #Hil #H destruct + lapply (drop_fwd_length_eq2 … HLK1 HLK2 HK12) -HK12 + [ /3 width=7 by llpx_sn_free, drop_fwd_be/ + | lapply (drop_fwd_length … HLK1) -HLK1 #HLK1 + lapply (drop_fwd_length … HLK2) -HLK2 #HLK2 + @llpx_sn_free [ >HLK1 | >HLK2 ] -Hil -HLK1 -HLK2 /2 width=1 by monotonic_le_plus_r/ (**) (* explicit constructor *) + ] +| #K1 #K2 #l0 #p #HK12 #L1 #L2 #l #m #HLK1 #HLK2 #X #H #_ >(lift_inv_gref1 … H) -X + lapply (drop_fwd_length_eq2 … HLK1 HLK2 HK12) -K1 -K2 -l + /2 width=1 by llpx_sn_gref/ +| #a #I #K1 #K2 #V #T #l0 #_ #_ #IHV #IHT #L1 #L2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_bind1 … H) -H + #W #U #HVW #HTU #H destruct /4 width=5 by llpx_sn_bind, drop_skip, yle_succ/ +| #I #K1 #K2 #V #T #l0 #_ #_ #IHV #IHT #L1 #L2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_flat1 … H) -H + #W #U #HVW #HTU #H destruct /3 width=5 by llpx_sn_flat/ +] +qed-. + +(* Inversion lemmas on relocation *******************************************) + +lemma llpx_sn_inv_lift_le: ∀R. d_deliftable_sn R → + ∀L1,L2,U,l0. llpx_sn R l0 U L1 L2 → + ∀K1,K2,l,m. ⬇[Ⓕ, l, m] L1 ≡ K1 → ⬇[Ⓕ, l, m] L2 ≡ K2 → + ∀T. ⬆[l, m] T ≡ U → l0 ≤ l → llpx_sn R l0 T K1 K2. +#R #HR #L1 #L2 #U #l0 #H elim H -L1 -L2 -U -l0 +[ #L1 #L2 #l0 #k #HL12 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #_ >(lift_inv_sort2 … H) -X + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) -L1 -L2 -l -m + /2 width=1 by llpx_sn_sort/ +| #L1 #L2 #l0 #i #HL12 #Hil0 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #_ elim (lift_inv_lref2 … H) -H + * #_ #H destruct + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) -L1 -L2 + [ /2 width=1 by llpx_sn_skip/ + | /3 width=3 by llpx_sn_skip, yle_ylt_trans/ + ] +| #I #L1 #L2 #K11 #K22 #W1 #W2 #l0 #i #Hil0 #HLK11 #HLK22 #HK12 #HW12 #IHK12 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_lref2 … H) -H + * #Hil #H destruct [ -HK12 | -IHK12 ] + [ elim (drop_conf_lt … HLK1 … HLK11) // -L1 #L1 #V1 #HKL1 #HKL11 #HVW1 + elim (drop_conf_lt … HLK2 … HLK22) // -Hil -L2 #L2 #V2 #HKL2 #HKL22 #HVW2 + elim (HR … HW12 … HKL11 … HVW1) -HR #V0 #HV0 #HV12 + lapply (lift_inj … HV0 … HVW2) -HV0 -HVW2 #H destruct + /3 width=10 by llpx_sn_lref/ + | lapply (drop_conf_ge … HLK1 … HLK11 ?) // -L1 + lapply (drop_conf_ge … HLK2 … HLK22 ?) // -L2 -Hil0 + elim (le_inv_plus_l … Hil) -Hil /4 width=9 by llpx_sn_lref, yle_trans, yle_inj/ (**) (* slow *) + ] +| #L1 #L2 #l0 #i #HL1 #HL2 #HL12 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_lref2 … H) -H + * #_ #H destruct + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) + [ lapply (drop_fwd_length_le4 … HLK1) -HLK1 + lapply (drop_fwd_length_le4 … HLK2) -HLK2 + #HKL2 #HKL1 #HK12 @llpx_sn_free // /2 width=3 by transitive_le/ (**) (* full auto too slow *) + | lapply (drop_fwd_length … HLK1) -HLK1 #H >H in HL1; -H + lapply (drop_fwd_length … HLK2) -HLK2 #H >H in HL2; -H + /3 width=1 by llpx_sn_free, le_plus_to_minus_r/ + ] +| #L1 #L2 #l0 #p #HL12 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #_ >(lift_inv_gref2 … H) -X + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) -L1 -L2 -l -m + /2 width=1 by llpx_sn_gref/ +| #a #I #L1 #L2 #W #U #l0 #_ #_ #IHW #IHU #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_bind2 … H) -H + #V #T #HVW #HTU #H destruct /4 width=6 by llpx_sn_bind, drop_skip, yle_succ/ +| #I #L1 #L2 #W #U #l0 #_ #_ #IHW #IHU #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_flat2 … H) -H + #V #T #HVW #HTU #H destruct /3 width=6 by llpx_sn_flat/ +] +qed-. + +lemma llpx_sn_inv_lift_be: ∀R,L1,L2,U,l0. llpx_sn R l0 U L1 L2 → + ∀K1,K2,l,m. ⬇[Ⓕ, l, m] L1 ≡ K1 → ⬇[Ⓕ, l, m] L2 ≡ K2 → + ∀T. ⬆[l, m] T ≡ U → l ≤ l0 → l0 ≤ yinj l + m → llpx_sn R l T K1 K2. +#R #L1 #L2 #U #l0 #H elim H -L1 -L2 -U -l0 +[ #L1 #L2 #l0 #k #HL12 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #_ #_ >(lift_inv_sort2 … H) -X + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) -L1 -L2 -l0 -m + /2 width=1 by llpx_sn_sort/ +| #L1 #L2 #l0 #i #HL12 #Hil0 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hl0 #Hl0m elim (lift_inv_lref2 … H) -H + * #Hil #H destruct + [ lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) -L1 -L2 + -Hil0 /3 width=1 by llpx_sn_skip, ylt_inj/ + | elim (ylt_yle_false … Hil0) -L1 -L2 -Hl0 -Hil0 + /3 width=3 by yle_trans, yle_inj/ (**) (* slow *) + ] +| #I #L1 #L2 #K11 #K22 #W1 #W2 #l0 #i #Hil0 #HLK11 #HLK22 #HK12 #HW12 #_ #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hl0 #Hl0m elim (lift_inv_lref2 … H) -H + * #Hil #H destruct + [ elim (ylt_yle_false … Hil0) -I -L1 -L2 -K11 -K22 -W1 -W2 -Hl0m -Hil0 + /3 width=3 by ylt_yle_trans, ylt_inj/ + | lapply (drop_conf_ge … HLK1 … HLK11 ?) // -L1 + lapply (drop_conf_ge … HLK2 … HLK22 ?) // -L2 -Hil0 -Hl0 -Hl0m + elim (le_inv_plus_l … Hil) -Hil /3 width=9 by llpx_sn_lref, yle_inj/ + ] +| #L1 #L2 #l0 #i #HL1 #HL2 #HL12 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hl0 #Hl0m elim (lift_inv_lref2 … H) -H + * #_ #H destruct + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) + [ lapply (drop_fwd_length_le4 … HLK1) -HLK1 + lapply (drop_fwd_length_le4 … HLK2) -HLK2 + #HKL2 #HKL1 #HK12 @llpx_sn_free // /2 width=3 by transitive_le/ (**) (* full auto too slow *) + | lapply (drop_fwd_length … HLK1) -HLK1 #H >H in HL1; -H + lapply (drop_fwd_length … HLK2) -HLK2 #H >H in HL2; -H + /3 width=1 by llpx_sn_free, le_plus_to_minus_r/ + ] +| #L1 #L2 #l0 #p #HL12 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #_ #_ >(lift_inv_gref2 … H) -X + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) -L1 -L2 -l0 -m + /2 width=1 by llpx_sn_gref/ +| #a #I #L1 #L2 #W #U #l0 #_ #_ #IHW #IHU #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hl0 #Hl0m elim (lift_inv_bind2 … H) -H + >commutative_plus #V #T #HVW #HTU #H destruct + @llpx_sn_bind [ /2 width=5 by/ ] -IHW (**) (* explicit constructor *) + @(IHU … HTU) -IHU -HTU /2 width=1 by drop_skip, yle_succ/ +| #I #L1 #L2 #W #U #l0 #_ #_ #IHW #IHU #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hl0 #Hl0m elim (lift_inv_flat2 … H) -H + #V #T #HVW #HTU #H destruct /3 width=6 by llpx_sn_flat/ +] +qed-. + +lemma llpx_sn_inv_lift_ge: ∀R,L1,L2,U,l0. llpx_sn R l0 U L1 L2 → + ∀K1,K2,l,m. ⬇[Ⓕ, l, m] L1 ≡ K1 → ⬇[Ⓕ, l, m] L2 ≡ K2 → + ∀T. ⬆[l, m] T ≡ U → yinj l + m ≤ l0 → llpx_sn R (l0-m) T K1 K2. +#R #L1 #L2 #U #l0 #H elim H -L1 -L2 -U -l0 +[ #L1 #L2 #l0 #k #HL12 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #_ >(lift_inv_sort2 … H) -X + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) -L1 -L2 -l + /2 width=1 by llpx_sn_sort/ +| #L1 #L2 #l0 #i #HL12 #Hil0 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hlml0 elim (lift_inv_lref2 … H) -H + * #Hil #H destruct [ -Hil0 | -Hlml0 ] + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) -L1 -L2 + [ /4 width=3 by llpx_sn_skip, yle_plus1_to_minus_inj2, ylt_yle_trans, ylt_inj/ + | elim (le_inv_plus_l … Hil) -Hil #_ + /4 width=1 by llpx_sn_skip, monotonic_ylt_minus_dx, yle_inj/ + ] +| #I #L1 #L2 #K11 #K22 #W1 #W2 #l0 #i #Hil0 #HLK11 #HLK22 #HK12 #HW12 #_ #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hlml0 elim (lift_inv_lref2 … H) -H + * #Hil #H destruct + [ elim (ylt_yle_false … Hil0) -I -L1 -L2 -K11 -K22 -W1 -W2 -Hil0 + /3 width=3 by yle_fwd_plus_sn1, ylt_yle_trans, ylt_inj/ + | lapply (drop_conf_ge … HLK1 … HLK11 ?) // -L1 + lapply (drop_conf_ge … HLK2 … HLK22 ?) // -L2 -Hlml0 -Hil + /3 width=9 by llpx_sn_lref, monotonic_yle_minus_dx/ + ] +| #L1 #L2 #l0 #i #HL1 #HL2 #HL12 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hlml0 elim (lift_inv_lref2 … H) -H + * #_ #H destruct + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) + [ lapply (drop_fwd_length_le4 … HLK1) -HLK1 + lapply (drop_fwd_length_le4 … HLK2) -HLK2 + #HKL2 #HKL1 #HK12 @llpx_sn_free // /2 width=3 by transitive_le/ (**) (* full auto too slow *) + | lapply (drop_fwd_length … HLK1) -HLK1 #H >H in HL1; -H + lapply (drop_fwd_length … HLK2) -HLK2 #H >H in HL2; -H + /3 width=1 by llpx_sn_free, le_plus_to_minus_r/ + ] +| #L1 #L2 #l0 #p #HL12 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #_ >(lift_inv_gref2 … H) -X + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) -L1 -L2 -l + /2 width=1 by llpx_sn_gref/ +| #a #I #L1 #L2 #W #U #l0 #_ #_ #IHW #IHU #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hlml0 elim (lift_inv_bind2 … H) -H + #V #T #HVW #HTU #H destruct + @llpx_sn_bind [ /2 width=5 by/ ] -IHW (**) (* explicit constructor *) + yminus_Y_inj #K1 #HK12 #HLK1 + lapply (lreq_inv_O_Y … HK12) -HK12 #H destruct /2 width=9 by llpx_sn_lref/ +| /4 width=5 by llpx_sn_free, lreq_fwd_length, le_repl_sn_trans_aux, trans_eq/ +| /4 width=1 by llpx_sn_bind, lreq_succ/ +] +qed-. + +lemma llpx_sn_lreq_trans: ∀R,L,L1,T,l. llpx_sn R l T L L1 → + ∀L2. L1 ⩬[l, ∞] L2 → llpx_sn R l T L L2. +#R #L #L1 #T #l #H elim H -L -L1 -T -l +/4 width=5 by llpx_sn_flat, llpx_sn_gref, llpx_sn_skip, llpx_sn_sort, lreq_fwd_length, trans_eq/ +[ #I #L #L1 #K #K1 #V #V1 #l #i #Hli #HLK #HLK1 #HK1 #HV1 #_ #L2 #HL12 + elim (lreq_drop_conf_be … HL12 … HLK1) -L1 // >yminus_Y_inj #K2 #HK12 #HLK2 + lapply (lreq_inv_O_Y … HK12) -HK12 #H destruct /2 width=9 by llpx_sn_lref/ +| /4 width=5 by llpx_sn_free, lreq_fwd_length, le_repl_sn_conf_aux, trans_eq/ +| /4 width=1 by llpx_sn_bind, lreq_succ/ +] +qed-. + +lemma llpx_sn_lreq_repl: ∀R,L1,L2,T,l. llpx_sn R l T L1 L2 → ∀K1. K1 ⩬[l, ∞] L1 → + ∀K2. L2 ⩬[l, ∞] K2 → llpx_sn R l T K1 K2. +/3 width=4 by llpx_sn_lreq_trans, lreq_llpx_sn_trans/ qed-. + +lemma llpx_sn_bind_repl_SO: ∀R,I1,I2,L1,L2,V1,V2,T. llpx_sn R 0 T (L1.ⓑ{I1}V1) (L2.ⓑ{I2}V2) → + ∀J1,J2,W1,W2. llpx_sn R 1 T (L1.ⓑ{J1}W1) (L2.ⓑ{J2}W2). +#R #I1 #I2 #L1 #L2 #V1 #V2 #T #HT #J1 #J2 #W1 #W2 lapply (llpx_sn_ge R … 1 … HT) -HT +/3 width=7 by llpx_sn_lreq_repl, lreq_succ/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn_tc.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn_tc.ma new file mode 100644 index 000000000..97e058039 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn_tc.ma @@ -0,0 +1,26 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/llpx_sn_drop.ma". + +(* LAZY SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS ****) + +(* Properties about transitive closure **************************************) + +lemma llpx_sn_TC_pair_dx: ∀R. (∀L. reflexive … (R L)) → + ∀I,L,V1,V2,T. LTC … R L V1 V2 → + LTC … (llpx_sn R 0) T (L.ⓑ{I}V1) (L.ⓑ{I}V2). +#R #HR #I #L #V1 #V2 #T #H @(TC_star_ind … V2 H) -V2 +/4 width=9 by llpx_sn_bind_repl_O, llpx_sn_refl, step, inj/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2.ma new file mode 100644 index 000000000..34f1691de --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2.ma @@ -0,0 +1,74 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/rat_3.ma". +include "basic_2A/grammar/term_vector.ma". + +(* MULTIPLE RELOCATION WITH PAIRS *******************************************) + +inductive at: list2 nat nat → relation nat ≝ +| at_nil: ∀i. at (◊) i i +| at_lt : ∀cs,l,m,i1,i2. i1 < l → + at cs i1 i2 → at ({l, m} @ cs) i1 i2 +| at_ge : ∀cs,l,m,i1,i2. l ≤ i1 → + at cs (i1 + m) i2 → at ({l, m} @ cs) i1 i2 +. + +interpretation "application (multiple relocation with pairs)" + 'RAt i1 cs i2 = (at cs i1 i2). + +(* Basic inversion lemmas ***************************************************) + +fact at_inv_nil_aux: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → cs = ◊ → i1 = i2. +#cs #i1 #i2 * -cs -i1 -i2 +[ // +| #cs #l #m #i1 #i2 #_ #_ #H destruct +| #cs #l #m #i1 #i2 #_ #_ #H destruct +] +qed-. + +lemma at_inv_nil: ∀i1,i2. @⦃i1, ◊⦄ ≡ i2 → i1 = i2. +/2 width=3 by at_inv_nil_aux/ qed-. + +fact at_inv_cons_aux: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → + ∀l,m,cs0. cs = {l, m} @ cs0 → + i1 < l ∧ @⦃i1, cs0⦄ ≡ i2 ∨ + l ≤ i1 ∧ @⦃i1 + m, cs0⦄ ≡ i2. +#cs #i1 #i2 * -cs -i1 -i2 +[ #i #l #m #cs #H destruct +| #cs1 #l1 #m1 #i1 #i2 #Hil1 #Hi12 #l2 #m2 #cs2 #H destruct /3 width=1 by or_introl, conj/ +| #cs1 #l1 #m1 #i1 #i2 #Hli1 #Hi12 #l2 #m2 #cs2 #H destruct /3 width=1 by or_intror, conj/ +] +qed-. + +lemma at_inv_cons: ∀cs,l,m,i1,i2. @⦃i1, {l, m} @ cs⦄ ≡ i2 → + i1 < l ∧ @⦃i1, cs⦄ ≡ i2 ∨ + l ≤ i1 ∧ @⦃i1 + m, cs⦄ ≡ i2. +/2 width=3 by at_inv_cons_aux/ qed-. + +lemma at_inv_cons_lt: ∀cs,l,m,i1,i2. @⦃i1, {l, m} @ cs⦄ ≡ i2 → + i1 < l → @⦃i1, cs⦄ ≡ i2. +#cs #l #m #i1 #m2 #H +elim (at_inv_cons … H) -H * // #Hli1 #_ #Hi1l +lapply (le_to_lt_to_lt … Hli1 Hi1l) -Hli1 -Hi1l #Hl +elim (lt_refl_false … Hl) +qed-. + +lemma at_inv_cons_ge: ∀cs,l,m,i1,i2. @⦃i1, {l, m} @ cs⦄ ≡ i2 → + l ≤ i1 → @⦃i1 + m, cs⦄ ≡ i2. +#cs #l #m #i1 #m2 #H +elim (at_inv_cons … H) -H * // #Hi1l #_ #Hli1 +lapply (le_to_lt_to_lt … Hli1 Hi1l) -Hli1 -Hi1l #Hl +elim (lt_refl_false … Hl) +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2_minus.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2_minus.ma new file mode 100644 index 000000000..8eb1a5550 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2_minus.ma @@ -0,0 +1,76 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/rminus_3.ma". +include "basic_2A/multiple/mr2.ma". + +(* MULTIPLE RELOCATION WITH PAIRS *******************************************) + +inductive minuss: nat → relation (list2 nat nat) ≝ +| minuss_nil: ∀i. minuss i (◊) (◊) +| minuss_lt : ∀cs1,cs2,l,m,i. i < l → minuss i cs1 cs2 → + minuss i ({l, m} @ cs1) ({l - i, m} @ cs2) +| minuss_ge : ∀cs1,cs2,l,m,i. l ≤ i → minuss (m + i) cs1 cs2 → + minuss i ({l, m} @ cs1) cs2 +. + +interpretation "minus (multiple relocation with pairs)" + 'RMinus cs1 i cs2 = (minuss i cs1 cs2). + +(* Basic inversion lemmas ***************************************************) + +fact minuss_inv_nil1_aux: ∀cs1,cs2,i. cs1 ▭ i ≡ cs2 → cs1 = ◊ → cs2 = ◊. +#cs1 #cs2 #i * -cs1 -cs2 -i +[ // +| #cs1 #cs2 #l #m #i #_ #_ #H destruct +| #cs1 #cs2 #l #m #i #_ #_ #H destruct +] +qed-. + +lemma minuss_inv_nil1: ∀cs2,i. ◊ ▭ i ≡ cs2 → cs2 = ◊. +/2 width=4 by minuss_inv_nil1_aux/ qed-. + +fact minuss_inv_cons1_aux: ∀cs1,cs2,i. cs1 ▭ i ≡ cs2 → + ∀l,m,cs. cs1 = {l, m} @ cs → + l ≤ i ∧ cs ▭ m + i ≡ cs2 ∨ + ∃∃cs0. i < l & cs ▭ i ≡ cs0 & + cs2 = {l - i, m} @ cs0. +#cs1 #cs2 #i * -cs1 -cs2 -i +[ #i #l #m #cs #H destruct +| #cs1 #cs #l1 #m1 #i1 #Hil1 #Hcs #l2 #m2 #cs2 #H destruct /3 width=3 by ex3_intro, or_intror/ +| #cs1 #cs #l1 #m1 #i1 #Hli1 #Hcs #l2 #m2 #cs2 #H destruct /3 width=1 by or_introl, conj/ +] +qed-. + +lemma minuss_inv_cons1: ∀cs1,cs2,l,m,i. {l, m} @ cs1 ▭ i ≡ cs2 → + l ≤ i ∧ cs1 ▭ m + i ≡ cs2 ∨ + ∃∃cs. i < l & cs1 ▭ i ≡ cs & + cs2 = {l - i, m} @ cs. +/2 width=3 by minuss_inv_cons1_aux/ qed-. + +lemma minuss_inv_cons1_ge: ∀cs1,cs2,l,m,i. {l, m} @ cs1 ▭ i ≡ cs2 → + l ≤ i → cs1 ▭ m + i ≡ cs2. +#cs1 #cs2 #l #m #i #H +elim (minuss_inv_cons1 … H) -H * // #cs #Hil #_ #_ #Hli +lapply (lt_to_le_to_lt … Hil Hli) -Hil -Hli #Hi +elim (lt_refl_false … Hi) +qed-. + +lemma minuss_inv_cons1_lt: ∀cs1,cs2,l,m,i. {l, m} @ cs1 ▭ i ≡ cs2 → + i < l → + ∃∃cs. cs1 ▭ i ≡ cs & cs2 = {l - i, m} @ cs. +#cs1 #cs2 #l #m #i #H elim (minuss_inv_cons1 … H) -H * /2 width=3 by ex2_intro/ +#Hli #_ #Hil lapply (lt_to_le_to_lt … Hil Hli) -Hil -Hli +#Hi elim (lt_refl_false … Hi) +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2_mr2.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2_mr2.ma new file mode 100644 index 000000000..20702f6a6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2_mr2.ma @@ -0,0 +1,29 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/mr2.ma". + +(* MULTIPLE RELOCATION WITH PAIRS *******************************************) + +(* Main properties **********************************************************) + +theorem at_mono: ∀cs,i,i1. @⦃i, cs⦄ ≡ i1 → ∀i2. @⦃i, cs⦄ ≡ i2 → i1 = i2. +#cs #i #i1 #H elim H -cs -i -i1 +[ #i #x #H <(at_inv_nil … H) -x // +| #cs #l #m #i #i1 #Hil #_ #IHi1 #x #H + lapply (at_inv_cons_lt … H Hil) -H -Hil /2 width=1 by/ +| #cs #l #m #i #i1 #Hli #_ #IHi1 #x #H + lapply (at_inv_cons_ge … H Hli) -H -Hli /2 width=1 by/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2_plus.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2_plus.ma new file mode 100644 index 000000000..fe66fa1bc --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2_plus.ma @@ -0,0 +1,40 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/mr2.ma". + +(* MULTIPLE RELOCATION WITH PAIRS *******************************************) + +let rec pluss (cs:list2 nat nat) (i:nat) on cs ≝ match cs with +[ nil2 ⇒ ◊ +| cons2 l m cs ⇒ {l + i, m} @ pluss cs i +]. + +interpretation "plus (multiple relocation with pairs)" + 'plus x y = (pluss x y). + +(* Basic inversion lemmas ***************************************************) + +lemma pluss_inv_nil2: ∀i,cs. cs + i = ◊ → cs = ◊. +#i * // normalize +#l #m #cs #H destruct +qed. + +lemma pluss_inv_cons2: ∀i,l,m,cs2,cs. cs + i = {l, m} @ cs2 → + ∃∃cs1. cs1 + i = cs2 & cs = {l - i, m} @ cs1. +#i #l #m #cs2 * normalize +[ #H destruct +| #l1 #m1 #cs1 #H destruct /2 width=3 by ex2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/dxabbr_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/dxabbr_2.ma new file mode 100644 index 000000000..afd2f1892 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/dxabbr_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( T1 . break ⓓ T2 )" + left associative with precedence 48 + for @{ 'DxAbbr $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/dxabst_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/dxabst_2.ma new file mode 100644 index 000000000..43e324eae --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/dxabst_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( T1 . break ⓛ T2 )" + left associative with precedence 49 + for @{ 'DxAbst $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/dxbind2_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/dxbind2_3.ma new file mode 100644 index 000000000..bbded1eab --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/dxbind2_3.ma @@ -0,0 +1,23 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation > "hvbox( T . break ②{ term 46 I } break term 47 T1 )" + non associative with precedence 46 + for @{ 'DxBind2 $T $I $T1 }. + +notation "hvbox( T . break ⓑ { term 46 I } break term 48 T1 )" + non associative with precedence 47 + for @{ 'DxBind2 $T $I $T1 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/gref_1.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/gref_1.ma new file mode 100644 index 000000000..d22748809 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/gref_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( § term 90 p )" + non associative with precedence 55 + for @{ 'GRef $p }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/item0_0.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/item0_0.ma new file mode 100644 index 000000000..b6e471d3d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/item0_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "⓪" + non associative with precedence 55 + for @{ 'Item0 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/item0_1.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/item0_1.ma new file mode 100644 index 000000000..2c9e41aef --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/item0_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓪ { term 46 I } )" + non associative with precedence 55 + for @{ 'Item0 $I }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/lref_1.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/lref_1.ma new file mode 100644 index 000000000..ebab03c01 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/lref_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( # term 90 i )" + non associative with precedence 55 + for @{ 'LRef $i }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabbr_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabbr_3.ma new file mode 100644 index 000000000..44116053b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabbr_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓓ { term 46 a } break term 55 T1 . break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnAbbr $a $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabbrneg_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabbrneg_2.ma new file mode 100644 index 000000000..13786d9bc --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabbrneg_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( - ⓓ term 55 T1 . break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnAbbrNeg $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabbrpos_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabbrpos_2.ma new file mode 100644 index 000000000..ae76f1958 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabbrpos_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( + ⓓ term 55 T1 . break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnAbbrPos $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabst_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabst_3.ma new file mode 100644 index 000000000..8ba34495d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabst_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓛ { term 46 a } break term 55 T1 . break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnAbst $a $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabstneg_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabstneg_2.ma new file mode 100644 index 000000000..277b58b11 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabstneg_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( - ⓛ term 55 T1 . break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnAbstNeg $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabstpos_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabstpos_2.ma new file mode 100644 index 000000000..9e22bc7ac --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabstpos_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( + ⓛ term 55 T1 . break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnAbstPos $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snappl_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snappl_2.ma new file mode 100644 index 000000000..c1acadba2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snappl_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓐ term 55 T1 . break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnAppl $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snbind2_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snbind2_4.ma new file mode 100644 index 000000000..ceae73562 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snbind2_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓑ { term 46 a , break term 46 I } break term 55 T1 . break term 55 T )" + non associative with precedence 55 + for @{ 'SnBind2 $a $I $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snbind2neg_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snbind2neg_3.ma new file mode 100644 index 000000000..428fe734d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snbind2neg_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( - ⓑ { term 46 I } break term 55 T1 . break term 55 T )" + non associative with precedence 55 + for @{ 'SnBind2Neg $I $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snbind2pos_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snbind2pos_3.ma new file mode 100644 index 000000000..b89b95822 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snbind2pos_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( + ⓑ { term 46 I } break term 55 T1 . break term 55 T )" + non associative with precedence 55 + for @{ 'SnBind2Pos $I $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/sncast_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/sncast_2.ma new file mode 100644 index 000000000..55565d099 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/sncast_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓝ term 55 T1 . break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnCast $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snflat2_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snflat2_3.ma new file mode 100644 index 000000000..ef0bdb8cb --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snflat2_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓕ { term 46 I } break term 55 T1 . break term 55 T )" + non associative with precedence 55 + for @{ 'SnFlat2 $I $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snitem2_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snitem2_2.ma new file mode 100644 index 000000000..82044eae6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snitem2_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ② term 55 T1 . break term 55 T )" + non associative with precedence 55 + for @{ 'SnItem2 $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snitem2_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snitem2_3.ma new file mode 100644 index 000000000..9fdf70bf2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snitem2_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ② { term 46 I } break term 55 T1 . break term 55 T )" + non associative with precedence 55 + for @{ 'SnItem2 $I $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/star_0.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/star_0.ma new file mode 100644 index 000000000..8cf6da569 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/star_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "⋆" + non associative with precedence 46 + for @{ 'Star }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/star_1.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/star_1.ma new file mode 100644 index 000000000..6307ed9e9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/star_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⋆ term 90 k )" + non associative with precedence 55 + for @{ 'Star $k }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snabbr_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snabbr_2.ma new file mode 100644 index 000000000..4051c2085 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snabbr_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓓ term 55 T . break term 55 L )" + non associative with precedence 55 + for @{ 'SnAbbr $T $L }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snabst_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snabst_2.ma new file mode 100644 index 000000000..838bd007f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snabst_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓛ term 55 T . break term 55 L )" + non associative with precedence 55 + for @{ 'SnAbst $T $L }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snapplvector_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snapplvector_2.ma new file mode 100644 index 000000000..e59520265 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snapplvector_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( Ⓐ term 55 T1 . break term 55 T )" + non associative with precedence 55 + for @{ 'SnApplVector $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snbind2_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snbind2_3.ma new file mode 100644 index 000000000..fa44f2928 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snbind2_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓑ { term 46 I } break term 55 T . break term 55 L )" + non associative with precedence 55 + for @{ 'SnBind2 $I $T $L }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/weight_1.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/weight_1.ma new file mode 100644 index 000000000..31b4fe655 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/weight_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ♯ { term 46 x } )" + non associative with precedence 90 + for @{ 'Weight $x }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/weight_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/weight_2.ma new file mode 100644 index 000000000..a2b9b474b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/weight_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ♯ { term 46 L , break term 46 T } )" + non associative with precedence 90 + for @{ 'Weight $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/weight_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/weight_3.ma new file mode 100644 index 000000000..42b3c60ec --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/weight_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ♯ { term 46 G , break term 46 L , break term 46 T } )" + non associative with precedence 90 + for @{ 'Weight $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/notation.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/notation.ma new file mode 100644 index 000000000..0996c7cdb --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/notation.ma @@ -0,0 +1,47 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃G, L⦄ ⊢ break ⌘ ⦃ term 46 T ⦄ ≡ break term 46 k )" + non associative with precedence 45 + for @{ 'ICM $L $T $k }. + +notation "hvbox( ⦃ term 46 h , break term 46 L ⦄ ⊢ break term 46 T ÷ break term 46 A )" + non associative with precedence 45 + for @{ 'BinaryArity $h $L $T $A }. + +notation "hvbox( h ⊢ break term 46 L1 ÷ ⫃ break term 46 L2 )" + non associative with precedence 45 + for @{ 'LRSubEqB $h $L1 $L2 }. + +notation "hvbox( L1 ⊢ ⬌ break term 46 L2 )" + non associative with precedence 45 + for @{ 'PConvSn $L1 $L2 }. + +notation "hvbox( L1 ⊢ ⬌* break term 46 L2 )" + non associative with precedence 45 + for @{ 'PConvSnStar $L1 $L2 }. + +notation "hvbox( ⦃ term 46 h , break term 46 L ⦄ ⊢ break term 46 T1 : break term 46 T2 )" + non associative with precedence 45 + for @{ 'NativeType $h $L $T1 $T2 }. + +notation "hvbox( ⦃ term 46 h , break term 46 L ⦄ ⊢ break term 46 T1 : : break term 46 T2 )" + non associative with precedence 45 + for @{ 'NativeTypeAlt $h $L $T1 $T2 }. + +notation "hvbox( ⦃ term 46 h , break term 46 L ⦄ ⊢ break term 46 T1 : * break term 46 T2 )" + non associative with precedence 45 + for @{ 'NativeTypeStar $h $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/atomicarity_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/atomicarity_4.ma new file mode 100644 index 000000000..e6a1b0924 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/atomicarity_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃term 46 G, break term 46 L⦄ ⊢ break term 46 T ⁝ break term 46 A )" + non associative with precedence 45 + for @{ 'AtomicArity $G $L $T $A }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpred_8.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpred_8.ma new file mode 100644 index 000000000..80e40a157 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpred_8.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≽ break [ term 46 h, break term 46 g ] break ⦃ term 46 G2, break term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'BTPRed $h $g $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredalt_8.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredalt_8.ma new file mode 100644 index 000000000..c3f111a0e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredalt_8.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≽ ≽ break [ term 46 h, break term 46 g ] break ⦃ term 46 G2, break term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'BTPRedAlt $h $g $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredproper_8.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredproper_8.ma new file mode 100644 index 000000000..bb6d3d1af --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredproper_8.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≻ break [ term 46 h, break term 46 g ] break ⦃ term 46 G2, break term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'BTPRedProper $h $g $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredstar_8.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredstar_8.ma new file mode 100644 index 000000000..3943a33fd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredstar_8.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≥ break [ term 46 h, break term 46 g ] break ⦃ term 46 G2, break term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'BTPRedStar $h $g $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredstaralt_8.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredstaralt_8.ma new file mode 100644 index 000000000..227a666f2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredstaralt_8.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≥ ≥ break [ term 46 h, break term 46 g ] break ⦃ term 46 G2, break term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'BTPRedStarAlt $h $g $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btsn_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btsn_5.ma new file mode 100644 index 000000000..207ba13bf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btsn_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦥ [ term 46 h, break term 46 g ] break ⦃ term 46 G, break term 46 L, break term 46 T ⦄ )" + non associative with precedence 45 + for @{ 'BTSN $h $g $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btsnalt_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btsnalt_5.ma new file mode 100644 index 000000000..7c6d69120 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btsnalt_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦥ ⦥ [ term 46 h, break term 46 g ] break ⦃ term 46 G, break term 46 L, break term 46 T ⦄ )" + non associative with precedence 45 + for @{ 'BTSNAlt $h $g $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/cosn_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/cosn_5.ma new file mode 100644 index 000000000..be4f9a4a9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/cosn_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( G ⊢ ~ ⬊ * break [ term 46 h , break term 46 g , break term 46 l ] break term 46 L )" + non associative with precedence 45 + for @{ 'CoSN $h $g $l $G $L }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/degree_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/degree_6.ma new file mode 100644 index 000000000..7602a6544 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/degree_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T ▪ break [ term 46 h , break term 46 g ] break term 46 d )" + non associative with precedence 45 + for @{ 'Degree $h $g $G $L $T $d }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/dpconvstar_8.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/dpconvstar_8.ma new file mode 100644 index 000000000..9aa3568af --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/dpconvstar_8.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T1 • * ⬌ * break [ term 46 h , break term 46 g , break term 46 n1 , break term 46 n2 ] break term 46 T2 )" + non associative with precedence 45 + for @{ 'DPConvStar $h $g $n1 $n2 $G $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/dpredstar_7.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/dpredstar_7.ma new file mode 100644 index 000000000..c5f55aed8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/dpredstar_7.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T1 • * ➡ * break [ term 46 h , break term 46 g , break term 46 n ] break term 46 T2 )" + non associative with precedence 45 + for @{ 'DPRedStar $h $g $n $G $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/freestar_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/freestar_4.ma new file mode 100644 index 000000000..e46480639 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/freestar_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L ⊢ break term 46 i ϵ 𝐅 * [ break term 46 l ] ⦃ break term 46 T ⦄ )" + non associative with precedence 45 + for @{ 'FreeStar $L $i $l $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/ineint_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/ineint_5.ma new file mode 100644 index 000000000..83f23ef23 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/ineint_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L, break term 46 T ⦄ ϵ break [ term 46 R ] break 〚term 46 A 〛 )" + non associative with precedence 45 + for @{ 'InEInt $R $G $L $T $A }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazybtpredstarproper_8.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazybtpredstarproper_8.ma new file mode 100644 index 000000000..e56e02e46 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazybtpredstarproper_8.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ >≡ break [ term 46 h, break term 46 g ] break ⦃ term 46 G2, break term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'LazyBTPRedStarProper $h $g $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazyeq_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazyeq_4.ma new file mode 100644 index 000000000..a6b02b3cc --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazyeq_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L1 ≡ break [ term 46 T , break term 46 l ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'LazyEq $T $l $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazyeq_7.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazyeq_7.ma new file mode 100644 index 000000000..79a79e2c0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazyeq_7.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≡ break [ term 46 l ] break ⦃ term 46 G2, break term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'LazyEq $l $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazyor_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazyor_5.ma new file mode 100644 index 000000000..6479c1f71 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazyor_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L1 ⋓ break [ term 46 T , break term 46 l ] break term 46 L2 ≡ break term 46 L )" + non associative with precedence 45 + for @{ 'LazyOr $L1 $T $l $L2 $L }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeq_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeq_4.ma new file mode 100644 index 000000000..994e6b22b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeq_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L1 break ⊆ [ term 46 l , break term 46 m ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'LRSubEq $L1 $l $m $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqa_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqa_3.ma new file mode 100644 index 000000000..c3b74a96a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqa_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( G ⊢ break term 46 L1 ⫃ ⁝ break term 46 L2 )" + non associative with precedence 45 + for @{ 'LRSubEqA $G $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqc_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqc_2.ma new file mode 100644 index 000000000..3a6e5eded --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqc_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L1 ⫃ break term 46 L2 )" + non associative with precedence 45 + for @{ 'LRSubEqC $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqc_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqc_4.ma new file mode 100644 index 000000000..823d6bebf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqc_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( G ⊢ break term 46 L1 ⫃ break [ term 46 R ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'LRSubEqC $R $G $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqd_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqd_5.ma new file mode 100644 index 000000000..d90e35183 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqd_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( G ⊢ break term 46 L1 ⫃ ▪ break [ term 46 h, break term 46 g ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'LRSubEqD $h $g $G $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqv_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqv_5.ma new file mode 100644 index 000000000..f6595e14d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqv_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( G ⊢ break term 46 L1 ⫃ ¡ break [ term 46 h, break term 46 g ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'LRSubEqV $h $g $G $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/midiso_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/midiso_4.ma new file mode 100644 index 000000000..dc380d849 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/midiso_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L1 ⩬ break [ term 46 l , break term 46 m ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'MidIso $l $m $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/nativevalid_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/nativevalid_5.ma new file mode 100644 index 000000000..d6426f6c1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/nativevalid_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T ¡ break [ term 46 h, break term 46 g ] )" + non associative with precedence 45 + for @{ 'NativeValid $h $g $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/nativevalid_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/nativevalid_6.ma new file mode 100644 index 000000000..449fe1452 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/nativevalid_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T ¡ break [ term 46 h , break term 46 g , break term 46 d ] )" + non associative with precedence 45 + for @{ 'NativeValid $h $g $d $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pconv_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pconv_4.ma new file mode 100644 index 000000000..a7563d0c0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pconv_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 ⬌ break term 46 T2 )" + non associative with precedence 45 + for @{ 'PConv $G $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pconvstar_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pconvstar_4.ma new file mode 100644 index 000000000..f263e5d06 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pconvstar_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 ⬌* break term 46 T2 )" + non associative with precedence 45 + for @{ 'PConvStar $G $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pred_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pred_4.ma new file mode 100644 index 000000000..397ac935f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pred_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T1 ➡ break term 46 T2 )" + non associative with precedence 45 + for @{ 'PRed $G $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pred_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pred_6.ma new file mode 100644 index 000000000..1a423e465 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pred_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 ➡ break [ term 46 h , break term 46 g ] break term 46 T2 )" + non associative with precedence 45 + for @{ 'PRed $h $g $G $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predeval_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predeval_4.ma new file mode 100644 index 000000000..e26cfe6d3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predeval_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 ➡ * break 𝐍 ⦃ term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'PRedEval $G $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predeval_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predeval_6.ma new file mode 100644 index 000000000..8360d142a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predeval_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 ➡ * break [ term 46 h , break term 46 g ] break 𝐍 ⦃ term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'PRedEval $h $g $G $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednormal_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednormal_3.ma new file mode 100644 index 000000000..a8806a1c7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednormal_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ ➡ 𝐍 break ⦃ term 46 T ⦄ )" + non associative with precedence 45 + for @{ 'PRedNormal $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednormal_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednormal_5.ma new file mode 100644 index 000000000..d1e001d85 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednormal_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ ➡ break [ term 46 h , break term 46 g ] 𝐍 break ⦃ term 46 T ⦄ )" + non associative with precedence 45 + for @{ 'PRedNormal $h $g $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednotreducible_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednotreducible_3.ma new file mode 100644 index 000000000..4ad7cbc72 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednotreducible_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ ➡ 𝐈 break ⦃ term 46 T ⦄ )" + non associative with precedence 45 + for @{ 'PRedNotReducible $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednotreducible_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednotreducible_5.ma new file mode 100644 index 000000000..cb33d31e2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednotreducible_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ ➡ break [ term 46 h , break term 46 g ] 𝐈 break ⦃ term 46 T ⦄ )" + non associative with precedence 45 + for @{ 'PRedNotReducible $h $g $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predreducible_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predreducible_3.ma new file mode 100644 index 000000000..5d84a363d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predreducible_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ ➡ 𝐑 break ⦃ term 46 T ⦄ )" + non associative with precedence 45 + for @{ 'PRedReducible $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predreducible_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predreducible_5.ma new file mode 100644 index 000000000..82ded9c03 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predreducible_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ ➡ break [ term 46 h , break term 46 g ] 𝐑 break ⦃ term 46 T ⦄ )" + non associative with precedence 45 + for @{ 'PRedReducible $h $g $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsn_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsn_3.ma new file mode 100644 index 000000000..d06064a29 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsn_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L1 ⦄ ⊢ ➡ break term 46 L2 )" + non associative with precedence 45 + for @{ 'PRedSn $G $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsn_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsn_5.ma new file mode 100644 index 000000000..206566071 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsn_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L1 ⦄ ⊢ ➡ break [ term 46 h , break term 46 g ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'PRedSn $h $g $G $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsnstar_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsnstar_3.ma new file mode 100644 index 000000000..2bcf32665 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsnstar_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L1 ⦄ ⊢ ➡* break term 46 L2 )" + non associative with precedence 45 + for @{ 'PRedSnStar $G $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsnstar_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsnstar_5.ma new file mode 100644 index 000000000..aef4f2707 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsnstar_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L1 ⦄ ⊢ ➡ * break [ term 46 h , break term 46 g ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'PRedSnStar $h $g $G $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predstar_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predstar_4.ma new file mode 100644 index 000000000..24984270d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predstar_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , term 46 L ⦄ ⊢ break term 46 T1 ➡ * break term 46 T2 )" + non associative with precedence 45 + for @{ 'PRedStar $G $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predstar_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predstar_6.ma new file mode 100644 index 000000000..54ac66647 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predstar_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 ➡ * break [ term 46 h , break term 46 g ] break term 46 T2 )" + non associative with precedence 45 + for @{ 'PRedStar $h $g $G $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/psubst_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/psubst_6.ma new file mode 100644 index 000000000..e35f7ca23 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/psubst_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T1 break ▶ [ term 46 l , break term 46 m ] break term 46 T2 )" + non associative with precedence 45 + for @{ 'PSubst $G $L $T1 $l $m $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/psubststar_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/psubststar_6.ma new file mode 100644 index 000000000..2dd1f2d6e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/psubststar_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T1 break ▶ * [ term 46 l , break term 46 m ] break term 46 T2 )" + non associative with precedence 45 + for @{ 'PSubstStar $G $L $T1 $l $m $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/psubststaralt_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/psubststaralt_6.ma new file mode 100644 index 000000000..97227dccf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/psubststaralt_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T1 break ▶ ▶ * [ term 46 l , break term 46 m ] break term 46 T2 )" + non associative with precedence 45 + for @{ 'PSubstStarAlt $G $L $T1 $l $m $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rat_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rat_3.ma new file mode 100644 index 000000000..a63dc95f2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rat_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( @ ⦃ term 46 T1 , break term 46 f ⦄ ≡ break term 46 T2 )" + non associative with precedence 45 + for @{ 'RAt $T1 $f $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdrop_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdrop_3.ma new file mode 100644 index 000000000..a761d47c6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdrop_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⬇ [ term 46 m ] break term 46 L1 ≡ break term 46 L2 )" + non associative with precedence 45 + for @{ 'RDrop $m $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdrop_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdrop_4.ma new file mode 100644 index 000000000..2345f0684 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdrop_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⬇ [ term 46 l , break term 46 m ] break term 46 L1 ≡ break term 46 L2 )" + non associative with precedence 45 + for @{ 'RDrop $l $m $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdrop_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdrop_5.ma new file mode 100644 index 000000000..d8c06726e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdrop_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⬇ [ term 46 s , break term 46 l , break term 46 m ] break term 46 L1 ≡ break term 46 L2 )" + non associative with precedence 45 + for @{ 'RDrop $s $l $m $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdropstar_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdropstar_3.ma new file mode 100644 index 000000000..8a6f2f4c1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdropstar_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⬇ * [ term 46 m ] break term 46 L1 ≡ break term 46 L2 )" + non associative with precedence 45 + for @{ 'RDropStar $m $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdropstar_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdropstar_4.ma new file mode 100644 index 000000000..291de4c0e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdropstar_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⬇ * [ term 46 s , break term 46 m ] break term 46 L1 ≡ break term 46 L2 )" + non associative with precedence 45 + for @{ 'RDropStar $s $m $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rlift_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rlift_4.ma new file mode 100644 index 000000000..e2a03284e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rlift_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⬆ [ term 46 l , break term 46 m ] break term 46 T1 ≡ break term 46 T2 )" + non associative with precedence 45 + for @{ 'RLift $l $m $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rliftstar_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rliftstar_3.ma new file mode 100644 index 000000000..af4de47ba --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rliftstar_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⬆ * [ term 46 m ] break term 46 T1 ≡ break term 46 T2 )" + non associative with precedence 45 + for @{ 'RLiftStar $m $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rminus_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rminus_3.ma new file mode 100644 index 000000000..c896a982f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rminus_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( T1 ▭ break term 46 T2 ≡ break term 46 T )" + non associative with precedence 45 + for @{ 'RMinus $T1 $T2 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/simple_1.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/simple_1.ma new file mode 100644 index 000000000..0acfb4ef7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/simple_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( 𝐒 ⦃ term 46 T ⦄ )" + non associative with precedence 45 + for @{ 'Simple $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/sn_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/sn_5.ma new file mode 100644 index 000000000..bfc7d0cb0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/sn_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ ⬊ * break [ term 46 h , break term 46 g ] break term 46 T )" + non associative with precedence 45 + for @{ 'SN $h $g $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/sn_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/sn_6.ma new file mode 100644 index 000000000..c402cdc8a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/sn_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( G ⊢ ⬊ * break [ term 46 h , break term 46 g , break term 46 T , break term 46 l ] break term 46 L )" + non associative with precedence 45 + for @{ 'SN $h $g $T $l $G $L }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/snalt_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/snalt_5.ma new file mode 100644 index 000000000..13fed06c7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/snalt_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ ⬊ ⬊ * break [ term 46 h , break term 46 g ] break term 46 T )" + non associative with precedence 45 + for @{ 'SNAlt $h $g $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/snalt_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/snalt_6.ma new file mode 100644 index 000000000..4beb9fdcf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/snalt_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( G ⊢ ⬊ ⬊ * break [ term 46 h , break term 46 g , break term 46 T , break term 46 l ] break term 46 L )" + non associative with precedence 45 + for @{ 'SNAlt $h $g $T $l $G $L }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/statictypestar_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/statictypestar_6.ma new file mode 100644 index 000000000..b7d6a71e0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/statictypestar_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T1 •* break [ term 46 h , break term 46 n ] break term 46 T2 )" + non associative with precedence 45 + for @{ 'StaticTypeStar $h $G $L $n $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/supterm_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/supterm_6.ma new file mode 100644 index 000000000..1300f0fa5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/supterm_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ⊐ break ⦃ term 46 G2, break term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'SupTerm $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermopt_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermopt_6.ma new file mode 100644 index 000000000..8ed1123b4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermopt_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ⊐⸮ break ⦃ term 46 G2, break term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'SupTermOpt $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermoptalt_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermoptalt_6.ma new file mode 100644 index 000000000..7748c1836 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermoptalt_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ⊐⊐⸮ break ⦃ term 46 G2, break term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'SupTermOptAlt $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermplus_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermplus_6.ma new file mode 100644 index 000000000..533b88cdf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermplus_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, term 46 L1, break term 46 T1 ⦄ ⊐ + break ⦃ term 46 G2, term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'SupTermPlus $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermstar_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermstar_6.ma new file mode 100644 index 000000000..f2abfc20f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermstar_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, term 46 L1, break term 46 T1 ⦄ ⊐ * break ⦃ term 46 G2, term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'SupTermStar $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/topiso_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/topiso_2.ma new file mode 100644 index 000000000..059b4372b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/topiso_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( T1 ≂ break term 46 T2 )" + non associative with precedence 45 + for @{ 'TopIso $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/unfold_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/unfold_4.ma new file mode 100644 index 000000000..3381c5632 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/unfold_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L1 ⦄ ⊢ ⧫ * break term 46 T ≡ break term 46 L2 )" + non associative with precedence 45 + for @{ 'Unfold $G $L1 $T $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cir.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cir.ma new file mode 100644 index 000000000..6868ce39a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cir.ma @@ -0,0 +1,79 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/prednotreducible_3.ma". +include "basic_2A/reduction/crr.ma". + +(* IRREDUCIBLE TERMS FOR CONTEXT-SENSITIVE REDUCTION ************************) + +definition cir: relation3 genv lenv term ≝ λG,L,T. ⦃G, L⦄ ⊢ ➡ 𝐑⦃T⦄ → ⊥. + +interpretation "irreducibility for context-sensitive reduction (term)" + 'PRedNotReducible G L T = (cir G L T). + +(* Basic inversion lemmas ***************************************************) + +lemma cir_inv_delta: ∀G,L,K,V,i. ⬇[i] L ≡ K.ⓓV → ⦃G, L⦄ ⊢ ➡ 𝐈⦃#i⦄ → ⊥. +/3 width=3 by crr_delta/ qed-. + +lemma cir_inv_ri2: ∀I,G,L,V,T. ri2 I → ⦃G, L⦄ ⊢ ➡ 𝐈⦃②{I}V.T⦄ → ⊥. +/3 width=1 by crr_ri2/ qed-. + +lemma cir_inv_ib2: ∀a,I,G,L,V,T. ib2 a I → ⦃G, L⦄ ⊢ ➡ 𝐈⦃ⓑ{a,I}V.T⦄ → + ⦃G, L⦄ ⊢ ➡ 𝐈⦃V⦄ ∧ ⦃G, L.ⓑ{I}V⦄ ⊢ ➡ 𝐈⦃T⦄. +/4 width=1 by crr_ib2_sn, crr_ib2_dx, conj/ qed-. + +lemma cir_inv_bind: ∀a,I,G,L,V,T. ⦃G, L⦄ ⊢ ➡ 𝐈⦃ⓑ{a,I}V.T⦄ → + ∧∧ ⦃G, L⦄ ⊢ ➡ 𝐈⦃V⦄ & ⦃G, L.ⓑ{I}V⦄ ⊢ ➡ 𝐈⦃T⦄ & ib2 a I. +#a * [ elim a -a ] +#G #L #V #T #H [ elim H -H /3 width=1 by crr_ri2, or_introl/ ] +elim (cir_inv_ib2 … H) -H /3 width=1 by and3_intro, or_introl/ +qed-. + +lemma cir_inv_appl: ∀G,L,V,T. ⦃G, L⦄ ⊢ ➡ 𝐈⦃ⓐV.T⦄ → + ∧∧ ⦃G, L⦄ ⊢ ➡ 𝐈⦃V⦄ & ⦃G, L⦄ ⊢ ➡ 𝐈⦃T⦄ & 𝐒⦃T⦄. +#G #L #V #T #HVT @and3_intro /3 width=1 by crr_appl_sn, crr_appl_dx/ +generalize in match HVT; -HVT elim T -T // +* // #a * #U #T #_ #_ #H elim H -H /2 width=1 by crr_beta, crr_theta/ +qed-. + +lemma cir_inv_flat: ∀I,G,L,V,T. ⦃G, L⦄ ⊢ ➡ 𝐈⦃ⓕ{I}V.T⦄ → + ∧∧ ⦃G, L⦄ ⊢ ➡ 𝐈⦃V⦄ & ⦃G, L⦄ ⊢ ➡ 𝐈⦃T⦄ & 𝐒⦃T⦄ & I = Appl. +* #G #L #V #T #H +[ elim (cir_inv_appl … H) -H /2 width=1 by and4_intro/ +| elim (cir_inv_ri2 … H) -H // +] +qed-. + +(* Basic properties *********************************************************) + +lemma cir_sort: ∀G,L,k. ⦃G, L⦄ ⊢ ➡ 𝐈⦃⋆k⦄. +/2 width=4 by crr_inv_sort/ qed. + +lemma cir_gref: ∀G,L,p. ⦃G, L⦄ ⊢ ➡ 𝐈⦃§p⦄. +/2 width=4 by crr_inv_gref/ qed. + +lemma tir_atom: ∀G,I. ⦃G, ⋆⦄ ⊢ ➡ 𝐈⦃⓪{I}⦄. +/2 width=3 by trr_inv_atom/ qed. + +lemma cir_ib2: ∀a,I,G,L,V,T. + ib2 a I → ⦃G, L⦄ ⊢ ➡ 𝐈⦃V⦄ → ⦃G, L.ⓑ{I}V⦄ ⊢ ➡ 𝐈⦃T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐈⦃ⓑ{a,I}V.T⦄. +#a #I #G #L #V #T #HI #HV #HT #H +elim (crr_inv_ib2 … HI H) -HI -H /2 width=1 by/ +qed. + +lemma cir_appl: ∀G,L,V,T. ⦃G, L⦄ ⊢ ➡ 𝐈⦃V⦄ → ⦃G, L⦄ ⊢ ➡ 𝐈⦃T⦄ → 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐈⦃ⓐV.T⦄. +#G #L #V #T #HV #HT #H1 #H2 +elim (crr_inv_appl … H2) -H2 /2 width=1 by/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cir_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cir_lift.ma new file mode 100644 index 000000000..672cf11b0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cir_lift.ma @@ -0,0 +1,28 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/crr_lift.ma". +include "basic_2A/reduction/cir.ma". + +(* IRREDUCIBLE TERMS FOR CONTEXT-SENSITIVE REDUCTION ************************) + +(* Properties on relocation *************************************************) + +lemma cir_lift: ∀G,K,T. ⦃G, K⦄ ⊢ ➡ 𝐈⦃T⦄ → ∀L,s,l,m. ⬇[s, l, m] L ≡ K → + ∀U. ⬆[l, m] T ≡ U → ⦃G, L⦄ ⊢ ➡ 𝐈⦃U⦄. +/3 width=8 by crr_inv_lift/ qed. + +lemma cir_inv_lift: ∀G,L,U. ⦃G, L⦄ ⊢ ➡ 𝐈⦃U⦄ → ∀K,s,l,m. ⬇[s, l, m] L ≡ K → + ∀T. ⬆[l, m] T ≡ U → ⦃G, K⦄ ⊢ ➡ 𝐈⦃T⦄. +/3 width=8 by crr_lift/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cix.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cix.ma new file mode 100644 index 000000000..bcce8ae40 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cix.ma @@ -0,0 +1,93 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/prednotreducible_5.ma". +include "basic_2A/reduction/cir.ma". +include "basic_2A/reduction/crx.ma". + +(* IRREDUCIBLE TERMS FOR CONTEXT-SENSITIVE EXTENDED REDUCTION ***************) + +definition cix: ∀h. sd h → relation3 genv lenv term ≝ + λh,g,G,L,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃T⦄ → ⊥. + +interpretation "irreducibility for context-sensitive extended reduction (term)" + 'PRedNotReducible h g G L T = (cix h g G L T). + +(* Basic inversion lemmas ***************************************************) + +lemma cix_inv_sort: ∀h,g,G,L,k,d. deg h g k (d+1) → ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃⋆k⦄ → ⊥. +/3 width=2 by crx_sort/ qed-. + +lemma cix_inv_delta: ∀h,g,I,G,L,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃#i⦄ → ⊥. +/3 width=4 by crx_delta/ qed-. + +lemma cix_inv_ri2: ∀h,g,I,G,L,V,T. ri2 I → ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃②{I}V.T⦄ → ⊥. +/3 width=1 by crx_ri2/ qed-. + +lemma cix_inv_ib2: ∀h,g,a,I,G,L,V,T. ib2 a I → ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃ⓑ{a,I}V.T⦄ → + ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃V⦄ ∧ ⦃G, L.ⓑ{I}V⦄ ⊢ ➡[h, g] 𝐈⦃T⦄. +/4 width=1 by crx_ib2_sn, crx_ib2_dx, conj/ qed-. + +lemma cix_inv_bind: ∀h,g,a,I,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃ⓑ{a,I}V.T⦄ → + ∧∧ ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃V⦄ & ⦃G, L.ⓑ{I}V⦄ ⊢ ➡[h, g] 𝐈⦃T⦄ & ib2 a I. +#h #g #a * [ elim a -a ] +#G #L #V #T #H [ elim H -H /3 width=1 by crx_ri2, or_introl/ ] +elim (cix_inv_ib2 … H) -H /3 width=1 by and3_intro, or_introl/ +qed-. + +lemma cix_inv_appl: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃ⓐV.T⦄ → + ∧∧ ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃V⦄ & ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃T⦄ & 𝐒⦃T⦄. +#h #g #G #L #V #T #HVT @and3_intro /3 width=1 by crx_appl_sn, crx_appl_dx/ +generalize in match HVT; -HVT elim T -T // +* // #a * #U #T #_ #_ #H elim H -H /2 width=1 by crx_beta, crx_theta/ +qed-. + +lemma cix_inv_flat: ∀h,g,I,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃ⓕ{I}V.T⦄ → + ∧∧ ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃V⦄ & ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃T⦄ & 𝐒⦃T⦄ & I = Appl. +#h #g * #G #L #V #T #H +[ elim (cix_inv_appl … H) -H /2 width=1 by and4_intro/ +| elim (cix_inv_ri2 … H) -H // +] +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma cix_inv_cir: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐈⦃T⦄. +/3 width=1 by crr_crx/ qed-. + +(* Basic properties *********************************************************) + +lemma cix_sort: ∀h,g,G,L,k. deg h g k 0 → ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃⋆k⦄. +#h #g #G #L #k #Hk #H elim (crx_inv_sort … H) -L #d #Hkd +lapply (deg_mono … Hk Hkd) -h -k (cpr_inv_sort1 … H) // +qed. + +lemma cnr_lref_free: ∀G,L,i. |L| ≤ i → ⦃G, L⦄ ⊢ ➡ 𝐍⦃#i⦄. +#G #L #i #Hi #X #H elim (cpr_inv_lref1 … H) -H // * +#K #V1 #V2 #HLK lapply (drop_fwd_length_lt2 … HLK) -HLK +#H elim (lt_refl_false i) /2 width=3 by lt_to_le_to_lt/ +qed. + +(* Basic_1: was only: nf2_csort_lref *) +lemma cnr_lref_atom: ∀G,L,i. ⬇[i] L ≡ ⋆ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃#i⦄. +#G #L #i #HL @cnr_lref_free >(drop_fwd_length … HL) -HL // +qed. + +(* Basic_1: was: nf2_abst *) +lemma cnr_abst: ∀a,G,L,W,T. ⦃G, L⦄ ⊢ ➡ 𝐍⦃W⦄ → ⦃G, L.ⓛW⦄ ⊢ ➡ 𝐍⦃T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃ⓛ{a}W.T⦄. +#a #G #L #W #T #HW #HT #X #H +elim (cpr_inv_abst1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct +>(HW … HW0) -W0 >(HT … HT0) -T0 // +qed. + +(* Basic_1: was only: nf2_appl_lref *) +lemma cnr_appl_simple: ∀G,L,V,T. ⦃G, L⦄ ⊢ ➡ 𝐍⦃V⦄ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄ → 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃ⓐV.T⦄. +#G #L #V #T #HV #HT #HS #X #H +elim (cpr_inv_appl1_simple … H) -H // #V0 #T0 #HV0 #HT0 #H destruct +>(HV … HV0) -V0 >(HT … HT0) -T0 // +qed. + +(* Basic_1: was: nf2_dec *) +axiom cnr_dec: ∀G,L,T1. ⦃G, L⦄ ⊢ ➡ 𝐍⦃T1⦄ ∨ + ∃∃T2. ⦃G, L⦄ ⊢ T1 ➡ T2 & (T1 = T2 → ⊥). + +(* Basic_1: removed theorems 1: nf2_abst_shift *) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_cir.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_cir.ma new file mode 100644 index 000000000..786611f54 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_cir.ma @@ -0,0 +1,28 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/cpr_cir.ma". +include "basic_2A/reduction/cnr_crr.ma". + +(* NORMAL TERMS FOR CONTEXT-SENSITIVE REDUCTION *****************************) + +(* Main properties on irreducibility ****************************************) + +theorem cir_cnr: ∀G,L,T. ⦃G, L⦄ ⊢ ➡ 𝐈⦃T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄. +/2 width=4 by cpr_fwd_cir/ qed. + +(* Main inversion lemmas on irreducibility **********************************) + +theorem cnr_inv_cir: ∀G,L,T. ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐈⦃T⦄. +/2 width=5 by cnr_inv_crr/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_crr.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_crr.ma new file mode 100644 index 000000000..e8b5dfb4b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_crr.ma @@ -0,0 +1,46 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/crr.ma". +include "basic_2A/reduction/cnr.ma". + +(* NORMAL TERMS FOR CONTEXT-SENSITIVE REDUCTION *****************************) + +(* Advanced inversion lemmas on reducibility ********************************) + +(* Note: this property is unusual *) +lemma cnr_inv_crr: ∀G,L,T. ⦃G, L⦄ ⊢ ➡ 𝐑⦃T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄ → ⊥. +#G #L #T #H elim H -L -T +[ #L #K #V #i #HLK #H + elim (cnr_inv_delta … HLK H) +| #L #V #T #_ #IHV #H + elim (cnr_inv_appl … H) -H /2 width=1 by/ +| #L #V #T #_ #IHT #H + elim (cnr_inv_appl … H) -H /2 width=1 by/ +| #I #L #V #T * #H1 #H2 destruct + [ elim (cnr_inv_zeta … H2) + | elim (cnr_inv_eps … H2) + ] +|5,6: #a * [ elim a ] #L #V #T * #H1 #_ #IH #H2 destruct + [1,3: elim (cnr_inv_abbr … H2) -H2 /2 width=1 by/ + |*: elim (cnr_inv_abst … H2) -H2 /2 width=1 by/ + ] +| #a #L #V #W #T #H + elim (cnr_inv_appl … H) -H #_ #_ #H + elim (simple_inv_bind … H) +| #a #L #V #W #T #H + elim (cnr_inv_appl … H) -H #_ #_ #H + elim (simple_inv_bind … H) +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_lift.ma new file mode 100644 index 000000000..4ff641f4f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_lift.ma @@ -0,0 +1,49 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/cpr_lift.ma". +include "basic_2A/reduction/cnr.ma". + +(* NORMAL TERMS FOR CONTEXT-SENSITIVE REDUCTION *****************************) + +(* Advanced properties ******************************************************) + +(* Basic_1: was: nf2_lref_abst *) +lemma cnr_lref_abst: ∀G,L,K,V,i. ⬇[i] L ≡ K. ⓛV → ⦃G, L⦄ ⊢ ➡ 𝐍⦃#i⦄. +#G #L #K #V #i #HLK #X #H +elim (cpr_inv_lref1 … H) -H // * +#K0 #V1 #V2 #HLK0 #_ #_ +lapply (drop_mono … HLK … HLK0) -L #H destruct +qed. + +(* Relocation properties ****************************************************) + +(* Basic_1: was: nf2_lift *) +lemma cnr_lift: ∀G,L0,L,T,T0,s,l,m. ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄ → + ⬇[s, l, m] L0 ≡ L → ⬆[l, m] T ≡ T0 → ⦃G, L0⦄ ⊢ ➡ 𝐍⦃T0⦄. +#G #L0 #L #T #T0 #s #l #m #HLT #HL0 #HT0 #X #H +elim (cpr_inv_lift1 … H … HL0 … HT0) -L0 #T1 #HT10 #HT1 +<(HLT … HT1) in HT0; -L #HT0 +>(lift_mono … HT10 … HT0) -T1 -X // +qed. + +(* Note: this was missing in basic_1 *) +lemma cnr_inv_lift: ∀G,L0,L,T,T0,s,l,m. ⦃G, L0⦄ ⊢ ➡ 𝐍⦃T0⦄ → + ⬇[s, l, m] L0 ≡ L → ⬆[l, m] T ≡ T0 → ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄. +#G #L0 #L #T #T0 #s #l #m #HLT0 #HL0 #HT0 #X #H +elim (lift_total X l m) #X0 #HX0 +lapply (cpr_lift … H … HL0 … HT0 … HX0) -L #HTX0 +>(HLT0 … HTX0) in HX0; -L0 -X0 #H +>(lift_inj … H … HT0) -T0 -X -s -l -m // +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx.ma new file mode 100644 index 000000000..e754c0a1f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx.ma @@ -0,0 +1,136 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/prednormal_5.ma". +include "basic_2A/reduction/cnr.ma". +include "basic_2A/reduction/cpx.ma". + +(* NORMAL TERMS FOR CONTEXT-SENSITIVE EXTENDED REDUCTION ********************) + +definition cnx: ∀h. sd h → relation3 genv lenv term ≝ + λh,g,G,L. NF … (cpx h g G L) (eq …). + +interpretation + "normality for context-sensitive extended reduction (term)" + 'PRedNormal h g L T = (cnx h g L T). + +(* Basic inversion lemmas ***************************************************) + +lemma cnx_inv_sort: ∀h,g,G,L,k. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃⋆k⦄ → deg h g k 0. +#h #g #G #L #k #H elim (deg_total h g k) +#d @(nat_ind_plus … d) -d // #d #_ #Hkd +lapply (H (⋆(next h k)) ?) -H /2 width=2 by cpx_st/ -L -d #H +lapply (destruct_tatom_tatom_aux … H) -H #H (**) (* destruct lemma needed *) +lapply (destruct_sort_sort_aux … H) -H #H (**) (* destruct lemma needed *) +lapply (next_lt h k) >H -H #H elim (lt_refl_false … H) +qed-. + +lemma cnx_inv_delta: ∀h,g,I,G,L,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃#i⦄ → ⊥. +#h #g #I #G #L #K #V #i #HLK #H +elim (lift_total V 0 (i+1)) #W #HVW +lapply (H W ?) -H [ /3 width=7 by cpx_delta/ ] -HLK #H destruct +elim (lift_inv_lref2_be … HVW) -HVW // +qed-. + +lemma cnx_inv_abst: ∀h,g,a,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃ⓛ{a}V.T⦄ → + ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃V⦄ ∧ ⦃G, L.ⓛV⦄ ⊢ ➡[h, g] 𝐍⦃T⦄. +#h #g #a #G #L #V1 #T1 #HVT1 @conj +[ #V2 #HV2 lapply (HVT1 (ⓛ{a}V2.T1) ?) -HVT1 /2 width=2 by cpx_pair_sn/ -HV2 #H destruct // +| #T2 #HT2 lapply (HVT1 (ⓛ{a}V1.T2) ?) -HVT1 /2 width=2 by cpx_bind/ -HT2 #H destruct // +] +qed-. + +lemma cnx_inv_abbr: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃-ⓓV.T⦄ → + ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃V⦄ ∧ ⦃G, L.ⓓV⦄ ⊢ ➡[h, g] 𝐍⦃T⦄. +#h #g #G #L #V1 #T1 #HVT1 @conj +[ #V2 #HV2 lapply (HVT1 (-ⓓV2.T1) ?) -HVT1 /2 width=2 by cpx_pair_sn/ -HV2 #H destruct // +| #T2 #HT2 lapply (HVT1 (-ⓓV1.T2) ?) -HVT1 /2 width=2 by cpx_bind/ -HT2 #H destruct // +] +qed-. + +lemma cnx_inv_zeta: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃+ⓓV.T⦄ → ⊥. +#h #g #G #L #V #T #H elim (is_lift_dec T 0 1) +[ * #U #HTU + lapply (H U ?) -H /2 width=3 by cpx_zeta/ #H destruct + elim (lift_inv_pair_xy_y … HTU) +| #HT + elim (cpr_delift G(⋆) V T (⋆.ⓓV) 0) // #T2 #T1 #HT2 #HT12 + lapply (H (+ⓓV.T2) ?) -H /5 width=1 by cpr_cpx, tpr_cpr, cpr_bind/ -HT2 + #H destruct /3 width=2 by ex_intro/ +] +qed-. + +lemma cnx_inv_appl: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃ⓐV.T⦄ → + ∧∧ ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃V⦄ & ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ & 𝐒⦃T⦄. +#h #g #G #L #V1 #T1 #HVT1 @and3_intro +[ #V2 #HV2 lapply (HVT1 (ⓐV2.T1) ?) -HVT1 /2 width=1 by cpx_pair_sn/ -HV2 #H destruct // +| #T2 #HT2 lapply (HVT1 (ⓐV1.T2) ?) -HVT1 /2 width=1 by cpx_flat/ -HT2 #H destruct // +| generalize in match HVT1; -HVT1 elim T1 -T1 * // #a * #W1 #U1 #_ #_ #H + [ elim (lift_total V1 0 1) #V2 #HV12 + lapply (H (ⓓ{a}W1.ⓐV2.U1) ?) -H /3 width=3 by cpr_cpx, cpr_theta/ -HV12 #H destruct + | lapply (H (ⓓ{a}ⓝW1.V1.U1) ?) -H /3 width=1 by cpr_cpx, cpr_beta/ #H destruct + ] +] +qed-. + +lemma cnx_inv_eps: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃ⓝV.T⦄ → ⊥. +#h #g #G #L #V #T #H lapply (H T ?) -H +/2 width=4 by cpx_eps, discr_tpair_xy_y/ +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma cnx_fwd_cnr: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄. +#h #g #G #L #T #H #U #HTU +@H /2 width=1 by cpr_cpx/ (**) (* auto fails because a δ-expansion gets in the way *) +qed-. + +(* Basic properties *********************************************************) + +lemma cnx_sort: ∀h,g,G,L,k. deg h g k 0 → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃⋆k⦄. +#h #g #G #L #k #Hk #X #H elim (cpx_inv_sort1 … H) -H // * #d #Hkd #_ +lapply (deg_mono … Hkd Hk) -h -L (drop_fwd_length … HL) -HL // +qed. + +lemma cnx_abst: ∀h,g,a,G,L,W,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃W⦄ → ⦃G, L.ⓛW⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → + ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃ⓛ{a}W.T⦄. +#h #g #a #G #L #W #T #HW #HT #X #H +elim (cpx_inv_abst1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct +>(HW … HW0) -W0 >(HT … HT0) -T0 // +qed. + +lemma cnx_appl_simple: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃V⦄ → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → 𝐒⦃T⦄ → + ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃ⓐV.T⦄. +#h #g #G #L #V #T #HV #HT #HS #X #H +elim (cpx_inv_appl1_simple … H) -H // #V0 #T0 #HV0 #HT0 #H destruct +>(HV … HV0) -V0 >(HT … HT0) -T0 // +qed. + +axiom cnx_dec: ∀h,g,G,L,T1. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T1⦄ ∨ + ∃∃T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 & (T1 = T2 → ⊥). diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx_cix.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx_cix.ma new file mode 100644 index 000000000..40f69e006 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx_cix.ma @@ -0,0 +1,28 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/cpx_cix.ma". +include "basic_2A/reduction/cnx_crx.ma". + +(* NORMAL TERMS FOR CONTEXT-SENSITIVE EXTENDED REDUCTION ********************) + +(* Main properties on irreducibility ****************************************) + +theorem cix_cnx: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃T⦄ → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄. +/2 width=6 by cpx_fwd_cix/ qed. + +(* Main inversion lemmas on irreducibility **********************************) + +theorem cnx_inv_cix: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃T⦄. +/2 width=7 by cnx_inv_crx/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx_crx.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx_crx.ma new file mode 100644 index 000000000..2be5d0d63 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx_crx.ma @@ -0,0 +1,49 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/crx.ma". +include "basic_2A/reduction/cnx.ma". + +(* NORMAL TERMS FOR CONTEXT-SENSITIVE EXTENDED REDUCTION ********************) + +(* Advanced inversion lemmas on reducibility ********************************) + +(* Note: this property is unusual *) +lemma cnx_inv_crx: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃T⦄ → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → ⊥. +#h #g #G #L #T #H elim H -L -T +[ #L #k #d #Hkd #H + lapply (cnx_inv_sort … H) -H #H + lapply (deg_mono … H Hkd) -h -L -k (lift_mono … HT10 … HT0) -T1 -X // +qed. + +lemma cnx_inv_lift: ∀h,g,G,L0,L,T,T0,s,l,m. ⦃G, L0⦄ ⊢ ➡[h, g] 𝐍⦃T0⦄ → ⬇[s, l, m] L0 ≡ L → + ⬆[l, m] T ≡ T0 → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄. +#h #g #G #L0 #L #T #T0 #s #l #m #HLT0 #HL0 #HT0 #X #H +elim (lift_total X l m) #X0 #HX0 +lapply (cpx_lift … H … HL0 … HT0 … HX0) -L #HTX0 +>(HLT0 … HTX0) in HX0; -L0 -X0 #H +>(lift_inj … H … HT0) -T0 -X -l -m // +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cpr.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cpr.ma new file mode 100644 index 000000000..d79fba9fd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cpr.ma @@ -0,0 +1,309 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/pred_4.ma". +include "basic_2A/static/lsubr.ma". +include "basic_2A/unfold/lstas.ma". + +(* CONTEXT-SENSITIVE PARALLEL REDUCTION FOR TERMS ***************************) + +(* activate genv *) +(* Basic_1: includes: pr0_delta1 pr2_delta1 pr2_thin_dx *) +(* Note: cpr_flat: does not hold in basic_1 *) +inductive cpr: relation4 genv lenv term term ≝ +| cpr_atom : ∀I,G,L. cpr G L (⓪{I}) (⓪{I}) +| cpr_delta: ∀G,L,K,V,V2,W2,i. + ⬇[i] L ≡ K. ⓓV → cpr G K V V2 → + ⬆[0, i + 1] V2 ≡ W2 → cpr G L (#i) W2 +| cpr_bind : ∀a,I,G,L,V1,V2,T1,T2. + cpr G L V1 V2 → cpr G (L.ⓑ{I}V1) T1 T2 → + cpr G L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2) +| cpr_flat : ∀I,G,L,V1,V2,T1,T2. + cpr G L V1 V2 → cpr G L T1 T2 → + cpr G L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2) +| cpr_zeta : ∀G,L,V,T1,T,T2. cpr G (L.ⓓV) T1 T → + ⬆[0, 1] T2 ≡ T → cpr G L (+ⓓV.T1) T2 +| cpr_eps : ∀G,L,V,T1,T2. cpr G L T1 T2 → cpr G L (ⓝV.T1) T2 +| cpr_beta : ∀a,G,L,V1,V2,W1,W2,T1,T2. + cpr G L V1 V2 → cpr G L W1 W2 → cpr G (L.ⓛW1) T1 T2 → + cpr G L (ⓐV1.ⓛ{a}W1.T1) (ⓓ{a}ⓝW2.V2.T2) +| cpr_theta: ∀a,G,L,V1,V,V2,W1,W2,T1,T2. + cpr G L V1 V → ⬆[0, 1] V ≡ V2 → cpr G L W1 W2 → cpr G (L.ⓓW1) T1 T2 → + cpr G L (ⓐV1.ⓓ{a}W1.T1) (ⓓ{a}W2.ⓐV2.T2) +. + +interpretation "context-sensitive parallel reduction (term)" + 'PRed G L T1 T2 = (cpr G L T1 T2). + +(* Basic properties *********************************************************) + +lemma lsubr_cpr_trans: ∀G. lsub_trans … (cpr G) lsubr. +#G #L1 #T1 #T2 #H elim H -G -L1 -T1 -T2 +[ // +| #G #L1 #K1 #V1 #V2 #W2 #i #HLK1 #_ #HVW2 #IHV12 #L2 #HL12 + elim (lsubr_fwd_drop2_abbr … HL12 … HLK1) -L1 * + /3 width=6 by cpr_delta/ +|3,7: /4 width=1 by lsubr_pair, cpr_bind, cpr_beta/ +|4,6: /3 width=1 by cpr_flat, cpr_eps/ +|5,8: /4 width=3 by lsubr_pair, cpr_zeta, cpr_theta/ +] +qed-. + +(* Basic_1: was by definition: pr2_free *) +lemma tpr_cpr: ∀G,T1,T2. ⦃G, ⋆⦄ ⊢ T1 ➡ T2 → ∀L. ⦃G, L⦄ ⊢ T1 ➡ T2. +#G #T1 #T2 #HT12 #L +lapply (lsubr_cpr_trans … HT12 L ?) // +qed. + +(* Basic_1: includes by definition: pr0_refl *) +lemma cpr_refl: ∀G,T,L. ⦃G, L⦄ ⊢ T ➡ T. +#G #T elim T -T // * /2 width=1 by cpr_bind, cpr_flat/ +qed. + +(* Basic_1: was: pr2_head_1 *) +lemma cpr_pair_sn: ∀I,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡ V2 → + ∀T. ⦃G, L⦄ ⊢ ②{I}V1.T ➡ ②{I}V2.T. +* /2 width=1 by cpr_bind, cpr_flat/ qed. + +lemma cpr_delift: ∀G,K,V,T1,L,l. ⬇[l] L ≡ (K.ⓓV) → + ∃∃T2,T. ⦃G, L⦄ ⊢ T1 ➡ T2 & ⬆[l, 1] T ≡ T2. +#G #K #V #T1 elim T1 -T1 +[ * /2 width=4 by cpr_atom, lift_sort, lift_gref, ex2_2_intro/ + #i #L #l #HLK elim (lt_or_eq_or_gt i l) + #Hil [1,3: /3 width=4 by cpr_atom, lift_lref_ge_minus, lift_lref_lt, ex2_2_intro/ ] + destruct + elim (lift_total V 0 (i+1)) #W #HVW + elim (lift_split … HVW i i) /3 width=6 by cpr_delta, ex2_2_intro/ +| * [ #a ] #I #W1 #U1 #IHW1 #IHU1 #L #l #HLK + elim (IHW1 … HLK) -IHW1 #W2 #W #HW12 #HW2 + [ elim (IHU1 (L. ⓑ{I}W1) (l+1)) -IHU1 /3 width=9 by drop_drop, cpr_bind, lift_bind, ex2_2_intro/ + | elim (IHU1 … HLK) -IHU1 -HLK /3 width=8 by cpr_flat, lift_flat, ex2_2_intro/ + ] +] +qed-. + +fact lstas_cpr_aux: ∀h,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 •*[h, d] T2 → + d = 0 → ⦃G, L⦄ ⊢ T1 ➡ T2. +#h #G #L #T1 #T2 #d #H elim H -G -L -T1 -T2 -d +/3 width=1 by cpr_eps, cpr_flat, cpr_bind/ +[ #G #L #d #k #H0 destruct normalize // +| #G #L #K #V1 #V2 #W2 #i #d #HLK #_ #HVW2 #IHV12 #H destruct + /3 width=6 by cpr_delta/ +| #G #L #K #V1 #V2 #W2 #i #d #_ #_ #_ #_ IHV1 -IHV1 // -HV1 >IHT1 -IHT1 // + | elim (cir_inv_ri2 … H) /2 width=1 by/ + ] +| #G #L #V1 #T1 #T #T2 #_ #_ #_ #H + elim (cir_inv_ri2 … H) /2 width=1 by or_introl/ +| #G #L #V1 #T1 #T2 #_ #_ #H + elim (cir_inv_ri2 … H) /2 width=1 by/ +| #a #G #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #H + elim (cir_inv_appl … H) -H #_ #_ #H + elim (simple_inv_bind … H) +| #a #G #L #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #_ #H + elim (cir_inv_appl … H) -H #_ #_ #H + elim (simple_inv_bind … H) +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cpr_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cpr_lift.ma new file mode 100644 index 000000000..4a89afa30 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cpr_lift.ma @@ -0,0 +1,110 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop_drop.ma". +include "basic_2A/reduction/cpr.ma". + +(* CONTEXT-SENSITIVE PARALLEL REDUCTION FOR TERMS ***************************) + +(* Relocation properties ****************************************************) + +(* Basic_1: includes: pr0_lift pr2_lift *) +lemma cpr_lift: ∀G. d_liftable (cpr G). +#G #K #T1 #T2 #H elim H -G -K -T1 -T2 +[ #I #G #K #L #s #l #m #_ #U1 #H1 #U2 #H2 + >(lift_mono … H1 … H2) -H1 -H2 // +| #G #K #KV #V #V2 #W2 #i #HKV #HV2 #HVW2 #IHV2 #L #s #l #m #HLK #U1 #H #U2 #HWU2 + elim (lift_inv_lref1 … H) * #Hil #H destruct + [ elim (lift_trans_ge … HVW2 … HWU2) -W2 // plus_plus_comm_23 #HVU2 + lapply (drop_trans_ge_comm … HLK … HKV ?) -K // -Hil /3 width=6 by cpr_delta, drop_inv_gen/ + ] +| #a #I #G #K #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L #s #l #m #HLK #U1 #H1 #U2 #H2 + elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 destruct + elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct /4 width=6 by cpr_bind, drop_skip/ +| #I #G #K #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L #s #l #m #HLK #U1 #H1 #U2 #H2 + elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 destruct + elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct /3 width=6 by cpr_flat/ +| #G #K #V #T1 #T #T2 #_ #HT2 #IHT1 #L #s #l #m #HLK #U1 #H #U2 #HTU2 + elim (lift_inv_bind1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct + elim (lift_conf_O1 … HTU2 … HT2) -T2 /4 width=6 by cpr_zeta, drop_skip/ +| #G #K #V #T1 #T2 #_ #IHT12 #L #s #l #m #HLK #U1 #H #U2 #HTU2 + elim (lift_inv_flat1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct /3 width=6 by cpr_eps/ +| #a #G #K #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #L #s #l #m #HLK #X1 #HX1 #X2 #HX2 + elim (lift_inv_flat1 … HX1) -HX1 #V0 #X #HV10 #HX #HX1 destruct + elim (lift_inv_bind1 … HX) -HX #W0 #T0 #HW0 #HT10 #HX destruct + elim (lift_inv_bind1 … HX2) -HX2 #X #T3 #HX #HT23 #HX2 destruct + elim (lift_inv_flat1 … HX) -HX #W3 #V3 #HW23 #HV23 #HX destruct /4 width=6 by cpr_beta, drop_skip/ +| #a #G #K #V1 #V #V2 #W1 #W2 #T1 #T2 #_ #HV2 #_ #_ #IHV1 #IHW12 #IHT12 #L #s #l #m #HLK #X1 #HX1 #X2 #HX2 + elim (lift_inv_flat1 … HX1) -HX1 #V0 #X #HV10 #HX #HX1 destruct + elim (lift_inv_bind1 … HX) -HX #W0 #T0 #HW0 #HT10 #HX destruct + elim (lift_inv_bind1 … HX2) -HX2 #W3 #X #HW23 #HX #HX2 destruct + elim (lift_inv_flat1 … HX) -HX #V3 #T3 #HV3 #HT23 #HX destruct + elim (lift_trans_ge … HV2 … HV3) -V2 /4 width=6 by cpr_theta, drop_skip/ +] +qed. + +(* Basic_1: includes: pr0_gen_lift pr2_gen_lift *) +lemma cpr_inv_lift1: ∀G. d_deliftable_sn (cpr G). +#G #L #U1 #U2 #H elim H -G -L -U1 -U2 +[ * #i #G #L #K #s #l #m #_ #T1 #H + [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by ex2_intro/ + | elim (lift_inv_lref2 … H) -H * #Hil #H destruct /3 width=3 by lift_lref_ge_minus, lift_lref_lt, ex2_intro/ + | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3 by ex2_intro/ + ] +| #G #L #LV #V #V2 #W2 #i #HLV #HV2 #HVW2 #IHV2 #K #s #l #m #HLK #T1 #H + elim (lift_inv_lref2 … H) -H * #Hil #H destruct + [ elim (drop_conf_lt … HLK … HLV) -L // #L #U #HKL #HLV #HUV + elim (IHV2 … HLV … HUV) -V #U2 #HUV2 #HU2 + elim (lift_trans_le … HUV2 … HVW2) -V2 // >minus_plus plus_minus // IHV1 -IHV1 // -HV1 >IHT1 -IHT1 // + | elim (cix_inv_ri2 … H) /2 width=1 by/ + ] +| #G #L #V1 #T1 #T #T2 #_ #_ #_ #H + elim (cix_inv_ri2 … H) /2 width=1 by or_introl/ +| #G #L #V1 #T1 #T2 #_ #_ #H + elim (cix_inv_ri2 … H) /2 width=1 by/ +| #G #L #V1 #V2 #T #_ #_ #H + elim (cix_inv_ri2 … H) /2 width=1 by/ +| #a #G #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #H + elim (cix_inv_appl … H) -H #_ #_ #H + elim (simple_inv_bind … H) +| #a #G #L #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #_ #H + elim (cix_inv_appl … H) -H #_ #_ #H + elim (simple_inv_bind … H) +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cpx_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cpx_lift.ma new file mode 100644 index 000000000..6cc63f40d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cpx_lift.ma @@ -0,0 +1,264 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop_drop.ma". +include "basic_2A/multiple/fqus_alt.ma". +include "basic_2A/static/da.ma". +include "basic_2A/reduction/cpx.ma". + +(* CONTEXT-SENSITIVE EXTENDED PARALLEL REDUCTION FOR TERMS ******************) + +(* Advanced properties ******************************************************) + +fact sta_cpx_aux: ∀h,g,G,L,T1,T2,d2,d1. ⦃G, L⦄ ⊢ T1 •*[h, d2] T2 → d2 = 1 → + ⦃G, L⦄ ⊢ T1 ▪[h, g] d1+1 → ⦃G, L⦄ ⊢ T1 ➡[h, g] T2. +#h #g #G #L #T1 #T2 #d2 #d1 #H elim H -G -L -T1 -T2 -d2 +[ #G #L #d2 #k #H0 destruct normalize + /3 width=4 by cpx_st, da_inv_sort/ +| #G #L #K #V1 #V2 #W2 #i #d2 #HLK #_ #HVW2 #IHV12 #H0 #H destruct + elim (da_inv_lref … H) -H * #K0 #V0 [| #d0 ] #HLK0 + lapply (drop_mono … HLK0 … HLK) -HLK0 #H destruct /3 width=7 by cpx_delta/ +| #G #L #K #V1 #V2 #i #_ #_ #_ #H destruct +| #G #L #K #V1 #V2 #W2 #i #d2 #HLK #HV12 #HVW2 #_ #H0 #H + lapply (discr_plus_xy_y … H0) -H0 #H0 destruct + elim (da_inv_lref … H) -H * #K0 #V0 [| #d0 ] #HLK0 + lapply (drop_mono … HLK0 … HLK) -HLK0 #H destruct + /4 width=7 by cpx_delta, cpr_cpx, lstas_cpr/ +| /4 width=2 by cpx_bind, da_inv_bind/ +| /4 width=3 by cpx_flat, da_inv_flat/ +| /4 width=3 by cpx_eps, da_inv_flat/ +] +qed-. + +lemma sta_cpx: ∀h,g,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 •*[h, 1] T2 → + ⦃G, L⦄ ⊢ T1 ▪[h, g] d+1 → ⦃G, L⦄ ⊢ T1 ➡[h, g] T2. +/2 width=3 by sta_cpx_aux/ qed. + +(* Relocation properties ****************************************************) + +lemma cpx_lift: ∀h,g,G. d_liftable (cpx h g G). +#h #g #G #K #T1 #T2 #H elim H -G -K -T1 -T2 +[ #I #G #K #L #s #l #m #_ #U1 #H1 #U2 #H2 + >(lift_mono … H1 … H2) -H1 -H2 // +| #G #K #k #d #Hkd #L #s #l #m #_ #U1 #H1 #U2 #H2 + >(lift_inv_sort1 … H1) -U1 + >(lift_inv_sort1 … H2) -U2 /2 width=2 by cpx_st/ +| #I #G #K #KV #V #V2 #W2 #i #HKV #HV2 #HVW2 #IHV2 #L #s #l #m #HLK #U1 #H #U2 #HWU2 + elim (lift_inv_lref1 … H) * #Hil #H destruct + [ elim (lift_trans_ge … HVW2 … HWU2) -W2 // plus_plus_comm_23 #HVU2 + lapply (drop_trans_ge_comm … HLK … HKV ?) -K /3 width=7 by cpx_delta, drop_inv_gen/ + ] +| #a #I #G #K #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L #s #l #m #HLK #U1 #H1 #U2 #H2 + elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 destruct + elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct /4 width=6 by cpx_bind, drop_skip/ +| #I #G #K #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L #s #l #m #HLK #U1 #H1 #U2 #H2 + elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 destruct + elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct /3 width=6 by cpx_flat/ +| #G #K #V #T1 #T #T2 #_ #HT2 #IHT1 #L #s #l #m #HLK #U1 #H #U2 #HTU2 + elim (lift_inv_bind1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct + elim (lift_conf_O1 … HTU2 … HT2) -T2 /4 width=6 by cpx_zeta, drop_skip/ +| #G #K #V #T1 #T2 #_ #IHT12 #L #s #l #m #HLK #U1 #H #U2 #HTU2 + elim (lift_inv_flat1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct /3 width=6 by cpx_eps/ +| #G #K #V1 #V2 #T #_ #IHV12 #L #s #l #m #HLK #U1 #H #U2 #HVU2 + elim (lift_inv_flat1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct /3 width=6 by cpx_ct/ +| #a #G #K #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #L #s #l #m #HLK #X1 #HX1 #X2 #HX2 + elim (lift_inv_flat1 … HX1) -HX1 #V0 #X #HV10 #HX #HX1 destruct + elim (lift_inv_bind1 … HX) -HX #W0 #T0 #HW0 #HT10 #HX destruct + elim (lift_inv_bind1 … HX2) -HX2 #X #T3 #HX #HT23 #HX2 destruct + elim (lift_inv_flat1 … HX) -HX #W3 #V3 #HW23 #HV23 #HX destruct /4 width=6 by cpx_beta, drop_skip/ +| #a #G #K #V1 #V #V2 #W1 #W2 #T1 #T2 #_ #HV2 #_ #_ #IHV1 #IHW12 #IHT12 #L #s #l #m #HLK #X1 #HX1 #X2 #HX2 + elim (lift_inv_flat1 … HX1) -HX1 #V0 #X #HV10 #HX #HX1 destruct + elim (lift_inv_bind1 … HX) -HX #W0 #T0 #HW0 #HT10 #HX destruct + elim (lift_inv_bind1 … HX2) -HX2 #W3 #X #HW23 #HX #HX2 destruct + elim (lift_inv_flat1 … HX) -HX #V3 #T3 #HV3 #HT23 #HX destruct + elim (lift_trans_ge … HV2 … HV3) -V2 /4 width=6 by cpx_theta, drop_skip/ +] +qed. + +lemma cpx_inv_lift1: ∀h,g,G. d_deliftable_sn (cpx h g G). +#h #g #G #L #U1 #U2 #H elim H -G -L -U1 -U2 +[ * #i #G #L #K #s #l #m #_ #T1 #H + [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by cpx_atom, lift_sort, ex2_intro/ + | elim (lift_inv_lref2 … H) -H * #Hil #H destruct /3 width=3 by cpx_atom, lift_lref_ge_minus, lift_lref_lt, ex2_intro/ + | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3 by cpx_atom, lift_gref, ex2_intro/ + ] +| #G #L #k #d #Hkd #K #s #l #m #_ #T1 #H + lapply (lift_inv_sort2 … H) -H #H destruct /3 width=3 by cpx_st, lift_sort, ex2_intro/ +| #I #G #L #LV #V #V2 #W2 #i #HLV #HV2 #HVW2 #IHV2 #K #s #l #m #HLK #T1 #H + elim (lift_inv_lref2 … H) -H * #Hil #H destruct + [ elim (drop_conf_lt … HLK … HLV) -L // #L #U #HKL #HLV #HUV + elim (IHV2 … HLV … HUV) -V #U2 #HUV2 #HU2 + elim (lift_trans_le … HUV2 … HVW2) -V2 // >minus_plus plus_minus // (lift_inv_sort1 … H) -X /2 width=2 by crx_sort/ +| #I #K #K0 #V #i #HK0 #L #s #l #m #HLK #X #H + elim (lift_inv_lref1 … H) -H * #Hil #H destruct + [ elim (drop_trans_lt … HLK … HK0) -K /2 width=4 by crx_delta/ + | lapply (drop_trans_ge … HLK … HK0 ?) -K /3 width=5 by crx_delta, drop_inv_gen/ + ] +| #K #V #T #_ #IHV #L #s #l #m #HLK #X #H + elim (lift_inv_flat1 … H) -H #W #U #HVW #_ #H destruct /3 width=5 by crx_appl_sn/ +| #K #V #T #_ #IHT #L #s #l #m #HLK #X #H + elim (lift_inv_flat1 … H) -H #W #U #_ #HTU #H destruct /3 width=5 by crx_appl_dx/ +| #I #K #V #T #HI #L #s #l #m #_ #X #H + elim (lift_fwd_pair1 … H) -H #W #U #_ #H destruct /2 width=1 by crx_ri2/ +| #a #I #K #V #T #HI #_ #IHV #L #s #l #m #HLK #X #H + elim (lift_inv_bind1 … H) -H #W #U #HVW #_ #H destruct /3 width=5 by crx_ib2_sn/ +| #a #I #K #V #T #HI #_ #IHT #L #s #l #m #HLK #X #H + elim (lift_inv_bind1 … H) -H #W #U #HVW #HTU #H destruct /4 width=5 by crx_ib2_dx, drop_skip/ +| #a #K #V #V0 #T #L #s #l #m #_ #X #H + elim (lift_inv_flat1 … H) -H #W #X0 #_ #H0 #H destruct + elim (lift_inv_bind1 … H0) -H0 #W0 #U #_ #_ #H0 destruct /2 width=1 by crx_beta/ +| #a #K #V #V0 #T #L #s #l #m #_ #X #H + elim (lift_inv_flat1 … H) -H #W #X0 #_ #H0 #H destruct + elim (lift_inv_bind1 … H0) -H0 #W0 #U #_ #_ #H0 destruct /2 width=1 by crx_theta/ +] +qed. + +lemma crx_inv_lift: ∀h,g,G,L,U. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃U⦄ → ∀K,s,l,m. ⬇[s, l, m] L ≡ K → + ∀T. ⬆[l, m] T ≡ U → ⦃G, K⦄ ⊢ ➡[h, g] 𝐑⦃T⦄. +#h #g #G #L #U #H elim H -L -U +[ #L #k #d #Hkd #K #s #l #m #_ #X #H + >(lift_inv_sort2 … H) -X /2 width=2 by crx_sort/ +| #I #L #L0 #W #i #HK0 #K #s #l #m #HLK #X #H + elim (lift_inv_lref2 … H) -H * #Hil #H destruct + [ elim (drop_conf_lt … HLK … HK0) -L /2 width=4 by crx_delta/ + | lapply (drop_conf_ge … HLK … HK0 ?) -L /2 width=4 by crx_delta/ + ] +| #L #W #U #_ #IHW #K #s #l #m #HLK #X #H + elim (lift_inv_flat2 … H) -H #V #T #HVW #_ #H destruct /3 width=5 by crx_appl_sn/ +| #L #W #U #_ #IHU #K #s #l #m #HLK #X #H + elim (lift_inv_flat2 … H) -H #V #T #_ #HTU #H destruct /3 width=5 by crx_appl_dx/ +| #I #L #W #U #HI #K #s #l #m #_ #X #H + elim (lift_fwd_pair2 … H) -H #V #T #_ #H destruct /2 width=1 by crx_ri2/ +| #a #I #L #W #U #HI #_ #IHW #K #s #l #m #HLK #X #H + elim (lift_inv_bind2 … H) -H #V #T #HVW #_ #H destruct /3 width=5 by crx_ib2_sn/ +| #a #I #L #W #U #HI #_ #IHU #K #s #l #m #HLK #X #H + elim (lift_inv_bind2 … H) -H #V #T #HVW #HTU #H destruct /4 width=5 by crx_ib2_dx, drop_skip/ +| #a #L #W #W0 #U #K #s #l #m #_ #X #H + elim (lift_inv_flat2 … H) -H #V #X0 #_ #H0 #H destruct + elim (lift_inv_bind2 … H0) -H0 #V0 #T #_ #_ #H0 destruct /2 width=1 by crx_beta/ +| #a #L #W #W0 #U #K #s #l #m #_ #X #H + elim (lift_inv_flat2 … H) -H #V #X0 #_ #H0 #H destruct + elim (lift_inv_bind2 … H0) -H0 #V0 #T #_ #_ #H0 destruct /2 width=1 by crx_theta/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb.ma new file mode 100644 index 000000000..d95512bf4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb.ma @@ -0,0 +1,40 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/btpredproper_8.ma". +include "basic_2A/substitution/fqu.ma". +include "basic_2A/multiple/lleq.ma". +include "basic_2A/reduction/lpx.ma". + +(* "RST" PROPER PARALLEL COMPUTATION FOR CLOSURES ***************************) + +inductive fpb (h) (g) (G1) (L1) (T1): relation3 genv lenv term ≝ +| fpb_fqu: ∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → fpb h g G1 L1 T1 G2 L2 T2 +| fpb_cpx: ∀T2. ⦃G1, L1⦄ ⊢ T1 ➡[h, g] T2 → (T1 = T2 → ⊥) → fpb h g G1 L1 T1 G1 L1 T2 +| fpb_lpx: ∀L2. ⦃G1, L1⦄ ⊢ ➡[h, g] L2 → (L1 ≡[T1, 0] L2 → ⊥) → fpb h g G1 L1 T1 G1 L2 T1 +. + +interpretation + "'rst' proper parallel reduction (closure)" + 'BTPRedProper h g G1 L1 T1 G2 L2 T2 = (fpb h g G1 L1 T1 G2 L2 T2). + +(* Basic properties *********************************************************) + +lemma cpr_fpb: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡ T2 → (T1 = T2 → ⊥) → + ⦃G, L, T1⦄ ≻[h, g] ⦃G, L, T2⦄. +/3 width=1 by fpb_cpx, cpr_cpx/ qed. + +lemma lpr_fpb: ∀h,g,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡ L2 → (L1 ≡[T, 0] L2 → ⊥) → + ⦃G, L1, T⦄ ≻[h, g] ⦃G, L2, T⦄. +/3 width=1 by fpb_lpx, lpr_lpx/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb_fleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb_fleq.ma new file mode 100644 index 000000000..ec8c00125 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb_fleq.ma @@ -0,0 +1,41 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/fleq.ma". +include "basic_2A/reduction/fpb_lleq.ma". + +(* "RST" PROPER PARALLEL COMPUTATION FOR CLOSURES ***************************) + +(* Properties on lazy equivalence for closures ******************************) + +lemma fleq_fpb_trans: ∀h,g,F1,F2,K1,K2,T1,T2. ⦃F1, K1, T1⦄ ≡[0] ⦃F2, K2, T2⦄ → + ∀G2,L2,U2. ⦃F2, K2, T2⦄ ≻[h, g] ⦃G2, L2, U2⦄ → + ∃∃G1,L1,U1. ⦃F1, K1, T1⦄ ≻[h, g] ⦃G1, L1, U1⦄ & ⦃G1, L1, U1⦄ ≡[0] ⦃G2, L2, U2⦄. +#h #g #F1 #F2 #K1 #K2 #T1 #T2 * -F2 -K2 -T2 +#K2 #HK12 #G2 #L2 #U2 #H12 elim (lleq_fpb_trans … HK12 … H12) -K2 +/3 width=5 by fleq_intro, ex2_3_intro/ +qed-. + +(* Inversion lemmas on lazy equivalence for closures ************************) + +lemma fpb_inv_fleq: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≡[0] ⦃G2, L2, T2⦄ → ⊥. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 +[ #G2 #L2 #T2 #H12 #H elim (fleq_inv_gen … H) -H + /3 width=8 by lleq_fwd_length, fqu_inv_eq/ +| #T2 #_ #HnT #H elim (fleq_inv_gen … H) -H /2 width=1 by/ +| #L2 #_ #HnL #H elim (fleq_inv_gen … H) -H /2 width=1 by/ +] +qed-. + diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb_lift.ma new file mode 100644 index 000000000..fa4af73a5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb_lift.ma @@ -0,0 +1,28 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/unfold/lstas_da.ma". +include "basic_2A/reduction/cpx_lift.ma". +include "basic_2A/reduction/fpb.ma". + +(* "RST" PROPER PARALLEL COMPUTATION FOR CLOSURES ***************************) + +(* Advanced properties ******************************************************) + +lemma sta_fpb: ∀h,g,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 ▪[h, g] d+1 → + ⦃G, L⦄ ⊢ T1 •*[h, 1] T2 → ⦃G, L, T1⦄ ≻[h, g] ⦃G, L, T2⦄. +#h #g #G #L #T1 #T2 #d #HT1 #HT12 elim (eq_term_dec T1 T2) +/3 width=2 by fpb_cpx, sta_cpx/ #H destruct +elim (lstas_inv_refl_pos h G L T2 0) // +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb_lleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb_lleq.ma new file mode 100644 index 000000000..f2756f3be --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb_lleq.ma @@ -0,0 +1,34 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/lleq_fqus.ma". +include "basic_2A/multiple/lleq_lleq.ma". +include "basic_2A/reduction/lpx_lleq.ma". +include "basic_2A/reduction/fpb.ma". + +(* "RST" PROPER PARALLEL COMPUTATION FOR CLOSURES ***************************) + +(* Properties on lazy equivalence for local environments ********************) + +lemma lleq_fpb_trans: ∀h,g,F,K1,K2,T. K1 ≡[T, 0] K2 → + ∀G,L2,U. ⦃F, K2, T⦄ ≻[h, g] ⦃G, L2, U⦄ → + ∃∃L1. ⦃F, K1, T⦄ ≻[h, g] ⦃G, L1, U⦄ & L1 ≡[U, 0] L2. +#h #g #F #K1 #K2 #T #HT #G #L2 #U * -G -L2 -U +[ #G #L2 #U #H2 elim (lleq_fqu_trans … H2 … HT) -K2 + /3 width=3 by fpb_fqu, ex2_intro/ +| /4 width=10 by fpb_cpx, cpx_lleq_conf_sn, lleq_cpx_trans, ex2_intro/ +| #L2 #HKL2 #HnKL2 elim (lleq_lpx_trans … HKL2 … HT) -HKL2 + /6 width=3 by fpb_lpx, lleq_canc_sn, ex2_intro/ (* 2 lleq_canc_sn *) +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq.ma new file mode 100644 index 000000000..e1d0d39dc --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq.ma @@ -0,0 +1,42 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/btpred_8.ma". +include "basic_2A/substitution/fquq.ma". +include "basic_2A/multiple/lleq.ma". +include "basic_2A/reduction/lpx.ma". + +(* "QRST" PARALLEL REDUCTION FOR CLOSURES ***********************************) + +inductive fpbq (h) (g) (G1) (L1) (T1): relation3 genv lenv term ≝ +| fpbq_fquq: ∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → fpbq h g G1 L1 T1 G2 L2 T2 +| fpbq_cpx : ∀T2. ⦃G1, L1⦄ ⊢ T1 ➡[h, g] T2 → fpbq h g G1 L1 T1 G1 L1 T2 +| fpbq_lpx : ∀L2. ⦃G1, L1⦄ ⊢ ➡[h, g] L2 → fpbq h g G1 L1 T1 G1 L2 T1 +| fpbq_lleq: ∀L2. L1 ≡[T1, 0] L2 → fpbq h g G1 L1 T1 G1 L2 T1 +. + +interpretation + "'qrst' parallel reduction (closure)" + 'BTPRed h g G1 L1 T1 G2 L2 T2 = (fpbq h g G1 L1 T1 G2 L2 T2). + +(* Basic properties *********************************************************) + +lemma fpbq_refl: ∀h,g. tri_reflexive … (fpbq h g). +/2 width=1 by fpbq_cpx/ qed. + +lemma cpr_fpbq: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡ T2 → ⦃G, L, T1⦄ ≽[h, g] ⦃G, L, T2⦄. +/3 width=1 by fpbq_cpx, cpr_cpx/ qed. + +lemma lpr_fpbq: ∀h,g,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L1, T⦄ ≽[h, g] ⦃G, L2, T⦄. +/3 width=1 by fpbq_lpx, lpr_lpx/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq_aaa.ma new file mode 100644 index 000000000..c4619f5d7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq_aaa.ma @@ -0,0 +1,28 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/aaa_fqus.ma". +include "basic_2A/static/aaa_lleq.ma". +include "basic_2A/reduction/lpx_aaa.ma". +include "basic_2A/reduction/fpbq.ma". + +(* "QRST" PARALLEL REDUCTION FOR CLOSURES ***********************************) + +(* Properties on atomic arity assignment for terms **************************) + +lemma fpbq_aaa_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄ → + ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 +/3 width=6 by aaa_lleq_conf, lpx_aaa_conf, cpx_aaa_conf, aaa_fquq_conf, ex_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq_alt.ma new file mode 100644 index 000000000..e2e1ebbf8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq_alt.ma @@ -0,0 +1,86 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/btpredalt_8.ma". +include "basic_2A/reduction/fpb_fleq.ma". +include "basic_2A/reduction/fpbq.ma". + +(* "QRST" PARALLEL REDUCTION FOR CLOSURES ***********************************) + +(* alternative definition of fpbq *) +definition fpbqa: ∀h. sd h → tri_relation genv lenv term ≝ + λh,g,G1,L1,T1,G2,L2,T2. + ⦃G1, L1, T1⦄ ≡[0] ⦃G2, L2, T2⦄ ∨ ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄. + +interpretation + "'qrst' parallel reduction (closure) alternative" + 'BTPRedAlt h g G1 L1 T1 G2 L2 T2 = (fpbqa h g G1 L1 T1 G2 L2 T2). + +(* Basic properties *********************************************************) + +lemma fleq_fpbq: ∀h,g,G1,G2,L1,L2,T1,T2. + ⦃G1, L1, T1⦄ ≡[0] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 * /2 width=1 by fpbq_lleq/ +qed. + +lemma fpb_fpbq: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 +/3 width=1 by fpbq_fquq, fpbq_cpx, fpbq_lpx, fqu_fquq/ +qed. + +(* Main properties **********************************************************) + +theorem fpbq_fpbqa: ∀h,g,G1,G2,L1,L2,T1,T2. + ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≽≽[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 +[ #G2 #L2 #T2 #H elim (fquq_inv_gen … H) -H + [ /3 width=1 by fpb_fqu, or_intror/ + | * #H1 #H2 #H3 destruct /2 width=1 by or_introl/ + ] +| #T2 #HT12 elim (eq_term_dec T1 T2) + #HnT12 destruct /4 width=1 by fpb_cpx, or_intror, or_introl/ +| #L2 #HL12 elim (lleq_dec … T1 L1 L2 0) + /4 width=1 by fpb_lpx, fleq_intro, or_intror, or_introl/ +| /3 width=1 by fleq_intro, or_introl/ +] +qed. + +theorem fpbqa_inv_fpbq: ∀h,g,G1,G2,L1,L2,T1,T2. + ⦃G1, L1, T1⦄ ≽≽[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 * /2 width=1 by fleq_fpbq, fpb_fpbq/ +qed-. + +(* Advanced eliminators *****************************************************) + +lemma fpbq_ind_alt: ∀h,g,G1,G2,L1,L2,T1,T2. ∀R:Prop. + (⦃G1, L1, T1⦄ ≡[0] ⦃G2, L2, T2⦄ → R) → + (⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → R) → + ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄ → R. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #R #HI1 #HI2 #H elim (fpbq_fpbqa … H) /2 width=1 by/ +qed-. + +(* aternative definition of fpb *********************************************) + +lemma fpb_fpbq_alt: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄ ∧ (⦃G1, L1, T1⦄ ≡[0] ⦃G2, L2, T2⦄ → ⊥). +/3 width=10 by fpb_fpbq, fpb_inv_fleq, conj/ qed. + +lemma fpbq_inv_fpb_alt: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄ → + (⦃G1, L1, T1⦄ ≡[0] ⦃G2, L2, T2⦄ → ⊥) → ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #H0 @(fpbq_ind_alt … H) -H // +#H elim H0 -H0 // +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq_lift.ma new file mode 100644 index 000000000..bb93ef27e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq_lift.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/cpx_lift.ma". +include "basic_2A/reduction/fpbq.ma". + +(* "QRST" PARALLEL REDUCTION FOR CLOSURES ***********************************) + +(* Advanced properties ******************************************************) + +lemma sta_fpbq: ∀h,g,G,L,T1,T2,d. + ⦃G, L⦄ ⊢ T1 ▪[h, g] d+1 → ⦃G, L⦄ ⊢ T1 •*[h, 1] T2 → + ⦃G, L, T1⦄ ≽[h, g] ⦃G, L, T2⦄. +/3 width=4 by fpbq_cpx, sta_cpx/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpr.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpr.ma new file mode 100644 index 000000000..5901ee5c0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpr.ma @@ -0,0 +1,61 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/predsn_3.ma". +include "basic_2A/substitution/lpx_sn.ma". +include "basic_2A/reduction/cpr.ma". + +(* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************) + +definition lpr: relation3 genv lenv lenv ≝ λG. lpx_sn (cpr G). + +interpretation "parallel reduction (local environment, sn variant)" + 'PRedSn G L1 L2 = (lpr G L1 L2). + +(* Basic inversion lemmas ***************************************************) + +(* Basic_1: includes: wcpr0_gen_sort *) +lemma lpr_inv_atom1: ∀G,L2. ⦃G, ⋆⦄ ⊢ ➡ L2 → L2 = ⋆. +/2 width=4 by lpx_sn_inv_atom1_aux/ qed-. + +(* Basic_1: includes: wcpr0_gen_head *) +lemma lpr_inv_pair1: ∀I,G,K1,V1,L2. ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡ L2 → + ∃∃K2,V2. ⦃G, K1⦄ ⊢ ➡ K2 & ⦃G, K1⦄ ⊢ V1 ➡ V2 & L2 = K2.ⓑ{I}V2. +/2 width=3 by lpx_sn_inv_pair1_aux/ qed-. + +lemma lpr_inv_atom2: ∀G,L1. ⦃G, L1⦄ ⊢ ➡ ⋆ → L1 = ⋆. +/2 width=4 by lpx_sn_inv_atom2_aux/ qed-. + +lemma lpr_inv_pair2: ∀I,G,L1,K2,V2. ⦃G, L1⦄ ⊢ ➡ K2.ⓑ{I}V2 → + ∃∃K1,V1. ⦃G, K1⦄ ⊢ ➡ K2 & ⦃G, K1⦄ ⊢ V1 ➡ V2 & L1 = K1. ⓑ{I} V1. +/2 width=3 by lpx_sn_inv_pair2_aux/ qed-. + +(* Basic properties *********************************************************) + +(* Note: lemma 250 *) +lemma lpr_refl: ∀G,L. ⦃G, L⦄ ⊢ ➡ L. +/2 width=1 by lpx_sn_refl/ qed. + +lemma lpr_pair: ∀I,G,K1,K2,V1,V2. ⦃G, K1⦄ ⊢ ➡ K2 → ⦃G, K1⦄ ⊢ V1 ➡ V2 → + ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡ K2.ⓑ{I}V2. +/2 width=1 by lpx_sn_pair/ qed. + +(* Basic forward lemmas *****************************************************) + +lemma lpr_fwd_length: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡ L2 → |L1| = |L2|. +/2 width=2 by lpx_sn_fwd_length/ qed-. + +(* Basic_1: removed theorems 3: wcpr0_getl wcpr0_getl_back + pr0_subst1_back +*) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpr_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpr_drop.ma new file mode 100644 index 000000000..4f515f432 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpr_drop.ma @@ -0,0 +1,96 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lpx_sn_drop.ma". +include "basic_2A/substitution/fquq_alt.ma". +include "basic_2A/reduction/cpr_lift.ma". +include "basic_2A/reduction/lpr.ma". + +(* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************) + +(* Properties on local environment slicing ***********************************) + +(* Basic_1: includes: wcpr0_drop *) +lemma lpr_drop_conf: ∀G. dropable_sn (lpr G). +/3 width=6 by lpx_sn_deliftable_dropable, cpr_inv_lift1/ qed-. + +(* Basic_1: includes: wcpr0_drop_back *) +lemma drop_lpr_trans: ∀G. dedropable_sn (lpr G). +/3 width=10 by lpx_sn_liftable_dedropable, cpr_lift/ qed-. + +lemma lpr_drop_trans_O1: ∀G. dropable_dx (lpr G). +/2 width=3 by lpx_sn_dropable/ qed-. + +(* Properties on context-sensitive parallel reduction for terms *************) + +lemma fqu_cpr_trans_dx: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡ U2 → + ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡ L & ⦃G1, L⦄ ⊢ T1 ➡ U1 & ⦃G1, L, U1⦄ ⊐ ⦃G2, L2, U2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +/3 width=5 by fqu_lref_O, fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, lpr_pair, cpr_pair_sn, cpr_atom, cpr_bind, cpr_flat, ex3_2_intro/ +#G #L #K #U #T #m #HLK #HUT #U2 #HU2 +elim (lift_total U2 0 (m+1)) #T2 #HUT2 +lapply (cpr_lift … HU2 … HLK … HUT … HUT2) -HU2 -HUT /3 width=9 by fqu_drop, ex3_2_intro/ +qed-. + +lemma fquq_cpr_trans_dx: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡ U2 → + ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡ L & ⦃G1, L⦄ ⊢ T1 ➡ U1 & ⦃G1, L, U1⦄ ⊐⸮ ⦃G2, L2, U2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 elim (fquq_inv_gen … H) -H +[ #HT12 elim (fqu_cpr_trans_dx … HT12 … HTU2) /3 width=5 by fqu_fquq, ex3_2_intro/ +| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma fqu_cpr_trans_sn: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡ U2 → + ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡ L & ⦃G1, L1⦄ ⊢ T1 ➡ U1 & ⦃G1, L, U1⦄ ⊐ ⦃G2, L2, U2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +/3 width=5 by fqu_lref_O, fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, lpr_pair, cpr_pair_sn, cpr_atom, cpr_bind, cpr_flat, ex3_2_intro/ +#G #L #K #U #T #m #HLK #HUT #U2 #HU2 +elim (lift_total U2 0 (m+1)) #T2 #HUT2 +lapply (cpr_lift … HU2 … HLK … HUT … HUT2) -HU2 -HUT /3 width=9 by fqu_drop, ex3_2_intro/ +qed-. + +lemma fquq_cpr_trans_sn: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡ U2 → + ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡ L & ⦃G1, L1⦄ ⊢ T1 ➡ U1 & ⦃G1, L, U1⦄ ⊐⸮ ⦃G2, L2, U2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 elim (fquq_inv_gen … H) -H +[ #HT12 elim (fqu_cpr_trans_sn … HT12 … HTU2) /3 width=5 by fqu_fquq, ex3_2_intro/ +| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma fqu_lpr_trans: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀K2. ⦃G2, L2⦄ ⊢ ➡ K2 → + ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡ K1 & ⦃G1, L1⦄ ⊢ T1 ➡ T & ⦃G1, K1, T⦄ ⊐ ⦃G2, K2, T2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +/3 width=5 by fqu_lref_O, fqu_pair_sn, fqu_flat_dx, lpr_pair, ex3_2_intro/ +[ #a #I #G2 #L2 #V2 #T2 #X #H elim (lpr_inv_pair1 … H) -H + #K2 #W2 #HLK2 #HVW2 #H destruct + /3 width=5 by fqu_fquq, cpr_pair_sn, fqu_bind_dx, ex3_2_intro/ +| #G #L1 #K1 #T1 #U1 #m #HLK1 #HTU1 #K2 #HK12 + elim (drop_lpr_trans … HLK1 … HK12) -HK12 + /3 width=7 by fqu_drop, ex3_2_intro/ +] +qed-. + +lemma fquq_lpr_trans: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀K2. ⦃G2, L2⦄ ⊢ ➡ K2 → + ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡ K1 & ⦃G1, L1⦄ ⊢ T1 ➡ T & ⦃G1, K1, T⦄ ⊐⸮ ⦃G2, K2, T2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H #K2 #HLK2 elim (fquq_inv_gen … H) -H +[ #HT12 elim (fqu_lpr_trans … HT12 … HLK2) /3 width=5 by fqu_fquq, ex3_2_intro/ +| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpr_lpr.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpr_lpr.ma new file mode 100644 index 000000000..9fbe5eeb5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpr_lpr.ma @@ -0,0 +1,357 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lpx_sn_lpx_sn.ma". +include "basic_2A/multiple/fqup.ma". +include "basic_2A/reduction/lpr_drop.ma". + +(* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************) + +(* Main properties on context-sensitive parallel reduction for terms ********) + +fact cpr_conf_lpr_atom_atom: + ∀I,G,L1,L2. ∃∃T. ⦃G, L1⦄ ⊢ ⓪{I} ➡ T & ⦃G, L2⦄ ⊢ ⓪{I} ➡ T. +/2 width=3 by cpr_atom, ex2_intro/ qed-. + +fact cpr_conf_lpr_atom_delta: + ∀G,L0,i. ( + ∀L,T. ⦃G, L0, #i⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀K0,V0. ⬇[i] L0 ≡ K0.ⓓV0 → + ∀V2. ⦃G, K0⦄ ⊢ V0 ➡ V2 → ∀T2. ⬆[O, i + 1] V2 ≡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ #i ➡ T & ⦃G, L2⦄ ⊢ T2 ➡ T. +#G #L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02 +elim (lpr_drop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1 +elim (lpr_inv_pair1 … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct +elim (lpr_drop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2 +elim (lpr_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct +lapply (drop_fwd_drop2 … HLK2) -W2 #HLK2 +lapply (fqup_lref … G … HLK0) -HLK0 #HLK0 +elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2 +elim (lift_total V 0 (i+1)) +/3 width=12 by cpr_lift, cpr_delta, ex2_intro/ +qed-. + +(* Basic_1: includes: pr0_delta_delta pr2_delta_delta *) +fact cpr_conf_lpr_delta_delta: + ∀G,L0,i. ( + ∀L,T. ⦃G, L0, #i⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀K0,V0. ⬇[i] L0 ≡ K0.ⓓV0 → + ∀V1. ⦃G, K0⦄ ⊢ V0 ➡ V1 → ∀T1. ⬆[O, i + 1] V1 ≡ T1 → + ∀KX,VX. ⬇[i] L0 ≡ KX.ⓓVX → + ∀V2. ⦃G, KX⦄ ⊢ VX ➡ V2 → ∀T2. ⬆[O, i + 1] V2 ≡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡ T & ⦃G, L2⦄ ⊢ T2 ➡ T. +#G #L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1 +#KX #VX #H #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02 +lapply (drop_mono … H … HLK0) -H #H destruct +elim (lpr_drop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1 +elim (lpr_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct +lapply (drop_fwd_drop2 … HLK1) -W1 #HLK1 +elim (lpr_drop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2 +elim (lpr_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct +lapply (drop_fwd_drop2 … HLK2) -W2 #HLK2 +lapply (fqup_lref … G … HLK0) -HLK0 #HLK0 +elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2 +elim (lift_total V 0 (i+1)) /3 width=12 by cpr_lift, ex2_intro/ +qed-. + +fact cpr_conf_lpr_bind_bind: + ∀a,I,G,L0,V0,T0. ( + ∀L,T. ⦃G, L0, ⓑ{a,I}V0.T0⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0.ⓑ{I}V0⦄ ⊢ T0 ➡ T1 → + ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀T2. ⦃G, L0.ⓑ{I}V0⦄ ⊢ T0 ➡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ ⓑ{a,I}V1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓑ{a,I}V2.T2 ➡ T. +#a #I #G #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01 +#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02 +elim (IH … HV01 … HV02 … HL01 … HL02) // +elim (IH … HT01 … HT02 (L1.ⓑ{I}V1) … (L2.ⓑ{I}V2)) -IH +/3 width=5 by lpr_pair, cpr_bind, ex2_intro/ +qed-. + +fact cpr_conf_lpr_bind_zeta: + ∀G,L0,V0,T0. ( + ∀L,T. ⦃G, L0, +ⓓV0.T0⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0.ⓓV0⦄ ⊢ T0 ➡ T1 → + ∀T2. ⦃G, L0.ⓓV0⦄ ⊢ T0 ➡ T2 → ∀X2. ⬆[O, 1] X2 ≡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ +ⓓV1.T1 ➡ T & ⦃G, L2⦄ ⊢ X2 ➡ T. +#G #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01 +#T2 #HT02 #X2 #HXT2 #L1 #HL01 #L2 #HL02 +elim (IH … HT01 … HT02 (L1.ⓓV1) … (L2.ⓓV1)) -IH -HT01 -HT02 /2 width=1 by lpr_pair/ -L0 -V0 -T0 #T #HT1 #HT2 +elim (cpr_inv_lift1 … HT2 L2 … HXT2) -T2 /3 width=3 by cpr_zeta, drop_drop, ex2_intro/ +qed-. + +fact cpr_conf_lpr_zeta_zeta: + ∀G,L0,V0,T0. ( + ∀L,T. ⦃G, L0, +ⓓV0.T0⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀T1. ⦃G, L0.ⓓV0⦄ ⊢ T0 ➡ T1 → ∀X1. ⬆[O, 1] X1 ≡ T1 → + ∀T2. ⦃G, L0.ⓓV0⦄ ⊢ T0 ➡ T2 → ∀X2. ⬆[O, 1] X2 ≡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ X1 ➡ T & ⦃G, L2⦄ ⊢ X2 ➡ T. +#G #L0 #V0 #T0 #IH #T1 #HT01 #X1 #HXT1 +#T2 #HT02 #X2 #HXT2 #L1 #HL01 #L2 #HL02 +elim (IH … HT01 … HT02 (L1.ⓓV0) … (L2.ⓓV0)) -IH -HT01 -HT02 /2 width=1 by lpr_pair/ -L0 -T0 #T #HT1 #HT2 +elim (cpr_inv_lift1 … HT1 L1 … HXT1) -T1 /2 width=2 by drop_drop/ #T1 #HT1 #HXT1 +elim (cpr_inv_lift1 … HT2 L2 … HXT2) -T2 /2 width=2 by drop_drop/ #T2 #HT2 #HXT2 +lapply (lift_inj … HT2 … HT1) -T #H destruct /2 width=3 by ex2_intro/ +qed-. + +fact cpr_conf_lpr_flat_flat: + ∀I,G,L0,V0,T0. ( + ∀L,T. ⦃G, L0, ⓕ{I}V0.T0⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → + ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀T2. ⦃G, L0⦄ ⊢ T0 ➡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ ⓕ{I}V1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓕ{I}V2.T2 ➡ T. +#I #G #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01 +#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02 +elim (IH … HV01 … HV02 … HL01 … HL02) // +elim (IH … HT01 … HT02 … HL01 … HL02) /3 width=5 by cpr_flat, ex2_intro/ +qed-. + +fact cpr_conf_lpr_flat_eps: + ∀G,L0,V0,T0. ( + ∀L,T. ⦃G, L0, ⓝV0.T0⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀V1,T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → ∀T2. ⦃G, L0⦄ ⊢ T0 ➡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ ⓝV1.T1 ➡ T & ⦃G, L2⦄ ⊢ T2 ➡ T. +#G #L0 #V0 #T0 #IH #V1 #T1 #HT01 +#T2 #HT02 #L1 #HL01 #L2 #HL02 +elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /3 width=3 by cpr_eps, ex2_intro/ +qed-. + +fact cpr_conf_lpr_eps_eps: + ∀G,L0,V0,T0. ( + ∀L,T. ⦃G, L0, ⓝV0.T0⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → ∀T2. ⦃G, L0⦄ ⊢ T0 ➡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡ T & ⦃G, L2⦄ ⊢ T2 ➡ T. +#G #L0 #V0 #T0 #IH #T1 #HT01 +#T2 #HT02 #L1 #HL01 #L2 #HL02 +elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /2 width=3 by ex2_intro/ +qed-. + +fact cpr_conf_lpr_flat_beta: + ∀a,G,L0,V0,W0,T0. ( + ∀L,T. ⦃G, L0, ⓐV0.ⓛ{a}W0.T0⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0⦄ ⊢ ⓛ{a}W0.T0 ➡ T1 → + ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀W2. ⦃G, L0⦄ ⊢ W0 ➡ W2 → ∀T2. ⦃G, L0.ⓛW0⦄ ⊢ T0 ➡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ ⓐV1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓓ{a}ⓝW2.V2.T2 ➡ T. +#a #G #L0 #V0 #W0 #T0 #IH #V1 #HV01 #X #H +#V2 #HV02 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02 +elim (cpr_inv_abst1 … H) -H #W1 #T1 #HW01 #HT01 #H destruct +elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2 +elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1 by/ #W #HW1 #HW2 +elim (IH … HT01 … HT02 (L1.ⓛW1) … (L2.ⓛW2)) /2 width=1 by lpr_pair/ -L0 -V0 -W0 -T0 #T #HT1 #HT2 +lapply (lsubr_cpr_trans … HT2 (L2.ⓓⓝW2.V2) ?) -HT2 /2 width=1 by lsubr_beta/ (**) (* full auto not tried *) +/4 width=5 by cpr_bind, cpr_flat, cpr_beta, ex2_intro/ +qed-. + +(* Basic-1: includes: + pr0_cong_upsilon_refl pr0_cong_upsilon_zeta + pr0_cong_upsilon_cong pr0_cong_upsilon_delta +*) +fact cpr_conf_lpr_flat_theta: + ∀a,G,L0,V0,W0,T0. ( + ∀L,T. ⦃G, L0, ⓐV0.ⓓ{a}W0.T0⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0⦄ ⊢ ⓓ{a}W0.T0 ➡ T1 → + ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀U2. ⬆[O, 1] V2 ≡ U2 → + ∀W2. ⦃G, L0⦄ ⊢ W0 ➡ W2 → ∀T2. ⦃G, L0.ⓓW0⦄ ⊢ T0 ➡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ ⓐV1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓓ{a}W2.ⓐU2.T2 ➡ T. +#a #G #L0 #V0 #W0 #T0 #IH #V1 #HV01 #X #H +#V2 #HV02 #U2 #HVU2 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02 +elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2 +elim (lift_total V 0 1) #U #HVU +lapply (cpr_lift … HV2 (L2.ⓓW2) … HVU2 … HVU) -HVU2 /2 width=2 by drop_drop/ #HU2 +elim (cpr_inv_abbr1 … H) -H * +[ #W1 #T1 #HW01 #HT01 #H destruct + elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1 by/ + elim (IH … HT01 … HT02 (L1.ⓓW1) … (L2.ⓓW2)) /2 width=1 by lpr_pair/ -L0 -V0 -W0 -T0 + /4 width=7 by cpr_bind, cpr_flat, cpr_theta, ex2_intro/ +| #T1 #HT01 #HXT1 #H destruct + elim (IH … HT01 … HT02 (L1.ⓓW2) … (L2.ⓓW2)) /2 width=1 by lpr_pair/ -L0 -V0 -W0 -T0 #T #HT1 #HT2 + elim (cpr_inv_lift1 … HT1 L1 … HXT1) -HXT1 + /4 width=9 by cpr_flat, cpr_zeta, drop_drop, lift_flat, ex2_intro/ +] +qed-. + +fact cpr_conf_lpr_beta_beta: + ∀a,G,L0,V0,W0,T0. ( + ∀L,T. ⦃G, L0, ⓐV0.ⓛ{a}W0.T0⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀W1. ⦃G, L0⦄ ⊢ W0 ➡ W1 → ∀T1. ⦃G, L0.ⓛW0⦄ ⊢ T0 ➡ T1 → + ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀W2. ⦃G, L0⦄ ⊢ W0 ➡ W2 → ∀T2. ⦃G, L0.ⓛW0⦄ ⊢ T0 ➡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ ⓓ{a}ⓝW1.V1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓓ{a}ⓝW2.V2.T2 ➡ T. +#a #G #L0 #V0 #W0 #T0 #IH #V1 #HV01 #W1 #HW01 #T1 #HT01 +#V2 #HV02 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02 +elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2 +elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1 by/ #W #HW1 #HW2 +elim (IH … HT01 … HT02 (L1.ⓛW1) … (L2.ⓛW2)) /2 width=1 by lpr_pair/ -L0 -V0 -W0 -T0 #T #HT1 #HT2 +lapply (lsubr_cpr_trans … HT1 (L1.ⓓⓝW1.V1) ?) -HT1 /2 width=1 by lsubr_beta/ +lapply (lsubr_cpr_trans … HT2 (L2.ⓓⓝW2.V2) ?) -HT2 /2 width=1 by lsubr_beta/ +/4 width=5 by cpr_bind, cpr_flat, ex2_intro/ (**) (* full auto not tried *) +qed-. + +(* Basic_1: was: pr0_upsilon_upsilon *) +fact cpr_conf_lpr_theta_theta: + ∀a,G,L0,V0,W0,T0. ( + ∀L,T. ⦃G, L0, ⓐV0.ⓓ{a}W0.T0⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀U1. ⬆[O, 1] V1 ≡ U1 → + ∀W1. ⦃G, L0⦄ ⊢ W0 ➡ W1 → ∀T1. ⦃G, L0.ⓓW0⦄ ⊢ T0 ➡ T1 → + ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀U2. ⬆[O, 1] V2 ≡ U2 → + ∀W2. ⦃G, L0⦄ ⊢ W0 ➡ W2 → ∀T2. ⦃G, L0.ⓓW0⦄ ⊢ T0 ➡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ ⓓ{a}W1.ⓐU1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓓ{a}W2.ⓐU2.T2 ➡ T. +#a #G #L0 #V0 #W0 #T0 #IH #V1 #HV01 #U1 #HVU1 #W1 #HW01 #T1 #HT01 +#V2 #HV02 #U2 #HVU2 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02 +elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2 +elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1 by/ +elim (IH … HT01 … HT02 (L1.ⓓW1) … (L2.ⓓW2)) /2 width=1 by lpr_pair/ -L0 -V0 -W0 -T0 +elim (lift_total V 0 1) #U #HVU +lapply (cpr_lift … HV1 (L1.ⓓW1) … HVU1 … HVU) -HVU1 /2 width=2 by drop_drop/ +lapply (cpr_lift … HV2 (L2.ⓓW2) … HVU2 … HVU) -HVU2 /2 width=2 by drop_drop/ +/4 width=7 by cpr_bind, cpr_flat, ex2_intro/ (**) (* full auto not tried *) +qed-. + +theorem cpr_conf_lpr: ∀G. lpx_sn_confluent (cpr G) (cpr G). +#G #L0 #T0 @(fqup_wf_ind_eq … G L0 T0) -G -L0 -T0 #G #L #T #IH #G0 #L0 * [| * ] +[ #I0 #HG #HL #HT #T1 #H1 #T2 #H2 #L1 #HL01 #L2 #HL02 destruct + elim (cpr_inv_atom1 … H1) -H1 + elim (cpr_inv_atom1 … H2) -H2 + [ #H2 #H1 destruct + /2 width=1 by cpr_conf_lpr_atom_atom/ + | * #K0 #V0 #V2 #i2 #HLK0 #HV02 #HVT2 #H2 #H1 destruct + /3 width=10 by cpr_conf_lpr_atom_delta/ + | #H2 * #K0 #V0 #V1 #i1 #HLK0 #HV01 #HVT1 #H1 destruct + /4 width=10 by ex2_commute, cpr_conf_lpr_atom_delta/ + | * #X #Y #V2 #z #H #HV02 #HVT2 #H2 + * #K0 #V0 #V1 #i #HLK0 #HV01 #HVT1 #H1 destruct + /3 width=17 by cpr_conf_lpr_delta_delta/ + ] +| #a #I #V0 #T0 #HG #HL #HT #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct + elim (cpr_inv_bind1 … H1) -H1 * + [ #V1 #T1 #HV01 #HT01 #H1 + | #T1 #HT01 #HXT1 #H11 #H12 + ] + elim (cpr_inv_bind1 … H2) -H2 * + [1,3: #V2 #T2 #HV02 #HT02 #H2 + |2,4: #T2 #HT02 #HXT2 #H21 #H22 + ] destruct + [ /3 width=10 by cpr_conf_lpr_bind_bind/ + | /4 width=11 by ex2_commute, cpr_conf_lpr_bind_zeta/ + | /3 width=11 by cpr_conf_lpr_bind_zeta/ + | /3 width=12 by cpr_conf_lpr_zeta_zeta/ + ] +| #I #V0 #T0 #HG #HL #HT #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct + elim (cpr_inv_flat1 … H1) -H1 * + [ #V1 #T1 #HV01 #HT01 #H1 + | #HX1 #H1 + | #a1 #V1 #Y1 #W1 #Z1 #T1 #HV01 #HYW1 #HZT1 #H11 #H12 #H13 + | #a1 #V1 #U1 #Y1 #W1 #Z1 #T1 #HV01 #HVU1 #HYW1 #HZT1 #H11 #H12 #H13 + ] + elim (cpr_inv_flat1 … H2) -H2 * + [1,5,9,13: #V2 #T2 #HV02 #HT02 #H2 + |2,6,10,14: #HX2 #H2 + |3,7,11,15: #a2 #V2 #Y2 #W2 #Z2 #T2 #HV02 #HYW2 #HZT2 #H21 #H22 #H23 + |4,8,12,16: #a2 #V2 #U2 #Y2 #W2 #Z2 #T2 #HV02 #HVU2 #HYW2 #HZT2 #H21 #H22 #H23 + ] destruct + [ /3 width=10 by cpr_conf_lpr_flat_flat/ + | /4 width=8 by ex2_commute, cpr_conf_lpr_flat_eps/ + | /4 width=12 by ex2_commute, cpr_conf_lpr_flat_beta/ + | /4 width=14 by ex2_commute, cpr_conf_lpr_flat_theta/ + | /3 width=8 by cpr_conf_lpr_flat_eps/ + | /3 width=7 by cpr_conf_lpr_eps_eps/ + | /3 width=12 by cpr_conf_lpr_flat_beta/ + | /3 width=13 by cpr_conf_lpr_beta_beta/ + | /3 width=14 by cpr_conf_lpr_flat_theta/ + | /3 width=17 by cpr_conf_lpr_theta_theta/ + ] +] +qed-. + +(* Basic_1: includes: pr0_confluence pr2_confluence *) +theorem cpr_conf: ∀G,L. confluent … (cpr G L). +/2 width=6 by cpr_conf_lpr/ qed-. + +(* Properties on context-sensitive parallel reduction for terms *************) + +lemma lpr_cpr_conf_dx: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → + ∃∃T. ⦃G, L1⦄ ⊢ T0 ➡ T & ⦃G, L1⦄ ⊢ T1 ➡ T. +#G #L0 #T0 #T1 #HT01 #L1 #HL01 +elim (cpr_conf_lpr … HT01 T0 … HL01 … HL01) /2 width=3 by ex2_intro/ +qed-. + +lemma lpr_cpr_conf_sn: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → + ∃∃T. ⦃G, L1⦄ ⊢ T0 ➡ T & ⦃G, L0⦄ ⊢ T1 ➡ T. +#G #L0 #T0 #T1 #HT01 #L1 #HL01 +elim (cpr_conf_lpr … HT01 T0 … L0 … HL01) /2 width=3 by ex2_intro/ +qed-. + +(* Main properties **********************************************************) + +theorem lpr_conf: ∀G. confluent … (lpr G). +/3 width=6 by lpx_sn_conf, cpr_conf_lpr/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx.ma new file mode 100644 index 000000000..5b93217da --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx.ma @@ -0,0 +1,65 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/predsn_5.ma". +include "basic_2A/reduction/lpr.ma". +include "basic_2A/reduction/cpx.ma". + +(* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************) + +definition lpx: ∀h. sd h → relation3 genv lenv lenv ≝ + λh,g,G. lpx_sn (cpx h g G). + +interpretation "extended parallel reduction (local environment, sn variant)" + 'PRedSn h g G L1 L2 = (lpx h g G L1 L2). + +(* Basic inversion lemmas ***************************************************) + +lemma lpx_inv_atom1: ∀h,g,G,L2. ⦃G, ⋆⦄ ⊢ ➡[h, g] L2 → L2 = ⋆. +/2 width=4 by lpx_sn_inv_atom1_aux/ qed-. + +lemma lpx_inv_pair1: ∀h,g,I,G,K1,V1,L2. ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡[h, g] L2 → + ∃∃K2,V2. ⦃G, K1⦄ ⊢ ➡[h, g] K2 & ⦃G, K1⦄ ⊢ V1 ➡[h, g] V2 & + L2 = K2. ⓑ{I} V2. +/2 width=3 by lpx_sn_inv_pair1_aux/ qed-. + +lemma lpx_inv_atom2: ∀h,g,G,L1. ⦃G, L1⦄ ⊢ ➡[h, g] ⋆ → L1 = ⋆. +/2 width=4 by lpx_sn_inv_atom2_aux/ qed-. + +lemma lpx_inv_pair2: ∀h,g,I,G,L1,K2,V2. ⦃G, L1⦄ ⊢ ➡[h, g] K2.ⓑ{I}V2 → + ∃∃K1,V1. ⦃G, K1⦄ ⊢ ➡[h, g] K2 & ⦃G, K1⦄ ⊢ V1 ➡[h, g] V2 & + L1 = K1. ⓑ{I} V1. +/2 width=3 by lpx_sn_inv_pair2_aux/ qed-. + +lemma lpx_inv_pair: ∀h,g,I1,I2,G,L1,L2,V1,V2. ⦃G, L1.ⓑ{I1}V1⦄ ⊢ ➡[h, g] L2.ⓑ{I2}V2 → + ∧∧ ⦃G, L1⦄ ⊢ ➡[h, g] L2 & ⦃G, L1⦄ ⊢ V1 ➡[h, g] V2 & I1 = I2. +/2 width=1 by lpx_sn_inv_pair/ qed-. + +(* Basic properties *********************************************************) + +lemma lpx_refl: ∀h,g,G,L. ⦃G, L⦄ ⊢ ➡[h, g] L. +/2 width=1 by lpx_sn_refl/ qed. + +lemma lpx_pair: ∀h,g,I,G,K1,K2,V1,V2. ⦃G, K1⦄ ⊢ ➡[h, g] K2 → ⦃G, K1⦄ ⊢ V1 ➡[h, g] V2 → + ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡[h, g] K2.ⓑ{I}V2. +/2 width=1 by lpx_sn_pair/ qed. + +lemma lpr_lpx: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L1⦄ ⊢ ➡[h, g] L2. +#h #g #G #L1 #L2 #H elim H -L1 -L2 /3 width=1 by lpx_pair, cpr_cpx/ +qed. + +(* Basic forward lemmas *****************************************************) + +lemma lpx_fwd_length: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → |L1| = |L2|. +/2 width=2 by lpx_sn_fwd_length/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_aaa.ma new file mode 100644 index 000000000..58387c36f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_aaa.ma @@ -0,0 +1,83 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/aaa_lift.ma". +include "basic_2A/static/lsuba_aaa.ma". +include "basic_2A/reduction/lpx_drop.ma". + +(* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************) + +(* Properties on atomic arity assignment for terms **************************) + +(* Note: lemma 500 *) +lemma cpx_lpx_aaa_conf: ∀h,g,G,L1,T1,A. ⦃G, L1⦄ ⊢ T1 ⁝ A → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡[h, g] T2 → + ∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → ⦃G, L2⦄ ⊢ T2 ⁝ A. +#h #g #G #L1 #T1 #A #H elim H -G -L1 -T1 -A +[ #g #L1 #k #X #H + elim (cpx_inv_sort1 … H) -H // * // +| #I #G #L1 #K1 #V1 #B #i #HLK1 #_ #IHV1 #X #H #L2 #HL12 + elim (cpx_inv_lref1 … H) -H + [ #H destruct + elim (lpx_drop_conf … HLK1 … HL12) -L1 #X #H #HLK2 + elim (lpx_inv_pair1 … H) -H + #K2 #V2 #HK12 #HV12 #H destruct /3 width=6 by aaa_lref/ + | * #J #Y #Z #V2 #H #HV12 #HV2 + lapply (drop_mono … H … HLK1) -H #H destruct + elim (lpx_drop_conf … HLK1 … HL12) -L1 #Z #H #HLK2 + elim (lpx_inv_pair1 … H) -H #K2 #V0 #HK12 #_ #H destruct + /3 width=8 by aaa_lift, drop_fwd_drop2/ + ] +| #a #G #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12 + elim (cpx_inv_abbr1 … H) -H * + [ #V2 #T2 #HV12 #HT12 #H destruct /4 width=2 by lpx_pair, aaa_abbr/ + | #T2 #HT12 #HT2 #H destruct -IHV1 + /4 width=8 by lpx_pair, aaa_inv_lift, drop_drop/ + ] +| #a #G #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12 + elim (cpx_inv_abst1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct + /4 width=1 by lpx_pair, aaa_abst/ +| #G #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12 + elim (cpx_inv_appl1 … H) -H * + [ #V2 #T2 #HV12 #HT12 #H destruct /3 width=3 by aaa_appl/ + | #b #V2 #W1 #W2 #U1 #U2 #HV12 #HW12 #HU12 #H1 #H2 destruct + lapply (IHV1 … HV12 … HL12) -IHV1 -HV12 #HV2 + lapply (IHT1 (ⓛ{b}W2.U2) … HL12) -IHT1 /2 width=1 by cpx_bind/ -L1 #H + elim (aaa_inv_abst … H) -H #B0 #A0 #HW1 #HU2 #H destruct + /5 width=6 by lsuba_aaa_trans, lsuba_beta, aaa_abbr, aaa_cast/ + | #b #V #V2 #W1 #W2 #U1 #U2 #HV1 #HV2 #HW12 #HU12 #H1 #H2 destruct + lapply (aaa_lift G L2 … B … (L2.ⓓW2) … HV2) -HV2 /2 width=2 by drop_drop/ #HV2 + lapply (IHT1 (ⓓ{b}W2.U2) … HL12) -IHT1 /2 width=1 by cpx_bind/ -L1 #H + elim (aaa_inv_abbr … H) -H /3 width=3 by aaa_abbr, aaa_appl/ + ] +| #G #L1 #V1 #T1 #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12 + elim (cpx_inv_cast1 … H) -H + [ * #V2 #T2 #HV12 #HT12 #H destruct /3 width=1 by aaa_cast/ + | -IHV1 /2 width=1 by/ + | -IHT1 /2 width=1 by/ + ] +] +qed-. + +lemma cpx_aaa_conf: ∀h,g,G,L,T1,A. ⦃G, L⦄ ⊢ T1 ⁝ A → ∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → ⦃G, L⦄ ⊢ T2 ⁝ A. +/2 width=7 by cpx_lpx_aaa_conf/ qed-. + +lemma lpx_aaa_conf: ∀h,g,G,L1,T,A. ⦃G, L1⦄ ⊢ T ⁝ A → ∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → ⦃G, L2⦄ ⊢ T ⁝ A. +/2 width=7 by cpx_lpx_aaa_conf/ qed-. + +lemma cpr_aaa_conf: ∀G,L,T1,A. ⦃G, L⦄ ⊢ T1 ⁝ A → ∀T2. ⦃G, L⦄ ⊢ T1 ➡ T2 → ⦃G, L⦄ ⊢ T2 ⁝ A. +/3 width=5 by cpx_aaa_conf, cpr_cpx/ qed-. + +lemma lpr_aaa_conf: ∀G,L1,T,A. ⦃G, L1⦄ ⊢ T ⁝ A → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L2⦄ ⊢ T ⁝ A. +/3 width=5 by lpx_aaa_conf, lpr_lpx/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_drop.ma new file mode 100644 index 000000000..6509da528 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_drop.ma @@ -0,0 +1,78 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lpx_sn_drop.ma". +include "basic_2A/reduction/cpx_lift.ma". +include "basic_2A/reduction/lpx.ma". + +(* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************) + +(* Properties on local environment slicing ***********************************) + +lemma lpx_drop_conf: ∀h,g,G. dropable_sn (lpx h g G). +/3 width=6 by lpx_sn_deliftable_dropable, cpx_inv_lift1/ qed-. + +lemma drop_lpx_trans: ∀h,g,G. dedropable_sn (lpx h g G). +/3 width=10 by lpx_sn_liftable_dedropable, cpx_lift/ qed-. + +lemma lpx_drop_trans_O1: ∀h,g,G. dropable_dx (lpx h g G). +/2 width=3 by lpx_sn_dropable/ qed-. + +(* Properties on supclosure *************************************************) + +lemma fqu_lpx_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀K2. ⦃G2, L2⦄ ⊢ ➡[h, g] K2 → + ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡[h, g] K1 & ⦃G1, L1⦄ ⊢ T1 ➡[h, g] T & ⦃G1, K1, T⦄ ⊐ ⦃G2, K2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +/3 width=5 by fqu_lref_O, fqu_pair_sn, fqu_flat_dx, lpx_pair, ex3_2_intro/ +[ #a #I #G2 #L2 #V2 #T2 #X #H elim (lpx_inv_pair1 … H) -H + #K2 #W2 #HLK2 #HVW2 #H destruct + /3 width=5 by cpx_pair_sn, fqu_bind_dx, ex3_2_intro/ +| #G #L1 #K1 #T1 #U1 #m #HLK1 #HTU1 #K2 #HK12 + elim (drop_lpx_trans … HLK1 … HK12) -HK12 + /3 width=7 by fqu_drop, ex3_2_intro/ +] +qed-. + +lemma fquq_lpx_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀K2. ⦃G2, L2⦄ ⊢ ➡[h, g] K2 → + ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡[h, g] K1 & ⦃G1, L1⦄ ⊢ T1 ➡[h, g] T & ⦃G1, K1, T⦄ ⊐⸮ ⦃G2, K2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K2 #HLK2 elim (fquq_inv_gen … H) -H +[ #HT12 elim (fqu_lpx_trans … HT12 … HLK2) /3 width=5 by fqu_fquq, ex3_2_intro/ +| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma lpx_fqu_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → + ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡[h, g] T & ⦃G1, K1, T⦄ ⊐ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +/3 width=7 by fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, lpx_pair, ex3_2_intro/ +[ #I #G1 #L1 #V1 #X #H elim (lpx_inv_pair2 … H) -H + #K1 #W1 #HKL1 #HWV1 #H destruct elim (lift_total V1 0 1) + /4 width=7 by cpx_delta, fqu_drop, drop_drop, ex3_2_intro/ +| #G #L1 #K1 #T1 #U1 #m #HLK1 #HTU1 #L0 #HL01 + elim (lpx_drop_trans_O1 … HL01 … HLK1) -L1 + /3 width=5 by fqu_drop, ex3_2_intro/ +] +qed-. + +lemma lpx_fquq_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → + ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡[h, g] T & ⦃G1, K1, T⦄ ⊐⸮ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #HKL1 elim (fquq_inv_gen … H) -H +[ #HT12 elim (lpx_fqu_trans … HT12 … HKL1) /3 width=5 by fqu_fquq, ex3_2_intro/ +| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_frees.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_frees.ma new file mode 100644 index 000000000..6a187d416 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_frees.ma @@ -0,0 +1,88 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/frees_lreq.ma". +include "basic_2A/multiple/frees_lift.ma". +include "basic_2A/reduction/lpx_drop.ma". + +(* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************) + +(* Properties on context-sensitive free variables ***************************) + +lemma lpx_cpx_frees_trans: ∀h,g,G,L1,U1,U2. ⦃G, L1⦄ ⊢ U1 ➡[h, g] U2 → + ∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → + ∀i. L2 ⊢ i ϵ 𝐅*[0]⦃U2⦄ → L1 ⊢ i ϵ 𝐅*[0]⦃U1⦄. +#h #g #G #L1 #U1 @(fqup_wf_ind_eq … G L1 U1) -G -L1 -U1 +#G0 #L0 #U0 #IH #G #L1 * * +[ -IH #k #HG #HL #HU #U2 #H1 #L2 #_ #i #H2 elim (cpx_inv_sort1 … H1) -H1 + [| * #d #_ ] #H destruct elim (frees_inv_sort … H2) +| #j #HG #HL #HU #U2 #H1 #L2 #HL12 #i #H2 elim (cpx_inv_lref1 … H1) -H1 + [ #H destruct elim (frees_inv_lref … H2) -H2 // + * #I #K2 #W2 #Hj #Hji #HLK2 #HW2 + elim (lpx_drop_trans_O1 … HL12 … HLK2) -HL12 #Y #HLK1 #H + elim (lpx_inv_pair2 … H) -H #K1 #W1 #HK12 #HW12 #H destruct + /4 width=11 by frees_lref_be, fqup_lref/ + | * #I #K1 #W1 #W0 #HLK1 #HW10 #HW0U2 + lapply (drop_fwd_drop2 … HLK1) #H0 + elim (lpx_drop_conf … H0 … HL12) -H0 -HL12 #K2 #HK12 #HLK2 + elim (lt_or_ge i (j+1)) #Hji + [ -IH elim (frees_inv_lift_be … H2 … HLK2 … HW0U2) /2 width=1 by monotonic_pred/ + | lapply (frees_inv_lift_ge … H2 … HLK2 … HW0U2 ?) -L2 -U2 // (cpx_inv_gref1 … H1) -H1 destruct + #L2 #_ #i #H2 elim (frees_inv_gref … H2) +| #a #I #W1 #U1 #HG #HL #HU #X #HX #L2 #HL12 #i #Hi destruct + elim (cpx_inv_bind1 … HX) -HX * + [ #W2 #U2 #HW12 #HU12 #H destruct + elim (frees_inv_bind_O … Hi) -Hi + /4 width=7 by frees_bind_dx_O, frees_bind_sn, lpx_pair/ + | #U2 #HU12 #HXU2 #H1 #H2 destruct + lapply (frees_lift_ge … Hi (L2.ⓓW1) (Ⓕ) … HXU2 ?) + /4 width=7 by frees_bind_dx_O, lpx_pair, drop_drop/ + ] +| #I #W1 #X1 #HG #HL #HU #X2 #HX2 #L2 #HL12 #i #Hi destruct + elim (cpx_inv_flat1 … HX2) -HX2 * + [ #W2 #U2 #HW12 #HU12 #H destruct + elim (frees_inv_flat … Hi) -Hi /3 width=7 by frees_flat_dx, frees_flat_sn/ + | #HU12 #H destruct /3 width=7 by frees_flat_dx/ + | #HW12 #H destruct /3 width=7 by frees_flat_sn/ + | #b #W2 #V1 #V2 #U1 #U2 #HW12 #HV12 #HU12 #H1 #H2 #H3 destruct + elim (frees_inv_bind … Hi) -Hi #Hi + [ elim (frees_inv_flat … Hi) -Hi + /4 width=7 by frees_flat_dx, frees_flat_sn, frees_bind_sn/ + | lapply (lreq_frees_trans … Hi (L2.ⓛV2) ?) /2 width=1 by lreq_succ/ -Hi #HU2 + lapply (frees_weak … HU2 0 ?) -HU2 + /5 width=7 by frees_bind_dx_O, frees_flat_dx, lpx_pair/ + ] + | #b #W2 #W0 #V1 #V2 #U1 #U2 #HW12 #HW20 #HV12 #HU12 #H1 #H2 #H3 destruct + elim (frees_inv_bind_O … Hi) -Hi #Hi + [ /4 width=7 by frees_flat_dx, frees_bind_sn/ + | elim (frees_inv_flat … Hi) -Hi + [ #HW0 lapply (frees_inv_lift_ge … HW0 L2 (Ⓕ) … HW20 ?) -W0 + /3 width=7 by frees_flat_sn, drop_drop/ + | /5 width=7 by frees_bind_dx_O, frees_flat_dx, lpx_pair/ + ] + ] + ] +] +qed-. + +lemma cpx_frees_trans: ∀h,g,G. frees_trans (cpx h g G). +/2 width=8 by lpx_cpx_frees_trans/ qed-. + +lemma lpx_frees_trans: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → + ∀U,i. L2 ⊢ i ϵ 𝐅*[0]⦃U⦄ → L1 ⊢ i ϵ 𝐅*[0]⦃U⦄. +/2 width=8 by lpx_cpx_frees_trans/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_lleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_lleq.ma new file mode 100644 index 000000000..0563baecc --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_lleq.ma @@ -0,0 +1,136 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/llor_drop.ma". +include "basic_2A/multiple/llpx_sn_llor.ma". +include "basic_2A/multiple/llpx_sn_lpx_sn.ma". +include "basic_2A/multiple/lleq_lreq.ma". +include "basic_2A/multiple/lleq_llor.ma". +include "basic_2A/reduction/cpx_lreq.ma". +include "basic_2A/reduction/cpx_lleq.ma". +include "basic_2A/reduction/lpx_frees.ma". + +(* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************) + +(* Properties on lazy equivalence for local environments ********************) + +(* Note: contains a proof of llpx_cpx_conf *) +lemma lleq_lpx_trans: ∀h,g,G,L2,K2. ⦃G, L2⦄ ⊢ ➡[h, g] K2 → + ∀L1,T,l. L1 ≡[T, l] L2 → + ∃∃K1. ⦃G, L1⦄ ⊢ ➡[h, g] K1 & K1 ≡[T, l] K2. +#h #g #G #L2 #K2 #HLK2 #L1 #T #l #HL12 +lapply (lpx_fwd_length … HLK2) #H1 +lapply (lleq_fwd_length … HL12) #H2 +lapply (lpx_sn_llpx_sn … T … l HLK2) // -HLK2 #H +lapply (lleq_llpx_sn_trans … HL12 … H) /2 width=3 by lleq_cpx_trans/ -HL12 -H #H +elim (llor_total L1 K2 T l) // -H1 -H2 #K1 #HLK1 +lapply (llpx_sn_llor_dx_sym … H … HLK1) +[ /2 width=6 by cpx_frees_trans/ +| /3 width=10 by cpx_llpx_sn_conf, cpx_inv_lift1, cpx_lift/ +| /3 width=5 by llpx_sn_llor_fwd_sn, ex2_intro/ +] +qed-. + +lemma lpx_lleq_fqu_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → K1 ≡[T1, 0] L1 → + ∃∃K2. ⦃G1, K1, T1⦄ ⊐ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2 & K2 ≡[T2, 0] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +[ #I #G1 #L1 #V1 #X #H1 #H2 elim (lpx_inv_pair2 … H1) -H1 + #K0 #V0 #H1KL1 #_ #H destruct + elim (lleq_inv_lref_ge_dx … H2 ? I L1 V1) -H2 // + #K1 #H #H2KL1 lapply (drop_inv_O2 … H) -H #H destruct + /2 width=4 by fqu_lref_O, ex3_intro/ +| * [ #a ] #I #G1 #L1 #V1 #T1 #K1 #HLK1 #H + [ elim (lleq_inv_bind … H) + | elim (lleq_inv_flat … H) + ] -H /2 width=4 by fqu_pair_sn, ex3_intro/ +| #a #I #G1 #L1 #V1 #T1 #K1 #HLK1 #H elim (lleq_inv_bind_O … H) -H + /3 width=4 by lpx_pair, fqu_bind_dx, ex3_intro/ +| #I #G1 #L1 #V1 #T1 #K1 #HLK1 #H elim (lleq_inv_flat … H) -H + /2 width=4 by fqu_flat_dx, ex3_intro/ +| #G1 #L1 #L #T1 #U1 #m #HL1 #HTU1 #K1 #H1KL1 #H2KL1 + elim (drop_O1_le (Ⓕ) (m+1) K1) + [ #K #HK1 lapply (lleq_inv_lift_le … H2KL1 … HK1 HL1 … HTU1 ?) -H2KL1 // + #H2KL elim (lpx_drop_trans_O1 … H1KL1 … HL1) -L1 + #K0 #HK10 #H1KL lapply (drop_mono … HK10 … HK1) -HK10 #H destruct + /3 width=4 by fqu_drop, ex3_intro/ + | lapply (drop_fwd_length_le2 … HL1) -L -T1 -g + lapply (lleq_fwd_length … H2KL1) // + ] +] +qed-. + +lemma lpx_lleq_fquq_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → K1 ≡[T1, 0] L1 → + ∃∃K2. ⦃G1, K1, T1⦄ ⊐⸮ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2 & K2 ≡[T2, 0] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #H1KL1 #H2KL1 +elim (fquq_inv_gen … H) -H +[ #H elim (lpx_lleq_fqu_trans … H … H1KL1 H2KL1) -L1 + /3 width=4 by fqu_fquq, ex3_intro/ +| * #HG #HL #HT destruct /2 width=4 by ex3_intro/ +] +qed-. + +lemma lpx_lleq_fqup_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → K1 ≡[T1, 0] L1 → + ∃∃K2. ⦃G1, K1, T1⦄ ⊐+ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2 & K2 ≡[T2, 0] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +[ #G2 #L2 #T2 #H #K1 #H1KL1 #H2KL1 elim (lpx_lleq_fqu_trans … H … H1KL1 H2KL1) -L1 + /3 width=4 by fqu_fqup, ex3_intro/ +| #G #G2 #L #L2 #T #T2 #_ #HT2 #IHT1 #K1 #H1KL1 #H2KL1 elim (IHT1 … H2KL1) // -L1 + #K #HT1 #H1KL #H2KL elim (lpx_lleq_fqu_trans … HT2 … H1KL H2KL) -L + /3 width=5 by fqup_strap1, ex3_intro/ +] +qed-. + +lemma lpx_lleq_fqus_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → K1 ≡[T1, 0] L1 → + ∃∃K2. ⦃G1, K1, T1⦄ ⊐* ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2 & K2 ≡[T2, 0] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #H1KL1 #H2KL1 +elim (fqus_inv_gen … H) -H +[ #H elim (lpx_lleq_fqup_trans … H … H1KL1 H2KL1) -L1 + /3 width=4 by fqup_fqus, ex3_intro/ +| * #HG #HL #HT destruct /2 width=4 by ex3_intro/ +] +qed-. + +fact lreq_lpx_trans_lleq_aux: ∀h,g,G,L1,L0,l,m. L1 ⩬[l, m] L0 → m = ∞ → + ∀L2. ⦃G, L0⦄ ⊢ ➡[h, g] L2 → + ∃∃L. L ⩬[l, m] L2 & ⦃G, L1⦄ ⊢ ➡[h, g] L & + (∀T. L0 ≡[T, l] L2 ↔ L1 ≡[T, l] L). +#h #g #G #L1 #L0 #l #m #H elim H -L1 -L0 -l -m +[ #l #m #_ #L2 #H >(lpx_inv_atom1 … H) -H + /3 width=5 by ex3_intro, conj/ +| #I1 #I0 #L1 #L0 #V1 #V0 #_ #_ #Hm destruct +| #I #L1 #L0 #V1 #m #HL10 #IHL10 #Hm #Y #H + elim (lpx_inv_pair1 … H) -H #L2 #V2 #HL02 #HV02 #H destruct + lapply (ysucc_inv_Y_dx … Hm) -Hm #Hm + elim (IHL10 … HL02) // -IHL10 -HL02 #L #HL2 #HL1 #IH + @(ex3_intro … (L.ⓑ{I}V2)) /3 width=3 by lpx_pair, lreq_cpx_trans, lreq_pair/ + #T elim (IH T) #HL0dx #HL0sn + @conj #H @(lleq_lreq_repl … H) -H /3 width=1 by lreq_sym, lreq_pair_O_Y/ +| #I1 #I0 #L1 #L0 #V1 #V0 #l #m #HL10 #IHL10 #Hm #Y #H + elim (lpx_inv_pair1 … H) -H #L2 #V2 #HL02 #HV02 #H destruct + elim (IHL10 … HL02) // -IHL10 -HL02 #L #HL2 #HL1 #IH + @(ex3_intro … (L.ⓑ{I1}V1)) /3 width=1 by lpx_pair, lreq_succ/ + #T elim (IH T) #HL0dx #HL0sn + @conj #H @(lleq_lreq_repl … H) -H /3 width=1 by lreq_sym, lreq_succ/ +] +qed-. + +lemma lreq_lpx_trans_lleq: ∀h,g,G,L1,L0,l. L1 ⩬[l, ∞] L0 → + ∀L2. ⦃G, L0⦄ ⊢ ➡[h, g] L2 → + ∃∃L. L ⩬[l, ∞] L2 & ⦃G, L1⦄ ⊢ ➡[h, g] L & + (∀T. L0 ≡[T, l] L2 ↔ L1 ≡[T, l] L). +/2 width=1 by lreq_lpx_trans_lleq_aux/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa.ma new file mode 100644 index 000000000..28701420a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa.ma @@ -0,0 +1,145 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/atomicarity_4.ma". +include "basic_2A/grammar/aarity.ma". +include "basic_2A/grammar/genv.ma". +include "basic_2A/substitution/drop.ma". + +(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) + +(* activate genv *) +inductive aaa: relation4 genv lenv term aarity ≝ +| aaa_sort: ∀G,L,k. aaa G L (⋆k) (⓪) +| aaa_lref: ∀I,G,L,K,V,B,i. ⬇[i] L ≡ K. ⓑ{I}V → aaa G K V B → aaa G L (#i) B +| aaa_abbr: ∀a,G,L,V,T,B,A. + aaa G L V B → aaa G (L.ⓓV) T A → aaa G L (ⓓ{a}V.T) A +| aaa_abst: ∀a,G,L,V,T,B,A. + aaa G L V B → aaa G (L.ⓛV) T A → aaa G L (ⓛ{a}V.T) (②B.A) +| aaa_appl: ∀G,L,V,T,B,A. aaa G L V B → aaa G L T (②B.A) → aaa G L (ⓐV.T) A +| aaa_cast: ∀G,L,V,T,A. aaa G L V A → aaa G L T A → aaa G L (ⓝV.T) A +. + +interpretation "atomic arity assignment (term)" + 'AtomicArity G L T A = (aaa G L T A). + +(* Basic inversion lemmas ***************************************************) + +fact aaa_inv_sort_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀k. T = ⋆k → A = ⓪. +#G #L #T #A * -G -L -T -A +[ // +| #I #G #L #K #V #B #i #_ #_ #k #H destruct +| #a #G #L #V #T #B #A #_ #_ #k #H destruct +| #a #G #L #V #T #B #A #_ #_ #k #H destruct +| #G #L #V #T #B #A #_ #_ #k #H destruct +| #G #L #V #T #A #_ #_ #k #H destruct +] +qed-. + +lemma aaa_inv_sort: ∀G,L,A,k. ⦃G, L⦄ ⊢ ⋆k ⁝ A → A = ⓪. +/2 width=6 by aaa_inv_sort_aux/ qed-. + +fact aaa_inv_lref_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀i. T = #i → + ∃∃I,K,V. ⬇[i] L ≡ K.ⓑ{I} V & ⦃G, K⦄ ⊢ V ⁝ A. +#G #L #T #A * -G -L -T -A +[ #G #L #k #i #H destruct +| #I #G #L #K #V #B #j #HLK #HB #i #H destruct /2 width=5 by ex2_3_intro/ +| #a #G #L #V #T #B #A #_ #_ #i #H destruct +| #a #G #L #V #T #B #A #_ #_ #i #H destruct +| #G #L #V #T #B #A #_ #_ #i #H destruct +| #G #L #V #T #A #_ #_ #i #H destruct +] +qed-. + +lemma aaa_inv_lref: ∀G,L,A,i. ⦃G, L⦄ ⊢ #i ⁝ A → + ∃∃I,K,V. ⬇[i] L ≡ K. ⓑ{I} V & ⦃G, K⦄ ⊢ V ⁝ A. +/2 width=3 by aaa_inv_lref_aux/ qed-. + +fact aaa_inv_gref_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀p. T = §p → ⊥. +#G #L #T #A * -G -L -T -A +[ #G #L #k #q #H destruct +| #I #G #L #K #V #B #i #HLK #HB #q #H destruct +| #a #G #L #V #T #B #A #_ #_ #q #H destruct +| #a #G #L #V #T #B #A #_ #_ #q #H destruct +| #G #L #V #T #B #A #_ #_ #q #H destruct +| #G #L #V #T #A #_ #_ #q #H destruct +] +qed-. + +lemma aaa_inv_gref: ∀G,L,A,p. ⦃G, L⦄ ⊢ §p ⁝ A → ⊥. +/2 width=7 by aaa_inv_gref_aux/ qed-. + +fact aaa_inv_abbr_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀a,W,U. T = ⓓ{a}W. U → + ∃∃B. ⦃G, L⦄ ⊢ W ⁝ B & ⦃G, L.ⓓW⦄ ⊢ U ⁝ A. +#G #L #T #A * -G -L -T -A +[ #G #L #k #a #W #U #H destruct +| #I #G #L #K #V #B #i #_ #_ #a #W #U #H destruct +| #b #G #L #V #T #B #A #HV #HT #a #W #U #H destruct /2 width=2 by ex2_intro/ +| #b #G #L #V #T #B #A #_ #_ #a #W #U #H destruct +| #G #L #V #T #B #A #_ #_ #a #W #U #H destruct +| #G #L #V #T #A #_ #_ #a #W #U #H destruct +] +qed-. + +lemma aaa_inv_abbr: ∀a,G,L,V,T,A. ⦃G, L⦄ ⊢ ⓓ{a}V. T ⁝ A → + ∃∃B. ⦃G, L⦄ ⊢ V ⁝ B & ⦃G, L.ⓓV⦄ ⊢ T ⁝ A. +/2 width=4 by aaa_inv_abbr_aux/ qed-. + +fact aaa_inv_abst_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀a,W,U. T = ⓛ{a}W. U → + ∃∃B1,B2. ⦃G, L⦄ ⊢ W ⁝ B1 & ⦃G, L.ⓛW⦄ ⊢ U ⁝ B2 & A = ②B1.B2. +#G #L #T #A * -G -L -T -A +[ #G #L #k #a #W #U #H destruct +| #I #G #L #K #V #B #i #_ #_ #a #W #U #H destruct +| #b #G #L #V #T #B #A #_ #_ #a #W #U #H destruct +| #b #G #L #V #T #B #A #HV #HT #a #W #U #H destruct /2 width=5 by ex3_2_intro/ +| #G #L #V #T #B #A #_ #_ #a #W #U #H destruct +| #G #L #V #T #A #_ #_ #a #W #U #H destruct +] +qed-. + +lemma aaa_inv_abst: ∀a,G,L,W,T,A. ⦃G, L⦄ ⊢ ⓛ{a}W. T ⁝ A → + ∃∃B1,B2. ⦃G, L⦄ ⊢ W ⁝ B1 & ⦃G, L.ⓛW⦄ ⊢ T ⁝ B2 & A = ②B1.B2. +/2 width=4 by aaa_inv_abst_aux/ qed-. + +fact aaa_inv_appl_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀W,U. T = ⓐW.U → + ∃∃B. ⦃G, L⦄ ⊢ W ⁝ B & ⦃G, L⦄ ⊢ U ⁝ ②B.A. +#G #L #T #A * -G -L -T -A +[ #G #L #k #W #U #H destruct +| #I #G #L #K #V #B #i #_ #_ #W #U #H destruct +| #a #G #L #V #T #B #A #_ #_ #W #U #H destruct +| #a #G #L #V #T #B #A #_ #_ #W #U #H destruct +| #G #L #V #T #B #A #HV #HT #W #U #H destruct /2 width=3 by ex2_intro/ +| #G #L #V #T #A #_ #_ #W #U #H destruct +] +qed-. + +lemma aaa_inv_appl: ∀G,L,V,T,A. ⦃G, L⦄ ⊢ ⓐV.T ⁝ A → + ∃∃B. ⦃G, L⦄ ⊢ V ⁝ B & ⦃G, L⦄ ⊢ T ⁝ ②B.A. +/2 width=3 by aaa_inv_appl_aux/ qed-. + +fact aaa_inv_cast_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀W,U. T = ⓝW. U → + ⦃G, L⦄ ⊢ W ⁝ A ∧ ⦃G, L⦄ ⊢ U ⁝ A. +#G #L #T #A * -G -L -T -A +[ #G #L #k #W #U #H destruct +| #I #G #L #K #V #B #i #_ #_ #W #U #H destruct +| #a #G #L #V #T #B #A #_ #_ #W #U #H destruct +| #a #G #L #V #T #B #A #_ #_ #W #U #H destruct +| #G #L #V #T #B #A #_ #_ #W #U #H destruct +| #G #L #V #T #A #HV #HT #W #U #H destruct /2 width=1 by conj/ +] +qed-. + +lemma aaa_inv_cast: ∀G,L,W,T,A. ⦃G, L⦄ ⊢ ⓝW. T ⁝ A → + ⦃G, L⦄ ⊢ W ⁝ A ∧ ⦃G, L⦄ ⊢ T ⁝ A. +/2 width=3 by aaa_inv_cast_aux/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_aaa.ma new file mode 100644 index 000000000..a47130cc5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_aaa.ma @@ -0,0 +1,39 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop_drop.ma". +include "basic_2A/static/aaa.ma". + +(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) + +(* Main properties **********************************************************) + +theorem aaa_mono: ∀G,L,T,A1. ⦃G, L⦄ ⊢ T ⁝ A1 → ∀A2. ⦃G, L⦄ ⊢ T ⁝ A2 → A1 = A2. +#G #L #T #A1 #H elim H -G -L -T -A1 +[ #G #L #k #A2 #H + >(aaa_inv_sort … H) -H // +| #I1 #G #L #K1 #V1 #B #i #HLK1 #_ #IHA1 #A2 #H + elim (aaa_inv_lref … H) -H #I2 #K2 #V2 #HLK2 #HA2 + lapply (drop_mono … HLK1 … HLK2) -L #H destruct /2 width=1 by/ +| #a #G #L #V #T #B1 #A1 #_ #_ #_ #IHA1 #A2 #H + elim (aaa_inv_abbr … H) -H /2 width=1 by/ +| #a #G #L #V1 #T1 #B1 #A1 #_ #_ #IHB1 #IHA1 #X #H + elim (aaa_inv_abst … H) -H #B2 #A2 #HB2 #HA2 #H destruct /3 width=1 by eq_f2/ +| #G #L #V1 #T1 #B1 #A1 #_ #_ #_ #IHA1 #A2 #H + elim (aaa_inv_appl … H) -H #B2 #_ #HA2 + lapply (IHA1 … HA2) -L #H destruct // +| #G #L #V #T #A1 #_ #_ #_ #IHA1 #A2 #H + elim (aaa_inv_cast … H) -H /2 width=1 by/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_fqus.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_fqus.ma new file mode 100644 index 000000000..922c971a9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_fqus.ma @@ -0,0 +1,63 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/fqus_alt.ma". +include "basic_2A/static/aaa_lift.ma". + +(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) + +(* Properties on supclosure *************************************************) + +lemma aaa_fqu_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +[ #I #G #L #T #A #H elim (aaa_inv_lref … H) -H + #J #K #V #H #HA lapply (drop_inv_O2 … H) -H + #H destruct /2 width=2 by ex_intro/ +| * [ #a ] * #G #L #V #T #X #H + [ elim (aaa_inv_abbr … H) + | elim (aaa_inv_abst … H) + | elim (aaa_inv_appl … H) + | elim (aaa_inv_cast … H) + ] -H /2 width=2 by ex_intro/ +| #a * #G #L #V #T #X #H + [ elim (aaa_inv_abbr … H) + | elim (aaa_inv_abst … H) + ] -H /2 width=2 by ex_intro/ +| * #G #L #V #T #X #H + [ elim (aaa_inv_appl … H) + | elim (aaa_inv_cast … H) + ] -H /2 width=2 by ex_intro/ +| /3 width=9 by aaa_inv_lift, ex_intro/ +] +qed-. + +lemma aaa_fquq_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim(fquq_inv_gen … H) -H /2 width=6 by aaa_fqu_conf/ +* #H1 #H2 #H3 destruct /2 width=2 by ex_intro/ +qed-. + +lemma aaa_fqup_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2. +#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +[2: #G #G2 #L #L2 #T #T2 #_ #H2 #IH1 #A #HA elim (IH1 … HA) -IH1 -A ] +/2 width=6 by aaa_fqu_conf/ +qed-. + +lemma aaa_fqus_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim(fqus_inv_gen … H) -H /2 width=6 by aaa_fqup_conf/ +* #H1 #H2 #H3 destruct /2 width=2 by ex_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_lift.ma new file mode 100644 index 000000000..7a05536c1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_lift.ma @@ -0,0 +1,73 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop_drop.ma". +include "basic_2A/static/aaa.ma". + +(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) + +(* Properties on basic relocation *******************************************) + +lemma aaa_lift: ∀G,L1,T1,A. ⦃G, L1⦄ ⊢ T1 ⁝ A → ∀L2,s,l,m. ⬇[s, l, m] L2 ≡ L1 → + ∀T2. ⬆[l, m] T1 ≡ T2 → ⦃G, L2⦄ ⊢ T2 ⁝ A. +#G #L1 #T1 #A #H elim H -G -L1 -T1 -A +[ #G #L1 #k #L2 #s #l #m #_ #T2 #H + >(lift_inv_sort1 … H) -H // +| #I #G #L1 #K1 #V1 #B #i #HLK1 #_ #IHB #L2 #s #l #m #HL21 #T2 #H + elim (lift_inv_lref1 … H) -H * #Hil #H destruct + [ elim (drop_trans_le … HL21 … HLK1) -L1 /2 width=2 by lt_to_le/ #X #HLK2 #H + elim (drop_inv_skip2 … H) -H /2 width=1 by lt_plus_to_minus_r/ -Hil #K2 #V2 #HK21 #HV12 #H destruct + /3 width=9 by aaa_lref/ + | lapply (drop_trans_ge … HL21 … HLK1 ?) -L1 + /3 width=9 by aaa_lref, drop_inv_gen/ + ] +| #a #G #L1 #V1 #T1 #B #A #_ #_ #IHB #IHA #L2 #s #l #m #HL21 #X #H + elim (lift_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct + /4 width=5 by aaa_abbr, drop_skip/ +| #a #G #L1 #V1 #T1 #B #A #_ #_ #IHB #IHA #L2 #s #l #m #HL21 #X #H + elim (lift_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct + /4 width=5 by aaa_abst, drop_skip/ +| #G #L1 #V1 #T1 #B #A #_ #_ #IHB #IHA #L2 #s #l #m #HL21 #X #H + elim (lift_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct + /3 width=5 by aaa_appl/ +| #G #L1 #V1 #T1 #A #_ #_ #IH1 #IH2 #L2 #s #l #m #HL21 #X #H + elim (lift_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct + /3 width=5 by aaa_cast/ +] +qed. + +lemma aaa_inv_lift: ∀G,L2,T2,A. ⦃G, L2⦄ ⊢ T2 ⁝ A → ∀L1,s,l,m. ⬇[s, l, m] L2 ≡ L1 → + ∀T1. ⬆[l, m] T1 ≡ T2 → ⦃G, L1⦄ ⊢ T1 ⁝ A. +#G #L2 #T2 #A #H elim H -G -L2 -T2 -A +[ #G #L2 #k #L1 #s #l #m #_ #T1 #H + >(lift_inv_sort2 … H) -H // +| #I #G #L2 #K2 #V2 #B #i #HLK2 #_ #IHB #L1 #s #l #m #HL21 #T1 #H + elim (lift_inv_lref2 … H) -H * #Hil #H destruct + [ elim (drop_conf_lt … HL21 … HLK2) -L2 /3 width=9 by aaa_lref/ + | lapply (drop_conf_ge … HL21 … HLK2 ?) -L2 /3 width=9 by aaa_lref/ + ] +| #a #G #L2 #V2 #T2 #B #A #_ #_ #IHB #IHA #L1 #s #l #m #HL21 #X #H + elim (lift_inv_bind2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct + /4 width=5 by aaa_abbr, drop_skip/ +| #a #G #L2 #V2 #T2 #B #A #_ #_ #IHB #IHA #L1 #s #l #m #HL21 #X #H + elim (lift_inv_bind2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct + /4 width=5 by aaa_abst, drop_skip/ +| #G #L2 #V2 #T2 #B #A #_ #_ #IHB #IHA #L1 #s #l #m #HL21 #X #H + elim (lift_inv_flat2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct + /3 width=5 by aaa_appl/ +| #G #L2 #V2 #T2 #A #_ #_ #IH1 #IH2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_flat2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct + /3 width=5 by aaa_cast/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_lifts.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_lifts.ma new file mode 100644 index 000000000..0b0873379 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_lifts.ma @@ -0,0 +1,30 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/drops.ma". +include "basic_2A/static/aaa_lift.ma". + +(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) + +(* Properties concerning generic relocation *********************************) + +lemma aaa_lifts: ∀G,L1,L2,T2,A,s,cs. ⬇*[s, cs] L2 ≡ L1 → ∀T1. ⬆*[cs] T1 ≡ T2 → + ⦃G, L1⦄ ⊢ T1 ⁝ A → ⦃G, L2⦄ ⊢ T2 ⁝ A. +#G #L1 #L2 #T2 #A #s #cs #H elim H -L1 -L2 -cs +[ #L #T1 #H #HT1 + <(lifts_inv_nil … H) -H // +| #L1 #L #L2 #cs #l #m #_ #HL2 #IHL1 #T1 #H #HT1 + elim (lifts_inv_cons … H) -H /3 width=10 by aaa_lift/ +] +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_lleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_lleq.ma new file mode 100644 index 000000000..59074270c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_lleq.ma @@ -0,0 +1,42 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/lleq_drop.ma". +include "basic_2A/static/aaa.ma". + +(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) + +(* Properties on lazy equivalence for local environments ********************) + +lemma lleq_aaa_trans: ∀G,L2,T,A. ⦃G, L2⦄ ⊢ T ⁝ A → + ∀L1. L1 ≡[T, 0] L2 → ⦃G, L1⦄ ⊢ T ⁝ A. +#G #L2 #T #A #H elim H -G -L2 -T -A /2 width=1 by aaa_sort/ +[ #I #G #L2 #K2 #V2 #A #i #HLK2 #_ #IHV2 #L1 #H elim (lleq_fwd_lref_dx … H … HLK2) -L2 + [ #H elim (ylt_yle_false … H) // + | * /3 width=5 by aaa_lref/ + ] +| #a #G #L2 #V #T #B #A #_ #_ #IHV #IHT #L1 #H elim (lleq_inv_bind_O … H) -H + /3 width=2 by aaa_abbr/ +| #a #G #L2 #V #T #B #A #_ #_ #IHV #IHT #L1 #H elim (lleq_inv_bind_O … H) -H + /3 width=1 by aaa_abst/ +| #G #L2 #V #T #B #A #_ #_ #IHV #IHT #L1 #H elim (lleq_inv_flat … H) -H + /3 width=3 by aaa_appl/ +| #G #L2 #V #T #A #_ #_ #IHV #IHT #L1 #H elim (lleq_inv_flat … H) -H + /3 width=1 by aaa_cast/ +] +qed-. + +lemma aaa_lleq_conf: ∀G,L2,T,A. ⦃G, L2⦄ ⊢ T ⁝ A → + ∀L1. L2 ≡[T, 0] L1 → ⦃G, L1⦄ ⊢ T ⁝ A. +/3 width=3 by lleq_aaa_trans, lleq_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/da.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/da.ma new file mode 100644 index 000000000..d08323835 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/da.ma @@ -0,0 +1,108 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/degree_6.ma". +include "basic_2A/grammar/genv.ma". +include "basic_2A/substitution/drop.ma". +include "basic_2A/static/sd.ma". + +(* DEGREE ASSIGNMENT FOR TERMS **********************************************) + +(* activate genv *) +inductive da (h:sh) (g:sd h): relation4 genv lenv term nat ≝ +| da_sort: ∀G,L,k,d. deg h g k d → da h g G L (⋆k) d +| da_ldef: ∀G,L,K,V,i,d. ⬇[i] L ≡ K.ⓓV → da h g G K V d → da h g G L (#i) d +| da_ldec: ∀G,L,K,W,i,d. ⬇[i] L ≡ K.ⓛW → da h g G K W d → da h g G L (#i) (d+1) +| da_bind: ∀a,I,G,L,V,T,d. da h g G (L.ⓑ{I}V) T d → da h g G L (ⓑ{a,I}V.T) d +| da_flat: ∀I,G,L,V,T,d. da h g G L T d → da h g G L (ⓕ{I}V.T) d +. + +interpretation "degree assignment (term)" + 'Degree h g G L T d = (da h g G L T d). + +(* Basic inversion lemmas ***************************************************) + +fact da_inv_sort_aux: ∀h,g,G,L,T,d. ⦃G, L⦄ ⊢ T ▪[h, g] d → + ∀k0. T = ⋆k0 → deg h g k0 d. +#h #g #G #L #T #d * -G -L -T -d +[ #G #L #k #d #Hkd #k0 #H destruct // +| #G #L #K #V #i #d #_ #_ #k0 #H destruct +| #G #L #K #W #i #d #_ #_ #k0 #H destruct +| #a #I #G #L #V #T #d #_ #k0 #H destruct +| #I #G #L #V #T #d #_ #k0 #H destruct +] +qed-. + +lemma da_inv_sort: ∀h,g,G,L,k,d. ⦃G, L⦄ ⊢ ⋆k ▪[h, g] d → deg h g k d. +/2 width=5 by da_inv_sort_aux/ qed-. + +fact da_inv_lref_aux: ∀h,g,G,L,T,d. ⦃G, L⦄ ⊢ T ▪[h, g] d → ∀j. T = #j → + (∃∃K,V. ⬇[j] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V ▪[h, g] d) ∨ + (∃∃K,W,d0. ⬇[j] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W ▪[h, g] d0 & + d = d0 + 1 + ). +#h #g #G #L #T #d * -G -L -T -d +[ #G #L #k #d #_ #j #H destruct +| #G #L #K #V #i #d #HLK #HV #j #H destruct /3 width=4 by ex2_2_intro, or_introl/ +| #G #L #K #W #i #d #HLK #HW #j #H destruct /3 width=6 by ex3_3_intro, or_intror/ +| #a #I #G #L #V #T #d #_ #j #H destruct +| #I #G #L #V #T #d #_ #j #H destruct +] +qed-. + +lemma da_inv_lref: ∀h,g,G,L,j,d. ⦃G, L⦄ ⊢ #j ▪[h, g] d → + (∃∃K,V. ⬇[j] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V ▪[h, g] d) ∨ + (∃∃K,W,d0. ⬇[j] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W ▪[h, g] d0 & d = d0+1). +/2 width=3 by da_inv_lref_aux/ qed-. + +fact da_inv_gref_aux: ∀h,g,G,L,T,d. ⦃G, L⦄ ⊢ T ▪[h, g] d → ∀p0. T = §p0 → ⊥. +#h #g #G #L #T #d * -G -L -T -d +[ #G #L #k #d #_ #p0 #H destruct +| #G #L #K #V #i #d #_ #_ #p0 #H destruct +| #G #L #K #W #i #d #_ #_ #p0 #H destruct +| #a #I #G #L #V #T #d #_ #p0 #H destruct +| #I #G #L #V #T #d #_ #p0 #H destruct +] +qed-. + +lemma da_inv_gref: ∀h,g,G,L,p,d. ⦃G, L⦄ ⊢ §p ▪[h, g] d → ⊥. +/2 width=9 by da_inv_gref_aux/ qed-. + +fact da_inv_bind_aux: ∀h,g,G,L,T,d. ⦃G, L⦄ ⊢ T ▪[h, g] d → + ∀b,J,X,Y. T = ⓑ{b,J}Y.X → ⦃G, L.ⓑ{J}Y⦄ ⊢ X ▪[h, g] d. +#h #g #G #L #T #d * -G -L -T -d +[ #G #L #k #d #_ #b #J #X #Y #H destruct +| #G #L #K #V #i #d #_ #_ #b #J #X #Y #H destruct +| #G #L #K #W #i #d #_ #_ #b #J #X #Y #H destruct +| #a #I #G #L #V #T #d #HT #b #J #X #Y #H destruct // +| #I #G #L #V #T #d #_ #b #J #X #Y #H destruct +] +qed-. + +lemma da_inv_bind: ∀h,g,b,J,G,L,Y,X,d. ⦃G, L⦄ ⊢ ⓑ{b,J}Y.X ▪[h, g] d → ⦃G, L.ⓑ{J}Y⦄ ⊢ X ▪[h, g] d. +/2 width=4 by da_inv_bind_aux/ qed-. + +fact da_inv_flat_aux: ∀h,g,G,L,T,d. ⦃G, L⦄ ⊢ T ▪[h, g] d → + ∀J,X,Y. T = ⓕ{J}Y.X → ⦃G, L⦄ ⊢ X ▪[h, g] d. +#h #g #G #L #T #d * -G -L -T -d +[ #G #L #k #d #_ #J #X #Y #H destruct +| #G #L #K #V #i #d #_ #_ #J #X #Y #H destruct +| #G #L #K #W #i #d #_ #_ #J #X #Y #H destruct +| #a #I #G #L #V #T #d #_ #J #X #Y #H destruct +| #I #G #L #V #T #d #HT #J #X #Y #H destruct // +] +qed-. + +lemma da_inv_flat: ∀h,g,J,G,L,Y,X,d. ⦃G, L⦄ ⊢ ⓕ{J}Y.X ▪[h, g] d → ⦃G, L⦄ ⊢ X ▪[h, g] d. +/2 width=5 by da_inv_flat_aux/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/da_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/da_aaa.ma new file mode 100644 index 000000000..433a57761 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/da_aaa.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/aaa_lift.ma". +include "basic_2A/static/da.ma". + +(* DEGREE ASSIGNMENT FOR TERMS **********************************************) + +(* Properties on atomic arity assignment for terms **************************) + +lemma aaa_da: ∀h,g,G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∃d. ⦃G, L⦄ ⊢ T ▪[h, g] d. +#h #g #G #L #T #A #H elim H -G -L -T -A +[ #G #L #k elim (deg_total h g k) /3 width=2 by da_sort, ex_intro/ +| * #G #L #K #V #B #i #HLK #_ * /3 width=5 by da_ldef, da_ldec, ex_intro/ +| #a #G #L #V #T #B #A #_ #_ #_ * /3 width=2 by da_bind, ex_intro/ +| #a #G #L #V #T #B #A #_ #_ #_ * /3 width=2 by da_bind, ex_intro/ +| #G #L #V #T #B #A #_ #_ #_ * /3 width=2 by da_flat, ex_intro/ +| #G #L #W #T #A #_ #_ #_ * /3 width=2 by da_flat, ex_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/da_da.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/da_da.ma new file mode 100644 index 000000000..ecef4ca6b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/da_da.ma @@ -0,0 +1,38 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/da_lift.ma". + +(* DEGREE ASSIGNMENT FOR TERMS **********************************************) + +(* Main properties **********************************************************) + +theorem da_mono: ∀h,g,G,L,T,d1. ⦃G, L⦄ ⊢ T ▪[h, g] d1 → + ∀d2. ⦃G, L⦄ ⊢ T ▪[h, g] d2 → d1 = d2. +#h #g #G #L #T #d1 #H elim H -G -L -T -d1 +[ #G #L #k #d1 #Hkd1 #d2 #H + lapply (da_inv_sort … H) -G -L #Hkd2 + >(deg_mono … Hkd2 … Hkd1) -h -k -d2 // +| #G #L #K #V #i #d1 #HLK #_ #IHV #d2 #H + elim (da_inv_lref … H) -H * #K0 #V0 [| #d0 ] #HLK0 #HV0 [| #Hd0 ] + lapply (drop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct /2 width=1 by/ +| #G #L #K #W #i #d1 #HLK #_ #IHW #d2 #H + elim (da_inv_lref … H) -H * #K0 #W0 [| #d0 ] #HLK0 #HW0 [| #Hd0 ] + lapply (drop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct /3 width=1 by eq_f/ +| #a #I #G #L #V #T #d1 #_ #IHT #d2 #H + lapply (da_inv_bind … H) -H /2 width=1 by/ +| #I #G #L #V #T #d1 #_ #IHT #d2 #H + lapply (da_inv_flat … H) -H /2 width=1 by/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/da_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/da_lift.ma new file mode 100644 index 000000000..8721ebdc3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/da_lift.ma @@ -0,0 +1,78 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop_drop.ma". +include "basic_2A/static/da.ma". + +(* DEGREE ASSIGNMENT FOR TERMS **********************************************) + +(* Properties on relocation *************************************************) + +lemma da_lift: ∀h,g,G,L1,T1,d. ⦃G, L1⦄ ⊢ T1 ▪[h, g] d → + ∀L2,s,l,m. ⬇[s, l, m] L2 ≡ L1 → ∀T2. ⬆[l, m] T1 ≡ T2 → + ⦃G, L2⦄ ⊢ T2 ▪[h, g] d. +#h #g #G #L1 #T1 #d #H elim H -G -L1 -T1 -d +[ #G #L1 #k #d #Hkd #L2 #s #l #m #_ #X #H + >(lift_inv_sort1 … H) -X /2 width=1 by da_sort/ +| #G #L1 #K1 #V1 #i #d #HLK1 #_ #IHV1 #L2 #s #l #m #HL21 #X #H + elim (lift_inv_lref1 … H) * #Hil #H destruct + [ elim (drop_trans_le … HL21 … HLK1) -L1 /2 width=2 by lt_to_le/ #X #HLK2 #H + elim (drop_inv_skip2 … H) -H /2 width=1 by lt_plus_to_minus_r/ -Hil #K2 #V2 #HK21 #HV12 #H destruct + /3 width=9 by da_ldef/ + | lapply (drop_trans_ge … HL21 … HLK1 ?) -L1 + /3 width=8 by da_ldef, drop_inv_gen/ + ] +| #G #L1 #K1 #W1 #i #d #HLK1 #_ #IHW1 #L2 #s #l #m #HL21 #X #H + elim (lift_inv_lref1 … H) * #Hil #H destruct + [ elim (drop_trans_le … HL21 … HLK1) -L1 /2 width=2 by lt_to_le/ #X #HLK2 #H + elim (drop_inv_skip2 … H) -H /2 width=1 by lt_plus_to_minus_r/ -Hil #K2 #W2 #HK21 #HW12 #H destruct + /3 width=8 by da_ldec/ + | lapply (drop_trans_ge … HL21 … HLK1 ?) -L1 + /3 width=8 by da_ldec, drop_inv_gen/ + ] +| #a #I #G #L1 #V1 #T1 #d #_ #IHT1 #L2 #s #l #m #HL21 #X #H + elim (lift_inv_bind1 … H) -H #V2 #T2 #HV12 #HU12 #H destruct + /4 width=5 by da_bind, drop_skip/ +| #I #G #L1 #V1 #T1 #d #_ #IHT1 #L2 #s #l #m #HL21 #X #H + elim (lift_inv_flat1 … H) -H #V2 #T2 #HV12 #HU12 #H destruct + /3 width=5 by da_flat/ +] +qed. + +(* Inversion lemmas on relocation *******************************************) + +lemma da_inv_lift: ∀h,g,G,L2,T2,d. ⦃G, L2⦄ ⊢ T2 ▪[h, g] d → + ∀L1,s,l,m. ⬇[s, l, m] L2 ≡ L1 → ∀T1. ⬆[l, m] T1 ≡ T2 → + ⦃G, L1⦄ ⊢ T1 ▪[h, g] d. +#h #g #G #L2 #T2 #d #H elim H -G -L2 -T2 -d +[ #G #L2 #k #d #Hkd #L1 #s #l #m #_ #X #H + >(lift_inv_sort2 … H) -X /2 width=1 by da_sort/ +| #G #L2 #K2 #V2 #i #d #HLK2 #HV2 #IHV2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_lref2 … H) * #Hil #H destruct [ -HV2 | -IHV2 ] + [ elim (drop_conf_lt … HL21 … HLK2) -L2 /3 width=8 by da_ldef/ + | lapply (drop_conf_ge … HL21 … HLK2 ?) -L2 /2 width=4 by da_ldef/ + ] +| #G #L2 #K2 #W2 #i #d #HLK2 #HW2 #IHW2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_lref2 … H) * #Hil #H destruct [ -HW2 | -IHW2 ] + [ elim (drop_conf_lt … HL21 … HLK2) -L2 /3 width=8 by da_ldec/ + | lapply (drop_conf_ge … HL21 … HLK2 ?) -L2 /2 width=4 by da_ldec/ + ] +| #a #I #G #L2 #V2 #T2 #d #_ #IHT2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_bind2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct + /4 width=5 by da_bind, drop_skip/ +| #I #G #L2 #V2 #T2 #d #_ #IHT2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_flat2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct + /3 width=5 by da_flat/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/lsuba.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/lsuba.ma new file mode 100644 index 000000000..c22a725d1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/lsuba.ma @@ -0,0 +1,144 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/lrsubeqa_3.ma". +include "basic_2A/static/lsubr.ma". +include "basic_2A/static/aaa.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR ATOMIC ARITY ASSIGNMENT *****************) + +inductive lsuba (G:genv): relation lenv ≝ +| lsuba_atom: lsuba G (⋆) (⋆) +| lsuba_pair: ∀I,L1,L2,V. lsuba G L1 L2 → lsuba G (L1.ⓑ{I}V) (L2.ⓑ{I}V) +| lsuba_beta: ∀L1,L2,W,V,A. ⦃G, L1⦄ ⊢ ⓝW.V ⁝ A → ⦃G, L2⦄ ⊢ W ⁝ A → + lsuba G L1 L2 → lsuba G (L1.ⓓⓝW.V) (L2.ⓛW) +. + +interpretation + "local environment refinement (atomic arity assignment)" + 'LRSubEqA G L1 L2 = (lsuba G L1 L2). + +(* Basic inversion lemmas ***************************************************) + +fact lsuba_inv_atom1_aux: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → L1 = ⋆ → L2 = ⋆. +#G #L1 #L2 * -L1 -L2 +[ // +| #I #L1 #L2 #V #_ #H destruct +| #L1 #L2 #W #V #A #_ #_ #_ #H destruct +] +qed-. + +lemma lsuba_inv_atom1: ∀G,L2. G ⊢ ⋆ ⫃⁝ L2 → L2 = ⋆. +/2 width=4 by lsuba_inv_atom1_aux/ qed-. + +fact lsuba_inv_pair1_aux: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → ∀I,K1,X. L1 = K1.ⓑ{I}X → + (∃∃K2. G ⊢ K1 ⫃⁝ K2 & L2 = K2.ⓑ{I}X) ∨ + ∃∃K2,W,V,A. ⦃G, K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G, K2⦄ ⊢ W ⁝ A & + G ⊢ K1 ⫃⁝ K2 & I = Abbr & L2 = K2.ⓛW & X = ⓝW.V. +#G #L1 #L2 * -L1 -L2 +[ #J #K1 #X #H destruct +| #I #L1 #L2 #V #HL12 #J #K1 #X #H destruct /3 width=3 by ex2_intro, or_introl/ +| #L1 #L2 #W #V #A #HV #HW #HL12 #J #K1 #X #H destruct /3 width=9 by or_intror, ex6_4_intro/ +] +qed-. + +lemma lsuba_inv_pair1: ∀I,G,K1,L2,X. G ⊢ K1.ⓑ{I}X ⫃⁝ L2 → + (∃∃K2. G ⊢ K1 ⫃⁝ K2 & L2 = K2.ⓑ{I}X) ∨ + ∃∃K2,W,V,A. ⦃G, K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G, K2⦄ ⊢ W ⁝ A & G ⊢ K1 ⫃⁝ K2 & + I = Abbr & L2 = K2.ⓛW & X = ⓝW.V. +/2 width=3 by lsuba_inv_pair1_aux/ qed-. + +fact lsuba_inv_atom2_aux: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → L2 = ⋆ → L1 = ⋆. +#G #L1 #L2 * -L1 -L2 +[ // +| #I #L1 #L2 #V #_ #H destruct +| #L1 #L2 #W #V #A #_ #_ #_ #H destruct +] +qed-. + +lemma lsubc_inv_atom2: ∀G,L1. G ⊢ L1 ⫃⁝ ⋆ → L1 = ⋆. +/2 width=4 by lsuba_inv_atom2_aux/ qed-. + +fact lsuba_inv_pair2_aux: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → ∀I,K2,W. L2 = K2.ⓑ{I}W → + (∃∃K1. G ⊢ K1 ⫃⁝ K2 & L1 = K1.ⓑ{I}W) ∨ + ∃∃K1,V,A. ⦃G, K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G, K2⦄ ⊢ W ⁝ A & + G ⊢ K1 ⫃⁝ K2 & I = Abst & L1 = K1.ⓓⓝW.V. +#G #L1 #L2 * -L1 -L2 +[ #J #K2 #U #H destruct +| #I #L1 #L2 #V #HL12 #J #K2 #U #H destruct /3 width=3 by ex2_intro, or_introl/ +| #L1 #L2 #W #V #A #HV #HW #HL12 #J #K2 #U #H destruct /3 width=7 by or_intror, ex5_3_intro/ +] +qed-. + +lemma lsuba_inv_pair2: ∀I,G,L1,K2,W. G ⊢ L1 ⫃⁝ K2.ⓑ{I}W → + (∃∃K1. G ⊢ K1 ⫃⁝ K2 & L1 = K1.ⓑ{I}W) ∨ + ∃∃K1,V,A. ⦃G, K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G, K2⦄ ⊢ W ⁝ A & G ⊢ K1 ⫃⁝ K2 & + I = Abst & L1 = K1.ⓓⓝW.V. +/2 width=3 by lsuba_inv_pair2_aux/ qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lsuba_fwd_lsubr: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → L1 ⫃ L2. +#G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsubr_pair, lsubr_beta/ +qed-. + +(* Basic properties *********************************************************) + +lemma lsuba_refl: ∀G,L. G ⊢ L ⫃⁝ L. +#G #L elim L -L /2 width=1 by lsuba_atom, lsuba_pair/ +qed. + +(* Note: the constant 0 cannot be generalized *) +lemma lsuba_drop_O1_conf: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → ∀K1,s,m. ⬇[s, 0, m] L1 ≡ K1 → + ∃∃K2. G ⊢ K1 ⫃⁝ K2 & ⬇[s, 0, m] L2 ≡ K2. +#G #L1 #L2 #H elim H -L1 -L2 +[ /2 width=3 by ex2_intro/ +| #I #L1 #L2 #V #_ #IHL12 #K1 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK1 + [ destruct + elim (IHL12 L1 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsuba_pair, drop_pair, ex2_intro/ + | elim (IHL12 … HLK1) -L1 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +| #L1 #L2 #W #V #A #HV #HW #_ #IHL12 #K1 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK1 + [ destruct + elim (IHL12 L1 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsuba_beta, drop_pair, ex2_intro/ + | elim (IHL12 … HLK1) -L1 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +] +qed-. + +(* Note: the constant 0 cannot be generalized *) +lemma lsuba_drop_O1_trans: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → ∀K2,s,m. ⬇[s, 0, m] L2 ≡ K2 → + ∃∃K1. G ⊢ K1 ⫃⁝ K2 & ⬇[s, 0, m] L1 ≡ K1. +#G #L1 #L2 #H elim H -L1 -L2 +[ /2 width=3 by ex2_intro/ +| #I #L1 #L2 #V #_ #IHL12 #K2 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK2 + [ destruct + elim (IHL12 L2 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsuba_pair, drop_pair, ex2_intro/ + | elim (IHL12 … HLK2) -L2 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +| #L1 #L2 #W #V #A #HV #HW #_ #IHL12 #K2 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK2 + [ destruct + elim (IHL12 L2 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsuba_beta, drop_pair, ex2_intro/ + | elim (IHL12 … HLK2) -L2 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/lsuba_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/lsuba_aaa.ma new file mode 100644 index 000000000..3a5cd5df5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/lsuba_aaa.ma @@ -0,0 +1,56 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/aaa_aaa.ma". +include "basic_2A/static/lsuba.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR ATOMIC ARITY ASSIGNMENT *****************) + +(* Properties concerning atomic arity assignment ****************************) + +lemma lsuba_aaa_conf: ∀G,L1,V,A. ⦃G, L1⦄ ⊢ V ⁝ A → + ∀L2. G ⊢ L1 ⫃⁝ L2 → ⦃G, L2⦄ ⊢ V ⁝ A. +#G #L1 #V #A #H elim H -G -L1 -V -A +[ // +| #I #G #L1 #K1 #V #A #i #HLK1 #HV #IHV #L2 #HL12 + elim (lsuba_drop_O1_conf … HL12 … HLK1) -L1 #X #H #HLK2 + elim (lsuba_inv_pair1 … H) -H * #K2 + [ #HK12 #H destruct /3 width=5 by aaa_lref/ + | #W0 #V0 #A0 #HV0 #HW0 #_ #H1 #H2 #H3 destruct + lapply (aaa_mono … HV0 … HV) #H destruct -V0 /2 width=5 by aaa_lref/ + ] +| /4 width=2 by lsuba_pair, aaa_abbr/ +| /4 width=1 by lsuba_pair, aaa_abst/ +| /3 width=3 by aaa_appl/ +| /3 width=1 by aaa_cast/ +] +qed-. + +lemma lsuba_aaa_trans: ∀G,L2,V,A. ⦃G, L2⦄ ⊢ V ⁝ A → + ∀L1. G ⊢ L1 ⫃⁝ L2 → ⦃G, L1⦄ ⊢ V ⁝ A. +#G #L2 #V #A #H elim H -G -L2 -V -A +[ // +| #I #G #L2 #K2 #V #A #i #HLK2 #H1V #IHV #L1 #HL12 + elim (lsuba_drop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1 + elim (lsuba_inv_pair2 … H) -H * #K1 + [ #HK12 #H destruct /3 width=5 by aaa_lref/ + | #V0 #A0 #HV0 #H2V #_ #H1 #H2 destruct + lapply (aaa_mono … H2V … H1V) #H destruct -K2 /2 width=5 by aaa_lref/ + ] +| /4 width=2 by lsuba_pair, aaa_abbr/ +| /4 width=1 by lsuba_pair, aaa_abst/ +| /3 width=3 by aaa_appl/ +| /3 width=1 by aaa_cast/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/lsuba_lsuba.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/lsuba_lsuba.ma new file mode 100644 index 000000000..40384ad74 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/lsuba_lsuba.ma @@ -0,0 +1,36 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/lsuba_aaa.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR ATOMIC ARITY ASSIGNMENT *****************) + +(* Main properties **********************************************************) + +theorem lsuba_trans: ∀G,L1,L. G ⊢ L1 ⫃⁝ L → ∀L2. G ⊢ L ⫃⁝ L2 → G ⊢ L1 ⫃⁝ L2. +#G #L1 #L #H elim H -L1 -L +[ #X #H >(lsuba_inv_atom1 … H) -H // +| #I #L1 #L #Y #HL1 #IHL1 #X #H + elim (lsuba_inv_pair1 … H) -H * #L2 + [ #HL2 #H destruct /3 width=1 by lsuba_pair/ + | #W #V #A #HV #HW #HL2 #H1 #H2 #H3 destruct + /3 width=3 by lsuba_beta, lsuba_aaa_trans/ + ] +| #L1 #L #W #V #A #HV #HW #HL1 #IHL1 #X #H + elim (lsuba_inv_pair1 … H) -H * #L2 + [ #HL2 #H destruct /3 width=5 by lsuba_beta, lsuba_aaa_conf/ + | #W0 #V0 #A0 #_ #_ #_ #H destruct + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/lsubd.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/lsubd.ma new file mode 100644 index 000000000..e3d01c289 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/lsubd.ma @@ -0,0 +1,151 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/lrsubeqd_5.ma". +include "basic_2A/static/lsubr.ma". +include "basic_2A/static/da.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR DEGREE ASSIGNMENT ***********************) + +inductive lsubd (h) (g) (G): relation lenv ≝ +| lsubd_atom: lsubd h g G (⋆) (⋆) +| lsubd_pair: ∀I,L1,L2,V. lsubd h g G L1 L2 → + lsubd h g G (L1.ⓑ{I}V) (L2.ⓑ{I}V) +| lsubd_beta: ∀L1,L2,W,V,d. ⦃G, L1⦄ ⊢ V ▪[h, g] d+1 → ⦃G, L2⦄ ⊢ W ▪[h, g] d → + lsubd h g G L1 L2 → lsubd h g G (L1.ⓓⓝW.V) (L2.ⓛW) +. + +interpretation + "local environment refinement (degree assignment)" + 'LRSubEqD h g G L1 L2 = (lsubd h g G L1 L2). + +(* Basic forward lemmas *****************************************************) + +lemma lsubd_fwd_lsubr: ∀h,g,G,L1,L2. G ⊢ L1 ⫃▪[h, g] L2 → L1 ⫃ L2. +#h #g #G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsubr_pair, lsubr_beta/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact lsubd_inv_atom1_aux: ∀h,g,G,L1,L2. G ⊢ L1 ⫃▪[h, g] L2 → L1 = ⋆ → L2 = ⋆. +#h #g #G #L1 #L2 * -L1 -L2 +[ // +| #I #L1 #L2 #V #_ #H destruct +| #L1 #L2 #W #V #d #_ #_ #_ #H destruct +] +qed-. + +lemma lsubd_inv_atom1: ∀h,g,G,L2. G ⊢ ⋆ ⫃▪[h, g] L2 → L2 = ⋆. +/2 width=6 by lsubd_inv_atom1_aux/ qed-. + +fact lsubd_inv_pair1_aux: ∀h,g,G,L1,L2. G ⊢ L1 ⫃▪[h, g] L2 → + ∀I,K1,X. L1 = K1.ⓑ{I}X → + (∃∃K2. G ⊢ K1 ⫃▪[h, g] K2 & L2 = K2.ⓑ{I}X) ∨ + ∃∃K2,W,V,d. ⦃G, K1⦄ ⊢ V ▪[h, g] d+1 & ⦃G, K2⦄ ⊢ W ▪[h, g] d & + G ⊢ K1 ⫃▪[h, g] K2 & + I = Abbr & L2 = K2.ⓛW & X = ⓝW.V. +#h #g #G #L1 #L2 * -L1 -L2 +[ #J #K1 #X #H destruct +| #I #L1 #L2 #V #HL12 #J #K1 #X #H destruct /3 width=3 by ex2_intro, or_introl/ +| #L1 #L2 #W #V #d #HV #HW #HL12 #J #K1 #X #H destruct /3 width=9 by ex6_4_intro, or_intror/ +] +qed-. + +lemma lsubd_inv_pair1: ∀h,g,I,G,K1,L2,X. G ⊢ K1.ⓑ{I}X ⫃▪[h, g] L2 → + (∃∃K2. G ⊢ K1 ⫃▪[h, g] K2 & L2 = K2.ⓑ{I}X) ∨ + ∃∃K2,W,V,d. ⦃G, K1⦄ ⊢ V ▪[h, g] d+1 & ⦃G, K2⦄ ⊢ W ▪[h, g] d & + G ⊢ K1 ⫃▪[h, g] K2 & + I = Abbr & L2 = K2.ⓛW & X = ⓝW.V. +/2 width=3 by lsubd_inv_pair1_aux/ qed-. + +fact lsubd_inv_atom2_aux: ∀h,g,G,L1,L2. G ⊢ L1 ⫃▪[h, g] L2 → L2 = ⋆ → L1 = ⋆. +#h #g #G #L1 #L2 * -L1 -L2 +[ // +| #I #L1 #L2 #V #_ #H destruct +| #L1 #L2 #W #V #d #_ #_ #_ #H destruct +] +qed-. + +lemma lsubd_inv_atom2: ∀h,g,G,L1. G ⊢ L1 ⫃▪[h, g] ⋆ → L1 = ⋆. +/2 width=6 by lsubd_inv_atom2_aux/ qed-. + +fact lsubd_inv_pair2_aux: ∀h,g,G,L1,L2. G ⊢ L1 ⫃▪[h, g] L2 → + ∀I,K2,W. L2 = K2.ⓑ{I}W → + (∃∃K1. G ⊢ K1 ⫃▪[h, g] K2 & L1 = K1.ⓑ{I}W) ∨ + ∃∃K1,V,d. ⦃G, K1⦄ ⊢ V ▪[h, g] d+1 & ⦃G, K2⦄ ⊢ W ▪[h, g] d & + G ⊢ K1 ⫃▪[h, g] K2 & I = Abst & L1 = K1. ⓓⓝW.V. +#h #g #G #L1 #L2 * -L1 -L2 +[ #J #K2 #U #H destruct +| #I #L1 #L2 #V #HL12 #J #K2 #U #H destruct /3 width=3 by ex2_intro, or_introl/ +| #L1 #L2 #W #V #d #HV #HW #HL12 #J #K2 #U #H destruct /3 width=7 by ex5_3_intro, or_intror/ +] +qed-. + +lemma lsubd_inv_pair2: ∀h,g,I,G,L1,K2,W. G ⊢ L1 ⫃▪[h, g] K2.ⓑ{I}W → + (∃∃K1. G ⊢ K1 ⫃▪[h, g] K2 & L1 = K1.ⓑ{I}W) ∨ + ∃∃K1,V,d. ⦃G, K1⦄ ⊢ V ▪[h, g] d+1 & ⦃G, K2⦄ ⊢ W ▪[h, g] d & + G ⊢ K1 ⫃▪[h, g] K2 & I = Abst & L1 = K1. ⓓⓝW.V. +/2 width=3 by lsubd_inv_pair2_aux/ qed-. + +(* Basic properties *********************************************************) + +lemma lsubd_refl: ∀h,g,G,L. G ⊢ L ⫃▪[h, g] L. +#h #g #G #L elim L -L /2 width=1 by lsubd_pair/ +qed. + +(* Note: the constant 0 cannot be generalized *) +lemma lsubd_drop_O1_conf: ∀h,g,G,L1,L2. G ⊢ L1 ⫃▪[h, g] L2 → + ∀K1,s,m. ⬇[s, 0, m] L1 ≡ K1 → + ∃∃K2. G ⊢ K1 ⫃▪[h, g] K2 & ⬇[s, 0, m] L2 ≡ K2. +#h #g #G #L1 #L2 #H elim H -L1 -L2 +[ /2 width=3 by ex2_intro/ +| #I #L1 #L2 #V #_ #IHL12 #K1 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK1 + [ destruct + elim (IHL12 L1 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsubd_pair, drop_pair, ex2_intro/ + | elim (IHL12 … HLK1) -L1 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +| #L1 #L2 #W #V #d #HV #HW #_ #IHL12 #K1 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK1 + [ destruct + elim (IHL12 L1 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsubd_beta, drop_pair, ex2_intro/ + | elim (IHL12 … HLK1) -L1 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +] +qed-. + +(* Note: the constant 0 cannot be generalized *) +lemma lsubd_drop_O1_trans: ∀h,g,G,L1,L2. G ⊢ L1 ⫃▪[h, g] L2 → + ∀K2,s,m. ⬇[s, 0, m] L2 ≡ K2 → + ∃∃K1. G ⊢ K1 ⫃▪[h, g] K2 & ⬇[s, 0, m] L1 ≡ K1. +#h #g #G #L1 #L2 #H elim H -L1 -L2 +[ /2 width=3 by ex2_intro/ +| #I #L1 #L2 #V #_ #IHL12 #K2 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK2 + [ destruct + elim (IHL12 L2 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsubd_pair, drop_pair, ex2_intro/ + | elim (IHL12 … HLK2) -L2 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +| #L1 #L2 #W #V #d #HV #HW #_ #IHL12 #K2 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK2 + [ destruct + elim (IHL12 L2 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsubd_beta, drop_pair, ex2_intro/ + | elim (IHL12 … HLK2) -L2 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/lsubd_da.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/lsubd_da.ma new file mode 100644 index 000000000..45d35516e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/lsubd_da.ma @@ -0,0 +1,65 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/da_da.ma". +include "basic_2A/static/lsubd.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR DEGREE ASSIGNMENT ***********************) + +(* Properties on degree assignment ******************************************) + +lemma lsubd_da_trans: ∀h,g,G,L2,T,d. ⦃G, L2⦄ ⊢ T ▪[h, g] d → + ∀L1. G ⊢ L1 ⫃▪[h, g] L2 → ⦃G, L1⦄ ⊢ T ▪[h, g] d. +#h #g #G #L2 #T #d #H elim H -G -L2 -T -d +[ /2 width=1 by da_sort/ +| #G #L2 #K2 #V #i #d #HLK2 #_ #IHV #L1 #HL12 + elim (lsubd_drop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1 + elim (lsubd_inv_pair2 … H) -H * #K1 [ | -IHV -HLK1 ] + [ #HK12 #H destruct /3 width=4 by da_ldef/ + | #W #d0 #_ #_ #_ #H destruct + ] +| #G #L2 #K2 #W #i #d #HLK2 #HW #IHW #L1 #HL12 + elim (lsubd_drop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1 + elim (lsubd_inv_pair2 … H) -H * #K1 [ -HW | -IHW ] + [ #HK12 #H destruct /3 width=4 by da_ldec/ + | #V #d0 #HV #H0W #_ #_ #H destruct + lapply (da_mono … H0W … HW) -H0W -HW #H destruct /3 width=7 by da_ldef, da_flat/ + ] +| /4 width=1 by lsubd_pair, da_bind/ +| /3 width=1 by da_flat/ +] +qed-. + +lemma lsubd_da_conf: ∀h,g,G,L1,T,d. ⦃G, L1⦄ ⊢ T ▪[h, g] d → + ∀L2. G ⊢ L1 ⫃▪[h, g] L2 → ⦃G, L2⦄ ⊢ T ▪[h, g] d. +#h #g #G #L1 #T #d #H elim H -G -L1 -T -d +[ /2 width=1 by da_sort/ +| #G #L1 #K1 #V #i #d #HLK1 #HV #IHV #L2 #HL12 + elim (lsubd_drop_O1_conf … HL12 … HLK1) -L1 #X #H #HLK2 + elim (lsubd_inv_pair1 … H) -H * #K2 [ -HV | -IHV ] + [ #HK12 #H destruct /3 width=4 by da_ldef/ + | #W0 #V0 #d0 #HV0 #HW0 #_ #_ #H1 #H2 destruct + lapply (da_inv_flat … HV) -HV #H0V0 + lapply (da_mono … H0V0 … HV0) -H0V0 -HV0 #H destruct /2 width=4 by da_ldec/ + ] +| #G #L1 #K1 #W #i #d #HLK1 #HW #IHW #L2 #HL12 + elim (lsubd_drop_O1_conf … HL12 … HLK1) -L1 #X #H #HLK2 + elim (lsubd_inv_pair1 … H) -H * #K2 [ -HW | -IHW ] + [ #HK12 #H destruct /3 width=4 by da_ldec/ + | #W0 #V0 #d0 #HV0 #HW0 #_ #H destruct + ] +| /4 width=1 by lsubd_pair, da_bind/ +| /3 width=1 by da_flat/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/lsubd_lsubd.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/lsubd_lsubd.ma new file mode 100644 index 000000000..6ff3a9fe9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/lsubd_lsubd.ma @@ -0,0 +1,36 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/lsubd_da.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR DEGREE ASSIGNMENT ***********************) + +(* Main properties **********************************************************) + +theorem lsubd_trans: ∀h,g,G. Transitive … (lsubd h g G). +#h #g #G #L1 #L #H elim H -L1 -L +[ #X #H >(lsubd_inv_atom1 … H) -H // +| #I #L1 #L #Y #HL1 #IHL1 #X #H + elim (lsubd_inv_pair1 … H) -H * #L2 + [ #HL2 #H destruct /3 width=1 by lsubd_pair/ + | #W #V #d #HV #HW #HL2 #H1 #H2 #H3 destruct + /3 width=3 by lsubd_beta, lsubd_da_trans/ + ] +| #L1 #L #W #V #d #HV #HW #HL1 #IHL1 #X #H + elim (lsubd_inv_pair1 … H) -H * #L2 + [ #HL2 #H destruct /3 width=5 by lsubd_beta, lsubd_da_conf/ + | #W0 #V0 #d0 #_ #_ #_ #H destruct + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/lsubr.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/lsubr.ma new file mode 100644 index 000000000..e176dd90c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/lsubr.ma @@ -0,0 +1,107 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/lrsubeqc_2.ma". +include "basic_2A/substitution/drop.ma". + +(* RESTRICTED LOCAL ENVIRONMENT REFINEMENT **********************************) + +inductive lsubr: relation lenv ≝ +| lsubr_atom: ∀L. lsubr L (⋆) +| lsubr_pair: ∀I,L1,L2,V. lsubr L1 L2 → lsubr (L1.ⓑ{I}V) (L2.ⓑ{I}V) +| lsubr_beta: ∀L1,L2,V,W. lsubr L1 L2 → lsubr (L1.ⓓⓝW.V) (L2.ⓛW) +. + +interpretation + "local environment refinement (restricted)" + 'LRSubEqC L1 L2 = (lsubr L1 L2). + +(* Basic properties *********************************************************) + +lemma lsubr_refl: ∀L. L ⫃ L. +#L elim L -L /2 width=1 by lsubr_atom, lsubr_pair/ +qed. + +(* Basic inversion lemmas ***************************************************) + +fact lsubr_inv_atom1_aux: ∀L1,L2. L1 ⫃ L2 → L1 = ⋆ → L2 = ⋆. +#L1 #L2 * -L1 -L2 // +[ #I #L1 #L2 #V #_ #H destruct +| #L1 #L2 #V #W #_ #H destruct +] +qed-. + +lemma lsubr_inv_atom1: ∀L2. ⋆ ⫃ L2 → L2 = ⋆. +/2 width=3 by lsubr_inv_atom1_aux/ qed-. + +fact lsubr_inv_abst1_aux: ∀L1,L2. L1 ⫃ L2 → ∀K1,W. L1 = K1.ⓛW → + L2 = ⋆ ∨ ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓛW. +#L1 #L2 * -L1 -L2 +[ #L #K1 #W #H destruct /2 width=1 by or_introl/ +| #I #L1 #L2 #V #HL12 #K1 #W #H destruct /3 width=3 by ex2_intro, or_intror/ +| #L1 #L2 #V1 #V2 #_ #K1 #W #H destruct +] +qed-. + +lemma lsubr_inv_abst1: ∀K1,L2,W. K1.ⓛW ⫃ L2 → + L2 = ⋆ ∨ ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓛW. +/2 width=3 by lsubr_inv_abst1_aux/ qed-. + +fact lsubr_inv_abbr2_aux: ∀L1,L2. L1 ⫃ L2 → ∀K2,W. L2 = K2.ⓓW → + ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓓW. +#L1 #L2 * -L1 -L2 +[ #L #K2 #W #H destruct +| #I #L1 #L2 #V #HL12 #K2 #W #H destruct /2 width=3 by ex2_intro/ +| #L1 #L2 #V1 #V2 #_ #K2 #W #H destruct +] +qed-. + +lemma lsubr_inv_abbr2: ∀L1,K2,W. L1 ⫃ K2.ⓓW → + ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓓW. +/2 width=3 by lsubr_inv_abbr2_aux/ qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lsubr_fwd_length: ∀L1,L2. L1 ⫃ L2 → |L2| ≤ |L1|. +#L1 #L2 #H elim H -L1 -L2 /2 width=1 by monotonic_le_plus_l/ +qed-. + +lemma lsubr_fwd_drop2_pair: ∀L1,L2. L1 ⫃ L2 → + ∀I,K2,W,s,i. ⬇[s, 0, i] L2 ≡ K2.ⓑ{I}W → + (∃∃K1. K1 ⫃ K2 & ⬇[s, 0, i] L1 ≡ K1.ⓑ{I}W) ∨ + ∃∃K1,V. K1 ⫃ K2 & ⬇[s, 0, i] L1 ≡ K1.ⓓⓝW.V & I = Abst. +#L1 #L2 #H elim H -L1 -L2 +[ #L #I #K2 #W #s #i #H + elim (drop_inv_atom1 … H) -H #H destruct +| #J #L1 #L2 #V #HL12 #IHL12 #I #K2 #W #s #i #H + elim (drop_inv_O1_pair1 … H) -H * #Hi #HLK2 destruct [ -IHL12 | -HL12 ] + [ /3 width=3 by drop_pair, ex2_intro, or_introl/ + | elim (IHL12 … HLK2) -IHL12 -HLK2 * + /4 width=4 by drop_drop_lt, ex3_2_intro, ex2_intro, or_introl, or_intror/ + ] +| #L1 #L2 #V1 #V2 #HL12 #IHL12 #I #K2 #W #s #i #H + elim (drop_inv_O1_pair1 … H) -H * #Hi #HLK2 destruct [ -IHL12 | -HL12 ] + [ /3 width=4 by drop_pair, ex3_2_intro, or_intror/ + | elim (IHL12 … HLK2) -IHL12 -HLK2 * + /4 width=4 by drop_drop_lt, ex3_2_intro, ex2_intro, or_introl, or_intror/ + ] +] +qed-. + +lemma lsubr_fwd_drop2_abbr: ∀L1,L2. L1 ⫃ L2 → + ∀K2,V,s,i. ⬇[s, 0, i] L2 ≡ K2.ⓓV → + ∃∃K1. K1 ⫃ K2 & ⬇[s, 0, i] L1 ≡ K1.ⓓV. +#L1 #L2 #HL12 #K2 #V #s #i #HLK2 elim (lsubr_fwd_drop2_pair … HL12 … HLK2) -L2 // * +#K1 #W #_ #_ #H destruct +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/lsubr_lsubr.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/lsubr_lsubr.ma new file mode 100644 index 000000000..fbc688aa0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/lsubr_lsubr.ma @@ -0,0 +1,53 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/lsubr.ma". + +(* RESTRICTED LOCAL ENVIRONMENT REFINEMENT **********************************) + +(* Auxiliary inversion lemmas ***********************************************) + +fact lsubr_inv_pair1_aux: ∀L1,L2. L1 ⫃ L2 → ∀I,K1,X. L1 = K1.ⓑ{I}X → + ∨∨ L2 = ⋆ + | ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓑ{I}X + | ∃∃K2,V,W. K1 ⫃ K2 & L2 = K2.ⓛW & + I = Abbr & X = ⓝW.V. +#L1 #L2 * -L1 -L2 +[ #L #J #K1 #X #H destruct /2 width=1 by or3_intro0/ +| #I #L1 #L2 #V #HL12 #J #K1 #X #H destruct /3 width=3 by or3_intro1, ex2_intro/ +| #L1 #L2 #V #W #HL12 #J #K1 #X #H destruct /3 width=6 by or3_intro2, ex4_3_intro/ +] +qed-. + +lemma lsubr_inv_pair1: ∀I,K1,L2,X. K1.ⓑ{I}X ⫃ L2 → + ∨∨ L2 = ⋆ + | ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓑ{I}X + | ∃∃K2,V,W. K1 ⫃ K2 & L2 = K2.ⓛW & + I = Abbr & X = ⓝW.V. +/2 width=3 by lsubr_inv_pair1_aux/ qed-. + +(* Main properties **********************************************************) + +theorem lsubr_trans: Transitive … lsubr. +#L1 #L #H elim H -L1 -L +[ #L1 #X #H + lapply (lsubr_inv_atom1 … H) -H // +| #I #L1 #L #V #_ #IHL1 #X #H + elim (lsubr_inv_pair1 … H) -H // * + #L2 [2: #V2 #W2 ] #HL2 #H1 [ #H2 #H3 ] destruct /3 width=1 by lsubr_pair, lsubr_beta/ +| #L1 #L #V1 #W #_ #IHL1 #X #H + elim (lsubr_inv_abst1 … H) -H // * + #L2 #HL2 #H destruct /3 width=1 by lsubr_beta/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/sd.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/sd.ma new file mode 100644 index 000000000..7b0947d02 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/sd.ma @@ -0,0 +1,131 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/sh.ma". + +(* SORT DEGREE **************************************************************) + +(* sort degree specification *) +record sd (h:sh): Type[0] ≝ { + deg : relation nat; (* degree of the sort *) + deg_total: ∀k. ∃d. deg k d; (* functional relation axioms *) + deg_mono : ∀k,d1,d2. deg k d1 → deg k d2 → d1 = d2; + deg_next : ∀k,d. deg k d → deg (next h k) (d - 1) (* compatibility condition *) +}. + +(* Notable specifications ***************************************************) + +definition deg_O: relation nat ≝ λk,d. d = 0. + +definition sd_O: ∀h. sd h ≝ λh. mk_sd h deg_O …. +/2 width=2 by le_n_O_to_eq, le_n, ex_intro/ defined. + +inductive deg_SO (h:sh) (k:nat) (k0:nat): predicate nat ≝ +| deg_SO_pos : ∀d0. (next h)^d0 k0 = k → deg_SO h k k0 (d0 + 1) +| deg_SO_zero: ((∃d0. (next h)^d0 k0 = k) → ⊥) → deg_SO h k k0 0 +. + +fact deg_SO_inv_pos_aux: ∀h,k,k0,d0. deg_SO h k k0 d0 → ∀d. d0 = d + 1 → + (next h)^d k0 = k. +#h #k #k0 #d0 * -d0 +[ #d0 #Hd0 #d #H + lapply (injective_plus_l … H) -H #H destruct // +| #_ #d0 H -H #H + lapply (transitive_lt … H HK12) -k1 #H1 + lapply (nexts_le h k2 d) #H2 + lapply (le_to_lt_to_lt … H2 H1) -h -d #H + elim (lt_refl_false … H) +] +qed. + +definition sd_SO: ∀h. nat → sd h ≝ λh,k. mk_sd h (deg_SO h k) …. +[ #k0 + lapply (nexts_dec h k0 k) * + [ * /3 width=2 by deg_SO_pos, ex_intro/ | /4 width=2 by deg_SO_zero, ex_intro/ ] +| #K0 #d1 #d2 * [ #d01 ] #H1 * [1,3: #d02 ] #H2 // + [ < H2 in H1; -H2 #H + lapply (nexts_inj … H) -H #H destruct // + | elim H1 /2 width=2 by ex_intro/ + | elim H2 /2 width=2 by ex_intro/ + ] +| #k0 #d0 * + [ #d #H destruct elim d -d normalize + /2 width=1 by deg_SO_gt, deg_SO_pos, next_lt/ + | #H1 @deg_SO_zero * #d #H2 destruct + @H1 -H1 @(ex_intro … (S d)) /2 width=1 by sym_eq/ (**) (* explicit constructor *) + ] +] +defined. + +let rec sd_d (h:sh) (k:nat) (d:nat) on d : sd h ≝ + match d with + [ O ⇒ sd_O h + | S d ⇒ match d with + [ O ⇒ sd_SO h k + | _ ⇒ sd_d h (next h k) d + ] + ]. + +(* Basic inversion lemmas ***************************************************) + +lemma deg_inv_pred: ∀h,g,k,d. deg h g (next h k) (d+1) → deg h g k (d+2). +#h #g #k #d #H1 +elim (deg_total h g k) #d0 #H0 +lapply (deg_next … H0) #H2 +lapply (deg_mono … H1 H2) -H1 -H2 #H +<(associative_plus d 1 1) >H iter_SO #H +lapply (deg_inv_pred … H) -H <(associative_plus d0 1 1) #H +lapply (IHd … H) -IHd -H // +qed-. + +(* Basic properties *********************************************************) + +lemma deg_iter: ∀h,g,k,d1,d2. deg h g k d1 → deg h g ((next h)^d2 k) (d1-d2). +#h #g #k #d1 #d2 @(nat_ind_plus … d2) -d2 [ iter_SO iter_SO +lapply (nexts_le h k d) #H +@(le_to_lt_to_lt … H) // +qed. + +axiom nexts_dec: ∀h,k1,k2. Decidable (∃d. (next h)^d k1 = k2). + +axiom nexts_inj: ∀h,k,d1,d2. (next h)^d1 k = (next h)^d2 k → d1 = d2. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy.ma new file mode 100644 index 000000000..4961f8541 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy.ma @@ -0,0 +1,296 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_max.ma". +include "basic_2A/notation/relations/psubst_6.ma". +include "basic_2A/grammar/genv.ma". +include "basic_2A/substitution/lsuby.ma". + +(* CONTEXT-SENSITIVE EXTENDED ORDINARY SUBSTITUTION FOR TERMS ***************) + +(* activate genv *) +inductive cpy: ynat → ynat → relation4 genv lenv term term ≝ +| cpy_atom : ∀I,G,L,l,m. cpy l m G L (⓪{I}) (⓪{I}) +| cpy_subst: ∀I,G,L,K,V,W,i,l,m. l ≤ yinj i → i < l+m → + ⬇[i] L ≡ K.ⓑ{I}V → ⬆[0, i+1] V ≡ W → cpy l m G L (#i) W +| cpy_bind : ∀a,I,G,L,V1,V2,T1,T2,l,m. + cpy l m G L V1 V2 → cpy (⫯l) m G (L.ⓑ{I}V1) T1 T2 → + cpy l m G L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2) +| cpy_flat : ∀I,G,L,V1,V2,T1,T2,l,m. + cpy l m G L V1 V2 → cpy l m G L T1 T2 → + cpy l m G L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2) +. + +interpretation "context-sensitive extended ordinary substritution (term)" + 'PSubst G L T1 l m T2 = (cpy l m G L T1 T2). + +(* Basic properties *********************************************************) + +lemma lsuby_cpy_trans: ∀G,l,m. lsub_trans … (cpy l m G) (lsuby l m). +#G #l #m #L1 #T1 #T2 #H elim H -G -L1 -T1 -T2 -l -m +[ // +| #I #G #L1 #K1 #V #W #i #l #m #Hli #Hilm #HLK1 #HVW #L2 #HL12 + elim (lsuby_drop_trans_be … HL12 … HLK1) -HL12 -HLK1 /2 width=5 by cpy_subst/ +| /4 width=1 by lsuby_succ, cpy_bind/ +| /3 width=1 by cpy_flat/ +] +qed-. + +lemma cpy_refl: ∀G,T,L,l,m. ⦃G, L⦄ ⊢ T ▶[l, m] T. +#G #T elim T -T // * /2 width=1 by cpy_bind, cpy_flat/ +qed. + +(* Basic_1: was: subst1_ex *) +lemma cpy_full: ∀I,G,K,V,T1,L,l. ⬇[l] L ≡ K.ⓑ{I}V → + ∃∃T2,T. ⦃G, L⦄ ⊢ T1 ▶[l, 1] T2 & ⬆[l, 1] T ≡ T2. +#I #G #K #V #T1 elim T1 -T1 +[ * #i #L #l #HLK + /2 width=4 by lift_sort, lift_gref, ex2_2_intro/ + elim (lt_or_eq_or_gt i l) #Hil + /3 width=4 by lift_lref_ge_minus, lift_lref_lt, ex2_2_intro/ + destruct + elim (lift_total V 0 (i+1)) #W #HVW + elim (lift_split … HVW i i) + /4 width=5 by cpy_subst, ylt_inj, ex2_2_intro/ +| * [ #a ] #J #W1 #U1 #IHW1 #IHU1 #L #l #HLK + elim (IHW1 … HLK) -IHW1 #W2 #W #HW12 #HW2 + [ elim (IHU1 (L.ⓑ{J}W1) (l+1)) -IHU1 + /3 width=9 by cpy_bind, drop_drop, lift_bind, ex2_2_intro/ + | elim (IHU1 … HLK) -IHU1 -HLK + /3 width=8 by cpy_flat, lift_flat, ex2_2_intro/ + ] +] +qed-. + +lemma cpy_weak: ∀G,L,T1,T2,l1,m1. ⦃G, L⦄ ⊢ T1 ▶[l1, m1] T2 → + ∀l2,m2. l2 ≤ l1 → l1 + m1 ≤ l2 + m2 → + ⦃G, L⦄ ⊢ T1 ▶[l2, m2] T2. +#G #L #T1 #T2 #l1 #m1 #H elim H -G -L -T1 -T2 -l1 -m1 // +[ /3 width=5 by cpy_subst, ylt_yle_trans, yle_trans/ +| /4 width=3 by cpy_bind, ylt_yle_trans, yle_succ/ +| /3 width=1 by cpy_flat/ +] +qed-. + +lemma cpy_weak_top: ∀G,L,T1,T2,l,m. + ⦃G, L⦄ ⊢ T1 ▶[l, m] T2 → ⦃G, L⦄ ⊢ T1 ▶[l, |L| - l] T2. +#G #L #T1 #T2 #l #m #H elim H -G -L -T1 -T2 -l -m // +[ #I #G #L #K #V #W #i #l #m #Hli #_ #HLK #HVW + lapply (drop_fwd_length_lt2 … HLK) + /4 width=5 by cpy_subst, ylt_yle_trans, ylt_inj/ +| #a #I #G #L #V1 #V2 normalize in match (|L.ⓑ{I}V2|); (**) (* |?| does not work *) + /2 width=1 by cpy_bind/ +| /2 width=1 by cpy_flat/ +] +qed-. + +lemma cpy_weak_full: ∀G,L,T1,T2,l,m. + ⦃G, L⦄ ⊢ T1 ▶[l, m] T2 → ⦃G, L⦄ ⊢ T1 ▶[0, |L|] T2. +#G #L #T1 #T2 #l #m #HT12 +lapply (cpy_weak … HT12 0 (l + m) ? ?) -HT12 +/2 width=2 by cpy_weak_top/ +qed-. + +lemma cpy_split_up: ∀G,L,T1,T2,l,m. ⦃G, L⦄ ⊢ T1 ▶[l, m] T2 → ∀i. i ≤ l + m → + ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[l, i-l] T & ⦃G, L⦄ ⊢ T ▶[i, l+m-i] T2. +#G #L #T1 #T2 #l #m #H elim H -G -L -T1 -T2 -l -m +[ /2 width=3 by ex2_intro/ +| #I #G #L #K #V #W #i #l #m #Hli #Hilm #HLK #HVW #j #Hjlm + elim (ylt_split i j) [ -Hilm -Hjlm | -Hli ] + /4 width=9 by cpy_subst, ylt_yle_trans, ex2_intro/ +| #a #I #G #L #V1 #V2 #T1 #T2 #l #m #_ #_ #IHV12 #IHT12 #i #Hilm + elim (IHV12 i) -IHV12 // #V + elim (IHT12 (i+1)) -IHT12 /2 width=1 by yle_succ/ -Hilm + >yplus_SO2 >yplus_succ1 #T #HT1 #HT2 + lapply (lsuby_cpy_trans … HT2 (L.ⓑ{I}V) ?) -HT2 + /3 width=5 by lsuby_succ, ex2_intro, cpy_bind/ +| #I #G #L #V1 #V2 #T1 #T2 #l #m #_ #_ #IHV12 #IHT12 #i #Hilm + elim (IHV12 i) -IHV12 // elim (IHT12 i) -IHT12 // -Hilm + /3 width=5 by ex2_intro, cpy_flat/ +] +qed-. + +lemma cpy_split_down: ∀G,L,T1,T2,l,m. ⦃G, L⦄ ⊢ T1 ▶[l, m] T2 → ∀i. i ≤ l + m → + ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[i, l+m-i] T & ⦃G, L⦄ ⊢ T ▶[l, i-l] T2. +#G #L #T1 #T2 #l #m #H elim H -G -L -T1 -T2 -l -m +[ /2 width=3 by ex2_intro/ +| #I #G #L #K #V #W #i #l #m #Hli #Hilm #HLK #HVW #j #Hjlm + elim (ylt_split i j) [ -Hilm -Hjlm | -Hli ] + /4 width=9 by cpy_subst, ylt_yle_trans, ex2_intro/ +| #a #I #G #L #V1 #V2 #T1 #T2 #l #m #_ #_ #IHV12 #IHT12 #i #Hilm + elim (IHV12 i) -IHV12 // #V + elim (IHT12 (i+1)) -IHT12 /2 width=1 by yle_succ/ -Hilm + >yplus_SO2 >yplus_succ1 #T #HT1 #HT2 + lapply (lsuby_cpy_trans … HT2 (L.ⓑ{I}V) ?) -HT2 + /3 width=5 by lsuby_succ, ex2_intro, cpy_bind/ +| #I #G #L #V1 #V2 #T1 #T2 #l #m #_ #_ #IHV12 #IHT12 #i #Hilm + elim (IHV12 i) -IHV12 // elim (IHT12 i) -IHT12 // -Hilm + /3 width=5 by ex2_intro, cpy_flat/ +] +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma cpy_fwd_up: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶[lt, mt] U2 → + ∀T1,l,m. ⬆[l, m] T1 ≡ U1 → + l ≤ lt → l + m ≤ lt + mt → + ∃∃T2. ⦃G, L⦄ ⊢ U1 ▶[l+m, lt+mt-(l+m)] U2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #H elim H -G -L -U1 -U2 -lt -mt +[ * #i #G #L #lt #mt #T1 #l #m #H #_ + [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by ex2_intro/ + | elim (lift_inv_lref2 … H) -H * #Hil #H destruct /3 width=3 by lift_lref_ge_minus, lift_lref_lt, ex2_intro/ + | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3 by ex2_intro/ + ] +| #I #G #L #K #V #W #i #lt #mt #Hlti #Hilmt #HLK #HVW #T1 #l #m #H #Hllt #Hlmlmt + elim (lift_inv_lref2 … H) -H * #Hil #H destruct [ -V -Hilmt -Hlmlmt | -Hlti -Hllt ] + [ elim (ylt_yle_false … Hllt) -Hllt /3 width=3 by yle_ylt_trans, ylt_inj/ + | elim (le_inv_plus_l … Hil) #Hlim #Hmi + elim (lift_split … HVW l (i-m+1) ? ? ?) [2,3,4: /2 width=1 by le_S_S, le_S/ ] -Hlim + #T2 #_ >plus_minus // ymax_pre_sn_comm // (**) (* explicit constructor *) + ] +| #a #I #G #L #W1 #W2 #U1 #U2 #lt #mt #_ #_ #IHW12 #IHU12 #X #l #m #H #Hllt #Hlmlmt + elim (lift_inv_bind2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct + elim (IHW12 … HVW1) -V1 -IHW12 // + elim (IHU12 … HTU1) -T1 -IHU12 /2 width=1 by yle_succ/ + yplus_SO2 >yplus_succ1 >yplus_succ1 + /3 width=2 by cpy_bind, lift_bind, ex2_intro/ +| #I #G #L #W1 #W2 #U1 #U2 #lt #mt #_ #_ #IHW12 #IHU12 #X #l #m #H #Hllt #Hlmlmt + elim (lift_inv_flat2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct + elim (IHW12 … HVW1) -V1 -IHW12 // elim (IHU12 … HTU1) -T1 -IHU12 + /3 width=2 by cpy_flat, lift_flat, ex2_intro/ +] +qed-. + +lemma cpy_fwd_tw: ∀G,L,T1,T2,l,m. ⦃G, L⦄ ⊢ T1 ▶[l, m] T2 → ♯{T1} ≤ ♯{T2}. +#G #L #T1 #T2 #l #m #H elim H -G -L -T1 -T2 -l -m normalize +/3 width=1 by monotonic_le_plus_l, le_plus/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact cpy_inv_atom1_aux: ∀G,L,T1,T2,l,m. ⦃G, L⦄ ⊢ T1 ▶[l, m] T2 → ∀J. T1 = ⓪{J} → + T2 = ⓪{J} ∨ + ∃∃I,K,V,i. l ≤ yinj i & i < l + m & + ⬇[i] L ≡ K.ⓑ{I}V & + ⬆[O, i+1] V ≡ T2 & + J = LRef i. +#G #L #T1 #T2 #l #m * -G -L -T1 -T2 -l -m +[ #I #G #L #l #m #J #H destruct /2 width=1 by or_introl/ +| #I #G #L #K #V #T2 #i #l #m #Hli #Hilm #HLK #HVT2 #J #H destruct /3 width=9 by ex5_4_intro, or_intror/ +| #a #I #G #L #V1 #V2 #T1 #T2 #l #m #_ #_ #J #H destruct +| #I #G #L #V1 #V2 #T1 #T2 #l #m #_ #_ #J #H destruct +] +qed-. + +lemma cpy_inv_atom1: ∀I,G,L,T2,l,m. ⦃G, L⦄ ⊢ ⓪{I} ▶[l, m] T2 → + T2 = ⓪{I} ∨ + ∃∃J,K,V,i. l ≤ yinj i & i < l + m & + ⬇[i] L ≡ K.ⓑ{J}V & + ⬆[O, i+1] V ≡ T2 & + I = LRef i. +/2 width=4 by cpy_inv_atom1_aux/ qed-. + +(* Basic_1: was: subst1_gen_sort *) +lemma cpy_inv_sort1: ∀G,L,T2,k,l,m. ⦃G, L⦄ ⊢ ⋆k ▶[l, m] T2 → T2 = ⋆k. +#G #L #T2 #k #l #m #H +elim (cpy_inv_atom1 … H) -H // +* #I #K #V #i #_ #_ #_ #_ #H destruct +qed-. + +(* Basic_1: was: subst1_gen_lref *) +lemma cpy_inv_lref1: ∀G,L,T2,i,l,m. ⦃G, L⦄ ⊢ #i ▶[l, m] T2 → + T2 = #i ∨ + ∃∃I,K,V. l ≤ i & i < l + m & + ⬇[i] L ≡ K.ⓑ{I}V & + ⬆[O, i+1] V ≡ T2. +#G #L #T2 #i #l #m #H +elim (cpy_inv_atom1 … H) -H /2 width=1 by or_introl/ +* #I #K #V #j #Hlj #Hjlm #HLK #HVT2 #H destruct /3 width=5 by ex4_3_intro, or_intror/ +qed-. + +lemma cpy_inv_gref1: ∀G,L,T2,p,l,m. ⦃G, L⦄ ⊢ §p ▶[l, m] T2 → T2 = §p. +#G #L #T2 #p #l #m #H +elim (cpy_inv_atom1 … H) -H // +* #I #K #V #i #_ #_ #_ #_ #H destruct +qed-. + +fact cpy_inv_bind1_aux: ∀G,L,U1,U2,l,m. ⦃G, L⦄ ⊢ U1 ▶[l, m] U2 → + ∀a,I,V1,T1. U1 = ⓑ{a,I}V1.T1 → + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶[l, m] V2 & + ⦃G, L. ⓑ{I}V1⦄ ⊢ T1 ▶[⫯l, m] T2 & + U2 = ⓑ{a,I}V2.T2. +#G #L #U1 #U2 #l #m * -G -L -U1 -U2 -l -m +[ #I #G #L #l #m #b #J #W1 #U1 #H destruct +| #I #G #L #K #V #W #i #l #m #_ #_ #_ #_ #b #J #W1 #U1 #H destruct +| #a #I #G #L #V1 #V2 #T1 #T2 #l #m #HV12 #HT12 #b #J #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/ +| #I #G #L #V1 #V2 #T1 #T2 #l #m #_ #_ #b #J #W1 #U1 #H destruct +] +qed-. + +lemma cpy_inv_bind1: ∀a,I,G,L,V1,T1,U2,l,m. ⦃G, L⦄ ⊢ ⓑ{a,I} V1. T1 ▶[l, m] U2 → + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶[l, m] V2 & + ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ▶[⫯l, m] T2 & + U2 = ⓑ{a,I}V2.T2. +/2 width=3 by cpy_inv_bind1_aux/ qed-. + +fact cpy_inv_flat1_aux: ∀G,L,U1,U2,l,m. ⦃G, L⦄ ⊢ U1 ▶[l, m] U2 → + ∀I,V1,T1. U1 = ⓕ{I}V1.T1 → + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶[l, m] V2 & + ⦃G, L⦄ ⊢ T1 ▶[l, m] T2 & + U2 = ⓕ{I}V2.T2. +#G #L #U1 #U2 #l #m * -G -L -U1 -U2 -l -m +[ #I #G #L #l #m #J #W1 #U1 #H destruct +| #I #G #L #K #V #W #i #l #m #_ #_ #_ #_ #J #W1 #U1 #H destruct +| #a #I #G #L #V1 #V2 #T1 #T2 #l #m #_ #_ #J #W1 #U1 #H destruct +| #I #G #L #V1 #V2 #T1 #T2 #l #m #HV12 #HT12 #J #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma cpy_inv_flat1: ∀I,G,L,V1,T1,U2,l,m. ⦃G, L⦄ ⊢ ⓕ{I} V1. T1 ▶[l, m] U2 → + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶[l, m] V2 & + ⦃G, L⦄ ⊢ T1 ▶[l, m] T2 & + U2 = ⓕ{I}V2.T2. +/2 width=3 by cpy_inv_flat1_aux/ qed-. + + +fact cpy_inv_refl_O2_aux: ∀G,L,T1,T2,l,m. ⦃G, L⦄ ⊢ T1 ▶[l, m] T2 → m = 0 → T1 = T2. +#G #L #T1 #T2 #l #m #H elim H -G -L -T1 -T2 -l -m +[ // +| #I #G #L #K #V #W #i #l #m #Hli #Hilm #_ #_ #H destruct + elim (ylt_yle_false … Hli) -Hli // +| /3 width=1 by eq_f2/ +| /3 width=1 by eq_f2/ +] +qed-. + +lemma cpy_inv_refl_O2: ∀G,L,T1,T2,l. ⦃G, L⦄ ⊢ T1 ▶[l, 0] T2 → T1 = T2. +/2 width=6 by cpy_inv_refl_O2_aux/ qed-. + +(* Basic_1: was: subst1_gen_lift_eq *) +lemma cpy_inv_lift1_eq: ∀G,T1,U1,l,m. ⬆[l, m] T1 ≡ U1 → + ∀L,U2. ⦃G, L⦄ ⊢ U1 ▶[l, m] U2 → U1 = U2. +#G #T1 #U1 #l #m #HTU1 #L #U2 #HU12 elim (cpy_fwd_up … HU12 … HTU1) -HU12 -HTU1 +/2 width=4 by cpy_inv_refl_O2/ +qed-. + +(* Basic_1: removed theorems 25: + subst0_gen_sort subst0_gen_lref subst0_gen_head subst0_gen_lift_lt + subst0_gen_lift_false subst0_gen_lift_ge subst0_refl subst0_trans + subst0_lift_lt subst0_lift_ge subst0_lift_ge_S subst0_lift_ge_s + subst0_subst0 subst0_subst0_back subst0_weight_le subst0_weight_lt + subst0_confluence_neq subst0_confluence_eq subst0_tlt_head + subst0_confluence_lift subst0_tlt + subst1_head subst1_gen_head subst1_lift_S subst1_confluence_lift +*) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy_cpy.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy_cpy.ma new file mode 100644 index 000000000..3a8857155 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy_cpy.ma @@ -0,0 +1,122 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/cpy_lift.ma". + +(* CONTEXT-SENSITIVE EXTENDED ORDINARY SUBSTITUTION FOR TERMS ***************) + +(* Main properties **********************************************************) + +(* Basic_1: was: subst1_confluence_eq *) +theorem cpy_conf_eq: ∀G,L,T0,T1,l1,m1. ⦃G, L⦄ ⊢ T0 ▶[l1, m1] T1 → + ∀T2,l2,m2. ⦃G, L⦄ ⊢ T0 ▶[l2, m2] T2 → + ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[l2, m2] T & ⦃G, L⦄ ⊢ T2 ▶[l1, m1] T. +#G #L #T0 #T1 #l1 #m1 #H elim H -G -L -T0 -T1 -l1 -m1 +[ /2 width=3 by ex2_intro/ +| #I1 #G #L #K1 #V1 #T1 #i0 #l1 #m1 #Hl1 #Hlm1 #HLK1 #HVT1 #T2 #l2 #m2 #H + elim (cpy_inv_lref1 … H) -H + [ #HX destruct /3 width=7 by cpy_subst, ex2_intro/ + | -Hl1 -Hlm1 * #I2 #K2 #V2 #_ #_ #HLK2 #HVT2 + lapply (drop_mono … HLK1 … HLK2) -HLK1 -HLK2 #H destruct + >(lift_mono … HVT1 … HVT2) -HVT1 -HVT2 /2 width=3 by ex2_intro/ + ] +| #a #I #G #L #V0 #V1 #T0 #T1 #l1 #m1 #_ #_ #IHV01 #IHT01 #X #l2 #m2 #HX + elim (cpy_inv_bind1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct + elim (IHV01 … HV02) -IHV01 -HV02 #V #HV1 #HV2 + elim (IHT01 … HT02) -T0 #T #HT1 #HT2 + lapply (lsuby_cpy_trans … HT1 (L.ⓑ{I}V1) ?) -HT1 /2 width=1 by lsuby_succ/ + lapply (lsuby_cpy_trans … HT2 (L.ⓑ{I}V2) ?) -HT2 + /3 width=5 by cpy_bind, lsuby_succ, ex2_intro/ +| #I #G #L #V0 #V1 #T0 #T1 #l1 #m1 #_ #_ #IHV01 #IHT01 #X #l2 #m2 #HX + elim (cpy_inv_flat1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct + elim (IHV01 … HV02) -V0 + elim (IHT01 … HT02) -T0 /3 width=5 by cpy_flat, ex2_intro/ +] +qed-. + +(* Basic_1: was: subst1_confluence_neq *) +theorem cpy_conf_neq: ∀G,L1,T0,T1,l1,m1. ⦃G, L1⦄ ⊢ T0 ▶[l1, m1] T1 → + ∀L2,T2,l2,m2. ⦃G, L2⦄ ⊢ T0 ▶[l2, m2] T2 → + (l1 + m1 ≤ l2 ∨ l2 + m2 ≤ l1) → + ∃∃T. ⦃G, L2⦄ ⊢ T1 ▶[l2, m2] T & ⦃G, L1⦄ ⊢ T2 ▶[l1, m1] T. +#G #L1 #T0 #T1 #l1 #m1 #H elim H -G -L1 -T0 -T1 -l1 -m1 +[ /2 width=3 by ex2_intro/ +| #I1 #G #L1 #K1 #V1 #T1 #i0 #l1 #m1 #Hl1 #Hlm1 #HLK1 #HVT1 #L2 #T2 #l2 #m2 #H1 #H2 + elim (cpy_inv_lref1 … H1) -H1 + [ #H destruct /3 width=7 by cpy_subst, ex2_intro/ + | -HLK1 -HVT1 * #I2 #K2 #V2 #Hl2 #Hlm2 #_ #_ elim H2 -H2 #Hlml [ -Hl1 -Hlm2 | -Hl2 -Hlm1 ] + [ elim (ylt_yle_false … Hlm1) -Hlm1 /2 width=3 by yle_trans/ + | elim (ylt_yle_false … Hlm2) -Hlm2 /2 width=3 by yle_trans/ + ] + ] +| #a #I #G #L1 #V0 #V1 #T0 #T1 #l1 #m1 #_ #_ #IHV01 #IHT01 #L2 #X #l2 #m2 #HX #H + elim (cpy_inv_bind1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct + elim (IHV01 … HV02 H) -IHV01 -HV02 #V #HV1 #HV2 + elim (IHT01 … HT02) -T0 + [ -H #T #HT1 #HT2 + lapply (lsuby_cpy_trans … HT1 (L2.ⓑ{I}V1) ?) -HT1 /2 width=1 by lsuby_succ/ + lapply (lsuby_cpy_trans … HT2 (L1.ⓑ{I}V2) ?) -HT2 /3 width=5 by cpy_bind, lsuby_succ, ex2_intro/ + | -HV1 -HV2 elim H -H /3 width=1 by yle_succ, or_introl, or_intror/ + ] +| #I #G #L1 #V0 #V1 #T0 #T1 #l1 #m1 #_ #_ #IHV01 #IHT01 #L2 #X #l2 #m2 #HX #H + elim (cpy_inv_flat1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct + elim (IHV01 … HV02 H) -V0 + elim (IHT01 … HT02 H) -T0 -H /3 width=5 by cpy_flat, ex2_intro/ +] +qed-. + +(* Note: the constant 1 comes from cpy_subst *) +(* Basic_1: was: subst1_trans *) +theorem cpy_trans_ge: ∀G,L,T1,T0,l,m. ⦃G, L⦄ ⊢ T1 ▶[l, m] T0 → + ∀T2. ⦃G, L⦄ ⊢ T0 ▶[l, 1] T2 → 1 ≤ m → ⦃G, L⦄ ⊢ T1 ▶[l, m] T2. +#G #L #T1 #T0 #l #m #H elim H -G -L -T1 -T0 -l -m +[ #I #G #L #l #m #T2 #H #Hm + elim (cpy_inv_atom1 … H) -H + [ #H destruct // + | * #J #K #V #i #Hl2i #Hilm2 #HLK #HVT2 #H destruct + lapply (ylt_yle_trans … (l+m) … Hilm2) /2 width=5 by cpy_subst, monotonic_yle_plus_dx/ + ] +| #I #G #L #K #V #V2 #i #l #m #Hli #Hilm #HLK #HVW #T2 #HVT2 #Hm + lapply (cpy_weak … HVT2 0 (i+1) ? ?) -HVT2 /3 width=1 by yle_plus_dx2_trans, yle_succ/ + >yplus_inj #HVT2 <(cpy_inv_lift1_eq … HVW … HVT2) -HVT2 /2 width=5 by cpy_subst/ +| #a #I #G #L #V1 #V0 #T1 #T0 #l #m #_ #_ #IHV10 #IHT10 #X #H #Hm + elim (cpy_inv_bind1 … H) -H #V2 #T2 #HV02 #HT02 #H destruct + lapply (lsuby_cpy_trans … HT02 (L.ⓑ{I}V1) ?) -HT02 /2 width=1 by lsuby_succ/ #HT02 + lapply (IHT10 … HT02 Hm) -T0 /3 width=1 by cpy_bind/ +| #I #G #L #V1 #V0 #T1 #T0 #l #m #_ #_ #IHV10 #IHT10 #X #H #Hm + elim (cpy_inv_flat1 … H) -H #V2 #T2 #HV02 #HT02 #H destruct /3 width=1 by cpy_flat/ +] +qed-. + +theorem cpy_trans_down: ∀G,L,T1,T0,l1,m1. ⦃G, L⦄ ⊢ T1 ▶[l1, m1] T0 → + ∀T2,l2,m2. ⦃G, L⦄ ⊢ T0 ▶[l2, m2] T2 → l2 + m2 ≤ l1 → + ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[l2, m2] T & ⦃G, L⦄ ⊢ T ▶[l1, m1] T2. +#G #L #T1 #T0 #l1 #m1 #H elim H -G -L -T1 -T0 -l1 -m1 +[ /2 width=3 by ex2_intro/ +| #I #G #L #K #V #W #i1 #l1 #m1 #Hli1 #Hilm1 #HLK #HVW #T2 #l2 #m2 #HWT2 #Hlm2l1 + lapply (yle_trans … Hlm2l1 … Hli1) -Hlm2l1 #Hlm2i1 + lapply (cpy_weak … HWT2 0 (i1+1) ? ?) -HWT2 /3 width=1 by yle_succ, yle_pred_sn/ -Hlm2i1 + >yplus_inj #HWT2 <(cpy_inv_lift1_eq … HVW … HWT2) -HWT2 /3 width=9 by cpy_subst, ex2_intro/ +| #a #I #G #L #V1 #V0 #T1 #T0 #l1 #m1 #_ #_ #IHV10 #IHT10 #X #l2 #m2 #HX #lm2l1 + elim (cpy_inv_bind1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct + lapply (lsuby_cpy_trans … HT02 (L.ⓑ{I}V1) ?) -HT02 /2 width=1 by lsuby_succ/ #HT02 + elim (IHV10 … HV02) -IHV10 -HV02 // #V + elim (IHT10 … HT02) -T0 /2 width=1 by yle_succ/ #T #HT1 #HT2 + lapply (lsuby_cpy_trans … HT2 (L.ⓑ{I}V) ?) -HT2 /3 width=6 by cpy_bind, lsuby_succ, ex2_intro/ +| #I #G #L #V1 #V0 #T1 #T0 #l1 #m1 #_ #_ #IHV10 #IHT10 #X #l2 #m2 #HX #lm2l1 + elim (cpy_inv_flat1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct + elim (IHV10 … HV02) -V0 // + elim (IHT10 … HT02) -T0 /3 width=6 by cpy_flat, ex2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy_lift.ma new file mode 100644 index 000000000..a188129b6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy_lift.ma @@ -0,0 +1,249 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop_drop.ma". +include "basic_2A/substitution/cpy.ma". + +(* CONTEXT-SENSITIVE EXTENDED ORDINARY SUBSTITUTION FOR TERMS ***************) + +(* Properties on relocation *************************************************) + +(* Basic_1: was: subst1_lift_lt *) +lemma cpy_lift_le: ∀G,K,T1,T2,lt,mt. ⦃G, K⦄ ⊢ T1 ▶[lt, mt] T2 → + ∀L,U1,U2,s,l,m. ⬇[s, l, m] L ≡ K → + ⬆[l, m] T1 ≡ U1 → ⬆[l, m] T2 ≡ U2 → + lt + mt ≤ l → ⦃G, L⦄ ⊢ U1 ▶[lt, mt] U2. +#G #K #T1 #T2 #lt #mt #H elim H -G -K -T1 -T2 -lt -mt +[ #I #G #K #lt #mt #L #U1 #U2 #s #l #m #_ #H1 #H2 #_ + >(lift_mono … H1 … H2) -H1 -H2 // +| #I #G #K #KV #V #W #i #lt #mt #Hlti #Hilmt #HKV #HVW #L #U1 #U2 #s #l #m #HLK #H #HWU2 #Hlmtl + lapply (ylt_yle_trans … Hlmtl … Hilmt) -Hlmtl #Hil + lapply (ylt_inv_inj … Hil) -Hil #Hil + lapply (lift_inv_lref1_lt … H … Hil) -H #H destruct + elim (lift_trans_ge … HVW … HWU2) -W // (lift_mono … HVY … HVW) -Y -HVW #H destruct /2 width=5 by cpy_subst/ +| #a #I #G #K #V1 #V2 #T1 #T2 #lt #mt #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #l #m #HLK #H1 #H2 #Hlmtl + elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 + elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct + /4 width=7 by cpy_bind, drop_skip, yle_succ/ +| #G #I #K #V1 #V2 #T1 #T2 #lt #mt #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #l #m #HLK #H1 #H2 #Hlmtl + elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 + elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct + /3 width=7 by cpy_flat/ +] +qed-. + +lemma cpy_lift_be: ∀G,K,T1,T2,lt,mt. ⦃G, K⦄ ⊢ T1 ▶[lt, mt] T2 → + ∀L,U1,U2,s,l,m. ⬇[s, l, m] L ≡ K → + ⬆[l, m] T1 ≡ U1 → ⬆[l, m] T2 ≡ U2 → + lt ≤ l → l ≤ lt + mt → ⦃G, L⦄ ⊢ U1 ▶[lt, mt + m] U2. +#G #K #T1 #T2 #lt #mt #H elim H -G -K -T1 -T2 -lt -mt +[ #I #G #K #lt #mt #L #U1 #U2 #s #l #m #_ #H1 #H2 #_ #_ + >(lift_mono … H1 … H2) -H1 -H2 // +| #I #G #K #KV #V #W #i #lt #mt #Hlti #Hilmt #HKV #HVW #L #U1 #U2 #s #l #m #HLK #H #HWU2 #Hltl #_ + elim (lift_inv_lref1 … H) -H * #Hil #H destruct + [ -Hltl + lapply (ylt_yle_trans … (lt+mt+m) … Hilmt) // -Hilmt #Hilmtm + elim (lift_trans_ge … HVW … HWU2) -W // (lift_mono … HVY … HVW) -V #H destruct /2 width=5 by cpy_subst/ + | -Hlti + elim (yle_inv_inj2 … Hltl) -Hltl #ltt #Hltl #H destruct + lapply (transitive_le … Hltl Hil) -Hltl #Hlti + lapply (lift_trans_be … HVW … HWU2 ? ?) -W /2 width=1 by le_S/ >plus_plus_comm_23 #HVU2 + lapply (drop_trans_ge_comm … HLK … HKV ?) -K // -Hil + /4 width=5 by cpy_subst, drop_inv_gen, monotonic_ylt_plus_dx, yle_plus_dx1_trans, yle_inj/ + ] +| #a #I #G #K #V1 #V2 #T1 #T2 #lt #mt #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #l #m #HLK #H1 #H2 #Hltl #Hllmt + elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 + elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct + /4 width=7 by cpy_bind, drop_skip, yle_succ/ +| #I #G #K #V1 #V2 #T1 #T2 #lt #mt #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #l #m #HLK #H1 #H2 #Hlmtl + elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 + elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct + /3 width=7 by cpy_flat/ +] +qed-. + +(* Basic_1: was: subst1_lift_ge *) +lemma cpy_lift_ge: ∀G,K,T1,T2,lt,mt. ⦃G, K⦄ ⊢ T1 ▶[lt, mt] T2 → + ∀L,U1,U2,s,l,m. ⬇[s, l, m] L ≡ K → + ⬆[l, m] T1 ≡ U1 → ⬆[l, m] T2 ≡ U2 → + l ≤ lt → ⦃G, L⦄ ⊢ U1 ▶[lt+m, mt] U2. +#G #K #T1 #T2 #lt #mt #H elim H -G -K -T1 -T2 -lt -mt +[ #I #G #K #lt #mt #L #U1 #U2 #s #l #m #_ #H1 #H2 #_ + >(lift_mono … H1 … H2) -H1 -H2 // +| #I #G #K #KV #V #W #i #lt #mt #Hlti #Hilmt #HKV #HVW #L #U1 #U2 #s #l #m #HLK #H #HWU2 #Hllt + lapply (yle_trans … Hllt … Hlti) -Hllt #Hil + elim (yle_inv_inj2 … Hil) -Hil #ll #Hlli #H0 destruct + lapply (lift_inv_lref1_ge … H … Hlli) -H #H destruct + lapply (lift_trans_be … HVW … HWU2 ? ?) -W /2 width=1 by le_S/ >plus_plus_comm_23 #HVU2 + lapply (drop_trans_ge_comm … HLK … HKV ?) -K // -Hlli + /3 width=5 by cpy_subst, drop_inv_gen, monotonic_ylt_plus_dx, monotonic_yle_plus_dx/ +| #a #I #G #K #V1 #V2 #T1 #T2 #lt #mt #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #l #m #HLK #H1 #H2 #Hllt + elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 + elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct + /4 width=6 by cpy_bind, drop_skip, yle_succ/ +| #I #G #K #V1 #V2 #T1 #T2 #lt #mt #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #l #m #HLK #H1 #H2 #Hllt + elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 + elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct + /3 width=6 by cpy_flat/ +] +qed-. + +(* Inversion lemmas on relocation *******************************************) + +(* Basic_1: was: subst1_gen_lift_lt *) +lemma cpy_inv_lift1_le: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + lt + mt ≤ l → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[lt, mt] T2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #H elim H -G -L -U1 -U2 -lt -mt +[ * #i #G #L #lt #mt #K #s #l #m #_ #T1 #H #_ + [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by ex2_intro/ + | elim (lift_inv_lref2 … H) -H * #Hil #H destruct /3 width=3 by lift_lref_ge_minus, lift_lref_lt, ex2_intro/ + | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3 by ex2_intro/ + ] +| #I #G #L #KV #V #W #i #lt #mt #Hlti #Hilmt #HLKV #HVW #K #s #l #m #HLK #T1 #H #Hlmtl + lapply (ylt_yle_trans … Hlmtl … Hilmt) -Hlmtl #Hil + lapply (ylt_inv_inj … Hil) -Hil #Hil + lapply (lift_inv_lref2_lt … H … Hil) -H #H destruct + elim (drop_conf_lt … HLK … HLKV) -L // #L #U #HKL #_ #HUV + elim (lift_trans_le … HUV … HVW) -V // >minus_plus yplus_minus_assoc_inj /2 width=1 by yle_plus1_to_minus_inj2/ ] -Hlmlmt #Hilmtm + elim (drop_conf_lt … HLK … HLKV) -L // #L #U #HKL #_ #HUV + elim (lift_trans_le … HUV … HVW) -V // >minus_plus plus_minus // yplus_minus_assoc_inj /3 width=1 by monotonic_ylt_minus_dx, yle_inj/ + ] +| #a #I #G #L #W1 #W2 #U1 #U2 #lt #mt #_ #_ #IHW12 #IHU12 #K #s #l #m #HLK #X #H #Hltl #Hlmlmt + elim (lift_inv_bind2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct + elim (IHW12 … HLK … HVW1) -IHW12 // #V2 #HV12 #HVW2 + elim (IHU12 … HTU1) -U1 + /3 width=6 by cpy_bind, drop_skip, lift_bind, yle_succ, ex2_intro/ +| #I #G #L #W1 #W2 #U1 #U2 #lt #mt #_ #_ #IHW12 #IHU12 #K #s #l #m #HLK #X #H #Hltl #Hlmlmt + elim (lift_inv_flat2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct + elim (IHW12 … HLK … HVW1) -W1 // + elim (IHU12 … HLK … HTU1) -U1 -HLK // + /3 width=5 by cpy_flat, lift_flat, ex2_intro/ +] +qed-. + +(* Basic_1: was: subst1_gen_lift_ge *) +lemma cpy_inv_lift1_ge: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + yinj l + m ≤ lt → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[lt-m, mt] T2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #H elim H -G -L -U1 -U2 -lt -mt +[ * #i #G #L #lt #mt #K #s #l #m #_ #T1 #H #_ + [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by ex2_intro/ + | elim (lift_inv_lref2 … H) -H * #Hil #H destruct /3 width=3 by lift_lref_ge_minus, lift_lref_lt, ex2_intro/ + | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3 by ex2_intro/ + ] +| #I #G #L #KV #V #W #i #lt #mt #Hlti #Hilmt #HLKV #HVW #K #s #l #m #HLK #T1 #H #Hlmlt + lapply (yle_trans … Hlmlt … Hlti) #Hlmi + elim (yle_inv_plus_inj2 … Hlmlt) -Hlmlt #_ #Hmlt + elim (yle_inv_plus_inj2 … Hlmi) #Hlim #Hmi + lapply (lift_inv_lref2_ge … H ?) -H /2 width=1 by yle_inv_inj/ #H destruct + lapply (drop_conf_ge … HLK … HLKV ?) -L /2 width=1 by yle_inv_inj/ #HKV + elim (lift_split … HVW l (i-m+1)) -HVW [2,3,4: /3 width=1 by yle_inv_inj, le_S_S, le_S/ ] -Hlmi -Hlim + #V0 #HV10 >plus_minus /2 width=1 by yle_inv_inj/ yminus_succ1_inj /3 width=5 by cpy_bind, lift_bind, ex2_intro/ +| #I #G #L #W1 #W2 #U1 #U2 #lt #mt #_ #_ #IHW12 #IHU12 #K #s #l #m #HLK #X #H #Hlmtl + elim (lift_inv_flat2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct + elim (IHW12 … HLK … HVW1) -W1 // + elim (IHU12 … HLK … HTU1) -U1 -HLK /3 width=5 by cpy_flat, lift_flat, ex2_intro/ +] +qed-. + +(* Advanced inversion lemmas on relocation ***********************************) + +lemma cpy_inv_lift1_ge_up: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + l ≤ lt → lt ≤ yinj l + m → yinj l + m ≤ lt + mt → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[l, lt + mt - (yinj l + m)] T2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #HU12 #K #s #l #m #HLK #T1 #HTU1 #Hllt #Hltlm #Hlmlmt +elim (cpy_split_up … HU12 (l + m)) -HU12 // -Hlmlmt #U #HU1 #HU2 +lapply (cpy_weak … HU1 l m ? ?) -HU1 // [ >ymax_pre_sn_comm // ] -Hllt -Hltlm #HU1 +lapply (cpy_inv_lift1_eq … HTU1 … HU1) -HU1 #HU1 destruct +elim (cpy_inv_lift1_ge … HU2 … HLK … HTU1) -U -L /2 width=3 by ex2_intro/ +qed-. + +lemma cpy_inv_lift1_be_up: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + lt ≤ l → lt + mt ≤ yinj l + m → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[lt, l-lt] T2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #HU12 #K #s #l #m #HLK #T1 #HTU1 #Hltl #Hlmtlm +lapply (cpy_weak … HU12 lt (l+m-lt) ? ?) -HU12 // +[ >ymax_pre_sn_comm /2 width=1 by yle_plus_dx1_trans/ ] -Hlmtlm #HU12 +elim (cpy_inv_lift1_be … HU12 … HLK … HTU1) -U1 -L /2 width=3 by ex2_intro/ +qed-. + +lemma cpy_inv_lift1_le_up: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + lt ≤ l → l ≤ lt + mt → lt + mt ≤ yinj l + m → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[lt, l - lt] T2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #HU12 #K #s #l #m #HLK #T1 #HTU1 #Hltl #Hllmt #Hlmtlm +elim (cpy_split_up … HU12 l) -HU12 // #U #HU1 #HU2 +elim (cpy_inv_lift1_le … HU1 … HLK … HTU1) -U1 +[2: >ymax_pre_sn_comm // ] -Hltl #T #HT1 #HTU +lapply (cpy_weak … HU2 l m ? ?) -HU2 // +[ >ymax_pre_sn_comm // ] -Hllmt -Hlmtlm #HU2 +lapply (cpy_inv_lift1_eq … HTU … HU2) -L #H destruct /2 width=3 by ex2_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy_nlift.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy_nlift.ma new file mode 100644 index 000000000..ded7af4f5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy_nlift.ma @@ -0,0 +1,66 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lift_neg.ma". +include "basic_2A/substitution/lift_lift.ma". +include "basic_2A/substitution/cpy.ma". + +(* CONTEXT-SENSITIVE EXTENDED ORDINARY SUBSTITUTION FOR TERMS ***************) + +(* Inversion lemmas on negated relocation ***********************************) + +lemma cpy_fwd_nlift2_ge: ∀G,L,U1,U2,l,m. ⦃G, L⦄ ⊢ U1 ▶[l, m] U2 → + ∀i. l ≤ yinj i → (∀T2. ⬆[i, 1] T2 ≡ U2 → ⊥) → + (∀T1. ⬆[i, 1] T1 ≡ U1 → ⊥) ∨ + ∃∃I,K,W,j. l ≤ yinj j & j < i & ⬇[j]L ≡ K.ⓑ{I}W & + (∀V. ⬆[i-j-1, 1] V ≡ W → ⊥) & (∀T1. ⬆[j, 1] T1 ≡ U1 → ⊥). +#G #L #U1 #U2 #l #m #H elim H -G -L -U1 -U2 -l -m +[ /3 width=2 by or_introl/ +| #I #G #L #K #V #W #j #l #m #Hlj #Hjlm #HLK #HVW #i #Hli #HnW + elim (lt_or_ge j i) #Hij + [ @or_intror @(ex5_4_intro … HLK) // -HLK + [ #X #HXV elim (lift_trans_le … HXV … HVW ?) -V // + #Y #HXY >minus_plus (plus_minus_m_m j 1) in ⊢ (%→?); [2: /3 width=3 by yle_trans, yle_inv_inj/ ] + #HnU1 commutative_plus normalize #H destruct +] +qed-. + +lemma drop_inv_O1_pair1: ∀I,K,L2,V,s,m. ⬇[s, 0, m] K. ⓑ{I} V ≡ L2 → + (m = 0 ∧ L2 = K.ⓑ{I}V) ∨ + (0 < m ∧ ⬇[s, 0, m-1] K ≡ L2). +/2 width=3 by drop_inv_O1_pair1_aux/ qed-. + +lemma drop_inv_pair1: ∀I,K,L2,V,s. ⬇[s, 0, 0] K.ⓑ{I}V ≡ L2 → L2 = K.ⓑ{I}V. +#I #K #L2 #V #s #H +elim (drop_inv_O1_pair1 … H) -H * // #H destruct +elim (lt_refl_false … H) +qed-. + +(* Basic_1: was: drop_gen_drop *) +lemma drop_inv_drop1_lt: ∀I,K,L2,V,s,m. + ⬇[s, 0, m] K.ⓑ{I}V ≡ L2 → 0 < m → ⬇[s, 0, m-1] K ≡ L2. +#I #K #L2 #V #s #m #H #Hm +elim (drop_inv_O1_pair1 … H) -H * // #H destruct +elim (lt_refl_false … Hm) +qed-. + +lemma drop_inv_drop1: ∀I,K,L2,V,s,m. + ⬇[s, 0, m+1] K.ⓑ{I}V ≡ L2 → ⬇[s, 0, m] K ≡ L2. +#I #K #L2 #V #s #m #H lapply (drop_inv_drop1_lt … H ?) -H // +qed-. + +fact drop_inv_skip1_aux: ∀L1,L2,s,l,m. ⬇[s, l, m] L1 ≡ L2 → 0 < l → + ∀I,K1,V1. L1 = K1.ⓑ{I}V1 → + ∃∃K2,V2. ⬇[s, l-1, m] K1 ≡ K2 & + ⬆[l-1, m] V2 ≡ V1 & + L2 = K2.ⓑ{I}V2. +#L1 #L2 #s #l #m * -L1 -L2 -l -m +[ #l #m #_ #_ #J #K1 #W1 #H destruct +| #I #L #V #H elim (lt_refl_false … H) +| #I #L1 #L2 #V #m #_ #H elim (lt_refl_false … H) +| #I #L1 #L2 #V1 #V2 #l #m #HL12 #HV21 #_ #J #K1 #W1 #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +(* Basic_1: was: drop_gen_skip_l *) +lemma drop_inv_skip1: ∀I,K1,V1,L2,s,l,m. ⬇[s, l, m] K1.ⓑ{I}V1 ≡ L2 → 0 < l → + ∃∃K2,V2. ⬇[s, l-1, m] K1 ≡ K2 & + ⬆[l-1, m] V2 ≡ V1 & + L2 = K2.ⓑ{I}V2. +/2 width=3 by drop_inv_skip1_aux/ qed-. + +lemma drop_inv_O1_pair2: ∀I,K,V,s,m,L1. ⬇[s, 0, m] L1 ≡ K.ⓑ{I}V → + (m = 0 ∧ L1 = K.ⓑ{I}V) ∨ + ∃∃I1,K1,V1. ⬇[s, 0, m-1] K1 ≡ K.ⓑ{I}V & L1 = K1.ⓑ{I1}V1 & 0 < m. +#I #K #V #s #m * +[ #H elim (drop_inv_atom1 … H) -H #H destruct +| #L1 #I1 #V1 #H + elim (drop_inv_O1_pair1 … H) -H * + [ #H1 #H2 destruct /3 width=1 by or_introl, conj/ + | /3 width=5 by ex3_3_intro, or_intror/ + ] +] +qed-. + +fact drop_inv_skip2_aux: ∀L1,L2,s,l,m. ⬇[s, l, m] L1 ≡ L2 → 0 < l → + ∀I,K2,V2. L2 = K2.ⓑ{I}V2 → + ∃∃K1,V1. ⬇[s, l-1, m] K1 ≡ K2 & + ⬆[l-1, m] V2 ≡ V1 & + L1 = K1.ⓑ{I}V1. +#L1 #L2 #s #l #m * -L1 -L2 -l -m +[ #l #m #_ #_ #J #K2 #W2 #H destruct +| #I #L #V #H elim (lt_refl_false … H) +| #I #L1 #L2 #V #m #_ #H elim (lt_refl_false … H) +| #I #L1 #L2 #V1 #V2 #l #m #HL12 #HV21 #_ #J #K2 #W2 #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +(* Basic_1: was: drop_gen_skip_r *) +lemma drop_inv_skip2: ∀I,L1,K2,V2,s,l,m. ⬇[s, l, m] L1 ≡ K2.ⓑ{I}V2 → 0 < l → + ∃∃K1,V1. ⬇[s, l-1, m] K1 ≡ K2 & ⬆[l-1, m] V2 ≡ V1 & + L1 = K1.ⓑ{I}V1. +/2 width=3 by drop_inv_skip2_aux/ qed-. + +lemma drop_inv_O1_gt: ∀L,K,m,s. ⬇[s, 0, m] L ≡ K → |L| < m → + s = Ⓣ ∧ K = ⋆. +#L elim L -L [| #L #Z #X #IHL ] #K #m #s #H normalize in ⊢ (?%?→?); #H1m +[ elim (drop_inv_atom1 … H) -H elim s -s /2 width=1 by conj/ + #_ #Hs lapply (Hs ?) // -Hs #H destruct elim (lt_zero_false … H1m) +| elim (drop_inv_O1_pair1 … H) -H * #H2m #HLK destruct + [ elim (lt_zero_false … H1m) + | elim (IHL … HLK) -IHL -HLK /2 width=1 by lt_plus_to_minus_r, conj/ + ] +] +qed-. + +(* Basic properties *********************************************************) + +lemma drop_refl_atom_O2: ∀s,l. ⬇[s, l, O] ⋆ ≡ ⋆. +/2 width=1 by drop_atom/ qed. + +(* Basic_1: was by definition: drop_refl *) +lemma drop_refl: ∀L,l,s. ⬇[s, l, 0] L ≡ L. +#L elim L -L // +#L #I #V #IHL #l #s @(nat_ind_plus … l) -l /2 width=1 by drop_pair, drop_skip/ +qed. + +lemma drop_drop_lt: ∀I,L1,L2,V,s,m. + ⬇[s, 0, m-1] L1 ≡ L2 → 0 < m → ⬇[s, 0, m] L1.ⓑ{I}V ≡ L2. +#I #L1 #L2 #V #s #m #HL12 #Hm >(plus_minus_m_m m 1) /2 width=1 by drop_drop/ +qed. + +lemma drop_skip_lt: ∀I,L1,L2,V1,V2,s,l,m. + ⬇[s, l-1, m] L1 ≡ L2 → ⬆[l-1, m] V2 ≡ V1 → 0 < l → + ⬇[s, l, m] L1. ⓑ{I} V1 ≡ L2.ⓑ{I}V2. +#I #L1 #L2 #V1 #V2 #s #l #m #HL12 #HV21 #Hl >(plus_minus_m_m l 1) /2 width=1 by drop_skip/ +qed. + +lemma drop_O1_le: ∀s,m,L. m ≤ |L| → ∃K. ⬇[s, 0, m] L ≡ K. +#s #m @(nat_ind_plus … m) -m /2 width=2 by ex_intro/ +#m #IHm * +[ #H elim (le_plus_xSy_O_false … H) +| #L #I #V normalize #H elim (IHm L) -IHm /3 width=2 by drop_drop, monotonic_pred, ex_intro/ +] +qed-. + +lemma drop_O1_lt: ∀s,L,m. m < |L| → ∃∃I,K,V. ⬇[s, 0, m] L ≡ K.ⓑ{I}V. +#s #L elim L -L +[ #m #H elim (lt_zero_false … H) +| #L #I #V #IHL #m @(nat_ind_plus … m) -m /2 width=4 by drop_pair, ex1_3_intro/ + #m #_ normalize #H elim (IHL m) -IHL /3 width=4 by drop_drop, lt_plus_to_minus_r, lt_plus_to_lt_l, ex1_3_intro/ +] +qed-. + +lemma drop_O1_pair: ∀L,K,m,s. ⬇[s, 0, m] L ≡ K → m ≤ |L| → ∀I,V. + ∃∃J,W. ⬇[s, 0, m] L.ⓑ{I}V ≡ K.ⓑ{J}W. +#L elim L -L [| #L #Z #X #IHL ] #K #m #s #H normalize #Hm #I #V +[ elim (drop_inv_atom1 … H) -H #H <(le_n_O_to_eq … Hm) -m + #Hs destruct /2 width=3 by ex1_2_intro/ +| elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK destruct /2 width=3 by ex1_2_intro/ + elim (IHL … HLK … Z X) -IHL -HLK + /3 width=3 by drop_drop_lt, le_plus_to_minus, ex1_2_intro/ +] +qed-. + +lemma drop_O1_ge: ∀L,m. |L| ≤ m → ⬇[Ⓣ, 0, m] L ≡ ⋆. +#L elim L -L [ #m #_ @drop_atom #H destruct ] +#L #I #V #IHL #m @(nat_ind_plus … m) -m [ #H elim (le_plus_xSy_O_false … H) ] +normalize /4 width=1 by drop_drop, monotonic_pred/ +qed. + +lemma drop_O1_eq: ∀L,s. ⬇[s, 0, |L|] L ≡ ⋆. +#L elim L -L /2 width=1 by drop_drop, drop_atom/ +qed. + +lemma drop_split: ∀L1,L2,l,m2,s. ⬇[s, l, m2] L1 ≡ L2 → ∀m1. m1 ≤ m2 → + ∃∃L. ⬇[s, l, m2 - m1] L1 ≡ L & ⬇[s, l, m1] L ≡ L2. +#L1 #L2 #l #m2 #s #H elim H -L1 -L2 -l -m2 +[ #l #m2 #Hs #m1 #Hm12 @(ex2_intro … (⋆)) + @drop_atom #H lapply (Hs H) -s #H destruct /2 width=1 by le_n_O_to_eq/ +| #I #L1 #V #m1 #Hm1 lapply (le_n_O_to_eq … Hm1) -Hm1 + #H destruct /2 width=3 by ex2_intro/ +| #I #L1 #L2 #V #m2 #HL12 #IHL12 #m1 @(nat_ind_plus … m1) -m1 + [ /3 width=3 by drop_drop, ex2_intro/ + | -HL12 #m1 #_ #Hm12 lapply (le_plus_to_le_r … Hm12) -Hm12 + #Hm12 elim (IHL12 … Hm12) -IHL12 >minus_plus_plus_l + #L #HL1 #HL2 elim (lt_or_ge (|L1|) (m2-m1)) #H0 + [ elim (drop_inv_O1_gt … HL1 H0) -HL1 #H1 #H2 destruct + elim (drop_inv_atom1 … HL2) -HL2 #H #_ destruct + @(ex2_intro … (⋆)) [ @drop_O1_ge normalize // ] + @drop_atom #H destruct + | elim (drop_O1_pair … HL1 H0 I V) -HL1 -H0 /3 width=5 by drop_drop, ex2_intro/ + ] + ] +| #I #L1 #L2 #V1 #V2 #l #m2 #_ #HV21 #IHL12 #m1 #Hm12 elim (IHL12 … Hm12) -IHL12 + #L #HL1 #HL2 elim (lift_split … HV21 l m1) -HV21 /3 width=5 by drop_skip, ex2_intro/ +] +qed-. + +lemma drop_FT: ∀L1,L2,l,m. ⬇[Ⓕ, l, m] L1 ≡ L2 → ⬇[Ⓣ, l, m] L1 ≡ L2. +#L1 #L2 #l #m #H elim H -L1 -L2 -l -m +/3 width=1 by drop_atom, drop_drop, drop_skip/ +qed. + +lemma drop_gen: ∀L1,L2,s,l,m. ⬇[Ⓕ, l, m] L1 ≡ L2 → ⬇[s, l, m] L1 ≡ L2. +#L1 #L2 * /2 width=1 by drop_FT/ +qed-. + +lemma drop_T: ∀L1,L2,s,l,m. ⬇[s, l, m] L1 ≡ L2 → ⬇[Ⓣ, l, m] L1 ≡ L2. +#L1 #L2 * /2 width=1 by drop_FT/ +qed-. + +lemma d_liftable_LTC: ∀R. d_liftable R → d_liftable (LTC … R). +#R #HR #K #T1 #T2 #H elim H -T2 +[ /3 width=10 by inj/ +| #T #T2 #_ #HT2 #IHT1 #L #s #l #m #HLK #U1 #HTU1 #U2 #HTU2 + elim (lift_total T l m) /4 width=12 by step/ +] +qed-. + +lemma d_deliftable_sn_LTC: ∀R. d_deliftable_sn R → d_deliftable_sn (LTC … R). +#R #HR #L #U1 #U2 #H elim H -U2 +[ #U2 #HU12 #K #s #l #m #HLK #T1 #HTU1 + elim (HR … HU12 … HLK … HTU1) -HR -L -U1 /3 width=3 by inj, ex2_intro/ +| #U #U2 #_ #HU2 #IHU1 #K #s #l #m #HLK #T1 #HTU1 + elim (IHU1 … HLK … HTU1) -IHU1 -U1 #T #HTU #HT1 + elim (HR … HU2 … HLK … HTU) -HR -L -U /3 width=5 by step, ex2_intro/ +] +qed-. + +lemma dropable_sn_TC: ∀R. dropable_sn R → dropable_sn (TC … R). +#R #HR #L1 #K1 #s #l #m #HLK1 #L2 #H elim H -L2 +[ #L2 #HL12 elim (HR … HLK1 … HL12) -HR -L1 + /3 width=3 by inj, ex2_intro/ +| #L #L2 #_ #HL2 * #K #HK1 #HLK elim (HR … HLK … HL2) -HR -L + /3 width=3 by step, ex2_intro/ +] +qed-. + +lemma dropable_dx_TC: ∀R. dropable_dx R → dropable_dx (TC … R). +#R #HR #L1 #L2 #H elim H -L2 +[ #L2 #HL12 #K2 #s #m #HLK2 elim (HR … HL12 … HLK2) -HR -L2 + /3 width=3 by inj, ex2_intro/ +| #L #L2 #_ #HL2 #IHL1 #K2 #s #m #HLK2 elim (HR … HL2 … HLK2) -HR -L2 + #K #HLK #HK2 elim (IHL1 … HLK) -L + /3 width=5 by step, ex2_intro/ +] +qed-. + +lemma d_deliftable_sn_llstar: ∀R. d_deliftable_sn R → + ∀d. d_deliftable_sn (llstar … R d). +#R #HR #d #L #U1 #U2 #H @(lstar_ind_r … d U2 H) -d -U2 +[ /2 width=3 by lstar_O, ex2_intro/ +| #d #U #U2 #_ #HU2 #IHU1 #K #s #l #m #HLK #T1 #HTU1 + elim (IHU1 … HLK … HTU1) -IHU1 -U1 #T #HTU #HT1 + elim (HR … HU2 … HLK … HTU) -HR -L -U /3 width=5 by lstar_dx, ex2_intro/ +] +qed-. + +(* Basic forward lemmas *****************************************************) + +(* Basic_1: was: drop_S *) +lemma drop_fwd_drop2: ∀L1,I2,K2,V2,s,m. ⬇[s, O, m] L1 ≡ K2. ⓑ{I2} V2 → + ⬇[s, O, m + 1] L1 ≡ K2. +#L1 elim L1 -L1 +[ #I2 #K2 #V2 #s #m #H lapply (drop_inv_atom1 … H) -H * #H destruct +| #K1 #I1 #V1 #IHL1 #I2 #K2 #V2 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #H + [ -IHL1 destruct /2 width=1 by drop_drop/ + | @drop_drop >(plus_minus_m_m m 1) /2 width=3 by/ + ] +] +qed-. + +lemma drop_fwd_length_ge: ∀L1,L2,l,m,s. ⬇[s, l, m] L1 ≡ L2 → |L1| ≤ l → |L2| = |L1|. +#L1 #L2 #l #m #s #H elim H -L1 -L2 -l -m // normalize +[ #I #L1 #L2 #V #m #_ #_ #H elim (le_plus_xSy_O_false … H) +| /4 width=2 by le_plus_to_le_r, eq_f/ +] +qed-. + +lemma drop_fwd_length_le_le: ∀L1,L2,l,m,s. ⬇[s, l, m] L1 ≡ L2 → l ≤ |L1| → m ≤ |L1| - l → |L2| = |L1| - m. +#L1 #L2 #l #m #s #H elim H -L1 -L2 -l -m // normalize +[ /3 width=2 by le_plus_to_le_r/ +| #I #L1 #L2 #V1 #V2 #l #m #_ #_ #IHL12 >minus_plus_plus_l + #Hl #Hm lapply (le_plus_to_le_r … Hl) -Hl + #Hl >IHL12 // -L2 >plus_minus /2 width=3 by transitive_le/ +] +qed-. + +lemma drop_fwd_length_le_ge: ∀L1,L2,l,m,s. ⬇[s, l, m] L1 ≡ L2 → l ≤ |L1| → |L1| - l ≤ m → |L2| = l. +#L1 #L2 #l #m #s #H elim H -L1 -L2 -l -m normalize +[ /2 width=1 by le_n_O_to_eq/ +| #I #L #V #_ (lift_fwd_tw … HV21) -HV21 /2 width=1 by monotonic_le_plus_l/ +] +qed-. + +lemma drop_fwd_lw_lt: ∀L1,L2,l,m. ⬇[Ⓕ, l, m] L1 ≡ L2 → 0 < m → ♯{L2} < ♯{L1}. +#L1 #L2 #l #m #H elim H -L1 -L2 -l -m +[ #l #m #H >H -H // +| #I #L #V #H elim (lt_refl_false … H) +| #I #L1 #L2 #V #m #HL12 #_ #_ + lapply (drop_fwd_lw … HL12) -HL12 #HL12 + @(le_to_lt_to_lt … HL12) -HL12 // +| #I #L1 #L2 #V1 #V2 #l #m #_ #HV21 #IHL12 #H normalize in ⊢ (?%%); -I + >(lift_fwd_tw … HV21) -V2 /3 by lt_minus_to_plus/ +] +qed-. + +lemma drop_fwd_rfw: ∀I,L,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → ∀T. ♯{K, V} < ♯{L, T}. +#I #L #K #V #i #HLK lapply (drop_fwd_lw … HLK) -HLK +normalize in ⊢ (%→?→?%%); /3 width=3 by le_to_lt_to_lt/ +qed-. + +(* Advanced inversion lemmas ************************************************) + +fact drop_inv_O2_aux: ∀L1,L2,s,l,m. ⬇[s, l, m] L1 ≡ L2 → m = 0 → L1 = L2. +#L1 #L2 #s #l #m #H elim H -L1 -L2 -l -m +[ // +| // +| #I #L1 #L2 #V #m #_ #_ >commutative_plus normalize #H destruct +| #I #L1 #L2 #V1 #V2 #l #m #_ #HV21 #IHL12 #H + >(IHL12 H) -L1 >(lift_inv_O2_aux … HV21 … H) -V2 -l -m // +] +qed-. + +(* Basic_1: was: drop_gen_refl *) +lemma drop_inv_O2: ∀L1,L2,s,l. ⬇[s, l, 0] L1 ≡ L2 → L1 = L2. +/2 width=5 by drop_inv_O2_aux/ qed-. + +lemma drop_inv_length_eq: ∀L1,L2,l,m. ⬇[Ⓕ, l, m] L1 ≡ L2 → |L1| = |L2| → m = 0. +#L1 #L2 #l #m #H #HL12 lapply (drop_fwd_length_minus4 … H) // +qed-. + +lemma drop_inv_refl: ∀L,l,m. ⬇[Ⓕ, l, m] L ≡ L → m = 0. +/2 width=5 by drop_inv_length_eq/ qed-. + +fact drop_inv_FT_aux: ∀L1,L2,s,l,m. ⬇[s, l, m] L1 ≡ L2 → + ∀I,K,V. L2 = K.ⓑ{I}V → s = Ⓣ → l = 0 → + ⬇[Ⓕ, l, m] L1 ≡ K.ⓑ{I}V. +#L1 #L2 #s #l #m #H elim H -L1 -L2 -l -m +[ #l #m #_ #J #K #W #H destruct +| #I #L #V #J #K #W #H destruct // +| #I #L1 #L2 #V #m #_ #IHL12 #J #K #W #H1 #H2 destruct + /3 width=1 by drop_drop/ +| #I #L1 #L2 #V1 #V2 #l #m #_ #_ #_ #J #K #W #_ #_ + commutative_plus normalize #H destruct +| minus_minus_comm /3 width=1 by monotonic_pred/ +] +qed-. + +lemma drop_O1_inv_append1_le: ∀K,L1,L2,s,m. ⬇[s, 0, m] L1 @@ L2 ≡ K → m ≤ |L2| → + ∀K2. ⬇[s, 0, m] L2 ≡ K2 → K = L1 @@ K2. +#K #L1 #L2 elim L2 -L2 normalize +[ #s #m #H1 #H2 #K2 #H3 lapply (le_n_O_to_eq … H2) -H2 + #H2 elim (drop_inv_atom1 … H3) -H3 #H3 #_ destruct + >(drop_inv_O2 … H1) -H1 // +| #L2 #I #V #IHL2 #s #m @(nat_ind_plus … m) -m [ -IHL2 ] + [ #H1 #_ #K2 #H2 + lapply (drop_inv_O2 … H1) -H1 #H1 + lapply (drop_inv_O2 … H2) -H2 #H2 destruct // + | /4 width=7 by drop_inv_drop1, le_plus_to_le_r/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/drop_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/drop_drop.ma new file mode 100644 index 000000000..0ee0f74cd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/drop_drop.ma @@ -0,0 +1,208 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lift_lift.ma". +include "basic_2A/substitution/drop.ma". + +(* BASIC SLICING FOR LOCAL ENVIRONMENTS *************************************) + +(* Main properties **********************************************************) + +(* Basic_1: was: drop_mono *) +theorem drop_mono: ∀L,L1,s1,l,m. ⬇[s1, l, m] L ≡ L1 → + ∀L2,s2. ⬇[s2, l, m] L ≡ L2 → L1 = L2. +#L #L1 #s1 #l #m #H elim H -L -L1 -l -m +[ #l #m #Hm #L2 #s2 #H elim (drop_inv_atom1 … H) -H // +| #I #K #V #L2 #s2 #HL12 <(drop_inv_O2 … HL12) -L2 // +| #I #L #K #V #m #_ #IHLK #L2 #s2 #H + lapply (drop_inv_drop1 … H) -H /2 width=2 by/ +| #I #L #K1 #T #V1 #l #m #_ #HVT1 #IHLK1 #X #s2 #H + elim (drop_inv_skip1 … H) -H // (lift_inj … HVT1 … HVT2) -HVT1 -HVT2 + >(IHLK1 … HLK2) -IHLK1 -HLK2 // +] +qed-. + +(* Basic_1: was: drop_conf_ge *) +theorem drop_conf_ge: ∀L,L1,s1,l1,m1. ⬇[s1, l1, m1] L ≡ L1 → + ∀L2,s2,m2. ⬇[s2, 0, m2] L ≡ L2 → l1 + m1 ≤ m2 → + ⬇[s2, 0, m2 - m1] L1 ≡ L2. +#L #L1 #s1 #l1 #m1 #H elim H -L -L1 -l1 -m1 // +[ #l #m #_ #L2 #s2 #m2 #H #_ elim (drop_inv_atom1 … H) -H + #H #Hm destruct + @drop_atom #H >Hm // (**) (* explicit constructor *) +| #I #L #K #V #m #_ #IHLK #L2 #s2 #m2 #H #Hm2 + lapply (drop_inv_drop1_lt … H ?) -H /2 width=2 by ltn_to_ltO/ #HL2 + minus_minus_comm /3 width=1 by monotonic_pred/ +| #I #L #K #V1 #V2 #l #m #_ #_ #IHLK #L2 #s2 #m2 #H #Hlmm2 + lapply (transitive_le 1 … Hlmm2) // #Hm2 + lapply (drop_inv_drop1_lt … H ?) -H // -Hm2 #HL2 + lapply (transitive_le (1+m) … Hlmm2) // #Hmm2 + @drop_drop_lt >minus_minus_comm /3 width=1 by lt_minus_to_plus_r, monotonic_le_minus_r, monotonic_pred/ (**) (* explicit constructor *) +] +qed. + +(* Note: apparently this was missing in basic_1 *) +theorem drop_conf_be: ∀L0,L1,s1,l1,m1. ⬇[s1, l1, m1] L0 ≡ L1 → + ∀L2,m2. ⬇[m2] L0 ≡ L2 → l1 ≤ m2 → m2 ≤ l1 + m1 → + ∃∃L. ⬇[s1, 0, l1 + m1 - m2] L2 ≡ L & ⬇[l1] L1 ≡ L. +#L0 #L1 #s1 #l1 #m1 #H elim H -L0 -L1 -l1 -m1 +[ #l1 #m1 #Hm1 #L2 #m2 #H #Hl1 #_ elim (drop_inv_atom1 … H) -H #H #Hm2 destruct + >(Hm2 ?) in Hl1; // -Hm2 #Hl1 <(le_n_O_to_eq … Hl1) -l1 + /4 width=3 by drop_atom, ex2_intro/ +| normalize #I #L #V #L2 #m2 #HL2 #_ #Hm2 + lapply (le_n_O_to_eq … Hm2) -Hm2 #H destruct + lapply (drop_inv_O2 … HL2) -HL2 #H destruct /2 width=3 by drop_pair, ex2_intro/ +| normalize #I #L0 #K0 #V1 #m1 #HLK0 #IHLK0 #L2 #m2 #H #_ #Hm21 + lapply (drop_inv_O1_pair1 … H) -H * * #Hm2 #HL20 + [ -IHLK0 -Hm21 destruct plus_plus_comm_23 #_ #_ #IHLK0 #L2 #m2 #H #Hl1m2 #Hm2lm1 + elim (le_inv_plus_l … Hl1m2) #_ #Hm2 + minus_le_minus_minus_comm /3 width=3 by drop_drop_lt, ex2_intro/ + ] +] +qed-. + +(* Note: with "s2", the conclusion parameter is "s1 ∨ s2" *) +(* Basic_1: was: drop_trans_ge *) +theorem drop_trans_ge: ∀L1,L,s1,l1,m1. ⬇[s1, l1, m1] L1 ≡ L → + ∀L2,m2. ⬇[m2] L ≡ L2 → l1 ≤ m2 → ⬇[s1, 0, m1 + m2] L1 ≡ L2. +#L1 #L #s1 #l1 #m1 #H elim H -L1 -L -l1 -m1 +[ #l1 #m1 #Hm1 #L2 #m2 #H #_ elim (drop_inv_atom1 … H) -H + #H #Hm2 destruct /4 width=1 by drop_atom, eq_f2/ +| /2 width=1 by drop_gen/ +| /3 width=1 by drop_drop/ +| #I #L1 #L2 #V1 #V2 #l #m #_ #_ #IHL12 #L #m2 #H #Hlm2 + lapply (lt_to_le_to_lt 0 … Hlm2) // #Hm2 + lapply (lt_to_le_to_lt … (m + m2) Hm2 ?) // #Hmm2 + lapply (drop_inv_drop1_lt … H ?) -H // #HL2 + @drop_drop_lt // >le_plus_minus /3 width=1 by monotonic_pred/ +] +qed. + +(* Basic_1: was: drop_trans_le *) +theorem drop_trans_le: ∀L1,L,s1,l1,m1. ⬇[s1, l1, m1] L1 ≡ L → + ∀L2,s2,m2. ⬇[s2, 0, m2] L ≡ L2 → m2 ≤ l1 → + ∃∃L0. ⬇[s2, 0, m2] L1 ≡ L0 & ⬇[s1, l1 - m2, m1] L0 ≡ L2. +#L1 #L #s1 #l1 #m1 #H elim H -L1 -L -l1 -m1 +[ #l1 #m1 #Hm1 #L2 #s2 #m2 #H #_ elim (drop_inv_atom1 … H) -H + #H #Hm2 destruct /4 width=3 by drop_atom, ex2_intro/ +| #I #K #V #L2 #s2 #m2 #HL2 #H lapply (le_n_O_to_eq … H) -H + #H destruct /2 width=3 by drop_pair, ex2_intro/ +| #I #L1 #L2 #V #m #_ #IHL12 #L #s2 #m2 #HL2 #H lapply (le_n_O_to_eq … H) -H + #H destruct elim (IHL12 … HL2) -IHL12 -HL2 // + #L0 #H #HL0 lapply (drop_inv_O2 … H) -H #H destruct + /3 width=5 by drop_pair, drop_drop, ex2_intro/ +| #I #L1 #L2 #V1 #V2 #l #m #HL12 #HV12 #IHL12 #L #s2 #m2 #H #Hm2l + elim (drop_inv_O1_pair1 … H) -H * + [ -Hm2l -IHL12 #H1 #H2 destruct /3 width=5 by drop_pair, drop_skip, ex2_intro/ + | -HL12 -HV12 #Hm2 #HL2 + elim (IHL12 … HL2) -L2 [ >minus_le_minus_minus_comm // /3 width=3 by drop_drop_lt, ex2_intro/ | /2 width=1 by monotonic_pred/ ] + ] +] +qed-. + +(* Advanced properties ******************************************************) + +lemma d_liftable_llstar: ∀R. d_liftable R → ∀d. d_liftable (llstar … R d). +#R #HR #d #K #T1 #T2 #H @(lstar_ind_r … d T2 H) -d -T2 +[ #L #s #l #m #_ #U1 #HTU1 #U2 #HTU2 -HR -K + >(lift_mono … HTU2 … HTU1) -T1 -U2 -l -m // +| #d #T #T2 #_ #HT2 #IHT1 #L #s #l #m #HLK #U1 #HTU1 #U2 #HTU2 + elim (lift_total T l m) /3 width=12 by lstar_dx/ +] +qed-. + +(* Basic_1: was: drop_conf_lt *) +lemma drop_conf_lt: ∀L,L1,s1,l1,m1. ⬇[s1, l1, m1] L ≡ L1 → + ∀I,K2,V2,s2,m2. ⬇[s2, 0, m2] L ≡ K2.ⓑ{I}V2 → + m2 < l1 → let l ≝ l1 - m2 - 1 in + ∃∃K1,V1. ⬇[s2, 0, m2] L1 ≡ K1.ⓑ{I}V1 & + ⬇[s1, l, m1] K2 ≡ K1 & ⬆[l, m1] V1 ≡ V2. +#L #L1 #s1 #l1 #m1 #H1 #I #K2 #V2 #s2 #m2 #H2 #Hm2l1 +elim (drop_conf_le … H1 … H2) -L /2 width=2 by lt_to_le/ #K #HL1K #HK2 +elim (drop_inv_skip1 … HK2) -HK2 /2 width=1 by lt_plus_to_minus_r/ +#K1 #V1 #HK21 #HV12 #H destruct /2 width=5 by ex3_2_intro/ +qed-. + +(* Note: apparently this was missing in basic_1 *) +lemma drop_trans_lt: ∀L1,L,s1,l1,m1. ⬇[s1, l1, m1] L1 ≡ L → + ∀I,L2,V2,s2,m2. ⬇[s2, 0, m2] L ≡ L2.ⓑ{I}V2 → + m2 < l1 → let l ≝ l1 - m2 - 1 in + ∃∃L0,V0. ⬇[s2, 0, m2] L1 ≡ L0.ⓑ{I}V0 & + ⬇[s1, l, m1] L0 ≡ L2 & ⬆[l, m1] V2 ≡ V0. +#L1 #L #s1 #l1 #m1 #HL1 #I #L2 #V2 #s2 #m2 #HL2 #Hl21 +elim (drop_trans_le … HL1 … HL2) -L /2 width=1 by lt_to_le/ #L0 #HL10 #HL02 +elim (drop_inv_skip2 … HL02) -HL02 /2 width=1 by lt_plus_to_minus_r/ #L #V1 #HL2 #HV21 #H destruct /2 width=5 by ex3_2_intro/ +qed-. + +lemma drop_trans_ge_comm: ∀L1,L,L2,s1,l1,m1,m2. + ⬇[s1, l1, m1] L1 ≡ L → ⬇[m2] L ≡ L2 → l1 ≤ m2 → + ⬇[s1, 0, m2 + m1] L1 ≡ L2. +#L1 #L #L2 #s1 #l1 #m1 #m2 +>commutative_plus /2 width=5 by drop_trans_ge/ +qed. + +lemma drop_conf_div: ∀I1,L,K,V1,m1. ⬇[m1] L ≡ K.ⓑ{I1}V1 → + ∀I2,V2,m2. ⬇[m2] L ≡ K.ⓑ{I2}V2 → + ∧∧ m1 = m2 & I1 = I2 & V1 = V2. +#I1 #L #K #V1 #m1 #HLK1 #I2 #V2 #m2 #HLK2 +elim (le_or_ge m1 m2) #Hm +[ lapply (drop_conf_ge … HLK1 … HLK2 ?) +| lapply (drop_conf_ge … HLK2 … HLK1 ?) +] -HLK1 -HLK2 // #HK +lapply (drop_fwd_length_minus2 … HK) #H +elim (discr_minus_x_xy … H) -H +[1,3: normalize H in HK; #HK +lapply (drop_inv_O2 … HK) -HK #H destruct +lapply (inv_eq_minus_O … H) -H /3 width=1 by le_to_le_to_eq, and3_intro/ +qed-. + +(* Advanced forward lemmas **************************************************) + +lemma drop_fwd_be: ∀L,K,s,l,m,i. ⬇[s, l, m] L ≡ K → |K| ≤ i → i < l → |L| ≤ i. +#L #K #s #l #m #i #HLK #HK #Hl elim (lt_or_ge i (|L|)) // +#HL elim (drop_O1_lt (Ⓕ) … HL) #I #K0 #V #HLK0 -HL +elim (drop_conf_lt … HLK … HLK0) // -HLK -HLK0 -Hl +#K1 #V1 #HK1 #_ #_ lapply (drop_fwd_length_lt2 … HK1) -I -K1 -V1 +#H elim (lt_refl_false i) /2 width=3 by lt_to_le_to_lt/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/drop_lreq.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/drop_lreq.ma new file mode 100644 index 000000000..ad39fd7c3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/drop_lreq.ma @@ -0,0 +1,92 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/lreq_lreq.ma". +include "basic_2A/substitution/drop.ma". + +(* BASIC SLICING FOR LOCAL ENVIRONMENTS *************************************) + +definition dedropable_sn: predicate (relation lenv) ≝ + λR. ∀L1,K1,s,l,m. ⬇[s, l, m] L1 ≡ K1 → ∀K2. R K1 K2 → + ∃∃L2. R L1 L2 & ⬇[s, l, m] L2 ≡ K2 & L1 ⩬[l, m] L2. + +(* Properties on equivalence ************************************************) + +lemma lreq_drop_trans_be: ∀L1,L2,l,m. L1 ⩬[l, m] L2 → + ∀I,K2,W,s,i. ⬇[s, 0, i] L2 ≡ K2.ⓑ{I}W → + l ≤ i → i < l + m → + ∃∃K1. K1 ⩬[0, ⫰(l+m-i)] K2 & ⬇[s, 0, i] L1 ≡ K1.ⓑ{I}W. +#L1 #L2 #l #m #H elim H -L1 -L2 -l -m +[ #l #m #J #K2 #W #s #i #H + elim (drop_inv_atom1 … H) -H #H destruct +| #I1 #I2 #L1 #L2 #V1 #V2 #_ #_ #J #K2 #W #s #i #_ #_ #H + elim (ylt_yle_false … H) // +| #I #L1 #L2 #V #m #HL12 #IHL12 #J #K2 #W #s #i #H #_ >yplus_O1 + elim (drop_inv_O1_pair1 … H) -H * #Hi #HLK1 [ -IHL12 | -HL12 ] + [ #_ destruct >ypred_succ + /2 width=3 by drop_pair, ex2_intro/ + | lapply (ylt_inv_O1 i ?) /2 width=1 by ylt_inj/ + #H yminus_succ yplus_succ1 #H lapply (ylt_inv_succ … H) -H + #Hilm lapply (drop_inv_drop1_lt … HLK2 ?) -HLK2 /2 width=1 by ylt_O/ + #HLK1 elim (IHL12 … HLK1) -IHL12 -HLK1 yminus_SO2 + /4 width=3 by ylt_O, drop_drop_lt, ex2_intro/ +] +qed-. + +lemma lreq_drop_conf_be: ∀L1,L2,l,m. L1 ⩬[l, m] L2 → + ∀I,K1,W,s,i. ⬇[s, 0, i] L1 ≡ K1.ⓑ{I}W → + l ≤ i → i < l + m → + ∃∃K2. K1 ⩬[0, ⫰(l+m-i)] K2 & ⬇[s, 0, i] L2 ≡ K2.ⓑ{I}W. +#L1 #L2 #l #m #HL12 #I #K1 #W #s #i #HLK1 #Hli #Hilm +elim (lreq_drop_trans_be … (lreq_sym … HL12) … HLK1) // -L1 -Hli -Hilm +/3 width=3 by lreq_sym, ex2_intro/ +qed-. + +lemma drop_O1_ex: ∀K2,i,L1. |L1| = |K2| + i → + ∃∃L2. L1 ⩬[0, i] L2 & ⬇[i] L2 ≡ K2. +#K2 #i @(nat_ind_plus … i) -i +[ /3 width=3 by lreq_O2, ex2_intro/ +| #i #IHi #Y #Hi elim (drop_O1_lt (Ⓕ) Y 0) // + #I #L1 #V #H lapply (drop_inv_O2 … H) -H #H destruct + normalize in Hi; elim (IHi L1) -IHi + /3 width=5 by drop_drop, lreq_pair, injective_plus_l, ex2_intro/ +] +qed-. + +lemma dedropable_sn_TC: ∀R. dedropable_sn R → dedropable_sn (TC … R). +#R #HR #L1 #K1 #s #l #m #HLK1 #K2 #H elim H -K2 +[ #K2 #HK12 elim (HR … HLK1 … HK12) -HR -K1 + /3 width=4 by inj, ex3_intro/ +| #K #K2 #_ #HK2 * #L #H1L1 #HLK #H2L1 elim (HR … HLK … HK2) -HR -K + /3 width=6 by lreq_trans, step, ex3_intro/ +] +qed-. + +(* Inversion lemmas on equivalence ******************************************) + +lemma drop_O1_inj: ∀i,L1,L2,K. ⬇[i] L1 ≡ K → ⬇[i] L2 ≡ K → L1 ⩬[i, ∞] L2. +#i @(nat_ind_plus … i) -i +[ #L1 #L2 #K #H <(drop_inv_O2 … H) -K #H <(drop_inv_O2 … H) -L1 // +| #i #IHi * [2: #L1 #I1 #V1 ] * [2,4: #L2 #I2 #V2 ] #K #HLK1 #HLK2 // + lapply (drop_fwd_length … HLK1) + <(drop_fwd_length … HLK2) [ /4 width=5 by drop_inv_drop1, lreq_succ/ ] + normalize (plus_minus_m_m m 1) /2 width=3 by fqu_drop/ +qed. + +lemma fqu_lref_S_lt: ∀I,G,L,V,i. 0 < i → ⦃G, L.ⓑ{I}V, #i⦄ ⊐ ⦃G, L, #(i-1)⦄. +/3 width=3 by fqu_drop, drop_drop, lift_lref_ge_minus/ +qed. + +(* Basic forward lemmas *****************************************************) + +lemma fqu_fwd_fw: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → ♯{G2, L2, T2} < ♯{G1, L1, T1}. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 // +#G #L #K #T #U #m #HLK #HTU +lapply (drop_fwd_lw_lt … HLK ?) -HLK // #HKL +lapply (lift_fwd_tw … HTU) -m #H +normalize in ⊢ (?%%); /2 width=1 by lt_minus_to_plus/ +qed-. + +fact fqu_fwd_length_lref1_aux: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀i. T1 = #i → |L2| < |L1|. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +[1: normalize // +|3: #a +|5: /2 width=4 by drop_fwd_length_lt4/ +] #I #G #L #V #T #j #H destruct +qed-. + +lemma fqu_fwd_length_lref1: ∀G1,G2,L1,L2,T2,i. ⦃G1, L1, #i⦄ ⊐ ⦃G2, L2, T2⦄ → |L2| < |L1|. +/2 width=7 by fqu_fwd_length_lref1_aux/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact fqu_inv_eq_aux: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + G1 = G2 → |L1| = |L2| → T1 = T2 → ⊥. +#G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2 normalize +/2 width=4 by discr_tpair_xy_y, discr_tpair_xy_x, plus_xSy_x_false/ +#G #L #K #T #U #m #HLK #_ #_ #H #_ -G -T -U >(drop_fwd_length … HLK) in H; -L +/2 width=4 by plus_xySz_x_false/ +qed-. + +lemma fqu_inv_eq: ∀G,L1,L2,T. ⦃G, L1, T⦄ ⊐ ⦃G, L2, T⦄ → |L1| = |L2| → ⊥. +#G #L1 #L2 #T #H #H0 @(fqu_inv_eq_aux … H … H0) // (**) (* full auto fails *) +qed-. + +(* Advanced eliminators *****************************************************) + +lemma fqu_wf_ind: ∀R:relation3 …. ( + ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → R G2 L2 T2) → + R G1 L1 T1 + ) → ∀G1,L1,T1. R G1 L1 T1. +#R #HR @(f3_ind … fw) #x #IHx #G1 #L1 #T1 #H destruct /4 width=1 by fqu_fwd_fw/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/fquq.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/fquq.ma new file mode 100644 index 000000000..0893a0b91 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/fquq.ma @@ -0,0 +1,64 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/suptermopt_6.ma". +include "basic_2A/substitution/fqu.ma". + +(* OPTIONAL SUPCLOSURE ******************************************************) + +(* activate genv *) +inductive fquq: tri_relation genv lenv term ≝ +| fquq_lref_O : ∀I,G,L,V. fquq G (L.ⓑ{I}V) (#0) G L V +| fquq_pair_sn: ∀I,G,L,V,T. fquq G L (②{I}V.T) G L V +| fquq_bind_dx: ∀a,I,G,L,V,T. fquq G L (ⓑ{a,I}V.T) G (L.ⓑ{I}V) T +| fquq_flat_dx: ∀I,G, L,V,T. fquq G L (ⓕ{I}V.T) G L T +| fquq_drop : ∀G,L,K,T,U,m. + ⬇[m] L ≡ K → ⬆[0, m] T ≡ U → fquq G L U G K T +. + +interpretation + "optional structural successor (closure)" + 'SupTermOpt G1 L1 T1 G2 L2 T2 = (fquq G1 L1 T1 G2 L2 T2). + +(* Basic properties *********************************************************) + +lemma fquq_refl: tri_reflexive … fquq. +/2 width=3 by fquq_drop/ qed. + +lemma fqu_fquq: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -L1 -L2 -T1 -T2 /2 width=3 by fquq_drop/ +qed. + +(* Basic forward lemmas *****************************************************) + +lemma fquq_fwd_fw: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → ♯{G2, L2, T2} ≤ ♯{G1, L1, T1}. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 /2 width=1 by lt_to_le/ +#G1 #L1 #K1 #T1 #U1 #m #HLK1 #HTU1 +lapply (drop_fwd_lw … HLK1) -HLK1 +lapply (lift_fwd_tw … HTU1) -HTU1 +/2 width=1 by le_plus, le_n/ +qed-. + +fact fquq_fwd_length_lref1_aux: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀i. T1 = #i → |L2| ≤ |L1|. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 // +[ #a #I #G #L #V #T #j #H destruct +| #G1 #L1 #K1 #T1 #U1 #m #HLK1 #HTU1 #i #H destruct + /2 width=3 by drop_fwd_length_le4/ +] +qed-. + +lemma fquq_fwd_length_lref1: ∀G1,G2,L1,L2,T2,i. ⦃G1, L1, #i⦄ ⊐⸮ ⦃G2, L2, T2⦄ → |L2| ≤ |L1|. +/2 width=7 by fquq_fwd_length_lref1_aux/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/fquq_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/fquq_alt.ma new file mode 100644 index 000000000..57d9332be --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/fquq_alt.ma @@ -0,0 +1,59 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/suptermoptalt_6.ma". +include "basic_2A/substitution/fquq.ma". + +(* OPTIONAL SUPCLOSURE ******************************************************) + +(* alternative definition of fquq *) +definition fquqa: tri_relation genv lenv term ≝ tri_RC … fqu. + +interpretation + "optional structural successor (closure) alternative" + 'SupTermOptAlt G1 L1 T1 G2 L2 T2 = (fquqa G1 L1 T1 G2 L2 T2). + +(* Basic properties *********************************************************) + +lemma fquqa_refl: tri_reflexive … fquqa. +// qed. + +lemma fquqa_drop: ∀G,L,K,T,U,m. + ⬇[m] L ≡ K → ⬆[0, m] T ≡ U → ⦃G, L, U⦄ ⊐⊐⸮ ⦃G, K, T⦄. +#G #L #K #T #U #m #HLK #HTU elim (eq_or_gt m) +/3 width=5 by fqu_drop_lt, or_introl/ #H destruct +>(drop_inv_O2 … HLK) -L >(lift_inv_O2 … HTU) -T // +qed. + +(* Main properties **********************************************************) + +theorem fquq_fquqa: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐⊐⸮ ⦃G2, L2, T2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +/2 width=3 by fquqa_drop, fqu_lref_O, fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, or_introl/ +qed. + +(* Main inversion properties ************************************************) + +theorem fquqa_inv_fquq: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⊐⸮ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -H /2 width=1 by fqu_fquq/ +* #H1 #H2 #H3 destruct // +qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma fquq_inv_gen: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ ∨ (∧∧ G1 = G2 & L1 = L2 & T1 = T2). +#G1 #G2 #L1 #L2 #T1 #T2 #H elim (fquq_fquqa … H) -H [| * ] +/2 width=1 by or_introl/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/gget.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/gget.ma new file mode 100644 index 000000000..b11b0af4c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/gget.ma @@ -0,0 +1,81 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/rdrop_3.ma". +include "basic_2A/grammar/genv.ma". + +(* GLOBAL ENVIRONMENT READING ***********************************************) + +inductive gget (m:nat): relation genv ≝ +| gget_gt: ∀G. |G| ≤ m → gget m G (⋆) +| gget_eq: ∀G. |G| = m + 1 → gget m G G +| gget_lt: ∀I,G1,G2,V. m < |G1| → gget m G1 G2 → gget m (G1. ⓑ{I} V) G2 +. + +interpretation "global reading" + 'RDrop m G1 G2 = (gget m G1 G2). + +(* basic inversion lemmas ***************************************************) + +lemma gget_inv_gt: ∀G1,G2,m. ⬇[m] G1 ≡ G2 → |G1| ≤ m → G2 = ⋆. +#G1 #G2 #m * -G1 -G2 // +[ #G #H >H -H >commutative_plus #H (**) (* lemma needed here *) + lapply (le_plus_to_le_r … 0 H) -H #H + lapply (le_n_O_to_eq … H) -H #H destruct +| #I #G1 #G2 #V #H1 #_ #H2 + lapply (le_to_lt_to_lt … H2 H1) -H2 -H1 normalize in ⊢ (? % ? → ?); >commutative_plus #H + lapply (lt_plus_to_lt_l … 0 H) -H #H + elim (lt_zero_false … H) +] +qed-. + +lemma gget_inv_eq: ∀G1,G2,m. ⬇[m] G1 ≡ G2 → |G1| = m + 1 → G1 = G2. +#G1 #G2 #m * -G1 -G2 // +[ #G #H1 #H2 >H2 in H1; -H2 >commutative_plus #H (**) (* lemma needed here *) + lapply (le_plus_to_le_r … 0 H) -H #H + lapply (le_n_O_to_eq … H) -H #H destruct +| #I #G1 #G2 #V #H1 #_ normalize #H2 + <(injective_plus_l … H2) in H1; -H2 #H + elim (lt_refl_false … H) +] +qed-. + +fact gget_inv_lt_aux: ∀I,G,G1,G2,V,m. ⬇[m] G ≡ G2 → G = G1. ⓑ{I} V → + m < |G1| → ⬇[m] G1 ≡ G2. +#I #G #G1 #G2 #V #m * -G -G2 +[ #G #H1 #H destruct #H2 + lapply (le_to_lt_to_lt … H1 H2) -H1 -H2 normalize in ⊢ (? % ? → ?); >commutative_plus #H + lapply (lt_plus_to_lt_l … 0 H) -H #H + elim (lt_zero_false … H) +| #G #H1 #H2 destruct >(injective_plus_l … H1) -H1 #H + elim (lt_refl_false … H) +| #J #G #G2 #W #_ #HG2 #H destruct // +] +qed-. + +lemma gget_inv_lt: ∀I,G1,G2,V,m. + ⬇[m] G1. ⓑ{I} V ≡ G2 → m < |G1| → ⬇[m] G1 ≡ G2. +/2 width=5 by gget_inv_lt_aux/ qed-. + +(* Basic properties *********************************************************) + +lemma gget_total: ∀m,G1. ∃G2. ⬇[m] G1 ≡ G2. +#m #G1 elim G1 -G1 /3 width=2 by gget_gt, ex_intro/ +#I #V #G1 * #G2 #HG12 +elim (lt_or_eq_or_gt m (|G1|)) #Hm +[ /3 width=2 by gget_lt, ex_intro/ +| destruct /3 width=2 by gget_eq, ex_intro/ +| @ex_intro [2: @gget_gt normalize /2 width=1 by/ | skip ] (**) (* explicit constructor *) +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/gget_gget.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/gget_gget.ma new file mode 100644 index 000000000..d8c752eda --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/gget_gget.ma @@ -0,0 +1,40 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/gget.ma". + +(* GLOBAL ENVIRONMENT READING ***********************************************) + +(* Main properties **********************************************************) + +theorem gget_mono: ∀G,G1,m. ⬇[m] G ≡ G1 → ∀G2. ⬇[m] G ≡ G2 → G1 = G2. +#G #G1 #m #H elim H -G -G1 +[ #G #Hm #G2 #H + >(gget_inv_gt … H Hm) -H -Hm // +| #G #Hm #G2 #H + >(gget_inv_eq … H Hm) -H -Hm // +| #I #G #G1 #V #Hm #_ #IHG1 #G2 #H + lapply (gget_inv_lt … H Hm) -H -Hm /2 width=1 by/ +] +qed-. + +lemma gget_dec: ∀G1,G2,m. Decidable (⬇[m] G1 ≡ G2). +#G1 #G2 #m +elim (gget_total m G1) #G #HG1 +elim (eq_genv_dec G G2) #HG2 +[ destruct /2 width=1 by or_introl/ +| @or_intror #HG12 + lapply (gget_mono … HG1 … HG12) -HG1 -HG12 /2 width=1 by/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift.ma new file mode 100644 index 000000000..63e82758a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift.ma @@ -0,0 +1,393 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/rlift_4.ma". +include "basic_2A/grammar/term_weight.ma". +include "basic_2A/grammar/term_simple.ma". + +(* BASIC TERM RELOCATION ****************************************************) + +(* Basic_1: includes: + lift_sort lift_lref_lt lift_lref_ge lift_bind lift_flat +*) +inductive lift: relation4 nat nat term term ≝ +| lift_sort : ∀k,l,m. lift l m (⋆k) (⋆k) +| lift_lref_lt: ∀i,l,m. i < l → lift l m (#i) (#i) +| lift_lref_ge: ∀i,l,m. l ≤ i → lift l m (#i) (#(i + m)) +| lift_gref : ∀p,l,m. lift l m (§p) (§p) +| lift_bind : ∀a,I,V1,V2,T1,T2,l,m. + lift l m V1 V2 → lift (l + 1) m T1 T2 → + lift l m (ⓑ{a,I} V1. T1) (ⓑ{a,I} V2. T2) +| lift_flat : ∀I,V1,V2,T1,T2,l,m. + lift l m V1 V2 → lift l m T1 T2 → + lift l m (ⓕ{I} V1. T1) (ⓕ{I} V2. T2) +. + +interpretation "relocation" 'RLift l m T1 T2 = (lift l m T1 T2). + +(* Basic inversion lemmas ***************************************************) + +fact lift_inv_O2_aux: ∀l,m,T1,T2. ⬆[l, m] T1 ≡ T2 → m = 0 → T1 = T2. +#l #m #T1 #T2 #H elim H -l -m -T1 -T2 /3 width=1 by eq_f2/ +qed-. + +lemma lift_inv_O2: ∀l,T1,T2. ⬆[l, 0] T1 ≡ T2 → T1 = T2. +/2 width=4 by lift_inv_O2_aux/ qed-. + +fact lift_inv_sort1_aux: ∀l,m,T1,T2. ⬆[l,m] T1 ≡ T2 → ∀k. T1 = ⋆k → T2 = ⋆k. +#l #m #T1 #T2 * -l -m -T1 -T2 // +[ #i #l #m #_ #k #H destruct +| #a #I #V1 #V2 #T1 #T2 #l #m #_ #_ #k #H destruct +| #I #V1 #V2 #T1 #T2 #l #m #_ #_ #k #H destruct +] +qed-. + +lemma lift_inv_sort1: ∀l,m,T2,k. ⬆[l,m] ⋆k ≡ T2 → T2 = ⋆k. +/2 width=5 by lift_inv_sort1_aux/ qed-. + +fact lift_inv_lref1_aux: ∀l,m,T1,T2. ⬆[l,m] T1 ≡ T2 → ∀i. T1 = #i → + (i < l ∧ T2 = #i) ∨ (l ≤ i ∧ T2 = #(i + m)). +#l #m #T1 #T2 * -l -m -T1 -T2 +[ #k #l #m #i #H destruct +| #j #l #m #Hj #i #Hi destruct /3 width=1 by or_introl, conj/ +| #j #l #m #Hj #i #Hi destruct /3 width=1 by or_intror, conj/ +| #p #l #m #i #H destruct +| #a #I #V1 #V2 #T1 #T2 #l #m #_ #_ #i #H destruct +| #I #V1 #V2 #T1 #T2 #l #m #_ #_ #i #H destruct +] +qed-. + +lemma lift_inv_lref1: ∀l,m,T2,i. ⬆[l,m] #i ≡ T2 → + (i < l ∧ T2 = #i) ∨ (l ≤ i ∧ T2 = #(i + m)). +/2 width=3 by lift_inv_lref1_aux/ qed-. + +lemma lift_inv_lref1_lt: ∀l,m,T2,i. ⬆[l,m] #i ≡ T2 → i < l → T2 = #i. +#l #m #T2 #i #H elim (lift_inv_lref1 … H) -H * // +#Hli #_ #Hil lapply (le_to_lt_to_lt … Hli Hil) -Hli -Hil #Hll +elim (lt_refl_false … Hll) +qed-. + +lemma lift_inv_lref1_ge: ∀l,m,T2,i. ⬆[l,m] #i ≡ T2 → l ≤ i → T2 = #(i + m). +#l #m #T2 #i #H elim (lift_inv_lref1 … H) -H * // +#Hil #_ #Hli lapply (le_to_lt_to_lt … Hli Hil) -Hli -Hil #Hll +elim (lt_refl_false … Hll) +qed-. + +fact lift_inv_gref1_aux: ∀l,m,T1,T2. ⬆[l,m] T1 ≡ T2 → ∀p. T1 = §p → T2 = §p. +#l #m #T1 #T2 * -l -m -T1 -T2 // +[ #i #l #m #_ #k #H destruct +| #a #I #V1 #V2 #T1 #T2 #l #m #_ #_ #k #H destruct +| #I #V1 #V2 #T1 #T2 #l #m #_ #_ #k #H destruct +] +qed-. + +lemma lift_inv_gref1: ∀l,m,T2,p. ⬆[l,m] §p ≡ T2 → T2 = §p. +/2 width=5 by lift_inv_gref1_aux/ qed-. + +fact lift_inv_bind1_aux: ∀l,m,T1,T2. ⬆[l,m] T1 ≡ T2 → + ∀a,I,V1,U1. T1 = ⓑ{a,I} V1.U1 → + ∃∃V2,U2. ⬆[l,m] V1 ≡ V2 & ⬆[l+1,m] U1 ≡ U2 & + T2 = ⓑ{a,I} V2. U2. +#l #m #T1 #T2 * -l -m -T1 -T2 +[ #k #l #m #a #I #V1 #U1 #H destruct +| #i #l #m #_ #a #I #V1 #U1 #H destruct +| #i #l #m #_ #a #I #V1 #U1 #H destruct +| #p #l #m #a #I #V1 #U1 #H destruct +| #b #J #W1 #W2 #T1 #T2 #l #m #HW #HT #a #I #V1 #U1 #H destruct /2 width=5 by ex3_2_intro/ +| #J #W1 #W2 #T1 #T2 #l #m #_ #HT #a #I #V1 #U1 #H destruct +] +qed-. + +lemma lift_inv_bind1: ∀l,m,T2,a,I,V1,U1. ⬆[l,m] ⓑ{a,I} V1. U1 ≡ T2 → + ∃∃V2,U2. ⬆[l,m] V1 ≡ V2 & ⬆[l+1,m] U1 ≡ U2 & + T2 = ⓑ{a,I} V2. U2. +/2 width=3 by lift_inv_bind1_aux/ qed-. + +fact lift_inv_flat1_aux: ∀l,m,T1,T2. ⬆[l,m] T1 ≡ T2 → + ∀I,V1,U1. T1 = ⓕ{I} V1.U1 → + ∃∃V2,U2. ⬆[l,m] V1 ≡ V2 & ⬆[l,m] U1 ≡ U2 & + T2 = ⓕ{I} V2. U2. +#l #m #T1 #T2 * -l -m -T1 -T2 +[ #k #l #m #I #V1 #U1 #H destruct +| #i #l #m #_ #I #V1 #U1 #H destruct +| #i #l #m #_ #I #V1 #U1 #H destruct +| #p #l #m #I #V1 #U1 #H destruct +| #a #J #W1 #W2 #T1 #T2 #l #m #_ #_ #I #V1 #U1 #H destruct +| #J #W1 #W2 #T1 #T2 #l #m #HW #HT #I #V1 #U1 #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma lift_inv_flat1: ∀l,m,T2,I,V1,U1. ⬆[l,m] ⓕ{I} V1. U1 ≡ T2 → + ∃∃V2,U2. ⬆[l,m] V1 ≡ V2 & ⬆[l,m] U1 ≡ U2 & + T2 = ⓕ{I} V2. U2. +/2 width=3 by lift_inv_flat1_aux/ qed-. + +fact lift_inv_sort2_aux: ∀l,m,T1,T2. ⬆[l,m] T1 ≡ T2 → ∀k. T2 = ⋆k → T1 = ⋆k. +#l #m #T1 #T2 * -l -m -T1 -T2 // +[ #i #l #m #_ #k #H destruct +| #a #I #V1 #V2 #T1 #T2 #l #m #_ #_ #k #H destruct +| #I #V1 #V2 #T1 #T2 #l #m #_ #_ #k #H destruct +] +qed-. + +(* Basic_1: was: lift_gen_sort *) +lemma lift_inv_sort2: ∀l,m,T1,k. ⬆[l,m] T1 ≡ ⋆k → T1 = ⋆k. +/2 width=5 by lift_inv_sort2_aux/ qed-. + +fact lift_inv_lref2_aux: ∀l,m,T1,T2. ⬆[l,m] T1 ≡ T2 → ∀i. T2 = #i → + (i < l ∧ T1 = #i) ∨ (l + m ≤ i ∧ T1 = #(i - m)). +#l #m #T1 #T2 * -l -m -T1 -T2 +[ #k #l #m #i #H destruct +| #j #l #m #Hj #i #Hi destruct /3 width=1 by or_introl, conj/ +| #j #l #m #Hj #i #Hi destruct (plus_minus_m_m i m) in ⊢ (? ? ? ? %); /3 width=2 by lift_lref_ge, le_plus_to_minus_r, le_plus_b/ +qed. + +lemma lift_lref_ge_minus_eq: ∀l,m,i,j. l + m ≤ i → j = i - m → ⬆[l, m] #j ≡ #i. +/2 width=1 by lift_lref_ge_minus/ qed-. + +(* Basic_1: was: lift_r *) +lemma lift_refl: ∀T,l. ⬆[l, 0] T ≡ T. +#T elim T -T +[ * #i // #l elim (lt_or_ge i l) /2 width=1 by lift_lref_lt, lift_lref_ge/ +| * /2 width=1 by lift_bind, lift_flat/ +] +qed. + +lemma lift_total: ∀T1,l,m. ∃T2. ⬆[l,m] T1 ≡ T2. +#T1 elim T1 -T1 +[ * #i /2 width=2 by lift_sort, lift_gref, ex_intro/ + #l #m elim (lt_or_ge i l) /3 width=2 by lift_lref_lt, lift_lref_ge, ex_intro/ +| * [ #a ] #I #V1 #T1 #IHV1 #IHT1 #l #m + elim (IHV1 l m) -IHV1 #V2 #HV12 + [ elim (IHT1 (l+1) m) -IHT1 /3 width=2 by lift_bind, ex_intro/ + | elim (IHT1 l m) -IHT1 /3 width=2 by lift_flat, ex_intro/ + ] +] +qed. + +(* Basic_1: was: lift_free (right to left) *) +lemma lift_split: ∀l1,m2,T1,T2. ⬆[l1, m2] T1 ≡ T2 → + ∀l2,m1. l1 ≤ l2 → l2 ≤ l1 + m1 → m1 ≤ m2 → + ∃∃T. ⬆[l1, m1] T1 ≡ T & ⬆[l2, m2 - m1] T ≡ T2. +#l1 #m2 #T1 #T2 #H elim H -l1 -m2 -T1 -T2 +[ /3 width=3 by lift_sort, ex2_intro/ +| #i #l1 #m2 #Hil1 #l2 #m1 #Hl12 #_ #_ + lapply (lt_to_le_to_lt … Hil1 Hl12) -Hl12 #Hil2 /4 width=3 by lift_lref_lt, ex2_intro/ +| #i #l1 #m2 #Hil1 #l2 #m1 #_ #Hl21 #Hm12 + lapply (transitive_le … (i+m1) Hl21 ?) /2 width=1 by monotonic_le_plus_l/ -Hl21 #Hl21 + >(plus_minus_m_m m2 m1 ?) /3 width=3 by lift_lref_ge, ex2_intro/ +| /3 width=3 by lift_gref, ex2_intro/ +| #a #I #V1 #V2 #T1 #T2 #l1 #m2 #_ #_ #IHV #IHT #l2 #m1 #Hl12 #Hl21 #Hm12 + elim (IHV … Hl12 Hl21 Hm12) -IHV #V0 #HV0a #HV0b + elim (IHT (l2+1) … ? ? Hm12) /3 width=5 by lift_bind, le_S_S, ex2_intro/ +| #I #V1 #V2 #T1 #T2 #l1 #m2 #_ #_ #IHV #IHT #l2 #m1 #Hl12 #Hl21 #Hm12 + elim (IHV … Hl12 Hl21 Hm12) -IHV #V0 #HV0a #HV0b + elim (IHT l2 … ? ? Hm12) /3 width=5 by lift_flat, ex2_intro/ +] +qed. + +(* Basic_1: was only: dnf_dec2 dnf_dec *) +lemma is_lift_dec: ∀T2,l,m. Decidable (∃T1. ⬆[l,m] T1 ≡ T2). +#T1 elim T1 -T1 +[ * [1,3: /3 width=2 by lift_sort, lift_gref, ex_intro, or_introl/ ] #i #l #m + elim (lt_or_ge i l) #Hli + [ /4 width=3 by lift_lref_lt, ex_intro, or_introl/ + | elim (lt_or_ge i (l + m)) #Hilm + [ @or_intror * #T1 #H elim (lift_inv_lref2_be … H Hli Hilm) + | -Hli /4 width=2 by lift_lref_ge_minus, ex_intro, or_introl/ + ] + ] +| * [ #a ] #I #V2 #T2 #IHV2 #IHT2 #l #m + [ elim (IHV2 l m) -IHV2 + [ * #V1 #HV12 elim (IHT2 (l+1) m) -IHT2 + [ * #T1 #HT12 @or_introl /3 width=2 by lift_bind, ex_intro/ + | -V1 #HT2 @or_intror * #X #H + elim (lift_inv_bind2 … H) -H /3 width=2 by ex_intro/ + ] + | -IHT2 #HV2 @or_intror * #X #H + elim (lift_inv_bind2 … H) -H /3 width=2 by ex_intro/ + ] + | elim (IHV2 l m) -IHV2 + [ * #V1 #HV12 elim (IHT2 l m) -IHT2 + [ * #T1 #HT12 /4 width=2 by lift_flat, ex_intro, or_introl/ + | -V1 #HT2 @or_intror * #X #H + elim (lift_inv_flat2 … H) -H /3 width=2 by ex_intro/ + ] + | -IHT2 #HV2 @or_intror * #X #H + elim (lift_inv_flat2 … H) -H /3 width=2 by ex_intro/ + ] + ] +] +qed. + +(* Basic_1: removed theorems 7: + lift_head lift_gen_head + lift_weight_map lift_weight lift_weight_add lift_weight_add_O + lift_tlt_dx +*) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_lift.ma new file mode 100644 index 000000000..bbc747aa7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_lift.ma @@ -0,0 +1,217 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lift.ma". + +(* BASIC TERM RELOCATION ****************************************************) + +(* Main properties ***********************************************************) + +(* Basic_1: was: lift_inj *) +theorem lift_inj: ∀l,m,T1,U. ⬆[l,m] T1 ≡ U → ∀T2. ⬆[l,m] T2 ≡ U → T1 = T2. +#l #m #T1 #U #H elim H -l -m -T1 -U +[ #k #l #m #X #HX + lapply (lift_inv_sort2 … HX) -HX // +| #i #l #m #Hil #X #HX + lapply (lift_inv_lref2_lt … HX ?) -HX // +| #i #l #m #Hli #X #HX + lapply (lift_inv_lref2_ge … HX ?) -HX /2 width=1 by monotonic_le_plus_l/ +| #p #l #m #X #HX + lapply (lift_inv_gref2 … HX) -HX // +| #a #I #V1 #V2 #T1 #T2 #l #m #_ #_ #IHV12 #IHT12 #X #HX + elim (lift_inv_bind2 … HX) -HX #V #T #HV1 #HT1 #HX destruct /3 width=1 by eq_f2/ +| #I #V1 #V2 #T1 #T2 #l #m #_ #_ #IHV12 #IHT12 #X #HX + elim (lift_inv_flat2 … HX) -HX #V #T #HV1 #HT1 #HX destruct /3 width=1 by eq_f2/ +] +qed-. + +(* Basic_1: was: lift_gen_lift *) +theorem lift_div_le: ∀l1,m1,T1,T. ⬆[l1, m1] T1 ≡ T → + ∀l2,m2,T2. ⬆[l2 + m1, m2] T2 ≡ T → + l1 ≤ l2 → + ∃∃T0. ⬆[l1, m1] T0 ≡ T2 & ⬆[l2, m2] T0 ≡ T1. +#l1 #m1 #T1 #T #H elim H -l1 -m1 -T1 -T +[ #k #l1 #m1 #l2 #m2 #T2 #Hk #Hl12 + lapply (lift_inv_sort2 … Hk) -Hk #Hk destruct /3 width=3 by lift_sort, ex2_intro/ +| #i #l1 #m1 #Hil1 #l2 #m2 #T2 #Hi #Hl12 + lapply (lt_to_le_to_lt … Hil1 Hl12) -Hl12 #Hil2 + lapply (lift_inv_lref2_lt … Hi ?) -Hi /3 width=3 by lift_lref_lt, lt_plus_to_minus_r, lt_to_le_to_lt, ex2_intro/ +| #i #l1 #m1 #Hil1 #l2 #m2 #T2 #Hi #Hl12 + elim (lift_inv_lref2 … Hi) -Hi * #Hil2 #H destruct + [ -Hl12 lapply (lt_plus_to_lt_l … Hil2) -Hil2 #Hil2 /3 width=3 by lift_lref_lt, lift_lref_ge, ex2_intro/ + | -Hil1 >plus_plus_comm_23 in Hil2; #H lapply (le_plus_to_le_r … H) -H #H + elim (le_inv_plus_l … H) -H #Hilm2 #Hm2i + lapply (transitive_le … Hl12 Hilm2) -Hl12 #Hl12 + >le_plus_minus_comm // >(plus_minus_m_m i m2) in ⊢ (? ? ? %); + /4 width=3 by lift_lref_ge, ex2_intro/ + ] +| #p #l1 #m1 #l2 #m2 #T2 #Hk #Hl12 + lapply (lift_inv_gref2 … Hk) -Hk #Hk destruct /3 width=3 by lift_gref, ex2_intro/ +| #a #I #W1 #W #U1 #U #l1 #m1 #_ #_ #IHW #IHU #l2 #m2 #T2 #H #Hl12 + lapply (lift_inv_bind2 … H) -H * #W2 #U2 #HW2 #HU2 #H destruct + elim (IHW … HW2) // -IHW -HW2 #W0 #HW2 #HW1 + >plus_plus_comm_23 in HU2; #HU2 elim (IHU … HU2) /3 width=5 by lift_bind, le_S_S, ex2_intro/ +| #I #W1 #W #U1 #U #l1 #m1 #_ #_ #IHW #IHU #l2 #m2 #T2 #H #Hl12 + lapply (lift_inv_flat2 … H) -H * #W2 #U2 #HW2 #HU2 #H destruct + elim (IHW … HW2) // -IHW -HW2 #W0 #HW2 #HW1 + elim (IHU … HU2) /3 width=5 by lift_flat, ex2_intro/ +] +qed. + +(* Note: apparently this was missing in basic_1 *) +theorem lift_div_be: ∀l1,m1,T1,T. ⬆[l1, m1] T1 ≡ T → + ∀m,m2,T2. ⬆[l1 + m, m2] T2 ≡ T → + m ≤ m1 → m1 ≤ m + m2 → + ∃∃T0. ⬆[l1, m] T0 ≡ T2 & ⬆[l1, m + m2 - m1] T0 ≡ T1. +#l1 #m1 #T1 #T #H elim H -l1 -m1 -T1 -T +[ #k #l1 #m1 #m #m2 #T2 #H >(lift_inv_sort2 … H) -H /2 width=3 by lift_sort, ex2_intro/ +| #i #l1 #m1 #Hil1 #m #m2 #T2 #H #Hm1 #Hm1m2 + >(lift_inv_lref2_lt … H) -H /3 width=3 by lift_lref_lt, lt_plus_to_minus_r, lt_to_le_to_lt, ex2_intro/ +| #i #l1 #m1 #Hil1 #m #m2 #T2 #H #Hm1 #Hm1m2 + elim (lt_or_ge (i+m1) (l1+m+m2)) #Him1l1m2 + [ elim (lift_inv_lref2_be … H) -H /2 width=1 by le_plus/ + | >(lift_inv_lref2_ge … H ?) -H // + lapply (le_plus_to_minus … Him1l1m2) #Hl1m21i + elim (le_inv_plus_l … Him1l1m2) -Him1l1m2 #Hl1m12 #Hm2im1 + @ex2_intro [2: /2 width=1 by lift_lref_ge_minus/ | skip ] -Hl1m12 + @lift_lref_ge_minus_eq [ >plus_minus_associative // | /2 width=1 by minus_le_minus_minus_comm/ ] + ] +| #p #l1 #m1 #m #m2 #T2 #H >(lift_inv_gref2 … H) -H /2 width=3 by lift_gref, ex2_intro/ +| #a #I #V1 #V #T1 #T #l1 #m1 #_ #_ #IHV1 #IHT1 #m #m2 #X #H #Hm1 #Hm1m2 + elim (lift_inv_bind2 … H) -H #V2 #T2 #HV2 #HT2 #H destruct + elim (IHV1 … HV2) -V // >plus_plus_comm_23 in HT2; #HT2 + elim (IHT1 … HT2) -T /3 width=5 by lift_bind, ex2_intro/ +| #I #V1 #V #T1 #T #l1 #m1 #_ #_ #IHV1 #IHT1 #m #m2 #X #H #Hm1 #Hm1m2 + elim (lift_inv_flat2 … H) -H #V2 #T2 #HV2 #HT2 #H destruct + elim (IHV1 … HV2) -V // + elim (IHT1 … HT2) -T /3 width=5 by lift_flat, ex2_intro/ +] +qed. + +theorem lift_mono: ∀l,m,T,U1. ⬆[l,m] T ≡ U1 → ∀U2. ⬆[l,m] T ≡ U2 → U1 = U2. +#l #m #T #U1 #H elim H -l -m -T -U1 +[ #k #l #m #X #HX + lapply (lift_inv_sort1 … HX) -HX // +| #i #l #m #Hil #X #HX + lapply (lift_inv_lref1_lt … HX ?) -HX // +| #i #l #m #Hli #X #HX + lapply (lift_inv_lref1_ge … HX ?) -HX // +| #p #l #m #X #HX + lapply (lift_inv_gref1 … HX) -HX // +| #a #I #V1 #V2 #T1 #T2 #l #m #_ #_ #IHV12 #IHT12 #X #HX + elim (lift_inv_bind1 … HX) -HX #V #T #HV1 #HT1 #HX destruct /3 width=1 by eq_f2/ +| #I #V1 #V2 #T1 #T2 #l #m #_ #_ #IHV12 #IHT12 #X #HX + elim (lift_inv_flat1 … HX) -HX #V #T #HV1 #HT1 #HX destruct /3 width=1 by eq_f2/ +] +qed-. + +(* Basic_1: was: lift_free (left to right) *) +theorem lift_trans_be: ∀l1,m1,T1,T. ⬆[l1, m1] T1 ≡ T → + ∀l2,m2,T2. ⬆[l2, m2] T ≡ T2 → + l1 ≤ l2 → l2 ≤ l1 + m1 → ⬆[l1, m1 + m2] T1 ≡ T2. +#l1 #m1 #T1 #T #H elim H -l1 -m1 -T1 -T +[ #k #l1 #m1 #l2 #m2 #T2 #HT2 #_ #_ + >(lift_inv_sort1 … HT2) -HT2 // +| #i #l1 #m1 #Hil1 #l2 #m2 #T2 #HT2 #Hl12 #_ + lapply (lt_to_le_to_lt … Hil1 Hl12) -Hl12 #Hil2 + lapply (lift_inv_lref1_lt … HT2 Hil2) /2 width=1 by lift_lref_lt/ +| #i #l1 #m1 #Hil1 #l2 #m2 #T2 #HT2 #_ #Hl21 + lapply (lift_inv_lref1_ge … HT2 ?) -HT2 + [ @(transitive_le … Hl21 ?) -Hl21 /2 width=1 by monotonic_le_plus_l/ + | -Hl21 /2 width=1 by lift_lref_ge/ + ] +| #p #l1 #m1 #l2 #m2 #T2 #HT2 #_ #_ + >(lift_inv_gref1 … HT2) -HT2 // +| #a #I #V1 #V2 #T1 #T2 #l1 #m1 #_ #_ #IHV12 #IHT12 #l2 #m2 #X #HX #Hl12 #Hl21 + elim (lift_inv_bind1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct + lapply (IHV12 … HV20 ? ?) // -IHV12 -HV20 #HV10 + lapply (IHT12 … HT20 ? ?) /2 width=1 by lift_bind, le_S_S/ (**) (* full auto a bit slow *) +| #I #V1 #V2 #T1 #T2 #l1 #m1 #_ #_ #IHV12 #IHT12 #l2 #m2 #X #HX #Hl12 #Hl21 + elim (lift_inv_flat1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct + lapply (IHV12 … HV20 ? ?) // -IHV12 -HV20 #HV10 + lapply (IHT12 … HT20 ? ?) /2 width=1 by lift_flat/ (**) (* full auto a bit slow *) +] +qed. + +(* Basic_1: was: lift_d (right to left) *) +theorem lift_trans_le: ∀l1,m1,T1,T. ⬆[l1, m1] T1 ≡ T → + ∀l2,m2,T2. ⬆[l2, m2] T ≡ T2 → l2 ≤ l1 → + ∃∃T0. ⬆[l2, m2] T1 ≡ T0 & ⬆[l1 + m2, m1] T0 ≡ T2. +#l1 #m1 #T1 #T #H elim H -l1 -m1 -T1 -T +[ #k #l1 #m1 #l2 #m2 #X #HX #_ + >(lift_inv_sort1 … HX) -HX /2 width=3 by lift_sort, ex2_intro/ +| #i #l1 #m1 #Hil1 #l2 #m2 #X #HX #_ + lapply (lt_to_le_to_lt … (l1+m2) Hil1 ?) // #Him2 + elim (lift_inv_lref1 … HX) -HX * #Hil2 #HX destruct /4 width=3 by lift_lref_ge_minus, lift_lref_lt, lt_minus_to_plus, monotonic_le_plus_l, ex2_intro/ +| #i #l1 #m1 #Hil1 #l2 #m2 #X #HX #Hl21 + lapply (transitive_le … Hl21 Hil1) -Hl21 #Hil2 + lapply (lift_inv_lref1_ge … HX ?) -HX /2 width=3 by transitive_le/ #HX destruct + >plus_plus_comm_23 /4 width=3 by lift_lref_ge_minus, lift_lref_ge, monotonic_le_plus_l, ex2_intro/ +| #p #l1 #m1 #l2 #m2 #X #HX #_ + >(lift_inv_gref1 … HX) -HX /2 width=3 by lift_gref, ex2_intro/ +| #a #I #V1 #V2 #T1 #T2 #l1 #m1 #_ #_ #IHV12 #IHT12 #l2 #m2 #X #HX #Hl21 + elim (lift_inv_bind1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct + elim (IHV12 … HV20) -IHV12 -HV20 // + elim (IHT12 … HT20) -IHT12 -HT20 /3 width=5 by lift_bind, le_S_S, ex2_intro/ +| #I #V1 #V2 #T1 #T2 #l1 #m1 #_ #_ #IHV12 #IHT12 #l2 #m2 #X #HX #Hl21 + elim (lift_inv_flat1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct + elim (IHV12 … HV20) -IHV12 -HV20 // + elim (IHT12 … HT20) -IHT12 -HT20 /3 width=5 by lift_flat, ex2_intro/ +] +qed. + +(* Basic_1: was: lift_d (left to right) *) +theorem lift_trans_ge: ∀l1,m1,T1,T. ⬆[l1, m1] T1 ≡ T → + ∀l2,m2,T2. ⬆[l2, m2] T ≡ T2 → l1 + m1 ≤ l2 → + ∃∃T0. ⬆[l2 - m1, m2] T1 ≡ T0 & ⬆[l1, m1] T0 ≡ T2. +#l1 #m1 #T1 #T #H elim H -l1 -m1 -T1 -T +[ #k #l1 #m1 #l2 #m2 #X #HX #_ + >(lift_inv_sort1 … HX) -HX /2 width=3 by lift_sort, ex2_intro/ +| #i #l1 #m1 #Hil1 #l2 #m2 #X #HX #Hlml + lapply (lt_to_le_to_lt … (l1+m1) Hil1 ?) // #Hil1m + lapply (lt_to_le_to_lt … (l2-m1) Hil1 ?) /2 width=1 by le_plus_to_minus_r/ #Hil2m + lapply (lt_to_le_to_lt … Hil1m Hlml) -Hil1m -Hlml #Hil2 + lapply (lift_inv_lref1_lt … HX ?) -HX // #HX destruct /3 width=3 by lift_lref_lt, ex2_intro/ +| #i #l1 #m1 #Hil1 #l2 #m2 #X #HX #_ + elim (lift_inv_lref1 … HX) -HX * #Himl #HX destruct /4 width=3 by lift_lref_lt, lift_lref_ge, monotonic_le_minus_l, lt_plus_to_minus_r, transitive_le, ex2_intro/ +| #p #l1 #m1 #l2 #m2 #X #HX #_ + >(lift_inv_gref1 … HX) -HX /2 width=3 by lift_gref, ex2_intro/ +| #a #I #V1 #V2 #T1 #T2 #l1 #m1 #_ #_ #IHV12 #IHT12 #l2 #m2 #X #HX #Hlml + elim (lift_inv_bind1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct + elim (IHV12 … HV20) -IHV12 -HV20 // + elim (IHT12 … HT20) -IHT12 -HT20 /2 width=1 by le_S_S/ #T + (lift_mono … H … HT1) -T // +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_lift_vector.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_lift_vector.ma new file mode 100644 index 000000000..c7e9739df --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_lift_vector.ma @@ -0,0 +1,30 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lift_lift.ma". +include "basic_2A/substitution/lift_vector.ma". + +(* BASIC TERM VECTOR RELOCATION *********************************************) + +(* Main properties ***********************************************************) + +theorem liftv_mono: ∀Ts,U1s,l,m. ⬆[l,m] Ts ≡ U1s → + ∀U2s:list term. ⬆[l,m] Ts ≡ U2s → U1s = U2s. +#Ts #U1s #l #m #H elim H -Ts -U1s +[ #U2s #H >(liftv_inv_nil1 … H) -H // +| #Ts #U1s #T #U1 #HTU1 #_ #IHTU1s #X #H destruct + elim (liftv_inv_cons1 … H) -H #U2 #U2s #HTU2 #HTU2s #H destruct + >(lift_mono … HTU1 … HTU2) -T /3 width=1 by eq_f/ +] +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_neg.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_neg.ma new file mode 100644 index 000000000..52f8c2823 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_neg.ma @@ -0,0 +1,67 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lift.ma". + +(* BASIC TERM RELOCATION ****************************************************) + +(* Properties on negated basic relocation ***********************************) + +lemma nlift_lref_be_SO: ∀X,i. ⬆[i, 1] X ≡ #i → ⊥. +/2 width=7 by lift_inv_lref2_be/ qed-. + +lemma nlift_bind_sn: ∀W,l,m. (∀V. ⬆[l, m] V ≡ W → ⊥) → + ∀a,I,U. (∀X. ⬆[l, m] X ≡ ⓑ{a,I}W.U → ⊥). +#W #l #m #HW #a #I #U #X #H elim (lift_inv_bind2 … H) -H /2 width=2 by/ +qed-. + +lemma nlift_bind_dx: ∀U,l,m. (∀T. ⬆[l+1, m] T ≡ U → ⊥) → + ∀a,I,W. (∀X. ⬆[l, m] X ≡ ⓑ{a,I}W.U → ⊥). +#U #l #m #HU #a #I #W #X #H elim (lift_inv_bind2 … H) -H /2 width=2 by/ +qed-. + +lemma nlift_flat_sn: ∀W,l,m. (∀V. ⬆[l, m] V ≡ W → ⊥) → + ∀I,U. (∀X. ⬆[l, m] X ≡ ⓕ{I}W.U → ⊥). +#W #l #m #HW #I #U #X #H elim (lift_inv_flat2 … H) -H /2 width=2 by/ +qed-. + +lemma nlift_flat_dx: ∀U,l,m. (∀T. ⬆[l, m] T ≡ U → ⊥) → + ∀I,W. (∀X. ⬆[l, m] X ≡ ⓕ{I}W.U → ⊥). +#U #l #m #HU #I #W #X #H elim (lift_inv_flat2 … H) -H /2 width=2 by/ +qed-. + +(* Inversion lemmas on negated basic relocation *****************************) + +lemma nlift_inv_lref_be_SO: ∀i,j. (∀X. ⬆[i, 1] X ≡ #j → ⊥) → j = i. +#i #j elim (lt_or_eq_or_gt i j) // #Hij #H +[ elim (H (#(j-1))) -H /2 width=1 by lift_lref_ge_minus/ +| elim (H (#j)) -H /2 width=1 by lift_lref_lt/ +] +qed-. + +lemma nlift_inv_bind: ∀a,I,W,U,l,m. (∀X. ⬆[l, m] X ≡ ⓑ{a,I}W.U → ⊥) → + (∀V. ⬆[l, m] V ≡ W → ⊥) ∨ (∀T. ⬆[l+1, m] T ≡ U → ⊥). +#a #I #W #U #l #m #H elim (is_lift_dec W l m) +[ * /4 width=2 by lift_bind, or_intror/ +| /4 width=2 by ex_intro, or_introl/ +] +qed-. + +lemma nlift_inv_flat: ∀I,W,U,l,m. (∀X. ⬆[l, m] X ≡ ⓕ{I}W.U → ⊥) → + (∀V. ⬆[l, m] V ≡ W → ⊥) ∨ (∀T. ⬆[l, m] T ≡ U → ⊥). +#I #W #U #l #m #H elim (is_lift_dec W l m) +[ * /4 width=2 by lift_flat, or_intror/ +| /4 width=2 by ex_intro, or_introl/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_vector.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_vector.ma new file mode 100644 index 000000000..cb80a68b3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_vector.ma @@ -0,0 +1,62 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/term_vector.ma". +include "basic_2A/substitution/lift.ma". + +(* BASIC TERM VECTOR RELOCATION *********************************************) + +inductive liftv (l,m:nat) : relation (list term) ≝ +| liftv_nil : liftv l m (◊) (◊) +| liftv_cons: ∀T1s,T2s,T1,T2. + ⬆[l, m] T1 ≡ T2 → liftv l m T1s T2s → + liftv l m (T1 @ T1s) (T2 @ T2s) +. + +interpretation "relocation (vector)" 'RLift l m T1s T2s = (liftv l m T1s T2s). + +(* Basic inversion lemmas ***************************************************) + +fact liftv_inv_nil1_aux: ∀T1s,T2s,l,m. ⬆[l, m] T1s ≡ T2s → T1s = ◊ → T2s = ◊. +#T1s #T2s #l #m * -T1s -T2s // +#T1s #T2s #T1 #T2 #_ #_ #H destruct +qed-. + +lemma liftv_inv_nil1: ∀T2s,l,m. ⬆[l, m] ◊ ≡ T2s → T2s = ◊. +/2 width=5 by liftv_inv_nil1_aux/ qed-. + +fact liftv_inv_cons1_aux: ∀T1s,T2s,l,m. ⬆[l, m] T1s ≡ T2s → + ∀U1,U1s. T1s = U1 @ U1s → + ∃∃U2,U2s. ⬆[l, m] U1 ≡ U2 & ⬆[l, m] U1s ≡ U2s & + T2s = U2 @ U2s. +#T1s #T2s #l #m * -T1s -T2s +[ #U1 #U1s #H destruct +| #T1s #T2s #T1 #T2 #HT12 #HT12s #U1 #U1s #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma liftv_inv_cons1: ∀U1,U1s,T2s,l,m. ⬆[l, m] U1 @ U1s ≡ T2s → + ∃∃U2,U2s. ⬆[l, m] U1 ≡ U2 & ⬆[l, m] U1s ≡ U2s & + T2s = U2 @ U2s. +/2 width=3 by liftv_inv_cons1_aux/ qed-. + +(* Basic properties *********************************************************) + +lemma liftv_total: ∀l,m. ∀T1s:list term. ∃T2s. ⬆[l, m] T1s ≡ T2s. +#l #m #T1s elim T1s -T1s +[ /2 width=2 by liftv_nil, ex_intro/ +| #T1 #T1s * #T2s #HT12s + elim (lift_total T1 l m) /3 width=2 by liftv_cons, ex_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn.ma new file mode 100644 index 000000000..18adaacdf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn.ma @@ -0,0 +1,89 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/lenv_length.ma". + +(* SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS *********) + +inductive lpx_sn (R:relation3 lenv term term): relation lenv ≝ +| lpx_sn_atom: lpx_sn R (⋆) (⋆) +| lpx_sn_pair: ∀I,K1,K2,V1,V2. + lpx_sn R K1 K2 → R K1 V1 V2 → + lpx_sn R (K1. ⓑ{I} V1) (K2. ⓑ{I} V2) +. + +(* Basic properties *********************************************************) + +lemma lpx_sn_refl: ∀R. (∀L. reflexive ? (R L)) → reflexive … (lpx_sn R). +#R #HR #L elim L -L /2 width=1 by lpx_sn_atom, lpx_sn_pair/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact lpx_sn_inv_atom1_aux: ∀R,L1,L2. lpx_sn R L1 L2 → L1 = ⋆ → L2 = ⋆. +#R #L1 #L2 * -L1 -L2 +[ // +| #I #K1 #K2 #V1 #V2 #_ #_ #H destruct +] +qed-. + +lemma lpx_sn_inv_atom1: ∀R,L2. lpx_sn R (⋆) L2 → L2 = ⋆. +/2 width=4 by lpx_sn_inv_atom1_aux/ qed-. + +fact lpx_sn_inv_pair1_aux: ∀R,L1,L2. lpx_sn R L1 L2 → ∀I,K1,V1. L1 = K1. ⓑ{I} V1 → + ∃∃K2,V2. lpx_sn R K1 K2 & R K1 V1 V2 & L2 = K2. ⓑ{I} V2. +#R #L1 #L2 * -L1 -L2 +[ #J #K1 #V1 #H destruct +| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #L #W #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma lpx_sn_inv_pair1: ∀R,I,K1,V1,L2. lpx_sn R (K1. ⓑ{I} V1) L2 → + ∃∃K2,V2. lpx_sn R K1 K2 & R K1 V1 V2 & L2 = K2. ⓑ{I} V2. +/2 width=3 by lpx_sn_inv_pair1_aux/ qed-. + +fact lpx_sn_inv_atom2_aux: ∀R,L1,L2. lpx_sn R L1 L2 → L2 = ⋆ → L1 = ⋆. +#R #L1 #L2 * -L1 -L2 +[ // +| #I #K1 #K2 #V1 #V2 #_ #_ #H destruct +] +qed-. + +lemma lpx_sn_inv_atom2: ∀R,L1. lpx_sn R L1 (⋆) → L1 = ⋆. +/2 width=4 by lpx_sn_inv_atom2_aux/ qed-. + +fact lpx_sn_inv_pair2_aux: ∀R,L1,L2. lpx_sn R L1 L2 → ∀I,K2,V2. L2 = K2. ⓑ{I} V2 → + ∃∃K1,V1. lpx_sn R K1 K2 & R K1 V1 V2 & L1 = K1. ⓑ{I} V1. +#R #L1 #L2 * -L1 -L2 +[ #J #K2 #V2 #H destruct +| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #K #W #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma lpx_sn_inv_pair2: ∀R,I,L1,K2,V2. lpx_sn R L1 (K2. ⓑ{I} V2) → + ∃∃K1,V1. lpx_sn R K1 K2 & R K1 V1 V2 & L1 = K1. ⓑ{I} V1. +/2 width=3 by lpx_sn_inv_pair2_aux/ qed-. + +lemma lpx_sn_inv_pair: ∀R,I1,I2,L1,L2,V1,V2. + lpx_sn R (L1.ⓑ{I1}V1) (L2.ⓑ{I2}V2) → + ∧∧ lpx_sn R L1 L2 & R L1 V1 V2 & I1 = I2. +#R #I1 #I2 #L1 #L2 #V1 #V2 #H elim (lpx_sn_inv_pair1 … H) -H +#L0 #V0 #HL10 #HV10 #H destruct /2 width=1 by and3_intro/ +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lpx_sn_fwd_length: ∀R,L1,L2. lpx_sn R L1 L2 → |L1| = |L2|. +#R #L1 #L2 #H elim H -L1 -L2 normalize // +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_alt.ma new file mode 100644 index 000000000..94c112b18 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_alt.ma @@ -0,0 +1,125 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop.ma". +include "basic_2A/substitution/lpx_sn.ma". + +(* SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS *********) + +(* alternative definition of lpx_sn *) +definition lpx_sn_alt: relation3 lenv term term → relation lenv ≝ + λR,L1,L2. |L1| = |L2| ∧ + (∀I1,I2,K1,K2,V1,V2,i. + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → + I1 = I2 ∧ R K1 V1 V2 + ). + +(* Basic forward lemmas ******************************************************) + +lemma lpx_sn_alt_fwd_length: ∀R,L1,L2. lpx_sn_alt R L1 L2 → |L1| = |L2|. +#R #L1 #L2 #H elim H // +qed-. + +(* Basic inversion lemmas ***************************************************) + +lemma lpx_sn_alt_inv_atom1: ∀R,L2. lpx_sn_alt R (⋆) L2 → L2 = ⋆. +#R #L2 #H lapply (lpx_sn_alt_fwd_length … H) -H +normalize /2 width=1 by length_inv_zero_sn/ +qed-. + +lemma lpx_sn_alt_inv_pair1: ∀R,I,L2,K1,V1. lpx_sn_alt R (K1.ⓑ{I}V1) L2 → + ∃∃K2,V2. lpx_sn_alt R K1 K2 & R K1 V1 V2 & L2 = K2.ⓑ{I}V2. +#R #I1 #L2 #K1 #V1 #H elim H -H +#H #IH elim (length_inv_pos_sn … H) -H +#I2 #K2 #V2 #HK12 #H destruct +elim (IH I1 I2 K1 K2 V1 V2 0) // +#H #HV12 destruct @(ex3_2_intro … K2 V2) // -HV12 +@conj // -HK12 +#J1 #J2 #L1 #L2 #W1 #W2 #i #HKL1 #HKL2 elim (IH J1 J2 L1 L2 W1 W2 (i+1)) -IH +/2 width=1 by drop_drop, conj/ +qed-. + +lemma lpx_sn_alt_inv_atom2: ∀R,L1. lpx_sn_alt R L1 (⋆) → L1 = ⋆. +#R #L1 #H lapply (lpx_sn_alt_fwd_length … H) -H +normalize /2 width=1 by length_inv_zero_dx/ +qed-. + +lemma lpx_sn_alt_inv_pair2: ∀R,I,L1,K2,V2. lpx_sn_alt R L1 (K2.ⓑ{I}V2) → + ∃∃K1,V1. lpx_sn_alt R K1 K2 & R K1 V1 V2 & L1 = K1.ⓑ{I}V1. +#R #I2 #L1 #K2 #V2 #H elim H -H +#H #IH elim (length_inv_pos_dx … H) -H +#I1 #K1 #V1 #HK12 #H destruct +elim (IH I1 I2 K1 K2 V1 V2 0) // +#H #HV12 destruct @(ex3_2_intro … K1 V1) // -HV12 +@conj // -HK12 +#J1 #J2 #L1 #L2 #W1 #W2 #i #HKL1 #HKL2 elim (IH J1 J2 L1 L2 W1 W2 (i+1)) -IH +/2 width=1 by drop_drop, conj/ +qed-. + +(* Basic properties *********************************************************) + +lemma lpx_sn_alt_atom: ∀R. lpx_sn_alt R (⋆) (⋆). +#R @conj // +#I1 #I2 #K1 #K2 #V1 #V2 #i #HLK1 elim (drop_inv_atom1 … HLK1) -HLK1 +#H destruct +qed. + +lemma lpx_sn_alt_pair: ∀R,I,L1,L2,V1,V2. + lpx_sn_alt R L1 L2 → R L1 V1 V2 → + lpx_sn_alt R (L1.ⓑ{I}V1) (L2.ⓑ{I}V2). +#R #I #L1 #L2 #V1 #V2 #H #HV12 elim H -H +#HL12 #IH @conj normalize // +#I1 #I2 #K1 #K2 #W1 #W2 #i @(nat_ind_plus … i) -i +[ #HLK1 #HLK2 + lapply (drop_inv_O2 … HLK1) -HLK1 #H destruct + lapply (drop_inv_O2 … HLK2) -HLK2 #H destruct + /2 width=1 by conj/ +| -HL12 -HV12 /3 width=6 by drop_inv_drop1/ +] +qed. + +(* Main properties **********************************************************) + +theorem lpx_sn_lpx_sn_alt: ∀R,L1,L2. lpx_sn R L1 L2 → lpx_sn_alt R L1 L2. +#R #L1 #L2 #H elim H -L1 -L2 +/2 width=1 by lpx_sn_alt_atom, lpx_sn_alt_pair/ +qed. + +(* Main inversion lemmas ****************************************************) + +theorem lpx_sn_alt_inv_lpx_sn: ∀R,L1,L2. lpx_sn_alt R L1 L2 → lpx_sn R L1 L2. +#R #L1 elim L1 -L1 +[ #L2 #H lapply (lpx_sn_alt_inv_atom1 … H) -H // +| #L1 #I #V1 #IH #X #H elim (lpx_sn_alt_inv_pair1 … H) -H + #L2 #V2 #HL12 #HV12 #H destruct /3 width=1 by lpx_sn_pair/ +] +qed-. + +(* alternative definition of lpx_sn *****************************************) + +lemma lpx_sn_intro_alt: ∀R,L1,L2. |L1| = |L2| → + (∀I1,I2,K1,K2,V1,V2,i. + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → + I1 = I2 ∧ R K1 V1 V2 + ) → lpx_sn R L1 L2. +/4 width=4 by lpx_sn_alt_inv_lpx_sn, conj/ qed. + +lemma lpx_sn_inv_alt: ∀R,L1,L2. lpx_sn R L1 L2 → + |L1| = |L2| ∧ + ∀I1,I2,K1,K2,V1,V2,i. + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → + I1 = I2 ∧ R K1 V1 V2. +#R #L1 #L2 #H lapply (lpx_sn_lpx_sn_alt … H) -H +#H elim H -H /3 width=4 by conj/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_drop.ma new file mode 100644 index 000000000..d97a5d324 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_drop.ma @@ -0,0 +1,104 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop_lreq.ma". +include "basic_2A/substitution/lpx_sn.ma". + +(* SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS *********) + +(* Properties on dropping ****************************************************) + +lemma lpx_sn_drop_conf: ∀R,L1,L2. lpx_sn R L1 L2 → + ∀I,K1,V1,i. ⬇[i] L1 ≡ K1.ⓑ{I}V1 → + ∃∃K2,V2. ⬇[i] L2 ≡ K2.ⓑ{I}V2 & lpx_sn R K1 K2 & R K1 V1 V2. +#R #L1 #L2 #H elim H -L1 -L2 +[ #I0 #K0 #V0 #i #H elim (drop_inv_atom1 … H) -H #H destruct +| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #IHK12 #I0 #K0 #V0 #i #H elim (drop_inv_O1_pair1 … H) * -H + [ -IHK12 #H1 #H2 destruct /3 width=5 by drop_pair, ex3_2_intro/ + | -HK12 -HV12 #Hi #HK10 elim (IHK12 … HK10) -IHK12 -HK10 + /3 width=5 by drop_drop_lt, ex3_2_intro/ + ] +] +qed-. + +lemma lpx_sn_drop_trans: ∀R,L1,L2. lpx_sn R L1 L2 → + ∀I,K2,V2,i. ⬇[i] L2 ≡ K2.ⓑ{I}V2 → + ∃∃K1,V1. ⬇[i] L1 ≡ K1.ⓑ{I}V1 & lpx_sn R K1 K2 & R K1 V1 V2. +#R #L1 #L2 #H elim H -L1 -L2 +[ #I0 #K0 #V0 #i #H elim (drop_inv_atom1 … H) -H #H destruct +| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #IHK12 #I0 #K0 #V0 #i #H elim (drop_inv_O1_pair1 … H) * -H + [ -IHK12 #H1 #H2 destruct /3 width=5 by drop_pair, ex3_2_intro/ + | -HK12 -HV12 #Hi #HK10 elim (IHK12 … HK10) -IHK12 -HK10 + /3 width=5 by drop_drop_lt, ex3_2_intro/ + ] +] +qed-. + +lemma lpx_sn_deliftable_dropable: ∀R. d_deliftable_sn R → dropable_sn (lpx_sn R). +#R #HR #L1 #K1 #s #l #m #H elim H -L1 -K1 -l -m +[ #l #m #Hm #X #H >(lpx_sn_inv_atom1 … H) -H + /4 width=3 by drop_atom, lpx_sn_atom, ex2_intro/ +| #I #K1 #V1 #X #H elim (lpx_sn_inv_pair1 … H) -H + #L2 #V2 #HL12 #HV12 #H destruct + /3 width=5 by drop_pair, lpx_sn_pair, ex2_intro/ +| #I #L1 #K1 #V1 #m #_ #IHLK1 #X #H elim (lpx_sn_inv_pair1 … H) -H + #L2 #V2 #HL12 #HV12 #H destruct + elim (IHLK1 … HL12) -L1 /3 width=3 by drop_drop, ex2_intro/ +| #I #L1 #K1 #V1 #W1 #l #m #HLK1 #HWV1 #IHLK1 #X #H + elim (lpx_sn_inv_pair1 … H) -H #L2 #V2 #HL12 #HV12 #H destruct + elim (HR … HV12 … HLK1 … HWV1) -V1 + elim (IHLK1 … HL12) -L1 /3 width=5 by drop_skip, lpx_sn_pair, ex2_intro/ +] +qed-. + +lemma lpx_sn_liftable_dedropable: ∀R. (∀L. reflexive ? (R L)) → + d_liftable R → dedropable_sn (lpx_sn R). +#R #H1R #H2R #L1 #K1 #s #l #m #H elim H -L1 -K1 -l -m +[ #l #m #Hm #X #H >(lpx_sn_inv_atom1 … H) -H + /4 width=4 by drop_atom, lpx_sn_atom, ex3_intro/ +| #I #K1 #V1 #X #H elim (lpx_sn_inv_pair1 … H) -H + #K2 #V2 #HK12 #HV12 #H destruct + lapply (lpx_sn_fwd_length … HK12) + #H @(ex3_intro … (K2.ⓑ{I}V2)) (**) (* explicit constructor *) + /3 width=1 by lpx_sn_pair, monotonic_le_plus_l/ + @lreq_O2 normalize // +| #I #L1 #K1 #V1 #m #_ #IHLK1 #K2 #HK12 elim (IHLK1 … HK12) -K1 + /3 width=5 by drop_drop, lreq_pair, lpx_sn_pair, ex3_intro/ +| #I #L1 #K1 #V1 #W1 #l #m #HLK1 #HWV1 #IHLK1 #X #H + elim (lpx_sn_inv_pair1 … H) -H #K2 #W2 #HK12 #HW12 #H destruct + elim (lift_total W2 l m) #V2 #HWV2 + lapply (H2R … HW12 … HLK1 … HWV1 … HWV2) -W1 + elim (IHLK1 … HK12) -K1 + /3 width=6 by drop_skip, lreq_succ, lpx_sn_pair, ex3_intro/ +] +qed-. + +fact lpx_sn_dropable_aux: ∀R,L2,K2,s,l,m. ⬇[s, l, m] L2 ≡ K2 → ∀L1. lpx_sn R L1 L2 → + l = 0 → ∃∃K1. ⬇[s, 0, m] L1 ≡ K1 & lpx_sn R K1 K2. +#R #L2 #K2 #s #l #m #H elim H -L2 -K2 -l -m +[ #l #m #Hm #X #H >(lpx_sn_inv_atom2 … H) -H + /4 width=3 by drop_atom, lpx_sn_atom, ex2_intro/ +| #I #K2 #V2 #X #H elim (lpx_sn_inv_pair2 … H) -H + #K1 #V1 #HK12 #HV12 #H destruct + /3 width=5 by drop_pair, lpx_sn_pair, ex2_intro/ +| #I #L2 #K2 #V2 #m #_ #IHLK2 #X #H #_ elim (lpx_sn_inv_pair2 … H) -H + #L1 #V1 #HL12 #HV12 #H destruct + elim (IHLK2 … HL12) -L2 /3 width=3 by drop_drop, ex2_intro/ +| #I #L2 #K2 #V2 #W2 #l #m #_ #_ #_ #L1 #_ + (lpx_sn_inv_atom1 … H1) -X1 + >(lpx_sn_inv_atom1 … H2) -X2 /2 width=3 by lpx_sn_atom, ex2_intro/ +| #L0 #I #V0 #Hx #X1 #H1 #X2 #H2 destruct + elim (lpx_sn_inv_pair1 … H1) -H1 #L1 #V1 #HL01 #HV01 #H destruct + elim (lpx_sn_inv_pair1 … H2) -H2 #L2 #V2 #HL02 #HV02 #H destruct + elim (IH … HL01 … HL02) -IH normalize // #L #HL1 #HL2 + elim (HR12 … HV01 … HV02 … HL01 … HL02) -L0 -V0 /3 width=5 by lpx_sn_pair, ex2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_tc.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_tc.ma new file mode 100644 index 000000000..61bcb500f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_tc.ma @@ -0,0 +1,119 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lpx_sn.ma". + +(* SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS *********) + +(* Properties on transitive_closure *****************************************) + +lemma TC_lpx_sn_pair_refl: ∀R. (∀L. reflexive … (R L)) → + ∀L1,L2. TC … (lpx_sn R) L1 L2 → + ∀I,V. TC … (lpx_sn R) (L1. ⓑ{I} V) (L2. ⓑ{I} V). +#R #HR #L1 #L2 #H @(TC_star_ind … L2 H) -L2 +[ /2 width=1 by lpx_sn_refl/ +| /3 width=1 by TC_reflexive, lpx_sn_refl/ +| /3 width=5 by lpx_sn_pair, step/ +] +qed-. + +lemma TC_lpx_sn_pair: ∀R. (∀L. reflexive … (R L)) → + ∀I,L1,L2. TC … (lpx_sn R) L1 L2 → + ∀V1,V2. LTC … R L1 V1 V2 → + TC … (lpx_sn R) (L1. ⓑ{I} V1) (L2. ⓑ{I} V2). +#R #HR #I #L1 #L2 #HL12 #V1 #V2 #H @(TC_star_ind_dx … V1 H) -V1 // +[ /2 width=1 by TC_lpx_sn_pair_refl/ +| /4 width=3 by TC_strap, lpx_sn_pair, lpx_sn_refl/ +] +qed-. + +lemma lpx_sn_LTC_TC_lpx_sn: ∀R. (∀L. reflexive … (R L)) → + ∀L1,L2. lpx_sn (LTC … R) L1 L2 → + TC … (lpx_sn R) L1 L2. +#R #HR #L1 #L2 #H elim H -L1 -L2 +/2 width=1 by TC_lpx_sn_pair, lpx_sn_atom, inj/ +qed-. + +(* Inversion lemmas on transitive closure ***********************************) + +lemma TC_lpx_sn_inv_atom2: ∀R,L1. TC … (lpx_sn R) L1 (⋆) → L1 = ⋆. +#R #L1 #H @(TC_ind_dx … L1 H) -L1 +[ /2 width=2 by lpx_sn_inv_atom2/ +| #L1 #L #HL1 #_ #IHL2 destruct /2 width=2 by lpx_sn_inv_atom2/ +] +qed-. + +lemma TC_lpx_sn_inv_pair2: ∀R. s_rs_transitive … R (λ_. lpx_sn R) → + ∀I,L1,K2,V2. TC … (lpx_sn R) L1 (K2.ⓑ{I}V2) → + ∃∃K1,V1. TC … (lpx_sn R) K1 K2 & LTC … R K1 V1 V2 & L1 = K1. ⓑ{I} V1. +#R #HR #I #L1 #K2 #V2 #H @(TC_ind_dx … L1 H) -L1 +[ #L1 #H elim (lpx_sn_inv_pair2 … H) -H /3 width=5 by inj, ex3_2_intro/ +| #L1 #L #HL1 #_ * #K #V #HK2 #HV2 #H destruct + elim (lpx_sn_inv_pair2 … HL1) -HL1 #K1 #V1 #HK1 #HV1 #H destruct + lapply (HR … HV2 … HK1) -HR -HV2 /3 width=5 by TC_strap, ex3_2_intro/ +] +qed-. + +lemma TC_lpx_sn_ind: ∀R. s_rs_transitive … R (λ_. lpx_sn R) → + ∀S:relation lenv. + S (⋆) (⋆) → ( + ∀I,K1,K2,V1,V2. + TC … (lpx_sn R) K1 K2 → LTC … R K1 V1 V2 → + S K1 K2 → S (K1.ⓑ{I}V1) (K2.ⓑ{I}V2) + ) → + ∀L2,L1. TC … (lpx_sn R) L1 L2 → S L1 L2. +#R #HR #S #IH1 #IH2 #L2 elim L2 -L2 +[ #X #H >(TC_lpx_sn_inv_atom2 … H) -X // +| #L2 #I #V2 #IHL2 #X #H + elim (TC_lpx_sn_inv_pair2 … H) // -H -HR + #L1 #V1 #HL12 #HV12 #H destruct /3 width=1 by/ +] +qed-. + +lemma TC_lpx_sn_inv_atom1: ∀R,L2. TC … (lpx_sn R) (⋆) L2 → L2 = ⋆. +#R #L2 #H elim H -L2 +[ /2 width=2 by lpx_sn_inv_atom1/ +| #L #L2 #_ #HL2 #IHL1 destruct /2 width=2 by lpx_sn_inv_atom1/ +] +qed-. + +fact TC_lpx_sn_inv_pair1_aux: ∀R. s_rs_transitive … R (λ_. lpx_sn R) → + ∀L1,L2. TC … (lpx_sn R) L1 L2 → + ∀I,K1,V1. L1 = K1.ⓑ{I}V1 → + ∃∃K2,V2. TC … (lpx_sn R) K1 K2 & LTC … R K1 V1 V2 & L2 = K2. ⓑ{I} V2. +#R #HR #L1 #L2 #H @(TC_lpx_sn_ind … H) // -HR -L1 -L2 +[ #J #K #W #H destruct +| #I #L1 #L2 #V1 #V2 #HL12 #HV12 #_ #J #K #W #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma TC_lpx_sn_inv_pair1: ∀R. s_rs_transitive … R (λ_. lpx_sn R) → + ∀I,K1,L2,V1. TC … (lpx_sn R) (K1.ⓑ{I}V1) L2 → + ∃∃K2,V2. TC … (lpx_sn R) K1 K2 & LTC … R K1 V1 V2 & L2 = K2. ⓑ{I} V2. +/2 width=3 by TC_lpx_sn_inv_pair1_aux/ qed-. + +lemma TC_lpx_sn_inv_lpx_sn_LTC: ∀R. s_rs_transitive … R (λ_. lpx_sn R) → + ∀L1,L2. TC … (lpx_sn R) L1 L2 → + lpx_sn (LTC … R) L1 L2. +/3 width=4 by TC_lpx_sn_ind, lpx_sn_pair/ qed-. + +(* Forward lemmas on transitive closure *************************************) + +lemma TC_lpx_sn_fwd_length: ∀R,L1,L2. TC … (lpx_sn R) L1 L2 → |L1| = |L2|. +#R #L1 #L2 #H elim H -L2 +[ #L2 #HL12 >(lpx_sn_fwd_length … HL12) -HL12 // +| #L #L2 #_ #HL2 #IHL1 + >IHL1 -L1 >(lpx_sn_fwd_length … HL2) -HL2 // +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lsuby.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lsuby.ma new file mode 100644 index 000000000..0aab792f9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lsuby.ma @@ -0,0 +1,237 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_plus.ma". +include "basic_2A/notation/relations/lrsubeq_4.ma". +include "basic_2A/substitution/drop.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR EXTENDED SUBSTITUTION *******************) + +inductive lsuby: relation4 ynat ynat lenv lenv ≝ +| lsuby_atom: ∀L,l,m. lsuby l m L (⋆) +| lsuby_zero: ∀I1,I2,L1,L2,V1,V2. + lsuby 0 0 L1 L2 → lsuby 0 0 (L1.ⓑ{I1}V1) (L2.ⓑ{I2}V2) +| lsuby_pair: ∀I1,I2,L1,L2,V,m. lsuby 0 m L1 L2 → + lsuby 0 (⫯m) (L1.ⓑ{I1}V) (L2.ⓑ{I2}V) +| lsuby_succ: ∀I1,I2,L1,L2,V1,V2,l,m. + lsuby l m L1 L2 → lsuby (⫯l) m (L1.ⓑ{I1}V1) (L2.ⓑ{I2}V2) +. + +interpretation + "local environment refinement (extended substitution)" + 'LRSubEq L1 l m L2 = (lsuby l m L1 L2). + +(* Basic properties *********************************************************) + +lemma lsuby_pair_lt: ∀I1,I2,L1,L2,V,m. L1 ⊆[0, ⫰m] L2 → 0 < m → + L1.ⓑ{I1}V ⊆[0, m] L2.ⓑ{I2}V. +#I1 #I2 #L1 #L2 #V #m #HL12 #Hm <(ylt_inv_O1 … Hm) /2 width=1 by lsuby_pair/ +qed. + +lemma lsuby_succ_lt: ∀I1,I2,L1,L2,V1,V2,l,m. L1 ⊆[⫰l, m] L2 → 0 < l → + L1.ⓑ{I1}V1 ⊆[l, m] L2. ⓑ{I2}V2. +#I1 #I2 #L1 #L2 #V1 #V2 #l #m #HL12 #Hl <(ylt_inv_O1 … Hl) /2 width=1 by lsuby_succ/ +qed. + +lemma lsuby_pair_O_Y: ∀L1,L2. L1 ⊆[0, ∞] L2 → + ∀I1,I2,V. L1.ⓑ{I1}V ⊆[0,∞] L2.ⓑ{I2}V. +#L1 #L2 #HL12 #I1 #I2 #V lapply (lsuby_pair I1 I2 … V … HL12) -HL12 // +qed. + +lemma lsuby_refl: ∀L,l,m. L ⊆[l, m] L. +#L elim L -L // +#L #I #V #IHL #l elim (ynat_cases … l) [| * #x ] +#Hl destruct /2 width=1 by lsuby_succ/ +#m elim (ynat_cases … m) [| * #x ] +#Hm destruct /2 width=1 by lsuby_zero, lsuby_pair/ +qed. + +lemma lsuby_O2: ∀L2,L1,l. |L2| ≤ |L1| → L1 ⊆[l, yinj 0] L2. +#L2 elim L2 -L2 // #L2 #I2 #V2 #IHL2 * normalize +[ #l #H elim (le_plus_xSy_O_false … H) +| #L1 #I1 #V1 #l #H lapply (le_plus_to_le_r … H) -H #HL12 + elim (ynat_cases l) /3 width=1 by lsuby_zero/ + * /3 width=1 by lsuby_succ/ +] +qed. + +lemma lsuby_sym: ∀l,m,L1,L2. L1 ⊆[l, m] L2 → |L1| = |L2| → L2 ⊆[l, m] L1. +#l #m #L1 #L2 #H elim H -l -m -L1 -L2 +[ #L1 #l #m #H >(length_inv_zero_dx … H) -L1 // +| /2 width=1 by lsuby_O2/ +| #I1 #I2 #L1 #L2 #V #m #_ #IHL12 #H lapply (injective_plus_l … H) + /3 width=1 by lsuby_pair/ +| #I1 #I2 #L1 #L2 #V1 #V2 #l #m #_ #IHL12 #H lapply (injective_plus_l … H) + /3 width=1 by lsuby_succ/ +] +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact lsuby_inv_atom1_aux: ∀L1,L2,l,m. L1 ⊆[l, m] L2 → L1 = ⋆ → L2 = ⋆. +#L1 #L2 #l #m * -L1 -L2 -l -m // +[ #I1 #I2 #L1 #L2 #V1 #V2 #_ #H destruct +| #I1 #I2 #L1 #L2 #V #m #_ #H destruct +| #I1 #I2 #L1 #L2 #V1 #V2 #l #m #_ #H destruct +] +qed-. + +lemma lsuby_inv_atom1: ∀L2,l,m. ⋆ ⊆[l, m] L2 → L2 = ⋆. +/2 width=5 by lsuby_inv_atom1_aux/ qed-. + +fact lsuby_inv_zero1_aux: ∀L1,L2,l,m. L1 ⊆[l, m] L2 → + ∀J1,K1,W1. L1 = K1.ⓑ{J1}W1 → l = 0 → m = 0 → + L2 = ⋆ ∨ + ∃∃J2,K2,W2. K1 ⊆[0, 0] K2 & L2 = K2.ⓑ{J2}W2. +#L1 #L2 #l #m * -L1 -L2 -l -m /2 width=1 by or_introl/ +[ #I1 #I2 #L1 #L2 #V1 #V2 #HL12 #J1 #K1 #W1 #H #_ #_ destruct + /3 width=5 by ex2_3_intro, or_intror/ +| #I1 #I2 #L1 #L2 #V #m #_ #J1 #K1 #W1 #_ #_ #H + elim (ysucc_inv_O_dx … H) +| #I1 #I2 #L1 #L2 #V1 #V2 #l #m #_ #J1 #K1 #W1 #_ #H + elim (ysucc_inv_O_dx … H) +] +qed-. + +lemma lsuby_inv_zero1: ∀I1,K1,L2,V1. K1.ⓑ{I1}V1 ⊆[0, 0] L2 → + L2 = ⋆ ∨ + ∃∃I2,K2,V2. K1 ⊆[0, 0] K2 & L2 = K2.ⓑ{I2}V2. +/2 width=9 by lsuby_inv_zero1_aux/ qed-. + +fact lsuby_inv_pair1_aux: ∀L1,L2,l,m. L1 ⊆[l, m] L2 → + ∀J1,K1,W. L1 = K1.ⓑ{J1}W → l = 0 → 0 < m → + L2 = ⋆ ∨ + ∃∃J2,K2. K1 ⊆[0, ⫰m] K2 & L2 = K2.ⓑ{J2}W. +#L1 #L2 #l #m * -L1 -L2 -l -m /2 width=1 by or_introl/ +[ #I1 #I2 #L1 #L2 #V1 #V2 #_ #J1 #K1 #W #_ #_ #H + elim (ylt_yle_false … H) // +| #I1 #I2 #L1 #L2 #V #m #HL12 #J1 #K1 #W #H #_ #_ destruct + /3 width=4 by ex2_2_intro, or_intror/ +| #I1 #I2 #L1 #L2 #V1 #V2 #l #m #_ #J1 #K1 #W #_ #H + elim (ysucc_inv_O_dx … H) +] +qed-. + +lemma lsuby_inv_pair1: ∀I1,K1,L2,V,m. K1.ⓑ{I1}V ⊆[0, m] L2 → 0 < m → + L2 = ⋆ ∨ + ∃∃I2,K2. K1 ⊆[0, ⫰m] K2 & L2 = K2.ⓑ{I2}V. +/2 width=6 by lsuby_inv_pair1_aux/ qed-. + +fact lsuby_inv_succ1_aux: ∀L1,L2,l,m. L1 ⊆[l, m] L2 → + ∀J1,K1,W1. L1 = K1.ⓑ{J1}W1 → 0 < l → + L2 = ⋆ ∨ + ∃∃J2,K2,W2. K1 ⊆[⫰l, m] K2 & L2 = K2.ⓑ{J2}W2. +#L1 #L2 #l #m * -L1 -L2 -l -m /2 width=1 by or_introl/ +[ #I1 #I2 #L1 #L2 #V1 #V2 #_ #J1 #K1 #W1 #_ #H + elim (ylt_yle_false … H) // +| #I1 #I2 #L1 #L2 #V #m #_ #J1 #K1 #W1 #_ #H + elim (ylt_yle_false … H) // +| #I1 #I2 #L1 #L2 #V1 #V2 #l #m #HL12 #J1 #K1 #W1 #H #_ destruct + /3 width=5 by ex2_3_intro, or_intror/ +] +qed-. + +lemma lsuby_inv_succ1: ∀I1,K1,L2,V1,l,m. K1.ⓑ{I1}V1 ⊆[l, m] L2 → 0 < l → + L2 = ⋆ ∨ + ∃∃I2,K2,V2. K1 ⊆[⫰l, m] K2 & L2 = K2.ⓑ{I2}V2. +/2 width=5 by lsuby_inv_succ1_aux/ qed-. + +fact lsuby_inv_zero2_aux: ∀L1,L2,l,m. L1 ⊆[l, m] L2 → + ∀J2,K2,W2. L2 = K2.ⓑ{J2}W2 → l = 0 → m = 0 → + ∃∃J1,K1,W1. K1 ⊆[0, 0] K2 & L1 = K1.ⓑ{J1}W1. +#L1 #L2 #l #m * -L1 -L2 -l -m +[ #L1 #l #m #J2 #K2 #W1 #H destruct +| #I1 #I2 #L1 #L2 #V1 #V2 #HL12 #J2 #K2 #W2 #H #_ #_ destruct + /2 width=5 by ex2_3_intro/ +| #I1 #I2 #L1 #L2 #V #m #_ #J2 #K2 #W2 #_ #_ #H + elim (ysucc_inv_O_dx … H) +| #I1 #I2 #L1 #L2 #V1 #V2 #l #m #_ #J2 #K2 #W2 #_ #H + elim (ysucc_inv_O_dx … H) +] +qed-. + +lemma lsuby_inv_zero2: ∀I2,K2,L1,V2. L1 ⊆[0, 0] K2.ⓑ{I2}V2 → + ∃∃I1,K1,V1. K1 ⊆[0, 0] K2 & L1 = K1.ⓑ{I1}V1. +/2 width=9 by lsuby_inv_zero2_aux/ qed-. + +fact lsuby_inv_pair2_aux: ∀L1,L2,l,m. L1 ⊆[l, m] L2 → + ∀J2,K2,W. L2 = K2.ⓑ{J2}W → l = 0 → 0 < m → + ∃∃J1,K1. K1 ⊆[0, ⫰m] K2 & L1 = K1.ⓑ{J1}W. +#L1 #L2 #l #m * -L1 -L2 -l -m +[ #L1 #l #m #J2 #K2 #W #H destruct +| #I1 #I2 #L1 #L2 #V1 #V2 #_ #J2 #K2 #W #_ #_ #H + elim (ylt_yle_false … H) // +| #I1 #I2 #L1 #L2 #V #m #HL12 #J2 #K2 #W #H #_ #_ destruct + /2 width=4 by ex2_2_intro/ +| #I1 #I2 #L1 #L2 #V1 #V2 #l #m #_ #J2 #K2 #W #_ #H + elim (ysucc_inv_O_dx … H) +] +qed-. + +lemma lsuby_inv_pair2: ∀I2,K2,L1,V,m. L1 ⊆[0, m] K2.ⓑ{I2}V → 0 < m → + ∃∃I1,K1. K1 ⊆[0, ⫰m] K2 & L1 = K1.ⓑ{I1}V. +/2 width=6 by lsuby_inv_pair2_aux/ qed-. + +fact lsuby_inv_succ2_aux: ∀L1,L2,l,m. L1 ⊆[l, m] L2 → + ∀J2,K2,W2. L2 = K2.ⓑ{J2}W2 → 0 < l → + ∃∃J1,K1,W1. K1 ⊆[⫰l, m] K2 & L1 = K1.ⓑ{J1}W1. +#L1 #L2 #l #m * -L1 -L2 -l -m +[ #L1 #l #m #J2 #K2 #W2 #H destruct +| #I1 #I2 #L1 #L2 #V1 #V2 #_ #J2 #K2 #W2 #_ #H + elim (ylt_yle_false … H) // +| #I1 #I2 #L1 #L2 #V #m #_ #J2 #K1 #W2 #_ #H + elim (ylt_yle_false … H) // +| #I1 #I2 #L1 #L2 #V1 #V2 #l #m #HL12 #J2 #K2 #W2 #H #_ destruct + /2 width=5 by ex2_3_intro/ +] +qed-. + +lemma lsuby_inv_succ2: ∀I2,K2,L1,V2,l,m. L1 ⊆[l, m] K2.ⓑ{I2}V2 → 0 < l → + ∃∃I1,K1,V1. K1 ⊆[⫰l, m] K2 & L1 = K1.ⓑ{I1}V1. +/2 width=5 by lsuby_inv_succ2_aux/ qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lsuby_fwd_length: ∀L1,L2,l,m. L1 ⊆[l, m] L2 → |L2| ≤ |L1|. +#L1 #L2 #l #m #H elim H -L1 -L2 -l -m normalize /2 width=1 by le_S_S/ +qed-. + +(* Properties on basic slicing **********************************************) + +lemma lsuby_drop_trans_be: ∀L1,L2,l,m. L1 ⊆[l, m] L2 → + ∀I2,K2,W,s,i. ⬇[s, 0, i] L2 ≡ K2.ⓑ{I2}W → + l ≤ i → i < l + m → + ∃∃I1,K1. K1 ⊆[0, ⫰(l+m-i)] K2 & ⬇[s, 0, i] L1 ≡ K1.ⓑ{I1}W. +#L1 #L2 #l #m #H elim H -L1 -L2 -l -m +[ #L1 #l #m #J2 #K2 #W #s #i #H + elim (drop_inv_atom1 … H) -H #H destruct +| #I1 #I2 #L1 #L2 #V1 #V2 #_ #_ #J2 #K2 #W #s #i #_ #_ #H + elim (ylt_yle_false … H) // +| #I1 #I2 #L1 #L2 #V #m #HL12 #IHL12 #J2 #K2 #W #s #i #H #_ >yplus_O1 + elim (drop_inv_O1_pair1 … H) -H * #Hi #HLK1 [ -IHL12 | -HL12 ] + [ #_ destruct -I2 >ypred_succ + /2 width=4 by drop_pair, ex2_2_intro/ + | lapply (ylt_inv_O1 i ?) /2 width=1 by ylt_inj/ + #H yminus_succ yplus_succ1 #H lapply (ylt_inv_succ … H) -H + #Hilm lapply (drop_inv_drop1_lt … HLK2 ?) -HLK2 /2 width=1 by ylt_O/ + #HLK1 elim (IHL12 … HLK1) -IHL12 -HLK1 yminus_SO2 + /4 width=4 by ylt_O, drop_drop_lt, ex2_2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lsuby_lsuby.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lsuby_lsuby.ma new file mode 100644 index 000000000..8e45e98c9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lsuby_lsuby.ma @@ -0,0 +1,32 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lsuby.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR EXTENDED SUBSTITUTION *******************) + +(* Main properties **********************************************************) + +theorem lsuby_trans: ∀l,m. Transitive … (lsuby l m). +#l #m #L1 #L2 #H elim H -L1 -L2 -l -m +[ #L1 #l #m #X #H lapply (lsuby_inv_atom1 … H) -H + #H destruct // +| #I1 #I2 #L1 #L #V1 #V #_ #IHL1 #X #H elim (lsuby_inv_zero1 … H) -H // + * #I2 #L2 #V2 #HL2 #H destruct /3 width=1 by lsuby_zero/ +| #I1 #I2 #L1 #L2 #V #m #_ #IHL1 #X #H elim (lsuby_inv_pair1 … H) -H // + * #I2 #L2 #HL2 #H destruct /3 width=1 by lsuby_pair/ +| #I1 #I2 #L1 #L2 #V1 #V2 #l #m #_ #IHL1 #X #H elim (lsuby_inv_succ1 … H) -H // + * #I2 #L2 #V2 #HL2 #H destruct /3 width=1 by lsuby_succ/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/unfold/lstas.ma b/matita/matita/contribs/lambdadelta/basic_2A/unfold/lstas.ma new file mode 100644 index 000000000..20cce2f5c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/unfold/lstas.ma @@ -0,0 +1,190 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/statictypestar_6.ma". +include "basic_2A/grammar/genv.ma". +include "basic_2A/substitution/drop.ma". +include "basic_2A/static/sh.ma". + +(* NAT-ITERATED STATIC TYPE ASSIGNMENT FOR TERMS ****************************) + +(* activate genv *) +inductive lstas (h): nat → relation4 genv lenv term term ≝ +| lstas_sort: ∀G,L,d,k. lstas h d G L (⋆k) (⋆((next h)^d k)) +| lstas_ldef: ∀G,L,K,V,W,U,i,d. ⬇[i] L ≡ K.ⓓV → lstas h d G K V W → + ⬆[0, i+1] W ≡ U → lstas h d G L (#i) U +| lstas_zero: ∀G,L,K,W,V,i. ⬇[i] L ≡ K.ⓛW → lstas h 0 G K W V → + lstas h 0 G L (#i) (#i) +| lstas_succ: ∀G,L,K,W,V,U,i,d. ⬇[i] L ≡ K.ⓛW → lstas h d G K W V → + ⬆[0, i+1] V ≡ U → lstas h (d+1) G L (#i) U +| lstas_bind: ∀a,I,G,L,V,T,U,d. lstas h d G (L.ⓑ{I}V) T U → + lstas h d G L (ⓑ{a,I}V.T) (ⓑ{a,I}V.U) +| lstas_appl: ∀G,L,V,T,U,d. lstas h d G L T U → lstas h d G L (ⓐV.T) (ⓐV.U) +| lstas_cast: ∀G,L,W,T,U,d. lstas h d G L T U → lstas h d G L (ⓝW.T) U +. + +interpretation "nat-iterated static type assignment (term)" + 'StaticTypeStar h G L d T U = (lstas h d G L T U). + +(* Basic inversion lemmas ***************************************************) + +fact lstas_inv_sort1_aux: ∀h,G,L,T,U,d. ⦃G, L⦄ ⊢ T •*[h, d] U → ∀k0. T = ⋆k0 → + U = ⋆((next h)^d k0). +#h #G #L #T #U #d * -G -L -T -U -d +[ #G #L #d #k #k0 #H destruct // +| #G #L #K #V #W #U #i #d #_ #_ #_ #k0 #H destruct +| #G #L #K #W #V #i #_ #_ #k0 #H destruct +| #G #L #K #W #V #U #i #d #_ #_ #_ #k0 #H destruct +| #a #I #G #L #V #T #U #d #_ #k0 #H destruct +| #G #L #V #T #U #d #_ #k0 #H destruct +| #G #L #W #T #U #d #_ #k0 #H destruct +qed-. + +(* Basic_1: was just: sty0_gen_sort *) +lemma lstas_inv_sort1: ∀h,G,L,X,k,d. ⦃G, L⦄ ⊢ ⋆k •*[h, d] X → X = ⋆((next h)^d k). +/2 width=5 by lstas_inv_sort1_aux/ +qed-. + +fact lstas_inv_lref1_aux: ∀h,G,L,T,U,d. ⦃G, L⦄ ⊢ T •*[h, d] U → ∀j. T = #j → ∨∨ + (∃∃K,V,W. ⬇[j] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V •*[h, d] W & + ⬆[0, j+1] W ≡ U + ) | + (∃∃K,W,V. ⬇[j] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, 0] V & + U = #j & d = 0 + ) | + (∃∃K,W,V,d0. ⬇[j] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, d0] V & + ⬆[0, j+1] V ≡ U & d = d0+1 + ). +#h #G #L #T #U #d * -G -L -T -U -d +[ #G #L #d #k #j #H destruct +| #G #L #K #V #W #U #i #d #HLK #HVW #HWU #j #H destruct /3 width=6 by or3_intro0, ex3_3_intro/ +| #G #L #K #W #V #i #HLK #HWV #j #H destruct /3 width=5 by or3_intro1, ex4_3_intro/ +| #G #L #K #W #V #U #i #d #HLK #HWV #HWU #j #H destruct /3 width=8 by or3_intro2, ex4_4_intro/ +| #a #I #G #L #V #T #U #d #_ #j #H destruct +| #G #L #V #T #U #d #_ #j #H destruct +| #G #L #W #T #U #d #_ #j #H destruct +] +qed-. + +lemma lstas_inv_lref1: ∀h,G,L,X,i,d. ⦃G, L⦄ ⊢ #i •*[h, d] X → ∨∨ + (∃∃K,V,W. ⬇[i] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V •*[h, d] W & + ⬆[0, i+1] W ≡ X + ) | + (∃∃K,W,V. ⬇[i] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, 0] V & + X = #i & d = 0 + ) | + (∃∃K,W,V,d0. ⬇[i] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, d0] V & + ⬆[0, i+1] V ≡ X & d = d0+1 + ). +/2 width=3 by lstas_inv_lref1_aux/ +qed-. + +lemma lstas_inv_lref1_O: ∀h,G,L,X,i. ⦃G, L⦄ ⊢ #i •*[h, 0] X → + (∃∃K,V,W. ⬇[i] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V •*[h, 0] W & + ⬆[0, i+1] W ≡ X + ) ∨ + (∃∃K,W,V. ⬇[i] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, 0] V & + X = #i + ). +#h #G #L #X #i #H elim (lstas_inv_lref1 … H) -H * /3 width=6 by ex3_3_intro, or_introl, or_intror/ +#K #W #V #d #_ #_ #_ (lift_inv_sort1 … H1) -X1 + >(lift_inv_sort1 … H2) -X2 // +| #G #L1 #K1 #V1 #W1 #W #i #d #HLK1 #_ #HW1 #IHVW1 #L2 #s #l #m #HL21 #X #H #U2 #HWU2 + elim (lift_inv_lref1 … H) * #Hil #H destruct + [ elim (lift_trans_ge … HW1 … HWU2) -W // #W2 #HW12 #HWU2 + elim (drop_trans_le … HL21 … HLK1) -L1 /2 width=2 by lt_to_le/ #X #HLK2 #H + elim (drop_inv_skip2 … H) -H /2 width=1 by lt_plus_to_minus_r/ -Hil #K2 #V2 #HK21 #HV12 #H destruct + /3 width=9 by lstas_ldef/ + | lapply (lift_trans_be … HW1 … HWU2 ? ?) -W /2 width=1 by le_S/ #HW1U2 + lapply (drop_trans_ge … HL21 … HLK1 ?) -L1 /3 width=9 by lstas_ldef, drop_inv_gen/ + ] +| #G #L1 #K1 #V1 #W1 #i #HLK1 #_ #IHVW1 #L2 #s #l #m #HL21 #X #H #U2 #HWU2 + >(lift_mono … HWU2 … H) -U2 + elim (lift_inv_lref1 … H) * #Hil #H destruct + [ elim (lift_total W1 (l-i-1) m) #W2 #HW12 + elim (drop_trans_le … HL21 … HLK1) -L1 /2 width=2 by lt_to_le/ #X #HLK2 #H + elim (drop_inv_skip2 … H) -H /2 width=1 by lt_plus_to_minus_r/ -Hil #K2 #V2 #HK21 #HV12 #H destruct + /3 width=10 by lstas_zero/ + | lapply (drop_trans_ge … HL21 … HLK1 ?) -L1 + /3 width=10 by lstas_zero, drop_inv_gen/ + ] +| #G #L1 #K1 #W1 #V1 #W #i #d #HLK1 #_ #HW1 #IHWV1 #L2 #s #l #m #HL21 #X #H #U2 #HWU2 + elim (lift_inv_lref1 … H) * #Hil #H destruct + [ elim (lift_trans_ge … HW1 … HWU2) -W // (lift_inv_sort2 … H) -X /2 width=3 by lstas_sort, lift_sort, ex2_intro/ +| #G #L2 #K2 #V2 #W2 #W #i #d #HLK2 #HVW2 #HW2 #IHVW2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_lref2 … H) * #Hil #H destruct [ -HVW2 | -IHVW2 ] + [ elim (drop_conf_lt … HL21 … HLK2) -L2 // #K1 #V1 #HLK1 #HK21 #HV12 + elim (IHVW2 … HK21 … HV12) -K2 -V2 #W1 #HW12 #HVW1 + elim (lift_trans_le … HW12 … HW2) -W2 // >minus_plus minus_minus_m_m /3 width=8 by lstas_ldef, le_S, ex2_intro/ + ] +| #G #L2 #K2 #W2 #V2 #i #HLK2 #HWV2 #IHWV2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_lref2 … H) * #Hil #H destruct [ -HWV2 | -IHWV2 ] + [ elim (drop_conf_lt … HL21 … HLK2) -L2 // #K1 #W1 #HLK1 #HK21 #HW12 + elim (IHWV2 … HK21 … HW12) -K2 + /3 width=5 by lstas_zero, lift_lref_lt, ex2_intro/ + | lapply (drop_conf_ge … HL21 … HLK2 ?) -L2 + /3 width=5 by lstas_zero, lift_lref_ge_minus, ex2_intro/ + ] +| #G #L2 #K2 #W2 #V2 #W #i #d #HLK2 #HWV2 #HW2 #IHWV2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_lref2 … H) * #Hil #H destruct [ -HWV2 | -IHWV2 ] + [ elim (drop_conf_lt … HL21 … HLK2) -L2 // #K1 #W1 #HLK1 #HK21 #HW12 + elim (IHWV2 … HK21 … HW12) -K2 #V1 #HV12 #HWV1 + elim (lift_trans_le … HV12 … HW2) -W2 // >minus_plus minus_minus_m_m /3 width=8 by lstas_succ, le_S, ex2_intro/ + ] +| #a #I #G #L2 #V2 #T2 #U2 #d #_ #IHTU2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_bind2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct + elim (IHTU2 (L1.ⓑ{I}V1) … HT12) -IHTU2 -HT12 /3 width=5 by lstas_bind, drop_skip, lift_bind, ex2_intro/ +| #G #L2 #V2 #T2 #U2 #d #_ #IHTU2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_flat2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct + elim (IHTU2 … HL21 … HT12) -L2 -HT12 /3 width=5 by lstas_appl, lift_flat, ex2_intro/ +| #G #L2 #W2 #T2 #U2 #d #_ #IHTU2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_flat2 … H) -H #W1 #T1 #_ #HT12 #H destruct + elim (IHTU2 … HL21 … HT12) -L2 -HT12 /3 width=3 by lstas_cast, ex2_intro/ +] +qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma lstas_split_aux: ∀h,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 •*[h, d] T2 → ∀d1,d2. d = d1 + d2 → + ∃∃T. ⦃G, L⦄ ⊢ T1 •*[h, d1] T & ⦃G, L⦄ ⊢ T •*[h, d2] T2. +#h #G #L #T1 #T2 #d #H elim H -G -L -T1 -T2 -d +[ #G #L #d #k #d1 #d2 #H destruct + >commutative_plus >iter_plus /2 width=3 by lstas_sort, ex2_intro/ +| #G #L #K #V1 #V2 #U2 #i #d #HLK #_ #VU2 #IHV12 #d1 #d2 #H destruct + elim (IHV12 d1 d2) -IHV12 // #V + elim (lift_total V 0 (i+1)) + lapply (drop_fwd_drop2 … HLK) + /3 width=12 by lstas_lift, lstas_ldef, ex2_intro/ +| #G #L #K #W1 #W2 #i #HLK #HW12 #_ #d1 #d2 #H + elim (zero_eq_plus … H) -H #H1 #H2 destruct + /3 width=5 by lstas_zero, ex2_intro/ +| #G #L #K #W1 #W2 #U2 #i #d #HLK #HW12 #HWU2 #IHW12 #d1 @(nat_ind_plus … d1) -d1 + [ #d2 normalize #H destruct + elim (IHW12 0 d) -IHW12 // + lapply (drop_fwd_drop2 … HLK) + /3 width=8 by lstas_succ, lstas_zero, ex2_intro/ + | #d1 #_ #d2 (lstas_inv_sort1 … H) -X + (lstas_inv_sort1 … H) -X // +| #G #L #K #V #V1 #U1 #i #d #HLK #_ #HVU1 #IHV1 #X #H + elim (lstas_inv_lref1 … H) -H * + #K0 #V0 #W0 [3: #d0 ] #HLK0 + lapply (drop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct + #HVW0 #HX lapply (IHV1 … HVW0) -IHV1 -HVW0 #H destruct + /2 width=5 by lift_mono/ +| #G #L #K #W #W1 #i #HLK #_ #_ #X #H + elim (lstas_inv_lref1_O … H) -H * + #K0 #V0 #W0 #HLK0 + lapply (drop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct // +| #G #L #K #W #W1 #U1 #i #d #HLK #_ #HWU1 #IHWV #X #H + elim (lstas_inv_lref1_S … H) -H * #K0 #W0 #V0 #HLK0 + lapply (drop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct + #HW0 #HX lapply (IHWV … HW0) -IHWV -HW0 #H destruct + /2 width=5 by lift_mono/ +| #a #I #G #L #V #T #U1 #d #_ #IHTU1 #X #H + elim (lstas_inv_bind1 … H) -H #U2 #HTU2 #H destruct /3 width=1 by eq_f/ +| #G #L #V #T #U1 #d #_ #IHTU1 #X #H + elim (lstas_inv_appl1 … H) -H #U2 #HTU2 #H destruct /3 width=1 by eq_f/ +| #G #L #W #T #U1 #d #_ #IHTU1 #U2 #H + lapply (lstas_inv_cast1 … H) -H /2 width=1 by/ +] +qed-. + +(* Advanced inversion lemmas ************************************************) + +(* Basic_1: was just: sty0_correct *) +lemma lstas_correct: ∀h,G,L,T1,T,d1. ⦃G, L⦄ ⊢ T1 •*[h, d1] T → + ∀d2. ∃T2. ⦃G, L⦄ ⊢ T •*[h, d2] T2. +#h #G #L #T1 #T #d1 #H elim H -G -L -T1 -T -d1 +[ /2 width=2 by lstas_sort, ex_intro/ +| #G #L #K #V1 #V #U #i #d #HLK #_ #HVU #IHV1 #d2 + elim (IHV1 d2) -IHV1 #V2 + elim (lift_total V2 0 (i+1)) + lapply (drop_fwd_drop2 … HLK) -HLK + /3 width=11 by ex_intro, lstas_lift/ +| #G #L #K #W1 #W #i #HLK #HW1 #IHW1 #d2 + @(nat_ind_plus … d2) -d2 /3 width=5 by lstas_zero, ex_intro/ + #d2 #_ elim (IHW1 d2) -IHW1 #W2 #HW2 + lapply (lstas_trans … HW1 … HW2) -W + elim (lift_total W2 0 (i+1)) + /3 width=7 by lstas_succ, ex_intro/ +| #G #L #K #W1 #W #U #i #d #HLK #_ #HWU #IHW1 #d2 + elim (IHW1 d2) -IHW1 #W2 + elim (lift_total W2 0 (i+1)) + lapply (drop_fwd_drop2 … HLK) -HLK + /3 width=11 by ex_intro, lstas_lift/ +| #a #I #G #L #V #T #U #d #_ #IHTU #d2 + elim (IHTU d2) -IHTU /3 width=2 by lstas_bind, ex_intro/ +| #G #L #V #T #U #d #_ #IHTU #d2 + elim (IHTU d2) -IHTU /3 width=2 by lstas_appl, ex_intro/ +| #G #L #W #T #U #d #_ #IHTU #d2 + elim (IHTU d2) -IHTU /2 width=2 by ex_intro/ +] +qed-. + +(* more main properties *****************************************************) + +theorem lstas_conf_le: ∀h,G,L,T,U1,d1. ⦃G, L⦄ ⊢ T •*[h, d1] U1 → + ∀U2,d2. d1 ≤ d2 → ⦃G, L⦄ ⊢ T •*[h, d2] U2 → + ⦃G, L⦄ ⊢ U1 •*[h, d2-d1] U2. +#h #G #L #T #U1 #d1 #HTU1 #U2 #d2 #Hd12 +>(plus_minus_m_m … Hd12) in ⊢ (%→?); -Hd12 >commutative_plus #H +elim (lstas_split … H) -H #U #HTU +>(lstas_mono … HTU … HTU1) -T // +qed-. + +theorem lstas_conf: ∀h,G,L,T0,T1,d1. ⦃G, L⦄ ⊢ T0 •*[h, d1] T1 → + ∀T2,d2. ⦃G, L⦄ ⊢ T0 •*[h, d2] T2 → + ∃∃T. ⦃G, L⦄ ⊢ T1 •*[h, d2] T & ⦃G, L⦄ ⊢ T2 •*[h, d1] T. +#h #G #L #T0 #T1 #d1 #HT01 #T2 #d2 #HT02 +elim (lstas_lstas … HT01 (d1+d2)) #T #HT0 +lapply (lstas_conf_le … HT01 … HT0) // -HT01 plus_minus // >commutative_plus >plus_minus // +qed-. + +fact plus_minus_minus_be_aux: ∀i,x,y,z. y ≤ z → z ≤ x → i = z - y → x - z + i = x - y. +/2 width=1 by plus_minus_minus_be/ qed-. + +lemma plus_n_2: ∀n. n + 2 = n + 1 + 1. +// qed. + +lemma le_plus_minus: ∀m,n,p. p ≤ n → m + n - p = m + (n - p). +/2 by plus_minus/ qed. + +lemma le_plus_minus_comm: ∀n,m,p. p ≤ m → m + n - p = m - p + n. +/2 by plus_minus/ qed. + +lemma minus_minus_comm3: ∀n,x,y,z. n-x-y-z = n-y-z-x. +// qed. + +lemma arith_b1: ∀a,b,c1. c1 ≤ b → a - c1 - (b - c1) = a - b. +#a #b #c1 #H >minus_minus_comm >minus_le_minus_minus_comm // +qed. + +lemma arith_b2: ∀a,b,c1,c2. c1 + c2 ≤ b → a - c1 - c2 - (b - c1 - c2) = a - b. +#a #b #c1 #c2 #H >minus_plus >minus_plus >minus_plus /2 width=1 by arith_b1/ +qed. + +lemma arith_c1x: ∀x,a,b,c1. x + c1 + a - (b + c1) = x + a - b. +/3 by monotonic_le_minus_l, le_to_le_to_eq, le_n/ qed. + +lemma arith_h1: ∀a1,a2,b,c1. c1 ≤ a1 → c1 ≤ b → + a1 - c1 + a2 - (b - c1) = a1 + a2 - b. +#a1 #a2 #b #c1 #H1 #H2 >plus_minus /2 width=1 by arith_b2/ +qed. + +lemma arith_i: ∀x,y,z. y < x → x+z-y-1 = x-y-1+z. +/2 width=1 by plus_minus/ qed-. + +(* Properties ***************************************************************) + +lemma eq_nat_dec: ∀n1,n2:nat. Decidable (n1 = n2). +#n1 elim n1 -n1 [| #n1 #IHn1 ] * [2,4: #n2 ] +[1,4: @or_intror #H destruct +| elim (IHn1 n2) -IHn1 /3 width=1 by or_intror, or_introl/ +| /2 width=1 by or_introl/ +] +qed-. + +lemma lt_or_eq_or_gt: ∀m,n. ∨∨ m < n | n = m | n < m. +#m #n elim (lt_or_ge m n) /2 width=1 by or3_intro0/ +#H elim H -m /2 width=1 by or3_intro1/ +#m #Hm * /3 width=1 by not_le_to_lt, le_S_S, or3_intro2/ +qed-. + +fact le_repl_sn_conf_aux: ∀x,y,z:nat. x ≤ z → x = y → y ≤ z. +// qed-. + +fact le_repl_sn_trans_aux: ∀x,y,z:nat. x ≤ z → y = x → y ≤ z. +// qed-. + +lemma monotonic_le_minus_l2: ∀x1,x2,y,z. x1 ≤ x2 → x1 - y - z ≤ x2 - y - z. +/3 width=1 by monotonic_le_minus_l/ qed. + +(* Note: this might interfere with nat.ma *) +lemma monotonic_lt_pred: ∀m,n. m < n → O < m → pred m < pred n. +#m #n #Hmn #Hm whd >(S_pred … Hm) +@le_S_S_to_le >S_pred /2 width=3 by transitive_lt/ +qed. + +lemma arith_j: ∀x,y,z. x-y-1 ≤ x-(y-z)-1. +/3 width=1 by monotonic_le_minus_l, monotonic_le_minus_r/ qed. + +lemma arith_k_sn: ∀z,x,y,n. z < x → x+n ≤ y → x-z-1+n ≤ y-z-1. +#z #x #y #n #Hzx #Hxny +>plus_minus [2: /2 width=1 by monotonic_le_minus_r/ ] +>plus_minus [2: /2 width=1 by lt_to_le/ ] +/2 width=1 by monotonic_le_minus_l2/ +qed. + +lemma arith_k_dx: ∀z,x,y,n. z < x → y ≤ x+n → y-z-1 ≤ x-z-1+n. +#z #x #y #n #Hzx #Hyxn +>plus_minus [2: /2 width=1 by monotonic_le_minus_r/ ] +>plus_minus [2: /2 width=1 by lt_to_le/ ] +/2 width=1 by monotonic_le_minus_l2/ +qed. + +(* Inversion & forward lemmas ***********************************************) + +lemma discr_plus_xy_y: ∀x,y. x + y = y → x = 0. +// qed-. + +lemma lt_plus_SO_to_le: ∀x,y. x < y + 1 → x ≤ y. +/2 width=1 by monotonic_pred/ qed-. + +lemma lt_refl_false: ∀n. n < n → ⊥. +#n #H elim (lt_to_not_eq … H) -H /2 width=1 by/ +qed-. + +lemma lt_zero_false: ∀n. n < 0 → ⊥. +#n #H elim (lt_to_not_le … H) -H /2 width=1 by/ +qed-. + +lemma pred_inv_refl: ∀m. pred m = m → m = 0. +* // normalize #m #H elim (lt_refl_false m) // +qed-. + +lemma le_plus_xSy_O_false: ∀x,y. x + S y ≤ 0 → ⊥. +#x #y #H lapply (le_n_O_to_eq … H) -H minus_plus_plus_l +#H lapply (discr_plus_xy_minus_xz … H) -H +#H destruct +qed-. + +lemma zero_eq_plus: ∀x,y. 0 = x + y → 0 = x ∧ 0 = y. +* /2 width=1 by conj/ #x #y normalize #H destruct +qed-. + +(* Iterators ****************************************************************) + +(* Note: see also: lib/arithemetics/bigops.ma *) +let rec iter (n:nat) (B:Type[0]) (op: B → B) (nil: B) ≝ + match n with + [ O ⇒ nil + | S k ⇒ op (iter k B op nil) + ]. + +interpretation "iterated function" 'exp op n = (iter n ? op). + +lemma iter_SO: ∀B:Type[0]. ∀f:B→B. ∀b,l. f^(l+1) b = f (f^l b). +#B #f #b #l >commutative_plus // +qed. + +lemma iter_n_Sm: ∀B:Type[0]. ∀f:B→B. ∀b,l. f^l (f b) = f (f^l b). +#B #f #b #l elim l -l normalize // +qed. + +lemma iter_plus: ∀B:Type[0]. ∀f:B→B. ∀b,l1,l2. f^(l1+l2) b = f^l1 (f^l2 b). +#B #f #b #l1 elim l1 -l1 normalize // +qed. + +(* Trichotomy operator ******************************************************) + +(* Note: this is "if eqb n1 n2 then a2 else if leb n1 n2 then a1 else a3" *) +let rec tri (A:Type[0]) n1 n2 a1 a2 a3 on n1 : A ≝ + match n1 with + [ O ⇒ match n2 with [ O ⇒ a2 | S n2 ⇒ a1 ] + | S n1 ⇒ match n2 with [ O ⇒ a3 | S n2 ⇒ tri A n1 n2 a1 a2 a3 ] + ]. + +lemma tri_lt: ∀A,a1,a2,a3,n2,n1. n1 < n2 → tri A n1 n2 a1 a2 a3 = a1. +#A #a1 #a2 #a3 #n2 elim n2 -n2 +[ #n1 #H elim (lt_zero_false … H) +| #n2 #IH #n1 elim n1 -n1 /3 width=1 by monotonic_lt_pred/ +] +qed. + +lemma tri_eq: ∀A,a1,a2,a3,n. tri A n n a1 a2 a3 = a2. +#A #a1 #a2 #a3 #n elim n -n normalize // +qed. + +lemma tri_gt: ∀A,a1,a2,a3,n1,n2. n2 < n1 → tri A n1 n2 a1 a2 a3 = a3. +#A #a1 #a2 #a3 #n1 elim n1 -n1 +[ #n2 #H elim (lt_zero_false … H) +| #n1 #IH #n2 elim n2 -n2 /3 width=1 by monotonic_lt_pred/ +] +qed. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/lib/bool.ma b/matita/matita/contribs/lambdadelta/ground_2A/lib/bool.ma new file mode 100644 index 000000000..293940b30 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/lib/bool.ma @@ -0,0 +1,38 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basics/bool.ma". +include "ground_2A/lib/star.ma". +include "ground_2A/notation/constructors/no_0.ma". +include "ground_2A/notation/constructors/yes_0.ma". + +(* BOOLEAN PROPERTIES *******************************************************) + +interpretation "boolean false" 'no = false. + +interpretation "boolean true" 'yes = true. + +(* Basic properties *********************************************************) + +lemma orb_false_r: ∀b1,b2:bool. (b1 ∨ b2) = false → b1 = false ∧ b2 = false. +* normalize /2 width=1 by conj/ #b2 #H destruct +qed-. + +lemma commutative_orb: commutative … orb. +* * // qed. + +lemma eq_bool_dec: ∀b1,b2:bool. Decidable (b1 = b2). +* * /2 width=1 by or_introl/ +@or_intror #H destruct +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/lib/list.ma b/matita/matita/contribs/lambdadelta/ground_2A/lib/list.ma new file mode 100644 index 000000000..f572a3f58 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/lib/list.ma @@ -0,0 +1,59 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/notation/constructors/nil_0.ma". +include "ground_2A/notation/constructors/cons_2.ma". +include "ground_2A/notation/constructors/cons_3.ma". +include "ground_2A/notation/functions/append_2.ma". +include "ground_2A/lib/arith.ma". + +(* LISTS ********************************************************************) + +inductive list (A:Type[0]) : Type[0] := + | nil : list A + | cons: A → list A → list A. + +interpretation "nil (list)" 'Nil = (nil ?). + +interpretation "cons (list)" 'Cons hd tl = (cons ? hd tl). + +let rec all A (R:predicate A) (l:list A) on l ≝ + match l with + [ nil ⇒ ⊤ + | cons hd tl ⇒ R hd ∧ all A R tl + ]. + +inductive list2 (A1,A2:Type[0]) : Type[0] := + | nil2 : list2 A1 A2 + | cons2: A1 → A2 → list2 A1 A2 → list2 A1 A2. + +interpretation "nil (list of pairs)" 'Nil = (nil2 ? ?). + +interpretation "cons (list of pairs)" 'Cons hd1 hd2 tl = (cons2 ? ? hd1 hd2 tl). + +let rec append2 (A1,A2:Type[0]) (l1,l2:list2 A1 A2) on l1 ≝ match l1 with +[ nil2 ⇒ l2 +| cons2 a1 a2 tl ⇒ {a1, a2} @ append2 A1 A2 tl l2 +]. + +interpretation "append (list of pairs)" + 'Append l1 l2 = (append2 ? ? l1 l2). + +let rec length2 (A1,A2:Type[0]) (l:list2 A1 A2) on l ≝ match l with +[ nil2 ⇒ 0 +| cons2 _ _ l ⇒ length2 A1 A2 l + 1 +]. + +interpretation "length (list of pairs)" + 'card l = (length2 ? ? l). diff --git a/matita/matita/contribs/lambdadelta/ground_2A/lib/lstar.ma b/matita/matita/contribs/lambdadelta/ground_2A/lib/lstar.ma new file mode 100644 index 000000000..ae707f2b9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/lib/lstar.ma @@ -0,0 +1,20 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "arithmetics/lstar.ma". + +(* PROPERTIES OF NAT-LABELED REFLEXIVE AND TRANSITIVE CLOSURE ***************) + +definition llstar: ∀A:Type[0]. ∀B. (A→relation B) → nat → (A→relation B) ≝ + λA,B,R,l,a. lstar … (R a) l. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/lib/star.ma b/matita/matita/contribs/lambdadelta/ground_2A/lib/star.ma new file mode 100644 index 000000000..0f193f0b1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/lib/star.ma @@ -0,0 +1,329 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basics/star1.ma". +include "ground_2A/xoa/xoa_props.ma". + +(* PROPERTIES OF RELATIONS **************************************************) + +definition Decidable: Prop → Prop ≝ λR. R ∨ (R → ⊥). + +definition Transitive: ∀A. ∀R: relation A. Prop ≝ λA,R. + ∀a1,a0. R a1 a0 → ∀a2. R a0 a2 → R a1 a2. + +definition confluent2: ∀A. ∀R1,R2: relation A. Prop ≝ λA,R1,R2. + ∀a0,a1. R1 a0 a1 → ∀a2. R2 a0 a2 → + ∃∃a. R2 a1 a & R1 a2 a. + +definition transitive2: ∀A. ∀R1,R2: relation A. Prop ≝ λA,R1,R2. + ∀a1,a0. R1 a1 a0 → ∀a2. R2 a0 a2 → + ∃∃a. R2 a1 a & R1 a a2. + +definition bi_confluent: ∀A,B. ∀R: bi_relation A B. Prop ≝ λA,B,R. + ∀a0,a1,b0,b1. R a0 b0 a1 b1 → ∀a2,b2. R a0 b0 a2 b2 → + ∃∃a,b. R a1 b1 a b & R a2 b2 a b. + +definition LTC: ∀A:Type[0]. ∀B. (A→relation B) → (A→relation B) ≝ + λA,B,R,a. TC … (R a). + +definition lsub_trans: ∀A,B. relation2 (A→relation B) (relation A) ≝ λA,B,R1,R2. + ∀L2,T1,T2. R1 L2 T1 T2 → ∀L1. R2 L1 L2 → R1 L1 T1 T2. + +definition s_r_transitive: ∀A,B. relation2 (A→relation B) (B→relation A) ≝ λA,B,R1,R2. + ∀L2,T1,T2. R1 L2 T1 T2 → ∀L1. R2 T1 L1 L2 → LTC … R1 L1 T1 T2. + +definition s_rs_transitive: ∀A,B. relation2 (A→relation B) (B→relation A) ≝ λA,B,R1,R2. + ∀L2,T1,T2. LTC … R1 L2 T1 T2 → ∀L1. R2 T1 L1 L2 → LTC … R1 L1 T1 T2. + +definition s_r_confluent1: ∀A,B. relation2 (A→relation B) (B→relation A) ≝ λA,B,R1,R2. + ∀L1,T1,T2. R1 L1 T1 T2 → ∀L2. R2 T1 L1 L2 → R2 T2 L1 L2. + +lemma TC_strip1: ∀A,R1,R2. confluent2 A R1 R2 → + ∀a0,a1. TC … R1 a0 a1 → ∀a2. R2 a0 a2 → + ∃∃a. R2 a1 a & TC … R1 a2 a. +#A #R1 #R2 #HR12 #a0 #a1 #H elim H -a1 +[ #a1 #Ha01 #a2 #Ha02 + elim (HR12 … Ha01 … Ha02) -HR12 -a0 /3 width=3 by inj, ex2_intro/ +| #a #a1 #_ #Ha1 #IHa0 #a2 #Ha02 + elim (IHa0 … Ha02) -a0 #a0 #Ha0 #Ha20 + elim (HR12 … Ha1 … Ha0) -HR12 -a /4 width=5 by step, ex2_intro/ +] +qed. + +lemma TC_strip2: ∀A,R1,R2. confluent2 A R1 R2 → + ∀a0,a2. TC … R2 a0 a2 → ∀a1. R1 a0 a1 → + ∃∃a. TC … R2 a1 a & R1 a2 a. +#A #R1 #R2 #HR12 #a0 #a2 #H elim H -a2 +[ #a2 #Ha02 #a1 #Ha01 + elim (HR12 … Ha01 … Ha02) -HR12 -a0 /3 width=3 by inj, ex2_intro/ +| #a #a2 #_ #Ha2 #IHa0 #a1 #Ha01 + elim (IHa0 … Ha01) -a0 #a0 #Ha10 #Ha0 + elim (HR12 … Ha0 … Ha2) -HR12 -a /4 width=3 by step, ex2_intro/ +] +qed. + +lemma TC_confluent2: ∀A,R1,R2. + confluent2 A R1 R2 → confluent2 A (TC … R1) (TC … R2). +#A #R1 #R2 #HR12 #a0 #a1 #H elim H -a1 +[ #a1 #Ha01 #a2 #Ha02 + elim (TC_strip2 … HR12 … Ha02 … Ha01) -HR12 -a0 /3 width=3 by inj, ex2_intro/ +| #a #a1 #_ #Ha1 #IHa0 #a2 #Ha02 + elim (IHa0 … Ha02) -a0 #a0 #Ha0 #Ha20 + elim (TC_strip2 … HR12 … Ha0 … Ha1) -HR12 -a /4 width=5 by step, ex2_intro/ +] +qed. + +lemma TC_strap1: ∀A,R1,R2. transitive2 A R1 R2 → + ∀a1,a0. TC … R1 a1 a0 → ∀a2. R2 a0 a2 → + ∃∃a. R2 a1 a & TC … R1 a a2. +#A #R1 #R2 #HR12 #a1 #a0 #H elim H -a0 +[ #a0 #Ha10 #a2 #Ha02 + elim (HR12 … Ha10 … Ha02) -HR12 -a0 /3 width=3 by inj, ex2_intro/ +| #a #a0 #_ #Ha0 #IHa #a2 #Ha02 + elim (HR12 … Ha0 … Ha02) -HR12 -a0 #a0 #Ha0 #Ha02 + elim (IHa … Ha0) -a /4 width=5 by step, ex2_intro/ +] +qed. + +lemma TC_strap2: ∀A,R1,R2. transitive2 A R1 R2 → + ∀a0,a2. TC … R2 a0 a2 → ∀a1. R1 a1 a0 → + ∃∃a. TC … R2 a1 a & R1 a a2. +#A #R1 #R2 #HR12 #a0 #a2 #H elim H -a2 +[ #a2 #Ha02 #a1 #Ha10 + elim (HR12 … Ha10 … Ha02) -HR12 -a0 /3 width=3 by inj, ex2_intro/ +| #a #a2 #_ #Ha02 #IHa #a1 #Ha10 + elim (IHa … Ha10) -a0 #a0 #Ha10 #Ha0 + elim (HR12 … Ha0 … Ha02) -HR12 -a /4 width=3 by step, ex2_intro/ +] +qed. + +lemma TC_transitive2: ∀A,R1,R2. + transitive2 A R1 R2 → transitive2 A (TC … R1) (TC … R2). +#A #R1 #R2 #HR12 #a1 #a0 #H elim H -a0 +[ #a0 #Ha10 #a2 #Ha02 + elim (TC_strap2 … HR12 … Ha02 … Ha10) -HR12 -a0 /3 width=3 by inj, ex2_intro/ +| #a #a0 #_ #Ha0 #IHa #a2 #Ha02 + elim (TC_strap2 … HR12 … Ha02 … Ha0) -HR12 -a0 #a0 #Ha0 #Ha02 + elim (IHa … Ha0) -a /4 width=5 by step, ex2_intro/ +] +qed. + +definition NF: ∀A. relation A → relation A → predicate A ≝ + λA,R,S,a1. ∀a2. R a1 a2 → S a2 a1. + +definition NF_dec: ∀A. relation A → relation A → Prop ≝ + λA,R,S. ∀a1. NF A R S a1 ∨ + ∃∃a2. R … a1 a2 & (S a2 a1 → ⊥). + +inductive SN (A) (R,S:relation A): predicate A ≝ +| SN_intro: ∀a1. (∀a2. R a1 a2 → (S a2 a1 → ⊥) → SN A R S a2) → SN A R S a1 +. + +lemma NF_to_SN: ∀A,R,S,a. NF A R S a → SN A R S a. +#A #R #S #a1 #Ha1 +@SN_intro #a2 #HRa12 #HSa12 +elim HSa12 -HSa12 /2 width=1 by/ +qed. + +lemma SN_to_NF: ∀A,R,S. NF_dec A R S → + ∀a1. SN A R S a1 → + ∃∃a2. star … R a1 a2 & NF A R S a2. +#A #R #S #HRS #a1 #H elim H -a1 +#a1 #_ #IHa1 elim (HRS a1) -HRS /2 width=3 by srefl, ex2_intro/ +* #a0 #Ha10 #Ha01 elim (IHa1 … Ha10 Ha01) -IHa1 -Ha01 /3 width=3 by star_compl, ex2_intro/ +qed-. + +definition NF_sn: ∀A. relation A → relation A → predicate A ≝ + λA,R,S,a2. ∀a1. R a1 a2 → S a2 a1. + +inductive SN_sn (A) (R,S:relation A): predicate A ≝ +| SN_sn_intro: ∀a2. (∀a1. R a1 a2 → (S a2 a1 → ⊥) → SN_sn A R S a1) → SN_sn A R S a2 +. + +lemma NF_to_SN_sn: ∀A,R,S,a. NF_sn A R S a → SN_sn A R S a. +#A #R #S #a2 #Ha2 +@SN_sn_intro #a1 #HRa12 #HSa12 +elim HSa12 -HSa12 /2 width=1 by/ +qed. + +lemma LTC_lsub_trans: ∀A,B,R,S. lsub_trans A B R S → lsub_trans A B (LTC … R) S. +#A #B #R #S #HRS #L2 #T1 #T2 #H elim H -T2 /3 width=3 by inj/ +#T #T2 #_ #HT2 #IHT1 #L1 #HL12 +lapply (HRS … HT2 … HL12) -HRS -HT2 /3 width=3 by step/ +qed-. + +lemma s_r_conf1_LTC1: ∀A,B,S,R. s_r_confluent1 A B S R → s_r_confluent1 A B (LTC … S) R. +#A #B #S #R #HSR #L1 #T1 #T2 #H @(TC_ind_dx … T1 H) -T1 /3 width=3 by/ +qed-. + +lemma s_r_trans_LTC1: ∀A,B,S,R. s_r_confluent1 A B S R → + s_r_transitive A B S R → s_rs_transitive A B S R. +#A #B #S #R #H1SR #H2SR #L2 #T1 #T2 #H @(TC_ind_dx … T1 H) -T1 /2 width=3 by/ +#T1 #T #HT1 #_ #IHT2 #L1 #HL12 lapply (H2SR … HT1 … HL12) -H2SR -HT1 +/4 width=5 by s_r_conf1_LTC1, trans_TC/ +qed-. + +lemma s_r_trans_LTC2: ∀A,B,S,R. s_rs_transitive A B S R → s_r_transitive A B S (LTC … R). +#A #B #S #R #HSR #L2 #T1 #T2 #HT12 #L1 #H @(TC_ind_dx … L1 H) -L1 /3 width=3 by inj/ +qed-. + +lemma s_r_to_s_rs_trans: ∀A,B,S,R. s_r_transitive A B (LTC … S) R → + s_rs_transitive A B S R. +#A #B #S #R #HSR #L2 #T1 #T2 #HL2 #L1 #HT1 +elim (TC_idem … (S L1) … T1 T2) +#_ #H @H @HSR // +qed-. + +lemma s_rs_to_s_r_trans: ∀A,B,S,R. s_rs_transitive A B S R → + s_r_transitive A B (LTC … S) R. +#A #B #S #R #HSR #L2 #T1 #T2 #HL2 #L1 #HT1 +elim (TC_idem … (S L1) … T1 T2) +#H #_ @H @HSR // +qed-. + +lemma s_rs_trans_TC1: ∀A,B,S,R. s_rs_transitive A B S R → + s_rs_transitive A B (LTC … S) R. +#A #B #S #R #HSR #L2 #T1 #T2 #HL2 #L1 #HT1 +elim (TC_idem … (S L1) … T1 T2) +elim (TC_idem … (S L2) … T1 T2) +#_ #H1 #H2 #_ @H2 @HSR /3 width=3 by/ +qed-. + +(* relations on unboxed pairs ***********************************************) + +lemma bi_TC_strip: ∀A,B,R. bi_confluent A B R → + ∀a0,a1,b0,b1. R a0 b0 a1 b1 → ∀a2,b2. bi_TC … R a0 b0 a2 b2 → + ∃∃a,b. bi_TC … R a1 b1 a b & R a2 b2 a b. +#A #B #R #HR #a0 #a1 #b0 #b1 #H01 #a2 #b2 #H elim H -a2 -b2 +[ #a2 #b2 #H02 + elim (HR … H01 … H02) -HR -a0 -b0 /3 width=4 by ex2_2_intro, bi_inj/ +| #a2 #b2 #a3 #b3 #_ #H23 * #a #b #H1 #H2 + elim (HR … H23 … H2) -HR -a0 -b0 -a2 -b2 /3 width=4 by ex2_2_intro, bi_step/ +] +qed. + +lemma bi_TC_confluent: ∀A,B,R. bi_confluent A B R → + bi_confluent A B (bi_TC … R). +#A #B #R #HR #a0 #a1 #b0 #b1 #H elim H -a1 -b1 +[ #a1 #b1 #H01 #a2 #b2 #H02 + elim (bi_TC_strip … HR … H01 … H02) -a0 -b0 /3 width=4 by ex2_2_intro, bi_inj/ +| #a1 #b1 #a3 #b3 #_ #H13 #IH #a2 #b2 #H02 + elim (IH … H02) -a0 -b0 #a0 #b0 #H10 #H20 + elim (bi_TC_strip … HR … H13 … H10) -a1 -b1 /3 width=7 by ex2_2_intro, bi_step/ +] +qed. + +lemma bi_TC_decomp_r: ∀A,B. ∀R:bi_relation A B. + ∀a1,a2,b1,b2. bi_TC … R a1 b1 a2 b2 → + R a1 b1 a2 b2 ∨ + ∃∃a,b. bi_TC … R a1 b1 a b & R a b a2 b2. +#A #B #R #a1 #a2 #b1 #b2 * -a2 -b2 /2 width=1/ /3 width=4 by ex2_2_intro, or_intror/ +qed-. + +lemma bi_TC_decomp_l: ∀A,B. ∀R:bi_relation A B. + ∀a1,a2,b1,b2. bi_TC … R a1 b1 a2 b2 → + R a1 b1 a2 b2 ∨ + ∃∃a,b. R a1 b1 a b & bi_TC … R a b a2 b2. +#A #B #R #a1 #a2 #b1 #b2 #H @(bi_TC_ind_dx … a1 b1 H) -a1 -b1 +[ /2 width=1 by or_introl/ +| #a1 #a #b1 #b #Hab1 #Hab2 #_ /3 width=4 by ex2_2_intro, or_intror/ (**) (* auto fails without #_ *) +] +qed-. + +(* relations on unboxed triples *********************************************) + +definition tri_RC: ∀A,B,C. tri_relation A B C → tri_relation A B C ≝ + λA,B,C,R,a1,b1,c1,a2,b2,c2. R … a1 b1 c1 a2 b2 c2 ∨ + ∧∧ a1 = a2 & b1 = b2 & c1 = c2. + +lemma tri_RC_reflexive: ∀A,B,C,R. tri_reflexive A B C (tri_RC … R). +/3 width=1 by and3_intro, or_intror/ qed. + +definition tri_star: ∀A,B,C,R. tri_relation A B C ≝ + λA,B,C,R. tri_RC A B C (tri_TC … R). + +lemma tri_star_tri_reflexive: ∀A,B,C,R. tri_reflexive A B C (tri_star … R). +/2 width=1 by/ qed. + +lemma tri_TC_to_tri_star: ∀A,B,C,R,a1,b1,c1,a2,b2,c2. + tri_TC A B C R a1 b1 c1 a2 b2 c2 → + tri_star A B C R a1 b1 c1 a2 b2 c2. +/2 width=1 by or_introl/ qed. + +lemma tri_R_to_tri_star: ∀A,B,C,R,a1,b1,c1,a2,b2,c2. + R a1 b1 c1 a2 b2 c2 → tri_star A B C R a1 b1 c1 a2 b2 c2. +/3 width=1 by tri_TC_to_tri_star, tri_inj/ qed. + +lemma tri_star_strap1: ∀A,B,C,R,a1,a,a2,b1,b,b2,c1,c,c2. + tri_star A B C R a1 b1 c1 a b c → + R a b c a2 b2 c2 → tri_star A B C R a1 b1 c1 a2 b2 c2. +#A #B #C #R #a1 #a #a2 #b1 #b #b2 #c1 #c #c2 * +[ /3 width=5 by tri_TC_to_tri_star, tri_step/ +| * #H1 #H2 #H3 destruct /2 width=1 by tri_R_to_tri_star/ +] +qed. + +lemma tri_star_strap2: ∀A,B,C,R,a1,a,a2,b1,b,b2,c1,c,c2. R a1 b1 c1 a b c → + tri_star A B C R a b c a2 b2 c2 → + tri_star A B C R a1 b1 c1 a2 b2 c2. +#A #B #C #R #a1 #a #a2 #b1 #b #b2 #c1 #c #c2 #H * +[ /3 width=5 by tri_TC_to_tri_star, tri_TC_strap/ +| * #H1 #H2 #H3 destruct /2 width=1 by tri_R_to_tri_star/ +] +qed. + +lemma tri_star_to_tri_TC_to_tri_TC: ∀A,B,C,R,a1,a,a2,b1,b,b2,c1,c,c2. + tri_star A B C R a1 b1 c1 a b c → + tri_TC A B C R a b c a2 b2 c2 → + tri_TC A B C R a1 b1 c1 a2 b2 c2. +#A #B #C #R #a1 #a #a2 #b1 #b #b2 #c1 #c #c2 * +[ /2 width=5 by tri_TC_transitive/ +| * #H1 #H2 #H3 destruct /2 width=1 by/ +] +qed. + +lemma tri_TC_to_tri_star_to_tri_TC: ∀A,B,C,R,a1,a,a2,b1,b,b2,c1,c,c2. + tri_TC A B C R a1 b1 c1 a b c → + tri_star A B C R a b c a2 b2 c2 → + tri_TC A B C R a1 b1 c1 a2 b2 c2. +#A #B #C #R #a1 #a #a2 #b1 #b #b2 #c1 #c #c2 #H * +[ /2 width=5 by tri_TC_transitive/ +| * #H1 #H2 #H3 destruct /2 width=1 by/ +] +qed. + +lemma tri_tansitive_tri_star: ∀A,B,C,R. tri_transitive A B C (tri_star … R). +#A #B #C #R #a1 #a #b1 #b #c1 #c #H #a2 #b2 #c2 * +[ /3 width=5 by tri_star_to_tri_TC_to_tri_TC, tri_TC_to_tri_star/ +| * #H1 #H2 #H3 destruct /2 width=1 by/ +] +qed. + +lemma tri_star_ind: ∀A,B,C,R,a1,b1,c1. ∀P:relation3 A B C. P a1 b1 c1 → + (∀a,a2,b,b2,c,c2. tri_star … R a1 b1 c1 a b c → R a b c a2 b2 c2 → P a b c → P a2 b2 c2) → + ∀a2,b2,c2. tri_star … R a1 b1 c1 a2 b2 c2 → P a2 b2 c2. +#A #B #C #R #a1 #b1 #c1 #P #H #IH #a2 #b2 #c2 * +[ #H12 elim H12 -a2 -b2 -c2 /3 width=6 by tri_TC_to_tri_star/ +| * #H1 #H2 #H3 destruct // +] +qed-. + +lemma tri_star_ind_dx: ∀A,B,C,R,a2,b2,c2. ∀P:relation3 A B C. P a2 b2 c2 → + (∀a1,a,b1,b,c1,c. R a1 b1 c1 a b c → tri_star … R a b c a2 b2 c2 → P a b c → P a1 b1 c1) → + ∀a1,b1,c1. tri_star … R a1 b1 c1 a2 b2 c2 → P a1 b1 c1. +#A #B #C #R #a2 #b2 #c2 #P #H #IH #a1 #b1 #c1 * +[ #H12 @(tri_TC_ind_dx … a1 b1 c1 H12) -a1 -b1 -c1 /3 width=6 by tri_TC_to_tri_star/ +| * #H1 #H2 #H3 destruct // +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/cons_2.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/cons_2.ma new file mode 100644 index 000000000..c95c57d8e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/cons_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "hvbox( hd @ break tl )" + right associative with precedence 47 + for @{ 'Cons $hd $tl }. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/cons_3.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/cons_3.ma new file mode 100644 index 000000000..cfa556e68 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/cons_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "hvbox( { term 46 hd1 , break term 46 hd2 } @ break term 46 tl )" + non associative with precedence 47 + for @{ 'Cons $hd1 $hd2 $tl }. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/infinity_0.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/infinity_0.ma new file mode 100644 index 000000000..f5c849158 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/infinity_0.ma @@ -0,0 +1,20 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "∞" + non associative with precedence 55 + for @{ 'Infinity }. + diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/nil_0.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/nil_0.ma new file mode 100644 index 000000000..6ea5151a9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/nil_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "◊" + non associative with precedence 46 + for @{ 'Nil }. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/no_0.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/no_0.ma new file mode 100644 index 000000000..af692211e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/no_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "Ⓕ" + non associative with precedence 55 + for @{'no}. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/yes_0.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/yes_0.ma new file mode 100644 index 000000000..c321749ae --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/yes_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "Ⓣ" + non associative with precedence 55 + for @{'yes}. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/functions/append_2.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/functions/append_2.ma new file mode 100644 index 000000000..f6d95184b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/functions/append_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "hvbox( l1 @@ break l2 )" + right associative with precedence 47 + for @{ 'Append $l1 $l2 }. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/functions/predecessor_1.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/functions/predecessor_1.ma new file mode 100644 index 000000000..cf94d0497 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/functions/predecessor_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "hvbox( ⫰ term 70 T )" + non associative with precedence 70 + for @{ 'Predecessor $T }. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/functions/successor_1.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/functions/successor_1.ma new file mode 100644 index 000000000..05e2c3146 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/functions/successor_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "hvbox( ⫯ term 70 T )" + non associative with precedence 70 + for @{ 'Successor $T }. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa/false_0.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa/false_0.ma new file mode 100644 index 000000000..b96432510 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa/false_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "⊥" + non associative with precedence 19 + for @{'false}. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa/true_0.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa/true_0.ma new file mode 100644 index 000000000..7a9ad4366 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa/true_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "⊤" + non associative with precedence 19 + for @{'true}. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa2_notation.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa2_notation.ma new file mode 100644 index 000000000..a7651b7d3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa2_notation.ma @@ -0,0 +1,16 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was generated by xoa.native: do not edit *********************) + diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa_notation.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa_notation.ma new file mode 100644 index 000000000..6054aa308 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa_notation.ma @@ -0,0 +1,326 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was generated by xoa.native: do not edit *********************) + +(* multiple existental quantifier (1, 2) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.$P0) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) }. + +(* multiple existental quantifier (1, 3) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) }. + +(* multiple existental quantifier (2, 2) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) }. + +(* multiple existental quantifier (2, 3) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) }. + +(* multiple existental quantifier (3, 1) *) + +notation > "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.$P0) (λ${ident x0}.$P1) (λ${ident x0}.$P2) }. + +notation < "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.$P0) (λ${ident x0}:$T0.$P1) (λ${ident x0}:$T0.$P2) }. + +(* multiple existental quantifier (3, 2) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) (λ${ident x0}.λ${ident x1}.$P2) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P2) }. + +(* multiple existental quantifier (3, 3) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) }. + +(* multiple existental quantifier (3, 4) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) }. + +(* multiple existental quantifier (4, 1) *) + +notation > "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.$P0) (λ${ident x0}.$P1) (λ${ident x0}.$P2) (λ${ident x0}.$P3) }. + +notation < "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.$P0) (λ${ident x0}:$T0.$P1) (λ${ident x0}:$T0.$P2) (λ${ident x0}:$T0.$P3) }. + +(* multiple existental quantifier (4, 2) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) (λ${ident x0}.λ${ident x1}.$P2) (λ${ident x0}.λ${ident x1}.$P3) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P3) }. + +(* multiple existental quantifier (4, 3) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) }. + +(* multiple existental quantifier (4, 4) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) }. + +(* multiple existental quantifier (4, 5) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) }. + +(* multiple existental quantifier (5, 2) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) (λ${ident x0}.λ${ident x1}.$P2) (λ${ident x0}.λ${ident x1}.$P3) (λ${ident x0}.λ${ident x1}.$P4) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P4) }. + +(* multiple existental quantifier (5, 3) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P4) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P4) }. + +(* multiple existental quantifier (5, 4) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P4) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P4) }. + +(* multiple existental quantifier (5, 5) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P4) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P4) }. + +(* multiple existental quantifier (5, 6) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P4) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P4) }. + +(* multiple existental quantifier (6, 3) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P5) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P5) }. + +(* multiple existental quantifier (6, 4) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P5) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P5) }. + +(* multiple existental quantifier (6, 5) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P5) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P5) }. + +(* multiple existental quantifier (6, 6) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P5) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P5) }. + +(* multiple existental quantifier (6, 7) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P5) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P5) }. + +(* multiple existental quantifier (7, 3) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P6) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P6) }. + +(* multiple existental quantifier (7, 4) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P6) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P6) }. + +(* multiple existental quantifier (7, 7) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P6) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P6) }. + +(* multiple existental quantifier (8, 4) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6 break & term 19 P7)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P6) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P7) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6 break & term 19 P7)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P6) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P7) }. + +(* multiple existental quantifier (8, 5) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6 break & term 19 P7)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P6) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P7) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6 break & term 19 P7)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P6) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P7) }. + +(* multiple disjunction connective (3) *) + +notation "hvbox(∨∨ term 29 P0 break | term 29 P1 break | term 29 P2)" + non associative with precedence 30 + for @{ 'Or $P0 $P1 $P2 }. + +(* multiple disjunction connective (4) *) + +notation "hvbox(∨∨ term 29 P0 break | term 29 P1 break | term 29 P2 break | term 29 P3)" + non associative with precedence 30 + for @{ 'Or $P0 $P1 $P2 $P3 }. + +(* multiple disjunction connective (5) *) + +notation "hvbox(∨∨ term 29 P0 break | term 29 P1 break | term 29 P2 break | term 29 P3 break | term 29 P4)" + non associative with precedence 30 + for @{ 'Or $P0 $P1 $P2 $P3 $P4 }. + +(* multiple conjunction connective (3) *) + +notation "hvbox(∧∧ term 34 P0 break & term 34 P1 break & term 34 P2)" + non associative with precedence 35 + for @{ 'And $P0 $P1 $P2 }. + +(* multiple conjunction connective (4) *) + +notation "hvbox(∧∧ term 34 P0 break & term 34 P1 break & term 34 P2 break & term 34 P3)" + non associative with precedence 35 + for @{ 'And $P0 $P1 $P2 $P3 }. + diff --git a/matita/matita/contribs/lambdadelta/ground_2A/xoa/xoa.ma b/matita/matita/contribs/lambdadelta/ground_2A/xoa/xoa.ma new file mode 100644 index 000000000..27da042cd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/xoa/xoa.ma @@ -0,0 +1,293 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was generated by xoa.native: do not edit *********************) + +include "basics/pts.ma". + +include "ground_2A/notation/xoa_notation.ma". + +(* multiple existental quantifier (1, 2) *) + +inductive ex1_2 (A0,A1:Type[0]) (P0:A0→A1→Prop) : Prop ≝ + | ex1_2_intro: ∀x0,x1. P0 x0 x1 → ex1_2 ? ? ? +. + +interpretation "multiple existental quantifier (1, 2)" 'Ex P0 = (ex1_2 ? ? P0). + +(* multiple existental quantifier (1, 3) *) + +inductive ex1_3 (A0,A1,A2:Type[0]) (P0:A0→A1→A2→Prop) : Prop ≝ + | ex1_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → ex1_3 ? ? ? ? +. + +interpretation "multiple existental quantifier (1, 3)" 'Ex P0 = (ex1_3 ? ? ? P0). + +(* multiple existental quantifier (2, 2) *) + +inductive ex2_2 (A0,A1:Type[0]) (P0,P1:A0→A1→Prop) : Prop ≝ + | ex2_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → ex2_2 ? ? ? ? +. + +interpretation "multiple existental quantifier (2, 2)" 'Ex P0 P1 = (ex2_2 ? ? P0 P1). + +(* multiple existental quantifier (2, 3) *) + +inductive ex2_3 (A0,A1,A2:Type[0]) (P0,P1:A0→A1→A2→Prop) : Prop ≝ + | ex2_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → ex2_3 ? ? ? ? ? +. + +interpretation "multiple existental quantifier (2, 3)" 'Ex P0 P1 = (ex2_3 ? ? ? P0 P1). + +(* multiple existental quantifier (3, 1) *) + +inductive ex3 (A0:Type[0]) (P0,P1,P2:A0→Prop) : Prop ≝ + | ex3_intro: ∀x0. P0 x0 → P1 x0 → P2 x0 → ex3 ? ? ? ? +. + +interpretation "multiple existental quantifier (3, 1)" 'Ex P0 P1 P2 = (ex3 ? P0 P1 P2). + +(* multiple existental quantifier (3, 2) *) + +inductive ex3_2 (A0,A1:Type[0]) (P0,P1,P2:A0→A1→Prop) : Prop ≝ + | ex3_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → P2 x0 x1 → ex3_2 ? ? ? ? ? +. + +interpretation "multiple existental quantifier (3, 2)" 'Ex P0 P1 P2 = (ex3_2 ? ? P0 P1 P2). + +(* multiple existental quantifier (3, 3) *) + +inductive ex3_3 (A0,A1,A2:Type[0]) (P0,P1,P2:A0→A1→A2→Prop) : Prop ≝ + | ex3_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → ex3_3 ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (3, 3)" 'Ex P0 P1 P2 = (ex3_3 ? ? ? P0 P1 P2). + +(* multiple existental quantifier (3, 4) *) + +inductive ex3_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2:A0→A1→A2→A3→Prop) : Prop ≝ + | ex3_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → ex3_4 ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (3, 4)" 'Ex P0 P1 P2 = (ex3_4 ? ? ? ? P0 P1 P2). + +(* multiple existental quantifier (4, 1) *) + +inductive ex4 (A0:Type[0]) (P0,P1,P2,P3:A0→Prop) : Prop ≝ + | ex4_intro: ∀x0. P0 x0 → P1 x0 → P2 x0 → P3 x0 → ex4 ? ? ? ? ? +. + +interpretation "multiple existental quantifier (4, 1)" 'Ex P0 P1 P2 P3 = (ex4 ? P0 P1 P2 P3). + +(* multiple existental quantifier (4, 2) *) + +inductive ex4_2 (A0,A1:Type[0]) (P0,P1,P2,P3:A0→A1→Prop) : Prop ≝ + | ex4_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → P2 x0 x1 → P3 x0 x1 → ex4_2 ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (4, 2)" 'Ex P0 P1 P2 P3 = (ex4_2 ? ? P0 P1 P2 P3). + +(* multiple existental quantifier (4, 3) *) + +inductive ex4_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3:A0→A1→A2→Prop) : Prop ≝ + | ex4_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → ex4_3 ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (4, 3)" 'Ex P0 P1 P2 P3 = (ex4_3 ? ? ? P0 P1 P2 P3). + +(* multiple existental quantifier (4, 4) *) + +inductive ex4_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3:A0→A1→A2→A3→Prop) : Prop ≝ + | ex4_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → ex4_4 ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (4, 4)" 'Ex P0 P1 P2 P3 = (ex4_4 ? ? ? ? P0 P1 P2 P3). + +(* multiple existental quantifier (4, 5) *) + +inductive ex4_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3:A0→A1→A2→A3→A4→Prop) : Prop ≝ + | ex4_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → ex4_5 ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (4, 5)" 'Ex P0 P1 P2 P3 = (ex4_5 ? ? ? ? ? P0 P1 P2 P3). + +(* multiple existental quantifier (5, 2) *) + +inductive ex5_2 (A0,A1:Type[0]) (P0,P1,P2,P3,P4:A0→A1→Prop) : Prop ≝ + | ex5_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → P2 x0 x1 → P3 x0 x1 → P4 x0 x1 → ex5_2 ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (5, 2)" 'Ex P0 P1 P2 P3 P4 = (ex5_2 ? ? P0 P1 P2 P3 P4). + +(* multiple existental quantifier (5, 3) *) + +inductive ex5_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→Prop) : Prop ≝ + | ex5_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → P4 x0 x1 x2 → ex5_3 ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (5, 3)" 'Ex P0 P1 P2 P3 P4 = (ex5_3 ? ? ? P0 P1 P2 P3 P4). + +(* multiple existental quantifier (5, 4) *) + +inductive ex5_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→A3→Prop) : Prop ≝ + | ex5_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → P4 x0 x1 x2 x3 → ex5_4 ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (5, 4)" 'Ex P0 P1 P2 P3 P4 = (ex5_4 ? ? ? ? P0 P1 P2 P3 P4). + +(* multiple existental quantifier (5, 5) *) + +inductive ex5_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→A3→A4→Prop) : Prop ≝ + | ex5_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → P4 x0 x1 x2 x3 x4 → ex5_5 ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (5, 5)" 'Ex P0 P1 P2 P3 P4 = (ex5_5 ? ? ? ? ? P0 P1 P2 P3 P4). + +(* multiple existental quantifier (5, 6) *) + +inductive ex5_6 (A0,A1,A2,A3,A4,A5:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→A3→A4→A5→Prop) : Prop ≝ + | ex5_6_intro: ∀x0,x1,x2,x3,x4,x5. P0 x0 x1 x2 x3 x4 x5 → P1 x0 x1 x2 x3 x4 x5 → P2 x0 x1 x2 x3 x4 x5 → P3 x0 x1 x2 x3 x4 x5 → P4 x0 x1 x2 x3 x4 x5 → ex5_6 ? ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (5, 6)" 'Ex P0 P1 P2 P3 P4 = (ex5_6 ? ? ? ? ? ? P0 P1 P2 P3 P4). + +(* multiple existental quantifier (6, 3) *) + +inductive ex6_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→Prop) : Prop ≝ + | ex6_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → P4 x0 x1 x2 → P5 x0 x1 x2 → ex6_3 ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (6, 3)" 'Ex P0 P1 P2 P3 P4 P5 = (ex6_3 ? ? ? P0 P1 P2 P3 P4 P5). + +(* multiple existental quantifier (6, 4) *) + +inductive ex6_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→Prop) : Prop ≝ + | ex6_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → P4 x0 x1 x2 x3 → P5 x0 x1 x2 x3 → ex6_4 ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (6, 4)" 'Ex P0 P1 P2 P3 P4 P5 = (ex6_4 ? ? ? ? P0 P1 P2 P3 P4 P5). + +(* multiple existental quantifier (6, 5) *) + +inductive ex6_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→Prop) : Prop ≝ + | ex6_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → P4 x0 x1 x2 x3 x4 → P5 x0 x1 x2 x3 x4 → ex6_5 ? ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (6, 5)" 'Ex P0 P1 P2 P3 P4 P5 = (ex6_5 ? ? ? ? ? P0 P1 P2 P3 P4 P5). + +(* multiple existental quantifier (6, 6) *) + +inductive ex6_6 (A0,A1,A2,A3,A4,A5:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→A5→Prop) : Prop ≝ + | ex6_6_intro: ∀x0,x1,x2,x3,x4,x5. P0 x0 x1 x2 x3 x4 x5 → P1 x0 x1 x2 x3 x4 x5 → P2 x0 x1 x2 x3 x4 x5 → P3 x0 x1 x2 x3 x4 x5 → P4 x0 x1 x2 x3 x4 x5 → P5 x0 x1 x2 x3 x4 x5 → ex6_6 ? ? ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (6, 6)" 'Ex P0 P1 P2 P3 P4 P5 = (ex6_6 ? ? ? ? ? ? P0 P1 P2 P3 P4 P5). + +(* multiple existental quantifier (6, 7) *) + +inductive ex6_7 (A0,A1,A2,A3,A4,A5,A6:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→A5→A6→Prop) : Prop ≝ + | ex6_7_intro: ∀x0,x1,x2,x3,x4,x5,x6. P0 x0 x1 x2 x3 x4 x5 x6 → P1 x0 x1 x2 x3 x4 x5 x6 → P2 x0 x1 x2 x3 x4 x5 x6 → P3 x0 x1 x2 x3 x4 x5 x6 → P4 x0 x1 x2 x3 x4 x5 x6 → P5 x0 x1 x2 x3 x4 x5 x6 → ex6_7 ? ? ? ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (6, 7)" 'Ex P0 P1 P2 P3 P4 P5 = (ex6_7 ? ? ? ? ? ? ? P0 P1 P2 P3 P4 P5). + +(* multiple existental quantifier (7, 3) *) + +inductive ex7_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3,P4,P5,P6:A0→A1→A2→Prop) : Prop ≝ + | ex7_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → P4 x0 x1 x2 → P5 x0 x1 x2 → P6 x0 x1 x2 → ex7_3 ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (7, 3)" 'Ex P0 P1 P2 P3 P4 P5 P6 = (ex7_3 ? ? ? P0 P1 P2 P3 P4 P5 P6). + +(* multiple existental quantifier (7, 4) *) + +inductive ex7_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3,P4,P5,P6:A0→A1→A2→A3→Prop) : Prop ≝ + | ex7_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → P4 x0 x1 x2 x3 → P5 x0 x1 x2 x3 → P6 x0 x1 x2 x3 → ex7_4 ? ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (7, 4)" 'Ex P0 P1 P2 P3 P4 P5 P6 = (ex7_4 ? ? ? ? P0 P1 P2 P3 P4 P5 P6). + +(* multiple existental quantifier (7, 7) *) + +inductive ex7_7 (A0,A1,A2,A3,A4,A5,A6:Type[0]) (P0,P1,P2,P3,P4,P5,P6:A0→A1→A2→A3→A4→A5→A6→Prop) : Prop ≝ + | ex7_7_intro: ∀x0,x1,x2,x3,x4,x5,x6. P0 x0 x1 x2 x3 x4 x5 x6 → P1 x0 x1 x2 x3 x4 x5 x6 → P2 x0 x1 x2 x3 x4 x5 x6 → P3 x0 x1 x2 x3 x4 x5 x6 → P4 x0 x1 x2 x3 x4 x5 x6 → P5 x0 x1 x2 x3 x4 x5 x6 → P6 x0 x1 x2 x3 x4 x5 x6 → ex7_7 ? ? ? ? ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (7, 7)" 'Ex P0 P1 P2 P3 P4 P5 P6 = (ex7_7 ? ? ? ? ? ? ? P0 P1 P2 P3 P4 P5 P6). + +(* multiple existental quantifier (8, 4) *) + +inductive ex8_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3,P4,P5,P6,P7:A0→A1→A2→A3→Prop) : Prop ≝ + | ex8_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → P4 x0 x1 x2 x3 → P5 x0 x1 x2 x3 → P6 x0 x1 x2 x3 → P7 x0 x1 x2 x3 → ex8_4 ? ? ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (8, 4)" 'Ex P0 P1 P2 P3 P4 P5 P6 P7 = (ex8_4 ? ? ? ? P0 P1 P2 P3 P4 P5 P6 P7). + +(* multiple existental quantifier (8, 5) *) + +inductive ex8_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3,P4,P5,P6,P7:A0→A1→A2→A3→A4→Prop) : Prop ≝ + | ex8_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → P4 x0 x1 x2 x3 x4 → P5 x0 x1 x2 x3 x4 → P6 x0 x1 x2 x3 x4 → P7 x0 x1 x2 x3 x4 → ex8_5 ? ? ? ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (8, 5)" 'Ex P0 P1 P2 P3 P4 P5 P6 P7 = (ex8_5 ? ? ? ? ? P0 P1 P2 P3 P4 P5 P6 P7). + +(* multiple disjunction connective (3) *) + +inductive or3 (P0,P1,P2:Prop) : Prop ≝ + | or3_intro0: P0 → or3 ? ? ? + | or3_intro1: P1 → or3 ? ? ? + | or3_intro2: P2 → or3 ? ? ? +. + +interpretation "multiple disjunction connective (3)" 'Or P0 P1 P2 = (or3 P0 P1 P2). + +(* multiple disjunction connective (4) *) + +inductive or4 (P0,P1,P2,P3:Prop) : Prop ≝ + | or4_intro0: P0 → or4 ? ? ? ? + | or4_intro1: P1 → or4 ? ? ? ? + | or4_intro2: P2 → or4 ? ? ? ? + | or4_intro3: P3 → or4 ? ? ? ? +. + +interpretation "multiple disjunction connective (4)" 'Or P0 P1 P2 P3 = (or4 P0 P1 P2 P3). + +(* multiple disjunction connective (5) *) + +inductive or5 (P0,P1,P2,P3,P4:Prop) : Prop ≝ + | or5_intro0: P0 → or5 ? ? ? ? ? + | or5_intro1: P1 → or5 ? ? ? ? ? + | or5_intro2: P2 → or5 ? ? ? ? ? + | or5_intro3: P3 → or5 ? ? ? ? ? + | or5_intro4: P4 → or5 ? ? ? ? ? +. + +interpretation "multiple disjunction connective (5)" 'Or P0 P1 P2 P3 P4 = (or5 P0 P1 P2 P3 P4). + +(* multiple conjunction connective (3) *) + +inductive and3 (P0,P1,P2:Prop) : Prop ≝ + | and3_intro: P0 → P1 → P2 → and3 ? ? ? +. + +interpretation "multiple conjunction connective (3)" 'And P0 P1 P2 = (and3 P0 P1 P2). + +(* multiple conjunction connective (4) *) + +inductive and4 (P0,P1,P2,P3:Prop) : Prop ≝ + | and4_intro: P0 → P1 → P2 → P3 → and4 ? ? ? ? +. + +interpretation "multiple conjunction connective (4)" 'And P0 P1 P2 P3 = (and4 P0 P1 P2 P3). + diff --git a/matita/matita/contribs/lambdadelta/ground_2A/xoa/xoa2.ma b/matita/matita/contribs/lambdadelta/ground_2A/xoa/xoa2.ma new file mode 100644 index 000000000..3975bd4a2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/xoa/xoa2.ma @@ -0,0 +1,20 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was generated by xoa.native: do not edit *********************) + +include "basics/pts.ma". + +include "ground_2A/notation/xoa2_notation.ma". + diff --git a/matita/matita/contribs/lambdadelta/ground_2A/xoa/xoa_props.ma b/matita/matita/contribs/lambdadelta/ground_2A/xoa/xoa_props.ma new file mode 100644 index 000000000..8ab935a9a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/xoa/xoa_props.ma @@ -0,0 +1,22 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basics/logic.ma". +include "ground_2A/notation/xoa/false_0.ma". +include "ground_2A/notation/xoa/true_0.ma". +include "ground_2A/xoa/xoa.ma". + +interpretation "logical false" 'false = False. + +interpretation "logical true" 'true = True. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat.ma b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat.ma new file mode 100644 index 000000000..1d802e296 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat.ma @@ -0,0 +1,34 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "arithmetics/nat.ma". +include "ground_2A/notation/constructors/infinity_0.ma". + +(* NATURAL NUMBERS WITH INFINITY ********************************************) + +(* the type of natural numbers with infinity *) +inductive ynat: Type[0] ≝ +| yinj: nat → ynat +| Y : ynat +. + +coercion yinj. + +interpretation "ynat infinity" 'Infinity = Y. + +(* Inversion lemmas *********************************************************) + +lemma yinj_inj: ∀m,n. yinj m = yinj n → m = n. +#m #n #H destruct // +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_le.ma b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_le.ma new file mode 100644 index 000000000..4a8e89e3d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_le.ma @@ -0,0 +1,136 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_succ.ma". + +(* NATURAL NUMBERS WITH INFINITY ********************************************) + +(* order relation *) +inductive yle: relation ynat ≝ +| yle_inj: ∀m,n. m ≤ n → yle m n +| yle_Y : ∀m. yle m (∞) +. + +interpretation "ynat 'less or equal to'" 'leq x y = (yle x y). + +(* Basic inversion lemmas ***************************************************) + +fact yle_inv_inj2_aux: ∀x,y. x ≤ y → ∀n. y = yinj n → + ∃∃m. m ≤ n & x = yinj m. +#x #y * -x -y +[ #x #y #Hxy #n #Hy destruct /2 width=3 by ex2_intro/ +| #x #n #Hy destruct +] +qed-. + +lemma yle_inv_inj2: ∀x,n. x ≤ yinj n → ∃∃m. m ≤ n & x = yinj m. +/2 width=3 by yle_inv_inj2_aux/ qed-. + +lemma yle_inv_inj: ∀m,n. yinj m ≤ yinj n → m ≤ n. +#m #n #H elim (yle_inv_inj2 … H) -H +#x #Hxn #H destruct // +qed-. + +fact yle_inv_O2_aux: ∀m:ynat. ∀x:ynat. m ≤ x → x = 0 → m = 0. +#m #x * -m -x +[ #m #n #Hmn #H destruct /3 width=1 by le_n_O_to_eq, eq_f/ +| #m #H destruct +] +qed-. + +lemma yle_inv_O2: ∀m:ynat. m ≤ 0 → m = 0. +/2 width =3 by yle_inv_O2_aux/ qed-. + +fact yle_inv_Y1_aux: ∀x,n. x ≤ n → x = ∞ → n = ∞. +#x #n * -x -n // +#x #n #_ #H destruct +qed-. + +lemma yle_inv_Y1: ∀n. ∞ ≤ n → n = ∞. +/2 width=3 by yle_inv_Y1_aux/ qed-. + +(* Inversion lemmas on successor ********************************************) + +fact yle_inv_succ1_aux: ∀x,y. x ≤ y → ∀m. x = ⫯m → m ≤ ⫰y ∧ ⫯⫰y = y. +#x #y * -x -y +[ #x #y #Hxy #m #H elim (ysucc_inv_inj_sn … H) -H + #n #H1 #H2 destruct elim (le_inv_S1 … Hxy) -Hxy + #m #Hnm #H destruct /3 width=1 by yle_inj, conj/ +| #x #y #H destruct /2 width=1 by yle_Y, conj/ +] +qed-. + +lemma yle_inv_succ1: ∀m,y. ⫯m ≤ y → m ≤ ⫰y ∧ ⫯⫰y = y. +/2 width=3 by yle_inv_succ1_aux/ qed-. + +lemma yle_inv_succ: ∀m,n. ⫯m ≤ ⫯n → m ≤ n. +#m #n #H elim (yle_inv_succ1 … H) -H // +qed-. + +(* Basic properties *********************************************************) + +lemma le_O1: ∀n:ynat. 0 ≤ n. +* /2 width=1 by yle_inj/ +qed. + +lemma yle_refl: reflexive … yle. +* /2 width=1 by le_n, yle_inj/ +qed. + +lemma yle_split: ∀x,y:ynat. x ≤ y ∨ y ≤ x. +* /2 width=1 by or_intror/ +#x * /2 width=1 by or_introl/ +#y elim (le_or_ge x y) /3 width=1 by yle_inj, or_introl, or_intror/ +qed-. + +(* Properties on predecessor ************************************************) + +lemma yle_pred_sn: ∀m,n. m ≤ n → ⫰m ≤ n. +#m #n * -m -n /3 width=3 by transitive_le, yle_inj/ +qed. + +lemma yle_refl_pred_sn: ∀x. ⫰x ≤ x. +/2 width=1 by yle_refl, yle_pred_sn/ qed. + +lemma yle_pred: ∀m,n. m ≤ n → ⫰m ≤ ⫰n. +#m #n * -m -n /3 width=1 by yle_inj, monotonic_pred/ +qed. + +(* Properties on successor **************************************************) + +lemma yle_succ: ∀m,n. m ≤ n → ⫯m ≤ ⫯n. +#m #n * -m -n /3 width=1 by yle_inj, le_S_S/ +qed. + +lemma yle_succ_dx: ∀m,n. m ≤ n → m ≤ ⫯n. +#m #n * -m -n /3 width=1 by le_S, yle_inj/ +qed. + +lemma yle_refl_S_dx: ∀x. x ≤ ⫯x. +/2 width=1 by yle_succ_dx/ qed. + +lemma yle_refl_SP_dx: ∀x. x ≤ ⫯⫰x. +* // * // +qed. + +(* Main properties **********************************************************) + +theorem yle_trans: Transitive … yle. +#x #y * -x -y +[ #x #y #Hxy * // + #z #H lapply (yle_inv_inj … H) -H + /3 width=3 by transitive_le, yle_inj/ (**) (* full auto too slow *) +| #x #z #H lapply (yle_inv_Y1 … H) // +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_lt.ma b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_lt.ma new file mode 100644 index 000000000..850fae157 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_lt.ma @@ -0,0 +1,182 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_le.ma". + +(* NATURAL NUMBERS WITH INFINITY ********************************************) + +(* strict order relation *) +inductive ylt: relation ynat ≝ +| ylt_inj: ∀m,n. m < n → ylt m n +| ylt_Y : ∀m:nat. ylt m (∞) +. + +interpretation "ynat 'less than'" 'lt x y = (ylt x y). + +(* Basic forward lemmas *****************************************************) + +lemma ylt_fwd_gen: ∀x,y. x < y → ∃m. x = yinj m. +#x #y * -x -y /2 width=2 by ex_intro/ +qed-. + +lemma ylt_fwd_le_succ: ∀x,y. x < y → ⫯x ≤ y. +#x #y * -x -y /2 width=1 by yle_inj/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact ylt_inv_inj2_aux: ∀x,y. x < y → ∀n. y = yinj n → + ∃∃m. m < n & x = yinj m. +#x #y * -x -y +[ #x #y #Hxy #n #Hy elim (le_inv_S1 … Hxy) -Hxy + #m #Hm #H destruct /3 width=3 by le_S_S, ex2_intro/ +| #x #n #Hy destruct +] +qed-. + +lemma ylt_inv_inj2: ∀x,n. x < yinj n → + ∃∃m. m < n & x = yinj m. +/2 width=3 by ylt_inv_inj2_aux/ qed-. + +lemma ylt_inv_inj: ∀m,n. yinj m < yinj n → m < n. +#m #n #H elim (ylt_inv_inj2 … H) -H +#x #Hx #H destruct // +qed-. + +lemma ylt_inv_Y1: ∀n. ∞ < n → ⊥. +#n #H elim (ylt_fwd_gen … H) -H +#y #H destruct +qed-. + +lemma ylt_inv_O1: ∀n. 0 < n → ⫯⫰n = n. +* // #n #H lapply (ylt_inv_inj … H) -H normalize +/3 width=1 by S_pred, eq_f/ +qed-. + +(* Inversion lemmas on successor ********************************************) + +fact ylt_inv_succ1_aux: ∀x,y. x < y → ∀m. x = ⫯m → m < ⫰y ∧ ⫯⫰y = y. +#x #y * -x -y +[ #x #y #Hxy #m #H elim (ysucc_inv_inj_sn … H) -H + #n #H1 #H2 destruct elim (le_inv_S1 … Hxy) -Hxy + #m #Hnm #H destruct /3 width=1 by ylt_inj, conj/ +| #x #y #H elim (ysucc_inv_inj_sn … H) -H + #m #H #_ destruct /2 width=1 by ylt_Y, conj/ +] +qed-. + +lemma ylt_inv_succ1: ∀m,y. ⫯m < y → m < ⫰y ∧ ⫯⫰y = y. +/2 width=3 by ylt_inv_succ1_aux/ qed-. + +lemma ylt_inv_succ: ∀m,n. ⫯m < ⫯n → m < n. +#m #n #H elim (ylt_inv_succ1 … H) -H // +qed-. + +(* Forward lemmas on successor **********************************************) + +fact ylt_fwd_succ2_aux: ∀x,y. x < y → ∀n. y = ⫯n → x ≤ n. +#x #y * -x -y +[ #x #y #Hxy #m #H elim (ysucc_inv_inj_sn … H) -H + #n #H1 #H2 destruct /3 width=1 by yle_inj, le_S_S_to_le/ +| #x #n #H lapply (ysucc_inv_Y_sn … H) -H // +] +qed-. + +lemma ylt_fwd_succ2: ∀m,n. m < ⫯n → m ≤ n. +/2 width=3 by ylt_fwd_succ2_aux/ qed-. + +(* inversion and forward lemmas on yle **************************************) + +lemma ylt_fwd_le_succ1: ∀m,n. m < n → ⫯m ≤ n. +#m #n * -m -n /2 width=1 by yle_inj/ +qed-. + +lemma ylt_fwd_le: ∀m:ynat. ∀n:ynat. m < n → m ≤ n. +#m #n * -m -n /3 width=1 by lt_to_le, yle_inj/ +qed-. + +lemma ylt_yle_false: ∀m:ynat. ∀n:ynat. m < n → n ≤ m → ⊥. +#m #n * -m -n +[ #m #n #Hmn #H lapply (yle_inv_inj … H) -H + #H elim (lt_refl_false n) /2 width=3 by le_to_lt_to_lt/ +| #m #H lapply (yle_inv_Y1 … H) -H + #H destruct +] +qed-. + +(* Basic properties *********************************************************) + +lemma ylt_O: ∀x. ⫯⫰(yinj x) = yinj x → 0 < x. +* /2 width=1 by/ normalize +#H destruct +qed. + +(* Properties on predecessor ************************************************) + +lemma ylt_pred: ∀m,n. m < n → 0 < m → ⫰m < ⫰n. +#m #n * -m -n +/4 width=1 by ylt_inv_inj, ylt_inj, monotonic_lt_pred/ +qed. + +(* Properties on successor **************************************************) + +lemma ylt_O_succ: ∀n. 0 < ⫯n. +* /2 width=1 by ylt_inj/ +qed. + +lemma ylt_succ: ∀m,n. m < n → ⫯m < ⫯n. +#m #n #H elim H -m -n /3 width=1 by ylt_inj, le_S_S/ +qed. + +(* Properties on order ******************************************************) + +lemma yle_split_eq: ∀m:ynat. ∀n:ynat. m ≤ n → m < n ∨ m = n. +#m #n * -m -n +[ #m #n #Hmn elim (le_to_or_lt_eq … Hmn) -Hmn + /3 width=1 by or_introl, ylt_inj/ +| * /2 width=1 by or_introl, ylt_Y/ +] +qed-. + +lemma ylt_split: ∀m,n:ynat. m < n ∨ n ≤ m.. +#m #n elim (yle_split m n) /2 width=1 by or_intror/ +#H elim (yle_split_eq … H) -H /2 width=1 by or_introl, or_intror/ +qed-. + +lemma ylt_yle_trans: ∀x:ynat. ∀y:ynat. ∀z:ynat. y ≤ z → x < y → x < z. +#x #y #z * -y -z +[ #y #z #Hyz #H elim (ylt_inv_inj2 … H) -H + #m #Hm #H destruct /3 width=3 by ylt_inj, lt_to_le_to_lt/ +| #y * // +] +qed-. + +lemma yle_ylt_trans: ∀x:ynat. ∀y:ynat. ∀z:ynat. y < z → x ≤ y → x < z. +#x #y #z * -y -z +[ #y #z #Hyz #H elim (yle_inv_inj2 … H) -H + #m #Hm #H destruct /3 width=3 by ylt_inj, le_to_lt_to_lt/ +| #y #H elim (yle_inv_inj2 … H) -H // +] +qed-. + +(* Main properties **********************************************************) + +theorem ylt_trans: Transitive … ylt. +#x #y * -x -y +[ #x #y #Hxy * // + #z #H lapply (ylt_inv_inj … H) -H + /3 width=3 by transitive_lt, ylt_inj/ (**) (* full auto too slow *) +| #x #z #H elim (ylt_yle_false … H) // +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_max.ma b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_max.ma new file mode 100644 index 000000000..05ce327cd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_max.ma @@ -0,0 +1,58 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_plus.ma". + +(* NATURAL NUMBERS WITH INFINITY ********************************************) + +lemma ymax_pre_dx: ∀x,y. x ≤ y → x - y + y = y. +#x #y * -x -y // +#x #y #Hxy >yminus_inj >(eq_minus_O … Hxy) -Hxy // +qed-. + +lemma ymax_pre_sn: ∀x,y. y ≤ x → x - y + y = x. +#x #y * -x -y +[ #x #y #Hxy >yminus_inj /3 width=3 by plus_minus, eq_f/ +| * // +] +qed-. + +lemma ymax_pre_i_dx: ∀y,x. y ≤ x - y + y. +// qed. + +lemma ymax_pre_i_sn: ∀y,x. x ≤ x - y + y. +* // #y * /2 width=1 by yle_inj/ +qed. + +lemma ymax_pre_e: ∀x,z. x ≤ z → ∀y. y ≤ z → x - y + y ≤ z. +#x #z #Hxz #y #Hyz elim (yle_split x y) +[ #Hxy >(ymax_pre_dx … Hxy) -x // +| #Hyx >(ymax_pre_sn … Hyx) -y // +] +qed. + +lemma ymax_pre_dx_comm: ∀x,y. x ≤ y → y + (x - y) = y. +/2 width=1 by ymax_pre_dx/ qed-. + +lemma ymax_pre_sn_comm: ∀x,y. y ≤ x → y + (x - y) = x. +/2 width=1 by ymax_pre_sn/ qed-. + +lemma ymax_pre_i_dx_comm: ∀y,x. y ≤ y + (x - y). +// qed. + +lemma ymax_pre_i_sn_comm: ∀y,x. x ≤ y + (x - y). +/2 width=1 by ymax_pre_i_sn/ qed. + +lemma ymax_pre_e_comm: ∀x,z. x ≤ z → ∀y. y ≤ z → y + (x - y) ≤ z. +/2 width=1 by ymax_pre_e/ qed. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_min.ma b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_min.ma new file mode 100644 index 000000000..4ec861b95 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_min.ma @@ -0,0 +1,52 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_plus.ma". + +(* NATURAL NUMBERS WITH INFINITY ********************************************) + +fact ymin_pre_dx_aux: ∀x,y. y ≤ x → x - (x - y) ≤ y. +#x #y * -x -y +[ #x #y #Hxy >yminus_inj + /3 width=4 by yle_inj, monotonic_le_minus_l/ +| * // +] +qed-. + +lemma ymin_pre_sn: ∀x,y. x ≤ y → x - (x - y) = x. +#x #y * -x -y // +#x #y #Hxy >yminus_inj >(eq_minus_O … Hxy) -Hxy // +qed-. + +lemma ymin_pre_i_dx: ∀x,y. x - (x - y) ≤ y. +#x #y elim (yle_split x y) /2 width=1 by ymin_pre_dx_aux/ +#Hxy >(ymin_pre_sn … Hxy) // +qed. + +lemma ymin_pre_i_sn: ∀x,y. x - (x - y) ≤ x. +// qed. + +lemma ymin_pre_dx: ∀x,y. y ≤ yinj x → yinj x - (yinj x - y) = y. +#x #y #H elim (yle_inv_inj2 … H) -H +#z #Hzx #H destruct >yminus_inj +/3 width=4 by minus_le_minus_minus_comm, eq_f/ +qed-. + +lemma ymin_pre_e: ∀z,x. z ≤ yinj x → ∀y. z ≤ y → + z ≤ yinj x - (yinj x - y). +#z #x #Hzx #y #Hzy elim (yle_split x y) +[ #H >(ymin_pre_sn … H) -y // +| #H >(ymin_pre_dx … H) -x // +] +qed. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_minus.ma b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_minus.ma new file mode 100644 index 000000000..e4763f40e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_minus.ma @@ -0,0 +1,109 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_lt.ma". + +(* NATURAL NUMBERS WITH INFINITY ********************************************) + +(* subtraction *) +definition yminus: ynat → ynat → ynat ≝ λx,y. match y with +[ yinj n ⇒ ypred^n x +| Y ⇒ yinj 0 +]. + +interpretation "ynat minus" 'minus x y = (yminus x y). + +(* Basic properties *********************************************************) + +lemma yminus_inj: ∀n,m. yinj m - yinj n = yinj (m - n). +#n elim n -n /2 width=3 by trans_eq/ +qed. + +lemma yminus_Y_inj: ∀n. ∞ - yinj n = ∞. +#n elim n -n // normalize +#n #IHn >IHn // +qed. + +lemma yminus_O1: ∀x:ynat. 0 - x = 0. +* // qed. + +lemma yminus_refl: ∀x:ynat. x - x = 0. +* // qed. + +lemma yminus_minus_comm: ∀y,z,x. x - y - z = x - z - y. +* #y [ * #z [ * // ] ] >yminus_O1 // +qed. + +(* Properties on predecessor ************************************************) + +lemma yminus_SO2: ∀m. m - 1 = ⫰m. +* // +qed. + +lemma yminus_pred: ∀n,m. 0 < m → 0 < n → ⫰m - ⫰n = m - n. +* // #n * +[ #m #Hm #Hn >yminus_inj >yminus_inj + /4 width=1 by ylt_inv_inj, minus_pred_pred, eq_f/ +| >yminus_Y_inj // +] +qed-. + +(* Properties on successor **************************************************) + +lemma yminus_succ: ∀n,m. ⫯m - ⫯n = m - n. +* // #n * [2: >yminus_Y_inj // ] +#m >yminus_inj // +qed. + +lemma yminus_succ1_inj: ∀n:nat. ∀m:ynat. n ≤ m → ⫯m - n = ⫯(m - n). +#n * +[ #m #Hmn >yminus_inj >yminus_inj + /4 width=1 by yle_inv_inj, plus_minus, eq_f/ +| >yminus_Y_inj // +] +qed-. + +lemma yminus_succ2: ∀y,x. x - ⫯y = ⫰(x-y). +* // +qed. + +(* Properties on order ******************************************************) + +lemma yle_minus_sn: ∀n,m. m - n ≤ m. +* // #n * /2 width=1 by yle_inj/ +qed. + +lemma yle_to_minus: ∀m:ynat. ∀n:ynat. m ≤ n → m - n = 0. +#m #n * -m -n /3 width=3 by eq_minus_O, eq_f/ +qed-. + +lemma yminus_to_le: ∀n:ynat. ∀m:ynat. m - n = 0 → m ≤ n. +* // #n * +[ #m >yminus_inj #H lapply (yinj_inj … H) -H (**) (* destruct lemma needed *) + /2 width=1 by yle_inj/ +| >yminus_Y_inj #H destruct +] +qed. + +lemma monotonic_yle_minus_dx: ∀x,y. x ≤ y → ∀z. x - z ≤ y - z. +#x #y #Hxy * // +#z elim z -z /3 width=1 by yle_pred/ +qed. + +(* Properties on strict order ***********************************************) + +lemma monotonic_ylt_minus_dx: ∀x,y:ynat. x < y → ∀z:nat. z ≤ x → x - z < y - z. +#x #y * -x -y +/4 width=1 by ylt_inj, yle_inv_inj, monotonic_lt_minus_l/ +qed. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_plus.ma b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_plus.ma new file mode 100644 index 000000000..761fc9965 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_plus.ma @@ -0,0 +1,203 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_minus.ma". + +(* NATURAL NUMBERS WITH INFINITY ********************************************) + +(* addition *) +definition yplus: ynat → ynat → ynat ≝ λx,y. match y with +[ yinj n ⇒ ysucc^n x +| Y ⇒ Y +]. + +interpretation "ynat plus" 'plus x y = (yplus x y). + +(* Properties on successor **************************************************) + +lemma yplus_succ2: ∀m,n. m + ⫯n = ⫯(m + n). +#m * // +qed. + +lemma yplus_succ1: ∀m,n. ⫯m + n = ⫯(m + n). +#m * normalize // +qed. + +lemma yplus_succ_swap: ∀m,n. m + ⫯n = ⫯m + n. +// qed. + +lemma yplus_SO2: ∀m. m + 1 = ⫯m. +* // +qed. + +(* Basic properties *********************************************************) + +lemma yplus_inj: ∀n,m. yinj m + yinj n = yinj (m + n). +#n elim n -n [ normalize // ] +#n #IHn #m >(yplus_succ2 ? n) >IHn -IHn +ysucc_iter_Y // +qed. + +lemma yplus_assoc: associative … yplus. +#x #y * // #z cases y -y +[ #y >yplus_inj whd in ⊢ (??%%); yplus_Y1 // +] +qed. + +lemma yplus_O1: ∀n:ynat. 0 + n = n. +#n >yplus_comm // qed. + +(* Basic inversion lemmas ***************************************************) + +lemma yplus_inv_inj: ∀z,y,x. x + y = yinj z → + ∃∃m,n. m + n = z & x = yinj m & y = yinj n. +#z * [2: normalize #x #H destruct ] +#y * [2: >yplus_Y1 #H destruct ] +/3 width=5 by yinj_inj, ex3_2_intro/ +qed-. + +(* Properties on order ******************************************************) + +lemma yle_plus_dx2: ∀n,m. n ≤ m + n. +* // +#n elim n -n // +#n #IHn #m >(yplus_succ2 ? n) @(yle_succ n) // (**) (* full auto fails *) +qed. + +lemma yle_plus_dx1: ∀n,m. m ≤ m + n. +// qed. + +lemma yle_plus_dx1_trans: ∀x,z. z ≤ x → ∀y. z ≤ x + y. +/2 width=3 by yle_trans/ qed. + +lemma yle_plus_dx2_trans: ∀y,z. z ≤ y → ∀x. z ≤ x + y. +/2 width=3 by yle_trans/ qed. + +lemma monotonic_yle_plus_dx: ∀x,y. x ≤ y → ∀z. x + z ≤ y + z. +#x #y #Hxy * // +#z elim z -z /3 width=1 by yle_succ/ +qed. + +lemma monotonic_yle_plus_sn: ∀x,y. x ≤ y → ∀z. z + x ≤ z + y. +/2 width=1 by monotonic_yle_plus_dx/ qed. + +lemma monotonic_yle_plus: ∀x1,y1. x1 ≤ y1 → ∀x2,y2. x2 ≤ y2 → + x1 + x2 ≤ y1 + y2. +/3 width=3 by monotonic_yle_plus_dx, yle_trans/ qed. + +(* Forward lemmas on order **************************************************) + +lemma yle_fwd_plus_sn2: ∀x,y,z. x + y ≤ z → y ≤ z. +/2 width=3 by yle_trans/ qed-. + +lemma yle_fwd_plus_sn1: ∀x,y,z. x + y ≤ z → x ≤ z. +/2 width=3 by yle_trans/ qed-. + +lemma yle_inv_monotonic_plus_dx: ∀x,y:ynat.∀z:nat. x + z ≤ y + z → x ≤ y. +#x #y #z elim z -z /3 width=1 by yle_inv_succ/ +qed-. + +lemma yle_inv_monotonic_plus_sn: ∀x,y:ynat.∀z:nat. z + x ≤ z + y → x ≤ y. +/2 width=2 by yle_inv_monotonic_plus_dx/ qed-. + +lemma yle_fwd_plus_ge: ∀m1,m2:nat. m2 ≤ m1 → ∀n1,n2:ynat. m1 + n1 ≤ m2 + n2 → n1 ≤ n2. +#m1 #m2 #Hm12 #n1 #n2 #H +lapply (monotonic_yle_plus … Hm12 … H) -Hm12 -H +/2 width=2 by yle_inv_monotonic_plus_sn/ +qed-. + +lemma yle_fwd_plus_ge_inj: ∀m1:nat. ∀m2,n1,n2:ynat. m2 ≤ m1 → m1 + n1 ≤ m2 + n2 → n1 ≤ n2. +#m2 #m1 #n1 #n2 #H elim (yle_inv_inj2 … H) -H +#x #H0 #H destruct /3 width=4 by yle_fwd_plus_ge, yle_inj/ +qed-. + +(* Forward lemmas on strict order *******************************************) + +lemma ylt_inv_monotonic_plus_dx: ∀x,y,z. x + z < y + z → x < y. +* [2: #y #z >yplus_comm #H elim (ylt_inv_Y1 … H) ] +#x * // #y * [2: #H elim (ylt_inv_Y1 … H) ] +/4 width=3 by ylt_inv_inj, ylt_inj, lt_plus_to_lt_l/ +qed-. + +(* Properties on strict order ***********************************************) + +lemma ylt_plus_dx1_trans: ∀x,z. z < x → ∀y. z < x + yinj y. +/2 width=3 by ylt_yle_trans/ qed. + +lemma ylt_plus_dx2_trans: ∀y,z. z < y → ∀x. z < yinj x + y. +/2 width=3 by ylt_yle_trans/ qed. + +lemma monotonic_ylt_plus_dx: ∀x,y. x < y → ∀z:nat. x + yinj z < y + yinj z. +#x #y #Hxy #z elim z -z /3 width=1 by ylt_succ/ +qed. + +lemma monotonic_ylt_plus_sn: ∀x,y. x < y → ∀z:nat. yinj z + x < yinj z + y. +/2 width=1 by monotonic_ylt_plus_dx/ qed. + +(* Properties on minus ******************************************************) + +lemma yplus_minus_inj: ∀m:ynat. ∀n:nat. m + n - n = m. +#m #n elim n -n // +#n #IHn >(yplus_succ2 m n) >(yminus_succ … n) // +qed. + +lemma yplus_minus: ∀m,n. m + n - n ≤ m. +#m * // +qed. + +(* Forward lemmas on minus **************************************************) + +lemma yle_plus1_to_minus_inj2: ∀x,z:ynat. ∀y:nat. x + y ≤ z → x ≤ z - y. +/2 width=1 by monotonic_yle_minus_dx/ qed-. + +lemma yle_plus1_to_minus_inj1: ∀x,z:ynat. ∀y:nat. y + x ≤ z → x ≤ z - y. +/2 width=1 by yle_plus1_to_minus_inj2/ qed-. + +lemma yle_plus2_to_minus_inj2: ∀x,y:ynat. ∀z:nat. x ≤ y + z → x - z ≤ y. +/2 width=1 by monotonic_yle_minus_dx/ qed-. + +lemma yle_plus2_to_minus_inj1: ∀x,y:ynat. ∀z:nat. x ≤ z + y → x - z ≤ y. +/2 width=1 by yle_plus2_to_minus_inj2/ qed-. + +lemma yplus_minus_assoc_inj: ∀x:nat. ∀y,z:ynat. x ≤ y → z + (y - x) = z + y - x. +#x * +[ #y * // #z >yminus_inj >yplus_inj >yplus_inj + /4 width=1 by yle_inv_inj, plus_minus, eq_f/ +| >yminus_Y_inj // +] +qed-. + +lemma yplus_minus_comm_inj: ∀y:nat. ∀x,z:ynat. y ≤ x → x + z - y = x - y + z. +#y * // #x * // +#z #Hxy >yplus_inj >yminus_inj IHm // +qed. + +(* Inversion lemmas *********************************************************) + +lemma ysucc_inj: ∀m,n. ⫯m = ⫯n → m = n. +#m #n #H <(ypred_succ m) <(ypred_succ n) // +qed-. + +lemma ysucc_inv_refl: ∀m. ⫯m = m → m = ∞. +* // normalize +#m #H lapply (yinj_inj … H) -H (**) (* destruct lemma needed *) +#H elim (lt_refl_false m) // +qed-. + +lemma ysucc_inv_inj_sn: ∀m2,n1. yinj m2 = ⫯n1 → + ∃∃m1. n1 = yinj m1 & m2 = S m1. +#m2 * normalize +[ #n1 #H destruct /2 width=3 by ex2_intro/ +| #H destruct +] +qed-. + +lemma ysucc_inv_inj_dx: ∀m2,n1. ⫯n1 = yinj m2 → + ∃∃m1. n1 = yinj m1 & m2 = S m1. +/2 width=1 by ysucc_inv_inj_sn/ qed-. + +lemma ysucc_inv_Y_sn: ∀m. ∞ = ⫯m → m = ∞. +* // normalize +#m #H destruct +qed-. + +lemma ysucc_inv_Y_dx: ∀m. ⫯m = ∞ → m = ∞. +/2 width=1 by ysucc_inv_Y_sn/ qed-. + +lemma ysucc_inv_O_sn: ∀m. yinj 0 = ⫯m → ⊥. (**) (* explicit coercion *) +#m #H elim (ysucc_inv_inj_sn … H) -H +#n #_ #H destruct +qed-. + +lemma ysucc_inv_O_dx: ∀m. ⫯m = 0 → ⊥. +/2 width=2 by ysucc_inv_O_sn/ qed-. diff --git a/matita/matita/contribs/lambdadelta/legacy_1/coq/defs.ma b/matita/matita/contribs/lambdadelta/legacy_1A/coq/defs.ma similarity index 98% rename from matita/matita/contribs/lambdadelta/legacy_1/coq/defs.ma rename to matita/matita/contribs/lambdadelta/legacy_1A/coq/defs.ma index 497403d32..0eb631b97 100644 --- a/matita/matita/contribs/lambdadelta/legacy_1/coq/defs.ma +++ b/matita/matita/contribs/lambdadelta/legacy_1A/coq/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "legacy_1/preamble.ma". +include "legacy_1A/preamble.ma". inductive eq (A: Type[0]) (x: A): A \to Prop \def | refl_equal: eq A x x. diff --git a/matita/matita/contribs/lambdadelta/legacy_1/coq/fwd.ma b/matita/matita/contribs/lambdadelta/legacy_1A/coq/fwd.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/legacy_1/coq/fwd.ma rename to matita/matita/contribs/lambdadelta/legacy_1A/coq/fwd.ma index c11c7d732..fbd8a5335 100644 --- a/matita/matita/contribs/lambdadelta/legacy_1/coq/fwd.ma +++ b/matita/matita/contribs/lambdadelta/legacy_1A/coq/fwd.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "legacy_1/coq/defs.ma". +include "legacy_1A/coq/defs.ma". implied lemma False_rect: \forall (P: Type[0]).(False \to P) diff --git a/matita/matita/contribs/lambdadelta/legacy_1/coq/props.ma b/matita/matita/contribs/lambdadelta/legacy_1A/coq/props.ma similarity index 99% rename from matita/matita/contribs/lambdadelta/legacy_1/coq/props.ma rename to matita/matita/contribs/lambdadelta/legacy_1A/coq/props.ma index b5069fdf7..8e169b361 100644 --- a/matita/matita/contribs/lambdadelta/legacy_1/coq/props.ma +++ b/matita/matita/contribs/lambdadelta/legacy_1A/coq/props.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "legacy_1/coq/fwd.ma". +include "legacy_1A/coq/fwd.ma". lemma f_equal: \forall (A: Type[0]).(\forall (B: Type[0]).(\forall (f: ((A \to diff --git a/matita/matita/contribs/lambdadelta/legacy_1/definitions.ma b/matita/matita/contribs/lambdadelta/legacy_1A/definitions.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/legacy_1/definitions.ma rename to matita/matita/contribs/lambdadelta/legacy_1A/definitions.ma index bcdc2a0a8..ad3e144d5 100644 --- a/matita/matita/contribs/lambdadelta/legacy_1/definitions.ma +++ b/matita/matita/contribs/lambdadelta/legacy_1A/definitions.ma @@ -14,5 +14,5 @@ (* This file was automatically generated: do not edit *********************) -include "legacy_1/coq/defs.ma". +include "legacy_1A/coq/defs.ma". diff --git a/matita/matita/contribs/lambdadelta/legacy_1/preamble.ma b/matita/matita/contribs/lambdadelta/legacy_1A/preamble.ma similarity index 100% rename from matita/matita/contribs/lambdadelta/legacy_1/preamble.ma rename to matita/matita/contribs/lambdadelta/legacy_1A/preamble.ma diff --git a/matita/matita/contribs/lambdadelta/ground_1/spare.ma b/matita/matita/contribs/lambdadelta/legacy_1A/spare.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/ground_1/spare.ma rename to matita/matita/contribs/lambdadelta/legacy_1A/spare.ma index e3cba9bbc..2bcbf4cbe 100644 --- a/matita/matita/contribs/lambdadelta/ground_1/spare.ma +++ b/matita/matita/contribs/lambdadelta/legacy_1A/spare.ma @@ -14,5 +14,5 @@ (* This file was automatically generated: do not edit *********************) -include "ground_1/theory.ma". +include "legacy_1A/theory.ma". diff --git a/matita/matita/contribs/lambdadelta/legacy_1/theory.ma b/matita/matita/contribs/lambdadelta/legacy_1A/theory.ma similarity index 96% rename from matita/matita/contribs/lambdadelta/legacy_1/theory.ma rename to matita/matita/contribs/lambdadelta/legacy_1A/theory.ma index 17a1ec960..6d8925145 100644 --- a/matita/matita/contribs/lambdadelta/legacy_1/theory.ma +++ b/matita/matita/contribs/lambdadelta/legacy_1A/theory.ma @@ -14,5 +14,5 @@ (* This file was automatically generated: do not edit *********************) -include "legacy_1/coq/props.ma". +include "legacy_1A/coq/props.ma". -- 2.39.2