From b118146b97959e6a6dde18fdd014b8e1e676a2d1 Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Sat, 18 Jul 2020 20:49:45 +0200 Subject: [PATCH] update in static_2 + generic equivalence generalizes syntactic equivalence and sort-irrelevant equivalence + minor corrections --- .../lambdadelta/apps_2/examples/ex_rpx_fwd.ma | 9 +- .../basic_2/dynamic/cnv_cpm_teqx.ma | 46 ++-- .../basic_2/dynamic/cnv_cpm_teqx_conf.ma | 34 +-- .../basic_2/dynamic/cnv_cpm_teqx_trans.ma | 6 +- .../basic_2/dynamic/cnv_cpms_conf.ma | 20 +- .../basic_2/dynamic/cnv_cpms_teqx.ma | 8 +- .../basic_2/dynamic/cnv_cpms_teqx_conf.ma | 12 +- .../lambdadelta/basic_2/dynamic/cnv_cpmuwe.ma | 4 +- .../lambdadelta/basic_2/dynamic/cnv_eval.ma | 2 +- .../cpms_reqx.ma => etc/teqx/cpms_reqx.etc} | 0 .../cpr_teqx.ma => etc/teqx/cpr_teqx.etc} | 0 .../cpx_feqx.ma => etc/teqx/cpx_feqx.etc} | 0 .../cpx_req.ma => etc/teqx/cpx_req.etc} | 0 .../cpx_reqx.ma => etc/teqx/cpx_reqx.etc} | 0 .../cpxs_feqx.ma => etc/teqx/cpxs_feqx.etc} | 0 .../cpxs_reqx.ma => etc/teqx/cpxs_reqx.etc} | 0 .../cpxs_teqx.ma => etc/teqx/cpxs_teqx.etc} | 0 .../csx_feqx.ma => etc/teqx/csx_feqx.etc} | 0 .../csx_reqx.ma => etc/teqx/csx_reqx.etc} | 0 .../fpb_feqx.ma => etc/teqx/fpb_feqx.etc} | 0 .../fpb_reqx.ma => etc/teqx/fpb_reqx.etc} | 0 .../fsb_feqx.ma => etc/teqx/fsb_feqx.etc} | 0 .../lpx_reqx.ma => etc/teqx/lpx_reqx.etc} | 0 .../lpxs_feqx.ma => etc/teqx/lpxs_feqx.etc} | 0 .../lpxs_reqx.ma => etc/teqx/lpxs_reqx.etc} | 0 .../basic_2/rt_computation/cnuw.ma | 10 +- .../basic_2/rt_computation/cnuw_cnuw.ma | 26 +- .../basic_2/rt_computation/cnuw_drops.ma | 8 +- .../basic_2/rt_computation/cnuw_simple.ma | 8 +- .../basic_2/rt_computation/cpms_fpbg.ma | 6 +- .../basic_2/rt_computation/cpms_reqg.ma | 31 +++ .../basic_2/rt_computation/cpmuwe_csx.ma | 4 +- .../{cprs_tweq.ma => cprs_teqw.ma} | 14 +- .../basic_2/rt_computation/cpxs_cnx.ma | 4 +- .../basic_2/rt_computation/cpxs_feqg.ma | 34 +++ .../basic_2/rt_computation/cpxs_fqus.ma | 18 +- .../basic_2/rt_computation/cpxs_reqg.ma | 52 ++++ .../basic_2/rt_computation/cpxs_teqg.ma | 49 ++++ .../basic_2/rt_computation/cpxs_teqo.ma | 16 +- .../rt_computation/cpxs_teqo_vector.ma | 12 +- .../lambdadelta/basic_2/rt_computation/csx.ma | 4 +- .../basic_2/rt_computation/csx_aaa.ma | 8 +- .../basic_2/rt_computation/csx_cpxs.ma | 14 +- .../basic_2/rt_computation/csx_csx.ma | 15 +- .../basic_2/rt_computation/csx_feqg.ma | 28 +++ .../basic_2/rt_computation/csx_fpbq.ma | 4 +- .../basic_2/rt_computation/csx_reqg.ma | 38 +++ .../basic_2/rt_computation/csx_simple.ma | 2 +- .../basic_2/rt_computation/csx_simple_teqo.ma | 2 +- .../basic_2/rt_computation/fpbg.ma | 4 +- .../basic_2/rt_computation/fpbg_cpxs.ma | 6 +- .../basic_2/rt_computation/fpbg_fpbs.ma | 17 +- .../basic_2/rt_computation/fpbg_fqup.ma | 4 +- .../basic_2/rt_computation/fpbg_lpxs.ma | 6 +- .../basic_2/rt_computation/fpbs.ma | 11 +- .../basic_2/rt_computation/fpbs_cpx.ma | 15 +- .../basic_2/rt_computation/fpbs_cpxs.ma | 6 +- .../basic_2/rt_computation/fpbs_fqup.ma | 10 +- .../basic_2/rt_computation/fpbs_lpxs.ma | 26 +- .../basic_2/rt_computation/fsb_csx.ma | 4 +- .../basic_2/rt_computation/fsb_feqg.ma | 31 +++ .../basic_2/rt_computation/fsb_fpbg.ma | 4 +- .../basic_2/rt_computation/lpxs_feqg.ma | 31 +++ .../basic_2/rt_computation/lpxs_reqg.ma | 52 ++++ .../lambdadelta/basic_2/rt_computation/rsx.ma | 12 +- .../basic_2/rt_computation/rsx_csx.ma | 4 +- .../basic_2/rt_computation/rsx_drops.ma | 6 +- .../basic_2/rt_computation/rsx_fqup.ma | 6 +- .../basic_2/rt_computation/rsx_length.ma | 8 +- .../basic_2/rt_computation/rsx_lpxs.ma | 43 ++-- .../basic_2/rt_computation/rsx_rsx.ma | 11 +- .../basic_2/rt_transition/cnr_teqg.ma | 97 ++++++++ .../basic_2/rt_transition/cnr_teqx.ma | 78 +----- .../lambdadelta/basic_2/rt_transition/cnx.ma | 4 +- .../basic_2/rt_transition/cnx_cnx.ma | 3 +- .../basic_2/rt_transition/cnx_drops.ma | 2 +- .../basic_2/rt_transition/cpm_teqx.ma | 6 +- .../basic_2/rt_transition/cpr_teqg.ma | 33 +++ .../basic_2/rt_transition/cpx_feqg.ma | 35 +++ .../basic_2/rt_transition/cpx_fqus.ma | 18 +- .../basic_2/rt_transition/cpx_reqg.ma | 32 +++ .../lambdadelta/basic_2/rt_transition/fpb.ma | 8 +- .../basic_2/rt_transition/fpb_feqg.ma | 49 ++++ .../basic_2/rt_transition/fpb_reqg.ma | 54 ++++ .../lambdadelta/basic_2/rt_transition/fpbq.ma | 2 +- .../basic_2/rt_transition/fpbq_aaa.ma | 4 +- .../basic_2/rt_transition/fpbq_fpb.ma | 44 ++-- .../basic_2/rt_transition/lpx_reqg.ma | 58 +++++ .../basic_2/rt_transition/rpx_lpx.ma | 4 +- .../basic_2/rt_transition/rpx_reqg.ma | 177 ++++++++++++++ .../basic_2/rt_transition/rpx_reqx.ma | 18 +- .../lambdadelta/basic_2/web/basic_2_src.tbl | 24 +- matita/matita/contribs/lambdadelta/refile.sh | 2 +- matita/matita/contribs/lambdadelta/replace.sh | 2 +- .../feqx_feqx.ma => etc/teqx/feqx_feqx.etc} | 0 .../feqx_fqup.ma => etc/teqx/feqx_fqup.etc} | 0 .../feqx_fqus.ma => etc/teqx/feqx_fqus.etc} | 0 .../feqx_req.ma => etc/teqx/feqx_req.etc} | 0 .../lambdadelta/static_2/etc/teqx/req.etc | 117 +++++++++ .../req_drops.ma => etc/teqx/req_drops.etc} | 0 .../req_fqup.ma => etc/teqx/req_fqup.etc} | 0 .../req_length.ma => etc/teqx/req_length.etc} | 0 .../reqx_drops.ma => etc/teqx/reqx_drops.etc} | 0 .../reqx_fqup.ma => etc/teqx/reqx_fqup.etc} | 0 .../reqx_fqus.ma => etc/teqx/reqx_fqus.etc} | 0 .../teqx/reqx_length.etc} | 0 .../lambdadelta/static_2/i_static/rexs_lex.ma | 6 +- .../notation/relations/approxeqsn_3.ma | 19 ++ .../{stareqsn_6.ma => approxeqsn_6.ma} | 4 +- .../relations/{stareqsn_3.ma => ideq_3.ma} | 4 +- .../static_2/notation/relations/stareq_3.ma | 4 +- .../static_2/notation/relations/stareq_4.ma | 19 ++ .../static_2/notation/relations/stareqsn_4.ma | 19 ++ .../static_2/notation/relations/stareqsn_7.ma | 19 ++ .../relations/{topiso_2.ma => tilde_2.ma} | 4 +- .../{stareq_2.ma => tildeminus_2.ma} | 4 +- .../static_2/relocation/lifts_teqg.ma | 98 ++++++++ .../{lifts_tweq.ma => lifts_teqw.ma} | 48 ++-- .../static_2/relocation/lifts_teqx.ma | 64 +---- .../lambdadelta/static_2/relocation/seq.ma | 61 +++-- .../static_2/relocation/seq_length.ma | 3 +- .../static_2/relocation/seq_seq.ma | 21 +- .../s_transition/{fqu_teqx.ma => fqu_teqg.ma} | 22 +- .../static/{aaa_feqx.ma => aaa_feqg.ma} | 16 +- .../static/{aaa_reqx.ma => aaa_reqg.ma} | 42 ++-- .../lambdadelta/static_2/static/feqg.ma | 57 +++++ .../lambdadelta/static_2/static/feqg_feqg.ma | 77 ++++++ .../lambdadelta/static_2/static/feqg_fqup.ma | 33 +++ .../lambdadelta/static_2/static/feqg_fqus.ma | 33 +++ .../lambdadelta/static_2/static/feqx.ma | 18 +- .../ceq_ext.ma => static/remove/feqx_req.etc} | 22 +- .../static_2/static/remove/req_drops.etc | 26 ++ .../static_2/static/remove/req_fqup.etc | 24 ++ .../{req_fsle.ma => remove/req_fsle.etc} | 0 .../static_2/static/remove/req_length.etc | 36 +++ .../{reqx_req.ma => remove/reqx_req.etc} | 0 .../lambdadelta/static_2/static/req.ma | 59 ++--- .../lambdadelta/static_2/static/req_req.ma | 32 +++ .../lambdadelta/static_2/static/reqg.ma | 231 ++++++++++++++++++ .../lambdadelta/static_2/static/reqg_drops.ma | 58 +++++ .../lambdadelta/static_2/static/reqg_fqup.ma | 45 ++++ .../lambdadelta/static_2/static/reqg_fqus.ma | 174 +++++++++++++ .../static_2/static/reqg_length.ma | 62 +++++ .../lambdadelta/static_2/static/reqg_reqg.ma | 144 +++++++++++ .../lambdadelta/static_2/static/reqx.ma | 23 +- .../lambdadelta/static_2/static/reqx_reqx.ma | 22 +- .../lambdadelta/static_2/syntax/lenv.ma | 2 - .../lambdadelta/static_2/syntax/teq.ma | 56 +++++ .../lambdadelta/static_2/syntax/teq_ext.ma | 53 ++++ ...{ceq_ext_ceq_ext.ma => teq_ext_teq_ext.ma} | 15 +- .../lambdadelta/static_2/syntax/teq_teq.ma | 30 +++ .../lambdadelta/static_2/syntax/teqg.ma | 230 +++++++++++++++++ .../lambdadelta/static_2/syntax/teqg_ext.ma | 40 +++ .../lambdadelta/static_2/syntax/teqg_teqg.ma | 56 +++++ .../lambdadelta/static_2/syntax/teqo.ma | 28 +-- .../static_2/syntax/teqo_simple.ma | 4 +- .../static_2/syntax/teqo_simple_vector.ma | 2 +- .../syntax/{teqo_teqx.ma => teqo_teqg.ma} | 9 +- .../static_2/syntax/{tweq.ma => teqw.ma} | 204 ++++++++-------- .../syntax/{tweq_simple.ma => teqw_simple.ma} | 6 +- .../syntax/{tweq_teqx.ma => teqw_teqg.ma} | 25 +- .../syntax/{tweq_tweq.ma => teqw_teqw.ma} | 38 +-- .../lambdadelta/static_2/syntax/teqx.ma | 225 ++++++----------- .../lambdadelta/static_2/syntax/teqx_ext.ma | 35 +-- .../lambdadelta/static_2/syntax/teqx_teqx.ma | 27 +- .../lambdadelta/static_2/web/static_2_src.tbl | 38 ++- .../contribs/lambdadelta/web/changes.tbl | 5 +- 167 files changed, 3524 insertions(+), 993 deletions(-) rename matita/matita/contribs/lambdadelta/basic_2/{rt_computation/cpms_reqx.ma => etc/teqx/cpms_reqx.etc} (100%) rename matita/matita/contribs/lambdadelta/basic_2/{rt_transition/cpr_teqx.ma => etc/teqx/cpr_teqx.etc} (100%) rename matita/matita/contribs/lambdadelta/basic_2/{rt_transition/cpx_feqx.ma => etc/teqx/cpx_feqx.etc} (100%) rename matita/matita/contribs/lambdadelta/basic_2/{rt_transition/cpx_req.ma => etc/teqx/cpx_req.etc} (100%) rename matita/matita/contribs/lambdadelta/basic_2/{rt_transition/cpx_reqx.ma => etc/teqx/cpx_reqx.etc} (100%) rename matita/matita/contribs/lambdadelta/basic_2/{rt_computation/cpxs_feqx.ma => etc/teqx/cpxs_feqx.etc} (100%) rename matita/matita/contribs/lambdadelta/basic_2/{rt_computation/cpxs_reqx.ma => etc/teqx/cpxs_reqx.etc} (100%) rename matita/matita/contribs/lambdadelta/basic_2/{rt_computation/cpxs_teqx.ma => etc/teqx/cpxs_teqx.etc} (100%) rename matita/matita/contribs/lambdadelta/basic_2/{rt_computation/csx_feqx.ma => etc/teqx/csx_feqx.etc} (100%) rename matita/matita/contribs/lambdadelta/basic_2/{rt_computation/csx_reqx.ma => etc/teqx/csx_reqx.etc} (100%) rename matita/matita/contribs/lambdadelta/basic_2/{rt_transition/fpb_feqx.ma => etc/teqx/fpb_feqx.etc} (100%) rename matita/matita/contribs/lambdadelta/basic_2/{rt_transition/fpb_reqx.ma => etc/teqx/fpb_reqx.etc} (100%) rename matita/matita/contribs/lambdadelta/basic_2/{rt_computation/fsb_feqx.ma => etc/teqx/fsb_feqx.etc} (100%) rename matita/matita/contribs/lambdadelta/basic_2/{rt_transition/lpx_reqx.ma => etc/teqx/lpx_reqx.etc} (100%) rename matita/matita/contribs/lambdadelta/basic_2/{rt_computation/lpxs_feqx.ma => etc/teqx/lpxs_feqx.etc} (100%) rename matita/matita/contribs/lambdadelta/basic_2/{rt_computation/lpxs_reqx.ma => etc/teqx/lpxs_reqx.etc} (100%) create mode 100644 matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_reqg.ma rename matita/matita/contribs/lambdadelta/basic_2/rt_computation/{cprs_tweq.ma => cprs_teqw.ma} (82%) create mode 100644 matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_feqg.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_reqg.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_teqg.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_feqg.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_reqg.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/rt_computation/fsb_feqg.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_feqg.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_reqg.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnr_teqg.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpr_teqg.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_feqg.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_reqg.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_feqg.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_reqg.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_reqg.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_reqg.ma rename matita/matita/contribs/lambdadelta/static_2/{static/feqx_feqx.ma => etc/teqx/feqx_feqx.etc} (100%) rename matita/matita/contribs/lambdadelta/static_2/{static/feqx_fqup.ma => etc/teqx/feqx_fqup.etc} (100%) rename matita/matita/contribs/lambdadelta/static_2/{static/feqx_fqus.ma => etc/teqx/feqx_fqus.etc} (100%) rename matita/matita/contribs/lambdadelta/static_2/{static/feqx_req.ma => etc/teqx/feqx_req.etc} (100%) create mode 100644 matita/matita/contribs/lambdadelta/static_2/etc/teqx/req.etc rename matita/matita/contribs/lambdadelta/static_2/{static/req_drops.ma => etc/teqx/req_drops.etc} (100%) rename matita/matita/contribs/lambdadelta/static_2/{static/req_fqup.ma => etc/teqx/req_fqup.etc} (100%) rename matita/matita/contribs/lambdadelta/static_2/{static/req_length.ma => etc/teqx/req_length.etc} (100%) rename matita/matita/contribs/lambdadelta/static_2/{static/reqx_drops.ma => etc/teqx/reqx_drops.etc} (100%) rename matita/matita/contribs/lambdadelta/static_2/{static/reqx_fqup.ma => etc/teqx/reqx_fqup.etc} (100%) rename matita/matita/contribs/lambdadelta/static_2/{static/reqx_fqus.ma => etc/teqx/reqx_fqus.etc} (100%) rename matita/matita/contribs/lambdadelta/static_2/{static/reqx_length.ma => etc/teqx/reqx_length.etc} (100%) create mode 100644 matita/matita/contribs/lambdadelta/static_2/notation/relations/approxeqsn_3.ma rename matita/matita/contribs/lambdadelta/static_2/notation/relations/{stareqsn_6.ma => approxeqsn_6.ma} (91%) rename matita/matita/contribs/lambdadelta/static_2/notation/relations/{stareqsn_3.ma => ideq_3.ma} (92%) create mode 100644 matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_4.ma create mode 100644 matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_4.ma create mode 100644 matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_7.ma rename matita/matita/contribs/lambdadelta/static_2/notation/relations/{topiso_2.ma => tilde_2.ma} (93%) rename matita/matita/contribs/lambdadelta/static_2/notation/relations/{stareq_2.ma => tildeminus_2.ma} (93%) create mode 100644 matita/matita/contribs/lambdadelta/static_2/relocation/lifts_teqg.ma rename matita/matita/contribs/lambdadelta/static_2/relocation/{lifts_tweq.ma => lifts_teqw.ma} (78%) rename matita/matita/contribs/lambdadelta/static_2/s_transition/{fqu_teqx.ma => fqu_teqg.ma} (68%) rename matita/matita/contribs/lambdadelta/static_2/static/{aaa_feqx.ma => aaa_feqg.ma} (71%) rename matita/matita/contribs/lambdadelta/static_2/static/{aaa_reqx.ma => aaa_reqg.ma} (51%) create mode 100644 matita/matita/contribs/lambdadelta/static_2/static/feqg.ma create mode 100644 matita/matita/contribs/lambdadelta/static_2/static/feqg_feqg.ma create mode 100644 matita/matita/contribs/lambdadelta/static_2/static/feqg_fqup.ma create mode 100644 matita/matita/contribs/lambdadelta/static_2/static/feqg_fqus.ma rename matita/matita/contribs/lambdadelta/static_2/{syntax/ceq_ext.ma => static/remove/feqx_req.etc} (67%) create mode 100644 matita/matita/contribs/lambdadelta/static_2/static/remove/req_drops.etc create mode 100644 matita/matita/contribs/lambdadelta/static_2/static/remove/req_fqup.etc rename matita/matita/contribs/lambdadelta/static_2/static/{req_fsle.ma => remove/req_fsle.etc} (100%) create mode 100644 matita/matita/contribs/lambdadelta/static_2/static/remove/req_length.etc rename matita/matita/contribs/lambdadelta/static_2/static/{reqx_req.ma => remove/reqx_req.etc} (100%) create mode 100644 matita/matita/contribs/lambdadelta/static_2/static/req_req.ma create mode 100644 matita/matita/contribs/lambdadelta/static_2/static/reqg.ma create mode 100644 matita/matita/contribs/lambdadelta/static_2/static/reqg_drops.ma create mode 100644 matita/matita/contribs/lambdadelta/static_2/static/reqg_fqup.ma create mode 100644 matita/matita/contribs/lambdadelta/static_2/static/reqg_fqus.ma create mode 100644 matita/matita/contribs/lambdadelta/static_2/static/reqg_length.ma create mode 100644 matita/matita/contribs/lambdadelta/static_2/static/reqg_reqg.ma create mode 100644 matita/matita/contribs/lambdadelta/static_2/syntax/teq.ma create mode 100644 matita/matita/contribs/lambdadelta/static_2/syntax/teq_ext.ma rename matita/matita/contribs/lambdadelta/static_2/syntax/{ceq_ext_ceq_ext.ma => teq_ext_teq_ext.ma} (73%) create mode 100644 matita/matita/contribs/lambdadelta/static_2/syntax/teq_teq.ma create mode 100644 matita/matita/contribs/lambdadelta/static_2/syntax/teqg.ma create mode 100644 matita/matita/contribs/lambdadelta/static_2/syntax/teqg_ext.ma create mode 100644 matita/matita/contribs/lambdadelta/static_2/syntax/teqg_teqg.ma rename matita/matita/contribs/lambdadelta/static_2/syntax/{teqo_teqx.ma => teqo_teqg.ma} (83%) rename matita/matita/contribs/lambdadelta/static_2/syntax/{tweq.ma => teqw.ma} (51%) rename matita/matita/contribs/lambdadelta/static_2/syntax/{tweq_simple.ma => teqw_simple.ma} (91%) rename matita/matita/contribs/lambdadelta/static_2/syntax/{tweq_teqx.ma => teqw_teqg.ma} (68%) rename matita/matita/contribs/lambdadelta/static_2/syntax/{tweq_tweq.ma => teqw_teqw.ma} (62%) diff --git a/matita/matita/contribs/lambdadelta/apps_2/examples/ex_rpx_fwd.ma b/matita/matita/contribs/lambdadelta/apps_2/examples/ex_rpx_fwd.ma index c4a6b96c4..efefd445d 100644 --- a/matita/matita/contribs/lambdadelta/apps_2/examples/ex_rpx_fwd.ma +++ b/matita/matita/contribs/lambdadelta/apps_2/examples/ex_rpx_fwd.ma @@ -12,7 +12,8 @@ (* *) (**************************************************************************) -include "static_2/static/reqx_fqup.ma". +include "static_2/static/reqg_fqup.ma". +include "static_2/static/reqx.ma". include "basic_2/rt_transition/lpx.ma". include "basic_2/rt_transition/rpx.ma". @@ -35,8 +36,8 @@ lemma ex_rpx_fwd_1 (G) (K) (s1) (s0): /3 width=1 by lpx_pair, lpx_bind_refl_dx, cpx_eps/ qed. lemma ex_rpx_fwd_2 (K) (s1) (s0) (i1) (i0): - L K s1 s0 ≛[T] L2 K i1 i0. -/3 width=1 by reqx_pair, reqx_sort/ qed. + L K s1 s0 ≅[T] L2 K i1 i0. +/4 width=1 by reqg_refl, reqg_pair, reqg_sort, teqg_sort/ qed. lemma ex_rpx_fwd_3 (G) (K) (s1) (s0) (i1) (i0): ❪G,L1 K s1 s0❫ ⊢ ⬈[T] L2 K i1 i0 → ⊥. @@ -50,5 +51,5 @@ qed-. (* Main properties **********************************************************) theorem ex_rpx_fwd (G) (K) (s1) (s0) (i1) (i0): - (❪G,L1 K s1 s0❫ ⊢ ⬈ L K s1 s0 → L K s1 s0 ≛[T] L2 K i1 i0 → ❪G,L1 K s1 s0❫ ⊢ ⬈[T] L2 K i1 i0) → ⊥. + (❪G,L1 K s1 s0❫ ⊢ ⬈ L K s1 s0 → L K s1 s0 ≅[T] L2 K i1 i0 → ❪G,L1 K s1 s0❫ ⊢ ⬈[T] L2 K i1 i0) → ⊥. /3 width=7 by ex_rpx_fwd_3, ex_rpx_fwd_2, ex_rpx_fwd_1/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpm_teqx.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpm_teqx.ma index 23287638d..51d06a1bd 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpm_teqx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpm_teqx.ma @@ -24,13 +24,13 @@ include "basic_2/dynamic/cnv_fsb.ma". (* Inversion lemmas with restricted rt-transition for terms *****************) lemma cnv_cpr_teqx_fwd_refl (h) (a) (G) (L): - ∀T1,T2. ❪G,L❫ ⊢ T1 ➡[h,0] T2 → T1 ≛ T2 → ❪G,L❫ ⊢ T1 ![h,a] → T1 = T2. + ∀T1,T2. ❪G,L❫ ⊢ T1 ➡[h,0] T2 → T1 ≅ T2 → ❪G,L❫ ⊢ T1 ![h,a] → T1 = T2. #h #a #G #L #T1 #T2 #H @(cpr_ind … H) -G -L -T1 -T2 [ // | #G #K #V1 #V2 #X2 #_ #_ #_ #H1 #_ -a -G -K -V1 -V2 - lapply (teqx_inv_lref1 … H1) -H1 #H destruct // + lapply (teqg_inv_lref1 … H1) -H1 #H destruct // | #I #G #K #T2 #X2 #i #_ #_ #_ #H1 #_ -a -I -G -K -T2 - lapply (teqx_inv_lref1 … H1) -H1 #H destruct // + lapply (teqg_inv_lref1 … H1) -H1 #H destruct // | #p #I #G #L #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #H1 #H2 elim (teqx_inv_pair1 … H1) -H1 #V0 #T0 #HV0 #HT0 #H destruct elim (cnv_inv_bind … H2) -H2 #HV1 #HT1 @@ -46,7 +46,7 @@ lemma cnv_cpr_teqx_fwd_refl (h) (a) (G) (L): | #G #L #U #T1 #T2 #HT12 #_ #H1 #H2 elim (cnv_fpbg_refl_false … H2) -a @(fpbg_teqx_div … H1) -H1 - /3 width=7 by cpm_tneqx_cpm_fpbg, cpm_eps, teqx_inv_pair_xy_y/ + /3 width=7 by cpm_tneqx_cpm_fpbg, cpm_eps, teqg_inv_pair_xy_y/ | #p #G #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #H1 #_ elim (teqx_inv_pair … H1) -H1 #H #_ #_ destruct | #p #G #L #V1 #V2 #X2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #_ #H1 #_ @@ -56,8 +56,8 @@ qed-. lemma cpm_teqx_inv_bind_sn (h) (a) (n) (p) (I) (G) (L): ∀V,T1. ❪G,L❫ ⊢ ⓑ[p,I]V.T1 ![h,a] → - ∀X. ❪G,L❫ ⊢ ⓑ[p,I]V.T1 ➡[h,n] X → ⓑ[p,I]V.T1 ≛ X → - ∃∃T2. ❪G,L❫ ⊢ V ![h,a] & ❪G,L.ⓑ[I]V❫ ⊢ T1 ![h,a] & ❪G,L.ⓑ[I]V❫ ⊢ T1 ➡[h,n] T2 & T1 ≛ T2 & X = ⓑ[p,I]V.T2. + ∀X. ❪G,L❫ ⊢ ⓑ[p,I]V.T1 ➡[h,n] X → ⓑ[p,I]V.T1 ≅ X → + ∃∃T2. ❪G,L❫ ⊢ V ![h,a] & ❪G,L.ⓑ[I]V❫ ⊢ T1 ![h,a] & ❪G,L.ⓑ[I]V❫ ⊢ T1 ➡[h,n] T2 & T1 ≅ T2 & X = ⓑ[p,I]V.T2. #h #a #n #p #I #G #L #V #T1 #H0 #X #H1 #H2 elim (cpm_inv_bind1 … H1) -H1 * [ #XV #T2 #HXV #HT12 #H destruct @@ -74,9 +74,9 @@ qed-. lemma cpm_teqx_inv_appl_sn (h) (a) (n) (G) (L): ∀V,T1. ❪G,L❫ ⊢ ⓐV.T1 ![h,a] → - ∀X. ❪G,L❫ ⊢ ⓐV.T1 ➡[h,n] X → ⓐV.T1 ≛ X → + ∀X. ❪G,L❫ ⊢ ⓐV.T1 ➡[h,n] X → ⓐV.T1 ≅ X → ∃∃m,q,W,U1,T2. ad a m & ❪G,L❫ ⊢ V ![h,a] & ❪G,L❫ ⊢ V ➡*[h,1] W & ❪G,L❫ ⊢ T1 ➡*[h,m] ⓛ[q]W.U1 - & ❪G,L❫⊢ T1 ![h,a] & ❪G,L❫ ⊢ T1 ➡[h,n] T2 & T1 ≛ T2 & X = ⓐV.T2. + & ❪G,L❫⊢ T1 ![h,a] & ❪G,L❫ ⊢ T1 ➡[h,n] T2 & T1 ≅ T2 & X = ⓐV.T2. #h #a #n #G #L #V #T1 #H0 #X #H1 #H2 elim (cpm_inv_appl1 … H1) -H1 * [ #XV #T2 #HXV #HT12 #H destruct @@ -93,10 +93,10 @@ qed-. lemma cpm_teqx_inv_cast_sn (h) (a) (n) (G) (L): ∀U1,T1. ❪G,L❫ ⊢ ⓝU1.T1 ![h,a] → - ∀X. ❪G,L❫ ⊢ ⓝU1.T1 ➡[h,n] X → ⓝU1.T1 ≛ X → + ∀X. ❪G,L❫ ⊢ ⓝU1.T1 ➡[h,n] X → ⓝU1.T1 ≅ X → ∃∃U0,U2,T2. ❪G,L❫ ⊢ U1 ➡*[h,0] U0 & ❪G,L❫ ⊢ T1 ➡*[h,1] U0 - & ❪G,L❫ ⊢ U1 ![h,a] & ❪G,L❫ ⊢ U1 ➡[h,n] U2 & U1 ≛ U2 - & ❪G,L❫ ⊢ T1 ![h,a] & ❪G,L❫ ⊢ T1 ➡[h,n] T2 & T1 ≛ T2 & X = ⓝU2.T2. + & ❪G,L❫ ⊢ U1 ![h,a] & ❪G,L❫ ⊢ U1 ➡[h,n] U2 & U1 ≅ U2 + & ❪G,L❫ ⊢ T1 ![h,a] & ❪G,L❫ ⊢ T1 ➡[h,n] T2 & T1 ≅ T2 & X = ⓝU2.T2. #h #a #n #G #L #U1 #T1 #H0 #X #H1 #H2 elim (cpm_inv_cast1 … H1) -H1 [ * || * ] [ #U2 #T2 #HU12 #HT12 #H destruct @@ -106,18 +106,18 @@ elim (cpm_inv_cast1 … H1) -H1 [ * || * ] | #HT1X elim (cnv_fpbg_refl_false … H0) -a @(fpbg_teqx_div … H2) -H2 - /3 width=7 by cpm_tneqx_cpm_fpbg, cpm_eps, teqx_inv_pair_xy_y/ + /3 width=7 by cpm_tneqx_cpm_fpbg, cpm_eps, teqg_inv_pair_xy_y/ | #m #HU1X #H destruct elim (cnv_fpbg_refl_false … H0) -a @(fpbg_teqx_div … H2) -H2 - /3 width=7 by cpm_tneqx_cpm_fpbg, cpm_ee, teqx_inv_pair_xy_x/ + /3 width=7 by cpm_tneqx_cpm_fpbg, cpm_ee, teqg_inv_pair_xy_x/ ] qed-. lemma cpm_teqx_inv_bind_dx (h) (a) (n) (p) (I) (G) (L): ∀X. ❪G,L❫ ⊢ X ![h,a] → - ∀V,T2. ❪G,L❫ ⊢ X ➡[h,n] ⓑ[p,I]V.T2 → X ≛ ⓑ[p,I]V.T2 → - ∃∃T1. ❪G,L❫ ⊢ V ![h,a] & ❪G,L.ⓑ[I]V❫ ⊢ T1 ![h,a] & ❪G,L.ⓑ[I]V❫ ⊢ T1 ➡[h,n] T2 & T1 ≛ T2 & X = ⓑ[p,I]V.T1. + ∀V,T2. ❪G,L❫ ⊢ X ➡[h,n] ⓑ[p,I]V.T2 → X ≅ ⓑ[p,I]V.T2 → + ∃∃T1. ❪G,L❫ ⊢ V ![h,a] & ❪G,L.ⓑ[I]V❫ ⊢ T1 ![h,a] & ❪G,L.ⓑ[I]V❫ ⊢ T1 ➡[h,n] T2 & T1 ≅ T2 & X = ⓑ[p,I]V.T1. #h #a #n #p #I #G #L #X #H0 #V #T2 #H1 #H2 elim (teqx_inv_pair2 … H2) #V0 #T1 #_ #_ #H destruct elim (cpm_teqx_inv_bind_sn … H0 … H1 H2) -H0 -H1 -H2 #T0 #HV #HT1 #H1T12 #H2T12 #H destruct @@ -130,22 +130,22 @@ lemma cpm_teqx_ind (h) (a) (n) (G) (Q:relation3 …): (∀I,L. n = 0 → Q L (⓪[I]) (⓪[I])) → (∀L,s. n = 1 → Q L (⋆s) (⋆(⫯[h]s))) → (∀p,I,L,V,T1. ❪G,L❫⊢ V![h,a] → ❪G,L.ⓑ[I]V❫⊢T1![h,a] → - ∀T2. ❪G,L.ⓑ[I]V❫ ⊢ T1 ➡[h,n] T2 → T1 ≛ T2 → + ∀T2. ❪G,L.ⓑ[I]V❫ ⊢ T1 ➡[h,n] T2 → T1 ≅ T2 → Q (L.ⓑ[I]V) T1 T2 → Q L (ⓑ[p,I]V.T1) (ⓑ[p,I]V.T2) ) → (∀m. ad a m → ∀L,V. ❪G,L❫ ⊢ V ![h,a] → ∀W. ❪G,L❫ ⊢ V ➡*[h,1] W → ∀p,T1,U1. ❪G,L❫ ⊢ T1 ➡*[h,m] ⓛ[p]W.U1 → ❪G,L❫⊢ T1 ![h,a] → - ∀T2. ❪G,L❫ ⊢ T1 ➡[h,n] T2 → T1 ≛ T2 → + ∀T2. ❪G,L❫ ⊢ T1 ➡[h,n] T2 → T1 ≅ T2 → Q L T1 T2 → Q L (ⓐV.T1) (ⓐV.T2) ) → (∀L,U0,U1,T1. ❪G,L❫ ⊢ U1 ➡*[h,0] U0 → ❪G,L❫ ⊢ T1 ➡*[h,1] U0 → - ∀U2. ❪G,L❫ ⊢ U1 ![h,a] → ❪G,L❫ ⊢ U1 ➡[h,n] U2 → U1 ≛ U2 → - ∀T2. ❪G,L❫ ⊢ T1 ![h,a] → ❪G,L❫ ⊢ T1 ➡[h,n] T2 → T1 ≛ T2 → + ∀U2. ❪G,L❫ ⊢ U1 ![h,a] → ❪G,L❫ ⊢ U1 ➡[h,n] U2 → U1 ≅ U2 → + ∀T2. ❪G,L❫ ⊢ T1 ![h,a] → ❪G,L❫ ⊢ T1 ➡[h,n] T2 → T1 ≅ T2 → Q L U1 U2 → Q L T1 T2 → Q L (ⓝU1.T1) (ⓝU2.T2) ) → ∀L,T1. ❪G,L❫ ⊢ T1 ![h,a] → - ∀T2. ❪G,L❫ ⊢ T1 ➡[h,n] T2 → T1 ≛ T2 → Q L T1 T2. + ∀T2. ❪G,L❫ ⊢ T1 ➡[h,n] T2 → T1 ≅ T2 → Q L T1 T2. #h #a #n #G #Q #IH1 #IH2 #IH3 #IH4 #IH5 #L #T1 @(insert_eq_0 … G) #F @(fqup_wf_ind_eq (Ⓣ) … F L T1) -L -T1 -F @@ -171,7 +171,7 @@ qed-. lemma cpm_teqx_free (h) (a) (n) (G) (L): ∀T1. ❪G,L❫ ⊢ T1 ![h,a] → - ∀T2. ❪G,L❫ ⊢ T1 ➡[h,n] T2 → T1 ≛ T2 → + ∀T2. ❪G,L❫ ⊢ T1 ➡[h,n] T2 → T1 ≅ T2 → ∀F,K. ❪F,K❫ ⊢ T1 ➡[h,n] T2. #h #a #n #G #L #T1 #H0 #T2 #H1 #H2 @(cpm_teqx_ind … H0 … H1 H2) -L -T1 -T2 @@ -190,8 +190,8 @@ qed-. lemma cpm_teqx_inv_bind_sn_void (h) (a) (n) (p) (I) (G) (L): ∀V,T1. ❪G,L❫ ⊢ ⓑ[p,I]V.T1 ![h,a] → - ∀X. ❪G,L❫ ⊢ ⓑ[p,I]V.T1 ➡[h,n] X → ⓑ[p,I]V.T1 ≛ X → - ∃∃T2. ❪G,L❫ ⊢ V ![h,a] & ❪G,L.ⓑ[I]V❫ ⊢ T1 ![h,a] & ❪G,L.ⓧ❫ ⊢ T1 ➡[h,n] T2 & T1 ≛ T2 & X = ⓑ[p,I]V.T2. + ∀X. ❪G,L❫ ⊢ ⓑ[p,I]V.T1 ➡[h,n] X → ⓑ[p,I]V.T1 ≅ X → + ∃∃T2. ❪G,L❫ ⊢ V ![h,a] & ❪G,L.ⓑ[I]V❫ ⊢ T1 ![h,a] & ❪G,L.ⓧ❫ ⊢ T1 ➡[h,n] T2 & T1 ≅ T2 & X = ⓑ[p,I]V.T2. #h #a #n #p #I #G #L #V #T1 #H0 #X #H1 #H2 elim (cpm_teqx_inv_bind_sn … H0 … H1 H2) -H0 -H1 -H2 #T2 #HV #HT1 #H1T12 #H2T12 #H /3 width=5 by ex5_intro, cpm_teqx_free/ diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpm_teqx_conf.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpm_teqx_conf.ma index fbf829c61..aad1acf18 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpm_teqx_conf.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpm_teqx_conf.ma @@ -19,32 +19,32 @@ include "basic_2/dynamic/cnv_cpm_teqx.ma". definition IH_cnv_cpm_teqx_conf_lpr (h) (a): relation3 genv lenv term ≝ λG,L0,T0. ❪G,L0❫ ⊢ T0 ![h,a] → - ∀n1,T1. ❪G,L0❫ ⊢ T0 ➡[h,n1] T1 → T0 ≛ T1 → - ∀n2,T2. ❪G,L0❫ ⊢ T0 ➡[h,n2] T2 → T0 ≛ T2 → + ∀n1,T1. ❪G,L0❫ ⊢ T0 ➡[h,n1] T1 → T0 ≅ T1 → + ∀n2,T2. ❪G,L0❫ ⊢ T0 ➡[h,n2] T2 → T0 ≅ T2 → ∀L1. ❪G,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G,L0❫ ⊢ ➡[h,0] L2 → - ∃∃T. ❪G,L1❫ ⊢ T1 ➡[h,n2-n1] T & T1 ≛ T & ❪G,L2❫ ⊢ T2 ➡[h,n1-n2] T & T2 ≛ T. + ∃∃T. ❪G,L1❫ ⊢ T1 ➡[h,n2-n1] T & T1 ≅ T & ❪G,L2❫ ⊢ T2 ➡[h,n1-n2] T & T2 ≅ T. (* Diamond propery with restricted rt-transition for terms ******************) fact cnv_cpm_teqx_conf_lpr_atom_atom_aux (h) (G0) (L1) (L2) (I): - ∃∃T. ❪G0,L1❫ ⊢ ⓪[I] ➡[h,0] T & ⓪[I] ≛ T & ❪G0,L2❫ ⊢ ⓪[I] ➡[h,0] T & ⓪[I] ≛ T. + ∃∃T. ❪G0,L1❫ ⊢ ⓪[I] ➡[h,0] T & ⓪[I] ≅ T & ❪G0,L2❫ ⊢ ⓪[I] ➡[h,0] T & ⓪[I] ≅ T. #h #G0 #L1 #L2 #I /2 width=5 by ex4_intro/ qed-. fact cnv_cpm_teqx_conf_lpr_atom_ess_aux (h) (G0) (L1) (L2) (s): - ∃∃T. ❪G0,L1❫ ⊢ ⋆s ➡[h,1] T & ⋆s ≛ T & ❪G0,L2❫ ⊢ ⋆(⫯[h]s) ➡[h,0] T & ⋆(⫯[h]s) ≛ T. + ∃∃T. ❪G0,L1❫ ⊢ ⋆s ➡[h,1] T & ⋆s ≅ T & ❪G0,L2❫ ⊢ ⋆(⫯[h]s) ➡[h,0] T & ⋆(⫯[h]s) ≅ T. #h #G0 #L1 #L2 #s -/3 width=5 by teqx_sort, ex4_intro/ +/3 width=5 by teqg_sort, ex4_intro/ qed-. fact cnv_cpm_teqx_conf_lpr_bind_bind_aux (h) (a) (p) (I) (G0) (L0) (V0) (T0): (∀G,L,T. ❪G0,L0,ⓑ[p,I]V0.T0❫ ⬂+ ❪G,L,T❫ → IH_cnv_cpm_teqx_conf_lpr h a G L T) → ❪G0,L0❫ ⊢ ⓑ[p,I]V0.T0 ![h,a] → - ∀n1,T1. ❪G0,L0.ⓑ[I]V0❫ ⊢ T0 ➡[h,n1] T1 → T0 ≛ T1 → - ∀n2,T2. ❪G0,L0.ⓑ[I]V0❫ ⊢ T0 ➡[h,n2] T2 → T0 ≛ T2 → + ∀n1,T1. ❪G0,L0.ⓑ[I]V0❫ ⊢ T0 ➡[h,n1] T1 → T0 ≅ T1 → + ∀n2,T2. ❪G0,L0.ⓑ[I]V0❫ ⊢ T0 ➡[h,n2] T2 → T0 ≅ T2 → ∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 → - ∃∃T. ❪G0,L1❫ ⊢ ⓑ[p,I]V0.T1 ➡[h,n2-n1] T & ⓑ[p,I]V0.T1 ≛ T & ❪G0,L2❫ ⊢ ⓑ[p,I]V0.T2 ➡[h,n1-n2] T & ⓑ[p,I]V0.T2 ≛ T. + ∃∃T. ❪G0,L1❫ ⊢ ⓑ[p,I]V0.T1 ➡[h,n2-n1] T & ⓑ[p,I]V0.T1 ≅ T & ❪G0,L2❫ ⊢ ⓑ[p,I]V0.T2 ➡[h,n1-n2] T & ⓑ[p,I]V0.T2 ≅ T. #h #a #p #I #G0 #L0 #V0 #T0 #IH #H0 #n1 #T1 #H1T01 #H2T01 #n2 #T2 #H1T02 #H2T02 #L1 #HL01 #L2 #HL02 @@ -57,10 +57,10 @@ qed-. fact cnv_cpm_teqx_conf_lpr_appl_appl_aux (h) (a) (G0) (L0) (V0) (T0): (∀G,L,T. ❪G0,L0,ⓐV0.T0❫ ⬂+ ❪G,L,T❫ → IH_cnv_cpm_teqx_conf_lpr h a G L T) → ❪G0,L0❫ ⊢ ⓐV0.T0 ![h,a] → - ∀n1,T1. ❪G0,L0❫ ⊢ T0 ➡[h,n1] T1 → T0 ≛ T1 → - ∀n2,T2. ❪G0,L0❫ ⊢ T0 ➡[h,n2] T2 → T0 ≛ T2 → + ∀n1,T1. ❪G0,L0❫ ⊢ T0 ➡[h,n1] T1 → T0 ≅ T1 → + ∀n2,T2. ❪G0,L0❫ ⊢ T0 ➡[h,n2] T2 → T0 ≅ T2 → ∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 → - ∃∃T. ❪G0,L1❫ ⊢ ⓐV0.T1 ➡[h,n2-n1] T & ⓐV0.T1 ≛ T & ❪G0,L2❫ ⊢ ⓐV0.T2 ➡[h,n1-n2] T & ⓐV0.T2 ≛ T. + ∃∃T. ❪G0,L1❫ ⊢ ⓐV0.T1 ➡[h,n2-n1] T & ⓐV0.T1 ≅ T & ❪G0,L2❫ ⊢ ⓐV0.T2 ➡[h,n1-n2] T & ⓐV0.T2 ≅ T. #h #a #G0 #L0 #V0 #T0 #IH #H0 #n1 #T1 #H1T01 #H2T01 #n2 #T2 #H1T02 #H2T02 #L1 #HL01 #L2 #HL02 @@ -73,12 +73,12 @@ qed-. fact cnv_cpm_teqx_conf_lpr_cast_cast_aux (h) (a) (G0) (L0) (V0) (T0): (∀G,L,T. ❪G0,L0,ⓝV0.T0❫ ⬂+ ❪G,L,T❫ → IH_cnv_cpm_teqx_conf_lpr h a G L T) → ❪G0,L0❫ ⊢ ⓝV0.T0 ![h,a] → - ∀n1,V1. ❪G0,L0❫ ⊢ V0 ➡[h,n1] V1 → V0 ≛ V1 → - ∀n2,V2. ❪G0,L0❫ ⊢ V0 ➡[h,n2] V2 → V0 ≛ V2 → - ∀T1. ❪G0,L0❫ ⊢ T0 ➡[h,n1] T1 → T0 ≛ T1 → - ∀T2. ❪G0,L0❫ ⊢ T0 ➡[h,n2] T2 → T0 ≛ T2 → + ∀n1,V1. ❪G0,L0❫ ⊢ V0 ➡[h,n1] V1 → V0 ≅ V1 → + ∀n2,V2. ❪G0,L0❫ ⊢ V0 ➡[h,n2] V2 → V0 ≅ V2 → + ∀T1. ❪G0,L0❫ ⊢ T0 ➡[h,n1] T1 → T0 ≅ T1 → + ∀T2. ❪G0,L0❫ ⊢ T0 ➡[h,n2] T2 → T0 ≅ T2 → ∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 → - ∃∃T. ❪G0,L1❫ ⊢ ⓝV1.T1 ➡[h,n2-n1] T & ⓝV1.T1 ≛ T & ❪G0,L2❫ ⊢ ⓝV2.T2 ➡[h,n1-n2] T & ⓝV2.T2 ≛ T. + ∃∃T. ❪G0,L1❫ ⊢ ⓝV1.T1 ➡[h,n2-n1] T & ⓝV1.T1 ≅ T & ❪G0,L2❫ ⊢ ⓝV2.T2 ➡[h,n1-n2] T & ⓝV2.T2 ≅ T. #h #a #G0 #L0 #V0 #T0 #IH #H0 #n1 #V1 #H1V01 #H2V01 #n2 #V2 #H1V02 #H2V02 #T1 #H1T01 #H2T01 #T2 #H1T02 #H2T02 #L1 #HL01 #L2 #HL02 diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpm_teqx_trans.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpm_teqx_trans.ma index 8c50c3a7e..38bc3c411 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpm_teqx_trans.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpm_teqx_trans.ma @@ -19,9 +19,9 @@ include "basic_2/dynamic/cnv_cpm_teqx.ma". definition IH_cnv_cpm_teqx_cpm_trans (h) (a): relation3 genv lenv term ≝ λG,L,T1. ❪G,L❫ ⊢ T1 ![h,a] → - ∀n1,T. ❪G,L❫ ⊢ T1 ➡[h,n1] T → T1 ≛ T → + ∀n1,T. ❪G,L❫ ⊢ T1 ➡[h,n1] T → T1 ≅ T → ∀n2,T2. ❪G,L❫ ⊢ T ➡[h,n2] T2 → - ∃∃T0. ❪G,L❫ ⊢ T1 ➡[h,n2] T0 & ❪G,L❫ ⊢ T0 ➡[h,n1] T2 & T0 ≛ T2. + ∃∃T0. ❪G,L❫ ⊢ T1 ➡[h,n2] T0 & ❪G,L❫ ⊢ T0 ➡[h,n1] T2 & T0 ≅ T2. (* Transitive properties restricted rt-transition for terms *****************) @@ -35,7 +35,7 @@ fact cnv_cpm_teqx_cpm_trans_sub (h) (a) (G0) (L0) (T0): [ #H1 #H2 destruct /2 width=4 by ex3_intro/ | #s #H1 #H2 #H3 destruct elim (cpm_inv_sort1 … HX2) -HX2 #H #Hn2 destruct >iter_n_Sm - /3 width=4 by cpm_sort, teqx_sort, ex3_intro/ + /3 width=4 by cpm_sort, teqg_sort, ex3_intro/ ] | #p #I #V1 #T1 #HG #HL #HT #H0 #n1 #X1 #H1X #H2X #n2 #X2 #HX2 destruct elim (cpm_teqx_inv_bind_sn … H0 … H1X H2X) -H0 -H1X -H2X #T #_ #H0T1 #H1T1 #H2T1 #H destruct diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpms_conf.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpms_conf.ma index a818e6347..691ffde90 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpms_conf.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpms_conf.ma @@ -23,8 +23,8 @@ fact cnv_cpms_conf_lpr_teqx_teqx_aux (h) (a) (G0) (L0) (T0): (∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpm_trans_lpr h a G L T) → (∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpms_conf_lpr h a G L T) → ❪G0,L0❫ ⊢ T0 ![h,a] → - ∀n1,T1. ❪G0,L0❫ ⊢ T0 ➡*[h,n1] T1 → T0 ≛ T1 → - ∀n2,T2. ❪G0,L0❫ ⊢ T0 ➡*[h,n2] T2 → T0 ≛ T2 → + ∀n1,T1. ❪G0,L0❫ ⊢ T0 ➡*[h,n1] T1 → T0 ≅ T1 → + ∀n2,T2. ❪G0,L0❫ ⊢ T0 ➡*[h,n2] T2 → T0 ≅ T2 → ∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 → ∃∃T. ❪G0,L1❫ ⊢ T1 ➡*[h,n2-n1] T & ❪G0,L2❫ ⊢ T2 ➡*[h,n1-n2] T. #h #a #G #L0 #T0 #IH2 #IH1 #HT0 @@ -38,7 +38,7 @@ fact cnv_cpms_conf_lpr_refl_tneqx_sub (h) (a) (G0) (L0) (T0) (m21) (m22): (∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpm_trans_lpr h a G L T) → (∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpms_conf_lpr h a G L T) → ❪G0,L0❫ ⊢ T0 ![h,a] → - ∀X2. ❪G0,L0❫ ⊢ T0 ➡[h,m21] X2 → (T0 ≛ X2 → ⊥) → ∀T2. ❪G0,L0❫ ⊢ X2 ➡*[h,m22] T2 → + ∀X2. ❪G0,L0❫ ⊢ T0 ➡[h,m21] X2 → (T0 ≅ X2 → ⊥) → ∀T2. ❪G0,L0❫ ⊢ X2 ➡*[h,m22] T2 → ∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 → ∃∃T. ❪G0,L1❫ ⊢ T0 ➡*[h,m21+m22] T& ❪G0,L2❫ ⊢ T2 ➡*[h,0] T. #h #a #G0 #L0 #T0 #m21 #m22 #IH2 #IH1 #H0 @@ -60,13 +60,13 @@ fact cnv_cpms_conf_lpr_step_tneqx_sub (h) (a) (G0) (L0) (T0) (m11) (m12) (m21) ( (∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpm_trans_lpr h a G L T) → (∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpms_conf_lpr h a G L T) → ❪G0,L0❫ ⊢ T0 ![h,a] → - ∀X1. ❪G0,L0❫ ⊢ T0 ➡[h,m11] X1 → T0 ≛ X1 → ∀T1. ❪G0,L0❫ ⊢ X1 ➡*[h,m12] T1 → X1 ≛ T1 → - ∀X2. ❪G0,L0❫ ⊢ T0 ➡[h,m21] X2 → (T0 ≛ X2 → ⊥) → ∀T2. ❪G0,L0❫ ⊢ X2 ➡*[h,m22] T2 → + ∀X1. ❪G0,L0❫ ⊢ T0 ➡[h,m11] X1 → T0 ≅ X1 → ∀T1. ❪G0,L0❫ ⊢ X1 ➡*[h,m12] T1 → X1 ≅ T1 → + ∀X2. ❪G0,L0❫ ⊢ T0 ➡[h,m21] X2 → (T0 ≅ X2 → ⊥) → ∀T2. ❪G0,L0❫ ⊢ X2 ➡*[h,m22] T2 → ∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 → ((∀G,L,T. ❪G0,L0,X1❫ > ❪G,L,T❫ → IH_cnv_cpm_trans_lpr h a G L T) → (∀G,L,T. ❪G0,L0,X1❫ > ❪G,L,T❫ → IH_cnv_cpms_conf_lpr h a G L T) → ∀m21,m22. - ∀X2. ❪G0,L0❫ ⊢ X1 ➡[h,m21] X2 → (X1 ≛ X2 → ⊥) → + ∀X2. ❪G0,L0❫ ⊢ X1 ➡[h,m21] X2 → (X1 ≅ X2 → ⊥) → ∀T2. ❪G0,L0❫ ⊢ X2 ➡*[h,m22] T2 → ∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 → ∃∃T. ❪G0,L1❫ ⊢ T1 ➡*[h,m21+m22-m12] T & ❪G0,L2❫ ⊢ T2 ➡*[h,m12-(m21+m22)]T @@ -102,8 +102,8 @@ fact cnv_cpms_conf_lpr_teqx_tneqx_aux (h) (a) (G0) (L0) (T0) (n1) (m21) (m22): (∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpm_trans_lpr h a G L T) → (∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpms_conf_lpr h a G L T) → ❪G0,L0❫ ⊢ T0 ![h,a] → - ∀T1. ❪G0,L0❫ ⊢ T0 ➡*[h,n1] T1 → T0 ≛ T1 → - ∀X2. ❪G0,L0❫ ⊢ T0 ➡[h,m21] X2 → (T0 ≛ X2 → ⊥) → ∀T2. ❪G0,L0❫ ⊢ X2 ➡*[h,m22] T2 → + ∀T1. ❪G0,L0❫ ⊢ T0 ➡*[h,n1] T1 → T0 ≅ T1 → + ∀X2. ❪G0,L0❫ ⊢ T0 ➡[h,m21] X2 → (T0 ≅ X2 → ⊥) → ∀T2. ❪G0,L0❫ ⊢ X2 ➡*[h,m22] T2 → ∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 → ∃∃T. ❪G0,L1❫ ⊢ T1 ➡*[h,m21+m22-n1] T & ❪G0,L2❫ ⊢ T2 ➡*[h,n1-(m21+m22)] T. #h #a #G0 #L0 #T0 #n1 #m21 #m22 #IH2 #IH1 #HT0 @@ -125,8 +125,8 @@ fact cnv_cpms_conf_lpr_tneqx_tneqx_aux (h) (a) (G0) (L0) (T0) (m11) (m12) (m21) (∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpm_trans_lpr h a G L T) → (∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpms_conf_lpr h a G L T) → ❪G0,L0❫ ⊢ T0 ![h,a] → - ∀X1. ❪G0,L0❫ ⊢ T0 ➡[h,m11] X1 → (T0 ≛ X1 → ⊥) → ∀T1. ❪G0,L0❫ ⊢ X1 ➡*[h,m12] T1 → - ∀X2. ❪G0,L0❫ ⊢ T0 ➡[h,m21] X2 → (T0 ≛ X2 → ⊥) → ∀T2. ❪G0,L0❫ ⊢ X2 ➡*[h,m22] T2 → + ∀X1. ❪G0,L0❫ ⊢ T0 ➡[h,m11] X1 → (T0 ≅ X1 → ⊥) → ∀T1. ❪G0,L0❫ ⊢ X1 ➡*[h,m12] T1 → + ∀X2. ❪G0,L0❫ ⊢ T0 ➡[h,m21] X2 → (T0 ≅ X2 → ⊥) → ∀T2. ❪G0,L0❫ ⊢ X2 ➡*[h,m22] T2 → ∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 → ∃∃T. ❪G0,L1❫ ⊢ T1 ➡*[h,m21+m22-(m11+m12)] T & ❪G0,L2❫ ⊢ T2 ➡*[h,m11+m12-(m21+m22)] T. #h #a #G0 #L0 #T0 #m11 #m12 #m21 #m22 #IH2 #IH1 #H0 diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpms_teqx.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpms_teqx.ma index 967e63de5..5b520ee99 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpms_teqx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpms_teqx.ma @@ -19,10 +19,10 @@ include "basic_2/dynamic/cnv_cpm_teqx_trans.ma". (* Properties with restricted rt-computation for terms **********************) fact cpms_tneqx_fwd_step_sn_aux (h) (a) (n) (G) (L) (T1): - ∀T2. ❪G,L❫ ⊢ T1 ➡*[h,n] T2 → ❪G,L❫ ⊢ T1 ![h,a] → (T1 ≛ T2 → ⊥) → + ∀T2. ❪G,L❫ ⊢ T1 ➡*[h,n] T2 → ❪G,L❫ ⊢ T1 ![h,a] → (T1 ≅ T2 → ⊥) → (∀G0,L0,T0. ❪G,L,T1❫ > ❪G0,L0,T0❫ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) → (∀G0,L0,T0. ❪G,L,T1❫ > ❪G0,L0,T0❫ → IH_cnv_cpm_trans_lpr h a G0 L0 T0) → - ∃∃n1,n2,T0. ❪G,L❫ ⊢ T1 ➡[h,n1] T0 & T1 ≛ T0 → ⊥ & ❪G,L❫ ⊢ T0 ➡*[h,n2] T2 & n1+n2 = n. + ∃∃n1,n2,T0. ❪G,L❫ ⊢ T1 ➡[h,n1] T0 & T1 ≅ T0 → ⊥ & ❪G,L❫ ⊢ T0 ➡*[h,n2] T2 & n1+n2 = n. #h #a #n #G #L #T1 #T2 #H @(cpms_ind_sn … H) -n -T1 [ #_ #H2T2 elim H2T2 -H2T2 // @@ -44,8 +44,8 @@ qed-. fact cpms_teqx_ind_sn (h) (a) (G) (L) (T2) (Q:relation2 …): (❪G,L❫ ⊢ T2 ![h,a] → Q 0 T2) → - (∀n1,n2,T1,T. ❪G,L❫ ⊢ T1 ➡[h,n1] T → ❪G,L❫ ⊢ T1 ![h,a] → T1 ≛ T → ❪G,L❫ ⊢ T ➡*[h,n2] T2 → ❪G,L❫ ⊢ T ![h,a] → T ≛ T2 → Q n2 T → Q (n1+n2) T1) → - ∀n,T1. ❪G,L❫ ⊢ T1 ➡*[h,n] T2 → ❪G,L❫ ⊢ T1 ![h,a] → T1 ≛ T2 → + (∀n1,n2,T1,T. ❪G,L❫ ⊢ T1 ➡[h,n1] T → ❪G,L❫ ⊢ T1 ![h,a] → T1 ≅ T → ❪G,L❫ ⊢ T ➡*[h,n2] T2 → ❪G,L❫ ⊢ T ![h,a] → T ≅ T2 → Q n2 T → Q (n1+n2) T1) → + ∀n,T1. ❪G,L❫ ⊢ T1 ➡*[h,n] T2 → ❪G,L❫ ⊢ T1 ![h,a] → T1 ≅ T2 → (∀G0,L0,T0. ❪G,L,T1❫ > ❪G0,L0,T0❫ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) → (∀G0,L0,T0. ❪G,L,T1❫ > ❪G0,L0,T0❫ → IH_cnv_cpm_trans_lpr h a G0 L0 T0) → Q n T1. diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpms_teqx_conf.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpms_teqx_conf.ma index 24a56092c..5fa5e07d4 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpms_teqx_conf.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpms_teqx_conf.ma @@ -22,10 +22,10 @@ include "basic_2/dynamic/cnv_cpms_teqx.ma". fact cnv_cpms_teqx_strip_lpr_aux (h) (a) (G0) (L0) (T0): (∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpm_trans_lpr h a G L T) → (∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpms_conf_lpr h a G L T) → - ∀n1,T1. ❪G0,L0❫ ⊢ T0 ➡*[h,n1] T1 → ❪G0,L0❫ ⊢ T0 ![h,a] → T0 ≛ T1 → - ∀n2,T2. ❪G0,L0❫ ⊢ T0 ➡[h,n2] T2 → T0 ≛ T2 → + ∀n1,T1. ❪G0,L0❫ ⊢ T0 ➡*[h,n1] T1 → ❪G0,L0❫ ⊢ T0 ![h,a] → T0 ≅ T1 → + ∀n2,T2. ❪G0,L0❫ ⊢ T0 ➡[h,n2] T2 → T0 ≅ T2 → ∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 → - ∃∃T. ❪G0,L1❫ ⊢ T1 ➡[h,n2-n1] T & T1 ≛ T & ❪G0,L2❫ ⊢ T2 ➡*[h,n1-n2] T & T2 ≛ T. + ∃∃T. ❪G0,L1❫ ⊢ T1 ➡[h,n2-n1] T & T1 ≅ T & ❪G0,L2❫ ⊢ T2 ➡*[h,n1-n2] T & T2 ≅ T. #h #a #G #L0 #T0 #IH2 #IH1 #n1 #T1 #H1T01 #H0T0 #H2T01 @(cpms_teqx_ind_sn … H1T01 H0T0 H2T01 IH1 IH2) -n1 -T0 [ #H0T1 #n2 #T2 #H1T12 #H2T12 #L1 #HL01 #L2 #HL02 @@ -47,10 +47,10 @@ qed-. fact cnv_cpms_teqx_conf_lpr_aux (h) (a) (G0) (L0) (T0): (∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpm_trans_lpr h a G L T) → (∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpms_conf_lpr h a G L T) → - ∀n1,T1. ❪G0,L0❫ ⊢ T0 ➡*[h,n1] T1 → ❪G0,L0❫ ⊢ T0 ![h,a] → T0 ≛ T1 → - ∀n2,T2. ❪G0,L0❫ ⊢ T0 ➡*[h,n2] T2 → T0 ≛ T2 → + ∀n1,T1. ❪G0,L0❫ ⊢ T0 ➡*[h,n1] T1 → ❪G0,L0❫ ⊢ T0 ![h,a] → T0 ≅ T1 → + ∀n2,T2. ❪G0,L0❫ ⊢ T0 ➡*[h,n2] T2 → T0 ≅ T2 → ∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 → - ∃∃T. ❪G0,L1❫ ⊢ T1 ➡*[h,n2-n1] T & T1 ≛ T & ❪G0,L2❫ ⊢ T2 ➡*[h,n1-n2] T & T2 ≛ T. + ∃∃T. ❪G0,L1❫ ⊢ T1 ➡*[h,n2-n1] T & T1 ≅ T & ❪G0,L2❫ ⊢ T2 ➡*[h,n1-n2] T & T2 ≅ T. #h #a #G #L0 #T0 #IH2 #IH1 #n1 #T1 #H1T01 #H0T0 #H2T01 generalize in match IH1; generalize in match IH2; @(cpms_teqx_ind_sn … H1T01 H0T0 H2T01 IH1 IH2) -n1 -T0 diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpmuwe.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpmuwe.ma index 99eb4d4be..0a8ef08ce 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpmuwe.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpmuwe.ma @@ -35,8 +35,8 @@ theorem cnv_cpmuwe_mono (h) (a) (G) (L): ∀T0. ❪G,L❫ ⊢ T0 ![h,a] → ∀n1,T1. ❪G,L❫ ⊢ T0 ➡*𝐍𝐖*[h,n1] T1 → ∀n2,T2. ❪G,L❫ ⊢ T0 ➡*𝐍𝐖*[h,n2] T2 → - ∧∧ ❪G,L❫ ⊢ T1 ⬌*[h,n2-n1,n1-n2] T2 & T1 ≅ T2. + ∧∧ ❪G,L❫ ⊢ T1 ⬌*[h,n2-n1,n1-n2] T2 & T1 ≃ T2. #h #a #G #L #T0 #HT0 #n1 #T1 * #HT01 #HT1 #n2 #T2 * #HT02 #HT2 elim (cnv_cpms_conf … HT0 … HT01 … HT02) -T0 #T0 #HT10 #HT20 -/4 width=4 by cpms_div, tweq_canc_dx, conj/ +/4 width=4 by cpms_div, teqw_canc_dx, conj/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_eval.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_eval.ma index 44bd544d7..3126454a8 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_eval.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_eval.ma @@ -79,7 +79,7 @@ theorem cnv_dec (h) (a) (G) (L) (T): ac_props a → elim (cnv_inv_appl_cpes … H) -H #m0 #q #W0 #U0 #_ #_ #_ #_ #HTU0 lapply (cpmuwe_abst … HTU0) -HTU0 #HTU0 elim (cnv_cpmuwe_mono … HT … HTU0 … HX0) -T #_ #H - elim (tweq_inv_abst_sn … H) -W0 -U0 #W0 #U0 #H destruct + elim (teqw_inv_abst_sn … H) -W0 -U0 #W0 #U0 #H destruct /2 width=4 by/ ] (* Note: failed applicability *) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_reqx.ma b/matita/matita/contribs/lambdadelta/basic_2/etc/teqx/cpms_reqx.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_reqx.ma rename to matita/matita/contribs/lambdadelta/basic_2/etc/teqx/cpms_reqx.etc diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpr_teqx.ma b/matita/matita/contribs/lambdadelta/basic_2/etc/teqx/cpr_teqx.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpr_teqx.ma rename to matita/matita/contribs/lambdadelta/basic_2/etc/teqx/cpr_teqx.etc diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_feqx.ma b/matita/matita/contribs/lambdadelta/basic_2/etc/teqx/cpx_feqx.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_feqx.ma rename to matita/matita/contribs/lambdadelta/basic_2/etc/teqx/cpx_feqx.etc diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_req.ma b/matita/matita/contribs/lambdadelta/basic_2/etc/teqx/cpx_req.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_req.ma rename to matita/matita/contribs/lambdadelta/basic_2/etc/teqx/cpx_req.etc diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_reqx.ma b/matita/matita/contribs/lambdadelta/basic_2/etc/teqx/cpx_reqx.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_reqx.ma rename to matita/matita/contribs/lambdadelta/basic_2/etc/teqx/cpx_reqx.etc diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_feqx.ma b/matita/matita/contribs/lambdadelta/basic_2/etc/teqx/cpxs_feqx.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_feqx.ma rename to matita/matita/contribs/lambdadelta/basic_2/etc/teqx/cpxs_feqx.etc diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_reqx.ma b/matita/matita/contribs/lambdadelta/basic_2/etc/teqx/cpxs_reqx.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_reqx.ma rename to matita/matita/contribs/lambdadelta/basic_2/etc/teqx/cpxs_reqx.etc diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_teqx.ma b/matita/matita/contribs/lambdadelta/basic_2/etc/teqx/cpxs_teqx.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_teqx.ma rename to matita/matita/contribs/lambdadelta/basic_2/etc/teqx/cpxs_teqx.etc diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_feqx.ma b/matita/matita/contribs/lambdadelta/basic_2/etc/teqx/csx_feqx.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_feqx.ma rename to matita/matita/contribs/lambdadelta/basic_2/etc/teqx/csx_feqx.etc diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_reqx.ma b/matita/matita/contribs/lambdadelta/basic_2/etc/teqx/csx_reqx.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_reqx.ma rename to matita/matita/contribs/lambdadelta/basic_2/etc/teqx/csx_reqx.etc diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_feqx.ma b/matita/matita/contribs/lambdadelta/basic_2/etc/teqx/fpb_feqx.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_feqx.ma rename to matita/matita/contribs/lambdadelta/basic_2/etc/teqx/fpb_feqx.etc diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_reqx.ma b/matita/matita/contribs/lambdadelta/basic_2/etc/teqx/fpb_reqx.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_reqx.ma rename to matita/matita/contribs/lambdadelta/basic_2/etc/teqx/fpb_reqx.etc diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fsb_feqx.ma b/matita/matita/contribs/lambdadelta/basic_2/etc/teqx/fsb_feqx.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/rt_computation/fsb_feqx.ma rename to matita/matita/contribs/lambdadelta/basic_2/etc/teqx/fsb_feqx.etc diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_reqx.ma b/matita/matita/contribs/lambdadelta/basic_2/etc/teqx/lpx_reqx.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_reqx.ma rename to matita/matita/contribs/lambdadelta/basic_2/etc/teqx/lpx_reqx.etc diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_feqx.ma b/matita/matita/contribs/lambdadelta/basic_2/etc/teqx/lpxs_feqx.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_feqx.ma rename to matita/matita/contribs/lambdadelta/basic_2/etc/teqx/lpxs_feqx.etc diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_reqx.ma b/matita/matita/contribs/lambdadelta/basic_2/etc/teqx/lpxs_reqx.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_reqx.ma rename to matita/matita/contribs/lambdadelta/basic_2/etc/teqx/lpxs_reqx.etc diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw.ma index b47d310e8..99bff3670 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw.ma @@ -13,13 +13,13 @@ (**************************************************************************) include "basic_2/notation/relations/preditnormal_4.ma". -include "static_2/syntax/tweq.ma". +include "static_2/syntax/teqw.ma". include "basic_2/rt_computation/cpms.ma". (* NORMAL TERMS FOR T-UNUNBOUND WHD RT-TRANSITION ***************************) definition cnuw (h) (G) (L): predicate term ≝ - λT1. ∀n,T2. ❪G,L❫ ⊢ T1 ➡*[h,n] T2 → T1 ≅ T2. + λT1. ∀n,T2. ❪G,L❫ ⊢ T1 ➡*[h,n] T2 → T1 ≃ T2. interpretation "normality for t-unbound weak head context-sensitive parallel rt-transition (term)" @@ -55,7 +55,7 @@ elim (lifts_total V (𝐔❨1❩)) #W #HVW [ lapply (H 0 W ?) [ /3 width=3 by cpm_cpms, cpm_delta/ ] | lapply (H 1 W ?) [ /3 width=3 by cpm_cpms, cpm_ell/ ] ] -H #HW -lapply (tweq_inv_lref_sn … HW) -HW #H destruct +lapply (teqw_inv_lref_sn … HW) -HW #H destruct /2 width=5 by lifts_inv_lref2_uni_lt/ qed-. @@ -63,7 +63,7 @@ lemma cnuw_inv_cast (h) (G) (L): ∀V,T. ❪G,L❫ ⊢ ➡𝐍𝐖*[h] ⓝV.T → ⊥. #h #G #L #V #T #H lapply (H 0 T ?) [ /3 width=1 by cpm_cpms, cpm_eps/ ] -H #H -/2 width=3 by tweq_inv_cast_xy_y/ +/2 width=3 by teqw_inv_cast_xy_y/ qed-. (* Basic forward lemmas *****************************************************) @@ -72,5 +72,5 @@ lemma cnuw_fwd_appl (h) (G) (L): ∀V,T. ❪G,L❫ ⊢ ➡𝐍𝐖*[h] ⓐV.T → ❪G,L❫ ⊢ ➡𝐍𝐖*[h] T. #h #G #L #V #T1 #HT1 #n #T2 #HT12 lapply (HT1 n (ⓐV.T2) ?) -HT1 -/2 width=3 by cpms_appl_dx, tweq_inv_appl_bi/ +/2 width=3 by cpms_appl_dx, teqw_inv_appl_bi/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw_cnuw.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw_cnuw.ma index 1cc52dc0e..9c7439bbc 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw_cnuw.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw_cnuw.ma @@ -14,7 +14,7 @@ include "basic_2/rt_computation/cnuw_simple.ma". include "basic_2/rt_computation/cnuw_drops.ma". -include "basic_2/rt_computation/cprs_tweq.ma". +include "basic_2/rt_computation/cprs_teqw.ma". include "basic_2/rt_computation/lprs_cpms.ma". (* NORMAL TERMS FOR T-UNUNBOUND WHD RT-TRANSITION ***************************) @@ -24,7 +24,7 @@ include "basic_2/rt_computation/lprs_cpms.ma". lemma cnuw_inv_abbr_pos (h) (G) (L): ∀V,T. ❪G,L❫ ⊢ ➡𝐍𝐖*[h] +ⓓV.T → ⊥. #h #G #L #V #T1 #H -elim (cprs_abbr_pos_twneq h G L V T1) #T2 #HT12 #HnT12 +elim (cprs_abbr_pos_tneqw h G L V T1) #T2 #HT12 #HnT12 /3 width=2 by/ qed-. @@ -33,7 +33,7 @@ qed-. lemma cnuw_abbr_neg (h) (G) (L): ∀V,T. ❪G,L❫ ⊢ ➡𝐍𝐖*[h] -ⓓV.T. #h #G #L #V1 #T1 #n #X #H elim (cpms_inv_abbr_sn_dx … H) -H * -[ #V2 #T2 #_ #_ #H destruct /1 width=1 by tweq_abbr_neg/ +[ #V2 #T2 #_ #_ #H destruct /1 width=1 by teqw_abbr_neg/ | #X1 #_ #_ #H destruct ] qed. @@ -41,19 +41,19 @@ qed. lemma cnuw_abst (h) (p) (G) (L): ∀W,T. ❪G,L❫ ⊢ ➡𝐍𝐖*[h] ⓛ[p]W.T. #h #p #G #L #W1 #T1 #n #X #H elim (cpms_inv_abst_sn … H) -H #W2 #T2 #_ #_ #H destruct -/1 width=1 by tweq_abst/ +/1 width=1 by teqw_abst/ qed. lemma cnuw_cpms_trans (h) (n) (G) (L): ∀T1. ❪G,L❫ ⊢ ➡𝐍𝐖*[h] T1 → ∀T2. ❪G,L❫ ⊢ T1 ➡*[h,n] T2 → ❪G,L❫ ⊢ ➡𝐍𝐖*[h] T2. #h #n1 #G #L #T1 #HT1 #T2 #HT12 #n2 #T3 #HT23 -/4 width=5 by cpms_trans, tweq_canc_sn/ +/4 width=5 by cpms_trans, teqw_canc_sn/ qed-. lemma cnuw_dec_ex (h) (G) (L): ∀T1. ∨∨ ❪G,L❫ ⊢ ➡𝐍𝐖*[h] T1 - | ∃∃n,T2. ❪G,L❫ ⊢ T1 ➡*[h,n] T2 & (T1 ≅ T2 → ⊥). + | ∃∃n,T2. ❪G,L❫ ⊢ T1 ➡*[h,n] T2 & (T1 ≃ T2 → ⊥). #h #G #L #T1 elim T1 -T1 * [ #s /3 width=5 by cnuw_sort, or_introl/ | #i elim (drops_F_uni L i) @@ -62,17 +62,17 @@ lemma cnuw_dec_ex (h) (G) (L): [ /3 width=8 by cnuw_unit_drops, or_introl/ | elim (lifts_total V 𝐔❨↑i❩) #W #HVW @or_intror @(ex2_2_intro … W) [1,2: /2 width=7 by cpms_delta_drops/ ] #H - lapply (tweq_inv_lref_sn … H) -H #H destruct + lapply (teqw_inv_lref_sn … H) -H #H destruct /2 width=5 by lifts_inv_lref2_uni_lt/ | elim (lifts_total V 𝐔❨↑i❩) #W #HVW @or_intror @(ex2_2_intro … W) [1,2: /2 width=7 by cpms_ell_drops/ ] #H - lapply (tweq_inv_lref_sn … H) -H #H destruct + lapply (teqw_inv_lref_sn … H) -H #H destruct /2 width=5 by lifts_inv_lref2_uni_lt/ ] ] | #l /3 width=5 by cnuw_gref, or_introl/ | #p * [ cases p ] #V1 #T1 #_ #_ - [ elim (cprs_abbr_pos_twneq h G L V1 T1) #T2 #HT12 #HnT12 + [ elim (cprs_abbr_pos_tneqw h G L V1 T1) #T2 #HT12 #HnT12 /4 width=4 by ex2_2_intro, or_intror/ | /3 width=5 by cnuw_abbr_neg, or_introl/ | /3 width=5 by cnuw_abst, or_introl/ @@ -83,16 +83,16 @@ lemma cnuw_dec_ex (h) (G) (L): [ /3 width=6 by cnuw_appl_simple, or_introl/ | * #n #T2 #HT12 #HnT12 -HT1 @or_intror @(ex2_2_intro … n (ⓐV1.T2)) [ /2 width=1 by cpms_appl_dx/ ] #H - lapply (tweq_inv_appl_bi … H) -H /2 width=1 by/ + lapply (teqw_inv_appl_bi … H) -H /2 width=1 by/ ] | elim (lifts_total V1 𝐔❨1❩) #X1 #HVX1 @or_intror @(ex2_2_intro … (ⓓ[p]W1.ⓐX1.U1)) [1,2: /2 width=3 by cpms_theta/ ] #H - elim (tweq_inv_appl_sn … H) -H #X1 #X2 #_ #H destruct + elim (teqw_inv_appl_sn … H) -H #X1 #X2 #_ #H destruct | @or_intror @(ex2_2_intro … (ⓓ[p]ⓝW1.V1.U1)) [1,2: /2 width=2 by cpms_beta/ ] #H - elim (tweq_inv_appl_sn … H) -H #X1 #X2 #_ #H destruct + elim (teqw_inv_appl_sn … H) -H #X1 #X2 #_ #H destruct ] | @or_intror @(ex2_2_intro … T1) [1,2: /2 width=2 by cpms_eps/ ] #H - /2 width=4 by tweq_inv_cast_xy_y/ + /2 width=4 by teqw_inv_cast_xy_y/ ] ] qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw_drops.ma index 083737e6f..beac0dcc6 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw_drops.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw_drops.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "static_2/relocation/lifts_tweq.ma". +include "static_2/relocation/lifts_teqw.ma". include "basic_2/rt_computation/cpms_drops.ma". include "basic_2/rt_computation/cnuw.ma". @@ -23,7 +23,7 @@ include "basic_2/rt_computation/cnuw.ma". lemma cnuw_lifts (h) (G): d_liftable1 … (cnuw h G). #h #G #K #T #HT #b #f #L #HLK #U #HTU #n #U0 #H elim (cpms_inv_lifts_sn … H … HLK … HTU) -b -L #T0 #HTU0 #HT0 -lapply (HT … HT0) -G -K /2 width=6 by tweq_lifts_bi/ +lapply (HT … HT0) -G -K /2 width=6 by teqw_lifts_bi/ qed-. (* Inversion lemmas with generic relocation *********************************) @@ -31,7 +31,7 @@ qed-. lemma cnuw_inv_lifts (h) (G): d_deliftable1 … (cnuw h G). #h #G #L #U #HU #b #f #K #HLK #T #HTU #n #T0 #H elim (cpms_lifts_sn … H … HLK … HTU) -b -K #U0 #HTU0 #HU0 -lapply (HU … HU0) -G -L /2 width=6 by tweq_inv_lifts_bi/ +lapply (HU … HU0) -G -L /2 width=6 by teqw_inv_lifts_bi/ qed-. (* Advanced properties ******************************************************) @@ -43,7 +43,7 @@ elim (cpms_inv_lref_sn … H) -H * [ #H #_ destruct // | #T2 #HT2 #HTX2 lapply (Hi … HT2) -Hi -HT2 #H - lapply (tweq_inv_lref_sn … H) -H #H destruct + lapply (teqw_inv_lref_sn … H) -H #H destruct lapply (lifts_inv_lref1_uni … HTX2) -HTX2 #H destruct // ] qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw_simple.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw_simple.ma index 8e5f5527a..9c40e390b 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw_simple.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw_simple.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "static_2/syntax/tweq_simple.ma". +include "static_2/syntax/teqw_simple.ma". include "basic_2/rt_computation/cpms_cpms.ma". include "basic_2/rt_computation/cnuw.ma". @@ -25,14 +25,14 @@ lemma cnuw_appl_simple (h) (G) (L): #h #G #L #V1 #T1 #H1T1 #H2T1 #n #X #H elim (cpms_inv_appl_sn … H) -H * [ #V2 #T2 #_ #HT12 #H destruct -H1T1 - /3 width=2 by tweq_appl/ + /3 width=2 by teqw_appl/ | #n1 #n2 #p #V2 #T2 #HT12 #_ #_ -n -n2 lapply (H2T1 … HT12) -H2T1 -n1 #H - lapply (tweq_simple_trans … H H1T1) -H -H1T1 #H + lapply (teqw_simple_trans … H H1T1) -H -H1T1 #H elim (simple_inv_bind … H) | #n1 #n2 #p #V2 #W2 #W #T2 #_ #_ #HT12 #_ #_ -n -n2 -V2 -W2 lapply (H2T1 … HT12) -H2T1 -n1 #H - lapply (tweq_simple_trans … H H1T1) -H -H1T1 #H + lapply (teqw_simple_trans … H H1T1) -H -H1T1 #H elim (simple_inv_bind … H) ] qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_fpbg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_fpbg.ma index 09a2e9ceb..1dc14f5db 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_fpbg.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_fpbg.ma @@ -22,7 +22,7 @@ include "basic_2/rt_computation/cpms_fpbs.ma". lemma cpms_tneqx_fwd_fpbg (h) (n): ∀G,L,T1,T2. ❪G,L❫ ⊢ T1 ➡*[h,n] T2 → - (T1 ≛ T2 → ⊥) → ❪G,L,T1❫ > ❪G,L,T2❫. + (T1 ≅ T2 → ⊥) → ❪G,L,T1❫ > ❪G,L,T2❫. /3 width=3 by cpms_fwd_cpxs, cpxs_tneqx_fpbg/ qed-. lemma fpbg_cpms_trans (h) (n): @@ -41,8 +41,8 @@ lemma fqup_cpms_fwd_fpbg (h): /3 width=5 by cpms_fwd_fpbs, fqup_fpbg, fpbg_fpbs_trans/ qed-. lemma cpm_tneqx_cpm_cpms_teqx_sym_fwd_fpbg (h) (G) (L) (T1): - ∀n1,T. ❪G,L❫ ⊢ T1 ➡[h,n1] T → (T1 ≛ T → ⊥) → - ∀n2,T2. ❪G,L❫⊢ T ➡*[h,n2] T2 → T1 ≛ T2 → ❪G,L,T1❫ > ❪G,L,T1❫. + ∀n1,T. ❪G,L❫ ⊢ T1 ➡[h,n1] T → (T1 ≅ T → ⊥) → + ∀n2,T2. ❪G,L❫⊢ T ➡*[h,n2] T2 → T1 ≅ T2 → ❪G,L,T1❫ > ❪G,L,T1❫. #h #G #L #T1 #n1 #T #H1T1 #H2T1 #n2 #T2 #H1T2 #H2T12 /4 width=7 by cpms_fwd_fpbs, cpm_fpb, fpbs_teqx_trans, teqx_sym, ex2_3_intro/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_reqg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_reqg.ma new file mode 100644 index 000000000..f837a4eb5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_reqg.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_2/rt_computation/cpxs_reqg.ma". +include "basic_2/rt_computation/cpms_cpxs.ma". + +(* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************) + +(* Properties with generic equivalence for local environments ***************) + +lemma cpms_reqg_conf_sn (S) (h) (n) (G) (L1) (L2): + ∀T1,T2. ❪G,L1❫ ⊢ T1 ➡*[h,n] T2 → + L1 ≛[S,T1] L2 → L1 ≛[S,T2] L2. +/3 width=5 by cpms_fwd_cpxs, cpxs_reqg_conf_sn/ qed-. + +lemma cpms_reqg_conf_dx (S) (h) (n) (G) (L1) (L2): + reflexive … S → symmetric … S → + ∀T1,T2. ❪G,L2❫ ⊢ T1 ➡*[h,n] T2 → + L1 ≛[S,T1] L2 → L1 ≛[S,T2] L2. +/3 width=5 by cpms_fwd_cpxs, cpxs_reqg_conf_dx/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpmuwe_csx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpmuwe_csx.ma index b38e8ca8d..248b4b229 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpmuwe_csx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpmuwe_csx.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "static_2/syntax/tweq_teqx.ma". +include "static_2/syntax/teqw_teqg.ma". include "basic_2/rt_computation/csx_cpxs.ma". include "basic_2/rt_computation/cpms_cpxs.ma". include "basic_2/rt_computation/cnuw_cnuw.ma". @@ -31,7 +31,7 @@ elim (cnuw_dec_ex h G L T1) | * #n1 #T0 #HT10 #HnT10 elim (IHT1 … T0) -IHT1 [ #T2 #n2 * #HT02 #HT2 /4 width=5 by cpms_trans, cpmuwe_intro, ex1_2_intro/ - | /3 width=1 by teqx_tweq/ + | /3 width=2 by teqg_teqw/ | /2 width=3 by cpms_fwd_cpxs/ ] ] diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs_tweq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs_teqw.ma similarity index 82% rename from matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs_tweq.ma rename to matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs_teqw.ma index 4ea686119..2f74de0c9 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs_tweq.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs_teqw.ma @@ -12,8 +12,8 @@ (* *) (**************************************************************************) -include "static_2/syntax/tweq_tweq.ma". -include "static_2/relocation/lifts_tweq.ma". +include "static_2/syntax/teqw_teqw.ma". +include "static_2/relocation/lifts_teqw.ma". include "basic_2/rt_transition/cpr_drops_basic.ma". include "basic_2/rt_computation/cpms.ma". @@ -21,15 +21,15 @@ include "basic_2/rt_computation/cpms.ma". (* Properties with sort-irrelevant whd equivalence on terms *****************) -lemma cprs_abbr_pos_twneq (h) (G) (L) (V) (T1): - ∃∃T2. ❪G,L❫ ⊢ +ⓓV.T1 ➡*[h,0] T2 & (+ⓓV.T1 ≅ T2 → ⊥). +lemma cprs_abbr_pos_tneqw (h) (G) (L) (V) (T1): + ∃∃T2. ❪G,L❫ ⊢ +ⓓV.T1 ➡*[h,0] T2 & (+ⓓV.T1 ≃ T2 → ⊥). #h #G #L #V #U1 elim (cpr_subst h G (L.ⓓV) U1 … 0) [|*: /2 width=4 by drops_refl/ ] #U2 #T2 #HU12 #HTU2 -elim (tweq_dec U1 U2) [ #HpU12 | -HTU2 #HnU12 ] +elim (teqw_dec U1 U2) [ #HpU12 | -HTU2 #HnU12 ] [ @(ex2_intro … T2) (**) (* full auto not tried *) [ /3 width=6 by cpms_zeta, cpms_step_sn, cpm_bind/ - | /4 width=6 by tweq_inv_abbr_pos_x_lifts_y_y, tweq_canc_sn, tweq_abbr_pos/ + | /4 width=6 by teqw_inv_abbr_pos_x_lifts_y_y, teqw_canc_sn, teqw_abbr_pos/ ] -| /4 width=3 by cpm_cpms, cpm_bind, tweq_inv_abbr_pos_bi, ex2_intro/ +| /4 width=3 by cpm_cpms, cpm_bind, teqw_inv_abbr_pos_bi, ex2_intro/ ] qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_cnx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_cnx.ma index 4f107fec4..ea738ac96 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_cnx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_cnx.ma @@ -20,13 +20,13 @@ include "basic_2/rt_computation/cpxs.ma". (* Properties with normal forms *********************************************) lemma cpxs_cnx (G) (L) (T1): - (∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → T1 ≛ T2) → ❪G,L❫ ⊢ ⬈𝐍 T1. + (∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → T1 ≅ T2) → ❪G,L❫ ⊢ ⬈𝐍 T1. /3 width=1 by cpx_cpxs/ qed. (* Inversion lemmas with normal terms ***************************************) lemma cpxs_inv_cnx1 (G) (L): - ∀T1,T2. ❪G,L❫ ⊢ T1 ⬈* T2 → ❪G,L❫ ⊢ ⬈𝐍 T1 → T1 ≛ T2. + ∀T1,T2. ❪G,L❫ ⊢ T1 ⬈* T2 → ❪G,L❫ ⊢ ⬈𝐍 T1 → T1 ≅ T2. #G #L #T1 #T2 #H @(cpxs_ind_dx … H) -T1 /5 width=9 by cnx_teqx_trans, teqx_trans/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_feqg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_feqg.ma new file mode 100644 index 000000000..3c8f4902a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_feqg.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 "static_2/static/feqg.ma". +include "basic_2/rt_computation/cpxs_reqg.ma". + +(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS *************) + +(* Properties with generic equivalence for closures *************************) + +(* to be updated *) +lemma feqg_cpxs_trans (S): + reflexive … S → symmetric … S → + ∀G1,G2,L1,L2,T1,T. ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T❫ → + ∀T2. ❪G2,L2❫ ⊢ T ⬈* T2 → + ∃∃T0. ❪G1,L1❫ ⊢ T1 ⬈* T0 & ❪G1,L1,T0❫ ≛[S] ❪G2,L2,T2❫. +#S #H1S #H2S #G1 #G2 #L1 #L2 #T1 #T #H #T2 #H2T2 +elim (feqg_inv_gen_dx … H) -H // #H #HL12 #HT1 destruct +lapply (reqg_cpxs_trans … H2T2 … HL12) // #H1T2 +lapply (cpxs_reqg_conf_dx … H2T2 … HL12) -HL12 // #HL12 +lapply (teqg_cpxs_trans … HT1 … H1T2) -T // #HT12 +/4 width=3 by feqg_intro_dx, teqg_refl, ex2_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_fqus.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_fqus.ma index 778ba6681..d4b4d6520 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_fqus.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_fqus.ma @@ -61,13 +61,13 @@ qed-. (* Basic_2A1: uses: fqu_cpxs_trans_neq *) lemma fqu_cpxs_trans_tneqx (b): ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂[b] ❪G2,L2,T2❫ → - ∀U2. ❪G2,L2❫ ⊢ T2 ⬈* U2 → (T2 ≛ U2 → ⊥) → - ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈* U1 & T1 ≛ U1 → ⊥ & ❪G1,L1,U1❫ ⬂[b] ❪G2,L2,U2❫. + ∀U2. ❪G2,L2❫ ⊢ T2 ⬈* U2 → (T2 ≅ U2 → ⊥) → + ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈* U1 & T1 ≅ U1 → ⊥ & ❪G1,L1,U1❫ ⬂[b] ❪G2,L2,U2❫. #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 [ #I #G #L #V1 #V2 #HV12 #_ elim (lifts_total V2 𝐔❨1❩) #U2 #HVU2 @(ex3_intro … U2) [1,3: /3 width=7 by cpxs_delta, fqu_drop/ - | #H lapply (teqx_inv_lref1 … H) -H + | #H lapply (teqg_inv_lref1 … H) -H #H destruct /2 width=5 by lifts_inv_lref2_uni_lt/ ] | #I #G #L #V1 #T #V2 #HV12 #H0 @(ex3_intro … (②[I]V2.T)) @@ -95,8 +95,8 @@ qed-. (* Basic_2A1: uses: fquq_cpxs_trans_neq *) lemma fquq_cpxs_trans_tneqx (b): ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂⸮[b] ❪G2,L2,T2❫ → - ∀U2. ❪G2,L2❫ ⊢ T2 ⬈* U2 → (T2 ≛ U2 → ⊥) → - ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈* U1 & T1 ≛ U1 → ⊥ & ❪G1,L1,U1❫ ⬂⸮[b] ❪G2,L2,U2❫. + ∀U2. ❪G2,L2❫ ⊢ T2 ⬈* U2 → (T2 ≅ U2 → ⊥) → + ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈* U1 & T1 ≅ U1 → ⊥ & ❪G1,L1,U1❫ ⬂⸮[b] ❪G2,L2,U2❫. #b #G1 #G2 #L1 #L2 #T1 #T2 #H12 elim H12 -H12 [ #H12 #U2 #HTU2 #H elim (fqu_cpxs_trans_tneqx … H12 … HTU2 H) -T2 /3 width=4 by fqu_fquq, ex3_intro/ @@ -107,8 +107,8 @@ qed-. (* Basic_2A1: uses: fqup_cpxs_trans_neq *) lemma fqup_cpxs_trans_tneqx (b): ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂+[b] ❪G2,L2,T2❫ → - ∀U2. ❪G2,L2❫ ⊢ T2 ⬈* U2 → (T2 ≛ U2 → ⊥) → - ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈* U1 & T1 ≛ U1 → ⊥ & ❪G1,L1,U1❫ ⬂+[b] ❪G2,L2,U2❫. + ∀U2. ❪G2,L2❫ ⊢ T2 ⬈* U2 → (T2 ≅ U2 → ⊥) → + ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈* U1 & T1 ≅ U1 → ⊥ & ❪G1,L1,U1❫ ⬂+[b] ❪G2,L2,U2❫. #b #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_tneqx … H12 … HTU2 H) -T2 /3 width=4 by fqu_fqup, ex3_intro/ @@ -121,8 +121,8 @@ qed-. (* Basic_2A1: uses: fqus_cpxs_trans_neq *) lemma fqus_cpxs_trans_tneqx (b): ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂*[b] ❪G2,L2,T2❫ → - ∀U2. ❪G2,L2❫ ⊢ T2 ⬈* U2 → (T2 ≛ U2 → ⊥) → - ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈* U1 & T1 ≛ U1 → ⊥ & ❪G1,L1,U1❫ ⬂*[b] ❪G2,L2,U2❫. + ∀U2. ❪G2,L2❫ ⊢ T2 ⬈* U2 → (T2 ≅ U2 → ⊥) → + ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈* U1 & T1 ≅ U1 → ⊥ & ❪G1,L1,U1❫ ⬂*[b] ❪G2,L2,U2❫. #b #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fqus_inv_fqup … H12) -H12 [ #H12 elim (fqup_cpxs_trans_tneqx … H12 … HTU2 H) -T2 /3 width=4 by fqup_fqus, ex3_intro/ diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_reqg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_reqg.ma new file mode 100644 index 000000000..1bcdb63a9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_reqg.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_2/rt_transition/cpx_reqg.ma". +include "basic_2/rt_computation/cpxs_teqg.ma". + +(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS *************) + +(* Properties with generic equivalence for local environments ***************) + +(* Basic_2A1: was just: lleq_cpxs_trans *) +lemma reqg_cpxs_trans (S) (G): + reflexive … S → symmetric … S → + ∀L0,T0,T1. ❪G,L0❫ ⊢ T0 ⬈* T1 → ∀L2. L2 ≛[S,T0] L0 → ❪G,L2❫ ⊢ T0 ⬈* T1. +#S #G #H1S #H2S #L0 #T0 #T1 #H @(cpxs_ind_dx … H) -T0 // +#T0 #T #H0T0 #_ #IH #L2 #HL2 +lapply (reqg_cpx_trans … HL2 … H0T0) // #H2T0 +lapply (IH L2 ?) -IH /2 width=5 by cpx_reqg_conf_dx/ -L0 #H2T1 +/2 width=3 by cpxs_strap2/ +qed-. + +(* Basic_2A1: was just: cpxs_lleq_conf *) +lemma cpxs_reqg_conf (S) (G): + reflexive … S → symmetric … S → + ∀L0,T0,T1. ❪G,L0❫ ⊢ T0 ⬈* T1 → ∀L2. L0 ≛[S,T0] L2 → ❪G,L2❫ ⊢ T0 ⬈* T1. +/3 width=8 by reqg_cpxs_trans, reqg_sym/ qed-. + +(* Basic_2A1: was just: lleq_conf_sn *) +lemma cpxs_reqg_conf_sn (S) (G): + ∀L1,T1,T2. ❪G,L1❫ ⊢ T1 ⬈* T2 → + ∀L2. L1 ≛[S,T1] L2 → L1 ≛[S,T2] L2. +#S #G #L1 #T1 #T2 #H @(cpxs_ind … H) -T2 +/3 width=6 by cpx_reqg_conf_sn/ +qed-. + +(* Basic_2A1: was just: cpxs_lleq_conf_dx *) +lemma cpxs_reqg_conf_dx (S) (G): + reflexive … S → symmetric … S → + ∀L2,T1,T2. ❪G,L2❫ ⊢ T1 ⬈* T2 → + ∀L1. L1 ≛[S,T1] L2 → L1 ≛[S,T2] L2. +/4 width=4 by cpxs_reqg_conf_sn, reqg_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_teqg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_teqg.ma new file mode 100644 index 000000000..860aea3b5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_teqg.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_2/rt_transition/rpx_reqg.ma". +include "basic_2/rt_computation/cpxs.ma". + +(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS *************) + +(* Properties with generic equivalence for terms ****************************) + +lemma teqg_cpxs_trans (S) (G) (L) (T): + reflexive … S → symmetric … S → + ∀T1. T1 ≛[S] T → ∀T2. ❪G,L❫ ⊢ T ⬈* T2 → ❪G,L❫ ⊢ T1 ⬈* T2. +#S #H1S #H2S #G #L #T #T1 #HT1 #T2 #HT2 @(cpxs_ind … HT2) -T2 +[ /3 width=4 by teqg_cpx, cpx_cpxs/ +| /2 width=3 by cpxs_strap1/ +] +qed-. + +(* Note: this requires teqg to be symmetric *) +(* Nasic_2A1: uses: cpxs_neq_inv_step_sn *) +lemma cpxs_tneqg_fwd_step_sn (S) (G) (L): + reflexive … S → symmetric … S → Transitive … S → + (∀s1,s2. Decidable (S s1 s2)) → + ∀T1,T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ≛[S] T2 → ⊥) → + ∃∃T. ❪G,L❫ ⊢ T1 ⬈ T & T1 ≛[S] T → ⊥ & ❪G,L❫ ⊢ T ⬈* T2. +#S #G #L #H1S #H2S #H3S #H4S #T1 #T2 #H @(cpxs_ind_dx … H) -T1 +[ #H elim H -H /2 width=1 by teqg_refl/ +| #T1 #T0 #HT10 #HT02 #IH #HnT12 + elim (teqg_dec S … T1 T0) // [ -HT10 -HT02 #HT10 | -IH #HnT10 ] + [ elim IH -IH /3 width=3 by teqg_trans/ -HnT12 + #T #HT0 #HnT0 #HT2 + lapply (teqg_cpx_trans … HT10 … HT0) // -HT0 #HT1 + /4 width=4 by teqg_canc_sn, ex3_intro/ + | /3 width=4 by ex3_intro/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_teqo.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_teqo.ma index 276d8c18f..0ffa64fb3 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_teqo.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_teqo.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "static_2/syntax/teqo_teqx.ma". +include "static_2/syntax/teqo_teqg.ma". include "basic_2/rt_computation/cpxs_lsubr.ma". include "basic_2/rt_computation/cpxs_cnx.ma". include "basic_2/rt_computation/lpxs_cpxs.ma". @@ -22,7 +22,7 @@ include "basic_2/rt_computation/lpxs_cpxs.ma". (* Forward lemmas with sort-irrelevant outer equivalence for terms **********) lemma cpxs_fwd_sort (G) (L): - ∀X2,s1. ❪G,L❫ ⊢ ⋆s1 ⬈* X2 → ⋆s1 ⩳ X2. + ∀X2,s1. ❪G,L❫ ⊢ ⋆s1 ⬈* X2 → ⋆s1 ~ X2. #G #L #X2 #s1 #H elim (cpxs_inv_sort1 … H) -H #s2 #H destruct // qed-. @@ -33,7 +33,7 @@ lemma cpxs_fwd_delta_drops (I) (G) (L) (K): ∀V1,i. ⇩[i] L ≘ K.ⓑ[I]V1 → ∀V2. ⇧[↑i] V1 ≘ V2 → ∀X2. ❪G,L❫ ⊢ #i ⬈* X2 → - ∨∨ #i ⩳ X2 | ❪G,L❫ ⊢ V2 ⬈* X2. + ∨∨ #i ~ X2 | ❪G,L❫ ⊢ V2 ⬈* X2. #I #G #L #K #V1 #i #HLK #V2 #HV12 #X2 #H elim (cpxs_inv_lref1_drops … H) -H /2 width=1 by or_introl/ * #I0 #K0 #V0 #U0 #HLK0 #HVU0 #HU0 @@ -44,7 +44,7 @@ qed-. (* Basic_1: was just: pr3_iso_beta *) lemma cpxs_fwd_beta (p) (G) (L): ∀V,W,T,X2. ❪G,L❫ ⊢ ⓐV.ⓛ[p]W.T ⬈* X2 → - ∨∨ ⓐV.ⓛ[p]W.T ⩳ X2 | ❪G,L❫ ⊢ ⓓ[p]ⓝW.V.T ⬈* X2. + ∨∨ ⓐV.ⓛ[p]W.T ~ X2 | ❪G,L❫ ⊢ ⓓ[p]ⓝW.V.T ⬈* X2. #p #G #L #V #W #T #X2 #H elim (cpxs_inv_appl1 … H) -H * [ #V0 #T0 #_ #_ #H destruct /2 width=1 by teqo_pair, or_introl/ | #b #W0 #T0 #HT0 #HU @@ -59,7 +59,7 @@ qed-. lemma cpxs_fwd_theta (p) (G) (L): ∀V1,V,T,X2. ❪G,L❫ ⊢ ⓐV1.ⓓ[p]V.T ⬈* X2 → ∀V2. ⇧[1] V1 ≘ V2 → - ∨∨ ⓐV1.ⓓ[p]V.T ⩳ X2 | ❪G,L❫ ⊢ ⓓ[p]V.ⓐV2.T ⬈* X2. + ∨∨ ⓐV1.ⓓ[p]V.T ~ X2 | ❪G,L❫ ⊢ ⓓ[p]V.ⓐV2.T ⬈* X2. #p #G #L #V1 #V #T #X2 #H #V2 #HV12 elim (cpxs_inv_appl1 … H) -H * [ -HV12 #V0 #T0 #_ #_ #H destruct /2 width=1 by teqo_pair, or_introl/ @@ -90,7 +90,7 @@ qed-. lemma cpxs_fwd_cast (G) (L): ∀W,T,X2. ❪G,L❫ ⊢ ⓝW.T ⬈* X2 → - ∨∨ ⓝW. T ⩳ X2 | ❪G,L❫ ⊢ T ⬈* X2 | ❪G,L❫ ⊢ W ⬈* X2. + ∨∨ ⓝW. T ~ X2 | ❪G,L❫ ⊢ T ⬈* X2 | ❪G,L❫ ⊢ W ⬈* X2. #G #L #W #T #X2 #H elim (cpxs_inv_cast1 … H) -H /2 width=1 by or3_intro1, or3_intro2/ * #W0 #T0 #_ #_ #H destruct /2 width=1 by teqo_pair, or3_intro0/ @@ -98,5 +98,5 @@ qed-. lemma cpxs_fwd_cnx (G) (L): ∀T1. ❪G,L❫ ⊢ ⬈𝐍 T1 → - ∀X2. ❪G,L❫ ⊢ T1 ⬈* X2 → T1 ⩳ X2. -/3 width=5 by cpxs_inv_cnx1, teqx_teqo/ qed-. + ∀X2. ❪G,L❫ ⊢ T1 ⬈* X2 → T1 ~ X2. +/3 width=5 by cpxs_inv_cnx1, teqg_teqo/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_teqo_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_teqo_vector.ma index 5bc7ef780..f12edb09f 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_teqo_vector.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_teqo_vector.ma @@ -21,7 +21,7 @@ include "basic_2/rt_computation/cpxs_teqo.ma". (* Vector form of forward lemmas with outer equivalence for terms ***********) lemma cpxs_fwd_sort_vector (G) (L): - ∀s,Vs,X2. ❪G,L❫ ⊢ ⒶVs.⋆s ⬈* X2 → ⒶVs.⋆s ⩳ X2. + ∀s,Vs,X2. ❪G,L❫ ⊢ ⒶVs.⋆s ⬈* X2 → ⒶVs.⋆s ~ X2. #G #L #s #Vs elim Vs -Vs /2 width=4 by cpxs_fwd_sort/ #V #Vs #IHVs #X2 #H elim (cpxs_inv_appl1 … H) -H * @@ -40,7 +40,7 @@ lemma cpxs_fwd_delta_drops_vector (I) (G) (L) (K): ∀V1,i. ⇩[i] L ≘ K.ⓑ[I]V1 → ∀V2. ⇧[↑i] V1 ≘ V2 → ∀Vs,X2. ❪G,L❫ ⊢ ⒶVs.#i ⬈* X2 → - ∨∨ ⒶVs.#i ⩳ X2 | ❪G,L❫ ⊢ ⒶVs.V2 ⬈* X2. + ∨∨ ⒶVs.#i ~ X2 | ❪G,L❫ ⊢ ⒶVs.V2 ⬈* X2. #I #G #L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs /2 width=5 by cpxs_fwd_delta_drops/ #V #Vs #IHVs #X2 #H -K -V1 @@ -66,7 +66,7 @@ qed-. (* Basic_1: was just: pr3_iso_appls_beta *) lemma cpxs_fwd_beta_vector (p) (G) (L): ∀Vs,V,W,T,X2. ❪G,L❫ ⊢ ⒶVs.ⓐV.ⓛ[p]W.T ⬈* X2 → - ∨∨ ⒶVs.ⓐV.ⓛ[p]W. T ⩳ X2 | ❪G,L❫ ⊢ ⒶVs.ⓓ[p]ⓝW.V.T ⬈* X2. + ∨∨ ⒶVs.ⓐV.ⓛ[p]W. T ~ X2 | ❪G,L❫ ⊢ ⒶVs.ⓓ[p]ⓝW.V.T ⬈* X2. #p #G #L #Vs elim Vs -Vs /2 width=1 by cpxs_fwd_beta/ #V0 #Vs #IHVs #V #W #T #X2 #H elim (cpxs_inv_appl1 … H) -H * @@ -92,7 +92,7 @@ qed-. lemma cpxs_fwd_theta_vector (G) (L): ∀V1b,V2b. ⇧[1] V1b ≘ V2b → ∀p,V,T,X2. ❪G,L❫ ⊢ ⒶV1b.ⓓ[p]V.T ⬈* X2 → - ∨∨ ⒶV1b.ⓓ[p]V.T ⩳ X2 | ❪G,L❫ ⊢ ⓓ[p]V.ⒶV2b.T ⬈* X2. + ∨∨ ⒶV1b.ⓓ[p]V.T ~ X2 | ❪G,L❫ ⊢ ⓓ[p]V.ⒶV2b.T ⬈* X2. #G #L #V1b #V2b * -V1b -V2b /3 width=1 by or_intror/ #V1b #V2b #V1a #V2a #HV12a #HV12b #p generalize in match HV12a; -HV12a @@ -141,7 +141,7 @@ qed-. (* Basic_1: was just: pr3_iso_appls_cast *) lemma cpxs_fwd_cast_vector (G) (L): ∀Vs,W,T,X2. ❪G,L❫ ⊢ ⒶVs.ⓝW.T ⬈* X2 → - ∨∨ ⒶVs. ⓝW. T ⩳ X2 + ∨∨ ⒶVs. ⓝW. T ~ X2 | ❪G,L❫ ⊢ ⒶVs.T ⬈* X2 | ❪G,L❫ ⊢ ⒶVs.W ⬈* X2. #G #L #Vs elim Vs -Vs /2 width=1 by cpxs_fwd_cast/ @@ -173,7 +173,7 @@ qed-. (* Basic_1: was just: nf2_iso_appls_lref *) lemma cpxs_fwd_cnx_vector (G) (L): ∀T. 𝐒❪T❫ → ❪G,L❫ ⊢ ⬈𝐍 T → - ∀Vs,X2. ❪G,L❫ ⊢ ⒶVs.T ⬈* X2 → ⒶVs.T ⩳ X2. + ∀Vs,X2. ❪G,L❫ ⊢ ⒶVs.T ⬈* X2 → ⒶVs.T ~ X2. #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 #X2 #H elim (cpxs_inv_appl1 … H) -H * diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx.ma index 13db8d1f3..437457f65 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx.ma @@ -29,7 +29,7 @@ interpretation lemma csx_ind (G) (L) (Q:predicate …): (∀T1. ❪G,L❫ ⊢ ⬈*𝐒 T1 → - (∀T2. ❪G,L❫ ⊢ T1 ⬈ T2 → (T1 ≛ T2 → ⊥) → Q T2) → + (∀T2. ❪G,L❫ ⊢ T1 ⬈ T2 → (T1 ≅ T2 → ⊥) → Q T2) → Q T1 ) → ∀T. ❪G,L❫ ⊢ ⬈*𝐒 T → Q T. @@ -41,7 +41,7 @@ qed-. (* Basic_1: was just: sn3_pr2_intro *) lemma csx_intro (G) (L): - ∀T1. (∀T2. ❪G,L❫ ⊢ T1 ⬈ T2 → (T1 ≛ T2 → ⊥) → ❪G,L❫ ⊢ ⬈*𝐒 T2) → + ∀T1. (∀T2. ❪G,L❫ ⊢ T1 ⬈ T2 → (T1 ≅ T2 → ⊥) → ❪G,L❫ ⊢ ⬈*𝐒 T2) → ❪G,L❫ ⊢ ⬈*𝐒 T1. /4 width=1 by SN_intro/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_aaa.ma index 3e1beaa7b..afee9ec90 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_aaa.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_aaa.ma @@ -32,7 +32,7 @@ qed. fact aaa_ind_csx_aux (G) (L): ∀A. ∀Q:predicate …. (∀T1. ❪G,L❫ ⊢ T1 ⁝ A → - (∀T2. ❪G,L❫ ⊢ T1 ⬈ T2 → (T1 ≛ T2 → ⊥) → Q T2) → Q T1 + (∀T2. ❪G,L❫ ⊢ T1 ⬈ T2 → (T1 ≅ T2 → ⊥) → Q T2) → Q T1 ) → ∀T. ❪G,L❫ ⊢ ⬈*𝐒 T → ❪G,L❫ ⊢ T ⁝ A → Q T. #G #L #A #Q #IH #T #H @(csx_ind … H) -T /4 width=5 by cpx_aaa_conf/ @@ -41,7 +41,7 @@ qed-. lemma aaa_ind_csx (G) (L): ∀A. ∀Q:predicate …. (∀T1. ❪G,L❫ ⊢ T1 ⁝ A → - (∀T2. ❪G,L❫ ⊢ T1 ⬈ T2 → (T1 ≛ T2 → ⊥) → Q T2) → Q T1 + (∀T2. ❪G,L❫ ⊢ T1 ⬈ T2 → (T1 ≅ T2 → ⊥) → Q T2) → Q T1 ) → ∀T. ❪G,L❫ ⊢ T ⁝ A → Q T. /5 width=9 by aaa_ind_csx_aux, aaa_csx/ qed-. @@ -49,7 +49,7 @@ lemma aaa_ind_csx (G) (L): fact aaa_ind_csx_cpxs_aux (G) (L): ∀A. ∀Q:predicate …. (∀T1. ❪G,L❫ ⊢ T1 ⁝ A → - (∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ≛ T2 → ⊥) → Q T2) → Q T1 + (∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ≅ T2 → ⊥) → Q T2) → Q T1 ) → ∀T. ❪G,L❫ ⊢ ⬈*𝐒 T → ❪G,L❫ ⊢ T ⁝ A → Q T. #G #L #A #Q #IH #T #H @(csx_ind_cpxs … H) -T /4 width=5 by cpxs_aaa_conf/ @@ -59,7 +59,7 @@ qed-. lemma aaa_ind_csx_cpxs (G) (L): ∀A. ∀Q:predicate …. (∀T1. ❪G,L❫ ⊢ T1 ⁝ A → - (∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ≛ T2 → ⊥) → Q T2) → Q T1 + (∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ≅ T2 → ⊥) → Q T2) → Q T1 ) → ∀T. ❪G,L❫ ⊢ T ⁝ A → Q T. /5 width=9 by aaa_ind_csx_cpxs_aux, aaa_csx/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_cpxs.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_cpxs.ma index 6995ad656..aa5e0e2fc 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_cpxs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_cpxs.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/rt_computation/cpxs_teqx.ma". +include "basic_2/rt_computation/cpxs_teqg.ma". include "basic_2/rt_computation/cpxs_cpxs.ma". include "basic_2/rt_computation/csx_csx.ma". @@ -22,7 +22,7 @@ include "basic_2/rt_computation/csx_csx.ma". (* Basic_1: was just: sn3_intro *) lemma csx_intro_cpxs (G) (L): - ∀T1. (∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ≛ T2 → ⊥) → ❪G,L❫ ⊢ ⬈*𝐒 T2) → + ∀T1. (∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ≅ T2 → ⊥) → ❪G,L❫ ⊢ ⬈*𝐒 T2) → ❪G,L❫ ⊢ ⬈*𝐒 T1. /4 width=1 by cpx_cpxs, csx_intro/ qed-. @@ -39,7 +39,7 @@ qed-. fact csx_ind_cpxs_aux (G) (L): ∀Q:predicate term. (∀T1. ❪G,L❫ ⊢ ⬈*𝐒 T1 → - (∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ≛ T2 → ⊥) → Q T2) → Q T1 + (∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ≅ T2 → ⊥) → Q T2) → Q T1 ) → ∀T1. ❪G,L❫ ⊢ ⬈*𝐒 T1 → ∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → Q T2. @@ -47,11 +47,11 @@ fact csx_ind_cpxs_aux (G) (L): #T1 #HT1 #IH1 #T2 #HT12 @IH -IH /2 width=3 by csx_cpxs_trans/ -HT1 #V2 #HTV2 #HnTV2 elim (teqx_dec T1 T2) #H -[ lapply (teqx_tneqx_trans … H … HnTV2) -H -HnTV2 #Hn12 +[ lapply (teqg_tneqg_trans … H … HnTV2) // -H -HnTV2 #Hn12 lapply (cpxs_trans … HT12 … HTV2) -T2 #H12 - elim (cpxs_tneqx_fwd_step_sn … H12 … Hn12) -H12 -Hn12 + elim (cpxs_tneqg_fwd_step_sn … H12 … Hn12) // -H12 -Hn12 /3 width=4 by/ -| elim (cpxs_tneqx_fwd_step_sn … HT12 … H) -HT12 -H +| elim (cpxs_tneqg_fwd_step_sn … HT12 … H) -HT12 -H /3 width=6 by cpxs_trans/ ] qed-. @@ -59,7 +59,7 @@ qed-. (* Basic_2A1: was: csx_ind_alt *) lemma csx_ind_cpxs (G) (L) (Q:predicate …): (∀T1. ❪G,L❫ ⊢ ⬈*𝐒 T1 → - (∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ≛ T2 → ⊥) → Q T2) → Q T1 + (∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ≅ T2 → ⊥) → Q T2) → Q T1 ) → ∀T. ❪G,L❫ ⊢ ⬈*𝐒 T → Q T. #G #L #Q #IH #T #HT diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_csx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_csx.ma index 72d7a1f4b..84db53f78 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_csx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_csx.ma @@ -12,27 +12,28 @@ (* *) (**************************************************************************) -include "basic_2/rt_transition/lpx_reqx.ma". +include "basic_2/rt_transition/lpx_reqg.ma". include "basic_2/rt_computation/csx_drops.ma". (* STRONGLY NORMALIZING TERMS FOR EXTENDED PARALLEL RT-TRANSITION ***********) (* Advanced properties ******************************************************) -lemma csx_teqx_trans (G) (L): +lemma csx_teqg_trans (S) (G) (L): + reflexive … S → symmetric … S → ∀T1. ❪G,L❫ ⊢ ⬈*𝐒 T1 → - ∀T2. T1 ≛ T2 → ❪G,L❫ ⊢ ⬈*𝐒 T2. -#G #L #T1 #H @(csx_ind … H) -T1 #T #_ #IH #T2 #HT2 + ∀T2. T1 ≛[S] T2 → ❪G,L❫ ⊢ ⬈*𝐒 T2. +#S #G #L #H1S #H2S #T1 #H @(csx_ind … H) -T1 #T #_ #IH #T2 #HT2 @csx_intro #T1 #HT21 #HnT21 -lapply (teqx_cpx_trans … HT2 … HT21) -HT21 #HT1 -/4 width=5 by teqx_repl/ +lapply (teqg_cpx_trans … HT2 … HT21) // -HT21 #HT1 +/5 width=4 by teqg_teqx, teqg_canc_sn, teqg_refl/ qed-. lemma csx_cpx_trans (G) (L): ∀T1. ❪G,L❫ ⊢ ⬈*𝐒 T1 → ∀T2. ❪G,L❫ ⊢ T1 ⬈ T2 → ❪G,L❫ ⊢ ⬈*𝐒 T2. #G #L #T1 #H @(csx_ind … H) -T1 #T1 #HT1 #IHT1 #T2 #HLT12 -elim (teqx_dec T1 T2) /3 width=4 by csx_teqx_trans/ +elim (teqx_dec T1 T2) /3 width=6 by csx_teqg_trans/ qed-. (* Basic_1: was just: sn3_cast *) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_feqg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_feqg.ma new file mode 100644 index 000000000..86692a635 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_feqg.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 "static_2/static/feqg.ma". +include "basic_2/rt_computation/csx_reqg.ma". + +(* STRONGLY NORMALIZING TERMS FOR EXTENDED PARALLEL RT-TRANSITION ***********) + +(* Properties with generic equivalence for closures *************************) + +lemma csx_feqg_conf (S): + reflexive … S → symmetric … S → + ∀G1,L1,T1. ❪G1,L1❫ ⊢ ⬈*𝐒 T1 → + ∀G2,L2,T2. ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫ → ❪G2,L2❫ ⊢ ⬈*𝐒 T2. +#S #H1S #H2S #G1 #L1 #T1 #HT1 #G2 #L2 #T2 * -G2 -L2 -T2 +/3 width=6 by csx_reqg_conf, csx_teqg_trans/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_fpbq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_fpbq.ma index 70f70453d..791c5f521 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_fpbq.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_fpbq.ma @@ -14,7 +14,7 @@ include "basic_2/rt_transition/fpbq.ma". include "basic_2/rt_computation/csx_fqus.ma". -include "basic_2/rt_computation/csx_feqx.ma". +include "basic_2/rt_computation/csx_feqg.ma". include "basic_2/rt_computation/csx_lpx.ma". (* STRONGLY NORMALIZING TERMS FOR EXTENDED PARALLEL RT-TRANSITION ***********) @@ -26,5 +26,5 @@ lemma csx_fpbq_conf: ∀G1,L1,T1. ❪G1,L1❫ ⊢ ⬈*𝐒 T1 → ∀G2,L2,T2. ❪G1,L1,T1❫ ≽ ❪G2,L2,T2❫ → ❪G2,L2❫ ⊢ ⬈*𝐒 T2. #G1 #L1 #T1 #HT1 #G2 #L2 #T2 * -/2 width=6 by csx_cpx_trans, csx_fquq_conf, csx_lpx_conf, csx_feqx_conf/ +/2 width=8 by csx_cpx_trans, csx_fquq_conf, csx_lpx_conf, csx_feqg_conf/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_reqg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_reqg.ma new file mode 100644 index 000000000..ea40d9b70 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_reqg.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_2/rt_transition/cpx_reqg.ma". +include "basic_2/rt_computation/csx_csx.ma". + +(* STRONGLY NORMALIZING TERMS FOR EXTENDED PARALLEL RT-TRANSITION ***********) + +(* Properties with generic equivalence for local environments ***************) + +(* Basic_2A1: uses: csx_lleq_conf *) +lemma csx_reqg_conf (S) (G) (T): + reflexive … S → symmetric … S → + ∀L1. ❪G,L1❫ ⊢ ⬈*𝐒 T → + ∀L2. L1 ≛[S,T] L2 → ❪G,L2❫ ⊢ ⬈*𝐒 T. +#S #G #T #H1S #H2S #L1 #H +@(csx_ind … H) -T #T1 #_ #IH #L2 #HL12 +@csx_intro #T2 #HT12 #HnT12 +lapply (reqg_cpx_trans … HL12 … HT12) -HT12 +/3 width=4 by cpx_reqg_conf_sn/ +qed-. + +(* Basic_2A1: uses: csx_lleq_trans *) +lemma csx_reqg_trans (S) (G) (T): + reflexive … S → symmetric … S → + ∀L1,L2. L1 ≛[S,T] L2 → ❪G,L2❫ ⊢ ⬈*𝐒 T → ❪G,L1❫ ⊢ ⬈*𝐒 T. +/3 width=8 by csx_reqg_conf, reqg_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_simple.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_simple.ma index 1f732d61d..c3d8b95d4 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_simple.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_simple.ma @@ -21,7 +21,7 @@ include "basic_2/rt_computation/csx_csx.ma". lemma csx_appl_simple (G) (L): ∀V. ❪G,L❫ ⊢ ⬈*𝐒 V → ∀T1. - (∀T2. ❪G,L❫ ⊢ T1 ⬈ T2 → (T1 ≛ T2 → ⊥) → ❪G,L❫ ⊢ ⬈*𝐒 ⓐV.T2) → + (∀T2. ❪G,L❫ ⊢ T1 ⬈ T2 → (T1 ≅ T2 → ⊥) → ❪G,L❫ ⊢ ⬈*𝐒 ⓐV.T2) → 𝐒❪T1❫ → ❪G,L❫ ⊢ ⬈*𝐒 ⓐV.T1. #G #L #V #H @(csx_ind … H) -V #V #_ #IHV #T1 #IHT1 #HT1 diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_simple_teqo.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_simple_teqo.ma index bb450e756..23c4100ba 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_simple_teqo.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_simple_teqo.ma @@ -26,7 +26,7 @@ include "basic_2/rt_computation/csx_csx.ma". (* Basic_2A1: was: csx_appl_simple_tsts *) lemma csx_appl_simple_teqo (G) (L): ∀V. ❪G,L❫ ⊢ ⬈*𝐒 V → ∀T1. ❪G,L❫ ⊢ ⬈*𝐒 T1 → - (∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ⩳ T2 → ⊥) → ❪G,L❫ ⊢ ⬈*𝐒 ⓐV.T2) → + (∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ~ T2 → ⊥) → ❪G,L❫ ⊢ ⬈*𝐒 ⓐV.T2) → 𝐒❪T1❫ → ❪G,L❫ ⊢ ⬈*𝐒 ⓐV.T1. #G #L #V #H @(csx_ind … H) -V #V #_ #IHV #T1 #H @(csx_ind … H) -T1 diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg.ma index 1a3d604e9..c052a3a3c 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg.ma @@ -59,12 +59,12 @@ qed-. (* Basic_2A1: uses: fpbg_fleq_trans *) lemma fpbg_feqx_trans: ∀G1,G,L1,L,T1,T. ❪G1,L1,T1❫ > ❪G,L,T❫ → - ∀G2,L2,T2. ❪G,L,T❫ ≛ ❪G2,L2,T2❫ → ❪G1,L1,T1❫ > ❪G2,L2,T2❫. + ∀G2,L2,T2. ❪G,L,T❫ ≅ ❪G2,L2,T2❫ → ❪G1,L1,T1❫ > ❪G2,L2,T2❫. /3 width=5 by fpbg_fpbq_trans, fpbq_feqx/ qed-. (* Properties with t-bound rt-transition for terms **************************) lemma cpm_tneqx_cpm_fpbg (h) (G) (L): - ∀n1,T1,T. ❪G,L❫ ⊢ T1 ➡[h,n1] T → (T1 ≛ T → ⊥) → + ∀n1,T1,T. ❪G,L❫ ⊢ T1 ➡[h,n1] T → (T1 ≅ T → ⊥) → ∀n2,T2. ❪G,L❫ ⊢ T ➡[h,n2] T2 → ❪G,L,T1❫ > ❪G,L,T2❫. /4 width=5 by fpbq_fpbs, cpm_fpbq, cpm_fpb, ex2_3_intro/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_cpxs.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_cpxs.ma index 335243516..570c4490f 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_cpxs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_cpxs.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/rt_computation/cpxs_teqx.ma". +include "basic_2/rt_computation/cpxs_teqg.ma". include "basic_2/rt_computation/fpbs_cpxs.ma". include "basic_2/rt_computation/fpbg_fpbs.ma". @@ -23,9 +23,9 @@ include "basic_2/rt_computation/fpbg_fpbs.ma". (* Basic_2A1: was: cpxs_fpbg *) lemma cpxs_tneqx_fpbg: ∀G,L,T1,T2. ❪G,L❫ ⊢ T1 ⬈* T2 → - (T1 ≛ T2 → ⊥) → ❪G,L,T1❫ > ❪G,L,T2❫. + (T1 ≅ T2 → ⊥) → ❪G,L,T1❫ > ❪G,L,T2❫. #G #L #T1 #T2 #H #H0 -elim (cpxs_tneqx_fwd_step_sn … H … H0) -H -H0 +elim (cpxs_tneqg_fwd_step_sn … H … H0) -H -H0 /4 width=5 by cpxs_teqx_fpbs, fpb_cpx, ex2_3_intro/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_fpbs.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_fpbs.ma index fcfcbc978..ebc9164a7 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_fpbs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_fpbs.ma @@ -12,7 +12,8 @@ (* *) (**************************************************************************) -include "static_2/static/feqx_feqx.ma". +include "static_2/static/feqg_fqup.ma". +include "static_2/static/feqg_feqg.ma". include "basic_2/rt_transition/fpbq_fpb.ma". include "basic_2/rt_computation/fpbs_fqup.ma". include "basic_2/rt_computation/fpbg.ma". @@ -33,9 +34,9 @@ qed-. (* Basic_2A1: uses: fleq_fpbg_trans *) lemma feqx_fpbg_trans: ∀G,G2,L,L2,T,T2. ❪G,L,T❫ > ❪G2,L2,T2❫ → - ∀G1,L1,T1. ❪G1,L1,T1❫ ≛ ❪G,L,T❫ → ❪G1,L1,T1❫ > ❪G2,L2,T2❫. + ∀G1,L1,T1. ❪G1,L1,T1❫ ≅ ❪G,L,T❫ → ❪G1,L1,T1❫ > ❪G2,L2,T2❫. #G #G2 #L #L2 #T #T2 * #G0 #L0 #T0 #H0 #H02 #G1 #L1 #T1 #H1 -elim (feqx_fpb_trans … H1 … H0) -G -L -T +elim (feqg_fpb_trans … H1 … H0) -G -L -T /4 width=9 by fpbs_strap2, fpbq_feqx, ex2_3_intro/ qed-. @@ -78,14 +79,14 @@ lemma fqup_fpbg_trans: (* Basic_2A1: was: fpbs_fpbg *) lemma fpbs_inv_fpbg: ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫ → - ∨∨ ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫ + ∨∨ ❪G1,L1,T1❫ ≅ ❪G2,L2,T2❫ | ❪G1,L1,T1❫ > ❪G2,L2,T2❫. #G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind … H) -G2 -L2 -T2 -[ /2 width=1 by or_introl/ +[ /3 width=1 by feqg_refl, or_introl/ | #G #G2 #L #L2 #T #T2 #_ #H2 * #H1 elim (fpbq_inv_fpb … H2) -H2 #H2 - [ /3 width=5 by feqx_trans, or_introl/ - | elim (feqx_fpb_trans … H1 … H2) -G -L -T + [ /3 width=5 by feqg_trans, or_introl/ + | elim (feqg_fpb_trans … H1 … H2) -G -L -T /4 width=5 by ex2_3_intro, or_intror, feqx_fpbs/ | /3 width=5 by fpbg_feqx_trans, or_intror/ | /4 width=5 by fpbg_fpbq_trans, fpb_fpbq, or_intror/ @@ -100,7 +101,7 @@ lemma fpbs_fpb_trans: ∀G2,L2,U2. ❪F2,K2,T2❫ ≻ ❪G2,L2,U2❫ → ∃∃G1,L1,U1. ❪F1,K1,T1❫ ≻ ❪G1,L1,U1❫ & ❪G1,L1,U1❫ ≥ ❪G2,L2,U2❫. #F1 #F2 #K1 #K2 #T1 #T2 #H elim (fpbs_inv_fpbg … H) -H -[ #H12 #G2 #L2 #U2 #H2 elim (feqx_fpb_trans … H12 … H2) -F2 -K2 -T2 +[ #H12 #G2 #L2 #U2 #H2 elim (feqg_fpb_trans … H12 … H2) -F2 -K2 -T2 /3 width=5 by feqx_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/ diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_fqup.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_fqup.ma index 71451e886..7acceab10 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_fqup.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_fqup.ma @@ -21,8 +21,8 @@ include "basic_2/rt_computation/fpbg.ma". lemma fpbg_teqx_div: ∀G1,G2,L1,L2,T1,T. ❪G1,L1,T1❫ > ❪G2,L2,T❫ → - ∀T2. T2 ≛ T → ❪G1,L1,T1❫ > ❪G2,L2,T2❫. -/4 width=5 by fpbg_feqx_trans, teqx_feqx, teqx_sym/ qed-. + ∀T2. T2 ≅ T → ❪G1,L1,T1❫ > ❪G2,L2,T2❫. +/4 width=5 by fpbg_feqx_trans, teqg_feqg, teqx_sym/ qed-. (* Properties with plus-iterated structural successor for closures **********) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_lpxs.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_lpxs.ma index 1864df4b3..397c2c4f6 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_lpxs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_lpxs.ma @@ -22,8 +22,8 @@ include "basic_2/rt_computation/fpbg.ma". (* Basic_2A1: uses: lpxs_fpbg *) lemma lpxs_rneqx_fpbg: ∀G,L1,L2,T. ❪G,L1❫ ⊢ ⬈* L2 → - (L1 ≛[T] L2 → ⊥) → ❪G,L1,T❫ > ❪G,L2,T❫. + (L1 ≅[T] L2 → ⊥) → ❪G,L1,T❫ > ❪G,L2,T❫. #G #L1 #L2 #T #H #H0 -elim (lpxs_rneqx_inv_step_sn … H … H0) -H -H0 -/4 width=7 by fpb_lpx, lpxs_feqx_fpbs, feqx_intro_sn, ex2_3_intro/ +elim (lpxs_rneqg_inv_step_sn … H … H0) -H -H0 +/4 width=7 by fpb_lpx, lpxs_feqx_fpbs, feqg_intro_sn, ex2_3_intro/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs.ma index 827912dfa..8aa6dba6d 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs.ma @@ -14,6 +14,7 @@ include "ground/lib/star.ma". include "basic_2/notation/relations/predsubtystar_6.ma". +include "static_2/static/reqx.ma". include "basic_2/rt_transition/fpbq.ma". (* PARALLEL RST-COMPUTATION FOR CLOSURES ************************************) @@ -62,25 +63,25 @@ lemma fpbs_strap2: (* Basic_2A1: uses: lleq_fpbs fleq_fpbs *) lemma feqx_fpbs: - ∀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,L1,T1❫ ≅ ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫. /3 width=1 by fpbq_fpbs, fpbq_feqx/ qed. (* Basic_2A1: uses: fpbs_lleq_trans *) lemma fpbs_feqx_trans: ∀G1,G,L1,L,T1,T. ❪G1,L1,T1❫ ≥ ❪G,L,T❫ → - ∀G2,L2,T2. ❪G,L,T❫ ≛ ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫. + ∀G2,L2,T2. ❪G,L,T❫ ≅ ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫. /3 width=9 by fpbs_strap1, fpbq_feqx/ qed-. (* Basic_2A1: uses: lleq_fpbs_trans *) lemma feqx_fpbs_trans: ∀G,G2,L,L2,T,T2. ❪G,L,T❫ ≥ ❪G2,L2,T2❫ → - ∀G1,L1,T1. ❪G1,L1,T1❫ ≛ ❪G,L,T❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫. + ∀G1,L1,T1. ❪G1,L1,T1❫ ≅ ❪G,L,T❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫. /3 width=5 by fpbs_strap2, fpbq_feqx/ qed-. lemma teqx_reqx_lpx_fpbs: - ∀T1,T2. T1 ≛ T2 → ∀L1,L0. L1 ≛[T2] L0 → + ∀T1,T2. T1 ≅ T2 → ∀L1,L0. L1 ≅[T2] L0 → ∀G,L2. ❪G,L0❫ ⊢ ⬈ L2 → ❪G,L1,T1❫ ≥ ❪G,L2,T2❫. -/4 width=5 by feqx_fpbs, fpbs_strap1, fpbq_lpx, feqx_intro_dx/ qed. +/4 width=5 by feqx_fpbs, fpbs_strap1, fpbq_lpx, feqg_intro_dx/ qed. (* Basic_2A1: removed theorems 3: fpb_fpbsa_trans fpbs_fpbsa fpbsa_inv_fpbs diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_cpx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_cpx.ma index 5127496b1..a0d045611 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_cpx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_cpx.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/rt_transition/cpx_feqx.ma". +include "basic_2/rt_transition/cpx_feqg.ma". include "basic_2/rt_computation/lpxs_cpxs.ma". include "basic_2/rt_computation/fpbs_lpxs.ma". @@ -23,18 +23,19 @@ include "basic_2/rt_computation/fpbs_lpxs.ma". (* Basic_2A1: uses: fpbs_cpx_trans_neq *) lemma fpbs_cpx_tneqx_trans: ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫ → - ∀U2. ❪G2,L2❫ ⊢ T2 ⬈ U2 → (T2 ≛ U2 → ⊥) → - ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈ U1 & T1 ≛ U1 → ⊥ & ❪G1,L1,U1❫ ≥ ❪G2,L2,U2❫. + ∀U2. ❪G2,L2❫ ⊢ T2 ⬈ U2 → (T2 ≅ U2 → ⊥) → + ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈ U1 & T1 ≅ U1 → ⊥ & ❪G1,L1,U1❫ ≥ ❪G2,L2,U2❫. #G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 #HnTU2 elim (fpbs_inv_star … H) -H #G0 #L0 #L3 #T0 #T3 #HT10 #H10 #HL03 #H32 -elim (feqx_cpx_trans … H32 … HTU2) -HTU2 #T4 #HT34 #H42 -lapply (feqx_tneqx_repl_dx … H32 … H42 … HnTU2) -T2 #HnT34 +elim (feqg_cpx_trans … H32 … HTU2) -HTU2 // #T4 #HT34 #H42 +lapply (feqg_tneqg_repl_dx … H32 … H42 … HnTU2) -T2 // #HnT34 lapply (lpxs_cpx_trans … HT34 … HL03) -HT34 #HT34 elim (fqus_cpxs_trans_tneqx … H10 … HT34 HnT34) -T3 #T2 #HT02 #HnT02 #H24 elim (teqx_dec T1 T0) [ #H10 | -HnT02 #HnT10 ] [ lapply (cpxs_trans … HT10 … HT02) -HT10 -HT02 #HT12 - elim (cpxs_tneqx_fwd_step_sn … HT12) [2: /3 width=3 by teqx_canc_sn/ ] -T0 -HT12 -| elim (cpxs_tneqx_fwd_step_sn … HT10 … HnT10) -HT10 -HnT10 + elim (cpxs_tneqg_fwd_step_sn … HT12) + [2,7: /3 width=3 by teqg_canc_sn/ ] -T0 -HT12 // +| elim (cpxs_tneqg_fwd_step_sn … HT10 … HnT10) -HT10 -HnT10 // ] /4 width=16 by fpbs_intro_star, cpxs_teqx_fpbs_trans, ex3_intro/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_cpxs.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_cpxs.ma index ec9cf1bb5..f9d110dd1 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_cpxs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_cpxs.ma @@ -40,14 +40,14 @@ lemma cpxs_fpbs_trans: qed-. lemma cpxs_teqx_fpbs_trans: - ∀G1,L1,T1,T. ❪G1,L1❫ ⊢ T1 ⬈* T → ∀T0. T ≛ T0 → + ∀G1,L1,T1,T. ❪G1,L1❫ ⊢ T1 ⬈* T → ∀T0. T ≅ T0 → ∀G2,L2,T2. ❪G1,L1,T0❫ ≥ ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫. /3 width=3 by cpxs_fpbs_trans, teqx_fpbs_trans/ qed-. lemma cpxs_teqx_fpbs: ∀G,L,T1,T. ❪G,L❫ ⊢ T1 ⬈* T → - ∀T2. T ≛ T2 → ❪G,L,T1❫ ≥ ❪G,L,T2❫. -/4 width=3 by cpxs_fpbs_trans, feqx_fpbs, teqx_feqx/ qed. + ∀T2. T ≅ T2 → ❪G,L,T1❫ ≥ ❪G,L,T2❫. +/4 width=3 by cpxs_fpbs_trans, feqx_fpbs, teqg_feqg/ qed. (* Properties with star-iterated structural successor for closures **********) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_fqup.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_fqup.ma index 9cd35030d..e4c5ac28a 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_fqup.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_fqup.ma @@ -13,7 +13,7 @@ (**************************************************************************) include "static_2/s_computation/fqus_fqup.ma". -include "static_2/static/feqx_fqup.ma". +include "static_2/static/feqg_fqup.ma". include "basic_2/rt_computation/fpbs_fqus.ma". (* PARALLEL RST-COMPUTATION FOR CLOSURES ************************************) @@ -21,14 +21,14 @@ include "basic_2/rt_computation/fpbs_fqus.ma". (* Advanced properties ******************************************************) lemma teqx_fpbs_trans: - ∀T1,T. T1 ≛ T → + ∀T1,T. T1 ≅ T → ∀G1,G2,L1,L2,T2. ❪G1,L1,T❫ ≥ ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫. -/3 width=5 by feqx_fpbs_trans, teqx_feqx/ qed-. +/3 width=5 by feqx_fpbs_trans, teqg_feqg/ qed-. lemma fpbs_teqx_trans: ∀G1,G2,L1,L2,T1,T. ❪G1,L1,T1❫ ≥ ❪G2,L2,T❫ → - ∀T2. T ≛ T2 → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫. -/3 width=5 by fpbs_feqx_trans, teqx_feqx/ qed-. + ∀T2. T ≅ T2 → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫. +/3 width=5 by fpbs_feqx_trans, teqg_feqg/ qed-. (* Properties with plus-iterated structural successor for closures **********) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_lpxs.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_lpxs.ma index 92fd0dd56..b815ae960 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_lpxs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_lpxs.ma @@ -12,11 +12,11 @@ (* *) (**************************************************************************) -include "static_2/static/feqx_fqus.ma". -include "static_2/static/feqx_feqx.ma". +include "static_2/static/feqg_fqus.ma". +include "static_2/static/feqg_feqg.ma". include "basic_2/rt_computation/cpxs_fqus.ma". -include "basic_2/rt_computation/cpxs_feqx.ma". -include "basic_2/rt_computation/lpxs_feqx.ma". +include "basic_2/rt_computation/cpxs_feqg.ma". +include "basic_2/rt_computation/lpxs_feqg.ma". include "basic_2/rt_computation/fpbs_cpxs.ma". (* PARALLEL RST-COMPUTATION FOR CLOSURES ************************************) @@ -46,7 +46,7 @@ qed-. (* Basic_2A1: uses: lpxs_lleq_fpbs *) lemma lpxs_feqx_fpbs: ∀G1,L1,L,T1. ❪G1,L1❫ ⊢ ⬈* L → - ∀G2,L2,T2. ❪G1,L,T1❫ ≛ ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫. + ∀G2,L2,T2. ❪G1,L,T1❫ ≅ ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫. /3 width=3 by lpxs_fpbs_trans, feqx_fpbs/ qed. lemma fpbs_lpx_trans: @@ -71,7 +71,7 @@ lemma cpxs_fqus_lpxs_fpbs: lemma fpbs_cpxs_teqx_fqup_lpx_trans: ∀G1,G3,L1,L3,T1,T3. ❪G1,L1,T1❫ ≥ ❪G3,L3,T3❫ → - ∀T4. ❪G3,L3❫ ⊢ T3 ⬈* T4 → ∀T5. T4 ≛ T5 → + ∀T4. ❪G3,L3❫ ⊢ T3 ⬈* T4 → ∀T5. T4 ≅ T5 → ∀G2,L4,T2. ❪G3,L3,T5❫ ⬂+ ❪G2,L4,T2❫ → ∀L2. ❪G2,L4❫ ⊢ ⬈ L2 → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫. #G1 #G3 #L1 #L3 #T1 #T3 #H13 #T4 #HT34 #T5 #HT45 #G2 #L4 #T2 #H34 #L2 #HL42 @@ -87,7 +87,7 @@ lemma fpbs_intro_star: ∀G1,L1,T1,T. ❪G1,L1❫ ⊢ T1 ⬈* T → ∀G,L,T0. ❪G1,L1,T❫ ⬂* ❪G,L,T0❫ → ∀L0. ❪G,L❫ ⊢ ⬈* L0 → - ∀G2,L2,T2. ❪G,L0,T0❫ ≛ ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫ . + ∀G2,L2,T2. ❪G,L0,T0❫ ≅ ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫ . /3 width=5 by cpxs_fqus_lpxs_fpbs, fpbs_strap1, fpbq_feqx/ qed. (* Advanced inversion lemmas *************************************************) @@ -95,9 +95,9 @@ lemma fpbs_intro_star: (* Basic_2A1: uses: fpbs_inv_alt *) lemma fpbs_inv_star: ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫ → - ∃∃G,L,L0,T,T0. ❪G1,L1❫ ⊢ T1 ⬈* T & ❪G1,L1,T❫ ⬂* ❪G,L,T0❫ & ❪G,L❫ ⊢ ⬈* L0 & ❪G,L0,T0❫ ≛ ❪G2,L2,T2❫. + ∃∃G,L,L0,T,T0. ❪G1,L1❫ ⊢ T1 ⬈* T & ❪G1,L1,T❫ ⬂* ❪G,L,T0❫ & ❪G,L❫ ⊢ ⬈* L0 & ❪G,L0,T0❫ ≅ ❪G2,L2,T2❫. #G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind_dx … H) -G1 -L1 -T1 -[ /2 width=9 by ex4_5_intro/ +[ /3 width=9 by feqg_refl, ex4_5_intro/ | #G1 #G0 #L1 #L0 #T1 #T0 * -G0 -L0 -T0 [ #G0 #L0 #T0 #H10 #_ * #G3 #L3 #L4 #T3 #T4 #HT03 #H34 #HL34 #H42 elim (fquq_cpxs_trans … HT03 … H10) -T0 @@ -109,10 +109,10 @@ lemma fpbs_inv_star: elim (lpx_fqus_trans … H34 … HL10) -L0 /3 width=9 by lpxs_step_sn, cpxs_trans, ex4_5_intro/ | #G0 #L0 #T0 #H10 #_ * #G3 #L3 #L4 #T3 #T4 #HT03 #H34 #HL34 #H42 - elim (feqx_cpxs_trans … H10 … HT03) -T0 #T0 #HT10 #H03 - elim (feqx_fqus_trans … H03 … H34) -G0 -L0 -T3 #G0 #L0 #T3 #H03 #H34 - elim (feqx_lpxs_trans … H34 … HL34) -L3 #L3 #HL03 #H34 - /3 width=13 by feqx_trans, ex4_5_intro/ + elim (feqg_cpxs_trans … H10 … HT03) -T0 // #T0 #HT10 #H03 + elim (feqg_fqus_trans … H03 … H34) -G0 -L0 -T3 // #G0 #L0 #T3 #H03 #H34 + elim (feqg_lpxs_trans … H34 … HL34) -L3 // #L3 #HL03 #H34 + /3 width=13 by feqg_trans, ex4_5_intro/ ] ] qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fsb_csx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fsb_csx.ma index 9991033e1..e8aebb213 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fsb_csx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fsb_csx.ma @@ -48,9 +48,9 @@ generalize in match IHu; -IHu generalize in match H10; -H10 | #G3 #L3 #T3 #H03 #_ elim (lpx_fqup_trans … H03 … HL02) -L2 #L4 #T4 #HT04 #H43 #HL43 elim (teqx_dec T0 T4) [ -IHc -HT04 #HT04 | -IHu #HnT04 ] - [ elim (teqx_fqup_trans … H43 … HT04) -T4 #L2 #T4 #H04 #HT43 #HL24 + [ elim (teqg_fqup_trans … H43 … HT04) -T4 // #L2 #T4 #H04 #HT43 #HL24 /4 width=7 by fsb_fpbs_trans, teqx_reqx_lpx_fpbs, fpbs_fqup_trans/ - | elim (cpxs_tneqx_fwd_step_sn … HT04 HnT04) -HT04 -HnT04 #T2 #HT02 #HnT02 #HT24 + | elim (cpxs_tneqg_fwd_step_sn … HT04 HnT04) -HT04 -HnT04 // #T2 #HT02 #HnT02 #HT24 elim (fpbs_cpx_tneqx_trans … H10 … HT02 HnT02) -T0 #T0 #HT10 #HnT10 #H02 /3 width=14 by fpbs_cpxs_teqx_fqup_lpx_trans/ ] diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fsb_feqg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fsb_feqg.ma new file mode 100644 index 000000000..b18057900 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fsb_feqg.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_2/rt_transition/fpb_feqg.ma". +include "basic_2/rt_computation/fsb.ma". + +(* STRONGLY NORMALIZING CLOSURES FOR PARALLEL RST-TRANSITION ****************) + +(* Properties with generic equivalence for closures *************************) + +lemma fsb_feqg_trans (S): + reflexive … S → symmetric … S → Transitive … S → + ∀G1,L1,T1. ≥𝐒 ❪G1,L1,T1❫ → + ∀G2,L2,T2. ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫ → ≥𝐒 ❪G2,L2,T2❫. +#S #H1S #H2S #H3S #G1 #L1 #T1 #H @(fsb_ind_alt … H) -G1 -L1 -T1 +#G1 #L1 #T1 #_ #IH #G2 #L2 #T2 #H12 +@fsb_intro #G #L #T #H2 +elim (feqg_fpb_trans … H12 … H2) -G2 -L2 -T2 +/2 width=5 by/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fsb_fpbg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fsb_fpbg.ma index 41138b8a5..cdea1a396 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fsb_fpbg.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/fsb_fpbg.ma @@ -13,7 +13,7 @@ (**************************************************************************) include "basic_2/rt_computation/fpbg_fpbs.ma". -include "basic_2/rt_computation/fsb_feqx.ma". +include "basic_2/rt_computation/fsb_feqg.ma". (* STRONGLY NORMALIZING CLOSURES FOR PARALLEL RST-TRANSITION ****************) @@ -25,7 +25,7 @@ lemma fsb_fpbs_trans: #G1 #L1 #T1 #H @(fsb_ind_alt … H) -G1 -L1 -T1 #G1 #L1 #T1 #H1 #IH #G2 #L2 #T2 #H12 elim (fpbs_inv_fpbg … H12) -H12 -[ -IH /2 width=5 by fsb_feqx_trans/ +[ -IH /2 width=9 by fsb_feqg_trans/ | -H1 * /2 width=5 by/ ] qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_feqg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_feqg.ma new file mode 100644 index 000000000..8656ce5d4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_feqg.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 "static_2/static/feqg.ma". +include "basic_2/rt_computation/lpxs_reqg.ma". + +(* EXTENDED PARALLEL RT-COMPUTATION FOR FULL LOCAL ENVIRONMENTS **************) + +(* Properties with generic equivalence on closures ***************************) + +lemma feqg_lpxs_trans (S): + reflexive … S → symmetric … S → + ∀G1,G2,L1,L0,T1,T2. ❪G1,L1,T1❫ ≛[S] ❪G2,L0,T2❫ → + ∀L2. ❪G2,L0❫ ⊢⬈* L2 → + ∃∃L. ❪G1,L1❫ ⊢⬈* L & ❪G1,L,T1❫ ≛[S] ❪G2,L2,T2❫. +#S #H1S #H2S #G1 #G2 #L1 #L0 #T1 #T2 #H1 #L2 #HL02 +elim (feqg_inv_gen_dx … H1) -H1 // #HG #HL10 #HT12 destruct +elim (reqg_lpxs_trans … HL02 … HL10) -L0 // #L0 #HL10 #HL02 +/3 width=3 by feqg_intro_dx, ex2_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_reqg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_reqg.ma new file mode 100644 index 000000000..2343788f8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_reqg.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_2/rt_transition/lpx_reqg.ma". +include "basic_2/rt_computation/lpxs_lpx.ma". + +(* EXTENDED PARALLEL RT-COMPUTATION FOR FULL LOCAL ENVIRONMENTS *************) + +(* Properties with generic equivalence on referred entries ******************) + +(* Basic_2A1: uses: lleq_lpxs_trans *) +lemma reqg_lpxs_trans (S) (G) (T:term): + reflexive … S → symmetric … S → + ∀L2,K2. ❪G,L2❫ ⊢ ⬈* K2 → ∀L1. L1 ≛[S,T] L2 → + ∃∃K1. ❪G,L1❫ ⊢ ⬈* K1 & K1 ≛[S,T] K2. +#S #G #T #H1S #H2S #L2 #K2 #H @(lpxs_ind_sn … H) -L2 /2 width=3 by ex2_intro/ +#L #L2 #HL2 #_ #IH #L1 #HT +elim (reqg_lpx_trans … HL2 … HT) // -L #L #HL1 #HT +elim (IH … HT) -L2 #K #HLK #HT +/3 width=3 by lpxs_step_sn, ex2_intro/ +qed-. + +(* Basic_2A1: uses: lpxs_nlleq_inv_step_sn *) +lemma lpxs_rneqg_inv_step_sn (S) (G) (T:term): + reflexive … S → symmetric … S → Transitive … S → + (∀s1,s2. Decidable (S s1 s2)) → + ∀L1,L2. ❪G,L1❫ ⊢ ⬈* L2 → (L1 ≛[S,T] L2 → ⊥) → + ∃∃L,L0. ❪G,L1❫ ⊢ ⬈ L & L1 ≛[S,T] L → ⊥ & ❪G,L❫ ⊢ ⬈* L0 & L0 ≛[S,T] L2. +#S #G #T #H1S #H2S #H3S #H4S #L1 #L2 #H @(lpxs_ind_sn … H) -L1 +[ #H elim H -H /2 width=1 by reqg_refl/ +| #L1 #L #H1 #H2 #IH2 #H12 elim (reqg_dec S … L1 L T) // #H + [ -H1 -H2 elim IH2 -IH2 /3 width=3 by reqg_trans/ -H12 + #L0 #L3 #H1 #H2 #H3 #H4 lapply (reqg_rneqg_trans … H … H2) -H2 // + #H2 elim (reqg_lpx_trans … H1 … H) -L // + #L #H1 #H lapply (rneqg_reqg_div … H … H2) -H2 // + #H2 elim (reqg_lpxs_trans … H3 … H) -L0 + /3 width=8 by reqg_trans, ex4_2_intro/ + | -H12 -IH2 /3 width=6 by reqg_refl, ex4_2_intro/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx.ma index 9d6248571..e7f603209 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx.ma @@ -19,7 +19,7 @@ include "basic_2/rt_transition/lpx.ma". (* STRONGLY NORMALIZING REFERRED LOCAL ENVS FOR EXTENDED RT-TRANSITION ******) definition rsx (G) (T): predicate lenv ≝ - SN … (lpx G) (reqx T). + SN … (lpx G) (λL1,L2. L1 ≅[T] L2). interpretation "strong normalization for extended context-sensitive parallel rt-transition on referred entries (local environment)" @@ -30,7 +30,7 @@ interpretation (* Basic_2A1: uses: lsx_ind *) lemma rsx_ind (G) (T) (Q:predicate …): (∀L1. G ⊢ ⬈*𝐒[T] L1 → - (∀L2. ❪G,L1❫ ⊢ ⬈ L2 → (L1 ≛[T] L2 → ⊥) → Q L2) → + (∀L2. ❪G,L1❫ ⊢ ⬈ L2 → (L1 ≅[T] L2 → ⊥) → Q L2) → Q L1 ) → ∀L. G ⊢ ⬈*𝐒[T] L → Q L. @@ -43,7 +43,7 @@ qed-. (* Basic_2A1: uses: lsx_intro *) lemma rsx_intro (G) (T): ∀L1. - (∀L2. ❪G,L1❫ ⊢ ⬈ L2 → (L1 ≛[T] L2 → ⊥) → G ⊢ ⬈*𝐒[T] L2) → + (∀L2. ❪G,L1❫ ⊢ ⬈ L2 → (L1 ≅[T] L2 → ⊥) → G ⊢ ⬈*𝐒[T] L2) → G ⊢ ⬈*𝐒[T] L1. /5 width=1 by SN_intro/ qed. @@ -56,7 +56,7 @@ lemma rsx_fwd_pair_sn (G): #G #I #L #V #T #H @(rsx_ind … H) -L #L1 #_ #IHL1 @rsx_intro #L2 #HL12 #HnL12 -/4 width=3 by reqx_fwd_pair_sn/ +/4 width=3 by reqg_fwd_pair_sn/ qed-. (* Basic_2A1: uses: lsx_fwd_flat_dx *) @@ -66,7 +66,7 @@ lemma rsx_fwd_flat_dx (G): #G #I #L #V #T #H @(rsx_ind … H) -L #L1 #_ #IHL1 @rsx_intro #L2 #HL12 #HnL12 -/4 width=3 by reqx_fwd_flat_dx/ +/4 width=3 by reqg_fwd_flat_dx/ qed-. fact rsx_fwd_pair_aux (G): @@ -74,7 +74,7 @@ fact rsx_fwd_pair_aux (G): ∀I,K,V. L = K.ⓑ[I]V → G ⊢ ⬈*𝐒[V] K. #G #L #H @(rsx_ind … H) -L #L1 #_ #IH #I #K1 #V #H destruct -/5 width=5 by lpx_pair, rsx_intro, reqx_fwd_zero_pair/ +/5 width=5 by lpx_pair, rsx_intro, reqg_fwd_zero_pair/ qed-. lemma rsx_fwd_pair (G): diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_csx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_csx.ma index c56d1c6cc..ee5d0e613 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_csx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_csx.ma @@ -28,7 +28,7 @@ fact rsx_fwd_lref_pair_csx_aux (G): @csx_intro #V2 #HV12 #HnV12 @(IH … I) -IH [1,4: // | -HnV12 | -G #H ] [ /2 width=1 by lpx_pair/ -| elim (reqx_inv_zero_pair_sn … H) -H #Y #X #_ #H1 #H2 destruct -I +| elim (reqg_inv_zero_pair_sn … H) -H #Y #X #_ #H1 #H2 destruct -I /2 width=1 by/ ] qed-. @@ -86,7 +86,7 @@ lemma rsx_lref_pair_lpxs (G): @rsx_intro #Y #HY #HnY elim (lpx_inv_pair_sn … HY) -HY #K2 #V2 #HK02 #HV02 #H destruct elim (teqx_dec V0 V2) #HnV02 destruct [ -IHV0 -HV02 -HK0 | -IHK0 -HnY ] -[ /5 width=5 by rsx_reqx_trans, lpxs_step_dx, reqx_pair/ +[ /5 width=5 by rsx_reqx_trans, lpxs_step_dx, reqg_pair, reqg_refl/ | @(IHV0 … HnV02) -IHV0 -HnV02 [ /2 width=3 by lpxs_cpx_trans/ | /3 width=3 by rsx_lpx_trans, rsx_cpx_trans/ diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_drops.ma index b8d78ca67..6894a72aa 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_drops.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_drops.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "static_2/static/reqx_drops.ma". +include "static_2/static/reqg_drops.ma". include "basic_2/rt_transition/lpx_drops.ma". include "basic_2/rt_computation/rsx_length.ma". include "basic_2/rt_computation/rsx_fqup.ma". @@ -28,7 +28,7 @@ lemma rsx_lifts (G): #G #K #T #H @(rsx_ind … H) -K #K1 #_ #IH #b #f #L1 #HLK1 #Hf #U #HTU @rsx_intro #L2 #HL12 #HnL12 elim (lpx_drops_conf … HLK1 … HL12) -/5 width=9 by reqx_lifts_bi, lpx_fwd_length/ +/5 width=9 by reqg_lifts_bi, lpx_fwd_length/ qed-. (* Inversion lemmas on relocation *******************************************) @@ -39,7 +39,7 @@ lemma rsx_inv_lifts (G): #G #L #U #H @(rsx_ind … H) -L #L1 #_ #IH #b #f #K1 #HLK1 #Hf #T #HTU @rsx_intro #K2 #HK12 #HnK12 elim (drops_lpx_trans … HLK1 … HK12) -HK12 -/4 width=10 by reqx_inv_lifts_bi/ +/4 width=10 by reqg_inv_lifts_bi/ qed-. (* Advanced properties ******************************************************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_fqup.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_fqup.ma index 224ad7717..da358ed85 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_fqup.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_fqup.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "static_2/static/reqx_fqup.ma". +include "static_2/static/reqg_fqup.ma". include "basic_2/rt_computation/rsx.ma". (* STRONGLY NORMALIZING REFERRED LOCAL ENVS FOR EXTENDED RT-TRANSITION ******) @@ -24,7 +24,7 @@ lemma lfsx_atom (G) (T): G ⊢ ⬈*𝐒[T] ⋆. #G #T @rsx_intro #Y #H #HnT lapply (lpx_inv_atom_sn … H) -H #H destruct -elim HnT -HnT // +elim HnT -HnT /2 width=1 by rex_refl/ qed. (* Advanced forward lemmas **************************************************) @@ -38,7 +38,7 @@ lemma rsx_fwd_bind_dx_void (G): @(rsx_ind … H) -L #L1 #_ #IH @rsx_intro #Y #H #HT elim (lpx_inv_unit_sn … H) -H #L2 #HL12 #H destruct -/4 width=4 by reqx_fwd_bind_dx_void/ +/4 width=4 by reqg_fwd_bind_dx_void/ qed-. (* Advanced inversion lemmas ************************************************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_length.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_length.ma index 98951ee64..5e5e36c2d 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_length.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_length.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "static_2/static/reqx_length.ma". +include "static_2/static/reqg_length.ma". include "basic_2/rt_transition/lpx_length.ma". include "basic_2/rt_computation/rsx.ma". @@ -23,18 +23,18 @@ include "basic_2/rt_computation/rsx.ma". (* Basic_2A1: uses: lsx_sort *) lemma rsx_sort (G): ∀L,s. G ⊢ ⬈*𝐒[⋆s] L. #G #L1 #s @rsx_intro #L2 #H #Hs -elim Hs -Hs /3 width=3 by lpx_fwd_length, reqx_sort_length/ +elim Hs -Hs /3 width=3 by lpx_fwd_length, reqg_sort_length/ qed. (* Basic_2A1: uses: lsx_gref *) lemma rsx_gref (G): ∀L,l. G ⊢ ⬈*𝐒[§l] L. #G #L1 #s @rsx_intro #L2 #H #Hs -elim Hs -Hs /3 width=3 by lpx_fwd_length, reqx_gref_length/ +elim Hs -Hs /3 width=3 by lpx_fwd_length, reqg_gref_length/ qed. lemma rsx_unit (G): ∀I,L. G ⊢ ⬈*𝐒[#0] L.ⓤ[I]. #G #I #L1 @rsx_intro #Y #HY #HnY elim HnY -HnY elim (lpx_inv_unit_sn … HY) -HY #L2 #HL12 #H destruct -/3 width=3 by lpx_fwd_length, reqx_unit_length/ +/3 width=3 by lpx_fwd_length, reqg_unit_length/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_lpxs.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_lpxs.ma index 2c8e0ccb0..9490ef8b7 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_lpxs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_lpxs.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/rt_computation/lpxs_reqx.ma". +include "basic_2/rt_computation/lpxs_reqg.ma". include "basic_2/rt_computation/lpxs_lpxs.ma". include "basic_2/rt_computation/rsx_rsx.ma". @@ -22,7 +22,7 @@ include "basic_2/rt_computation/rsx_rsx.ma". (* Basic_2A1: uses: lsx_intro_alt *) lemma rsx_intro_lpxs (G): - ∀L1,T. (∀L2. ❪G,L1❫ ⊢ ⬈* L2 → (L1 ≛[T] L2 → ⊥) → G ⊢ ⬈*𝐒[T] L2) → + ∀L1,T. (∀L2. ❪G,L1❫ ⊢ ⬈* L2 → (L1 ≅[T] L2 → ⊥) → G ⊢ ⬈*𝐒[T] L2) → G ⊢ ⬈*𝐒[T] L1. /4 width=1 by lpx_lpxs, rsx_intro/ qed-. @@ -38,37 +38,38 @@ qed-. lemma rsx_ind_lpxs_reqx (G) (T) (Q:predicate lenv): (∀L1. G ⊢ ⬈*𝐒[T] L1 → - (∀L2. ❪G,L1❫ ⊢ ⬈* L2 → (L1 ≛[T] L2 → ⊥) → Q L2) → + (∀L2. ❪G,L1❫ ⊢ ⬈* L2 → (L1 ≅[T] L2 → ⊥) → Q L2) → Q L1 ) → ∀L1. G ⊢ ⬈*𝐒[T] L1 → - ∀L0. ❪G,L1❫ ⊢ ⬈* L0 → ∀L2. L0 ≛[T] L2 → Q L2. + ∀L0. ❪G,L1❫ ⊢ ⬈* L0 → ∀L2. L0 ≅[T] L2 → Q L2. #G #T #Q #IH #L1 #H @(rsx_ind … H) -L1 #L1 #HL1 #IH1 #L0 #HL10 #L2 #HL02 @IH -IH /3 width=3 by rsx_lpxs_trans, rsx_reqx_trans/ -HL1 #K2 #HLK2 #HnLK2 -lapply (reqx_rneqx_trans … HL02 … HnLK2) -HnLK2 #H -elim (reqx_lpxs_trans … HLK2 … HL02) -L2 #K0 #HLK0 #HK02 -lapply (rneqx_reqx_canc_dx … H … HK02) -H #HnLK0 +lapply (reqg_rneqg_trans … HL02 … HnLK2) -HnLK2 // #H +elim (reqg_lpxs_trans … HLK2 … HL02) -L2 // #K0 #HLK0 #HK02 +lapply (rneqg_reqg_canc_dx … H … HK02) -H // #HnLK0 elim (reqx_dec L1 L0 T) #H -[ lapply (reqx_rneqx_trans … H … HnLK0) -H -HnLK0 #Hn10 +[ lapply (reqg_rneqg_trans … H … HnLK0) -H -HnLK0 // #Hn10 lapply (lpxs_trans … HL10 … HLK0) -L0 #H10 - elim (lpxs_rneqx_inv_step_sn … H10 … Hn10) -H10 -Hn10 - /3 width=8 by reqx_trans/ -| elim (lpxs_rneqx_inv_step_sn … HL10 … H) -HL10 -H #L #K #HL1 #HnL1 #HLK #HKL0 - elim (reqx_lpxs_trans … HLK0 … HKL0) -L0 - /3 width=8 by lpxs_trans, reqx_trans/ + elim (lpxs_rneqg_inv_step_sn … H10 … Hn10) -H10 -Hn10 + /3 width=8 by reqg_trans/ +| elim (lpxs_rneqg_inv_step_sn … HL10 … H) -HL10 -H // #L #K #HL1 #HnL1 #HLK #HKL0 + elim (reqg_lpxs_trans … HLK0 … HKL0) -L0 + /3 width=8 by lpxs_trans, reqg_trans/ ] qed-. (* Basic_2A1: uses: lsx_ind_alt *) lemma rsx_ind_lpxs (G) (T) (Q:predicate lenv): (∀L1. G ⊢ ⬈*𝐒[T] L1 → - (∀L2. ❪G,L1❫ ⊢ ⬈* L2 → (L1 ≛[T] L2 → ⊥) → Q L2) → + (∀L2. ❪G,L1❫ ⊢ ⬈* L2 → (L1 ≅[T] L2 → ⊥) → Q L2) → Q L1 ) → ∀L. G ⊢ ⬈*𝐒[T] L → Q L. #G #T #Q #IH #L #HL -@(rsx_ind_lpxs_reqx … IH … HL) -IH -HL // (**) (* full auto fails *) +@(rsx_ind_lpxs_reqx … IH … HL) -IH -HL +/2 width=3 by rex_refl/ (**) (* full auto fails *) qed-. (* Advanced properties ******************************************************) @@ -83,10 +84,10 @@ fact rsx_bind_lpxs_aux (G): #Y #HY #IHY #L2 #H #HL12 destruct @rsx_intro_lpxs #L0 #HL20 lapply (lpxs_trans … HL12 … HL20) #HL10 #H -elim (rneqx_inv_bind … H) -H [ -IHY | -HY -IHL1 -HL12 ] +elim (rneqg_inv_bind … H) -H // [ -IHY | -HY -IHL1 -HL12 ] [ #HnV elim (reqx_dec L1 L2 V) [ #HV @(IHL1 … HL10) -IHL1 -HL12 -HL10 - /3 width=4 by rsx_lpxs_trans, lpxs_bind_refl_dx, reqx_canc_sn/ (**) (* full auto too slow *) + /3 width=4 by rsx_lpxs_trans, lpxs_bind_refl_dx, reqg_canc_sn/ (**) (* full auto too slow *) | -HnV -HL10 /4 width=4 by rsx_lpxs_trans, lpxs_bind_refl_dx/ ] | /3 width=4 by lpxs_bind_refl_dx/ @@ -109,10 +110,10 @@ lemma rsx_flat_lpxs (G): #L1 #HL1 #IHL1 #L2 #T #H @(rsx_ind_lpxs … H) -L2 #L2 #HL2 #IHL2 #HL12 @rsx_intro_lpxs #L0 #HL20 lapply (lpxs_trans … HL12 … HL20) -#HL10 #H elim (rneqx_inv_flat … H) -H [ -HL1 -IHL2 | -HL2 -IHL1 ] +#HL10 #H elim (rneqg_inv_flat … H) -H // [ -HL1 -IHL2 | -HL2 -IHL1 ] [ #HnV elim (reqx_dec L1 L2 V) [ #HV @(IHL1 … HL10) -IHL1 -HL12 -HL10 - /3 width=5 by rsx_lpxs_trans, reqx_canc_sn/ (**) (* full auto too slow: 47s *) + /3 width=5 by rsx_lpxs_trans, reqg_canc_sn/ (**) (* full auto too slow: 47s *) | -HnV -HL10 /3 width=4 by rsx_lpxs_trans/ ] | /3 width=3 by/ @@ -135,10 +136,10 @@ fact rsx_bind_lpxs_void_aux (G): #Y #HY #IHY #L2 #H #HL12 destruct @rsx_intro_lpxs #L0 #HL20 lapply (lpxs_trans … HL12 … HL20) #HL10 #H -elim (rneqx_inv_bind_void … H) -H [ -IHY | -HY -IHL1 -HL12 ] +elim (rneqg_inv_bind_void … H) -H // [ -IHY | -HY -IHL1 -HL12 ] [ #HnV elim (reqx_dec L1 L2 V) [ #HV @(IHL1 … HL10) -IHL1 -HL12 -HL10 - /3 width=6 by rsx_lpxs_trans, lpxs_bind_refl_dx, reqx_canc_sn/ (**) (* full auto too slow *) + /3 width=6 by rsx_lpxs_trans, lpxs_bind_refl_dx, reqg_canc_sn/ (**) (* full auto too slow *) | -HnV -HL10 /4 width=4 by rsx_lpxs_trans, lpxs_bind_refl_dx/ ] | /3 width=4 by lpxs_bind_refl_dx/ diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_rsx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_rsx.ma index e9e8d7a8b..d1a72230b 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_rsx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_rsx.ma @@ -12,7 +12,8 @@ (* *) (**************************************************************************) -include "basic_2/rt_transition/lpx_reqx.ma". +include "static_2/static/reqx_reqx.ma". +include "basic_2/rt_transition/lpx_reqg.ma". include "basic_2/rt_computation/rsx.ma". (* STRONGLY NORMALIZING REFERRED LOCAL ENVS FOR EXTENDED RT-TRANSITION ******) @@ -22,11 +23,11 @@ include "basic_2/rt_computation/rsx.ma". (* Basic_2A1: uses: lsx_lleq_trans *) lemma rsx_reqx_trans (G): ∀L1,T. G ⊢ ⬈*𝐒[T] L1 → - ∀L2. L1 ≛[T] L2 → G ⊢ ⬈*𝐒[T] L2. + ∀L2. L1 ≅[T] L2 → G ⊢ ⬈*𝐒[T] L2. #G #L1 #T #H @(rsx_ind … H) -L1 #L1 #_ #IHL1 #L2 #HL12 @rsx_intro -#L #HL2 #HnL2 elim (reqx_lpx_trans … HL2 … HL12) -HL2 -/4 width=5 by reqx_repl/ +#L #HL2 #HnL2 elim (reqg_lpx_trans … HL2 … HL12) -HL2 // +/4 width=5 by reqg_repl/ qed-. (* Basic_2A1: uses: lsx_lpx_trans *) @@ -34,5 +35,5 @@ lemma rsx_lpx_trans (G): ∀L1,T. G ⊢ ⬈*𝐒[T] L1 → ∀L2. ❪G,L1❫ ⊢ ⬈ L2 → G ⊢ ⬈*𝐒[T] L2. #G #L1 #T #H @(rsx_ind … H) -L1 #L1 #HL1 #IHL1 #L2 #HL12 -elim (reqx_dec L1 L2 T) /3 width=4 by rsx_reqx_trans/ +elim (reqx_dec … L1 L2 T) /3 width=4 by rsx_reqx_trans/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnr_teqg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnr_teqg.ma new file mode 100644 index 000000000..ef7212aaf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnr_teqg.ma @@ -0,0 +1,97 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "static_2/relocation/lifts_teqx.ma". +include "basic_2/rt_transition/cpr_drops_basic.ma". +include "basic_2/rt_transition/cnr_simple.ma". +include "basic_2/rt_transition/cnr_drops.ma". + +(* NORMAL TERMS FOR CONTEXT-SENSITIVE R-TRANSITION **************************) + +(* Properties with context-free generic equivalence for terms ***************) + +(* Basic_1: was: nf2_dec *) +(* Basic_2A1: uses: cnr_dec *) +lemma cnr_dec_teqg (S) (h) (G) (L): + ∀T1. ∨∨ ❪G,L❫ ⊢ ➡𝐍[h,0] T1 + | ∃∃T2. ❪G,L❫ ⊢ T1 ➡[h,0] T2 & (T1 ≛[S] T2 → ⊥). +#S #h #G #L #T1 +@(fqup_wf_ind_eq (Ⓣ) … G L T1) -G -L -T1 #G0 #L0 #T0 #IH #G #L * * +[ #s #HG #HL #HT destruct -IH + /3 width=4 by cnr_sort, or_introl/ +| #i #HG #HL #HT destruct -IH + elim (drops_F_uni L i) + [ /3 width=6 by cnr_lref_atom, or_introl/ + | * * [ #I | * #V ] #K #HLK + [ /3 width=7 by cnr_lref_unit, or_introl/ + | elim (lifts_total V 𝐔❨↑i❩) #W #HVW + @or_intror @(ex2_intro … W) [ /2 width=6 by cpm_delta_drops/ ] #H + lapply (teqg_inv_lref1 … H) -H #H destruct + /2 width=5 by lifts_inv_lref2_uni_lt/ + | /3 width=7 by cnr_lref_abst, or_introl/ + ] + ] +| #l #HG #HL #HT destruct -IH + /3 width=4 by cnr_gref, or_introl/ +| #p * [ cases p ] #V1 #T1 #HG #HL #HT destruct + [ elim (cpr_subst h G (L.ⓓV1) T1 0 L V1) [| /2 width=1 by drops_refl/ ] #T2 #X2 #HT12 #HXT2 -IH + elim (teqx_dec T1 T2) [ -HT12 #HT12 | #HnT12 ] + [ elim (teqx_inv_lifts_dx … HT12 … HXT2) -T2 #X1 #HXT1 #_ -X2 + @or_intror @(ex2_intro … X1) [ /2 width=3 by cpm_zeta/ ] #H + /2 width=8 by teqg_lifts_inv_pair_sn/ + | @or_intror @(ex2_intro … (+ⓓV1.T2)) [ /2 width=1 by cpm_bind/ ] #H + elim (teqg_inv_pair … H) -H /3 width=2 by teqg_teqx/ + ] + | elim (IH G L V1) [ elim (IH G (L.ⓓV1) T1) [| * | // ] | * | // ] -IH + [ #HT1 #HV1 /3 width=6 by cnr_abbr_neg, or_introl/ + | #T2 #HT12 #HnT12 #_ + @or_intror @(ex2_intro … (-ⓓV1.T2)) [ /2 width=1 by cpm_bind/ ] #H + elim (teqg_inv_pair … H) -H /2 width=1 by/ + | #V2 #HV12 #HnV12 + @or_intror @(ex2_intro … (-ⓓV2.T1)) [ /2 width=1 by cpr_pair_sn/ ] #H + elim (teqg_inv_pair … H) -H /2 width=1 by/ + ] + | elim (IH G L V1) [ elim (IH G (L.ⓛV1) T1) [| * | // ] | * | // ] -IH + [ #HT1 #HV1 /3 width=6 by cnr_abst, or_introl/ + | #T2 #HT12 #HnT12 #_ + @or_intror @(ex2_intro … (ⓛ[p]V1.T2)) [ /2 width=1 by cpm_bind/ ] #H + elim (teqg_inv_pair … H) -H /2 width=1 by/ + | #V2 #HV12 #HnV12 + @or_intror @(ex2_intro … (ⓛ[p]V2.T1)) [ /2 width=1 by cpr_pair_sn/ ] #H + elim (teqg_inv_pair … H) -H /2 width=1 by/ + ] + ] +| * #V1 #T1 #HG #HL #HT destruct [| -IH ] + [ elim (IH G L V1) [ elim (IH G L T1) [| * | // ] | * | // ] -IH + [ #HT1 #HV1 + elim (simple_dec_ex T1) [| * #p * #W1 #U1 #H destruct ] + [ /3 width=6 by cnr_appl_simple, or_introl/ + | elim (lifts_total V1 𝐔❨1❩) #X1 #HVX1 + @or_intror @(ex2_intro … (ⓓ[p]W1.ⓐX1.U1)) [ /2 width=3 by cpm_theta/ ] #H + elim (teqg_inv_pair … H) -H #H destruct + | @or_intror @(ex2_intro … (ⓓ[p]ⓝW1.V1.U1)) [ /2 width=1 by cpm_beta/ ] #H + elim (teqg_inv_pair … H) -H #H destruct + ] + | #T2 #HT12 #HnT12 #_ + @or_intror @(ex2_intro … (ⓐV1.T2)) [ /2 width=1 by cpm_appl/ ] #H + elim (teqg_inv_pair … H) -H /2 width=1 by/ + | #V2 #HV12 #HnV12 + @or_intror @(ex2_intro … (ⓐV2.T1)) [ /2 width=1 by cpr_pair_sn/ ] #H + elim (teqg_inv_pair … H) -H /2 width=1 by/ + ] + | @or_intror @(ex2_intro … T1) [ /2 width=1 by cpm_eps/ ] #H + /2 width=5 by teqg_inv_pair_xy_y/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnr_teqx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnr_teqx.ma index 0f2f9d709..f516a4ef1 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnr_teqx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnr_teqx.ma @@ -12,10 +12,8 @@ (* *) (**************************************************************************) -include "static_2/relocation/lifts_teqx.ma". -include "basic_2/rt_transition/cpr_drops_basic.ma". -include "basic_2/rt_transition/cnr_simple.ma". -include "basic_2/rt_transition/cnr_drops.ma". +include "static_2/syntax/teqx.ma". +include "basic_2/rt_transition/cnr_teqg.ma". (* NORMAL TERMS FOR CONTEXT-SENSITIVE R-TRANSITION **************************) @@ -25,73 +23,5 @@ include "basic_2/rt_transition/cnr_drops.ma". (* Basic_2A1: uses: cnr_dec *) lemma cnr_dec_teqx (h) (G) (L): ∀T1. ∨∨ ❪G,L❫ ⊢ ➡𝐍[h,0] T1 - | ∃∃T2. ❪G,L❫ ⊢ T1 ➡[h,0] T2 & (T1 ≛ T2 → ⊥). -#h #G #L #T1 -@(fqup_wf_ind_eq (Ⓣ) … G L T1) -G -L -T1 #G0 #L0 #T0 #IH #G #L * * -[ #s #HG #HL #HT destruct -IH - /3 width=4 by cnr_sort, or_introl/ -| #i #HG #HL #HT destruct -IH - elim (drops_F_uni L i) - [ /3 width=6 by cnr_lref_atom, or_introl/ - | * * [ #I | * #V ] #K #HLK - [ /3 width=7 by cnr_lref_unit, or_introl/ - | elim (lifts_total V 𝐔❨↑i❩) #W #HVW - @or_intror @(ex2_intro … W) [ /2 width=6 by cpm_delta_drops/ ] #H - lapply (teqx_inv_lref1 … H) -H #H destruct - /2 width=5 by lifts_inv_lref2_uni_lt/ - | /3 width=7 by cnr_lref_abst, or_introl/ - ] - ] -| #l #HG #HL #HT destruct -IH - /3 width=4 by cnr_gref, or_introl/ -| #p * [ cases p ] #V1 #T1 #HG #HL #HT destruct - [ elim (cpr_subst h G (L.ⓓV1) T1 0 L V1) [| /2 width=1 by drops_refl/ ] #T2 #X2 #HT12 #HXT2 -IH - elim (teqx_dec T1 T2) [ -HT12 #HT12 | #HnT12 ] - [ elim (teqx_inv_lifts_dx … HT12 … HXT2) -T2 #X1 #HXT1 #_ -X2 - @or_intror @(ex2_intro … X1) [ /2 width=3 by cpm_zeta/ ] #H - /2 width=7 by teqx_lifts_inv_pair_sn/ - | @or_intror @(ex2_intro … (+ⓓV1.T2)) [ /2 width=1 by cpm_bind/ ] #H - elim (teqx_inv_pair … H) -H /2 width=1 by/ - ] - | elim (IH G L V1) [ elim (IH G (L.ⓓV1) T1) [| * | // ] | * | // ] -IH - [ #HT1 #HV1 /3 width=6 by cnr_abbr_neg, or_introl/ - | #T2 #HT12 #HnT12 #_ - @or_intror @(ex2_intro … (-ⓓV1.T2)) [ /2 width=1 by cpm_bind/ ] #H - elim (teqx_inv_pair … H) -H /2 width=1 by/ - | #V2 #HV12 #HnV12 - @or_intror @(ex2_intro … (-ⓓV2.T1)) [ /2 width=1 by cpr_pair_sn/ ] #H - elim (teqx_inv_pair … H) -H /2 width=1 by/ - ] - | elim (IH G L V1) [ elim (IH G (L.ⓛV1) T1) [| * | // ] | * | // ] -IH - [ #HT1 #HV1 /3 width=6 by cnr_abst, or_introl/ - | #T2 #HT12 #HnT12 #_ - @or_intror @(ex2_intro … (ⓛ[p]V1.T2)) [ /2 width=1 by cpm_bind/ ] #H - elim (teqx_inv_pair … H) -H /2 width=1 by/ - | #V2 #HV12 #HnV12 - @or_intror @(ex2_intro … (ⓛ[p]V2.T1)) [ /2 width=1 by cpr_pair_sn/ ] #H - elim (teqx_inv_pair … H) -H /2 width=1 by/ - ] - ] -| * #V1 #T1 #HG #HL #HT destruct [| -IH ] - [ elim (IH G L V1) [ elim (IH G L T1) [| * | // ] | * | // ] -IH - [ #HT1 #HV1 - elim (simple_dec_ex T1) [| * #p * #W1 #U1 #H destruct ] - [ /3 width=6 by cnr_appl_simple, or_introl/ - | elim (lifts_total V1 𝐔❨1❩) #X1 #HVX1 - @or_intror @(ex2_intro … (ⓓ[p]W1.ⓐX1.U1)) [ /2 width=3 by cpm_theta/ ] #H - elim (teqx_inv_pair … H) -H #H destruct - | @or_intror @(ex2_intro … (ⓓ[p]ⓝW1.V1.U1)) [ /2 width=1 by cpm_beta/ ] #H - elim (teqx_inv_pair … H) -H #H destruct - ] - | #T2 #HT12 #HnT12 #_ - @or_intror @(ex2_intro … (ⓐV1.T2)) [ /2 width=1 by cpm_appl/ ] #H - elim (teqx_inv_pair … H) -H /2 width=1 by/ - | #V2 #HV12 #HnV12 - @or_intror @(ex2_intro … (ⓐV2.T1)) [ /2 width=1 by cpr_pair_sn/ ] #H - elim (teqx_inv_pair … H) -H /2 width=1 by/ - ] - | @or_intror @(ex2_intro … T1) [ /2 width=1 by cpm_eps/ ] #H - /2 width=4 by teqx_inv_pair_xy_y/ - ] -] -qed-. + | ∃∃T2. ❪G,L❫ ⊢ T1 ➡[h,0] T2 & (T1 ≅ T2 → ⊥). +/2 width=1 by cnr_dec_teqg/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx.ma index f958591d4..d4e3de738 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx.ma @@ -52,7 +52,7 @@ qed-. lemma cnx_inv_cast (G) (L): ∀V,T. ❪G,L❫ ⊢ ⬈𝐍 ⓝV.T → ⊥. #G #L #V #T #H lapply (H T ?) -H -/2 width=6 by cpx_eps, teqx_inv_pair_xy_y/ +/2 width=6 by cpx_eps, teqg_inv_pair_xy_y/ qed-. (* Basic properties *********************************************************) @@ -60,7 +60,7 @@ qed-. lemma cnx_sort (G) (L): ∀s. ❪G,L❫ ⊢ ⬈𝐍 ⋆s. #G #L #s #X #H elim (cpx_inv_sort1 … H) -H -/2 width=1 by teqx_sort/ +/2 width=1 by teqg_sort/ qed. lemma cnx_abst (G) (L): diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx_cnx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx_cnx.ma index ba56c516c..46dccc509 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx_cnx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx_cnx.ma @@ -12,6 +12,7 @@ (* *) (**************************************************************************) +include "static_2/syntax/teqx_teqx.ma". include "basic_2/rt_transition/rpx_reqx.ma". include "basic_2/rt_transition/cnx.ma". @@ -20,7 +21,7 @@ include "basic_2/rt_transition/cnx.ma". (* Advanced properties ******************************************************) lemma cnx_teqx_trans (G) (L): - ∀T1. ❪G,L❫ ⊢ ⬈𝐍 T1 → ∀T2. T1 ≛ T2 → ❪G,L❫ ⊢ ⬈𝐍 T2. + ∀T1. ❪G,L❫ ⊢ ⬈𝐍 T1 → ∀T2. T1 ≅ T2 → ❪G,L❫ ⊢ ⬈𝐍 T2. #G #L #T1 #HT1 #T2 #HT12 #T #HT2 lapply (teqx_cpx_trans … HT12 … HT2) -HT2 #H lapply (HT1 … H) -HT1 -H /2 width=5 by teqx_canc_sn/ (**) (* full auto fails *) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx_drops.ma index 57cb5d216..3296683cb 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx_drops.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx_drops.ma @@ -47,7 +47,7 @@ lemma cnx_inv_lref_pair (G) (L): #G #L #I #K #V #i #HLK #H elim (lifts_total V (𝐔❨↑i❩)) #W #HVW lapply (H W ?) -H /2 width=7 by cpx_delta_drops/ -HLK -#H lapply (teqx_inv_lref1 … H) -H #H destruct +#H lapply (teqg_inv_lref1 … H) -H #H destruct /2 width=5 by lifts_inv_lref2_uni_lt/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm_teqx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm_teqx.ma index c465039d8..d52d6fa46 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm_teqx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm_teqx.ma @@ -20,17 +20,17 @@ include "basic_2/rt_transition/cpm_drops.ma". (* Inversion lemmas with sort-irrelevant equivalence for terms **************) lemma cpm_teqx_inv_lref_sn (h) (n) (G) (L) (i): - ∀X. ❪G,L❫ ⊢ #i ➡[h,n] X → #i ≛ X → + ∀X. ❪G,L❫ ⊢ #i ➡[h,n] X → #i ≅ X → ∧∧ X = #i & n = 0. #h #n #G #L #i #X #H1 #H2 -lapply (teqx_inv_lref1 … H2) -H2 #H destruct +lapply (teqg_inv_lref1 … H2) -H2 #H destruct elim (cpm_inv_lref1_drops … H1) -H1 // * [| #m ] #K #V1 #V2 #_ #_ #H -V1 elim (lifts_inv_lref2_uni_lt … H) -H // qed-. lemma cpm_teqx_inv_atom_sn (h) (n) (I) (G) (L): - ∀X. ❪G,L❫ ⊢ ⓪[I] ➡[h,n] X → ⓪[I] ≛ X → + ∀X. ❪G,L❫ ⊢ ⓪[I] ➡[h,n] X → ⓪[I] ≅ X → ∨∨ ∧∧ X = ⓪[I] & n = 0 | ∃∃s. X = ⋆(⫯[h]s) & I = Sort s & n = 1. #h #n * #s #G #L #X #H1 #H2 diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpr_teqg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpr_teqg.ma new file mode 100644 index 000000000..6a6f17b37 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpr_teqg.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 "static_2/relocation/lifts_teqg.ma". +include "basic_2/rt_transition/cpr_drops_basic.ma". + +(* CONTEXT-SENSITIVE PARALLEL R-TRANSITION FOR TERMS ************************) + +(* Properties with context-free generic equivalence *************************) + +lemma cpr_abbr_pos_tneqx (S) (h) (G) (L) (V) (T1): + symmetric … S → (∀s1,s2. Decidable (S s1 s2)) → + ∃∃T2. ❪G,L❫ ⊢ +ⓓV.T1 ➡[h,0] T2 & (+ⓓV.T1 ≛[S] T2 → ⊥). +#S #h #G #L #V #U1 #H1S #H2S +elim (cpr_subst h G (L.ⓓV) U1 … 0) [|*: /2 width=4 by drops_refl/ ] #U2 #T2 #HU12 #HTU2 +elim (teqg_dec … H2S U1 U2) [ -HU12 #HU12 | -HTU2 #HnU12 ] +[ elim (teqg_inv_lifts_dx … HU12 … HTU2) -U2 // #T1 #HTU1 #_ -T2 + /3 width=9 by cpm_zeta, teqg_lifts_inv_pair_sn, ex2_intro/ +| @(ex2_intro … (+ⓓV.U2)) [ /2 width=1 by cpm_bind/ ] -HU12 #H + elim (teqg_inv_pair … H) -H #_ #_ /2 width=1 by/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_feqg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_feqg.ma new file mode 100644 index 000000000..518ece0be --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_feqg.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 "static_2/static/feqg.ma". +include "basic_2/rt_transition/cpx_reqg.ma". +include "basic_2/rt_transition/rpx_reqg.ma". + +(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS **************) + +(* Properties with generic equivalence for closures *************************) + +(**) (* to update *) +lemma feqg_cpx_trans (S): + reflexive … S → symmetric … S → + ∀G1,G2,L1,L2,T1,T. ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T❫ → + ∀T2. ❪G2,L2❫ ⊢ T ⬈ T2 → + ∃∃T0. ❪G1,L1❫ ⊢ T1 ⬈ T0 & ❪G1,L1,T0❫ ≛[S] ❪G2,L2,T2❫. +#S #H1S #H2S #G1 #G2 #L1 #L2 #T1 #T #H #T2 #HT2 +elim (feqg_inv_gen_dx … H) -H // #H #HL12 #HT1 destruct +lapply (reqg_cpx_trans … HL12 … HT2) // #H +lapply (cpx_reqg_conf_dx … HT2 … HL12) -HT2 -HL12 // #HL12 +lapply (teqg_cpx_trans … HT1 … H) -T // #HT12 +/4 width=4 by feqg_intro_sn, teqg_refl, ex2_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_fqus.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_fqus.ma index 31dffbb2a..29ec0f051 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_fqus.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_fqus.ma @@ -72,13 +72,13 @@ qed-. lemma fqu_cpx_trans_tneqx (b): ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂[b] ❪G2,L2,T2❫ → - ∀U2. ❪G2,L2❫ ⊢ T2 ⬈ U2 → (T2 ≛ U2 → ⊥) → - ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈ U1 & T1 ≛ U1 → ⊥ & ❪G1,L1,U1❫ ⬂[b] ❪G2,L2,U2❫. + ∀U2. ❪G2,L2❫ ⊢ T2 ⬈ U2 → (T2 ≅ U2 → ⊥) → + ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈ U1 & T1 ≅ U1 → ⊥ & ❪G1,L1,U1❫ ⬂[b] ❪G2,L2,U2❫. #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 [ #I #G #L #V1 #V2 #HV12 #_ elim (lifts_total V2 𝐔❨1❩) #U2 #HVU2 @(ex3_intro … U2) [1,3: /3 width=7 by cpx_delta, fqu_drop/ - | #H lapply (teqx_inv_lref1 … H) -H + | #H lapply (teqg_inv_lref1 … H) -H #H destruct /2 width=5 by lifts_inv_lref2_uni_lt/ ] | #I #G #L #V1 #T #V2 #HV12 #H0 @(ex3_intro … (②[I]V2.T)) @@ -105,8 +105,8 @@ qed-. lemma fquq_cpx_trans_tneqx (b): ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂⸮[b] ❪G2,L2,T2❫ → - ∀U2. ❪G2,L2❫ ⊢ T2 ⬈ U2 → (T2 ≛ U2 → ⊥) → - ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈ U1 & T1 ≛ U1 → ⊥ & ❪G1,L1,U1❫ ⬂⸮[b] ❪G2,L2,U2❫. + ∀U2. ❪G2,L2❫ ⊢ T2 ⬈ U2 → (T2 ≅ U2 → ⊥) → + ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈ U1 & T1 ≅ U1 → ⊥ & ❪G1,L1,U1❫ ⬂⸮[b] ❪G2,L2,U2❫. #b #G1 #G2 #L1 #L2 #T1 #T2 #H12 elim H12 -H12 [ #H12 #U2 #HTU2 #H elim (fqu_cpx_trans_tneqx … H12 … HTU2 H) -T2 /3 width=4 by fqu_fquq, ex3_intro/ @@ -116,8 +116,8 @@ qed-. lemma fqup_cpx_trans_tneqx (b): ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂+[b] ❪G2,L2,T2❫ → - ∀U2. ❪G2,L2❫ ⊢ T2 ⬈ U2 → (T2 ≛ U2 → ⊥) → - ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈ U1 & T1 ≛ U1 → ⊥ & ❪G1,L1,U1❫ ⬂+[b] ❪G2,L2,U2❫. + ∀U2. ❪G2,L2❫ ⊢ T2 ⬈ U2 → (T2 ≅ U2 → ⊥) → + ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈ U1 & T1 ≅ U1 → ⊥ & ❪G1,L1,U1❫ ⬂+[b] ❪G2,L2,U2❫. #b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1 [ #G1 #L1 #T1 #H12 #U2 #HTU2 #H elim (fqu_cpx_trans_tneqx … H12 … HTU2 H) -T2 /3 width=4 by fqu_fqup, ex3_intro/ @@ -129,8 +129,8 @@ qed-. lemma fqus_cpx_trans_tneqx (b): ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂*[b] ❪G2,L2,T2❫ → - ∀U2. ❪G2,L2❫ ⊢ T2 ⬈ U2 → (T2 ≛ U2 → ⊥) → - ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈ U1 & T1 ≛ U1 → ⊥ & ❪G1,L1,U1❫ ⬂*[b] ❪G2,L2,U2❫. + ∀U2. ❪G2,L2❫ ⊢ T2 ⬈ U2 → (T2 ≅ U2 → ⊥) → + ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈ U1 & T1 ≅ U1 → ⊥ & ❪G1,L1,U1❫ ⬂*[b] ❪G2,L2,U2❫. #b #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fqus_inv_fqup … H12) -H12 [ #H12 elim (fqup_cpx_trans_tneqx … H12 … HTU2 H) -T2 /3 width=4 by fqup_fqus, ex3_intro/ diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_reqg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_reqg.ma new file mode 100644 index 000000000..ae75c0089 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_reqg.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 "static_2/static/reqg_reqg.ma". +include "basic_2/rt_transition/rpx_fsle.ma". + +(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS **************) + +(* Properties with generic equivalence for local environments ***************) + +(* Basic_2A1: was just: cpx_lleq_conf_sn *) +lemma cpx_reqg_conf_sn (S) (G): + s_r_confluent1 … (cpx G) (reqg S). +/3 width=6 by cpx_rex_conf_sn/ qed-. + +(* Basic_2A1: was just: cpx_lleq_conf_dx *) +lemma cpx_reqg_conf_dx (S) (G) (L2): + reflexive … S → symmetric … S → + ∀T1,T2. ❪G,L2❫ ⊢ T1 ⬈ T2 → + ∀L1. L1 ≛[S,T1] L2 → L1 ≛[S,T2] L2. +/4 width=4 by cpx_reqg_conf_sn, reqg_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb.ma index a648ae0e9..f210e63a1 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb.ma @@ -21,8 +21,8 @@ include "basic_2/rt_transition/lpr_lpx.ma". inductive fpb (G1) (L1) (T1): relation3 genv lenv term ≝ | fpb_fqu: ∀G2,L2,T2. ❪G1,L1,T1❫ ⬂ ❪G2,L2,T2❫ → fpb G1 L1 T1 G2 L2 T2 -| fpb_cpx: ∀T2. ❪G1,L1❫ ⊢ T1 ⬈ T2 → (T1 ≛ T2 → ⊥) → fpb G1 L1 T1 G1 L1 T2 -| fpb_lpx: ∀L2. ❪G1,L1❫ ⊢ ⬈ L2 → (L1 ≛[T1] L2 → ⊥) → fpb G1 L1 T1 G1 L2 T1 +| fpb_cpx: ∀T2. ❪G1,L1❫ ⊢ T1 ⬈ T2 → (T1 ≅ T2 → ⊥) → fpb G1 L1 T1 G1 L1 T2 +| fpb_lpx: ∀L2. ❪G1,L1❫ ⊢ ⬈ L2 → (L1 ≅[T1] L2 → ⊥) → fpb G1 L1 T1 G1 L2 T1 . interpretation @@ -33,9 +33,9 @@ interpretation (* Basic_2A1: includes: cpr_fpb *) lemma cpm_fpb (h) (n) (G) (L): - ∀T1,T2. ❪G,L❫ ⊢ T1 ➡[h,n] T2 → (T1 ≛ T2 → ⊥) → ❪G,L,T1❫ ≻ ❪G,L,T2❫. + ∀T1,T2. ❪G,L❫ ⊢ T1 ➡[h,n] T2 → (T1 ≅ T2 → ⊥) → ❪G,L,T1❫ ≻ ❪G,L,T2❫. /3 width=3 by fpb_cpx, cpm_fwd_cpx/ qed. lemma lpr_fpb (h) (G) (T): - ∀L1,L2. ❪G,L1❫ ⊢ ➡[h,0] L2 → (L1 ≛[T] L2 → ⊥) → ❪G,L1,T❫ ≻ ❪G,L2,T❫. + ∀L1,L2. ❪G,L1❫ ⊢ ➡[h,0] L2 → (L1 ≅[T] L2 → ⊥) → ❪G,L1,T❫ ≻ ❪G,L2,T❫. /3 width=2 by fpb_lpx, lpr_fwd_lpx/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_feqg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_feqg.ma new file mode 100644 index 000000000..27f3df4e3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_feqg.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 "static_2/s_transition/fqu_teqg.ma". +include "static_2/static/feqg.ma". +include "basic_2/rt_transition/fpb_reqg.ma". + +(* PROPER PARALLEL RST-TRANSITION FOR CLOSURES ******************************) + +(* Properties with generic equivalence for closures *************************) + +(* Basic_2A1: uses: fleq_fpb_trans *) +lemma feqg_fpb_trans (S): + reflexive … S → symmetric … S → Transitive … S → + ∀F1,F2,K1,K2,T1,T2. ❪F1,K1,T1❫ ≛[S] ❪F2,K2,T2❫ → + ∀G2,L2,U2. ❪F2,K2,T2❫ ≻ ❪G2,L2,U2❫ → + ∃∃G1,L1,U1. ❪F1,K1,T1❫ ≻ ❪G1,L1,U1❫ & ❪G1,L1,U1❫ ≛[S] ❪G2,L2,U2❫. +#S #H1S #H2S #H3S #F1 #F2 #K1 #K2 #T1 #T2 * -F2 -K2 -T2 +#K2 #T2 #HK12 #HT12 #G2 #L2 #U2 #H12 +elim (teqg_fpb_trans … HT12 … H12) -T2 // #K0 #T0 #H #HT0 #HK0 +elim (reqg_fpb_trans … HK12 … H) -K2 // #L0 #U0 #H #HUT0 #HLK0 +@(ex2_3_intro … H) -H (**) (* full auto too slow *) +/4 width=5 by feqg_intro_dx, reqg_trans, teqg_reqg_conf_sn, teqg_trans/ +qed-. + +(* Inversion lemmas with generic equivalence for closures *******************) + +(* Basic_2A1: uses: fpb_inv_fleq *) +lemma fpb_inv_feqg (S): + ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≻ ❪G2,L2,T2❫ → + ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫ → ⊥. +#S #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 +[ #G2 #L2 #T2 #H12 #H elim (feqg_inv_gen_sn … H) -H + /3 width=11 by reqg_fwd_length, fqu_inv_teqg/ +| #T2 #_ #HnT #H elim (feqg_inv_gen_sn … H) -H /3 width=2 by teqg_teqx/ +| #L2 #_ #HnL #H elim (feqg_inv_gen_sn … H) -H /3 width=2 by reqg_reqx/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_reqg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_reqg.ma new file mode 100644 index 000000000..6ab2c4da6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_reqg.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 "static_2/static/reqg_fqus.ma". +include "basic_2/rt_transition/cpx_reqg.ma". +include "basic_2/rt_transition/lpx_reqg.ma". +include "basic_2/rt_transition/fpb.ma". + +(* PROPER PARALLEL RST-TRANSITION FOR CLOSURES ******************************) + +(* Properties with generic equivalence for local environments ***************) + +lemma teqg_fpb_trans (S): + reflexive … S → symmetric … S → + ∀U2,U1. U2 ≛[S] U1 → + ∀G1,G2,L1,L2,T1. ❪G1,L1,U1❫ ≻ ❪G2,L2,T1❫ → + ∃∃L,T2. ❪G1,L1,U2❫ ≻ ❪G2,L,T2❫ & T2 ≛[S] T1 & L ≛[S,T1] L2. +#S #H1S #H2S #U2 #U1 #HU21 #G1 #G2 #L1 #L2 #T1 * -G2 -L2 -T1 +[ #G2 #L2 #T1 #H + elim (teqg_fqu_trans … H … HU21) -H + /3 width=5 by fpb_fqu, ex3_2_intro/ +| #T1 #HUT1 #HnUT1 + lapply (teqg_cpx_trans … HU21 … HUT1) -HUT1 + /6 width=5 by fpb_cpx, reqg_refl, teqg_teqx, teqg_canc_sn, teqg_refl, ex3_2_intro/ +| /5 width=5 by fpb_lpx, teqg_reqg_conf_sn, reqg_refl, ex3_2_intro/ +] +qed-. + +(* Basic_2A1: was just: lleq_fpb_trans *) +lemma reqg_fpb_trans (S): + reflexive … S → symmetric … S → + ∀F,K1,K2,T. K1 ≛[S,T] K2 → + ∀G,L2,U. ❪F,K2,T❫ ≻ ❪G,L2,U❫ → + ∃∃L1,U0. ❪F,K1,T❫ ≻ ❪G,L1,U0❫ & U0 ≛[S] U & L1 ≛[S,U] L2. +#S #H1S #H2S #F #K1 #K2 #T #HT #G #L2 #U * -G -L2 -U +[ #G #L2 #U #H2 elim (reqg_fqu_trans … H2 … HT) -K2 + /3 width=5 by fpb_fqu, ex3_2_intro/ +| #U #HTU #HnTU lapply (reqg_cpx_trans … HT … HTU) -HTU // + /4 width=8 by fpb_cpx, cpx_reqg_conf_sn, teqg_refl, ex3_2_intro/ +| #L2 #HKL2 #HnKL2 elim (reqg_lpx_trans … HKL2 … HT) -HKL2 // + /6 width=9 by fpb_lpx, reqg_reqx, reqg_repl, teqg_refl, ex3_2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq.ma index 1290c2970..2a12bf05f 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq.ma @@ -24,7 +24,7 @@ inductive fpbq (G1) (L1) (T1): relation3 genv lenv term ≝ | fpbq_fquq: ∀G2,L2,T2. ❪G1,L1,T1❫ ⬂⸮ ❪G2,L2,T2❫ → fpbq G1 L1 T1 G2 L2 T2 | fpbq_cpx : ∀T2. ❪G1,L1❫ ⊢ T1 ⬈ T2 → fpbq G1 L1 T1 G1 L1 T2 | fpbq_lpx : ∀L2. ❪G1,L1❫ ⊢ ⬈ L2 → fpbq G1 L1 T1 G1 L2 T1 -| fpbq_feqx: ∀G2,L2,T2. ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫ → fpbq G1 L1 T1 G2 L2 T2 +| fpbq_feqx: ∀G2,L2,T2. ❪G1,L1,T1❫ ≅ ❪G2,L2,T2❫ → fpbq G1 L1 T1 G2 L2 T2 . interpretation diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq_aaa.ma index 5df72f4af..452145541 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq_aaa.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq_aaa.ma @@ -13,7 +13,7 @@ (**************************************************************************) include "static_2/static/aaa_fqus.ma". -include "static_2/static/aaa_feqx.ma". +include "static_2/static/aaa_feqg.ma". include "basic_2/rt_transition/lpx_aaa.ma". include "basic_2/rt_transition/fpbq.ma". @@ -25,5 +25,5 @@ lemma fpbq_aaa_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 * -G2 -L2 -T2 -/3 width=8 by lpx_aaa_conf, cpx_aaa_conf, aaa_feqx_conf, aaa_fquq_conf, ex_intro/ +/3 width=8 by lpx_aaa_conf, cpx_aaa_conf, aaa_feqg_conf, aaa_fquq_conf, ex_intro/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq_fpb.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq_fpb.ma index e49faa0eb..7f0fa2577 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq_fpb.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq_fpb.ma @@ -12,7 +12,9 @@ (* *) (**************************************************************************) -include "basic_2/rt_transition/fpb_feqx.ma". +include "static_2/static/feqg_fqup.ma". +include "static_2/static/feqg_feqg.ma". +include "basic_2/rt_transition/fpb_feqg.ma". include "basic_2/rt_transition/fpbq.ma". (* PARALLEL RST-TRANSITION FOR CLOSURES *************************************) @@ -27,33 +29,37 @@ lemma fpb_fpbq: qed. (* Basic_2A1: fpb_fpbq_alt *) -lemma fpb_fpbq_fneqx: +lemma fpb_fpbq_fneqx (S): ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≻ ❪G2,L2,T2❫ → - ∧∧ ❪G1,L1,T1❫ ≽ ❪G2,L2,T2❫ & (❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫ → ⊥). -/3 width=10 by fpb_fpbq, fpb_inv_feqx, conj/ qed-. + ∧∧ ❪G1,L1,T1❫ ≽ ❪G2,L2,T2❫ & (❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫ → ⊥). +/3 width=10 by fpb_fpbq, fpb_inv_feqg, conj/ qed-. (* Inversrion lemmas with proper parallel rst-transition for closures *******) -(* Basic_2A1: uses: fpbq_ind_alt *) -lemma fpbq_inv_fpb: +(* Basic_2A1: fpbq_inv_fpb_alt *) +lemma fpbq_fneqx_inv_fpb: ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≽ ❪G2,L2,T2❫ → - ∨∨ ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫ - | ❪G1,L1,T1❫ ≻ ❪G2,L2,T2❫. + (❪G1,L1,T1❫ ≅ ❪G2,L2,T2❫ → ⊥) → ❪G1,L1,T1❫ ≻ ❪G2,L2,T2❫. #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 [ #G2 #L2 #T2 * [2: * #H1 #H2 #H3 destruct ] - /3 width=1 by fpb_fqu, feqx_intro_sn, or_intror, or_introl/ -| #T2 #H elim (teqx_dec T1 T2) - /4 width=1 by fpb_cpx, feqx_intro_sn, or_intror, or_introl/ -| #L2 elim (reqx_dec L1 L2 T1) - /4 width=1 by fpb_lpx, feqx_intro_sn, or_intror, or_introl/ -| /2 width=1 by or_introl/ + [ #H elim H -H /2 width=1 by feqg_refl/ + | /2 width=1 by fpb_fqu/ + ] +| /4 width=1 by fpb_cpx, teqg_feqg/ +| /4 width=1 by fpb_lpx, feqg_intro_sn/ +| #G2 #L2 #T2 #H12 #Hn12 + elim Hn12 -Hn12 // ] qed-. -(* Basic_2A1: fpbq_inv_fpb_alt *) -lemma fpbq_fneqx_inv_fpb: +(* Basic_2A1: uses: fpbq_ind_alt *) +lemma fpbq_inv_fpb: ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≽ ❪G2,L2,T2❫ → - (❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫ → ⊥) → ❪G1,L1,T1❫ ≻ ❪G2,L2,T2❫. -#G1 #G2 #L1 #L2 #T1 #T2 #H #H0 -elim (fpbq_inv_fpb … H) -H // #H elim H0 -H0 // + ∨∨ ❪G1,L1,T1❫ ≅ ❪G2,L2,T2❫ + | ❪G1,L1,T1❫ ≻ ❪G2,L2,T2❫. +#G1 #G2 #L1 #L2 #T1 #T2 #H +elim (feqg_dec sfull … G1 G2 L1 L2 T1 T2) // +[ /2 width=1 by or_introl/ +| /4 width=1 by fpbq_fneqx_inv_fpb, or_intror/ +] qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_reqg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_reqg.ma new file mode 100644 index 000000000..4041da979 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_reqg.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 "static_2/static/req.ma". +include "basic_2/rt_transition/rpx_lpx.ma". + +(* EXTENDED PARALLEL RT-TRANSITION FOR FULL LOCAL ENVIRONMENTS **************) + +(* Properties with generic equivalence for local environments ***************) + +lemma reqg_lpx_trans_rpx (S) (G) (L) (T:term): + ∀L1. L1 ≛[S,T] L → ∀L2. ❪G,L❫ ⊢ ⬈ L2 → ❪G,L❫ ⊢ ⬈[T] L2. +/3 width=1 by lpx_rpx, reqg_rpx_trans/ qed. + +(* Basic_2A1: uses: lleq_lpx_trans *) +lemma reqg_lpx_trans (S) (G) (T:term): + reflexive … S → symmetric … S → + ∀L2,K2. ❪G,L2❫ ⊢ ⬈ K2 → ∀L1. L1 ≛[S,T] L2 → + ∃∃K1. ❪G,L1❫ ⊢ ⬈ K1 & K1 ≛[S,T] K2. +#S #G #T #H1S #H2S #L2 #K2 #HLK2 #L1 #HL12 +lapply (lpx_rpx … T … HLK2) -HLK2 #HLK2 +lapply (reqg_rpx_trans … HL12 … HLK2) -L2 // #H +elim (rpx_fwd_lpx_req … H) -H #K1 #HLK1 #HK12 +/3 width=3 by req_fwd_reqg, ex2_intro/ +qed-. + +(* Inversion lemmas with sort-irrelevant equivalence for local environments *) + +lemma rpx_inv_reqg_lpx (S) (G) (T): + reflexive … S → + ∀L1,L2. ❪G,L1❫ ⊢ ⬈[T] L2 → + ∃∃L. L1 ≛[S,T] L & ❪G,L❫ ⊢ ⬈ L2. +#S #G #T #HS #L1 #L2 #H +elim (rpx_inv_req_lpx … H) -H #L #HL1 #HL2 +/3 width=3 by req_fwd_reqg, ex2_intro/ +qed-. + +(* Forward lemmas with sort-irrelevant equivalence for local environments ***) + +lemma rpx_fwd_lpx_reqg (S) (G) (T): + reflexive … S → + ∀L1,L2. ❪G,L1❫ ⊢ ⬈[T] L2 → + ∃∃L. ❪G,L1❫ ⊢ ⬈ L & L ≛[S,T] L2. +#S #G #T #HS #L1 #L2 #H +elim (rpx_fwd_lpx_req … H) -H #L #HL1 #HL2 +/3 width=3 by req_fwd_reqg, ex2_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_lpx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_lpx.ma index 3d9b9081c..845fc6d27 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_lpx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_lpx.ma @@ -13,7 +13,7 @@ (**************************************************************************) include "static_2/static/rex_lex.ma". -include "basic_2/rt_transition/cpx_req.ma". +include "basic_2/rt_transition/rpx_reqg.ma". include "basic_2/rt_transition/lpx.ma". (* EXTENDED PARALLEL RT-TRANSITION FOR REFERRED LOCAL ENVIRONMENTS **********) @@ -35,7 +35,7 @@ lemma lpx_rpx (G) (T): lemma rpx_inv_req_lpx (G) (T): ∀L1,L2. ❪G,L1❫ ⊢ ⬈[T] L2 → ∃∃L. L1 ≡[T] L & ❪G,L❫ ⊢ ⬈ L2. -/4 width=13 by cpx_req_conf, rex_inv_req_lex, rex_conf1_next/ qed-. +/4 width=13 by cpx_reqg_conf, rex_inv_req_lex, rex_conf1_next/ qed-. (* Forward lemmas with extended rt-transition for full local envs ***********) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_reqg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_reqg.ma new file mode 100644 index 000000000..585ecef04 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_reqg.ma @@ -0,0 +1,177 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "static_2/static/reqg_drops.ma". +include "static_2/static/reqg_fqup.ma". +include "static_2/static/reqg_reqg.ma". +include "basic_2/rt_transition/rpx_fsle.ma". + +(* EXTENDED PARALLEL RT-TRANSITION FOR REFERRED LOCAL ENVIRONMENTS **********) + +(* Properties with generic equivalence for local environments ***************) + +lemma rpx_pair_sn_split (S) (G): + reflexive … S → + ∀L1,L2,V. ❪G,L1❫ ⊢ ⬈[V] L2 → ∀I,T. + ∃∃L. ❪G,L1❫ ⊢ ⬈[②[I]V.T] L & L ≛[S,V] L2. +/3 width=5 by rpx_fsge_comp, rex_pair_sn_split, teqg_refl/ qed-. + +lemma rpx_flat_dx_split (S) (G): + reflexive … S → + ∀L1,L2,T. ❪G,L1❫ ⊢ ⬈[T] L2 → ∀I,V. + ∃∃L. ❪G,L1❫ ⊢ ⬈[ⓕ[I]V.T] L & L ≛[S,T] L2. +/3 width=5 by rpx_fsge_comp, rex_flat_dx_split, teqg_refl/ qed-. + +lemma rpx_bind_dx_split (S) (G): + reflexive … S → + ∀I,L1,L2,V1,T. ❪G,L1.ⓑ[I]V1❫ ⊢ ⬈[T] L2 → ∀p. + ∃∃L,V. ❪G,L1❫ ⊢ ⬈[ⓑ[p,I]V1.T] L & L.ⓑ[I]V ≛[S,T] L2 & ❪G,L1❫ ⊢ V1 ⬈ V. +/3 width=5 by rpx_fsge_comp, rex_bind_dx_split, teqg_refl/ qed-. + +lemma rpx_bind_dx_split_void (S) (G): + reflexive … S → + ∀K1,L2,T. ❪G,K1.ⓧ❫ ⊢ ⬈[T] L2 → ∀p,I,V. + ∃∃K2. ❪G,K1❫ ⊢ ⬈[ⓑ[p,I]V.T] K2 & K2.ⓧ ≛[S,T] L2. +/3 width=5 by rpx_fsge_comp, rex_bind_dx_split_void, teqg_refl/ qed-. + +lemma rpx_teqg_conf_sn (S) (G): + reflexive … S → + s_r_confluent1 … (ceqg S) (rpx G). +/2 width=5 by teqg_rex_conf_sn/ qed-. + +lemma rpx_teqg_div (S) (G): + reflexive … S → symmetric … S → + ∀T1,T2. T1 ≛[S] T2 → ∀L1,L2. ❪G,L1❫ ⊢ ⬈[T2] L2 → ❪G,L1❫ ⊢ ⬈[T1] L2. +/2 width=6 by teqg_rex_div/ qed-. + +lemma cpx_teqg_repl_reqg (S) (G) (L0) (T0): + reflexive … S → + ∀T1. ❪G,L0❫ ⊢ T0 ⬈ T1 → ∀T2. T0 ≛[S] T2 → ∀T3. T1 ≛[S] T3 → + ∀L2. L0 ≛[S,T0] L2 → ❪G,L2❫ ⊢ T2 ⬈ T3. +#S #G #L0 #T0 #HS #T1 #H @(cpx_ind … H) -G -L0 -T0 -T1 +[ * #x0 #G #L0 #X2 #HX2 #X3 #HX3 #L2 #_ + [ elim (teqg_inv_sort1 … HX2) -HX2 #x2 #Hx02 #H destruct + elim (teqg_inv_sort1 … HX3) -HX3 #x3 #Hx03 #H destruct // + | lapply (teqg_inv_lref1 … HX2) -HX2 #H destruct + lapply (teqg_inv_lref1 … HX3) -HX3 #H destruct // + | lapply (teqg_inv_gref1 … HX2) -HX2 #H destruct + lapply (teqg_inv_gref1 … HX3) -HX3 #H destruct // + ] +| #G #L0 #s0 #s1 #X2 #HX2 #X3 #HX3 #L2 #HL02 + elim (teqg_inv_sort1 … HX2) -HX2 #s2 #H destruct + elim (teqg_inv_sort1 … HX3) -HX3 #s3 #H destruct // +| #I #G #K0 #V0 #V1 #W1 #_ #IH #HVW1 #X2 #HX2 #X3 #HX3 #L2 #HL2 + lapply (teqg_inv_lref1 … HX2) -HX2 #H destruct + elim (reqg_inv_zero_pair_sn … HL2) -HL2 #K2 #V2 #HK02 #HV02 #H destruct + elim (teqg_inv_lifts_sn … HX3 … HVW1) -W1 #V3 #HVX3 #HV13 + /3 width=3 by cpx_delta/ +| #I0 #G #K0 #V1 #W1 #i #_ #IH #HVW1 #X2 #HX2 #X3 #HX3 #L2 #HL2 + lapply (teqg_inv_lref1 … HX2) -HX2 #H destruct + elim (reqg_inv_lref_bind_sn … HL2) -HL2 #I2 #K2 #HK02 #H destruct + elim (teqg_inv_lifts_sn … HX3 … HVW1) -W1 #V3 #HVX3 #HV13 + /3 width=3 by cpx_lref/ +| #p #I #G #L0 #V0 #V1 #T0 #T1 #_ #_ #IHV #IHT #X2 #HX2 #X3 #HX3 #L2 #HL02 + elim (teqg_inv_pair1 … HX2) -HX2 #V2 #T2 #HV02 #HT02 #H destruct + elim (teqg_inv_pair1 … HX3) -HX3 #V3 #T3 #HV13 #HT13 #H destruct + elim (reqg_inv_bind_refl … HL02) -HL02 // #HV0 #HT0 + lapply (reqg_bind_repl_dx … HT0 (BPair I V2) ?) -HT0 + /2 width=1 by ext2_pair/ #HT0 + /3 width=1 by cpx_bind/ +| #I #G #L0 #V0 #V1 #T0 #T1 #_ #_ #IHV #IHT #X2 #HX2 #X3 #HX3 #L2 #HL02 + elim (teqg_inv_pair1 … HX2) -HX2 #V2 #T2 #HV02 #HT02 #H destruct + elim (teqg_inv_pair1 … HX3) -HX3 #V3 #T3 #HV13 #HT13 #H destruct + elim (reqg_inv_flat … HL02) -HL02 #HV0 #HT0 + /3 width=1 by cpx_flat/ +| #G #L0 #V0 #U0 #T0 #T1 #HTU0 #_ #IH #X2 #HX2 #X3 #HX3 #L2 #HL02 + elim (teqg_inv_pair1 … HX2) -HX2 #V2 #U2 #HV02 #HU02 #H destruct + elim (reqg_inv_bind_refl … HL02) -HL02 // #HV0 #HU0 + lapply (reqg_inv_lifts_bi … HU0 (Ⓣ) … HTU0) -HU0 + [6:|*: /3 width=2 by drops_refl, drops_drop/ ] #HT0 + elim (teqg_inv_lifts_sn … HU02 … HTU0) -U0 #T2 #HTU2 #HT02 + /3 width=3 by cpx_zeta/ +| #G #L0 #V0 #T0 #T1 #_ #IH #X2 #HX2 #X3 #HX3 #L2 #HL02 + elim (teqg_inv_pair1 … HX2) -HX2 #V2 #T2 #_ #HT02 #H destruct + elim (reqg_inv_flat … HL02) -HL02 #HV0 #HT0 + /3 width=1 by cpx_eps/ +| #G #L0 #V0 #T0 #T1 #_ #IH #X2 #HX2 #X3 #HX3 #L2 #HL02 + elim (teqg_inv_pair1 … HX2) -HX2 #V2 #T2 #HV02 #_ #H destruct + elim (reqg_inv_flat … HL02) -HL02 #HV0 #HT1 + /3 width=1 by cpx_ee/ +| #p #G #L0 #V0 #V1 #W0 #W1 #T0 #T1 #_ #_ #_ #IHV #IHW #IHT #X2 #HX2 #X3 #HX3 #L2 #HL02 + elim (teqg_inv_pair1 … HX2) -HX2 #V2 #X #HV02 #HX #H destruct + elim (teqg_inv_pair1 … HX) -HX #W2 #T2 #HW02 #HT02 #H destruct + elim (teqg_inv_pair1 … HX3) -HX3 #X #T3 #HX #HT13 #H destruct + elim (teqg_inv_pair1 … HX) -HX #W3 #V3 #HW13 #HV13 #H destruct + elim (reqg_inv_flat … HL02) -HL02 #HV0 #HL02 + elim (reqg_inv_bind_refl … HL02) -HL02 // #HW0 #HT0 + lapply (reqg_bind_repl_dx … HT0 (BPair Abst W2) ?) -HT0 + /2 width=1 by ext2_pair/ #H2T0 + /3 width=1 by cpx_beta/ +| #p #G #L0 #V0 #V1 #U1 #W0 #W1 #T0 #T1 #_ #_ #_ #IHV #IHW #IHT #HVU1 #X2 #HX2 #X3 #HX3 #L2 #HL02 + elim (teqg_inv_pair1 … HX2) -HX2 #V2 #X #HV02 #HX #H destruct + elim (teqg_inv_pair1 … HX) -HX #W2 #T2 #HW02 #HT02 #H destruct + elim (teqg_inv_pair1 … HX3) -HX3 #W3 #X #HW13 #HX #H destruct + elim (teqg_inv_pair1 … HX) -HX #U3 #T3 #HU13 #HT13 #H destruct + elim (reqg_inv_flat … HL02) -HL02 #HV0 #HL02 + elim (reqg_inv_bind_refl … HL02) -HL02 // #HW0 #HT0 + lapply (reqg_bind_repl_dx … HT0 (BPair Abbr W2) ?) -HT0 + /2 width=1 by ext2_pair/ #HT0 + elim (teqg_inv_lifts_sn … HU13 … HVU1) -U1 #V3 #HVU3 #HV13 + /3 width=3 by cpx_theta/ +] +qed-. + +lemma cpx_teqg_conf (S) (G) (L): + reflexive … S → + ∀T0:term. ∀T1. ❪G,L❫ ⊢ T0 ⬈ T1 → ∀T2. T0 ≛[S] T2 → ❪G,L❫ ⊢ T2 ⬈ T1. +/3 width=9 by cpx_teqg_repl_reqg, reqg_refl, teqg_refl/ qed-. + +lemma teqg_cpx_trans (S) (G) (L): + reflexive … S → symmetric … S → + ∀T2. ∀T0:term. T2 ≛[S] T0 → ∀T1. ❪G,L❫ ⊢ T0 ⬈ T1 → ❪G,L❫ ⊢ T2 ⬈ T1. +/3 width=6 by cpx_teqg_conf, teqg_sym/ +qed-. + +lemma teqg_cpx (S) (G) (L): + reflexive … S → symmetric … S → + ∀T1,T2:term. T1 ≛[S] T2 → ❪G,L❫ ⊢ T1 ⬈ T2. +/2 width=6 by teqg_cpx_trans/ qed. + +(* Basic_2A1: uses: cpx_lleq_conf *) +lemma cpx_reqg_conf (S) (G): + reflexive … S → + R_confluent1_rex (cpx G) (ceqg S). +/3 width=9 by cpx_teqg_repl_reqg, teqg_refl/ qed-. + +(* Basic_2A1: uses: lleq_cpx_trans *) +lemma reqg_cpx_trans (S) (G): + reflexive … S → symmetric … S → + ∀L2,L0,T0. L2 ≛[S,T0] L0 → ∀T1. ❪G,L0❫ ⊢ T0 ⬈ T1 → ❪G,L2❫ ⊢ T0 ⬈ T1. +/3 width=7 by cpx_reqg_conf, reqg_sym/ +qed-. + +lemma rpx_reqg_conf (S) (G) (T): + reflexive … S → + confluent1 … (rpx G T) (reqg S T). +/3 width=9 by reqg_fsge_comp, cpx_teqg_repl_reqg, rex_conf1, teqg_refl/ qed-. + +lemma reqg_rpx_trans (S) (G) (T) (L): + reflexive … S → symmetric … S → + ∀L1. L1 ≛[S,T] L → ∀L2. ❪G,L❫ ⊢ ⬈[T] L2 → ❪G,L1❫ ⊢ ⬈[T] L2. +/3 width=7 by rpx_reqg_conf, reqg_sym/ qed-. + +lemma reqg_rpx (S) (G) (T): + reflexive … S → symmetric … S → + ∀L1,L2. L1 ≛[S,T] L2 → ❪G,L1❫ ⊢ ⬈[T] L2. +/2 width=6 by reqg_rpx_trans/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_reqx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_reqx.ma index 5cde4c9f6..912adfc51 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_reqx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_reqx.ma @@ -12,13 +12,11 @@ (* *) (**************************************************************************) -include "static_2/static/reqx_drops.ma". -include "static_2/static/reqx_fqup.ma". -include "static_2/static/reqx_reqx.ma". -include "basic_2/rt_transition/rpx_fsle.ma". +include "static_2/syntax/teqx.ma". +include "basic_2/rt_transition/rpx_reqg.ma". (* EXTENDED PARALLEL RT-TRANSITION FOR REFERRED LOCAL ENVIRONMENTS **********) - +(* (* Properties with sort-irrelevant equivalence for local environments *******) lemma rpx_pair_sn_split (G): @@ -127,12 +125,11 @@ qed-. lemma cpx_teqx_conf (G) (L): ∀T0:term. ∀T1. ❪G,L❫ ⊢ T0 ⬈ T1 → ∀T2. T0 ≛ T2 → ❪G,L❫ ⊢ T2 ⬈ T1. /2 width=7 by cpx_teqx_repl_reqx/ qed-. - +*) lemma teqx_cpx_trans (G) (L): - ∀T2. ∀T0:term. T2 ≛ T0 → ∀T1. ❪G,L❫ ⊢ T0 ⬈ T1 → ❪G,L❫ ⊢ T2 ⬈ T1. -/3 width=3 by cpx_teqx_conf, teqx_sym/ -qed-. - + ∀T2. ∀T0:term. T2 ≅ T0 → ∀T1. ❪G,L❫ ⊢ T0 ⬈ T1 → ❪G,L❫ ⊢ T2 ⬈ T1. +/2 width=6 by teqg_cpx_trans/ qed-. +(* lemma teqx_cpx (G) (L): ∀T1,T2:term. T1 ≛ T2 → ❪G,L❫ ⊢ T1 ⬈ T2. /2 width=3 by teqx_cpx_trans/ qed. @@ -159,3 +156,4 @@ lemma reqx_rpx_trans (G) (T) (L): lemma reqx_rpx (G) (T): ∀L1,L2. L1 ≛[T] L2 → ❪G,L1❫ ⊢ ⬈[T] L2. /2 width=3 by reqx_rpx_trans/ qed. +*) diff --git a/matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl b/matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl index 28eae7ce9..6439d77b9 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl +++ b/matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl @@ -68,18 +68,18 @@ table { [ [ "evaluation for terms" ] "cprre" "cprre_csx" + "cprre_cpms" + "cprre_cprre" * ] [ [ "for lenvs on all entries" ] "lprs ( ❪?,?❫ ⊢ ➡*[?,?] ? )" "lprs_tc" + "lprs_ctc" + "lprs_length" + "lprs_drops" + "lprs_aaa" + "lprs_lpr" + "lprs_lpxs" + "lprs_cpms" + "lprs_cprs" + "lprs_lprs" * ] [ [ "for binders" ] "cprs_ext" + "( ❪?,?❫ ⊢ ? ➡*[?,?] ?)" * ] - [ [ "for terms" ] "cprs" "cprs_ctc" + "cprs_tweq" + "cprs_drops" + "cprs_cpr" + "cprs_lpr" + "cprs_cnr" + "cprs_cprs" * ] + [ [ "for terms" ] "cprs" "cprs_ctc" + "cprs_teqw" + "cprs_drops" + "cprs_cpr" + "cprs_lpr" + "cprs_cnr" + "cprs_cprs" * ] } ] [ { "t-bound context-sensitive parallel rt-computation" * } { [ [ "t-unbound whd evaluation for terms" ] "cpmuwe ( ❪?,?❫ ⊢ ? ➡*𝐍𝐖*[?,?] ? )" "cpmuwe_csx" + "cpmuwe_cpmuwe" * ] [ [ "t-unbound whd normal form for terms" ] "cnuw ( ❪?,?❫ ⊢ ➡𝐍𝐖*[?] ? )" "cnuw_drops" + "cnuw_simple" + "cnuw_cnuw" * ] [ [ "t-bpund evaluation for terms" ] "cpmre ( ❪?,?❫ ⊢ ? ➡*𝐍[?,?] ? )" "cpmre_aaa" * ] - [ [ "for terms" ] "cpms" + "( ❪?,?❫ ⊢ ? ➡*[?,?] ? )" "cpms_drops" + "cpms_lsubr" + "cpms_reqx" + "cpms_aaa" + "cpms_lpr" + "cpms_cpxs" + "cpms_fpbs" + "cpms_fpbg" + "cpms_cpms" * ] + [ [ "for terms" ] "cpms" + "( ❪?,?❫ ⊢ ? ➡*[?,?] ? )" "cpms_drops" + "cpms_lsubr" + "cpms_reqg" + "cpms_aaa" + "cpms_lpr" + "cpms_cpxs" + "cpms_fpbs" + "cpms_fpbg" + "cpms_cpms" * ] } ] [ { "extended context-sensitive parallel rst-computation" * } { - [ [ "strongly normalizing for closures" ] "fsb" + "( ≥𝐒 ❪?,?,?❫ )" "fsb_feqx" + "fsb_aaa" + "fsb_csx" + "fsb_fpbg" * ] + [ [ "strongly normalizing for closures" ] "fsb" + "( ≥𝐒 ❪?,?,?❫ )" "fsb_feqg" + "fsb_aaa" + "fsb_csx" + "fsb_fpbg" * ] [ [ "proper for closures" ] "fpbg" + "( ❪?,?,?❫ > ❪?,?,?❫ )" "fpbg_fqup" + "fpbg_cpxs" + "fpbg_lpxs" + "fpbg_fpbs" + "fpbg_fpbg" * ] [ [ "for closures" ] "fpbs" + "( ❪?,?,?❫ ≥ ❪?,?,?❫ )" "fpbs_fqup" + "fpbs_fqus" + "fpbs_aaa" + "fpbs_cpx" + "fpbs_fpb" + "fpbs_cpxs" + "fpbs_lpxs" + "fpbs_csx" + "fpbs_fpbs" * ] } @@ -88,10 +88,10 @@ table { [ [ "compatibility for lenvs" ] "jsx" + "( ? ⊢ ? ⊒ ? )" "jsx_drops" + "jsx_lsubr" + "jsx_csx" + "jsx_rsx" + "jsx_jsx" * ] [ [ "strongly normalizing for lenvs on referred entries" ] "rsx" + "( ? ⊢ ⬈*𝐒[?] ? )" "rsx_length" + "rsx_drops" + "rsx_fqup" + "rsx_cpxs" + "rsx_csx" + "rsx_rsx" * ] [ [ "strongly normalizing for term vectors" ] "csx_vector" + "( ❪?,?❫ ⊢ ⬈*𝐒 ? )" "csx_cnx_vector" + "csx_csx_vector" * ] - [ [ "strongly normalizing for terms" ] "csx" + "( ❪?,?❫ ⊢ ⬈*𝐒 ? )" "csx_simple" + "csx_simple_teqo" + "csx_drops" + "csx_fqus" + "csx_lsubr" + "csx_reqx" + "csx_feqx" + "csx_aaa" + "csx_gcp" + "csx_gcr" + "csx_lpx" + "csx_cnx" + "csx_fpbq" + "csx_cpxs" + "csx_lpxs" + "csx_csx" * ] - [ [ "for lenvs on all entries" ] "lpxs" + "( ❪?,?❫ ⊢ ⬈* ? )" "lpxs_length" + "lpxs_drops" + "lpxs_reqx" + "lpxs_feqx" + "lpxs_aaa" + "lpxs_lpx" + "lpxs_cpxs" + "lpxs_lpxs" * ] + [ [ "strongly normalizing for terms" ] "csx" + "( ❪?,?❫ ⊢ ⬈*𝐒 ? )" "csx_simple" + "csx_simple_teqo" + "csx_drops" + "csx_fqus" + "csx_lsubr" + "csx_reqg" + "csx_feqg" + "csx_aaa" + "csx_gcp" + "csx_gcr" + "csx_lpx" + "csx_cnx" + "csx_fpbq" + "csx_cpxs" + "csx_lpxs" + "csx_csx" * ] + [ [ "for lenvs on all entries" ] "lpxs" + "( ❪?,?❫ ⊢ ⬈* ? )" "lpxs_length" + "lpxs_drops" + "lpxs_reqg" + "lpxs_feqg" + "lpxs_aaa" + "lpxs_lpx" + "lpxs_cpxs" + "lpxs_lpxs" * ] [ [ "for binders" ] "cpxs_ext" + "( ❪?,?❫ ⊢ ? ⬈* ? )" * ] - [ [ "for terms" ] "cpxs" + "( ❪?,?❫ ⊢ ? ⬈* ? )" "cpxs_teqx" + "cpxs_teqo" + "cpxs_teqo_vector" + "cpxs_drops" + "cpxs_fqus" + "cpxs_lsubr" + "cpxs_reqx" + "cpxs_feqx" + "cpxs_aaa" + "cpxs_lpx" + "cpxs_cnx" + "cpxs_cpxs" * ] + [ [ "for terms" ] "cpxs" + "( ❪?,?❫ ⊢ ? ⬈* ? )" "cpxs_teqg" + "cpxs_teqo" + "cpxs_teqo_vector" + "cpxs_drops" + "cpxs_fqus" + "cpxs_lsubr" + "cpxs_reqg" + "cpxs_feqg" + "cpxs_aaa" + "cpxs_lpx" + "cpxs_cnx" + "cpxs_cpxs" * ] } ] } @@ -103,10 +103,10 @@ table { } ] [ { "context-sensitive parallel r-transition" * } { - [ [ "normal form for terms" ] "cnr ( ❪?,?❫ ⊢ ➡𝐍[?,?] ? )" "cnr_simple" + "cnr_teqx" + "cnr_drops" * ] + [ [ "normal form for terms" ] "cnr ( ❪?,?❫ ⊢ ➡𝐍[?,?] ? )" "cnr_simple" + "cnr_teqg" + "cnr_teqx" + "cnr_drops" * ] [ [ "for lenvs on all entries" ] "lpr" + "( ❪?,?❫ ⊢ ➡[?,?] ? )" "lpr_length" + "lpr_drops" + "lpr_fquq" + "lpr_aaa" + "lpr_lpx" + "lpr_lpr" * ] [ [ "for binders" ] "cpr_ext" * ] - [ [ "for terms" ] "cpr" "cpr_drops" + "cpr_drops_basic" + "cpr_teqx" + "cpr_cpr" * ] + [ [ "for terms" ] "cpr" "cpr_drops" + "cpr_drops_basic" + "cpr_teqg" + "cpr_cpr" * ] } ] [ { "t-bound context-sensitive parallel rt-transition" * } { @@ -115,15 +115,15 @@ table { ] [ { "extended parallel rst-transition" * } { [ [ "for closures" ] "fpbq" + "( ❪?,?,?❫ ≽ ❪?,?,?❫ )" "fpbq_aaa" + "fpbq_fpb" * ] - [ [ "proper for closures" ] "fpb" + "( ❪?,?,?❫ ≻ ❪?,?,?❫ )" "fpb_reqx" + "fpb_feqx" * ] + [ [ "proper for closures" ] "fpb" + "( ❪?,?,?❫ ≻ ❪?,?,?❫ )" "fpb_reqg" + "fpb_feqg" * ] } ] [ { "extended context-sensitive parallel rt-transition" * } { [ [ "normal form for terms" ] "cnx" + "( ❪?,?❫ ⊢ ⬈𝐍 ? )" "cnx_simple" + "cnx_drops" + "cnx_basic" + "cnx_cnx" * ] - [ [ "for lenvs on referred entries" ] "rpx" + "( ❪?,?❫ ⊢ ⬈[?] ? )" "rpx_length" + "rpx_drops" + "rpx_fqup" + "rpx_fsle" + "rpx_reqx" + "rpx_lpx" + "rpx_rpx" * ] - [ [ "for lenvs on all entries" ] "lpx" + "( ❪?,?❫ ⊢ ⬈ ? )" "lpx_length" + "lpx_drops" + "lpx_fquq" + "lpx_fsle" + "lpx_reqx" + "lpx_aaa" * ] + [ [ "for lenvs on referred entries" ] "rpx" + "( ❪?,?❫ ⊢ ⬈[?] ? )" "rpx_length" + "rpx_drops" + "rpx_fqup" + "rpx_fsle" + "rpx_reqg" + "rpx_reqx" + "rpx_lpx" + "rpx_rpx" * ] + [ [ "for lenvs on all entries" ] "lpx" + "( ❪?,?❫ ⊢ ⬈ ? )" "lpx_length" + "lpx_drops" + "lpx_fquq" + "lpx_fsle" + "lpx_reqg" + "lpx_aaa" * ] [ [ "for binders" ] "cpx_ext" + "( ❪?,?❫ ⊢ ? ⬈ ? )" * ] - [ [ "for terms" ] "cpx" + "( ❪?,?❫ ⊢ ? ⬈ ? )" "cpx_simple" + "cpx_drops" + "cpx_drops_basic" + "cpx_fqus" + "cpx_lsubr" + "cpx_req" + "cpx_reqx" + "cpx_feqx" * ] + [ [ "for terms" ] "cpx" + "( ❪?,?❫ ⊢ ? ⬈ ? )" "cpx_simple" + "cpx_drops" + "cpx_drops_basic" + "cpx_fqus" + "cpx_lsubr" + "cpx_req" + "cpx_reqg" + "cpx_feqg" * ] } ] [ { "bound context-sensitive parallel rt-transition" * } { diff --git a/matita/matita/contribs/lambdadelta/refile.sh b/matita/matita/contribs/lambdadelta/refile.sh index ef74a9818..afd76f7a4 100644 --- a/matita/matita/contribs/lambdadelta/refile.sh +++ b/matita/matita/contribs/lambdadelta/refile.sh @@ -1,5 +1,5 @@ #!/bin/sh -for SRC in `find ground_2 static_2 basic_2 apps_2 -name "*.ma"`; do +for SRC in `find ground static_2 basic_2 apps_2 -name "*.ma"`; do if [ ! -e ${SRC//$1/$2} ]; then echo ${SRC//$1/$2}; git mv $SRC ${SRC//$1/$2}; fi diff --git a/matita/matita/contribs/lambdadelta/replace.sh b/matita/matita/contribs/lambdadelta/replace.sh index d077dcb59..f72850165 100644 --- a/matita/matita/contribs/lambdadelta/replace.sh +++ b/matita/matita/contribs/lambdadelta/replace.sh @@ -1,5 +1,5 @@ #!/bin/sh -for SRC in `find ground_2 static_2 basic_2 apps_2 -name "*.ma" -or -name "*.tbl"`; do +for SRC in `find ground static_2 basic_2 apps_2 -name "*.ma" -or -name "*.tbl"`; do sed "/$1/s!$2!$3!g" ${SRC} > ${SRC}.new if [ ! -s ${SRC}.new ] || diff ${SRC} ${SRC}.new > /dev/null; then rm -f ${SRC}.new; diff --git a/matita/matita/contribs/lambdadelta/static_2/static/feqx_feqx.ma b/matita/matita/contribs/lambdadelta/static_2/etc/teqx/feqx_feqx.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/static_2/static/feqx_feqx.ma rename to matita/matita/contribs/lambdadelta/static_2/etc/teqx/feqx_feqx.etc diff --git a/matita/matita/contribs/lambdadelta/static_2/static/feqx_fqup.ma b/matita/matita/contribs/lambdadelta/static_2/etc/teqx/feqx_fqup.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/static_2/static/feqx_fqup.ma rename to matita/matita/contribs/lambdadelta/static_2/etc/teqx/feqx_fqup.etc diff --git a/matita/matita/contribs/lambdadelta/static_2/static/feqx_fqus.ma b/matita/matita/contribs/lambdadelta/static_2/etc/teqx/feqx_fqus.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/static_2/static/feqx_fqus.ma rename to matita/matita/contribs/lambdadelta/static_2/etc/teqx/feqx_fqus.etc diff --git a/matita/matita/contribs/lambdadelta/static_2/static/feqx_req.ma b/matita/matita/contribs/lambdadelta/static_2/etc/teqx/feqx_req.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/static_2/static/feqx_req.ma rename to matita/matita/contribs/lambdadelta/static_2/etc/teqx/feqx_req.etc diff --git a/matita/matita/contribs/lambdadelta/static_2/etc/teqx/req.etc b/matita/matita/contribs/lambdadelta/static_2/etc/teqx/req.etc new file mode 100644 index 000000000..b53ef1755 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/etc/teqx/req.etc @@ -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 "static_2/notation/relations/ideqsn_3.ma". +include "static_2/static/rex.ma". + +(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********) + +(* Basic_2A1: was: lleq *) +definition req: relation3 term lenv lenv ≝ + rex ceq. + +interpretation + "syntactic equivalence on referred entries (local environment)" + 'IdEqSn T L1 L2 = (req T L1 L2). + +(* Note: "R_transitive_req R" is equivalent to "R_transitive_rex ceq R R" *) +(* Basic_2A1: uses: lleq_transitive *) +definition R_transitive_req: predicate (relation3 lenv term term) ≝ + λR. ∀L2,T1,T2. R L2 T1 T2 → ∀L1. L1 ≡[T1] L2 → R L1 T1 T2. + +(* Basic inversion lemmas ***************************************************) + +lemma req_inv_bind: + ∀p,I,L1,L2,V,T. L1 ≡[ⓑ[p,I]V.T] L2 → + ∧∧ L1 ≡[V] L2 & L1.ⓑ[I]V ≡[T] L2.ⓑ[I]V. +/2 width=2 by rex_inv_bind/ qed-. + +lemma req_inv_flat: + ∀I,L1,L2,V,T. L1 ≡[ⓕ[I]V.T] L2 → + ∧∧ L1 ≡[V] L2 & L1 ≡[T] L2. +/2 width=2 by rex_inv_flat/ qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma req_inv_zero_pair_sn: + ∀I,L2,K1,V. K1.ⓑ[I]V ≡[#0] L2 → + ∃∃K2. K1 ≡[V] K2 & L2 = K2.ⓑ[I]V. +#I #L2 #K1 #V #H +elim (rex_inv_zero_pair_sn … H) -H #K2 #X #HK12 #HX #H destruct +/2 width=3 by ex2_intro/ +qed-. + +lemma req_inv_zero_pair_dx: + ∀I,L1,K2,V. L1 ≡[#0] K2.ⓑ[I]V → + ∃∃K1. K1 ≡[V] K2 & L1 = K1.ⓑ[I]V. +#I #L1 #K2 #V #H +elim (rex_inv_zero_pair_dx … H) -H #K1 #X #HK12 #HX #H destruct +/2 width=3 by ex2_intro/ +qed-. + +lemma req_inv_lref_bind_sn: + ∀I1,K1,L2,i. K1.ⓘ[I1] ≡[#↑i] L2 → + ∃∃I2,K2. K1 ≡[#i] K2 & L2 = K2.ⓘ[I2]. +/2 width=2 by rex_inv_lref_bind_sn/ qed-. + +lemma req_inv_lref_bind_dx: + ∀I2,K2,L1,i. L1 ≡[#↑i] K2.ⓘ[I2] → + ∃∃I1,K1. K1 ≡[#i] K2 & L1 = K1.ⓘ[I1]. +/2 width=2 by rex_inv_lref_bind_dx/ qed-. + +(* Basic forward lemmas *****************************************************) + +(* Basic_2A1: was: llpx_sn_lrefl *) +(* Basic_2A1: this should have been lleq_fwd_llpx_sn *) +lemma req_fwd_rex (R): + c_reflexive … R → + ∀L1,L2,T. L1 ≡[T] L2 → L1 ⪤[R,T] L2. +#R #HR #L1 #L2 #T * #f #Hf #HL12 +/4 width=7 by sex_co, cext2_co, ex2_intro/ +qed-. + +(* Basic_properties *********************************************************) + +lemma frees_req_conf: + ∀f,L1,T. L1 ⊢ 𝐅+❪T❫ ≘ f → + ∀L2. L1 ≡[T] L2 → L2 ⊢ 𝐅+❪T❫ ≘ f. +#f #L1 #T #H elim H -f -L1 -T +[ /2 width=3 by frees_sort/ +| #f #i #Hf #L2 #H2 + >(rex_inv_atom_sn … H2) -L2 + /2 width=1 by frees_atom/ +| #f #I #L1 #V1 #_ #IH #Y #H2 + elim (req_inv_zero_pair_sn … H2) -H2 #L2 #HL12 #H destruct + /3 width=1 by frees_pair/ +| #f #I #L1 #Hf #Y #H2 + elim (rex_inv_zero_unit_sn … H2) -H2 #g #L2 #_ #_ #H destruct + /2 width=1 by frees_unit/ +| #f #I #L1 #i #_ #IH #Y #H2 + elim (req_inv_lref_bind_sn … H2) -H2 #J #L2 #HL12 #H destruct + /3 width=1 by frees_lref/ +| /2 width=1 by frees_gref/ +| #f1V #f1T #f1 #p #I #L1 #V1 #T1 #_ #_ #Hf1 #IHV #IHT #L2 #H2 + elim (req_inv_bind … H2) -H2 /3 width=5 by frees_bind/ +| #f1V #f1T #f1 #I #L1 #V1 #T1 #_ #_ #Hf1 #IHV #IHT #L2 #H2 + elim (req_inv_flat … H2) -H2 /3 width=5 by frees_flat/ +] +qed-. + +(* Basic_2A1: removed theorems 10: + lleq_ind lleq_fwd_lref + lleq_fwd_drop_sn lleq_fwd_drop_dx + lleq_skip lleq_lref lleq_free + lleq_Y lleq_ge_up lleq_ge + +*) diff --git a/matita/matita/contribs/lambdadelta/static_2/static/req_drops.ma b/matita/matita/contribs/lambdadelta/static_2/etc/teqx/req_drops.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/static_2/static/req_drops.ma rename to matita/matita/contribs/lambdadelta/static_2/etc/teqx/req_drops.etc diff --git a/matita/matita/contribs/lambdadelta/static_2/static/req_fqup.ma b/matita/matita/contribs/lambdadelta/static_2/etc/teqx/req_fqup.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/static_2/static/req_fqup.ma rename to matita/matita/contribs/lambdadelta/static_2/etc/teqx/req_fqup.etc diff --git a/matita/matita/contribs/lambdadelta/static_2/static/req_length.ma b/matita/matita/contribs/lambdadelta/static_2/etc/teqx/req_length.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/static_2/static/req_length.ma rename to matita/matita/contribs/lambdadelta/static_2/etc/teqx/req_length.etc diff --git a/matita/matita/contribs/lambdadelta/static_2/static/reqx_drops.ma b/matita/matita/contribs/lambdadelta/static_2/etc/teqx/reqx_drops.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/static_2/static/reqx_drops.ma rename to matita/matita/contribs/lambdadelta/static_2/etc/teqx/reqx_drops.etc diff --git a/matita/matita/contribs/lambdadelta/static_2/static/reqx_fqup.ma b/matita/matita/contribs/lambdadelta/static_2/etc/teqx/reqx_fqup.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/static_2/static/reqx_fqup.ma rename to matita/matita/contribs/lambdadelta/static_2/etc/teqx/reqx_fqup.etc diff --git a/matita/matita/contribs/lambdadelta/static_2/static/reqx_fqus.ma b/matita/matita/contribs/lambdadelta/static_2/etc/teqx/reqx_fqus.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/static_2/static/reqx_fqus.ma rename to matita/matita/contribs/lambdadelta/static_2/etc/teqx/reqx_fqus.etc diff --git a/matita/matita/contribs/lambdadelta/static_2/static/reqx_length.ma b/matita/matita/contribs/lambdadelta/static_2/etc/teqx/reqx_length.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/static_2/static/reqx_length.ma rename to matita/matita/contribs/lambdadelta/static_2/etc/teqx/reqx_length.etc diff --git a/matita/matita/contribs/lambdadelta/static_2/i_static/rexs_lex.ma b/matita/matita/contribs/lambdadelta/static_2/i_static/rexs_lex.ma index 9d582d83b..fd50b7a6d 100644 --- a/matita/matita/contribs/lambdadelta/static_2/i_static/rexs_lex.ma +++ b/matita/matita/contribs/lambdadelta/static_2/i_static/rexs_lex.ma @@ -13,8 +13,8 @@ (**************************************************************************) include "static_2/relocation/lex_tc.ma". -include "static_2/static/req_fqup.ma". -include "static_2/static/req_fsle.ma". +include "static_2/static/reqg_fqup.ma". +include "static_2/static/req_req.ma". include "static_2/i_static/rexs_fqup.ma". (* ITERATED EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ***) @@ -44,7 +44,7 @@ lemma rexs_inv_lex_req (R): #R #H1R #H2R #H3R #H4R #L1 #L2 #T #H lapply (s_rs_transitive_lex_inv_isid … H3R) -H3R #H3R @(rexs_ind_sn … H1R … H) -H -L2 -[ /4 width=3 by req_refl, lex_refl, inj, ex2_intro/ +[ /4 width=3 by reqg_refl, lex_refl, inj, ex2_intro/ | #L0 #L2 #_ #HL02 * #L * #f0 #Hf0 #HL1 #HL0 lapply (req_rex_trans … HL0 … HL02) -L0 // * #f1 #Hf1 #HL2 elim (sex_sdj_split_sn … ceq_ext … HL2 f0 ?) -HL2 diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/approxeqsn_3.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/approxeqsn_3.ma new file mode 100644 index 000000000..2d8f84a6a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/approxeqsn_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( L1 ≅[ break term 46 T ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'ApproxEqSn $T $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_6.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/approxeqsn_6.ma similarity index 91% rename from matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_6.ma rename to matita/matita/contribs/lambdadelta/static_2/notation/relations/approxeqsn_6.ma index 29eb309c7..bde0d79d7 100644 --- a/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_6.ma +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/approxeqsn_6.ma @@ -14,6 +14,6 @@ (* 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 ❫ )" +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 @{ 'StarEqSn $G1 $L1 $T1 $G2 $L2 $T2 }. + for @{ 'ApproxEqSn $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_3.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/ideq_3.ma similarity index 92% rename from matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_3.ma rename to matita/matita/contribs/lambdadelta/static_2/notation/relations/ideq_3.ma index 5dcaaaa5d..a286d8e3a 100644 --- a/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_3.ma +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/ideq_3.ma @@ -14,6 +14,6 @@ (* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) -notation "hvbox( L1 ≛[ break term 46 T ] break term 46 L2 )" +notation "hvbox( L ⊢ break term 46 T1 ≡ break term 46 T2 )" non associative with precedence 45 - for @{ 'StarEqSn $T $L1 $L2 }. + for @{ 'IdEq $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_3.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_3.ma index fbb650ac6..c60a0ec28 100644 --- a/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_3.ma +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_3.ma @@ -14,6 +14,6 @@ (* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) -notation "hvbox( L ⊢ break term 46 T1 ≛ break term 46 T2 )" +notation "hvbox( T1 ≛[ break term 46 S ] break term 46 T2 )" non associative with precedence 45 - for @{ 'StarEq $L $T1 $T2 }. + for @{ 'StarEq $S $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_4.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_4.ma new file mode 100644 index 000000000..1c39eee06 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_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 T1 ≛[ break term 46 S ] break term 46 T2 )" + non associative with precedence 45 + for @{ 'StarEq $S $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_4.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_4.ma new file mode 100644 index 000000000..630b639a9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_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 S, break term 46 T ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'StarEqSn $S $T $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_7.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_7.ma new file mode 100644 index 000000000..93ce764f1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_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 S ] ❪ break term 46 G2, break term 46 L2, break term 46 T2 ❫ )" + non associative with precedence 45 + for @{ 'StarEqSn $S $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/topiso_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/tilde_2.ma similarity index 93% rename from matita/matita/contribs/lambdadelta/static_2/notation/relations/topiso_2.ma rename to matita/matita/contribs/lambdadelta/static_2/notation/relations/tilde_2.ma index 35dd47569..97c863b4a 100644 --- a/matita/matita/contribs/lambdadelta/static_2/notation/relations/topiso_2.ma +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/tilde_2.ma @@ -14,6 +14,6 @@ (* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) -notation "hvbox( T1 ⩳ break term 46 T2 )" +notation "hvbox( T1 ~ break term 46 T2 )" non associative with precedence 45 - for @{ 'TopIso $T1 $T2 }. + for @{ 'Tilde $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/tildeminus_2.ma similarity index 93% rename from matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_2.ma rename to matita/matita/contribs/lambdadelta/static_2/notation/relations/tildeminus_2.ma index 04a438adc..8d11cb908 100644 --- a/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_2.ma +++ b/matita/matita/contribs/lambdadelta/static_2/notation/relations/tildeminus_2.ma @@ -14,6 +14,6 @@ (* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) -notation "hvbox( T1 ≛ break term 46 T2 )" +notation "hvbox( T1 ≃ break term 46 T2 )" non associative with precedence 45 - for @{ 'StarEq $T1 $T2 }. + for @{ 'TildeMinus $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_teqg.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_teqg.ma new file mode 100644 index 000000000..6b7f17408 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_teqg.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 "static_2/syntax/teqg.ma". +include "static_2/relocation/lifts_lifts.ma". + +(* GENERIC RELOCATION FOR TERMS *********************************************) + +(* Properties with generic equivalence for terms ****************************) + +lemma teqg_lifts_sn (S): + liftable2_sn (teqg S). +#S #T1 #T2 #H elim H -T1 -T2 [||| * ] +[ #s1 #s2 #Hs #f #X #H >(lifts_inv_sort1 … H) -H + /3 width=3 by lifts_sort, teqg_sort, ex2_intro/ +| #i #f #X #H elim (lifts_inv_lref1 … H) -H + /3 width=3 by lifts_lref, teqg_lref, ex2_intro/ +| #l #f #X #H >(lifts_inv_gref1 … H) -H + /2 width=3 by lifts_gref, teqg_gref, ex2_intro/ +| #p #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f #X #H elim (lifts_inv_bind1 … H) -H + #W1 #U1 #HVW1 #HTU1 #H destruct + elim (IHV … HVW1) -V1 elim (IHT … HTU1) -T1 + /3 width=5 by lifts_bind, teqg_pair, ex2_intro/ +| #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f #X #H elim (lifts_inv_flat1 … H) -H + #W1 #U1 #HVW1 #HTU1 #H destruct + elim (IHV … HVW1) -V1 elim (IHT … HTU1) -T1 + /3 width=5 by lifts_flat, teqg_pair, ex2_intro/ +] +qed-. + +(**) (* symmetry not needed *) +lemma teqg_lifts_dx (S): + symmetric … S → liftable2_dx (teqg S). +/3 width=3 by teqg_lifts_sn, liftable2_sn_dx, teqg_sym/ qed-. + +lemma teqg_lifts_bi (S): + liftable2_bi (teqg S). +/3 width=6 by teqg_lifts_sn, liftable2_sn_bi/ qed-. + +(* Inversion lemmas with sort-irrelevant equivalence for terms **************) + +lemma teqg_inv_lifts_sn (S): + deliftable2_sn (teqg S). +#S #U1 #U2 #H elim H -U1 -U2 [||| * ] +[ #s1 #s2 #Hs #f #X #H >(lifts_inv_sort2 … H) -H + /3 width=3 by lifts_sort, teqg_sort, ex2_intro/ +| #i #f #X #H elim (lifts_inv_lref2 … H) -H + /3 width=3 by lifts_lref, teqg_lref, ex2_intro/ +| #l #f #X #H >(lifts_inv_gref2 … H) -H + /2 width=3 by lifts_gref, teqg_gref, ex2_intro/ +| #p #I #W1 #W2 #U1 #U2 #_ #_ #IHW #IHU #f #X #H elim (lifts_inv_bind2 … H) -H + #V1 #T1 #HVW1 #HTU1 #H destruct + elim (IHW … HVW1) -W1 elim (IHU … HTU1) -U1 + /3 width=5 by lifts_bind, teqg_pair, ex2_intro/ +| #I #W1 #W2 #U1 #U2 #_ #_ #IHW #IHU #f #X #H elim (lifts_inv_flat2 … H) -H + #V1 #T1 #HVW1 #HTU1 #H destruct + elim (IHW … HVW1) -W1 elim (IHU … HTU1) -U1 + /3 width=5 by lifts_flat, teqg_pair, ex2_intro/ +] +qed-. + +(**) (* symmetry not needed *) +lemma teqg_inv_lifts_dx (S): + symmetric … S → deliftable2_dx (teqg S). +/3 width=3 by teqg_inv_lifts_sn, deliftable2_sn_dx, teqg_sym/ qed-. + +lemma teqg_inv_lifts_bi (S): + deliftable2_bi (teqg S). +/3 width=6 by teqg_inv_lifts_sn, deliftable2_sn_bi/ qed-. + +lemma teqg_lifts_inv_pair_sn (S) (I) (f): + ∀X,T. ⇧*[f]X ≘ T → ∀V. ②[I]V.T ≛[S] X → ⊥. +#S #I #f #X #T #H elim H -f -X -T +[ #f #s #V #H + elim (teqg_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct +| #f #i #j #_ #V #H + elim (teqg_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct +| #f #l #V #H + elim (teqg_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct +| #f #p #J #X1 #T1 #X2 #T2 #_ #_ #_ #IH2 #V #H + elim (teqg_inv_pair1 … H) -H #Z1 #Z2 #_ #HZ2 #H destruct + /2 width=2 by/ +| #f #J #X1 #T1 #X2 #T2 #_ #_ #_ #IH2 #V #H + elim (teqg_inv_pair1 … H) -H #Z1 #Z2 #_ #HZ2 #H destruct + /2 width=2 by/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_tweq.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_teqw.ma similarity index 78% rename from matita/matita/contribs/lambdadelta/static_2/relocation/lifts_tweq.ma rename to matita/matita/contribs/lambdadelta/static_2/relocation/lifts_teqw.ma index 45f8a383f..532d0b236 100644 --- a/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_tweq.ma +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_teqw.ma @@ -12,21 +12,21 @@ (* *) (**************************************************************************) -include "static_2/syntax/tweq.ma". +include "static_2/syntax/teqw.ma". include "static_2/relocation/lifts_lifts.ma". (* GENERIC RELOCATION FOR TERMS *********************************************) (* Properties with sort-irrelevant whd equivalence for terms ****************) -lemma tweq_lifts_sn: liftable2_sn tweq. +lemma teqw_lifts_sn: liftable2_sn teqw. #T1 #T2 #H elim H -T1 -T2 [ #s1 #s2 #f #X #H >(lifts_inv_sort1 … H) -H - /3 width=3 by lifts_sort, tweq_sort, ex2_intro/ + /3 width=3 by lifts_sort, teqw_sort, ex2_intro/ | #i #f #X #H elim (lifts_inv_lref1 … H) -H - /3 width=3 by lifts_lref, tweq_lref, ex2_intro/ + /3 width=3 by lifts_lref, teqw_lref, ex2_intro/ | #l #f #X #H >(lifts_inv_gref1 … H) -H - /2 width=3 by lifts_gref, tweq_gref, ex2_intro/ + /2 width=3 by lifts_gref, teqw_gref, ex2_intro/ | #p #V1 #V2 #T1 #T2 #_ #IHT #f #X #H elim (lifts_inv_bind1 … H) -H #W1 #U1 #HVW1 #HTU1 #H destruct elim (lifts_total V2 f) #W2 #HVW2 @@ -34,7 +34,7 @@ lemma tweq_lifts_sn: liftable2_sn tweq. [ elim (IHT … HTU1) -T1 [| // ] #U2 #HTU2 #HU12 | elim (lifts_total T2 (⫯f)) #U2 #HTU2 ] - /3 width=4 by tweq_abbr_pos, lifts_bind, ex2_intro/ + /3 width=4 by teqw_abbr_pos, lifts_bind, ex2_intro/ | #p #V1 #V2 #T1 #T2 #f #X #H elim (lifts_inv_bind1 … H) -H #W1 #U1 #HVW1 #HTU1 #H destruct elim (lifts_total V2 f) #W2 #HVW2 @@ -44,62 +44,62 @@ lemma tweq_lifts_sn: liftable2_sn tweq. elim (lifts_inv_flat1 … H) -H #W1 #U1 #HVW1 #HTU1 #H destruct elim (lifts_total V2 f) #W2 #HVW2 elim (IHT … HTU1) -T1 #U2 #HTU2 #HU12 - /3 width=4 by lifts_flat, tweq_appl, ex2_intro/ + /3 width=4 by lifts_flat, teqw_appl, ex2_intro/ | #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f #X #H elim (lifts_inv_flat1 … H) -H #W1 #U1 #HVW1 #HTU1 #H destruct elim (IHV … HVW1) -V1 #W2 #HVW2 #HW12 elim (IHT … HTU1) -T1 #U2 #HTU2 #HU12 - /3 width=5 by lifts_flat, tweq_cast, ex2_intro/ + /3 width=5 by lifts_flat, teqw_cast, ex2_intro/ ] qed-. -lemma tweq_lifts_dx: liftable2_dx tweq. -/3 width=3 by tweq_lifts_sn, liftable2_sn_dx, tweq_sym/ qed-. +lemma teqw_lifts_dx: liftable2_dx teqw. +/3 width=3 by teqw_lifts_sn, liftable2_sn_dx, teqw_sym/ qed-. -lemma tweq_lifts_bi: liftable2_bi tweq. -/3 width=6 by tweq_lifts_sn, liftable2_sn_bi/ qed-. +lemma teqw_lifts_bi: liftable2_bi teqw. +/3 width=6 by teqw_lifts_sn, liftable2_sn_bi/ qed-. (* Inversion lemmas with sort-irrelevant whd equivalence for terms **********) -lemma tweq_inv_lifts_bi: deliftable2_bi tweq. +lemma teqw_inv_lifts_bi: deliftable2_bi teqw. #U1 #U2 #H elim H -U1 -U2 [ #s1 #s2 #f #X1 #H1 #X2 #H2 >(lifts_inv_sort2 … H1) -H1 >(lifts_inv_sort2 … H2) -H2 - /1 width=1 by tweq_sort/ + /1 width=1 by teqw_sort/ | #j #f #X1 #H1 #X2 #H2 elim (lifts_inv_lref2 … H1) -H1 #i1 #Hj1 #H destruct elim (lifts_inv_lref2 … H2) -H2 #i2 #Hj2 #H destruct <(at_inj … Hj2 … Hj1) -j -f -i1 - /1 width=1 by tweq_lref/ + /1 width=1 by teqw_lref/ | #l #f #X1 #H1 #X2 #H2 >(lifts_inv_gref2 … H1) -H1 >(lifts_inv_gref2 … H2) -H2 - /1 width=1 by tweq_gref/ + /1 width=1 by teqw_gref/ | #p #W1 #W2 #U1 #U2 #_ #IH #f #X1 #H1 #X2 #H2 elim (lifts_inv_bind2 … H1) -H1 #V1 #T1 #_ #HTU1 #H destruct -W1 elim (lifts_inv_bind2 … H2) -H2 #V2 #T2 #_ #HTU2 #H destruct -W2 elim (true_or_false p) #H destruct - [ /3 width=3 by tweq_abbr_pos/ - | /1 width=1 by tweq_abbr_neg/ + [ /3 width=3 by teqw_abbr_pos/ + | /1 width=1 by teqw_abbr_neg/ ] | #p #W1 #W2 #U1 #U2 #f #X1 #H1 #X2 #H2 elim (lifts_inv_bind2 … H1) -H1 #V1 #T1 #_ #_ #H destruct -W1 -U1 elim (lifts_inv_bind2 … H2) -H2 #V2 #T2 #_ #_ #H destruct -W2 -U2 - /1 width=1 by tweq_abst/ + /1 width=1 by teqw_abst/ | #W1 #W2 #U1 #U2 #_ #IH #f #X1 #H1 #X2 #H2 elim (lifts_inv_flat2 … H1) -H1 #V1 #T1 #_ #HTU1 #H destruct -W1 elim (lifts_inv_flat2 … H2) -H2 #V2 #T2 #_ #HTU2 #H destruct -W2 - /3 width=3 by tweq_appl/ + /3 width=3 by teqw_appl/ | #W1 #W2 #U1 #U2 #_ #_ #IHW #IHU #f #X1 #H1 #X2 #H2 elim (lifts_inv_flat2 … H1) -H1 #V1 #T1 #HVW1 #HTU1 #H destruct elim (lifts_inv_flat2 … H2) -H2 #V2 #T2 #HVW2 #HTU2 #H destruct - /3 width=3 by tweq_cast/ + /3 width=3 by teqw_cast/ ] qed-. -lemma tweq_inv_abbr_pos_x_lifts_y_y (T) (f): - ∀V,U. +ⓓV.U ≅ T → ⇧*[f]T ≘ U → ⊥. +lemma teqw_inv_abbr_pos_x_lifts_y_y (T) (f): + ∀V,U. +ⓓV.U ≃ T → ⇧*[f]T ≘ U → ⊥. @(f_ind … tw) #n #IH #T #Hn #f #V #U #H1 #H2 destruct -elim (tweq_inv_abbr_pos_sn … H1) -H1 #X1 #X2 #HX2 #H destruct -V +elim (teqw_inv_abbr_pos_sn … H1) -H1 #X1 #X2 #HX2 #H destruct -V elim (lifts_inv_bind1 … H2) -H2 #Y1 #Y2 #_ #HXY2 #H destruct /2 width=7 by/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_teqx.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_teqx.ma index 789e4c4eb..130d42c6a 100644 --- a/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_teqx.ma +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_teqx.ma @@ -12,79 +12,33 @@ (* *) (**************************************************************************) +include "static_2/relocation/lifts_teqg.ma". include "static_2/syntax/teqx.ma". -include "static_2/relocation/lifts_lifts.ma". (* GENERIC RELOCATION FOR TERMS *********************************************) (* Properties with sort-irrelevant equivalence for terms ********************) lemma teqx_lifts_sn: liftable2_sn teqx. -#T1 #T2 #H elim H -T1 -T2 [||| * ] -[ #s1 #s2 #f #X #H >(lifts_inv_sort1 … H) -H - /3 width=3 by lifts_sort, teqx_sort, ex2_intro/ -| #i #f #X #H elim (lifts_inv_lref1 … H) -H - /3 width=3 by lifts_lref, teqx_lref, ex2_intro/ -| #l #f #X #H >(lifts_inv_gref1 … H) -H - /2 width=3 by lifts_gref, teqx_gref, ex2_intro/ -| #p #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f #X #H elim (lifts_inv_bind1 … H) -H - #W1 #U1 #HVW1 #HTU1 #H destruct - elim (IHV … HVW1) -V1 elim (IHT … HTU1) -T1 - /3 width=5 by lifts_bind, teqx_pair, ex2_intro/ -| #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f #X #H elim (lifts_inv_flat1 … H) -H - #W1 #U1 #HVW1 #HTU1 #H destruct - elim (IHV … HVW1) -V1 elim (IHT … HTU1) -T1 - /3 width=5 by lifts_flat, teqx_pair, ex2_intro/ -] -qed-. +/2 width=3 by teqg_lifts_sn/ qed-. lemma teqx_lifts_dx: liftable2_dx teqx. -/3 width=3 by teqx_lifts_sn, liftable2_sn_dx, teqx_sym/ qed-. +/2 width=3 by teqg_lifts_dx/ qed-. lemma teqx_lifts_bi: liftable2_bi teqx. -/3 width=6 by teqx_lifts_sn, liftable2_sn_bi/ qed-. +/2 width=6 by teqg_lifts_bi/ qed-. (* Inversion lemmas with sort-irrelevant equivalence for terms **************) lemma teqx_inv_lifts_sn: deliftable2_sn teqx. -#U1 #U2 #H elim H -U1 -U2 [||| * ] -[ #s1 #s2 #f #X #H >(lifts_inv_sort2 … H) -H - /3 width=3 by lifts_sort, teqx_sort, ex2_intro/ -| #i #f #X #H elim (lifts_inv_lref2 … H) -H - /3 width=3 by lifts_lref, teqx_lref, ex2_intro/ -| #l #f #X #H >(lifts_inv_gref2 … H) -H - /2 width=3 by lifts_gref, teqx_gref, ex2_intro/ -| #p #I #W1 #W2 #U1 #U2 #_ #_ #IHW #IHU #f #X #H elim (lifts_inv_bind2 … H) -H - #V1 #T1 #HVW1 #HTU1 #H destruct - elim (IHW … HVW1) -W1 elim (IHU … HTU1) -U1 - /3 width=5 by lifts_bind, teqx_pair, ex2_intro/ -| #I #W1 #W2 #U1 #U2 #_ #_ #IHW #IHU #f #X #H elim (lifts_inv_flat2 … H) -H - #V1 #T1 #HVW1 #HTU1 #H destruct - elim (IHW … HVW1) -W1 elim (IHU … HTU1) -U1 - /3 width=5 by lifts_flat, teqx_pair, ex2_intro/ -] -qed-. +/2 width=3 by teqg_inv_lifts_sn/ qed-. lemma teqx_inv_lifts_dx: deliftable2_dx teqx. -/3 width=3 by teqx_inv_lifts_sn, deliftable2_sn_dx, teqx_sym/ qed-. +/2 width=3 by teqg_inv_lifts_dx/ qed-. lemma teqx_inv_lifts_bi: deliftable2_bi teqx. -/3 width=6 by teqx_inv_lifts_sn, deliftable2_sn_bi/ qed-. +/2 width=6 by teqg_inv_lifts_bi/ qed-. lemma teqx_lifts_inv_pair_sn (I) (f): - ∀X,T. ⇧*[f]X ≘ T → ∀V. ②[I]V.T ≛ X → ⊥. -#I #f #X #T #H elim H -f -X -T -[ #f #s #V #H - elim (teqx_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct -| #f #i #j #_ #V #H - elim (teqx_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct -| #f #l #V #H - elim (teqx_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct -| #f #p #J #X1 #T1 #X2 #T2 #_ #_ #_ #IH2 #V #H - elim (teqx_inv_pair1 … H) -H #Z1 #Z2 #_ #HZ2 #H destruct - /2 width=2 by/ -| #f #J #X1 #T1 #X2 #T2 #_ #_ #_ #IH2 #V #H - elim (teqx_inv_pair1 … H) -H #Z1 #Z2 #_ #HZ2 #H destruct - /2 width=2 by/ -] -qed-. + ∀X,T. ⇧*[f]X ≘ T → ∀V. ②[I]V.T ≅ X → ⊥. +/2 width=8 by teqg_lifts_inv_pair_sn/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/seq.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/seq.ma index 60830fa46..f928bda7c 100644 --- a/matita/matita/contribs/lambdadelta/static_2/relocation/seq.ma +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/seq.ma @@ -13,13 +13,14 @@ (**************************************************************************) include "static_2/notation/relations/ideqsn_3.ma". -include "static_2/syntax/ceq_ext.ma". +include "static_2/syntax/teq_ext.ma". include "static_2/relocation/sex.ma". (* SYNTACTIC EQUIVALENCE FOR SELECTED LOCAL ENVIRONMENTS ********************) (* Basic_2A1: includes: lreq_atom lreq_zero lreq_pair lreq_succ *) -definition seq: relation3 rtmap lenv lenv ≝ sex ceq_ext cfull. +definition seq: relation3 rtmap lenv lenv ≝ + sex ceq_ext cfull. interpretation "syntactic equivalence on selected entries (local environment)" @@ -27,75 +28,89 @@ interpretation (* Basic properties *********************************************************) -lemma seq_eq_repl_back: ∀L1,L2. eq_repl_back … (λf. L1 ≡[f] L2). +lemma seq_eq_repl_back: + ∀L1,L2. eq_repl_back … (λf. L1 ≡[f] L2). /2 width=3 by sex_eq_repl_back/ qed-. -lemma seq_eq_repl_fwd: ∀L1,L2. eq_repl_fwd … (λf. L1 ≡[f] L2). +lemma seq_eq_repl_fwd: + ∀L1,L2. eq_repl_fwd … (λf. L1 ≡[f] L2). /2 width=3 by sex_eq_repl_fwd/ qed-. -lemma sle_seq_trans: ∀f2,L1,L2. L1 ≡[f2] L2 → - ∀f1. f1 ⊆ f2 → L1 ≡[f1] L2. +lemma sle_seq_trans: + ∀f2,L1,L2. L1 ≡[f2] L2 → + ∀f1. f1 ⊆ f2 → L1 ≡[f1] L2. /2 width=3 by sle_sex_trans/ qed-. (* Basic_2A1: includes: lreq_refl *) -lemma seq_refl: ∀f. reflexive … (seq f). +lemma seq_refl (f): + reflexive … (seq f). /2 width=1 by sex_refl/ qed. (* Basic_2A1: includes: lreq_sym *) -lemma seq_sym: ∀f. symmetric … (seq f). -/3 width=2 by sex_sym, cext2_sym/ qed-. +lemma seq_sym (f): + symmetric … (seq f). +/3 width=1 by sex_sym, ceq_ext_sym/ qed-. (* Basic inversion lemmas ***************************************************) (* Basic_2A1: includes: lreq_inv_atom1 *) -lemma seq_inv_atom1: ∀f,Y. ⋆ ≡[f] Y → Y = ⋆. +lemma seq_inv_atom1 (f): + ∀Y. ⋆ ≡[f] Y → Y = ⋆. /2 width=4 by sex_inv_atom1/ qed-. (* Basic_2A1: includes: lreq_inv_pair1 *) -lemma seq_inv_next1: ∀g,J,K1,Y. K1.ⓘ[J] ≡[↑g] Y → - ∃∃K2. K1 ≡[g] K2 & Y = K2.ⓘ[J]. +lemma seq_inv_next1 (g): + ∀J,K1,Y. K1.ⓘ[J] ≡[↑g] Y → + ∃∃K2. K1 ≡[g] K2 & Y = K2.ⓘ[J]. #g #J #K1 #Y #H elim (sex_inv_next1 … H) -H #Z #K2 #HK12 #H1 #H2 destruct <(ceq_ext_inv_eq … H1) -Z /2 width=3 by ex2_intro/ qed-. (* Basic_2A1: includes: lreq_inv_zero1 lreq_inv_succ1 *) -lemma seq_inv_push1: ∀g,J1,K1,Y. K1.ⓘ[J1] ≡[⫯g] Y → - ∃∃J2,K2. K1 ≡[g] K2 & Y = K2.ⓘ[J2]. +lemma seq_inv_push1 (g): + ∀J1,K1,Y. K1.ⓘ[J1] ≡[⫯g] Y → + ∃∃J2,K2. K1 ≡[g] K2 & Y = K2.ⓘ[J2]. #g #J1 #K1 #Y #H elim (sex_inv_push1 … H) -H /2 width=4 by ex2_2_intro/ qed-. (* Basic_2A1: includes: lreq_inv_atom2 *) -lemma seq_inv_atom2: ∀f,X. X ≡[f] ⋆ → X = ⋆. +lemma seq_inv_atom2 (f): + ∀X. X ≡[f] ⋆ → X = ⋆. /2 width=4 by sex_inv_atom2/ qed-. (* Basic_2A1: includes: lreq_inv_pair2 *) -lemma seq_inv_next2: ∀g,J,X,K2. X ≡[↑g] K2.ⓘ[J] → - ∃∃K1. K1 ≡[g] K2 & X = K1.ⓘ[J]. +lemma seq_inv_next2 (g): + ∀J,X,K2. X ≡[↑g] K2.ⓘ[J] → + ∃∃K1. K1 ≡[g] K2 & X = K1.ⓘ[J]. #g #J #X #K2 #H elim (sex_inv_next2 … H) -H #Z #K1 #HK12 #H1 #H2 destruct <(ceq_ext_inv_eq … H1) -J /2 width=3 by ex2_intro/ qed-. (* Basic_2A1: includes: lreq_inv_zero2 lreq_inv_succ2 *) -lemma seq_inv_push2: ∀g,J2,X,K2. X ≡[⫯g] K2.ⓘ[J2] → - ∃∃J1,K1. K1 ≡[g] K2 & X = K1.ⓘ[J1]. +lemma seq_inv_push2 (g): + ∀J2,X,K2. X ≡[⫯g] K2.ⓘ[J2] → + ∃∃J1,K1. K1 ≡[g] K2 & X = K1.ⓘ[J1]. #g #J2 #X #K2 #H elim (sex_inv_push2 … H) -H /2 width=4 by ex2_2_intro/ qed-. (* Basic_2A1: includes: lreq_inv_pair *) -lemma seq_inv_next: ∀f,I1,I2,L1,L2. L1.ⓘ[I1] ≡[↑f] L2.ⓘ[I2] → - ∧∧ L1 ≡[f] L2 & I1 = I2. +lemma seq_inv_next (f): + ∀I1,I2,L1,L2. L1.ⓘ[I1] ≡[↑f] L2.ⓘ[I2] → + ∧∧ L1 ≡[f] L2 & I1 = I2. #f #I1 #I2 #L1 #L2 #H elim (sex_inv_next … H) -H /3 width=3 by ceq_ext_inv_eq, conj/ qed-. (* Basic_2A1: includes: lreq_inv_succ *) -lemma seq_inv_push: ∀f,I1,I2,L1,L2. L1.ⓘ[I1] ≡[⫯f] L2.ⓘ[I2] → L1 ≡[f] L2. +lemma seq_inv_push (f): + ∀I1,I2,L1,L2. L1.ⓘ[I1] ≡[⫯f] L2.ⓘ[I2] → L1 ≡[f] L2. #f #I1 #I2 #L1 #L2 #H elim (sex_inv_push … H) -H /2 width=1 by conj/ qed-. -lemma seq_inv_tl: ∀f,I,L1,L2. L1 ≡[⫱f] L2 → L1.ⓘ[I] ≡[f] L2.ⓘ[I]. +lemma seq_inv_tl (f): + ∀I,L1,L2. L1 ≡[⫱f] L2 → L1.ⓘ[I] ≡[f] L2.ⓘ[I]. /2 width=1 by sex_inv_tl/ qed-. (* Basic_2A1: removed theorems 5: diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/seq_length.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/seq_length.ma index 3ea6b84b1..2fff87bf7 100644 --- a/matita/matita/contribs/lambdadelta/static_2/relocation/seq_length.ma +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/seq_length.ma @@ -20,5 +20,6 @@ include "static_2/relocation/seq.ma". (* Forward lemmas with length for local environments ************************) (* Basic_2A1: includes: lreq_fwd_length *) -lemma seq_fwd_length: ∀f,L1,L2. L1 ≡[f] L2 → |L1| = |L2|. +lemma seq_fwd_length (f): + ∀L1,L2. L1 ≡[f] L2 → |L1| = |L2|. /2 width=4 by sex_fwd_length/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/seq_seq.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/seq_seq.ma index a06f1f527..98bc91580 100644 --- a/matita/matita/contribs/lambdadelta/static_2/relocation/seq_seq.ma +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/seq_seq.ma @@ -12,26 +12,31 @@ (* *) (**************************************************************************) -include "static_2/syntax/ceq_ext_ceq_ext.ma". +include "static_2/syntax/teq_ext_teq_ext.ma". include "static_2/relocation/sex_sex.ma". (* SYNTACTIC EQUIVALENCE FOR SELECTED LOCAL ENVIRONMENTS ********************) (* Main properties **********************************************************) -theorem seq_trans: ∀f. Transitive … (seq f). +theorem seq_trans (f): + Transitive … (seq f). /3 width=5 by sex_trans, ceq_ext_trans/ qed-. -theorem seq_canc_sn: ∀f. left_cancellable … (seq f). +theorem seq_canc_sn (f): + left_cancellable … (seq f). /3 width=3 by sex_canc_sn, seq_trans, seq_sym/ qed-. -theorem seq_canc_dx: ∀f. right_cancellable … (seq f). +theorem seq_canc_dx (f): + right_cancellable … (seq f). /3 width=3 by sex_canc_dx, seq_trans, seq_sym/ qed-. -theorem seq_join: ∀f1,L1,L2. L1 ≡[f1] L2 → ∀f2. L1 ≡[f2] L2 → - ∀f. f1 ⋓ f2 ≘ f → L1 ≡[f] L2. +theorem seq_join: + ∀f1,L1,L2. L1 ≡[f1] L2 → ∀f2. L1 ≡[f2] L2 → + ∀f. f1 ⋓ f2 ≘ f → L1 ≡[f] L2. /2 width=5 by sex_join/ qed-. -theorem seq_meet: ∀f1,L1,L2. L1 ≡[f1] L2 → ∀f2. L1 ≡[f2] L2 → - ∀f. f1 ⋒ f2 ≘ f → L1 ≡[f] L2. +theorem seq_meet: + ∀f1,L1,L2. L1 ≡[f1] L2 → ∀f2. L1 ≡[f2] L2 → + ∀f. f1 ⋒ f2 ≘ f → L1 ≡[f] L2. /2 width=5 by sex_meet/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/s_transition/fqu_teqx.ma b/matita/matita/contribs/lambdadelta/static_2/s_transition/fqu_teqg.ma similarity index 68% rename from matita/matita/contribs/lambdadelta/static_2/s_transition/fqu_teqx.ma rename to matita/matita/contribs/lambdadelta/static_2/s_transition/fqu_teqg.ma index d24fe5813..bd420fd38 100644 --- a/matita/matita/contribs/lambdadelta/static_2/s_transition/fqu_teqx.ma +++ b/matita/matita/contribs/lambdadelta/static_2/s_transition/fqu_teqg.ma @@ -12,25 +12,27 @@ (* *) (**************************************************************************) -include "static_2/syntax/teqx.ma". +include "static_2/syntax/teqg.ma". include "static_2/s_transition/fqu_length.ma". (* SUPCLOSURE ***************************************************************) -(* Inversion lemmas with context-free sort-irrelevant equivalence for terms *) +(* Inversion lemmas with context-free generic equivalence for terms *********) -fact fqu_inv_teqx_aux: ∀b,G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂[b] ❪G2,L2,T2❫ → - G1 = G2 → |L1| = |L2| → T1 ≛ T2 → ⊥. -#b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2 +fact fqu_inv_teqg_aux (S) (b): + ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂[b] ❪G2,L2,T2❫ → + G1 = G2 → |L1| = |L2| → T1 ≛[S] T2 → ⊥. +#S #b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2 [1: #I #G #L #V #_ #H elim (succ_inv_refl_sn … H) |6: #I #G #L #T #U #_ #_ #H elim (succ_inv_refl_sn … H) ] -/2 width=6 by teqx_inv_pair_xy_y, teqx_inv_pair_xy_x/ +/2 width=6 by teqg_inv_pair_xy_y, teqg_inv_pair_xy_x/ qed-. (* Basic_2A1: uses: fqu_inv_eq *) -lemma fqu_inv_teqx: ∀b,G,L1,L2,T1,T2. ❪G,L1,T1❫ ⬂[b] ❪G,L2,T2❫ → - |L1| = |L2| → T1 ≛ T2 → ⊥. -#b #G #L1 #L2 #T1 #T2 #H -@(fqu_inv_teqx_aux … H) // (**) (* full auto fails *) +lemma fqu_inv_teqg (S) (b): + ∀G,L1,L2,T1,T2. ❪G,L1,T1❫ ⬂[b] ❪G,L2,T2❫ → + |L1| = |L2| → T1 ≛[S] T2 → ⊥. +#S #b #G #L1 #L2 #T1 #T2 #H +@(fqu_inv_teqg_aux … H) // (**) (* full auto fails *) qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/aaa_feqx.ma b/matita/matita/contribs/lambdadelta/static_2/static/aaa_feqg.ma similarity index 71% rename from matita/matita/contribs/lambdadelta/static_2/static/aaa_feqx.ma rename to matita/matita/contribs/lambdadelta/static_2/static/aaa_feqg.ma index f3ea064f0..29404a7aa 100644 --- a/matita/matita/contribs/lambdadelta/static_2/static/aaa_feqx.ma +++ b/matita/matita/contribs/lambdadelta/static_2/static/aaa_feqg.ma @@ -12,14 +12,16 @@ (* *) (**************************************************************************) -include "static_2/static/feqx.ma". -include "static_2/static/aaa_reqx.ma". +include "static_2/static/feqg.ma". +include "static_2/static/aaa_reqg.ma". (* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) -(* Properties with sort-irrelevant equivalence on referred entries **********) +(* Properties with generic equivalence on referred entries ******************) -lemma aaa_feqx_conf: ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫ → - ∀A. ❪G1,L1❫ ⊢ T1 ⁝ A → ❪G2,L2❫ ⊢ T2 ⁝ A. -#G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 -/2 width=5 by aaa_teqx_conf_reqx/ qed-. +lemma aaa_feqg_conf (S): + reflexive … S → + ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫ → + ∀A. ❪G1,L1❫ ⊢ T1 ⁝ A → ❪G2,L2❫ ⊢ T2 ⁝ A. +#S #HS #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 +/2 width=7 by aaa_teqg_conf_reqg/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/aaa_reqx.ma b/matita/matita/contribs/lambdadelta/static_2/static/aaa_reqg.ma similarity index 51% rename from matita/matita/contribs/lambdadelta/static_2/static/aaa_reqx.ma rename to matita/matita/contribs/lambdadelta/static_2/static/aaa_reqg.ma index c3a6249e1..e2d735487 100644 --- a/matita/matita/contribs/lambdadelta/static_2/static/aaa_reqx.ma +++ b/matita/matita/contribs/lambdadelta/static_2/static/aaa_reqg.ma @@ -12,34 +12,36 @@ (* *) (**************************************************************************) -include "static_2/static/reqx.ma". +include "static_2/static/reqg.ma". include "static_2/static/aaa.ma". (* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) -(* Properties with sort-irrelevant equivalence on referred entries **********) +(* Properties with generic equivalence on referred entries ******************) -lemma aaa_teqx_conf_reqx: ∀G,L1,T1,A. ❪G,L1❫ ⊢ T1 ⁝ A → ∀T2. T1 ≛ T2 → - ∀L2. L1 ≛[T1] L2 → ❪G,L2❫ ⊢ T2 ⁝ A. -#G #L1 #T1 #A #H elim H -G -L1 -T1 -A -[ #G #L1 #s1 #X #H1 elim (teqx_inv_sort1 … H1) -H1 // -| #I #G #L1 #V1 #B #_ #IH #X #H1 >(teqx_inv_lref1 … H1) -H1 - #Y #H2 elim (reqx_inv_zero_pair_sn … H2) -H2 +lemma aaa_teqg_conf_reqg (S) (G): + reflexive … S → + ∀L1,T1,A. ❪G,L1❫ ⊢ T1 ⁝ A → ∀T2. T1 ≛[S] T2 → + ∀L2. L1 ≛[S,T1] L2 → ❪G,L2❫ ⊢ T2 ⁝ A. +#S #G #HS #L1 #T1 #A #H elim H -G -L1 -T1 -A +[ #G #L1 #s1 #X #H1 elim (teqg_inv_sort1 … H1) -H1 // +| #I #G #L1 #V1 #B #_ #IH #X #H1 >(teqg_inv_lref1 … H1) -H1 + #Y #H2 elim (reqg_inv_zero_pair_sn … H2) -H2 #L2 #V2 #HL12 #HV12 #H destruct /3 width=1 by aaa_zero/ -| #I #G #L1 #A #i #_ #IH #X #H1 >(teqx_inv_lref1 … H1) -H1 - #Y #H2 elim (reqx_inv_lref_bind_sn … H2) -H2 +| #I #G #L1 #A #i #_ #IH #X #H1 >(teqg_inv_lref1 … H1) -H1 + #Y #H2 elim (reqg_inv_lref_bind_sn … H2) -H2 #J #L2 #HL12 #H destruct /3 width=1 by aaa_lref/ -| #p #G #L1 #V1 #T1 #B #A #_ #_ #IHV #IHT #X #H1 elim (teqx_inv_pair1 … H1) -H1 - #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (reqx_inv_bind … H2) -H2 destruct - /5 width=2 by aaa_abbr, reqx_bind_repl_dx, ext2_pair/ -| #p #G #L1 #V1 #T1 #B #A #_ #_ #IHV #IHT #X #H1 elim (teqx_inv_pair1 … H1) -H1 - #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (reqx_inv_bind … H2) -H2 destruct - /5 width=2 by aaa_abst, reqx_bind_repl_dx, ext2_pair/ -| #G #L1 #V1 #T1 #B #A #_ #_ #IHV #IHT #X #H1 elim (teqx_inv_pair1 … H1) -H1 - #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (reqx_inv_flat … H2) -H2 destruct +| #p #G #L1 #V1 #T1 #B #A #_ #_ #IHV #IHT #X #H1 elim (teqg_inv_pair1 … H1) -H1 + #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (reqg_inv_bind_refl … H2) -H2 destruct + /5 width=2 by aaa_abbr, reqg_bind_repl_dx, ext2_pair/ +| #p #G #L1 #V1 #T1 #B #A #_ #_ #IHV #IHT #X #H1 elim (teqg_inv_pair1 … H1) -H1 + #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (reqg_inv_bind_refl … H2) -H2 destruct + /5 width=2 by aaa_abst, reqg_bind_repl_dx, ext2_pair/ +| #G #L1 #V1 #T1 #B #A #_ #_ #IHV #IHT #X #H1 elim (teqg_inv_pair1 … H1) -H1 + #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (reqg_inv_flat … H2) -H2 destruct /3 width=3 by aaa_appl/ -| #G #L1 #V1 #T1 #A #_ #_ #IHV #IHT #X #H1 elim (teqx_inv_pair1 … H1) -H1 - #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (reqx_inv_flat … H2) -H2 destruct +| #G #L1 #V1 #T1 #A #_ #_ #IHV #IHT #X #H1 elim (teqg_inv_pair1 … H1) -H1 + #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (reqg_inv_flat … H2) -H2 destruct /3 width=1 by aaa_cast/ ] qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/feqg.ma b/matita/matita/contribs/lambdadelta/static_2/static/feqg.ma new file mode 100644 index 000000000..39cba31e9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/feqg.ma @@ -0,0 +1,57 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "static_2/notation/relations/stareqsn_7.ma". +include "static_2/syntax/genv.ma". +include "static_2/static/reqg.ma". + +(* GENERIC EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *********************) + +inductive feqg (S) (G) (L1) (T1): relation3 genv lenv term ≝ +| feqg_intro_sn: ∀L2,T2. L1 ≛[S,T1] L2 → T1 ≛[S] T2 → + feqg S G L1 T1 G L2 T2 +. + +interpretation + "generic equivalence on referred entries (closure)" + 'StarEqSn S G1 L1 T1 G2 L2 T2 = (feqg S G1 L1 T1 G2 L2 T2). + +(* Basic_properties *********************************************************) + +lemma feqg_intro_dx (S) (G): + reflexive … S → symmetric … S → + ∀L1,L2,T2. L1 ≛[S,T2] L2 → + ∀T1. T1 ≛[S] T2 → ❪G,L1,T1❫ ≛[S] ❪G,L2,T2❫. +/3 width=6 by feqg_intro_sn, teqg_reqg_div/ qed. + +(* Basic inversion lemmas ***************************************************) + +lemma feqg_inv_gen_sn (S): + ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫ → + ∧∧ G1 = G2 & L1 ≛[S,T1] L2 & T1 ≛[S] T2. +#S #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 /2 width=1 by and3_intro/ +qed-. + +lemma feqg_inv_gen_dx (S): + reflexive … S → + ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫ → + ∧∧ G1 = G2 & L1 ≛[S,T2] L2 & T1 ≛[S] T2. +#S #HS #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 +/3 width=6 by teqg_reqg_conf_sn, and3_intro/ +qed-. + +(* Basic_2A1: removed theorems 6: + fleq_refl fleq_sym fleq_inv_gen + fleq_trans fleq_canc_sn fleq_canc_dx +*) diff --git a/matita/matita/contribs/lambdadelta/static_2/static/feqg_feqg.ma b/matita/matita/contribs/lambdadelta/static_2/static/feqg_feqg.ma new file mode 100644 index 000000000..cb2b11ddd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/feqg_feqg.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 "static_2/static/reqg_reqg.ma". +include "static_2/static/feqg.ma". + +(* GENERIC EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *********************) + +(* Advanced properties ******************************************************) + +lemma feqg_sym (S): + reflexive … S → symmetric … S → + tri_symmetric … (feqg S). +#S #H1S #H2S #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -L1 -T1 +/3 width=1 by feqg_intro_dx, reqg_sym, teqg_sym/ +qed-. + +lemma feqg_dec (S): + (∀s1,s2. Decidable … (S s1 s2)) → + ∀G1,G2,L1,L2,T1,T2. Decidable (❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫). +#S #HS #G1 #G2 #L1 #L2 #T1 #T2 +elim (eq_genv_dec G1 G2) #HnG destruct +[ elim (reqg_dec … HS L1 L2 T1) #HnL + [ elim (teqg_dec … HS T1 T2) #HnT + [ /3 width=1 by feqg_intro_sn, or_introl/ ] + ] +] +@or_intror #H +elim (feqg_inv_gen_sn … H) -H #H #HL #HT destruct +/2 width=1 by/ +qed-. + +(* Main properties **********************************************************) + +theorem feqg_trans (S): + reflexive … S → symmetric … S → Transitive … S → + tri_transitive … (feqg S). +#S #H1S #H2S #H3S #G1 #G #L1 #L #T1 #T * -G -L -T +#L #T #HL1 #HT1 #G2 #L2 #T2 * -G2 -L2 -T2 +/4 width=8 by feqg_intro_sn, reqg_trans, teqg_reqg_div, teqg_trans/ +qed-. + +theorem feqg_canc_sn (S): + reflexive … S → symmetric … S → Transitive … S → + ∀G,G1,L,L1,T,T1. ❪G,L,T❫ ≛[S] ❪G1,L1,T1❫ → + ∀G2,L2,T2. ❪G,L,T❫ ≛[S] ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫. +/3 width=5 by feqg_trans, feqg_sym/ qed-. + +theorem feqg_canc_dx (S): + reflexive … S → symmetric … S → Transitive … S → + ∀G1,G,L1,L,T1,T. ❪G1,L1,T1❫ ≛[S] ❪G,L,T❫ → + ∀G2,L2,T2. ❪G2,L2,T2❫ ≛[S] ❪G,L,T❫ → ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫. +/3 width=5 by feqg_trans, feqg_sym/ qed-. + +(* Main inversion lemmas with generic equivalence on terms ******************) + +theorem feqg_tneqg_repl_dx (S): + reflexive … S → symmetric … S → Transitive … S → + ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫ → + ∀U1,U2. ❪G1,L1,U1❫ ≛[S] ❪G2,L2,U2❫ → + (T2 ≛[S] U2 → ⊥) → (T1 ≛[S] U1 → ⊥). +#S #H1S #H2S #H3S #G1 #G2 #L1 #L2 #T1 #T2 #HT #U1 #U2 #HU #HnTU2 #HTU1 +elim (feqg_inv_gen_sn … HT) -HT #_ #_ #HT +elim (feqg_inv_gen_sn … HU) -HU #_ #_ #HU +/3 width=5 by teqg_repl/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/feqg_fqup.ma b/matita/matita/contribs/lambdadelta/static_2/static/feqg_fqup.ma new file mode 100644 index 000000000..e50f40818 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/feqg_fqup.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 "static_2/static/reqg_fqup.ma". +include "static_2/static/feqg.ma". + +(* GENERIC EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *********************) + +(* Properties with generic equivalence for terms ****************************) + +lemma teqg_feqg (S): + reflexive … S → + ∀T1,T2. T1 ≛[S] T2 → + ∀G,L. ❪G,L,T1❫ ≛[S] ❪G,L,T2❫. +/3 width=1 by feqg_intro_sn, reqg_refl/ qed. + +(* Advanced properties ******************************************************) + +lemma feqg_refl (S): + reflexive … S → + tri_reflexive … (feqg S). +/3 width=1 by teqg_refl, teqg_feqg/ qed. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/feqg_fqus.ma b/matita/matita/contribs/lambdadelta/static_2/static/feqg_fqus.ma new file mode 100644 index 000000000..b2db044de --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/feqg_fqus.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 "static_2/static/reqg_fqus.ma". +include "static_2/static/feqg.ma". + +(* GENERIC EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *********************) + +(* Properties with star-iterated structural successor for closures **********) + +lemma feqg_fqus_trans (S) (b): + reflexive … S → symmetric … S → Transitive … S → + ∀G1,G,L1,L,T1,T. ❪G1,L1,T1❫ ≛[S] ❪G,L,T❫ → + ∀G2,L2,T2. ❪G,L,T❫ ⬂*[b] ❪G2,L2,T2❫ → + ∃∃G,L0,T0. ❪G1,L1,T1❫ ⬂*[b] ❪G,L0,T0❫ & ❪G,L0,T0❫ ≛[S] ❪G2,L2,T2❫. +#S #b #H1S #H2S #H3S #G1 #G #L1 #L #T1 #T #H1 #G2 #L2 #T2 #H2 +elim(feqg_inv_gen_dx … H1) -H1 // #HG #HL1 #HT1 destruct +elim (reqg_fqus_trans … H2 … HL1) -L // #L #T0 #H2 #HT02 #HL2 +elim (teqg_fqus_trans … H2 … HT1) -T // #L0 #T #H2 #HT0 #HL0 +lapply (teqg_reqg_conf_sn … HT02 … HL0) -HL0 // #HL0 +/4 width=7 by feqg_intro_dx, reqg_trans, teqg_trans, ex2_3_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/feqx.ma b/matita/matita/contribs/lambdadelta/static_2/static/feqx.ma index 82867f626..e4c8a22d1 100644 --- a/matita/matita/contribs/lambdadelta/static_2/static/feqx.ma +++ b/matita/matita/contribs/lambdadelta/static_2/static/feqx.ma @@ -12,23 +12,21 @@ (* *) (**************************************************************************) -include "static_2/notation/relations/stareqsn_6.ma". -include "static_2/syntax/genv.ma". -include "static_2/static/reqx.ma". +include "static_2/notation/relations/approxeqsn_6.ma". +include "static_2/syntax/teqx.ma". +include "static_2/static/feqg.ma". (* SORT-IRRELEVANT EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *************) -inductive feqx (G) (L1) (T1): relation3 genv lenv term ≝ -| feqx_intro_sn: ∀L2,T2. L1 ≛[T1] L2 → T1 ≛ T2 → - feqx G L1 T1 G L2 T2 -. +definition feqx: relation6 genv lenv term genv lenv term ≝ + feqg sfull. interpretation "sort-irrelevant equivalence on referred entries (closure)" - 'StarEqSn G1 L1 T1 G2 L2 T2 = (feqx G1 L1 T1 G2 L2 T2). + 'ApproxEqSn G1 L1 T1 G2 L2 T2 = (feqx G1 L1 T1 G2 L2 T2). (* Basic_properties *********************************************************) - +(* lemma feqx_intro_dx (G): ∀L1,L2,T2. L1 ≛[T2] L2 → ∀T1. T1 ≛ T2 → ❪G,L1,T1❫ ≛ ❪G,L2,T2❫. @@ -48,7 +46,7 @@ lemma feqx_inv_gen_dx: #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 /3 width=3 by teqx_reqx_conf_sn, and3_intro/ qed-. - +*) (* Basic_2A1: removed theorems 6: fleq_refl fleq_sym fleq_inv_gen fleq_trans fleq_canc_sn fleq_canc_dx diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/ceq_ext.ma b/matita/matita/contribs/lambdadelta/static_2/static/remove/feqx_req.etc similarity index 67% rename from matita/matita/contribs/lambdadelta/static_2/syntax/ceq_ext.ma rename to matita/matita/contribs/lambdadelta/static_2/static/remove/feqx_req.etc index 23a3a9189..466275aad 100644 --- a/matita/matita/contribs/lambdadelta/static_2/syntax/ceq_ext.ma +++ b/matita/matita/contribs/lambdadelta/static_2/static/remove/feqx_req.etc @@ -12,20 +12,16 @@ (* *) (**************************************************************************) -include "static_2/syntax/cext2.ma". +include "static_2/static/reqx_req.ma". +include "static_2/static/feqx.ma". -(* CONTEXT-AWARE SYNTACTIC EQUIVALENCE FOR BINDERS **************************) +(* SORT-IRRELEVANT EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *************) -definition ceq_ext: lenv → relation bind ≝ - cext2 ceq. +(* Properties with syntactic equivalence on referred entries ****************) -(* Basic properties *********************************************************) - -lemma ceq_ext_refl (L): reflexive … (ceq_ext L). -/2 width=1 by ext2_refl/ qed. - -(* Basic inversion lemmas ***************************************************) - -lemma ceq_ext_inv_eq: ∀L,I1,I2. ceq_ext L I1 I2 → I1 = I2. -#L #I1 #I2 * -I1 -I2 // +lemma req_feqx_trans: ∀L1,L,T1. L1 ≡[T1] L → + ∀G1,G2,L2,T2. ❪G1,L,T1❫ ≛ ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫. +#L1 #L #T1 #HL1 #G1 #G2 #L2 #T2 #H +elim (feqx_inv_gen_sn … H) -H #H #HL2 #T12 destruct +/3 width=3 by feqx_intro_sn, req_reqx_trans/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/remove/req_drops.etc b/matita/matita/contribs/lambdadelta/static_2/static/remove/req_drops.etc new file mode 100644 index 000000000..fa8ea6d84 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/remove/req_drops.etc @@ -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 "static_2/static/rex_drops.ma". +include "static_2/static/req.ma". + +(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********) + +(* Note: req_inv_lifts_dx missing in basic_2A1 *) + +(* Basic_2A1: uses: lleq_inv_lift_le lleq_inv_lift_be lleq_inv_lift_ge *) +lemma req_inv_lifts_bi: ∀L1,L2,U. L1 ≡[U] L2 → ∀b,f. 𝐔❪f❫ → + ∀K1,K2. ⇩*[b,f] L1 ≘ K1 → ⇩*[b,f] L2 ≘ K2 → + ∀T. ⇧*[f] T ≘ U → K1 ≡[T] K2. +/2 width=10 by rex_inv_lifts_bi/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/remove/req_fqup.etc b/matita/matita/contribs/lambdadelta/static_2/static/remove/req_fqup.etc new file mode 100644 index 000000000..4434b4d69 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/remove/req_fqup.etc @@ -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 "static_2/static/rex_fqup.ma". +include "static_2/static/req.ma". + +(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********) + +(* Advanced properties ******************************************************) + +(* Basic_2A1: was: lleq_refl *) +lemma req_refl: ∀T. reflexive … (req T). +/2 width=1 by rex_refl/ qed. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/req_fsle.ma b/matita/matita/contribs/lambdadelta/static_2/static/remove/req_fsle.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/static_2/static/req_fsle.ma rename to matita/matita/contribs/lambdadelta/static_2/static/remove/req_fsle.etc diff --git a/matita/matita/contribs/lambdadelta/static_2/static/remove/req_length.etc b/matita/matita/contribs/lambdadelta/static_2/static/remove/req_length.etc new file mode 100644 index 000000000..e5bd7b4a8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/remove/req_length.etc @@ -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 "static_2/static/rex_length.ma". +include "static_2/static/rex_fsle.ma". +include "static_2/static/req.ma". + +(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********) + +(* Advanved properties with free variables inclusion ************************) + +lemma req_fsge_comp: + rex_fsge_compatible ceq. +#L1 #L2 #T #H elim H #f1 #Hf1 #HL12 +lapply (frees_req_conf … Hf1 … H) -H +lapply (sex_fwd_length … HL12) +/3 width=8 by lveq_length_eq, ex4_4_intro/ (**) (* full auto fails *) +qed-. + +(* Advanced properties ******************************************************) + +(* Basic_2A1: uses: lleq_sym *) +lemma req_sym (T): + symmetric … (req T). +/3 width=1 by req_fsge_comp, rex_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/reqx_req.ma b/matita/matita/contribs/lambdadelta/static_2/static/remove/reqx_req.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/static_2/static/reqx_req.ma rename to matita/matita/contribs/lambdadelta/static_2/static/remove/reqx_req.etc diff --git a/matita/matita/contribs/lambdadelta/static_2/static/req.ma b/matita/matita/contribs/lambdadelta/static_2/static/req.ma index b53ef1755..59efd1af8 100644 --- a/matita/matita/contribs/lambdadelta/static_2/static/req.ma +++ b/matita/matita/contribs/lambdadelta/static_2/static/req.ma @@ -13,13 +13,14 @@ (**************************************************************************) include "static_2/notation/relations/ideqsn_3.ma". -include "static_2/static/rex.ma". +include "static_2/syntax/teq_ext.ma". +include "static_2/static/reqg.ma". (* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********) (* Basic_2A1: was: lleq *) definition req: relation3 term lenv lenv ≝ - rex ceq. + reqg (eq …). interpretation "syntactic equivalence on referred entries (local environment)" @@ -35,12 +36,12 @@ definition R_transitive_req: predicate (relation3 lenv term term) ≝ lemma req_inv_bind: ∀p,I,L1,L2,V,T. L1 ≡[ⓑ[p,I]V.T] L2 → ∧∧ L1 ≡[V] L2 & L1.ⓑ[I]V ≡[T] L2.ⓑ[I]V. -/2 width=2 by rex_inv_bind/ qed-. +/2 width=2 by reqg_inv_bind_refl/ qed-. lemma req_inv_flat: ∀I,L1,L2,V,T. L1 ≡[ⓕ[I]V.T] L2 → ∧∧ L1 ≡[V] L2 & L1 ≡[T] L2. -/2 width=2 by rex_inv_flat/ qed-. +/2 width=2 by reqg_inv_flat/ qed-. (* Advanced inversion lemmas ************************************************) @@ -48,27 +49,29 @@ lemma req_inv_zero_pair_sn: ∀I,L2,K1,V. K1.ⓑ[I]V ≡[#0] L2 → ∃∃K2. K1 ≡[V] K2 & L2 = K2.ⓑ[I]V. #I #L2 #K1 #V #H -elim (rex_inv_zero_pair_sn … H) -H #K2 #X #HK12 #HX #H destruct -/2 width=3 by ex2_intro/ +elim (reqg_inv_zero_pair_sn … H) -H #K2 #X #HK12 #HX #H destruct +@(teq_repl_1 … HX) -X +@(ex2_intro … HK12) // (**) (* auto fails because a δ-expamsion gets in the way *) qed-. lemma req_inv_zero_pair_dx: ∀I,L1,K2,V. L1 ≡[#0] K2.ⓑ[I]V → ∃∃K1. K1 ≡[V] K2 & L1 = K1.ⓑ[I]V. #I #L1 #K2 #V #H -elim (rex_inv_zero_pair_dx … H) -H #K1 #X #HK12 #HX #H destruct -/2 width=3 by ex2_intro/ +elim (reqg_inv_zero_pair_dx … H) -H #K1 #X #HK12 #HX #H destruct +@(teq_repl_1 … HX) -V +@(ex2_intro … HK12) // (**) (* auto fails because a δ-expamsion gets in the way *) qed-. lemma req_inv_lref_bind_sn: ∀I1,K1,L2,i. K1.ⓘ[I1] ≡[#↑i] L2 → ∃∃I2,K2. K1 ≡[#i] K2 & L2 = K2.ⓘ[I2]. -/2 width=2 by rex_inv_lref_bind_sn/ qed-. +/2 width=2 by reqg_inv_lref_bind_sn/ qed-. lemma req_inv_lref_bind_dx: ∀I2,K2,L1,i. L1 ≡[#↑i] K2.ⓘ[I2] → ∃∃I1,K1. K1 ≡[#i] K2 & L1 = K1.ⓘ[I1]. -/2 width=2 by rex_inv_lref_bind_dx/ qed-. +/2 width=2 by reqg_inv_lref_bind_dx/ qed-. (* Basic forward lemmas *****************************************************) @@ -78,34 +81,18 @@ lemma req_fwd_rex (R): c_reflexive … R → ∀L1,L2,T. L1 ≡[T] L2 → L1 ⪤[R,T] L2. #R #HR #L1 #L2 #T * #f #Hf #HL12 -/4 width=7 by sex_co, cext2_co, ex2_intro/ +/5 width=7 by sex_co, cext2_co, teq_repl_1, ex2_intro/ qed-. -(* Basic_properties *********************************************************) - -lemma frees_req_conf: - ∀f,L1,T. L1 ⊢ 𝐅+❪T❫ ≘ f → - ∀L2. L1 ≡[T] L2 → L2 ⊢ 𝐅+❪T❫ ≘ f. -#f #L1 #T #H elim H -f -L1 -T -[ /2 width=3 by frees_sort/ -| #f #i #Hf #L2 #H2 - >(rex_inv_atom_sn … H2) -L2 - /2 width=1 by frees_atom/ -| #f #I #L1 #V1 #_ #IH #Y #H2 - elim (req_inv_zero_pair_sn … H2) -H2 #L2 #HL12 #H destruct - /3 width=1 by frees_pair/ -| #f #I #L1 #Hf #Y #H2 - elim (rex_inv_zero_unit_sn … H2) -H2 #g #L2 #_ #_ #H destruct - /2 width=1 by frees_unit/ -| #f #I #L1 #i #_ #IH #Y #H2 - elim (req_inv_lref_bind_sn … H2) -H2 #J #L2 #HL12 #H destruct - /3 width=1 by frees_lref/ -| /2 width=1 by frees_gref/ -| #f1V #f1T #f1 #p #I #L1 #V1 #T1 #_ #_ #Hf1 #IHV #IHT #L2 #H2 - elim (req_inv_bind … H2) -H2 /3 width=5 by frees_bind/ -| #f1V #f1T #f1 #I #L1 #V1 #T1 #_ #_ #Hf1 #IHV #IHT #L2 #H2 - elim (req_inv_flat … H2) -H2 /3 width=5 by frees_flat/ -] +lemma req_fwd_reqg (S) (T:term): + reflexive … S → + ∀L1,L2. L1 ≡[T] L2 → L1 ≛[S,T] L2. +/3 width=1 by req_fwd_rex, teqg_refl/ qed-. + +lemma transitive_req_fwd_rex (R): + R_transitive_req R → R_transitive_rex ceq R R. +#R #HR #L1 #L #T1 #HL1 #T #HT #T2 #HT2 +@(HR … HL1) -HR -HL1 >(teq_inv_eq … HT) -T1 // (**) qed-. (* Basic_2A1: removed theorems 10: diff --git a/matita/matita/contribs/lambdadelta/static_2/static/req_req.ma b/matita/matita/contribs/lambdadelta/static_2/static/req_req.ma new file mode 100644 index 000000000..4a6e0502a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/req_req.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 "static_2/static/reqg_reqg.ma". +include "static_2/static/req.ma". + +(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********) + +(* Advanced Forward lemmas **************************************************) + +lemma req_rex_trans (R) (L) (T): + R_transitive_req R → + ∀L1. L1 ≡[T] L → ∀L2. L ⪤[R,T] L2 → L1 ⪤[R,T] L2. +#R #L #T #HR #L1 #HL1 #L2 #HL2 +@(rex_trans_fsle … HL1 … HL2) -L (**) (* fulll auto too slow *) +/3 width=16 by transitive_req_fwd_rex, reqg_fsle_comp, rex_trans_next/ +qed-. + +lemma req_reqg_trans (S) (T:term) (L): + ∀L1. L1 ≡[T] L → ∀L2. L ≛[S,T] L2 → L1 ≛[S,T] L2. +/2 width=3 by req_rex_trans/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/reqg.ma b/matita/matita/contribs/lambdadelta/static_2/static/reqg.ma new file mode 100644 index 000000000..1c5d5ed90 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/reqg.ma @@ -0,0 +1,231 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "static_2/notation/relations/stareqsn_4.ma". +include "static_2/syntax/teqg_ext.ma". +include "static_2/static/rex.ma". + +(* GENERIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***********) + +definition reqg (S): relation3 … ≝ + rex (ceqg S). + +interpretation + "generic equivalence on selected entries (local environment)" + 'StarEqSn S f L1 L2 = (sex (ceqg_ext S) cfull f L1 L2). + +interpretation + "generic equivalence on referred entries (local environment)" + 'StarEqSn S T L1 L2 = (reqg S T L1 L2). + +(* Basic properties ***********************************************************) + +lemma frees_teqg_conf_seqg (S): + ∀f,L1,T1. L1 ⊢ 𝐅+❪T1❫ ≘ f → ∀T2. T1 ≛[S] T2 → + ∀L2. L1 ≛[S,f] L2 → L2 ⊢ 𝐅+❪T2❫ ≘ f. +#S #f #L1 #T1 #H elim H -f -L1 -T1 +[ #f #L1 #s1 #Hf #X #H1 #L2 #_ + elim (teqg_inv_sort1 … H1) -H1 #s2 #_ #H destruct + /2 width=3 by frees_sort/ +| #f #i #Hf #X #H1 + >(teqg_inv_lref1 … H1) -X #Y #H2 + >(sex_inv_atom1 … H2) -Y + /2 width=1 by frees_atom/ +| #f #I #L1 #V1 #_ #IH #X #H1 + >(teqg_inv_lref1 … H1) -X #Y #H2 + elim (sex_inv_next1 … H2) -H2 #Z #L2 #HL12 #HZ #H destruct + elim (ext2_inv_pair_sn … HZ) -HZ #V2 #HV12 #H destruct + /3 width=1 by frees_pair/ +| #f #I #L1 #Hf #X #H1 + >(teqg_inv_lref1 … H1) -X #Y #H2 + elim (sex_inv_next1 … H2) -H2 #Z #L2 #_ #HZ #H destruct + >(ext2_inv_unit_sn … HZ) -Z /2 width=1 by frees_unit/ +| #f #I #L1 #i #_ #IH #X #H1 + >(teqg_inv_lref1 … H1) -X #Y #H2 + elim (sex_inv_push1 … H2) -H2 #J #L2 #HL12 #_ #H destruct + /3 width=1 by frees_lref/ +| #f #L1 #l #Hf #X #H1 #L2 #_ + >(teqg_inv_gref1 … H1) -X /2 width=1 by frees_gref/ +| #f1V #f1T #f1 #p #I #L1 #V1 #T1 #_ #_ #Hf1 #IHV #IHT #X #H1 + elim (teqg_inv_pair1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H1 #L2 #HL12 destruct + /6 width=5 by frees_bind, sex_inv_tl, ext2_pair, sle_sex_trans, sor_inv_sle_dx, sor_inv_sle_sn/ +| #f1V #f1T #f1 #I #L1 #V1 #T1 #_ #_ #Hf1 #IHV #IHT #X #H1 + elim (teqg_inv_pair1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H1 #L2 #HL12 destruct + /5 width=5 by frees_flat, sle_sex_trans, sor_inv_sle_dx, sor_inv_sle_sn/ +] +qed-. + +lemma frees_teqg_conf (S): + reflexive … S → + ∀f,L,T1. L ⊢ 𝐅+❪T1❫ ≘ f → + ∀T2. T1 ≛[S] T2 → L ⊢ 𝐅+❪T2❫ ≘ f. +/5 width=6 by frees_teqg_conf_seqg, sex_refl, teqg_refl, ext2_refl/ qed-. + +lemma frees_seqg_conf (S): + reflexive … S → + ∀f,L1,T. L1 ⊢ 𝐅+❪T❫ ≘ f → + ∀L2. L1 ≛[S,f] L2 → L2 ⊢ 𝐅+❪T❫ ≘ f. +/3 width=6 by frees_teqg_conf_seqg, teqg_refl/ qed-. + +lemma teqg_rex_conf_sn (S) (R): + reflexive … S → + s_r_confluent1 … (ceqg S) (rex R). +#S #R #HS #L1 #T1 #T2 #HT12 #L2 * +/3 width=5 by frees_teqg_conf, ex2_intro/ +qed-. + +lemma teqg_rex_div (S) (R): + reflexive … S → symmetric … S → + ∀T1,T2. T1 ≛[S] T2 → + ∀L1,L2. L1 ⪤[R,T2] L2 → L1 ⪤[R,T1] L2. +/3 width=5 by teqg_rex_conf_sn, teqg_sym/ qed-. + +lemma teqg_reqg_conf_sn (S1) (S2): + reflexive … S1 → + s_r_confluent1 … (ceqg S1) (reqg S2). +/2 width=5 by teqg_rex_conf_sn/ qed-. + +lemma teqg_reqg_div (S1) (S2): + reflexive … S1 → symmetric … S1 → + ∀T1,T2. T1 ≛[S1] T2 → + ∀L1,L2. L1 ≛[S2,T2] L2 → L1 ≛[S2,T1] L2. +/2 width=6 by teqg_rex_div/ qed-. + +lemma reqg_atom (S): + ∀I. ⋆ ≛[S,⓪[I]] ⋆. +/2 width=1 by rex_atom/ qed. + +lemma reqg_sort (S): + ∀I1,I2,L1,L2,s. + L1 ≛[S,⋆s] L2 → L1.ⓘ[I1] ≛[S,⋆s] L2.ⓘ[I2]. +/2 width=1 by rex_sort/ qed. + +lemma reqg_pair (S): + ∀I,L1,L2,V1,V2. + L1 ≛[S,V1] L2 → V1 ≛[S] V2 → L1.ⓑ[I]V1 ≛[S,#0] L2.ⓑ[I]V2. +/2 width=1 by rex_pair/ qed. + +lemma reqg_unit (S): + ∀f,I,L1,L2. 𝐈❪f❫ → L1 ≛[S,f] L2 → + L1.ⓤ[I] ≛[S,#0] L2.ⓤ[I]. +/2 width=3 by rex_unit/ qed. + +lemma reqg_lref (S): + ∀I1,I2,L1,L2,i. + L1 ≛[S,#i] L2 → L1.ⓘ[I1] ≛[S,#↑i] L2.ⓘ[I2]. +/2 width=1 by rex_lref/ qed. + +lemma reqg_gref (S): + ∀I1,I2,L1,L2,l. + L1 ≛[S,§l] L2 → L1.ⓘ[I1] ≛[S,§l] L2.ⓘ[I2]. +/2 width=1 by rex_gref/ qed. + +lemma reqg_bind_repl_dx (S): + ∀I,I1,L1,L2.∀T:term. L1.ⓘ[I] ≛[S,T] L2.ⓘ[I1] → + ∀I2. I ≛[S] I2 → L1.ⓘ[I] ≛[S,T] L2.ⓘ[I2]. +/2 width=2 by rex_bind_repl_dx/ qed-. + +lemma reqg_co (S1) (S2): + S1 ⊆ S2 → + ∀T:term. ∀L1,L2. L1 ≛[S1,T] L2 → L1 ≛[S2,T] L2. +/3 width=3 by rex_co, teqg_co/ qed-. + +(* Basic inversion lemmas ***************************************************) + +lemma reqg_inv_atom_sn (S): + ∀Y2. ∀T:term. ⋆ ≛[S,T] Y2 → Y2 = ⋆. +/2 width=3 by rex_inv_atom_sn/ qed-. + +lemma reqg_inv_atom_dx (S): + ∀Y1. ∀T:term. Y1 ≛[S,T] ⋆ → Y1 = ⋆. +/2 width=3 by rex_inv_atom_dx/ qed-. + +lemma reqg_inv_zero (S): + ∀Y1,Y2. Y1 ≛[S,#0] Y2 → + ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆ + | ∃∃I,L1,L2,V1,V2. L1 ≛[S,V1] L2 & V1 ≛[S] V2 & Y1 = L1.ⓑ[I]V1 & Y2 = L2.ⓑ[I]V2 + | ∃∃f,I,L1,L2. 𝐈❪f❫ & L1 ≛[S,f] L2 & Y1 = L1.ⓤ[I] & Y2 = L2.ⓤ[I]. +#S #Y1 #Y2 #H elim (rex_inv_zero … H) -H * +/3 width=9 by or3_intro0, or3_intro1, or3_intro2, ex4_5_intro, ex4_4_intro, conj/ +qed-. + +lemma reqg_inv_lref (S): + ∀Y1,Y2,i. Y1 ≛[S,#↑i] Y2 → + ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆ + | ∃∃I1,I2,L1,L2. L1 ≛[S,#i] L2 & Y1 = L1.ⓘ[I1] & Y2 = L2.ⓘ[I2]. +/2 width=1 by rex_inv_lref/ qed-. + +(* Basic_2A1: uses: lleq_inv_bind lleq_inv_bind_O *) +lemma reqg_inv_bind_refl (S): + reflexive … S → + ∀p,I,L1,L2,V,T. L1 ≛[S,ⓑ[p,I]V.T] L2 → + ∧∧ L1 ≛[S,V] L2 & L1.ⓑ[I]V ≛[S,T] L2.ⓑ[I]V. +/3 width=2 by rex_inv_bind, teqg_refl/ qed-. + +(* Basic_2A1: uses: lleq_inv_flat *) +lemma reqg_inv_flat (S): + ∀I,L1,L2,V,T. L1 ≛[S,ⓕ[I]V.T] L2 → + ∧∧ L1 ≛[S,V] L2 & L1 ≛[S,T] L2. +/2 width=2 by rex_inv_flat/ qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma reqg_inv_zero_pair_sn (S): + ∀I,Y2,L1,V1. L1.ⓑ[I]V1 ≛[S,#0] Y2 → + ∃∃L2,V2. L1 ≛[S,V1] L2 & V1 ≛[S] V2 & Y2 = L2.ⓑ[I]V2. +/2 width=1 by rex_inv_zero_pair_sn/ qed-. + +lemma reqg_inv_zero_pair_dx (S): + ∀I,Y1,L2,V2. Y1 ≛[S,#0] L2.ⓑ[I]V2 → + ∃∃L1,V1. L1 ≛[S,V1] L2 & V1 ≛[S] V2 & Y1 = L1.ⓑ[I]V1. +/2 width=1 by rex_inv_zero_pair_dx/ qed-. + +lemma reqg_inv_lref_bind_sn (S): + ∀I1,Y2,L1,i. L1.ⓘ[I1] ≛[S,#↑i] Y2 → + ∃∃I2,L2. L1 ≛[S,#i] L2 & Y2 = L2.ⓘ[I2]. +/2 width=2 by rex_inv_lref_bind_sn/ qed-. + +lemma reqg_inv_lref_bind_dx (S): + ∀I2,Y1,L2,i. Y1 ≛[S,#↑i] L2.ⓘ[I2] → + ∃∃I1,L1. L1 ≛[S,#i] L2 & Y1 = L1.ⓘ[I1]. +/2 width=2 by rex_inv_lref_bind_dx/ qed-. + +(* Basic forward lemmas *****************************************************) + +lemma reqg_fwd_zero_pair (S): + ∀I,K1,K2,V1,V2. + K1.ⓑ[I]V1 ≛[S,#0] K2.ⓑ[I]V2 → K1 ≛[S,V1] K2. +/2 width=3 by rex_fwd_zero_pair/ qed-. + +(* Basic_2A1: uses: lleq_fwd_bind_sn lleq_fwd_flat_sn *) +lemma reqg_fwd_pair_sn (S): + ∀I,L1,L2,V,T. L1 ≛[S,②[I]V.T] L2 → L1 ≛[S,V] L2. +/2 width=3 by rex_fwd_pair_sn/ qed-. + +(* Basic_2A1: uses: lleq_fwd_bind_dx lleq_fwd_bind_O_dx *) +lemma reqg_fwd_bind_dx (S): + reflexive … S → + ∀p,I,L1,L2,V,T. + L1 ≛[S,ⓑ[p,I]V.T] L2 → L1.ⓑ[I]V ≛[S,T] L2.ⓑ[I]V. +/3 width=2 by rex_fwd_bind_dx, teqg_refl/ qed-. + +(* Basic_2A1: uses: lleq_fwd_flat_dx *) +lemma reqg_fwd_flat_dx (S): + ∀I,L1,L2,V,T. L1 ≛[S,ⓕ[I]V.T] L2 → L1 ≛[S,T] L2. +/2 width=3 by rex_fwd_flat_dx/ qed-. + +lemma reqg_fwd_dx (S): + ∀I2,L1,K2. ∀T:term. L1 ≛[S,T] K2.ⓘ[I2] → + ∃∃I1,K1. L1 = K1.ⓘ[I1]. +/2 width=5 by rex_fwd_dx/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/reqg_drops.ma b/matita/matita/contribs/lambdadelta/static_2/static/reqg_drops.ma new file mode 100644 index 000000000..56cbd534c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/reqg_drops.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 "static_2/relocation/lifts_teqg.ma". +include "static_2/static/rex_drops.ma". +include "static_2/static/reqg.ma". + +(* GENERIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***********) + +(* Properties with generic slicing for local environments *******************) + +lemma reqg_lifts_sn (S): + reflexive … S → f_dedropable_sn (ceqg S). +/3 width=5 by rex_liftable_dedropable_sn, teqg_lifts_sn, teqg_refl/ qed-. + +(* Inversion lemmas with generic slicing for local environments *************) + +lemma reqg_inv_lifts_sn (S): + f_dropable_sn (ceqg S). +/2 width=5 by rex_dropable_sn/ qed-. + +lemma reqg_inv_lifts_dx (S): + f_dropable_dx (ceqg S). +/2 width=5 by rex_dropable_dx/ qed-. + +lemma reqg_inv_lifts_bi (S): + ∀L1,L2,U. L1 ≛[S,U] L2 → ∀b,f. 𝐔❪f❫ → + ∀K1,K2. ⇩*[b,f] L1 ≘ K1 → ⇩*[b,f] L2 ≘ K2 → + ∀T. ⇧*[f] T ≘ U → K1 ≛[S,T] K2. +/2 width=10 by rex_inv_lifts_bi/ qed-. + +lemma reqg_inv_lref_pair_sn (S): + ∀L1,L2,i. L1 ≛[S,#i] L2 → ∀I,K1,V1. ⇩[i] L1 ≘ K1.ⓑ[I]V1 → + ∃∃K2,V2. ⇩[i] L2 ≘ K2.ⓑ[I]V2 & K1 ≛[S,V1] K2 & V1 ≛[S] V2. +/2 width=3 by rex_inv_lref_pair_sn/ qed-. + +lemma reqg_inv_lref_pair_dx (S): + ∀L1,L2,i. L1 ≛[S,#i] L2 → ∀I,K2,V2. ⇩[i] L2 ≘ K2.ⓑ[I]V2 → + ∃∃K1,V1. ⇩[i] L1 ≘ K1.ⓑ[I]V1 & K1 ≛[S,V1] K2 & V1 ≛[S] V2. +/2 width=3 by rex_inv_lref_pair_dx/ qed-. + +lemma reqg_inv_lref_pair_bi (S) (L1) (L2) (i): + L1 ≛[S,#i] L2 → + ∀I1,K1,V1. ⇩[i] L1 ≘ K1.ⓑ[I1]V1 → + ∀I2,K2,V2. ⇩[i] L2 ≘ K2.ⓑ[I2]V2 → + ∧∧ K1 ≛[S,V1] K2 & V1 ≛[S] V2 & I1 = I2. +/2 width=6 by rex_inv_lref_pair_bi/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/reqg_fqup.ma b/matita/matita/contribs/lambdadelta/static_2/static/reqg_fqup.ma new file mode 100644 index 000000000..f914d2737 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/reqg_fqup.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 "static_2/static/rex_fqup.ma". +include "static_2/static/reqg.ma". + +(* GEBERIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***********) + +(* Advanced properties ******************************************************) + +lemma reqg_refl (S): + reflexive … S → + c_reflexive … (reqg S). +/3 width=1 by rex_refl, teqg_refl/ qed. + +lemma reqg_pair_refl (S): + reflexive … S → + ∀V1,V2. V1 ≛[S] V2 → + ∀I,L. ∀T:term. L.ⓑ[I]V1 ≛[S,T] L.ⓑ[I]V2. +/3 width=1 by rex_pair_refl, teqg_refl/ qed. + +(* Advanced inversion lemmas ************************************************) + +lemma reqg_inv_bind_void (S): + ∀p,I,L1,L2,V,T. L1 ≛[S,ⓑ[p,I]V.T] L2 → + ∧∧ L1 ≛[S,V] L2 & L1.ⓧ ≛[S,T] L2.ⓧ. +/2 width=3 by rex_inv_bind_void/ qed-. + +(* Advanced forward lemmas **************************************************) + +lemma reqg_fwd_bind_dx_void (S): + ∀p,I,L1,L2,V,T. + L1 ≛[S,ⓑ[p,I]V.T] L2 → L1.ⓧ ≛[S,T] L2.ⓧ. +/2 width=4 by rex_fwd_bind_dx_void/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/reqg_fqus.ma b/matita/matita/contribs/lambdadelta/static_2/static/reqg_fqus.ma new file mode 100644 index 000000000..55e23580a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/reqg_fqus.ma @@ -0,0 +1,174 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "static_2/s_computation/fqus_fqup.ma". +include "static_2/static/reqg_drops.ma". +include "static_2/static/reqg_fqup.ma". +include "static_2/static/reqg_reqg.ma". + +(* GENERIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES **********) + +(* Properties with extended structural successor for closures ***************) + +lemma fqu_teqg_conf (S) (b): + reflexive … S → + ∀G1,G2,L1,L2,U1,T1. ❪G1,L1,U1❫ ⬂[b] ❪G2,L2,T1❫ → + ∀U2. U1 ≛[S] U2 → + ∃∃L,T2. ❪G1,L1,U2❫ ⬂[b] ❪G2,L,T2❫ & L2 ≛[S,T1] L & T1 ≛[S] T2. +#S #b #HS #G1 #G2 #L1 #L2 #U1 #T1 #H elim H -G1 -G2 -L1 -L2 -U1 -T1 +[ #I #G #L #W #X #H >(teqg_inv_lref1 … H) -X + /3 width=5 by reqg_refl, fqu_lref_O, teqg_refl, ex3_2_intro/ +| #I #G #L #W1 #U1 #X #H + elim (teqg_inv_pair1 … H) -H #W2 #U2 #HW12 #_ #H destruct + /3 width=5 by reqg_refl, fqu_pair_sn, ex3_2_intro/ +| #p #I #G #L #W1 #U1 #Hb #X #H + elim (teqg_inv_pair1 … H) -H #W2 #U2 #HW12 #HU12 #H destruct + /3 width=5 by reqg_pair_refl, fqu_bind_dx, ex3_2_intro/ +| #p #I #G #L #W1 #U1 #Hb #X #H + elim (teqg_inv_pair1 … H) -H #W2 #U2 #HW12 #HU12 #H destruct + /3 width=5 by reqg_refl, fqu_clear, ex3_2_intro/ +| #I #G #L #W1 #U1 #X #H + elim (teqg_inv_pair1 … H) -H #W2 #U2 #_ #HU12 #H destruct + /3 width=5 by reqg_refl, fqu_flat_dx, ex3_2_intro/ +| #I #G #L #T1 #U1 #HTU1 #U2 #HU12 + elim (teqg_inv_lifts_sn … HU12 … HTU1) -U1 + /3 width=5 by reqg_refl, fqu_drop, ex3_2_intro/ +] +qed-. + +lemma teqg_fqu_trans (S) (b): + reflexive … S → symmetric … S → + ∀G1,G2,L1,L2,U1,T1. ❪G1,L1,U1❫ ⬂[b] ❪G2,L2,T1❫ → + ∀U2. U2 ≛[S] U1 → + ∃∃L,T2. ❪G1,L1,U2❫ ⬂[b] ❪G2,L,T2❫ & T2 ≛[S] T1 & L ≛[S,T1] L2. +#S #b #H1S #H2S #G1 #G2 #L1 #L2 #U1 #T1 #H12 #U2 #HU21 +elim (fqu_teqg_conf … H12 U2) -H12 +/3 width=5 by reqg_sym, teqg_sym, ex3_2_intro/ +qed-. + +(* Basic_2A1: uses: lleq_fqu_trans *) +lemma reqg_fqu_trans (S) (b): + reflexive … S → + ∀G1,G2,L2,K2,T,U. ❪G1,L2,T❫ ⬂[b] ❪G2,K2,U❫ → + ∀L1. L1 ≛[S,T] L2 → + ∃∃K1,U0. ❪G1,L1,T❫ ⬂[b] ❪G2,K1,U0❫ & U0 ≛[S] U & K1 ≛[S,U] K2. +#S #b #HS #G1 #G2 #L2 #K2 #T #U #H elim H -G1 -G2 -L2 -K2 -T -U +[ #I #G #L2 #V2 #L1 #H elim (reqg_inv_zero_pair_dx … H) -H + #K1 #V1 #HV1 #HV12 #H destruct + /3 width=9 by teqg_reqg_conf_sn, fqu_lref_O, ex3_2_intro/ +| * [ #p ] #I #G #L2 #V #T #L1 #H + [ elim (reqg_inv_bind_refl … H) + | elim (reqg_inv_flat … H) + ] -H + /3 width=5 by fqu_pair_sn, teqg_refl, ex3_2_intro/ +| #p #I #G #L2 #V #T #Hb #L1 #H elim (reqg_inv_bind_refl … H) -H + /3 width=5 by fqu_bind_dx, teqg_refl, ex3_2_intro/ +| #p #I #G #L2 #V #T #Hb #L1 #H elim (reqg_inv_bind_void … H) -H + /3 width=5 by fqu_clear, teqg_refl, ex3_2_intro/ +| #I #G #L2 #V #T #L1 #H elim (reqg_inv_flat … H) -H + /3 width=5 by fqu_flat_dx, teqg_refl, ex3_2_intro/ +| #I #G #L2 #T #U #HTU #Y #HU + elim (reqg_fwd_dx … HU) #L1 #V1 #H destruct + /5 width=14 by reqg_inv_lifts_bi, fqu_drop, teqg_refl, drops_refl, drops_drop, ex3_2_intro/ +] +qed-. + +(* Properties with optional structural successor for closures ***************) + +lemma teqg_fquq_trans (S) (b): + reflexive … S → symmetric … S → + ∀G1,G2,L1,L2,U1,T1. ❪G1,L1,U1❫ ⬂⸮[b] ❪G2,L2,T1❫ → + ∀U2. U2 ≛[S] U1 → + ∃∃L,T2. ❪G1,L1,U2❫ ⬂⸮[b] ❪G2,L,T2❫ & T2 ≛[S] T1 & L ≛[S,T1] L2. +#S #b #H1S #H2S #G1 #G2 #L1 #L2 #U1 #T1 #H elim H -H +[ #H #U2 #HU21 elim (teqg_fqu_trans … H … HU21) -U1 + /3 width=5 by fqu_fquq, ex3_2_intro/ +| * #HG #HL #HT destruct /3 width=5 by reqg_refl, ex3_2_intro/ +] +qed-. + +(* Basic_2A1: was just: lleq_fquq_trans *) +lemma reqg_fquq_trans (S) (b): + reflexive … S → + ∀G1,G2,L2,K2,T,U. ❪G1,L2,T❫ ⬂⸮[b] ❪G2,K2,U❫ → + ∀L1. L1 ≛[S,T] L2 → + ∃∃K1,U0. ❪G1,L1,T❫ ⬂⸮[b] ❪G2,K1,U0❫ & U0 ≛[S] U & K1 ≛[S,U] K2. +#S #b #HS #G1 #G2 #L2 #K2 #T #U #H elim H -H +[ #H #L1 #HL12 elim (reqg_fqu_trans … H … HL12) -L2 /3 width=5 by fqu_fquq, ex3_2_intro/ +| * #HG #HL #HT destruct /3 width=5 by teqg_refl, ex3_2_intro/ +] +qed-. + +(* Properties with plus-iterated structural successor for closures **********) + +(* Basic_2A1: was just: lleq_fqup_trans *) +lemma reqg_fqup_trans (S) (b): + reflexive … S → symmetric … S → Transitive … S → + ∀G1,G2,L2,K2,T,U. ❪G1,L2,T❫ ⬂+[b] ❪G2,K2,U❫ → + ∀L1. L1 ≛[S,T] L2 → + ∃∃K1,U0. ❪G1,L1,T❫ ⬂+[b] ❪G2,K1,U0❫ & U0 ≛[S] U & K1 ≛[S,U] K2. +#S #b #H1S #H2S #H3S #G1 #G2 #L2 #K2 #T #U #H @(fqup_ind … H) -G2 -K2 -U +[ #G2 #K2 #U #HTU #L1 #HL12 elim (reqg_fqu_trans … HTU … HL12) -L2 + /3 width=5 by fqu_fqup, ex3_2_intro/ +| #G #G2 #K #K2 #U #U2 #_ #HU2 #IHTU #L1 #HL12 + elim (IHTU … HL12) -L2 #K0 #U0 #HTU #HU0 #HK0 + elim (reqg_fqu_trans … HU2 … HK0) -K // #K1 #U1 #HU1 #HU12 #HK12 + elim (teqg_fqu_trans … HU1 … HU0) -U // #K3 #U3 #HU03 #HU31 #HK31 + @(ex3_2_intro … K3 U3) (**) (* full auto too slow *) + /3 width=5 by reqg_trans, teqg_reqg_conf_sn, fqup_strap1, teqg_trans/ +] +qed-. + +lemma teqg_fqup_trans (S) (b): + reflexive … S → symmetric … S → Transitive … S → + ∀G1,G2,L1,L2,U1,T1. ❪G1,L1,U1❫ ⬂+[b] ❪G2,L2,T1❫ → + ∀U2. U2 ≛[S] U1 → + ∃∃L,T2. ❪G1,L1,U2❫ ⬂+[b] ❪G2,L,T2❫ & T2 ≛[S] T1 & L ≛[S,T1] L2. +#S #b #H1S #H2S #H3S #G1 #G2 #L1 #L2 #U1 #T1 #H @(fqup_ind_dx … H) -G1 -L1 -U1 +[ #G1 #L1 #U1 #H #U2 #HU21 elim (teqg_fqu_trans … H … HU21) -U1 // + /3 width=5 by fqu_fqup, ex3_2_intro/ +| #G1 #G #L1 #L #U1 #U #H #_ #IH #U2 #HU21 + elim (teqg_fqu_trans … H … HU21) -U1 // #L0 #T #H1 #HTU #HL0 + lapply (teqg_reqg_div … HTU … HL0) -HL0 // #HL0 + elim (IH … HTU) -U #K2 #U1 #H2 #HUT1 #HKL2 + elim (reqg_fqup_trans … H2 … HL0) -L // #K #U #H2 #HU1 #HK2 + lapply (teqg_reqg_conf_sn … HUT1 … HK2) -HK2 // #HK2 + /3 width=7 by reqg_trans, fqup_strap2, teqg_trans, ex3_2_intro/ +] +qed-. + +(* Properties with star-iterated structural successor for closures **********) + +lemma teqg_fqus_trans (S) (b): + reflexive … S → symmetric … S → Transitive … S → + ∀G1,G2,L1,L2,U1,T1. ❪G1,L1,U1❫ ⬂*[b] ❪G2,L2,T1❫ → + ∀U2. U2 ≛[S] U1 → + ∃∃L,T2. ❪G1,L1,U2❫ ⬂*[b] ❪G2,L,T2❫ & T2 ≛[S] T1 & L ≛[S,T1] L2. +#S #b #H1S #H2S #H3S #G1 #G2 #L1 #L2 #U1 #T1 #H #U2 #HU21 elim(fqus_inv_fqup … H) -H +[ #H elim (teqg_fqup_trans … H … HU21) -U1 /3 width=5 by fqup_fqus, ex3_2_intro/ +| * #HG #HL #HT destruct /3 width=5 by reqg_refl, ex3_2_intro/ +] +qed-. + +(* Basic_2A1: was just: lleq_fqus_trans *) +lemma reqg_fqus_trans (S) (b): + reflexive … S → symmetric … S → Transitive … S → + ∀G1,G2,L2,K2,T,U. ❪G1,L2,T❫ ⬂*[b] ❪G2,K2,U❫ → + ∀L1. L1 ≛[S,T] L2 → + ∃∃K1,U0. ❪G1,L1,T❫ ⬂*[b] ❪G2,K1,U0❫ & U0 ≛[S] U & K1 ≛[S,U] K2. +#S #b #H1S #H2S #H3S #G1 #G2 #L2 #K2 #T #U #H #L1 #HL12 elim(fqus_inv_fqup … H) -H +[ #H elim (reqg_fqup_trans … H … HL12) -L2 /3 width=5 by fqup_fqus, ex3_2_intro/ +| * #HG #HL #HT destruct /3 width=5 by teqg_refl, ex3_2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/reqg_length.ma b/matita/matita/contribs/lambdadelta/static_2/static/reqg_length.ma new file mode 100644 index 000000000..0a1175ad0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/reqg_length.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 "static_2/relocation/lifts_teqg.ma". +include "static_2/static/rex_length.ma". +include "static_2/static/rex_fsle.ma". +include "static_2/static/reqg.ma". + +(* GENERIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***********) + +(* Advanved properties with free variables inclusion ************************) + +lemma reqg_fsge_comp (S): + reflexive … S → + rex_fsge_compatible (ceqg S). +#S #HS #L1 #L2 #T * #f1 #Hf1 #HL12 +lapply (frees_seqg_conf … Hf1 … HL12) +lapply (sex_fwd_length … HL12) +/3 width=8 by lveq_length_eq, ex4_4_intro/ (**) (* full auto fails *) +qed-. + +(* Properties with length for local environments ****************************) + +(* Basic_2A1: uses: lleq_sort *) +lemma reqg_sort_length (S): + ∀L1,L2. |L1| = |L2| → ∀s. L1 ≛[S,⋆s] L2. +/2 width=1 by rex_sort_length/ qed. + +(* Basic_2A1: uses: lleq_gref *) +lemma reqg_gref_length (S): + ∀L1,L2. |L1| = |L2| → ∀l. L1 ≛[S,§l] L2. +/2 width=1 by rex_gref_length/ qed. + +lemma reqg_unit_length (S): + ∀L1,L2. |L1| = |L2| → + ∀I. L1.ⓤ[I] ≛[S,#0] L2.ⓤ[I]. +/2 width=1 by rex_unit_length/ qed. + +(* Basic_2A1: uses: lleq_lift_le lleq_lift_ge *) +lemma reqg_lifts_bi (S): + ∀L1,L2. |L1| = |L2| → ∀K1,K2,T. K1 ≛[S,T] K2 → + ∀b,f. ⇩*[b,f] L1 ≘ K1 → ⇩*[b,f] L2 ≘ K2 → + ∀U. ⇧*[f] T ≘ U → L1 ≛[S,U] L2. +/3 width=9 by rex_lifts_bi, teqg_lifts_sn/ qed-. + +(* Forward lemmas with length for local environments ************************) + +(* Basic_2A1: lleq_fwd_length *) +lemma reqg_fwd_length (S): + ∀L1,L2. ∀T:term. L1 ≛[S,T] L2 → |L1| = |L2|. +/2 width=3 by rex_fwd_length/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/reqg_reqg.ma b/matita/matita/contribs/lambdadelta/static_2/static/reqg_reqg.ma new file mode 100644 index 000000000..41f0fee26 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/static/reqg_reqg.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 "static_2/syntax/ext2_ext2.ma". +include "static_2/syntax/teqg_teqg.ma". +include "static_2/static/rex_rex.ma". +include "static_2/static/reqg_length.ma". + +(* GENERIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***********) + +(* Advanced forward lemmas **************************************************) + +lemma frees_reqg_conf (S): + reflexive … S → + ∀f,L1,T. L1 ⊢ 𝐅+❪T❫ ≘ f → + ∀L2. L1 ≛[S,T] L2 → L2 ⊢ 𝐅+❪T❫ ≘ f. +/3 width=7 by frees_seqg_conf, rex_inv_frees/ qed-. + +(* Properties with free variables inclusion for restricted closures *******) + +lemma reqg_fsle_comp (S): + reflexive … S → + rex_fsle_compatible (ceqg S). +#S #HS #L1 #L2 #T #HL12 +elim (frees_total L1 T) #f #Hf +/4 width=8 by frees_reqg_conf, rex_fwd_length, lveq_length_eq, sle_refl, ex4_4_intro/ +qed. + +(* Advanced properties ******************************************************) + +lemma reqg_sym (S) (T): + reflexive … S → symmetric … S → + symmetric … (reqg S T). +/3 width=3 by reqg_fsge_comp, rex_sym, teqg_sym/ qed-. + +(* Basic_2A1: uses: lleq_dec *) +lemma reqg_dec (S): + (∀s1,s2. Decidable … (S s1 s2)) → + ∀L1,L2. ∀T:term. Decidable (L1 ≛[S,T] L2). +/3 width=1 by rex_dec, teqg_dec/ qed-. + +(* Main properties **********************************************************) + +(* Basic_2A1: uses: lleq_bind lleq_bind_O *) +theorem reqg_bind (S): + ∀p,I,L1,L2,V1,V2,T. + L1 ≛[S,V1] L2 → L1.ⓑ[I]V1 ≛[S,T] L2.ⓑ[I]V2 → + L1 ≛[S,ⓑ[p,I]V1.T] L2. +/2 width=2 by rex_bind/ qed. + +(* Basic_2A1: uses: lleq_flat *) +theorem reqg_flat (S): + ∀I,L1,L2,V,T. + L1 ≛[S,V] L2 → L1 ≛[S,T] L2 → L1 ≛[S,ⓕ[I]V.T] L2. +/2 width=1 by rex_flat/ qed. + +theorem reqg_bind_void (S): + ∀p,I,L1,L2,V,T. + L1 ≛[S,V] L2 → L1.ⓧ ≛[S,T] L2.ⓧ → L1 ≛[S,ⓑ[p,I]V.T] L2. +/2 width=1 by rex_bind_void/ qed. + +(* Basic_2A1: uses: lleq_trans *) +theorem reqg_trans (S) (T): + reflexive … S → Transitive … S → + Transitive … (reqg S T). +#S #T #H1S #H2S #L1 #L * #f1 #Hf1 #HL1 #L2 * #f2 #Hf2 #HL2 +lapply (frees_teqg_conf_seqg … Hf1 T … HL1) /2 width=1 by teqg_refl/ #H0 +lapply (frees_mono … Hf2 … H0) -Hf2 -H0 +/5 width=7 by sex_trans, sex_eq_repl_back, teqg_trans, ext2_trans, ex2_intro/ +qed-. + +(* Basic_2A1: uses: lleq_canc_sn *) +theorem reqg_canc_sn (S) (T): + reflexive … S → symmetric … S → Transitive … S → + left_cancellable … (reqg S T). +/3 width=3 by reqg_trans, reqg_sym/ qed-. + +(* Basic_2A1: uses: lleq_canc_dx *) +theorem reqg_canc_dx (S) (T): + reflexive … S → symmetric … S → Transitive … S → + right_cancellable … (reqg S T). +/3 width=3 by reqg_trans, reqg_sym/ qed-. + +theorem reqg_repl (S) (T:term): + reflexive … S → symmetric … S → Transitive … S → + ∀L1,L2. L1 ≛[S,T] L2 → + ∀K1. L1 ≛[S,T] K1 → ∀K2. L2 ≛[S,T] K2 → K1 ≛[S,T] K2. +/3 width=3 by reqg_canc_sn, reqg_trans/ qed-. + +(* Negated properties *******************************************************) + +(* Note: auto works with /4 width=8/ so reqg_canc_sn is preferred **********) +(* Basic_2A1: uses: lleq_nlleq_trans *) +lemma reqg_rneqg_trans (S) (T:term): + reflexive … S → symmetric … S → Transitive … S → + ∀L1,L. L1 ≛[S,T] L → + ∀L2. (L ≛[S,T] L2 → ⊥) → (L1 ≛[S,T] L2 → ⊥). +/3 width=3 by reqg_canc_sn/ qed-. + +(* Basic_2A1: uses: nlleq_lleq_div *) +lemma rneqg_reqg_div (S) (T:term): + reflexive … S → Transitive … S → + ∀L2,L. L2 ≛[S,T] L → + ∀L1. (L1 ≛[S,T] L → ⊥) → (L1 ≛[S,T] L2 → ⊥). +/3 width=3 by reqg_trans/ qed-. + +theorem rneqg_reqg_canc_dx (S) (T:term): + reflexive … S → Transitive … S → + ∀L1,L. (L1 ≛[S,T] L → ⊥) → + ∀L2. L2 ≛[S,T] L → L1 ≛[S,T] L2 → ⊥. +/3 width=3 by reqg_trans/ qed-. + +(* Negated inversion lemmas *************************************************) + +(* Basic_2A1: uses: nlleq_inv_bind nlleq_inv_bind_O *) +lemma rneqg_inv_bind (S): + (∀s1,s2. Decidable … (S s1 s2)) → + ∀p,I,L1,L2,V,T. (L1 ≛[S,ⓑ[p,I]V.T] L2 → ⊥) → + ∨∨ L1 ≛[S,V] L2 → ⊥ | (L1.ⓑ[I]V ≛[S,T] L2.ⓑ[I]V → ⊥). +/3 width=2 by rnex_inv_bind, teqg_dec/ qed-. + +(* Basic_2A1: uses: nlleq_inv_flat *) +lemma rneqg_inv_flat (S): + (∀s1,s2. Decidable … (S s1 s2)) → + ∀I,L1,L2,V,T. (L1 ≛[S,ⓕ[I]V.T] L2 → ⊥) → + ∨∨ L1 ≛[S,V] L2 → ⊥ | (L1 ≛[S,T] L2 → ⊥). +/3 width=2 by rnex_inv_flat, teqg_dec/ qed-. + +lemma rneqg_inv_bind_void (S): + (∀s1,s2. Decidable … (S s1 s2)) → + ∀p,I,L1,L2,V,T. (L1 ≛[S,ⓑ[p,I]V.T] L2 → ⊥) → + ∨∨ L1 ≛[S,V] L2 → ⊥ | (L1.ⓧ ≛[S,T] L2.ⓧ → ⊥). +/3 width=3 by rnex_inv_bind_void, teqg_dec/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/static/reqx.ma b/matita/matita/contribs/lambdadelta/static_2/static/reqx.ma index 251814a3b..8b7badaf9 100644 --- a/matita/matita/contribs/lambdadelta/static_2/static/reqx.ma +++ b/matita/matita/contribs/lambdadelta/static_2/static/reqx.ma @@ -12,25 +12,25 @@ (* *) (**************************************************************************) -include "static_2/notation/relations/stareqsn_3.ma". +include "static_2/notation/relations/approxeqsn_3.ma". include "static_2/syntax/teqx_ext.ma". -include "static_2/static/rex.ma". +include "static_2/static/reqg.ma". (* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***) - +(* definition reqx: relation3 … ≝ - rex cdeq. - + reqg sfull. +*) interpretation "sort-irrelevant equivalence on referred entries (local environment)" - 'StarEqSn T L1 L2 = (reqx T L1 L2). + 'ApproxEqSn T L1 L2 = (reqg sfull T L1 L2). interpretation "sort-irrelevant ranged equivalence (local environment)" - 'StarEqSn f L1 L2 = (sex cdeq_ext cfull f L1 L2). + 'StarEqSn f L1 L2 = (sex ceqx_ext cfull f L1 L2). (* Basic properties ***********************************************************) - +(* lemma frees_teqx_conf_reqx: ∀f,L1,T1. L1 ⊢ 𝐅+❪T1❫ ≘ f → ∀T2. T1 ≛ T2 → ∀L2. L1 ≛[f] L2 → L2 ⊢ 𝐅+❪T2❫ ≘ f. @@ -128,7 +128,11 @@ lemma reqx_bind_repl_dx: ∀I,I1,L1,L2.∀T:term. L1.ⓘ[I] ≛[T] L2.ⓘ[I1] → ∀I2. I ≛ I2 → L1.ⓘ[I] ≛[T] L2.ⓘ[I2]. /2 width=2 by rex_bind_repl_dx/ qed-. - +*) +lemma reqg_reqx (S) (T): + ∀L1,L2. L1 ≛[S,T] L2 → L1 ≅[T] L2. +/2 width=3 by reqg_co/ qed. +(* (* Basic inversion lemmas ***************************************************) lemma reqx_inv_atom_sn: @@ -215,3 +219,4 @@ lemma reqx_fwd_dx: ∀I2,L1,K2. ∀T:term. L1 ≛[T] K2.ⓘ[I2] → ∃∃I1,K1. L1 = K1.ⓘ[I1]. /2 width=5 by rex_fwd_dx/ qed-. +*) diff --git a/matita/matita/contribs/lambdadelta/static_2/static/reqx_reqx.ma b/matita/matita/contribs/lambdadelta/static_2/static/reqx_reqx.ma index c43edbdd1..b6dc3d196 100644 --- a/matita/matita/contribs/lambdadelta/static_2/static/reqx_reqx.ma +++ b/matita/matita/contribs/lambdadelta/static_2/static/reqx_reqx.ma @@ -12,21 +12,20 @@ (* *) (**************************************************************************) -include "static_2/syntax/ext2_ext2.ma". -include "static_2/syntax/teqx_teqx.ma". -include "static_2/static/reqx_length.ma". +include "static_2/static/reqg_reqg.ma". +include "static_2/static/reqx.ma". (* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***) (* Advanced properties ******************************************************) - +(* lemma reqx_sym: ∀T. symmetric … (reqx T). /3 width=3 by reqx_fsge_comp, rex_sym, teqx_sym/ qed-. - +*) (* Basic_2A1: uses: lleq_dec *) -lemma reqx_dec: ∀L1,L2. ∀T:term. Decidable (L1 ≛[T] L2). -/3 width=1 by rex_dec, teqx_dec/ qed-. - +lemma reqx_dec: ∀L1,L2. ∀T:term. Decidable (L1 ≅[T] L2). +/2 width=1 by reqg_dec/ qed-. +(* (* Main properties **********************************************************) (* Basic_2A1: uses: lleq_bind lleq_bind_O *) @@ -60,9 +59,9 @@ theorem reqx_canc_sn: ∀T. left_cancellable … (reqx T). theorem reqx_canc_dx: ∀T. right_cancellable … (reqx T). /3 width=3 by reqx_trans, reqx_sym/ qed-. -theorem reqx_repl: ∀L1,L2. ∀T:term. L1 ≛[T] L2 → - ∀K1. L1 ≛[T] K1 → ∀K2. L2 ≛[T] K2 → K1 ≛[T] K2. -/3 width=3 by reqx_canc_sn, reqx_trans/ qed-. +theorem reqx_repl: ∀L1,L2. ∀T:term. L1 ≅[T] L2 → + ∀K1. L1 ≅[T] K1 → ∀K2. L2 ≅[T] K2 → K1 ≅[T] K2. +/2 width=5 by reqg_repl/ qed-. (* Negated properties *******************************************************) @@ -96,3 +95,4 @@ lemma rneqx_inv_flat: ∀I,L1,L2,V,T. (L1 ≛[ⓕ[I]V.T] L2 → ⊥) → lemma rneqx_inv_bind_void: ∀p,I,L1,L2,V,T. (L1 ≛[ⓑ[p,I]V.T] L2 → ⊥) → (L1 ≛[V] L2 → ⊥) ∨ (L1.ⓧ ≛[T] L2.ⓧ → ⊥). /3 width=3 by rnex_inv_bind_void, teqx_dec/ qed-. +*) diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/lenv.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/lenv.ma index 8de779e77..da4dee837 100644 --- a/matita/matita/contribs/lambdadelta/static_2/syntax/lenv.ma +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/lenv.ma @@ -52,8 +52,6 @@ interpretation "abstraction (local environment)" definition cfull: relation3 lenv bind bind ≝ λL,I1,I2. ⊤. -definition ceq: relation3 lenv term term ≝ λL. eq …. - (* Basic properties *********************************************************) lemma eq_lenv_dec: ∀L1,L2:lenv. Decidable (L1 = L2). diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/teq.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/teq.ma new file mode 100644 index 000000000..6b4a58e82 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/teq.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 "ground/notation/relations/ideq_2.ma". +include "static_2/syntax/teqg.ma". + +(* SYNTACTIC EQUIVALENCE ON TERMS *******************************************) + +definition teq: relation term ≝ + teqg (eq …). + +interpretation + "context-free syntactic equivalence (term)" + 'IdEq T1 T2 = (teq T1 T2). + +(* Basic properties *********************************************************) + +lemma teq_refl: + reflexive … teq. +/2 width=1 by teqg_refl/ qed. + +lemma teq_sym: + symmetric … teq. +/2 width=1 by teqg_sym/ qed-. + +(* Basic inversion lemmas ***************************************************) + +lemma teq_inv_eq: + ∀T1,T2. T1 ≡ T2 → T1 = T2. +#T1 #T2 #H elim H -H // +qed-. + +(* Advanced forward lemmas **************************************************) + +lemma teq_repl_1 (R:predicate …): + ∀T1. R T1 → ∀T2. T1 ≡ T2 → R T2. +#R #T1 #HT1 #T2 #HT12 +<(teq_inv_eq … HT12) -T2 // +qed-. + +lemma teq_sym_repl_1 (R:predicate …): + ∀T1. R T1 → ∀T2. T2 ≡ T1 → R T2. +#R #T1 #HT1 #T2 #HT12 +>(teq_inv_eq … HT12) -T2 // +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/teq_ext.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/teq_ext.ma new file mode 100644 index 000000000..c91f93e93 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/teq_ext.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 "static_2/notation/relations/ideq_3.ma". +include "static_2/syntax/teqg_ext.ma". +include "static_2/syntax/teq.ma". + +(* SYNTACTIC EQUIVALENCE ****************************************************) + +definition ceq: relation3 lenv term term ≝ + ceqg (eq …). + +definition ceq_ext: lenv → relation bind ≝ + ceqg_ext (eq …). + +interpretation + "context-dependent syntactic equivalence (term)" + 'IdEq L T1 T2 = (ceq L T1 T2). + +interpretation + "context-dependent syntactic equivalence (binder)" + 'IdEq L I1 I2 = (ceq_ext L I1 I2). + +(* Basic properties *********************************************************) + +lemma ceq_ext_refl (L): + reflexive … (ceq_ext L). +/2 width=1 by ext2_refl/ qed. + +lemma ceq_ext_sym (L): + symmetric … (ceq_ext L). +#L @ext2_sym (**) (* full auto does not work *) +/2 width=1 by teq_sym/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +lemma ceq_ext_inv_eq (L): + ∀I1,I2. L ⊢ I1 ≡ I2 → I1 = I2. +#L #I1 #I2 * -I1 -I2 +/3 width=4 by teq_inv_eq, eq_f3/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/ceq_ext_ceq_ext.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/teq_ext_teq_ext.ma similarity index 73% rename from matita/matita/contribs/lambdadelta/static_2/syntax/ceq_ext_ceq_ext.ma rename to matita/matita/contribs/lambdadelta/static_2/syntax/teq_ext_teq_ext.ma index be057f98c..c3282d561 100644 --- a/matita/matita/contribs/lambdadelta/static_2/syntax/ceq_ext_ceq_ext.ma +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/teq_ext_teq_ext.ma @@ -12,14 +12,17 @@ (* *) (**************************************************************************) -include "static_2/syntax/ceq_ext.ma". +include "static_2/syntax/teq_teq.ma". +include "static_2/syntax/teq_ext.ma". -(* CONTEXT-AWARE SYNTACTIC EQUIVALENCE FOR BINDERS **************************) +(* SYNTACTIC EQUIVALENCE ****************************************************) (* Main properties **********************************************************) -theorem ceq_ext_trans: ∀L1,I1,I. ceq_ext L1 I1 I → - ∀L2,I2. ceq_ext L2 I I2 → ∀L3. ceq_ext L3 I1 I2. -#L1 #I1 #I * -I1 -I // -#I1 #V1 #V #HV1 #L2 #Z #H elim (ext2_inv_pair_sn … H) -H // +theorem ceq_ext_trans (I): + ∀L1,I1. L1 ⊢ I1 ≡ I → ∀L2,I2. L2 ⊢ I ≡ I2 → ∀L3. L3 ⊢ I1 ≡ I2. +#I #L1 #I1 * -I1 -I // +#I1 #V1 #V #HV1 #L2 #Z #H +elim (ext2_inv_pair_sn … H) -H #V2 #HV2 #H #L3 destruct +/3 width=3 by ext2_pair, teq_trans/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/teq_teq.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/teq_teq.ma new file mode 100644 index 000000000..0fd87a81a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/teq_teq.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 "static_2/syntax/teq.ma". + +(* SYNTACTIC EQUIVALENCE ON TERMS *******************************************) + +(* Main forward properties **************************************************) + +theorem teq_trans: + Transitive … teq. +/2 width=3 by teq_repl_1/ qed-. +(* +theorem teq_repl_2 (R): + replace_2 … R teq teq. +#R #T1 #U1 #HTU1 #T2 #HT12 #U2 #HU12 +<(teq_inv_eq … HT12) -T2 <(teq_inv_eq … HU12) -U2 // +qed-. +*) diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/teqg.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/teqg.ma new file mode 100644 index 000000000..46e9c67b6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/teqg.ma @@ -0,0 +1,230 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground/xoa/ex_3_2.ma". +include "static_2/notation/relations/stareq_3.ma". +include "static_2/syntax/term.ma". + +(* GENERIC EQUIVALENCE ON TERMS *********************************************) + +inductive teqg (S:relation …): relation term ≝ +| teqg_sort: ∀s1,s2. S s1 s2 → teqg S (⋆s1) (⋆s2) +| teqg_lref: ∀i. teqg S (#i) (#i) +| teqg_gref: ∀l. teqg S (§l) (§l) +| teqg_pair: ∀I,V1,V2,T1,T2. teqg S V1 V2 → teqg S T1 T2 → teqg S (②[I]V1.T1) (②[I]V2.T2) +. + +interpretation + "context-free generic equivalence (term)" + 'StarEq S T1 T2 = (teqg S T1 T2). + +(* Basic properties *********************************************************) + +lemma teqg_refl (S): + reflexive … S → reflexive … (teqg S). +#S #HS #T elim T -T /2 width=1 by teqg_pair/ +* /2 width=1 by teqg_sort, teqg_lref, teqg_gref/ +qed. + +lemma teqg_sym (S): + symmetric … S → symmetric … (teqg S). +#S #HS #T1 #T2 #H elim H -T1 -T2 +/3 width=3 by teqg_sort, teqg_lref, teqg_gref, teqg_pair/ +qed-. + +alias symbol "subseteq" (instance 3) = "relation inclusion". +lemma teqg_co (S1) (S2): + S1 ⊆ S2 → + ∀T1,T2. T1 ≛[S1] T2 → T1 ≛[S2] T2. +#S1 #S2 #HS #T1 #T2 #H elim H -T1 -T2 +/3 width=1 by teqg_pair, teqg_sort/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact teqg_inv_sort1_aux (S): + ∀X,Y. X ≛[S] Y → ∀s1. X = ⋆s1 → + ∃∃s2. S s1 s2 & Y = ⋆s2. +#S #X #Y * -X -Y +[ #s1 #s2 #Hs12 #s #H destruct /2 width=3 by ex2_intro/ +| #i #s #H destruct +| #l #s #H destruct +| #I #V1 #V2 #T1 #T2 #_ #_ #s #H destruct +] +qed-. + +lemma teqg_inv_sort1 (S): + ∀Y,s1. ⋆s1 ≛[S] Y → + ∃∃s2. S s1 s2 & Y = ⋆s2. +/2 width=4 by teqg_inv_sort1_aux/ qed-. + +fact teqg_inv_lref1_aux (S): + ∀X,Y. X ≛[S] Y → ∀i. X = #i → Y = #i. +#S #X #Y * -X -Y // +[ #s1 #s2 #_ #j #H destruct +| #I #V1 #V2 #T1 #T2 #_ #_ #j #H destruct +] +qed-. + +lemma teqg_inv_lref1 (S): + ∀Y,i. #i ≛[S] Y → Y = #i. +/2 width=5 by teqg_inv_lref1_aux/ qed-. + +fact teqg_inv_gref1_aux (S): + ∀X,Y. X ≛[S] Y → ∀l. X = §l → Y = §l. +#S #X #Y * -X -Y // +[ #s1 #s2 #_ #k #H destruct +| #I #V1 #V2 #T1 #T2 #_ #_ #k #H destruct +] +qed-. + +lemma teqg_inv_gref1 (S): + ∀Y,l. §l ≛[S] Y → Y = §l. +/2 width=5 by teqg_inv_gref1_aux/ qed-. + +fact teqg_inv_pair1_aux (S): + ∀X,Y. X ≛[S] Y → ∀I,V1,T1. X = ②[I]V1.T1 → + ∃∃V2,T2. V1 ≛[S] V2 & T1 ≛[S] T2 & Y = ②[I]V2.T2. +#S #X #Y * -X -Y +[ #s1 #s2 #_ #J #W1 #U1 #H destruct +| #i #J #W1 #U1 #H destruct +| #l #J #W1 #U1 #H destruct +| #I #V1 #V2 #T1 #T2 #HV #HT #J #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma teqg_inv_pair1 (S): + ∀I,V1,T1,Y. ②[I]V1.T1 ≛[S] Y → + ∃∃V2,T2. V1 ≛[S] V2 & T1 ≛[S] T2 & Y = ②[I]V2.T2. +/2 width=3 by teqg_inv_pair1_aux/ qed-. + +fact teqg_inv_sort2_aux (S): + ∀X,Y. X ≛[S] Y → ∀s2. Y = ⋆s2 → + ∃∃s1. S s1 s2 & X = ⋆s1. +#S #X #Y * -X -Y +[ #s1 #s2 #Hs12 #s #H destruct /2 width=3 by ex2_intro/ +| #i #s #H destruct +| #l #s #H destruct +| #I #V1 #V2 #T1 #T2 #_ #_ #s #H destruct +] +qed-. + +lemma teqg_inv_sort2 (S): + ∀X1,s2. X1 ≛[S] ⋆s2 → + ∃∃s1. S s1 s2 & X1 = ⋆s1. +/2 width=3 by teqg_inv_sort2_aux/ qed-. + +fact teqg_inv_pair2_aux (S): + ∀X,Y. X ≛[S] Y → ∀I,V2,T2. Y = ②[I]V2.T2 → + ∃∃V1,T1. V1 ≛[S] V2 & T1 ≛[S] T2 & X = ②[I]V1.T1. +#S #X #Y * -X -Y +[ #s1 #s2 #_ #J #W2 #U2 #H destruct +| #i #J #W2 #U2 #H destruct +| #l #J #W2 #U2 #H destruct +| #I #V1 #V2 #T1 #T2 #HV #HT #J #W2 #U2 #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma teqg_inv_pair2 (S): + ∀I,X1,V2,T2. X1 ≛[S] ②[I]V2.T2 → + ∃∃V1,T1. V1 ≛[S] V2 & T1 ≛[S] T2 & X1 = ②[I]V1.T1. +/2 width=3 by teqg_inv_pair2_aux/ qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma teqg_inv_pair (S): + ∀I1,I2,V1,V2,T1,T2. ②[I1]V1.T1 ≛[S] ②[I2]V2.T2 → + ∧∧ I1 = I2 & V1 ≛[S] V2 & T1 ≛[S] T2. +#S #I1 #I2 #V1 #V2 #T1 #T2 #H elim (teqg_inv_pair1 … H) -H +#V0 #T0 #HV #HT #H destruct /2 width=1 by and3_intro/ +qed-. + +lemma teqg_inv_pair_xy_x (S): + ∀I,V,T. ②[I]V.T ≛[S] V → ⊥. +#S #I #V elim V -V +[ #J #T #H elim (teqg_inv_pair1 … H) -H #X #Y #_ #_ #H destruct +| #J #X #Y #IHX #_ #T #H elim (teqg_inv_pair … H) -H #H #HY #_ destruct /2 width=2 by/ +] +qed-. + +lemma teqg_inv_pair_xy_y (S): + ∀I,T,V. ②[I]V.T ≛[S] T → ⊥. +#S #I #T elim T -T +[ #J #V #H elim (teqg_inv_pair1 … H) -H #X #Y #_ #_ #H destruct +| #J #X #Y #_ #IHY #V #H elim (teqg_inv_pair … H) -H #H #_ #HY destruct /2 width=2 by/ +] +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma teqg_fwd_atom1 (S): + ∀I,Y. ⓪[I] ≛[S] Y → ∃J. Y = ⓪[J]. +#S * #x #Y #H [ elim (teqg_inv_sort1 … H) -H ] +/3 width=4 by teqg_inv_gref1, teqg_inv_lref1, ex_intro/ +qed-. + +(* Advanced properties ******************************************************) + +lemma teqg_dec (S): + (∀s1,s2. Decidable (S s1 s2)) → + ∀T1,T2. Decidable (T1 ≛[S] T2). +#S #HS #T1 elim T1 -T1 [ * #s1 | #I1 #V1 #T1 #IHV #IHT ] * [1,3,5,7: * #s2 |*: #I2 #V2 #T2 ] +[ elim (HS s1 s2) -HS [ /3 width=1 by or_introl, teqg_sort/ ] #HS + @or_intror #H + elim (teqg_inv_sort1 … H) -H #x #Hx #H destruct /2 width=1 by/ +|2,3,13: + @or_intror #H + elim (teqg_inv_sort1 … H) -H #x #_ #H destruct +|4,6,14: + @or_intror #H + lapply (teqg_inv_lref1 … H) -H #H destruct +|5: + elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/ + @or_intror #H + lapply (teqg_inv_lref1 … H) -H #H destruct /2 width=1 by/ +|7,8,15: + @or_intror #H + lapply (teqg_inv_gref1 … H) -H #H destruct +|9: + elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/ + @or_intror #H + lapply (teqg_inv_gref1 … H) -H #H destruct /2 width=1 by/ +|10,11,12: + @or_intror #H + elim (teqg_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct +|16: + elim (eq_item2_dec I1 I2) #HI12 destruct + [ elim (IHV V2) -IHV #HV12 + elim (IHT T2) -IHT #HT12 + [ /3 width=1 by teqg_pair, or_introl/ ] + ] + @or_intror #H + elim (teqg_inv_pair … H) -H /2 width=1 by/ +] +qed-. + +(* Negated inversion lemmas *************************************************) + +lemma tneqg_inv_pair (S): + (∀s1,s2. Decidable (S s1 s2)) → + ∀I1,I2,V1,V2,T1,T2. + (②[I1]V1.T1 ≛[S] ②[I2]V2.T2 → ⊥) → + ∨∨ I1 = I2 → ⊥ + | (V1 ≛[S] V2 → ⊥) + | (T1 ≛[S] T2 → ⊥). +#S #HS #I1 #I2 #V1 #V2 #T1 #T2 #H12 +elim (eq_item2_dec I1 I2) /3 width=1 by or3_intro0/ #H destruct +elim (teqg_dec S … V1 V2) /3 width=1 by or3_intro1/ +elim (teqg_dec S … T1 T2) /4 width=1 by teqg_pair, or3_intro2/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/teqg_ext.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/teqg_ext.ma new file mode 100644 index 000000000..f7f4c9738 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/teqg_ext.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 "static_2/notation/relations/stareq_4.ma". +include "static_2/syntax/cext2.ma". +include "static_2/syntax/teqg.ma". + +(* GENERIC EQUIVALENCE ******************************************************) + +definition teqg_ext (S): relation bind ≝ + ext2 (teqg S). + +definition ceqg (S): relation3 lenv term term ≝ + λL. (teqg S). + +definition ceqg_ext (S): relation3 lenv bind bind ≝ + cext2 (ceqg S). + +interpretation + "context-free generic equivalence (binder)" + 'StarEq S I1 I2 = (teqg_ext S I1 I2). + +interpretation + "context-dependent generic equivalence (term)" + 'StarEq S L T1 T2 = (ceqg S L T1 T2). + +interpretation + "context-dependent generic equivalence (binder)" + 'StarEq S L I1 I2 = (ceqg_ext S L I1 I2). diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/teqg_teqg.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/teqg_teqg.ma new file mode 100644 index 000000000..74409955f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/teqg_teqg.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 "static_2/syntax/teqg.ma". + +(* GENERIC EQUIVALENCE ON TERMS *********************************************) + +(* Main properties **********************************************************) + +theorem teqg_trans (S): + Transitive … S → Transitive … (teqg S). +#S #HS #T1 #T #H elim H -T1 -T // +[ #s1 #s #Hs1 #X #H + elim (teqg_inv_sort1 … H) -H /3 width=3 by teqg_sort/ +| #I #V1 #V #T1 #T #_ #_ #IHV #IHT #X #H + elim (teqg_inv_pair1 … H) -H /3 width=1 by teqg_pair/ +] +qed-. + +theorem teqg_canc_sn (S): + symmetric … S → Transitive … S → + left_cancellable … (teqg S). +/3 width=3 by teqg_trans, teqg_sym/ qed-. + +theorem teqg_canc_dx (S): + symmetric … S → Transitive … S → + right_cancellable … (teqg S). +/3 width=3 by teqg_trans, teqg_sym/ qed-. + +theorem teqg_repl (S): + symmetric … S → Transitive … S → + replace_2 … (teqg S) (teqg S) (teqg S). +/3 width=3 by teqg_canc_sn, teqg_trans/ qed-. + +(* Negated main properies ***************************************************) + +theorem teqg_tneqg_trans (S): + symmetric … S → Transitive … S → + ∀T1,T. T1 ≛[S] T → ∀T2. (T ≛[S] T2 → ⊥) → T1 ≛[S] T2 → ⊥. +/3 width=3 by teqg_canc_sn/ qed-. + +theorem tneqg_teqg_canc_dx (S): + Transitive … S → + ∀T1,T. (T1 ≛[S] T → ⊥) → ∀T2. T2 ≛[S] T → T1 ≛[S] T2 → ⊥. +/3 width=3 by teqg_trans/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/teqo.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/teqo.ma index 4b37a70df..5038b8694 100644 --- a/matita/matita/contribs/lambdadelta/static_2/syntax/teqo.ma +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/teqo.ma @@ -13,7 +13,7 @@ (**************************************************************************) include "ground/xoa/ex_1_2.ma". -include "static_2/notation/relations/topiso_2.ma". +include "static_2/notation/relations/tilde_2.ma". include "static_2/syntax/term.ma". (* SORT-IRRELEVANT OUTER EQUIVALENCE FOR TERMS ******************************) @@ -28,11 +28,11 @@ inductive teqo: relation term ≝ interpretation "sort-irrelevant outer equivalence (term)" - 'TopIso T1 T2 = (teqo T1 T2). + 'Tilde T1 T2 = (teqo T1 T2). (* Basic inversion lemmas ***************************************************) -fact teqo_inv_sort1_aux: ∀X,Y. X ⩳ Y → ∀s1. X = ⋆s1 → +fact teqo_inv_sort1_aux: ∀X,Y. X ~ Y → ∀s1. X = ⋆s1 → ∃s2. Y = ⋆s2. #X #Y * -X -Y [ #s1 #s2 #s #H destruct /2 width=2 by ex_intro/ @@ -43,11 +43,11 @@ fact teqo_inv_sort1_aux: ∀X,Y. X ⩳ Y → ∀s1. X = ⋆s1 → qed-. (* Basic_1: was just: iso_gen_sort *) -lemma teqo_inv_sort1: ∀Y,s1. ⋆s1 ⩳ Y → +lemma teqo_inv_sort1: ∀Y,s1. ⋆s1 ~ Y → ∃s2. Y = ⋆s2. /2 width=4 by teqo_inv_sort1_aux/ qed-. -fact teqo_inv_lref1_aux: ∀X,Y. X ⩳ Y → ∀i. X = #i → Y = #i. +fact teqo_inv_lref1_aux: ∀X,Y. X ~ Y → ∀i. X = #i → Y = #i. #X #Y * -X -Y // [ #s1 #s2 #j #H destruct | #I #V1 #V2 #T1 #T2 #j #H destruct @@ -55,20 +55,20 @@ fact teqo_inv_lref1_aux: ∀X,Y. X ⩳ Y → ∀i. X = #i → Y = #i. qed-. (* Basic_1: was: iso_gen_lref *) -lemma teqo_inv_lref1: ∀Y,i. #i ⩳ Y → Y = #i. +lemma teqo_inv_lref1: ∀Y,i. #i ~ Y → Y = #i. /2 width=5 by teqo_inv_lref1_aux/ qed-. -fact teqo_inv_gref1_aux: ∀X,Y. X ⩳ Y → ∀l. X = §l → Y = §l. +fact teqo_inv_gref1_aux: ∀X,Y. X ~ Y → ∀l. X = §l → Y = §l. #X #Y * -X -Y // [ #s1 #s2 #k #H destruct | #I #V1 #V2 #T1 #T2 #k #H destruct ] qed-. -lemma teqo_inv_gref1: ∀Y,l. §l ⩳ Y → Y = §l. +lemma teqo_inv_gref1: ∀Y,l. §l ~ Y → Y = §l. /2 width=5 by teqo_inv_gref1_aux/ qed-. -fact teqo_inv_pair1_aux: ∀T1,T2. T1 ⩳ T2 → +fact teqo_inv_pair1_aux: ∀T1,T2. T1 ~ T2 → ∀J,W1,U1. T1 = ②[J]W1.U1 → ∃∃W2,U2. T2 = ②[J]W2.U2. #T1 #T2 * -T1 -T2 @@ -81,11 +81,11 @@ qed-. (* Basic_1: was: iso_gen_head *) (* Basic_2A1: was: tsts_inv_pair1 *) -lemma teqo_inv_pair1: ∀J,W1,U1,T2. ②[J]W1.U1 ⩳ T2 → +lemma teqo_inv_pair1: ∀J,W1,U1,T2. ②[J]W1.U1 ~ T2 → ∃∃W2,U2. T2 = ②[J]W2. U2. /2 width=7 by teqo_inv_pair1_aux/ qed-. -fact teqo_inv_pair2_aux: ∀T1,T2. T1 ⩳ T2 → +fact teqo_inv_pair2_aux: ∀T1,T2. T1 ~ T2 → ∀J,W2,U2. T2 = ②[J]W2.U2 → ∃∃W1,U1. T1 = ②[J]W1.U1. #T1 #T2 * -T1 -T2 @@ -97,13 +97,13 @@ fact teqo_inv_pair2_aux: ∀T1,T2. T1 ⩳ T2 → qed-. (* Basic_2A1: was: tsts_inv_pair2 *) -lemma teqo_inv_pair2: ∀J,T1,W2,U2. T1 ⩳ ②[J]W2.U2 → +lemma teqo_inv_pair2: ∀J,T1,W2,U2. T1 ~ ②[J]W2.U2 → ∃∃W1,U1. T1 = ②[J]W1.U1. /2 width=7 by teqo_inv_pair2_aux/ qed-. (* Advanced inversion lemmas ************************************************) -lemma teqo_inv_pair: ∀I1,I2,V1,V2,T1,T2. ②[I1]V1.T1 ⩳ ②[I2]V2.T2 → +lemma teqo_inv_pair: ∀I1,I2,V1,V2,T1,T2. ②[I1]V1.T1 ~ ②[I2]V2.T2 → I1 = I2. #I1 #I2 #V1 #V2 #T1 #T2 #H elim (teqo_inv_pair1 … H) -H #V0 #T0 #H destruct // @@ -124,7 +124,7 @@ lemma teqo_sym: symmetric … teqo. qed-. (* Basic_2A1: was: tsts_dec *) -lemma teqo_dec: ∀T1,T2. Decidable (T1 ⩳ T2). +lemma teqo_dec: ∀T1,T2. Decidable (T1 ~ T2). * [ * #s1 | #I1 #V1 #T1 ] * [1,3,5,7: * #s2 |*: #I2 #V2 #T2 ] [ /3 width=1 by teqo_sort, or_introl/ |2,3,13: diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/teqo_simple.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/teqo_simple.ma index 865b0aa6f..a5652b1b7 100644 --- a/matita/matita/contribs/lambdadelta/static_2/syntax/teqo_simple.ma +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/teqo_simple.ma @@ -20,12 +20,12 @@ include "static_2/syntax/teqo.ma". (* Properies with simple (neutral) terms ************************************) (* Basic_2A1: was: simple_tsts_repl_dx *) -lemma simple_teqo_repl_dx: ∀T1,T2. T1 ⩳ T2 → 𝐒❪T1❫ → 𝐒❪T2❫. +lemma simple_teqo_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-. (* Basic_2A1: was: simple_tsts_repl_sn *) -lemma simple_teqo_repl_sn: ∀T1,T2. T1 ⩳ T2 → 𝐒❪T2❫ → 𝐒❪T1❫. +lemma simple_teqo_repl_sn: ∀T1,T2. T1 ~ T2 → 𝐒❪T2❫ → 𝐒❪T1❫. /3 width=3 by simple_teqo_repl_dx, teqo_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/teqo_simple_vector.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/teqo_simple_vector.ma index 1d89e0bc7..ce3229ab5 100644 --- a/matita/matita/contribs/lambdadelta/static_2/syntax/teqo_simple_vector.ma +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/teqo_simple_vector.ma @@ -22,7 +22,7 @@ include "static_2/syntax/teqo_simple.ma". (* Basic_1: was only: iso_flats_lref_bind_false iso_flats_flat_bind_false *) (* Basic_2A1: was: tsts_inv_bind_applv_simple *) lemma teqo_inv_applv_bind_simple (p) (I): - ∀Vs,V2,T1,T2. ⒶVs.T1 ⩳ ⓑ[p,I]V2.T2 → 𝐒❪T1❫ → ⊥. + ∀Vs,V2,T1,T2. ⒶVs.T1 ~ ⓑ[p,I]V2.T2 → 𝐒❪T1❫ → ⊥. #p #I #Vs #V2 #T1 #T2 #H elim (teqo_inv_pair2 … H) -H #V0 #T0 elim Vs -Vs normalize [ #H destruct #H /2 width=5 by simple_inv_bind/ diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/teqo_teqx.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/teqo_teqg.ma similarity index 83% rename from matita/matita/contribs/lambdadelta/static_2/syntax/teqo_teqx.ma rename to matita/matita/contribs/lambdadelta/static_2/syntax/teqo_teqg.ma index 845725d76..c0c2218d4 100644 --- a/matita/matita/contribs/lambdadelta/static_2/syntax/teqo_teqx.ma +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/teqo_teqg.ma @@ -12,13 +12,14 @@ (* *) (**************************************************************************) -include "static_2/syntax/teqx.ma". +include "static_2/syntax/teqg.ma". include "static_2/syntax/teqo.ma". (* SORT-IRRELEVANT OUTER EQUIVALENCE FOR TERMS ******************************) -(* Properties with sort-irrelevant equivalence for terms ********************) +(* Properties with generic equivalence for terms ****************************) -lemma teqx_teqo: ∀T1,T2. T1 ≛ T2 → T1 ⩳ T2. -#T1 #T2 * -T1 -T2 /2 width=1 by teqo_sort, teqo_pair/ +lemma teqg_teqo (S): + ∀T1,T2. T1 ≛[S] T2 → T1 ~ T2. +#S #T1 #T2 * -T1 -T2 /2 width=1 by teqo_sort, teqo_pair/ qed. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/tweq.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/teqw.ma similarity index 51% rename from matita/matita/contribs/lambdadelta/static_2/syntax/tweq.ma rename to matita/matita/contribs/lambdadelta/static_2/syntax/teqw.ma index a5c60ec94..1412f42b6 100644 --- a/matita/matita/contribs/lambdadelta/static_2/syntax/tweq.ma +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/teqw.ma @@ -14,49 +14,49 @@ include "ground/xoa/ex_1_2.ma". include "ground/xoa/ex_3_2.ma". -include "static_2/notation/relations/approxeq_2.ma". +include "static_2/notation/relations/tildeminus_2.ma". include "static_2/syntax/term_weight.ma". (* SORT-IRRELEVANT WHD EQUIVALENCE ON TERMS *********************************) -inductive tweq: relation term ≝ -| tweq_sort: ∀s1,s2. tweq (⋆s1) (⋆s2) -| tweq_lref: ∀i. tweq (#i) (#i) -| tweq_gref: ∀l. tweq (§l) (§l) -| tweq_abbr: ∀p,V1,V2,T1,T2. (p=Ⓣ→tweq T1 T2) → tweq (ⓓ[p]V1.T1) (ⓓ[p]V2.T2) -| tweq_abst: ∀p,V1,V2,T1,T2. tweq (ⓛ[p]V1.T1) (ⓛ[p]V2.T2) -| tweq_appl: ∀V1,V2,T1,T2. tweq T1 T2 → tweq (ⓐV1.T1) (ⓐV2.T2) -| tweq_cast: ∀V1,V2,T1,T2. tweq V1 V2 → tweq T1 T2 → tweq (ⓝV1.T1) (ⓝV2.T2) +inductive teqw: relation term ≝ +| teqw_sort: ∀s1,s2. teqw (⋆s1) (⋆s2) +| teqw_lref: ∀i. teqw (#i) (#i) +| teqw_gref: ∀l. teqw (§l) (§l) +| teqw_abbr: ∀p,V1,V2,T1,T2. (p=Ⓣ→teqw T1 T2) → teqw (ⓓ[p]V1.T1) (ⓓ[p]V2.T2) +| teqw_abst: ∀p,V1,V2,T1,T2. teqw (ⓛ[p]V1.T1) (ⓛ[p]V2.T2) +| teqw_appl: ∀V1,V2,T1,T2. teqw T1 T2 → teqw (ⓐV1.T1) (ⓐV2.T2) +| teqw_cast: ∀V1,V2,T1,T2. teqw V1 V2 → teqw T1 T2 → teqw (ⓝV1.T1) (ⓝV2.T2) . interpretation "context-free tail sort-irrelevant equivalence (term)" - 'ApproxEq T1 T2 = (tweq T1 T2). + 'TildeMinus T1 T2 = (teqw T1 T2). (* Basic properties *********************************************************) -lemma tweq_abbr_pos: ∀V1,V2,T1,T2. T1 ≅ T2 → +ⓓV1.T1 ≅ +ⓓV2.T2. -/3 width=1 by tweq_abbr/ qed. +lemma teqw_abbr_pos: ∀V1,V2,T1,T2. T1 ≃ T2 → +ⓓV1.T1 ≃ +ⓓV2.T2. +/3 width=1 by teqw_abbr/ qed. -lemma tweq_abbr_neg: ∀V1,V2,T1,T2. -ⓓV1.T1 ≅ -ⓓV2.T2. +lemma teqw_abbr_neg: ∀V1,V2,T1,T2. -ⓓV1.T1 ≃ -ⓓV2.T2. #V1 #V2 #T1 #T2 -@tweq_abbr #H destruct +@teqw_abbr #H destruct qed. -lemma tweq_refl: reflexive … tweq. +lemma teqw_refl: reflexive … teqw. #T elim T -T * [||| #p * | * ] -/2 width=1 by tweq_sort, tweq_lref, tweq_gref, tweq_abbr, tweq_abst, tweq_appl, tweq_cast/ +/2 width=1 by teqw_sort, teqw_lref, teqw_gref, teqw_abbr, teqw_abst, teqw_appl, teqw_cast/ qed. -lemma tweq_sym: symmetric … tweq. +lemma teqw_sym: symmetric … teqw. #T1 #T2 #H elim H -T1 -T2 -/3 width=3 by tweq_sort, tweq_lref, tweq_gref, tweq_abbr, tweq_abst, tweq_appl, tweq_cast/ +/3 width=3 by teqw_sort, teqw_lref, teqw_gref, teqw_abbr, teqw_abst, teqw_appl, teqw_cast/ qed-. (* Left basic inversion lemmas **********************************************) -fact tweq_inv_sort_sn_aux: - ∀X,Y. X ≅ Y → ∀s1. X = ⋆s1 → ∃s2. Y = ⋆s2. +fact teqw_inv_sort_sn_aux: + ∀X,Y. X ≃ Y → ∀s1. X = ⋆s1 → ∃s2. Y = ⋆s2. #X #Y * -X -Y [1 : #s1 #s2 #s #H destruct /2 width=2 by ex_intro/ |2,3: #i #s #H destruct @@ -67,12 +67,12 @@ fact tweq_inv_sort_sn_aux: ] qed-. -lemma tweq_inv_sort_sn: - ∀Y,s1. ⋆s1 ≅ Y → ∃s2. Y = ⋆s2. -/2 width=4 by tweq_inv_sort_sn_aux/ qed-. +lemma teqw_inv_sort_sn: + ∀Y,s1. ⋆s1 ≃ Y → ∃s2. Y = ⋆s2. +/2 width=4 by teqw_inv_sort_sn_aux/ qed-. -fact tweq_inv_lref_sn_aux: - ∀X,Y. X ≅ Y → ∀i. X = #i → Y = #i. +fact teqw_inv_lref_sn_aux: + ∀X,Y. X ≃ Y → ∀i. X = #i → Y = #i. #X #Y * -X -Y [1 : #s1 #s2 #j #H destruct |2,3: // @@ -83,11 +83,11 @@ fact tweq_inv_lref_sn_aux: ] qed-. -lemma tweq_inv_lref_sn: ∀Y,i. #i ≅ Y → Y = #i. -/2 width=5 by tweq_inv_lref_sn_aux/ qed-. +lemma teqw_inv_lref_sn: ∀Y,i. #i ≃ Y → Y = #i. +/2 width=5 by teqw_inv_lref_sn_aux/ qed-. -fact tweq_inv_gref_sn_aux: - ∀X,Y. X ≅ Y → ∀l. X = §l → Y = §l. +fact teqw_inv_gref_sn_aux: + ∀X,Y. X ≃ Y → ∀l. X = §l → Y = §l. #X #Y * -X -Y [1 : #s1 #s2 #k #H destruct |2,3: // @@ -98,13 +98,13 @@ fact tweq_inv_gref_sn_aux: ] qed-. -lemma tweq_inv_gref_sn: - ∀Y,l. §l ≅ Y → Y = §l. -/2 width=5 by tweq_inv_gref_sn_aux/ qed-. +lemma teqw_inv_gref_sn: + ∀Y,l. §l ≃ Y → Y = §l. +/2 width=5 by teqw_inv_gref_sn_aux/ qed-. -fact tweq_inv_abbr_sn_aux: - ∀X,Y. X ≅ Y → ∀p,V1,T1. X = ⓓ[p]V1.T1 → - ∃∃V2,T2. p = Ⓣ → T1 ≅ T2 & Y = ⓓ[p]V2.T2. +fact teqw_inv_abbr_sn_aux: + ∀X,Y. X ≃ Y → ∀p,V1,T1. X = ⓓ[p]V1.T1 → + ∃∃V2,T2. p = Ⓣ → T1 ≃ T2 & Y = ⓓ[p]V2.T2. #X #Y * -X -Y [1 : #s1 #s2 #q #W1 #U1 #H destruct |2,3: #i #q #W1 #U1 #H destruct @@ -115,13 +115,13 @@ fact tweq_inv_abbr_sn_aux: ] qed-. -lemma tweq_inv_abbr_sn: - ∀p,V1,T1,Y. ⓓ[p]V1.T1 ≅ Y → - ∃∃V2,T2. p = Ⓣ → T1 ≅ T2 & Y = ⓓ[p]V2.T2. -/2 width=4 by tweq_inv_abbr_sn_aux/ qed-. +lemma teqw_inv_abbr_sn: + ∀p,V1,T1,Y. ⓓ[p]V1.T1 ≃ Y → + ∃∃V2,T2. p = Ⓣ → T1 ≃ T2 & Y = ⓓ[p]V2.T2. +/2 width=4 by teqw_inv_abbr_sn_aux/ qed-. -fact tweq_inv_abst_sn_aux: - ∀X,Y. X ≅ Y → ∀p,V1,T1. X = ⓛ[p]V1.T1 → +fact teqw_inv_abst_sn_aux: + ∀X,Y. X ≃ Y → ∀p,V1,T1. X = ⓛ[p]V1.T1 → ∃∃V2,T2. Y = ⓛ[p]V2.T2. #X #Y * -X -Y [1 : #s1 #s2 #q #W1 #U1 #H destruct @@ -133,14 +133,14 @@ fact tweq_inv_abst_sn_aux: ] qed-. -lemma tweq_inv_abst_sn: - ∀p,V1,T1,Y. ⓛ[p]V1.T1 ≅ Y → +lemma teqw_inv_abst_sn: + ∀p,V1,T1,Y. ⓛ[p]V1.T1 ≃ Y → ∃∃V2,T2. Y = ⓛ[p]V2.T2. -/2 width=5 by tweq_inv_abst_sn_aux/ qed-. +/2 width=5 by teqw_inv_abst_sn_aux/ qed-. -fact tweq_inv_appl_sn_aux: - ∀X,Y. X ≅ Y → ∀V1,T1. X = ⓐV1.T1 → - ∃∃V2,T2. T1 ≅ T2 & Y = ⓐV2.T2. +fact teqw_inv_appl_sn_aux: + ∀X,Y. X ≃ Y → ∀V1,T1. X = ⓐV1.T1 → + ∃∃V2,T2. T1 ≃ T2 & Y = ⓐV2.T2. #X #Y * -X -Y [1 : #s1 #s2 #W1 #U1 #H destruct |2,3: #i #W1 #U1 #H destruct @@ -151,14 +151,14 @@ fact tweq_inv_appl_sn_aux: ] qed-. -lemma tweq_inv_appl_sn: - ∀V1,T1,Y. ⓐV1.T1 ≅ Y → - ∃∃V2,T2. T1 ≅ T2 & Y = ⓐV2.T2. -/2 width=4 by tweq_inv_appl_sn_aux/ qed-. +lemma teqw_inv_appl_sn: + ∀V1,T1,Y. ⓐV1.T1 ≃ Y → + ∃∃V2,T2. T1 ≃ T2 & Y = ⓐV2.T2. +/2 width=4 by teqw_inv_appl_sn_aux/ qed-. -fact tweq_inv_cast_sn_aux: - ∀X,Y. X ≅ Y → ∀V1,T1. X = ⓝV1.T1 → - ∃∃V2,T2. V1 ≅ V2 & T1 ≅ T2 & Y = ⓝV2.T2. +fact teqw_inv_cast_sn_aux: + ∀X,Y. X ≃ Y → ∀V1,T1. X = ⓝV1.T1 → + ∃∃V2,T2. V1 ≃ V2 & T1 ≃ T2 & Y = ⓝV2.T2. #X #Y * -X -Y [1 : #s1 #s2 #W1 #U1 #H destruct |2,3: #i #W1 #U1 #H destruct @@ -169,118 +169,118 @@ fact tweq_inv_cast_sn_aux: ] qed-. -lemma tweq_inv_cast_sn: - ∀V1,T1,Y. ⓝV1.T1 ≅ Y → - ∃∃V2,T2. V1 ≅ V2 & T1 ≅ T2 & Y = ⓝV2.T2. -/2 width=3 by tweq_inv_cast_sn_aux/ qed-. +lemma teqw_inv_cast_sn: + ∀V1,T1,Y. ⓝV1.T1 ≃ Y → + ∃∃V2,T2. V1 ≃ V2 & T1 ≃ T2 & Y = ⓝV2.T2. +/2 width=3 by teqw_inv_cast_sn_aux/ qed-. (* Advanced inversion lemmas ************************************************) -lemma tweq_inv_abbr_pos_sn: - ∀V1,T1,Y. +ⓓV1.T1 ≅ Y → ∃∃V2,T2. T1 ≅ T2 & Y = +ⓓV2.T2. +lemma teqw_inv_abbr_pos_sn: + ∀V1,T1,Y. +ⓓV1.T1 ≃ Y → ∃∃V2,T2. T1 ≃ T2 & Y = +ⓓV2.T2. #V1 #V2 #Y #H -elim (tweq_inv_abbr_sn … H) -H #V2 #T2 +elim (teqw_inv_abbr_sn … H) -H #V2 #T2 /3 width=4 by ex2_2_intro/ qed-. -lemma tweq_inv_abbr_neg_sn: - ∀V1,T1,Y. -ⓓV1.T1 ≅ Y → ∃∃V2,T2. Y = -ⓓV2.T2. +lemma teqw_inv_abbr_neg_sn: + ∀V1,T1,Y. -ⓓV1.T1 ≃ Y → ∃∃V2,T2. Y = -ⓓV2.T2. #V1 #V2 #Y #H -elim (tweq_inv_abbr_sn … H) -H #V2 #T2 #_ +elim (teqw_inv_abbr_sn … H) -H #V2 #T2 #_ /2 width=3 by ex1_2_intro/ qed-. -lemma tweq_inv_abbr_pos_bi: - ∀V1,V2,T1,T2. +ⓓV1.T1 ≅ +ⓓV2.T2 → T1 ≅ T2. +lemma teqw_inv_abbr_pos_bi: + ∀V1,V2,T1,T2. +ⓓV1.T1 ≃ +ⓓV2.T2 → T1 ≃ T2. #V1 #V2 #T1 #T2 #H -elim (tweq_inv_abbr_pos_sn … H) -H #W2 #U2 #HTU #H destruct // +elim (teqw_inv_abbr_pos_sn … H) -H #W2 #U2 #HTU #H destruct // qed-. -lemma tweq_inv_appl_bi: - ∀V1,V2,T1,T2. ⓐV1.T1 ≅ ⓐV2.T2 → T1 ≅ T2. +lemma teqw_inv_appl_bi: + ∀V1,V2,T1,T2. ⓐV1.T1 ≃ ⓐV2.T2 → T1 ≃ T2. #V1 #V2 #T1 #T2 #H -elim (tweq_inv_appl_sn … H) -H #W2 #U2 #HTU #H destruct // +elim (teqw_inv_appl_sn … H) -H #W2 #U2 #HTU #H destruct // qed-. -lemma tweq_inv_cast_bi: - ∀V1,V2,T1,T2. ⓝV1.T1 ≅ ⓝV2.T2 → ∧∧ V1 ≅ V2 & T1 ≅ T2. +lemma teqw_inv_cast_bi: + ∀V1,V2,T1,T2. ⓝV1.T1 ≃ ⓝV2.T2 → ∧∧ V1 ≃ V2 & T1 ≃ T2. #V1 #V2 #T1 #T2 #H -elim (tweq_inv_cast_sn … H) -H #W2 #U2 #HVW #HTU #H destruct +elim (teqw_inv_cast_sn … H) -H #W2 #U2 #HVW #HTU #H destruct /2 width=1 by conj/ qed-. -lemma tweq_inv_cast_xy_y: ∀T,V. ⓝV.T ≅ T → ⊥. +lemma teqw_inv_cast_xy_y: ∀T,V. ⓝV.T ≃ T → ⊥. @(f_ind … tw) #n #IH #T #Hn #V #H destruct -elim (tweq_inv_cast_sn … H) -H #X1 #X2 #_ #HX2 #H destruct -V +elim (teqw_inv_cast_sn … H) -H #X1 #X2 #_ #HX2 #H destruct -V /2 width=4 by/ qed-. (* Advanced forward lemmas **************************************************) -lemma tweq_fwd_pair_sn (I): - ∀V1,T1,X2. ②[I]V1.T1 ≅ X2 → ∃∃V2,T2. X2 = ②[I]V2.T2. +lemma teqw_fwd_pair_sn (I): + ∀V1,T1,X2. ②[I]V1.T1 ≃ X2 → ∃∃V2,T2. X2 = ②[I]V2.T2. * [ #p ] * [ cases p -p ] #V1 #T1 #X2 #H -[ elim (tweq_inv_abbr_pos_sn … H) -H #V2 #T2 #_ #H -| elim (tweq_inv_abbr_neg_sn … H) -H #V2 #T2 #H -| elim (tweq_inv_abst_sn … H) -H #V2 #T2 #H -| elim (tweq_inv_appl_sn … H) -H #V2 #T2 #_ #H -| elim (tweq_inv_cast_sn … H) -H #V2 #T2 #_ #_ #H +[ elim (teqw_inv_abbr_pos_sn … H) -H #V2 #T2 #_ #H +| elim (teqw_inv_abbr_neg_sn … H) -H #V2 #T2 #H +| elim (teqw_inv_abst_sn … H) -H #V2 #T2 #H +| elim (teqw_inv_appl_sn … H) -H #V2 #T2 #_ #H +| elim (teqw_inv_cast_sn … H) -H #V2 #T2 #_ #_ #H ] /2 width=3 by ex1_2_intro/ qed-. -lemma tweq_fwd_pair_bi (I1) (I2): - ∀V1,V2,T1,T2. ②[I1]V1.T1 ≅ ②[I2]V2.T2 → I1 = I2. +lemma teqw_fwd_pair_bi (I1) (I2): + ∀V1,V2,T1,T2. ②[I1]V1.T1 ≃ ②[I2]V2.T2 → I1 = I2. #I1 #I2 #V1 #V2 #T1 #T2 #H -elim (tweq_fwd_pair_sn … H) -H #W2 #U2 #H destruct // +elim (teqw_fwd_pair_sn … H) -H #W2 #U2 #H destruct // qed-. (* Advanced properties ******************************************************) -lemma tweq_dec: ∀T1,T2. Decidable (T1 ≅ T2). +lemma teqw_dec: ∀T1,T2. Decidable (T1 ≃ T2). #T1 elim T1 -T1 [ * #s1 | #I1 #V1 #T1 #IHV #IHT ] * [1,3,5,7: * #s2 |*: #I2 #V2 #T2 ] -[ /3 width=1 by tweq_sort, or_introl/ +[ /3 width=1 by teqw_sort, or_introl/ |2,3,13: @or_intror #H - elim (tweq_inv_sort_sn … H) -H #x #H destruct + elim (teqw_inv_sort_sn … H) -H #x #H destruct |4,6,14: @or_intror #H - lapply (tweq_inv_lref_sn … H) -H #H destruct + lapply (teqw_inv_lref_sn … H) -H #H destruct |5: elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/ @or_intror #H - lapply (tweq_inv_lref_sn … H) -H #H destruct /2 width=1 by/ + lapply (teqw_inv_lref_sn … H) -H #H destruct /2 width=1 by/ |7,8,15: @or_intror #H - lapply (tweq_inv_gref_sn … H) -H #H destruct + lapply (teqw_inv_gref_sn … H) -H #H destruct |9: elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/ @or_intror #H - lapply (tweq_inv_gref_sn … H) -H #H destruct /2 width=1 by/ + lapply (teqw_inv_gref_sn … H) -H #H destruct /2 width=1 by/ |10,11,12: @or_intror #H - elim (tweq_fwd_pair_sn … H) -H #X1 #X2 #H destruct + elim (teqw_fwd_pair_sn … H) -H #X1 #X2 #H destruct |16: elim (eq_item2_dec I1 I2) #HI12 destruct [ cases I2 -I2 [ #p ] * [ cases p -p ] [ elim (IHT T2) -IHT #HT12 - [ /3 width=1 by tweq_abbr_pos, or_introl/ - | /4 width=3 by tweq_inv_abbr_pos_bi, or_intror/ + [ /3 width=1 by teqw_abbr_pos, or_introl/ + | /4 width=3 by teqw_inv_abbr_pos_bi, or_intror/ ] - | /3 width=1 by tweq_abbr_neg, or_introl/ - | /3 width=1 by tweq_abst, or_introl/ + | /3 width=1 by teqw_abbr_neg, or_introl/ + | /3 width=1 by teqw_abst, or_introl/ | elim (IHT T2) -IHT #HT12 - [ /3 width=1 by tweq_appl, or_introl/ - | /4 width=3 by tweq_inv_appl_bi, or_intror/ + [ /3 width=1 by teqw_appl, or_introl/ + | /4 width=3 by teqw_inv_appl_bi, or_intror/ ] | elim (IHV V2) -IHV #HV12 elim (IHT T2) -IHT #HT12 - [1: /3 width=1 by tweq_cast, or_introl/ + [1: /3 width=1 by teqw_cast, or_introl/ |*: @or_intror #H - elim (tweq_inv_cast_bi … H) -H #HV12 #HT12 + elim (teqw_inv_cast_bi … H) -H #HV12 #HT12 /2 width=1 by/ ] ] - | /4 width=5 by tweq_fwd_pair_bi, or_intror/ + | /4 width=5 by teqw_fwd_pair_bi, or_intror/ ] ] qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/tweq_simple.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/teqw_simple.ma similarity index 91% rename from matita/matita/contribs/lambdadelta/static_2/syntax/tweq_simple.ma rename to matita/matita/contribs/lambdadelta/static_2/syntax/teqw_simple.ma index bf1ef003b..9132df1c1 100644 --- a/matita/matita/contribs/lambdadelta/static_2/syntax/tweq_simple.ma +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/teqw_simple.ma @@ -13,14 +13,14 @@ (**************************************************************************) include "static_2/syntax/term_simple.ma". -include "static_2/syntax/tweq.ma". +include "static_2/syntax/teqw.ma". (* SORT-IRRELEVANT WHD EQUIVALENCE ON TERMS *********************************) (* Properties with simple terms *********************************************) -lemma tweq_simple_trans: - ∀T1,T2. T1 ≅ T2 → 𝐒❪T1❫ → 𝐒❪T2❫. +lemma teqw_simple_trans: + ∀T1,T2. T1 ≃ T2 → 𝐒❪T1❫ → 𝐒❪T2❫. #T1 #T2 * -T1 -T2 [4,5: #p #V1 #V2 #T1 #T2 [ #_ ] #H elim (simple_inv_bind … H) diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/tweq_teqx.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/teqw_teqg.ma similarity index 68% rename from matita/matita/contribs/lambdadelta/static_2/syntax/tweq_teqx.ma rename to matita/matita/contribs/lambdadelta/static_2/syntax/teqw_teqg.ma index 39cf1e353..24287bfcd 100644 --- a/matita/matita/contribs/lambdadelta/static_2/syntax/tweq_teqx.ma +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/teqw_teqg.ma @@ -12,21 +12,22 @@ (* *) (**************************************************************************) -include "static_2/syntax/teqx.ma". -include "static_2/syntax/tweq.ma". +include "static_2/syntax/teqg.ma". +include "static_2/syntax/teqw.ma". (* SORT-IRRELEVANT WHD EQUIVALENCE ON TERMS *********************************) -(* Properties with sort-irrelevant equivalence for terms ********************) +(* Properties with generic equivalence for terms ****************************) -lemma teqx_tweq: ∀T1,T2. T1 ≛ T2 → T1 ≅ T2. -#T1 #T2 #H elim H -T1 -T2 [||| * [ #p ] * #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT ] -[ /1 width=1 by tweq_sort/ -| /1 width=1 by tweq_lref/ -| /1 width=1 by tweq_gref/ -| cases p -p /2 width=1 by tweq_abbr_pos, tweq_abbr_neg/ -| /1 width=1 by tweq_abst/ -| /2 width=1 by tweq_appl/ -| /2 width=1 by tweq_cast/ +lemma teqg_teqw (S): + ∀T1,T2. T1 ≛[S] T2 → T1 ≃ T2. +#S #T1 #T2 #H elim H -T1 -T2 [||| * [ #p ] * #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT ] +[ /1 width=1 by teqw_sort/ +| /1 width=1 by teqw_lref/ +| /1 width=1 by teqw_gref/ +| cases p -p /2 width=1 by teqw_abbr_pos, teqw_abbr_neg/ +| /1 width=1 by teqw_abst/ +| /2 width=1 by teqw_appl/ +| /2 width=1 by teqw_cast/ ] qed. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/tweq_tweq.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/teqw_teqw.ma similarity index 62% rename from matita/matita/contribs/lambdadelta/static_2/syntax/tweq_tweq.ma rename to matita/matita/contribs/lambdadelta/static_2/syntax/teqw_teqw.ma index afa33ccfb..b4dcb3b6e 100644 --- a/matita/matita/contribs/lambdadelta/static_2/syntax/tweq_tweq.ma +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/teqw_teqw.ma @@ -12,40 +12,40 @@ (* *) (**************************************************************************) -include "static_2/syntax/tweq.ma". +include "static_2/syntax/teqw.ma". (* SORT-IRRELEVANT WHD EQUIVALENCE ON TERMS *********************************) (* Main properties **********************************************************) -theorem tweq_trans: Transitive … tweq. +theorem teqw_trans: Transitive … teqw. #T1 #T #H elim H -T1 -T [ #s1 #s #X #H - elim (tweq_inv_sort_sn … H) -s #s2 destruct - /2 width=1 by tweq_sort/ + elim (teqw_inv_sort_sn … H) -s #s2 destruct + /2 width=1 by teqw_sort/ | #i1 #i #H // | #l1 #l #H // | #p #V1 #V #T1 #T #_ #IHT #X #H - elim (tweq_inv_abbr_sn … H) -H #V2 #T2 #HT #H destruct - /4 width=1 by tweq_abbr/ + elim (teqw_inv_abbr_sn … H) -H #V2 #T2 #HT #H destruct + /4 width=1 by teqw_abbr/ | #p #V1 #V #T1 #T #X #H - elim (tweq_inv_abst_sn … H) -H #V2 #T2 #H destruct - /2 width=1 by tweq_abst/ + elim (teqw_inv_abst_sn … H) -H #V2 #T2 #H destruct + /2 width=1 by teqw_abst/ | #V1 #V #T1 #T #_ #IHT #X #H - elim (tweq_inv_appl_sn … H) -H #V2 #T2 #HT #H destruct - /3 width=1 by tweq_appl/ + elim (teqw_inv_appl_sn … H) -H #V2 #T2 #HT #H destruct + /3 width=1 by teqw_appl/ | #V1 #V #T1 #T #_ #_ #IHV #IHT #X #H - elim (tweq_inv_cast_sn … H) -H #V2 #T2 #HV #HT #H destruct - /3 width=1 by tweq_cast/ + elim (teqw_inv_cast_sn … H) -H #V2 #T2 #HV #HT #H destruct + /3 width=1 by teqw_cast/ ] qed-. -theorem tweq_canc_sn: left_cancellable … tweq. -/3 width=3 by tweq_trans, tweq_sym/ qed-. +theorem teqw_canc_sn: left_cancellable … teqw. +/3 width=3 by teqw_trans, teqw_sym/ qed-. -theorem tweq_canc_dx: right_cancellable … tweq. -/3 width=3 by tweq_trans, tweq_sym/ qed-. +theorem teqw_canc_dx: right_cancellable … teqw. +/3 width=3 by teqw_trans, teqw_sym/ qed-. -theorem tweq_repl: - ∀T1,T2. T1 ≅ T2 → ∀U1. T1 ≅ U1 → ∀U2. T2 ≅ U2 → U1 ≅ U2. -/3 width=3 by tweq_canc_sn, tweq_trans/ qed-. +theorem teqw_repl: + ∀T1,T2. T1 ≃ T2 → ∀U1. T1 ≃ U1 → ∀U2. T2 ≃ U2 → U1 ≃ U2. +/3 width=3 by teqw_canc_sn, teqw_trans/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/teqx.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/teqx.ma index 3986d32a4..ed581c5be 100644 --- a/matita/matita/contribs/lambdadelta/static_2/syntax/teqx.ma +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/teqx.ma @@ -12,174 +12,109 @@ (* *) (**************************************************************************) -include "ground/xoa/ex_3_2.ma". -include "static_2/notation/relations/stareq_2.ma". -include "static_2/syntax/term.ma". +include "static_2/notation/relations/approxeq_2.ma". +include "static_2/syntax/teqg.ma". (* SORT-IRRELEVANT EQUIVALENCE ON TERMS *************************************) -inductive teqx: relation term ≝ -| teqx_sort: ∀s1,s2. teqx (⋆s1) (⋆s2) -| teqx_lref: ∀i. teqx (#i) (#i) -| teqx_gref: ∀l. teqx (§l) (§l) -| teqx_pair: ∀I,V1,V2,T1,T2. teqx V1 V2 → teqx T1 T2 → teqx (②[I]V1.T1) (②[I]V2.T2) -. +definition sfull: relation2 nat nat ≝ + λs1,s2. ⊤. + +definition teqx: relation term ≝ + teqg sfull. interpretation - "context-free sort-irrelevant equivalence (term)" - 'StarEq T1 T2 = (teqx T1 T2). + "context-free sort-irrelevant equivalence (term)" + 'ApproxEq T1 T2 = (teqx T1 T2). (* Basic properties *********************************************************) -lemma teqx_refl: reflexive … teqx. -#T elim T -T /2 width=1 by teqx_pair/ -* /2 width=1 by teqx_lref, teqx_gref/ -qed. - -lemma teqx_sym: symmetric … teqx. -#T1 #T2 #H elim H -T1 -T2 -/2 width=3 by teqx_sort, teqx_lref, teqx_gref, teqx_pair/ -qed-. - -(* Basic inversion lemmas ***************************************************) +lemma sfull_dec: + ∀s1,s2. Decidable (sfull s1 s2). +/2 width=1 by or_introl/ qed. -fact teqx_inv_sort1_aux: ∀X,Y. X ≛ Y → ∀s1. X = ⋆s1 → - ∃s2. Y = ⋆s2. -#X #Y * -X -Y -[ #s1 #s2 #s #H destruct /2 width=2 by ex_intro/ -| #i #s #H destruct -| #l #s #H destruct -| #I #V1 #V2 #T1 #T2 #_ #_ #s #H destruct -] -qed-. +lemma teqx_pair: + ∀V1,V2. V1 ≅ V2 → ∀T1,T2. T1 ≅ T2 → + ∀I. ②[I]V1.T1 ≅ ②[I]V2.T2. +/2 width=1 by teqg_pair/ qed. -lemma teqx_inv_sort1: ∀Y,s1. ⋆s1 ≛ Y → - ∃s2. Y = ⋆s2. -/2 width=4 by teqx_inv_sort1_aux/ qed-. +lemma teqx_refl: + reflexive … teqx. +/2 width=1 by teqg_refl/ qed. -fact teqx_inv_lref1_aux: ∀X,Y. X ≛ Y → ∀i. X = #i → Y = #i. -#X #Y * -X -Y // -[ #s1 #s2 #j #H destruct -| #I #V1 #V2 #T1 #T2 #_ #_ #j #H destruct -] -qed-. +lemma teqx_sym: + symmetric … teqx. +/2 width=1 by teqg_sym/ qed-. -lemma teqx_inv_lref1: ∀Y,i. #i ≛ Y → Y = #i. -/2 width=5 by teqx_inv_lref1_aux/ qed-. +lemma teqg_teqx (S): + ∀T1,T2. T1 ≛[S] T2 → T1 ≅ T2. +/2 width=3 by teqg_co/ qed. -fact teqx_inv_gref1_aux: ∀X,Y. X ≛ Y → ∀l. X = §l → Y = §l. -#X #Y * -X -Y // -[ #s1 #s2 #k #H destruct -| #I #V1 #V2 #T1 #T2 #_ #_ #k #H destruct -] -qed-. +(* Basic inversion lemmas ***************************************************) -lemma teqx_inv_gref1: ∀Y,l. §l ≛ Y → Y = §l. -/2 width=5 by teqx_inv_gref1_aux/ qed-. - -fact teqx_inv_pair1_aux: ∀X,Y. X ≛ Y → ∀I,V1,T1. X = ②[I]V1.T1 → - ∃∃V2,T2. V1 ≛ V2 & T1 ≛ T2 & Y = ②[I]V2.T2. -#X #Y * -X -Y -[ #s1 #s2 #J #W1 #U1 #H destruct -| #i #J #W1 #U1 #H destruct -| #l #J #W1 #U1 #H destruct -| #I #V1 #V2 #T1 #T2 #HV #HT #J #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/ -] +lemma teqx_inv_sort1: + ∀X2,s1. ⋆s1 ≅ X2 → + ∃s2. X2 = ⋆s2. +#X1 #s1 #H elim (teqg_inv_sort1 … H) -H /2 width=2 by ex_intro/ qed-. - -lemma teqx_inv_pair1: ∀I,V1,T1,Y. ②[I]V1.T1 ≛ Y → - ∃∃V2,T2. V1 ≛ V2 & T1 ≛ T2 & Y = ②[I]V2.T2. -/2 width=3 by teqx_inv_pair1_aux/ qed-. - -lemma teqx_inv_sort2: ∀X1,s2. X1 ≛ ⋆s2 → - ∃s1. X1 = ⋆s1. -#X1 #s2 #H -elim (teqx_inv_sort1 X1 s2) -/2 width=2 by teqx_sym, ex_intro/ +(* +lemma teqx_inv_lref1: + ∀X,i. #i ≅ X → X = #i. +/2 width=5 by teqg_inv_lref1/ qed-. + +lemma teqx_inv_gref1: + ∀X,l. §l ≅ X → X = §l. +/2 width=5 by teqg_inv_gref1/ qed-. +*) +lemma teqx_inv_pair1: + ∀I,V1,T1,X2. ②[I]V1.T1 ≅ X2 → + ∃∃V2,T2. V1 ≅ V2 & T1 ≅ T2 & X2 = ②[I]V2.T2. +/2 width=3 by teqg_inv_pair1/ qed-. + +lemma teqx_inv_sort2: + ∀X1,s2. X1 ≅ ⋆s2 → + ∃s1. X1 = ⋆s1. +#X1 #s2 #H elim (teqg_inv_sort2 … H) -H /2 width=2 by ex_intro/ qed-. -lemma teqx_inv_pair2: ∀I,X1,V2,T2. X1 ≛ ②[I]V2.T2 → - ∃∃V1,T1. V1 ≛ V2 & T1 ≛ T2 & X1 = ②[I]V1.T1. -#I #X1 #V2 #T2 #H -elim (teqx_inv_pair1 I V2 T2 X1) -[ #V1 #T1 #HV #HT #H destruct ] -/3 width=5 by teqx_sym, ex3_2_intro/ -qed-. +lemma teqx_inv_pair2: + ∀I,X1,V2,T2. X1 ≅ ②[I]V2.T2 → + ∃∃V1,T1. V1 ≅ V2 & T1 ≅ T2 & X1 = ②[I]V1.T1. +/2 width=1 by teqg_inv_pair2/ qed-. (* Advanced inversion lemmas ************************************************) -lemma teqx_inv_pair: ∀I1,I2,V1,V2,T1,T2. ②[I1]V1.T1 ≛ ②[I2]V2.T2 → - ∧∧ I1 = I2 & V1 ≛ V2 & T1 ≛ T2. -#I1 #I2 #V1 #V2 #T1 #T2 #H elim (teqx_inv_pair1 … H) -H -#V0 #T0 #HV #HT #H destruct /2 width=1 by and3_intro/ -qed-. - -lemma teqx_inv_pair_xy_x: ∀I,V,T. ②[I]V.T ≛ V → ⊥. -#I #V elim V -V -[ #J #T #H elim (teqx_inv_pair1 … H) -H #X #Y #_ #_ #H destruct -| #J #X #Y #IHX #_ #T #H elim (teqx_inv_pair … H) -H #H #HY #_ destruct /2 width=2 by/ -] -qed-. - -lemma teqx_inv_pair_xy_y: ∀I,T,V. ②[I]V.T ≛ T → ⊥. -#I #T elim T -T -[ #J #V #H elim (teqx_inv_pair1 … H) -H #X #Y #_ #_ #H destruct -| #J #X #Y #_ #IHY #V #H elim (teqx_inv_pair … H) -H #H #_ #HY destruct /2 width=2 by/ -] -qed-. - +lemma teqx_inv_pair: + ∀I1,I2,V1,V2,T1,T2. ②[I1]V1.T1 ≅ ②[I2]V2.T2 → + ∧∧ I1 = I2 & V1 ≅ V2 & T1 ≅ T2. +/2 width=1 by teqg_inv_pair/ qed-. +(* +lemma teqx_inv_pair_xy_x: + ∀I,V,T. ②[I]V.T ≅ V → ⊥. +/2 width=5 by teqg_inv_pair_xy_x/ qed-. + +lemma teqx_inv_pair_xy_y: + ∀I,T,V. ②[I]V.T ≅ T → ⊥. +/2 width=5 by teqg_inv_pair_xy_y/ qed-. +*) (* Basic forward lemmas *****************************************************) - -lemma teqx_fwd_atom1: ∀I,Y. ⓪[I] ≛ Y → ∃J. Y = ⓪[J]. -* #x #Y #H [ elim (teqx_inv_sort1 … H) -H ] -/3 width=4 by teqx_inv_gref1, teqx_inv_lref1, ex_intro/ -qed-. - +(* +lemma teqx_fwd_atom1: + ∀I,Y. ⓪[I] ≅ Y → ∃J. Y = ⓪[J]. +/2 width=3 by teqg_fwd_atom1/ qed-. +*) (* Advanced properties ******************************************************) -lemma teqx_dec: ∀T1,T2. Decidable (T1 ≛ T2). -#T1 elim T1 -T1 [ * #s1 | #I1 #V1 #T1 #IHV #IHT ] * [1,3,5,7: * #s2 |*: #I2 #V2 #T2 ] -[ /3 width=1 by teqx_sort, or_introl/ -|2,3,13: - @or_intror #H - elim (teqx_inv_sort1 … H) -H #x #H destruct -|4,6,14: - @or_intror #H - lapply (teqx_inv_lref1 … H) -H #H destruct -|5: - elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/ - @or_intror #H - lapply (teqx_inv_lref1 … H) -H #H destruct /2 width=1 by/ -|7,8,15: - @or_intror #H - lapply (teqx_inv_gref1 … H) -H #H destruct -|9: - elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/ - @or_intror #H - lapply (teqx_inv_gref1 … H) -H #H destruct /2 width=1 by/ -|10,11,12: - @or_intror #H - elim (teqx_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct -|16: - elim (eq_item2_dec I1 I2) #HI12 destruct - [ elim (IHV V2) -IHV #HV12 - elim (IHT T2) -IHT #HT12 - [ /3 width=1 by teqx_pair, or_introl/ ] - ] - @or_intror #H - elim (teqx_inv_pair … H) -H /2 width=1 by/ -] -qed-. +lemma teqx_dec: + ∀T1,T2. Decidable (T1 ≅ T2). +/3 width=1 by teqg_dec, or_introl/ qed-. (* Negated inversion lemmas *************************************************) -lemma tneqx_inv_pair: ∀I1,I2,V1,V2,T1,T2. - (②[I1]V1.T1 ≛ ②[I2]V2.T2 → ⊥) → - ∨∨ I1 = I2 → ⊥ - | (V1 ≛ V2 → ⊥) - | (T1 ≛ T2 → ⊥). -#I1 #I2 #V1 #V2 #T1 #T2 #H12 -elim (eq_item2_dec I1 I2) /3 width=1 by or3_intro0/ #H destruct -elim (teqx_dec V1 V2) /3 width=1 by or3_intro1/ -elim (teqx_dec T1 T2) /4 width=1 by teqx_pair, or3_intro2/ -qed-. +lemma tneqx_inv_pair: + ∀I1,I2,V1,V2,T1,T2. + (②[I1]V1.T1 ≅ ②[I2]V2.T2 → ⊥) → + ∨∨ I1 = I2 → ⊥ + | (V1 ≅ V2 → ⊥) + | (T1 ≅ T2 → ⊥). +/3 width=1 by tneqg_inv_pair, or_introl/ qed-. diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/teqx_ext.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/teqx_ext.ma index bdb3971b8..efbf86075 100644 --- a/matita/matita/contribs/lambdadelta/static_2/syntax/teqx_ext.ma +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/teqx_ext.ma @@ -12,29 +12,32 @@ (* *) (**************************************************************************) +(* include "static_2/notation/relations/stareq_3.ma". -include "static_2/syntax/cext2.ma". +*) +include "static_2/syntax/teqg_ext.ma". include "static_2/syntax/teqx.ma". (* EXTENDED SORT-IRRELEVANT EQUIVALENCE *************************************) - +(* definition teqx_ext: relation bind ≝ - ext2 teqx. - -definition cdeq: relation3 lenv term term ≝ - λL. teqx. - -definition cdeq_ext: relation3 lenv bind bind ≝ - cext2 cdeq. - + teqg_ext sfull. + +definition ceqx: relation3 lenv term term ≝ + ceqg sfull. +*) +definition ceqx_ext: relation3 lenv bind bind ≝ + ceqg_ext sfull. +(* interpretation - "context-free sort-irrelevant equivalence (binder)" - 'StarEq I1 I2 = (teqx_ext I1 I2). + "context-free sort-irrelevant equivalence (binder)" + 'StarEq I1 I2 = (teqx_ext I1 I2). interpretation - "context-dependent sort-irrelevant equivalence (term)" - 'StarEq L T1 T2 = (cdeq L T1 T2). + "context-dependent sort-irrelevant equivalence (term)" + 'StarEq L T1 T2 = (cdeq L T1 T2). interpretation - "context-dependent sort-irrelevant equivalence (binder)" - 'StarEq L I1 I2 = (cdeq_ext L I1 I2). + "context-dependent sort-irrelevant equivalence (binder)" + 'ApproxEq L I1 I2 = (cdeq_ext L I1 I2). +*) diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/teqx_teqx.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/teqx_teqx.ma index b7ab7114d..59e682287 100644 --- a/matita/matita/contribs/lambdadelta/static_2/syntax/teqx_teqx.ma +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/teqx_teqx.ma @@ -12,29 +12,25 @@ (* *) (**************************************************************************) +include "static_2/syntax/teqg_teqg.ma". include "static_2/syntax/teqx.ma". (* SORT-IRRELEVANT EQUIVALENCE ON TERMS *************************************) (* Main properties **********************************************************) -theorem teqx_trans: Transitive … teqx. -#T1 #T #H elim H -T1 -T -[ #s1 #s #X #H - elim (teqx_inv_sort1 … H) -s /2 width=1 by teqx_sort/ -| #i1 #i #H <(teqx_inv_lref1 … H) -H // -| #l1 #l #H <(teqx_inv_gref1 … H) -H // -| #I #V1 #V #T1 #T #_ #_ #IHV #IHT #X #H - elim (teqx_inv_pair1 … H) -H /3 width=1 by teqx_pair/ -] -qed-. +theorem teqx_trans: + Transitive … teqx. +/2 width=3 by teqg_trans/ qed-. -theorem teqx_canc_sn: left_cancellable … teqx. -/3 width=3 by teqx_trans, teqx_sym/ qed-. - -theorem teqx_canc_dx: right_cancellable … teqx. -/3 width=3 by teqx_trans, teqx_sym/ qed-. +theorem teqx_canc_sn: + left_cancellable … teqx. +/2 width=3 by teqg_canc_sn/ qed-. +theorem teqx_canc_dx: + right_cancellable … teqx. +/2 width=3 by teqg_canc_dx/ qed-. +(* theorem teqx_repl: ∀T1,T2. T1 ≛ T2 → ∀U1. T1 ≛ U1 → ∀U2. T2 ≛ U2 → U1 ≛ U2. /3 width=3 by teqx_canc_sn, teqx_trans/ qed-. @@ -46,3 +42,4 @@ theorem teqx_tneqx_trans: ∀T1,T. T1 ≛ T → ∀T2. (T ≛ T2 → ⊥) → T1 theorem tneqx_teqx_canc_dx: ∀T1,T. (T1 ≛ T → ⊥) → ∀T2. T2 ≛ T → T1 ≛ T2 → ⊥. /3 width=3 by teqx_trans/ qed-. +*) diff --git a/matita/matita/contribs/lambdadelta/static_2/web/static_2_src.tbl b/matita/matita/contribs/lambdadelta/static_2/web/static_2_src.tbl index 31f151da1..329c596ec 100644 --- a/matita/matita/contribs/lambdadelta/static_2/web/static_2_src.tbl +++ b/matita/matita/contribs/lambdadelta/static_2/web/static_2_src.tbl @@ -27,16 +27,21 @@ table { ] [ { "atomic arity assignment" * } { [ [ "restricted refinement for lenvs" ] "lsuba" + "( ? ⊢ ? ⫃⁝ ? )" "lsuba_drops" + "lsuba_lsubr" + "lsuba_aaa" + "lsuba_lsuba" * ] - [ [ "for terms" ] "aaa" + "( ❪?,?❫ ⊢ ? ⁝ ? )" "aaa_drops" + "aaa_fqus" + "aaa_reqx" + "aaa_feqx" + "aaa_aaa" + "aaa_dec" * ] + [ [ "for terms" ] "aaa" + "( ❪?,?❫ ⊢ ? ⁝ ? )" "aaa_drops" + "aaa_fqus" + "aaa_reqg" + "aaa_feqg" + "aaa_aaa" + "aaa_dec" * ] } ] - [ { "degree-based equivalence" * } { - [ [ "for closures on referred entries" ] "feqx" + "( ❪?,?,?❫ ≛ ❪?,?,?❫ )" "feqx_fqup" + "feqx_fqus" + "feqx_req" + "feqx_feqx" * ] - [ [ "for lenvs on referred entries" ] "reqx" + "( ? ≛[?] ? )" "reqx_length" + "reqx_drops" + "reqx_fqup" + "reqx_fqus" + "reqx_req" + "reqx_reqx" * ] + [ { "sort-irrelevant equivalence" * } { + [ [ "for closures on referred entries" ] "feqx" + "( ❪?,?,?❫ ≅ ❪?,?,?❫ )" * ] + [ [ "for lenvs on referred entries" ] "reqx" + "( ? ≅[?] ? )" "reqx_reqx" * ] } ] [ { "syntactic equivalence" * } { - [ [ "for lenvs on referred entries" ] "req" + "( ? ≡[?] ? )" "req_length" + "req_drops" + "req_fqup" + "req_fsle" * ] + [ [ "for lenvs on referred entries" ] "req" + "( ? ≡[?] ? )" * ] + } + ] + [ { "generic equivalence" * } { + [ [ "for closures on referred entries" ] "feqg" + "( ❪?,?,?❫ ≛[?] ❪?,?,?❫ )" "feqg_fqup" + "feqg_fqus" + "feqg_feqg" * ] + [ [ "for lenvs on referred entries" ] "reqg" + "( ? ≛[?,?] ? )" "reqg_length" + "reqg_drops" + "reqg_fqup" + "reqg_fqus" + "reqg_reqg" * ] } ] [ { "generic extension of a context-sensitive relation" * } { @@ -68,7 +73,7 @@ table { [ { "s-transition" * } { [ { "structural successor" * } { [ [ "for closures" ] "fquq" + "( ❪?,?,?❫ ⬂⸮[?] ❪?,?,?❫ )" + "( ❪?,?,?❫ ⬂⸮ ❪?,?,?❫ )" "fquq_length" + "fquq_weight" * ] - [ [ "proper for closures" ] "fqu" + "( ❪?,?,?❫ ⬂[?] ❪?,?,?❫ )" + "( ❪?,?,?❫ ⬂ ❪?,?,?❫ )" "fqu_length" + "fqu_weight" + "fqu_teqx" * ] + [ [ "proper for closures" ] "fqu" + "( ❪?,?,?❫ ⬂[?] ❪?,?,?❫ )" + "( ❪?,?,?❫ ⬂ ❪?,?,?❫ )" "fqu_length" + "fqu_weight" + "fqu_teqg" * ] } ] } @@ -86,7 +91,7 @@ table { [ { "generic and uniform relocation" * } { [ [ "for binders" ] "lifts_bind" + "( ⇧*[?] ? ≘ ? )" + "( ⇧[?] ? ≘ ? )" "lifts_weight_bind" + "lifts_lifts_bind" * ] [ [ "for term vectors" ] "lifts_vector" + "( ⇧*[?] ? ≘ ? )" + "( ⇧[?] ? ≘ ? )" "lifts_lifts_vector" * ] - [ [ "for terms" ] "lifts" + "( ⇧*[?] ? ≘ ? )" + "( ⇧[?] ? ≘ ? )" "lifts_simple" + "lifts_weight" + "lifts_teqx" + "lifts_tweq" + "lifts_teqo" + "lifts_lifts" * ] + [ [ "for terms" ] "lifts" + "( ⇧*[?] ? ≘ ? )" + "( ⇧[?] ? ≘ ? )" "lifts_simple" + "lifts_weight" + "lifts_teqg" + "lifts_teqx" + "lifts_teqw" + "lifts_teqo" + "lifts_lifts" * ] } ] [ { "syntactic equivalence" * } { @@ -117,16 +122,26 @@ table { } ] [ { "sort-irrelevant outer equivalence" * } { - [ [ "for terms" ] "teqo" + "( ? ⩳ ? )" "teqo_simple" + "teqo_teqx" + "teqo_teqo" + "teqo_simple_vector" * ] + [ [ "for terms" ] "teqo" + "( ? ~ ? )" "teqo_simple" + "teqo_teqg" + "teqo_teqo" + "teqo_simple_vector" * ] } ] [ { "sort-irrelevant whd equivalence" * } { - [ [ "for terms" ] "tweq" + "( ? ≅ ? )" "tweq_simple" + "tweq_teqx" + "tweq_tueq" * ] + [ [ "for terms" ] "teqw" + "( ? ≃ ? )" "teqw_simple" + "teqw_teqg" + "teqw_teqw" * ] } ] [ { "sort-irrelevant equivalence" * } { - [ [ "" ] "teqx_ext" + "( ? ≛ ? )" + "( ? ⊢ ? ≛ ? )" * ] - [ [ "" ] "teqx" + "( ? ≛ ? )" "teqx_teqx" * ] + [ [ "" ] "teqx_ext" + "( ? ≅ ? )" + "( ? ⊢ ? ≅ ? )" * ] + [ [ "" ] "teqx" + "( ? ≅ ? )" "teqx_teqx" * ] + } + ] + [ { "syntactic equivalence" * } { + [ [ "" ] "teq_ext" + "( ? ≡ ? )" + "( ? ⊢ ? ≡ ? )" "teq_ext_teq_ext" * ] + [ [ "" ] "teq" + "( ? ≡ ? )" "teq_teq" * ] + } + ] + [ { "generic equivalence" * } { + [ [ "" ] "teqg_ext" + "( ? ≛[?] ? )" + "( ? ⊢ ? ≛[?] ? )" * ] + [ [ "" ] "teqg" + "( ? ≛[?] ? )" "teqg_teqg" * ] } ] [ { "closures" * } { @@ -141,7 +156,6 @@ table { } ] [ { "local environments" * } { - [ [ "" ] "ceq_ext" "ceq_ext_ceq_ext" * ] [ [ "" ] "cext2" * ] [ [ "" ] "lenv_length" + "( |?| )" * ] [ [ "" ] "lenv_weight" + "( ♯❨?❩ )" * ] diff --git a/matita/matita/contribs/lambdadelta/web/changes.tbl b/matita/matita/contribs/lambdadelta/web/changes.tbl index 9ef76e8f4..ee327a5de 100644 --- a/matita/matita/contribs/lambdadelta/web/changes.tbl +++ b/matita/matita/contribs/lambdadelta/web/changes.tbl @@ -18,8 +18,8 @@ table { } ] [ [{ "equivalences" * }] - { "" "" "" "" "" "" "" } - { "+" "-" "+" "+" "+" "+" "-" } + { "" "" "" "" "" "" "" "" } + { "+" "-" "+" "+" "+" "+" "-" "+" } { "derived rt-equivalence (terms)" "primitive decomposed rt-equivalence (terms) removed" "equivalence for whd rt-reduction (terms)" @@ -27,6 +27,7 @@ table { "equivalence up to exclusion binders (selected lenvs)" "syntactic equivalence (items)" "syntactic equivalence (selected closures) removed" + "generic quivalence (terms, items, referred lenvs, referred closures)" } ] [ [{ "partial orders" * }] -- 2.39.2