]> matita.cs.unibo.it Git - helm.git/commitdiff
Merge branch 'declarative' into matita-lablgtk3
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 27 Sep 2019 14:52:38 +0000 (16:52 +0200)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 27 Sep 2019 14:52:38 +0000 (16:52 +0200)
720 files changed:
.gitignore
README
helm/www/lambdadelta/alt.sh [new file with mode: 0644]
helm/www/lambdadelta/css/martha.css
helm/www/lambdadelta/images/bronze-03BB.png [new file with mode: 0644]
helm/www/lambdadelta/web/home/changes.ldw.xml [new file with mode: 0644]
helm/www/lambdadelta/web/home/changes.tbl [new file with mode: 0644]
helm/www/lambdadelta/web/home/home.ldw.xml
helm/www/lambdadelta/xslt/ld_web_root.xsl
matita/.merlin [new file with mode: 0644]
matita/Makefile
matita/components/METAS/meta.helm-content_pres.src
matita/components/METAS/meta.helm-grafite_parser.src
matita/components/Makefile.common
matita/components/binaries/matitadep/matitadep.ml
matita/components/binaries/xoa/Makefile
matita/components/binaries/xoa/xoa.ml
matita/components/content/.depend
matita/components/content/.depend.opt
matita/components/content/notationEnv.ml
matita/components/content/notationPp.ml
matita/components/content/notationUtil.ml
matita/components/content_pres/.depend
matita/components/content_pres/.depend.opt
matita/components/content_pres/Makefile
matita/components/content_pres/boxPp.ml
matita/components/content_pres/cicNotationParser.ml
matita/components/content_pres/cicNotationPres.ml
matita/components/content_pres/content2pres.ml
matita/components/content_pres/content2presMatcher.ml
matita/components/content_pres/termContentPres.ml
matita/components/disambiguation/.depend
matita/components/disambiguation/.depend.opt
matita/components/disambiguation/disambiguate.ml
matita/components/disambiguation/disambiguateTypes.ml
matita/components/disambiguation/multiPassDisambiguator.ml
matita/components/extlib/.depend
matita/components/extlib/.depend.opt
matita/components/extlib/discrimination_tree.ml
matita/components/extlib/hExtlib.ml
matita/components/extlib/hLog.ml
matita/components/extlib/hMarshal.ml
matita/components/extlib/patternMatcher.ml
matita/components/extlib/trie.ml
matita/components/getter/.depend
matita/components/getter/.depend.opt
matita/components/getter/http_getter.ml
matita/components/getter/http_getter_common.ml
matita/components/getter/http_getter_logger.ml
matita/components/getter/http_getter_misc.ml
matita/components/getter/http_getter_storage.ml
matita/components/getter/http_getter_wget.ml
matita/components/grafite/.depend
matita/components/grafite/.depend.opt
matita/components/grafite/grafiteAstPp.ml
matita/components/grafite_engine/.depend
matita/components/grafite_engine/.depend.opt
matita/components/grafite_engine/grafiteEngine.ml
matita/components/grafite_engine/nCicCoercDeclaration.ml
matita/components/grafite_parser/.depend
matita/components/grafite_parser/.depend.opt
matita/components/grafite_parser/Makefile
matita/components/grafite_parser/print_grammar.ml
matita/components/library/.depend
matita/components/library/.depend.opt
matita/components/library/librarian.ml
matita/components/library/libraryClean.ml
matita/components/logger/.depend
matita/components/logger/.depend.opt
matita/components/logger/helmLogger.ml
matita/components/ng_cic_content/.depend
matita/components/ng_cic_content/.depend.opt
matita/components/ng_cic_content/interpretations.ml
matita/components/ng_disambiguation/.depend
matita/components/ng_disambiguation/.depend.opt
matita/components/ng_disambiguation/grafiteDisambiguate.ml
matita/components/ng_disambiguation/grafiteDisambiguate.mli
matita/components/ng_extraction/.depend
matita/components/ng_extraction/.depend.opt
matita/components/ng_extraction/Makefile
matita/components/ng_extraction/common.ml
matita/components/ng_extraction/common.mli
matita/components/ng_extraction/coq.ml
matita/components/ng_extraction/extraction.ml
matita/components/ng_extraction/extraction.mli
matita/components/ng_extraction/mlutil.ml
matita/components/ng_extraction/nCicExtraction.ml
matita/components/ng_extraction/ocaml.ml
matita/components/ng_kernel/.depend
matita/components/ng_kernel/.depend.opt
matita/components/ng_kernel/Makefile
matita/components/ng_kernel/nCicReduction.ml
matita/components/ng_kernel/nCicSubstitution.ml
matita/components/ng_kernel/nCicTypeChecker.ml
matita/components/ng_kernel/nCicUtils.ml
matita/components/ng_library/.depend
matita/components/ng_library/.depend.opt
matita/components/ng_library/Makefile
matita/components/ng_paramodulation/.depend
matita/components/ng_paramodulation/.depend.opt
matita/components/ng_paramodulation/foUnif.ml
matita/components/ng_paramodulation/index.ml
matita/components/ng_paramodulation/nCicBlob.ml
matita/components/ng_paramodulation/nCicParamod.ml
matita/components/ng_paramodulation/nCicProof.ml
matita/components/ng_paramodulation/orderings.ml
matita/components/ng_paramodulation/paramod.ml
matita/components/ng_paramodulation/pp.ml
matita/components/ng_paramodulation/stats.ml
matita/components/ng_paramodulation/superposition.ml
matita/components/ng_refiner/.depend
matita/components/ng_refiner/.depend.opt
matita/components/ng_refiner/Makefile
matita/components/ng_refiner/nCicMetaSubst.ml
matita/components/ng_refiner/nCicRefineUtil.ml
matita/components/ng_refiner/nCicRefiner.ml
matita/components/ng_refiner/nCicUnifHint.ml
matita/components/ng_tactics/.depend
matita/components/ng_tactics/.depend.opt
matita/components/ng_tactics/continuationals.ml
matita/components/ng_tactics/declarative.ml
matita/components/ng_tactics/nCicElim.ml
matita/components/ng_tactics/nDestructTac.ml
matita/components/ng_tactics/nInversion.ml
matita/components/ng_tactics/nTacStatus.ml
matita/components/ng_tactics/nTactics.ml
matita/components/ng_tactics/nnAuto.ml
matita/components/registry/.depend
matita/components/registry/.depend.opt
matita/components/registry/helm_registry.ml
matita/components/syntax_extensions/.depend.opt
matita/components/thread/.depend
matita/components/thread/.depend.opt
matita/components/xml/.depend
matita/components/xml/.depend.opt
matita/components/xml/xml.ml
matita/components/xml/xmlPushParser.ml
matita/configure.ac
matita/matita/.depend
matita/matita/.depend.opt
matita/matita/Makefile
matita/matita/applyTransformation.ml
matita/matita/broken_lib/binding/db.ma [new file with mode: 0644]
matita/matita/broken_lib/binding/fp.ma [new file with mode: 0644]
matita/matita/broken_lib/binding/ln.ma [new file with mode: 0644]
matita/matita/broken_lib/binding/ln_concrete.ma [new file with mode: 0644]
matita/matita/broken_lib/binding/names.ma [new file with mode: 0644]
matita/matita/broken_lib/turing/multi_to_mono/multi_to_mono.ma [new file with mode: 0644]
matita/matita/cicMathView.ml
matita/matita/contribs/lambdadelta/Makefile
matita/matita/contribs/lambdadelta/apps_2/examples/ex_cnv_eta.ma
matita/matita/contribs/lambdadelta/apps_2/examples/ex_cpr_omega.ma
matita/matita/contribs/lambdadelta/apps_2/examples/ex_fpbg_refl.ma
matita/matita/contribs/lambdadelta/apps_2/functional/flifts_flifts_basic.ma
matita/matita/contribs/lambdadelta/apps_2/functional/mf_cpr.ma
matita/matita/contribs/lambdadelta/apps_2/models/deq.ma
matita/matita/contribs/lambdadelta/apps_2/models/deq_cpr.ma
matita/matita/contribs/lambdadelta/apps_2/models/li.ma
matita/matita/contribs/lambdadelta/apps_2/models/model_props.ma
matita/matita/contribs/lambdadelta/apps_2/models/tm.ma
matita/matita/contribs/lambdadelta/apps_2/models/veq.ma
matita/matita/contribs/lambdadelta/apps_2/models/veq_lifts.ma
matita/matita/contribs/lambdadelta/apps_2/models/vpushs.ma
matita/matita/contribs/lambdadelta/apps_2/models/vpushs_fold.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_aaa.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_acle.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpce.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpcs.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpes.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpm_conf.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpm_tdeq.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpm_tdeq_conf.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpm_tdeq_trans.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpm_trans.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpme.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpms_conf.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpms_tdeq.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpms_tdeq_conf.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpmuwe.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpmuwe_cpme.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_drops.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_eval.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_fqus.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_fsb.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_preserve.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_preserve_cpcs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_preserve_cpes.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_preserve_sub.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubv.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubv_cnv.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubv_cpcs.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubv_cpms.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubv_drops.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubv_lsuba.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubv_lsubr.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubv_lsubv.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/nta.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_aaa.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_cpcs.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_cpms.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_drops.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_eval.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_fsb.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_ind.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_preserve.ma
matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_preserve_cpcs.ma
matita/matita/contribs/lambdadelta/basic_2/etc/cnr/cnr.etc
matita/matita/contribs/lambdadelta/basic_2/etc/cnr/cnr_lift.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc/cnr/prednormal_3.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc/cpre/cpre.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc/cpre/cpre_cpre.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc/cpre/predeval_4.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc/cprs/cprs.etc
matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnu.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnu_cnr.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnu_cnr_simple.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnu_cnu.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnu_drops.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnu_lifts.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnu_tdeq.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnv_cpmue.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnv_cpue.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cpm_tueq.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cpms_cnu.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cpmue.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cpmue_csx.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cpue.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cpue_csx.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/cpue/prediteval_5.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta.etc
matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_1a.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/rdsx_csx.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/scpes/dpconvstar_8.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc/scpes/scpes.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc/scpes/scpes_aaa.etc [deleted file]
matita/matita/contribs/lambdadelta/basic_2/etc/scpes/scpes_scpes.etc
matita/matita/contribs/lambdadelta/basic_2/etc/sdsx/sdsx.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/sdsx/sdsx_rdsx.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/i_dynamic/ntas.ma
matita/matita/contribs/lambdadelta/basic_2/i_dynamic/ntas_etc.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/i_dynamic/ntas_nta.ma
matita/matita/contribs/lambdadelta/basic_2/i_dynamic/ntas_preserve.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/colon_5.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/colon_6.ma
matita/matita/contribs/lambdadelta/basic_2/notation/relations/colon_7.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/colonstar_5.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/colonstar_6.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/colonstar_7.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/exclaim_4.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/exclaim_5.ma
matita/matita/contribs/lambdadelta/basic_2/notation/relations/exclaimstar_4.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/lrsubeqv_5.ma
matita/matita/contribs/lambdadelta/basic_2/notation/relations/lsubeqx_6.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/pconvstar_7.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predeval_5.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predeval_6.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predevalwstar_6.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/preditnormal_4.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/prednormal_4.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsnstar_3.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubty_7.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubty_8.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtyproper_7.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtyproper_8.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtystar_7.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtystar_8.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtystarproper_7.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtystarproper_8.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtystrong_4.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtystrong_5.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predtynormal_4.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predtynormal_5.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predtysnstrong_4.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predtysnstrong_5.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predtystrong_4.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/predtystrong_5.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/topredtysnstrong_4.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw_cnuw.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw_drops.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw_simple.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpme.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpme_aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_aaa.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_cpms.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_cpxs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_drops.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_fpbg.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_fpbs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_lpr.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_rdeq.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpmuwe.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpmuwe_cpmuwe.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpmuwe_csx.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpre.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpre_cpms.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpre_cpre.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpre_csx.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs_cnr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs_cprs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs_drops.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs_lpr.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs_tweq.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_cnx.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_cpxs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_drops.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_fdeq.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_fqus.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_lpx.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_rdeq.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_tdeq.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_theq.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_theq_vector.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_toeq.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_toeq_vector.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_aaa.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_cnx.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_cnx_vector.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_cpxs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_csx.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_csx_vector.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_drops.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_fdeq.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_fpbq.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_fqus.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_gcp.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_gcr.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_lpx.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_lpxs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_lsubr.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_rdeq.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_simple.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_simple_theq.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_simple_toeq.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_vector.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_cpxs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_fpbg.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_fpbs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_fqup.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbg_lpxs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_aaa.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_cpx.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_cpxs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_csx.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_fpb.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_fpbs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_fqup.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_fqus.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/fpbs_lpxs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/fsb.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/fsb_aaa.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/fsb_csx.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/fsb_fdeq.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/fsb_fpbg.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/jsx.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/jsx_csx.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/jsx_drops.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/jsx_jsx.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/jsx_lsubr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/jsx_rsx.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs_cpms.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs_cprs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs_ctc.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs_length.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs_lpr.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs_lpxs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/lprs_tc.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_cpxs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_fdeq.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_length.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_lpx.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs_rdeq.ma
matita/matita/contribs/lambdadelta/basic_2/rt_computation/lsubsx.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/lsubsx_lsubsx.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/lsubsx_rdsx.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_csx.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_drops.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_fqup.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_length.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_lpxs.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_rdsx.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_csx.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_drops.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_fqup.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_length.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_lpxs.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_rsx.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_conversion/cpc.ma
matita/matita/contribs/lambdadelta/basic_2/rt_conversion/cpc_cpc.ma
matita/matita/contribs/lambdadelta/basic_2/rt_conversion/cpce.ma
matita/matita/contribs/lambdadelta/basic_2/rt_conversion/cpce_drops.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_conversion/lpce.ma
matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpcs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpcs_aaa.ma
matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpcs_cpcs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpcs_cprs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpcs_csx.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpcs_lprs.ma
matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpes.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpes_aaa.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpes_cpes.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpes_cpms.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnr_drops.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnr_simple.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnr_tdeq.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx_basic.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx_cnx.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx_drops.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx_simple.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpg.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpg_drops.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpg_simple.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm_aaa.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm_cpx.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm_drops.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm_lsubr.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm_simple.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm_tdeq.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpr.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpr_drops.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpr_drops_basic.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpr_tdeq.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_drops.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_drops_basic.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_fdeq.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_fqus.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_lsubr.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_rdeq.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_req.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_simple.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_fdeq.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpb_rdeq.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq_aaa.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/fpbq_fpb.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr_fquq.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr_length.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr_lpr.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr_lpx.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_aaa.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_fquq.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_fsle.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_length.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpx_rdeq.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_fqup.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_fsle.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_length.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_lpx.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_rdeq.ma
matita/matita/contribs/lambdadelta/basic_2/rt_transition/rpx_rpx.ma
matita/matita/contribs/lambdadelta/basic_2/web/basic_2.ldw.xml
matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl
matita/matita/contribs/lambdadelta/compile_partial.sh
matita/matita/contribs/lambdadelta/ground_2/etc/lib/arith.etc
matita/matita/contribs/lambdadelta/ground_2/lib/arith.ma
matita/matita/contribs/lambdadelta/ground_2/lib/list_eq.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/ground_2/lib/relations.ma
matita/matita/contribs/lambdadelta/ground_2/lib/stream.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/ground_2/lib/stream_eq.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/ground_2/lib/stream_hdtl.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/ground_2/lib/stream_tls.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/ground_2/lib/streams.ma [deleted file]
matita/matita/contribs/lambdadelta/ground_2/lib/streams_eq.ma [deleted file]
matita/matita/contribs/lambdadelta/ground_2/lib/streams_hdtl.ma [deleted file]
matita/matita/contribs/lambdadelta/ground_2/lib/streams_tls.ma [deleted file]
matita/matita/contribs/lambdadelta/ground_2/notation/functions/basic_2.ma
matita/matita/contribs/lambdadelta/ground_2/notation/functions/cocompose_2.ma
matita/matita/contribs/lambdadelta/ground_2/notation/functions/droppreds_2.ma
matita/matita/contribs/lambdadelta/ground_2/notation/functions/uparrowstar_2.ma
matita/matita/contribs/lambdadelta/ground_2/notation/functions/upspoonstar_2.ma
matita/matita/contribs/lambdadelta/ground_2/notation/xoa/ex_1_4.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/ground_2/relocation/mr2_plus.ma
matita/matita/contribs/lambdadelta/ground_2/relocation/nstream.ma
matita/matita/contribs/lambdadelta/ground_2/relocation/rtmap_at.ma
matita/matita/contribs/lambdadelta/ground_2/relocation/rtmap_basic_after.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/ground_2/relocation/rtmap_istot.ma
matita/matita/contribs/lambdadelta/ground_2/steps/rtc.ma
matita/matita/contribs/lambdadelta/ground_2/steps/rtc_isrt.ma
matita/matita/contribs/lambdadelta/ground_2/steps/rtc_max.ma
matita/matita/contribs/lambdadelta/ground_2/steps/rtc_plus.ma
matita/matita/contribs/lambdadelta/ground_2/steps/rtc_shift.ma
matita/matita/contribs/lambdadelta/ground_2/web/ground_2_src.tbl
matita/matita/contribs/lambdadelta/ground_2/xoa/ex_1_4.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/ground_2/xoa/ex_4_1_props.ma
matita/matita/contribs/lambdadelta/ground_2/xoa2.conf.xml
matita/matita/contribs/lambdadelta/ground_2/ynat/ynat_lt.ma
matita/matita/contribs/lambdadelta/partial.txt [deleted file]
matita/matita/contribs/lambdadelta/replace.sh
matita/matita/contribs/lambdadelta/static_2/etc/scl/clearsn_3.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/etc/scl/scl.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/etc/scl/scl_scl.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/etc/sh_lt.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/etc/tueq/lifts_tueq.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/etc/tueq/tueq.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/etc/tueq/tueq_tueq.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/i_static/rexs.ma
matita/matita/contribs/lambdadelta/static_2/i_static/rexs_drops.ma
matita/matita/contribs/lambdadelta/static_2/i_static/rexs_fqup.ma
matita/matita/contribs/lambdadelta/static_2/i_static/rexs_length.ma
matita/matita/contribs/lambdadelta/static_2/i_static/rexs_lex.ma
matita/matita/contribs/lambdadelta/static_2/notation/functions/dxabbr_2.ma
matita/matita/contribs/lambdadelta/static_2/notation/functions/dxabst_2.ma
matita/matita/contribs/lambdadelta/static_2/notation/functions/dxbind1_2.ma
matita/matita/contribs/lambdadelta/static_2/notation/functions/dxbind2_3.ma
matita/matita/contribs/lambdadelta/static_2/notation/functions/omega_0.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/notation/functions/one_0.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/notation/functions/two_0.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/notation/functions/upspoon_2.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/notation/relations/approxeq_2.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/notation/relations/freeplus_3.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/notation/relations/freestar_3.ma [deleted file]
matita/matita/contribs/lambdadelta/static_2/notation/relations/lrsubeqf_4.ma
matita/matita/contribs/lambdadelta/static_2/notation/relations/rlift_4.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_2.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_3.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_4.ma [deleted file]
matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_5.ma [deleted file]
matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_3.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_5.ma [deleted file]
matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_6.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_8.ma [deleted file]
matita/matita/contribs/lambdadelta/static_2/notation/relations/supterm_6.ma
matita/matita/contribs/lambdadelta/static_2/notation/relations/supterm_7.ma
matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermopt_6.ma
matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermopt_7.ma
matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermplus_6.ma
matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermplus_7.ma
matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermstar_6.ma
matita/matita/contribs/lambdadelta/static_2/notation/relations/suptermstar_7.ma
matita/matita/contribs/lambdadelta/static_2/notation/relations/topiso_2.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/notation/relations/topiso_4.ma [deleted file]
matita/matita/contribs/lambdadelta/static_2/relocation/drops.ma
matita/matita/contribs/lambdadelta/static_2/relocation/drops_drops.ma
matita/matita/contribs/lambdadelta/static_2/relocation/drops_length.ma
matita/matita/contribs/lambdadelta/static_2/relocation/drops_lex.ma
matita/matita/contribs/lambdadelta/static_2/relocation/drops_seq.ma
matita/matita/contribs/lambdadelta/static_2/relocation/drops_sex.ma
matita/matita/contribs/lambdadelta/static_2/relocation/drops_vector.ma
matita/matita/contribs/lambdadelta/static_2/relocation/drops_weight.ma
matita/matita/contribs/lambdadelta/static_2/relocation/lex.ma
matita/matita/contribs/lambdadelta/static_2/relocation/lifts.ma
matita/matita/contribs/lambdadelta/static_2/relocation/lifts_basic.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/relocation/lifts_tdeq.ma
matita/matita/contribs/lambdadelta/static_2/relocation/lifts_toeq.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/relocation/lifts_tweq.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/relocation/sex.ma
matita/matita/contribs/lambdadelta/static_2/relocation/sex_length.ma
matita/matita/contribs/lambdadelta/static_2/relocation/sex_sex.ma
matita/matita/contribs/lambdadelta/static_2/relocation/sex_tc.ma
matita/matita/contribs/lambdadelta/static_2/s_computation/fqup.ma
matita/matita/contribs/lambdadelta/static_2/s_computation/fqup_drops.ma
matita/matita/contribs/lambdadelta/static_2/s_computation/fqup_weight.ma
matita/matita/contribs/lambdadelta/static_2/s_computation/fqus.ma
matita/matita/contribs/lambdadelta/static_2/s_computation/fqus_drops.ma
matita/matita/contribs/lambdadelta/static_2/s_computation/fqus_fqup.ma
matita/matita/contribs/lambdadelta/static_2/s_computation/fqus_weight.ma
matita/matita/contribs/lambdadelta/static_2/s_transition/fqu.ma
matita/matita/contribs/lambdadelta/static_2/s_transition/fqu_length.ma
matita/matita/contribs/lambdadelta/static_2/s_transition/fqu_tdeq.ma
matita/matita/contribs/lambdadelta/static_2/s_transition/fqu_weight.ma
matita/matita/contribs/lambdadelta/static_2/s_transition/fquq.ma
matita/matita/contribs/lambdadelta/static_2/s_transition/fquq_length.ma
matita/matita/contribs/lambdadelta/static_2/s_transition/fquq_weight.ma
matita/matita/contribs/lambdadelta/static_2/static/aaa.ma
matita/matita/contribs/lambdadelta/static_2/static/aaa_aaa.ma
matita/matita/contribs/lambdadelta/static_2/static/aaa_dec.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/static/aaa_drops.ma
matita/matita/contribs/lambdadelta/static_2/static/aaa_fdeq.ma
matita/matita/contribs/lambdadelta/static_2/static/aaa_fqus.ma
matita/matita/contribs/lambdadelta/static_2/static/aaa_rdeq.ma
matita/matita/contribs/lambdadelta/static_2/static/fdeq.ma
matita/matita/contribs/lambdadelta/static_2/static/fdeq_fdeq.ma
matita/matita/contribs/lambdadelta/static_2/static/fdeq_fqup.ma
matita/matita/contribs/lambdadelta/static_2/static/fdeq_fqus.ma
matita/matita/contribs/lambdadelta/static_2/static/fdeq_req.ma
matita/matita/contribs/lambdadelta/static_2/static/frees.ma
matita/matita/contribs/lambdadelta/static_2/static/frees_append.ma
matita/matita/contribs/lambdadelta/static_2/static/frees_drops.ma
matita/matita/contribs/lambdadelta/static_2/static/frees_fqup.ma
matita/matita/contribs/lambdadelta/static_2/static/frees_frees.ma
matita/matita/contribs/lambdadelta/static_2/static/fsle.ma
matita/matita/contribs/lambdadelta/static_2/static/fsle_drops.ma
matita/matita/contribs/lambdadelta/static_2/static/fsle_fqup.ma
matita/matita/contribs/lambdadelta/static_2/static/fsle_fsle.ma
matita/matita/contribs/lambdadelta/static_2/static/fsle_length.ma
matita/matita/contribs/lambdadelta/static_2/static/gcp.ma
matita/matita/contribs/lambdadelta/static_2/static/gcp_aaa.ma
matita/matita/contribs/lambdadelta/static_2/static/gcp_cr.ma
matita/matita/contribs/lambdadelta/static_2/static/lsuba.ma
matita/matita/contribs/lambdadelta/static_2/static/lsuba_aaa.ma
matita/matita/contribs/lambdadelta/static_2/static/lsuba_drops.ma
matita/matita/contribs/lambdadelta/static_2/static/lsubc.ma
matita/matita/contribs/lambdadelta/static_2/static/lsubc_drops.ma
matita/matita/contribs/lambdadelta/static_2/static/lsubf.ma
matita/matita/contribs/lambdadelta/static_2/static/lsubf_frees.ma
matita/matita/contribs/lambdadelta/static_2/static/lsubf_lsubf.ma
matita/matita/contribs/lambdadelta/static_2/static/lsubf_lsubr.ma
matita/matita/contribs/lambdadelta/static_2/static/lsubr.ma
matita/matita/contribs/lambdadelta/static_2/static/lsubr_drops.ma
matita/matita/contribs/lambdadelta/static_2/static/lsubr_lsubr.ma
matita/matita/contribs/lambdadelta/static_2/static/rdeq.ma
matita/matita/contribs/lambdadelta/static_2/static/rdeq_drops.ma
matita/matita/contribs/lambdadelta/static_2/static/rdeq_fqup.ma
matita/matita/contribs/lambdadelta/static_2/static/rdeq_fqus.ma
matita/matita/contribs/lambdadelta/static_2/static/rdeq_length.ma
matita/matita/contribs/lambdadelta/static_2/static/rdeq_rdeq.ma
matita/matita/contribs/lambdadelta/static_2/static/rdeq_req.ma
matita/matita/contribs/lambdadelta/static_2/static/req.ma
matita/matita/contribs/lambdadelta/static_2/static/req_drops.ma
matita/matita/contribs/lambdadelta/static_2/static/req_fsle.ma
matita/matita/contribs/lambdadelta/static_2/static/rex.ma
matita/matita/contribs/lambdadelta/static_2/static/rex_drops.ma
matita/matita/contribs/lambdadelta/static_2/static/rex_fqup.ma
matita/matita/contribs/lambdadelta/static_2/static/rex_fsle.ma
matita/matita/contribs/lambdadelta/static_2/static/rex_length.ma
matita/matita/contribs/lambdadelta/static_2/static/rex_lex.ma
matita/matita/contribs/lambdadelta/static_2/static/rex_rex.ma
matita/matita/contribs/lambdadelta/static_2/syntax/aarity.ma
matita/matita/contribs/lambdadelta/static_2/syntax/ac.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/syntax/acle.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/syntax/acle_acle.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/syntax/cl_restricted_weight.ma
matita/matita/contribs/lambdadelta/static_2/syntax/cl_weight.ma
matita/matita/contribs/lambdadelta/static_2/syntax/item_sd.ma [deleted file]
matita/matita/contribs/lambdadelta/static_2/syntax/item_sh.ma [deleted file]
matita/matita/contribs/lambdadelta/static_2/syntax/lveq.ma
matita/matita/contribs/lambdadelta/static_2/syntax/lveq_length.ma
matita/matita/contribs/lambdadelta/static_2/syntax/lveq_lveq.ma
matita/matita/contribs/lambdadelta/static_2/syntax/sd.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/syntax/sd_d.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/syntax/sd_lt.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/syntax/sh.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/syntax/sh_lt.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/syntax/sh_props.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/syntax/tdeq.ma
matita/matita/contribs/lambdadelta/static_2/syntax/tdeq_ext.ma
matita/matita/contribs/lambdadelta/static_2/syntax/tdeq_tdeq.ma
matita/matita/contribs/lambdadelta/static_2/syntax/term.ma
matita/matita/contribs/lambdadelta/static_2/syntax/term_simple.ma
matita/matita/contribs/lambdadelta/static_2/syntax/term_weight.ma
matita/matita/contribs/lambdadelta/static_2/syntax/theq.ma [deleted file]
matita/matita/contribs/lambdadelta/static_2/syntax/theq_simple.ma [deleted file]
matita/matita/contribs/lambdadelta/static_2/syntax/theq_simple_vector.ma [deleted file]
matita/matita/contribs/lambdadelta/static_2/syntax/theq_tdeq.ma [deleted file]
matita/matita/contribs/lambdadelta/static_2/syntax/theq_theq.ma [deleted file]
matita/matita/contribs/lambdadelta/static_2/syntax/toeq.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/syntax/toeq_simple.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/syntax/toeq_simple_vector.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/syntax/toeq_tdeq.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/syntax/toeq_toeq.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/syntax/tweq.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/syntax/tweq_simple.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/syntax/tweq_tdeq.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/syntax/tweq_tweq.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/static_2/web/static_2_src.tbl
matita/matita/dist/ChangeLog
matita/matita/lablGraphviz.ml
matita/matita/lib/basics/core_notation.ma
matita/matita/lib/basics/core_notation/apart_2.ma [new file with mode: 0644]
matita/matita/lib/basics/core_notation/napart_2.ma [new file with mode: 0644]
matita/matita/lib/basics/core_notation/subseteq_2.ma [new file with mode: 0644]
matita/matita/lib/basics/deqlist.ma [new file with mode: 0644]
matita/matita/lib/basics/finset.ma
matita/matita/lib/basics/relations.ma
matita/matita/lib/basics/sets.ma
matita/matita/lib/binding/db.ma [deleted file]
matita/matita/lib/binding/fp.ma [deleted file]
matita/matita/lib/binding/ln.ma [deleted file]
matita/matita/lib/binding/ln_concrete.ma [deleted file]
matita/matita/lib/binding/names.ma [deleted file]
matita/matita/lib/fail.txt
matita/matita/lib/pts_dummy/rc_eval.ma
matita/matita/lib/pts_dummy_new/rc_eval.ma
matita/matita/lib/reverse_complexity/almost.ma [new file with mode: 0644]
matita/matita/lib/reverse_complexity/basics.ma [new file with mode: 0644]
matita/matita/lib/reverse_complexity/bigops_compl.ma [new file with mode: 0644]
matita/matita/lib/reverse_complexity/complexity.ma [new file with mode: 0644]
matita/matita/lib/reverse_complexity/hierarchy.ma
matita/matita/lib/reverse_complexity/sigma_diseq.ma [new file with mode: 0644]
matita/matita/lib/reverse_complexity/speed_clean.ma
matita/matita/lib/reverse_complexity/speed_def.ma
matita/matita/lib/reverse_complexity/speed_new.ma
matita/matita/lib/reverse_complexity/speedup.ma [new file with mode: 0644]
matita/matita/lib/reverse_complexity/toolkit.ma
matita/matita/lib/turing/multi_to_mono/multi_to_mono.ma [deleted file]
matita/matita/matita.glade [deleted file]
matita/matita/matita.ml
matita/matita/matita.ui [new file with mode: 0644]
matita/matita/matitaEngine.ml
matita/matita/matitaExcPp.ml
matita/matita/matitaGtkMisc.ml
matita/matita/matitaGtkMisc.mli
matita/matita/matitaGui.ml
matita/matita/matitaGuiInit.ml [new file with mode: 0644]
matita/matita/matitaMathView.ml
matita/matita/matitaMisc.ml
matita/matita/matitaScript.ml
matita/matita/matitaScript.mli
matita/matita/matitaTypes.ml
matita/matita/predefined_virtuals.ml
matita/matita/virtuals.ml

index 59fdc3df18e482b1a2d32de44fc641e70f39801c..e7228e3ba6538d1b96b59a22207bd2b05f9b4968 100644 (file)
@@ -66,6 +66,7 @@ helm/www/lambdadelta/xslt/documentation_3.xsl
 helm/www/lambdadelta/xslt/sitemap.xsl
 helm/www/lambdadelta/xslt/versions.xsl
 helm/www/lambdadelta/xslt/core.xsl
+helm/www/lambdadelta/xslt/changes.xsl
 helm/www/lambdadelta/xslt/chc_45.xsl
 helm/www/lambdadelta/xslt/xhtbl.xsl
 
@@ -75,3 +76,5 @@ matita/matita/contribs/lambdadelta/token
 matita/matita/contribs/lambdadelta/2A
 matita/matita/contribs/lambdadelta/*/*_probe.txt
 matita/matita/contribs/lambdadelta/*/web/*_sum.tbl
+
+matita/matita/contribs/convergence/
diff --git a/README b/README
index 4aad3fc690e36bf1aabf2bf0426e09684fde9867..4d1a6c03b8c98bade77e7c35c33f9266de30c3d7 100644 (file)
--- a/README
+++ b/README
@@ -1,3 +1,3 @@
-matita : current version: 0.99.3
+matita : current version: 0.99.4
 matitaB: new     version: 0.5.8
 helm   : old     version: 0.5.8  with additional material
diff --git a/helm/www/lambdadelta/alt.sh b/helm/www/lambdadelta/alt.sh
new file mode 100644 (file)
index 0000000..80a326f
--- /dev/null
@@ -0,0 +1 @@
+sed s?lambdadelta.info?www.cs.unibo.it/~fguidi/lambdadelta?g html/$1.html > html/$1.alt.html
index 68e9561947941374d0bb14561daa189576822773..59c7c821a07f5d1c78cae290948ccde5072bdbaa 100644 (file)
@@ -1,23 +1,40 @@
 @charset "UTF-8";
 
-/* menus ********************************************************************/
+/* term selection ***********************************************************/
 
-td {
-  padding: inherit;
+.term:hover > .term:not(:hover) {
+  opacity: 0.35;
 }
 
+/* log table ****************************************************************/
+
+.log {
+  width: 100%;
+  border-collapse: collapse;
+}
+
+.log_cell {
+  border-color: initial;
+  border-style: solid none;
+  border-width: thin;
+  padding: 2px;
+}
+
+/* forms ********************************************************************/
+
 .text {
   display: inline-block;
   list-style: none;
   margin: initial;
   padding: initial;
-  white-space: nowrap;  
+  white-space: nowrap;
 }
 
 .menu {
   display: none;
   border-style: solid;
   border-width: thin;
+  border-collapse: collapse;
   position: absolute;
 }
 
@@ -25,14 +42,34 @@ td {
    display: inline-block;
 }
 
+.menu_cell {
+  padding: 2px;
+}
+
+.menu_empty {
+  padding: inherit;
+}
+
+.menu_sep {
+  padding: inherit;
+  border-top-style: solid;
+  border-top-width: thin;
+}
+
 /* buttons ******************************************************************/
 
+.type {
+  font: inherit;
+}
+
 .button {
-  color: inherit;
   background-color: inherit;
-  border-style: none; 
+  border-style: none;
+  color: inherit;
+  font: inherit;
   margin: initial;
   padding: initial;
+  text-align: inherit;
 }
 
 .button:hover {
@@ -83,13 +120,13 @@ a:active {
 /* font families ************************************************************/
 
 .monospace {
-  font-family:monospace;
+  font-family: monospace; "Courier New", Courier;
 }
 
 /* line heights *************************************************************/
 
 .l_150 {
-  line-height:150%;
+  line-height: 150%;
 }
 
 /* font sizes ***************************************************************/
@@ -100,21 +137,25 @@ a:active {
 
 /* foreground colors (equalized to gray 8F) *********************************/
 
+.f_white {
+  color:#FFFFFF;
+}
+
 .f_gray {
   color:#8F8F8F;
 }
 
 .f_wine {
-  color:#FF52A0;                                                                                       
-}                                                                                                      
+  color:#FF52A0;
+}
 
 .f_magenta {
-  color:#FF41FF;                                                                                       
-}                                                                                                      
+  color:#FF41FF;
+}
 
 .f_prune {
-  color:#C65DFF;                                                                                       
-}                                                                                                      
+  color:#C65DFF;
+}
 
 .f_blue {
   color:#8181FF;
@@ -187,7 +228,7 @@ a:active {
 }
 
 .b_cyan {
-  background-color:#6CFFFF;  
+  background-color:#6CFFFF;
 }
 
 .b_water {
@@ -214,8 +255,30 @@ a:active {
   background-color:#FFC0C0;
 }
 
+.b_black {
+  background-color:#000000;
+}
+
 /* background colors (equalized to gray EB) *********************************/
 
 .b_gray_EB {
   background-color:#EBEBEB;
 }
+
+.b_blue_EB {
+  background-color:#E8E8FF;
+}
+
+.b_orange_EB {
+  background-color:#FFEBB1;
+}
+
+.b_red_EB {
+  background-color:#FFE2E2;
+}
+
+/* background colors (equalized to gray 48) *********************************/
+
+.b_gray_48 {
+  background-color:#484848;
+}
diff --git a/helm/www/lambdadelta/images/bronze-03BB.png b/helm/www/lambdadelta/images/bronze-03BB.png
new file mode 100644 (file)
index 0000000..3cf5900
Binary files /dev/null and b/helm/www/lambdadelta/images/bronze-03BB.png differ
diff --git a/helm/www/lambdadelta/web/home/changes.ldw.xml b/helm/www/lambdadelta/web/home/changes.ldw.xml
new file mode 100644 (file)
index 0000000..4287ac5
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<page xmlns="http://lambdadelta.info/"
+      description = "\lambda\delta home page"
+      title = "\lambda\delta home page"
+      logo = "crux"
+      head = "The Formal Systems of the λδ (\lambda\delta) Family"
+>
+   <sitemap name="sitemap"/>
+
+   <section15 name="changes">Changes</section15>
+   <body>
+   </body>
+   <table name="changes"/>
+
+   <footer/>
+</page>
diff --git a/helm/www/lambdadelta/web/home/changes.tbl b/helm/www/lambdadelta/web/home/changes.tbl
new file mode 100644 (file)
index 0000000..d25be28
--- /dev/null
@@ -0,0 +1,118 @@
+name "changes"
+
+table {
+  class "gray"
+  [ "version" [ "aspect" [ "" "changes" ]]
+  ]
+
+  class "orange"
+  [ { "λδ-2B" + "(unreleased)" * }
+    {
+     [ [{ "equivalences" * }]
+       { "+" "+" "+" "-" }
+       { "equivalence for full rt-reduction (terms)"
+         "equivalence for whd rt-reduction (terms)"
+         "equivalence for extended rt-reduction (terms, referred lenvs, closures)"
+         "syntactic equivalence (closures) removed"
+       }
+     ]
+     [ [{ "weights" * }]
+       { "+" }
+       { "switch in primitive order relations for closures to enable the exclusion binder"
+       }
+     ]
+     [ [{ "relocation" * }]
+       { "" }
+       { ""
+       }
+     ]
+     [ [{ "syntax" * }]
+       { "+" }
+       { "exclusion binder for lenvs"
+       }
+     ]
+     [ [{ "ground" * }]
+       { "+" "*" "+" "-" }
+       { "rt-transition counters"
+         "generic reference transforming maps as streams of non-negative integers" 
+         "extensional equality, labelled transitive closures and streams"
+         "non-negative integers with infinity removed"
+       }
+     ]
+    }
+  ]
+
+  class "orange"
+  [ { "λδ-2A" + "(October 2014)" * }
+    {
+     [ [{ "equivalences" * }]
+       { "+" }
+       { "syntactic equivalence (selected lenvs, referred lenvs, closures)"
+       }
+     ]
+     [ [{ "weights" * }]
+       { "*" "-" }
+       { "primitive order relations for closures"
+         "complex weight (terms) removed"
+       }
+     ]
+     [ [{ "relocation" * }]
+       { "-" }
+       { "level update functions removed"
+       }
+     ]
+     [ [{ "syntax" * }]
+       { "+" "+" "+" "-" "-" }
+       { "polarized binders for terms"
+         "non-negative integer global references for terms"
+         "syntactic support for genvs with typed abstraction, abbreviation"
+         "numbered sorts, application, type annotation removed from lenvs"
+         "exclusion binder removed from terms and lenvs"
+       }
+     ]
+     [ [{ "ground" * }]
+       { "+" "+" }
+       { "lists and non-negative integers with infinity"
+         "library extension for transitive closures and booleans"
+       }
+     ]
+    }
+  ]
+
+  class "red"
+  [ { "λδ-1A" + "(November 2006)" * }
+    {
+     [ [{ "equivalences" * }]
+       { "" }
+       { "equivalence for outer reduction (terms)"
+       }
+     ]
+     [ [{ "weights" * }]
+       { "" "" "" }
+       { "order relations (terms, lenvs, closures) based on weights" 
+         "simple weights (terms, lenvs, closures)"
+         "complex weight (terms)"
+       }
+     ]
+     [ [{ "relocation" * }]
+       { "" }
+       { "level update functions"
+       }
+     ]
+     [ [{ "syntax" * }]
+       { "" "" }
+       { "lenvs with non-negative integer sorts, application, typed abstraction, abbreviation, exclusion, type annotation"
+         "terms with non-negative integer sorts and local references, application, typed abstraction, abbreviation, exclusion, type annotation" }
+     ]
+     [ [{ "ground" * }]
+       { "" "" }
+       { "finite reference transforming maps as compositions of basic ones"
+         "library extension for logic and non-negative integers"
+       }
+     ]
+    }
+  ]
+
+}
+
+class "center" { 2 }
index 8e6135836d861a64fffbbf64e845257b950916ab..e773b460be5019d60319b3ea60b2616c14be0c21 100644 (file)
@@ -30,6 +30,9 @@
       to view this site correctly, please select a font
       with <link to="http://www.unicode.org/">Unicode</link> support.
    </body>
+   <body>
+      <ucs-bronze char="03BB"/>
+   </body>
 
 <!-- ===================================================================== -->
 
index 3fbc83b4515779210127bb0179b07ad20aca34ac..82ce7d78149c5d24fd4442b892e6128bdf735911 100644 (file)
    </xsl:choose>
 </xsl:template>
 
+<xsl:template match="ld:ucs-bronze">
+   <img
+      alt="[Official bronze sponsor of Unicode Consortium]"
+      title="Official bronze sponsor of Unicode Consortium"
+      src="{$baseurl}images/bronze-{@char}.png"
+   />
+</xsl:template>
+
 <xsl:template match="ld:footer">
    <xsl:call-template name="rule"/>
    <div class="spacer"><br/></div>   
diff --git a/matita/.merlin b/matita/.merlin
new file mode 100644 (file)
index 0000000..92f60a6
--- /dev/null
@@ -0,0 +1,9 @@
+S components/*
+S matita
+
+B components/*
+B matita
+
+PKG lablgtk3 helm-content helm-ng_disambiguation helm-content_pres helm-ng_extraction helm-disambiguation helm-ng_kernel helm-extlib helm-ng_library helm-getter helm-ng_paramodulation helm-grafite helm-ng_refiner helm-grafite_engine helm-ng_tactics helm-grafite_parser helm-registry helm-library helm-syntax_extensions helm-logger helm-thread helm-ng_cic_content helm-xml 
+
+FLG -rectypes
index 35ff6ad596590fb6bb26a432cabf8080fa3dc5e8..208091758bd368c9e6e49fe1fe09af79f3bfeb8c 100644 (file)
@@ -93,8 +93,8 @@ dist_pre:
 dist_export: dist/configure
        rm -rf $(DISTDIR)
        mkdir $(DISTDIR)
-       svn export components $(DISTDIR)/components
-       svn export matita $(DISTDIR)/matita
+       git archive matita-lablgtk3 components | tar -x -C $(DISTDIR)
+       git archive matita-lablgtk3 matita | tar -x -C $(DISTDIR)
        (cd $(DISTDIR) && find . -name .depend -exec rm \{\} \;)
        (cd $(DISTDIR) && find . -name .depend.opt -exec rm \{\} \;)
        (cd $(DISTDIR) && rm -rf $(CLEAN_ON_DIST))
index f9540fa62e0bb230e1d8bbd0b43eea407aa85e08..0e361298efce8ce8fa94a11eec55aefe30cc9ae8 100644 (file)
@@ -1,4 +1,4 @@
-requires="helm-content helm-syntax_extensions camlp5.gramlib ulex08 helm-grafite"
+requires="helm-content helm-syntax_extensions camlp5.gramlib ulex-camlp5 helm-grafite"
 version="0.0.1"
 archive(byte)="content_pres.cma"
 archive(native)="content_pres.cmxa"
index 91bfdab4c0c5c3c396f523505daa5b1eaa4f0f5c..c415c72b00fba8fe64ba4a4abaee39f593217d23 100644 (file)
@@ -1,4 +1,4 @@
-requires="helm-grafite ulex08 helm-ng_disambiguation helm-ng_library helm-content_pres"
+requires="helm-grafite ulex-camlp5 helm-ng_disambiguation helm-ng_library helm-content_pres"
 version="0.0.1"
 archive(byte)="grafite_parser.cma"
 archive(native)="grafite_parser.cmxa"
index 7a4727c769b0b1f4ae0dc0ebdd53e21f06a25030..74a54a821a07a686077a04caa180e20610ab5de4 100644 (file)
@@ -20,7 +20,7 @@ endif
 PREPROCOPTIONS = -pp camlp5o
 SYNTAXOPTIONS = -syntax camlp5o
 PREREQ =
-OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -thread -rectypes $(ANNOTOPTION)
+OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -thread -rectypes $(ANNOTOPTION) -w @A-52-4-34-37-45-9-44-48-6-32-20-58-7-57-3 # -57-3 for ocaml 4.0.5
 OCAMLDEBUGOPTIONS = -g
 #OCAML_PROF=p -p a
 OCAMLARCHIVEOPTIONS =
index 054f90f4a64bac89921c71c81ba7c4bb7c3bc43b..d21af12a3fd635320655f2c6a7e1bf9d832ef161 100644 (file)
@@ -1,8 +1,8 @@
-module StringSet = Set.Make (String) 
+module StringSet = Set.Make (String)
 
 type file = {
-   ddeps: string list;        (* direct dependences *)
-   rdeps: StringSet.t option  (* recursive dependences *)
+  ddeps: string list;        (* direct dependences *)
+  rdeps: StringSet.t option  (* recursive dependences *)
 }
 
 let graph = Hashtbl.create 503
@@ -10,111 +10,124 @@ let graph = Hashtbl.create 503
 let debug = ref 0
 
 let rec purge dname vdeps = match vdeps with
-   | []       -> vdeps
-   | hd :: tl -> if hd = dname then tl else hd :: purge dname tl 
+  | []       -> vdeps
+  | hd :: tl -> if hd = dname then tl else hd :: purge dname tl
 
 let add fname =
-   if fname = "" then () else
-   if Hashtbl.mem graph fname then () else
-   Hashtbl.add graph fname {ddeps = []; rdeps = None}
+  if fname = "" then () else
+  if Hashtbl.mem graph fname then () else
+  Hashtbl.add graph fname {ddeps = []; rdeps = None}
 
 let add_ddep fname dname =
-   if dname = "" then () else
-   let file = Hashtbl.find graph fname in
-   Hashtbl.replace graph fname {file with ddeps = dname :: file.ddeps} 
+  if dname = "" then () else
+  let file = Hashtbl.find graph fname in
+  Hashtbl.replace graph fname {file with ddeps = dname :: file.ddeps}
 
 let init fname dname =
-   if !debug land 1 > 0 then Printf.eprintf "init: %s: %s.\n" fname dname;
-   add fname; add dname; add_ddep fname dname 
+  if !debug land 1 > 0 then Printf.eprintf "init: %s: %s.\n" fname dname;
+  add fname; add dname; add_ddep fname dname
 
 (* vdeps: visited dependences for loop detection *)
 let rec compute_from_file vdeps fname file = match file.rdeps with
-   | Some rdeps -> rdeps
-   | None       ->   
-      if !debug land 2 > 0 then Printf.eprintf "  compute file: %s\n" fname; 
-      let vdeps = fname :: vdeps in
-      List.iter (redundant vdeps fname file.ddeps) file.ddeps;
-      let rdeps = compute_from_ddeps vdeps file.ddeps in
-      Hashtbl.replace graph fname {file with rdeps = Some rdeps};      
-      rdeps
+  | Some rdeps -> rdeps
+  | None       ->
+    if !debug land 2 > 0 then Printf.eprintf "  compute file: %s\n" fname;
+    let vdeps = fname :: vdeps in
+    List.iter (redundant vdeps fname file.ddeps) file.ddeps;
+    let rdeps = compute_from_ddeps vdeps file.ddeps in
+    Hashtbl.replace graph fname {file with rdeps = Some rdeps};
+    rdeps
 
 and compute_from_dname vdeps rdeps dname =
-   if List.mem dname vdeps then begin
-      let loop = purge dname (List.rev vdeps) in
-      Printf.printf "circular: %s\n" (String.concat " " loop);
-      StringSet.add dname rdeps
-   end else
-     let file = Hashtbl.find graph dname in
-     StringSet.add dname (StringSet.union (compute_from_file vdeps dname file) rdeps)
+  if List.mem dname vdeps then begin
+    let loop = purge dname (List.rev vdeps) in
+    Printf.printf "circular: %s\n" (String.concat " " loop);
+    StringSet.add dname rdeps
+  end else
+    let file = Hashtbl.find graph dname in
+    StringSet.add dname (StringSet.union (compute_from_file vdeps dname file) rdeps)
 
-and compute_from_ddeps vdeps ddeps = 
-   List.fold_left (compute_from_dname vdeps) StringSet.empty ddeps
+and compute_from_ddeps vdeps ddeps =
+  List.fold_left (compute_from_dname vdeps) StringSet.empty ddeps
 
 and redundant vdeps fname ddeps dname =
-   let rdeps = compute_from_ddeps vdeps (purge dname ddeps) in
-   if StringSet.mem dname rdeps then
-      Printf.printf "%s: redundant %s\n" fname dname
+  let rdeps = compute_from_ddeps vdeps (purge dname ddeps) in
+  if StringSet.mem dname rdeps then
+    Printf.printf "%s: redundant %s\n" fname dname
 
-let check () = 
-   let iter fname file = ignore (compute_from_file [] fname file) in
-   Hashtbl.iter iter graph 
+let check () =
+  let iter fname file = ignore (compute_from_file [] fname file) in
+  Hashtbl.iter iter graph
 
 let get_unions () =
-   let map1 ddeps dname = StringSet.add dname ddeps in 
-   let map2 fname file (fnames, ddeps) =
-      StringSet.add fname fnames, List.fold_left map1 ddeps file.ddeps
-   in
-   Hashtbl.fold map2 graph (StringSet.empty, StringSet.empty)
+  let map1 ddeps dname = StringSet.add dname ddeps in
+  let map2 fname file (fnames, ddeps) =
+    StringSet.add fname fnames, List.fold_left map1 ddeps file.ddeps
+  in
+  Hashtbl.fold map2 graph (StringSet.empty, StringSet.empty)
 
 let get_leafs () =
-   let map fname file fnames =
-      if file.ddeps = [] then StringSet.add fname fnames else fnames
-   in
-   Hashtbl.fold map graph StringSet.empty
+  let map fname file fnames =
+    if file.ddeps = [] then StringSet.add fname fnames else fnames
+  in
+  Hashtbl.fold map graph StringSet.empty
 
 let top () =
-   let iter fname = Printf.printf "top: %s\n" fname in
-   let fnames, ddeps = get_unions () in
-   StringSet.iter iter (StringSet.diff fnames ddeps) 
+  let iter fname = Printf.printf "top: %s\n" fname in
+  let fnames, ddeps = get_unions () in
+  StringSet.iter iter (StringSet.diff fnames ddeps)
 
 let leaf () =
-   let iter fname = Printf.printf "leaf: %s\n" fname in
-   let fnames = get_leafs () in
-   StringSet.iter iter fnames
-
-let rec read ich = 
-   let line = input_line ich in
-   begin try Scanf.sscanf line "%s@:include \"%s@\"." init 
-   with Scanf.Scan_failure _ ->
-      begin try Scanf.sscanf line "./%s@:include \"%s@\"." init
-      with Scanf.Scan_failure _ ->   
-         begin try Scanf.sscanf line "%s@:(*%s@*)" (fun _ _ -> ())
-         with Scanf.Scan_failure _ ->
-           Printf.eprintf "unknown line: %s.\n" line
-         end
-      end  
-   end;
-   read ich
-   
+  let iter fname = Printf.printf "leaf: %s\n" fname in
+  let fnames = get_leafs () in
+  StringSet.iter iter fnames
+
+let back fname =
+  Printf.printf "backward: %s\n" fname;
+  try match (Hashtbl.find graph fname).rdeps with
+    | None       -> ()
+    | Some rdeps ->
+      let iter fname = Printf.printf "%s\n" fname in
+      StringSet.iter iter rdeps
+  with Not_found -> ()
+
+let rec read ich =
+  let line = input_line ich in
+  begin try Scanf.sscanf line "%s@:include \"%s@\"." init
+  with Scanf.Scan_failure _ ->
+    begin try Scanf.sscanf line "./%s@:include \"%s@\"." init
+    with Scanf.Scan_failure _ ->
+      begin try Scanf.sscanf line "%s@:(*%s@*)" (fun _ _ -> ())
+      with Scanf.Scan_failure _ ->
+          Printf.eprintf "unknown line: %s.\n" line
+      end
+    end
+  end;
+  read ich
+
 let _ =
-   let show_check = ref false in
-   let show_top = ref false in
-   let show_leaf = ref false in   
-   let process_file name = () in
-   let show () =
-      if !show_check then check ();
-      if !show_top then top ();
-      if !show_leaf then leaf ()   
-   in
-   let help   = "matitadep [-clt | -d <int> ] < <file>" in
-   let help_c = " Print the redundant and looping arcs of the dependences graph" in
-   let help_d = "<flags>  Set these debug options" in
-   let help_l = " Print the leaf nodes of the dependences graph" in
-   let help_t = " Print the top nodes of the dependences graph" in
-   Arg.parse [
-      "-c", Arg.Set show_check, help_c;
-      "-d", Arg.Int (fun x -> debug := x), help_d;
-      "-l", Arg.Set show_leaf, help_l;
-      "-t", Arg.Set show_top, help_t;
-   ] process_file help;
-   try read stdin with End_of_file -> show ()
+  let show_check = ref false in
+  let show_top = ref false in
+  let show_leaf = ref false in
+  let show_back = ref "" in
+  let process_file name = () in
+  let show () =
+    if !show_check then check ();
+    if !show_top then top ();
+    if !show_leaf then leaf ();
+    if !show_back <> "" then back !show_back
+  in
+  let help   = "matitadep [-clt | -d <int> | -b <string> ] < <file>" in
+  let help_b = "<string> Print the backward dependences of this node" in
+  let help_c = " Print the redundant and looping arcs of the dependences graph" in
+  let help_d = "<flags>  Set these debug options" in
+  let help_l = " Print the leaf nodes of the dependences graph" in
+  let help_t = " Print the top nodes of the dependences graph" in
+  Arg.parse [
+    "-b", Arg.String ((:=) show_back), help_b;
+    "-c", Arg.Set show_check, help_c;
+    "-d", Arg.Int ((:=) debug), help_d;
+    "-l", Arg.Set show_leaf, help_l;
+    "-t", Arg.Set show_top, help_t;
+  ] process_file help;
+  try read stdin with End_of_file -> show ()
index dd5a763f7c302c88cf8d857824aa660d1a05725f..1933a2003b8764d7e320cada82fc72246771b25a 100644 (file)
@@ -1,6 +1,6 @@
 EXEC = xoa
 VERSION=0.2.0
 
-REQUIRES = helm-grafite
+REQUIRES = helm-registry
 
 include ../Makefile.common
index 219b906605327240452fba5c3638e34e2dc482b1..c5604f1e657243088e9682944122136d91618c91 100644 (file)
@@ -19,67 +19,76 @@ let incremental = ref true
 let separate = ref false
 
 let clear () =
-   incremental := true;
-   separate := false;
-   R.clear ()
+  incremental := true;
+  separate := false;
+  R.clear ()
 
 let unm_ex s =
-   Scanf.sscanf s "%u %u" A.mk_exists
+  Scanf.sscanf s "%u %u" A.mk_exists
 
 let unm_or s =
-   Scanf.sscanf s "%u" A.mk_or
+  Scanf.sscanf s "%u" A.mk_or
 
 let unm_and s =
-   Scanf.sscanf s "%u" A.mk_and
+  Scanf.sscanf s "%u" A.mk_and
 
 let process_centralized conf =
-   let preamble = L.get_preamble conf in
-   if R.has "xoa.objects" && R.has "xoa.notations" then begin
-      let ooch = L.open_out preamble (R.get_string "xoa.objects") in
-      let noch = L.open_out preamble (R.get_string "xoa.notations") in
-      List.iter (L.out_include ooch) (R.get_list R.string "xoa.include");
-      L.out_include ooch (R.get_string "xoa.notations" ^ ".ma");
-      List.iter (E.generate ooch noch) (R.get_list unm_ex "xoa.ex");
-      List.iter (E.generate ooch noch) (R.get_list unm_or "xoa.or");
-      List.iter (E.generate ooch noch) (R.get_list unm_and "xoa.and");
-      close_out noch; close_out ooch
-   end
+  let preamble = L.get_preamble conf in
+  if R.has "xoa.objects" && R.has "xoa.notations" then begin
+    let ooch = L.open_out preamble (R.get_string "xoa.objects") in
+    let noch = L.open_out preamble (R.get_string "xoa.notations") in
+    List.iter (L.out_include ooch) (R.get_list R.string "xoa.include");
+    L.out_include ooch (R.get_string "xoa.notations" ^ ".ma");
+    List.iter (E.generate ooch noch) (R.get_list unm_ex "xoa.ex");
+    List.iter (E.generate ooch noch) (R.get_list unm_or "xoa.or");
+    List.iter (E.generate ooch noch) (R.get_list unm_and "xoa.and");
+    close_out noch; close_out ooch
+  end
 
-let generate (p, o, n) = function
-   | A.Exists (c, v) as d ->
+let generate (p, o, n) d =
+  let oname, nname = match d with
+    | A.Exists (c, v) ->
       let oname = Printf.sprintf "%s/ex_%u_%u" o c v in
       let nname = Printf.sprintf "%s/ex_%u_%u" n c v in
-      if !incremental && L.exists_out oname && L.exists_out nname then () else
-      begin
-         let ooch = L.open_out p oname in
-         let noch = L.open_out p nname in
-         List.iter (L.out_include ooch) (R.get_list R.string "xoa.include");
-         L.out_include ooch (nname ^ ".ma");
-         E.generate ooch noch d;
-         close_out noch; close_out ooch
-      end
-   | A.Or c          -> ()
-   | A.And c         -> ()
+      oname, nname
+    | A.Or c          ->
+      let oname = Printf.sprintf "%s/or_%u" o c in
+      let nname = Printf.sprintf "%s/or_%u" n c in
+      oname, nname
+    | A.And c         ->
+      let oname = Printf.sprintf "%s/and_%u" o c in
+      let nname = Printf.sprintf "%s/and_%u" n c in
+      oname, nname
+  in
+  if !incremental && L.exists_out oname && L.exists_out nname then () else
+  begin
+    let ooch = L.open_out p oname in
+    let noch = L.open_out p nname in
+    List.iter (L.out_include ooch) (R.get_list R.string "xoa.include");
+    L.out_include ooch (nname ^ ".ma");
+    E.generate ooch noch d;
+    close_out noch; close_out ooch
+  end
 
 let process_distributed conf =
-   let preamble = L.get_preamble conf in
-   if R.has "xoa.objects" && R.has "xoa.notations" then begin
-      let st = preamble, R.get_string "xoa.objects", R.get_string "xoa.notations" in
-      List.iter (generate st) (R.get_list unm_ex "xoa.ex");
-      List.iter (generate st) (R.get_list unm_or "xoa.or");
-      List.iter (generate st) (R.get_list unm_and "xoa.and");
-   end
+  let preamble = L.get_preamble conf in
+  if R.has "xoa.objects" && R.has "xoa.notations" then begin
+    let st = preamble, R.get_string "xoa.objects", R.get_string "xoa.notations" in
+    List.iter (generate st) (R.get_list unm_ex "xoa.ex");
+    List.iter (generate st) (R.get_list unm_or "xoa.or");
+    List.iter (generate st) (R.get_list unm_and "xoa.and");
+  end
 
 let process conf =
-   if !separate then process_distributed conf else process_centralized conf
+  if !separate then process_distributed conf else process_centralized conf
 
 let _ =
-   let help = "Usage: xoa [ -Xs | <configuration file> ]*\n" in
-   let help_X  = " Clear configuration" in
-   let help_s  = " Generate separate objects" in
-   let help_u  = " Update existing separate files" in
-   Arg.parse [
-      "-X", Arg.Unit clear, help_X;
-      "-s", Arg.Set separate, help_s;
-      "-u", Arg.Clear incremental, help_u;
-   ] process help
+  let help = "Usage: xoa [ -Xs | <configuration file> ]*\n" in
+  let help_X  = " Clear configuration" in
+  let help_s  = " Generate separate objects" in
+  let help_u  = " Update existing separate files" in
+  Arg.parse [
+    "-X", Arg.Unit clear, help_X;
+    "-s", Arg.Set separate, help_s;
+    "-u", Arg.Clear incremental, help_u;
+  ] process help
index 369dbbdc4e978ce0baf7408ca0779e8253557ac8..6b775581939df358ed9784669c704eee2c353d24 100644 (file)
@@ -1,14 +1,36 @@
+content.cmo : \
+    content.cmi
+content.cmx : \
+    content.cmi
 content.cmi :
-notationUtil.cmi : notationPt.cmo
-notationEnv.cmi : notationPt.cmo
-notationPp.cmi : notationPt.cmo notationEnv.cmi
+notationEnv.cmo : \
+    notationUtil.cmi \
+    notationPt.cmo \
+    notationEnv.cmi
+notationEnv.cmx : \
+    notationUtil.cmx \
+    notationPt.cmx \
+    notationEnv.cmi
+notationEnv.cmi : \
+    notationPt.cmo
+notationPp.cmo : \
+    notationPt.cmo \
+    notationEnv.cmi \
+    notationPp.cmi
+notationPp.cmx : \
+    notationPt.cmx \
+    notationEnv.cmx \
+    notationPp.cmi
+notationPp.cmi : \
+    notationPt.cmo \
+    notationEnv.cmi
 notationPt.cmo :
 notationPt.cmx :
-content.cmo : content.cmi
-content.cmx : content.cmi
-notationUtil.cmo : notationPt.cmo notationUtil.cmi
-notationUtil.cmx : notationPt.cmx notationUtil.cmi
-notationEnv.cmo : notationUtil.cmi notationPt.cmo notationEnv.cmi
-notationEnv.cmx : notationUtil.cmx notationPt.cmx notationEnv.cmi
-notationPp.cmo : notationPt.cmo notationEnv.cmi notationPp.cmi
-notationPp.cmx : notationPt.cmx notationEnv.cmx notationPp.cmi
+notationUtil.cmo : \
+    notationPt.cmo \
+    notationUtil.cmi
+notationUtil.cmx : \
+    notationPt.cmx \
+    notationUtil.cmi
+notationUtil.cmi : \
+    notationPt.cmo
index 7bb00ba9b9ba6f280bb4ebbbe066b02343b3a08b..4ef84ec5d41f3dbd11d885ababb67d5a8a85fd42 100644 (file)
@@ -1,14 +1,22 @@
+content.cmx : \
+    content.cmi
 content.cmi :
-notationUtil.cmi : notationPt.cmx
-notationEnv.cmi : notationPt.cmx
-notationPp.cmi : notationPt.cmx notationEnv.cmi
-notationPt.cmo :
+notationEnv.cmx : \
+    notationUtil.cmx \
+    notationPt.cmx \
+    notationEnv.cmi
+notationEnv.cmi : \
+    notationPt.cmx
+notationPp.cmx : \
+    notationPt.cmx \
+    notationEnv.cmx \
+    notationPp.cmi
+notationPp.cmi : \
+    notationPt.cmx \
+    notationEnv.cmi
 notationPt.cmx :
-content.cmo : content.cmi
-content.cmx : content.cmi
-notationUtil.cmo : notationPt.cmx notationUtil.cmi
-notationUtil.cmx : notationPt.cmx notationUtil.cmi
-notationEnv.cmo : notationUtil.cmi notationPt.cmx notationEnv.cmi
-notationEnv.cmx : notationUtil.cmx notationPt.cmx notationEnv.cmi
-notationPp.cmo : notationPt.cmx notationEnv.cmi notationPp.cmi
-notationPp.cmx : notationPt.cmx notationEnv.cmx notationPp.cmi
+notationUtil.cmx : \
+    notationPt.cmx \
+    notationUtil.cmi
+notationUtil.cmi : \
+    notationPt.cmx
index be9171a8d9318a714e16fd5ceffbc2a069099278..164fec0e87e52c90b43cd9ea6291f8e686c0033a 100644 (file)
@@ -93,7 +93,7 @@ let lookup_list env name =
   | ty, _ -> raise (Type_mismatch (name, ty))
 
 let opt_binding_some (n, (ty, v)) = (n, (OptType ty, OptValue (Some v)))
-let opt_binding_none (n, (ty, v)) = (n, (OptType ty, OptValue None))
+let opt_binding_none (n, (ty, _v)) = (n, (OptType ty, OptValue None))
 let opt_binding_of_name (n, ty) = (n, (OptType ty, OptValue None))
 let list_binding_of_name (n, ty) = (n, (ListType ty, ListValue []))
 let opt_declaration (n, ty) = (n, OptType ty)
index 369a0fa281ac05e610f56d130b8cd477b4755724..038d75d9c7afd1862bfc0909ee002fd019d158b6 100644 (file)
@@ -110,7 +110,7 @@ let rec pp_term (status : #NCic.status) ?(pp_parens = true) t =
          (match typ with None -> "" | Some t -> sprintf " return %s" (pp_term t))          
           (pp_patterns status patterns)
     | Ast.Cast (t1, t2) -> sprintf "(%s: %s)" (pp_term ~pp_parens:true t1) (pp_term ~pp_parens:true t2)
-    | Ast.LetIn ((var,t2), t1, t3) ->
+    | Ast.LetIn ((var,_t2), t1, t3) ->
 (*       let t2 = match t2 with None -> Ast.Implicit | Some t -> t in *)
         sprintf "let %s \\def %s in %s" (pp_term var)
 (*           (pp_term ~pp_parens:true t2) *)
@@ -251,8 +251,8 @@ and pp_variable = function
   | Ast.NumVar s -> "number " ^ s
   | Ast.IdentVar s -> "ident " ^ s
   | Ast.TermVar (s,Ast.Self _) -> s
-  | Ast.TermVar (s,Ast.Level l) -> "term " ^string_of_int l 
-  | Ast.Ascription (t, n) -> assert false
+  | Ast.TermVar (_s,Ast.Level l) -> "term " ^string_of_int l 
+  | Ast.Ascription (_t, _n) -> assert false
   | Ast.FreshVar n -> "fresh " ^ n
 
 let _pp_term = ref (pp_term ~pp_parens:false)
index 82096f80b7e89f3d3f1bfea46e2ddec7034f5788..02530eff5c34cf0cb45c9518e6e0ef912ef96a89 100644 (file)
@@ -111,7 +111,7 @@ let visit_variable k = function
   | Ast.Ascription (t, s) -> Ast.Ascription (k t, s)
 
 let variables_of_term t =
-  let rec vars = ref [] in
+  let vars = ref [] in
   let add_variable v =
     if List.mem v !vars then ()
     else vars := v :: !vars
@@ -145,7 +145,7 @@ let names_of_term t =
     List.map aux (variables_of_term t)
 
 let keywords_of_term t =
-  let rec keywords = ref [] in
+  let keywords = ref [] in
   let add_keyword k = keywords := k :: !keywords in
   let rec aux = function
     | Ast.AttributedTerm (_, t) -> aux t
@@ -166,7 +166,7 @@ let rec strip_attributes t =
     | Ast.AttributedTerm (_, term) -> strip_attributes term
     | Ast.Magic m -> Ast.Magic (visit_magic strip_attributes m)
     | Ast.Variable _ as t -> t
-    | t -> assert false
+    | _t -> assert false
   in
   visit_ast ~special_k strip_attributes t
 
@@ -177,7 +177,7 @@ let rec get_idrefs =
   | _ -> []
 
 let meta_names_of_term term =
-  let rec names = ref [] in
+  let names = ref [] in
   let add_name n =
     if List.mem n !names then ()
     else names := n :: !names
@@ -186,7 +186,7 @@ let meta_names_of_term term =
     | Ast.AttributedTerm (_, term) -> aux term
     | Ast.Appl terms -> List.iter aux terms
     | Ast.Binder (_, _, body) -> aux body
-    | Ast.Case (term, indty, outty_opt, patterns) ->
+    | Ast.Case (term, _indty, outty_opt, patterns) ->
         aux term ;
         aux_opt outty_opt ;
         List.iter aux_branch patterns
@@ -218,7 +218,7 @@ let meta_names_of_term term =
     aux term
   and aux_pattern =
    function
-      Ast.Pattern (head, _, vars) -> List.iter aux_capture_var vars
+      Ast.Pattern (_head, _, vars) -> List.iter aux_capture_var vars
     | Ast.Wildcard -> ()
   and aux_substs substs = List.iter (fun (_, term) -> aux term) substs
   and aux_meta_substs meta_substs = List.iter aux_opt meta_substs
@@ -350,8 +350,8 @@ let rec freshen_term ?(index = ref 0) term =
     | _ -> assert false
   in
   match term with
-  | Ast.Symbol (s, instance) -> Ast.Symbol (s, fresh_instance ())
-  | Ast.Num (s, instance) -> Ast.Num (s, fresh_instance ())
+  | Ast.Symbol (s, _instance) -> Ast.Symbol (s, fresh_instance ())
+  | Ast.Num (s, _instance) -> Ast.Num (s, fresh_instance ())
   | t -> visit_ast ~special_k freshen_term t
 
 let freshen_obj obj =
index 4deb6e591a8c9b1118318f7a7264800d533fbece..0f1c00964723d1a56e4147cdb5ae158718b07d0c 100644 (file)
@@ -1,38 +1,92 @@
-renderingAttrs.cmi :
-cicNotationLexer.cmi :
-cicNotationParser.cmi :
-mpresentation.cmi :
+box.cmo : \
+    renderingAttrs.cmi \
+    box.cmi
+box.cmx : \
+    renderingAttrs.cmx \
+    box.cmi
 box.cmi :
-content2presMatcher.cmi :
-termContentPres.cmi : cicNotationParser.cmi
-boxPp.cmi : mpresentation.cmi cicNotationPres.cmi box.cmi
-cicNotationPres.cmi : mpresentation.cmi box.cmi
-content2pres.cmi : termContentPres.cmi cicNotationPres.cmi
-renderingAttrs.cmo : renderingAttrs.cmi
-renderingAttrs.cmx : renderingAttrs.cmi
-cicNotationLexer.cmo : cicNotationLexer.cmi
-cicNotationLexer.cmx : cicNotationLexer.cmi
-cicNotationParser.cmo : cicNotationLexer.cmi cicNotationParser.cmi
-cicNotationParser.cmx : cicNotationLexer.cmx cicNotationParser.cmi
-mpresentation.cmo : mpresentation.cmi
-mpresentation.cmx : mpresentation.cmi
-box.cmo : renderingAttrs.cmi box.cmi
-box.cmx : renderingAttrs.cmx box.cmi
-content2presMatcher.cmo : content2presMatcher.cmi
-content2presMatcher.cmx : content2presMatcher.cmi
-termContentPres.cmo : renderingAttrs.cmi content2presMatcher.cmi \
-    cicNotationParser.cmi termContentPres.cmi
-termContentPres.cmx : renderingAttrs.cmx content2presMatcher.cmx \
-    cicNotationParser.cmx termContentPres.cmi
-boxPp.cmo : renderingAttrs.cmi mpresentation.cmi cicNotationPres.cmi box.cmi \
+boxPp.cmo : \
+    renderingAttrs.cmi \
+    mpresentation.cmi \
+    cicNotationPres.cmi \
+    box.cmi \
     boxPp.cmi
-boxPp.cmx : renderingAttrs.cmx mpresentation.cmx cicNotationPres.cmx box.cmx \
+boxPp.cmx : \
+    renderingAttrs.cmx \
+    mpresentation.cmx \
+    cicNotationPres.cmx \
+    box.cmx \
     boxPp.cmi
-cicNotationPres.cmo : renderingAttrs.cmi mpresentation.cmi box.cmi \
+boxPp.cmi : \
+    mpresentation.cmi \
+    cicNotationPres.cmi \
+    box.cmi
+cicNotationLexer.cmo : \
+    cicNotationLexer.cmi
+cicNotationLexer.cmx : \
+    cicNotationLexer.cmi
+cicNotationLexer.cmi :
+cicNotationParser.cmo : \
+    cicNotationLexer.cmi \
+    cicNotationParser.cmi
+cicNotationParser.cmx : \
+    cicNotationLexer.cmx \
+    cicNotationParser.cmi
+cicNotationParser.cmi :
+cicNotationPres.cmo : \
+    renderingAttrs.cmi \
+    mpresentation.cmi \
+    box.cmi \
+    cicNotationPres.cmi
+cicNotationPres.cmx : \
+    renderingAttrs.cmx \
+    mpresentation.cmx \
+    box.cmx \
     cicNotationPres.cmi
-cicNotationPres.cmx : renderingAttrs.cmx mpresentation.cmx box.cmx \
+cicNotationPres.cmi : \
+    mpresentation.cmi \
+    box.cmi
+content2pres.cmo : \
+    termContentPres.cmi \
+    renderingAttrs.cmi \
+    mpresentation.cmi \
+    cicNotationPres.cmi \
+    box.cmi \
+    content2pres.cmi
+content2pres.cmx : \
+    termContentPres.cmx \
+    renderingAttrs.cmx \
+    mpresentation.cmx \
+    cicNotationPres.cmx \
+    box.cmx \
+    content2pres.cmi
+content2pres.cmi : \
+    termContentPres.cmi \
     cicNotationPres.cmi
-content2pres.cmo : termContentPres.cmi renderingAttrs.cmi mpresentation.cmi \
-    cicNotationPres.cmi box.cmi content2pres.cmi
-content2pres.cmx : termContentPres.cmx renderingAttrs.cmx mpresentation.cmx \
-    cicNotationPres.cmx box.cmx content2pres.cmi
+content2presMatcher.cmo : \
+    content2presMatcher.cmi
+content2presMatcher.cmx : \
+    content2presMatcher.cmi
+content2presMatcher.cmi :
+mpresentation.cmo : \
+    mpresentation.cmi
+mpresentation.cmx : \
+    mpresentation.cmi
+mpresentation.cmi :
+renderingAttrs.cmo : \
+    renderingAttrs.cmi
+renderingAttrs.cmx : \
+    renderingAttrs.cmi
+renderingAttrs.cmi :
+termContentPres.cmo : \
+    renderingAttrs.cmi \
+    content2presMatcher.cmi \
+    cicNotationParser.cmi \
+    termContentPres.cmi
+termContentPres.cmx : \
+    renderingAttrs.cmx \
+    content2presMatcher.cmx \
+    cicNotationParser.cmx \
+    termContentPres.cmi
+termContentPres.cmi : \
+    cicNotationParser.cmi
index 4deb6e591a8c9b1118318f7a7264800d533fbece..1e74dfbf4eeb81711b4dee2f3799a89da30564c5 100644 (file)
@@ -1,38 +1,55 @@
-renderingAttrs.cmi :
-cicNotationLexer.cmi :
-cicNotationParser.cmi :
-mpresentation.cmi :
+box.cmx : \
+    renderingAttrs.cmx \
+    box.cmi
 box.cmi :
-content2presMatcher.cmi :
-termContentPres.cmi : cicNotationParser.cmi
-boxPp.cmi : mpresentation.cmi cicNotationPres.cmi box.cmi
-cicNotationPres.cmi : mpresentation.cmi box.cmi
-content2pres.cmi : termContentPres.cmi cicNotationPres.cmi
-renderingAttrs.cmo : renderingAttrs.cmi
-renderingAttrs.cmx : renderingAttrs.cmi
-cicNotationLexer.cmo : cicNotationLexer.cmi
-cicNotationLexer.cmx : cicNotationLexer.cmi
-cicNotationParser.cmo : cicNotationLexer.cmi cicNotationParser.cmi
-cicNotationParser.cmx : cicNotationLexer.cmx cicNotationParser.cmi
-mpresentation.cmo : mpresentation.cmi
-mpresentation.cmx : mpresentation.cmi
-box.cmo : renderingAttrs.cmi box.cmi
-box.cmx : renderingAttrs.cmx box.cmi
-content2presMatcher.cmo : content2presMatcher.cmi
-content2presMatcher.cmx : content2presMatcher.cmi
-termContentPres.cmo : renderingAttrs.cmi content2presMatcher.cmi \
-    cicNotationParser.cmi termContentPres.cmi
-termContentPres.cmx : renderingAttrs.cmx content2presMatcher.cmx \
-    cicNotationParser.cmx termContentPres.cmi
-boxPp.cmo : renderingAttrs.cmi mpresentation.cmi cicNotationPres.cmi box.cmi \
-    boxPp.cmi
-boxPp.cmx : renderingAttrs.cmx mpresentation.cmx cicNotationPres.cmx box.cmx \
+boxPp.cmx : \
+    renderingAttrs.cmx \
+    mpresentation.cmx \
+    cicNotationPres.cmx \
+    box.cmx \
     boxPp.cmi
-cicNotationPres.cmo : renderingAttrs.cmi mpresentation.cmi box.cmi \
+boxPp.cmi : \
+    mpresentation.cmi \
+    cicNotationPres.cmi \
+    box.cmi
+cicNotationLexer.cmx : \
+    cicNotationLexer.cmi
+cicNotationLexer.cmi :
+cicNotationParser.cmx : \
+    cicNotationLexer.cmx \
+    cicNotationParser.cmi
+cicNotationParser.cmi :
+cicNotationPres.cmx : \
+    renderingAttrs.cmx \
+    mpresentation.cmx \
+    box.cmx \
     cicNotationPres.cmi
-cicNotationPres.cmx : renderingAttrs.cmx mpresentation.cmx box.cmx \
+cicNotationPres.cmi : \
+    mpresentation.cmi \
+    box.cmi
+content2pres.cmx : \
+    termContentPres.cmx \
+    renderingAttrs.cmx \
+    mpresentation.cmx \
+    cicNotationPres.cmx \
+    box.cmx \
+    content2pres.cmi
+content2pres.cmi : \
+    termContentPres.cmi \
     cicNotationPres.cmi
-content2pres.cmo : termContentPres.cmi renderingAttrs.cmi mpresentation.cmi \
-    cicNotationPres.cmi box.cmi content2pres.cmi
-content2pres.cmx : termContentPres.cmx renderingAttrs.cmx mpresentation.cmx \
-    cicNotationPres.cmx box.cmx content2pres.cmi
+content2presMatcher.cmx : \
+    content2presMatcher.cmi
+content2presMatcher.cmi :
+mpresentation.cmx : \
+    mpresentation.cmi
+mpresentation.cmi :
+renderingAttrs.cmx : \
+    renderingAttrs.cmi
+renderingAttrs.cmi :
+termContentPres.cmx : \
+    renderingAttrs.cmx \
+    content2presMatcher.cmx \
+    cicNotationParser.cmx \
+    termContentPres.cmi
+termContentPres.cmi : \
+    cicNotationParser.cmi
index 655ffbe8f766f828ae20571cf6c76207aa250231..28d403a70285313702ed6e3d3224bd30fb391d52 100644 (file)
@@ -16,19 +16,15 @@ INTERFACE_FILES =            \
 IMPLEMENTATION_FILES =          \
        $(INTERFACE_FILES:%.mli=%.ml)
 
-cicNotationPres.cmi: OCAMLOPTIONS += -rectypes
-cicNotationPres.cmo: OCAMLOPTIONS += -rectypes
-cicNotationPres.cmx: OCAMLOPTIONS += -rectypes
-
 all:
 clean:
 
 LOCAL_LINKOPTS = -package helm-content_pres -linkpkg
 
 cicNotationLexer.cmo: OCAMLC = $(OCAMLC_P4)
-cicNotationParser.cmo: OCAMLC = $(OCAMLC_P4)
+cicNotationParser.cmo: OCAMLC = $(OCAMLC_P4) -w -27
 cicNotationLexer.cmx: OCAMLOPT = $(OCAMLOPT_P4)
-cicNotationParser.cmx: OCAMLOPT = $(OCAMLOPT_P4)
+cicNotationParser.cmx: OCAMLOPT = $(OCAMLOPT_P4) -w -27
 cicNotationLexer.ml.annot: OCAMLC = $(OCAMLC_P4)
 cicNotationParser.ml.annot: OCAMLC = $(OCAMLC_P4)
 
@@ -39,7 +35,7 @@ include ../Makefile.common
 # soon as we have ocaml 3.09 everywhere and "loc" occurrences are replaced by
 # "_loc" occurrences
 UTF8DIR := $(shell $(OCAMLFIND) query helm-syntax_extensions)
-ULEXDIR := $(shell $(OCAMLFIND) query ulex08)
+ULEXDIR := $(shell $(OCAMLFIND) query ulex-camlp5)
 MY_SYNTAXOPTIONS = -pp "camlp5o -I $(UTF8DIR) -I $(ULEXDIR) pa_extend.cmo pa_ulex.cma pa_unicode_macro.cma -loc loc"
 cicNotationLexer.cmo: SYNTAXOPTIONS = $(MY_SYNTAXOPTIONS)
 cicNotationParser.cmo: SYNTAXOPTIONS = $(MY_SYNTAXOPTIONS)
index 45c8b6c20b89f4c131848c92da3d93d39a263b06..1d99a8bb0d9efa0fac1cbb9677c4c154c0a732bc 100644 (file)
@@ -136,15 +136,15 @@ let render_to_strings ~map_unicode_to_tex choose_action size markup =
         let spacing = want_spacing attrs in
         let children' = List.map aux_box children in
         (fun size ->
-          let (size', renderings) as res =
+          let (size', _renderings) as res =
             render_row max_size spacing children'
           in
           if size' <= size then (* children fit in a row *)
             res
           else  (* break needed, re-render using a Box.V *)
             aux_box (Box.V (attrs, children)) size)
-    | Box.V (attrs, []) -> assert false
-    | Box.V (attrs, [child]) -> aux_box child
+    | Box.V (_attrs, []) -> assert false
+    | Box.V (_attrs, [child]) -> aux_box child
     | Box.V (attrs, hd :: tl) ->
         let indent = want_indent attrs in
         let hd_f = aux_box hd in
@@ -163,8 +163,8 @@ let render_to_strings ~map_unicode_to_tex choose_action size markup =
           in
           let rows = hd_rendering @ List.concat tl_renderings in
           max_len rows, rows)
-    | Box.HOV (attrs, []) -> assert false
-    | Box.HOV (attrs, [child]) -> aux_box child
+    | Box.HOV (_attrs, []) -> assert false
+    | Box.HOV (_attrs, [child]) -> aux_box child
     | Box.HOV (attrs, children) ->
         let spacing = want_spacing attrs in
         let indent = want_indent attrs in
@@ -216,7 +216,7 @@ let render_to_strings ~map_unicode_to_tex choose_action size markup =
     let href =
      try
       let _,_,href =
-       List.find (fun (ns,na,value) -> ns = Some "xlink" && na = "href") attrs
+       List.find (fun (ns,na,_value) -> ns = Some "xlink" && na = "href") attrs
       in
        Some href
      with Not_found -> None in
@@ -240,7 +240,7 @@ let render_to_strings ~map_unicode_to_tex choose_action size markup =
         in
         fixed_rendering href s
     | Pres.Mspace _ -> fixed_rendering href string_space
-    | Pres.Mrow (attrs, children) ->
+    | Pres.Mrow (_attrs, children) ->
         let children' = List.map aux_mpres children in
         (fun size -> render_row size false children')
     | Pres.Mfrac (_, m, n) ->
index 1e6860281c0fcee7eb433b6c62108aca0b854ad3..8c7460346c624c4993684fa8ee564e462fdbc99a 100644 (file)
@@ -189,8 +189,8 @@ let extract_term_production status pattern =
   and aux_magic magic =
     match magic with
     | Ast.Opt p ->
-        let p_bindings, p_atoms, p_names, p_action = inner_pattern p in
-        let action (env_opt : NotationEnv.t option) (loc : Ast.location) =
+        let _p_bindings, p_atoms, p_names, p_action = inner_pattern p in
+        let action (env_opt : NotationEnv.t option) (_loc : Ast.location) =
           match env_opt with
           | Some env -> List.map Env.opt_binding_some env
           | None -> List.map Env.opt_binding_of_name p_names
index 04440ffe7a75cefe1ce1b7d9315f2ef197928611..fe9b5f869b45fcd2e302e5b1f8a44863b5ac3a24 100644 (file)
@@ -25,8 +25,6 @@
 
 (* $Id$ *)
 
-open Printf
-
 module Ast = NotationPt
 module Mpres = Mpresentation
 
@@ -194,7 +192,7 @@ let add_parens child_prec curr_prec t =
     match t with
     | Mpresentation.Mobject (_, box) ->
         mpres_of_box (Box.H ([], [ open_box_paren; box; closed_box_paren ]))
-    | mpres -> Mpresentation.Mrow ([], [open_paren; t; closed_paren])
+    | _mpres -> Mpresentation.Mrow ([], [open_paren; t; closed_paren])
   end else
     ((*prerr_endline ("NOT adding parens around: "^
       BoxPp.render_to_string (function x::_->x|_->assert false)
@@ -311,7 +309,7 @@ let render status ~lookup_uri ?(prec=(-1)) =
     | t ->
         prerr_endline ("unexpected ast: " ^ NotationPp.pp_term status t);
         assert false
-  and aux_attributes xmlattrs mathonly xref  prec t =
+  and aux_attributes _xmlattrs mathonly _xref  prec t =
     let reset = ref false in
     let inferred_level = ref None in
     let expected_level = ref None in
@@ -352,7 +350,7 @@ let render status ~lookup_uri ?(prec=(-1)) =
     in
 (*     prerr_endline (NotationPp.pp_term t); *)
     aux_attribute t
-  and aux_literal xmlattrs xref prec l =
+  and aux_literal xmlattrs xref _prec l =
     let attrs = make_href xmlattrs xref in
     (match l with
     | `Symbol s -> Mpres.Mo (attrs, to_unicode s)
index 880024ad9386491fd97ca48628b7fe61c7a8b4da..7918772f4fe417ddfcee270a8a276f57d611033a 100644 (file)
@@ -85,7 +85,7 @@ let make_args_for_apply term2pres args =
  let make_arg_for_apply is_first arg row = 
   let res =
    match arg with 
-      Con.Aux n -> assert false
+      Con.Aux _n -> assert false
     | Con.Premise prem -> 
         let name = 
           (match prem.Con.premise_binder with
@@ -404,16 +404,16 @@ and conclude_aux term2pres ?skip_initial_lambdas_internal is_top_down conclude =
              (match p.Con.premise_binder with
              | None -> assert false; (* unnamed hypothesis ??? *)
              | Some s -> B.Text([],s))
-         | err -> assert false) in
+         | _err -> assert false) in
       (match conclude.Con.conclude_conclusion with 
          None ->
           B.b_h [] [B.b_kw "by"; B.b_space; arg]
-       | Some c -> 
+       | Some _c -> 
           B.b_h [] [B.b_kw "by"; B.b_space; arg]
        )
     else if conclude.Con.conclude_method = "Intros+LetTac" then
       (match conclude.Con.conclude_args with
-         [Con.ArgProof p] ->
+         [Con.ArgProof _p] ->
            (match conclude.Con.conclude_args with
               [Con.ArgProof p] -> 
                 proof2pres0 term2pres ?skip_initial_lambdas_internal true p false
@@ -538,11 +538,11 @@ and args2pres term2pres l = List.map (arg2pres term2pres) l
 and arg2pres term2pres =
     function
         Con.Aux n -> B.b_kw ("aux " ^ n)
-      | Con.Premise prem -> B.b_kw "premise"
-      | Con.Lemma lemma -> B.b_kw "lemma"
+      | Con.Premise _prem -> B.b_kw "premise"
+      | Con.Lemma _lemma -> B.b_kw "lemma"
       | Con.Term (_,t) -> term2pres t
       | Con.ArgProof p -> proof2pres0 term2pres true p false
-      | Con.ArgMethod s -> B.b_kw "method"
+      | Con.ArgMethod _s -> B.b_kw "method"
  
 and case term2pres conclude =
      let proof_conclusion = 
@@ -557,7 +557,7 @@ and case term2pres conclude =
      let case_on =
        let case_arg = 
          (match arg with
-            Con.Aux n -> B.b_kw "an aux???"
+            Con.Aux _n -> B.b_kw "an aux???"
            | Con.Premise prem ->
               (match prem.Con.premise_binder with
                  None -> B.b_kw "previous"
@@ -565,8 +565,8 @@ and case term2pres conclude =
            | Con.Lemma lemma -> B.Object ([], P.Mi([],lemma.Con.lemma_name))
            | Con.Term (_,t) -> 
                term2pres t
-           | Con.ArgProof p -> B.b_kw "a proof???"
-           | Con.ArgMethod s -> B.b_kw "a method???")
+           | Con.ArgProof _p -> B.b_kw "a proof???"
+           | Con.ArgMethod _s -> B.b_kw "a method???")
       in
         (make_concl "we proceed by cases on" case_arg) in
      let to_prove =
@@ -588,7 +588,7 @@ and byinduction term2pres conclude =
      let induction_on =
        let arg = 
          (match inductive_arg with
-            Con.Aux n -> B.b_kw "an aux???"
+            Con.Aux _n -> B.b_kw "an aux???"
            | Con.Premise prem ->
               (match prem.Con.premise_binder with
                  None -> B.b_kw "previous"
@@ -596,8 +596,8 @@ and byinduction term2pres conclude =
            | Con.Lemma lemma -> B.Object ([], P.Mi([],lemma.Con.lemma_name))
            | Con.Term (_,t) -> 
                term2pres t
-           | Con.ArgProof p -> B.b_kw "a proof???"
-           | Con.ArgMethod s -> B.b_kw "a method???") in
+           | Con.ArgProof _p -> B.b_kw "a proof???"
+           | Con.ArgMethod _s -> B.b_kw "a method???") in
         (make_concl "we proceed by induction on" arg) in
      let to_prove =
       B.H ([], [make_concl "to prove" proof_conclusion ; B.Text([],".")]) in
@@ -690,14 +690,14 @@ and falseind term2pres conclude =
           | Some t -> term2pres t) in
        let case_arg = 
          (match conclude.Con.conclude_args with
-             [Con.Aux(n);_;case_arg] -> case_arg
+             [Con.Aux(_n);_;case_arg] -> case_arg
            | _ -> assert false;
              (* 
              List.map (ContentPp.parg 0) conclude.Con.conclude_args;
              assert false *)) in
        let arg = 
          (match case_arg with
-             Con.Aux n -> assert false
+             Con.Aux _n -> assert false
            | Con.Premise prem ->
               (match prem.Con.premise_binder with
                  None -> [B.b_kw "Contradiction, hence"]
@@ -713,14 +713,14 @@ and falseind term2pres conclude =
 and andind term2pres conclude =
        let proof,case_arg = 
          (match conclude.Con.conclude_args with
-             [Con.Aux(n);_;Con.ArgProof proof;case_arg] -> proof,case_arg
+             [Con.Aux(_n);_;Con.ArgProof proof;case_arg] -> proof,case_arg
            | _ -> assert false;
              (* 
              List.map (ContentPp.parg 0) conclude.Con.conclude_args;
              assert false *)) in
        let arg = 
          (match case_arg with
-             Con.Aux n -> assert false
+             Con.Aux _n -> assert false
            | Con.Premise prem ->
               (match prem.Con.premise_binder with
                  None -> []
@@ -730,7 +730,7 @@ and andind term2pres conclude =
                 B.Object([], P.Mi([],lemma.Con.lemma_name))]
            | _ -> assert false) in
        match proof.Con.proof_context with
-         `Hypothesis hyp1::`Hypothesis hyp2::tl ->
+         `Hypothesis hyp1::`Hypothesis hyp2::_tl ->
             let preshyp1 = 
               B.H ([],
                [B.Text([],"(");
@@ -763,14 +763,14 @@ and andind term2pres conclude =
 and exists term2pres conclude =
        let proof = 
          (match conclude.Con.conclude_args with
-             [Con.Aux(n);_;Con.ArgProof proof;_] -> proof
+             [Con.Aux(_n);_;Con.ArgProof proof;_] -> proof
            | _ -> assert false;
              (* 
              List.map (ContentPp.parg 0) conclude.Con.conclude_args;
              assert false *)) in
        match proof.Con.proof_context with
-           `Declaration decl::`Hypothesis hyp::tl
-         | `Hypothesis decl::`Hypothesis hyp::tl ->
+           `Declaration decl::`Hypothesis hyp::_tl
+         | `Hypothesis decl::`Hypothesis hyp::_tl ->
            let presdecl = 
              B.H ([],
                [(B.b_kw "let");
@@ -982,7 +982,7 @@ let njoint_def2pres term2pres joint_kind defs =
 
 let nobj2pres0
   ?skip_initial_lambdas ?(skip_thm_and_qed=false) term2pres 
-  (id,metasenv,obj : NotationPt.term Content.cobj) 
+  (_id,metasenv,obj : NotationPt.term Content.cobj) 
 =
   match obj with
   | `Def (Content.Const, thesis, `Proof p) ->
index ee62e06e696da3bac0573f286da335d3a6cc188a..f6319c73581cd7a2f9ea0aef618b48c022336386 100644 (file)
 
 (* $Id$ *)
 
-open Printf
-
 module Ast = NotationPt
 module Env = NotationEnv
-module Pp = NotationPp
 module Util = NotationUtil
 
 let get_tag term0 =
@@ -84,7 +81,7 @@ struct
       Ast.Variable (Ast.TermVar (name,Ast.Level 0))
     in
     let rec aux = function
-      | Ast.AttributedTerm (_, t) -> assert false
+      | Ast.AttributedTerm (_, _t) -> assert false
       | Ast.Literal _
       | Ast.Layout _ -> assert false
       | Ast.Variable v -> Ast.Variable v
@@ -169,7 +166,7 @@ input
 *)
 
   and compile_magic = function
-    | Ast.Fold (kind, p_base, names, p_rec) ->
+    | Ast.Fold (_kind, p_base, names, p_rec) ->
         let p_rec_decls = Env.declarations_of_term p_rec in
          (* LUCA: p_rec_decls should not contain "names" *)
         let acc_name = try List.hd names with Failure _ -> assert false in
@@ -184,7 +181,7 @@ input
             let rec aux term =
               match compiled_rec term with
                 | None -> aux_base term
-                | Some (env', ctors', _) ->
+                | Some (env', _ctors', _) ->
                     begin
                        let acc = Env.lookup_term env' acc_name in
                        let env'' = Env.remove_name env' acc_name in
@@ -220,7 +217,7 @@ input
           | Some (env', ctors', 0) ->
               let env' =
                 List.map
-                  (fun (name, (ty, v)) as binding ->
+                  (fun (name, (_ty, _v)) as binding ->
                     if List.exists (fun (name', _) -> name = name') p_opt_decls
                     then Env.opt_binding_some binding
                     else binding)
index 49d9241b96e8290ebef312443be7fa20811de9e3..84f4a2f7272bd5636f5fb0663ec071ea128cfad4 100644 (file)
@@ -44,7 +44,7 @@ let resolve_binder = function
 
 let add_level_info prec t = Ast.AttributedTerm (`Level prec, t)
 
-let rec top_pos t = add_level_info ~-1 t
+let top_pos t = add_level_info ~-1 t
 
 let rec remove_level_info =
   function
@@ -347,7 +347,7 @@ let instantiate21 idrefs env l1 =
         Ast.AttributedTerm (attr, subst_singleton pos env t)
     | t -> NotationUtil.group (subst pos env t)
   and subst pos env = function
-    | Ast.AttributedTerm (attr, t) ->
+    | Ast.AttributedTerm (_attr, t) ->
 (*         prerr_endline ("loosing attribute " ^ NotationPp.pp_attribute attr); *)
         subst pos env t
     | Ast.Variable var ->
@@ -378,7 +378,7 @@ let instantiate21 idrefs env l1 =
     | Ast.Literal l as t ->
         let t = add_idrefs idrefs t in
         (match l with
-        | `Keyword k -> [ add_keyword_attrs t ]
+        | `Keyword _k -> [ add_keyword_attrs t ]
         | _ -> [ t ])
     | Ast.Layout l -> [ Ast.Layout (subst_layout pos env l) ]
     | t -> [ NotationUtil.visit_ast (subst_singleton pos env) t ]
@@ -587,7 +587,7 @@ let instantiate_level2 status env term =
   in
   let rec aux env term =
     match term with
-    | Ast.AttributedTerm (a, term) -> (*Ast.AttributedTerm (a, *)aux env term
+    | Ast.AttributedTerm (_a, term) -> (*Ast.AttributedTerm (a, *)aux env term
     | Ast.Appl terms -> Ast.Appl (List.map (aux env) terms)
     | Ast.Binder (binder, var, body) ->
         Ast.Binder (binder, aux_capture_var env var, aux env body)
@@ -632,8 +632,8 @@ let instantiate_level2 status env term =
       Ast.Pattern (head, hrefs, vars) ->
        Ast.Pattern (head, hrefs, List.map (aux_capture_var env) vars)
     | Ast.Wildcard -> Ast.Wildcard
-  and aux_definition env (params, var, term, i) =
-    (List.map (aux_capture_var env) params, aux_capture_var env var, aux env term, i)
+  (*and aux_definition env (params, var, term, i) =
+    (List.map (aux_capture_var env) params, aux_capture_var env var, aux env term, i)*)
   and aux_substs env substs =
     List.map (fun (name, term) -> (name, aux env term)) substs
   and aux_meta_substs env meta_substs = List.map (aux_opt env) meta_substs
@@ -646,7 +646,7 @@ let instantiate_level2 status env term =
     | Ast.TermVar (name,(Ast.Level l|Ast.Self l)) -> 
         Ast.AttributedTerm (`Level l,Env.lookup_term env name)
     | Ast.FreshVar name -> Ast.Ident (lookup_fresh_name name, None)
-    | Ast.Ascription (term, name) -> assert false
+    | Ast.Ascription (_term, _name) -> assert false
   and aux_magic env = function
     | Ast.Default (some_pattern, none_pattern) ->
         let some_pattern_names = NotationUtil.names_of_term some_pattern in
@@ -714,7 +714,7 @@ let instantiate_level2 status env term =
               | _ -> assert false
             in
             instantiate_fold_right env)
-    | Ast.If (_, p_true, p_false) as t ->
+    | Ast.If (_, _p_true, _p_false) as t ->
         aux env (NotationUtil.find_branch (Ast.Magic t))
     | Ast.Fail -> assert false
     | _ -> assert false
index 735bea7f72c4ccf1beef11818a346a3d4c3d6e6a..2f1e0bd9efd1a8ea88cc7ad6e0e2f71f7320efaf 100644 (file)
@@ -1,11 +1,24 @@
+disambiguate.cmo : \
+    disambiguateTypes.cmi \
+    disambiguate.cmi
+disambiguate.cmx : \
+    disambiguateTypes.cmx \
+    disambiguate.cmi
+disambiguate.cmi : \
+    disambiguateTypes.cmi
+disambiguateTypes.cmo : \
+    disambiguateTypes.cmi
+disambiguateTypes.cmx : \
+    disambiguateTypes.cmi
 disambiguateTypes.cmi :
-disambiguate.cmi : disambiguateTypes.cmi
-multiPassDisambiguator.cmi : disambiguateTypes.cmi disambiguate.cmi
-disambiguateTypes.cmo : disambiguateTypes.cmi
-disambiguateTypes.cmx : disambiguateTypes.cmi
-disambiguate.cmo : disambiguateTypes.cmi disambiguate.cmi
-disambiguate.cmx : disambiguateTypes.cmx disambiguate.cmi
-multiPassDisambiguator.cmo : disambiguateTypes.cmi disambiguate.cmi \
+multiPassDisambiguator.cmo : \
+    disambiguateTypes.cmi \
+    disambiguate.cmi \
     multiPassDisambiguator.cmi
-multiPassDisambiguator.cmx : disambiguateTypes.cmx disambiguate.cmx \
+multiPassDisambiguator.cmx : \
+    disambiguateTypes.cmx \
+    disambiguate.cmx \
     multiPassDisambiguator.cmi
+multiPassDisambiguator.cmi : \
+    disambiguateTypes.cmi \
+    disambiguate.cmi
index 735bea7f72c4ccf1beef11818a346a3d4c3d6e6a..867ae46667610f8424caeb58720f553dbf57a72e 100644 (file)
@@ -1,11 +1,15 @@
+disambiguate.cmx : \
+    disambiguateTypes.cmx \
+    disambiguate.cmi
+disambiguate.cmi : \
+    disambiguateTypes.cmi
+disambiguateTypes.cmx : \
+    disambiguateTypes.cmi
 disambiguateTypes.cmi :
-disambiguate.cmi : disambiguateTypes.cmi
-multiPassDisambiguator.cmi : disambiguateTypes.cmi disambiguate.cmi
-disambiguateTypes.cmo : disambiguateTypes.cmi
-disambiguateTypes.cmx : disambiguateTypes.cmi
-disambiguate.cmo : disambiguateTypes.cmi disambiguate.cmi
-disambiguate.cmx : disambiguateTypes.cmx disambiguate.cmi
-multiPassDisambiguator.cmo : disambiguateTypes.cmi disambiguate.cmi \
-    multiPassDisambiguator.cmi
-multiPassDisambiguator.cmx : disambiguateTypes.cmx disambiguate.cmx \
+multiPassDisambiguator.cmx : \
+    disambiguateTypes.cmx \
+    disambiguate.cmx \
     multiPassDisambiguator.cmi
+multiPassDisambiguator.cmi : \
+    disambiguateTypes.cmi \
+    disambiguate.cmi
index f27c723b0692eceb453084b52e47fd25758d66dd..8bd26637047900ac5b58733437df8fbd7584816a 100644 (file)
@@ -51,8 +51,8 @@ type 'a disambiguator_input = string * int * 'a
 type domain = domain_tree list
 and domain_tree = Node of Stdpp.location list * domain_item * domain
 
-let mono_uris_callback ~selection_mode ?ok
-          ?(enable_button_for_non_vars = true) ~title ~msg ~id =
+let mono_uris_callback ~selection_mode:_ ?ok:(_)
+          ?enable_button_for_non_vars:(_ = true) ~title:(_) ~msg:(_) ~id:(_) =
  if Helm_registry.get_opt_default Helm_registry.get_bool ~default:true
       "matita.auto_disambiguation"
  then
@@ -69,7 +69,7 @@ let set_choose_interp_callback f = _choose_interp_callback := f
 
 let interactive_user_uri_choice = !_choose_uris_callback
 let interactive_interpretation_choice interp = !_choose_interp_callback interp
-let input_or_locate_uri ~(title:string) ?id () = None
+let input_or_locate_uri ~title:(_:string) ?id:(_) () = None
   (* Zack: I try to avoid using this callback. I therefore assume that
   * the presence of an identifier that can't be resolved via "locate"
   * query is a syntax error *)
@@ -139,7 +139,7 @@ let resolve ~env ~mk_choice (item: domain_item) arg =
    match snd (mk_choice (Environment.find item env)), arg with
       `Num_interp f, `Num_arg n -> f n
     | `Sym_interp f, `Args l -> f l
-    | `Sym_interp f, `Num_arg n -> (* Implicit number! *) f []
+    | `Sym_interp f, `Num_arg _n -> (* Implicit number! *) f []
     | _,_ -> assert false
   with Not_found -> 
     failwith ("Domain item not found: " ^ 
@@ -149,7 +149,7 @@ let resolve ~env ~mk_choice (item: domain_item) arg =
 let find_in_context name context =
   let rec aux acc = function
     | [] -> raise Not_found
-    | Some hd :: tl when hd = name -> acc
+    | Some hd :: _tl when hd = name -> acc
     | _ :: tl ->  aux (acc + 1) tl
   in
   aux 1 context
@@ -231,7 +231,7 @@ let rec domain_of_term ?(loc = HExtlib.dummy_floc) ~context = function
         | _ :: tl -> get_first_constructor tl in
       let do_branch =
        function
-          Ast.Pattern (head, _, args), term ->
+          Ast.Pattern (_head, _, args), term ->
            let (term_context, args_domain) =
              List.fold_left
                (fun (cont, dom) (name, typ) ->
@@ -284,8 +284,8 @@ let rec domain_of_term ?(loc = HExtlib.dummy_floc) ~context = function
   | Ast.NRef _ -> []
   | Ast.NCic _ -> []
   | Ast.Implicit _ -> []
-  | Ast.Num (num, i) -> [ Node ([loc], Num i, []) ]
-  | Ast.Meta (index, local_context) ->
+  | Ast.Num (_num, i) -> [ Node ([loc], Num i, []) ]
+  | Ast.Meta (_index, local_context) ->
       List.fold_left
        (fun dom term -> dom @ domain_of_term_option ~loc ~context term)
        [] local_context
@@ -352,7 +352,7 @@ let domain_of_obj ~context ast =
           (fun (context,res) (name,ty,_,_) ->
             Some name::context, res @ domain_of_term context ty
           ) (context_w_types,[]) fields)
-   | Ast.LetRec (kind, defs, _) ->
+   | Ast.LetRec (_kind, defs, _) ->
        let add_defs context =
          List.fold_left
            (fun acc (_, (var, _), _, _) -> string_of_name var :: acc
@@ -393,7 +393,7 @@ let domain_diff dom1 dom2 =
           (match elt with
               Symbol (symb',_) when symb = symb' -> true
             | _ -> false)
-       | Num i ->
+       | Num _i ->
           (match elt with
               Num _ -> true
             | _ -> false)
@@ -449,7 +449,7 @@ let disambiguate_thing
    let aliases, todo_dom = 
      let rec aux (aliases,acc) = function 
        | [] -> aliases, acc
-       | (Node (locs, item,extra) as node) :: tl -> 
+       | Node (locs, item,extra) :: tl -> 
            let choices = lookup_choices item in
            if List.length choices = 0 then
             (* Quick failure *)
index 50d1d59da6013658ca50d4012f18e550e773ed94..19c16d1305e89c3fdb0b734f370438eed5af5d38 100644 (file)
@@ -53,10 +53,10 @@ struct
 
   let find k env =
    match k with
-      Symbol (sym,n) ->
+      Symbol (sym,_n) ->
        (try find k env
         with Not_found -> find (Symbol (sym,0)) env)
-    | Num n ->
+    | Num _n ->
        (try find k env
         with Not_found -> find (Num 0) env)
     | _ -> find k env
index b1cf9aed0ec55f13e3317489b8e9f63e044d1ffe..1ee9df14e8c7efdecfec04f3f20a9b9b8cf0492a 100644 (file)
@@ -25,8 +25,6 @@
 
 (* $Id$ *)
 
-open Printf
-
 let debug = ref false;;
 let debug_print s =
  if !debug then prerr_endline (Lazy.force s) else ();;
@@ -119,7 +117,7 @@ let disambiguate_thing ~description_of_alias ~passes ~aliases ~universe ~f thing
   let try_pass (fresh_instances, (_, aliases, universe), use_coercions) =
     f ~fresh_instances ~aliases ~universe ~use_coercions thing
   in
-  let set_aliases (instances,(use_mono_aliases,_,_),_) (_, user_asked as res) =
+  let set_aliases (_instances,(use_mono_aliases,_,_),_) (_, user_asked as res) =
    if use_mono_aliases then
     drop_aliases ~minimize_instances:true ~description_of_alias res (* one shot aliases *)
    else if user_asked then
index e7b0a3bc74142a75bb82718931527b2b33db82e2..c4c6d7e8adc6f9fc3e6be773c80305109d23f385 100644 (file)
@@ -1,27 +1,51 @@
+componentsConf.cmo : \
+    componentsConf.cmi
+componentsConf.cmx : \
+    componentsConf.cmi
 componentsConf.cmi :
+discrimination_tree.cmo : \
+    trie.cmi \
+    hExtlib.cmi \
+    discrimination_tree.cmi
+discrimination_tree.cmx : \
+    trie.cmx \
+    hExtlib.cmx \
+    discrimination_tree.cmi
+discrimination_tree.cmi :
+graphvizPp.cmo : \
+    graphvizPp.cmi
+graphvizPp.cmx : \
+    graphvizPp.cmi
+graphvizPp.cmi :
+hExtlib.cmo : \
+    hExtlib.cmi
+hExtlib.cmx : \
+    hExtlib.cmi
 hExtlib.cmi :
+hLog.cmo : \
+    hLog.cmi
+hLog.cmx : \
+    hLog.cmi
+hLog.cmi :
+hMarshal.cmo : \
+    hExtlib.cmi \
+    hMarshal.cmi
+hMarshal.cmx : \
+    hExtlib.cmx \
+    hMarshal.cmi
 hMarshal.cmi :
+hTopoSort.cmo : \
+    hTopoSort.cmi
+hTopoSort.cmx : \
+    hTopoSort.cmi
+hTopoSort.cmi :
+patternMatcher.cmo : \
+    patternMatcher.cmi
+patternMatcher.cmx : \
+    patternMatcher.cmi
 patternMatcher.cmi :
-hLog.cmi :
+trie.cmo : \
+    trie.cmi
+trie.cmx : \
+    trie.cmi
 trie.cmi :
-discrimination_tree.cmi :
-hTopoSort.cmi :
-graphvizPp.cmi :
-componentsConf.cmo : componentsConf.cmi
-componentsConf.cmx : componentsConf.cmi
-hExtlib.cmo : hExtlib.cmi
-hExtlib.cmx : hExtlib.cmi
-hMarshal.cmo : hExtlib.cmi hMarshal.cmi
-hMarshal.cmx : hExtlib.cmx hMarshal.cmi
-patternMatcher.cmo : patternMatcher.cmi
-patternMatcher.cmx : patternMatcher.cmi
-hLog.cmo : hLog.cmi
-hLog.cmx : hLog.cmi
-trie.cmo : trie.cmi
-trie.cmx : trie.cmi
-discrimination_tree.cmo : trie.cmi hExtlib.cmi discrimination_tree.cmi
-discrimination_tree.cmx : trie.cmx hExtlib.cmx discrimination_tree.cmi
-hTopoSort.cmo : hTopoSort.cmi
-hTopoSort.cmx : hTopoSort.cmi
-graphvizPp.cmo : graphvizPp.cmi
-graphvizPp.cmx : graphvizPp.cmi
index e7b0a3bc74142a75bb82718931527b2b33db82e2..72b64d1cf2057a1003a71e5c1701c6dd31553614 100644 (file)
@@ -1,27 +1,30 @@
+componentsConf.cmx : \
+    componentsConf.cmi
 componentsConf.cmi :
+discrimination_tree.cmx : \
+    trie.cmx \
+    hExtlib.cmx \
+    discrimination_tree.cmi
+discrimination_tree.cmi :
+graphvizPp.cmx : \
+    graphvizPp.cmi
+graphvizPp.cmi :
+hExtlib.cmx : \
+    hExtlib.cmi
 hExtlib.cmi :
+hLog.cmx : \
+    hLog.cmi
+hLog.cmi :
+hMarshal.cmx : \
+    hExtlib.cmx \
+    hMarshal.cmi
 hMarshal.cmi :
+hTopoSort.cmx : \
+    hTopoSort.cmi
+hTopoSort.cmi :
+patternMatcher.cmx : \
+    patternMatcher.cmi
 patternMatcher.cmi :
-hLog.cmi :
+trie.cmx : \
+    trie.cmi
 trie.cmi :
-discrimination_tree.cmi :
-hTopoSort.cmi :
-graphvizPp.cmi :
-componentsConf.cmo : componentsConf.cmi
-componentsConf.cmx : componentsConf.cmi
-hExtlib.cmo : hExtlib.cmi
-hExtlib.cmx : hExtlib.cmi
-hMarshal.cmo : hExtlib.cmi hMarshal.cmi
-hMarshal.cmx : hExtlib.cmx hMarshal.cmi
-patternMatcher.cmo : patternMatcher.cmi
-patternMatcher.cmx : patternMatcher.cmi
-hLog.cmo : hLog.cmi
-hLog.cmx : hLog.cmi
-trie.cmo : trie.cmi
-trie.cmx : trie.cmi
-discrimination_tree.cmo : trie.cmi hExtlib.cmi discrimination_tree.cmi
-discrimination_tree.cmx : trie.cmx hExtlib.cmx discrimination_tree.cmi
-hTopoSort.cmo : hTopoSort.cmi
-hTopoSort.cmx : hTopoSort.cmi
-graphvizPp.cmo : graphvizPp.cmi
-graphvizPp.cmx : graphvizPp.cmi
index cdc498e9cfb48db2bd981b95009162f615ea84b0..1a8147f7db8d62cb4eaf51111daa4a77e5587607 100644 (file)
@@ -157,8 +157,8 @@ and type data = A.elt and type dataset = A.t =
       (* the equivalent of skip, but on the index, thus the list of trees
          that are rooted just after the term represented by the tree root
          are returned (we are skipping the root) *)
-      let skip_root = function DiscriminationTree.Node (value, map) ->
-        let rec get n = function DiscriminationTree.Node (v, m) as tree ->
+      let skip_root = function DiscriminationTree.Node (_value, map) ->
+        let rec get n = function DiscriminationTree.Node (_v, m) as tree ->
            if n = 0 then [tree] else 
            PSMap.fold (fun k v res -> (get (n-1 + arity_of k) v) @ res) m []
         in
@@ -171,7 +171,7 @@ and type data = A.elt and type dataset = A.t =
           match tree, path with
           | DiscriminationTree.Node (Some s, _), [] -> s
           | DiscriminationTree.Node (None, _), [] -> A.empty 
-          | DiscriminationTree.Node (_, map), Variable::path when unif ->
+          | DiscriminationTree.Node (_, _map), Variable::path when unif ->
               List.fold_left A.union A.empty
                 (List.map (retrieve path) (skip_root tree))
           | DiscriminationTree.Node (_, map), node::path ->
@@ -239,7 +239,7 @@ and type data = A.elt and type dataset = A.t =
             (List.map
               (fun s, w ->
                  HExtlib.filter_map (fun x ->
-                   try Some (x, w + snd (List.find (fun (s,w) -> A.mem x s) l2))
+                   try Some (x, w + snd (List.find (fun (s,_w) -> A.mem x s) l2))
                    with Not_found -> None)
                    (A.elements s))
               l1)
@@ -254,7 +254,7 @@ and type data = A.elt and type dataset = A.t =
           match tree, path with
           | DiscriminationTree.Node (Some s, _), [] -> S.singleton (s, n)
           | DiscriminationTree.Node (None, _), [] -> S.empty
-          | DiscriminationTree.Node (_, map), Variable::path when unif ->
+          | DiscriminationTree.Node (_, _map), Variable::path when unif ->
               List.fold_left S.union S.empty
                 (List.map (retrieve n path) (skip_root tree))
           | DiscriminationTree.Node (_, map), node::path ->
index 8871a35df0cc30f3bf1a4e27aacd9216c9097dd0..b7b664ff24da5a9436d1571325c6cb8796de6b6e 100644 (file)
@@ -302,7 +302,7 @@ let list_iter_sep ~sep f =
   in
   aux
   
-let rec list_findopt f l = 
+let list_findopt f l = 
   let rec aux k = function 
     | [] -> None 
     | x::tl -> 
@@ -316,13 +316,13 @@ let split_nth n l =
   let rec aux acc n l =
     match n, l with
     | 0, _ -> List.rev acc, l
-    | n, [] -> raise (Failure "HExtlib.split_nth")
+    | _, [] -> raise (Failure "HExtlib.split_nth")
     | n, hd :: tl -> aux (hd :: acc) (n - 1) tl in
   aux [] n l
 
 let list_last l =
   let l = List.rev l in 
-  try List.hd l with exn -> raise (Failure "HExtlib.list_last")
+  try List.hd l with _ -> raise (Failure "HExtlib.list_last")
 ;;
 
 let rec list_assoc_all a = function
@@ -460,12 +460,12 @@ let input_file fname =
 let input_all ic =
   let size = 10240 in
   let buf = Buffer.create size in
-  let s = String.create size in
+  let s = Bytes.create size in
   (try
     while true do
       let bytes = input ic s 0 size in
       if bytes = 0 then raise End_of_file
-      else Buffer.add_substring buf s 0 bytes
+      else Buffer.add_subbytes buf s 0 bytes
     done
   with End_of_file -> ());
   Buffer.contents buf
index 4ad2b5ba4804c0a02ab1896c6bc4515418248cb4..74cacb408896d943d8c52ea5c70604aefdb32435 100644 (file)
@@ -25,8 +25,6 @@
 
 (* $Id$ *)
 
-open Printf
-
 type log_tag = [ `Debug | `Error | `Message | `Warning ]
 type log_callback = log_tag -> string -> unit
 
index cb4976e7d42cebf853748145e98ff0c3b17669b5..c61977894196571ed0dcd0f19653c5dfb2414342 100644 (file)
@@ -46,8 +46,8 @@ let save ~fmt ~version ~fname data =
   HExtlib.chmod 0o664 fname
 
 let expect ic fname s =
-  let len = String.length s in
-  let buf = String.create len in
+  let len = Bytes.length s in
+  let buf = Bytes.create len in
   really_input ic buf 0 len;
   if buf <> s then raise (Corrupt_file fname)
 
@@ -61,8 +61,8 @@ let load ~fmt ~version ~fname =
         if fmt' <> Hashtbl.hash fmt then raise (Format_mismatch fname);
         let version' = input_binary_int ic in     (* field 2 *)
         if version' <> version then raise (Version_mismatch fname);
-        expect ic fname fmt;                      (* field 3 *)
-        expect ic fname (string_of_int version);  (* field 4 *)
+        expect ic fname (Bytes.of_string fmt);                      (* field 3 *)
+        expect ic fname (Bytes.of_string (string_of_int version));  (* field 4 *)
         let checksum' = input_binary_int ic in    (* field 5 *)
         let marshalled' = HExtlib.input_all ic in (* field 6 *)
         if checksum' <> Hashtbl.hash marshalled' then
index f57c3ea6cc82affc53668bdbf507fdde774be558..fa8c6061ecc92ecbf767b7fef39e651a8aece27a 100644 (file)
@@ -25,8 +25,6 @@
 
 (* $Id$ *)
 
-open Printf
-
 type pattern_kind = Variable | Constructor
 type tag_t = int
 
@@ -121,7 +119,7 @@ struct
       | _ -> kfail () (*CSC: was assert false, but it did happen*))
 
   let success_closure ksucc =
-    (fun matched_terms constructors terms ->
+    (fun matched_terms constructors _terms ->
 (* prerr_endline "success_closure"; *)
        ksucc matched_terms constructors)
 
index f60b2d45cc05eb1b367d1907252877c201b4f0cc..e9e7e3f7ba8e832bd753e73ef2fb8bbbaf8962fa 100644 (file)
@@ -113,7 +113,7 @@ module Make (M : Map.S) = struct
     in
     traverse [] t
 
-  let rec fold f t acc =
+  let fold f t acc =
     let rec traverse revp t acc = match t with
       | Node (None,m) -> 
          M.fold (fun x -> traverse (x::revp)) m acc
index 59c0b896e216c8aa3f904c2b1a721c13b87b4d83..aa90638353d700c158c9553febdaa0f0fc02d0a8 100644 (file)
@@ -1,38 +1,89 @@
-http_getter_wget.cmi :
+http_getter.cmo : \
+    http_getter_wget.cmi \
+    http_getter_types.cmo \
+    http_getter_storage.cmi \
+    http_getter_misc.cmi \
+    http_getter_logger.cmi \
+    http_getter_env.cmi \
+    http_getter_const.cmi \
+    http_getter_common.cmi \
+    http_getter.cmi
+http_getter.cmx : \
+    http_getter_wget.cmx \
+    http_getter_types.cmx \
+    http_getter_storage.cmx \
+    http_getter_misc.cmx \
+    http_getter_logger.cmx \
+    http_getter_env.cmx \
+    http_getter_const.cmx \
+    http_getter_common.cmx \
+    http_getter.cmi
+http_getter.cmi : \
+    http_getter_types.cmo
+http_getter_common.cmo : \
+    http_getter_types.cmo \
+    http_getter_misc.cmi \
+    http_getter_logger.cmi \
+    http_getter_env.cmi \
+    http_getter_common.cmi
+http_getter_common.cmx : \
+    http_getter_types.cmx \
+    http_getter_misc.cmx \
+    http_getter_logger.cmx \
+    http_getter_env.cmx \
+    http_getter_common.cmi
+http_getter_common.cmi : \
+    http_getter_types.cmo
+http_getter_const.cmo : \
+    http_getter_const.cmi
+http_getter_const.cmx : \
+    http_getter_const.cmi
+http_getter_const.cmi :
+http_getter_env.cmo : \
+    http_getter_types.cmo \
+    http_getter_misc.cmi \
+    http_getter_logger.cmi \
+    http_getter_const.cmi \
+    http_getter_env.cmi
+http_getter_env.cmx : \
+    http_getter_types.cmx \
+    http_getter_misc.cmx \
+    http_getter_logger.cmx \
+    http_getter_const.cmx \
+    http_getter_env.cmi
+http_getter_env.cmi : \
+    http_getter_types.cmo
+http_getter_logger.cmo : \
+    http_getter_logger.cmi
+http_getter_logger.cmx : \
+    http_getter_logger.cmi
 http_getter_logger.cmi :
+http_getter_misc.cmo : \
+    http_getter_logger.cmi \
+    http_getter_misc.cmi
+http_getter_misc.cmx : \
+    http_getter_logger.cmx \
+    http_getter_misc.cmi
 http_getter_misc.cmi :
-http_getter_const.cmi :
-http_getter_env.cmi : http_getter_types.cmo
+http_getter_storage.cmo : \
+    http_getter_wget.cmi \
+    http_getter_types.cmo \
+    http_getter_misc.cmi \
+    http_getter_env.cmi \
+    http_getter_storage.cmi
+http_getter_storage.cmx : \
+    http_getter_wget.cmx \
+    http_getter_types.cmx \
+    http_getter_misc.cmx \
+    http_getter_env.cmx \
+    http_getter_storage.cmi
 http_getter_storage.cmi :
-http_getter_common.cmi : http_getter_types.cmo
-http_getter.cmi : http_getter_types.cmo
 http_getter_types.cmo :
 http_getter_types.cmx :
-http_getter_wget.cmo : http_getter_types.cmo http_getter_wget.cmi
-http_getter_wget.cmx : http_getter_types.cmx http_getter_wget.cmi
-http_getter_logger.cmo : http_getter_logger.cmi
-http_getter_logger.cmx : http_getter_logger.cmi
-http_getter_misc.cmo : http_getter_logger.cmi http_getter_misc.cmi
-http_getter_misc.cmx : http_getter_logger.cmx http_getter_misc.cmi
-http_getter_const.cmo : http_getter_const.cmi
-http_getter_const.cmx : http_getter_const.cmi
-http_getter_env.cmo : http_getter_types.cmo http_getter_misc.cmi \
-    http_getter_logger.cmi http_getter_const.cmi http_getter_env.cmi
-http_getter_env.cmx : http_getter_types.cmx http_getter_misc.cmx \
-    http_getter_logger.cmx http_getter_const.cmx http_getter_env.cmi
-http_getter_storage.cmo : http_getter_wget.cmi http_getter_types.cmo \
-    http_getter_misc.cmi http_getter_env.cmi http_getter_storage.cmi
-http_getter_storage.cmx : http_getter_wget.cmx http_getter_types.cmx \
-    http_getter_misc.cmx http_getter_env.cmx http_getter_storage.cmi
-http_getter_common.cmo : http_getter_types.cmo http_getter_misc.cmi \
-    http_getter_logger.cmi http_getter_env.cmi http_getter_common.cmi
-http_getter_common.cmx : http_getter_types.cmx http_getter_misc.cmx \
-    http_getter_logger.cmx http_getter_env.cmx http_getter_common.cmi
-http_getter.cmo : http_getter_wget.cmi http_getter_types.cmo \
-    http_getter_storage.cmi http_getter_misc.cmi http_getter_logger.cmi \
-    http_getter_env.cmi http_getter_const.cmi http_getter_common.cmi \
-    http_getter.cmi
-http_getter.cmx : http_getter_wget.cmx http_getter_types.cmx \
-    http_getter_storage.cmx http_getter_misc.cmx http_getter_logger.cmx \
-    http_getter_env.cmx http_getter_const.cmx http_getter_common.cmx \
-    http_getter.cmi
+http_getter_wget.cmo : \
+    http_getter_types.cmo \
+    http_getter_wget.cmi
+http_getter_wget.cmx : \
+    http_getter_types.cmx \
+    http_getter_wget.cmi
+http_getter_wget.cmi :
index 7c2b605861ee7340a4908ed5d3085ccbc0a7d401..cb0f289acf8e0d744a5c22d63359ff7223571004 100644 (file)
@@ -1,38 +1,50 @@
-http_getter_wget.cmi :
+http_getter.cmx : \
+    http_getter_wget.cmx \
+    http_getter_types.cmx \
+    http_getter_storage.cmx \
+    http_getter_misc.cmx \
+    http_getter_logger.cmx \
+    http_getter_env.cmx \
+    http_getter_const.cmx \
+    http_getter_common.cmx \
+    http_getter.cmi
+http_getter.cmi : \
+    http_getter_types.cmx
+http_getter_common.cmx : \
+    http_getter_types.cmx \
+    http_getter_misc.cmx \
+    http_getter_logger.cmx \
+    http_getter_env.cmx \
+    http_getter_common.cmi
+http_getter_common.cmi : \
+    http_getter_types.cmx
+http_getter_const.cmx : \
+    http_getter_const.cmi
+http_getter_const.cmi :
+http_getter_env.cmx : \
+    http_getter_types.cmx \
+    http_getter_misc.cmx \
+    http_getter_logger.cmx \
+    http_getter_const.cmx \
+    http_getter_env.cmi
+http_getter_env.cmi : \
+    http_getter_types.cmx
+http_getter_logger.cmx : \
+    http_getter_logger.cmi
 http_getter_logger.cmi :
+http_getter_misc.cmx : \
+    http_getter_logger.cmx \
+    http_getter_misc.cmi
 http_getter_misc.cmi :
-http_getter_const.cmi :
-http_getter_env.cmi : http_getter_types.cmx
+http_getter_storage.cmx : \
+    http_getter_wget.cmx \
+    http_getter_types.cmx \
+    http_getter_misc.cmx \
+    http_getter_env.cmx \
+    http_getter_storage.cmi
 http_getter_storage.cmi :
-http_getter_common.cmi : http_getter_types.cmx
-http_getter.cmi : http_getter_types.cmx
-http_getter_types.cmo :
 http_getter_types.cmx :
-http_getter_wget.cmo : http_getter_types.cmx http_getter_wget.cmi
-http_getter_wget.cmx : http_getter_types.cmx http_getter_wget.cmi
-http_getter_logger.cmo : http_getter_logger.cmi
-http_getter_logger.cmx : http_getter_logger.cmi
-http_getter_misc.cmo : http_getter_logger.cmi http_getter_misc.cmi
-http_getter_misc.cmx : http_getter_logger.cmx http_getter_misc.cmi
-http_getter_const.cmo : http_getter_const.cmi
-http_getter_const.cmx : http_getter_const.cmi
-http_getter_env.cmo : http_getter_types.cmx http_getter_misc.cmi \
-    http_getter_logger.cmi http_getter_const.cmi http_getter_env.cmi
-http_getter_env.cmx : http_getter_types.cmx http_getter_misc.cmx \
-    http_getter_logger.cmx http_getter_const.cmx http_getter_env.cmi
-http_getter_storage.cmo : http_getter_wget.cmi http_getter_types.cmx \
-    http_getter_misc.cmi http_getter_env.cmi http_getter_storage.cmi
-http_getter_storage.cmx : http_getter_wget.cmx http_getter_types.cmx \
-    http_getter_misc.cmx http_getter_env.cmx http_getter_storage.cmi
-http_getter_common.cmo : http_getter_types.cmx http_getter_misc.cmi \
-    http_getter_logger.cmi http_getter_env.cmi http_getter_common.cmi
-http_getter_common.cmx : http_getter_types.cmx http_getter_misc.cmx \
-    http_getter_logger.cmx http_getter_env.cmx http_getter_common.cmi
-http_getter.cmo : http_getter_wget.cmi http_getter_types.cmx \
-    http_getter_storage.cmi http_getter_misc.cmi http_getter_logger.cmi \
-    http_getter_env.cmi http_getter_const.cmi http_getter_common.cmi \
-    http_getter.cmi
-http_getter.cmx : http_getter_wget.cmx http_getter_types.cmx \
-    http_getter_storage.cmx http_getter_misc.cmx http_getter_logger.cmx \
-    http_getter_env.cmx http_getter_const.cmx http_getter_common.cmx \
-    http_getter.cmi
+http_getter_wget.cmx : \
+    http_getter_types.cmx \
+    http_getter_wget.cmi
+http_getter_wget.cmi :
index 4e431ee81ac8731b91c6cc0be26365bb5d03f4b7..4de03eab2e9de9caa78ab2249f7a835ca3dd9674 100644 (file)
@@ -89,18 +89,18 @@ let getter_url () = Helm_registry.get "getter.url"
 (* Remote interface: getter methods implemented using a remote getter *)
 
   (* <TODO> *)
-let getxml_remote uri = not_implemented "getxml_remote"
-let getxslt_remote uri = not_implemented "getxslt_remote"
-let getdtd_remote uri = not_implemented "getdtd_remote"
+let getxml_remote _uri = not_implemented "getxml_remote"
+let getxslt_remote _uri = not_implemented "getxslt_remote"
+let getdtd_remote _uri = not_implemented "getdtd_remote"
 let clean_cache_remote () = not_implemented "clean_cache_remote"
 let list_servers_remote () = not_implemented "list_servers_remote"
-let add_server_remote ~logger ~position name =
+let add_server_remote ~logger:_ ~position:_ _name =
   not_implemented "add_server_remote"
-let remove_server_remote ~logger position =
+let remove_server_remote ~logger:_ _position =
   not_implemented "remove_server_remote"
 let getalluris_remote () = not_implemented "getalluris_remote"
-let ls_remote lsuri = not_implemented "ls_remote"
-let exists_remote uri = not_implemented "exists_remote"
+let ls_remote _lsuri = not_implemented "ls_remote"
+let exists_remote _uri = not_implemented "exists_remote"
   (* </TODO> *)
 
 let resolve_remote ~writable uri =
@@ -132,7 +132,7 @@ let resolve_remote ~writable uri =
   | Exception e -> raise e
   | Resolved url -> url
 
-let deref_index_theory ~local uri =
+let deref_index_theory ~local:_ uri =
 (*  if Http_getter_storage.exists ~local (uri ^ xml_suffix) then uri *)
  if is_theory_uri uri && Filename.basename uri = "index.theory" then
     strip_trailing_slash (Filename.dirname uri) ^ theory_suffix
@@ -229,7 +229,7 @@ let store_obj tbl o =
       | s when Pcre.pmatch ~rex:body_ann_RE s       -> (true,  No, Ann, No)
       | s when Pcre.pmatch ~rex:proof_tree_RE s     -> (false, No, No, Yes)
       | s when Pcre.pmatch ~rex:proof_tree_ann_RE s -> (true,  No, No, Ann)
-      | s -> no_flags
+      | _s -> no_flags
     in
     Hashtbl.replace tbl basepart (oldflags ++ newflags)
   end
index ddce33f5dbcc9e126f9e3b5f131f75e6e66b98ce..4c817d8f066744ce8ceec9964f74147d163a3eda 100644 (file)
@@ -60,7 +60,7 @@ let rec uri_of_string = function
       Cic_uri (Theory (Pcre.replace ~pat:"^theory:" uri))
   | uri -> raise (Invalid_URI uri)
 
-let patch_xsl ?(via_http = true) () =
+let patch_xsl ?via_http:(_ = true) () =
   fun line ->
     let mk_patch_fun tag line =
       Pcre.replace
@@ -125,7 +125,7 @@ let return_file
       | (None, None) -> []
     in
     Http_daemon.send_basic_headers ~code:(`Code 200) outchan;
-    Http_daemon.send_headers headers outchan;
+    Http_daemon.send_headers ~headers outchan;
     Http_daemon.send_CRLF outchan
   end;
   match gunzip, patch_fun with
index 1d774c10287bd6fbc611dc0e1b46a0b1bcc32652..91e7c8a93c4e21e5b83046ed068af4a617c29c8a 100644 (file)
@@ -55,7 +55,7 @@ let log ?(level = 1) s =
     let msg = "[HTTP-Getter] " ^ s in
     match (!logfile, !logchan) with
     | None, _ -> prerr_endline msg
-    | Some fname, Some oc ->
+    | Some _fname, Some oc ->
         output_string oc msg;
         output_string oc "\n";
         flush oc
index f7dffd0663b45f9437cf2a1aedcc4a36ab57fed5..38a943bc59b90091b89b32f6132b11c99ce427c5 100644 (file)
@@ -33,7 +33,7 @@ open Printf
 let file_scheme_prefix = "file://"
 
 let trailing_dot_gz_RE = Pcre.regexp "\\.gz$"   (* for g{,un}zip *)
-let url_RE = Pcre.regexp "^([\\w.-]+)(:(\\d+))?(/.*)?$"
+(*let url_RE = Pcre.regexp "^([\\w.-]+)(:(\\d+))?(/.*)?$"*)
 let http_scheme_RE = Pcre.regexp ~flags:[`CASELESS] "^http://"
 let file_scheme_RE = Pcre.regexp ~flags:[`CASELESS] ("^" ^ file_scheme_prefix)
 let dir_sep_RE = Pcre.regexp "/"
@@ -47,7 +47,7 @@ let local_url =
     with Not_found -> None
 
 let bufsiz = 16384  (* for file system I/O *)
-let tcp_bufsiz = 4096 (* for TCP I/O *)
+(*let tcp_bufsiz = 4096 (* for TCP I/O *)*)
 
 let fold_file f init fname =
   let ic = open_in fname in
@@ -67,12 +67,12 @@ let iter_buf_size = 10240
 
 let iter_file_data f fname =
   let ic = open_in fname in
-  let buf = String.create iter_buf_size in
+  let buf = Bytes.create iter_buf_size in
   try
     while true do
       let bytes = input ic buf 0 iter_buf_size in
       if bytes = 0 then raise End_of_file;
-      f (String.sub buf 0 bytes)
+      f (Bytes.to_string (Bytes.sub buf 0 bytes))
     done
   with End_of_file -> close_in ic
 
@@ -93,7 +93,7 @@ let cp src dst =
     let ic = open_in src in
       try
        let oc = open_out dst in
-       let buf = String.create bufsiz in
+       let buf = Bytes.create bufsiz in
          (try
             while true do
               let bytes = input ic buf 0 bufsiz in
@@ -137,7 +137,7 @@ let wget ?output url =
       (let oc = 
         open_out (match output with Some f -> f | None -> Filename.basename url)
       in
-      Http_user_agent.get_iter (fun data -> output_string oc data) url;
+      Http_user_agent.get_iter (fun data -> output_bytes oc data) url;
       close_out oc)
   | scheme -> (* unsupported scheme *)
       failwith ("Http_getter_misc.wget: unsupported scheme: " ^ scheme)
@@ -147,7 +147,7 @@ let gzip ?(keep = false) ?output fname =
   Http_getter_logger.log ~level:3
     (sprintf "gzipping %s (keep: %b, output: %s)" fname keep output);
   let (ic, oc) = (open_in fname, Gzip.open_out output) in
-  let buf = String.create bufsiz in
+  let buf = Bytes.create bufsiz in
   (try
     while true do
       let bytes = input ic buf 0 bufsiz in
@@ -179,7 +179,7 @@ let gunzip ?(keep = false) ?output fname =
     try
       let ic = Gzip.open_in_chan zic in
       let oc = open_out output in
-      let buf = String.create bufsiz in
+      let buf = Bytes.create bufsiz in
       (try
         while true do
           let bytes = Gzip.input ic buf 0 bufsiz in
@@ -240,11 +240,11 @@ let http_get url =
     let fname = Pcre.replace ~rex:file_scheme_RE url in
     try
       let size = (Unix.stat fname).Unix.st_size in
-      let buf = String.create size in
+      let buf = Bytes.create size in
       let ic = open_in fname in
       really_input ic buf 0 size ;
       close_in ic;
-      Some buf
+      Some (Bytes.to_string buf)
     with Unix.Unix_error (Unix.ENOENT, "stat", _) -> None
   end else  (* other URL, pass it to Http_user_agent *)
     try
@@ -298,11 +298,11 @@ let extension s =
 
 let temp_file_of_uri uri =
   let flat_string s s' c =
-    let cs = String.copy s in
+    let cs = Bytes.of_string s in
     for i = 0 to (String.length s) - 1 do
       if String.contains s' s.[i] then cs.[i] <- c
     done;
-    cs
+    Bytes.to_string cs
   in
   let user = try Unix.getlogin () with _ -> "" in
   Filename.open_temp_file (user ^ flat_string uri ".-=:;!?/&" '_') ""
index c17435f6a25a4f5f7848fc9dcc2435a3e36d2911..4ff552a4bf77ceea7f44520bd9a5b353028c16f0 100644 (file)
@@ -37,7 +37,7 @@ let index_fname = "INDEX"
 
 (******************************* HELPERS **************************************)
 
-let trailing_slash_RE = Pcre.regexp "/$"
+(*let trailing_slash_RE = Pcre.regexp "/$"*)
 let relative_RE_raw = "(^[^/]+(/[^/]+)*/?$)"
 let relative_RE = Pcre.regexp relative_RE_raw
 let file_scheme_RE_raw = "(^file://)"
@@ -115,7 +115,7 @@ let keep_first l =
 let lookup uri =
   let matches =
     HExtlib.filter_map 
-      (fun (rex, _, l, _ as entry) -> 
+      (fun (rex, _, _l, _ as entry) -> 
          try
            let got = Pcre.extract ~full_match:true ~rex uri in
            Some (entry, String.length got.(0))
index 571479d78e1c949ff569fb202a1a45d96f4428c4..0f44f07d590c083fa183dc969cf356175517a7aa 100644 (file)
@@ -40,7 +40,7 @@ let get url =
 let get_and_save url dest_filename =
   let out_channel = open_out dest_filename in
   (try
-    Http_user_agent.get_iter (output_string out_channel) url;
+    Http_user_agent.get_iter (output_bytes out_channel) url;
   with exn ->
     close_out out_channel;
     Sys.remove dest_filename;
@@ -49,11 +49,11 @@ let get_and_save url dest_filename =
 
 let get_and_save_to_tmp url =
   let flat_string s s' c =
-    let cs = String.copy s in
+    let cs = Bytes.of_string s in
     for i = 0 to (String.length s) - 1 do
       if String.contains s' s.[i] then cs.[i] <- c
     done;
-    cs
+    Bytes.to_string cs
   in
   let user = try Unix.getlogin () with _ -> "" in
   let tmp_file =
index e70c83c775c2c4c31f9f428867d0ef7b521ef616..bf8b5d3f581eab1cc627878dce02e05d55e4595c 100644 (file)
@@ -1,5 +1,10 @@
-grafiteAstPp.cmi : grafiteAst.cmo
 grafiteAst.cmo :
 grafiteAst.cmx :
-grafiteAstPp.cmo : grafiteAst.cmo grafiteAstPp.cmi
-grafiteAstPp.cmx : grafiteAst.cmx grafiteAstPp.cmi
+grafiteAstPp.cmo : \
+    grafiteAst.cmo \
+    grafiteAstPp.cmi
+grafiteAstPp.cmx : \
+    grafiteAst.cmx \
+    grafiteAstPp.cmi
+grafiteAstPp.cmi : \
+    grafiteAst.cmo
index 4a1ca42e9e7b83203739006eb1df032ce7c8629d..be6de9f620c2921d2fe4f76ef368a0d4050c712f 100644 (file)
@@ -1,5 +1,6 @@
-grafiteAstPp.cmi : grafiteAst.cmx
-grafiteAst.cmo :
 grafiteAst.cmx :
-grafiteAstPp.cmo : grafiteAst.cmx grafiteAstPp.cmi
-grafiteAstPp.cmx : grafiteAst.cmx grafiteAstPp.cmi
+grafiteAstPp.cmx : \
+    grafiteAst.cmx \
+    grafiteAstPp.cmi
+grafiteAstPp.cmi : \
+    grafiteAst.cmx
index 60c4660680436ba7036c4d6e8bea08bb2e509559..42d7df86492625b3b8c00340affcce2f5ad995e2 100644 (file)
@@ -71,7 +71,7 @@ let rec pp_ntactic status ~map_unicode_to_tex =
  let pp_tactic_pattern = pp_tactic_pattern ~map_unicode_to_tex in
  function
   | NApply (_,t) -> "@" ^ NotationPp.pp_term status t
-  | NSmartApply (_,t) -> "fixme"
+  | NSmartApply (_,_t) -> "fixme"
   | NAuto (_,(None,flgs)) ->
       "nautobatch" ^
         String.concat " " (List.map (fun a,b -> a ^ "=" ^ b) flgs)
@@ -79,26 +79,26 @@ let rec pp_ntactic status ~map_unicode_to_tex =
       "nautobatch" ^ " by " ^
          (String.concat "," (List.map (NotationPp.pp_term status) l)) ^
         String.concat " " (List.map (fun a,b -> a ^ "=" ^ b) flgs)
-  | NCases (_,what,where) -> "ncases " ^ NotationPp.pp_term status what ^
+  | NCases (_,what,_where) -> "ncases " ^ NotationPp.pp_term status what ^
       "...to be implemented..." ^ " " ^ "...to be implemented..."
   | NConstructor (_,None,l) -> "@ " ^
       String.concat " " (List.map (NotationPp.pp_term status) l)
   | NConstructor (_,Some x,l) -> "@" ^ string_of_int x ^ " " ^
       String.concat " " (List.map (NotationPp.pp_term status) l)
   | NCase1 (_,n) -> "*" ^ n ^ ":"
-  | NChange (_,what,wwhat) -> "nchange " ^ "...to be implemented..." ^
+  | NChange (_,_what,wwhat) -> "nchange " ^ "...to be implemented..." ^
       " with " ^ NotationPp.pp_term status wwhat
   | NCut (_,t) -> "ncut " ^ NotationPp.pp_term status t
 (*| NDiscriminate (_,t) -> "ndiscriminate " ^ NotationPp.pp_term status t
   | NSubst (_,t) -> "nsubst " ^ NotationPp.pp_term status t *)
   | NClear (_,l) -> "nclear " ^ String.concat " " l
-  | NDestruct (_,dom,skip) -> "ndestruct ..."
-  | NElim (_,what,where) -> "nelim " ^ NotationPp.pp_term status what ^
+  | NDestruct (_,_dom,_skip) -> "ndestruct ..."
+  | NElim (_,what,_where) -> "nelim " ^ NotationPp.pp_term status what ^
       "...to be implemented..." ^ " " ^ "...to be implemented..."
   | NId _ -> "nid"
   | NIntro (_,n) -> "#" ^ n
   | NIntros (_,l) -> "#" ^ String.concat " " l
-  | NInversion (_,what,where) -> "ninversion " ^ NotationPp.pp_term status what ^
+  | NInversion (_,what,_where) -> "ninversion " ^ NotationPp.pp_term status what ^
       "...to be implemented..." ^ " " ^ "...to be implemented..."
   | NLApply (_,t) -> "lapply " ^ NotationPp.pp_term status t
   | NRewrite (_,dir,n,where) -> "nrewrite " ^
@@ -164,11 +164,14 @@ let rec pp_ntactic status ~map_unicode_to_tex =
        String.concat " "
         (List.map (function (id,term) -> "(" ^ id ^ ": (" ^ NotationPp.pp_term status  term ^  "))")
          args)
+  | PrintStack _ -> "print_stack"
 ;;
 
 let pp_nmacro status = function
   | NCheck (_, term) -> Printf.sprintf "ncheck %s" (NotationPp.pp_term status term)
   | Screenshot (_, name) -> Printf.sprintf "screenshot \"%s\"" name
+  | NAutoInteractive _
+  | NIntroGuess _ -> assert false (* TODO *)
 ;;
 
 let pp_l1_pattern = NotationPp.pp_term
@@ -194,7 +197,7 @@ let pp_precedence i = sprintf "with precedence %d" i
 let pp_argument_pattern = function
   | NotationPt.IdentArg (eta_depth, name) ->
       let eta_buf = Buffer.create 5 in
-      for i = 1 to eta_depth do
+      for _i = 1 to eta_depth do
         Buffer.add_string eta_buf "\\eta."
       done;
       sprintf "%s%s" (Buffer.contents eta_buf) name
index e6d4942c67b319e5e52866b737ef24ee4091860e..bffffc1b8926f0a2f03971d74c4d445412ef6f9f 100644 (file)
@@ -1,11 +1,23 @@
-grafiteTypes.cmi :
-nCicCoercDeclaration.cmi : grafiteTypes.cmi
-grafiteEngine.cmi : grafiteTypes.cmi
-grafiteTypes.cmo : grafiteTypes.cmi
-grafiteTypes.cmx : grafiteTypes.cmi
-nCicCoercDeclaration.cmo : grafiteTypes.cmi nCicCoercDeclaration.cmi
-nCicCoercDeclaration.cmx : grafiteTypes.cmx nCicCoercDeclaration.cmi
-grafiteEngine.cmo : nCicCoercDeclaration.cmi grafiteTypes.cmi \
+grafiteEngine.cmo : \
+    nCicCoercDeclaration.cmi \
+    grafiteTypes.cmi \
     grafiteEngine.cmi
-grafiteEngine.cmx : nCicCoercDeclaration.cmx grafiteTypes.cmx \
+grafiteEngine.cmx : \
+    nCicCoercDeclaration.cmx \
+    grafiteTypes.cmx \
     grafiteEngine.cmi
+grafiteEngine.cmi : \
+    grafiteTypes.cmi
+grafiteTypes.cmo : \
+    grafiteTypes.cmi
+grafiteTypes.cmx : \
+    grafiteTypes.cmi
+grafiteTypes.cmi :
+nCicCoercDeclaration.cmo : \
+    grafiteTypes.cmi \
+    nCicCoercDeclaration.cmi
+nCicCoercDeclaration.cmx : \
+    grafiteTypes.cmx \
+    nCicCoercDeclaration.cmi
+nCicCoercDeclaration.cmi : \
+    grafiteTypes.cmi
index e6d4942c67b319e5e52866b737ef24ee4091860e..6e9ccb21aa298feaf832ca1ec51706dd0ae0fcde 100644 (file)
@@ -1,11 +1,14 @@
-grafiteTypes.cmi :
-nCicCoercDeclaration.cmi : grafiteTypes.cmi
-grafiteEngine.cmi : grafiteTypes.cmi
-grafiteTypes.cmo : grafiteTypes.cmi
-grafiteTypes.cmx : grafiteTypes.cmi
-nCicCoercDeclaration.cmo : grafiteTypes.cmi nCicCoercDeclaration.cmi
-nCicCoercDeclaration.cmx : grafiteTypes.cmx nCicCoercDeclaration.cmi
-grafiteEngine.cmo : nCicCoercDeclaration.cmi grafiteTypes.cmi \
-    grafiteEngine.cmi
-grafiteEngine.cmx : nCicCoercDeclaration.cmx grafiteTypes.cmx \
+grafiteEngine.cmx : \
+    nCicCoercDeclaration.cmx \
+    grafiteTypes.cmx \
     grafiteEngine.cmi
+grafiteEngine.cmi : \
+    grafiteTypes.cmi
+grafiteTypes.cmx : \
+    grafiteTypes.cmi
+grafiteTypes.cmi :
+nCicCoercDeclaration.cmx : \
+    grafiteTypes.cmx \
+    nCicCoercDeclaration.cmi
+nCicCoercDeclaration.cmi : \
+    grafiteTypes.cmi
index 93396d2bdbc2c71de85dcab5c2bcb0199697379e..71f03690445cde7762867dcd05240e432285b7f0 100644 (file)
@@ -40,7 +40,7 @@ let basic_eval_unification_hint (t,n) status =
 
 let inject_unification_hint =
  let basic_eval_unification_hint (t,n) 
-   ~refresh_uri_in_universe ~refresh_uri_in_term ~refresh_uri_in_reference
+   ~refresh_uri_in_universe:_ ~refresh_uri_in_term ~refresh_uri_in_reference:_
    ~alias_only status
  =
   if not alias_only then
@@ -88,7 +88,7 @@ let basic_eval_interpretation ~alias_only (dsc, (symbol, args), cic_appl_pattern
 
 let inject_interpretation =
  let basic_eval_interpretation (dsc, (symbol, args), cic_appl_pattern)
-   ~refresh_uri_in_universe ~refresh_uri_in_term ~refresh_uri_in_reference
+   ~refresh_uri_in_universe:_ ~refresh_uri_in_term:_ ~refresh_uri_in_reference:_
    ~alias_only
  =
   let rec refresh =
@@ -117,8 +117,8 @@ let basic_eval_alias (mode,diff) status =
 ;;
 
 let inject_alias =
- let basic_eval_alias (mode,diff) ~refresh_uri_in_universe ~refresh_uri_in_term
-   ~refresh_uri_in_reference ~alias_only =
+ let basic_eval_alias (mode,diff) ~refresh_uri_in_universe:_ ~refresh_uri_in_term:_
+   ~refresh_uri_in_reference:_ ~alias_only:_ =
    basic_eval_alias (mode,diff)
  in
   GrafiteTypes.Serializer.register#run "alias" basic_eval_alias
@@ -138,7 +138,7 @@ let basic_eval_input_notation (l1,l2) status =
 
 let inject_input_notation =
  let basic_eval_input_notation (l1,l2)
-  ~refresh_uri_in_universe ~refresh_uri_in_term ~refresh_uri_in_reference
+  ~refresh_uri_in_universe:_ ~refresh_uri_in_term ~refresh_uri_in_reference
   ~alias_only status
  =
    if not alias_only then
@@ -169,7 +169,7 @@ let basic_eval_output_notation (l1,l2) status =
 
 let inject_output_notation =
  let basic_eval_output_notation (l1,l2)
-  ~refresh_uri_in_universe ~refresh_uri_in_term ~refresh_uri_in_reference
+  ~refresh_uri_in_universe:_ ~refresh_uri_in_term ~refresh_uri_in_reference
   ~alias_only status
  =
   if not alias_only then
@@ -195,8 +195,8 @@ let eval_output_notation status data=
 ;;
 
 let record_index_obj = 
- let aux l ~refresh_uri_in_universe 
-   ~refresh_uri_in_term ~refresh_uri_in_reference ~alias_only status
+ let aux l ~refresh_uri_in_universe:_
+   ~refresh_uri_in_term ~refresh_uri_in_reference:_ ~alias_only status
  =
   let refresh_uri_in_term = refresh_uri_in_term (status:>NCic.status) in
   if not alias_only then
@@ -297,8 +297,8 @@ let basic_extract_ocaml_obj obj status =
 
 let inject_extract_obj =
  let basic_extract_obj info
-   ~refresh_uri_in_universe ~refresh_uri_in_term ~refresh_uri_in_reference
-   ~alias_only status
+   ~refresh_uri_in_universe:__ ~refresh_uri_in_term:_ ~refresh_uri_in_reference
+   ~alias_only:_ status
  =
   let info= NCicExtraction.refresh_uri_in_info ~refresh_uri_in_reference info in
    status#set_extraction_db
@@ -309,8 +309,8 @@ let inject_extract_obj =
 
 let inject_extract_ocaml_obj =
  let basic_extract_ocaml_obj info
-   ~refresh_uri_in_universe ~refresh_uri_in_term ~refresh_uri_in_reference
-   ~alias_only status
+   ~refresh_uri_in_universe:_ ~refresh_uri_in_term:_ ~refresh_uri_in_reference
+   ~alias_only:_ status
  =
   let info= OcamlExtractionTable.refresh_uri_in_info ~refresh_uri_in_reference ~refresh_uri:NCicLibrary.refresh_uri info in
    status#set_ocaml_extraction_db
@@ -358,7 +358,7 @@ let index_eq print uri (status:#NCic.status) =
 
 let record_index_eq =
  let basic_index_eq uri
-   ~refresh_uri_in_universe ~refresh_uri_in_term ~refresh_uri_in_reference 
+   ~refresh_uri_in_universe:_ ~refresh_uri_in_term:_ ~refresh_uri_in_reference:_ 
    ~alias_only status
    = if not alias_only then index_eq false (NCicLibrary.refresh_uri uri) status 
      else
@@ -381,7 +381,7 @@ let index_eq_for_auto status uri =
 
 let inject_constraint =
  let basic_eval_add_constraint (acyclic,u1,u2) 
-     ~refresh_uri_in_universe ~refresh_uri_in_term ~refresh_uri_in_reference
+     ~refresh_uri_in_universe ~refresh_uri_in_term:_ ~refresh_uri_in_reference:_
      ~alias_only status
  =
   if not alias_only then
@@ -508,8 +508,8 @@ let eval_ng_tac tac =
   | GrafiteAst.RewritingStep (_,rhs,just,cont) ->
      Declarative.rewritingstep (text,prefix_len,rhs)
                                 (match just with 
-                                `Term t -> just_to_tacstatus_just just text prefix_len
-                                | `Auto params -> just_to_tacstatus_just just text prefix_len
+                                  `Term _
+                                | `Auto _ -> just_to_tacstatus_just just text prefix_len
                                 |`Proof -> `Proof
                                 |`SolveWith t -> `SolveWith (text,prefix_len,t)
                                 )
@@ -604,7 +604,7 @@ let extract_uris status uris =
 
 let rec eval_ncommand ~include_paths opts status (text,prefix_len,cmd) =
   match cmd with
-  | GrafiteAst.Include (loc, mode, fname) ->
+  | GrafiteAst.Include (_loc, mode, fname) ->
      let _root, baseuri, fullpath, _rrelpath = 
        Librarian.baseuri_of_script ~include_paths fname in
      let baseuri = NUri.uri_of_string baseuri in
@@ -615,7 +615,7 @@ let rec eval_ncommand ~include_paths opts status (text,prefix_len,cmd) =
        ~alias_only ~baseuri ~fname:fullpath status in
      OcamlExtraction.print_open status
       (NCicLibrary.get_transitively_included status)
-  | GrafiteAst.UnificationHint (loc, t, n) -> eval_unification_hint status t n
+  | GrafiteAst.UnificationHint (_loc, t, n) -> eval_unification_hint status t n
   | GrafiteAst.NCoercion (loc, name, compose, None) ->
      let status, t, ty, source, target =
        let o_t = NotationPt.Ident (name,None) in
@@ -646,7 +646,7 @@ let rec eval_ncommand ~include_paths opts status (text,prefix_len,cmd) =
        GrafiteAst.NCoercion (loc, name, compose, Some (t, ty, source, target))
       in
       eval_ncommand ~include_paths opts status (text,prefix_len,cmd)
-  | GrafiteAst.NCoercion (loc, name, compose, Some (t, ty, source, target)) ->
+  | GrafiteAst.NCoercion (_loc, name, compose, Some (t, ty, source, target)) ->
      let status, composites =
       NCicCoercDeclaration.eval_ncoercion status name compose t ty source
        target in
@@ -654,11 +654,11 @@ let rec eval_ncommand ~include_paths opts status (text,prefix_len,cmd) =
      let mode = GrafiteAst.WithPreferences in (* MATITA 1.0: fixme *)
      let aliases = GrafiteDisambiguate.aliases_for_objs status composites in
       eval_alias status (mode,aliases)
-  | GrafiteAst.NQed (loc,index) ->
+  | GrafiteAst.NQed (_loc,index) ->
      if status#ng_mode <> `ProofMode then
       raise (GrafiteTypes.Command_error "Not in proof mode")
      else
-      let uri,height,menv,subst,obj_kind = status#obj in
+      let uri,_height,menv,subst,obj_kind = status#obj in
        if menv <> [] then
         raise
          (GrafiteTypes.Command_error"You can't Qed an incomplete theorem")
@@ -761,7 +761,7 @@ let rec eval_ncommand ~include_paths opts status (text,prefix_len,cmd) =
            let status = match nobj with
                NCic.Inductive (is_ind,leftno,itl,_) ->
                  List.fold_left (fun status it ->      
-                 (let _,ind_name,ty,cl = it in
+                 (let _,ind_name,_ty,_cl = it in
                   List.fold_left 
                    (fun status outsort ->
                       let status = status#set_ng_mode `ProofMode in
@@ -787,11 +787,11 @@ let rec eval_ncommand ~include_paths opts status (text,prefix_len,cmd) =
               | _ -> status
            in
            let status = match nobj with
-               NCic.Inductive (is_ind,leftno,itl,_) ->
+               NCic.Inductive (_is_ind,leftno,itl,_) ->
                  (* first leibniz *)
                  let status' = List.fold_left
                    (fun status it ->
-                      let _,ind_name,ty,cl = it in
+                      let _,ind_name,_ty,_cl = it in
                       let status = status#set_ng_mode `ProofMode in
                       try
                        (let status,invobj =
@@ -818,7 +818,7 @@ let rec eval_ncommand ~include_paths opts status (text,prefix_len,cmd) =
                 (* then JMeq *)
                 List.fold_left
                    (fun status it ->
-                      let _,ind_name,ty,cl = it in
+                      let _,ind_name,_ty,_cl = it in
                       let status = status#set_ng_mode `ProofMode in
                       try
                        (let status,invobj =
@@ -873,7 +873,7 @@ let rec eval_ncommand ~include_paths opts status (text,prefix_len,cmd) =
            exn ->
             NCicLibrary.time_travel old_status;
             raise exn)
-  | GrafiteAst.NCopy (log,tgt,src_uri, map) ->
+  | GrafiteAst.NCopy (_loc,tgt,src_uri, map) ->
      if status#ng_mode <> `CommandMode then
       raise (GrafiteTypes.Command_error "Not in command mode")
      else
@@ -904,14 +904,14 @@ let rec eval_ncommand ~include_paths opts status (text,prefix_len,cmd) =
        let status = subst_metasenv_and_fix_names status in
        let status = status#set_ng_mode `ProofMode in
        eval_ncommand ~include_paths opts status ("",0,GrafiteAst.NQed(Stdpp.dummy_loc,false))
-  | GrafiteAst.NObj (loc,obj,index) ->
+  | GrafiteAst.NObj (_loc,obj,index) ->
      if status#ng_mode <> `CommandMode then
       raise (GrafiteTypes.Command_error "Not in command mode")
      else
       let status,obj =
        GrafiteDisambiguate.disambiguate_nobj status
         ~baseuri:status#baseuri (text,prefix_len,obj) in
-      let uri,height,nmenv,nsubst,nobj = obj in
+      let _uri,_height,nmenv,_nsubst,_nobj = obj in
       let ninitial_stack = Continuationals.Stack.of_nmetasenv nmenv in
       let status = status#set_obj obj in
       let status = status#set_stack ninitial_stack in
@@ -922,12 +922,12 @@ let rec eval_ncommand ~include_paths opts status (text,prefix_len,cmd) =
            eval_ncommand ~include_paths opts status
              ("",0,GrafiteAst.NQed(Stdpp.dummy_loc,index))
         | _ -> status)
-  | GrafiteAst.NDiscriminator (loc, indty) ->
+  | GrafiteAst.NDiscriminator (_loc, indty) ->
       if status#ng_mode <> `CommandMode then
         raise (GrafiteTypes.Command_error "Not in command mode")
       else
         let status = status#set_ng_mode `ProofMode in
-        let metasenv,subst,status,indty =
+        let _metasenv,_subst,status,indty =
           GrafiteDisambiguate.disambiguate_nterm status `XTNone [] [] [] (text,prefix_len,indty) in
         let indtyno, (_,_,tys,_,_),leftno = match indty with
             NCic.Const ((NReference.Ref (_,NReference.Ind (_,indtyno,leftno))) as r) ->
@@ -942,7 +942,7 @@ let rec eval_ncommand ~include_paths opts status (text,prefix_len,cmd) =
                [] -> eval_ncommand ~include_paths opts status ("",0,GrafiteAst.NQed(Stdpp.dummy_loc,false))
              | _ -> prerr_endline ("Discriminator: non empty metasenv");
                     status)
-  | GrafiteAst.NInverter (loc, name, indty, selection, sort) ->
+  | GrafiteAst.NInverter (_loc, name, indty, selection, sort) ->
      if status#ng_mode <> `CommandMode then
       raise (GrafiteTypes.Command_error "Not in command mode")
      else
@@ -962,7 +962,7 @@ let rec eval_ncommand ~include_paths opts status (text,prefix_len,cmd) =
             "ninverter: found target %s, which is not a sort"
              (status#ppterm ~metasenv ~subst ~context:[] sort))) in
       let status = status#set_ng_mode `ProofMode in
-      let metasenv,subst,status,indty =
+      let _metasenv,_subst,status,indty =
        GrafiteDisambiguate.disambiguate_nterm status `XTNone [] [] subst
         (text,prefix_len,indty) in
       let indtyno,(_,leftno,tys,_,_) =
@@ -983,16 +983,16 @@ let rec eval_ncommand ~include_paths opts status (text,prefix_len,cmd) =
             eval_ncommand ~include_paths opts status
              ("",0,GrafiteAst.NQed(Stdpp.dummy_loc,false))
         | _ -> assert false)
-  | GrafiteAst.NUnivConstraint (loc,acyclic,u1,u2) ->
+  | GrafiteAst.NUnivConstraint (_loc,acyclic,u1,u2) ->
       eval_add_constraint status acyclic [`Type,u1] [`Type,u2]
   (* ex lexicon commands *)
-  | GrafiteAst.Interpretation (loc, dsc, (symbol, args), cic_appl_pattern) ->
+  | GrafiteAst.Interpretation (_loc, dsc, (symbol, args), cic_appl_pattern) ->
      let cic_appl_pattern =
       GrafiteDisambiguate.disambiguate_cic_appl_pattern status args
        cic_appl_pattern
      in
       eval_interpretation status (dsc,(symbol, args),cic_appl_pattern)
-  | GrafiteAst.Notation (loc, dir, l1, associativity, precedence, l2) ->
+  | GrafiteAst.Notation (_loc, dir, l1, associativity, precedence, l2) ->
       let l1 = 
         CicNotationParser.check_l1_pattern
          l1 (dir = Some `RightToLeft) precedence associativity
@@ -1003,23 +1003,23 @@ let rec eval_ncommand ~include_paths opts status (text,prefix_len,cmd) =
       in
        if dir <> Some `LeftToRight then eval_output_notation status (l1,l2)
        else status
-  | GrafiteAst.Alias (loc, spec) -> 
+  | GrafiteAst.Alias (_loc, spec) -> 
      let diff =
       (*CSC: Warning: this code should be factorized with the corresponding
              code in DisambiguatePp *)
       match spec with
-      | GrafiteAst.Ident_alias (id,uri) -> 
+      | GrafiteAst.Ident_alias (id,_uri) -> 
          [DisambiguateTypes.Id id,spec]
-      | GrafiteAst.Symbol_alias (symb, instance, desc) ->
+      | GrafiteAst.Symbol_alias (symb, instance, _desc) ->
          [DisambiguateTypes.Symbol (symb,instance),spec]
-      | GrafiteAst.Number_alias (instance,desc) ->
+      | GrafiteAst.Number_alias (instance,_desc) ->
          [DisambiguateTypes.Num instance,spec]
      in
       let mode = GrafiteAst.WithPreferences in(*assert false in (* VEDI SOPRA *) MATITA 1.0*)
        eval_alias status (mode,diff)
 ;;
 
-let eval_comment opts status (text,prefix_len,c) = status
+let eval_comment _opts status (_text,_prefix_len,_c) = status
 
 let rec eval_executable ~include_paths opts status (text,prefix_len,ex) =
   match ex with
index 74a7eb6a4a4867962ebb72ea78708ec4e0ea64d3..a2ed8044a187a9236f365f18794a9f73ee65c02b 100644 (file)
@@ -152,7 +152,7 @@ disambiguation error")))
       aux 0 [] ty
   in
   let status, tgt, arity = 
-    let metasenv,subst,status,tgt =
+    let _metasenv,subst,status,tgt =
       GrafiteDisambiguate.disambiguate_nterm 
         status `XTSort [] [] [] ("",0,tgt) in
     let tgt = NCicUntrusted.apply_subst status subst [] tgt in
@@ -182,7 +182,7 @@ let fresh_uri status prefix suffix =
 
 exception Stop;;
 
-let close_graph name t s d to_s from_d p a status =
+let close_graph _name t s d to_s from_d _p a status =
   let c =
     List.find 
      (function (_,_,NCic.Appl (x::_),_,_) -> x = t | _ -> assert false) 
@@ -228,7 +228,7 @@ let close_graph name t s d to_s from_d p a status =
          let pos = 
            match p with 
            | NCic.Meta (p,_) -> pos_in_list p (List.map fst metasenv) 
-           | t -> raise Stop
+           | _t -> raise Stop
          in
          let ty = NCicTypeChecker.typeof status ~metasenv:[] ~subst:[] [] bo in
          let src,tgt = src_tgt_of_ty_cpos_arity status ty pos arity in
@@ -292,8 +292,8 @@ let record_ncoercion =
   let d = refresh_uri_in_term d in
    basic_index_ncoercion (name,compose,t,s,d,p,a)
  in
- let aux_l l ~refresh_uri_in_universe ~refresh_uri_in_term
-  ~refresh_uri_in_reference ~alias_only status
+ let aux_l l ~refresh_uri_in_universe:_ ~refresh_uri_in_term
+  ~refresh_uri_in_reference:_ ~alias_only status
  =
   if not alias_only then
    List.fold_right (aux ~refresh_uri_in_term:(refresh_uri_in_term (status:>NCic.status))) l status
index 752b0d88d5ca9ccf9f59da28b6578d37e2a58763..13f0fb882f91c6fc1dc7b6ec49a9bb35463a843f 100644 (file)
@@ -1,6 +1,11 @@
+grafiteParser.cmo : \
+    grafiteParser.cmi
+grafiteParser.cmx : \
+    grafiteParser.cmi
 grafiteParser.cmi :
-print_grammar.cmi : grafiteParser.cmi
-grafiteParser.cmo : grafiteParser.cmi
-grafiteParser.cmx : grafiteParser.cmi
-print_grammar.cmo : print_grammar.cmi
-print_grammar.cmx : print_grammar.cmi
+print_grammar.cmo : \
+    print_grammar.cmi
+print_grammar.cmx : \
+    print_grammar.cmi
+print_grammar.cmi : \
+    grafiteParser.cmi
index 752b0d88d5ca9ccf9f59da28b6578d37e2a58763..4b014236d6d2f86ed97fc75ebd600632dc5d3004 100644 (file)
@@ -1,6 +1,7 @@
+grafiteParser.cmx : \
+    grafiteParser.cmi
 grafiteParser.cmi :
-print_grammar.cmi : grafiteParser.cmi
-grafiteParser.cmo : grafiteParser.cmi
-grafiteParser.cmx : grafiteParser.cmi
-print_grammar.cmo : print_grammar.cmi
-print_grammar.cmx : print_grammar.cmi
+print_grammar.cmx : \
+    print_grammar.cmi
+print_grammar.cmi : \
+    grafiteParser.cmi
index 164153916cd8f45dd309cec10d7035c3c51143ec..b5b20bb60dc3c6a7dba8327020d58b9da6f9228c 100644 (file)
@@ -14,7 +14,7 @@ clean:
 # soon as we have ocaml 3.09 everywhere and "loc" occurrences are replaced by
 # "_loc" occurrences
 UTF8DIR = $(shell $(OCAMLFIND) query helm-syntax_extensions)
-ULEXDIR = $(shell $(OCAMLFIND) query ulex08)
+ULEXDIR = $(shell $(OCAMLFIND) query ulex-camlp5)
 MY_SYNTAXOPTIONS = -pp "camlp5o -I $(UTF8DIR) -I $(ULEXDIR) pa_extend.cmo pa_ulex.cma pa_unicode_macro.cma -loc loc"
 grafiteParser.cmo: SYNTAXOPTIONS = $(MY_SYNTAXOPTIONS)
 grafiteParser.cmx: SYNTAXOPTIONS = $(MY_SYNTAXOPTIONS)
@@ -22,8 +22,8 @@ depend: SYNTAXOPTIONS = $(MY_SYNTAXOPTIONS)
 depend.opt: SYNTAXOPTIONS = $(MY_SYNTAXOPTIONS)
 # </cross>
 #
-grafiteParser.cmo: OCAMLC = $(OCAMLC_P4)
-grafiteParser.cmx: OCAMLOPT = $(OCAMLOPT_P4)
+grafiteParser.cmo: OCAMLC = $(OCAMLC_P4) -w -27
+grafiteParser.cmx: OCAMLOPT = $(OCAMLOPT_P4) -w -27
 
 include ../../Makefile.defs
 include ../Makefile.common
index 738ceb4dabbac9349a75a8195996d079dd7246b6..9fea12e40fbd9ceda710866d0862757f3df1e396 100644 (file)
@@ -105,7 +105,7 @@ let needs_brackets t =
   count_brothers t > 1
 
 let visit_description desc fmt self = 
-  let skip s = true in
+  let skip _s = true in
   let inline s = List.mem s [ "int" ] in
   
   let rec visit_entry e ?level todo is_son  =
@@ -140,7 +140,7 @@ let visit_description desc fmt self =
             (fun x -> Sself :: x) (flatten_tree suff) @ flatten_tree pref)
           todo is_son  
     
-  and visit_tree name t todo is_son  = 
+  and visit_tree name t todo _is_son  = 
     if List.for_all (List.for_all is_symbol_dummy) t then todo else (
     Format.fprintf fmt "@[<v>";
     (match name with 
index 6f2769b943d3b17c0eaa88d03ff693cda70b64e2..2cf0d42135f4b7121b3898542b693451ef444599 100644 (file)
@@ -1,9 +1,15 @@
+librarian.cmo : \
+    librarian.cmi
+librarian.cmx : \
+    librarian.cmi
 librarian.cmi :
-libraryMisc.cmi :
+libraryClean.cmo : \
+    libraryClean.cmi
+libraryClean.cmx : \
+    libraryClean.cmi
 libraryClean.cmi :
-librarian.cmo : librarian.cmi
-librarian.cmx : librarian.cmi
-libraryMisc.cmo : libraryMisc.cmi
-libraryMisc.cmx : libraryMisc.cmi
-libraryClean.cmo : libraryClean.cmi
-libraryClean.cmx : libraryClean.cmi
+libraryMisc.cmo : \
+    libraryMisc.cmi
+libraryMisc.cmx : \
+    libraryMisc.cmi
+libraryMisc.cmi :
index 6f2769b943d3b17c0eaa88d03ff693cda70b64e2..d960dc9be94174149284cd7bba2b3c24c47f5006 100644 (file)
@@ -1,9 +1,9 @@
+librarian.cmx : \
+    librarian.cmi
 librarian.cmi :
-libraryMisc.cmi :
+libraryClean.cmx : \
+    libraryClean.cmi
 libraryClean.cmi :
-librarian.cmo : librarian.cmi
-librarian.cmx : librarian.cmi
-libraryMisc.cmo : libraryMisc.cmi
-libraryMisc.cmx : libraryMisc.cmi
-libraryClean.cmo : libraryClean.cmi
-libraryClean.cmx : libraryClean.cmi
+libraryMisc.cmx : \
+    libraryMisc.cmi
+libraryMisc.cmi :
index 13fccbfa25479beee0e52634cc75ebddf7dbf2ec..bcb84fd6791f9f142defb474dd33f6c8c83958cd 100644 (file)
@@ -41,7 +41,7 @@ let find_root path =
   let path = absolutize path in
   let paths = List.rev (Str.split (Str.regexp "/") path) in
   let rec build = function
-    | he::tl as l -> ("/" ^ String.concat "/" (List.rev l) ^ "/") :: build tl
+    | _he::tl as l -> ("/" ^ String.concat "/" (List.rev l) ^ "/") :: build tl
     | [] -> ["/"]
   in
   let paths = List.map HExtlib.normalize_path (build paths) in
@@ -78,7 +78,7 @@ let load_root_file rootpath =
 
 let find_root_for ~include_paths file = 
   let include_paths = "" :: Sys.getcwd () :: include_paths in
-   let rec find_path_for file =
+   let find_path_for file =
       try HExtlib.find_in include_paths file
       with Failure "find_in" -> 
        HLog.error ("We are in: " ^ Sys.getcwd ());
index 8d78189920c8db5f6c68e9449b476aed3c10b71a..1b3df75f8e89011a3affc7e3a80e80011e193713 100644 (file)
 
 (* $Id$ *)
 
-open Printf
-
 let debug = false
 let debug_prerr = if debug then prerr_endline else ignore
 
-module HGT = Http_getter_types;;
-module HG = Http_getter;;
+(*module HGT = Http_getter_types;;*)
+(*module HG = Http_getter;;*)
 (*module UM = UriManager;;*)
 
-let decompile = ref (fun ~baseuri -> assert false);;
+let decompile = ref (fun ~baseuri:_ -> assert false);;
 let set_decompile_cb f = decompile := f;;
 
 (*
@@ -219,11 +217,11 @@ let moo_root_dir = lazy (
 ;;
 *)
 
-let rec close_db cache_of_processed_baseuri uris next =
+let close_db _cache_of_processed_baseuri uris _next =
   uris (* MATITA 1.0 *)
 ;;
 
-let clean_baseuris ?(verbose=true) buris =
+let clean_baseuris ?verbose:(_=true) _buris =
  (* MATITA 1.0 *) () (*
   let cache_of_processed_baseuri = Hashtbl.create 1024 in
   let buris = List.map Http_getter_misc.strip_trailing_slash buris in
index d1b4c37162663daab85eee7845f39b2422456992..26c231a99e90846a8bb680bcfbb4ce0a824e98f1 100644 (file)
@@ -1,3 +1,5 @@
+helmLogger.cmo : \
+    helmLogger.cmi
+helmLogger.cmx : \
+    helmLogger.cmi
 helmLogger.cmi :
-helmLogger.cmo : helmLogger.cmi
-helmLogger.cmx : helmLogger.cmi
index d1b4c37162663daab85eee7845f39b2422456992..f68fdd43edd08bca296439c4e75855fdc1bcf174 100644 (file)
@@ -1,3 +1,3 @@
+helmLogger.cmx : \
+    helmLogger.cmi
 helmLogger.cmi :
-helmLogger.cmo : helmLogger.cmi
-helmLogger.cmx : helmLogger.cmi
index c41674754fea271f1f9d6d38a3913089fa8bb599..467c05464457fc56b8658e11dc9a9e4c5e6b50c3 100644 (file)
@@ -15,7 +15,7 @@ type html_msg = [ `Error of html_tag | `Msg of html_tag ]
 
 type logger_fun = ?append_NL:bool -> html_msg -> unit
 
-let rec string_of_html_tag =
+let string_of_html_tag =
   let rec aux indent =
     let indent_str = String.make indent ' ' in
     function
index 01e2f5b1ef6d52b1677f749f6a30ec2eb6ed65db..d870b57dc6bbe3e0edafd2e1990288a17ce0491b 100644 (file)
@@ -1,6 +1,12 @@
-ncic2astMatcher.cmi :
+interpretations.cmo : \
+    ncic2astMatcher.cmi \
+    interpretations.cmi
+interpretations.cmx : \
+    ncic2astMatcher.cmx \
+    interpretations.cmi
 interpretations.cmi :
-ncic2astMatcher.cmo : ncic2astMatcher.cmi
-ncic2astMatcher.cmx : ncic2astMatcher.cmi
-interpretations.cmo : ncic2astMatcher.cmi interpretations.cmi
-interpretations.cmx : ncic2astMatcher.cmx interpretations.cmi
+ncic2astMatcher.cmo : \
+    ncic2astMatcher.cmi
+ncic2astMatcher.cmx : \
+    ncic2astMatcher.cmi
+ncic2astMatcher.cmi :
index 01e2f5b1ef6d52b1677f749f6a30ec2eb6ed65db..b526a0df50c27c55e8a8cca227e75fc1308f069b 100644 (file)
@@ -1,6 +1,7 @@
-ncic2astMatcher.cmi :
+interpretations.cmx : \
+    ncic2astMatcher.cmx \
+    interpretations.cmi
 interpretations.cmi :
-ncic2astMatcher.cmo : ncic2astMatcher.cmi
-ncic2astMatcher.cmx : ncic2astMatcher.cmi
-interpretations.cmo : ncic2astMatcher.cmi interpretations.cmi
-interpretations.cmx : ncic2astMatcher.cmx interpretations.cmi
+ncic2astMatcher.cmx : \
+    ncic2astMatcher.cmi
+ncic2astMatcher.cmi :
index 47b1ac0630ed7814bd7ad989e790cfbc5a29b35c..794859369bbc62f593f392b80b73fcf63d6e19b7 100644 (file)
@@ -107,7 +107,7 @@ let add_idrefs =
   List.fold_right (fun idref t -> Ast.AttributedTerm (`IdRef idref, t))
 
 let instantiate32 idrefs env symbol args =
-  let rec instantiate_arg = function
+  let instantiate_arg = function
     | Ast.IdentArg (n, name) ->
         let t = 
           try List.assoc name env 
@@ -267,7 +267,7 @@ let nast_of_cic0 status
     | NCic.Lambda (n,s,t) ->
         idref (Ast.Binder (`Lambda,(Ast.Ident (n,None), Some (k ~context s)),
          k ~context:((n,NCic.Decl s)::context) t))
-    | NCic.LetIn (n,s,ty,NCic.Rel 1) ->
+    | NCic.LetIn (_n,s,ty,NCic.Rel 1) ->
         idref (Ast.Cast (k ~context ty, k ~context s))
     | NCic.LetIn (n,s,ty,t) ->
         idref (Ast.LetIn ((Ast.Ident (n,None), Some (k ~context s)), k ~context
@@ -324,7 +324,7 @@ let nast_of_cic0 status
         in
        let rec eat_branch n ctx ty pat =
           match (ty, pat) with
-         | NCic.Prod (name, s, t), _ when n > 0 ->
+         | NCic.Prod (_name, _s, t), _ when n > 0 ->
              eat_branch (pred n) ctx t pat 
           | NCic.Prod (_, _, t), NCic.Lambda (name, s, t') ->
               let cv, rhs = eat_branch 0 ((name,NCic.Decl s)::ctx) t t' in
@@ -431,7 +431,7 @@ let nmap_context0 status ~idref ~metasenv ~subst context =
    ) context ([],[]))
 ;;
 
-let nmap_sequent0 status ~idref ~metasenv ~subst (i,(n,context,ty)) =
+let nmap_sequent0 status ~idref ~metasenv ~subst (i,(_n,context,ty)) =
  let module K = Content in
  let nast_of_cic =
   nast_of_cic1 status ~idref ~output_type:`Term ~metasenv ~subst in
@@ -457,7 +457,7 @@ let gen_id prefix seed =
   res
 ;;
 
-let build_def_item seed context metasenv id n t ty =
+let build_def_item seed _context _metasenv id n t ty =
  let module K = Content in
 (*
   try
@@ -543,7 +543,7 @@ let build_inductive b seed =
             K.inductive_constructors = build_constructors seed cl
            }
 in
-let build_fixpoint b seed = 
+let build_fixpoint _b seed = 
       fun (_,n,_,ty,t) ->
         let t = nast_of_cic ~context:[] t in
         let ty = nast_of_cic ~context:[] ty in
index 79fd839b24f42bc72c2f7a9221dfa9fc047acb37..7462feedb4c637085983f930cde0d7ed6cd9da36 100644 (file)
@@ -1,14 +1,26 @@
-nnumber_notation.cmi :
+disambiguateChoices.cmo : \
+    nnumber_notation.cmi \
+    disambiguateChoices.cmi
+disambiguateChoices.cmx : \
+    nnumber_notation.cmx \
+    disambiguateChoices.cmi
 disambiguateChoices.cmi :
-nCicDisambiguate.cmi :
-grafiteDisambiguate.cmi :
-nnumber_notation.cmo : nnumber_notation.cmi
-nnumber_notation.cmx : nnumber_notation.cmi
-disambiguateChoices.cmo : nnumber_notation.cmi disambiguateChoices.cmi
-disambiguateChoices.cmx : nnumber_notation.cmx disambiguateChoices.cmi
-nCicDisambiguate.cmo : nCicDisambiguate.cmi
-nCicDisambiguate.cmx : nCicDisambiguate.cmi
-grafiteDisambiguate.cmo : nCicDisambiguate.cmi disambiguateChoices.cmi \
+grafiteDisambiguate.cmo : \
+    nCicDisambiguate.cmi \
+    disambiguateChoices.cmi \
     grafiteDisambiguate.cmi
-grafiteDisambiguate.cmx : nCicDisambiguate.cmx disambiguateChoices.cmx \
+grafiteDisambiguate.cmx : \
+    nCicDisambiguate.cmx \
+    disambiguateChoices.cmx \
     grafiteDisambiguate.cmi
+grafiteDisambiguate.cmi :
+nCicDisambiguate.cmo : \
+    nCicDisambiguate.cmi
+nCicDisambiguate.cmx : \
+    nCicDisambiguate.cmi
+nCicDisambiguate.cmi :
+nnumber_notation.cmo : \
+    nnumber_notation.cmi
+nnumber_notation.cmx : \
+    nnumber_notation.cmi
+nnumber_notation.cmi :
index 79fd839b24f42bc72c2f7a9221dfa9fc047acb37..6904cfd3b7d85bf4f66651ac11acaf57ff2c8316 100644 (file)
@@ -1,14 +1,15 @@
-nnumber_notation.cmi :
+disambiguateChoices.cmx : \
+    nnumber_notation.cmx \
+    disambiguateChoices.cmi
 disambiguateChoices.cmi :
-nCicDisambiguate.cmi :
-grafiteDisambiguate.cmi :
-nnumber_notation.cmo : nnumber_notation.cmi
-nnumber_notation.cmx : nnumber_notation.cmi
-disambiguateChoices.cmo : nnumber_notation.cmi disambiguateChoices.cmi
-disambiguateChoices.cmx : nnumber_notation.cmx disambiguateChoices.cmi
-nCicDisambiguate.cmo : nCicDisambiguate.cmi
-nCicDisambiguate.cmx : nCicDisambiguate.cmi
-grafiteDisambiguate.cmo : nCicDisambiguate.cmi disambiguateChoices.cmi \
-    grafiteDisambiguate.cmi
-grafiteDisambiguate.cmx : nCicDisambiguate.cmx disambiguateChoices.cmx \
+grafiteDisambiguate.cmx : \
+    nCicDisambiguate.cmx \
+    disambiguateChoices.cmx \
     grafiteDisambiguate.cmi
+grafiteDisambiguate.cmi :
+nCicDisambiguate.cmx : \
+    nCicDisambiguate.cmi
+nCicDisambiguate.cmi :
+nnumber_notation.cmx : \
+    nnumber_notation.cmi
+nnumber_notation.cmi :
index 9cfbbc8c0a184b75a47a68d7a2d3ab12b6b49c34..3ada62287967ca23c647ef954725047fe38d5767 100644 (file)
@@ -57,9 +57,9 @@ class virtual status =
 let eval_with_new_aliases status f =
  let status =
   status#set_disambiguate_db { status#disambiguate_db with new_aliases = [] } in
- let res = f status in
- let new_aliases = status#disambiguate_db.new_aliases in
-  new_aliases,res
+ let new_status = f status in
+ let new_aliases = new_status#disambiguate_db.new_aliases in
+  new_aliases,new_status
 ;;
 
 let dump_aliases out msg status =
@@ -122,7 +122,7 @@ let ncic_mk_choice status = function
      let desc,f = DisambiguateChoices.nlookup_num_by_dsc dsc in
       desc, `Num_interp
        (fun num -> match f with `Num_interp f -> f num | _ -> assert false)
-  | GrafiteAst.Ident_alias (name, uri) -> 
+  | GrafiteAst.Ident_alias (_name, uri) -> 
      uri, `Sym_interp 
       (fun l->assert(l = []);
         let nref = NReference.reference_of_string uri in
@@ -139,7 +139,7 @@ let mk_implicit b =
 ;;
 
 let nlookup_in_library 
-  interactive_user_uri_choice input_or_locate_uri item 
+  _interactive_user_uri_choice _input_or_locate_uri item 
 =
   match item with
   | DisambiguateTypes.Id id -> 
@@ -206,8 +206,8 @@ let disambiguate_npattern status (text, prefix_len, (wanted, hyp_paths, goal_pat
    (wanted, hyp_paths, goal_path)
 ;;
 
-let disambiguate_reduction_kind text prefix_len = function
-  | `Unfold (Some t) -> assert false (* MATITA 1.0 *)
+let disambiguate_reduction_kind _text _prefix_len = function
+  | `Unfold (Some _t) -> assert false (* MATITA 1.0 *)
   | `Normalize
   | `Simpl
   | `Unfold None
index c462af36f9cac05f0028b6eff603892cb3b03f5b..019051255bd3f4dde76f8ea334f99ad3949972e6 100644 (file)
@@ -40,7 +40,7 @@ class virtual status :
  end
 
 val eval_with_new_aliases:
- #status as 'status -> ('status -> 'a) ->
+ #status as 'status -> ('status -> (#status as 'a)) ->
   (DisambiguateTypes.domain_item * GrafiteAst.alias_spec) list * 'a
 
 val set_proof_aliases:
index c2ad6ff86885864fe19eaf17af8c87fcd6836c1e..d5062ccd7a801db106e9bbc39ccc5f920a49d0c9 100644 (file)
-nCicExtraction.cmi :
-coq.cmi :
-ocamlExtractionTable.cmi : miniml.cmo coq.cmi
-mlutil.cmi : ocamlExtractionTable.cmi miniml.cmo coq.cmi
-common.cmi : ocamlExtractionTable.cmi mlutil.cmi miniml.cmo coq.cmi
-extraction.cmi : ocamlExtractionTable.cmi miniml.cmo coq.cmi
-ocaml.cmi : ocamlExtractionTable.cmi miniml.cmo coq.cmi
-ocamlExtraction.cmi : ocamlExtractionTable.cmi
-miniml.cmo : coq.cmi
-miniml.cmx : coq.cmx
-nCicExtraction.cmo : nCicExtraction.cmi
-nCicExtraction.cmx : nCicExtraction.cmi
-coq.cmo : coq.cmi
-coq.cmx : coq.cmi
-ocamlExtractionTable.cmo : miniml.cmo coq.cmi ocamlExtractionTable.cmi
-ocamlExtractionTable.cmx : miniml.cmx coq.cmx ocamlExtractionTable.cmi
-mlutil.cmo : ocamlExtractionTable.cmi miniml.cmo coq.cmi mlutil.cmi
-mlutil.cmx : ocamlExtractionTable.cmx miniml.cmx coq.cmx mlutil.cmi
-common.cmo : ocamlExtractionTable.cmi mlutil.cmi miniml.cmo coq.cmi \
+common.cmo : \
+    ocamlExtractionTable.cmi \
+    mlutil.cmi \
+    coq.cmi \
     common.cmi
-common.cmx : ocamlExtractionTable.cmx mlutil.cmx miniml.cmx coq.cmx \
+common.cmx : \
+    ocamlExtractionTable.cmx \
+    mlutil.cmx \
+    coq.cmx \
     common.cmi
-extraction.cmo : ocamlExtractionTable.cmi mlutil.cmi miniml.cmo coq.cmi \
-    common.cmi extraction.cmi
-extraction.cmx : ocamlExtractionTable.cmx mlutil.cmx miniml.cmx coq.cmx \
-    common.cmx extraction.cmi
-ocaml.cmo : ocamlExtractionTable.cmi mlutil.cmi miniml.cmo coq.cmi \
-    common.cmi ocaml.cmi
-ocaml.cmx : ocamlExtractionTable.cmx mlutil.cmx miniml.cmx coq.cmx \
-    common.cmx ocaml.cmi
-ocamlExtraction.cmo : ocamlExtractionTable.cmi ocaml.cmi extraction.cmi \
-    coq.cmi ocamlExtraction.cmi
-ocamlExtraction.cmx : ocamlExtractionTable.cmx ocaml.cmx extraction.cmx \
-    coq.cmx ocamlExtraction.cmi
+common.cmi : \
+    ocamlExtractionTable.cmi \
+    coq.cmi
+coq.cmo : \
+    coq.cmi
+coq.cmx : \
+    coq.cmi
+coq.cmi :
+extraction.cmo : \
+    ocamlExtractionTable.cmi \
+    mlutil.cmi \
+    miniml.cmo \
+    coq.cmi \
+    common.cmi \
+    extraction.cmi
+extraction.cmx : \
+    ocamlExtractionTable.cmx \
+    mlutil.cmx \
+    miniml.cmx \
+    coq.cmx \
+    common.cmx \
+    extraction.cmi
+extraction.cmi : \
+    ocamlExtractionTable.cmi \
+    miniml.cmo
+miniml.cmo : \
+    coq.cmi
+miniml.cmx : \
+    coq.cmx
+mlutil.cmo : \
+    ocamlExtractionTable.cmi \
+    miniml.cmo \
+    coq.cmi \
+    mlutil.cmi
+mlutil.cmx : \
+    ocamlExtractionTable.cmx \
+    miniml.cmx \
+    coq.cmx \
+    mlutil.cmi
+mlutil.cmi : \
+    ocamlExtractionTable.cmi \
+    miniml.cmo \
+    coq.cmi
+nCicExtraction.cmo : \
+    nCicExtraction.cmi
+nCicExtraction.cmx : \
+    nCicExtraction.cmi
+nCicExtraction.cmi :
+ocaml.cmo : \
+    ocamlExtractionTable.cmi \
+    mlutil.cmi \
+    miniml.cmo \
+    coq.cmi \
+    common.cmi \
+    ocaml.cmi
+ocaml.cmx : \
+    ocamlExtractionTable.cmx \
+    mlutil.cmx \
+    miniml.cmx \
+    coq.cmx \
+    common.cmx \
+    ocaml.cmi
+ocaml.cmi : \
+    ocamlExtractionTable.cmi \
+    miniml.cmo \
+    coq.cmi
+ocamlExtraction.cmo : \
+    ocamlExtractionTable.cmi \
+    ocaml.cmi \
+    extraction.cmi \
+    coq.cmi \
+    ocamlExtraction.cmi
+ocamlExtraction.cmx : \
+    ocamlExtractionTable.cmx \
+    ocaml.cmx \
+    extraction.cmx \
+    coq.cmx \
+    ocamlExtraction.cmi
+ocamlExtraction.cmi : \
+    ocamlExtractionTable.cmi
+ocamlExtractionTable.cmo : \
+    miniml.cmo \
+    coq.cmi \
+    ocamlExtractionTable.cmi
+ocamlExtractionTable.cmx : \
+    miniml.cmx \
+    coq.cmx \
+    ocamlExtractionTable.cmi
+ocamlExtractionTable.cmi : \
+    miniml.cmo \
+    coq.cmi
index 968d8ffe9355dad2b602be5a4861ee71b475fabb..a527ad0c4373fc9b2607c35b35e70e5d17d2d13e 100644 (file)
@@ -1,34 +1,61 @@
-nCicExtraction.cmi :
-coq.cmi :
-ocamlExtractionTable.cmi : miniml.cmx coq.cmi
-mlutil.cmi : ocamlExtractionTable.cmi miniml.cmx coq.cmi
-common.cmi : ocamlExtractionTable.cmi mlutil.cmi miniml.cmx coq.cmi
-extraction.cmi : ocamlExtractionTable.cmi miniml.cmx coq.cmi
-ocaml.cmi : ocamlExtractionTable.cmi miniml.cmx coq.cmi
-ocamlExtraction.cmi : ocamlExtractionTable.cmi
-miniml.cmo : coq.cmi
-miniml.cmx : coq.cmx
-nCicExtraction.cmo : nCicExtraction.cmi
-nCicExtraction.cmx : nCicExtraction.cmi
-coq.cmo : coq.cmi
-coq.cmx : coq.cmi
-ocamlExtractionTable.cmo : miniml.cmx coq.cmi ocamlExtractionTable.cmi
-ocamlExtractionTable.cmx : miniml.cmx coq.cmx ocamlExtractionTable.cmi
-mlutil.cmo : ocamlExtractionTable.cmi miniml.cmx coq.cmi mlutil.cmi
-mlutil.cmx : ocamlExtractionTable.cmx miniml.cmx coq.cmx mlutil.cmi
-common.cmo : ocamlExtractionTable.cmi mlutil.cmi miniml.cmx coq.cmi \
-    common.cmi
-common.cmx : ocamlExtractionTable.cmx mlutil.cmx miniml.cmx coq.cmx \
+common.cmx : \
+    ocamlExtractionTable.cmx \
+    mlutil.cmx \
+    coq.cmx \
     common.cmi
-extraction.cmo : ocamlExtractionTable.cmi mlutil.cmi miniml.cmx coq.cmi \
-    common.cmi extraction.cmi
-extraction.cmx : ocamlExtractionTable.cmx mlutil.cmx miniml.cmx coq.cmx \
-    common.cmx extraction.cmi
-ocaml.cmo : ocamlExtractionTable.cmi mlutil.cmi miniml.cmx coq.cmi \
-    common.cmi ocaml.cmi
-ocaml.cmx : ocamlExtractionTable.cmx mlutil.cmx miniml.cmx coq.cmx \
-    common.cmx ocaml.cmi
-ocamlExtraction.cmo : ocamlExtractionTable.cmi ocaml.cmi extraction.cmi \
-    coq.cmi ocamlExtraction.cmi
-ocamlExtraction.cmx : ocamlExtractionTable.cmx ocaml.cmx extraction.cmx \
-    coq.cmx ocamlExtraction.cmi
+common.cmi : \
+    ocamlExtractionTable.cmi \
+    coq.cmi
+coq.cmx : \
+    coq.cmi
+coq.cmi :
+extraction.cmx : \
+    ocamlExtractionTable.cmx \
+    mlutil.cmx \
+    miniml.cmx \
+    coq.cmx \
+    common.cmx \
+    extraction.cmi
+extraction.cmi : \
+    ocamlExtractionTable.cmi \
+    miniml.cmx
+miniml.cmx : \
+    coq.cmx
+mlutil.cmx : \
+    ocamlExtractionTable.cmx \
+    miniml.cmx \
+    coq.cmx \
+    mlutil.cmi
+mlutil.cmi : \
+    ocamlExtractionTable.cmi \
+    miniml.cmx \
+    coq.cmi
+nCicExtraction.cmx : \
+    nCicExtraction.cmi
+nCicExtraction.cmi :
+ocaml.cmx : \
+    ocamlExtractionTable.cmx \
+    mlutil.cmx \
+    miniml.cmx \
+    coq.cmx \
+    common.cmx \
+    ocaml.cmi
+ocaml.cmi : \
+    ocamlExtractionTable.cmi \
+    miniml.cmx \
+    coq.cmi
+ocamlExtraction.cmx : \
+    ocamlExtractionTable.cmx \
+    ocaml.cmx \
+    extraction.cmx \
+    coq.cmx \
+    ocamlExtraction.cmi
+ocamlExtraction.cmi : \
+    ocamlExtractionTable.cmi
+ocamlExtractionTable.cmx : \
+    miniml.cmx \
+    coq.cmx \
+    ocamlExtractionTable.cmi
+ocamlExtractionTable.cmi : \
+    miniml.cmx \
+    coq.cmi
index 8bbda655e6f2b2f18f8b0c3ebb9c193ede50b134..46f6f14de3c55aafc8d106422c83e4ea2930b314 100644 (file)
@@ -16,9 +16,6 @@ IMPLEMENTATION_FILES = \
    miniml.ml $(INTERFACE_FILES:%.mli=%.ml)
 EXTRA_OBJECTS_TO_INSTALL = 
 EXTRA_OBJECTS_TO_CLEAN =
-%.cmo: OCAMLOPTIONS += -w Ae
-%.cmi: OCAMLOPTIONS += -w Ae
-%.cmx: OCAMLOPTIONS += -w Ae
 
 include ../../Makefile.defs
 include ../Makefile.common
index fffc09974da6bdf965a028a93324faf9157e9f13..be8f3d968fb5bf0d9cb28198e2bdd49c19c7c739 100644 (file)
@@ -10,7 +10,7 @@
 
 open Coq
 open OcamlExtractionTable
-open Miniml
+(*open Miniml*)
 open Mlutil
 
 (*s Some pretty-print utility functions. *)
@@ -41,13 +41,13 @@ let rec lowercase_id id =
  if id = "" then "x" else
  if id.[0] = '_' then lowercase_id (String.sub id 1 (String.length id - 1)) else
  if is_invalid_id id then lowercase_id ("x" ^ id) else
- String.uncapitalize id
+ String.uncapitalize_ascii id
 
 let rec uppercase_id id =
  if id = "" then "T" else
  if id.[0] = '_' then uppercase_id (String.sub id 1 (String.length id - 1)) else
  if is_invalid_id id then uppercase_id ("x" ^ id) else
- String.capitalize id
+ String.capitalize_ascii id
 
 type kind = Term | Type | Cons
 
@@ -108,7 +108,7 @@ let safe_name_of_reference status r =
      NUri.name_of_uri uri
   | _ -> NCicPp.r2s status true r
 
-let maybe_capitalize b n = if b then String.capitalize n else n
+let maybe_capitalize b n = if b then String.capitalize_ascii n else n
 
 let modname_of_filename status capitalize name =
  try
@@ -116,7 +116,7 @@ let modname_of_filename status capitalize name =
    status, maybe_capitalize capitalize name
  with Not_found ->
   let globs = Idset.elements (get_modnames status) in
-  let s = next_ident_away (String.uncapitalize name) globs in
+  let s = next_ident_away (String.uncapitalize_ascii name) globs in
   let status = add_modname status s in
   let status = add_modname_for_filename status name s in
    status, maybe_capitalize capitalize s
index 2cf44e003d93fd4f2b1c4e93883444a4a2070294..96550bd4d5a87d5fb0bc5be47a0da1b65832fb71 100644 (file)
@@ -9,8 +9,8 @@
 (*i $Id: common.mli 14641 2011-11-06 11:59:10Z herbelin $ i*)
 
 open Coq
-open Miniml
-open Mlutil
+(**open Miniml
+open Mlutil*)
 open OcamlExtractionTable
 
 (** By default, in module Format, you can do horizontal placing of blocks
index f68562c2037ee23072d29082c1c129b266af8144..7e0ff35c66b120ca3116c66f13cf1f1f6a215c27 100644 (file)
@@ -25,7 +25,7 @@ let cut_ident skip_quote s =
         numpart (n-1) n'
       else if code_of_0 <= c && c <= code_of_9 then
         numpart (n-1) (n-1)
-      else if skip_quote & (c = Char.code '\'' || c = Char.code '_') then
+      else if skip_quote && (c = Char.code '\'' || c = Char.code '_') then
         numpart (n-1) (n-1)
       else
         n'
@@ -34,9 +34,9 @@ let cut_ident skip_quote s =
 
 let forget_subscript id =
   let numstart = cut_ident false id in
-  let newid = String.make (numstart+1) '0' in
+  let newid = Bytes.make (numstart+1) '0' in
   String.blit id 0 newid 0 numstart;
-  newid
+  Bytes.to_string newid
 
 (* Namegen.ml *)
 
@@ -58,18 +58,18 @@ let lift_subscript id =
         add (carrypos-1)
       end
       else begin
-        let newid = String.copy id in
-        String.fill newid (carrypos+1) (len-1-carrypos) '0';
+        let newid = Bytes.of_string id in
+        Bytes.fill newid (carrypos+1) (len-1-carrypos) '0';
         newid.[carrypos] <- Char.chr (Char.code c + 1);
-        newid
+        Bytes.to_string newid
       end
     else begin
-      let newid = id^"0" in
+      let newid = Bytes.of_string (id^"0") in
       if carrypos < len-1 then begin
-        String.fill newid (carrypos+1) (len-1-carrypos) '0';
+        Bytes.fill newid (carrypos+1) (len-1-carrypos) '0';
         newid.[carrypos+1] <- '1'
       end;
-      newid
+      Bytes.to_string newid
     end
   in add (len-1)
 
@@ -187,7 +187,7 @@ let array_map2 f v1 v2 =
   if Array.length v1 == 0 then
     [| |]
   else begin
-    let res = Array.create (Array.length v1) (f v1.(0) v2.(0)) in
+    let res = Array.make (Array.length v1) (f v1.(0) v2.(0)) in
     for i = 1 to pred (Array.length v1) do
       res.(i) <- f v1.(i) v2.(i)
     done;
@@ -324,7 +324,7 @@ let rec pr_com ft s =
       let n = String.index s '\n' in
       String.sub s 0 n, Some (String.sub s (n+1) (String.length s - n - 1))
     with Not_found -> s,None in
-  com_if ft (Lazy.lazy_from_val());
+  com_if ft (Lazy.from_val());
 (*  let s1 =
     if String.length s1 <> 0 && s1.[0] = ' ' then
       (Format.pp_print_space ft (); String.sub s1 1 (String.length s1 - 1))
@@ -347,26 +347,26 @@ let pp_dirs ft =
   in
   let rec pp_cmd = function
     | Ppcmd_print(n,s)        ->
-        com_if ft (Lazy.lazy_from_val()); Format.pp_print_as ft n s
+        com_if ft (Lazy.from_val()); Format.pp_print_as ft n s
     | Ppcmd_box(bty,ss)       -> (* Prevent evaluation of the stream! *)
-        com_if ft (Lazy.lazy_from_val());
+        com_if ft (Lazy.from_val());
         pp_open_box bty ;
         if not (Format.over_max_boxes ()) then Stream.iter pp_cmd ss;
         Format.pp_close_box ft ()
-    | Ppcmd_open_box bty      -> com_if ft (Lazy.lazy_from_val()); pp_open_box bty
+    | Ppcmd_open_box bty      -> com_if ft (Lazy.from_val()); pp_open_box bty
     | Ppcmd_close_box         -> Format.pp_close_box ft ()
     | Ppcmd_close_tbox        -> Format.pp_close_tbox ft ()
     | Ppcmd_white_space n     ->
-        com_if ft (Lazy.lazy_from_fun (fun()->Format.pp_print_break ft n 0))
+        com_if ft (Lazy.from_fun (fun()->Format.pp_print_break ft n 0))
     | Ppcmd_print_break(m,n)  ->
-        com_if ft (Lazy.lazy_from_fun(fun()->Format.pp_print_break ft m n))
+        com_if ft (Lazy.from_fun(fun()->Format.pp_print_break ft m n))
     | Ppcmd_set_tab           -> Format.pp_set_tab ft ()
     | Ppcmd_print_tbreak(m,n) ->
-        com_if ft (Lazy.lazy_from_fun(fun()->Format.pp_print_tbreak ft m n))
+        com_if ft (Lazy.from_fun(fun()->Format.pp_print_tbreak ft m n))
     | Ppcmd_force_newline     ->
         com_brk ft; Format.pp_force_newline ft ()
     | Ppcmd_print_if_broken   ->
-        com_if ft (Lazy.lazy_from_fun(fun()->Format.pp_print_if_newline ft ()))
+        com_if ft (Lazy.from_fun(fun()->Format.pp_print_if_newline ft ()))
     | Ppcmd_comment i         ->
         let coms = split_com [] [] i !comments in
 (*        Format.pp_open_hvbox ft 0;*)
index 382801b617203c6a9de903c2f5ab1f2e7af667cc..be8099598e31eb5e804d482cb0c270518ffae94b 100644 (file)
@@ -207,7 +207,7 @@ let sign_with_implicits _r s =
 
 (* Enriching a exception message *)
 
-let rec handle_exn _r _n _fn_name = function x -> x
+let handle_exn _r _n _fn_name = function x -> x
 (*CSC: only for pretty printing
   | MLexn s ->
       (try Scanf.sscanf s "UNBOUND %d"
@@ -1014,7 +1014,7 @@ and extract_case context mle (ip,c,br) status mlt =
 (* [decomp_lams_eta env c t] finds the number [n] of products in the type [t],
    and decompose the term [c] in [n] lambdas, with eta-expansion if needed. *)
 
-let rec decomp_lams_eta_n n m status context c t =
+let decomp_lams_eta_n n m status context c t =
   let rels = fst (splay_prod_n status context n t) in
   let rels',c = decompose_lam c in
   let d = n - m in
index a5ab1b05545d4464171e1f455e99b98eb2bf7292..a45dff55cb6486dbe3e121b20db05a03a8981d20 100644 (file)
@@ -10,9 +10,7 @@
 
 (*s Extraction from Coq terms to Miniml. *)
 
-open Coq
 open Miniml
-open OcamlExtractionTable
 
 val extract:
  #OcamlExtractionTable.status as 'status -> NCic.obj ->
index 52881e18336f3b1f2e6fd7c512355afbf6bc7e24..9f553762a7ccee8707de121ea96e1106f8e017af 100644 (file)
@@ -168,7 +168,7 @@ module Mlenv = struct
   let clean_free mle =
     let rem = ref Metaset.empty
     and add = ref Metaset.empty in
-    let clean m = match m.contents with
+    let clean m = match m.Miniml.contents with
       | None -> ()
       | Some u -> rem := Metaset.add m !rem; add := find_free !add u
     in
@@ -238,18 +238,18 @@ let type_maxvar t =
 
 (*s What are the type variables occurring in [t]. *)
 
-let intset_union_map_list f l =
-  List.fold_left (fun s t -> Intset.union s (f t)) Intset.empty l
+(*let intset_union_map_list f l =
+  List.fold_left (fun s t -> Intset.union s (f t)) Intset.empty l*)
 
-let intset_union_map_array f a =
-  Array.fold_left (fun s t -> Intset.union s (f t)) Intset.empty a
+(*let intset_union_map_array f a =
+  Array.fold_left (fun s t -> Intset.union s (f t)) Intset.empty a*)
 
-let rec type_listvar = function
+(*let rec type_listvar = function
   | Tmeta {contents = Some t} -> type_listvar t
   | Tvar i | Tvar' i -> Intset.singleton i
   | Tarr (a,b) -> Intset.union (type_listvar a) (type_listvar b)
   | Tglob (_,l) -> intset_union_map_list type_listvar l
-  | _ -> Intset.empty
+  | _ -> Intset.empty*)
 
 (*s From [a -> b -> c] to [[a;b],c]. *)
 
@@ -467,12 +467,12 @@ let ast_occurs_itvl k k' t =
 
 (*s Number of occurences of [Rel k] (resp. [Rel 1]) in [t]. *)
 
-let nb_occur_k k t =
+(*let nb_occur_k k t =
   let cpt = ref 0 in
   ast_iter_rel (fun i -> if i = k then incr cpt) t;
-  !cpt
+  !cpt*)
 
-let nb_occur t = nb_occur_k 1 t
+(*let nb_occur t = nb_occur_k 1 t*)
 
 (* Number of occurences of [Rel 1] in [t], with special treatment of match:
    occurences in different branches aren't added, but we rather use max. *)
@@ -596,7 +596,7 @@ let rec many_lams id a = function
   | 0 -> a
   | n -> many_lams id (MLlam (id,a)) (pred n)
 
-let anonym_lams a n = many_lams anonymous a n
+(*let anonym_lams a n = many_lams anonymous a n*)
 let anonym_tmp_lams a n = many_lams (Tmp anonymous_name) a n
 let dummy_lams a n = many_lams Dummy a n
 
@@ -629,7 +629,7 @@ let rec test_eta_args_lift k n = function
 
 (*s Computes an eta-reduction. *)
 
-let eta_red e =
+(*let eta_red e =
   let ids,t = collect_lams e in
   let n = List.length ids in
   if n = 0 then e
@@ -649,12 +649,12 @@ let eta_red e =
        if test_eta_args_lift 0 p args && not (ast_occurs_itvl 1 p body)
        then named_lams ids (ast_lift (-p) body)
        else e
-    | _ -> e
+    | _ -> e*)
 
 (*s Computes all head linear beta-reductions possible in [(t a)].
   Non-linear head beta-redex become let-in. *)
 
-let rec linear_beta_red a t = match a,t with
+(*let rec linear_beta_red a t = match a,t with
   | [], _ -> t
   | a0::a, MLlam (id,t) ->
       (match nb_occur_match t with
@@ -663,11 +663,11 @@ let rec linear_beta_red a t = match a,t with
         | _ ->
             let a = List.map (ast_lift 1) a in
             MLletin (id, a0, linear_beta_red a t))
-  | _ -> MLapp (t, a)
+  | _ -> MLapp (t, a)*)
 
-let rec tmp_head_lams = function
+(*let rec tmp_head_lams = function
   | MLlam (id, t) -> MLlam (tmp_id id, tmp_head_lams t)
-  | e -> e
+  | e -> e*)
 
 (*s Applies a substitution [s] of constants by their body, plus
   linear beta reductions at modified positions.
@@ -675,7 +675,7 @@ let rec tmp_head_lams = function
   reduction (this helps the inlining of recursors).
 *)
 
-let rec ast_glob_subst _s _t = assert false (*CSC: reimplement match t with
+let ast_glob_subst _s _t = assert false (*CSC: reimplement match t with
   | MLapp ((MLglob ((ConstRef kn) as refe)) as f, a) ->
       let a = List.map (fun e -> tmp_head_lams (ast_glob_subst s e)) a in
       (try linear_beta_red a (Refmap'.find refe s)
@@ -789,7 +789,7 @@ let rec merge_ids ids ids' = match ids,ids' with
 
 let is_exn = function MLexn _ -> true | _ -> false
 
-let rec permut_case_fun br _acc =
+let permut_case_fun br _acc =
   let nb = ref max_int in
   Array.iter (fun (_,_,t) ->
                let ids, c = collect_lams t in
@@ -1168,7 +1168,7 @@ let optimize_fix a =
 
 (* Utility functions used in the decision of inlining. *)
 
-let rec ml_size = function
+(*let rec ml_size = function
   | MLapp(t,l) -> List.length l + ml_size t + ml_size_list l
   | MLlam(_,t) -> 1 + ml_size t
   | MLcons(_,_,l) -> ml_size_list l
@@ -1181,14 +1181,14 @@ let rec ml_size = function
 
 and ml_size_list l = List.fold_left (fun a t -> a + ml_size t) 0 l
 
-and ml_size_array l = Array.fold_left (fun a t -> a + ml_size t) 0 l
+and ml_size_array l = Array.fold_left (fun a t -> a + ml_size t) 0 l*)
 
-let is_fix = function MLfix _ -> true | _ -> false
+(*let is_fix = function MLfix _ -> true | _ -> false*)
 
-let rec is_constr = function
+(*let rec is_constr = function
   | MLcons _   -> true
   | MLlam(_,t) -> is_constr t
-  | _          -> false
+  | _          -> false*)
 
 (*s Strictness *)
 
@@ -1198,11 +1198,11 @@ let rec is_constr = function
    it begins by at least one non-strict lambda, since the corresponding
    argument to [t] might be unevaluated in the expanded code. *)
 
-exception Toplevel
+(*exception Toplevel*)
 
-let lift n l = List.map ((+) n) l
+(*let lift n l = List.map ((+) n) l*)
 
-let pop n l = List.map (fun x -> if x<=n then raise Toplevel else x-n) l
+(*let pop n l = List.map (fun x -> if x<=n then raise Toplevel else x-n) l*)
 
 (* This function returns a list of de Bruijn indices of non-strict variables,
    or raises [Toplevel] if it has an internal non-strict variable.
@@ -1212,7 +1212,7 @@ let pop n l = List.map (fun x -> if x<=n then raise Toplevel else x-n) l
    variable to the candidates?  We use this flag to check only the external
    lambdas, those that will correspond to arguments. *)
 
-let rec non_stricts add cand = function
+(*let rec non_stricts add cand = function
   | MLlam (_id,t) ->
       let cand = lift 1 cand in
       let cand = if add then 1::cand else cand in
@@ -1242,20 +1242,20 @@ let rec non_stricts add cand = function
           let n = List.length i in
           let cand = lift n cand in
           let cand = pop n (non_stricts add cand t) in
-       List.merge (fun c1 c2 -> c1 - c2) cand c) [] v
+          List.merge (-) cand c) [] v
        (* [merge] may duplicates some indices, but I don't mind. *)
   | MLmagic t ->
       non_stricts add cand t
   | _ ->
-      cand
+      cand*)
 
 (* The real test: we are looking for internal non-strict variables, so we start
    with no candidates, and the only positive answer is via the [Toplevel]
    exception. *)
 
-let is_not_strict t =
+(*let is_not_strict t =
   try let _ = non_stricts true [] t in false
-  with Toplevel -> true
+  with Toplevel -> true*)
 
 (*s Inlining decision *)
 
@@ -1278,7 +1278,7 @@ let is_not_strict t =
    restriction for the moment.
 *)
 
-let inline_test _r _t =
+(*let inline_test _r _t =
   (*CSC:if not (auto_inline ()) then*) false
 (*
   else
@@ -1289,7 +1289,7 @@ let inline_test _r _t =
       let t1 = eta_red t in
       let t2 = snd (collect_lams t1) in
       not (is_fix t2) && ml_size t < 12 && is_not_strict t
-*)
+*)*)
 
 (*CSC: (not) reimplemented
 let con_of_string s =
@@ -1313,9 +1313,9 @@ let manual_inline_set =
     ]
     Cset_env.empty*)
 
-let manual_inline = function (*CSC:
+(*let manual_inline = function (*CSC:
   | ConstRef c -> Cset_env.mem c manual_inline_set
-  |*) _ -> false
+  |*) _ -> false*)
 
 (* If the user doesn't say he wants to keep [t], we inline in two cases:
    \begin{itemize}
index 12261145e6bafdc77288daf0a4eb1ed463bd909a..18b7086f513b93da9380c01996fca8d6c0dcd6de 100644 (file)
@@ -844,7 +844,7 @@ let object_of_constant status ~metasenv ref bo ty =
                 (fun p1 n ->
                   HExtlib.map_option (fun (_,k) ->
                    (*CSC: BUG here, clashes*)
-                   String.uncapitalize (fst n),k) p1)
+                   String.uncapitalize_ascii (fst n),k) p1)
                 ctx0 ctx
               in
               let bo = typ_of status ~metasenv ctx bo in
@@ -962,15 +962,15 @@ let (|>) f g =
   fun x -> g (f x)
 ;;
 
-let curry f x y =
+(*let curry f x y =
   f (x, y)
-;;
+;;*)
 
 let uncurry f (x, y) =
   f x y
 ;;
 
-let rec char_list_of_string s =
+let char_list_of_string s =
   let l = String.length s in
   let rec aux buffer s =
     function
@@ -1013,8 +1013,10 @@ let rec capitalize_marked_positions s =
     | []    -> s
     | x::xs ->
       if x < String.length s then
-        let c = Char.uppercase (String.get s x) in
-        let _ = String.set s x c in
+        let c = Char.uppercase_ascii (String.get s x) in
+        let b = Bytes.of_string s in
+        let _ = Bytes.set b x c in
+        let s = Bytes.to_string b in
           capitalize_marked_positions s xs
       else
         capitalize_marked_positions s xs
@@ -1028,12 +1030,12 @@ let contract_underscores_and_capitalise =
 
 let idiomatic_haskell_type_name_of_string =
   contract_underscores_and_capitalise |>
-  String.capitalize
+  String.capitalize_ascii
 ;;
 
 let idiomatic_haskell_term_name_of_string =
   contract_underscores_and_capitalise |>
-  String.uncapitalize
+  String.uncapitalize_ascii
 ;;
 
 let classify_reference status ref =
@@ -1223,7 +1225,7 @@ let rec pp_obj status (_,ref,obj_kind) =
       ) il)
  (* inductive and records missing *)
 
-let rec infos_of (info,_,obj_kind) =
+let infos_of (info,_,obj_kind) =
  info @
   match obj_kind with
      LetRec l -> List.concat (List.map (fun (infos,_,_) -> infos) l)
index 2ef1afaa02ed987a2ef06f10a334411c0b7c0f92..213db1eb2be03409313e484424387c3e46a40851 100644 (file)
@@ -115,7 +115,7 @@ let pp_fields status r fields =
 (*s Pretty-printing of types. [par] is a boolean indicating whether parentheses
     are needed or not. *)
 
-let rec pp_type status par vl t =
+let pp_type status par vl t =
   let rec pp_rec status par = function
     | Tmeta _ | Tvar' _ | Taxiom -> assert false
     | Tvar i -> (try status,pp_tvar (List.nth vl (pred i))
index a55f8728476514e27fc165bf6c7931bc34089f59..aa395ccc35af325982c02007237ed7b11fe00ce2 100644 (file)
-nUri.cmi :
-nReference.cmi : nUri.cmi
-nCicUtils.cmi : nCic.cmo
-nCicSubstitution.cmi : nCic.cmo
-nCicEnvironment.cmi : nUri.cmi nReference.cmi nCic.cmo
-nCicReduction.cmi : nCic.cmo
-nCicTypeChecker.cmi : nUri.cmi nReference.cmi nCic.cmo
-nCicUntrusted.cmi : nCic.cmo
-nCicPp.cmi : nReference.cmi nCic.cmo
-nCic.cmo : nUri.cmi nReference.cmi
-nCic.cmx : nUri.cmx nReference.cmx
-nUri.cmo : nUri.cmi
-nUri.cmx : nUri.cmi
-nReference.cmo : nUri.cmi nReference.cmi
-nReference.cmx : nUri.cmx nReference.cmi
-nCicUtils.cmo : nReference.cmi nCic.cmo nCicUtils.cmi
-nCicUtils.cmx : nReference.cmx nCic.cmx nCicUtils.cmi
-nCicSubstitution.cmo : nReference.cmi nCicUtils.cmi nCic.cmo \
+nCic.cmo : \
+    nUri.cmi \
+    nReference.cmi
+nCic.cmx : \
+    nUri.cmx \
+    nReference.cmx
+nCicEnvironment.cmo : \
+    nUri.cmi \
+    nReference.cmi \
+    nCic.cmo \
+    nCicEnvironment.cmi
+nCicEnvironment.cmx : \
+    nUri.cmx \
+    nReference.cmx \
+    nCic.cmx \
+    nCicEnvironment.cmi
+nCicEnvironment.cmi : \
+    nUri.cmi \
+    nReference.cmi \
+    nCic.cmo
+nCicPp.cmo : \
+    nUri.cmi \
+    nReference.cmi \
+    nCicSubstitution.cmi \
+    nCicReduction.cmi \
+    nCicEnvironment.cmi \
+    nCic.cmo \
+    nCicPp.cmi
+nCicPp.cmx : \
+    nUri.cmx \
+    nReference.cmx \
+    nCicSubstitution.cmx \
+    nCicReduction.cmx \
+    nCicEnvironment.cmx \
+    nCic.cmx \
+    nCicPp.cmi
+nCicPp.cmi : \
+    nReference.cmi \
+    nCic.cmo
+nCicReduction.cmo : \
+    nReference.cmi \
+    nCicUtils.cmi \
+    nCicSubstitution.cmi \
+    nCicEnvironment.cmi \
+    nCic.cmo \
+    nCicReduction.cmi
+nCicReduction.cmx : \
+    nReference.cmx \
+    nCicUtils.cmx \
+    nCicSubstitution.cmx \
+    nCicEnvironment.cmx \
+    nCic.cmx \
+    nCicReduction.cmi
+nCicReduction.cmi : \
+    nCic.cmo
+nCicSubstitution.cmo : \
+    nCicUtils.cmi \
+    nCic.cmo \
     nCicSubstitution.cmi
-nCicSubstitution.cmx : nReference.cmx nCicUtils.cmx nCic.cmx \
+nCicSubstitution.cmx : \
+    nCicUtils.cmx \
+    nCic.cmx \
     nCicSubstitution.cmi
-nCicEnvironment.cmo : nUri.cmi nReference.cmi nCic.cmo nCicEnvironment.cmi
-nCicEnvironment.cmx : nUri.cmx nReference.cmx nCic.cmx nCicEnvironment.cmi
-nCicReduction.cmo : nReference.cmi nCicUtils.cmi nCicSubstitution.cmi \
-    nCicEnvironment.cmi nCic.cmo nCicReduction.cmi
-nCicReduction.cmx : nReference.cmx nCicUtils.cmx nCicSubstitution.cmx \
-    nCicEnvironment.cmx nCic.cmx nCicReduction.cmi
-nCicTypeChecker.cmo : nUri.cmi nReference.cmi nCicUtils.cmi \
-    nCicSubstitution.cmi nCicReduction.cmi nCicEnvironment.cmi nCic.cmo \
+nCicSubstitution.cmi : \
+    nCic.cmo
+nCicTypeChecker.cmo : \
+    nUri.cmi \
+    nReference.cmi \
+    nCicUtils.cmi \
+    nCicSubstitution.cmi \
+    nCicReduction.cmi \
+    nCicEnvironment.cmi \
+    nCic.cmo \
     nCicTypeChecker.cmi
-nCicTypeChecker.cmx : nUri.cmx nReference.cmx nCicUtils.cmx \
-    nCicSubstitution.cmx nCicReduction.cmx nCicEnvironment.cmx nCic.cmx \
+nCicTypeChecker.cmx : \
+    nUri.cmx \
+    nReference.cmx \
+    nCicUtils.cmx \
+    nCicSubstitution.cmx \
+    nCicReduction.cmx \
+    nCicEnvironment.cmx \
+    nCic.cmx \
     nCicTypeChecker.cmi
-nCicUntrusted.cmo : nReference.cmi nCicUtils.cmi nCicSubstitution.cmi \
-    nCicReduction.cmi nCicEnvironment.cmi nCic.cmo nCicUntrusted.cmi
-nCicUntrusted.cmx : nReference.cmx nCicUtils.cmx nCicSubstitution.cmx \
-    nCicReduction.cmx nCicEnvironment.cmx nCic.cmx nCicUntrusted.cmi
-nCicPp.cmo : nUri.cmi nReference.cmi nCicSubstitution.cmi nCicReduction.cmi \
-    nCicEnvironment.cmi nCic.cmo nCicPp.cmi
-nCicPp.cmx : nUri.cmx nReference.cmx nCicSubstitution.cmx nCicReduction.cmx \
-    nCicEnvironment.cmx nCic.cmx nCicPp.cmi
+nCicTypeChecker.cmi : \
+    nUri.cmi \
+    nReference.cmi \
+    nCic.cmo
+nCicUntrusted.cmo : \
+    nReference.cmi \
+    nCicUtils.cmi \
+    nCicSubstitution.cmi \
+    nCicReduction.cmi \
+    nCicEnvironment.cmi \
+    nCic.cmo \
+    nCicUntrusted.cmi
+nCicUntrusted.cmx : \
+    nReference.cmx \
+    nCicUtils.cmx \
+    nCicSubstitution.cmx \
+    nCicReduction.cmx \
+    nCicEnvironment.cmx \
+    nCic.cmx \
+    nCicUntrusted.cmi
+nCicUntrusted.cmi : \
+    nCic.cmo
+nCicUtils.cmo : \
+    nCic.cmo \
+    nCicUtils.cmi
+nCicUtils.cmx : \
+    nCic.cmx \
+    nCicUtils.cmi
+nCicUtils.cmi : \
+    nCic.cmo
+nReference.cmo : \
+    nUri.cmi \
+    nReference.cmi
+nReference.cmx : \
+    nUri.cmx \
+    nReference.cmi
+nReference.cmi : \
+    nUri.cmi
+nUri.cmo : \
+    nUri.cmi
+nUri.cmx : \
+    nUri.cmi
+nUri.cmi :
index 5b05077847c163d3e2d4080466d09e98b971641a..fe01e3cc1b04c3e6ea14e5e5f067272367855e2f 100644 (file)
@@ -1,41 +1,74 @@
-nUri.cmi :
-nReference.cmi : nUri.cmi
-nCicUtils.cmi : nCic.cmx
-nCicSubstitution.cmi : nCic.cmx
-nCicEnvironment.cmi : nUri.cmi nReference.cmi nCic.cmx
-nCicReduction.cmi : nCic.cmx
-nCicTypeChecker.cmi : nUri.cmi nReference.cmi nCic.cmx
-nCicUntrusted.cmi : nCic.cmx
-nCicPp.cmi : nReference.cmi nCic.cmx
-nCic.cmo : nUri.cmi nReference.cmi
-nCic.cmx : nUri.cmx nReference.cmx
-nUri.cmo : nUri.cmi
-nUri.cmx : nUri.cmi
-nReference.cmo : nUri.cmi nReference.cmi
-nReference.cmx : nUri.cmx nReference.cmi
-nCicUtils.cmo : nReference.cmi nCic.cmx nCicUtils.cmi
-nCicUtils.cmx : nReference.cmx nCic.cmx nCicUtils.cmi
-nCicSubstitution.cmo : nReference.cmi nCicUtils.cmi nCic.cmx \
-    nCicSubstitution.cmi
-nCicSubstitution.cmx : nReference.cmx nCicUtils.cmx nCic.cmx \
+nCic.cmx : \
+    nUri.cmx \
+    nReference.cmx
+nCicEnvironment.cmx : \
+    nUri.cmx \
+    nReference.cmx \
+    nCic.cmx \
+    nCicEnvironment.cmi
+nCicEnvironment.cmi : \
+    nUri.cmi \
+    nReference.cmi \
+    nCic.cmx
+nCicPp.cmx : \
+    nUri.cmx \
+    nReference.cmx \
+    nCicSubstitution.cmx \
+    nCicReduction.cmx \
+    nCicEnvironment.cmx \
+    nCic.cmx \
+    nCicPp.cmi
+nCicPp.cmi : \
+    nReference.cmi \
+    nCic.cmx
+nCicReduction.cmx : \
+    nReference.cmx \
+    nCicUtils.cmx \
+    nCicSubstitution.cmx \
+    nCicEnvironment.cmx \
+    nCic.cmx \
+    nCicReduction.cmi
+nCicReduction.cmi : \
+    nCic.cmx
+nCicSubstitution.cmx : \
+    nCicUtils.cmx \
+    nCic.cmx \
     nCicSubstitution.cmi
-nCicEnvironment.cmo : nUri.cmi nReference.cmi nCic.cmx nCicEnvironment.cmi
-nCicEnvironment.cmx : nUri.cmx nReference.cmx nCic.cmx nCicEnvironment.cmi
-nCicReduction.cmo : nReference.cmi nCicUtils.cmi nCicSubstitution.cmi \
-    nCicEnvironment.cmi nCic.cmx nCicReduction.cmi
-nCicReduction.cmx : nReference.cmx nCicUtils.cmx nCicSubstitution.cmx \
-    nCicEnvironment.cmx nCic.cmx nCicReduction.cmi
-nCicTypeChecker.cmo : nUri.cmi nReference.cmi nCicUtils.cmi \
-    nCicSubstitution.cmi nCicReduction.cmi nCicEnvironment.cmi nCic.cmx \
+nCicSubstitution.cmi : \
+    nCic.cmx
+nCicTypeChecker.cmx : \
+    nUri.cmx \
+    nReference.cmx \
+    nCicUtils.cmx \
+    nCicSubstitution.cmx \
+    nCicReduction.cmx \
+    nCicEnvironment.cmx \
+    nCic.cmx \
     nCicTypeChecker.cmi
-nCicTypeChecker.cmx : nUri.cmx nReference.cmx nCicUtils.cmx \
-    nCicSubstitution.cmx nCicReduction.cmx nCicEnvironment.cmx nCic.cmx \
-    nCicTypeChecker.cmi
-nCicUntrusted.cmo : nReference.cmi nCicUtils.cmi nCicSubstitution.cmi \
-    nCicReduction.cmi nCicEnvironment.cmi nCic.cmx nCicUntrusted.cmi
-nCicUntrusted.cmx : nReference.cmx nCicUtils.cmx nCicSubstitution.cmx \
-    nCicReduction.cmx nCicEnvironment.cmx nCic.cmx nCicUntrusted.cmi
-nCicPp.cmo : nUri.cmi nReference.cmi nCicSubstitution.cmi nCicReduction.cmi \
-    nCicEnvironment.cmi nCic.cmx nCicPp.cmi
-nCicPp.cmx : nUri.cmx nReference.cmx nCicSubstitution.cmx nCicReduction.cmx \
-    nCicEnvironment.cmx nCic.cmx nCicPp.cmi
+nCicTypeChecker.cmi : \
+    nUri.cmi \
+    nReference.cmi \
+    nCic.cmx
+nCicUntrusted.cmx : \
+    nReference.cmx \
+    nCicUtils.cmx \
+    nCicSubstitution.cmx \
+    nCicReduction.cmx \
+    nCicEnvironment.cmx \
+    nCic.cmx \
+    nCicUntrusted.cmi
+nCicUntrusted.cmi : \
+    nCic.cmx
+nCicUtils.cmx : \
+    nCic.cmx \
+    nCicUtils.cmi
+nCicUtils.cmi : \
+    nCic.cmx
+nReference.cmx : \
+    nUri.cmx \
+    nReference.cmi
+nReference.cmi : \
+    nUri.cmi
+nUri.cmx : \
+    nUri.cmi
+nUri.cmi :
index 35b89f3b1005c2fab30426d57fd3e6cd3f38afd2..31dd1e9c44f31269f7ab6ffdc822e90cdca4427f 100644 (file)
@@ -16,9 +16,6 @@ IMPLEMENTATION_FILES = \
   nCic.ml $(INTERFACE_FILES:%.mli=%.ml)
 EXTRA_OBJECTS_TO_INSTALL = 
 EXTRA_OBJECTS_TO_CLEAN =
-%.cmo: OCAMLOPTIONS += -w Ae
-%.cmi: OCAMLOPTIONS += -w Ae
-%.cmx: OCAMLOPTIONS += -w Ae
 
 include ../../Makefile.defs
 include ../Makefile.common
index 52cdb3840c371ed2776f9b879a5f419110d11ae8..7542a52e03683ce1bb3905c3e6dc28fe7b7c2af9 100644 (file)
@@ -18,7 +18,7 @@ module E = NCicEnvironment
 exception AssertFailure of string Lazy.t;;
 
 let debug = ref false;;
-let pp m = if !debug then prerr_endline (Lazy.force m) else ();;
+(*let pp m = if !debug then prerr_endline (Lazy.force m) else ();;*)
 
 module type Strategy = sig
   type stack_term
index 0ca566cc3df4f30d44c53df1c8be3fa03b235eb2..603be63dacd9b572fb5a4ee5f31e5dda3f179067 100644 (file)
@@ -12,9 +12,6 @@
 (* $Id$ *)
 
 module C = NCic 
-module Ref = NReference
-
-let debug_print = fun _ -> ();;
 
 let lift_from status ?(no_implicit=true) k n =
  let rec liftaux k = function
index b60734508b46b5a6fe5687086ce7a8e45bfd640c..24217d6aea2628229ab3718dcf521ce267c4db4e 100644 (file)
@@ -1376,7 +1376,7 @@ let _ = NCicReduction.set_get_relevance get_relevance;;
 
 let indent = ref 0;;
 let debug = true;;
-let logger =
+let _logger =
     let do_indent () = String.make !indent ' ' in  
     (function 
       | `Start_type_checking s ->
index f22e02a7eaa1da016bc202e3afa4793578eec86a..398df307ed7202cadf92ecc843dd3d7b89a165ef 100644 (file)
@@ -12,7 +12,6 @@
 (* $Id$ *)
 
 module C = NCic
-module Ref = NReference
 
 exception Subst_not_found of int
 exception Meta_not_found of int
index a571a865c12712184f2df7cb39b8afb4191c4cf5..72fc771774e97ac71a49dc0cdfaee4c8fa139f51 100644 (file)
@@ -1,3 +1,5 @@
+nCicLibrary.cmo : \
+    nCicLibrary.cmi
+nCicLibrary.cmx : \
+    nCicLibrary.cmi
 nCicLibrary.cmi :
-nCicLibrary.cmo : nCicLibrary.cmi
-nCicLibrary.cmx : nCicLibrary.cmi
index a571a865c12712184f2df7cb39b8afb4191c4cf5..ee5e8bd16982af5acf6fbe05ccfef171d01c9879 100644 (file)
@@ -1,3 +1,3 @@
+nCicLibrary.cmx : \
+    nCicLibrary.cmi
 nCicLibrary.cmi :
-nCicLibrary.cmo : nCicLibrary.cmi
-nCicLibrary.cmx : nCicLibrary.cmi
index 861f19acd39869418801606bf6b55aa4739e4da6..20157a09ea8f506f89d563e5bfe854881358ee74 100644 (file)
@@ -8,9 +8,6 @@ IMPLEMENTATION_FILES = \
   $(INTERFACE_FILES:%.mli=%.ml)
 EXTRA_OBJECTS_TO_INSTALL = 
 EXTRA_OBJECTS_TO_CLEAN =
-%.cmo: OCAMLOPTIONS += -w Ae
-%.cmi: OCAMLOPTIONS += -w Ae
-%.cmx: OCAMLOPTIONS += -w Ae
 
 all:
 %: %.ml $(PACKAGE).cma
index 5f4f1cc562e40087cacaebc42ee367dc784ebae6..b9c453ab4b299962bd3989cdd003d77e5c6b4700 100644 (file)
+foSubst.cmo : \
+    terms.cmi \
+    foSubst.cmi
+foSubst.cmx : \
+    terms.cmx \
+    foSubst.cmi
+foSubst.cmi : \
+    terms.cmi
+foUnif.cmo : \
+    terms.cmi \
+    orderings.cmi \
+    foUtils.cmi \
+    foSubst.cmi \
+    foUnif.cmi
+foUnif.cmx : \
+    terms.cmx \
+    orderings.cmx \
+    foUtils.cmx \
+    foSubst.cmx \
+    foUnif.cmi
+foUnif.cmi : \
+    terms.cmi \
+    orderings.cmi
+foUtils.cmo : \
+    terms.cmi \
+    orderings.cmi \
+    foSubst.cmi \
+    foUtils.cmi
+foUtils.cmx : \
+    terms.cmx \
+    orderings.cmx \
+    foSubst.cmx \
+    foUtils.cmi
+foUtils.cmi : \
+    terms.cmi \
+    orderings.cmi
+index.cmo : \
+    terms.cmi \
+    orderings.cmi \
+    foUtils.cmi \
+    index.cmi
+index.cmx : \
+    terms.cmx \
+    orderings.cmx \
+    foUtils.cmx \
+    index.cmi
+index.cmi : \
+    terms.cmi \
+    orderings.cmi
+nCicBlob.cmo : \
+    terms.cmi \
+    foUtils.cmi \
+    nCicBlob.cmi
+nCicBlob.cmx : \
+    terms.cmx \
+    foUtils.cmx \
+    nCicBlob.cmi
+nCicBlob.cmi : \
+    terms.cmi
+nCicParamod.cmo : \
+    terms.cmi \
+    pp.cmi \
+    paramod.cmi \
+    orderings.cmi \
+    nCicProof.cmi \
+    nCicBlob.cmi \
+    nCicParamod.cmi
+nCicParamod.cmx : \
+    terms.cmx \
+    pp.cmx \
+    paramod.cmx \
+    orderings.cmx \
+    nCicProof.cmx \
+    nCicBlob.cmx \
+    nCicParamod.cmi
+nCicParamod.cmi : \
+    terms.cmi
+nCicProof.cmo : \
+    terms.cmi \
+    pp.cmi \
+    nCicBlob.cmi \
+    foSubst.cmi \
+    nCicProof.cmi
+nCicProof.cmx : \
+    terms.cmx \
+    pp.cmx \
+    nCicBlob.cmx \
+    foSubst.cmx \
+    nCicProof.cmi
+nCicProof.cmi : \
+    terms.cmi
+orderings.cmo : \
+    terms.cmi \
+    foSubst.cmi \
+    orderings.cmi
+orderings.cmx : \
+    terms.cmx \
+    foSubst.cmx \
+    orderings.cmi
+orderings.cmi : \
+    terms.cmi
+paramod.cmo : \
+    terms.cmi \
+    superposition.cmi \
+    pp.cmi \
+    orderings.cmi \
+    index.cmi \
+    foUtils.cmi \
+    paramod.cmi
+paramod.cmx : \
+    terms.cmx \
+    superposition.cmx \
+    pp.cmx \
+    orderings.cmx \
+    index.cmx \
+    foUtils.cmx \
+    paramod.cmi
+paramod.cmi : \
+    terms.cmi \
+    orderings.cmi
+pp.cmo : \
+    terms.cmi \
+    pp.cmi
+pp.cmx : \
+    terms.cmx \
+    pp.cmi
+pp.cmi : \
+    terms.cmi
+stats.cmo : \
+    terms.cmi \
+    stats.cmi
+stats.cmx : \
+    terms.cmx \
+    stats.cmi
+stats.cmi : \
+    terms.cmi \
+    orderings.cmi
+superposition.cmo : \
+    terms.cmi \
+    pp.cmi \
+    orderings.cmi \
+    index.cmi \
+    foUtils.cmi \
+    foUnif.cmi \
+    foSubst.cmi \
+    superposition.cmi
+superposition.cmx : \
+    terms.cmx \
+    pp.cmx \
+    orderings.cmx \
+    index.cmx \
+    foUtils.cmx \
+    foUnif.cmx \
+    foSubst.cmx \
+    superposition.cmi
+superposition.cmi : \
+    terms.cmi \
+    orderings.cmi \
+    index.cmi
+terms.cmo : \
+    terms.cmi
+terms.cmx : \
+    terms.cmi
 terms.cmi :
-pp.cmi : terms.cmi
-foSubst.cmi : terms.cmi
-orderings.cmi : terms.cmi
-foUtils.cmi : terms.cmi orderings.cmi
-foUnif.cmi : terms.cmi orderings.cmi
-index.cmi : terms.cmi orderings.cmi
-superposition.cmi : terms.cmi orderings.cmi index.cmi
-stats.cmi : terms.cmi orderings.cmi
-paramod.cmi : terms.cmi orderings.cmi
-nCicBlob.cmi : terms.cmi
-nCicProof.cmi : terms.cmi
-nCicParamod.cmi : terms.cmi
-terms.cmo : terms.cmi
-terms.cmx : terms.cmi
-pp.cmo : terms.cmi pp.cmi
-pp.cmx : terms.cmx pp.cmi
-foSubst.cmo : terms.cmi foSubst.cmi
-foSubst.cmx : terms.cmx foSubst.cmi
-orderings.cmo : terms.cmi pp.cmi foSubst.cmi orderings.cmi
-orderings.cmx : terms.cmx pp.cmx foSubst.cmx orderings.cmi
-foUtils.cmo : terms.cmi orderings.cmi foSubst.cmi foUtils.cmi
-foUtils.cmx : terms.cmx orderings.cmx foSubst.cmx foUtils.cmi
-foUnif.cmo : terms.cmi orderings.cmi foUtils.cmi foSubst.cmi foUnif.cmi
-foUnif.cmx : terms.cmx orderings.cmx foUtils.cmx foSubst.cmx foUnif.cmi
-index.cmo : terms.cmi pp.cmi orderings.cmi foUtils.cmi foUnif.cmi index.cmi
-index.cmx : terms.cmx pp.cmx orderings.cmx foUtils.cmx foUnif.cmx index.cmi
-superposition.cmo : terms.cmi pp.cmi orderings.cmi index.cmi foUtils.cmi \
-    foUnif.cmi foSubst.cmi superposition.cmi
-superposition.cmx : terms.cmx pp.cmx orderings.cmx index.cmx foUtils.cmx \
-    foUnif.cmx foSubst.cmx superposition.cmi
-stats.cmo : terms.cmi stats.cmi
-stats.cmx : terms.cmx stats.cmi
-paramod.cmo : terms.cmi superposition.cmi pp.cmi orderings.cmi index.cmi \
-    foUtils.cmi foUnif.cmi paramod.cmi
-paramod.cmx : terms.cmx superposition.cmx pp.cmx orderings.cmx index.cmx \
-    foUtils.cmx foUnif.cmx paramod.cmi
-nCicBlob.cmo : terms.cmi foUtils.cmi nCicBlob.cmi
-nCicBlob.cmx : terms.cmx foUtils.cmx nCicBlob.cmi
-nCicProof.cmo : terms.cmi pp.cmi nCicBlob.cmi foSubst.cmi nCicProof.cmi
-nCicProof.cmx : terms.cmx pp.cmx nCicBlob.cmx foSubst.cmx nCicProof.cmi
-nCicParamod.cmo : terms.cmi pp.cmi paramod.cmi orderings.cmi nCicProof.cmi \
-    nCicBlob.cmi nCicParamod.cmi
-nCicParamod.cmx : terms.cmx pp.cmx paramod.cmx orderings.cmx nCicProof.cmx \
-    nCicBlob.cmx nCicParamod.cmi
index 5f4f1cc562e40087cacaebc42ee367dc784ebae6..32cbf605dfb51beb762d0971269c0c1b56c1e5fc 100644 (file)
@@ -1,45 +1,98 @@
+foSubst.cmx : \
+    terms.cmx \
+    foSubst.cmi
+foSubst.cmi : \
+    terms.cmi
+foUnif.cmx : \
+    terms.cmx \
+    orderings.cmx \
+    foUtils.cmx \
+    foSubst.cmx \
+    foUnif.cmi
+foUnif.cmi : \
+    terms.cmi \
+    orderings.cmi
+foUtils.cmx : \
+    terms.cmx \
+    orderings.cmx \
+    foSubst.cmx \
+    foUtils.cmi
+foUtils.cmi : \
+    terms.cmi \
+    orderings.cmi
+index.cmx : \
+    terms.cmx \
+    orderings.cmx \
+    foUtils.cmx \
+    index.cmi
+index.cmi : \
+    terms.cmi \
+    orderings.cmi
+nCicBlob.cmx : \
+    terms.cmx \
+    foUtils.cmx \
+    nCicBlob.cmi
+nCicBlob.cmi : \
+    terms.cmi
+nCicParamod.cmx : \
+    terms.cmx \
+    pp.cmx \
+    paramod.cmx \
+    orderings.cmx \
+    nCicProof.cmx \
+    nCicBlob.cmx \
+    nCicParamod.cmi
+nCicParamod.cmi : \
+    terms.cmi
+nCicProof.cmx : \
+    terms.cmx \
+    pp.cmx \
+    nCicBlob.cmx \
+    foSubst.cmx \
+    nCicProof.cmi
+nCicProof.cmi : \
+    terms.cmi
+orderings.cmx : \
+    terms.cmx \
+    foSubst.cmx \
+    orderings.cmi
+orderings.cmi : \
+    terms.cmi
+paramod.cmx : \
+    terms.cmx \
+    superposition.cmx \
+    pp.cmx \
+    orderings.cmx \
+    index.cmx \
+    foUtils.cmx \
+    paramod.cmi
+paramod.cmi : \
+    terms.cmi \
+    orderings.cmi
+pp.cmx : \
+    terms.cmx \
+    pp.cmi
+pp.cmi : \
+    terms.cmi
+stats.cmx : \
+    terms.cmx \
+    stats.cmi
+stats.cmi : \
+    terms.cmi \
+    orderings.cmi
+superposition.cmx : \
+    terms.cmx \
+    pp.cmx \
+    orderings.cmx \
+    index.cmx \
+    foUtils.cmx \
+    foUnif.cmx \
+    foSubst.cmx \
+    superposition.cmi
+superposition.cmi : \
+    terms.cmi \
+    orderings.cmi \
+    index.cmi
+terms.cmx : \
+    terms.cmi
 terms.cmi :
-pp.cmi : terms.cmi
-foSubst.cmi : terms.cmi
-orderings.cmi : terms.cmi
-foUtils.cmi : terms.cmi orderings.cmi
-foUnif.cmi : terms.cmi orderings.cmi
-index.cmi : terms.cmi orderings.cmi
-superposition.cmi : terms.cmi orderings.cmi index.cmi
-stats.cmi : terms.cmi orderings.cmi
-paramod.cmi : terms.cmi orderings.cmi
-nCicBlob.cmi : terms.cmi
-nCicProof.cmi : terms.cmi
-nCicParamod.cmi : terms.cmi
-terms.cmo : terms.cmi
-terms.cmx : terms.cmi
-pp.cmo : terms.cmi pp.cmi
-pp.cmx : terms.cmx pp.cmi
-foSubst.cmo : terms.cmi foSubst.cmi
-foSubst.cmx : terms.cmx foSubst.cmi
-orderings.cmo : terms.cmi pp.cmi foSubst.cmi orderings.cmi
-orderings.cmx : terms.cmx pp.cmx foSubst.cmx orderings.cmi
-foUtils.cmo : terms.cmi orderings.cmi foSubst.cmi foUtils.cmi
-foUtils.cmx : terms.cmx orderings.cmx foSubst.cmx foUtils.cmi
-foUnif.cmo : terms.cmi orderings.cmi foUtils.cmi foSubst.cmi foUnif.cmi
-foUnif.cmx : terms.cmx orderings.cmx foUtils.cmx foSubst.cmx foUnif.cmi
-index.cmo : terms.cmi pp.cmi orderings.cmi foUtils.cmi foUnif.cmi index.cmi
-index.cmx : terms.cmx pp.cmx orderings.cmx foUtils.cmx foUnif.cmx index.cmi
-superposition.cmo : terms.cmi pp.cmi orderings.cmi index.cmi foUtils.cmi \
-    foUnif.cmi foSubst.cmi superposition.cmi
-superposition.cmx : terms.cmx pp.cmx orderings.cmx index.cmx foUtils.cmx \
-    foUnif.cmx foSubst.cmx superposition.cmi
-stats.cmo : terms.cmi stats.cmi
-stats.cmx : terms.cmx stats.cmi
-paramod.cmo : terms.cmi superposition.cmi pp.cmi orderings.cmi index.cmi \
-    foUtils.cmi foUnif.cmi paramod.cmi
-paramod.cmx : terms.cmx superposition.cmx pp.cmx orderings.cmx index.cmx \
-    foUtils.cmx foUnif.cmx paramod.cmi
-nCicBlob.cmo : terms.cmi foUtils.cmi nCicBlob.cmi
-nCicBlob.cmx : terms.cmx foUtils.cmx nCicBlob.cmi
-nCicProof.cmo : terms.cmi pp.cmi nCicBlob.cmi foSubst.cmi nCicProof.cmi
-nCicProof.cmx : terms.cmx pp.cmx nCicBlob.cmx foSubst.cmx nCicProof.cmi
-nCicParamod.cmo : terms.cmi pp.cmi paramod.cmi orderings.cmi nCicProof.cmi \
-    nCicBlob.cmi nCicParamod.cmi
-nCicParamod.cmx : terms.cmx pp.cmx paramod.cmx orderings.cmx nCicProof.cmx \
-    nCicBlob.cmx nCicParamod.cmi
index 0946873b9af5c11fea237022b2394a40393e3de6..c6d1305126d9a80177ec61d3d52f3898578f465b 100644 (file)
@@ -58,12 +58,12 @@ module Founif (B : Orderings.Blob) = struct
             Subst.build_subst i t subst
       | Terms.Var i, t when occurs_check subst i t ->
           raise (UnificationFailure (lazy "Inference.unification.unif"))
-      | Terms.Var i, t when (List.mem i locked_vars) -> 
+      | Terms.Var i, _t when (List.mem i locked_vars) -> 
           raise (UnificationFailure (lazy "Inference.unification.unif"))
       | Terms.Var i, t -> Subst.build_subst i t subst
       | t, Terms.Var i when occurs_check subst i t ->
           raise (UnificationFailure (lazy "Inference.unification.unif"))
-      | t, Terms.Var i when (List.mem i locked_vars) -> 
+      | _t, Terms.Var i when (List.mem i locked_vars) -> 
           raise (UnificationFailure (lazy "Inference.unification.unif"))
       | t, Terms.Var i -> Subst.build_subst i t subst
       | Terms.Node l1, Terms.Node l2 -> (
@@ -90,7 +90,7 @@ module Founif (B : Orderings.Blob) = struct
       in
       match s, t with
         | s, t when U.eq_foterm s t -> subst
-        | Terms.Var i, Terms.Var j
+        | Terms.Var i, Terms.Var _j
             when (not (List.exists (fun (_,k) -> k=t) subst)) ->
             let subst = Subst.build_subst i t subst in
               subst
index 49af5e08946b5e72066e1d35428e079a084885ee..c1e12a34dbbc684c38560e2bae7ff046aff1eabf 100644 (file)
@@ -13,8 +13,8 @@
 
 module Index(B : Orderings.Blob) = struct
   module U = FoUtils.Utils(B)
-  module Unif = FoUnif.Founif(B)
-  module Pp = Pp.Pp(B)
+  (*module Unif = FoUnif.Founif(B)*)
+  (*module Pp = Pp.Pp(B)*)
 
   module ClauseOT =
     struct 
@@ -44,7 +44,7 @@ module Index(B : Orderings.Blob) = struct
       let path_string_of =
         let rec aux arity = function
           | Terms.Leaf a -> [Constant (a, arity)]
-          | Terms.Var i -> (* assert (arity = 0); *) [Variable]
+          | Terms.Var _i -> (* assert (arity = 0); *) [Variable]
          (* FIXME : should this be allowed or not ? 
           | Terms.Node (Terms.Var _::_) ->
              assert false *)
@@ -87,12 +87,12 @@ module Index(B : Orderings.Blob) = struct
         op t l (Terms.Left2Right, c)
     | (_,Terms.Equation (_,r,_,Terms.Lt),_,_) as c -> 
         op t r (Terms.Right2Left, c)
-    | (_,Terms.Equation (l,r,_,Terms.Incomparable),vl,_) as c ->
+    | (_,Terms.Equation (l,r,_,Terms.Incomparable),_vl,_) as c ->
         op (op t l (Terms.Left2Right, c))
           r (Terms.Right2Left, c)
-    | (_,Terms.Equation (l,r,_,Terms.Invertible),vl,_) as c ->
+    | (_,Terms.Equation (l,_r,_,Terms.Invertible),_vl,_) as c ->
        op t l (Terms.Left2Right, c)
-    | (_,Terms.Equation (_,r,_,Terms.Eq),_,_)  -> assert false
+    | (_,Terms.Equation (_,_r,_,Terms.Eq),_,_)  -> assert false
     | (_,Terms.Predicate p,_,_) as c ->
         op t p (Terms.Nodir, c)
   ;;
index be5158452065511f0169d3c9f7b2b38b36e9ba82..b1f2cfa6f2d9cb4774a56c3e89862209759b8983 100644 (file)
@@ -55,10 +55,10 @@ with type t = NCic.term and type input = NCic.term = struct
     | NReference.Fix(_,_,h) -> h
     | _ -> 0
 
-external old_hash_param :
-  int -> int -> 'a -> int = "caml_hash_univ_param" "noalloc";;
+  external old_hash_param :
+    int -> int -> 'a -> int = "caml_hash_univ_param" (*[@@noalloc]*);;
 
-let old_hash = old_hash_param 10 100;;
+  let old_hash = old_hash_param 10 100;;
 
   let compare_refs (NReference.Ref (u1,r1)) (NReference.Ref (u2,r2)) =
     let x = height_of_ref r2 - height_of_ref r1 in
index 199e101fa61a60d4546aa677ef75a5bfa8883db7..1827d80981889d0fdc181b0fad3eb646a422ef19 100644 (file)
@@ -205,7 +205,7 @@ let is_equation status metasenv subst context ty =
     NCicMetaSubst.saturate status ~delta:0 metasenv subst context
       ty 0 
   in match hty with
-    | NCic.Appl (eq ::tl) when eq = CB.eqP -> true
+    | NCic.Appl (eq ::_) when eq = CB.eqP -> true
     | _ -> false
 ;;
 
index 60f2cbafc916ad2e808051ce4b3dd36dc4b0d1db..f34b35748885d8ae4e2ddea34b2c3c8791909dbd 100644 (file)
@@ -131,7 +131,7 @@ let debug c _ = c;;
      NCic.Implicit `Term; eq; NCic.Implicit `Term]; 
   ;;
 
-  let trans eq p = 
+  let trans eq _p = 
    let u= NUri.uri_of_string "cic:/matita/ng/properties/relations/trans.con" in
    let u = NReference.reference_of_spec u (NReference.Fix(0,1,3)) in
      NCic.Appl[NCic.Const u; NCic.Implicit `Type; NCic.Implicit `Term;
@@ -180,7 +180,7 @@ let debug c _ = c;;
               List.fold_left
                (fun (i,acc) t ->
                  i+1,
-                  let f = extract status amount vl f in
+                  let _f = extract status amount vl f in
                   if i = n then
                    let imp = NCic.Implicit `Term in
                     NCic.Appl (dag::imp::imp::imp(* f *)::imp::imp::
@@ -201,15 +201,15 @@ let debug c _ = c;;
      let  module Pp = Pp.Pp(NCicBlob) 
      in
     let module Subst = FoSubst in
-    let compose subst1 subst2 =
+    (*let compose subst1 subst2 =
       let s1 = List.map (fun (x,t) -> (x, Subst.apply_subst subst2 t)) subst1 in
       let s2 = List.filter (fun (m,_) -> not (List.mem_assoc m s1)) subst2
       in s1 @ s2
-    in
+    in*)
     let position i l = 
       let rec aux = function
        | [] -> assert false
-       | (j,_) :: tl when i = j -> 1
+       | (j,_) :: _ when i = j -> 1
        | _ :: tl -> 1 + aux tl
       in
         aux l
@@ -287,7 +287,7 @@ let debug c _ = c;;
               (* prerr_endline (if ongoal then "on goal" else "not on goal");
                  prerr_endline (Pp.pp_substitution subst); *)
               (* let subst = if ongoal then res_subst else subst in *)
-              let id, id1,(lit,vl,proof) =
+              let id, id1,(lit,vl,_proof) =
                 if ongoal then
                  let lit,vl,proof = get_literal id1 in
                  id1,id,(Subst.apply_subst res_subst lit,
index d24a5742eeed196035d3c97c9f181e6ab0d35054..d5f35a3a321c16929177d4af525239dfcac334dc 100644 (file)
@@ -131,8 +131,8 @@ let compare_weights (h1, w1) (h2, w2) =
           if var1 = var2 then
             let diffs = (w1 - w2) + diffs in
             let r = Pervasives.compare w1 w2 in
-            let lt = lt or (r < 0) in
-            let gt = gt or (r > 0) in
+            let lt = lt || (r < 0) in
+            let gt = gt || (r > 0) in
               if lt && gt then XINCOMPARABLE else
                 aux hdiff (lt, gt) diffs tl1 tl2
           else if var1 < var2 then
@@ -208,7 +208,7 @@ module NRKBO (B : Terms.Blob) = struct
   let name = "nrkbo"
   include B 
 
-  module Pp = Pp.Pp(B)
+  (*module Pp = Pp.Pp(B)*)
 
   let eq_foterm = eq_foterm B.eq;;
 
@@ -224,7 +224,7 @@ exception UnificationFailure of string Lazy.t;;
       in
       match s, t with
         | s, t when eq_foterm s t -> subst
-        | Terms.Var i, Terms.Var j
+        | Terms.Var i, Terms.Var _j
             when (not (List.exists (fun (_,k) -> k=t) subst)) ->
             let subst = FoSubst.build_subst i t subst in
               subst
@@ -290,7 +290,7 @@ module KBO (B : Terms.Blob) = struct
   let name = "kbo"
   include B 
 
-  module Pp = Pp.Pp(B)
+  (*module Pp = Pp.Pp(B)*)
 
   let eq_foterm = eq_foterm B.eq;;
 
@@ -356,7 +356,7 @@ module LPO (B : Terms.Blob) = struct
   let name = "lpo"
   include B 
 
-  module Pp = Pp.Pp(B)
+  (*module Pp = Pp.Pp(B)*)
 
   let eq_foterm = eq_foterm B.eq;;
 
index 66a8011870290ae4c266b5a45b73790823ab2b3e..e38179c77cb83af42a52c32872c6b7173f9306a1 100644 (file)
@@ -12,7 +12,7 @@
 (* $Id: orderings.ml 9869 2009-06-11 22:52:38Z denes $ *)
 
 let print s = prerr_endline (Lazy.force s) ;; 
-let noprint s = ();;  
+let noprint _s = ();;  
 let debug = noprint;;
 
 let monster = 100;;
@@ -65,7 +65,7 @@ module type Paramod =
 
 module Paramod (B : Orderings.Blob) = struct
   module Pp = Pp.Pp (B) 
-  module FU = FoUnif.Founif(B) 
+  (*module FU = FoUnif.Founif(B)*)
   module IDX = Index.Index(B) 
   module Sup = Superposition.Superposition(B) 
   module Utils = FoUtils.Utils(B) 
@@ -363,7 +363,7 @@ module Paramod (B : Orderings.Blob) = struct
     debug (lazy("Last chance " ^ string_of_float
                  (Unix.gettimeofday())));
     let actives_l, active_t = actives in
-    let passive_t,wset,_ = passives in
+    let passive_t,_wset,_ = passives in
     let _ = noprint
       (lazy 
         ("Actives :" ^ (String.concat ";\n" 
@@ -493,8 +493,8 @@ module Paramod (B : Orderings.Blob) = struct
     let newstatus = 
       List.fold_left
        (fun acc g ->
-          let bag,maxvar,actives,passives,g_actives,g_passives = acc in
-          let g_passives =
+          let _bag,_maxvar,_actives,_passives,_g_actives,g_passives = acc in
+          let _g_passives =
             remove_passive_goal g_passives g in
           let current = snd g in
           let _ = 
@@ -511,7 +511,7 @@ module Paramod (B : Orderings.Blob) = struct
       let l =
         let rec traverse ongoal (accg,acce) i =
           match Terms.get_from_bag i bag with
-            | (id,_,_,Terms.Exact _),_,_ ->
+            | (_id,_,_,Terms.Exact _),_,_ ->
                 if ongoal then [i],acce else
                   if (List.mem i acce) then accg,acce else accg,acce@[i]
             | (_,_,_,Terms.Step (_,i1,i2,_,_,_)),_,_ ->
@@ -573,8 +573,8 @@ module Paramod (B : Orderings.Blob) = struct
   ;;
 
 let demod s goal =
-  let bag,maxvar,actives,passives,g_actives,g_passives = s in
-  let (bag,maxvar), g = mk_goal (bag,maxvar) goal in
+  let bag,maxvar,actives,_passives,_g_actives,_g_passives = s in
+  let (bag,_maxvar), g = mk_goal (bag,maxvar) goal in
   let bag, ((i,_,_,_) as g1) = Sup.demodulate bag g (snd actives) in
     if g1 = g then GaveUp else compute_result bag i []
 (*
@@ -584,7 +584,7 @@ let demod s goal =
 
 let fast_eq_check s goal =
   let (_,_,_,_,_,g_passives) as s = initialize_goal s goal in
-  if is_passive_g_set_empty g_passives then Error "not an equation"
+  if is_passive_g_set_empty g_passives then (Error "not an equation" : szsontology)
   else
   try 
     goal_narrowing 0 2 None s
@@ -598,7 +598,7 @@ let fast_eq_check s goal =
 let nparamod ~useage ~max_steps ?timeout s goal =
   let bag,maxvar,actives,passives,g_actives,g_passives
       = initialize_goal s goal in
-  if is_passive_g_set_empty g_passives then Error "not an equation" 
+  if is_passive_g_set_empty g_passives then (Error "not an equation" : szsontology)
   else
     try given_clause ~useage ~noinfer:false
       bag maxvar 0 0 max_steps timeout actives passives g_actives g_passives
index 64af9ab17cdef4ac899e3d4f8f44ecf95c83ab10..3f2a5cecc82202cf444080629efa11c5dc1cb43c 100644 (file)
@@ -70,7 +70,7 @@ let pp_proof bag ~formatter:f p =
         Format.fprintf f "%d: Exact (" eq;
         pp_foterm f t;
         Format.fprintf f ")@;";
-    | Terms.Step (rule,eq1,eq2,dir,pos,subst) ->
+    | Terms.Step (rule,eq1,eq2,dir,_pos,_subst) ->
         Format.fprintf f "%d: %s("
           eq (string_of_rule rule);
        Format.fprintf f "|%d with %d dir %s))" eq1 eq2
index fd68f0fe765cd7cd75be5805dac8c516a0f623fb..da00eb5511145c02d99a9dce6aa924bf273ae737 100644 (file)
@@ -115,8 +115,8 @@ module Stats (B : Terms.Blob) =
                            else
                              dependencies op tl acc
                        else dependencies op tl acc
-                    | ((Terms.Node (Terms.Leaf op1::t) as x),y)
-                    | (y,(Terms.Node (Terms.Leaf op1::t) as x)) when leaf_count x > leaf_count y ->
+                    | ((Terms.Node (Terms.Leaf op1::_t) as x),y)
+                    | (y,(Terms.Node (Terms.Leaf op1::_t) as x)) when leaf_count x > leaf_count y ->
                          let rec term_leaves = function
                            | Terms.Node l -> List.fold_left (fun acc x -> acc @ (term_leaves x)) [] l
                            | Terms.Leaf x -> [x]
index 13b876bed792e977ba675c6c930fce2b88578c96..801e56b2623ed802a8f0eb71ce93c733d72f59a8 100644 (file)
@@ -111,7 +111,7 @@ module Superposition (B : Orderings.Blob) =
       | Terms.Leaf _ as t -> 
          let  bag,subst,t,id = f bag t pos ctx id in
            assert (subst=[]); bag,t,id
-      | Terms.Var i as t ->  
+      | Terms.Var _ as t ->  
          let t= Subst.apply_subst subst t in
            bag,t,id
       | Terms.Node (hd::l) ->
@@ -181,7 +181,7 @@ module Superposition (B : Orderings.Blob) =
          (IDX.DT.retrieve_generalizations table) subterm 
       in
       list_first
-        (fun (dir, (id,lit,vl,_)) ->
+        (fun (dir, (id,lit,_vl,_)) ->
            match lit with
            | Terms.Predicate _ -> assert false
            | Terms.Equation (l,r,_,o) ->
@@ -227,7 +227,7 @@ module Superposition (B : Orderings.Blob) =
          (IDX.DT.retrieve_generalizations table) subterm 
       in
       list_first
-        (fun (dir, ((id,lit,vl,_) as c)) ->
+        (fun (dir, ((id,lit,_vl,_) as c)) ->
           debug (lazy("candidate: " 
                       ^ Pp.pp_unit_clause c)); 
            match lit with
@@ -280,7 +280,7 @@ module Superposition (B : Orderings.Blob) =
                     (bag,subst,newside,id)
     ;;
       
-    let rec demodulate bag (id, literal, vl, pr) table =
+    let demodulate bag (id, literal, vl, _pr) table =
       debug (lazy ("demodulate " ^ (string_of_int id)));
        match literal with
       | Terms.Predicate t -> (* assert false *)
@@ -341,7 +341,7 @@ module Superposition (B : Orderings.Blob) =
 
     let is_identity_goal = function
       | _, Terms.Equation (_,_,_,Terms.Eq), _, _ -> Some []
-      | _, Terms.Equation (l,r,_,_), vl, proof ->
+      | _, Terms.Equation (l,r,_,_), _vl, _proof ->
           (try Some (Unif.unification (* vl *) [] l r)
            with FoUnif.UnificationFailure _ -> None)
       | _, Terms.Predicate _, _, _ -> assert false          
@@ -389,7 +389,7 @@ module Superposition (B : Orderings.Blob) =
       let f b c =
         let id, dir, l, r, vl = 
           match c with
-            | (d, (id,Terms.Equation (l,r,ty,_),vl,_))-> id, d, l, r, vl
+            | (d, (id,Terms.Equation (l,r,_ty,_),vl,_))-> id, d, l, r, vl
             |_ -> assert false 
         in 
         let reverse = (dir = Terms.Left2Right) = b in
@@ -508,7 +508,7 @@ module Superposition (B : Orderings.Blob) =
     let rec orphan_murder bag acc i =
       match Terms.get_from_bag i bag with
         | (_,_,_,Terms.Exact _),discarded,_ -> (discarded,acc)
-        | (_,_,_,Terms.Step (_,i1,i2,_,_,_)),true,_ -> (true,acc)
+        | (_,_,_,Terms.Step (_,_i1,_i2,_,_,_)),true,_ -> (true,acc)
         | (_,_,_,Terms.Step (_,i1,i2,_,_,_)),false,_ ->
             if (List.mem i acc) then (false,acc)
             else match orphan_murder bag acc i1 with
@@ -570,7 +570,7 @@ module Superposition (B : Orderings.Blob) =
                    match simplify ctable maxvar bag c with
                      |bag,None -> (bag,alist,atable)
                         (* an active clause as been discarded *)
-                     |bag,Some c1 ->
+                     |bag,Some _c1 ->
                         bag, c :: alist, IDX.index_unit_clause atable c)
                 (bag,[],IDX.DT.empty) alist
             in
@@ -671,7 +671,7 @@ module Superposition (B : Orderings.Blob) =
       else match (is_identity_goal clause) with
        | Some subst -> raise (Success (bag,maxvar,clause,subst))
        | None ->
-        let (id,lit,vl,_) = clause in 
+        let (_id,lit,vl,_) = clause in 
         (* this optimization makes sense only if we demodulated, since in 
           that case the clause should have been turned into an identity *)
         if (vl = [] && not(no_demod)) 
@@ -706,10 +706,10 @@ module Superposition (B : Orderings.Blob) =
     (* =================== inference ===================== *)
 
     (* this is OK for both the sup_left and sup_right inference steps *)
-    let superposition table varlist subterm pos context =
+    let superposition table _varlist subterm pos context =
       let cands = IDX.DT.retrieve_unifiables table subterm in
       HExtlib.filter_map
-        (fun (dir, (id,lit,vl,_ (*as uc*))) ->
+        (fun (dir, (id,lit,_vl,_ (*as uc*))) ->
            match lit with
            | Terms.Predicate _ -> assert false
            | Terms.Equation (l,r,_,o) ->
index d8295760aff118a07e4066718ff8146fb64f0228..6d211ffe5e37f7507df2121affe276b0d59bdcb5 100644 (file)
@@ -1,27 +1,62 @@
-nDiscriminationTree.cmi :
+nCicCoercion.cmo : \
+    nDiscriminationTree.cmi \
+    nCicUnifHint.cmi \
+    nCicMetaSubst.cmi \
+    nCicCoercion.cmi
+nCicCoercion.cmx : \
+    nDiscriminationTree.cmx \
+    nCicUnifHint.cmx \
+    nCicMetaSubst.cmx \
+    nCicCoercion.cmi
+nCicCoercion.cmi : \
+    nCicUnifHint.cmi
+nCicMetaSubst.cmo : \
+    nCicMetaSubst.cmi
+nCicMetaSubst.cmx : \
+    nCicMetaSubst.cmi
 nCicMetaSubst.cmi :
-nCicUnifHint.cmi :
-nCicCoercion.cmi : nCicUnifHint.cmi
+nCicRefineUtil.cmo : \
+    nCicMetaSubst.cmi \
+    nCicRefineUtil.cmi
+nCicRefineUtil.cmx : \
+    nCicMetaSubst.cmx \
+    nCicRefineUtil.cmi
 nCicRefineUtil.cmi :
-nCicUnification.cmi : nCicCoercion.cmi
-nCicRefiner.cmi : nCicCoercion.cmi
-nDiscriminationTree.cmo : nDiscriminationTree.cmi
-nDiscriminationTree.cmx : nDiscriminationTree.cmi
-nCicMetaSubst.cmo : nCicMetaSubst.cmi
-nCicMetaSubst.cmx : nCicMetaSubst.cmi
-nCicUnifHint.cmo : nDiscriminationTree.cmi nCicMetaSubst.cmi \
+nCicRefiner.cmo : \
+    nCicUnification.cmi \
+    nCicRefineUtil.cmi \
+    nCicMetaSubst.cmi \
+    nCicCoercion.cmi \
+    nCicRefiner.cmi
+nCicRefiner.cmx : \
+    nCicUnification.cmx \
+    nCicRefineUtil.cmx \
+    nCicMetaSubst.cmx \
+    nCicCoercion.cmx \
+    nCicRefiner.cmi
+nCicRefiner.cmi : \
+    nCicCoercion.cmi
+nCicUnifHint.cmo : \
+    nDiscriminationTree.cmi \
+    nCicMetaSubst.cmi \
     nCicUnifHint.cmi
-nCicUnifHint.cmx : nDiscriminationTree.cmx nCicMetaSubst.cmx \
+nCicUnifHint.cmx : \
+    nDiscriminationTree.cmx \
+    nCicMetaSubst.cmx \
     nCicUnifHint.cmi
-nCicCoercion.cmo : nDiscriminationTree.cmi nCicUnifHint.cmi \
-    nCicMetaSubst.cmi nCicCoercion.cmi
-nCicCoercion.cmx : nDiscriminationTree.cmx nCicUnifHint.cmx \
-    nCicMetaSubst.cmx nCicCoercion.cmi
-nCicRefineUtil.cmo : nCicMetaSubst.cmi nCicRefineUtil.cmi
-nCicRefineUtil.cmx : nCicMetaSubst.cmx nCicRefineUtil.cmi
-nCicUnification.cmo : nCicUnifHint.cmi nCicMetaSubst.cmi nCicUnification.cmi
-nCicUnification.cmx : nCicUnifHint.cmx nCicMetaSubst.cmx nCicUnification.cmi
-nCicRefiner.cmo : nCicUnification.cmi nCicRefineUtil.cmi nCicMetaSubst.cmi \
-    nCicCoercion.cmi nCicRefiner.cmi
-nCicRefiner.cmx : nCicUnification.cmx nCicRefineUtil.cmx nCicMetaSubst.cmx \
-    nCicCoercion.cmx nCicRefiner.cmi
+nCicUnifHint.cmi :
+nCicUnification.cmo : \
+    nCicUnifHint.cmi \
+    nCicMetaSubst.cmi \
+    nCicUnification.cmi
+nCicUnification.cmx : \
+    nCicUnifHint.cmx \
+    nCicMetaSubst.cmx \
+    nCicUnification.cmi
+nCicUnification.cmi : \
+    nCicCoercion.cmi
+nDiscriminationTree.cmo : \
+    nDiscriminationTree.cmi
+nDiscriminationTree.cmx : \
+    nDiscriminationTree.cmi
+nDiscriminationTree.cmi :
index d8295760aff118a07e4066718ff8146fb64f0228..a25cbdb11fafcdb4faf0479fbd623af1b7264e70 100644 (file)
@@ -1,27 +1,36 @@
-nDiscriminationTree.cmi :
+nCicCoercion.cmx : \
+    nDiscriminationTree.cmx \
+    nCicUnifHint.cmx \
+    nCicMetaSubst.cmx \
+    nCicCoercion.cmi
+nCicCoercion.cmi : \
+    nCicUnifHint.cmi
+nCicMetaSubst.cmx : \
+    nCicMetaSubst.cmi
 nCicMetaSubst.cmi :
-nCicUnifHint.cmi :
-nCicCoercion.cmi : nCicUnifHint.cmi
+nCicRefineUtil.cmx : \
+    nCicMetaSubst.cmx \
+    nCicRefineUtil.cmi
 nCicRefineUtil.cmi :
-nCicUnification.cmi : nCicCoercion.cmi
-nCicRefiner.cmi : nCicCoercion.cmi
-nDiscriminationTree.cmo : nDiscriminationTree.cmi
-nDiscriminationTree.cmx : nDiscriminationTree.cmi
-nCicMetaSubst.cmo : nCicMetaSubst.cmi
-nCicMetaSubst.cmx : nCicMetaSubst.cmi
-nCicUnifHint.cmo : nDiscriminationTree.cmi nCicMetaSubst.cmi \
+nCicRefiner.cmx : \
+    nCicUnification.cmx \
+    nCicRefineUtil.cmx \
+    nCicMetaSubst.cmx \
+    nCicCoercion.cmx \
+    nCicRefiner.cmi
+nCicRefiner.cmi : \
+    nCicCoercion.cmi
+nCicUnifHint.cmx : \
+    nDiscriminationTree.cmx \
+    nCicMetaSubst.cmx \
     nCicUnifHint.cmi
-nCicUnifHint.cmx : nDiscriminationTree.cmx nCicMetaSubst.cmx \
-    nCicUnifHint.cmi
-nCicCoercion.cmo : nDiscriminationTree.cmi nCicUnifHint.cmi \
-    nCicMetaSubst.cmi nCicCoercion.cmi
-nCicCoercion.cmx : nDiscriminationTree.cmx nCicUnifHint.cmx \
-    nCicMetaSubst.cmx nCicCoercion.cmi
-nCicRefineUtil.cmo : nCicMetaSubst.cmi nCicRefineUtil.cmi
-nCicRefineUtil.cmx : nCicMetaSubst.cmx nCicRefineUtil.cmi
-nCicUnification.cmo : nCicUnifHint.cmi nCicMetaSubst.cmi nCicUnification.cmi
-nCicUnification.cmx : nCicUnifHint.cmx nCicMetaSubst.cmx nCicUnification.cmi
-nCicRefiner.cmo : nCicUnification.cmi nCicRefineUtil.cmi nCicMetaSubst.cmi \
-    nCicCoercion.cmi nCicRefiner.cmi
-nCicRefiner.cmx : nCicUnification.cmx nCicRefineUtil.cmx nCicMetaSubst.cmx \
-    nCicCoercion.cmx nCicRefiner.cmi
+nCicUnifHint.cmi :
+nCicUnification.cmx : \
+    nCicUnifHint.cmx \
+    nCicMetaSubst.cmx \
+    nCicUnification.cmi
+nCicUnification.cmi : \
+    nCicCoercion.cmi
+nDiscriminationTree.cmx : \
+    nDiscriminationTree.cmi
+nDiscriminationTree.cmi :
index 79871a567964b2bce491529af178a83cfa6637c8..612078e3e9d671a690434c6ca2749a11c6c29c6d 100644 (file)
@@ -14,9 +14,6 @@ IMPLEMENTATION_FILES = \
   $(INTERFACE_FILES:%.mli=%.ml)
 EXTRA_OBJECTS_TO_INSTALL = 
 EXTRA_OBJECTS_TO_CLEAN =
-%.cmo: OCAMLOPTIONS += -w Ae
-%.cmi: OCAMLOPTIONS += -w Ae
-%.cmx: OCAMLOPTIONS += -w Ae
 
 include ../../Makefile.defs
 include ../Makefile.common
index 0207c9231e058b15d5ab820d21b0bf1719ca2cca..beeeeeb6b288a6c22cc0d8bfe28efd67c31066ef 100644 (file)
@@ -53,7 +53,7 @@ let newmeta,maxmeta,pushmaxmeta,popmaxmeta =
   (fun () -> incr maxmeta; !maxmeta),
   (fun () -> !maxmeta),
   (fun () -> pushedmetas := !maxmeta::!pushedmetas; maxmeta := 0),
-  (fun () -> match !pushedmetas with [] -> assert false | hd::tl -> pushedmetas := tl)
+  (fun () -> match !pushedmetas with [] -> assert false | _hd::tl -> pushedmetas := tl)
 ;;
 
 exception NotFound of [`NotInTheList | `NotWellTyped];;
@@ -525,8 +525,7 @@ let delift status ~unify metasenv subst context n l t =
          raise (NotFound `NotWellTyped)
       | TypeNotGood
       | NCicTypeChecker.AssertFailure _
-      | NCicReduction.AssertFailure _
-      | NCicTypeChecker.TypeCheckerFailure _ ->
+      | NCicReduction.AssertFailure _ ->
          raise (NotFound `NotWellTyped))
    with NotFound reason ->
       (* This is the case where we fail even first order unification. *)
index 30ae05577e59eacb35c63daf95b0316afb67c7ba..508e891f3e2b59932dd8c5c2de00ae7b29438b84 100644 (file)
@@ -25,8 +25,8 @@
 
 (* $Id: cicUtil.ml 10153 2009-07-28 15:17:51Z sacerdot $ *)
 
-exception Meta_not_found of int
-exception Subst_not_found of int
+(*exception Meta_not_found of int
+exception Subst_not_found of int*)
 
 (* syntactic_equality up to the                 *)
 (* distinction between fake dependent products  *)
index 15fcc069aaae4e3a589dbffb2e3d9abb49d788c6..0523ef8b202fae7e1c406b8758e5b8be78651581 100644 (file)
@@ -608,15 +608,15 @@ and try_coercions status
     pp (lazy "WWW: trying coercions -- inner check");
     match infty, expty, t with
     (* `XTSort|`XTProd|`XTInd + Match not implemented *) 
-    | _,`XTSome expty, C.Match (Ref.Ref (_,Ref.Ind (_,tyno,leftno)) as r,outty,m,pl) ->
+    | _,`XTSome expty, C.Match (Ref.Ref (_,Ref.Ind (_,_tyno,_leftno)) as r,outty,m,pl) ->
         (*{{{*) pp (lazy "CASE");
         (* {{{ helper functions *)
         let get_cl_and_left_p refit outty =
           match refit with
-          | Ref.Ref (uri, Ref.Ind (_,tyno,leftno)) ->
+          | Ref.Ref (_uri, Ref.Ind (_,tyno,_leftno)) ->
              let _, leftno, itl, _, _ = NCicEnvironment.get_checked_indtys status r in
              let _, _, ty, cl = List.nth itl tyno in
-             let constructorsno = List.length cl in
+             (*let constructorsno = List.length cl in*)
               let count_pis t =
                 let rec aux ctx t = 
                   match NCicReduction.whd status ~subst ~delta:max_int ctx t with
@@ -700,7 +700,7 @@ and try_coercions status
                     (NCicSubstitution.lift status 1 mty) (NCicSubstitution.lift status 1 m) tgt
                 in
                 C.Prod (name, src, t), k
-            | C.Const (Ref.Ref (_,Ref.Ind (_,_,leftno)) as r) ->
+            | C.Const (Ref.Ref (_,Ref.Ind (_,_,_leftno)) as r) ->
                 let k = 
                   let k = C.Const(Ref.mk_constructor i r) in
                   NCicUntrusted.mk_appl k par
@@ -716,8 +716,8 @@ and try_coercions status
                   (NCicReduction.head_beta_reduce status ~delta:max_int 
                    (NCicUntrusted.mk_appl outty [k])))),[mty,m,mty,k]
             | C.Appl (C.Const (Ref.Ref (_,Ref.Ind (_,_,leftno)) as r)::pl) ->
-                let left_p,right_p = HExtlib.split_nth leftno pl in
-                let has_rights = right_p <> [] in
+                let left_p,_right_p = HExtlib.split_nth leftno pl in
+                (*let has_rights = right_p <> [] in*)
                 let k = 
                   let k = C.Const(Ref.mk_constructor i r) in
                   NCicUntrusted.mk_appl k (left_p@par)
@@ -819,7 +819,7 @@ and try_coercions status
         in (* }}} end helper functions *)
         (* constructors types with left params already instantiated *)
         let outty = NCicUntrusted.apply_subst status subst context outty in
-        let cl, left_p, leftno,rno = 
+        let cl, _left_p, leftno,rno = 
           get_cl_and_left_p r outty
         in
         let right_p, mty = 
@@ -930,7 +930,7 @@ and try_coercions status
         pp (lazy ("LAM: coerced = " ^ status#ppterm ~metasenv ~subst ~context coerced));
         metasenv, subst, coerced, expty (*}}}*)
     | _ -> raise exc
-  with exc2 ->    
+  with _ ->    
   let expty =
    match expty with
       `XTSome expty -> expty
@@ -1312,7 +1312,7 @@ let typeof_obj
                 let rec aux context (metasenv,subst) = function
                   | C.Meta _ -> metasenv, subst
                   | C.Implicit _ -> metasenv, subst
-                  | C.Appl (C.Rel i :: args) as t
+                  | C.Appl (C.Rel i :: args)
                       when i > List.length context - len ->
                       let lefts, _ = HExtlib.split_nth leftno args in
                       let ctxlen = List.length context in
index a0d767c3a6a71f4a9f5aeb7e4713f51471e3c295..5c7f92f999a4d10265bdd67a7d7c53375fb85b4c 100644 (file)
@@ -332,8 +332,8 @@ let look_for_hint (status:#status) metasenv subst context t1 t2 =
              end
 ;;
 
-let pp_hint p =
-  let context, t = 
+let pp_hint _t _p =
+(*  let context, t = 
      let rec aux ctx = function
        | NCic.Prod (name, ty, rest) -> aux ((name, NCic.Decl ty) :: ctx) rest
        | t -> ctx, t
@@ -349,7 +349,6 @@ let pp_hint t p =
   in
   let buff = Buffer.create 100 in
   let fmt = Format.formatter_of_buffer buff in
-(*
   F.fprintf "@[<hov>"
    F.fprintf "@[<hov>"
 (*    pp_ctx [] context *)
@@ -405,9 +404,9 @@ let generate_dot_file (status:#status) fmt =
         (HintSet.elements dataset);
     );
   List.iter (fun x, l -> Pp.node x ~attrs:["label",l] fmt) !nodes;
-  List.iter (fun x, y, l, _, _ -> 
+  List.iter (fun x, y, _l, _, _ -> 
       Pp.raw (Printf.sprintf "%s -- %s [ label=\"%s\" ];\n" x y "?") fmt)
   !edges;
   edges := List.sort (fun (_,_,_,p1,_) (_,_,_,p2,_) -> p1 - p2) !edges;
-  List.iter (fun x, y, _, p, l -> pp_hint l p) !edges;
+  List.iter (fun _x, _y, _, p, l -> pp_hint l p) !edges;
 ;;
index 57784f373c6431d686960a318d050bad7555ac49..4d386aaa4d37e5662f77a796b3acf2f9205b84f5 100644 (file)
@@ -1,35 +1,94 @@
-continuationals.cmo : continuationals.cmi
-continuationals.cmx : continuationals.cmi
+continuationals.cmo : \
+    continuationals.cmi
+continuationals.cmx : \
+    continuationals.cmi
 continuationals.cmi :
-declarative.cmo : nnAuto.cmi nTactics.cmi nTacStatus.cmi nCicElim.cmi \
-    continuationals.cmi declarative.cmi
-declarative.cmx : nnAuto.cmx nTactics.cmx nTacStatus.cmx nCicElim.cmx \
-    continuationals.cmx declarative.cmi
-declarative.cmi : nnAuto.cmi nTacStatus.cmi
-nCicElim.cmo : nCicElim.cmi
-nCicElim.cmx : nCicElim.cmi
+declarative.cmo : \
+    nnAuto.cmi \
+    nTactics.cmi \
+    nTacStatus.cmi \
+    nCicElim.cmi \
+    continuationals.cmi \
+    declarative.cmi
+declarative.cmx : \
+    nnAuto.cmx \
+    nTactics.cmx \
+    nTacStatus.cmx \
+    nCicElim.cmx \
+    continuationals.cmx \
+    declarative.cmi
+declarative.cmi : \
+    nnAuto.cmi \
+    nTacStatus.cmi
+nCicElim.cmo : \
+    nCicElim.cmi
+nCicElim.cmx : \
+    nCicElim.cmi
 nCicElim.cmi :
-nCicTacReduction.cmo : nCicTacReduction.cmi
-nCicTacReduction.cmx : nCicTacReduction.cmi
+nCicTacReduction.cmo : \
+    nCicTacReduction.cmi
+nCicTacReduction.cmx : \
+    nCicTacReduction.cmi
 nCicTacReduction.cmi :
-nDestructTac.cmo : nTactics.cmi nTacStatus.cmi continuationals.cmi \
+nDestructTac.cmo : \
+    nTactics.cmi \
+    nTacStatus.cmi \
+    continuationals.cmi \
     nDestructTac.cmi
-nDestructTac.cmx : nTactics.cmx nTacStatus.cmx continuationals.cmx \
+nDestructTac.cmx : \
+    nTactics.cmx \
+    nTacStatus.cmx \
+    continuationals.cmx \
     nDestructTac.cmi
-nDestructTac.cmi : nTacStatus.cmi
-nInversion.cmo : nTactics.cmi nTacStatus.cmi nCicElim.cmi \
-    continuationals.cmi nInversion.cmi
-nInversion.cmx : nTactics.cmx nTacStatus.cmx nCicElim.cmx \
-    continuationals.cmx nInversion.cmi
-nInversion.cmi : nTacStatus.cmi
-nTacStatus.cmo : nCicTacReduction.cmi continuationals.cmi nTacStatus.cmi
-nTacStatus.cmx : nCicTacReduction.cmx continuationals.cmx nTacStatus.cmi
-nTacStatus.cmi : continuationals.cmi
-nTactics.cmo : nTacStatus.cmi nCicElim.cmi continuationals.cmi nTactics.cmi
-nTactics.cmx : nTacStatus.cmx nCicElim.cmx continuationals.cmx nTactics.cmi
-nTactics.cmi : nTacStatus.cmi
-nnAuto.cmo : nTactics.cmi nTacStatus.cmi nCicTacReduction.cmi \
-    continuationals.cmi nnAuto.cmi
-nnAuto.cmx : nTactics.cmx nTacStatus.cmx nCicTacReduction.cmx \
-    continuationals.cmx nnAuto.cmi
-nnAuto.cmi : nTacStatus.cmi
+nDestructTac.cmi : \
+    nTacStatus.cmi
+nInversion.cmo : \
+    nTactics.cmi \
+    nTacStatus.cmi \
+    nCicElim.cmi \
+    continuationals.cmi \
+    nInversion.cmi
+nInversion.cmx : \
+    nTactics.cmx \
+    nTacStatus.cmx \
+    nCicElim.cmx \
+    continuationals.cmx \
+    nInversion.cmi
+nInversion.cmi : \
+    nTacStatus.cmi
+nTacStatus.cmo : \
+    nCicTacReduction.cmi \
+    continuationals.cmi \
+    nTacStatus.cmi
+nTacStatus.cmx : \
+    nCicTacReduction.cmx \
+    continuationals.cmx \
+    nTacStatus.cmi
+nTacStatus.cmi : \
+    continuationals.cmi
+nTactics.cmo : \
+    nTacStatus.cmi \
+    nCicElim.cmi \
+    continuationals.cmi \
+    nTactics.cmi
+nTactics.cmx : \
+    nTacStatus.cmx \
+    nCicElim.cmx \
+    continuationals.cmx \
+    nTactics.cmi
+nTactics.cmi : \
+    nTacStatus.cmi
+nnAuto.cmo : \
+    nTactics.cmi \
+    nTacStatus.cmi \
+    nCicTacReduction.cmi \
+    continuationals.cmi \
+    nnAuto.cmi
+nnAuto.cmx : \
+    nTactics.cmx \
+    nTacStatus.cmx \
+    nCicTacReduction.cmx \
+    continuationals.cmx \
+    nnAuto.cmi
+nnAuto.cmi : \
+    nTacStatus.cmi
index 420a5dbc6ab22514608d9e9578d7050f53692716..ca420895d92c48c446b4bd70d62ac525f1353e7a 100644 (file)
@@ -1,33 +1,55 @@
+continuationals.cmx : \
+    continuationals.cmi
 continuationals.cmi :
-nCicTacReduction.cmi :
-nTacStatus.cmi : continuationals.cmi
+declarative.cmx : \
+    nnAuto.cmx \
+    nTactics.cmx \
+    nTacStatus.cmx \
+    nCicElim.cmx \
+    continuationals.cmx \
+    declarative.cmi
+declarative.cmi : \
+    nnAuto.cmi \
+    nTacStatus.cmi
+nCicElim.cmx : \
+    nCicElim.cmi
 nCicElim.cmi :
-nTactics.cmi : nTacStatus.cmi
-declarative.cmi : nTacStatus.cmi
-nnAuto.cmi : nTacStatus.cmi
-nDestructTac.cmi : nTacStatus.cmi
-nInversion.cmi : nTacStatus.cmi
-continuationals.cmo : continuationals.cmi
-continuationals.cmx : continuationals.cmi
-nCicTacReduction.cmo : nCicTacReduction.cmi
-nCicTacReduction.cmx : nCicTacReduction.cmi
-nTacStatus.cmo : nCicTacReduction.cmi continuationals.cmi nTacStatus.cmi
-nTacStatus.cmx : nCicTacReduction.cmx continuationals.cmx nTacStatus.cmi
-nCicElim.cmo : nCicElim.cmi
-nCicElim.cmx : nCicElim.cmi
-nTactics.cmo : nTacStatus.cmi nCicElim.cmi continuationals.cmi nTactics.cmi
-nTactics.cmx : nTacStatus.cmx nCicElim.cmx continuationals.cmx nTactics.cmi
-declarative.cmo : nTactics.cmi declarative.cmi
-declarative.cmx : nTactics.cmx declarative.cmi
-nnAuto.cmo : nTactics.cmi nTacStatus.cmi nCicTacReduction.cmi \
-    continuationals.cmi nnAuto.cmi
-nnAuto.cmx : nTactics.cmx nTacStatus.cmx nCicTacReduction.cmx \
-    continuationals.cmx nnAuto.cmi
-nDestructTac.cmo : nTactics.cmi nTacStatus.cmi continuationals.cmi \
-    nDestructTac.cmi
-nDestructTac.cmx : nTactics.cmx nTacStatus.cmx continuationals.cmx \
+nCicTacReduction.cmx : \
+    nCicTacReduction.cmi
+nCicTacReduction.cmi :
+nDestructTac.cmx : \
+    nTactics.cmx \
+    nTacStatus.cmx \
+    continuationals.cmx \
     nDestructTac.cmi
-nInversion.cmo : nTactics.cmi nTacStatus.cmi nCicElim.cmi \
-    continuationals.cmi nInversion.cmi
-nInversion.cmx : nTactics.cmx nTacStatus.cmx nCicElim.cmx \
-    continuationals.cmx nInversion.cmi
+nDestructTac.cmi : \
+    nTacStatus.cmi
+nInversion.cmx : \
+    nTactics.cmx \
+    nTacStatus.cmx \
+    nCicElim.cmx \
+    continuationals.cmx \
+    nInversion.cmi
+nInversion.cmi : \
+    nTacStatus.cmi
+nTacStatus.cmx : \
+    nCicTacReduction.cmx \
+    continuationals.cmx \
+    nTacStatus.cmi
+nTacStatus.cmi : \
+    continuationals.cmi
+nTactics.cmx : \
+    nTacStatus.cmx \
+    nCicElim.cmx \
+    continuationals.cmx \
+    nTactics.cmi
+nTactics.cmi : \
+    nTacStatus.cmi
+nnAuto.cmx : \
+    nTactics.cmx \
+    nTacStatus.cmx \
+    nCicTacReduction.cmx \
+    continuationals.cmx \
+    nnAuto.cmi
+nnAuto.cmi : \
+    nTacStatus.cmi
index 5538a3c2d0f985cfeecaf72d046f299e58619032..dc54c89dd8c600704ea9393580823ff00732c17e 100644 (file)
@@ -51,7 +51,7 @@ struct
     let rec aux acc depth =
       function
       | [] -> acc
-      | (locs, todos, conts, tag, p) :: tl ->
+      | (locs, todos, conts, tag, _p) :: tl ->
           let acc = List.fold_left (fun acc -> env acc depth tag)  acc locs in
           let acc = List.fold_left (fun acc -> cont acc depth tag) acc conts in
           let acc = List.fold_left (fun acc -> todo acc depth tag) acc todos in
index 4fa6b5bcbf85e8cab94c6d1690e3f4e44ccb398c..d96e6681109893d201d1ffa93d057742dd9238df 100644 (file)
@@ -43,19 +43,18 @@ let extract_first_goal_from_status status =
   let s = status#stack in
   match s with
   | [] -> fail (lazy "There's nothing to prove")
-  | (g1, _, k, tag1, _) :: tl ->
+  | (g1, _, _k, _tag1, _) :: _tl ->
     let goals = filter_open g1 in
     match goals with
       [] -> fail (lazy "No goals under focus")
-    | loc::tl -> 
+    | loc::_tl -> 
       let goal = goal_of_loc (loc) in
       goal ;;
 
 let extract_conclusion_type status goal =
   let gty = get_goalty status goal in
   let ctx = ctx_of gty in
-  let status,gty = term_of_cic_term status gty ctx in
-  gty
+  term_of_cic_term status gty ctx
 ;;
 
 let alpha_eq_tacterm_kerterm ty t status goal =
@@ -83,7 +82,7 @@ let clear_volatile_params_tac status =
   | (g,t,k,tag,p)::tl -> 
     let rec remove_volatile = function
         [] -> []
-      | (k,v as hd')::tl' ->
+      | (k,_v as hd')::tl' ->
         let re = Str.regexp "volatile_.*" in
         if Str.string_match re k 0 then
           remove_volatile tl'
@@ -107,7 +106,7 @@ let add_parameter_tac key value status =
 *)
 let lambda_abstract_tac id t1 status goal =
   match extract_conclusion_type status goal with
-  | NCic.Prod (_,t,_) ->
+  | status,NCic.Prod (_,t,_) ->
     if alpha_eq_tacterm_kerterm t1 t status goal then
       let (_,_,t1) = t1 in
       block_tac [exact_tac ("",0,(Ast.Binder (`Lambda,(Ast.Ident (id,None),Some t1),Ast.Implicit
@@ -136,12 +135,12 @@ let suppose t1 id status =
 ;;
 
 let assert_tac t1 t2 status goal continuation =
-  let t = extract_conclusion_type status goal in
+  let status,t = extract_conclusion_type status goal in
   if alpha_eq_tacterm_kerterm t1 t status goal then
     match t2 with
     | None -> continuation
     | Some t2 ->
-      let status,res = are_convertible t1 t2 status goal in
+      let _status,res = are_convertible t1 t2 status goal in
       if res then continuation
       else
         raise NotEquivalentTypes
@@ -161,7 +160,7 @@ let branch_dot_tac status =
 let status_parameter key status =
   match status#stack with
     [] -> ""
-  | (g,t,k,tag,p)::_ -> try List.assoc key p with _ -> ""
+  | (_g,_t,_k,_tag,p)::_ -> try List.assoc key p with _ -> ""
 ;;
 
 let beta_rewriting_step t status =
@@ -238,7 +237,6 @@ let we_need_to_prove t id status =
 
 let by_just_we_proved just ty id status =
   let goal = extract_first_goal_from_status status in
-  let wrappedjust = just in
   let just = mk_just status goal just in
   match id with
   | None ->
@@ -412,12 +410,12 @@ let print_goals_names_tac s (status:#NTacStatus.tac_status) =
 (* Useful as it does not change the order in the list *)
 let rec list_change_assoc k v = function
     [] -> []
-  | (k',v' as hd) :: tl -> if k' = k then (k',v) :: tl else hd :: (list_change_assoc k v tl)
+  | (k',_v' as hd) :: tl -> if k' = k then (k',v) :: tl else hd :: (list_change_assoc k v tl)
 ;;
 
 let add_names_to_goals_tac (cl:NCic.constructor list ref) (status:#NTacStatus.tac_status) =
   let add_name_to_goal name goal metasenv =
-    let (mattrs,ctx,t as conj) = try List.assoc goal metasenv with _ -> assert false in
+    let (mattrs,ctx,t) = try List.assoc goal metasenv with _ -> assert false in
     let mattrs = (`Name name) :: (List.filter (function `Name _ -> false | _ -> true) mattrs) in
     let newconj = (mattrs,ctx,t) in
     list_change_assoc goal newconj metasenv
@@ -427,7 +425,7 @@ let add_names_to_goals_tac (cl:NCic.constructor list ref) (status:#NTacStatus.ta
      * the new goals, when they are still under focus *)
     match status#stack with
       [] -> fail (lazy "Can not add names to an empty stack")
-    | (g,_,_,_,_) :: tl -> 
+    | (g,_,_,_,_) :: _tl -> 
       let rec sublist n = function
           [] -> []
         | hd :: tl -> if n = 0 then [] else hd :: (sublist (n-1) tl)
@@ -567,7 +565,7 @@ let rec loc_of_goal goal l =
 let has_focused_goal status =
   match status#stack with
     [] -> false
-  | ([],_,_,_,_) :: tl -> false
+  | ([],_,_,_,_) :: _tl -> false
   | _ -> true
 ;;
 
index 582f7353b01a5f08441f175c94acb1a907587ee2..5a5c7ba381f56216a15335cfecd93936602d1b39 100644 (file)
@@ -50,7 +50,7 @@ let mk_elim status uri leftno it (outsort,suffix) pragma =
  let p_name = mk_id "Q_" in
  let params,ty = NCicReduction.split_prods status ~subst:[] [] leftno ty in
  let params = List.rev_map (function name,_ -> mk_id name) params in
- let args,sort = NCicReduction.split_prods status ~subst:[] [] (-1) ty in
+ let args,_sort = NCicReduction.split_prods status ~subst:[] [] (-1) ty in
  let args = List.rev_map (function name,_ -> mk_id name) args in
  let rec_arg = mk_id (fresh_name ()) in
  let mk_prods = 
@@ -77,7 +77,7 @@ let mk_elim status uri leftno it (outsort,suffix) pragma =
   List.map
    (function (_,name,ty) ->
      let _,ty = NCicReduction.split_prods status ~subst:[] [] leftno ty in
-     let cargs,ty= my_split_prods status ~subst:[] [] (-1) ty in
+     let cargs,_ty= my_split_prods status ~subst:[] [] (-1) ty in
      let cargs_recargs_nih =
       List.fold_left
        (fun (acc,nih) -> function
@@ -248,7 +248,7 @@ let pp (status: #NCic.status) =
     in
     let rec eat_branch n rels ty pat =
       match (ty, pat) with
-      | NCic.Prod (name, s, t), _ when n > 0 ->
+      | NCic.Prod (_name, _s, t), _ when n > 0 ->
          eat_branch (pred n) rels t pat
       | NCic.Prod (_, _, t), NCic.Lambda (name, s, t') ->
           let cv, rhs = eat_branch 0 ((mk_id name)::rels) t t' in
index f03baa65645b5bf1e9ee33414fc0b47f89040319..f25114817de9256f58ed85eb66167a38f30b3daa 100644 (file)
@@ -130,7 +130,7 @@ let arg_list nleft t =
 
 let nargs it nleft consno =
   pp (lazy (Printf.sprintf "nargs %d %d" nleft consno));
-  let _,indname,_,cl = it in
+  let _,_indname,_,cl = it in
   let _,_,t_k = List.nth cl consno in
   List.length (arg_list nleft t_k) ;;
 
@@ -327,14 +327,14 @@ let mk_discriminator ~use_jmeq ?(force=false) name it leftno status baseuri =
       NotationPt.Theorem
        (name, principle, Some (NotationPt.Implicit (`Tagged "inv")), attrs))
   in 
-  let uri,height,nmenv,nsubst,nobj = theorem in
+  let _uri,_height,nmenv,_nsubst,_nobj = theorem in
   let ninitial_stack = Continuationals.Stack.of_nmetasenv nmenv in
   let status = status#set_obj theorem in
   let status = status#set_stack ninitial_stack in
   let status = subst_metasenv_and_fix_names status in
 
   (* PHASE 3: we finally prove the discrimination principle *)
-  let dbranch it ~use_jmeq leftno consno =
+  let dbranch it ~use_jmeq:__ leftno consno =
     let refl_id = mk_sym "refl" in
     pp (lazy (Printf.sprintf "dbranch %d %d" leftno consno));
     let nlist = HExtlib.list_seq 0 (nargs it leftno consno) in
@@ -482,7 +482,7 @@ let subst_tac ~context ~dir skip cur_eq =
     else 
     let gen_tac x =
       (fun s -> 
-      let x' = String.concat " " x in
+      (*let x' = String.concat " " x in*)
       let x = List.map mk_id x in
       (* let s = NTactics.print_tac false ("@generalize " ^ x') s in *)
       generalize0_tac x s) in
@@ -619,7 +619,7 @@ let select_eq ctx acc domain status goal =
            | _ -> status, `NonEq 
            in match kind with
               | `Identity ->
-                  let status, goalty = term_of_cic_term status (get_goalty status goal) ctx in
+                  let status, _goalty = term_of_cic_term status (get_goalty status goal) ctx in
                      status, Some (List.length ctx - i), kind
               | `Cycle | `Blob | `NonEq -> aux (i+1) (* XXX: skip cyclic/blob equations for now *)
               | _ -> 
index 8267fd87774e00398ea654d17ba0a6ff4111c1ae..f1da10cb7a08c3ab60f22fbdd9381620cd5b6c04 100644 (file)
@@ -71,7 +71,7 @@ let rec jmeqpatt = function
 let rec mk_arrows ~jmeq xs ys selection target = 
   match selection,xs,ys with
     [],[],[] -> target
-  | false :: l,x::xs,y::ys -> mk_arrows ~jmeq xs ys l target
+  | false :: l,_x::xs,_y::ys -> mk_arrows ~jmeq xs ys l target
   | true :: l,x::xs,y::ys when jmeq ->
      NotationPt.Binder (`Forall, (mk_id "_",
        Some (mk_appl [mk_sym "jmsimeq" ; 
@@ -95,7 +95,7 @@ let subst_metasenv_and_fix_names status =
    status#set_obj(u,h,NCicUntrusted.apply_subst_metasenv status subst metasenv,subst,o)
 ;;
 
-let mk_inverter ~jmeq name is_ind it leftno ?selection outsort (status: #NCic.status) baseuri =
+let mk_inverter ~jmeq name _is_ind it leftno ?selection outsort (status: #NCic.status) baseuri =
  pp (lazy ("leftno = " ^ string_of_int leftno));
  let _,ind_name,ty,cl = it in
  pp (lazy ("arity: " ^ status#ppterm ~metasenv:[] ~subst:[] ~context:[] ty));
@@ -142,7 +142,7 @@ let mk_inverter ~jmeq name is_ind it leftno ?selection outsort (status: #NCic.st
        in (hypaux 1 ncons)
      in
     
-     let outsort, suffix = NCicElim.ast_of_sort outsort in
+     let outsort, _suffix = NCicElim.ast_of_sort outsort in
      let theorem =
       mk_prods xs
        (NotationPt.Binder (`Forall, (mk_id "Hterm", Some (mk_appl (List.map mk_id (ind_name::xs)))),
@@ -156,7 +156,7 @@ let mk_inverter ~jmeq name is_ind it leftno ?selection outsort (status: #NCic.st
          NotationPt.Theorem
           (name,theorem, Some (NotationPt.Implicit (`Tagged "inv")), attrs))
      in 
-     let uri,height,nmenv,nsubst,nobj = theorem in
+     let _uri,_height,nmenv,_nsubst,_nobj = theorem in
      let ninitial_stack = Continuationals.Stack.of_nmetasenv nmenv in
      let status = status#set_obj theorem in
      let status = status#set_stack ninitial_stack in
@@ -205,6 +205,6 @@ NotationPt.Implicit (`Tagged "end"));
 
 let mk_inverter name is_ind it leftno ?selection outsort status baseuri =
  try mk_inverter ~jmeq:true name is_ind it leftno ?selection outsort status baseuri
- with NTacStatus.Error (s,_) -> 
+ with NTacStatus.Error (_s,_) -> 
    mk_inverter ~jmeq:false name is_ind it leftno ?selection outsort status baseuri
 ;;
index 1001d980854605340166d0e8cb7055d5d876665e..118261af027c2efa101facb0d21a39d611b03a0e 100644 (file)
@@ -97,24 +97,24 @@ let ctx_of (c,_) = c ;;
 let mk_cic_term c t = c,t ;;
 
 let ppterm (status:#pstatus) t =
- let uri,height,metasenv,subst,obj = status#obj in
+ let _uri,_height,metasenv,subst,_obj = status#obj in
  let context,t = t in
   status#ppterm ~metasenv ~subst ~context t
 ;;
 
 let ppcontext (status: #pstatus) c =
- let uri,height,metasenv,subst,obj = status#obj in
+ let _uri,_height,metasenv,subst,_obj = status#obj in
   status#ppcontext ~metasenv ~subst c
 ;;
 
 let ppterm_and_context (status: #pstatus) t =
- let uri,height,metasenv,subst,obj = status#obj in
+ let _uri,_height,metasenv,subst,_obj = status#obj in
  let context,t = t in
   status#ppcontext ~metasenv ~subst context ^ "\n ⊢ "^ 
   status#ppterm ~metasenv ~subst ~context t
 ;;
 
-let relocate status destination (source,t as orig) =
+let relocate status destination (source,_t as orig) =
  pp(lazy("relocate:\n" ^ ppterm_and_context status orig));
  pp(lazy("relocate in:\n" ^ ppcontext status destination));
  let rc = 
@@ -134,13 +134,13 @@ let relocate status destination (source,t as orig) =
             compute_ops (e::ctx) (cl1,cl2)
           else
             [ `Delift ctx; `Lift (List.rev ex) ]
-      | (n1, NCic.Def (b1,t1) as e)::cl1 as ex, (n2, NCic.Decl t2)::cl2 ->
+      | (n1, NCic.Def (_b1,t1) as e)::cl1 as ex, (n2, NCic.Decl t2)::cl2 ->
           if n1 = n2 && 
              NCicReduction.are_convertible status ctx ~subst ~metasenv t1 t2 then
             compute_ops (e::ctx) (cl1,cl2)
           else
             [ `Delift ctx; `Lift (List.rev ex) ]
-      | (n1, NCic.Decl _)::cl1 as ex, (n2, NCic.Def _)::cl2 -> 
+      | (_n1, NCic.Decl _)::_cl1 as ex, (_n2, NCic.Def _)::_cl2 -> 
             [ `Delift ctx; `Lift (List.rev ex) ]
       | _::_ as ex, [] -> [ `Lift (List.rev ex) ]
       | [], _::_ -> [ `Delift ctx ]
@@ -235,7 +235,7 @@ let normalize status ?delta ctx t =
 let are_convertible status ctx a b =
   let status, (_,a) = relocate status ctx a in
   let status, (_,b) = relocate status ctx b in
-  let n,h,metasenv,subst,o = status#obj in
+  let _n,_h,metasenv,subst,_o = status#obj in
   let res = NCicReduction.are_convertible status metasenv subst ctx a b in
    status, res
 ;;
@@ -378,7 +378,7 @@ let select_term
       else
         let _,_,_,subst,_ = status#obj in
         match t with
-        | NCic.Meta (i,lc) when List.mem_assoc i subst ->
+        | NCic.Meta (i,_lc) when List.mem_assoc i subst ->
             let _,_,t,_ = NCicUtils.lookup_subst i subst in
             aux ctx (status,already_found) t
         | NCic.Meta _ -> (status,already_found),t
index a8a78999a2b9c3b71a4ea20a93ffab8250d870d0..721d9165b7d32d0388ba084d32fa27b6ff672125 100644 (file)
@@ -312,7 +312,7 @@ let assumption_tac status = distribute_tac (fun status goal ->
 let find_in_context name context =
   let rec aux acc = function
     | [] -> raise Not_found
-    | (hd,_) :: tl when hd = name -> acc
+    | (hd,_) :: _ when hd = name -> acc
     | _ :: tl ->  aux (acc + 1) tl
   in
   aux 1 context
@@ -503,7 +503,7 @@ let analyze_indty_tac ~what indtyref =
   let goalty = get_goalty status goal in
   let status, what = disambiguate status (ctx_of goalty) what `XTInd in
   let status, ty_what = typeof status (ctx_of what) what in 
-  let status, (r,consno,lefts,rights,cl) = analyse_indty status ty_what in
+  let _status, (r,consno,lefts,rights,cl) = analyse_indty status ty_what in
   let leftno = List.length lefts in
   let rightno = List.length rights in
   indtyref := Some { 
@@ -704,7 +704,7 @@ let assert0_tac (hyps,concl) = distribute_tac (fun status goal ->
 let assert_tac seqs status =
  match status#stack with
   | [] -> assert false
-  | (g,_,_,_,_) :: s ->
+  | (g,_,_,_,_) :: _s ->
      assert (List.length g = List.length seqs);
      (match seqs with
          [] -> id_tac
index cb73e873e28383308ace34acdc5d9ec90359252f..3ac6040dc3e79995405e2000732e71a1df8b67cb 100644 (file)
@@ -13,7 +13,7 @@ open Printf
 
 let print ?(depth=0) s = 
   prerr_endline (String.make (2*depth) ' '^Lazy.force s) 
-let noprint ?(depth=0) _ = () 
+let noprint ?depth:(_=0) _ = () 
 let debug_print = noprint
 
 open Continuationals.Stack
@@ -66,7 +66,7 @@ let is_relevant tbl item =
       else true
   with Not_found -> true
 
-let print_stat status tbl =
+let print_stat _status tbl =
   let l = RefHash.fold (fun a v l -> (a,v)::l) tbl [] in
   let relevance v = float !(v.uses) /. float !(v.nominations) in
   let vcompare (_,v1) (_,v2) =
@@ -322,7 +322,7 @@ let index_local_equations eq_cache ?(flag=false) status =
  end
 ;;
 
-let index_local_equations2 eq_cache status open_goal lemmas ?(flag=false) nohyps =
+let index_local_equations2 eq_cache status open_goal lemmas ?flag:(_=false) nohyps =
   noprint (lazy "indexing equations");
   let eq_cache,lemmas =
    match lemmas with
@@ -360,7 +360,7 @@ let index_local_equations2 eq_cache status open_goal lemmas ?(flag=false) nohyps
     eq_cache lemmas
 ;;
 
-let fast_eq_check_tac ~params s = 
+let fast_eq_check_tac ~params:_ s = 
   let unit_eq = index_local_equations s#eq_cache s in   
   dist_fast_eq_check unit_eq s
 ;;
@@ -371,7 +371,7 @@ let paramod eq_cache status goal =
   | s::_ -> s
 ;;
 
-let paramod_tac ~params s = 
+let paramod_tac ~params:_ s = 
   let unit_eq = index_local_equations s#eq_cache s in   
   NTactics.distribute_tac (paramod unit_eq) s
 ;;
@@ -420,7 +420,7 @@ let close_wrt_context status =
     (fun ty ctx_entry -> 
         match ctx_entry with 
        | name, NCic.Decl t -> NCic.Prod(name,t,ty)
-       | name, NCic.Def(bo, _) -> NCicSubstitution.subst status bo ty)
+       | _name, NCic.Def(bo, _) -> NCicSubstitution.subst status bo ty)
 ;;
 
 let args_for_context ?(k=1) ctx =
@@ -428,8 +428,8 @@ let args_for_context ?(k=1) ctx =
     List.fold_left 
       (fun (n,l) ctx_entry -> 
          match ctx_entry with 
-           | name, NCic.Decl t -> n+1,NCic.Rel(n)::l
-           | name, NCic.Def(bo, _) -> n+1,l)
+           | _name, NCic.Decl _t -> n+1,NCic.Rel(n)::l
+           | _name, NCic.Def(_bo, _) -> n+1,l)
       (k,[]) ctx in
     args
 
@@ -448,7 +448,7 @@ let refresh metasenv =
   List.fold_left 
     (fun (metasenv,subst) (i,(iattr,ctx,ty)) ->
        let ikind = NCicUntrusted.kind_of_meta iattr in
-       let metasenv,j,instance,ty = 
+       let metasenv,_j,instance,ty = 
          NCicMetaSubst.mk_meta ~attrs:iattr 
            metasenv ctx ~with_type:ty ikind in
        let s_entry = i,(iattr, ctx, instance, ty) in
@@ -464,12 +464,12 @@ let close_metasenv status metasenv subst =
   *)
   let metasenv = NCicUntrusted.sort_metasenv status subst metasenv in 
     List.fold_left 
-      (fun (subst,objs) (i,(iattr,ctx,ty)) ->
+      (fun (subst,objs) (i,(_iattr,ctx,ty)) ->
          let ty = NCicUntrusted.apply_subst status subst ctx ty in
          let ctx = 
            NCicUntrusted.apply_subst_context status ~fix_projections:true 
              subst ctx in
-         let (uri,_,_,_,obj) as okind = 
+         let (uri,_,_,_,_obj) as okind = 
            constant_for_meta status ctx ty i in
          try
            NCicEnvironment.check_and_add_obj status okind;
@@ -521,7 +521,7 @@ let replace_meta status i args target =
            | _ -> let args = 
                List.map (NCicSubstitution.subst_meta status lc) args in
                NCic.Appl(NCic.Rel k::args))
-    | NCic.Meta (j,lc) as m ->
+    | NCic.Meta (_j,lc) as m ->
         (match lc with
            _,NCic.Irl _ -> m
          | n,NCic.Ctx l ->
@@ -536,7 +536,7 @@ let replace_meta status i args target =
 
 let close_wrt_metasenv status subst =
   List.fold_left 
-    (fun ty (i,(iattr,ctx,mty)) ->
+    (fun ty (i,(_iattr,ctx,mty)) ->
        let mty = NCicUntrusted.apply_subst status subst ctx mty in
        let ctx = 
          NCicUntrusted.apply_subst_context status ~fix_projections:true 
@@ -591,8 +591,8 @@ let saturate_to_ref status metasenv subst ctx nref ty =
     aux metasenv ty []
 
 let smart_apply t unit_eq status g = 
-  let n,h,metasenv,subst,o = status#obj in
-  let gname, ctx, gty = List.assoc g metasenv in
+  let n,h,metasenv,_subst,o = status#obj in
+  let _gname, ctx, gty = List.assoc g metasenv in
   (* let ggty = mk_cic_term context gty in *)
   let status, t = disambiguate status ctx t `XTNone in
   let status,t = term_of_cic_term status t ctx in
@@ -633,7 +633,7 @@ let smart_apply t unit_eq status g =
         debug_print(lazy("ritorno da fast_eq_check"));
         res
     with
-      | NCicEnvironment.ObjectNotFound s as e ->
+      | NCicEnvironment.ObjectNotFound _s as e ->
           raise (Error (lazy "eq_coerc non yet defined",Some e))
       | Error _ as e -> debug_print (lazy "error"); raise e
 (* FG: for now we catch TypeCheckerFailure; to be understood *)  
@@ -957,7 +957,7 @@ let init_cache ?(facts=[]) ?(under_inspection=[],[])
      unit_eq = unit_eq;
      trace = trace}
 
-let only signature _context candidate = true
+let only _signature _context _candidate = true
 (*
         (* TASSI: nel trie ci mettiamo solo il body, non il ty *)
   let candidate_ty = 
@@ -1016,9 +1016,9 @@ let rec stack_goals level gs =
 let open_goals level status = stack_goals level status#stack
 ;;
 
-let try_candidate ?(smart=0) flags depth status eq_cache ctx t =
+let try_candidate ?(smart=0) _flags depth status eq_cache _ctx t =
   try
-    let old_og_no = List.length (open_goals (depth+1) status) in
+    (*let old_og_no = List.length (open_goals (depth+1) status) in*)
     debug_print ~depth (lazy ("try " ^ (string_of_int smart) ^ " : "
       ^ (NotationPp.pp_term status) t));
     let status = 
@@ -1054,7 +1054,7 @@ let try_candidate ?(smart=0) flags depth status eq_cache ctx t =
        debug_print ~depth (lazy "strange application"); None)
     else 
 *)      (incr candidate_no; Some ((!candidate_no,t),status))
-   with Error (msg,exn) -> debug_print ~depth (lazy "failed"); None
+   with Error _ -> debug_print ~depth (lazy "failed"); None
 ;;
 
 let sort_of status subst metasenv ctx t =
@@ -1100,12 +1100,12 @@ let is_a_needed_uri s =
   s = "cic:/matita/basics/logic/eq_f2.con" ||
   s = "cic:/matita/basics/logic/eq_f.con"
 
-let get_candidates ?(smart=true) ~pfailed depth flags status cache signature gty =
+let get_candidates ?(smart=true) ~pfailed depth flags status cache _signature gty =
   let universe = status#auto_cache in
   let _,_,metasenv,subst,_ = status#obj in
   let context = ctx_of gty in
   let _, raw_gty = term_of_cic_term status gty context in
-  let is_prod, is_eq =   
+  let is_prod, _is_eq =   
     let status, t = term_of_cic_term status gty context  in 
     let t = NCicReduction.whd status subst context t in
       match t with
@@ -1238,7 +1238,7 @@ let applicative_case ~pfailed depth signature status flags gty cache =
       flags status tcache signature gty 
   in
   let sm = if is_eq || is_prod then 0 else 2 in
-  let sm1 = if flags.last then 2 else 0 in 
+  (*let sm1 = if flags.last then 2 else 0 in *)
   let maxd = (depth + 1 = flags.maxdepth) in 
   let try_candidates only_one sm acc candidates =
     List.fold_left 
@@ -1364,7 +1364,7 @@ let is_prod status =
 
 let intro ~depth status facts name =
   let status = NTactics.intro_tac name status in
-  let _, ctx, ngty = current_goal status in
+  let _, ctx, _ngty = current_goal status in
   let t = mk_cic_term ctx (NCic.Rel 1) in
   let status, keys = keys_of_term status t in
   let facts = List.fold_left (add_to_th t) facts keys in
@@ -1586,7 +1586,7 @@ match status#stack with
       List.for_all (fun i -> IntSet.mem i others) 
         (HExtlib.filter_map is_open g)
 
-let top_cache ~depth top status ?(use_given_only=false) cache =
+let top_cache ~depth:_ top status ?(use_given_only=false) cache =
   if top then
     let unit_eq = index_local_equations status#eq_cache status ~flag:use_given_only in 
     {cache with unit_eq = unit_eq}
@@ -1680,7 +1680,7 @@ let rec auto_clusters ?(top=false) flags signature cache depth ?(use_given_only=
 and
         
 (* BRAND NEW VERSION *)         
-auto_main flags signature cache depth status ?(use_given_only=false): unit=
+auto_main flags signature cache depth ?(use_given_only=false) status: unit=
   debug_print ~depth (lazy "entering auto main");
   debug_print ~depth (pptrace status cache.trace);
   debug_print ~depth (lazy ("stack length = " ^ 
@@ -1691,28 +1691,28 @@ auto_main flags signature cache depth status ?(use_given_only=false): unit=
   match goals with
     | [] when depth = 0 -> raise (Proved (status,cache.trace))
     | []  -> 
-        let status = NTactics.merge_tac status in
-        let cache =
-          let l,tree = cache.under_inspection in
-            match l with 
-              | [] -> cache (* possible because of intros that cleans the cache *)
-              | a::tl -> let tree = rm_from_th a tree a in
-                  {cache with under_inspection = tl,tree} 
-        in 
-          auto_clusters flags signature cache (depth-1) status ~use_given_only
-    | orig::_ ->
-        if depth > 0 && move_to_side depth status
-        then 
-          let status = NTactics.merge_tac status in
-          let cache =
-            let l,tree = cache.under_inspection in
-              match l with 
-                | [] -> cache (* possible because of intros that cleans the cache*)
-                | a::tl -> let tree = rm_from_th a tree a in
-                    {cache with under_inspection = tl,tree} 
-          in 
-            auto_clusters flags signature cache (depth-1) status ~use_given_only
-        else
+       let status = NTactics.merge_tac status in
+       let cache =
+         let l,tree = cache.under_inspection in
+           match l with 
+             | [] -> cache (* possible because of intros that cleans the cache *)
+             | a::tl -> let tree = rm_from_th a tree a in
+                 {cache with under_inspection = tl,tree} 
+       in 
+         auto_clusters flags signature cache (depth-1) status ~use_given_only
+    | _orig::_ ->
+       if depth > 0 && move_to_side depth status
+       then 
+         let status = NTactics.merge_tac status in
+         let cache =
+           let l,tree = cache.under_inspection in
+             match l with 
+               | [] -> cache (* possible because of intros that cleans the cache*)
+               | a::tl -> let tree = rm_from_th a tree a in
+                   {cache with under_inspection = tl,tree} 
+         in 
+           auto_clusters flags signature cache (depth-1) status ~use_given_only
+       else
         let ng = List.length goals in
         (* moved inside auto_clusters *)
         if ng > flags.maxwidth then begin 
@@ -1931,7 +1931,7 @@ let candidates_from_ctx univ ctx status =
                                         Ast.Ident("rewrite_r",None); Ast.Ident("rewrite_l",None)
                                        ])
 
-let auto_lowtac ~params:(univ,flags as params) status goal =
+let auto_lowtac ~params:(univ,flags) status goal =
     let gty = get_goalty status goal in
     let ctx = ctx_of gty in
     let candidates = candidates_from_ctx univ ctx status in 
index 67113e67f7af0c0d4e8e6ae696d91d217f620df6..edb72af84d5783d743a6324a72bded97f05b8350 100644 (file)
@@ -1,3 +1,5 @@
+helm_registry.cmo : \
+    helm_registry.cmi
+helm_registry.cmx : \
+    helm_registry.cmi
 helm_registry.cmi :
-helm_registry.cmo : helm_registry.cmi
-helm_registry.cmx : helm_registry.cmi
index 67113e67f7af0c0d4e8e6ae696d91d217f620df6..c8aaec5311e660965c2f1335f3b1bf9a287db096 100644 (file)
@@ -1,3 +1,3 @@
+helm_registry.cmx : \
+    helm_registry.cmi
 helm_registry.cmi :
-helm_registry.cmo : helm_registry.cmi
-helm_registry.cmx : helm_registry.cmi
index 08b1bb76f893320db7ca6db238bfacb0c16634c2..f3309633b72d37748793c21bcfbbb6533f8a59d9 100644 (file)
@@ -54,7 +54,7 @@ let starts_with prefix =
       String.sub s 0 prefix_len = prefix
     with Invalid_argument _ -> false
 
-let hashtbl_keys tbl = Hashtbl.fold (fun k _ acc -> k :: acc) tbl []
+(*let hashtbl_keys tbl = Hashtbl.fold (fun k _ acc -> k :: acc) tbl []*)
 let hashtbl_pairs tbl = Hashtbl.fold (fun k v acc -> (k,v) :: acc) tbl []
 
   (** </helpers> *)
@@ -85,16 +85,16 @@ let valid_key_rex = Str.regexp ("^" ^ valid_key_rex_raw ^ "$")
 let interpolated_key_rex = Str.regexp ("\\$(" ^ valid_key_rex_raw ^ ")")
 let dot_rex = Str.regexp "\\."
 let spaces_rex = Str.regexp "[ \t\n\r]+"
-let heading_spaces_rex = Str.regexp "^[ \t\n\r]+"
+(*let heading_spaces_rex = Str.regexp "^[ \t\n\r]+"*)
 let margin_blanks_rex =
   Str.regexp "^\\([ \t\n\r]*\\)\\([^ \t\n\r]*\\)\\([ \t\n\r]*\\)$"
 
 let strip_blanks s = Str.global_replace margin_blanks_rex "\\2" s
 
-let split s =
+(*let split s =
   (* trailing blanks are removed per default by split *)
-  Str.split spaces_rex (Str.global_replace heading_spaces_rex "" s)
-let merge l = String.concat " " l
+  Str.split spaces_rex (Str.global_replace heading_spaces_rex "" s)*)
+(*let merge l = String.concat " " l*)
 
 let handle_type_error f x =
   try f x with exn -> raise (Type_error (Printexc.to_string exn))
@@ -128,10 +128,10 @@ let quad fst_unmarshaller snd_unmarshaller trd_unmarshaller fth_unmarshaller v =
   | _ -> raise (Type_error "not a quad")
 
   (* escapes for xml configuration file *)
-let (escape, unescape) =
+(*let (escape, unescape) =
   let (in_enc, out_enc) = (`Enc_utf8, `Enc_utf8) in
   (Netencoding.Html.encode ~in_enc ~out_enc (),
-   Netencoding.Html.decode ~in_enc ~out_enc ~entity_base:`Xml ())
+   Netencoding.Html.decode ~in_enc ~out_enc ~entity_base:`Xml ())*)
 
 let key_is_valid key =
   if not (Str.string_match valid_key_rex key 0) then
@@ -145,7 +145,7 @@ let set' ?(replace=false) registry ~key ~value =
 
 let unset registry = Hashtbl.remove registry
 
-let env_var_of_key s = String.uppercase (Str.global_replace dot_rex "_" s)
+let env_var_of_key s = String.uppercase_ascii (Str.global_replace dot_rex "_" s)
 
 let singleton = function
   | [] ->
index 24f371ca742c7b4096f789b860086f44071a5f11..84b72a664353560f9eb22d9d96a996fe8fbded03 100644 (file)
@@ -1,5 +1,5 @@
+utf8Macro.cmx : \
+    utf8MacroTable.cmx \
+    utf8Macro.cmi
 utf8Macro.cmi :
-utf8MacroTable.cmo :
 utf8MacroTable.cmx :
-utf8Macro.cmo : utf8MacroTable.cmx utf8Macro.cmi
-utf8Macro.cmx : utf8MacroTable.cmx utf8Macro.cmi
index d68336af1a35a681ba34e0177059c71c6f4380c3..7bf942ba0cd2e28cfe0b22ac24a644f7e99a8782 100644 (file)
@@ -1,6 +1,10 @@
-threadSafe.cmi :
+extThread.cmo : \
+    extThread.cmi
+extThread.cmx : \
+    extThread.cmi
 extThread.cmi :
-threadSafe.cmo : threadSafe.cmi
-threadSafe.cmx : threadSafe.cmi
-extThread.cmo : extThread.cmi
-extThread.cmx : extThread.cmi
+threadSafe.cmo : \
+    threadSafe.cmi
+threadSafe.cmx : \
+    threadSafe.cmi
+threadSafe.cmi :
index d68336af1a35a681ba34e0177059c71c6f4380c3..e022019dbc099603b597c42b73eb1195618d4414 100644 (file)
@@ -1,6 +1,6 @@
-threadSafe.cmi :
+extThread.cmx : \
+    extThread.cmi
 extThread.cmi :
-threadSafe.cmo : threadSafe.cmi
-threadSafe.cmx : threadSafe.cmi
-extThread.cmo : extThread.cmi
-extThread.cmx : extThread.cmi
+threadSafe.cmx : \
+    threadSafe.cmi
+threadSafe.cmi :
index fd3f626b9b5ccd97b800d84a81bba82e49aa134c..2ed17ef387c9c924b501300ed1dab05f2023d81a 100644 (file)
@@ -1,6 +1,10 @@
+xml.cmo : \
+    xml.cmi
+xml.cmx : \
+    xml.cmi
 xml.cmi :
+xmlPushParser.cmo : \
+    xmlPushParser.cmi
+xmlPushParser.cmx : \
+    xmlPushParser.cmi
 xmlPushParser.cmi :
-xml.cmo : xml.cmi
-xml.cmx : xml.cmi
-xmlPushParser.cmo : xmlPushParser.cmi
-xmlPushParser.cmx : xmlPushParser.cmi
index fd3f626b9b5ccd97b800d84a81bba82e49aa134c..31b27a17643bb267e0ab02c7b1bdae148d4c7217 100644 (file)
@@ -1,6 +1,6 @@
+xml.cmx : \
+    xml.cmi
 xml.cmi :
+xmlPushParser.cmx : \
+    xmlPushParser.cmi
 xmlPushParser.cmi :
-xml.cmo : xml.cmi
-xml.cmx : xml.cmi
-xmlPushParser.cmo : xmlPushParser.cmi
-xmlPushParser.cmx : xmlPushParser.cmi
index 0e3a4bcc24a91fbb447869ce8bdbebe64593e076..c6bbd66b5591bed13ac946b986019ce5d312a414 100644 (file)
@@ -92,7 +92,7 @@ let pp_gen f strm =
       pp_r m s
   | [< >] -> ()
  and print_spaces m =
-  for i = 1 to m do f "  " done
+  for _i = 1 to m do f "  " done
  in
  pp_r 0 strm
 ;;
@@ -104,7 +104,7 @@ let pp_to_outchan strm oc =
 ;;
 
 let pp_to_gzipchan strm oc =
-  pp_gen (fun s -> Gzip.output oc s 0 (String.length s)) strm
+  pp_gen (fun s -> Gzip.output oc (Bytes.of_string s) 0 (String.length s)) strm
 ;;
 
 (** pretty printer to string *)
index 4f57e124227b398d68fc88e2078be5a9796740a1..b809068f54e3130ec48cf617c45b40f30d24d2ad 100644 (file)
@@ -94,12 +94,12 @@ let parse expat_parser =
         aux (`Channel ic);
         close_in ic
     | `Gzip_channel ic ->
-        let buf = String.create gzip_bufsize in
+        let buf = Bytes.create gzip_bufsize in
         (try
           while true do
             let bytes = Gzip.input ic buf 0 gzip_bufsize in
             if bytes = 0 then raise End_of_file;
-            parse_fun (String.sub buf 0 bytes)
+            parse_fun (Bytes.to_string (Bytes.sub buf 0 bytes))
           done
         with End_of_file -> final expat_parser)
     | `Gzip_file fname ->
index 0670278bea925f9bf05a9eb11658c633d43775a6..04b7da8bdaf2fd1da221d42bca31b30539fe4bcb 100644 (file)
@@ -5,7 +5,7 @@ AC_INIT(matita/matitaTypes.ml)
 DEBUG_DEFAULT="true"
 DEFAULT_DBHOST="mysql://mowgli.cs.unibo.it"
 RT_BASE_DIR_DEFAULT="`pwd`/matita"
-MATITA_VERSION="0.99.3"
+MATITA_VERSION="0.99.4"
 DISTRIBUTED="yes"  # "yes" for distributed tarballs
 # End of distribution settings
 
@@ -24,11 +24,11 @@ if test $HAVE_OCAMLFIND = "yes"; then
 else
   AC_MSG_ERROR(could not find ocamlfind)
 fi
-AC_CHECK_PROG(HAVE_LABLGLADECC, lablgladecc2, yes, no)
+AC_CHECK_PROG(HAVE_LABLGLADECC, lablgladecc3, yes, no)
 if test $HAVE_LABLGLADECC = "yes"; then
-  LABLGLADECC="lablgladecc2"
+  LABLGLADECC="lablgladecc3"
 else
-  AC_MSG_ERROR(could not find lablgladecc2)
+  AC_MSG_ERROR(could not find lablgladecc3)
 fi
 AC_CHECK_PROG(HAVE_CAMLP5O, camlp5o, yes, no)
 if test $HAVE_CAMLP5O = "yes"; then
@@ -40,16 +40,17 @@ fi
 # look for METAS dir
 
 LIBSPATH="`pwd`/components"
-OCAMLPATH="$LIBSPATH/METAS"
+OCAMLPATHL="$LIBSPATH/METAS"
+OCAMLPATH="$OCAMLPATHL:$OCAMLPATH"
 
 # creating META.*
 
 echo -n "creating METAs ... "
-for f in $OCAMLPATH/meta.*.src; do
+for f in $OCAMLPATHL/meta.*.src; do
   basename=`basename $f`
   metaname=`echo $basename | sed 's/meta\.\(.*\)\.src/\1/'`
   dirname=`echo $metaname | sed 's/^helm-//'`
-  metafile="$OCAMLPATH/META.$metaname"
+  metafile="$OCAMLPATHL/META.$metaname"
   cp $f $metafile
   echo "directory=\"$LIBSPATH/$dirname\"" >> $metafile
 done
@@ -57,20 +58,24 @@ echo "done"
 
 # (libs) findlib requisites
 
+#gdome2 \
+#mysql \
 FINDLIB_LIBSREQUIRES="\
 expat \
-gdome2 \
 http \
-lablgtk2 \
-lablgtk2.sourceview2 \
-mysql \
+pcre \
+str \
+unix \
+lablgtk3 \
+lablgtk3-sourceview3 \
 netstring \
-ulex08 \
+ulex-camlp5 \
 zip \
 "
 
 # (Matita) findlib requisites
 
+#lablgtk3.glade \
 FINDLIB_COMREQUIRES="\
 helm-disambiguation \
 helm-grafite \
@@ -87,9 +92,9 @@ $FINDLIB_COMREQUIRES \
 "
 FINDLIB_REQUIRES="\
 $FINDLIB_CREQUIRES \
-lablgtk2.glade \
-lablgtk2.sourceview2 \
+lablgtk3-sourceview3 \
 "
+
 for r in $FINDLIB_LIBSREQUIRES $FINDLIB_REQUIRES
 do
   AC_MSG_CHECKING(for $r ocaml library)
index 27186142894d2fef684349d97626d42049016b21..c8ed208c3c22aa86e9c99c52ecdf429638daf6ce 100644 (file)
@@ -12,11 +12,9 @@ lablGraphviz.cmo : lablGraphviz.cmi
 lablGraphviz.cmx : lablGraphviz.cmi
 lablGraphviz.cmi :
 matita.cmo : predefined_virtuals.cmi matitaScript.cmi matitaMisc.cmi \
-    matitaInit.cmi matitaGui.cmi matitaGtkMisc.cmi buildTimeConf.cmo \
-    applyTransformation.cmi
+    matitaInit.cmi matitaGui.cmi buildTimeConf.cmo applyTransformation.cmi
 matita.cmx : predefined_virtuals.cmx matitaScript.cmx matitaMisc.cmx \
-    matitaInit.cmx matitaGui.cmx matitaGtkMisc.cmx buildTimeConf.cmx \
-    applyTransformation.cmx
+    matitaInit.cmx matitaGui.cmx buildTimeConf.cmx applyTransformation.cmx
 matitaEngine.cmo : applyTransformation.cmi matitaEngine.cmi
 matitaEngine.cmx : applyTransformation.cmx matitaEngine.cmi
 matitaEngine.cmi : applyTransformation.cmi
@@ -25,9 +23,9 @@ matitaExcPp.cmx : matitaEngine.cmx matitaExcPp.cmi
 matitaExcPp.cmi :
 matitaGeneratedGui.cmo :
 matitaGeneratedGui.cmx :
-matitaGtkMisc.cmo : matitaTypes.cmi matitaGeneratedGui.cmo buildTimeConf.cmo \
+matitaGtkMisc.cmo : matitaGeneratedGui.cmo buildTimeConf.cmo \
     matitaGtkMisc.cmi
-matitaGtkMisc.cmx : matitaTypes.cmx matitaGeneratedGui.cmx buildTimeConf.cmx \
+matitaGtkMisc.cmx : matitaGeneratedGui.cmx buildTimeConf.cmx \
     matitaGtkMisc.cmi
 matitaGtkMisc.cmi : matitaGeneratedGui.cmo
 matitaGui.cmo : matitaTypes.cmi matitaScript.cmi matitaMisc.cmi \
@@ -37,6 +35,8 @@ matitaGui.cmx : matitaTypes.cmx matitaScript.cmx matitaMisc.cmx \
     matitaMathView.cmx matitaGuiTypes.cmi matitaGtkMisc.cmx \
     matitaGeneratedGui.cmx matitaExcPp.cmx buildTimeConf.cmx matitaGui.cmi
 matitaGui.cmi : matitaGuiTypes.cmi
+matitaGuiInit.cmo :
+matitaGuiInit.cmx :
 matitaGuiTypes.cmi : matitaGeneratedGui.cmo applyTransformation.cmi
 matitaInit.cmo : matitaExcPp.cmi buildTimeConf.cmo matitaInit.cmi
 matitaInit.cmx : matitaExcPp.cmx buildTimeConf.cmx matitaInit.cmi
index 6f4370e5227d408ff2dc52207ba66b36c17a587a..f1994ce595bd41e306aae2c28d10bfb7a7b36b93 100644 (file)
@@ -21,7 +21,6 @@ matita.cmx : \
     matitaMisc.cmx \
     matitaInit.cmx \
     matitaGui.cmx \
-    matitaGtkMisc.cmx \
     buildTimeConf.cmx \
     applyTransformation.cmx
 matitaEngine.cmx : \
@@ -35,7 +34,6 @@ matitaExcPp.cmx : \
 matitaExcPp.cmi :
 matitaGeneratedGui.cmx :
 matitaGtkMisc.cmx : \
-    matitaTypes.cmx \
     matitaGeneratedGui.cmx \
     buildTimeConf.cmx \
     matitaGtkMisc.cmi
@@ -54,6 +52,7 @@ matitaGui.cmx : \
     matitaGui.cmi
 matitaGui.cmi : \
     matitaGuiTypes.cmi
+matitaGuiInit.cmx :
 matitaGuiTypes.cmi : \
     matitaGeneratedGui.cmx \
     applyTransformation.cmi
index caf0f82ff4c7a682ff9f25485f8a312c7da85413..d40a15c7a6eb5d4286d2ecae4d01fd1ce6dd6188 100644 (file)
@@ -11,7 +11,7 @@ else
   ANNOTOPTION =
 endif
 
-OCAML_FLAGS = -pp $(CAMLP5O) -rectypes $(ANNOTOPTION) 
+OCAML_FLAGS = -pp $(CAMLP5O) -rectypes $(ANNOTOPTION) -w @A-52-4-34-37-45-9-44-48-6-32-20-58-7
 OCAMLDEP_FLAGS = -pp $(CAMLP5O) 
 PKGS = -package "$(MATITA_REQUIRES)"
 CPKGS = -package "$(MATITA_CREQUIRES)"
@@ -61,7 +61,7 @@ MAINCMLI =                    \
        matitaclean.mli         \
        $(NULL)
 # objects for matita (GTK GUI)
-ML = buildTimeConf.ml matitaGeneratedGui.ml $(MLI:%.mli=%.ml)
+ML = buildTimeConf.ml matitaGuiInit.ml matitaGeneratedGui.ml $(MLI:%.mli=%.ml)
 # objects for matitac (batch compiler)
 CML = buildTimeConf.ml $(CMLI:%.mli=%.ml)
 MAINCML = $(MAINCMLI:%.mli=%.ml)
@@ -142,11 +142,9 @@ matitaclean: matitac
 matitaclean.opt: matitac.opt
        $(H)test -f $@ || ln -s $< $@
 
-matitaGeneratedGui.ml: matita.glade.utf8
+matitaGeneratedGui.ml: matita.ui
        $(H)$(LABLGLADECC) -embed $< > matitaGeneratedGui.ml
 
-matita.glade.utf8: matita.glade
-       $(H)xmllint --encode UTF8 $< > $@
 
 .PHONY: clean
 clean:
@@ -162,7 +160,6 @@ clean:
 .PHONY: distclean
 distclean: clean
        $(H)$(MAKE) -C dist/ clean
-       $(H)rm -f matitaGeneratedGui.ml matitaGeneratedGui.mli
        $(H)rm -f buildTimeConf.ml
        $(H)rm -f matita.glade.bak matita.gladep.bak
        $(H)rm -f matita.conf.xml.sample
@@ -204,7 +201,7 @@ cleantests.opt: $(foreach d,$(TEST_DIRS_OPT),$(d)-cleantests-opt)
 
 # {{{ Distribution stuff
 
-dist_pre: matitaGeneratedGui.ml
+dist_pre:
        $(MAKE) -C dist/ dist_pre
 
 WHERE = $(DESTDIR)/$(RT_BASE_DIR)
index f761a153b5a839df843d61fd9ca21db2abf6fcef..2ae27ee6370f83e717153f6a805acba9b159506d 100644 (file)
@@ -66,7 +66,7 @@ let ntxt_of_cic_context ~metasenv ~subst =
   Content2pres.ncontext2pres
   ((new NCicPp.status)#ppcontext ~metasenv ~subst)
 
-let ntxt_of_cic_subst ~map_unicode_to_tex size status ~metasenv ?use_subst subst =
+let ntxt_of_cic_subst ~map_unicode_to_tex:_ _size _status ~metasenv ?use_subst subst =
  [],
  "<<<high level printer for subst not implemented; low-level printing:>>>\n" ^
   (new NCicPp.status)#ppsubst ~metasenv ?use_subst subst
@@ -75,11 +75,11 @@ class status =
  object(self)
   inherit Interpretations.status
   inherit TermContentPres.status
-  method ppterm ~context ~subst ~metasenv ?margin ?inside_fix t =
+  method ppterm ~context ~subst ~metasenv ?margin:(_) ?inside_fix:(_) t =
    snd (ntxt_of_cic_term ~map_unicode_to_tex:false 80 self ~metasenv ~subst
     ~context t)
 
-  method ppcontext ?sep ~subst ~metasenv context =
+  method ppcontext ?sep:(_) ~subst ~metasenv context =
    snd (ntxt_of_cic_context ~map_unicode_to_tex:false 80 self ~metasenv ~subst
     context)
 
diff --git a/matita/matita/broken_lib/binding/db.ma b/matita/matita/broken_lib/binding/db.ma
new file mode 100644 (file)
index 0000000..534874f
--- /dev/null
@@ -0,0 +1,110 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basics/lists/list.ma".
+
+axiom alpha : Type[0].
+notation "𝔸" non associative with precedence 90 for @{'alphabet}.
+interpretation "set of names" 'alphabet = alpha.
+
+inductive tp : Type[0] ≝ 
+| top : tp
+| arr : tp → tp → tp.
+inductive tm : Type[0] ≝ 
+| var : nat → tm
+| par :  𝔸 → tm
+| abs : tp → tm → tm
+| app : tm → tm → tm.
+
+let rec Nth T n (l:list T) on n ≝ 
+  match l with 
+  [ nil ⇒ None ?
+  | cons hd tl ⇒ match n with
+    [ O ⇒ Some ? hd
+    | S n0 ⇒ Nth T n0 tl ] ].
+
+inductive judg : list tp → tm → tp → Prop ≝ 
+| t_var : ∀g,n,t.Nth ? n g = Some ? t → judg g (var n) t
+| t_app : ∀g,m,n,t,u.judg g m (arr t u) → judg g n t → judg g (app m n) u
+| t_abs : ∀g,t,m,u.judg (t::g) m u → judg g (abs t m) (arr t u).
+
+definition Env := list (𝔸 × tp).
+
+axiom vclose_env : Env → list tp.
+axiom vclose_tm : Env → tm → tm.
+axiom Lam : 𝔸 → tp → tm → tm.
+definition Judg ≝ λG,M,T.judg (vclose_env G) (vclose_tm G M) T.
+definition dom ≝ λG:Env.map ?? (fst ??) G.
+
+definition sctx ≝ 𝔸 × tm.
+axiom swap_tm : 𝔸 → 𝔸 → tm → tm.
+definition sctx_app : sctx → 𝔸 → tm ≝ λM0,Y.let 〈X,M〉 ≝ M0 in swap_tm X Y M.
+
+axiom in_list : ∀A:Type[0].A → list A → Prop.
+interpretation "list membership" 'mem x l = (in_list ? x l).
+interpretation "list non-membership" 'notmem x l = (Not (in_list ? x l)).
+
+axiom in_Env : 𝔸 × tp → Env → Prop.
+notation "X ◃ G" non associative with precedence 45 for @{'lefttriangle $X $G}.
+interpretation "Env membership" 'lefttriangle x l = (in_Env x l).
+
+let rec FV M ≝ match M with 
+  [ par X ⇒ [X]
+  | app M1 M2 ⇒ FV M1@FV M2
+  | abs T M0 ⇒ FV M0
+  | _ ⇒ [ ] ].
+
+(* axiom Lookup : 𝔸 → Env → option tp. *)
+
+(* forma alto livello del judgment
+   t_abs* : ∀G,T,X,M,U.
+            (∀Y ∉ supp(M).Judg (〈Y,T〉::G) (M[Y]) U) → 
+            Judg G (Lam X T (M[X])) (arr T U) *)
+
+(* prima dimostrare, poi perfezionare gli assiomi, poi dimostrarli *)
+
+axiom Judg_ind : ∀P:Env → tm → tp → Prop.
+  (∀X,G,T.〈X,T〉 ◃ G → P G (par X) T) → 
+  (∀G,M,N,T,U.
+    Judg G M (arr T U) → Judg G N T → 
+    P G M (arr T U) → P G N T → P G (app M N) U) → 
+  (∀G,T1,T2,X,M1.
+    (∀Y.Y ∉ (FV (Lam X T1 (sctx_app M1 X))) → Judg (〈Y,T1〉::G) (sctx_app M1 Y) T2) →
+    (∀Y.Y ∉ (FV (Lam X T1 (sctx_app M1 X))) → P (〈Y,T1〉::G) (sctx_app M1 Y) T2) → 
+    P G (Lam X T1 (sctx_app M1 X)) (arr T1 T2)) → 
+  ∀G,M,T.Judg G M T → P G M T.
+
+axiom t_par : ∀X,G,T.〈X,T〉 ◃ G → Judg G (par X) T.
+axiom t_app2 : ∀G,M,N,T,U.Judg G M (arr T U) → Judg G N T → Judg G (app M N) U.
+axiom t_Lam : ∀G,X,M,T,U.Judg (〈X,T〉::G) M U → Judg G (Lam X T M) (arr T U).
+
+definition subenv ≝ λG1,G2.∀x.x ◃ G1 → x ◃ G2.
+interpretation "subenv" 'subseteq G1 G2 = (subenv G1 G2).
+
+axiom daemon : ∀P:Prop.P.
+
+theorem weakening : ∀G1,G2,M,T.G1 ⊆ G2 → Judg G1 M T → Judg G2 M T.
+#G1 #G2 #M #T #Hsub #HJ lapply Hsub lapply G2 -G2 change with (∀G2.?)
+@(Judg_ind … HJ)
+[ #X #G #T0 #Hin #G2 #Hsub @t_par @Hsub //
+| #G #M0 #N #T0 #U #HM0 #HN #IH1 #IH2 #G2 #Hsub @t_app2
+  [| @IH1 // | @IH2 // ]
+| #G #T1 #T2 #X #M1 #HM1 #IH #G2 #Hsub @t_Lam @IH 
+  [ (* trivial property of Lam *) @daemon 
+  | (* trivial property of subenv *) @daemon ]
+]
+qed.
+
+(* Serve un tipo Tm per i termini localmente chiusi e i suoi principi di induzione e
+   ricorsione *)
\ No newline at end of file
diff --git a/matita/matita/broken_lib/binding/fp.ma b/matita/matita/broken_lib/binding/fp.ma
new file mode 100644 (file)
index 0000000..14ba2f7
--- /dev/null
@@ -0,0 +1,296 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "binding/names.ma".
+
+(* permutations *)
+definition finite_perm : ∀X:Nset.(X → X) → Prop ≝ 
+ λX,f.injective X X f ∧ surjective X X f ∧ ∃l.∀x.x ∉ l → f x = x.
+
+(* maps a permutation to a list of parameters *)
+definition Pi_list : ∀X:Nset.(X → X) → list X → list X ≝ 
+ λX,p,xl.map ?? (λx.p x) xl.
+
+interpretation "permutation of X list" 'middot p x = (Pi_list p x).
+
+definition swap : ∀N:Nset.N → N → N → N ≝
+  λN,u,v,x.match (x == u) with
+    [true ⇒ v
+    |false ⇒ match (x == v) with
+       [true ⇒ u
+       |false ⇒ x]].
+       
+axiom swap_right : ∀N,x,y.swap N x y y = x.
+(*
+#N x y;nnormalize;nrewrite > (p_eqb3 ? y y …);//;
+nlapply (refl ? (y ≟ x));ncases (y ≟ x) in ⊢ (???% → %);nnormalize;//;
+#H1;napply p_eqb1;//;
+nqed.
+*)
+
+axiom swap_left : ∀N,x,y.swap N x y x = y.
+(*
+#N x y;nnormalize;nrewrite > (p_eqb3 ? x x …);//;
+nqed.
+*)
+
+axiom swap_other : ∀N,x,y,z.x ≠ z → y ≠ z → swap N x y z = z.
+(*
+#N x y z H1 H2;nnormalize;nrewrite > (p_eqb4 …);
+##[nrewrite > (p_eqb4 …);//;@;ncases H2;/2/;
+##|@;ncases H1;/2/
+##]
+nqed.
+*)
+
+axiom swap_inv : ∀N,x,y,z.swap N x y (swap N x y z) = z.
+(*
+#N x y z;nlapply (refl ? (x ≟ z));ncases (x ≟ z) in ⊢ (???% → ?);#H1
+##[nrewrite > (p_eqb1 … H1);nrewrite > (swap_left …);//;
+##|nlapply (refl ? (y ≟ z));ncases (y ≟ z) in ⊢ (???% → ?);#H2
+   ##[nrewrite > (p_eqb1 … H2);nrewrite > (swap_right …);//;
+   ##|nrewrite > (swap_other …) in ⊢ (??(????%)?);/2/;
+      nrewrite > (swap_other …);/2/;
+   ##]
+##]
+nqed.
+*)
+
+axiom swap_fp : ∀N,x1,x2.finite_perm ? (swap N x1 x2).
+(*
+#N x1 x2;@
+##[@
+   ##[nwhd;#xa xb;nnormalize;nlapply (refl ? (xa ≟ x1));
+      ncases (xa ≟ x1) in ⊢ (???% → %);#H1
+      ##[nrewrite > (p_eqb1 … H1);nlapply (refl ? (xb ≟ x1));
+         ncases (xb ≟ x1) in ⊢ (???% → %);#H2
+         ##[nrewrite > (p_eqb1 … H2);//
+         ##|nlapply (refl ? (xb ≟ x2));
+            ncases (xb ≟ x2) in ⊢ (???% → %);#H3
+            ##[nnormalize;#H4;nrewrite > H4 in H3;
+               #H3;nrewrite > H3 in H2;#H2;ndestruct (H2)
+            ##|nnormalize;#H4;nrewrite > H4 in H3;
+               nrewrite > (p_eqb3 …);//;#H5;ndestruct (H5)
+            ##]
+         ##]
+      ##|nlapply (refl ? (xa ≟ x2));
+         ncases (xa ≟ x2) in ⊢ (???% → %);#H2
+         ##[nrewrite > (p_eqb1 … H2);nlapply (refl ? (xb ≟ x1));
+            ncases (xb ≟ x1) in ⊢ (???% → %);#H3
+            ##[nnormalize;#H4;nrewrite > H4 in H3;
+               #H3;nrewrite > (p_eqb1 … H3);@
+            ##|nnormalize;nlapply (refl ? (xb ≟ x2));
+               ncases (xb ≟ x2) in ⊢ (???% → %);#H4
+               ##[nrewrite > (p_eqb1 … H4);//
+               ##|nnormalize;#H5;nrewrite > H5 in H3;
+                  nrewrite > (p_eqb3 …);//;#H6;ndestruct (H6);
+               ##]
+            ##]
+         ##|nnormalize;nlapply (refl ? (xb ≟ x1));
+            ncases (xb ≟ x1) in ⊢ (???% → %);#H3
+            ##[nnormalize;#H4;nrewrite > H4 in H2;nrewrite > (p_eqb3 …);//;
+               #H5;ndestruct (H5)
+            ##|nlapply (refl ? (xb ≟ x2));
+               ncases (xb ≟ x2) in ⊢ (???% → %);#H4
+               ##[nnormalize;#H5;nrewrite > H5 in H1;nrewrite > (p_eqb3 …);//;
+                  #H6;ndestruct (H6)
+               ##|nnormalize;//
+               ##]
+            ##]
+         ##]
+      ##]
+   ##|nwhd;#z;nnormalize;nlapply (refl ? (z ≟ x1));
+      ncases (z ≟ x1) in ⊢ (???% → %);#H1
+      ##[nlapply (refl ? (z ≟ x2));
+         ncases (z ≟ x2) in ⊢ (???% → %);#H2
+         ##[@ z;nrewrite > H1;nrewrite > H2;napply p_eqb1;//
+         ##|@ x2;nrewrite > (p_eqb4 …);
+            ##[nrewrite > (p_eqb3 …);//;
+               nnormalize;napply p_eqb1;//
+            ##|nrewrite < (p_eqb1 … H1);@;#H3;nrewrite > H3 in H2;
+               nrewrite > (p_eqb3 …);//;#H2;ndestruct (H2)
+            ##]
+         ##]
+      ##|nlapply (refl ? (z ≟ x2));
+         ncases (z ≟ x2) in ⊢ (???% → %);#H2
+         ##[@ x1;nrewrite > (p_eqb3 …);//;
+            napply p_eqb1;nnormalize;//
+         ##|@ z;nrewrite > H1;nrewrite > H2;@;
+         ##]
+      ##]
+   ##]
+##|@ [x1;x2];#x0 H1;nrewrite > (swap_other …)
+   ##[@
+   ##|@;#H2;nrewrite > H2 in H1;*;#H3;napply H3;/2/;
+   ##|@;#H2;nrewrite > H2 in H1;*;#H3;napply H3;//;
+   ##]
+##]
+nqed.
+*)
+
+axiom inj_swap : ∀N,u,v.injective ?? (swap N u v).
+(*
+#N u v;ncases (swap_fp N u v);*;#H1 H2 H3;//;
+nqed.
+*)
+
+axiom surj_swap : ∀N,u,v.surjective ?? (swap N u v).
+(*
+#N u v;ncases (swap_fp N u v);*;#H1 H2 H3;//;
+nqed.
+*)
+
+axiom finite_swap : ∀N,u,v.∃l.∀x.x ∉ l → swap N u v x = x.
+(*
+#N u v;ncases (swap_fp N u v);*;#H1 H2 H3;//;
+nqed.
+*)
+
+(* swaps two lists of parameters 
+definition Pi_swap_list : ∀xl,xl':list X.X → X ≝ 
+ λxl,xl',x.foldr2 ??? (λu,v,r.swap ? u v r) x xl xl'.
+
+nlemma fp_swap_list : 
+  ∀xl,xl'.finite_perm ? (Pi_swap_list xl xl').
+#xl xl';@
+##[@;
+   ##[ngeneralize in match xl';nelim xl
+      ##[nnormalize;//;
+      ##|#x0 xl0;#IH xl'';nelim xl''
+         ##[nnormalize;//
+         ##|#x1 xl1 IH1 y0 y1;nchange in ⊢ (??%% → ?) with (swap ????);
+            #H1;nlapply (inj_swap … H1);#H2;
+            nlapply (IH … H2);//
+         ##]
+      ##]
+   ##|ngeneralize in match xl';nelim xl
+      ##[nnormalize;#_;#z;@z;@
+      ##|#x' xl0 IH xl'';nelim xl''
+         ##[nnormalize;#z;@z;@
+         ##|#x1 xl1 IH1 z;
+            nchange in ⊢ (??(λ_.???%)) with (swap ????);
+            ncases (surj_swap X x' x1 z);#x2 H1;
+            ncases (IH xl1 x2);#x3 H2;@ x3;
+            nrewrite < H2;napply H1
+         ##]
+      ##]
+   ##]
+##|ngeneralize in match xl';nelim xl
+   ##[#;@ [];#;@
+   ##|#x0 xl0 IH xl'';ncases xl''
+      ##[@ [];#;@
+      ##|#x1 xl1;ncases (IH xl1);#xl2 H1;
+         ncases (finite_swap X x0 x1);#xl3 H2;
+         @ (xl2@xl3);#x2 H3;
+         nchange in ⊢ (??%?) with (swap ????);
+         nrewrite > (H1 …);
+         ##[nrewrite > (H2 …);//;@;#H4;ncases H3;#H5;napply H5;
+            napply in_list_to_in_list_append_r;//
+         ##|@;#H4;ncases H3;#H5;napply H5;
+            napply in_list_to_in_list_append_l;//
+         ##]
+      ##]
+   ##]
+##]
+nqed.
+
+(* the 'reverse' swap of lists of parameters 
+   composing Pi_swap_list and Pi_swap_list_r yields the identity function
+   (see the Pi_swap_list_inv lemma) *)
+ndefinition Pi_swap_list_r : ∀xl,xl':list X. Pi ≝ 
+ λxl,xl',x.foldl2 ??? (λr,u,v.swap ? u v r ) x xl xl'.
+
+nlemma fp_swap_list_r : 
+  ∀xl,xl'.finite_perm ? (Pi_swap_list_r xl xl').
+#xl xl';@
+##[@;
+   ##[ngeneralize in match xl';nelim xl
+      ##[nnormalize;//;
+      ##|#x0 xl0;#IH xl'';nelim xl''
+         ##[nnormalize;//
+         ##|#x1 xl1 IH1 y0 y1;nwhd in ⊢ (??%% → ?);
+            #H1;nlapply (IH … H1);#H2;
+            napply (inj_swap … H2);
+         ##]
+      ##]
+   ##|ngeneralize in match xl';nelim xl
+      ##[nnormalize;#_;#z;@z;@
+      ##|#x' xl0 IH xl'';nelim xl''
+         ##[nnormalize;#z;@z;@
+         ##|#x1 xl1 IH1 z;nwhd in ⊢ (??(λ_.???%));
+            ncases (IH xl1 z);#x2 H1;
+            ncases (surj_swap X x' x1 x2);#x3 H2;
+            @ x3;nrewrite < H2;napply H1;
+         ##]
+      ##]
+   ##]
+##|ngeneralize in match xl';nelim xl
+   ##[#;@ [];#;@
+   ##|#x0 xl0 IH xl'';ncases xl''
+      ##[@ [];#;@
+      ##|#x1 xl1;
+         ncases (IH xl1);#xl2 H1;
+         ncases (finite_swap X x0 x1);#xl3 H2;
+         @ (xl2@xl3);#x2 H3;nwhd in ⊢ (??%?);
+         nrewrite > (H2 …);
+         ##[nrewrite > (H1 …);//;@;#H4;ncases H3;#H5;napply H5;
+            napply in_list_to_in_list_append_l;//
+         ##|@;#H4;ncases H3;#H5;napply H5;
+            napply in_list_to_in_list_append_r;//
+         ##]
+      ##]
+   ##]
+##]
+nqed.
+
+nlemma Pi_swap_list_inv :
+ ∀xl1,xl2,x.
+ Pi_swap_list xl1 xl2 (Pi_swap_list_r xl1 xl2 x) = x.
+#xl;nelim xl
+##[#;@
+##|#x1 xl1 IH xl';ncases xl'
+   ##[#;@
+   ##|#x2 xl2;#x;
+      nchange in ⊢ (??%?) with 
+        (swap ??? (Pi_swap_list ?? 
+                  (Pi_swap_list_r ?? (swap ????))));
+      nrewrite > (IH xl2 ?);napply swap_inv;
+   ##]
+##]
+nqed.
+
+nlemma Pi_swap_list_fresh :
+  ∀x,xl1,xl2.x ∉ xl1 → x ∉ xl2 → Pi_swap_list xl1 xl2 x = x.
+#x xl1;nelim xl1
+##[#;@
+##|#x3 xl3 IH xl2' H1;ncases xl2'
+   ##[#;@
+   ##|#x4 xl4 H2;ncut (x ∉ xl3 ∧ x ∉ xl4);
+      ##[@
+         ##[@;#H3;ncases H1;#H4;napply H4;/2/;
+         ##|@;#H3;ncases H2;#H4;napply H4;/2/
+         ##]
+      ##] *; #H1' H2';
+      nchange in ⊢ (??%?) with (swap ????);
+      nrewrite > (swap_other …)
+      ##[napply IH;//;
+      ##|nchange in ⊢ (?(???%)) with (Pi_swap_list ???);
+         nrewrite > (IH …);//;@;#H3;ncases H2;#H4;napply H4;//;
+      ##|nchange in ⊢ (?(???%)) with (Pi_swap_list ???);
+         nrewrite > (IH …);//;@;#H3;ncases H1;#H4;napply H4;//
+      ##]
+   ##]
+##]
+nqed.
+*)
\ No newline at end of file
diff --git a/matita/matita/broken_lib/binding/ln.ma b/matita/matita/broken_lib/binding/ln.ma
new file mode 100644 (file)
index 0000000..ca7f574
--- /dev/null
@@ -0,0 +1,716 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basics/lists/list.ma".
+include "basics/deqsets.ma".
+include "binding/names.ma".
+include "binding/fp.ma".
+
+axiom alpha : Nset.
+notation "𝔸" non associative with precedence 90 for @{'alphabet}.
+interpretation "set of names" 'alphabet = alpha.
+
+inductive tp : Type[0] ≝ 
+| top : tp
+| arr : tp → tp → tp.
+inductive pretm : Type[0] ≝ 
+| var : nat → pretm
+| par :  𝔸 → pretm
+| abs : tp → pretm → pretm
+| app : pretm → pretm → pretm.
+
+let rec Nth T n (l:list T) on n ≝ 
+  match l with 
+  [ nil ⇒ None ?
+  | cons hd tl ⇒ match n with
+    [ O ⇒ Some ? hd
+    | S n0 ⇒ Nth T n0 tl ] ].
+
+let rec vclose_tm_aux u x k ≝ match u with
+  [ var n ⇒ if (leb k n) then var (S n) else u
+  | par x0 ⇒ if (x0 == x) then (var k) else u
+  | app v1 v2 ⇒ app (vclose_tm_aux v1 x k) (vclose_tm_aux v2 x k)
+  | abs s v ⇒ abs s (vclose_tm_aux v x (S k)) ].
+definition vclose_tm ≝ λu,x.vclose_tm_aux u x O.  
+
+definition vopen_var ≝ λn,x,k.match eqb n k with
+ [ true ⇒ par x
+ | false ⇒ match leb n k with
+   [ true ⇒ var n
+   | false ⇒ var (pred n) ] ].
+
+let rec vopen_tm_aux u x k ≝ match u with
+  [ var n ⇒ vopen_var n x k
+  | par x0 ⇒ u
+  | app v1 v2 ⇒ app (vopen_tm_aux v1 x k) (vopen_tm_aux v2 x k)
+  | abs s v ⇒ abs s (vopen_tm_aux v x (S k)) ].
+definition vopen_tm ≝ λu,x.vopen_tm_aux u x O.
+
+let rec FV u ≝ match u with 
+  [ par x ⇒ [x]
+  | app v1 v2 ⇒ FV v1@FV v2
+  | abs s v ⇒ FV v
+  | _ ⇒ [ ] ].  
+
+definition lam ≝ λx,s,u.abs s (vclose_tm u x).
+
+let rec Pi_map_tm p u on u ≝ match u with
+[ par x ⇒ par (p x)
+| var _ ⇒ u
+| app v1 v2 ⇒ app (Pi_map_tm p v1) (Pi_map_tm p v2)
+| abs s v ⇒ abs s (Pi_map_tm p v) ].
+
+interpretation "permutation of tm" 'middot p x = (Pi_map_tm p x).
+
+notation "hvbox(u⌈x⌉)"
+  with precedence 45
+  for @{ 'open $u $x }.
+
+(*
+notation "hvbox(u⌈x⌉)"
+  with precedence 45
+  for @{ 'open $u $x }.
+notation "❴ u ❵ x" non associative with precedence 90 for @{ 'open $u $x }.
+*)
+interpretation "ln term variable open" 'open u x = (vopen_tm u x).
+notation < "hvbox(ν x break . u)"
+ with precedence 20
+for @{'nu $x $u }.
+notation > "ν list1 x sep , . term 19 u" with precedence 20
+  for ${ fold right @{$u} rec acc @{'nu $x $acc)} }.
+interpretation "ln term variable close" 'nu x u = (vclose_tm u x).
+
+let rec tm_height u ≝ match u with
+[ app v1 v2 ⇒ S (max (tm_height v1) (tm_height v2))
+| abs s v ⇒ S (tm_height v) 
+| _ ⇒ O ].
+
+theorem le_n_O_rect_Type0 : ∀n:nat. n ≤ O → ∀P: nat →Type[0]. P O → P n.
+#n (cases n) // #a #abs cases (?:False) /2/ qed. 
+
+theorem nat_rect_Type0_1 : ∀n:nat.∀P:nat → Type[0]. 
+(∀m.(∀p. p < m → P p) → P m) → P n.
+#n #P #H 
+cut (∀q:nat. q ≤ n → P q) /2/
+(elim n) 
+ [#q #HleO (* applica male *) 
+    @(le_n_O_rect_Type0 ? HleO)
+    @H #p #ltpO cases (?:False) /2/ (* 3 *)
+ |#p #Hind #q #HleS 
+    @H #a #lta @Hind @le_S_S_to_le /2/
+ ]
+qed.
+
+lemma leb_false_to_lt : ∀n,m. leb n m = false → m < n.
+#n elim n
+[ #m normalize #H destruct(H)
+| #n0 #IH * // #m normalize #H @le_S_S @IH // ]
+qed.
+
+lemma nominal_eta_aux : ∀x,u.x ∉ FV u → ∀k.vclose_tm_aux (vopen_tm_aux u x k) x k = u.
+#x #u elim u
+[ #n #_ #k normalize cases (decidable_eq_nat n k) #Hnk
+  [ >Hnk >eqb_n_n normalize >(\b ?) //
+  | >(not_eq_to_eqb_false … Hnk) normalize cases (true_or_false (leb n k)) #Hleb
+    [ >Hleb normalize >(?:leb k n = false) //
+      @lt_to_leb_false @not_eq_to_le_to_lt /2/
+    | >Hleb normalize >(?:leb k (pred n) = true) normalize
+      [ cases (leb_false_to_lt … Hleb) //
+      | @le_to_leb_true cases (leb_false_to_lt … Hleb) normalize /2/ ] ] ]
+| #y normalize #Hy >(\bf ?) // @(not_to_not … Hy) //
+| #s #v #IH normalize #Hv #k >IH // @Hv
+| #v1 #v2 #IH1 #IH2 normalize #Hv1v2 #k 
+  >IH1 [ >IH2 // | @(not_to_not … Hv1v2) @in_list_to_in_list_append_l ]
+  @(not_to_not … Hv1v2) @in_list_to_in_list_append_r ]
+qed.
+
+corollary nominal_eta : ∀x,u.x ∉ FV u → (νx.u⌈x⌉) = u.
+#x #u #Hu @nominal_eta_aux //
+qed.
+
+lemma eq_height_vopen_aux : ∀v,x,k.tm_height (vopen_tm_aux v x k) = tm_height v.
+#v #x elim v
+[ #n #k normalize cases (eqb n k) // cases (leb n k) //
+| #u #k %
+| #s #u #IH #k normalize >IH %
+| #u1 #u2 #IH1 #IH2 #k normalize >IH1 >IH2 % ]
+qed.
+
+corollary eq_height_vopen : ∀v,x.tm_height (v⌈x⌉) = tm_height v.
+#v #x @eq_height_vopen_aux
+qed.
+
+theorem pretm_ind_plus_aux : 
+ ∀P:pretm → Type[0].
+   (∀x:𝔸.P (par x)) → 
+   (∀n:ℕ.P (var n)) → 
+   (∀v1,v2. P v1 → P v2 → P (app v1 v2)) → 
+   ∀C:list 𝔸.
+   (∀x,s,v.x ∉ FV v → x ∉ C → P (v⌈x⌉) → P (lam x s (v⌈x⌉))) →
+ ∀n,u.tm_height u ≤ n → P u.
+#P #Hpar #Hvar #Happ #C #Hlam #n change with ((λn.?) n); @(nat_rect_Type0_1 n ??)
+#m cases m
+[ #_ * /2/
+  [ normalize #s #v #Hfalse cases (?:False) cases (not_le_Sn_O (tm_height v)) /2/
+  | #v1 #v2 whd in ⊢ (?%?→?); #Hfalse cases (?:False) cases (not_le_Sn_O (max ??))
+    [ #H @H @Hfalse|*:skip] ] ]
+-m #m #IH * /2/
+[ #s #v whd in ⊢ (?%?→?); #Hv
+  lapply (p_fresh … (C@FV v)) letin y ≝ (N_fresh … (C@FV v)) #Hy
+  >(?:abs s v = lam y s (v⌈y⌉))
+  [| whd in ⊢ (???%); >nominal_eta // @(not_to_not … Hy) @in_list_to_in_list_append_r ] 
+  @Hlam
+  [ @(not_to_not … Hy) @in_list_to_in_list_append_r
+  | @(not_to_not … Hy) @in_list_to_in_list_append_l ]
+  @IH [| @Hv | >eq_height_vopen % ]
+| #v1 #v2 whd in ⊢ (?%?→?); #Hv @Happ
+  [ @IH [| @Hv | @le_max_1 ] | @IH [| @Hv | @le_max_2 ] ] ]
+qed.
+
+corollary pretm_ind_plus :
+ ∀P:pretm → Type[0].
+   (∀x:𝔸.P (par x)) → 
+   (∀n:ℕ.P (var n)) → 
+   (∀v1,v2. P v1 → P v2 → P (app v1 v2)) → 
+   ∀C:list 𝔸.
+   (∀x,s,v.x ∉ FV v → x ∉ C → P (v⌈x⌉) → P (lam x s (v⌈x⌉))) →
+ ∀u.P u.
+#P #Hpar #Hvar #Happ #C #Hlam #u @pretm_ind_plus_aux /2/
+qed.
+
+(* maps a permutation to a list of terms *)
+definition Pi_map_list : (𝔸 → 𝔸) → list 𝔸 → list 𝔸 ≝ map 𝔸 𝔸 .
+
+(* interpretation "permutation of name list" 'middot p x = (Pi_map_list p x).*)
+
+(*
+inductive tm : pretm → Prop ≝ 
+| tm_par : ∀x:𝔸.tm (par x)
+| tm_app : ∀u,v.tm u → tm v → tm (app u v)
+| tm_lam : ∀x,s,u.tm u → tm (lam x s u).
+
+inductive ctx_aux : nat → pretm → Prop ≝ 
+| ctx_var : ∀n,k.n < k → ctx_aux k (var n)
+| ctx_par : ∀x,k.ctx_aux k (par x)
+| ctx_app : ∀u,v,k.ctx_aux k u → ctx_aux k v → ctx_aux k (app u v)
+(* è sostituibile da ctx_lam ? *)
+| ctx_abs : ∀s,u.ctx_aux (S k) u → ctx_aux k (abs s u).
+*)
+
+inductive tm_or_ctx (k:nat) : pretm → Type[0] ≝ 
+| toc_var : ∀n.n < k → tm_or_ctx k (var n)
+| toc_par : ∀x.tm_or_ctx k (par x)
+| toc_app : ∀u,v.tm_or_ctx k u → tm_or_ctx k v → tm_or_ctx k (app u v)
+| toc_lam : ∀x,s,u.tm_or_ctx k u → tm_or_ctx k (lam x s u).
+
+definition tm ≝ λt.tm_or_ctx O t.
+definition ctx ≝ λt.tm_or_ctx 1 t.
+
+definition check_tm ≝ λu,k.
+  pretm_ind_plus ?
+  (λ_.true)
+  (λn.leb (S n) k)
+  (λv1,v2,rv1,rv2.rv1 ∧ rv2)
+  [] (λx,s,v,px,pC,rv.rv)
+  u.
+
+axiom pretm_ind_plus_app : ∀P,u,v,C,H1,H2,H3,H4.
+  pretm_ind_plus P H1 H2 H3 C H4 (app u v) = 
+    H3 u v (pretm_ind_plus P H1 H2 H3 C H4 u) (pretm_ind_plus P H1 H2 H3 C H4 v).
+
+axiom pretm_ind_plus_lam : ∀P,x,s,u,C,px,pC,H1,H2,H3,H4.
+  pretm_ind_plus P H1 H2 H3 C H4 (lam x s (u⌈x⌉)) = 
+    H4 x s u px pC (pretm_ind_plus P H1 H2 H3 C H4 (u⌈x⌉)).
+
+record TM : Type[0] ≝ {
+  pretm_of_TM :> pretm;
+  tm_of_TM : check_tm pretm_of_TM O = true
+}.
+
+record CTX : Type[0] ≝ {
+  pretm_of_CTX :> pretm;
+  ctx_of_CTX : check_tm pretm_of_CTX 1 = true
+}.
+
+inductive tm2 : pretm → Type[0] ≝ 
+| tm_par : ∀x.tm2 (par x)
+| tm_app : ∀u,v.tm2 u → tm2 v → tm2 (app u v)
+| tm_lam : ∀x,s,u.x ∉ FV u → (∀y.y ∉ FV u → tm2 (u⌈y⌉)) → tm2 (lam x s (u⌈x⌉)).
+
+(*
+inductive tm' : pretm → Prop ≝ 
+| tm_par : ∀x.tm' (par x)
+| tm_app : ∀u,v.tm' u → tm' v → tm' (app u v)
+| tm_lam : ∀x,s,u,C.x ∉ FV u → x ∉ C → (∀y.y ∉ FV u → tm' (❴u❵y)) → tm' (lam x s (❴u❵x)).
+*)
+
+lemma pi_vclose_tm : 
+  ∀z1,z2,x,u.swap 𝔸 z1 z2·(νx.u) = (ν swap ? z1 z2 x.swap 𝔸 z1 z2 · u).
+#z1 #z2 #x #u
+change with (vclose_tm_aux ???) in match (vclose_tm ??);
+change with (vclose_tm_aux ???) in ⊢ (???%); lapply O elim u normalize //
+[ #n #k cases (leb k n) normalize %
+| #x0 #k cases (true_or_false (x0==z1)) #H1 >H1 normalize
+  [ cases (true_or_false (x0==x)) #H2 >H2 normalize
+    [ <(\P H2) >H1 normalize >(\b (refl ? z2)) %
+    | >H1 normalize cases (true_or_false (x==z1)) #H3 >H3 normalize
+      [ >(\P H3) in H2; >H1 #Hfalse destruct (Hfalse)
+      | cases (true_or_false (x==z2)) #H4 >H4 normalize
+        [ cases (true_or_false (z2==z1)) #H5 >H5 normalize //
+          >(\P H5) in H4; >H3 #Hfalse destruct (Hfalse)
+        | >(\bf ?) // @sym_not_eq @(\Pf H4) ]
+      ]
+    ]
+  | cases (true_or_false (x0==x)) #H2 >H2 normalize
+    [ <(\P H2) >H1 normalize >(\b (refl ??)) %
+    | >H1 normalize cases (true_or_false (x==z1)) #H3 >H3 normalize
+      [ cases (true_or_false (x0==z2)) #H4 >H4 normalize 
+        [ cases (true_or_false (z1==z2)) #H5 >H5 normalize //
+          <(\P H5) in H4; <(\P H3) >H2 #Hfalse destruct (Hfalse)
+        | >H4 % ]
+      | cases (true_or_false (x0==z2)) #H4 >H4 normalize
+        [ cases (true_or_false (x==z2)) #H5 >H5 normalize 
+          [ <(\P H5) in H4; >H2 #Hfalse destruct (Hfalse)
+          | >(\bf ?) // @sym_not_eq @(\Pf H3) ]
+        | cases (true_or_false (x==z2)) #H5 >H5 normalize
+          [ >H1 %
+          | >H2 % ]
+        ]
+      ]
+    ]
+  ]
+]
+qed.
+
+lemma pi_vopen_tm : 
+  ∀z1,z2,x,u.swap 𝔸 z1 z2·(u⌈x⌉) = (swap 𝔸 z1 z2 · u⌈swap 𝔸 z1 z2 x⌉).
+#z1 #z2 #x #u
+change with (vopen_tm_aux ???) in match (vopen_tm ??);
+change with (vopen_tm_aux ???) in ⊢ (???%); lapply O elim u normalize //
+#n #k cases (true_or_false (eqb n k)) #H1 >H1 normalize //
+cases (true_or_false (leb n k)) #H2 >H2 normalize //
+qed.
+
+lemma pi_lam : 
+  ∀z1,z2,x,s,u.swap 𝔸 z1 z2 · lam x s u = lam (swap 𝔸 z1 z2 x) s (swap 𝔸 z1 z2 · u).
+#z1 #z2 #x #s #u whd in ⊢ (???%); <(pi_vclose_tm …) %
+qed.
+
+lemma eqv_FV : ∀z1,z2,u.FV (swap 𝔸 z1 z2 · u) = Pi_map_list (swap 𝔸 z1 z2) (FV u).
+#z1 #z2 #u elim u //
+[ #s #v normalize //
+| #v1 #v2 normalize /2/ ]
+qed.
+
+lemma swap_inv_tm : ∀z1,z2,u.swap 𝔸 z1 z2 · (swap 𝔸 z1 z2 · u) = u.
+#z1 #z2 #u elim u [1,3,4:normalize //]
+#x whd in ⊢ (??%?); >swap_inv %
+qed.
+
+lemma eqv_in_list : ∀x,l,z1,z2.x ∈ l → swap 𝔸 z1 z2 x ∈ Pi_map_list (swap 𝔸 z1 z2) l.
+#x #l #z1 #z2 #Hin elim Hin
+[ #x0 #l0 %
+| #x1 #x2 #l0 #Hin #IH %2 @IH ]
+qed.
+
+lemma eqv_tm2 : ∀u.tm2 u → ∀z1,z2.tm2 ((swap ? z1 z2)·u).
+#u #Hu #z1 #z2 letin p ≝ (swap ? z1 z2) elim Hu /2/
+#x #s #v #Hx #Hv #IH >pi_lam >pi_vopen_tm %3
+[ @(not_to_not … Hx) -Hx #Hx
+  <(swap_inv ? z1 z2 x) <(swap_inv_tm z1 z2 v) >eqv_FV @eqv_in_list //
+| #y #Hy <(swap_inv ? z1 z2 y)
+  <pi_vopen_tm @IH @(not_to_not … Hy) -Hy #Hy <(swap_inv ? z1 z2 y)
+  >eqv_FV @eqv_in_list //
+]
+qed.
+
+lemma vclose_vopen_aux : ∀x,u,k.vopen_tm_aux (vclose_tm_aux u x k) x k = u.
+#x #u elim u normalize //
+[ #n #k cases (true_or_false (leb k n)) #H >H whd in ⊢ (??%?);
+  [ cases (true_or_false (eqb (S n) k)) #H1 >H1
+    [ <(eqb_true_to_eq … H1) in H; #H lapply (leb_true_to_le … H) -H #H
+      cases (le_to_not_lt … H) -H #H cases (H ?) %
+    | whd in ⊢ (??%?); >lt_to_leb_false // @le_S_S /2/ ]
+  | cases (true_or_false (eqb n k)) #H1 >H1 normalize
+    [ >(eqb_true_to_eq … H1) in H; #H lapply (leb_false_to_not_le … H) -H
+      * #H cases (H ?) %
+    | >le_to_leb_true // @not_lt_to_le % #H2 >le_to_leb_true in H;
+      [ #H destruct (H) | /2/ ]
+    ]
+  ]
+| #x0 #k cases (true_or_false (x0==x)) #H1 >H1 normalize // >(\P H1) >eqb_n_n % ]
+qed.      
+
+lemma vclose_vopen : ∀x,u.((νx.u)⌈x⌉) = u. #x #u @vclose_vopen_aux
+qed.
+
+(*
+theorem tm_to_tm : ∀t.tm' t → tm t.
+#t #H elim H
+*)
+
+lemma in_list_singleton : ∀T.∀t1,t2:T.t1 ∈ [t2] → t1 = t2.
+#T #t1 #t2 #H @(in_list_inv_ind ??? H) /2/
+qed.
+
+lemma fresh_vclose_tm_aux : ∀u,x,k.x ∉ FV (vclose_tm_aux u x k).
+#u #x elim u //
+[ #n #k normalize cases (leb k n) normalize //
+| #x0 #k normalize cases (true_or_false (x0==x)) #H >H normalize //
+  lapply (\Pf H) @not_to_not #Hin >(in_list_singleton ??? Hin) %
+| #v1 #v2 #IH1 #IH2 #k normalize % #Hin cases (in_list_append_to_or_in_list ???? Hin) /2/ ]
+qed.
+
+lemma fresh_vclose_tm : ∀u,x.x ∉ FV (νx.u). //
+qed.
+
+lemma check_tm_true_to_toc : ∀u,k.check_tm u k = true → tm_or_ctx k u.
+#u @(pretm_ind_plus ???? [ ] ? u)
+[ #x #k #_ %2
+| #n #k change with (leb (S n) k) in ⊢ (??%?→?); #H % @leb_true_to_le //
+| #v1 #v2 #rv1 #rv2 #k change with (pretm_ind_plus ???????) in ⊢ (??%?→?);
+  >pretm_ind_plus_app #H cases (andb_true ?? H) -H #Hv1 #Hv2 %3
+  [ @rv1 @Hv1 | @rv2 @Hv2 ]
+| #x #s #v #Hx #_ #rv #k change with (pretm_ind_plus ???????) in ⊢ (??%?→?); 
+  >pretm_ind_plus_lam // #Hv %4 @rv @Hv ]
+qed.
+
+lemma toc_to_check_tm_true : ∀u,k.tm_or_ctx k u → check_tm u k = true.
+#u #k #Hu elim Hu //
+[ #n #Hn change with (leb (S n) k) in ⊢ (??%?); @le_to_leb_true @Hn
+| #v1 #v2 #Hv1 #Hv2 #IH1 #IH2 change with (pretm_ind_plus ???????) in ⊢ (??%?);
+  >pretm_ind_plus_app change with (check_tm v1 k ∧ check_tm v2 k) in ⊢ (??%?); /2/
+| #x #s #v #Hv #IH <(vclose_vopen x v) change with (pretm_ind_plus ???????) in ⊢ (??%?);
+  >pretm_ind_plus_lam [| // | @fresh_vclose_tm ] >(vclose_vopen x v) @IH ]
+qed.
+
+lemma fresh_swap_tm : ∀z1,z2,u.z1 ∉ FV u → z2 ∉ FV u → swap 𝔸 z1 z2 · u = u.
+#z1 #z2 #u elim u
+[2: normalize in ⊢ (?→%→%→?); #x #Hz1 #Hz2 whd in ⊢ (??%?); >swap_other //
+  [ @(not_to_not … Hz2) | @(not_to_not … Hz1) ] //
+|1: //
+| #s #v #IH normalize #Hz1 #Hz2 >IH // [@Hz2|@Hz1]
+| #v1 #v2 #IH1 #IH2 normalize #Hz1 #Hz2
+  >IH1 [| @(not_to_not … Hz2) @in_list_to_in_list_append_l | @(not_to_not … Hz1) @in_list_to_in_list_append_l ]
+  >IH2 // [@(not_to_not … Hz2) @in_list_to_in_list_append_r | @(not_to_not … Hz1) @in_list_to_in_list_append_r ]
+]
+qed.
+
+theorem tm_to_tm2 : ∀u.tm u → tm2 u.
+#t #Ht elim Ht
+[ #n #Hn cases (not_le_Sn_O n) #Hfalse cases (Hfalse Hn)
+| @tm_par
+| #u #v #Hu #Hv @tm_app
+| #x #s #u #Hu #IHu <(vclose_vopen x u) @tm_lam
+  [ @fresh_vclose_tm
+  | #y #Hy <(fresh_swap_tm x y (νx.u)) /2/ @fresh_vclose_tm ]
+]
+qed.
+
+theorem tm2_to_tm : ∀u.tm2 u → tm u.
+#u #pu elim pu /2/ #x #s #v #Hx #Hv #IH %4 @IH //
+qed.
+
+(* define PAR APP LAM *)
+definition PAR ≝ λx.mk_TM (par x) ?. // qed.
+definition APP ≝ λu,v:TM.mk_TM (app u v) ?.
+change with (pretm_ind_plus ???????) in match (check_tm ??); >pretm_ind_plus_app
+change with (check_tm ??) in match (pretm_ind_plus ???????); change with (check_tm ??) in match (pretm_ind_plus ???????) in ⊢ (??(??%)?);
+@andb_elim >(tm_of_TM u) >(tm_of_TM v) % qed.
+definition LAM ≝ λx,s.λu:TM.mk_TM (lam x s u) ?.
+change with (pretm_ind_plus ???????) in match (check_tm ??); <(vclose_vopen x u)
+>pretm_ind_plus_lam [| // | @fresh_vclose_tm ]
+change with (check_tm ??) in match (pretm_ind_plus ???????); >vclose_vopen
+@(tm_of_TM u) qed.
+
+axiom vopen_tm_down : ∀u,x,k.tm_or_ctx (S k) u → tm_or_ctx k (u⌈x⌉).
+(* needs true_plus_false
+
+#u #x #k #Hu elim Hu
+[ #n #Hn normalize cases (true_or_false (eqb n O)) #H >H [%2]
+  normalize >(?: leb n O = false) [|cases n in H; // >eqb_n_n #H destruct (H) ]
+  normalize lapply Hn cases n in H; normalize [ #Hfalse destruct (Hfalse) ]
+  #n0 #_ #Hn0 % @le_S_S_to_le //
+| #x0 %2
+| #v1 #v2 #Hv1 #Hv2 #IH1 #IH2 %3 //
+| #x0 #s #v #Hv #IH normalize @daemon
+]
+qed.
+*)
+
+definition vopen_TM ≝ λu:CTX.λx.mk_TM (u⌈x⌉) ?.
+@toc_to_check_tm_true @vopen_tm_down @check_tm_true_to_toc @ctx_of_CTX qed.
+
+axiom vclose_tm_up : ∀u,x,k.tm_or_ctx k u → tm_or_ctx (S k) (νx.u).
+
+definition vclose_TM ≝ λu:TM.λx.mk_CTX (νx.u) ?. 
+@toc_to_check_tm_true @vclose_tm_up @check_tm_true_to_toc @tm_of_TM qed.
+
+interpretation "ln wf term variable open" 'open u x = (vopen_TM u x).
+interpretation "ln wf term variable close" 'nu x u = (vclose_TM u x).
+
+theorem tm_alpha : ∀x,y,s,u.x ∉ FV u → y ∉ FV u → lam x s (u⌈x⌉) = lam y s (u⌈y⌉).
+#x #y #s #u #Hx #Hy whd in ⊢ (??%%); @eq_f >nominal_eta // >nominal_eta //
+qed.
+
+lemma TM_to_tm2 : ∀u:TM.tm2 u.
+#u @tm_to_tm2 @check_tm_true_to_toc @tm_of_TM qed.
+
+theorem TM_ind_plus_weak : 
+ ∀P:pretm → Type[0].
+   (∀x:𝔸.P (PAR x)) → 
+   (∀v1,v2:TM.P v1 → P v2 → P (APP v1 v2)) → 
+   ∀C:list 𝔸.
+   (∀x,s.∀v:CTX.x ∉ FV v → x ∉ C → 
+     (∀y.y ∉ FV v → P (v⌈y⌉)) → P (LAM x s (v⌈x⌉))) →
+ ∀u:TM.P u.
+#P #Hpar #Happ #C #Hlam #u elim (TM_to_tm2 u) //
+[ #v1 #v2 #pv1 #pv2 #IH1 #IH2 @(Happ (mk_TM …) (mk_TM …) IH1 IH2)
+  @toc_to_check_tm_true @tm2_to_tm //
+| #x #s #v #Hx #pv #IH
+  lapply (p_fresh … (C@FV v)) letin x0 ≝ (N_fresh … (C@FV v)) #Hx0
+  >(?:lam x s (v⌈x⌉) = lam x0 s (v⌈x0⌉))
+  [|@tm_alpha // @(not_to_not … Hx0) @in_list_to_in_list_append_r ]
+  @(Hlam x0 s (mk_CTX v ?) ??)
+  [ <(nominal_eta … Hx) @toc_to_check_tm_true @vclose_tm_up @tm2_to_tm @pv //
+  | @(not_to_not … Hx0) @in_list_to_in_list_append_r
+  | @(not_to_not … Hx0) @in_list_to_in_list_append_l
+  | @IH ]
+]
+qed.
+
+lemma eq_mk_TM : ∀u,v.u = v → ∀pu,pv.mk_TM u pu = mk_TM v pv.
+#u #v #Heq >Heq #pu #pv %
+qed.
+
+lemma eq_P : ∀T:Type[0].∀t1,t2:T.t1 = t2 → ∀P:T → Type[0].P t1 → P t2. // qed.
+
+theorem TM_ind_plus :
+ ∀P:TM → Type[0].
+   (∀x:𝔸.P (PAR x)) → 
+   (∀v1,v2:TM.P v1 → P v2 → P (APP v1 v2)) → 
+   ∀C:list 𝔸.
+   (∀x,s.∀v:CTX.x ∉ FV v → x ∉ C → 
+     (∀y.y ∉ FV v → P (v⌈y⌉)) → P (LAM x s (v⌈x⌉))) →
+ ∀u:TM.P u.
+#P #Hpar #Happ #C #Hlam * #u #pu
+>(?:mk_TM u pu = 
+    mk_TM u (toc_to_check_tm_true … (tm2_to_tm … (tm_to_tm2 … (check_tm_true_to_toc … pu))))) [|%]
+elim (tm_to_tm2 u ?) //
+[ #v1 #v2 #pv1 #pv2 #IH1 #IH2 @(Happ (mk_TM …) (mk_TM …) IH1 IH2)
+| #x #s #v #Hx #pv #IH
+  lapply (p_fresh … (C@FV v)) letin x0 ≝ (N_fresh … (C@FV v)) #Hx0
+  lapply (Hlam x0 s (mk_CTX v ?) ???) 
+  [2: @(not_to_not … Hx0) -Hx0 #Hx0 @in_list_to_in_list_append_l @Hx0
+  |4: @toc_to_check_tm_true <(nominal_eta x v) // @vclose_tm_up @tm2_to_tm @pv // 
+  | #y #Hy whd in match (vopen_TM ??);
+    >(?:mk_TM (v⌈y⌉) ? = mk_TM (v⌈y⌉) (toc_to_check_tm_true (v⌈y⌉) O (tm2_to_tm (v⌈y⌉) (pv y Hy))))
+    [@IH|%]
+  | @(not_to_not … Hx0) -Hx0 #Hx0 @in_list_to_in_list_append_r @Hx0 
+  | @eq_P @eq_mk_TM whd in match (vopen_TM ??); @tm_alpha // @(not_to_not … Hx0) @in_list_to_in_list_append_r ]
+]
+qed.
+
+notation 
+"hvbox('nominal' u 'return' out 'with' 
+       [ 'xpar' ident x ⇒ f1 
+       | 'xapp' ident v1 ident v2 ident recv1 ident recv2 ⇒ f2 
+       | 'xlam' ❨ident y # C❩ ident s ident w ident py1 ident py2 ident recw ⇒ f3 ])"
+with precedence 48 
+for @{ TM_ind_plus $out (λ${ident x}:?.$f1)
+       (λ${ident v1}:?.λ${ident v2}:?.λ${ident recv1}:?.λ${ident recv2}:?.$f2)
+       $C (λ${ident y}:?.λ${ident s}:?.λ${ident w}:?.λ${ident py1}:?.λ${ident py2}:?.λ${ident recw}:?.$f3)
+       $u }.
+       
+(* include "basics/jmeq.ma".*)
+
+definition subst ≝ (λu:TM.λx,v.
+  nominal u return (λ_.TM) with 
+  [ xpar x0 ⇒ match x == x0 with [ true ⇒ v | false ⇒ PAR x0 ]  (* u instead of PAR x0 does not work, u stays the same at every rec call! *)
+  | xapp v1 v2 recv1 recv2 ⇒ APP recv1 recv2
+  | xlam ❨y # x::FV v❩ s w py1 py2 recw ⇒ LAM y s (recw y py1) ]).
+  
+lemma subst_def : ∀u,x,v.subst u x v =
+  nominal u return (λ_.TM) with 
+  [ xpar x0 ⇒ match x == x0 with [ true ⇒ v | false ⇒ PAR x0 ]
+  | xapp v1 v2 recv1 recv2 ⇒ APP recv1 recv2
+  | xlam ❨y # x::FV v❩ s w py1 py2 recw ⇒ LAM y s (recw y py1) ]. //
+qed.
+
+axiom TM_ind_plus_LAM : 
+  ∀x,s,u,out,f1,f2,C,f3,Hx1,Hx2.
+  TM_ind_plus out f1 f2 C f3 (LAM x s (u⌈x⌉)) = 
+  f3 x s u Hx1 Hx2 (λy,Hy.TM_ind_plus ? f1 f2 C f3 ?).
+  
+axiom TM_ind_plus_APP : 
+  ∀u1,u2,out,f1,f2,C,f3.
+  TM_ind_plus out f1 f2 C f3 (APP u1 u2) = 
+  f2 u1 u2 (TM_ind_plus out f1 f2 C f3 ?) (TM_ind_plus out f1 f2 C f3 ?).
+  
+lemma eq_mk_CTX : ∀u,v.u = v → ∀pu,pv.mk_CTX u pu = mk_CTX v pv.
+#u #v #Heq >Heq #pu #pv %
+qed.
+
+lemma vclose_vopen_TM : ∀x.∀u:TM.((νx.u)⌈x⌉) = u.
+#x * #u #pu @eq_mk_TM @vclose_vopen qed.
+
+lemma nominal_eta_CTX : ∀x.∀u:CTX.x ∉ FV u → (νx.(u⌈x⌉)) = u.
+#x * #u #pu #Hx @eq_mk_CTX @nominal_eta // qed. 
+
+theorem TM_alpha : ∀x,y,s.∀u:CTX.x ∉ FV u → y ∉ FV u → LAM x s (u⌈x⌉) = LAM y s (u⌈y⌉).
+#x #y #s #u #Hx #Hy @eq_mk_TM @tm_alpha // qed.
+
+axiom in_vopen_CTX : ∀x,y.∀v:CTX.x ∈ FV (v⌈y⌉) → x = y ∨ x ∈ FV v.
+
+theorem subst_fresh : ∀u,v:TM.∀x.x ∉ FV u → subst u x v = u.
+#u #v #x @(TM_ind_plus … (x::FV v) … u)
+[ #x0 normalize in ⊢ (%→?); #Hx normalize in ⊢ (??%?);
+  >(\bf ?) [| @(not_to_not … Hx) #Heq >Heq % ] %
+| #u1 #u2 #IH1 #IH2 normalize in ⊢ (%→?); #Hx
+  >subst_def >TM_ind_plus_APP @eq_mk_TM @eq_f2 @eq_f
+  [ <subst_def @IH1 @(not_to_not … Hx) @in_list_to_in_list_append_l
+  | <subst_def @IH2 @(not_to_not … Hx) @in_list_to_in_list_append_r ]
+| #x0 #s #v0 #Hx0 #HC #IH #Hx >subst_def >TM_ind_plus_LAM [|@HC|@Hx0]
+  @eq_f <subst_def @IH // @(not_to_not … Hx) -Hx #Hx
+  change with (FV (νx0.(v0⌈x0⌉))) in ⊢ (???%); >nominal_eta_CTX //
+  cases (in_vopen_CTX … Hx) // #Heq >Heq in HC; * #HC @False_ind @HC %
+]
+qed.
+
+example subst_LAM_same : ∀x,s,u,v. subst (LAM x s u) x v = LAM x s u.
+#x #s #u #v >subst_def <(vclose_vopen_TM x u)
+lapply (p_fresh … (FV (νx.u)@x::FV v)) letin x0 ≝ (N_fresh … (FV (νx.u)@x::FV v)) #Hx0
+>(TM_alpha x x0)
+[| @(not_to_not … Hx0) -Hx0 #Hx0 @in_list_to_in_list_append_l @Hx0 | @fresh_vclose_tm ]
+>TM_ind_plus_LAM [| @(not_to_not … Hx0) -Hx0 #Hx0 @in_list_to_in_list_append_r @Hx0 | @(not_to_not … Hx0) -Hx0 #Hx0 @in_list_to_in_list_append_l @Hx0 ]
+@eq_f change with (subst ((νx.u)⌈x0⌉) x v) in ⊢ (??%?); @subst_fresh
+@(not_to_not … Hx0) #Hx0' cases (in_vopen_CTX … Hx0') 
+[ #Heq >Heq @in_list_to_in_list_append_r %
+| #Hfalse @False_ind cases (fresh_vclose_tm u x) #H @H @Hfalse ]
+qed.
+
+(*
+notation > "Λ ident x. ident T [ident x] ↦ P"
+  with precedence 48 for @{'foo (λ${ident x}.λ${ident T}.$P)}.
+
+notation < "Λ ident x. ident T [ident x] ↦ P"
+  with precedence 48 for @{'foo (λ${ident x}:$Q.λ${ident T}:$R.$P)}.
+*)
+
+(*
+notation 
+"hvbox('nominal' u 'with' 
+       [ 'xpar' ident x ⇒ f1 
+       | 'xapp' ident v1 ident v2  ⇒ f2
+       | 'xlam' ident x # C s w ⇒ f3 ])"
+with precedence 48 
+for @{ tm2_ind_plus ? (λ${ident x}:$Tx.$f1) 
+ (λ${ident v1}:$Tv1.λ${ident v2}:$Tv2.λ${ident pv1}:$Tpv1.λ${ident pv2}:$Tpv2.λ${ident recv1}:$Trv1.λ${ident recv2}:$Trv2.$f2)
+ $C (λ${ident x}:$Tx.λ${ident s}:$Ts.λ${ident w}:$Tw.λ${ident py1}:$Tpy1.λ${ident py2}:$Tpy2.λ${ident pw}:$Tpw.λ${ident recw}:$Trw.$f3) $u (tm_to_tm2 ??) }.
+*)
+
+(*
+notation 
+"hvbox('nominal' u 'with' 
+       [ 'xpar' ident x ^ f1 
+       | 'xapp' ident v1 ident v2 ^ f2 ])"
+(*       | 'xlam' ident x # C s w ^ f3 ]) *)
+with precedence 48 
+for @{ tm2_ind_plus ? (λ${ident x}:$Tx.$f1) 
+ (λ${ident v1}:$Tv1.λ${ident v2}:$Tv2.λ${ident pv1}:$Tpv1.λ${ident pv2}:$Tpv2.λ${ident recv1}:$Trv1.λ${ident recv2}:$Trv2.$f2)
+ $C (λ${ident x}:$Tx.λ${ident s}:$Ts.λ${ident w}:$Tw.λ${ident py1}:$Tpy1.λ${ident py2}:$Tpy2.λ${ident pw}:$Tpw.λ${ident recw}:$Trw.$f3) $u (tm_to_tm2 ??) }.
+*)
+notation 
+"hvbox('nominal' u 'with' 
+       [ 'xpar' ident x ^ f1 
+       | 'xapp' ident v1 ident v2 ^ f2 ])"
+with precedence 48 
+for @{ tm2_ind_plus ? (λ${ident x}:?.$f1) 
+ (λ${ident v1}:$Tv1.λ${ident v2}:$Tv2.λ${ident pv1}:$Tpv1.λ${ident pv2}:$Tpv2.λ${ident recv1}:$Trv1.λ${ident recv2}:$Trv2.$f2)
+ $C (λ${ident x}:?.λ${ident s}:$Ts.λ${ident w}:$Tw.λ${ident py1}:$Tpy1.λ${ident py2}:$Tpy2.λ${ident pw}:$Tpw.λ${ident recw}:$Trw.$f3) $u (tm_to_tm2 ??) }.
+
+axiom in_Env : 𝔸 × tp → Env → Prop.
+notation "X ◃ G" non associative with precedence 45 for @{'lefttriangle $X $G}.
+interpretation "Env membership" 'lefttriangle x l = (in_Env x l).
+
+
+
+inductive judg : list tp → tm → tp → Prop ≝ 
+| t_var : ∀g,n,t.Nth ? n g = Some ? t → judg g (var n) t
+| t_app : ∀g,m,n,t,u.judg g m (arr t u) → judg g n t → judg g (app m n) u
+| t_abs : ∀g,t,m,u.judg (t::g) m u → judg g (abs t m) (arr t u).
+
+definition Env := list (𝔸 × tp).
+
+axiom vclose_env : Env → list tp.
+axiom vclose_tm : Env → tm → tm.
+axiom Lam : 𝔸 → tp → tm → tm.
+definition Judg ≝ λG,M,T.judg (vclose_env G) (vclose_tm G M) T.
+definition dom ≝ λG:Env.map ?? (fst ??) G.
+
+definition sctx ≝ 𝔸 × tm.
+axiom swap_tm : 𝔸 → 𝔸 → tm → tm.
+definition sctx_app : sctx → 𝔸 → tm ≝ λM0,Y.let 〈X,M〉 ≝ M0 in swap_tm X Y M.
+
+axiom in_list : ∀A:Type[0].A → list A → Prop.
+interpretation "list membership" 'mem x l = (in_list ? x l).
+interpretation "list non-membership" 'notmem x l = (Not (in_list ? x l)).
+
+axiom in_Env : 𝔸 × tp → Env → Prop.
+notation "X ◃ G" non associative with precedence 45 for @{'lefttriangle $X $G}.
+interpretation "Env membership" 'lefttriangle x l = (in_Env x l).
+
+(* axiom Lookup : 𝔸 → Env → option tp. *)
+
+(* forma alto livello del judgment
+   t_abs* : ∀G,T,X,M,U.
+            (∀Y ∉ supp(M).Judg (〈Y,T〉::G) (M[Y]) U) → 
+            Judg G (Lam X T (M[X])) (arr T U) *)
+
+(* prima dimostrare, poi perfezionare gli assiomi, poi dimostrarli *)
+
+axiom Judg_ind : ∀P:Env → tm → tp → Prop.
+  (∀X,G,T.〈X,T〉 ◃ G → P G (par X) T) → 
+  (∀G,M,N,T,U.
+    Judg G M (arr T U) → Judg G N T → 
+    P G M (arr T U) → P G N T → P G (app M N) U) → 
+  (∀G,T1,T2,X,M1.
+    (∀Y.Y ∉ (FV (Lam X T1 (sctx_app M1 X))) → Judg (〈Y,T1〉::G) (sctx_app M1 Y) T2) →
+    (∀Y.Y ∉ (FV (Lam X T1 (sctx_app M1 X))) → P (〈Y,T1〉::G) (sctx_app M1 Y) T2) → 
+    P G (Lam X T1 (sctx_app M1 X)) (arr T1 T2)) → 
+  ∀G,M,T.Judg G M T → P G M T.
+
+axiom t_par : ∀X,G,T.〈X,T〉 ◃ G → Judg G (par X) T.
+axiom t_app2 : ∀G,M,N,T,U.Judg G M (arr T U) → Judg G N T → Judg G (app M N) U.
+axiom t_Lam : ∀G,X,M,T,U.Judg (〈X,T〉::G) M U → Judg G (Lam X T M) (arr T U).
+
+definition subenv ≝ λG1,G2.∀x.x ◃ G1 → x ◃ G2.
+interpretation "subenv" 'subseteq G1 G2 = (subenv G1 G2).
+
+axiom daemon : ∀P:Prop.P.
+
+theorem weakening : ∀G1,G2,M,T.G1 ⊆ G2 → Judg G1 M T → Judg G2 M T.
+#G1 #G2 #M #T #Hsub #HJ lapply Hsub lapply G2 -G2 change with (∀G2.?)
+@(Judg_ind … HJ)
+[ #X #G #T0 #Hin #G2 #Hsub @t_par @Hsub //
+| #G #M0 #N #T0 #U #HM0 #HN #IH1 #IH2 #G2 #Hsub @t_app2
+  [| @IH1 // | @IH2 // ]
+| #G #T1 #T2 #X #M1 #HM1 #IH #G2 #Hsub @t_Lam @IH 
+  [ (* trivial property of Lam *) @daemon 
+  | (* trivial property of subenv *) @daemon ]
+]
+qed.
+
+(* Serve un tipo Tm per i termini localmente chiusi e i suoi principi di induzione e
+   ricorsione *)
\ No newline at end of file
diff --git a/matita/matita/broken_lib/binding/ln_concrete.ma b/matita/matita/broken_lib/binding/ln_concrete.ma
new file mode 100644 (file)
index 0000000..bdafdb1
--- /dev/null
@@ -0,0 +1,683 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basics/lists/list.ma".
+include "basics/deqsets.ma".
+include "binding/names.ma".
+include "binding/fp.ma".
+
+definition alpha : Nset ≝ X. check alpha
+notation "𝔸" non associative with precedence 90 for @{'alphabet}.
+interpretation "set of names" 'alphabet = alpha.
+
+inductive tp : Type[0] ≝ 
+| top : tp
+| arr : tp → tp → tp.
+inductive pretm : Type[0] ≝ 
+| var : nat → pretm
+| par :  𝔸 → pretm
+| abs : tp → pretm → pretm
+| app : pretm → pretm → pretm.
+
+let rec Nth T n (l:list T) on n ≝ 
+  match l with 
+  [ nil ⇒ None ?
+  | cons hd tl ⇒ match n with
+    [ O ⇒ Some ? hd
+    | S n0 ⇒ Nth T n0 tl ] ].
+
+let rec vclose_tm_aux u x k ≝ match u with
+  [ var n ⇒ if (leb k n) then var (S n) else u
+  | par x0 ⇒ if (x0 == x) then (var k) else u
+  | app v1 v2 ⇒ app (vclose_tm_aux v1 x k) (vclose_tm_aux v2 x k)
+  | abs s v ⇒ abs s (vclose_tm_aux v x (S k)) ].
+definition vclose_tm ≝ λu,x.vclose_tm_aux u x O.  
+
+definition vopen_var ≝ λn,x,k.match eqb n k with
+ [ true ⇒ par x
+ | false ⇒ match leb n k with
+   [ true ⇒ var n
+   | false ⇒ var (pred n) ] ].
+
+let rec vopen_tm_aux u x k ≝ match u with
+  [ var n ⇒ vopen_var n x k
+  | par x0 ⇒ u
+  | app v1 v2 ⇒ app (vopen_tm_aux v1 x k) (vopen_tm_aux v2 x k)
+  | abs s v ⇒ abs s (vopen_tm_aux v x (S k)) ].
+definition vopen_tm ≝ λu,x.vopen_tm_aux u x O.
+
+let rec FV u ≝ match u with 
+  [ par x ⇒ [x]
+  | app v1 v2 ⇒ FV v1@FV v2
+  | abs s v ⇒ FV v
+  | _ ⇒ [ ] ].  
+
+definition lam ≝ λx,s,u.abs s (vclose_tm u x).
+
+let rec Pi_map_tm p u on u ≝ match u with
+[ par x ⇒ par (p x)
+| var _ ⇒ u
+| app v1 v2 ⇒ app (Pi_map_tm p v1) (Pi_map_tm p v2)
+| abs s v ⇒ abs s (Pi_map_tm p v) ].
+
+interpretation "permutation of tm" 'middot p x = (Pi_map_tm p x).
+
+notation "hvbox(u⌈x⌉)"
+  with precedence 45
+  for @{ 'open $u $x }.
+
+(*
+notation "hvbox(u⌈x⌉)"
+  with precedence 45
+  for @{ 'open $u $x }.
+notation "❴ u ❵ x" non associative with precedence 90 for @{ 'open $u $x }.
+*)
+interpretation "ln term variable open" 'open u x = (vopen_tm u x).
+notation < "hvbox(ν x break . u)"
+ with precedence 20
+for @{'nu $x $u }.
+notation > "ν list1 x sep , . term 19 u" with precedence 20
+  for ${ fold right @{$u} rec acc @{'nu $x $acc)} }.
+interpretation "ln term variable close" 'nu x u = (vclose_tm u x).
+
+let rec tm_height u ≝ match u with
+[ app v1 v2 ⇒ S (max (tm_height v1) (tm_height v2))
+| abs s v ⇒ S (tm_height v) 
+| _ ⇒ O ].
+
+theorem le_n_O_rect_Type0 : ∀n:nat. n ≤ O → ∀P: nat →Type[0]. P O → P n.
+#n (cases n) // #a #abs cases (?:False) /2/ qed. 
+
+theorem nat_rect_Type0_1 : ∀n:nat.∀P:nat → Type[0]. 
+(∀m.(∀p. p < m → P p) → P m) → P n.
+#n #P #H 
+cut (∀q:nat. q ≤ n → P q) /2/
+(elim n) 
+ [#q #HleO (* applica male *) 
+    @(le_n_O_rect_Type0 ? HleO)
+    @H #p #ltpO cases (?:False) /2/ (* 3 *)
+ |#p #Hind #q #HleS 
+    @H #a #lta @Hind @le_S_S_to_le /2/
+ ]
+qed.
+
+lemma leb_false_to_lt : ∀n,m. leb n m = false → m < n.
+#n elim n
+[ #m normalize #H destruct(H)
+| #n0 #IH * // #m normalize #H @le_S_S @IH // ]
+qed.
+
+lemma nominal_eta_aux : ∀x,u.x ∉ FV u → ∀k.vclose_tm_aux (vopen_tm_aux u x k) x k = u.
+#x #u elim u
+[ #n #_ #k normalize cases (decidable_eq_nat n k) #Hnk
+  [ >Hnk >eqb_n_n whd in ⊢ (??%?); >(\b ?) //
+  | >(not_eq_to_eqb_false … Hnk) normalize cases (true_or_false (leb n k)) #Hleb
+    [ >Hleb normalize >(?:leb k n = false) //
+      @lt_to_leb_false @not_eq_to_le_to_lt /2/
+    | >Hleb normalize >(?:leb k (pred n) = true) normalize
+      [ cases (leb_false_to_lt … Hleb) //
+      | @le_to_leb_true cases (leb_false_to_lt … Hleb) normalize /2/ ] ] ]
+| #y normalize in ⊢ (%→?→?); #Hy whd in ⊢ (?→??%?); >(\bf ?) // @(not_to_not … Hy) //
+| #s #v #IH normalize #Hv #k >IH // @Hv
+| #v1 #v2 #IH1 #IH2 normalize #Hv1v2 #k 
+  >IH1 [ >IH2 // | @(not_to_not … Hv1v2) @in_list_to_in_list_append_l ]
+  @(not_to_not … Hv1v2) @in_list_to_in_list_append_r ]
+qed.
+
+corollary nominal_eta : ∀x,u.x ∉ FV u → (νx.u⌈x⌉) = u.
+#x #u #Hu @nominal_eta_aux //
+qed.
+
+lemma eq_height_vopen_aux : ∀v,x,k.tm_height (vopen_tm_aux v x k) = tm_height v.
+#v #x elim v
+[ #n #k normalize cases (eqb n k) // cases (leb n k) //
+| #u #k %
+| #s #u #IH #k normalize >IH %
+| #u1 #u2 #IH1 #IH2 #k normalize >IH1 >IH2 % ]
+qed.
+
+corollary eq_height_vopen : ∀v,x.tm_height (v⌈x⌉) = tm_height v.
+#v #x @eq_height_vopen_aux
+qed.
+
+theorem pretm_ind_plus_aux : 
+ ∀P:pretm → Type[0].
+   (∀x:𝔸.P (par x)) → 
+   (∀n:ℕ.P (var n)) → 
+   (∀v1,v2. P v1 → P v2 → P (app v1 v2)) → 
+   ∀C:list 𝔸.
+   (∀x,s,v.x ∉ FV v → x ∉ C → P (v⌈x⌉) → P (lam x s (v⌈x⌉))) →
+ ∀n,u.tm_height u ≤ n → P u.
+#P #Hpar #Hvar #Happ #C #Hlam #n change with ((λn.?) n); @(nat_rect_Type0_1 n ??)
+#m cases m
+[ #_ * /2/
+  [ normalize #s #v #Hfalse cases (?:False) cases (not_le_Sn_O (tm_height v)) /2/
+  | #v1 #v2 whd in ⊢ (?%?→?); #Hfalse cases (?:False) cases (not_le_Sn_O (S (max ??))) /2/ ] ]
+-m #m #IH * /2/
+[ #s #v whd in ⊢ (?%?→?); #Hv
+  lapply (p_fresh … (C@FV v)) letin y ≝ (N_fresh … (C@FV v)) #Hy
+  >(?:abs s v = lam y s (v⌈y⌉))
+  [| whd in ⊢ (???%); >nominal_eta // @(not_to_not … Hy) @in_list_to_in_list_append_r ] 
+  @Hlam
+  [ @(not_to_not … Hy) @in_list_to_in_list_append_r
+  | @(not_to_not … Hy) @in_list_to_in_list_append_l ]
+  @IH [| @Hv | >eq_height_vopen % ]
+| #v1 #v2 whd in ⊢ (?%?→?); #Hv @Happ
+  [ @IH [| @Hv | // ] | @IH [| @Hv | // ] ] ]
+qed.
+
+corollary pretm_ind_plus :
+ ∀P:pretm → Type[0].
+   (∀x:𝔸.P (par x)) → 
+   (∀n:ℕ.P (var n)) → 
+   (∀v1,v2. P v1 → P v2 → P (app v1 v2)) → 
+   ∀C:list 𝔸.
+   (∀x,s,v.x ∉ FV v → x ∉ C → P (v⌈x⌉) → P (lam x s (v⌈x⌉))) →
+ ∀u.P u.
+#P #Hpar #Hvar #Happ #C #Hlam #u @pretm_ind_plus_aux /2/
+qed.
+
+(* maps a permutation to a list of terms *)
+definition Pi_map_list : (𝔸 → 𝔸) → list 𝔸 → list 𝔸 ≝ map 𝔸 𝔸 .
+
+(* interpretation "permutation of name list" 'middot p x = (Pi_map_list p x).*)
+
+(*
+inductive tm : pretm → Prop ≝ 
+| tm_par : ∀x:𝔸.tm (par x)
+| tm_app : ∀u,v.tm u → tm v → tm (app u v)
+| tm_lam : ∀x,s,u.tm u → tm (lam x s u).
+
+inductive ctx_aux : nat → pretm → Prop ≝ 
+| ctx_var : ∀n,k.n < k → ctx_aux k (var n)
+| ctx_par : ∀x,k.ctx_aux k (par x)
+| ctx_app : ∀u,v,k.ctx_aux k u → ctx_aux k v → ctx_aux k (app u v)
+(* è sostituibile da ctx_lam ? *)
+| ctx_abs : ∀s,u.ctx_aux (S k) u → ctx_aux k (abs s u).
+*)
+
+inductive tm_or_ctx (k:nat) : pretm → Type[0] ≝ 
+| toc_var : ∀n.n < k → tm_or_ctx k (var n)
+| toc_par : ∀x.tm_or_ctx k (par x)
+| toc_app : ∀u,v.tm_or_ctx k u → tm_or_ctx k v → tm_or_ctx k (app u v)
+| toc_lam : ∀x,s,u.tm_or_ctx k u → tm_or_ctx k (lam x s u).
+
+definition tm ≝ λt.tm_or_ctx O t.
+definition ctx ≝ λt.tm_or_ctx 1 t.
+
+record TM : Type[0] ≝ {
+  pretm_of_TM :> pretm;
+  tm_of_TM : tm pretm_of_TM
+}.
+
+record CTX : Type[0] ≝ {
+  pretm_of_CTX :> pretm;
+  ctx_of_CTX : ctx pretm_of_CTX
+}.
+
+inductive tm2 : pretm → Type[0] ≝ 
+| tm_par : ∀x.tm2 (par x)
+| tm_app : ∀u,v.tm2 u → tm2 v → tm2 (app u v)
+| tm_lam : ∀x,s,u.x ∉ FV u → (∀y.y ∉ FV u → tm2 (u⌈y⌉)) → tm2 (lam x s (u⌈x⌉)).
+
+(*
+inductive tm' : pretm → Prop ≝ 
+| tm_par : ∀x.tm' (par x)
+| tm_app : ∀u,v.tm' u → tm' v → tm' (app u v)
+| tm_lam : ∀x,s,u,C.x ∉ FV u → x ∉ C → (∀y.y ∉ FV u → tm' (❴u❵y)) → tm' (lam x s (❴u❵x)).
+*)
+
+axiom swap_inj : ∀N.∀z1,z2,x,y.swap N z1 z2 x = swap N z1 z2 y → x = y.
+
+lemma pi_vclose_tm : 
+  ∀z1,z2,x,u.swap 𝔸 z1 z2·(νx.u) = (ν swap ? z1 z2 x.swap 𝔸 z1 z2 · u).
+#z1 #z2 #x #u
+change with (vclose_tm_aux ???) in match (vclose_tm ??);
+change with (vclose_tm_aux ???) in ⊢ (???%); lapply O elim u
+[3:whd in ⊢ (?→?→(?→ ??%%)→?→??%%); //
+|4:whd in ⊢ (?→?→(?→??%%)→(?→??%%)→?→??%%); //
+| #n #k whd in ⊢ (??(??%)%); cases (leb k n) normalize %
+| #x0 #k cases (true_or_false (x0==z1)) #H1 >H1 whd in ⊢ (??%%);
+  [ cases (true_or_false (x0==x)) #H2 >H2 whd in ⊢ (??(??%)%);
+    [ <(\P H2) >H1 whd in ⊢ (??(??%)%); >(\b ?) // >(\b ?) //
+    | >H2 whd in match (swap ????); >H1
+      whd in match (if false then var k else ?);
+      whd in match (if true then z2 else ?); >(\bf ?)
+      [ >(\P H1) >swap_left %
+      | <(swap_inv ? z1 z2 z2) in ⊢ (?(??%?)); % #H3
+        lapply (swap_inj … H3) >swap_right #H4 <H4 in H2; >H1 #H destruct (H) ]
+    ]
+  | >(?:(swap ? z1 z2 x0 == swap ? z1 z2 x) = (x0 == x))
+    [| cases (true_or_false (x0==x)) #H2 >H2
+      [ >(\P H2) @(\b ?) %
+      | @(\bf ?) % #H >(swap_inj … H) in H2; >(\b ?) // #H0 destruct (H0) ] ]
+    cases (true_or_false (x0==x)) #H2 >H2 whd in ⊢ (??(??%)%); 
+    [ <(\P H2) >H1 >(\b (refl ??)) %
+    | >H1 >H2 % ]
+    ]
+  ]
+qed.
+
+lemma pi_vopen_tm : 
+  ∀z1,z2,x,u.swap 𝔸 z1 z2·(u⌈x⌉) = (swap 𝔸 z1 z2 · u⌈swap 𝔸 z1 z2 x⌉).
+#z1 #z2 #x #u
+change with (vopen_tm_aux ???) in match (vopen_tm ??);
+change with (vopen_tm_aux ???) in ⊢ (???%); lapply O elim u //
+[2: #s #v whd in ⊢ ((?→??%%)→?→??%%); //
+|3: #v1 #v2 whd in ⊢ ((?→??%%)→(?→??%%)→?→??%%); /2/ ]
+#n #k whd in ⊢ (??(??%)%); cases (true_or_false (eqb n k)) #H1 >H1 //
+cases (true_or_false (leb n k)) #H2 >H2 normalize //
+qed.
+
+lemma pi_lam : 
+  ∀z1,z2,x,s,u.swap 𝔸 z1 z2 · lam x s u = lam (swap 𝔸 z1 z2 x) s (swap 𝔸 z1 z2 · u).
+#z1 #z2 #x #s #u whd in ⊢ (???%); <(pi_vclose_tm …) %
+qed.
+
+lemma eqv_FV : ∀z1,z2,u.FV (swap 𝔸 z1 z2 · u) = Pi_map_list (swap 𝔸 z1 z2) (FV u).
+#z1 #z2 #u elim u //
+[ #s #v #H @H
+| #v1 #v2 whd in ⊢ (??%%→??%%→??%%); #H1 #H2 >H1 >H2
+  whd in ⊢ (???(????%)); /2/ ]
+qed.
+
+lemma swap_inv_tm : ∀z1,z2,u.swap 𝔸 z1 z2 · (swap 𝔸 z1 z2 · u) = u.
+#z1 #z2 #u elim u 
+[1: #n %
+|3: #s #v whd in ⊢ (?→??%%); //
+|4: #v1 #v2 #Hv1 #Hv2 whd in ⊢ (??%%); // ]
+#x whd in ⊢ (??%?); >swap_inv %
+qed.
+
+lemma eqv_in_list : ∀x,l,z1,z2.x ∈ l → swap 𝔸 z1 z2 x ∈ Pi_map_list (swap 𝔸 z1 z2) l.
+#x #l #z1 #z2 #Hin elim Hin
+[ #x0 #l0 %
+| #x1 #x2 #l0 #Hin #IH %2 @IH ]
+qed.
+
+lemma eqv_tm2 : ∀u.tm2 u → ∀z1,z2.tm2 ((swap ? z1 z2)·u).
+#u #Hu #z1 #z2 letin p ≝ (swap ? z1 z2) elim Hu /2/
+#x #s #v #Hx #Hv #IH >pi_lam >pi_vopen_tm %3
+[ @(not_to_not … Hx) -Hx #Hx
+  <(swap_inv ? z1 z2 x) <(swap_inv_tm z1 z2 v) >eqv_FV @eqv_in_list //
+| #y #Hy <(swap_inv ? z1 z2 y)
+  <pi_vopen_tm @IH @(not_to_not … Hy) -Hy #Hy <(swap_inv ? z1 z2 y)
+  >eqv_FV @eqv_in_list //
+]
+qed.
+
+lemma vclose_vopen_aux : ∀x,u,k.vopen_tm_aux (vclose_tm_aux u x k) x k = u.
+#x #u elim u [1,3,4:normalize //]
+[ #n #k cases (true_or_false (leb k n)) #H >H whd in ⊢ (??%?);
+  [ cases (true_or_false (eqb (S n) k)) #H1 >H1
+    [ <(eqb_true_to_eq … H1) in H; #H lapply (leb_true_to_le … H) -H #H
+      cases (le_to_not_lt … H) -H #H cases (H ?) %
+    | whd in ⊢ (??%?); >lt_to_leb_false // @le_S_S /2/ ]
+  | cases (true_or_false (eqb n k)) #H1 >H1 normalize
+    [ >(eqb_true_to_eq … H1) in H; #H lapply (leb_false_to_not_le … H) -H
+      * #H cases (H ?) %
+    | >le_to_leb_true // @not_lt_to_le % #H2 >le_to_leb_true in H;
+      [ #H destruct (H) | /2/ ]
+    ]
+  ]
+| #x0 #k whd in ⊢ (??(?%??)?); cases (true_or_false (x0==x)) 
+  #H1 >H1 normalize // >(\P H1) >eqb_n_n % ]
+qed.      
+
+lemma vclose_vopen : ∀x,u.((νx.u)⌈x⌉) = u. #x #u @vclose_vopen_aux
+qed.
+
+(*
+theorem tm_to_tm : ∀t.tm' t → tm t.
+#t #H elim H
+*)
+
+lemma in_list_singleton : ∀T.∀t1,t2:T.t1 ∈ [t2] → t1 = t2.
+#T #t1 #t2 #H @(in_list_inv_ind ??? H) /2/
+qed.
+
+lemma fresh_vclose_tm_aux : ∀u,x,k.x ∉ FV (vclose_tm_aux u x k).
+#u #x elim u //
+[ #n #k normalize cases (leb k n) normalize //
+| #x0 #k whd in ⊢ (?(???(?%))); cases (true_or_false (x0==x)) #H >H normalize //
+  lapply (\Pf H) @not_to_not #Hin >(in_list_singleton ??? Hin) %
+| #v1 #v2 #IH1 #IH2 #k normalize % #Hin cases (in_list_append_to_or_in_list ???? Hin) -Hin #Hin
+  [ cases (IH1 k) -IH1 #IH1 @IH1 @Hin | cases (IH2 k) -IH2 #IH2 @IH2 @Hin ]
+qed.
+
+lemma fresh_vclose_tm : ∀u,x.x ∉ FV (νx.u). //
+qed.
+
+lemma fresh_swap_tm : ∀z1,z2,u.z1 ∉ FV u → z2 ∉ FV u → swap 𝔸 z1 z2 · u = u.
+#z1 #z2 #u elim u
+[2: normalize in ⊢ (?→%→%→?); #x #Hz1 #Hz2 whd in ⊢ (??%?); >swap_other //
+  [ @(not_to_not … Hz2) | @(not_to_not … Hz1) ] //
+|1: //
+| #s #v #IH normalize #Hz1 #Hz2 >IH // [@Hz2|@Hz1]
+| #v1 #v2 #IH1 #IH2 normalize #Hz1 #Hz2
+  >IH1 [| @(not_to_not … Hz2) @in_list_to_in_list_append_l | @(not_to_not … Hz1) @in_list_to_in_list_append_l ]
+  >IH2 // [@(not_to_not … Hz2) @in_list_to_in_list_append_r | @(not_to_not … Hz1) @in_list_to_in_list_append_r ]
+]
+qed.
+
+theorem tm_to_tm2 : ∀u.tm u → tm2 u.
+#t #Ht elim Ht
+[ #n #Hn cases (not_le_Sn_O n) #Hfalse cases (Hfalse Hn)
+| @tm_par
+| #u #v #Hu #Hv @tm_app
+| #x #s #u #Hu #IHu <(vclose_vopen x u) @tm_lam
+  [ @fresh_vclose_tm
+  | #y #Hy <(fresh_swap_tm x y (νx.u)) /2/ @fresh_vclose_tm ]
+]
+qed.
+
+theorem tm2_to_tm : ∀u.tm2 u → tm u.
+#u #pu elim pu /2/ #x #s #v #Hx #Hv #IH %4 @IH //
+qed.
+
+definition PAR ≝ λx.mk_TM (par x) ?. // qed.
+definition APP ≝ λu,v:TM.mk_TM (app u v) ?./2/ qed.
+definition LAM ≝ λx,s.λu:TM.mk_TM (lam x s u) ?./2/ qed.
+
+axiom vopen_tm_down : ∀u,x,k.tm_or_ctx (S k) u → tm_or_ctx k (u⌈x⌉).
+(* needs true_plus_false
+
+#u #x #k #Hu elim Hu
+[ #n #Hn normalize cases (true_or_false (eqb n O)) #H >H [%2]
+  normalize >(?: leb n O = false) [|cases n in H; // >eqb_n_n #H destruct (H) ]
+  normalize lapply Hn cases n in H; normalize [ #Hfalse destruct (Hfalse) ]
+  #n0 #_ #Hn0 % @le_S_S_to_le //
+| #x0 %2
+| #v1 #v2 #Hv1 #Hv2 #IH1 #IH2 %3 //
+| #x0 #s #v #Hv #IH normalize @daemon
+]
+qed.
+*)
+
+definition vopen_TM ≝ λu:CTX.λx.mk_TM (u⌈x⌉) (vopen_tm_down …). @ctx_of_CTX qed.
+
+axiom vclose_tm_up : ∀u,x,k.tm_or_ctx k u → tm_or_ctx (S k) (νx.u).
+
+definition vclose_TM ≝ λu:TM.λx.mk_CTX (νx.u) (vclose_tm_up …). @tm_of_TM qed.
+
+interpretation "ln wf term variable open" 'open u x = (vopen_TM u x).
+interpretation "ln wf term variable close" 'nu x u = (vclose_TM u x).
+
+theorem tm_alpha : ∀x,y,s,u.x ∉ FV u → y ∉ FV u → lam x s (u⌈x⌉) = lam y s (u⌈y⌉).
+#x #y #s #u #Hx #Hy whd in ⊢ (??%%); @eq_f >nominal_eta // >nominal_eta //
+qed.
+
+theorem TM_ind_plus : 
+(* non si può dare il principio in modo dipendente (almeno utilizzando tm2)
+   la "prova" purtroppo è in Type e non si può garantire che sia esattamente
+   quella che ci aspetteremmo
+ *)
+ ∀P:pretm → Type[0].
+   (∀x:𝔸.P (PAR x)) → 
+   (∀v1,v2:TM.P v1 → P v2 → P (APP v1 v2)) → 
+   ∀C:list 𝔸.
+   (∀x,s.∀v:CTX.x ∉ FV v → x ∉ C → 
+     (∀y.y ∉ FV v → P (v⌈y⌉)) → P (LAM x s (v⌈x⌉))) →
+ ∀u:TM.P u.
+#P #Hpar #Happ #C #Hlam * #u #pu elim (tm_to_tm2 u pu) //
+[ #v1 #v2 #pv1 #pv2 #IH1 #IH2 @(Happ (mk_TM …) (mk_TM …)) /2/
+| #x #s #v #Hx #pv #IH
+  lapply (p_fresh … (C@FV v)) letin x0 ≝ (N_fresh … (C@FV v)) #Hx0
+  >(?:lam x s (v⌈x⌉) = lam x0 s (v⌈x0⌉))
+  [|@tm_alpha // @(not_to_not … Hx0) @in_list_to_in_list_append_r ]
+  @(Hlam x0 s (mk_CTX v ?) ??)
+  [ <(nominal_eta … Hx) @vclose_tm_up @tm2_to_tm @pv //
+  | @(not_to_not … Hx0) @in_list_to_in_list_append_r
+  | @(not_to_not … Hx0) @in_list_to_in_list_append_l
+  | @IH ]
+]
+qed.
+
+notation 
+"hvbox('nominal' u 'return' out 'with' 
+       [ 'xpar' ident x ⇒ f1 
+       | 'xapp' ident v1 ident v2 ident recv1 ident recv2 ⇒ f2 
+       | 'xlam' ❨ident y # C❩ ident s ident w ident py1 ident py2 ident recw ⇒ f3 ])"
+with precedence 48 
+for @{ TM_ind_plus $out (λ${ident x}:?.$f1)
+       (λ${ident v1}:?.λ${ident v2}:?.λ${ident recv1}:?.λ${ident recv2}:?.$f2)
+       $C (λ${ident y}:?.λ${ident s}:?.λ${ident w}:?.λ${ident py1}:?.λ${ident py2}:?.λ${ident recw}:?.$f3)
+       $u }.
+       
+(* include "basics/jmeq.ma".*)
+
+definition subst ≝ (λu:TM.λx,v.
+  nominal u return (λ_.TM) with 
+  [ xpar x0 ⇒ match x == x0 with [ true ⇒ v | false ⇒ u ]
+  | xapp v1 v2 recv1 recv2 ⇒ APP recv1 recv2
+  | xlam ❨y # x::FV v❩ s w py1 py2 recw ⇒ LAM y s (recw y py1) ]).
+
+lemma fasfd : ∀s,v. pretm_of_TM (subst (LAM O s (PAR 1)) O v) = pretm_of_TM (LAM O s (PAR 1)).
+#s #v normalize in ⊢ (??%?);
+
+
+theorem tm2_ind_plus : 
+(* non si può dare il principio in modo dipendente (almeno utilizzando tm2) *)
+ ∀P:pretm → Type[0].
+   (∀x:𝔸.P (par x)) → 
+   (∀v1,v2.tm2 v1 → tm2 v2 → P v1 → P v2 → P (app v1 v2)) → 
+   ∀C:list 𝔸.
+   (∀x,s,v.x ∉ FV v → x ∉ C → (∀y.y ∉ FV v → tm2 (v⌈y⌉)) → 
+     (∀y.y ∉ FV v → P (v⌈y⌉)) → P (lam x s (v⌈x⌉))) →
+ ∀u.tm2 u → P u.
+#P #Hpar #Happ #C #Hlam #u #pu elim pu /2/
+#x #s #v #px #pv #IH 
+lapply (p_fresh … (C@FV v)) letin y ≝ (N_fresh … (C@FV v)) #Hy
+>(?:lam x s (v⌈x⌉) = lam y s (v⌈y⌉)) [| @tm_alpha // @(not_to_not … Hy) @in_list_to_in_list_append_r ]
+@Hlam /2/ lapply Hy -Hy @not_to_not #Hy
+[ @in_list_to_in_list_append_r @Hy | @in_list_to_in_list_append_l @Hy ]
+qed.
+
+definition check_tm ≝ 
+  λu.pretm_ind_plus ? (λ_.true) (λ_.false) 
+    (λv1,v2,r1,r2.r1 ∧ r2) [ ] (λx,s,v,pv1,pv2,rv.rv) u.
+
+(*
+lemma check_tm_complete : ∀u.tm u → check_tm u = true.
+#u #pu @(tm2_ind_plus … [ ] … (tm_to_tm2 ? pu)) //
+[ #v1 #v2 #pv1 #pv2 #IH1 #IH2
+| #x #s #v #Hx1 #Hx2 #Hv #IH
+*)
+
+notation 
+"hvbox('nominal' u 'return' out 'with' 
+       [ 'xpar' ident x ⇒ f1 
+       | 'xapp' ident v1 ident v2 ident pv1 ident pv2 ident recv1 ident recv2 ⇒ f2 
+       | 'xlam' ❨ident y # C❩ ident s ident w ident py1 ident py2 ident pw ident recw ⇒ f3 ])"
+with precedence 48 
+for @{ tm2_ind_plus $out (λ${ident x}:?.$f1)
+       (λ${ident v1}:?.λ${ident v2}:?.λ${ident pv1}:?.λ${ident pv2}:?.λ${ident recv1}:?.λ${ident recv2}:?.$f2)
+       $C (λ${ident y}:?.λ${ident s}:?.λ${ident w}:?.λ${ident py1}:?.λ${ident py2}:?.λ${ident pw}:?.λ${ident recw}:?.$f3)
+       ? (tm_to_tm2 ? $u) }.
+(* notation 
+"hvbox('nominal' u 'with' 
+       [ 'xlam' ident x # C ident s ident w ⇒ f3 ])"
+with precedence 48 
+for @{ tm2_ind_plus ???
+ $C (λ${ident x}:?.λ${ident s}:?.λ${ident w}:?.λ${ident py1}:?.λ${ident py2}:?.
+     λ${ident pw}:?.λ${ident recw}:?.$f3) $u (tm_to_tm2 ??) }.
+*)
+
+
+definition subst ≝ (λu.λpu:tm u.λx,v.
+  nominal pu return (λ_.pretm) with 
+  [ xpar x0 ⇒ match x == x0 with [ true ⇒ v | false ⇒ u ]
+  | xapp v1 v2 pv1 pv2 recv1 recv2 ⇒ app recv1 recv2
+  | xlam ❨y # x::FV v❩ s w py1 py2 pw recw ⇒ lam y s (recw y py1) ]).
+  
+lemma fasfd : ∀x,s,u,p1,v. subst (lam x s u) p1 x v = lam x s u.
+#x #s #u #p1 #v
+
+
+definition subst ≝ λu.λpu:tm u.λx,y.
+  tm2_ind_plus ?
+  (* par x0 *)              (λx0.match x == x0 with [ true ⇒ v | false ⇒ u ])
+  (* app v1 v2 *)           (λv1,v2,pv1,pv2,recv1,recv2.app recv1 recv2)
+  (* lam y#(x::FV v) s w *) (x::FV v) (λy,s,w,py1,py2,pw,recw.lam y s (recw y py1)) 
+  u (tm_to_tm2 … pu).
+check subst
+definition subst ≝ λu.λpu:tm u.λx,v.
+  nominal u with 
+  [ xlam y # (x::FV v) s w ^ ? ].
+
+(*
+notation > "Λ ident x. ident T [ident x] ↦ P"
+  with precedence 48 for @{'foo (λ${ident x}.λ${ident T}.$P)}.
+
+notation < "Λ ident x. ident T [ident x] ↦ P"
+  with precedence 48 for @{'foo (λ${ident x}:$Q.λ${ident T}:$R.$P)}.
+*)
+
+(*
+notation 
+"hvbox('nominal' u 'with' 
+       [ 'xpar' ident x ⇒ f1 
+       | 'xapp' ident v1 ident v2  ⇒ f2
+       | 'xlam' ident x # C s w ⇒ f3 ])"
+with precedence 48 
+for @{ tm2_ind_plus ? (λ${ident x}:$Tx.$f1) 
+ (λ${ident v1}:$Tv1.λ${ident v2}:$Tv2.λ${ident pv1}:$Tpv1.λ${ident pv2}:$Tpv2.λ${ident recv1}:$Trv1.λ${ident recv2}:$Trv2.$f2)
+ $C (λ${ident x}:$Tx.λ${ident s}:$Ts.λ${ident w}:$Tw.λ${ident py1}:$Tpy1.λ${ident py2}:$Tpy2.λ${ident pw}:$Tpw.λ${ident recw}:$Trw.$f3) $u (tm_to_tm2 ??) }.
+*)
+
+(*
+notation 
+"hvbox('nominal' u 'with' 
+       [ 'xpar' ident x ^ f1 
+       | 'xapp' ident v1 ident v2 ^ f2 ])"
+(*       | 'xlam' ident x # C s w ^ f3 ]) *)
+with precedence 48 
+for @{ tm2_ind_plus ? (λ${ident x}:$Tx.$f1) 
+ (λ${ident v1}:$Tv1.λ${ident v2}:$Tv2.λ${ident pv1}:$Tpv1.λ${ident pv2}:$Tpv2.λ${ident recv1}:$Trv1.λ${ident recv2}:$Trv2.$f2)
+ $C (λ${ident x}:$Tx.λ${ident s}:$Ts.λ${ident w}:$Tw.λ${ident py1}:$Tpy1.λ${ident py2}:$Tpy2.λ${ident pw}:$Tpw.λ${ident recw}:$Trw.$f3) $u (tm_to_tm2 ??) }.
+*)
+notation 
+"hvbox('nominal' u 'with' 
+       [ 'xpar' ident x ^ f1 
+       | 'xapp' ident v1 ident v2 ^ f2 ])"
+with precedence 48 
+for @{ tm2_ind_plus ? (λ${ident x}:?.$f1) 
+ (λ${ident v1}:$Tv1.λ${ident v2}:$Tv2.λ${ident pv1}:$Tpv1.λ${ident pv2}:$Tpv2.λ${ident recv1}:$Trv1.λ${ident recv2}:$Trv2.$f2)
+ $C (λ${ident x}:?.λ${ident s}:$Ts.λ${ident w}:$Tw.λ${ident py1}:$Tpy1.λ${ident py2}:$Tpy2.λ${ident pw}:$Tpw.λ${ident recw}:$Trw.$f3) $u (tm_to_tm2 ??) }.
+
+
+definition subst ≝ λu.λpu:tm u.λx,v.
+  nominal u with 
+  [ xpar x0 ^ match x == x0 with [ true ⇒ v | false ⇒ u ]
+  | xapp v1 v2 ^ ? ].
+  | xlam y # (x::FV v) s w ^ ? ].
+  
+  
+  (* par x0 *)              (λx0.match x == x0 with [ true ⇒ v | false ⇒ u ])
+  (* app v1 v2 *)           (λv1,v2,pv1,pv2,recv1,recv2.app recv1 recv2)
+  (* lam y#(x::FV v) s w *) (x::FV v) (λy,s,w,py1,py2,pw,recw.lam y s (recw y py1)) 
+  u (tm_to_tm2 … pu).
+*)
+definition subst ≝ λu.λpu:tm u.λx,v.
+  tm2_ind_plus ?
+  (* par x0 *)              (λx0.match x == x0 with [ true ⇒ v | false ⇒ u ])
+  (* app v1 v2 *)           (λv1,v2,pv1,pv2,recv1,recv2.app recv1 recv2)
+  (* lam y#(x::FV v) s w *) (x::FV v) (λy,s,w,py1,py2,pw,recw.lam y s (recw y py1)) 
+  u (tm_to_tm2 … pu).
+
+check subst
+
+axiom in_Env : 𝔸 × tp → Env → Prop.
+notation "X ◃ G" non associative with precedence 45 for @{'lefttriangle $X $G}.
+interpretation "Env membership" 'lefttriangle x l = (in_Env x l).
+
+
+
+inductive judg : list tp → tm → tp → Prop ≝ 
+| t_var : ∀g,n,t.Nth ? n g = Some ? t → judg g (var n) t
+| t_app : ∀g,m,n,t,u.judg g m (arr t u) → judg g n t → judg g (app m n) u
+| t_abs : ∀g,t,m,u.judg (t::g) m u → judg g (abs t m) (arr t u).
+
+definition Env := list (𝔸 × tp).
+
+axiom vclose_env : Env → list tp.
+axiom vclose_tm : Env → tm → tm.
+axiom Lam : 𝔸 → tp → tm → tm.
+definition Judg ≝ λG,M,T.judg (vclose_env G) (vclose_tm G M) T.
+definition dom ≝ λG:Env.map ?? (fst ??) G.
+
+definition sctx ≝ 𝔸 × tm.
+axiom swap_tm : 𝔸 → 𝔸 → tm → tm.
+definition sctx_app : sctx → 𝔸 → tm ≝ λM0,Y.let 〈X,M〉 ≝ M0 in swap_tm X Y M.
+
+axiom in_list : ∀A:Type[0].A → list A → Prop.
+interpretation "list membership" 'mem x l = (in_list ? x l).
+interpretation "list non-membership" 'notmem x l = (Not (in_list ? x l)).
+
+axiom in_Env : 𝔸 × tp → Env → Prop.
+notation "X ◃ G" non associative with precedence 45 for @{'lefttriangle $X $G}.
+interpretation "Env membership" 'lefttriangle x l = (in_Env x l).
+
+let rec FV M ≝ match M with 
+  [ par X ⇒ [X]
+  | app M1 M2 ⇒ FV M1@FV M2
+  | abs T M0 ⇒ FV M0
+  | _ ⇒ [ ] ].
+
+(* axiom Lookup : 𝔸 → Env → option tp. *)
+
+(* forma alto livello del judgment
+   t_abs* : ∀G,T,X,M,U.
+            (∀Y ∉ supp(M).Judg (〈Y,T〉::G) (M[Y]) U) → 
+            Judg G (Lam X T (M[X])) (arr T U) *)
+
+(* prima dimostrare, poi perfezionare gli assiomi, poi dimostrarli *)
+
+axiom Judg_ind : ∀P:Env → tm → tp → Prop.
+  (∀X,G,T.〈X,T〉 ◃ G → P G (par X) T) → 
+  (∀G,M,N,T,U.
+    Judg G M (arr T U) → Judg G N T → 
+    P G M (arr T U) → P G N T → P G (app M N) U) → 
+  (∀G,T1,T2,X,M1.
+    (∀Y.Y ∉ (FV (Lam X T1 (sctx_app M1 X))) → Judg (〈Y,T1〉::G) (sctx_app M1 Y) T2) →
+    (∀Y.Y ∉ (FV (Lam X T1 (sctx_app M1 X))) → P (〈Y,T1〉::G) (sctx_app M1 Y) T2) → 
+    P G (Lam X T1 (sctx_app M1 X)) (arr T1 T2)) → 
+  ∀G,M,T.Judg G M T → P G M T.
+
+axiom t_par : ∀X,G,T.〈X,T〉 ◃ G → Judg G (par X) T.
+axiom t_app2 : ∀G,M,N,T,U.Judg G M (arr T U) → Judg G N T → Judg G (app M N) U.
+axiom t_Lam : ∀G,X,M,T,U.Judg (〈X,T〉::G) M U → Judg G (Lam X T M) (arr T U).
+
+definition subenv ≝ λG1,G2.∀x.x ◃ G1 → x ◃ G2.
+interpretation "subenv" 'subseteq G1 G2 = (subenv G1 G2).
+
+axiom daemon : ∀P:Prop.P.
+
+theorem weakening : ∀G1,G2,M,T.G1 ⊆ G2 → Judg G1 M T → Judg G2 M T.
+#G1 #G2 #M #T #Hsub #HJ lapply Hsub lapply G2 -G2 change with (∀G2.?)
+@(Judg_ind … HJ)
+[ #X #G #T0 #Hin #G2 #Hsub @t_par @Hsub //
+| #G #M0 #N #T0 #U #HM0 #HN #IH1 #IH2 #G2 #Hsub @t_app2
+  [| @IH1 // | @IH2 // ]
+| #G #T1 #T2 #X #M1 #HM1 #IH #G2 #Hsub @t_Lam @IH 
+  [ (* trivial property of Lam *) @daemon 
+  | (* trivial property of subenv *) @daemon ]
+]
+qed.
+
+(* Serve un tipo Tm per i termini localmente chiusi e i suoi principi di induzione e
+   ricorsione *)
\ No newline at end of file
diff --git a/matita/matita/broken_lib/binding/names.ma b/matita/matita/broken_lib/binding/names.ma
new file mode 100644 (file)
index 0000000..bc5f07d
--- /dev/null
@@ -0,0 +1,78 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basics/logic.ma".
+include "basics/lists/in.ma".
+include "basics/types.ma".
+
+(*interpretation "list membership" 'mem x l = (in_list ? x l).*)
+
+record Nset : Type[1] ≝
+{
+  (* carrier is specified as a coercion: when an object X of type Nset is
+     given, but something of type Type is expected, Matita will insert a
+     hidden coercion: the user sees "X", but really means "carrier X"     *)
+  carrier :> DeqSet;
+  N_fresh : list carrier → carrier;
+  p_fresh : ∀l.N_fresh l ∉ l
+}.
+
+definition maxlist ≝
+ λl.foldr ?? (λx,acc.max x acc) 0 l.
+
+definition natfresh ≝ λl.S (maxlist l).
+
+lemma le_max_1 : ∀x,y.x ≤ max x y. /2/
+qed.
+
+lemma le_max_2 : ∀x,y.y ≤ max x y. /2/
+qed.
+
+lemma le_maxlist : ∀l,x.x ∈ l → x ≤ maxlist l.
+#l elim l
+[#x #Hx @False_ind cases (not_in_list_nil ? x) #H1 /2/
+|#y #tl #IH #x #H1 change with (max ??) in ⊢ (??%);
+ cases (in_list_cons_case ???? H1);#H2;
+ [ >H2 @le_max_1
+ | whd in ⊢ (??%); lapply (refl ? (leb y (maxlist tl)));
+   cases (leb y (maxlist tl)) in ⊢ (???% → %);#H3
+   [ @IH //
+   | lapply (IH ? H2) #H4
+     lapply (leb_false_to_not_le … H3) #H5
+     lapply (not_le_to_lt … H5) #H6
+     @(transitive_le … H4)
+     @(transitive_le … H6) %2 %
+   ]
+ ]
+]
+qed.
+
+(* prove freshness for nat *)
+lemma lt_l_natfresh_l : ∀l,x.x ∈ l → x < natfresh l.
+#l #x #H1 @le_S_S /2/
+qed.
+
+(*naxiom p_Xfresh : ∀l.∀x:Xcarr.x ∈ l → x ≠ ntm (Xfresh l) ∧ x ≠ ntp (Xfresh l).*)
+lemma p_natfresh : ∀l.natfresh l ∉ l.
+#l % #H1 lapply (lt_l_natfresh_l … H1) #H2
+cases (lt_to_not_eq … H2) #H3 @H3 %
+qed.
+
+include "basics/finset.ma".
+
+definition X : Nset ≝ mk_Nset DeqNat ….
+[ @natfresh
+| @p_natfresh
+]
+qed.
\ No newline at end of file
diff --git a/matita/matita/broken_lib/turing/multi_to_mono/multi_to_mono.ma b/matita/matita/broken_lib/turing/multi_to_mono/multi_to_mono.ma
new file mode 100644 (file)
index 0000000..0e9bce5
--- /dev/null
@@ -0,0 +1,397 @@
+include "turing/auxiliary_machines1.ma".
+include "turing/multi_to_mono/shift_trace_machines.ma".
+
+(******************************************************************************)
+(* mtiL: complete move L for tape i. We reaching the left border of trace i,  *)
+(* add a blank if there is no more tape, then move the i-trace and finally    *)
+(* come back to the head position.                                            *)
+(******************************************************************************)
+
+(* we say that a tape is regular if for any trace after the first blank we
+  only have other blanks *)
+  
+definition all_blanks_in ≝ λsig,l.
+  ∀x. mem ? x l → x = blank sig.  
+definition regular_i  ≝ λsig,n.λl:list (multi_sig sig n).λi.
+  all_blanks_in ? (after_blank ? (trace sig n i l)).
+
+definition regular_trace ≝ λsig,n,a.λls,rs:list (multi_sig sig n).λi.
+  Or (And (regular_i sig n (a::ls) i) (regular_i sig n rs i))
+     (And (regular_i sig n ls i) (regular_i sig n (a::rs) i)).
+         
+axiom regular_tail: ∀sig,n,l,i.
+  regular_i sig n l i → regular_i sig n (tail ? l) i.
+  
+axiom regular_extend: ∀sig,n,l,i.
+   regular_i sig n l i → regular_i sig n (l@[all_blank sig n]) i.
+
+axiom all_blank_after_blank: ∀sig,n,l1,b,l2,i. 
+  nth i ? (vec … b) (blank ?) = blank ? → 
+  regular_i sig n (l1@b::l2) i → all_blanks_in ? (trace sig n i l2).
+   
+lemma regular_trace_extl:  ∀sig,n,a,ls,rs,i.
+  regular_trace sig n a ls rs i → 
+    regular_trace sig n a (ls@[all_blank sig n]) rs i.
+#sig #n #a #ls #rs #i *
+  [* #H1 #H2 % % // @(regular_extend … H1)
+  |* #H1 #H2 %2 % // @(regular_extend … H1)
+  ]
+qed.
+
+lemma regular_cons_hd_rs: ∀sig,n.∀a:multi_sig sig n.∀ls,rs1,rs2,i.
+  regular_trace sig n a ls (rs1@rs2) i → 
+    regular_trace sig n a ls (rs1@((hd ? rs2 (all_blank …))::(tail ? rs2))) i.
+#sig #n #a #ls #rs1 #rs2 #i cases rs2 [2: #b #tl #H @H] 
+*[* #H1 >append_nil #H2 %1 % 
+   [@H1 | whd in match (hd ???); @(regular_extend … rs1) //]
+ |* #H1 >append_nil #H2 %2 % 
+   [@H1 | whd in match (hd ???); @(regular_extend … (a::rs1)) //]
+ ]
+qed.
+
+lemma eq_trace_to_regular : ∀sig,n.∀a1,a2:multi_sig sig n.∀ls1,ls2,rs1,rs2,i.
+   nth i ? (vec … a1) (blank ?) = nth i ? (vec … a2) (blank ?) →
+   trace sig n i ls1 = trace sig n i ls2 → 
+   trace sig n i rs1 = trace sig n i rs2 →
+   regular_trace sig n a1 ls1 rs1 i → 
+     regular_trace sig n a2 ls2 rs2 i.
+#sig #n #a1 #a2 #ls1 #ls2 #rs1 #rs2 #i #H1 #H2 #H3 #H4
+whd in match (regular_trace ??????); whd in match (regular_i ????);
+whd in match (regular_i ?? rs2 ?); whd in match (regular_i ?? ls2 ?);
+whd in match (regular_i ?? (a2::rs2) ?); whd in match (trace ????);
+<trace_def whd in match (trace ??? (a2::rs2)); <trace_def 
+<H1 <H2 <H3 @H4
+qed.
+
+(******************************* move_to_blank_L ******************************)
+(* we compose machines together to reduce the number of output cases, and 
+   improve semantics *)
+   
+definition move_to_blank_L ≝ λsig,n,i.
+  (move_until ? L (no_blank sig n i)) · extend ? (all_blank sig n).
+
+(*
+definition R_move_to_blank_L ≝ λsig,n,i,t1,t2.
+(current ? t1 = None ? → 
+  t2 = midtape (multi_sig sig n) (left ? t1) (all_blank …) (right ? t1)) ∧
+∀ls,a,rs.t1 = midtape ? ls a rs → 
+  ((no_blank sig n i a = false) ∧ t2 = t1) ∨
+  (∃b,ls1,ls2.
+    (no_blank sig n i b = false) ∧ 
+    (∀j.j ≤n → to_blank_i ?? j (ls1@b::ls2) = to_blank_i ?? j ls) ∧
+    t2 = midtape ? ls2 b ((reverse ? (a::ls1))@rs)). 
+*)
+
+definition R_move_to_blank_L ≝ λsig,n,i,t1,t2.
+(current ? t1 = None ? → 
+  t2 = midtape (multi_sig sig n) (left ? t1) (all_blank …) (right ? t1)) ∧
+∀ls,a,rs.
+  t1 = midtape (multi_sig sig n) ls a rs → 
+  regular_i sig n (a::ls) i →
+  (∀j. j ≠ i → regular_trace … a ls rs j) →
+  (∃b,ls1,ls2.
+    (regular_i sig n (ls1@b::ls2) i) ∧ 
+    (∀j. j ≠ i → regular_trace … 
+      (hd ? (ls1@b::ls2) (all_blank …)) (tail ? (ls1@b::ls2)) rs j) ∧ 
+    (no_blank sig n i b = false) ∧ 
+    (hd (multi_sig sig n) (ls1@[b]) (all_blank …) = a) ∧ (* not implied by the next fact *)
+    (∀j.j ≤n → to_blank_i ?? j (ls1@b::ls2) = to_blank_i ?? j (a::ls)) ∧
+    t2 = midtape ? ls2 b ((reverse ? ls1)@rs)).
+
+theorem sem_move_to_blank_L: ∀sig,n,i. 
+  move_to_blank_L sig n i  ⊨ R_move_to_blank_L sig n i.
+#sig #n #i 
+@(sem_seq_app ?????? 
+  (ssem_move_until_L ? (no_blank sig n i)) (sem_extend ? (all_blank sig n)))
+#tin #tout * #t1 * * #Ht1a #Ht1b * #Ht2a #Ht2b %
+  [#Hcur >(Ht1a Hcur) in Ht2a; /2 by /
+  |#ls #a #rs #Htin #Hreg #Hreg2 -Ht1a cases (Ht1b … Htin)
+    [* #Hnb #Ht1 -Ht1b -Ht2a >Ht1 in Ht2b; >Htin #H 
+     %{a} %{[ ]} %{ls} 
+     %[%[%[%[%[@Hreg|@Hreg2]|@Hnb]|//]|//]|@H normalize % #H1 destruct (H1)]
+    |* 
+    [(* we find the blank *)
+     * #ls1 * #b * #ls2 * * * #H1 #H2 #H3 #Ht1
+     >Ht1 in Ht2b; #Hout -Ht1b
+     %{b} %{(a::ls1)} %{ls2} 
+     %[%[%[%[%[>H1 in Hreg; #H @H 
+              |#j #jneqi whd in match (hd ???); whd in match (tail ??);
+               <H1 @(Hreg2 j jneqi)]|@H2] |//]|>H1 //]
+      |@Hout normalize % normalize #H destruct (H)
+      ]
+    |* #b * #lss * * #H1 #H2 #Ht1 -Ht1b >Ht1 in Ht2a; 
+     whd in match (left ??); whd in match (right ??); #Hout
+     %{(all_blank …)} %{(lss@[b])} %{[]}
+     %[%[%[%[%[<H2 @regular_extend // 
+              |<H2 #j #jneqi whd in match (hd ???); whd in match (tail ??); 
+               @regular_trace_extl @Hreg2 //]
+            |whd in match (no_blank ????); >blank_all_blank //]
+          |<H2 //]
+        |#j #lejn <H2 @sym_eq @to_blank_i_ext]
+      |>reverse_append >reverse_single @Hout normalize // 
+      ]
+    ]
+  ]
+qed.
+
+(******************************************************************************)
+   
+definition shift_i_L ≝ λsig,n,i.
+   ncombf_r (multi_sig …) (shift_i sig n i) (all_blank sig n) ·
+   mti sig n i · 
+   extend ? (all_blank sig n).
+   
+definition R_shift_i_L ≝ λsig,n,i,t1,t2.
+    (∀a,ls,rs. 
+      t1 = midtape ? ls a rs  → 
+      ((∃rs1,b,rs2,a1,rss.
+        rs = rs1@b::rs2 ∧ 
+        nth i ? (vec … b) (blank ?) = (blank ?) ∧
+        (∀x. mem ? x rs1 → nth i ? (vec … x) (blank ?) ≠ (blank ?)) ∧
+        shift_l sig n i (a::rs1) (a1::rss) ∧
+        t2 = midtape (multi_sig sig n) ((reverse ? (a1::rss))@ls) b rs2) ∨
+      (∃b,rss. 
+        (∀x. mem ? x rs → nth i ? (vec … x) (blank ?) ≠ (blank ?)) ∧
+        shift_l sig n i (a::rs) (rss@[b]) ∧
+        t2 = midtape (multi_sig sig n) 
+          ((reverse ? (rss@[b]))@ls) (all_blank sig n) [ ]))).
+
+definition R_shift_i_L_new ≝ λsig,n,i,t1,t2.
+  (∀a,ls,rs. 
+   t1 = midtape ? ls a rs  → 
+   ∃rs1,b,rs2,rss.
+      b = hd ? rs2 (all_blank sig n) ∧
+      nth i ? (vec … b) (blank ?) = (blank ?) ∧
+      rs = rs1@rs2 ∧ 
+      (∀x. mem ? x rs1 → nth i ? (vec … x) (blank ?) ≠ (blank ?)) ∧
+      shift_l sig n i (a::rs1) rss ∧
+      t2 = midtape (multi_sig sig n) ((reverse ? rss)@ls) b (tail ? rs2)). 
+          
+theorem sem_shift_i_L: ∀sig,n,i. shift_i_L sig n i  ⊨ R_shift_i_L sig n i.
+#sig #n #i 
+@(sem_seq_app ?????? 
+  (sem_ncombf_r (multi_sig sig n) (shift_i sig n i)(all_blank sig n))
+   (sem_seq ????? (ssem_mti sig n i) 
+    (sem_extend ? (all_blank sig n))))
+#tin #tout * #t1 * * #Ht1a #Ht1b * #t2 * * #Ht2a #Ht2b * #Htout1 #Htout2
+#a #ls #rs cases rs
+  [#Htin %2 %{(shift_i sig n i a (all_blank sig n))} %{[ ]} 
+   %[%[#x @False_ind | @daemon]
+    |lapply (Ht1a … Htin) -Ht1a -Ht1b #Ht1 
+     lapply (Ht2a … Ht1) -Ht2a -Ht2b #Ht2 >Ht2 in Htout1; 
+     >Ht1 whd in match (left ??); whd in match (right ??); #Htout @Htout // 
+    ]
+  |#a1 #rs1 #Htin 
+   lapply (Ht1b … Htin) -Ht1a -Ht1b #Ht1 
+   lapply (Ht2b … Ht1) -Ht2a -Ht2b *
+    [(* a1 is blank *) * #H1 #H2 %1
+     %{[ ]} %{a1} %{rs1} %{(shift_i sig n i a a1)} %{[ ]}
+     %[%[%[%[// |//] |#x @False_ind] | @daemon]
+      |>Htout2 [>H2 >reverse_single @Ht1 |>H2 >Ht1 normalize % #H destruct (H)]
+      ]
+    |*
+    [* #rs10 * #b * #rs2 * #rss * * * * #H1 #H2 #H3 #H4
+     #Ht2 %1 
+     %{(a1::rs10)} %{b} %{rs2} %{(shift_i sig n i a a1)} %{rss}
+     %[%[%[%[>H1 //|//] |@H3] |@daemon ]
+      |>reverse_cons >associative_append 
+       >H2 in Htout2; #Htout >Htout [@Ht2| >Ht2 normalize % #H destruct (H)]  
+      ]
+    |* #b * #rss * * #H1 #H2 
+     #Ht2 %2
+     %{(shift_i sig n i b (all_blank sig n))} %{(shift_i sig n i a a1::rss)}
+     %[%[@H1 |@daemon ]
+      |>Ht2 in Htout1; #Htout >Htout //
+       whd in match (left ??); whd in match (right ??);
+       >reverse_append >reverse_single >associative_append  >reverse_cons
+       >associative_append // 
+       ]
+     ]
+   ]
+ ]
+qed.
+theorem sem_shift_i_L_new: ∀sig,n,i. 
+  shift_i_L sig n i  ⊨ R_shift_i_L_new sig n i.
+#sig #n #i 
+@(Realize_to_Realize … (sem_shift_i_L sig n i))
+#t1 #t2 #H #a #ls #rs #Ht1 lapply (H a ls rs Ht1) *
+  [* #rs1 * #b * #rs2 * #a1 * #rss * * * * #H1 #H2 #H3 #H4 #Ht2
+   %{rs1} %{b} %{(b::rs2)} %{(a1::rss)} 
+   %[%[%[%[%[//|@H2]|@H1]|@H3]|@H4] | whd in match (tail ??); @Ht2]
+  |* #b * #rss * * #H1 #H2 #Ht2
+   %{rs} %{(all_blank sig n)} %{[]} %{(rss@[b])} 
+   %[%[%[%[%[//|@blank_all_blank]|//]|@H1]|@H2] | whd in match (tail ??); @Ht2]
+  ]
+qed.
+   
+
+(*******************************************************************************
+The following machine implements a full move of for a trace: we reach the left 
+border, shift the i-th trace and come back to the head position. *)  
+
+(* this exclude the possibility that traces do not overlap: the head must 
+remain inside all traces *)
+
+definition mtiL ≝ λsig,n,i.
+   move_to_blank_L sig n i · 
+   shift_i_L sig n i ·
+   move_until ? L (no_head sig n). 
+   
+definition Rmtil ≝ λsig,n,i,t1,t2.
+  ∀ls,a,rs. 
+   t1 = midtape (multi_sig sig n) ls a rs → 
+   nth n ? (vec … a) (blank ?) = head ? →  
+   (∀i.regular_trace sig n a ls rs i) → 
+   (* next: we cannot be on rightof on trace i *)
+   (nth i ? (vec … a) (blank ?) = (blank ?) 
+     → nth i ? (vec … (hd ? rs (all_blank …))) (blank ?) ≠ (blank ?)) →
+   no_head_in … ls →   
+   no_head_in … rs  → 
+   (∃ls1,a1,rs1.
+     t2 = midtape (multi_sig …) ls1 a1 rs1 ∧
+     (∀i.regular_trace … a1 ls1 rs1 i) ∧
+     (∀j. j ≤ n → j ≠ i → to_blank_i ? n j (a1::ls1) = to_blank_i ? n j (a::ls)) ∧
+     (∀j. j ≤ n → j ≠ i → to_blank_i ? n j rs1 = to_blank_i ? n j rs) ∧
+     (to_blank_i ? n i ls1 = to_blank_i ? n i (a::ls)) ∧
+     (to_blank_i ? n i (a1::rs1)) = to_blank_i ? n i rs).
+
+theorem sem_Rmtil: ∀sig,n,i. i < n → mtiL sig n i  ⊨ Rmtil sig n i.
+#sig #n #i #lt_in
+@(sem_seq_app ?????? 
+  (sem_move_to_blank_L … )
+   (sem_seq ????? (sem_shift_i_L_new …)
+    (ssem_move_until_L ? (no_head sig n))))
+#tin #tout * #t1 * * #_ #Ht1 * #t2 * #Ht2 * #_ #Htout
+(* we start looking into Rmitl *)
+#ls #a #rs #Htin (* tin is a midtape *)
+#Hhead #Hreg #no_rightof #Hnohead_ls #Hnohead_rs 
+cut (regular_i sig n (a::ls) i)
+  [cases (Hreg i) * // 
+   cases (true_or_false (nth i ? (vec … a) (blank ?) == (blank ?))) #Htest
+    [#_ @daemon (* absurd, since hd rs non e' blank *)
+    |#H #_ @daemon]] #Hreg1
+lapply (Ht1 … Htin Hreg1 ?) [#j #_ @Hreg] -Ht1 -Htin
+* #b * #ls1 * #ls2 * * * * * #reg_ls1_i #reg_ls1_j #Hno_blankb #Hhead #Hls1 #Ht1
+lapply (Ht2 … Ht1) -Ht2 -Ht1 
+* #rs1 * #b0 * #rs2 * #rss * * * * * #Hb0 #Hb0blank #Hrs1 #Hrs1b #Hrss #Ht2
+(* we need to recover the position of the head of the emulated machine
+   that is the head of ls1. This is somewhere inside rs1 *) 
+cut (∃rs11. rs1 = (reverse ? ls1)@rs11)
+  [cut (ls1 = [ ] ∨ ∃aa,tlls1. ls1 = aa::tlls1)
+    [cases ls1 [%1 // | #aa #tlls1 %2 %{aa} %{tlls1} //]] *
+      [#H1ls1 %{rs1} >H1ls1 //
+      |* #aa * #tlls1 #H1ls1 >H1ls1 in Hrs1; 
+       cut (aa = a) [>H1ls1 in Hls1; #H @(to_blank_hd … H)] #eqaa >eqaa  
+       #Hrs1_aux cases (compare_append … (sym_eq … Hrs1_aux)) #l *
+        [* #H1 #H2 %{l} @H1
+        |(* this is absurd : if l is empty, the case is as before.
+           if l is not empty then it must start with a blank, since it is the
+           first character in rs2. But in this case we would have a blank 
+           inside ls1=a::tls1 that is absurd *)
+          @daemon
+        ]]]   
+   * #rs11 #H1
+cut (rs = rs11@rs2)
+  [@(injective_append_l … (reverse … ls1)) >Hrs1 <associative_append <H1 //] #H2
+lapply (Htout … Ht2) -Htout -Ht2 *
+  [(* the current character on trace i holds the head-mark.
+      The case is absurd, since b0 is the head of rs2, that is a sublist of rs, 
+      and the head-mark is not in rs *)
+   * #H3 @False_ind @(absurd (nth n ? (vec … b0) (blank sig) = head ?)) 
+     [@(\P ?) @injective_notb @H3 ]
+   @Hnohead_rs >H2 >trace_append @mem_append_l2 
+   lapply Hb0 cases rs2 
+    [whd in match (hd ???); #H >H in H3; whd in match (no_head ???); 
+     >all_blank_n normalize -H #H destruct (H); @False_ind
+    |#c #r #H4 %1 >H4 //
+    ]
+  |* 
+  [(* we reach the head position *)
+   (* cut (trace sig n j (a1::ls20)=trace sig n j (ls1@b::ls2)) *)
+   * #ls10 * #a1 * #ls20 * * * #Hls20 #Ha1 #Hnh #Htout
+   cut (∀j.j ≠ i →
+      trace sig n j (reverse (multi_sig sig n) rs1@b::ls2) = 
+      trace sig n j (ls10@a1::ls20))
+    [#j #ineqj >append_cons <reverse_cons >trace_def <map_append <reverse_map
+     lapply (trace_shift_neq …lt_in ? (sym_not_eq … ineqj) … Hrss) [//] #Htr
+     <(trace_def …  (b::rs1)) <Htr >reverse_map >map_append @eq_f @Hls20 ] 
+   #Htracej
+   cut (trace sig n i (reverse (multi_sig sig n) (rs1@[b0])@ls2) = 
+        trace sig n i (ls10@a1::ls20))
+    [>trace_def <map_append <reverse_map <map_append <(trace_def … [b0]) 
+     cut (trace sig n i [b0] = [blank ?]) [@daemon] #Hcut >Hcut
+     lapply (trace_shift … lt_in … Hrss) [//] whd in match (tail ??); #Htr <Htr
+     >reverse_map >map_append <trace_def <Hls20 % 
+    ] 
+   #Htracei
+   cut (∀j. j ≠ i →
+      (trace sig n j (reverse (multi_sig sig n) rs11) = trace sig n j ls10) ∧ 
+      (trace sig n j (ls1@b::ls2) = trace sig n j (a1::ls20)))
+   [@daemon (* si fa 
+     #j #ineqj @(first_P_to_eq ? (λx. x ≠ head ?))
+      [lapply (Htracej … ineqj) >trace_def in ⊢ (%→?); <map_append 
+       >trace_def in ⊢ (%→?); <map_append #H @H  
+      | *) ] #H2
+  cut ((trace sig n i (b0::reverse ? rs11) = trace sig n i (ls10@[a1])) ∧ 
+      (trace sig n i (ls1@ls2) = trace sig n i ls20))
+   [>H1 in Htracei; >reverse_append >reverse_single >reverse_append 
+     >reverse_reverse >associative_append >associative_append
+     @daemon
+    ] #H3    
+  cut (∀j. j ≠ i → 
+    trace sig n j (reverse (multi_sig sig n) ls10@rs2) = trace sig n j rs)
+    [#j #jneqi @(injective_append_l … (trace sig n j (reverse ? ls1)))
+     >map_append >map_append >Hrs1 >H1 >associative_append 
+     <map_append <map_append in ⊢ (???%); @eq_f 
+     <map_append <map_append @eq_f2 // @sym_eq 
+     <(reverse_reverse … rs11) <reverse_map <reverse_map in ⊢ (???%);
+     @eq_f @(proj1 … (H2 j jneqi))] #Hrs_j
+   %{ls20} %{a1} %{(reverse ? (b0::ls10)@tail (multi_sig sig n) rs2)}
+   %[%[%[%[%[@Htout
+    |#j cases (decidable_eq_nat j i)
+      [#eqji >eqji (* by cases wether a1 is blank *)
+       @daemon
+      |#jneqi lapply (reg_ls1_j … jneqi) #H4 
+       >reverse_cons >associative_append >Hb0 @regular_cons_hd_rs
+       @(eq_trace_to_regular … H4)
+        [<hd_trace >(proj2 … (H2 … jneqi)) >hd_trace %
+        |<tail_trace >(proj2 … (H2 … jneqi)) >tail_trace %
+        |@sym_eq @Hrs_j //
+        ]
+      ]]
+    |#j #lejn #jneqi <(Hls1 … lejn) 
+     >to_blank_i_def >to_blank_i_def @eq_f @sym_eq @(proj2 … (H2 j jneqi))]
+    |#j #lejn #jneqi >reverse_cons >associative_append >Hb0
+     <to_blank_hd_cons >to_blank_i_def >to_blank_i_def @eq_f @Hrs_j //]
+    |<(Hls1 i) [2:@lt_to_le //] 
+     lapply (all_blank_after_blank … reg_ls1_i) 
+       [@(\P ?) @daemon] #allb_ls2
+     whd in match (to_blank_i ????); <(proj2 … H3)
+     @daemon ]
+    |>reverse_cons >associative_append  
+     cut (to_blank_i sig n i rs = to_blank_i sig n i (rs11@[b0])) [@daemon] 
+     #Hcut >Hcut >(to_blank_i_chop  … b0 (a1::reverse …ls10)) [2: @Hb0blank]
+     >to_blank_i_def >to_blank_i_def @eq_f 
+     >trace_def >trace_def @injective_reverse >reverse_map >reverse_cons
+     >reverse_reverse >reverse_map >reverse_append >reverse_single @sym_eq
+     @(proj1 … H3)
+    ]
+  |(*we do not find the head: this is absurd *)
+   * #b1 * #lss * * #H2 @False_ind 
+   cut (∀x0. mem ? x0 (trace sig n n (b0::reverse ? rss@ls2)) → x0 ≠ head ?)
+     [@daemon] -H2 #H2
+   lapply (trace_shift_neq sig n i n … lt_in … Hrss)
+     [@lt_to_not_eq @lt_in | // ] 
+   #H3 @(absurd 
+        (nth n ? (vec … (hd ? (ls1@[b]) (all_blank sig n))) (blank ?) = head ?))
+     [>Hhead //
+     |@H2 >trace_def %2 <map_append @mem_append_l1 <reverse_map <trace_def 
+      >H3 >H1 >trace_def >reverse_map >reverse_cons >reverse_append 
+      >reverse_reverse >associative_append <map_append @mem_append_l2
+      cases ls1 [%1 % |#x #ll %1 %]
+     ]
+   ]
+ ]
+qed.
index e06e0055d6da93d8ea9531fceca880048f5d3609..ec42ee8df543f0fd7db44d8372a96874cbc244e0 100644 (file)
 
 open Printf
 
-open GrafiteTypes
-open MatitaGtkMisc
 open MatitaGuiTypes
-open GtkSourceView2
+open GtkSourceView3
 
 let matita_script_current = ref (fun _ -> (assert false : < advance: ?statement:string -> unit -> unit; status: GrafiteTypes.status >));;
 let register_matita_script_current f = matita_script_current := f;;
@@ -174,9 +172,9 @@ let string_of_dom_node node =
 *)
 
 class clickableMathView obj =
-let text_width = 80 in
+(*let text_width = 80 in*)
 object (self)
-  inherit GSourceView2.source_view obj
+  inherit GSourceView3.source_view obj
 
   method strings_of_selection = (assert false : (paste_kind * string) list)
 
@@ -197,7 +195,7 @@ object (self)
     self#buffer#apply_tag all_tag ~start:(self#buffer#get_iter `START)
      ~stop:(self#buffer#get_iter `END);
     ignore(all_tag#connect#event
-      ~callback:(fun ~origin event pos ->
+      ~callback:(fun ~origin:_ event _pos ->
         match GdkEvent.get_type event with
          | `MOTION_NOTIFY -> 
              Gdk.Window.set_cursor
@@ -209,12 +207,12 @@ object (self)
          | _ -> false));
      let hyperlink_tag = self#buffer#create_tag [] in
      ignore(hyperlink_tag#connect#event
-       ~callback:(fun ~origin event pos ->
+       ~callback:(fun ~origin:_ event pos ->
          let offset = (new GText.iter pos)#offset in
          let _,_,href =
           try
            List.find
-            (fun (start,stop,href) -> start <= offset && offset <= stop
+            (fun (start,stop,_href) -> start <= offset && offset <= stop
             ) hyperlinks
           with
            Not_found -> assert false
@@ -235,7 +233,7 @@ object (self)
               false
           | _ -> false));
      List.iter
-      ( fun (start,stop,(href : string)) ->
+      ( fun (start,stop,(_href : string)) ->
           self#buffer#apply_tag hyperlink_tag
            ~start:(self#buffer#get_iter_at_char start)
            ~stop:(self#buffer#get_iter_at_char (stop+1));
@@ -690,7 +688,7 @@ let cicMathView (*?auto_indent ?highlight_current_line ?indent_on_tab ?indent_wi
         Gobject.set_params (Gobject.try_cast obj "GtkSourceView") pl;
         new _cicMathView obj)(*)) ?auto_indent ?highlight_current_line ?indent_on_tab ?indent_width ?insert_spaces_instead_of_tabs ?right_margin_position ?show_line_marks ?show_line_numbers ?show_right_margin ?smart_home_end ?tab_width ?editable ?cursor_visible ?justification ?wrap_mode ?accepts_tab ?border_width*) [] ?width ?height ?packing ?show () :> cicMathView)
 
-let screenshot status sequents metasenv subst (filename as ofn) =
+let screenshot _status _sequents _metasenv _subst (_filename (*as ofn*)) =
  () (*MATITA 1.0
   let w = GWindow.window ~title:"screenshot" () in
   let width = 500 in
index 9d87f9909be37dc50abc38a8e6dabffc49a57cc0..59cf50f6ed6899fb0ffe73222eb60fd33dbfd071 100644 (file)
@@ -95,7 +95,7 @@ $(DEP_INPUT): LINE = $(MAS:%=%:include \"\".)
 
 $(DEP_INPUT): $(MAS) Makefile
        @echo "  GREP include"
-       $(H)grep "include \"" $^ > $(DEP_INPUT)
+       $(H)grep "include \"" $(MAS) > $(DEP_INPUT)
        $(H)echo "$(LINE)" | sed -e 's/\"\. /\"\.\n/g' >> $(DEP_INPUT) 
 
 # dep ########################################################################
index 704301fe03c8d6367f622f85abd3c794f49f9ed5..17be9f2dd49ebbe13d8c47acee513bd1727ca5b5 100644 (file)
@@ -17,13 +17,14 @@ include "basic_2/dynamic/cnv.ma".
 
 (* EXAMPLES *****************************************************************)
 
-(* Extended validy (basic_2B) vs. restricted validity (basic_1A) ************)
+(* Extended validy (λδ-2A) vs. restricted validity (λδ-1B) ******************)
 
 (* Note: extended validity of a closure, height of cnv_appl > 1 *)
-lemma cnv_extended (h) (p): ∀G,L,s. ⦃G, L.ⓛ⋆s.ⓛⓛ{p}⋆s.⋆s.ⓛ#0⦄ ⊢ ⓐ#2.#0 ![Ⓕ,h].
+lemma cnv_extended (h) (p) (G) (L):
+      ∀s. ⦃G,L.ⓛ⋆s.ⓛⓛ{p}⋆s.⋆s.ⓛ#0⦄ ⊢ ⓐ#2.#0 ![h,𝛚].
 #h #p #G #L #s
 @(cnv_appl … 2 p … (⋆s) … (⋆s))
-[ #H destruct
+[ //
 | /4 width=1 by cnv_sort, cnv_zero, cnv_lref/
 | /4 width=1 by cnv_bind, cnv_zero/
 | /5 width=3 by cpm_cpms, cpm_lref, cpm_ell, lifts_sort/
@@ -32,15 +33,16 @@ lemma cnv_extended (h) (p): ∀G,L,s. ⦃G, L.ⓛ⋆s.ⓛⓛ{p}⋆s.⋆s.ⓛ#0
 qed.
 
 (* Note: restricted validity of the η-expanded closure, height of cnv_appl = 1 **)
-lemma vnv_restricted (h) (p): ∀G,L,s. ⦃G, L.ⓛ⋆s.ⓛⓛ{p}⋆s.⋆s.ⓛⓛ{p}⋆s.ⓐ#0.#1⦄ ⊢ ⓐ#2.#0 ![Ⓣ,h].
+lemma cnv_restricted (h) (p) (G) (L):
+      ∀s. ⦃G,L.ⓛ⋆s.ⓛⓛ{p}⋆s.⋆s.ⓛⓛ{p}⋆s.ⓐ#0.#1⦄ ⊢ ⓐ#2.#0 ![h,𝟐].
 #h #p #G #L #s
 @(cnv_appl … 1 p … (⋆s) … (ⓐ#0.#2))
-[ /2 width=1 by/
+[ //
 | /4 width=1 by cnv_sort, cnv_zero, cnv_lref/
 | @cnv_zero
   @cnv_bind //
   @(cnv_appl … 1 p … (⋆s) … (⋆s))
-  [ /2 width=1 by/
+  [ //
   | /2 width=1 by cnv_sort, cnv_zero/
   | /4 width=1 by cnv_sort, cnv_zero, cnv_lref, cnv_bind/
   | /2 width=3 by cpms_ell, lifts_sort/
index bb4edfd6768d3450d671172738f804d4b66ceb01..72b4b347cec85096e2d2960bf72f40a3f309ab43 100644 (file)
@@ -51,7 +51,7 @@ lapply (cpm_inv_appl1 … H) -H * *
 qed-.
 
 lemma cpr_inv_Delta_sn (h) (G) (L) (s):
-                       ∀X. ⦃G, L⦄ ⊢ Delta s ➡[h] X → Delta s = X.
+                       ∀X. ⦃G,L⦄ ⊢ Delta s ➡[h] X → Delta s = X.
 #h #G #L #s #X #H
 elim (cpm_inv_abst1 … H) -H #X1 #X2 #H1 #H2 #H destruct
 lapply (cpr_inv_sort1 … H1) -H1 #H destruct
@@ -60,19 +60,19 @@ qed-.
 
 (* Main properties **********************************************************)
 
-theorem cpr_Omega_12 (h) (G) (L) (s): ⦃G, L⦄ ⊢ Omega1 s ➡[h] Omega2 s.
+theorem cpr_Omega_12 (h) (G) (L) (s): ⦃G,L⦄ ⊢ Omega1 s ➡[h] Omega2 s.
 /2 width=1 by cpm_beta/ qed.
 
-theorem cpr_Omega_23 (h) (G) (L) (s): ⦃G, L⦄ ⊢ Omega2 s ➡[h] Omega3 s.
+theorem cpr_Omega_23 (h) (G) (L) (s): ⦃G,L⦄ ⊢ Omega2 s ➡[h] Omega3 s.
 /5 width=3 by cpm_eps, cpm_appl, cpm_bind, cpm_delta, Delta_lifts/ qed.
 
-theorem cpr_Omega_31 (h) (G) (L) (s): ⦃G, L⦄ ⊢ Omega3 s ➡[h] Omega1 s.
+theorem cpr_Omega_31 (h) (G) (L) (s): ⦃G,L⦄ ⊢ Omega3 s ➡[h] Omega1 s.
 /4 width=3 by cpm_zeta, Delta_lifts, lifts_flat/ qed.
 
 (* Main inversion properties ************************************************)
 
 theorem cpr_inv_Omega1_sn (h) (G) (L) (s):
-                          ∀X. ⦃G, L⦄ ⊢ Omega1 s ➡[h] X →
+                          ∀X. ⦃G,L⦄ ⊢ Omega1 s ➡[h] X →
                           ∨∨ Omega1 s = X | Omega2 s = X.
 #h #G #L #s #X #H elim (cpm_inv_appl1 … H) -H *
 [ #W2 #T2 #HW2 #HT2 #H destruct
@@ -87,7 +87,7 @@ theorem cpr_inv_Omega1_sn (h) (G) (L) (s):
 ]
 qed-.
 
-theorem cpr_Omega_21_false (h) (G) (L) (s): ⦃G, L⦄ ⊢ Omega2 s ➡[h] Omega1 s → ⊥.
+theorem cpr_Omega_21_false (h) (G) (L) (s): ⦃G,L⦄ ⊢ Omega2 s ➡[h] Omega1 s → ⊥.
 #h #G #L #s #H elim (cpm_inv_bind1 … H) -H *
 [ #W #T #_ #_ whd in ⊢ (??%?→?); #H destruct
 | #X #H #_ #_ #_
index 257015d95c14cd69dd8aaf7db31d9eadfe8b5cbe..b41ddae8a0b2805a59db7275adc2f36824c2ba59 100644 (file)
@@ -36,22 +36,22 @@ lemma ApplDelta_lifts (f:rtmap) (s0) (s):
                       ⬆*[f] (ApplDelta s0 s) ≘ (ApplDelta s0 s).
 /5 width=1 by lifts_sort, lifts_lref, lifts_bind, lifts_flat/ qed.
 
-lemma cpr_ApplOmega_12 (h) (G) (L) (s0) (s): ⦃G, L⦄ ⊢ ApplOmega1 s0 s ➡[h] ApplOmega2 s0 s.
+lemma cpr_ApplOmega_12 (h) (G) (L) (s0) (s): ⦃G,L⦄ ⊢ ApplOmega1 s0 s ➡[h] ApplOmega2 s0 s.
 /2 width=1 by cpm_beta/ qed.
 
-lemma cpr_ApplOmega_23 (h) (G) (L) (s0) (s): ⦃G, L⦄ ⊢ ApplOmega2 s0 s ➡[h] ApplOmega3 s0 s.
+lemma cpr_ApplOmega_23 (h) (G) (L) (s0) (s): ⦃G,L⦄ ⊢ ApplOmega2 s0 s ➡[h] ApplOmega3 s0 s.
 /6 width=3 by cpm_eps, cpm_appl, cpm_bind, cpm_delta, ApplDelta_lifts/ qed.
 
-lemma cpr_ApplOmega_34 (h) (G) (L) (s0) (s): ⦃G, L⦄ ⊢ ApplOmega3 s0 s ➡[h] ApplOmega4 s0 s.
+lemma cpr_ApplOmega_34 (h) (G) (L) (s0) (s): ⦃G,L⦄ ⊢ ApplOmega3 s0 s ➡[h] ApplOmega4 s0 s.
 /4 width=3 by cpm_zeta, ApplDelta_lifts, lifts_sort, lifts_flat/ qed.
 
-lemma cpxs_ApplOmega_14 (h) (G) (L) (s0) (s): ⦃G, L⦄ ⊢ ApplOmega1 s0 s ⬈*[h] ApplOmega4 s0 s.
+lemma cpxs_ApplOmega_14 (h) (G) (L) (s0) (s): ⦃G,L⦄ ⊢ ApplOmega1 s0 s ⬈*[h] ApplOmega4 s0 s.
 /5 width=4 by cpxs_strap1, cpm_fwd_cpx/ qed.
 
-lemma fqup_ApplOmega_41 (G) (L) (s0) (s): â¦\83G,L,ApplOmega4 s0 sâ¦\84 â\8a\90+ ⦃G,L,ApplOmega1 s0 s⦄.
+lemma fqup_ApplOmega_41 (G) (L) (s0) (s): â¦\83G,L,ApplOmega4 s0 sâ¦\84 â¬\82+ ⦃G,L,ApplOmega1 s0 s⦄.
 /2 width=1 by/ qed.
 
 (* Main properties **********************************************************)
 
-theorem fpbg_refl (h) (o) (G) (L) (s0) (s): ⦃G,L,ApplOmega1 s0 s⦄ >[h,o] ⦃G,L,ApplOmega1 s0 s⦄.
+theorem fpbg_refl (h) (G) (L) (s0) (s): ⦃G,L,ApplOmega1 s0 s⦄ >[h] ⦃G,L,ApplOmega1 s0 s⦄.
 /3 width=5 by fpbs_fpbg_trans, fqup_fpbg, cpxs_fpbs/ qed.
index 9b7f6fa2bc1301790f4c4831116c830cc678452d..7ebdc5dab0c7037cd1eb8bd190f7bcbf597977a0 100644 (file)
@@ -23,7 +23,7 @@ theorem flifts_basic_swap (T) (d1) (d2) (h1) (h2):
                           d2 ≤ d1 → ↑[d2,h2]↑[d1,h1]T = ↑[h2+d1,h1]↑[d2,h2]T.
 /3 width=1 by flifts_comp, basic_swap/ qed-.
 (*
-lemma flift_join: ∀e1,e2,T. ⬆[e1, e2] ↑[0, e1] T ≡ ↑[0, e1 + e2] T.
+lemma flift_join: ∀e1,e2,T. ⬆[e1,e2] ↑[0,e1] T ≡ ↑[0,e1 + e2] T.
 #e1 #e2 #T
 lapply (flift_lift T 0 (e1+e2)) #H
 elim (lift_split … H e1 e1) -H // #U #H
index 2e7f3d5efa075fd41c20254dd481289865c28a7a..059a1f66faffa47f260c0f08b55c4095ea92f62d 100644 (file)
@@ -20,9 +20,9 @@ include "apps_2/functional/mf_exteq.ma".
 
 (* Properties with relocation ***********************************************)
 
-lemma mf_delta_drops (h) (G): ∀K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[h] V2 →
+lemma mf_delta_drops (h) (G): ∀K,V1,V2. ⦃G,K⦄ ⊢ V1 ➡[h] V2 →
                               ∀T,L,l. ⬇*[l] L ≘ K.ⓓV1 →
-                              ∀gv,lv. ⦃G, L⦄ ⊢ ●[gv,⇡[l←#l]lv]T ➡[h] ●[gv,⇡[l←↑[↑l]V2]lv]T.
+                              ∀gv,lv. ⦃G,L⦄ ⊢ ●[gv,⇡[l←#l]lv]T ➡[h] ●[gv,⇡[l←↑[↑l]V2]lv]T.
 #h #G #K #V1 #V2 #HV #T elim T -T * //
 [ #i #L #l #HKL #gv #lv
   >mf_lref >mf_lref
index 5d0f2d324ef315cfaa1c3259e074bf5da94a3edc..849ad9dd43ef0e834c3846791737526bafdae80b 100644 (file)
@@ -19,7 +19,7 @@ include "static_2/syntax/genv.ma".
 (* DENOTATIONAL EQUIVALENCE  ************************************************)
 
 definition deq (M): relation4 genv lenv term term ≝
-                    λG,L,T1,T2. ∀gv,lv. lv ϵ ⟦L⟧[gv] → ⟦T1⟧[gv, lv] ≗{M} ⟦T2⟧[gv, lv].
+                    λG,L,T1,T2. ∀gv,lv. lv ϵ ⟦L⟧[gv] → ⟦T1⟧[gv,lv] ≗{M} ⟦T2⟧[gv,lv].
 
 interpretation "denotational equivalence (model)"
    'RingEq M G L T1 T2 = (deq M G L T1 T2).
index 181acf2e644db73bd35ef8eeecf0fdba08ea14de..3e085aeeaf7a51ba5b95b628452ee22e32c1a9de 100644 (file)
@@ -21,7 +21,7 @@ include "apps_2/models/deq.ma".
 (* Forward lemmas with context-sensitive parallel reduction for terms *******)
 
 lemma cpr_fwd_deq (h) (M): is_model M → is_extensional M →
-                           ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h] T2 → ⦃G, L⦄ ⊢ T1 ≗{M} T2.
+                           ∀G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ➡[h] T2 → ⦃G,L⦄ ⊢ T1 ≗{M} T2.
 #h #M #H1M #H2M #G #L #T1 #T2 #H @(cpr_ind … H) -G -L -T1 -T2
 [ /2 width=2 by deq_refl/
 | #G #K #V1 #V2 #W2 #_ #IH #HVW2 #gv #v #H
index 4d36f142788b2b4c4efe64aa8a6b14906bd1e828..b3ad3915733a01f5e97978b1f0cd49ade8bc0292 100644 (file)
@@ -20,7 +20,7 @@ include "apps_2/notation/models/inwbrackets_4.ma".
 
 inductive li (M) (gv): relation2 lenv (evaluation M) ≝
 | li_atom: ∀lv. li M gv (⋆) lv
-| li_abbr: ∀lv,d,L,V. li M gv L lv → ⟦V⟧[gv, lv] = d → li M gv (L.ⓓV) (⫯[0←d]lv)
+| li_abbr: ∀lv,d,L,V. li M gv L lv → ⟦V⟧[gv,lv] = d → li M gv (L.ⓓV) (⫯[0←d]lv)
 | li_abst: ∀lv,d,L,W. li M gv L lv → li M gv (L.ⓛW) (⫯[0←d]lv)
 | li_unit: ∀lv,d,I,L. li M gv L lv → li M gv (L.ⓤ{I}) (⫯[0←d]lv)
 | li_veq : ∀lv1,lv2,L. li M gv L lv1 → lv1 ≗ lv2 → li M gv L lv2
index b3acfc26241778918dd58a40b33a411e3c3bdd55..d06b4efda7020e4a4e9270bbe61c2c50465e982f 100644 (file)
@@ -26,34 +26,34 @@ record is_model (M): Prop ≝ {
 (* Note: application: compatibility *)
    mp: compatible_3 … (ap M) (sq M) (sq M) (sq M);
 (* Note: interpretation: sort *)
-   ms: ∀gv,lv,s. ⟦⋆s⟧{M}[gv, lv] ≗ sv M s;
+   ms: ∀gv,lv,s. ⟦⋆s⟧{M}[gv,lv] ≗ sv M s;
 (* Note: interpretation: local reference *)
-   ml: ∀gv,lv,i. ⟦#i⟧{M}[gv, lv] ≗ lv i;
+   ml: ∀gv,lv,i. ⟦#i⟧{M}[gv,lv] ≗ lv i;
 (* Note: interpretation: global reference *)
-   mg: ∀gv,lv,l. ⟦§l⟧{M}[gv, lv] ≗ gv l;
+   mg: ∀gv,lv,l. ⟦§l⟧{M}[gv,lv] ≗ gv l;
 (* Note: interpretation: intensional binder *)
-   mi: ∀p,gv1,gv2,lv1,lv2,W,T. ⟦W⟧{M}[gv1, lv1] ≗ ⟦W⟧{M}[gv2, lv2] →
-       (∀d. ⟦T⟧{M}[gv1, ⫯[0←d]lv1] ≗ ⟦T⟧{M}[gv2, ⫯[0←d]lv2]) →
-       ⟦ⓛ{p}W.T⟧[gv1, lv1] ≗ ⟦ⓛ{p}W.T⟧[gv2, lv2];
+   mi: ∀p,gv1,gv2,lv1,lv2,W,T. ⟦W⟧{M}[gv1,lv1] ≗ ⟦W⟧{M}[gv2,lv2] →
+       (∀d. ⟦T⟧{M}[gv1,⫯[0←d]lv1] ≗ ⟦T⟧{M}[gv2,⫯[0←d]lv2]) →
+       ⟦ⓛ{p}W.T⟧[gv1,lv1] ≗ ⟦ⓛ{p}W.T⟧[gv2,lv2];
 (* Note: interpretation: abbreviation *)
-   md: ∀p,gv,lv,V,T. ⟦ⓓ{p}V.T⟧{M}[gv, lv] ≗ ⟦V⟧[gv, lv] ⊕[p] ⟦T⟧[gv, ⫯[0←⟦V⟧[gv, lv]]lv];
+   md: ∀p,gv,lv,V,T. ⟦ⓓ{p}V.T⟧{M}[gv,lv] ≗ ⟦V⟧[gv,lv] ⊕[p] ⟦T⟧[gv,⫯[0←⟦V⟧[gv,lv]]lv];
 (* Note: interpretation: application *)
-   ma: ∀gv,lv,V,T. ⟦ⓐV.T⟧{M}[gv, lv] ≗ ⟦V⟧[gv, lv] @ ⟦T⟧[gv, lv];
+   ma: ∀gv,lv,V,T. ⟦ⓐV.T⟧{M}[gv,lv] ≗ ⟦V⟧[gv,lv] @ ⟦T⟧[gv,lv];
 (* Note: interpretation: ζ-equivalence *)
    mz: ∀d1,d2. d1 ⊕{M}[Ⓣ] d2 ≗ d2;
 (* Note: interpretation: ϵ-equivalence *)
-   me: ∀gv,lv,W,T. ⟦ⓝW.T⟧{M}[gv, lv] ≗ ⟦T⟧[gv, lv];
+   me: ∀gv,lv,W,T. ⟦ⓝW.T⟧{M}[gv,lv] ≗ ⟦T⟧[gv,lv];
 (* Note: interpretation: β-requivalence *)
-   mb: ∀p,gv,lv,d,W,T. d @ ⟦ⓛ{p}W.T⟧{M}[gv, lv] ≗ d ⊕[p] ⟦T⟧[gv, ⫯[0←d]lv];
+   mb: ∀p,gv,lv,d,W,T. d @ ⟦ⓛ{p}W.T⟧{M}[gv,lv] ≗ d ⊕[p] ⟦T⟧[gv,⫯[0←d]lv];
 (* Note: interpretation: θ-requivalence *)
    mh: ∀p,d1,d2,d3. d1 @ (d2 ⊕{M}[p] d3) ≗ d2 ⊕[p] (d1 @ d3)
 }.
 
 record is_extensional (M): Prop ≝ {
 (* Note: interpretation: extensional abstraction *)
-   mx: ∀p,gv1,gv2,lv1,lv2,W1,W2,T1,T2. ⟦W1⟧{M}[gv1, lv1] ≗ ⟦W2⟧{M}[gv2, lv2] →
-       (∀d. ⟦T1⟧{M}[gv1, ⫯[0←d]lv1] ≗ ⟦T2⟧{M}[gv2, ⫯[0←d]lv2]) →
-       ⟦ⓛ{p}W1.T1⟧[gv1, lv1] ≗ ⟦ⓛ{p}W2.T2⟧[gv2, lv2]
+   mx: ∀p,gv1,gv2,lv1,lv2,W1,W2,T1,T2. ⟦W1⟧{M}[gv1,lv1] ≗ ⟦W2⟧{M}[gv2,lv2] →
+       (∀d. ⟦T1⟧{M}[gv1,⫯[0←d]lv1] ≗ ⟦T2⟧{M}[gv2,⫯[0←d]lv2]) →
+       ⟦ⓛ{p}W1.T1⟧[gv1,lv1] ≗ ⟦ⓛ{p}W2.T2⟧[gv2,lv2]
 }.
 
 record is_injective (M): Prop ≝ {
index a0f7b84d117d85e32b1f8ea946599450c1820d9d..00358c9a2da3d488bdec6734430fe3d2a8a6a2ab 100644 (file)
@@ -20,7 +20,7 @@ include "apps_2/models/model.ma".
 
 definition tm_dd ≝ term.
 
-definition tm_sq (h) (T1) (T2) ≝  ⦃⋆, ⋆⦄ ⊢ T1 ⬌*[h] T2.
+definition tm_sq (h) (T1) (T2) ≝  ⦃⋆,⋆⦄ ⊢ T1 ⬌*[h] T2.
 
 definition tm_sv (s) ≝ ⋆s.
 
index 4d3d16c1e2ca2be618b74b76c9cca1991c93d48a..3d9e440a7f42980bf63ca0bd8e7aafae74927249 100644 (file)
@@ -83,7 +83,7 @@ qed-.
 
 lemma ti_comp (M): is_model M →
                    ∀T,gv1,gv2. gv1 ≗ gv2 → ∀lv1,lv2. lv1 ≗ lv2 →
-                   ⟦T⟧[gv1, lv1] ≗{M} ⟦T⟧[gv2, lv2].
+                   ⟦T⟧[gv1,lv1] ≗{M} ⟦T⟧[gv2,lv2].
 #M #HM #T elim T -T * [||| #p * | * ]
 [ /4 width=5 by seq_trans, seq_sym, ms/
 | /4 width=5 by seq_sym, ml, mq/
index d7a225140df1d9efafe82b49419f8d8ac24fcb1f..13a0f9113c23e77285a929b81928b35b8ded52b2 100644 (file)
@@ -22,7 +22,7 @@ include "apps_2/models/veq.ma".
 
 fact lifts_fwd_vpush_aux (M): is_model M → is_extensional M →
                               ∀f,T1,T2. ⬆*[f] T1 ≘ T2 → ∀m. 𝐁❴m,1❵ = f →
-                              ∀gv,lv,d. ⟦T1⟧[gv, lv] ≗{M} ⟦T2⟧[gv, ⫯[m←d]lv].
+                              ∀gv,lv,d. ⟦T1⟧[gv,lv] ≗{M} ⟦T2⟧[gv,⫯[m←d]lv].
 #M #H1M #H2M #f #T1 #T2 #H elim H -f -T1 -T2
 [ #f #s #m #Hf #gv #lv #d
   @(mq … H1M) [4,5: /3 width=2 by seq_sym, ms/ |1,2: skip ]
@@ -67,5 +67,5 @@ qed-.
 
 lemma lifts_SO_fwd_vpush (M) (gv): is_model M → is_extensional M →
                                    ∀T1,T2. ⬆*[1] T1 ≘ T2 →
-                                   ∀lv,d. ⟦T1⟧[gv, lv] ≗{M} ⟦T2⟧[gv, ⫯[0←d]lv].
+                                   ∀lv,d. ⟦T1⟧[gv,lv] ≗{M} ⟦T2⟧[gv,⫯[0←d]lv].
 /2 width=3 by lifts_fwd_vpush_aux/ qed-.
index dabd2c43178ab629332f6c401a6b2079799bf630..34e9de237d2cf58588e1857efe3afaba59363ba2 100644 (file)
@@ -20,7 +20,7 @@ include "apps_2/models/veq.ma".
 
 inductive vpushs (M) (gv) (lv): relation2 lenv (evaluation M) ≝
 | vpushs_atom: vpushs M gv lv (⋆) lv
-| vpushs_abbr: ∀v,d,K,V. vpushs M gv lv K v → ⟦V⟧[gv, v] = d → vpushs M gv lv (K.ⓓV) (⫯[0←d]v)
+| vpushs_abbr: ∀v,d,K,V. vpushs M gv lv K v → ⟦V⟧[gv,v] = d → vpushs M gv lv (K.ⓓV) (⫯[0←d]v)
 | vpushs_abst: ∀v,d,K,V. vpushs M gv lv K v → vpushs M gv lv (K.ⓛV) (⫯[0←d]v)
 | vpushs_unit: ∀v,d,I,K. vpushs M gv lv K v → vpushs M gv lv (K.ⓤ{I}) (⫯[0←d]v)
 | vpushs_repl: ∀v1,v2,L. vpushs M gv lv L v1 → v1 ≗ v2 → vpushs M gv lv L v2
@@ -51,7 +51,7 @@ lemma vpushs_inv_atom (M) (gv) (lv): is_model M →
 fact vpushs_inv_abbr_aux (M) (gv) (lv): is_model M →
                                         ∀y,L. L ⨁{M}[gv] lv ≘ y →
                                         ∀K,V. K.ⓓV = L →
-                                        ∃∃v. K ⨁[gv] lv ≘ v & ⫯[0←⟦V⟧[gv, v]]v ≗ y.
+                                        ∃∃v. K ⨁[gv] lv ≘ v & ⫯[0←⟦V⟧[gv,v]]v ≗ y.
 #M #gv #lv #HM #y #L #H elim H -y -L
 [ #Y #X #H destruct
 | #v #d #K #V #Hv #Hd #_ #Y #X #H destruct
@@ -66,7 +66,7 @@ qed-.
 
 lemma vpushs_inv_abbr (M) (gv) (lv): is_model M →
                                      ∀y,K,V. K.ⓓV ⨁{M}[gv] lv ≘ y →
-                                     ∃∃v. K ⨁[gv] lv ≘ v & ⫯[0←⟦V⟧[gv, v]]v ≗ y.
+                                     ∃∃v. K ⨁[gv] lv ≘ v & ⫯[0←⟦V⟧[gv,v]]v ≗ y.
 /2 width=3 by vpushs_inv_abbr_aux/ qed-.
 
 fact vpushs_inv_abst_aux (M) (gv) (lv): is_model M →
index 59f9b3e84fa4a49b717fcf69c9693e0f09650c1f..8ac1699861e2c7751fcc34c38fd31e26d7bd645f 100644 (file)
@@ -21,8 +21,8 @@ include "apps_2/models/vpushs.ma".
 
 lemma vpushs_fold (M): is_model M → is_extensional M →
                        ∀L,T1,T2,gv,lv.
-                       (∀v. L ⨁[gv] lv ≘ v → ⟦T1⟧[gv, v] ≗ ⟦T2⟧[gv, v]) → 
-                       ⟦L+T1⟧[gv, lv] ≗{M} ⟦L+T2⟧[gv, lv].
+                       (∀v. L ⨁[gv] lv ≘ v → ⟦T1⟧[gv,v] ≗ ⟦T2⟧[gv,v]) → 
+                       ⟦L+T1⟧[gv,lv] ≗{M} ⟦L+T2⟧[gv,lv].
 #M #H1M #H2M #L elim L -L [| #K * [| * ]]
 [ #T1 #T2 #gv #lv #H12
   >fold_atom >fold_atom
@@ -44,8 +44,8 @@ qed.
 (* Inversion lemmas with fold for restricted closures ***********************)
 
 lemma vpushs_inv_fold (M): is_model M → is_injective M →
-                           ∀L,T1,T2,gv,lv. ⟦L+T1⟧[gv, lv] ≗{M} ⟦L+T2⟧[gv, lv] →
-                           ∀v. L ⨁[gv] lv ≘ v → ⟦T1⟧[gv, v] ≗ ⟦T2⟧[gv, v].
+                           ∀L,T1,T2,gv,lv. ⟦L+T1⟧[gv,lv] ≗{M} ⟦L+T2⟧[gv,lv] →
+                           ∀v. L ⨁[gv] lv ≘ v → ⟦T1⟧[gv,v] ≗ ⟦T2⟧[gv,v].
 #M #H1M #H2M #L elim L -L [| #K * [| * ]]
 [ #T1 #T2 #gv #lv
   >fold_atom >fold_atom #H12 #v #H
index c3fa8e11bcb9000d92c76518604cf109360f305a..4b51fb944f4303ddf97276e27da8320eda32dbe5 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
+include "static_2/syntax/ac.ma".
 include "basic_2/notation/relations/exclaim_5.ma".
-include "basic_2/notation/relations/exclaim_4.ma".
-include "basic_2/notation/relations/exclaimstar_4.ma".
 include "basic_2/rt_computation/cpms.ma".
 
 (* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
 
 (* activate genv *)
 (* Basic_2A1: uses: snv *)
-inductive cnv (a) (h): relation3 genv lenv term ≝
-| cnv_sort: ∀G,L,s. cnv a h G L (⋆s)
-| cnv_zero: ∀I,G,K,V. cnv a h G K V → cnv a h G (K.ⓑ{I}V) (#0)
-| cnv_lref: ∀I,G,K,i. cnv a h G K (#i) → cnv a h G (K.ⓘ{I}) (#↑i)
-| cnv_bind: ∀p,I,G,L,V,T. cnv a h G L V → cnv a h G (L.ⓑ{I}V) T → cnv a h G L (ⓑ{p,I}V.T)
-| cnv_appl: ∀n,p,G,L,V,W0,T,U0. (a = Ⓣ → n ≤ 1) → cnv a h G L V → cnv a h G L T →
-            ⦃G, L⦄ ⊢ V ➡*[1, h] W0 → ⦃G, L⦄ ⊢ T ➡*[n, h] ⓛ{p}W0.U0 → cnv a h G L (ⓐV.T)
-| cnv_cast: ∀G,L,U,T,U0. cnv a h G L U → cnv a h G L T →
-            ⦃G, L⦄ ⊢ U ➡*[h] U0 → ⦃G, L⦄ ⊢ T ➡*[1, h] U0 → cnv a h G L (ⓝU.T)
+inductive cnv (h) (a): relation3 genv lenv term ≝
+| cnv_sort: ∀G,L,s. cnv h a G L (⋆s)
+| cnv_zero: ∀I,G,K,V. cnv h a G K V → cnv h a G (K.ⓑ{I}V) (#0)
+| cnv_lref: ∀I,G,K,i. cnv h a G K (#i) → cnv h a G (K.ⓘ{I}) (#↑i)
+| cnv_bind: ∀p,I,G,L,V,T. cnv h a G L V → cnv h a G (L.ⓑ{I}V) T → cnv h a G L (ⓑ{p,I}V.T)
+| cnv_appl: ∀n,p,G,L,V,W0,T,U0. ad a n → cnv h a G L V → cnv h a G L T →
+            ⦃G,L⦄ ⊢ V ➡*[1,h] W0 → ⦃G,L⦄ ⊢ T ➡*[n,h] ⓛ{p}W0.U0 → cnv h a G L (ⓐV.T)
+| cnv_cast: ∀G,L,U,T,U0. cnv h a G L U → cnv h a G L T →
+            ⦃G,L⦄ ⊢ U ➡*[h] U0 → ⦃G,L⦄ ⊢ T ➡*[1,h] U0 → cnv h a G L (ⓝU.T)
 .
 
 interpretation "context-sensitive native validity (term)"
-   'Exclaim a h G L T = (cnv a h G L T).
-
-interpretation "context-sensitive restricted native validity (term)"
-   'Exclaim h G L T = (cnv true h G L T).
-
-interpretation "context-sensitive extended native validity (term)"
-   'ExclaimStar h G L T = (cnv false h G L T).
+  'Exclaim h a G L T = (cnv h a G L T).
 
 (* Basic inversion lemmas ***************************************************)
 
-fact cnv_inv_zero_aux (a) (h): ∀G,L,X. ⦃G, L⦄ ⊢ X ![a, h] → X = #0 →
-                               ∃∃I,K,V. ⦃G, K⦄ ⊢ V ![a, h] & L = K.ⓑ{I}V.
-#a #h #G #L #X * -G -L -X
+fact cnv_inv_zero_aux (h) (a):
+     ∀G,L,X. ⦃G,L⦄ ⊢ X ![h,a] → X = #0 →
+     ∃∃I,K,V. ⦃G,K⦄ ⊢ V ![h,a] & L = K.ⓑ{I}V.
+#h #a #G #L #X * -G -L -X
 [ #G #L #s #H destruct
 | #I #G #K #V #HV #_ /2 width=5 by ex2_3_intro/
 | #I #G #K #i #_ #H destruct
@@ -55,13 +49,15 @@ fact cnv_inv_zero_aux (a) (h): ∀G,L,X. ⦃G, L⦄ ⊢ X ![a, h] → X = #0 →
 ]
 qed-.
 
-lemma cnv_inv_zero (a) (h): ∀G,L. ⦃G, L⦄ ⊢ #0 ![a, h] →
-                            ∃∃I,K,V. ⦃G, K⦄ ⊢ V ![a, h] & L = K.ⓑ{I}V.
+lemma cnv_inv_zero (h) (a):
+      ∀G,L. ⦃G,L⦄ ⊢ #0 ![h,a] →
+      ∃∃I,K,V. ⦃G,K⦄ ⊢ V ![h,a] & L = K.ⓑ{I}V.
 /2 width=3 by cnv_inv_zero_aux/ qed-.
 
-fact cnv_inv_lref_aux (a) (h): ∀G,L,X. ⦃G, L⦄ ⊢ X ![a, h] → ∀i. X = #(↑i) →
-                              ∃∃I,K. ⦃G, K⦄ ⊢ #i ![a, h] & L = K.ⓘ{I}.
-#a #h #G #L #X * -G -L -X
+fact cnv_inv_lref_aux (h) (a):
+     ∀G,L,X. ⦃G,L⦄ ⊢ X ![h,a] → ∀i. X = #(↑i) →
+     ∃∃I,K. ⦃G,K⦄ ⊢ #i ![h,a] & L = K.ⓘ{I}.
+#h #a #G #L #X * -G -L -X
 [ #G #L #s #j #H destruct
 | #I #G #K #V #_ #j #H destruct
 | #I #G #L #i #Hi #j #H destruct /2 width=4 by ex2_2_intro/
@@ -71,12 +67,13 @@ fact cnv_inv_lref_aux (a) (h): ∀G,L,X. ⦃G, L⦄ ⊢ X ![a, h] → ∀i. X =
 ]
 qed-.
 
-lemma cnv_inv_lref (a) (h): ∀G,L,i. ⦃G, L⦄ ⊢ #↑i ![a, h] →
-                            ∃∃I,K. ⦃G, K⦄ ⊢ #i ![a, h] & L = K.ⓘ{I}.
+lemma cnv_inv_lref (h) (a):
+      ∀G,L,i. ⦃G,L⦄ ⊢ #↑i ![h,a] →
+      ∃∃I,K. ⦃G,K⦄ ⊢ #i ![h,a] & L = K.ⓘ{I}.
 /2 width=3 by cnv_inv_lref_aux/ qed-.
 
-fact cnv_inv_gref_aux (a) (h): ∀G,L,X. ⦃G, L⦄ ⊢ X ![a, h] → ∀l. X = §l → ⊥.
-#a #h #G #L #X * -G -L -X
+fact cnv_inv_gref_aux (h) (a): ∀G,L,X. ⦃G,L⦄ ⊢ X ![h,a] → ∀l. X = §l → ⊥.
+#h #a #G #L #X * -G -L -X
 [ #G #L #s #l #H destruct
 | #I #G #K #V #_ #l #H destruct
 | #I #G #K #i #_ #l #H destruct
@@ -87,14 +84,14 @@ fact cnv_inv_gref_aux (a) (h): ∀G,L,X. ⦃G, L⦄ ⊢ X ![a, h] → ∀l. X =
 qed-.
 
 (* Basic_2A1: uses: snv_inv_gref *)
-lemma cnv_inv_gref (a) (h): ∀G,L,l. ⦃G, L⦄ ⊢ §l ![a, h] → ⊥.
+lemma cnv_inv_gref (h) (a): ∀G,L,l. ⦃G,L⦄ ⊢ §l ![h,a] → ⊥.
 /2 width=8 by cnv_inv_gref_aux/ qed-.
 
-fact cnv_inv_bind_aux (a) (h): ∀G,L,X. ⦃G, L⦄ ⊢ X ![a, h] →
-                               ∀p,I,V,T. X = ⓑ{p,I}V.T →
-                               ∧∧ ⦃G, L⦄ ⊢ V ![a, h]
-                                & ⦃G, L.ⓑ{I}V⦄ ⊢ T ![a, h].
-#a #h #G #L #X * -G -L -X
+fact cnv_inv_bind_aux (h) (a):
+     ∀G,L,X. ⦃G,L⦄ ⊢ X ![h,a] →
+     ∀p,I,V,T. X = ⓑ{p,I}V.T →
+     ∧∧ ⦃G,L⦄ ⊢ V ![h,a] & ⦃G,L.ⓑ{I}V⦄ ⊢ T ![h,a].
+#h #a #G #L #X * -G -L -X
 [ #G #L #s #q #Z #X1 #X2 #H destruct
 | #I #G #K #V #_ #q #Z #X1 #X2 #H destruct
 | #I #G #K #i #_ #q #Z #X1 #X2 #H destruct
@@ -105,15 +102,16 @@ fact cnv_inv_bind_aux (a) (h): ∀G,L,X. ⦃G, L⦄ ⊢ X ![a, h] →
 qed-.
 
 (* Basic_2A1: uses: snv_inv_bind *)
-lemma cnv_inv_bind (a) (h): ∀p,I,G,L,V,T. ⦃G, L⦄ ⊢ ⓑ{p,I}V.T ![a, h] →
-                            ∧∧ ⦃G, L⦄ ⊢ V ![a, h]
-                             & ⦃G, L.ⓑ{I}V⦄ ⊢ T ![a, h].
+lemma cnv_inv_bind (h) (a):
+      ∀p,I,G,L,V,T. ⦃G,L⦄ ⊢ ⓑ{p,I}V.T ![h,a] →
+      ∧∧ ⦃G,L⦄ ⊢ V ![h,a] & ⦃G,L.ⓑ{I}V⦄ ⊢ T ![h,a].
 /2 width=4 by cnv_inv_bind_aux/ qed-.
 
-fact cnv_inv_appl_aux (a) (h): ∀G,L,X. ⦃G, L⦄ ⊢ X ![a, h] → ∀V,T. X = ⓐV.T →
-                               ∃∃n,p,W0,U0. a = Ⓣ → n ≤ 1 & ⦃G, L⦄ ⊢ V ![a, h] & ⦃G, L⦄ ⊢ T ![a, h] &
-                                            ⦃G, L⦄ ⊢ V ➡*[1, h] W0 & ⦃G, L⦄ ⊢ T ➡*[n, h] ⓛ{p}W0.U0.
-#a #h #G #L #X * -L -X
+fact cnv_inv_appl_aux (h) (a):
+     ∀G,L,X. ⦃G,L⦄ ⊢ X ![h,a] → ∀V,T. X = ⓐV.T →
+     ∃∃n,p,W0,U0. ad a n & ⦃G,L⦄ ⊢ V ![h,a] & ⦃G,L⦄ ⊢ T ![h,a] &
+                  ⦃G,L⦄ ⊢ V ➡*[1,h] W0 & ⦃G,L⦄ ⊢ T ➡*[n,h] ⓛ{p}W0.U0.
+#h #a #G #L #X * -L -X
 [ #G #L #s #X1 #X2 #H destruct
 | #I #G #K #V #_ #X1 #X2 #H destruct
 | #I #G #K #i #_ #X1 #X2 #H destruct
@@ -124,15 +122,17 @@ fact cnv_inv_appl_aux (a) (h): ∀G,L,X. ⦃G, L⦄ ⊢ X ![a, h] → ∀V,T. X
 qed-.
 
 (* Basic_2A1: uses: snv_inv_appl *)
-lemma cnv_inv_appl (a) (h): ∀G,L,V,T. ⦃G, L⦄ ⊢ ⓐV.T ![a, h] →
-                            ∃∃n,p,W0,U0. a = Ⓣ → n ≤ 1 & ⦃G, L⦄ ⊢ V ![a, h] & ⦃G, L⦄ ⊢ T ![a, h] &
-                                         ⦃G, L⦄ ⊢ V ➡*[1, h] W0 & ⦃G, L⦄ ⊢ T ➡*[n, h] ⓛ{p}W0.U0.
+lemma cnv_inv_appl (h) (a):
+      ∀G,L,V,T. ⦃G,L⦄ ⊢ ⓐV.T ![h,a] →
+      ∃∃n,p,W0,U0. ad a n & ⦃G,L⦄ ⊢ V ![h,a] & ⦃G,L⦄ ⊢ T ![h,a] &
+                   ⦃G,L⦄ ⊢ V ➡*[1,h] W0 & ⦃G,L⦄ ⊢ T ➡*[n,h] ⓛ{p}W0.U0.
 /2 width=3 by cnv_inv_appl_aux/ qed-.
 
-fact cnv_inv_cast_aux (a) (h): ∀G,L,X. ⦃G, L⦄ ⊢ X ![a, h] → ∀U,T. X = ⓝU.T →
-                               ∃∃U0. ⦃G, L⦄ ⊢ U ![a, h] & ⦃G, L⦄ ⊢ T ![a, h] &
-                                     ⦃G, L⦄ ⊢ U ➡*[h] U0 & ⦃G, L⦄ ⊢ T ➡*[1, h] U0.
-#a #h #G #L #X * -G -L -X
+fact cnv_inv_cast_aux (h) (a):
+     ∀G,L,X. ⦃G,L⦄ ⊢ X ![h,a] → ∀U,T. X = ⓝU.T →
+     ∃∃U0. ⦃G,L⦄ ⊢ U ![h,a] & ⦃G,L⦄ ⊢ T ![h,a] &
+           ⦃G,L⦄ ⊢ U ➡*[h] U0 & ⦃G,L⦄ ⊢ T ➡*[1,h] U0.
+#h #a #G #L #X * -G -L -X
 [ #G #L #s #X1 #X2 #H destruct
 | #I #G #K #V #_ #X1 #X2 #H destruct
 | #I #G #K #i #_ #X1 #X2 #H destruct
@@ -142,23 +142,32 @@ fact cnv_inv_cast_aux (a) (h): ∀G,L,X. ⦃G, L⦄ ⊢ X ![a, h] → ∀U,T. X
 ]
 qed-.
 
-(* Basic_2A1: uses: snv_inv_appl *)
-lemma cnv_inv_cast (a) (h): ∀G,L,U,T. ⦃G, L⦄ ⊢ ⓝU.T ![a, h] →
-                            ∃∃U0. ⦃G, L⦄ ⊢ U ![a, h] & ⦃G, L⦄ ⊢ T ![a, h] &
-                                  ⦃G, L⦄ ⊢ U ➡*[h] U0 & ⦃G, L⦄ ⊢ T ➡*[1, h] U0.
+(* Basic_2A1: uses: snv_inv_cast *)
+lemma cnv_inv_cast (h) (a):
+      ∀G,L,U,T. ⦃G,L⦄ ⊢ ⓝU.T ![h,a] →
+      ∃∃U0. ⦃G,L⦄ ⊢ U ![h,a] & ⦃G,L⦄ ⊢ T ![h,a] &
+            ⦃G,L⦄ ⊢ U ➡*[h] U0 & ⦃G,L⦄ ⊢ T ➡*[1,h] U0.
 /2 width=3 by cnv_inv_cast_aux/ qed-.
 
 (* Basic forward lemmas *****************************************************)
 
-lemma cnv_fwd_flat (a) (h) (I) (G) (L):
-                   ∀V,T. ⦃G, L⦄ ⊢ ⓕ{I}V.T ![a,h] →
-                   ∧∧ ⦃G, L⦄ ⊢ V ![a,h] & ⦃G, L⦄ ⊢ T ![a,h].
-#a #h * #G #L #V #T #H
+lemma cnv_fwd_flat (h) (a) (I) (G) (L):
+      ∀V,T. ⦃G,L⦄ ⊢ ⓕ{I}V.T ![h,a] →
+      ∧∧ ⦃G,L⦄ ⊢ V ![h,a] & ⦃G,L⦄ ⊢ T ![h,a].
+#h #a * #G #L #V #T #H
 [ elim (cnv_inv_appl … H) #n #p #W #U #_ #HV #HT #_ #_
 | elim (cnv_inv_cast … H) #U #HV #HT #_ #_
 ] -H /2 width=1 by conj/
 qed-.
 
+lemma cnv_fwd_pair_sn (h) (a) (I) (G) (L):
+      ∀V,T. ⦃G,L⦄ ⊢ ②{I}V.T ![h,a] → ⦃G,L⦄ ⊢ V ![h,a].
+#h #a * [ #p ] #I #G #L #V #T #H
+[ elim (cnv_inv_bind … H) -H #HV #_
+| elim (cnv_fwd_flat … H) -H #HV #_
+] //
+qed-.
+
 (* Basic_2A1: removed theorems 3:
               shnv_cast shnv_inv_cast snv_shnv_cast
 *)
index 7f71bea7cb0c88557eed5090e04b90d427b9af81..e96946f0673066215fd627ab7175bf52bb02c8c2 100644 (file)
 include "basic_2/rt_computation/cpms_aaa.ma".
 include "basic_2/dynamic/cnv.ma".
 
-(* CONTEXT_SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
+(* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
 
 (* Forward lemmas on atomic arity assignment for terms **********************)
 
 (* Basic_2A1: uses: snv_fwd_aaa *)
-lemma cnv_fwd_aaa (a) (h): ∀G,L,T. ⦃G, L⦄ ⊢ T ![a, h] → ∃A. ⦃G, L⦄ ⊢ T ⁝ A.
-#a #h #G #L #T #H elim H -G -L -T
+lemma cnv_fwd_aaa (h) (a): ∀G,L,T. ⦃G,L⦄ ⊢ T ![h,a] → ∃A. ⦃G,L⦄ ⊢ T ⁝ A.
+#h #a #G #L #T #H elim H -G -L -T
 [ /2 width=2 by aaa_sort, ex_intro/
 | #I #G #L #V #_ * /3 width=2 by aaa_zero, ex_intro/
 | #I #G #L #K #_ * /3 width=2 by aaa_lref, ex_intro/
@@ -43,18 +43,39 @@ qed-.
 
 (* Forward lemmas with t_bound rt_transition for terms **********************)
 
-lemma cnv_fwd_cpm_SO (a) (h) (G) (L):
-      ∀T. ⦃G, L⦄ ⊢ T ![a, h] → ∃U. ⦃G,L⦄ ⊢ T ➡[1,h] U.
-#a #h #G #L #T #H
+lemma cnv_fwd_cpm_SO (h) (a) (G) (L):
+      ∀T. ⦃G,L⦄ ⊢ T ![h,a] → ∃U. ⦃G,L⦄ ⊢ T ➡[1,h] U.
+#h #a #G #L #T #H
 elim (cnv_fwd_aaa … H) -H #A #HA
 /2 width=2 by aaa_cpm_SO/
 qed-.
 
 (* Forward lemmas with t_bound rt_computation for terms *********************)
 
-lemma cnv_fwd_cpms_total (a) (h) (n) (G) (L):
-      ∀T. ⦃G, L⦄ ⊢ T ![a, h] → ∃U. ⦃G,L⦄ ⊢ T ➡*[n,h] U.
-#a #h #n #G #L #T #H
+lemma cnv_fwd_cpms_total (h) (a) (n) (G) (L):
+      ∀T. ⦃G,L⦄ ⊢ T ![h,a] → ∃U. ⦃G,L⦄ ⊢ T ➡*[n,h] U.
+#h #a #n #G #L #T #H
 elim (cnv_fwd_aaa … H) -H #A #HA
-/2 width=2 by aaa_cpms_total/
+/2 width=2 by cpms_total_aaa/
 qed-.
+
+lemma cnv_fwd_cpms_abst_dx_le (h) (a) (G) (L) (W) (p):
+      ∀T. ⦃G,L⦄ ⊢ T ![h,a] →
+      ∀n1,U1. ⦃G,L⦄ ⊢ T ➡*[n1,h] ⓛ{p}W.U1 → ∀n2. n1 ≤ n2 →
+      ∃∃U2. ⦃G,L⦄ ⊢ T ➡*[n2,h] ⓛ{p}W.U2 & ⦃G,L.ⓛW⦄ ⊢ U1 ➡*[n2-n1,h] U2.
+#h #a #G #L #W #p #T #H
+elim (cnv_fwd_aaa … H) -H #A #HA
+/2 width=2 by cpms_abst_dx_le_aaa/
+qed-.
+
+(* Advanced properties ******************************************************)
+
+lemma cnv_appl_ge (h) (a) (n1) (p) (G) (L):
+      ∀n2. n1 ≤ n2 → ad a n2 →
+      ∀V. ⦃G,L⦄ ⊢ V ![h,a] → ∀T. ⦃G,L⦄ ⊢ T ![h,a] →
+      ∀X. ⦃G,L⦄ ⊢ V ➡*[1,h] X → ∀W. ⦃G,L⦄ ⊢ W ➡*[h] X →
+      ∀U. ⦃G,L⦄ ⊢ T ➡*[n1,h] ⓛ{p}W.U → ⦃G,L⦄ ⊢ ⓐV.T ![h,a].
+#h #a #n1 #p #G #L #n2 #Hn12 #Ha #V #HV #T #HT #X #HVX #W #HW #X #HTX
+elim (cnv_fwd_cpms_abst_dx_le  … HT … HTX … Hn12) #U #HTU #_ -n1
+/4 width=11 by cnv_appl, cpms_bind, cpms_cprs_trans/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_acle.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_acle.ma
new file mode 100644 (file)
index 0000000..4a4a015
--- /dev/null
@@ -0,0 +1,42 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/acle.ma".
+include "basic_2/dynamic/cnv_aaa.ma".
+
+(* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
+
+(* Properties with preorder for applicability domains ***********************)
+
+lemma cnv_acle_trans (h) (a1) (a2):
+      a1 ⊆ a2 → ∀G,L,T. ⦃G,L⦄ ⊢ T ![h,a1] → ⦃G,L⦄ ⊢ T ![h,a2].
+#h #a1 #a2 #Ha12 #G #L #T #H elim H -G -L -T
+[ /1 width=1 by cnv_sort/
+| /3 width=1 by cnv_zero/
+| /3 width=1 by cnv_lref/
+| /3 width=1 by cnv_bind/
+| #n1 #p #G #L #V #W #T #U #Hn1 #_ #_ #HVW #HTU #IHV #IHT
+  elim (Ha12 … Hn1) -a1 #n2 #Hn2 #Hn12
+  /3 width=11 by cnv_appl_ge/
+| /3 width=3 by cnv_cast/
+]
+qed-.
+
+lemma cnv_acle_omega (h) (a):
+      ∀G,L,T. ⦃G,L⦄ ⊢ T ![h,a] → ⦃G,L⦄ ⊢ T ![h,𝛚].
+/3 width=3 by cnv_acle_trans, acle_omega/ qed-.
+
+lemma cnv_acle_one (h) (a) (n):
+      ∀G,L,T. ⦃G,L⦄ ⊢ T ![h,𝟏] → ad a n → ⦃G,L⦄ ⊢ T ![h,a].
+/3 width=3 by cnv_acle_trans, acle_one/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpce.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpce.ma
new file mode 100644 (file)
index 0000000..a4b4078
--- /dev/null
@@ -0,0 +1,69 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/cpmuwe_cpmuwe.ma".
+include "basic_2/rt_conversion/cpce_drops.ma".
+include "basic_2/dynamic/cnv_cpmuwe.ma".
+
+(* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
+
+(* Properties with context-sensitive parallel eta-conversion for terms ******)
+
+lemma cpce_total_cnv (h) (a) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ T1 ![h,a] → ∃T2. ⦃G,L⦄ ⊢ T1 ⬌η[h] T2.
+#h #a #G #L #T1 #HT1
+lapply (cnv_fwd_csx … HT1) #H
+generalize in match HT1; -HT1
+@(csx_ind_fpbg … H) -G -L -T1
+#G #L * *
+[ #s #_ #_ /2 width=2 by cpce_sort, ex_intro/
+| #i #H1i #IH #H2i
+  elim (drops_ldec_dec L i) [ * #K #W #HLK | -H1i -IH #HnX ]
+  [ lapply (cnv_inv_lref_pair … H2i … HLK) -H2i #H2W
+    lapply (csx_inv_lref_pair_drops … HLK H1i) -H1i #H1W
+    elim (cpmuwe_total_csx … H1W) -H1W #X #n #HWX
+    elim (abst_dec X) [ * | -IH ]
+    [ #p #V1 #U #H destruct
+      lapply (cpmuwe_fwd_cpms … HWX) -HWX #HWX
+      elim (IH G K V1) -IH
+      [ #V2 #HV12
+        elim (lifts_total V2 (𝐔❴↑i❵)) #W2 #HVW2
+        /3 width=12 by cpce_eta_drops, ex_intro/
+      | /3 width=6 by  cnv_cpms_trans, cnv_fwd_pair_sn/
+      | /4 width=6 by fqup_cpms_fwd_fpbg, fpbg_fqu_trans, fqup_lref/
+      ]
+    | #HnX
+      @(ex_intro … (#i))
+      @cpce_zero_drops #n0 #p #K0 #W0 #V0 #U0 #HLK0 #HWU0
+      lapply (drops_mono … HLK0 … HLK) -i -L #H destruct
+      lapply (cpmuwe_abst … HWU0) -HWU0 #HWU0
+      elim (cnv_cpmuwe_mono … H2W … HWU0 … HWX) #_ #H -a -n -n0 -W
+      elim (tweq_inv_abst_sn … H) -V0 -U0 #V0 #U0 #H destruct
+      /2 width=4 by/
+    ]
+  | /5 width=3 by cpce_zero_drops, ex1_2_intro, ex_intro/
+  ]
+| #l #_ #_ /2 width=2 by cpce_gref, ex_intro/
+| #p #I #V1 #T1 #_ #IH #H
+  elim (cnv_inv_bind … H) -H #HV1 #HT1
+  elim (IH … HV1) [| /3 width=1 by fpb_fpbg, fpb_fqu, fqu_pair_sn/ ] #V2 #HV12
+  elim (IH … HT1) [| /4 width=1 by fpb_fpbg, fpb_fqu, fqu_bind_dx/ ] #T2 #HT12
+  /3 width=2 by cpce_bind, ex_intro/
+| #I #V1 #T1 #_ #IH #H
+  elim (cnv_fwd_flat … H) -H #HV1 #HT1
+  elim (IH … HV1) [| /3 width=1 by fpb_fpbg, fpb_fqu, fqu_pair_sn/ ] #V2 #HV12
+  elim (IH … HT1) [| /3 width=1 by fpb_fpbg, fpb_fqu, fqu_flat_dx/ ] #T2 #HT12
+  /3 width=2 by cpce_flat, ex_intro/
+]
+qed-.
index ba4b824ced241b76dbdafca37c778f710bc191b4..5ed59b73998fdea2032d31ac4a3995b80d6938a9 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/rt_equivalence/cpcs_cprs.ma".
-include "basic_2/dynamic/cnv_preserve.ma".
+include "basic_2/rt_computation/csx_aaa.ma".
+include "basic_2/rt_equivalence/cpcs_csx.ma".
+include "basic_2/dynamic/cnv_aaa.ma".
 
 (* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
 
-(* Forward lemmas with r-equivalence ****************************************)
+(* Properties with r-equivalence ********************************************)
 
-lemma cnv_cpms_conf_eq (a) (h) (n) (G) (L):
-      ∀T. ⦃G,L⦄ ⊢ T ![a,h] →
-      ∀T1. ⦃G,L⦄ ⊢ T ➡*[n,h] T1 → ∀T2. ⦃G,L⦄ ⊢ T ➡*[n,h] T2 → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
-#a #h #n #G #L #T #HT #T1 #HT1 #T2 #HT2
-elim (cnv_cpms_conf … HT … HT1 … HT2) -T <minus_n_n #T #HT1 #HT2
-/2 width=3 by cprs_div/
-qed-.
-
-lemma cnv_cpms_fwd_appl_sn_decompose (a) (h) (G) (L):
-      ∀V,T. ⦃G,L⦄ ⊢ ⓐV.T ![a,h] → ∀n,X. ⦃G,L⦄ ⊢ ⓐV.T ➡*[n,h] X →
-      ∃∃U. ⦃G,L⦄ ⊢ T ![a,h] & ⦃G,L⦄ ⊢ T ➡*[n,h] U & ⦃G,L⦄ ⊢ ⓐV.U ⬌*[h] X.
-#a #h #G #L #V #T #H0 #n #X #HX
-elim (cnv_inv_appl … H0) #m #p #W #U #_ #_ #HT #_ #_ -m -p -W -U
-elim (cnv_fwd_cpms_total … h n … HT) #U #HTU
-lapply (cpms_appl_dx … V V … HTU) [ // ] #H
-/3 width=8 by cnv_cpms_conf_eq, ex3_intro/
+lemma cnv_cpcs_dec (h) (a) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ T1 ![h,a] → ∀T2. ⦃G,L⦄ ⊢ T2 ![h,a] →
+      Decidable … (⦃G,L⦄ ⊢ T1 ⬌*[h] T2).
+#h #a #G #L #T1 #HT1 #T2 #HT2
+elim (cnv_fwd_aaa … HT1) -HT1 #A1 #HA1
+elim (cnv_fwd_aaa … HT2) -HT2 #A2 #HA2
+/3 width=2 by csx_cpcs_dec, aaa_csx/
 qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpes.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpes.ma
new file mode 100644 (file)
index 0000000..fbf407f
--- /dev/null
@@ -0,0 +1,76 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/cpms_cpms.ma".
+include "basic_2/rt_equivalence/cpes.ma".
+include "basic_2/dynamic/cnv.ma".
+
+(* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
+
+(* Properties with t-bound rt-equivalence for terms *************************)
+
+lemma cnv_appl_cpes (h) (a) (G) (L):
+      ∀n. ad a n →
+      ∀V. ⦃G,L⦄ ⊢ V ![h,a] → ∀T. ⦃G,L⦄ ⊢ T ![h,a] →
+      ∀W. ⦃G,L⦄ ⊢ V ⬌*[h,1,0] W →
+      ∀p,U. ⦃G,L⦄ ⊢ T ➡*[n,h] ⓛ{p}W.U → ⦃G,L⦄ ⊢ ⓐV.T ![h,a].
+#h #a #G #L #n #Hn #V #HV #T #HT #W *
+/4 width=11 by cnv_appl, cpms_cprs_trans, cpms_bind/
+qed.
+
+lemma cnv_cast_cpes (h) (a) (G) (L):
+      ∀U. ⦃G,L⦄ ⊢ U ![h,a] →
+      ∀T. ⦃G,L⦄ ⊢ T ![h,a] → ⦃G,L⦄ ⊢ U ⬌*[h,0,1] T → ⦃G,L⦄ ⊢ ⓝU.T ![h,a].
+#h #a #G #L #U #HU #T #HT * /2 width=3 by cnv_cast/
+qed.
+
+(* Inversion lemmas with t-bound rt-equivalence for terms *******************)
+
+lemma cnv_inv_appl_cpes (h) (a) (G) (L):
+      ∀V,T. ⦃G,L⦄ ⊢ ⓐV.T ![h,a] →
+      ∃∃n,p,W,U. ad a n & ⦃G,L⦄ ⊢ V ![h,a] & ⦃G,L⦄ ⊢ T ![h,a] &
+                 ⦃G,L⦄ ⊢ V ⬌*[h,1,0] W & ⦃G,L⦄ ⊢ T ➡*[n,h] ⓛ{p}W.U.
+#h #a #G #L #V #T #H
+elim (cnv_inv_appl … H) -H #n #p #W #U #Hn #HV #HT #HVW #HTU
+/3 width=7 by cpms_div, ex5_4_intro/
+qed-.
+
+lemma cnv_inv_cast_cpes (h) (a) (G) (L):
+      ∀U,T. ⦃G,L⦄ ⊢ ⓝU.T ![h,a] →
+      ∧∧ ⦃G,L⦄ ⊢ U ![h,a] & ⦃G,L⦄ ⊢ T ![h,a] & ⦃G,L⦄ ⊢ U ⬌*[h,0,1] T.
+#h #a #G #L #U #T #H
+elim (cnv_inv_cast … H) -H
+/3 width=3 by cpms_div, and3_intro/
+qed-.
+
+(* Eliminators with t-bound rt-equivalence for terms ************************)
+
+lemma cnv_ind_cpes (h) (a) (Q:relation3 genv lenv term):
+      (∀G,L,s. Q G L (⋆s)) →
+      (∀I,G,K,V. ⦃G,K⦄ ⊢ V![h,a] → Q G K V → Q G (K.ⓑ{I}V) (#O)) →
+      (∀I,G,K,i. ⦃G,K⦄ ⊢ #i![h,a] → Q G K (#i) → Q G (K.ⓘ{I}) (#(↑i))) →
+      (∀p,I,G,L,V,T. ⦃G,L⦄ ⊢ V![h,a] → ⦃G,L.ⓑ{I}V⦄⊢T![h,a] →
+                     Q G L V →Q G (L.ⓑ{I}V) T →Q G L (ⓑ{p,I}V.T)
+      ) →
+      (∀n,p,G,L,V,W,T,U. ad a n → ⦃G,L⦄ ⊢ V![h,a] → ⦃G,L⦄ ⊢ T![h,a] →
+                         ⦃G,L⦄ ⊢ V ⬌*[h,1,0]W → ⦃G,L⦄ ⊢ T ➡*[n,h] ⓛ{p}W.U →
+                         Q G L V → Q G L T → Q G L (ⓐV.T)
+      ) →
+      (∀G,L,U,T. ⦃G,L⦄⊢ U![h,a] → ⦃G,L⦄ ⊢ T![h,a] → ⦃G,L⦄ ⊢ U ⬌*[h,0,1] T →
+                 Q G L U → Q G L T → Q G L (ⓝU.T)
+      ) →
+      ∀G,L,T. ⦃G,L⦄⊢ T![h,a] → Q G L T.
+#h #a #Q #IH1 #IH2 #IH3 #IH4 #IH5 #IH6 #G #L #T #H
+elim H -G -L -T [5,6: /3 width=7 by cpms_div/ |*: /2 width=1 by/ ]
+qed-.
index b9b6e4bf8c58f8fad2c366d55b7ed4224088e5d6..60f0a5e79b78c84da4244b26353fbb7a141d39c2 100644 (file)
@@ -24,23 +24,23 @@ include "basic_2/dynamic/cnv_preserve_sub.ma".
 (* Sub diamond propery with t-bound rt-transition for terms *****************)
 
 fact cnv_cpm_conf_lpr_atom_atom_aux (h) (G) (L1) (L2) (I):
-     ∃∃T. ⦃G,L1⦄ ⊢ ⓪{I} ➡*[0,h] T & ⦃G, L2⦄ ⊢ ⓪{I} ➡*[O,h] T.
+     ∃∃T. ⦃G,L1⦄ ⊢ ⓪{I} ➡*[0,h] T & ⦃G,L2⦄ ⊢ ⓪{I} ➡*[O,h] T.
 /2 width=3 by ex2_intro/ qed-.
 
 fact cnv_cpm_conf_lpr_atom_ess_aux (h) (G) (L1) (L2) (s):
-     ∃∃T. ⦃G,L1⦄ ⊢ ⋆s ➡*[1,h] T & ⦃G,L2⦄ ⊢ ⋆(next h s) ➡*[h] T.
+     ∃∃T. ⦃G,L1⦄ ⊢ ⋆s ➡*[1,h] T & ⦃G,L2⦄ ⊢ ⋆(⫯[h]s) ➡*[h] T.
 /3 width=3 by cpm_cpms, ex2_intro/ qed-.
 
-fact cnv_cpm_conf_lpr_atom_delta_aux (a) (h) (o) (G) (L) (i):
-     (∀G0,L0,T0. ⦃G,L,#i⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr a h G0 L0 T0) →
-     ⦃G,L⦄⊢#i![a,h] →
+fact cnv_cpm_conf_lpr_atom_delta_aux (h) (a) (G) (L) (i):
+     (∀G0,L0,T0. ⦃G,L,#i⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
+     ⦃G,L⦄⊢#i![h,a] →
      ∀K,V. ⬇*[i]L ≘ K.ⓓV →
      ∀n,XV. ⦃G,K⦄ ⊢ V ➡[n,h] XV →
      ∀X. ⬆*[↑i]XV ≘ X →
      ∀L1. ⦃G,L⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L⦄ ⊢ ➡[h] L2 →
      ∃∃T. ⦃G,L1⦄ ⊢ #i ➡*[n,h] T & ⦃G,L2⦄ ⊢ X ➡*[h] T.
-#a #h #o #G #L #i #IH #HT #K #V #HLK #n #XV #HVX #X #HXV #L1 #HL1 #L2 #HL2
-lapply (cnv_lref_fwd_drops … HT … HLK) -HT #HV
+#h #a #G #L #i #IH #HT #K #V #HLK #n #XV #HVX #X #HXV #L1 #HL1 #L2 #HL2
+lapply (cnv_inv_lref_pair … HT … HLK) -HT #HV
 elim (lpr_drops_conf … HLK … HL1) -HL1 // #Y1 #H1 #HLK1
 elim (lpr_inv_pair_sn … H1) -H1 #K1 #V1 #HK1 #HV1 #H destruct
 elim (lpr_drops_conf … HLK … HL2) -HL2 // #Y2 #H2 #HLK2
@@ -53,16 +53,16 @@ elim (cpms_lifts_sn … HVX … HLK2 … HXV) -XV -HLK2 #XV #HVX #HXV
 /3 width=6 by cpms_delta_drops, ex2_intro/
 qed-.
 
-fact cnv_cpm_conf_lpr_atom_ell_aux (a) (h) (o) (G) (L) (i):
-     (∀G0,L0,T0. ⦃G,L,#i⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr a h G0 L0 T0) →
-     ⦃G,L⦄⊢#i![a,h] →
+fact cnv_cpm_conf_lpr_atom_ell_aux (h) (a) (G) (L) (i):
+     (∀G0,L0,T0. ⦃G,L,#i⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
+     ⦃G,L⦄⊢#i![h,a] →
      ∀K,W. ⬇*[i]L ≘ K.ⓛW →
      ∀n,XW. ⦃G,K⦄ ⊢ W ➡[n,h] XW →
      ∀X. ⬆*[↑i]XW ≘ X →
      ∀L1. ⦃G,L⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L⦄ ⊢ ➡[h] L2 →
      ∃∃T. ⦃G,L1⦄ ⊢ #i ➡*[↑n,h] T & ⦃G,L2⦄ ⊢ X ➡*[h] T.
-#a #h #o #G #L #i #IH #HT #K #W #HLK #n #XW #HWX #X #HXW #L1 #HL1 #L2 #HL2
-lapply (cnv_lref_fwd_drops … HT … HLK) -HT #HW
+#h #a #G #L #i #IH #HT #K #W #HLK #n #XW #HWX #X #HXW #L1 #HL1 #L2 #HL2
+lapply (cnv_inv_lref_pair … HT … HLK) -HT #HW
 elim (lpr_drops_conf … HLK … HL1) -HL1 // #Y1 #H1 #HLK1
 elim (lpr_inv_pair_sn … H1) -H1 #K1 #W1 #HK1 #HW1 #H destruct
 elim (lpr_drops_conf … HLK … HL2) -HL2 // #Y2 #H2 #HLK2
@@ -75,19 +75,19 @@ elim (cpms_lifts_sn … HWX … HLK2 … HXW) -XW -HLK2 #XW #HWX #HXW
 /3 width=6 by cpms_ell_drops, ex2_intro/
 qed-.
 
-fact cnv_cpm_conf_lpr_delta_delta_aux (a) (h) (o) (I) (G) (L) (i):
-     (∀G0,L0,T0. ⦃G,L,#i⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr a h G0 L0 T0) →
-     ⦃G,L⦄⊢#i![a,h] →
+fact cnv_cpm_conf_lpr_delta_delta_aux (h) (a) (I) (G) (L) (i):
+     (∀G0,L0,T0. ⦃G,L,#i⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
+     ⦃G,L⦄⊢#i![h,a] →
      ∀K1,V1. ⬇*[i]L ≘ K1.ⓑ{I}V1 → ∀K2,V2. ⬇*[i]L ≘ K2.ⓑ{I}V2 →
      ∀n1,XV1. ⦃G,K1⦄ ⊢ V1 ➡[n1,h] XV1 → ∀n2,XV2. ⦃G,K2⦄ ⊢ V2 ➡[n2,h] XV2 →
      ∀X1. ⬆*[↑i]XV1 ≘ X1 → ∀X2. ⬆*[↑i]XV2 ≘ X2 →
      ∀L1. ⦃G,L⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L⦄ ⊢ ➡[h] L2 →
      ∃∃T. ⦃G,L1⦄ ⊢ X1 ➡*[n2-n1,h] T & ⦃G,L2⦄ ⊢ X2 ➡*[n1-n2,h] T.
-#a #h #o #I #G #L #i #IH #HT
+#h #a #I #G #L #i #IH #HT
 #K #V #HLK #Y #X #HLY #n1 #XV1 #HVX1 #n2 #XV2 #HVX2 #X1 #HXV1 #X2 #HXV2
 #L1 #HL1 #L2 #HL2
 lapply (drops_mono … HLY … HLK) -HLY #H destruct
-lapply (cnv_lref_fwd_drops … HT … HLK) -HT #HV
+lapply (cnv_inv_lref_pair … HT … HLK) -HT #HV
 elim (lpr_drops_conf … HLK … HL1) -HL1 // #Y1 #H1 #HLK1
 elim (lpr_inv_pair_sn … H1) -H1 #K1 #V1 #HK1 #_ #H destruct
 lapply (drops_isuni_fwd_drop2 … HLK1) -V1 // #HLK1
@@ -107,14 +107,14 @@ fact cnv_cpm_conf_lpr_delta_ell_aux (L) (K1) (K2) (V) (W) (i):
 lapply (drops_mono … HLK2 … HLK1) -L -i #H destruct
 qed-.
 
-fact cnv_cpm_conf_lpr_bind_bind_aux (a) (h) (o) (p) (I) (G) (L) (V) (T):
-     (∀G0,L0,T0. ⦃G,L,ⓑ{p,I}V.T⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr a h G0 L0 T0) →
-     ⦃G,L⦄ ⊢ ⓑ{p,I}V.T ![a,h] →
+fact cnv_cpm_conf_lpr_bind_bind_aux (h) (a) (p) (I) (G) (L) (V) (T):
+     (∀G0,L0,T0. ⦃G,L,ⓑ{p,I}V.T⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
+     ⦃G,L⦄ ⊢ ⓑ{p,I}V.T ![h,a] →
      ∀V1. ⦃G,L⦄ ⊢ V ➡[h] V1 → ∀V2. ⦃G,L⦄ ⊢ V ➡[h] V2 →
      ∀n1,T1. ⦃G,L.ⓑ{I}V⦄ ⊢ T ➡[n1,h] T1 → ∀n2,T2. ⦃G,L.ⓑ{I}V⦄ ⊢ T ➡[n2,h] T2 →
      ∀L1. ⦃G,L⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L⦄ ⊢ ➡[h] L2 →
      ∃∃T. ⦃G,L1⦄ ⊢ ⓑ{p,I}V1.T1 ➡*[n2-n1,h] T & ⦃G,L2⦄ ⊢ ⓑ{p,I}V2.T2 ➡*[n1-n2,h] T.
-#a #h #o #p #I #G0 #L0 #V0 #T0 #IH #H0
+#h #a #p #I #G0 #L0 #V0 #T0 #IH #H0
 #V1 #HV01 #V2 #HV02 #n1 #T1 #HT01 #n2 #T2 #HT02
 #L1 #HL01 #L2 #HL02
 elim (cnv_inv_bind … H0) -H0 #HV0 #HT0
@@ -124,14 +124,14 @@ elim (cnv_cpm_conf_lpr_sub … IH … HT01 … HT02 (L1.ⓑ{I}V1) … (L2.ⓑ{I}
 /3 width=5 by cpms_bind_dx, ex2_intro/
 qed-.
 
-fact cnv_cpm_conf_lpr_bind_zeta_aux (a) (h) (o) (G) (L) (V) (T):
-     (∀G0,L0,T0. ⦃G,L,+ⓓV.T⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr a h G0 L0 T0) →
-     ⦃G,L⦄ ⊢ +ⓓV.T ![a,h] →
+fact cnv_cpm_conf_lpr_bind_zeta_aux (h) (a) (G) (L) (V) (T):
+     (∀G0,L0,T0. ⦃G,L,+ⓓV.T⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
+     ⦃G,L⦄ ⊢ +ⓓV.T ![h,a] →
      ∀V1. ⦃G,L⦄ ⊢V ➡[h] V1 → ∀n1,T1. ⦃G,L.ⓓV⦄ ⊢ T ➡[n1,h] T1 → 
      ∀T2. ⬆*[1]T2 ≘ T → ∀n2,XT2. ⦃G,L⦄ ⊢ T2 ➡[n2,h] XT2 →
      ∀L1. ⦃G,L⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L⦄ ⊢ ➡[h] L2 →
      ∃∃T. ⦃G,L1⦄ ⊢ +ⓓV1.T1 ➡*[n2-n1,h] T & ⦃G,L2⦄ ⊢ XT2 ➡*[n1-n2,h] T.
-#a #h #o #G0 #L0 #V0 #T0 #IH #H0
+#h #a #G0 #L0 #V0 #T0 #IH #H0
 #V1 #HV01 #n1 #T1 #HT01 #T2 #HT20 #n2 #XT2 #HXT2
 #L1 #HL01 #L2 #HL02
 elim (cnv_inv_bind … H0) -H0 #_ #HT0
@@ -144,14 +144,14 @@ elim (cnv_cpm_conf_lpr_sub … IH … HXT12 … HXT2 … HL01 … HL02)
 /3 width=3 by cpms_zeta, ex2_intro/
 qed-.
 
-fact cnv_cpm_conf_lpr_zeta_zeta_aux (a) (h) (o) (G) (L) (V) (T):
-     (∀G0,L0,T0. ⦃G,L,+ⓓV.T⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr a h G0 L0 T0) →
-     ⦃G,L⦄ ⊢ +ⓓV.T ![a,h] →
+fact cnv_cpm_conf_lpr_zeta_zeta_aux (h) (a) (G) (L) (V) (T):
+     (∀G0,L0,T0. ⦃G,L,+ⓓV.T⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
+     ⦃G,L⦄ ⊢ +ⓓV.T ![h,a] →
      ∀T1. ⬆*[1]T1 ≘ T → ∀T2. ⬆*[1]T2 ≘ T →
      ∀n1,XT1. ⦃G,L⦄ ⊢ T1 ➡[n1,h] XT1 → ∀n2,XT2. ⦃G,L⦄ ⊢ T2 ➡[n2,h] XT2 →
      ∀L1. ⦃G,L⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L⦄ ⊢ ➡[h] L2 →
      ∃∃T. ⦃G,L1⦄ ⊢ XT1 ➡*[n2-n1,h] T & ⦃G,L2⦄ ⊢ XT2 ➡*[n1-n2,h] T.
-#a #h #o #G0 #L0 #V0 #T0 #IH #H0
+#h #a #G0 #L0 #V0 #T0 #IH #H0
 #T1 #HT10 #T2 #HT20 #n1 #XT1 #HXT1 #n2 #XT2 #HXT2
 #L1 #HL01 #L2 #HL02
 elim (cnv_inv_bind … H0) -H0 #_ #HT0
@@ -163,14 +163,14 @@ elim (cnv_cpm_conf_lpr_sub … IH … HXT1 … HXT2 … HL01 … HL02)
 /2 width=3 by ex2_intro/
 qed-.
 
-fact cnv_cpm_conf_lpr_appl_appl_aux (a) (h) (o) (G) (L) (V) (T):
-     (∀G0,L0,T0. ⦃G,L,ⓐV.T⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr a h G0 L0 T0) →
-     ⦃G,L⦄ ⊢ ⓐV.T ![a,h] →
+fact cnv_cpm_conf_lpr_appl_appl_aux (h) (a) (G) (L) (V) (T):
+     (∀G0,L0,T0. ⦃G,L,ⓐV.T⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
+     ⦃G,L⦄ ⊢ ⓐV.T ![h,a] →
      ∀V1. ⦃G,L⦄ ⊢ V ➡[h] V1 → ∀V2. ⦃G,L⦄ ⊢ V ➡[h] V2 →
      ∀n1,T1. ⦃G,L⦄ ⊢ T ➡[n1,h] T1 → ∀n2,T2. ⦃G,L⦄ ⊢ T ➡[n2,h] T2 →
      ∀L1. ⦃G,L⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L⦄ ⊢ ➡[h] L2 →
      ∃∃T. ⦃G,L1⦄ ⊢ ⓐV1.T1 ➡*[n2-n1,h] T & ⦃G,L2⦄ ⊢ ⓐV2.T2 ➡*[n1-n2,h] T.
-#a #h #o #G0 #L0 #V0 #T0 #IH #H0
+#h #a #G0 #L0 #V0 #T0 #IH #H0
 #V1 #HV01 #V2 #HV02 #n1 #T1 #HT01 #n2 #T2 #HT02
 #L1 #HL01 #L2 #HL02
 elim (cnv_inv_appl … H0) -H0 #n0 #p0 #X01 #X02 #_ #HV0 #HT0 #_ #_ -n0 -p0 -X01 -X02
@@ -180,15 +180,15 @@ elim (cnv_cpm_conf_lpr_sub … IH … HT01 … HT02 … HL01 … HL02) [|*: /2 w
 /3 width=5 by cpms_appl_dx, ex2_intro/
 qed-.
 
-fact cnv_cpm_conf_lpr_appl_beta_aux (a) (h) (o) (p) (G) (L) (V) (W) (T):
-     (∀G0,L0,T0. ⦃G,L,ⓐV.ⓛ{p}W.T⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr a h G0 L0 T0) →
-     ⦃G,L⦄ ⊢ ⓐV.ⓛ{p}W.T ![a,h] →
+fact cnv_cpm_conf_lpr_appl_beta_aux (h) (a) (p) (G) (L) (V) (W) (T):
+     (∀G0,L0,T0. ⦃G,L,ⓐV.ⓛ{p}W.T⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
+     ⦃G,L⦄ ⊢ ⓐV.ⓛ{p}W.T ![h,a] →
      ∀V1. ⦃G,L⦄ ⊢ V ➡[h] V1 → ∀V2. ⦃G,L⦄ ⊢ V ➡[h] V2 →
      ∀W2. ⦃G,L⦄ ⊢ W ➡[h] W2 →
      ∀n1,T1. ⦃G,L⦄ ⊢ ⓛ{p}W.T ➡[n1,h] T1 → ∀n2,T2. ⦃G,L.ⓛW⦄ ⊢ T ➡[n2,h] T2 →
      ∀L1. ⦃G,L⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L⦄ ⊢ ➡[h] L2 →
      ∃∃T. ⦃G,L1⦄ ⊢ ⓐV1.T1 ➡*[n2-n1,h] T & ⦃G,L2⦄ ⊢ ⓓ{p}ⓝW2.V2.T2 ➡*[n1-n2,h] T.
-#a #h #o #p #G0 #L0 #V0 #W0 #T0 #IH #H0
+#h #a #p #G0 #L0 #V0 #W0 #T0 #IH #H0
 #V1 #HV01 #V2 #HV02 #W2 #HW02 #n1 #X #HX #n2 #T2 #HT02
 #L1 #HL01 #L2 #HL02
 elim (cnv_inv_appl … H0) -H0 #n0 #p0 #X01 #X02 #_ #HV0 #H0 #_ #_ -n0 -p0 -X01 -X02
@@ -202,16 +202,16 @@ lapply (lsubr_cpms_trans … HT2 (L2.ⓓⓝW2.V2) ?) -HT2 [ /2 width=1 by lsubr_
 /4 width=5 by cpms_beta_dx, cpms_bind_dx, cpm_cast, ex2_intro/
 qed-.
 
-fact cnv_cpm_conf_lpr_appl_theta_aux (a) (h) (o) (p) (G) (L) (V) (W) (T):
-     (∀G0,L0,T0. ⦃G,L,ⓐV.ⓓ{p}W.T⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr a h G0 L0 T0) →
-     ⦃G,L⦄ ⊢ ⓐV.ⓓ{p}W.T ![a,h] →
+fact cnv_cpm_conf_lpr_appl_theta_aux (h) (a) (p) (G) (L) (V) (W) (T):
+     (∀G0,L0,T0. ⦃G,L,ⓐV.ⓓ{p}W.T⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
+     ⦃G,L⦄ ⊢ ⓐV.ⓓ{p}W.T ![h,a] →
      ∀V1. ⦃G,L⦄ ⊢ V ➡[h] V1 → ∀V2. ⦃G,L⦄ ⊢ V ➡[h] V2 →
      ∀W2. ⦃G,L⦄ ⊢ W ➡[h] W2 →
      ∀n1,T1. ⦃G,L⦄ ⊢ ⓓ{p}W.T ➡[n1,h] T1 → ∀n2,T2. ⦃G,L.ⓓW⦄ ⊢ T ➡[n2,h] T2 →
      ∀U2. ⬆*[1]V2 ≘ U2 →
      ∀L1. ⦃G,L⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L⦄ ⊢ ➡[h] L2 →
      ∃∃T. ⦃G,L1⦄ ⊢ ⓐV1.T1 ➡*[n2-n1,h] T & ⦃G,L2⦄ ⊢ ⓓ{p}W2.ⓐU2.T2 ➡*[n1-n2,h] T.
-#a #h #o #p #G0 #L0 #V0 #W0 #T0 #IH #H0
+#h #a #p #G0 #L0 #V0 #W0 #T0 #IH #H0
 #V1 #HV01 #V2 #HV02 #W2 #HW02 #n1 #X #HX #n2 #T2 #HT02 #U2 #HVU2
 #L1 #HL01 #L2 #HL02
 elim (cnv_inv_appl … H0) -H0 #n0 #p0 #X01 #X02 #_ #HV0 #H0 #_ #_ -n0 -p0 -X01 -X02
@@ -233,15 +233,15 @@ elim (cpm_inv_abbr1 … HX) -HX *
 ]
 qed-.
 
-fact cnv_cpm_conf_lpr_beta_beta_aux (a) (h) (o) (p) (G) (L) (V) (W) (T):
-     (∀G0,L0,T0. ⦃G,L,ⓐV.ⓛ{p}W.T⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr a h G0 L0 T0) →
-     ⦃G,L⦄ ⊢ ⓐV.ⓛ{p}W.T ![a,h] →
+fact cnv_cpm_conf_lpr_beta_beta_aux (h) (a) (p) (G) (L) (V) (W) (T):
+     (∀G0,L0,T0. ⦃G,L,ⓐV.ⓛ{p}W.T⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
+     ⦃G,L⦄ ⊢ ⓐV.ⓛ{p}W.T ![h,a] →
      ∀V1. ⦃G,L⦄ ⊢ V ➡[h] V1 → ∀V2. ⦃G,L⦄ ⊢ V ➡[h] V2 →
      ∀W1. ⦃G,L⦄ ⊢ W ➡[h] W1 → ∀W2. ⦃G,L⦄ ⊢ W ➡[h] W2 →
      ∀n1,T1. ⦃G,L.ⓛW⦄ ⊢ T ➡[n1,h] T1 → ∀n2,T2. ⦃G,L.ⓛW⦄ ⊢ T ➡[n2,h] T2 →
      ∀L1. ⦃G,L⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L⦄ ⊢ ➡[h] L2 →
      ∃∃T. ⦃G,L1⦄ ⊢ ⓓ{p}ⓝW1.V1.T1 ➡*[n2-n1,h] T & ⦃G,L2⦄ ⊢ ⓓ{p}ⓝW2.V2.T2 ➡*[n1-n2,h] T.
-#a #h #o #p #G0 #L0 #V0 #W0 #T0 #IH #H0
+#h #a #p #G0 #L0 #V0 #W0 #T0 #IH #H0
 #V1 #HV01 #V2 #HV02 #W1 #HW01 #W2 #HW02 #n1 #T1 #HT01 #n2 #T2 #HT02
 #L1 #HL01 #L2 #HL02
 elim (cnv_inv_appl … H0) -H0 #n0 #p0 #X01 #X02 #_ #HV0 #H0 #_ #_ -n0 -p0 -X01 -X02
@@ -255,16 +255,16 @@ lapply (lsubr_cpms_trans … HT2 (L2.ⓓⓝW2.V2) ?) -HT2 /2 width=1 by lsubr_be
 /4 width=5 by cpms_bind_dx, cpm_eps, ex2_intro/
 qed-.
 
-fact cnv_cpm_conf_lpr_theta_theta_aux (a) (h) (o) (p) (G) (L) (V) (W) (T):
-     (∀G0,L0,T0. ⦃G,L,ⓐV.ⓓ{p}W.T⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr a h G0 L0 T0) →
-     ⦃G,L⦄ ⊢ ⓐV.ⓓ{p}W.T ![a,h] →
+fact cnv_cpm_conf_lpr_theta_theta_aux (h) (a) (p) (G) (L) (V) (W) (T):
+     (∀G0,L0,T0. ⦃G,L,ⓐV.ⓓ{p}W.T⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
+     ⦃G,L⦄ ⊢ ⓐV.ⓓ{p}W.T ![h,a] →
      ∀V1. ⦃G,L⦄ ⊢ V ➡[h] V1 → ∀V2. ⦃G,L⦄ ⊢ V ➡[h] V2 →
      ∀W1. ⦃G,L⦄ ⊢ W ➡[h] W1 → ∀W2. ⦃G,L⦄ ⊢ W ➡[h] W2 →
      ∀n1,T1. ⦃G,L.ⓓW⦄ ⊢ T ➡[n1,h] T1 → ∀n2,T2. ⦃G,L.ⓓW⦄ ⊢ T ➡[n2,h] T2 →
      ∀U1. ⬆*[1]V1 ≘ U1 → ∀U2. ⬆*[1]V2 ≘ U2 →
      ∀L1. ⦃G,L⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L⦄ ⊢ ➡[h] L2 →
      ∃∃T. ⦃G,L1⦄ ⊢ ⓓ{p}W1.ⓐU1.T1 ➡*[n2-n1,h] T & ⦃G,L2⦄ ⊢ ⓓ{p}W2.ⓐU2.T2 ➡*[n1-n2,h] T.
-#a #h #o #p #G0 #L0 #V0 #W0 #T0 #IH #H0
+#h #a #p #G0 #L0 #V0 #W0 #T0 #IH #H0
 #V1 #HV01 #V2 #HV02 #W1 #HW01 #W2 #HW02 #n1 #T1 #HT01 #n2 #T2 #HT02 #U1 #HVU1 #U2 #HVU2
 #L1 #HL01 #L2 #HL02
 elim (cnv_inv_appl … H0) -H0 #n0 #p0 #X01 #X02 #_ #HV0 #H0 #_ #_ -n0 -p0 -X01 -X02
@@ -278,14 +278,14 @@ lapply (cpm_lifts_bi … HV2 (Ⓣ) … (L2.ⓓW2) … HVU2 … HVU) -V2 -V [ /3
 /4 width=7 by cpms_appl_dx, cpms_bind_dx, ex2_intro/
 qed-.
 
-fact cnv_cpm_conf_lpr_cast_cast_aux (a) (h) (o) (G) (L) (V) (T):
-     (∀G0,L0,T0. ⦃G,L,ⓝV.T⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr a h G0 L0 T0) →
-     ⦃G,L⦄ ⊢ ⓝV.T ![a,h] →
+fact cnv_cpm_conf_lpr_cast_cast_aux (h) (a) (G) (L) (V) (T):
+     (∀G0,L0,T0. ⦃G,L,ⓝV.T⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
+     ⦃G,L⦄ ⊢ ⓝV.T ![h,a] →
      ∀n1,V1. ⦃G,L⦄ ⊢ V ➡[n1,h] V1 → ∀n2,V2. ⦃G,L⦄ ⊢ V ➡[n2,h] V2 →
      ∀T1. ⦃G,L⦄ ⊢ T ➡[n1,h] T1 → ∀T2. ⦃G,L⦄ ⊢ T ➡[n2,h] T2 →
      ∀L1. ⦃G,L⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L⦄ ⊢ ➡[h] L2 →
      ∃∃T. ⦃G,L1⦄ ⊢ ⓝV1.T1 ➡*[n2-n1,h] T & ⦃G,L2⦄ ⊢ ⓝV2.T2 ➡*[n1-n2,h] T.
-#a #h #o #G0 #L0 #V0 #T0 #IH #H0
+#h #a #G0 #L0 #V0 #T0 #IH #H0
 #n1 #V1 #HV01 #n2 #V2 #HV02 #T1 #HT01 #T2 #HT02
 #L1 #HL01 #L2 #HL02
 elim (cnv_inv_cast … H0) -H0 #X0 #HV0 #HT0 #_ #_ -X0
@@ -295,14 +295,14 @@ elim (cnv_cpm_conf_lpr_sub … IH … HT01 … HT02 … HL01 … HL02) [|*: /2 w
 /3 width=5 by cpms_cast, ex2_intro/
 qed-.
 
-fact cnv_cpm_conf_lpr_cast_epsilon_aux (a) (h) (o) (G) (L) (V) (T):
-     (∀G0,L0,T0. ⦃G,L,ⓝV.T⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr a h G0 L0 T0) →
-     ⦃G,L⦄ ⊢ ⓝV.T ![a,h] →
+fact cnv_cpm_conf_lpr_cast_epsilon_aux (h) (a) (G) (L) (V) (T):
+     (∀G0,L0,T0. ⦃G,L,ⓝV.T⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
+     ⦃G,L⦄ ⊢ ⓝV.T ![h,a] →
      ∀n1,V1. ⦃G,L⦄ ⊢ V ➡[n1,h] V1 →
      ∀T1. ⦃G,L⦄ ⊢ T ➡[n1,h] T1 → ∀n2,T2. ⦃G,L⦄ ⊢ T ➡[n2,h] T2 →
      ∀L1. ⦃G,L⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L⦄ ⊢ ➡[h] L2 →
      ∃∃T. ⦃G,L1⦄ ⊢ ⓝV1.T1 ➡*[n2-n1,h] T & ⦃G,L2⦄ ⊢ T2 ➡*[n1-n2,h] T.
-#a #h #o #G0 #L0 #V0 #T0 #IH #H0
+#h #a #G0 #L0 #V0 #T0 #IH #H0
 #n1 #V1 #HV01 #T1 #HT01 #n2 #T2 #HT02
 #L1 #HL01 #L2 #HL02
 elim (cnv_inv_cast … H0) -H0 #X0 #HV0 #HT0 #_ #_ -X0
@@ -311,15 +311,15 @@ elim (cnv_cpm_conf_lpr_sub … IH … HT01 … HT02 … HL01 … HL02) [|*: /2 w
 /3 width=3 by cpms_eps, ex2_intro/
 qed-.
 
-fact cnv_cpm_conf_lpr_cast_ee_aux (a) (h) (o) (G) (L) (V) (T):
-     (∀G0,L0,T0. ⦃G,L,ⓝV.T⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpm_trans_lpr a h G0 L0 T0) →
-     (∀G0,L0,T0. ⦃G,L,ⓝV.T⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr a h G0 L0 T0) →
-     ⦃G,L⦄ ⊢ ⓝV.T ![a,h] →
+fact cnv_cpm_conf_lpr_cast_ee_aux (h) (a) (G) (L) (V) (T):
+     (∀G0,L0,T0. ⦃G,L,ⓝV.T⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpm_trans_lpr h a G0 L0 T0) →
+     (∀G0,L0,T0. ⦃G,L,ⓝV.T⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
+     ⦃G,L⦄ ⊢ ⓝV.T ![h,a] →
      ∀n1,V1. ⦃G,L⦄ ⊢ V ➡[n1,h] V1 → ∀n2,V2. ⦃G,L⦄ ⊢ V ➡[n2,h] V2 →
      ∀T1. ⦃G,L⦄ ⊢ T ➡[n1,h] T1 →
      ∀L1. ⦃G,L⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L⦄ ⊢ ➡[h] L2 →
      ∃∃T. ⦃G,L1⦄ ⊢ ⓝV1.T1 ➡*[↑n2-n1,h] T & ⦃G,L2⦄ ⊢ V2 ➡*[n1-↑n2,h] T.
-#a #h #o #G0 #L0 #V0 #T0 #IH2 #IH1 #H0
+#h #a #G0 #L0 #V0 #T0 #IH2 #IH1 #H0
 #n1 #V1 #HV01 #n2 #V2 #HV02 #T1 #HT01
 #L1 #HL01 #L2 #HL02 -HV01
 elim (cnv_inv_cast … H0) -H0 #X0 #HV0 #HT0 #HVX0 #HTX0
@@ -334,13 +334,13 @@ lapply (cpms_trans … HT1 … HTU) -T <arith_l2 #H1
 /3 width=3 by cpms_eps, ex2_intro/
 qed-.
 
-fact cnv_cpm_conf_lpr_epsilon_epsilon_aux (a) (h) (o) (G) (L) (V) (T):
-     (∀G0,L0,T0. ⦃G,L,ⓝV.T⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr a h G0 L0 T0) →
-     ⦃G,L⦄ ⊢ ⓝV.T ![a,h] →
+fact cnv_cpm_conf_lpr_epsilon_epsilon_aux (h) (a) (G) (L) (V) (T):
+     (∀G0,L0,T0. ⦃G,L,ⓝV.T⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
+     ⦃G,L⦄ ⊢ ⓝV.T ![h,a] →
      ∀n1,T1. ⦃G,L⦄ ⊢ T ➡[n1,h] T1 → ∀n2,T2. ⦃G,L⦄ ⊢ T ➡[n2,h] T2 →
      ∀L1. ⦃G,L⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L⦄ ⊢ ➡[h] L2 →
      ∃∃T. ⦃G,L1⦄ ⊢ T1 ➡*[n2-n1,h] T & ⦃G,L2⦄ ⊢ T2 ➡*[n1-n2,h] T.
-#a #h #o #G0 #L0 #V0 #T0 #IH #H0
+#h #a #G0 #L0 #V0 #T0 #IH #H0
 #n1 #T1 #HT01 #n2 #T2 #HT02
 #L1 #HL01 #L2 #HL02
 elim (cnv_inv_cast … H0) -H0 #X0 #_ #HT0 #_ #_ -X0
@@ -349,14 +349,14 @@ elim (cnv_cpm_conf_lpr_sub … IH … HT01 … HT02 … HL01 … HL02) [|*: /2 w
 /2 width=3 by ex2_intro/
 qed-.
 
-fact cnv_cpm_conf_lpr_epsilon_ee_aux (a) (h) (o) (G) (L) (V) (T):
-     (∀G0,L0,T0. ⦃G,L,ⓝV.T⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpm_trans_lpr a h G0 L0 T0) →
-     (∀G0,L0,T0. ⦃G,L,ⓝV.T⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr a h G0 L0 T0) →
-     ⦃G,L⦄ ⊢ ⓝV.T ![a,h] →
+fact cnv_cpm_conf_lpr_epsilon_ee_aux (h) (a) (G) (L) (V) (T):
+     (∀G0,L0,T0. ⦃G,L,ⓝV.T⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpm_trans_lpr h a G0 L0 T0) →
+     (∀G0,L0,T0. ⦃G,L,ⓝV.T⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
+     ⦃G,L⦄ ⊢ ⓝV.T ![h,a] →
      ∀n1,T1. ⦃G,L⦄ ⊢ T ➡[n1,h] T1 → ∀n2,V2. ⦃G,L⦄ ⊢ V ➡[n2,h] V2 →
      ∀L1. ⦃G,L⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L⦄ ⊢ ➡[h] L2 →
      ∃∃T. ⦃G,L1⦄ ⊢ T1 ➡*[↑n2-n1,h] T & ⦃G,L2⦄ ⊢ V2 ➡*[n1-↑n2,h] T.
-#a #h #o #G0 #L0 #V0 #T0 #IH2 #IH1 #H0
+#h #a #G0 #L0 #V0 #T0 #IH2 #IH1 #H0
 #n1 #T1 #HT01 #n2 #V2 #HV02
 #L1 #HL01 #L2 #HL02
 elim (cnv_inv_cast … H0) -H0 #X0 #HV0 #HT0 #HVX0 #HTX0
@@ -371,13 +371,13 @@ lapply (cpms_trans … HT1 … HTU) -T <arith_l2 #H1
 /2 width=3 by ex2_intro/
 qed-.
 
-fact cnv_cpm_conf_lpr_ee_ee_aux (a) (h) (o) (G) (L) (V) (T):
-     (∀G0,L0,T0. ⦃G,L,ⓝV.T⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr a h G0 L0 T0) →
-     ⦃G,L⦄ ⊢ ⓝV.T ![a,h] →
+fact cnv_cpm_conf_lpr_ee_ee_aux (h) (a) (G) (L) (V) (T):
+     (∀G0,L0,T0. ⦃G,L,ⓝV.T⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
+     ⦃G,L⦄ ⊢ ⓝV.T ![h,a] →
      ∀n1,V1. ⦃G,L⦄ ⊢ V ➡[n1,h] V1 → ∀n2,V2. ⦃G,L⦄ ⊢ V ➡[n2,h] V2 →
      ∀L1. ⦃G,L⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L⦄ ⊢ ➡[h] L2 →
      ∃∃T. ⦃G,L1⦄ ⊢ V1 ➡*[n2-n1,h] T & ⦃G,L2⦄ ⊢ V2 ➡*[n1-n2,h] T.
-#a #h #o #G0 #L0 #V0 #T0 #IH #H0
+#h #a #G0 #L0 #V0 #T0 #IH #H0
 #n1 #V1 #HV01 #n2 #V2 #HV02
 #L1 #HL01 #L2 #HL02
 elim (cnv_inv_cast … H0) -H0 #X0 #HV0 #_ #_ #_ -X0
@@ -386,19 +386,19 @@ elim (cnv_cpm_conf_lpr_sub … IH … HV01 … HV02 … HL01 … HL02) [|*: /2 w
 /2 width=3 by ex2_intro/
 qed-.
 
-fact cnv_cpm_conf_lpr_aux (a) (h) (o):
-                          ∀G0,L0,T0.
-                          (∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpm_trans_lpr a h G1 L1 T1) →
-                          (∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpms_conf_lpr a h G1 L1 T1) →
-                          ∀G1,L1,T1. G0 = G1 → L0 = L1 → T0 = T1 → IH_cnv_cpm_conf_lpr a h G1 L1 T1.
-#a #h #o #G0 #L0 #T0 #IH2 #IH1 #G #L * [| * [| * ]]
+fact cnv_cpm_conf_lpr_aux (h) (a):
+     ∀G0,L0,T0.
+     (∀G1,L1,T1. ⦃G0,L0,T0⦄ >[h] ⦃G1,L1,T1⦄ → IH_cnv_cpm_trans_lpr h a G1 L1 T1) →
+     (∀G1,L1,T1. ⦃G0,L0,T0⦄ >[h] ⦃G1,L1,T1⦄ → IH_cnv_cpms_conf_lpr h a G1 L1 T1) →
+     ∀G1,L1,T1. G0 = G1 → L0 = L1 → T0 = T1 → IH_cnv_cpm_conf_lpr h a G1 L1 T1.
+#h #a #G0 #L0 #T0 #IH2 #IH1 #G #L * [| * [| * ]]
 [ #I #HG0 #HL0 #HT0 #HT #n1 #X1 #HX1 #n2 #X2 #HX2 #L1 #HL1 #L2 #HL2 destruct
   elim (cpm_inv_atom1_drops … HX1) -HX1 *
   elim (cpm_inv_atom1_drops … HX2) -HX2 *
-  [ #H21 #H22 #H11 #H12 destruct -a -o -L
+  [ #H21 #H22 #H11 #H12 destruct -a -L
     <minus_O_n
     /2 width=1 by cnv_cpm_conf_lpr_atom_atom_aux/
-  | #s2 #H21 #H22 #H23 #H11 #H12 destruct -a -o -L
+  | #s2 #H21 #H22 #H23 #H11 #H12 destruct -a -L
     <minus_O_n <minus_n_O
     /2 width=1 by cnv_cpm_conf_lpr_atom_ess_aux/
   | #K2 #V2 #XV2 #i #HLK2 #HVX2 #HXV2 #H21 #H11 #H12 destruct -IH2
@@ -407,10 +407,10 @@ fact cnv_cpm_conf_lpr_aux (a) (h) (o):
   | #m2 #K2 #W2 #XW2 #i #HLK2 #HWX2 #HXW2 #H21 #H22 #H11 #H12 destruct -IH2
     <minus_O_n <minus_n_O
     @(cnv_cpm_conf_lpr_atom_ell_aux … IH1) -IH1 /1 width=6 by/
-  | #H21 #H22 #s1 #H11 #H12 #H13 destruct -a -o -L
+  | #H21 #H22 #s1 #H11 #H12 #H13 destruct -a -L
     <minus_O_n <minus_n_O
     /3 width=1 by cnv_cpm_conf_lpr_atom_ess_aux, ex2_commute/
-  | #s2 #H21 #H22 #H23 #s1 #H11 #H12 #H13 destruct -a -o -L
+  | #s2 #H21 #H22 #H23 #s1 #H11 #H12 #H13 destruct -a -L
     <minus_n_n
     /2 width=1 by cnv_cpm_conf_lpr_atom_atom_aux/
   | #K2 #V2 #XV2 #i2 #_ #_ #_ #H21 #s1 #H11 #H12 #H13 destruct
@@ -421,13 +421,13 @@ fact cnv_cpm_conf_lpr_aux (a) (h) (o):
   | #s2 #H21 #H22 #H23 #K1 #V1 #XV1 #i1 #_ #_ #_ #H11 destruct
   | #K2 #V2 #XV2 #i2 #HLK2 #HVX2 #HXV2 #H21 #K1 #V1 #XV1 #i1 #HLK1 #HVX1 #HXV1 #H11 destruct -IH2
     @(cnv_cpm_conf_lpr_delta_delta_aux … IH1) -IH1 /1 width=13 by/
-  | #m2 #K2 #W2 #XW2 #i2 #HLK2 #_ #_ #H21 #H22 #K1 #V1 #XV1 #i1 #HLK1 #_ #_ #H11 destruct -a -o -XW2 -XV1 -HL2 -HL1
+  | #m2 #K2 #W2 #XW2 #i2 #HLK2 #_ #_ #H21 #H22 #K1 #V1 #XV1 #i1 #HLK1 #_ #_ #H11 destruct -a -XW2 -XV1 -HL2 -HL1
     elim cnv_cpm_conf_lpr_delta_ell_aux /1 width=8 by/
   | #H21 #H22 #m1 #K1 #W1 #XW1 #i1 #HLK1 #HWX1 #HXW1 #H11 #H12 destruct -IH2 
     <minus_O_n <minus_n_O
     @ex2_commute @(cnv_cpm_conf_lpr_atom_ell_aux … IH1) -IH1 /1 width=6 by/
   | #s2 #H21 #H22 #H23 #m1 #K1 #W1 #XW1 #i1 #_ #_ #_ #H11 #H12 destruct
-  | #K2 #V2 #XV2 #i2 #HLK2 #_ #_ #H21 #m1 #K1 #W1 #XW1 #i1 #HLK1 #_ #_ #H11 #H12 destruct -a -o -XV2 -XW1 -HL2 -HL1
+  | #K2 #V2 #XV2 #i2 #HLK2 #_ #_ #H21 #m1 #K1 #W1 #XW1 #i1 #HLK1 #_ #_ #H11 #H12 destruct -a -XV2 -XW1 -HL2 -HL1
     elim cnv_cpm_conf_lpr_delta_ell_aux /1 width=8 by/
   | #m2 #K2 #W2 #XW2 #i2 #HLK2 #HWX2 #HXW2 #H21 #H22 #m1 #K1 #W1 #XW1 #i1 #HLK1 #HWX1 #HXW1 #H11 #H12 destruct -IH2
     >minus_S_S >minus_S_S
index 4919e3eae1e717701e0dfbab19e8e70e80367fea..4ea9ff53f1353d5cc99f26dc0b639eb98247afab 100644 (file)
@@ -15,7 +15,6 @@
 include "ground_2/xoa/ex_5_1.ma".
 include "ground_2/xoa/ex_9_3.ma".
 include "basic_2/rt_transition/cpm_tdeq.ma".
-include "basic_2/rt_transition/cpr.ma".
 include "basic_2/rt_computation/fpbg_fqup.ma".
 include "basic_2/dynamic/cnv_fsb.ma".
 
@@ -23,10 +22,9 @@ include "basic_2/dynamic/cnv_fsb.ma".
 
 (* Inversion lemmas with restricted rt-transition for terms *****************)
 
-lemma cnv_cpr_tdeq_fwd_refl (a) (h) (o) (G) (L):
-                            ∀T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h] T2 → T1 ≛[h,o] T2 →
-                            ⦃G, L⦄ ⊢ T1 ![a,h] → T1 = T2.
-#a #h #o #G #L #T1 #T2 #H @(cpr_ind … H) -G -L -T1 -T2
+lemma cnv_cpr_tdeq_fwd_refl (h) (a) (G) (L):
+      ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡[h] 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 (tdeq_inv_lref1 … H1) -H1 #H destruct //
@@ -41,11 +39,11 @@ lemma cnv_cpr_tdeq_fwd_refl (a) (h) (o) (G) (L):
   elim (cnv_fwd_flat … H2) -H2 #HV1 #HT1
   /3 width=3 by eq_f2/
 | #G #K #V #T1 #X1 #X2 #HXT1 #HX12 #_ #H1 #H2
-  elim (cnv_fpbg_refl_false … o … H2) -a
+  elim (cnv_fpbg_refl_false … H2) -a
   @(fpbg_tdeq_div … H1) -H1
   /3 width=9 by cpm_tdneq_cpm_fpbg, cpm_zeta, tdeq_lifts_inv_pair_sn/
 | #G #L #U #T1 #T2 #HT12 #_ #H1 #H2
-  elim (cnv_fpbg_refl_false … o … H2) -a
+  elim (cnv_fpbg_refl_false … H2) -a
   @(fpbg_tdeq_div … H1) -H1
   /3 width=6 by cpm_tdneq_cpm_fpbg, cpm_eps, tdeq_inv_pair_xy_y/
 | #p #G #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #H1 #_
@@ -55,11 +53,11 @@ lemma cnv_cpr_tdeq_fwd_refl (a) (h) (o) (G) (L):
 ]
 qed-.
 
-lemma cpm_tdeq_inv_bind_sn (a) (h) (o) (n) (p) (I) (G) (L):
-                           ∀V,T1. ⦃G, L⦄ ⊢ ⓑ{p,I}V.T1 ![a,h] →
-                           ∀X. ⦃G, L⦄ ⊢ ⓑ{p,I}V.T1 ➡[n,h] X → ⓑ{p,I}V.T1 ≛[h,o] X →
-                           ∃∃T2. ⦃G,L⦄ ⊢ V ![a,h] & ⦃G, L.ⓑ{I}V⦄ ⊢ T1 ![a,h] & ⦃G, L.ⓑ{I}V⦄ ⊢ T1 ➡[n,h] T2 & T1 ≛[h,o] T2 & X = ⓑ{p,I}V.T2.
-#a #h #o #n #p #I #G #L #V #T1 #H0 #X #H1 #H2
+lemma cpm_tdeq_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 ➡[n,h] X → ⓑ{p,I}V.T1 ≛ X →
+      ∃∃T2. ⦃G,L⦄ ⊢ V ![h,a] & ⦃G,L.ⓑ{I}V⦄ ⊢ T1 ![h,a] & ⦃G,L.ⓑ{I}V⦄ ⊢ T1 ➡[n,h] 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
   elim (tdeq_inv_pair … H2) -H2 #_ #H2XV #H2T12
@@ -67,18 +65,18 @@ elim (cpm_inv_bind1 … H1) -H1 *
   lapply (cnv_cpr_tdeq_fwd_refl … HXV H2XV HV) #H destruct -HXV -H2XV
   /2 width=4 by ex5_intro/
 | #X1 #HXT1 #HX1 #H1 #H destruct
-  elim (cnv_fpbg_refl_false … o … H0) -a
+  elim (cnv_fpbg_refl_false … H0) -a
   @(fpbg_tdeq_div … H2) -H2
   /3 width=9 by cpm_tdneq_cpm_fpbg, cpm_zeta, tdeq_lifts_inv_pair_sn/
 ]
 qed-.
 
-lemma cpm_tdeq_inv_appl_sn (a) (h) (o) (n) (G) (L):
-                           ∀V,T1. ⦃G,L⦄ ⊢ ⓐV.T1 ![a,h] →
-                           ∀X. ⦃G,L⦄ ⊢ ⓐV.T1 ➡[n,h] X → ⓐV.T1 ≛[h,o] X →
-                           ∃∃m,q,W,U1,T2. a = Ⓣ → m ≤ 1 & ⦃G,L⦄ ⊢ V ![a,h] & ⦃G, L⦄ ⊢ V ➡*[1,h] W & ⦃G, L⦄ ⊢ T1 ➡*[m,h] ⓛ{q}W.U1
-                                        & ⦃G,L⦄⊢ T1 ![a,h] & ⦃G, L⦄ ⊢ T1 ➡[n,h] T2 & T1 ≛[h,o] T2 & X = ⓐV.T2.
-#a #h #o #n #G #L #V #T1 #H0 #X #H1 #H2
+lemma cpm_tdeq_inv_appl_sn (h) (a) (n) (G) (L):
+      ∀V,T1. ⦃G,L⦄ ⊢ ⓐV.T1 ![h,a] →
+      ∀X. ⦃G,L⦄ ⊢ ⓐV.T1 ➡[n,h] X → ⓐV.T1 ≛ X →
+      ∃∃m,q,W,U1,T2. ad a m & ⦃G,L⦄ ⊢ V ![h,a] & ⦃G,L⦄ ⊢ V ➡*[1,h] W & ⦃G,L⦄ ⊢ T1 ➡*[m,h] ⓛ{q}W.U1
+                   & ⦃G,L⦄⊢ T1 ![h,a] & ⦃G,L⦄ ⊢ T1 ➡[n,h] 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
   elim (tdeq_inv_pair … H2) -H2 #_ #H2XV #H2T12
@@ -92,34 +90,34 @@ elim (cpm_inv_appl1 … H1) -H1 *
 ]
 qed-.
 
-lemma cpm_tdeq_inv_cast_sn (a) (h) (o) (n) (G) (L):
-                           ∀U1,T1. ⦃G, L⦄ ⊢ ⓝU1.T1 ![a,h] →
-                           ∀X. ⦃G, L⦄ ⊢ ⓝU1.T1 ➡[n,h] X → ⓝU1.T1 ≛[h,o] X →
-                           ∃∃U0,U2,T2. ⦃G,L⦄ ⊢ U1 ➡*[h] U0 & ⦃G,L⦄ ⊢ T1 ➡*[1,h] U0
-                                     & ⦃G, L⦄ ⊢ U1 ![a,h] & ⦃G, L⦄ ⊢ U1 ➡[n,h] U2 & U1 ≛[h,o] U2
-                                     & ⦃G, L⦄ ⊢ T1 ![a,h] & ⦃G, L⦄ ⊢ T1 ➡[n,h] T2 & T1 ≛[h,o] T2 & X = ⓝU2.T2.
-#a #h #o #n #G #L #U1 #T1 #H0 #X #H1 #H2
+lemma cpm_tdeq_inv_cast_sn (h) (a) (n) (G) (L):
+      ∀U1,T1. ⦃G,L⦄ ⊢ ⓝU1.T1 ![h,a] →
+      ∀X. ⦃G,L⦄ ⊢ ⓝU1.T1 ➡[n,h] X → ⓝU1.T1 ≛ X →
+      ∃∃U0,U2,T2. ⦃G,L⦄ ⊢ U1 ➡*[h] U0 & ⦃G,L⦄ ⊢ T1 ➡*[1,h] U0
+                & ⦃G,L⦄ ⊢ U1 ![h,a] & ⦃G,L⦄ ⊢ U1 ➡[n,h] U2 & U1 ≛ U2
+                & ⦃G,L⦄ ⊢ T1 ![h,a] & ⦃G,L⦄ ⊢ T1 ➡[n,h] 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
   elim (tdeq_inv_pair … H2) -H2 #_ #H2U12 #H2T12
   elim (cnv_inv_cast … H0) -H0 #U0 #HU1 #HT1 #HU10 #HT1U0
   /2 width=7 by ex9_3_intro/
 | #HT1X
-  elim (cnv_fpbg_refl_false … o … H0) -a
+  elim (cnv_fpbg_refl_false … H0) -a
   @(fpbg_tdeq_div … H2) -H2
   /3 width=6 by cpm_tdneq_cpm_fpbg, cpm_eps, tdeq_inv_pair_xy_y/
 | #m #HU1X #H destruct
-  elim (cnv_fpbg_refl_false … o … H0) -a
+  elim (cnv_fpbg_refl_false … H0) -a
   @(fpbg_tdeq_div … H2) -H2
   /3 width=6 by cpm_tdneq_cpm_fpbg, cpm_ee, tdeq_inv_pair_xy_x/
 ]
 qed-.
 
-lemma cpm_tdeq_inv_bind_dx (a) (h) (o) (n) (p) (I) (G) (L):
-                           ∀X. ⦃G, L⦄ ⊢ X ![a,h] →
-                           ∀V,T2. ⦃G, L⦄ ⊢ X ➡[n,h] ⓑ{p,I}V.T2 → X ≛[h,o]  ⓑ{p,I}V.T2 →
-                           ∃∃T1. ⦃G,L⦄ ⊢ V ![a,h] & ⦃G, L.ⓑ{I}V⦄ ⊢ T1 ![a,h] & ⦃G, L.ⓑ{I}V⦄ ⊢ T1 ➡[n,h] T2 & T1 ≛[h,o] T2 & X = ⓑ{p,I}V.T1.
-#a #h #o #n #p #I #G #L #X #H0 #V #T2 #H1 #H2
+lemma cpm_tdeq_inv_bind_dx (h) (a) (n) (p) (I) (G) (L):
+      ∀X. ⦃G,L⦄ ⊢ X ![h,a] →
+      ∀V,T2. ⦃G,L⦄ ⊢ X ➡[n,h] ⓑ{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 ➡[n,h] T2 & T1 ≛ T2 & X = ⓑ{p,I}V.T1.
+#h #a #n #p #I #G #L #X #H0 #V #T2 #H1 #H2
 elim (tdeq_inv_pair2 … H2) #V0 #T1 #_ #_ #H destruct
 elim (cpm_tdeq_inv_bind_sn … H0 … H1 H2) -H0 -H1 -H2 #T0 #HV #HT1 #H1T12 #H2T12 #H destruct
 /2 width=5 by ex5_intro/
@@ -127,34 +125,34 @@ qed-.
 
 (* Eliminators with restricted rt-transition for terms **********************)
 
-lemma cpm_tdeq_ind (a) (h) (o) (n) (G) (Q:relation3 …):
-                   (∀I,L. n = 0 → Q L (⓪{I}) (⓪{I})) →
-                   (∀L,s. n = 1 → deg h o s 0 → Q L (⋆s) (⋆(next h s))) →
-                   (∀p,I,L,V,T1. ⦃G,L⦄⊢ V![a,h] → ⦃G,L.ⓑ{I}V⦄⊢T1![a,h] →
-                    ∀T2. ⦃G,L.ⓑ{I}V⦄ ⊢ T1 ➡[n,h] T2 → T1 ≛[h,o] T2 →
-                    Q (L.ⓑ{I}V) T1 T2 → Q L (ⓑ{p,I}V.T1) (ⓑ{p,I}V.T2)
-                   ) →
-                   (∀m. (a = Ⓣ → m ≤ 1) →
-                    ∀L,V. ⦃G,L⦄ ⊢ V ![a,h] → ∀W. ⦃G, L⦄ ⊢ V ➡*[1,h] W →
-                    ∀p,T1,U1. ⦃G, L⦄ ⊢ T1 ➡*[m,h] ⓛ{p}W.U1 → ⦃G,L⦄⊢ T1 ![a,h] →
-                    ∀T2. ⦃G, L⦄ ⊢ T1 ➡[n,h] T2 → T1 ≛[h,o] T2 →
-                    Q L T1 T2 → Q L (ⓐV.T1) (ⓐV.T2)
-                   ) →
-                   (∀L,U0,U1,T1. ⦃G,L⦄ ⊢ U1 ➡*[h] U0 → ⦃G,L⦄ ⊢ T1 ➡*[1,h] U0 →
-                    ∀U2. ⦃G, L⦄ ⊢ U1 ![a,h] → ⦃G, L⦄ ⊢ U1 ➡[n,h] U2 → U1 ≛[h,o] U2 →
-                    ∀T2. ⦃G, L⦄ ⊢ T1 ![a,h] → ⦃G, L⦄ ⊢ T1 ➡[n,h] T2 → T1 ≛[h,o] T2 →
-                    Q L U1 U2 → Q L T1 T2 → Q L (ⓝU1.T1) (ⓝU2.T2)
-                   ) →
-                   ∀L,T1. ⦃G,L⦄ ⊢ T1 ![a,h] →
-                   ∀T2. ⦃G,L⦄ ⊢ T1 ➡[n,h] T2 → T1 ≛[h,o] T2 → Q L T1 T2.
-#a #h #o #n #G #Q #IH1 #IH2 #IH3 #IH4 #IH5 #L #T1
+lemma cpm_tdeq_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 ➡[n,h] 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 ➡*[1,h] W →
+        ∀p,T1,U1. ⦃G,L⦄ ⊢ T1 ➡*[m,h] ⓛ{p}W.U1 → ⦃G,L⦄⊢ T1 ![h,a] →
+        ∀T2. ⦃G,L⦄ ⊢ T1 ➡[n,h] T2 → T1 ≛ T2 →
+        Q L T1 T2 → Q L (ⓐV.T1) (ⓐV.T2)
+      ) →
+      (∀L,U0,U1,T1. ⦃G,L⦄ ⊢ U1 ➡*[h] U0 → ⦃G,L⦄ ⊢ T1 ➡*[1,h] U0 →
+        ∀U2. ⦃G,L⦄ ⊢ U1 ![h,a] → ⦃G,L⦄ ⊢ U1 ➡[n,h] U2 → U1 ≛ U2 →
+        ∀T2. ⦃G,L⦄ ⊢ T1 ![h,a] → ⦃G,L⦄ ⊢ T1 ➡[n,h] 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 ➡[n,h] 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
 #G0 #L0 #T0 #IH #F #L * [| * [| * ]]
 [ #I #_ #_ #_ #_ #HF #X #H1X #H2X destruct -G0 -L0 -T0
   elim (cpm_tdeq_inv_atom_sn … H1X H2X) -H1X -H2X *
   [ #H1 #H2 destruct /2 width=1 by/
-  | #s #H1 #H2 #H3 #Hs destruct /2 width=1 by/
+  | #s #H1 #H2 #H3 destruct /2 width=1 by/
   ]
 | #p #I #V #T1 #HG #HL #HT #H0 #HF #X #H1X #H2X destruct
   elim (cpm_tdeq_inv_bind_sn … H0 … H1X H2X) -H0 -H1X -H2X #T2 #HV #HT1 #H1T12 #H2T12 #H destruct
@@ -170,14 +168,14 @@ qed-.
 
 (* Advanced properties with restricted rt-transition for terms **************)
 
-lemma cpm_tdeq_free (a) (h) (o) (n) (G) (L):
-                    ∀T1. ⦃G, L⦄ ⊢ T1 ![a,h] →
-                    ∀T2. ⦃G, L⦄ ⊢ T1 ➡[n,h] T2 → T1 ≛[h,o] T2 →
-                    ∀F,K. ⦃F, K⦄ ⊢ T1 ➡[n,h] T2.
-#a #h #o #n #G #L #T1 #H0 #T2 #H1 #H2
+lemma cpm_tdeq_free (h) (a) (n) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ T1 ![h,a] →
+      ∀T2. ⦃G,L⦄ ⊢ T1 ➡[n,h] T2 → T1 ≛ T2 →
+      ∀F,K. ⦃F,K⦄ ⊢ T1 ➡[n,h] T2.
+#h #a #n #G #L #T1 #H0 #T2 #H1 #H2
 @(cpm_tdeq_ind … H0 … H1 H2) -L -T1 -T2
 [ #I #L #H #F #K destruct //
-| #L #s #H #_ #F #K destruct //
+| #L #s #H #F #K destruct //
 | #p #I #L #V #T1 #_ #_ #T2 #_ #_ #IH #F #K
   /2 width=1 by cpm_bind/
 | #m #_ #L #V #_ #W #_ #q #T1 #U1 #_ #_ #T2 #_ #_ #IH #F #K
@@ -189,11 +187,11 @@ qed-.
 
 (* Advanced inversion lemmas with restricted rt-transition for terms ********)
 
-lemma cpm_tdeq_inv_bind_sn_void (a) (h) (o) (n) (p) (I) (G) (L):
-                                ∀V,T1. ⦃G, L⦄ ⊢ ⓑ{p,I}V.T1 ![a,h] →
-                                ∀X. ⦃G, L⦄ ⊢ ⓑ{p,I}V.T1 ➡[n,h] X → ⓑ{p,I}V.T1 ≛[h,o] X →
-                                ∃∃T2. ⦃G,L⦄ ⊢ V ![a,h] & ⦃G, L.ⓑ{I}V⦄ ⊢ T1 ![a,h] & ⦃G, L.ⓧ⦄ ⊢ T1 ➡[n,h] T2 & T1 ≛[h,o] T2 & X = ⓑ{p,I}V.T2.
-#a #h #o #n #p #I #G #L #V #T1 #H0 #X #H1 #H2
+lemma cpm_tdeq_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 ➡[n,h] X → ⓑ{p,I}V.T1 ≛ X →
+      ∃∃T2. ⦃G,L⦄ ⊢ V ![h,a] & ⦃G,L.ⓑ{I}V⦄ ⊢ T1 ![h,a] & ⦃G,L.ⓧ⦄ ⊢ T1 ➡[n,h] T2 & T1 ≛ T2 & X = ⓑ{p,I}V.T2.
+#h #a #n #p #I #G #L #V #T1 #H0 #X #H1 #H2
 elim (cpm_tdeq_inv_bind_sn … H0 … H1 H2) -H0 -H1 -H2 #T2 #HV #HT1 #H1T12 #H2T12 #H
 /3 width=5 by ex5_intro, cpm_tdeq_free/
 qed-.
index f45bf4d422d75b811ceebaeb73b11c367562760b..54cd32a9e59d670f3541ebf514d4a65a7c6ca508 100644 (file)
@@ -17,36 +17,35 @@ include "basic_2/dynamic/cnv_cpm_tdeq.ma".
 
 (* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
 
-definition IH_cnv_cpm_tdeq_conf_lpr (a) (h) (o): relation3 genv lenv term ≝
-                                    λG,L0,T0. ⦃G, L0⦄ ⊢ T0 ![a,h] →
-                                    ∀n1,T1. ⦃G, L0⦄ ⊢ T0 ➡[n1,h] T1 → T0 ≛[h,o] T1 →
-                                    ∀n2,T2. ⦃G, L0⦄ ⊢ T0 ➡[n2,h] T2 → T0 ≛[h,o] T2 →
-                                    ∀L1. ⦃G, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[h] L2 →
-                                    ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡[n2-n1,h] T & T1 ≛[h,o] T & ⦃G, L2⦄ ⊢ T2 ➡[n1-n2,h] T & T2 ≛[h,o] T.
+definition IH_cnv_cpm_tdeq_conf_lpr (h) (a): relation3 genv lenv term ≝
+           λG,L0,T0. ⦃G,L0⦄ ⊢ T0 ![h,a] →
+           ∀n1,T1. ⦃G,L0⦄ ⊢ T0 ➡[n1,h] T1 → T0 ≛ T1 →
+           ∀n2,T2. ⦃G,L0⦄ ⊢ T0 ➡[n2,h] T2 → T0 ≛ T2 →
+           ∀L1. ⦃G,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L0⦄ ⊢ ➡[h] L2 →
+           ∃∃T. ⦃G,L1⦄ ⊢ T1 ➡[n2-n1,h] T & T1 ≛ T & ⦃G,L2⦄ ⊢ T2 ➡[n1-n2,h] T & T2 ≛ T.
 
 (* Diamond propery with restricted rt-transition for terms ******************)
 
-fact cnv_cpm_tdeq_conf_lpr_atom_atom_aux (h) (o) (G0) (L1) (L2) (I):
-     ∃∃T. ⦃G0,L1⦄ ⊢ ⓪{I} ➡[h] T & ⓪{I} ≛[h,o] T & ⦃G0, L2⦄ ⊢ ⓪{I} ➡[h] T & ⓪{I} ≛[h,o] T.
-#h #o #G0 #L1 #L2 #I
+fact cnv_cpm_tdeq_conf_lpr_atom_atom_aux (h) (G0) (L1) (L2) (I):
+     ∃∃T. ⦃G0,L1⦄ ⊢ ⓪{I} ➡[h] T & ⓪{I} ≛ T & ⦃G0,L2⦄ ⊢ ⓪{I} ➡[h] T & ⓪{I} ≛ T.
+#h #G0 #L1 #L2 #I
 /2 width=5 by ex4_intro/
 qed-.
 
-fact cnv_cpm_tdeq_conf_lpr_atom_ess_aux (h) (o) (G0) (L1) (L2) (s):
-     deg h o s 0 →
-     ∃∃T. ⦃G0,L1⦄ ⊢ ⋆s ➡[1,h] T & ⋆s ≛[h,o] T & ⦃G0,L2⦄ ⊢ ⋆(next h s) ➡[h] T & ⋆(next h s) ≛[h,o] T.
-#h #o #G0 #L1 #L2 #s #Hs
-/4 width=5 by tdeq_sort, deg_next, ex4_intro/
+fact cnv_cpm_tdeq_conf_lpr_atom_ess_aux (h) (G0) (L1) (L2) (s):
+     ∃∃T. ⦃G0,L1⦄ ⊢ ⋆s ➡[1,h] T & ⋆s ≛ T & ⦃G0,L2⦄ ⊢ ⋆(⫯[h]s) ➡[h] T & ⋆(⫯[h]s) ≛ T.
+#h #G0 #L1 #L2 #s
+/3 width=5 by tdeq_sort, ex4_intro/
 qed-.
 
-fact cnv_cpm_tdeq_conf_lpr_bind_bind_aux (a) (h) (o) (p) (I) (G0) (L0) (V0) (T0):
-     (â\88\80G,L,T. â¦\83G0,L0,â\93\91{p,I}V0.T0â¦\84 â\8a\90+ â¦\83G,L,Tâ¦\84 â\86\92 IH_cnv_cpm_tdeq_conf_lpr a h o G L T) →
-     ⦃G0,L0⦄ ⊢ ⓑ{p,I}V0.T0 ![a,h] →
-     ∀n1,T1. ⦃G0,L0.ⓑ{I}V0⦄ ⊢ T0 ➡[n1,h] T1 → T0 ≛[h,o] T1 →
-     ∀n2,T2. ⦃G0,L0.ⓑ{I}V0⦄ ⊢ T0 ➡[n2,h] T2 → T0 ≛[h,o] T2 →
+fact cnv_cpm_tdeq_conf_lpr_bind_bind_aux (h) (a) (p) (I) (G0) (L0) (V0) (T0):
+     (â\88\80G,L,T. â¦\83G0,L0,â\93\91{p,I}V0.T0â¦\84 â¬\82+ â¦\83G,L,Tâ¦\84 â\86\92 IH_cnv_cpm_tdeq_conf_lpr h a G L T) →
+     ⦃G0,L0⦄ ⊢ ⓑ{p,I}V0.T0 ![h,a] →
+     ∀n1,T1. ⦃G0,L0.ⓑ{I}V0⦄ ⊢ T0 ➡[n1,h] T1 → T0 ≛ T1 →
+     ∀n2,T2. ⦃G0,L0.ⓑ{I}V0⦄ ⊢ T0 ➡[n2,h] T2 → T0 ≛ T2 →
      ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
-     ∃∃T. ⦃G0,L1⦄ ⊢ ⓑ{p,I}V0.T1 ➡[n2-n1,h] T & ⓑ{p,I}V0.T1 ≛[h,o] T & ⦃G0,L2⦄ ⊢ ⓑ{p,I}V0.T2 ➡[n1-n2,h] T & ⓑ{p,I}V0.T2 ≛[h,o] T.
-#a #h #o #p #I #G0 #L0 #V0 #T0 #IH #H0
+     ∃∃T. ⦃G0,L1⦄ ⊢ ⓑ{p,I}V0.T1 ➡[n2-n1,h] T & ⓑ{p,I}V0.T1 ≛ T & ⦃G0,L2⦄ ⊢ ⓑ{p,I}V0.T2 ➡[n1-n2,h] 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
 elim (cnv_inv_bind … H0) -H0 #_ #HT0
@@ -55,14 +54,14 @@ elim (IH … H1T01 H2T01 … H1T02 H2T02 (L1.ⓑ{I}V0) … (L2.ⓑ{I}V0)) [|*: /
 /3 width=7 by cpm_bind, tdeq_pair, ex4_intro/
 qed-.
 
-fact cnv_cpm_tdeq_conf_lpr_appl_appl_aux (a) (h) (o) (G0) (L0) (V0) (T0):
-     (â\88\80G,L,T. â¦\83G0,L0,â\93\90V0.T0â¦\84 â\8a\90+ â¦\83G,L,Tâ¦\84 â\86\92 IH_cnv_cpm_tdeq_conf_lpr a h o G L T) →
-     ⦃G0,L0⦄ ⊢ ⓐV0.T0 ![a,h] →
-     ∀n1,T1. ⦃G0,L0⦄ ⊢ T0 ➡[n1,h] T1 → T0 ≛[h,o] T1 →
-     ∀n2,T2. ⦃G0,L0⦄ ⊢ T0 ➡[n2,h] T2 → T0 ≛[h,o] T2 →
+fact cnv_cpm_tdeq_conf_lpr_appl_appl_aux (h) (a) (G0) (L0) (V0) (T0):
+     (â\88\80G,L,T. â¦\83G0,L0,â\93\90V0.T0â¦\84 â¬\82+ â¦\83G,L,Tâ¦\84 â\86\92 IH_cnv_cpm_tdeq_conf_lpr h a G L T) →
+     ⦃G0,L0⦄ ⊢ ⓐV0.T0 ![h,a] →
+     ∀n1,T1. ⦃G0,L0⦄ ⊢ T0 ➡[n1,h] T1 → T0 ≛ T1 →
+     ∀n2,T2. ⦃G0,L0⦄ ⊢ T0 ➡[n2,h] T2 → T0 ≛ T2 →
      ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
-     ∃∃T. ⦃G0,L1⦄ ⊢ ⓐV0.T1 ➡[n2-n1,h] T & ⓐV0.T1 ≛[h,o] T & ⦃G0,L2⦄ ⊢ ⓐV0.T2 ➡[n1-n2,h] T & ⓐV0.T2 ≛[h,o] T.
-#a #h #o #G0 #L0 #V0 #T0 #IH #H0
+     ∃∃T. ⦃G0,L1⦄ ⊢ ⓐV0.T1 ➡[n2-n1,h] T & ⓐV0.T1 ≛ T & ⦃G0,L2⦄ ⊢ ⓐV0.T2 ➡[n1-n2,h] T & ⓐV0.T2 ≛ T.
+#h #a #G0 #L0 #V0 #T0 #IH #H0
 #n1 #T1 #H1T01 #H2T01 #n2 #T2 #H1T02 #H2T02
 #L1 #HL01 #L2 #HL02
 elim (cnv_inv_appl … H0) -H0 #n0 #p0 #X01 #X02 #_ #_ #HT0 #_ #_ -n0 -p0 -X01 -X02
@@ -71,16 +70,16 @@ elim (IH … H1T01 H2T01 … H1T02 H2T02 … HL01 … HL02) [|*: /2 width=1 by f
 /3 width=7 by cpm_appl, tdeq_pair, ex4_intro/
 qed-.
 
-fact cnv_cpm_tdeq_conf_lpr_cast_cast_aux (a) (h) (o) (G0) (L0) (V0) (T0):
-     (â\88\80G,L,T. â¦\83G0,L0,â\93\9dV0.T0â¦\84 â\8a\90+ â¦\83G,L,Tâ¦\84 â\86\92 IH_cnv_cpm_tdeq_conf_lpr a h o G L T) →
-     ⦃G0,L0⦄ ⊢ ⓝV0.T0 ![a,h] →
-     ∀n1,V1. ⦃G0,L0⦄ ⊢ V0 ➡[n1,h] V1 → V0 ≛[h,o] V1 →
-     ∀n2,V2. ⦃G0,L0⦄ ⊢ V0 ➡[n2,h] V2 → V0 ≛[h,o] V2 →
-     ∀T1. ⦃G0,L0⦄ ⊢ T0 ➡[n1,h] T1 → T0 ≛[h,o] T1 →
-     ∀T2. ⦃G0,L0⦄ ⊢ T0 ➡[n2,h] T2 → T0 ≛[h,o] T2 →
+fact cnv_cpm_tdeq_conf_lpr_cast_cast_aux (h) (a) (G0) (L0) (V0) (T0):
+     (â\88\80G,L,T. â¦\83G0,L0,â\93\9dV0.T0â¦\84 â¬\82+ â¦\83G,L,Tâ¦\84 â\86\92 IH_cnv_cpm_tdeq_conf_lpr h a G L T) →
+     ⦃G0,L0⦄ ⊢ ⓝV0.T0 ![h,a] →
+     ∀n1,V1. ⦃G0,L0⦄ ⊢ V0 ➡[n1,h] V1 → V0 ≛ V1 →
+     ∀n2,V2. ⦃G0,L0⦄ ⊢ V0 ➡[n2,h] V2 → V0 ≛ V2 →
+     ∀T1. ⦃G0,L0⦄ ⊢ T0 ➡[n1,h] T1 → T0 ≛ T1 →
+     ∀T2. ⦃G0,L0⦄ ⊢ T0 ➡[n2,h] T2 → T0 ≛ T2 →
      ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
-     ∃∃T. ⦃G0,L1⦄ ⊢ ⓝV1.T1 ➡[n2-n1,h] T & ⓝV1.T1≛[h,o]T & ⦃G0,L2⦄ ⊢ ⓝV2.T2 ➡[n1-n2,h] T & ⓝV2.T2≛[h,o]T.
-#a #h #o #G0 #L0 #V0 #T0 #IH #H0
+     ∃∃T. ⦃G0,L1⦄ ⊢ ⓝV1.T1 ➡[n2-n1,h] T & ⓝV1.T1 ≛ T & ⦃G0,L2⦄ ⊢ ⓝV2.T2 ➡[n1-n2,h] 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
 elim (cnv_inv_cast … H0) -H0 #X0 #HV0 #HT0 #_ #_ -X0
@@ -90,23 +89,23 @@ elim (IH … H1T01 H2T01 … H1T02 H2T02 … HL01 … HL02) [|*: /2 width=1 by f
 /3 width=7 by cpm_cast, tdeq_pair, ex4_intro/
 qed-.
 
-fact cnv_cpm_tdeq_conf_lpr_aux (a) (h) (o) (G0) (L0) (T0):
-     (â\88\80G,L,T. â¦\83G0,L0,T0â¦\84 â\8a\90+ â¦\83G,L,Tâ¦\84 â\86\92 IH_cnv_cpm_tdeq_conf_lpr a h o G L T) →
-     ∀G,L,T. G0 = G → L0 = L → T0 = T → IH_cnv_cpm_tdeq_conf_lpr a h o G L T.
-#a #h #o #G0 #L0 #T0 #IH1 #G #L * [| * [| * ]]
+fact cnv_cpm_tdeq_conf_lpr_aux (h) (a) (G0) (L0) (T0):
+     (â\88\80G,L,T. â¦\83G0,L0,T0â¦\84 â¬\82+ â¦\83G,L,Tâ¦\84 â\86\92 IH_cnv_cpm_tdeq_conf_lpr h a G L T) →
+     ∀G,L,T. G0 = G → L0 = L → T0 = T → IH_cnv_cpm_tdeq_conf_lpr h a G L T.
+#h #a #G0 #L0 #T0 #IH1 #G #L * [| * [| * ]]
 [ #I #HG0 #HL0 #HT0 #HT #n1 #X1 #H1X1 #H2X1 #n2 #X2 #H1X2 #H2X2 #L1 #HL1 #L2 #HL2 destruct
   elim (cpm_tdeq_inv_atom_sn … H1X1 H2X1) -H1X1 -H2X1 *
   elim (cpm_tdeq_inv_atom_sn … H1X2 H2X2) -H1X2 -H2X2 *
   [ #H21 #H22 #H11 #H12 destruct -a -L
     <minus_O_n
     /2 width=1 by cnv_cpm_tdeq_conf_lpr_atom_atom_aux/
-  | #s2 #H21 #H22 #H23 #Hs2 #H11 #H12 destruct -a -L
+  | #s2 #H21 #H22 #H23 #H11 #H12 destruct -a -L
     <minus_O_n <minus_n_O
     /2 width=1 by cnv_cpm_tdeq_conf_lpr_atom_ess_aux/
-  | #H21 #H22 #s1 #H11 #H12 #H13 #Hs1 destruct -a -L
+  | #H21 #H22 #s1 #H11 #H12 #H13 destruct -a -L
     <minus_O_n <minus_n_O
     @ex4_commute /2 width=1 by cnv_cpm_tdeq_conf_lpr_atom_ess_aux/
-  | #s2 #H21 #H22 #H23 #_ #s1 #H11 #H12 #H13 #_ destruct -a -L
+  | #s2 #H21 #H22 #H23 #s1 #H11 #H12 #H13 destruct -a -L
     <minus_n_n
     /2 width=1 by cnv_cpm_tdeq_conf_lpr_atom_atom_aux/
   ]
@@ -128,9 +127,9 @@ fact cnv_cpm_tdeq_conf_lpr_aux (a) (h) (o) (G0) (L0) (T0):
 ]
 qed-.
 
-lemma cnv_cpm_tdeq_conf_lpr (a) (h) (o) (G0) (L0) (T0):
-      IH_cnv_cpm_tdeq_conf_lpr a h o G0 L0 T0.
-#a #h #o #G0 #L0 #T0
+lemma cnv_cpm_tdeq_conf_lpr (h) (a) (G0) (L0) (T0):
+      IH_cnv_cpm_tdeq_conf_lpr h a G0 L0 T0.
+#h #a #G0 #L0 #T0
 @(fqup_wf_ind (Ⓣ) … G0 L0 T0) -G0 -L0 -T0 #G0 #L0 #T0 #IH
 /3 width=17 by cnv_cpm_tdeq_conf_lpr_aux/
 qed-.
index 7b19372587bad0a094c758e0ffe8a67577bd0868..c71ef297a72472b5116d586739b7e9785d47ddc7 100644 (file)
@@ -17,25 +17,25 @@ include "basic_2/dynamic/cnv_cpm_tdeq.ma".
 
 (* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
 
-definition IH_cnv_cpm_tdeq_cpm_trans (a) (h) (o): relation3 genv lenv term ≝
-           λG,L,T1. ⦃G, L⦄ ⊢ T1 ![a,h] →
-           ∀n1,T.  ⦃G,L⦄ ⊢ T1 ➡[n1,h] T → T1 ≛[h,o] T →
+definition IH_cnv_cpm_tdeq_cpm_trans (h) (a): relation3 genv lenv term ≝
+           λG,L,T1. ⦃G,L⦄ ⊢ T1 ![h,a] →
+           ∀n1,T. ⦃G,L⦄ ⊢ T1 ➡[n1,h] T → T1 ≛ T →
            ∀n2,T2. ⦃G,L⦄ ⊢ T ➡[n2,h] T2 →
-           ∃∃T0. ⦃G,L⦄ ⊢ T1 ➡[n2,h] T0 & ⦃G,L⦄ ⊢ T0 ➡[n1,h] T2 & T0 ≛[h,o] T2.
+           ∃∃T0. ⦃G,L⦄ ⊢ T1 ➡[n2,h] T0 & ⦃G,L⦄ ⊢ T0 ➡[n1,h] T2 & T0 ≛ T2.
 
 (* Transitive properties restricted rt-transition for terms *****************)
 
-fact cnv_cpm_tdeq_cpm_trans_sub (a) (h) (o) (G0) (L0) (T0):
-     (∀G,L,T. ⦃G0, L0, T0⦄ >[h,o] ⦃G, L, T⦄ → IH_cnv_cpm_trans_lpr a h G L T) →
-     (â\88\80G,L,T. â¦\83G0,L0,T0â¦\84 â\8a\90+ â¦\83G,L,Tâ¦\84 â\86\92 IH_cnv_cpm_tdeq_cpm_trans a h o G L T) →
-     ∀G,L,T1. G0 = G → L0 = L → T0 = T1 → IH_cnv_cpm_tdeq_cpm_trans a h o G L T1.
-#a #h #o #G0 #L0 #T0 #IH2 #IH1 #G #L * [| * [| * ]]
+fact cnv_cpm_tdeq_cpm_trans_sub (h) (a) (G0) (L0) (T0):
+     (∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpm_trans_lpr h a G L T) →
+     (â\88\80G,L,T. â¦\83G0,L0,T0â¦\84 â¬\82+ â¦\83G,L,Tâ¦\84 â\86\92 IH_cnv_cpm_tdeq_cpm_trans h a G L T) →
+     ∀G,L,T1. G0 = G → L0 = L → T0 = T1 → IH_cnv_cpm_tdeq_cpm_trans h a G L T1.
+#h #a #G0 #L0 #T0 #IH2 #IH1 #G #L * [| * [| * ]]
 [ #I #_ #_ #_ #_ #n1 #X1 #H1X #H2X #n2 #X2 #HX2 destruct -G0 -L0 -T0
   elim (cpm_tdeq_inv_atom_sn … H1X H2X) -H1X -H2X *
   [ #H1 #H2 destruct /2 width=4 by ex3_intro/
-  | #s #H1 #H2 #H3 #Hs destruct
+  | #s #H1 #H2 #H3 destruct
     elim (cpm_inv_sort1 … HX2) -HX2 #H #Hn2 destruct >iter_n_Sm
-    /5 width=6 by cpm_sort, tdeq_sort, deg_iter, deg_next, ex3_intro/
+    /3 width=4 by cpm_sort, tdeq_sort, ex3_intro/
   ]
 | #p #I #V1 #T1 #HG #HL #HT #H0 #n1 #X1 #H1X #H2X #n2 #X2 #HX2 destruct
   elim (cpm_tdeq_inv_bind_sn … H0 … H1X H2X) -H0 -H1X -H2X #T #_ #H0T1 #H1T1 #H2T1 #H destruct
@@ -88,10 +88,10 @@ fact cnv_cpm_tdeq_cpm_trans_sub (a) (h) (o) (G0) (L0) (T0):
 ]
 qed-.
 
-fact cnv_cpm_tdeq_cpm_trans_aux (a) (h) (o) (G0) (L0) (T0):
-     (∀G,L,T. ⦃G0, L0, T0⦄ >[h, o] ⦃G, L, T⦄ → IH_cnv_cpm_trans_lpr a h G L T) →
-     IH_cnv_cpm_tdeq_cpm_trans a h o G0 L0 T0.
-#a #h #o #G0 #L0 #T0
+fact cnv_cpm_tdeq_cpm_trans_aux (h) (a) (G0) (L0) (T0):
+     (∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpm_trans_lpr h a G L T) →
+     IH_cnv_cpm_tdeq_cpm_trans h a G0 L0 T0.
+#h #a #G0 #L0 #T0
 @(fqup_wf_ind (Ⓣ) … G0 L0 T0) -G0 -L0 -T0 #G0 #L0 #T0 #IH #IH0
 /5 width=10 by cnv_cpm_tdeq_cpm_trans_sub, fqup_fpbg_trans/
 qed-.
index 6d58815d0b091370a8902a190d8ad203c78c387a..84ef77264af5b402754d4a13e8e522a3155f3456 100644 (file)
 
 include "ground_2/lib/arith_2b.ma".
 include "basic_2/rt_computation/cprs_cprs.ma".
-include "basic_2/rt_computation/lprs_cpms.ma".
 include "basic_2/dynamic/cnv_drops.ma".
 include "basic_2/dynamic/cnv_preserve_sub.ma".
+include "basic_2/dynamic/cnv_aaa.ma".
 include "basic_2/dynamic/lsubv_cnv.ma".
 
 (* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
 
 (* Sub preservation propery with t-bound rt-transition for terms ************)
 
-fact cnv_cpm_trans_lpr_aux (a) (h) (o):
-                           ∀G0,L0,T0.
-                           (∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpms_conf_lpr a h G1 L1 T1) →
-                           (∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpm_trans_lpr a h G1 L1 T1) →
-                           ∀G1,L1,T1. G0 = G1 → L0 = L1 → T0 = T1 → IH_cnv_cpm_trans_lpr a h G1 L1 T1.
-#a #h #o #G0 #L0 #T0 #IH2 #IH1 #G1 #L1 * * [|||| * ]
+fact cnv_cpm_trans_lpr_aux (h) (a):
+     ∀G0,L0,T0.
+     (∀G1,L1,T1. ⦃G0,L0,T0⦄ >[h] ⦃G1,L1,T1⦄ → IH_cnv_cpms_conf_lpr h a G1 L1 T1) →
+     (∀G1,L1,T1. ⦃G0,L0,T0⦄ >[h] ⦃G1,L1,T1⦄ → IH_cnv_cpm_trans_lpr h a G1 L1 T1) →
+     ∀G1,L1,T1. G0 = G1 → L0 = L1 → T0 = T1 → IH_cnv_cpm_trans_lpr h a G1 L1 T1.
+#h #a #G0 #L0 #T0 #IH2 #IH1 #G1 #L1 * * [|||| * ]
 [ #s #HG0 #HL0 #HT0 #H1 #x #X #H2 #L2 #_ destruct -IH2 -IH1 -H1
   elim (cpm_inv_sort1 … H2) -H2 #H #_ destruct //
 | #i #HG0 #HL0 #HT0 #H1 #x #X #H2 #L2 #HL12 destruct -IH2
@@ -63,13 +63,14 @@ fact cnv_cpm_trans_lpr_aux (a) (h) (o):
     elim (cnv_cpms_strip_lpr_sub … IH2 … HVW1 … HV12 … HL12 … HL12) [|*: /2 width=2 by fqup_fpbg/ ] -HVW1 -HV12
     <minus_n_O <minus_O_n #XW1 #HXW1 #HXV2
     elim (cnv_cpms_strip_lpr_sub … IH2 … HTU1 … HT12 … HL12 … HL12) [|*: /2 width=2 by fqup_fpbg/ ] -HTU1 -HT12
-    #X #H #HTU2 -IH2 -IH1 -L1 -V1 -T1
-    elim (cpms_inv_abst_sn … H) -H #W2 #U2 #HW12 #_ #H destruct
+    #X #H #HTX2 -IH2 -IH1 -L1 -V1 -T1
+    elim (cpms_inv_abst_sn … H) -H #W2 #X2 #HW12 #_ #H destruct
     elim (cprs_conf … HXW1 … HW12) -W1 #W1 #HXW1 #HW21
     lapply (cpms_trans … HXV2 … HXW1) -XW1 <plus_n_O #HV2W1
-    lapply (cpms_trans … HTU2 … (ⓛ{p}W1.U2) ?)
-    [3:|*: /2 width=2 by cpms_bind/ ] -W2 <plus_n_O #HTU2
-    /4 width=7 by cnv_appl, minus_le_trans_sn/
+    lapply (cpms_trans … HTX2 … (ⓛ{p}W1.X2) ?)
+    [3:|*: /2 width=2 by cpms_bind/ ] -W2 <plus_n_O #HTX2
+    elim (cnv_fwd_cpms_abst_dx_le … HT2 … HTX2 n) -HTX2 [| // ] #U2 #HTU2 #_ -X2
+    /2 width=7 by cnv_appl/
   | #q #V2 #W10 #W20 #T10 #T20 #HV12 #HW120 #HT120 #H1 #H2 destruct
     elim (cnv_inv_bind … HT1) -HT1 #HW10 #HT10
     elim (cpms_inv_abst_sn … HTU1) -HTU1 #W30 #T30 #HW130 #_ #H destruct -T30
@@ -94,15 +95,16 @@ fact cnv_cpm_trans_lpr_aux (a) (h) (o):
     elim (cnv_cpms_strip_lpr_sub … IH2 … HVW1 … HV10 … HL12 … HL12) [|*: /2 width=2 by fqup_fpbg/ ] -HVW1 -HV10
     <minus_n_O <minus_O_n #XW1 #HXW1 #HXV0
     elim (cnv_cpms_strip_lpr_sub … IH2 … HTU0 … HT02 … (L2.ⓓW2) … (L2.ⓓW2)) [|*: /2 width=2 by fqup_fpbg, lpr_pair/ ] -HTU0 -HT02 -HW02
-    #X #H #HTU2 -IH2 -IH1 -L1 -W0 -T0 -U1
-    elim (cpms_inv_abst_sn … H) -H #W #U2 #HW3 #_ #H destruct -U3
+    #X #H #HTX2 -IH2 -IH1 -L1 -W0 -T0 -U1
+    elim (cpms_inv_abst_sn … H) -H #W #X2 #HW3 #_ #H destruct -U3
     lapply (cnv_lifts … HV0 (Ⓣ) … (L2.ⓓW2) … HV02) /3 width=1 by drops_refl, drops_drop/ -HV0 #HV2
     elim (cpms_lifts_sn … HXV0 (Ⓣ) … (L2.ⓓW2) … HV02) /3 width=1 by drops_refl, drops_drop/ -V0 #XW2 #HXW12 #HXVW2
     lapply (cpms_lifts_bi … HXW1 (Ⓣ) … (L2.ⓓW2) … HW13 … HXW12) /3 width=1 by drops_refl, drops_drop/ -W1 -XW1 #HXW32
     elim (cprs_conf … HXW32 … HW3) -W3 #W3 #HXW23 #HW3
     lapply (cpms_trans … HXVW2 … HXW23) -XW2 <plus_n_O #H1
-    lapply (cpms_trans … HTU2 ? (ⓛ{p}W3.U2) ?) [3:|*:/2 width=2 by cpms_bind/ ] -W #H2
-    /5 width=7 by cnv_appl, cnv_bind, minus_le_trans_sn/
+    lapply (cpms_trans … HTX2 ? (ⓛ{p}W3.X2) ?) [3:|*:/2 width=2 by cpms_bind/ ] -W #H2
+    elim (cnv_fwd_cpms_abst_dx_le … HT2 … H2 n) -H2 [| // ] #U2 #HTU2 #_ -X2
+    /3 width=7 by cnv_appl, cnv_bind/
   ]
 | #W1 #T1 #HG0 #HL0 #HT0 #H1 #x #X #H2 #L2 #HL12 destruct
   elim (cnv_inv_cast … H1) -H1 #U1 #HW1 #HT1 #HWU1 #HTU1
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpme.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpme.ma
new file mode 100644 (file)
index 0000000..a3aa687
--- /dev/null
@@ -0,0 +1,47 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/cprs_cnr.ma".
+include "basic_2/rt_computation/cpre.ma".
+include "basic_2/dynamic/cnv_preserve.ma".
+
+(* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
+
+(* Properties with t-bound evaluation on terms ******************************)
+
+lemma cnv_cpme_trans (h) (a) (n) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ T1 ![h,a] →
+      ∀T2. ⦃G,L⦄ ⊢ T1 ➡*[h,n] 𝐍⦃T2⦄ → ⦃G,L⦄ ⊢ T2 ![h,a].
+#h #a #n #G #L #T1 #HT1 #T2 * #HT12 #_
+/2 width=4 by cnv_cpms_trans/
+qed-.
+
+lemma cnv_cpme_cpms_conf (h) (a) (n) (G) (L):
+      ∀T. ⦃G,L⦄ ⊢ T ![h,a] → ∀T1. ⦃G,L⦄ ⊢ T ➡*[n,h] T1 →
+      ∀T2. ⦃G,L⦄ ⊢ T ➡*[h,n] 𝐍⦃T2⦄ → ⦃G,L⦄ ⊢ T1 ➡*[h] 𝐍⦃T2⦄.
+#h #a #n #G #L #T0 #HT0 #T1 #HT01 #T2 * #HT02 #HT2
+elim (cnv_cpms_conf … HT0 … HT01 … HT02) -T0 <minus_n_n #T0 #HT10 #HT20
+lapply (cprs_inv_cnr_sn … HT20 HT2) -HT20 #H destruct
+/2 width=1 by cpme_intro/
+qed-.
+
+(* Main properties with evaluation for t-bound rt-transition on terms *****)
+
+theorem cnv_cpme_mono (h) (a) (n) (G) (L):
+        ∀T. ⦃G,L⦄ ⊢ T ![h,a] → ∀T1. ⦃G,L⦄ ⊢ T ➡*[h,n] 𝐍⦃T1⦄ →
+        ∀T2. ⦃G,L⦄ ⊢ T ➡*[h,n] 𝐍⦃T2⦄ → T1 = T2.
+#h #a #n #G #L #T0 #HT0 #T1 * #HT01 #HT1 #T2 * #HT02 #HT2
+elim (cnv_cpms_conf … HT0 … HT01 … HT02) -T0 <minus_n_n #T0 #HT10 #HT20
+/3 width=7 by cprs_inv_cnr_sn, canc_dx_eq/
+qed-.
index fcb2cb3194ae793470c939da473af41fa560a321..97c7369027cc4793702e6c7812747e6e5843f9d1 100644 (file)
@@ -19,29 +19,29 @@ include "basic_2/dynamic/cnv_cpms_tdeq_conf.ma".
 
 (* Sub confluence propery with t-bound rt-computation for terms *************)
 
-fact cnv_cpms_conf_lpr_tdeq_tdeq_aux (a) (h) (o) (G0) (L0) (T0):
-     (∀G,L,T. ⦃G0,L0,T0⦄ >[h,o] ⦃G,L,T⦄ → IH_cnv_cpm_trans_lpr a h G L T) →
-     (∀G,L,T. ⦃G0,L0,T0⦄ >[h,o] ⦃G,L,T⦄ → IH_cnv_cpms_conf_lpr a h G L T) →
-     ⦃G0,L0⦄ ⊢ T0 ![a,h] →
-     ∀n1,T1. ⦃G0,L0⦄ ⊢ T0 ➡*[n1,h] T1 → T0 ≛[h,o] T1 →
-     ∀n2,T2. ⦃G0,L0⦄ ⊢ T0 ➡*[n2,h] T2 → T0 ≛[h,o] T2 →
+fact cnv_cpms_conf_lpr_tdeq_tdeq_aux (h) (a) (G0) (L0) (T0):
+     (∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpm_trans_lpr h a G L T) →
+     (∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpms_conf_lpr h a G L T) →
+     ⦃G0,L0⦄ ⊢ T0 ![h,a] →
+     ∀n1,T1. ⦃G0,L0⦄ ⊢ T0 ➡*[n1,h] T1 → T0 ≛ T1 →
+     ∀n2,T2. ⦃G0,L0⦄ ⊢ T0 ➡*[n2,h] T2 → T0 ≛ T2 →
      ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
      ∃∃T. ⦃G0,L1⦄ ⊢ T1 ➡*[n2-n1,h] T & ⦃G0,L2⦄ ⊢ T2 ➡*[n1-n2,h] T.
-#a #h #o #G #L0 #T0 #IH2 #IH1 #HT0
+#h #a #G #L0 #T0 #IH2 #IH1 #HT0
 #n1 #T1 #H1T01 #H2T01 #n2 #T2 #H1T02 #H2T02
 #L1 #HL01 #L2 #HL02
 elim (cnv_cpms_tdeq_conf_lpr_aux … IH2 IH1 … H1T01 … H1T02 … HL01 … HL02) -IH2 -IH1 -H1T01 -H1T02 -HL01 -HL02
 /2 width=3 by ex2_intro/
 qed-.
 
-fact cnv_cpms_conf_lpr_refl_tdneq_sub (a) (h) (o) (G0) (L0) (T0) (m21) (m22):
-     (∀G,L,T. ⦃G0,L0,T0⦄ >[h,o] ⦃G,L,T⦄ → IH_cnv_cpm_trans_lpr a h G L T) →
-     (∀G,L,T. ⦃G0,L0,T0⦄ >[h,o] ⦃G,L,T⦄ → IH_cnv_cpms_conf_lpr a h G L T) →
-     ⦃G0,L0⦄ ⊢ T0 ![a,h] →
-     ∀X2. ⦃G0,L0⦄ ⊢ T0 ➡[m21,h] X2 → (T0 ≛[h,o] X2 → ⊥) → ∀T2. ⦃G0,L0⦄ ⊢ X2 ➡*[m22,h] T2 →
+fact cnv_cpms_conf_lpr_refl_tdneq_sub (h) (a) (G0) (L0) (T0) (m21) (m22):
+     (∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpm_trans_lpr h a G L T) →
+     (∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpms_conf_lpr h a G L T) →
+     ⦃G0,L0⦄ ⊢ T0 ![h,a] →
+     ∀X2. ⦃G0,L0⦄ ⊢ T0 ➡[m21,h] X2 → (T0 ≛ X2 → ⊥) → ∀T2. ⦃G0,L0⦄ ⊢ X2 ➡*[m22,h] T2 →
      ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
      ∃∃T. ⦃G0,L1⦄ ⊢ T0 ➡*[m21+m22,h] T& ⦃G0,L2⦄ ⊢ T2 ➡*[h] T.
-#a #h #o #G0 #L0 #T0 #m21 #m22 #IH2 #IH1 #H0
+#h #a #G0 #L0 #T0 #m21 #m22 #IH2 #IH1 #H0
 #X2 #HX02 #HnX02 #T2 #HXT2
 #L1 #HL01 #L2 #HL02
 lapply (cnv_cpm_trans_lpr_aux … IH1 IH2 … HX02 … L0 ?) // #HX2
@@ -50,39 +50,39 @@ elim (cnv_cpm_conf_lpr_aux … IH2 IH1 … HX02 … 0 T0 … L0 … HL01) //
 elim (cnv_cpms_strip_lpr_sub … IH1 … HXT2 0 X2 … HL02 L0) [|*: /4 width=2 by fpb_fpbg, cpm_fpb/ ]
 <minus_n_O <minus_O_n #Y2 #HTY2 #HXY2 -HXT2
 elim (IH1 … HXY1 … HXY2 … HL01 … HL02) [|*: /4 width=2 by fpb_fpbg, cpm_fpb/ ]
--a -o -L0 -X2 <minus_n_O <minus_O_n #Y #HY1 #HY2
+-a -L0 -X2 <minus_n_O <minus_O_n #Y #HY1 #HY2
 lapply (cpms_trans … HTY1 … HY1) -Y1 #HT0Y
 lapply (cpms_trans … HTY2 … HY2) -Y2 #HT2Y
 /2 width=3 by ex2_intro/
 qed-.
 
-fact cnv_cpms_conf_lpr_step_tdneq_sub (a) (h) (o) (G0) (L0) (T0) (m11) (m12) (m21) (m22):
-     (∀G,L,T. ⦃G0,L0,T0⦄ >[h,o] ⦃G,L,T⦄ → IH_cnv_cpm_trans_lpr a h G L T) →
-     (∀G,L,T. ⦃G0,L0,T0⦄ >[h,o] ⦃G,L,T⦄ → IH_cnv_cpms_conf_lpr a h G L T) →
-     ⦃G0,L0⦄ ⊢ T0 ![a,h] →
-     ∀X1. ⦃G0,L0⦄ ⊢ T0 ➡[m11,h] X1 → T0 ≛[h,o] X1 → ∀T1. ⦃G0,L0⦄ ⊢ X1 ➡*[m12,h] T1 → X1 ≛[h,o] T1 →
-     ∀X2. ⦃G0,L0⦄ ⊢ T0 ➡[m21,h] X2 → (T0 ≛[h,o] X2 → ⊥) → ∀T2. ⦃G0,L0⦄ ⊢ X2 ➡*[m22,h] T2 →
+fact cnv_cpms_conf_lpr_step_tdneq_sub (h) (a) (G0) (L0) (T0) (m11) (m12) (m21) (m22):
+     (∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpm_trans_lpr h a G L T) →
+     (∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpms_conf_lpr h a G L T) →
+     ⦃G0,L0⦄ ⊢ T0 ![h,a] →
+     ∀X1. ⦃G0,L0⦄ ⊢ T0 ➡[m11,h] X1 → T0 ≛ X1 → ∀T1. ⦃G0,L0⦄ ⊢ X1 ➡*[m12,h] T1 → X1 ≛ T1 →
+     ∀X2. ⦃G0,L0⦄ ⊢ T0 ➡[m21,h] X2 → (T0 ≛ X2 → ⊥) → ∀T2. ⦃G0,L0⦄ ⊢ X2 ➡*[m22,h] T2 →
      ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
-     ((∀G,L,T. ⦃G0,L0,X1⦄ >[h,o] ⦃G,L,T⦄ → IH_cnv_cpm_trans_lpr a h G L T) →
-      (∀G,L,T. ⦃G0,L0,X1⦄ >[h,o] ⦃G,L,T⦄ → IH_cnv_cpms_conf_lpr a h G L T) →
-      ∀m21,m22.
-      ∀X2. ⦃G0,L0⦄ ⊢ X1 ➡[m21,h] X2 → (X1 ≛[h,o] X2 → ⊥) →
-      ∀T2. ⦃G0,L0⦄ ⊢ X2 ➡*[m22,h] T2 →
-      ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
-      ∃∃T. ⦃G0,L1⦄ ⊢ T1 ➡*[m21+m22-m12,h] T & ⦃G0,L2⦄ ⊢ T2 ➡*[m12-(m21+m22),h]T
+     ((∀G,L,T. ⦃G0,L0,X1⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpm_trans_lpr h a G L T) →
+       (∀G,L,T. ⦃G0,L0,X1⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpms_conf_lpr h a G L T) →
+       ∀m21,m22.
+       ∀X2. ⦃G0,L0⦄ ⊢ X1 ➡[m21,h] X2 → (X1 ≛ X2 → ⊥) →
+       ∀T2. ⦃G0,L0⦄ ⊢ X2 ➡*[m22,h] T2 →
+       ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
+       ∃∃T. ⦃G0,L1⦄ ⊢ T1 ➡*[m21+m22-m12,h] T & ⦃G0,L2⦄ ⊢ T2 ➡*[m12-(m21+m22),h]T
      ) →
      ∃∃T. ⦃G0,L1⦄ ⊢ T1 ➡*[m21+m22-(m11+m12),h] T & ⦃G0,L2⦄ ⊢ T2 ➡*[m11+m12-(m21+m22),h] T.
-#a #h #o #G0 #L0 #T0 #m11 #m12 #m21 #m22 #IH2 #IH1 #HT0
+#h #a #G0 #L0 #T0 #m11 #m12 #m21 #m22 #IH2 #IH1 #HT0
 #X1 #H1X01 #H2X01 #T1 #H1XT1 #H2XT1 #X2 #H1X02 #H2X02 #T2 #HXT2
 #L1 #HL01 #L2 #HL02 #IH
 lapply (cnv_cpm_trans_lpr_aux … IH1 IH2 … H1X01 … L0 ?) // #HX1
 lapply (cnv_cpm_trans_lpr_aux … IH1 IH2 … H1X02 … L0 ?) // #HX2
 elim (cnv_cpm_conf_lpr_aux … IH2 IH1 … H1X01 … H1X02 … L0 … L0) // #Z0 #HXZ10 #HXZ20
-cut (⦃G0,L0,T0⦄ >[h,o] ⦃G0,L0,X2⦄) [ /4 width=5 by cpms_fwd_fpbs, cpm_fpb, ex2_3_intro/ ] #H1fpbg (**) (* cut *)
-lapply (fpbg_fpbs_trans ??? G0 ? L0 ? Z0 ? … H1fpbg) [ /2 width=2 by cpms_fwd_fpbs/ ] #H2fpbg
+cut (⦃G0, L0, T0⦄ >[h] ⦃G0, L0, X2⦄) [ /4 width=5 by cpms_fwd_fpbs, cpm_fpb, ex2_3_intro/ ] #H1fpbg (**) (* cut *)
+lapply (fpbg_fpbs_trans ?? G0 ? L0 ? Z0 ? … H1fpbg) [ /2 width=2 by cpms_fwd_fpbs/ ] #H2fpbg
 lapply (cnv_cpms_trans_lpr_sub … IH2 … HXZ20 … L0 ?) // #HZ0
 elim (IH1 … HXT2 … HXZ20 … L2 … L0) [|*: /4 width=2 by fpb_fpbg, cpm_fpb/ ] -HXT2 -HXZ20 #Z2 #HTZ2 #HZ02
-elim (tdeq_dec h o X1 Z0) #H2XZ
+elim (tdeq_dec X1 Z0) #H2XZ
 [ -IH
   elim (cnv_cpms_conf_lpr_tdeq_tdeq_aux … HX1 … H1XT1 H2XT1 … HXZ10 H2XZ … L1 … L0) [2,3: // |4,5: /4 width=5 by cpm_fpbq, fpbq_fpbg_trans/ ]
 | -H1XT1 -H2XT1
@@ -98,15 +98,15 @@ lapply (cpms_trans … HTZ2 … HZ02) -Z2 <arith_l4 #HT2Z
 /2 width=3 by ex2_intro/
 qed-.
 
-fact cnv_cpms_conf_lpr_tdeq_tdneq_aux (a) (h) (o) (G0) (L0) (T0) (n1) (m21) (m22):
-     (∀G,L,T. ⦃G0,L0,T0⦄ >[h,o] ⦃G,L,T⦄ → IH_cnv_cpm_trans_lpr a h G L T) →
-     (∀G,L,T. ⦃G0,L0,T0⦄ >[h,o] ⦃G,L,T⦄ → IH_cnv_cpms_conf_lpr a h G L T) →
-     ⦃G0,L0⦄ ⊢ T0 ![a,h] →
-     ∀T1. ⦃G0,L0⦄ ⊢ T0 ➡*[n1,h] T1 → T0 ≛[h,o] T1 →
-     ∀X2. ⦃G0,L0⦄ ⊢ T0 ➡[m21,h] X2 → (T0 ≛[h,o] X2 → ⊥) → ∀T2. ⦃G0,L0⦄ ⊢ X2 ➡*[m22,h] T2 →
+fact cnv_cpms_conf_lpr_tdeq_tdneq_aux (h) (a) (G0) (L0) (T0) (n1) (m21) (m22):
+     (∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpm_trans_lpr h a G L T) →
+     (∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpms_conf_lpr h a G L T) →
+     ⦃G0,L0⦄ ⊢ T0 ![h,a] →
+     ∀T1. ⦃G0,L0⦄ ⊢ T0 ➡*[n1,h] T1 → T0 ≛ T1 →
+     ∀X2. ⦃G0,L0⦄ ⊢ T0 ➡[m21,h] X2 → (T0 ≛ X2 → ⊥) → ∀T2. ⦃G0,L0⦄ ⊢ X2 ➡*[m22,h] T2 →
      ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
      ∃∃T. ⦃G0,L1⦄ ⊢ T1 ➡*[m21+m22-n1,h] T & ⦃G0,L2⦄ ⊢ T2 ➡*[n1-(m21+m22),h] T.
-#a #h #o #G0 #L0 #T0 #n1 #m21 #m22 #IH2 #IH1 #HT0
+#h #a #G0 #L0 #T0 #n1 #m21 #m22 #IH2 #IH1 #HT0
 #T1 #H1T01 #H2T01
 generalize in match m22; generalize in match m21; -m21 -m22
 generalize in match IH1; generalize in match IH2;
@@ -121,22 +121,22 @@ generalize in match IH1; generalize in match IH2;
 ]
 qed-.
 
-fact cnv_cpms_conf_lpr_tdneq_tdneq_aux (a) (h) (o) (G0) (L0) (T0) (m11) (m12) (m21) (m22):
-     (∀G,L,T. ⦃G0,L0,T0⦄ >[h,o] ⦃G,L,T⦄ → IH_cnv_cpm_trans_lpr a h G L T) →
-     (∀G,L,T. ⦃G0,L0,T0⦄ >[h,o] ⦃G,L,T⦄ → IH_cnv_cpms_conf_lpr a h G L T) →
-     ⦃G0,L0⦄ ⊢ T0 ![a,h] →
-     ∀X1. ⦃G0,L0⦄ ⊢ T0 ➡[m11,h] X1 → (T0 ≛[h,o] X1 → ⊥) → ∀T1. ⦃G0,L0⦄ ⊢ X1 ➡*[m12,h] T1 →
-     ∀X2. ⦃G0,L0⦄ ⊢ T0 ➡[m21,h] X2 → (T0 ≛[h,o] X2 → ⊥) → ∀T2. ⦃G0,L0⦄ ⊢ X2 ➡*[m22,h] T2 →
+fact cnv_cpms_conf_lpr_tdneq_tdneq_aux (h) (a) (G0) (L0) (T0) (m11) (m12) (m21) (m22):
+     (∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpm_trans_lpr h a G L T) →
+     (∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpms_conf_lpr h a G L T) →
+     ⦃G0,L0⦄ ⊢ T0 ![h,a] →
+     ∀X1. ⦃G0,L0⦄ ⊢ T0 ➡[m11,h] X1 → (T0 ≛ X1 → ⊥) → ∀T1. ⦃G0,L0⦄ ⊢ X1 ➡*[m12,h] T1 →
+     ∀X2. ⦃G0,L0⦄ ⊢ T0 ➡[m21,h] X2 → (T0 ≛ X2 → ⊥) → ∀T2. ⦃G0,L0⦄ ⊢ X2 ➡*[m22,h] T2 →
      ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
      ∃∃T. ⦃G0,L1⦄ ⊢ T1 ➡*[m21+m22-(m11+m12),h] T & ⦃G0,L2⦄ ⊢ T2 ➡*[m11+m12-(m21+m22),h] T.
-#a #h #o #G0 #L0 #T0 #m11 #m12 #m21 #m22 #IH2 #IH1 #H0
+#h #a #G0 #L0 #T0 #m11 #m12 #m21 #m22 #IH2 #IH1 #H0
 #X1 #HX01 #HnX01 #T1 #HXT1 #X2 #HX02 #HnX02 #T2 #HXT2
 #L1 #HL01 #L2 #HL02
 lapply (cnv_cpm_trans_lpr_aux … IH1 IH2 … HX01 … L0 ?) // #HX1
 lapply (cnv_cpm_trans_lpr_aux … IH1 IH2 … HX02 … L0 ?) // #HX2
 elim (cnv_cpm_conf_lpr_aux … IH2 IH1 … HX01 … HX02 … L0 … L0) // #Z0 #HXZ10 #HXZ20
-cut (⦃G0,L0,T0⦄ >[h,o] ⦃G0,L0,X1⦄) [ /4 width=5 by cpms_fwd_fpbs, cpm_fpb, ex2_3_intro/ ] #H1fpbg (**) (* cut *)
-lapply (fpbg_fpbs_trans ??? G0 ? L0 ? Z0 ? … H1fpbg) [ /2 width=2 by cpms_fwd_fpbs/ ] #H2fpbg
+cut (⦃G0, L0, T0⦄ >[h] ⦃G0, L0, X1⦄) [ /4 width=5 by cpms_fwd_fpbs, cpm_fpb, ex2_3_intro/ ] #H1fpbg (**) (* cut *)
+lapply (fpbg_fpbs_trans ?? G0 ? L0 ? Z0 ? … H1fpbg) [ /2 width=2 by cpms_fwd_fpbs/ ] #H2fpbg
 lapply (cnv_cpms_trans_lpr_sub … IH2 … HXZ10 … L0 ?) // #HZ0
 elim (IH1 … HXT1 … HXZ10 … L1 … L0) [|*: /4 width=2 by fpb_fpbg, cpm_fpb/ ] -HXT1 -HXZ10 #Z1 #HTZ1 #HZ01
 elim (IH1 … HXT2 … HXZ20 … L2 … L0) [|*: /4 width=2 by fpb_fpbg, cpm_fpb/ ] -HXT2 -HXZ20 #Z2 #HTZ2 #HZ02
@@ -146,14 +146,14 @@ lapply (cpms_trans … HTZ2 … HZ02) -Z2 <arith_l4 #HT2Z
 /2 width=3 by ex2_intro/
 qed-.
 
-fact cnv_cpms_conf_lpr_aux (a) (h) (o) (G0) (L0) (T0):
-                           (∀G,L,T. ⦃G0,L0,T0⦄ >[h,o] ⦃G,L,T⦄ → IH_cnv_cpm_trans_lpr a h G L T) →
-                           (∀G,L,T. ⦃G0,L0,T0⦄ >[h,o] ⦃G,L,T⦄ → IH_cnv_cpms_conf_lpr a h G L T) →
-                           ∀G,L,T. G0 = G → L0 = L → T0 = T → IH_cnv_cpms_conf_lpr a h G L T.
-#a #h #o #G #L #T #IH2 #IH1 #G0 #L0 #T0 #HG #HL #HT
+fact cnv_cpms_conf_lpr_aux (h) (a) (G0) (L0) (T0):
+     (∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpm_trans_lpr h a G L T) →
+     (∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpms_conf_lpr h a G L T) →
+     ∀G,L,T. G0 = G → L0 = L → T0 = T → IH_cnv_cpms_conf_lpr h a G L T.
+#h #a #G #L #T #IH2 #IH1 #G0 #L0 #T0 #HG #HL #HT
 #HT0 #n1 #T1 #HT01 #n2 #T2 #HT02 #L1 #HL01 #L2 #HL02 destruct
-elim (tdeq_dec h o T0 T1) #H2T01
-elim (tdeq_dec h o T0 T2) #H2T02
+elim (tdeq_dec T0 T1) #H2T01
+elim (tdeq_dec T0 T2) #H2T02
 [ @(cnv_cpms_conf_lpr_tdeq_tdeq_aux … IH2 IH1) -IH2 -IH1 /2 width=1 by/
 | elim (cpms_tdneq_fwd_step_sn_aux … HT02 HT0 H2T02 IH1 IH2) -HT02 -H2T02
   #m21 #m22 #X2 #HX02 #HnX02 #HXT2 #H2 destruct
index 1c5287e63b02adce8b93171e4d3326fc9174bda9..b0c9d9e1650ac4f40301ca2be3c04004edd8be22 100644 (file)
@@ -18,17 +18,17 @@ include "basic_2/dynamic/cnv_cpm_tdeq_trans.ma".
 
 (* Properties with restricted rt-computation for terms **********************)
 
-fact cpms_tdneq_fwd_step_sn_aux (a) (h) (n) (o) (G) (L) (T1):
-     ∀T2. ⦃G, L⦄ ⊢ T1 ➡*[n,h] T2 → ⦃G, L⦄ ⊢ T1 ![a,h] → (T1 ≛[h,o] T2 → ⊥) →
-     (∀G0,L0,T0. ⦃G,L,T1⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr a h G0 L0 T0) →
-     (∀G0,L0,T0. ⦃G,L,T1⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpm_trans_lpr a h G0 L0 T0) →
-     ∃∃n1,n2,T0. ⦃G, L⦄ ⊢ T1 ➡[n1,h] T0 & T1 ≛[h,o] T0 → ⊥ & ⦃G, L⦄ ⊢ T0 ➡*[n2,h] T2 & n1+n2 = n.
-#a #h #n #o #G #L #T1 #T2 #H
+fact cpms_tdneq_fwd_step_sn_aux (h) (a) (n) (G) (L) (T1):
+     ∀T2. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 → ⦃G,L⦄ ⊢ T1 ![h,a] → (T1 ≛ T2 → ⊥) →
+     (∀G0,L0,T0. ⦃G,L,T1⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
+     (∀G0,L0,T0. ⦃G,L,T1⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpm_trans_lpr h a G0 L0 T0) →
+     ∃∃n1,n2,T0. ⦃G,L⦄ ⊢ T1 ➡[n1,h] T0 & T1 ≛ T0 → ⊥ & ⦃G,L⦄ ⊢ T0 ➡*[n2,h] T2 & n1+n2 = n.
+#h #a #n #G #L #T1 #T2 #H
 @(cpms_ind_sn … H) -n -T1
 [ #_ #H2T2 elim H2T2 -H2T2 //
 | #n1 #n2 #T1 #T #H1T1 #H1T2 #IH #H0T1 #H2T12 #IH2 #IH1
-  elim (tdeq_dec h o T1 T) #H2T1
-  [ elim (tdeq_dec h o T T2) #H2T2
+  elim (tdeq_dec T1 T) #H2T1
+  [ elim (tdeq_dec T T2) #H2T2
     [ -IH -IH2 -IH1 -H0T1 /4 width=7 by tdeq_trans, ex4_3_intro/
     | lapply (cnv_cpm_trans_lpr_aux … IH2 IH1 … H1T1 L ?) [6:|*: // ] -H1T2 -H2T12 #H0T
       elim (IH H0T H2T2) [|*: /4 width=5 by cpm_fpbq, fpbq_fpbg_trans/ ] -IH -IH2 -H0T -H2T2 (**)
@@ -42,23 +42,23 @@ fact cpms_tdneq_fwd_step_sn_aux (a) (h) (n) (o) (G) (L) (T1):
 ]
 qed-.
 
-fact cpms_tdeq_ind_sn (a) (h) (o) (G) (L) (T2) (Q:relation2 …):
-     (⦃G, L⦄ ⊢ T2 ![a,h] → Q 0 T2) →
-     (∀n1,n2,T1,T. ⦃G,L⦄ ⊢ T1 ➡[n1,h] T → ⦃G, L⦄ ⊢ T1 ![a,h] → T1 ≛[h,o] T → ⦃G, L⦄ ⊢ T ➡*[n2,h] T2 → ⦃G, L⦄ ⊢ T ![a,h] → T ≛[h,o] T2 → Q n2 T → Q (n1+n2) T1) →
-     ∀n,T1. ⦃G, L⦄ ⊢ T1 ➡*[n,h] T2 → ⦃G, L⦄ ⊢ T1 ![a,h] → T1 ≛[h,o] T2 →
-     (∀G0,L0,T0. ⦃G,L,T1⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr a h G0 L0 T0) →
-     (∀G0,L0,T0. ⦃G,L,T1⦄ >[h,o] ⦃G0,L0,T0⦄ → IH_cnv_cpm_trans_lpr a h G0 L0 T0) → 
+fact cpms_tdeq_ind_sn (h) (a) (G) (L) (T2) (Q:relation2 …):
+     (⦃G,L⦄ ⊢ T2 ![h,a] → Q 0 T2) →
+     (∀n1,n2,T1,T. ⦃G,L⦄ ⊢ T1 ➡[n1,h] T → ⦃G,L⦄ ⊢ T1 ![h,a] → T1 ≛ T → ⦃G,L⦄ ⊢ T ➡*[n2,h] T2 → ⦃G,L⦄ ⊢ T ![h,a] → T ≛ T2 → Q n2 T → Q (n1+n2) T1) →
+     ∀n,T1. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 → ⦃G,L⦄ ⊢ T1 ![h,a] → T1 ≛ T2 →
+     (∀G0,L0,T0. ⦃G,L,T1⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
+     (∀G0,L0,T0. ⦃G,L,T1⦄ >[h] ⦃G0,L0,T0⦄ → IH_cnv_cpm_trans_lpr h a G0 L0 T0) → 
      Q n T1.
-#a #h #o #G #L #T2 #Q #IB1 #IB2 #n #T1 #H
+#h #a #G #L #T2 #Q #IB1 #IB2 #n #T1 #H
 @(cpms_ind_sn … H) -n -T1
 [ -IB2 #H0T2 #_ #_ #_ /2 width=1 by/
 | #n1 #n2 #T1 #T #H1T1 #H1T2 #IH #H0T1 #H2T12 #IH2 #IH1 -IB1
-  elim (tdeq_dec h o T1 T) #H2T1
+  elim (tdeq_dec T1 T) #H2T1
   [ lapply (cnv_cpm_trans_lpr_aux … IH2 IH1 … H1T1 L ?) [6:|*: // ] #H0T
     lapply (tdeq_canc_sn … H2T1 … H2T12) -H2T12 #H2T2
     /6 width=7 by cpm_fpbq, fpbq_fpbg_trans/ (**)
   | -IB2 -IH -IH2 -IH1
-    elim (cnv_fpbg_refl_false … o … H0T1) -a -Q
+    elim (cnv_fpbg_refl_false … H0T1) -a -Q
     /3 width=8 by cpm_tdneq_cpm_cpms_tdeq_sym_fwd_fpbg/
   ]
 ]
index 56b7c440d9f20db260cd50deef86757d99cbb6b1..20759ddc7fbc3d818a256fceb5c2a08de6f1e787 100644 (file)
@@ -19,14 +19,14 @@ include "basic_2/dynamic/cnv_cpms_tdeq.ma".
 
 (* Sub confluence propery with restricted rt-transition for terms ***********)
 
-fact cnv_cpms_tdeq_strip_lpr_aux (a) (h) (o) (G0) (L0) (T0):
-     (∀G,L,T. ⦃G0,L0,T0⦄ >[h,o] ⦃G,L,T⦄ → IH_cnv_cpm_trans_lpr a h G L T) →
-     (∀G,L,T. ⦃G0,L0,T0⦄ >[h,o] ⦃G,L,T⦄ → IH_cnv_cpms_conf_lpr a h G L T) →
-     ∀n1,T1. ⦃G0,L0⦄ ⊢ T0 ➡*[n1,h] T1 → ⦃G0,L0⦄ ⊢ T0 ![a,h] → T0 ≛[h,o] T1 →
-     ∀n2,T2. ⦃G0,L0⦄ ⊢ T0 ➡[n2,h] T2 → T0 ≛[h,o] T2 →
+fact cnv_cpms_tdeq_strip_lpr_aux (h) (a) (G0) (L0) (T0):
+     (∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpm_trans_lpr h a G L T) →
+     (∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpms_conf_lpr h a G L T) →
+     ∀n1,T1. ⦃G0,L0⦄ ⊢ T0 ➡*[n1,h] T1 → ⦃G0,L0⦄ ⊢ T0 ![h,a] → T0 ≛ T1 →
+     ∀n2,T2. ⦃G0,L0⦄ ⊢ T0 ➡[n2,h] T2 → T0 ≛ T2 →
      ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
-     ∃∃T. ⦃G0,L1⦄ ⊢ T1 ➡[n2-n1,h] T & T1 ≛[h,o] T & ⦃G0,L2⦄ ⊢ T2 ➡*[n1-n2,h] T & T2 ≛[h,o] T.
-#a #h #o #G #L0 #T0 #IH2 #IH1 #n1 #T1 #H1T01 #H0T0 #H2T01
+     ∃∃T. ⦃G0,L1⦄ ⊢ T1 ➡[n2-n1,h] T & T1 ≛ T & ⦃G0,L2⦄ ⊢ T2 ➡*[n1-n2,h] T & T2 ≛ T.
+#h #a #G #L0 #T0 #IH2 #IH1 #n1 #T1 #H1T01 #H0T0 #H2T01
 @(cpms_tdeq_ind_sn … H1T01 H0T0 H2T01 IH1 IH2) -n1 -T0
 [ #H0T1 #n2 #T2 #H1T12 #H2T12 #L1 #HL01 #L2 #HL02
   <minus_O_n <minus_n_O
@@ -44,14 +44,14 @@ fact cnv_cpms_tdeq_strip_lpr_aux (a) (h) (o) (G0) (L0) (T0):
 ]
 qed-.
 
-fact cnv_cpms_tdeq_conf_lpr_aux (a) (h) (o) (G0) (L0) (T0):
-     (∀G,L,T. ⦃G0,L0,T0⦄ >[h,o] ⦃G,L,T⦄ → IH_cnv_cpm_trans_lpr a h G L T) →
-     (∀G,L,T. ⦃G0,L0,T0⦄ >[h,o] ⦃G,L,T⦄ → IH_cnv_cpms_conf_lpr a h G L T) →
-     ∀n1,T1. ⦃G0,L0⦄ ⊢ T0 ➡*[n1,h] T1 → ⦃G0,L0⦄ ⊢ T0 ![a,h] → T0 ≛[h,o] T1 →
-     ∀n2,T2. ⦃G0,L0⦄ ⊢ T0 ➡*[n2,h] T2 → T0 ≛[h,o] T2 →
+fact cnv_cpms_tdeq_conf_lpr_aux (h) (a) (G0) (L0) (T0):
+     (∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpm_trans_lpr h a G L T) →
+     (∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpms_conf_lpr h a G L T) →
+     ∀n1,T1. ⦃G0,L0⦄ ⊢ T0 ➡*[n1,h] T1 → ⦃G0,L0⦄ ⊢ T0 ![h,a] → T0 ≛ T1 →
+     ∀n2,T2. ⦃G0,L0⦄ ⊢ T0 ➡*[n2,h] T2 → T0 ≛ T2 →
      ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
-     ∃∃T. ⦃G0,L1⦄ ⊢ T1 ➡*[n2-n1,h] T & T1 ≛[h,o] T & ⦃G0,L2⦄ ⊢ T2 ➡*[n1-n2,h] T & T2 ≛[h,o] T.
-#a #h #o #G #L0 #T0 #IH2 #IH1 #n1 #T1 #H1T01 #H0T0 #H2T01
+     ∃∃T. ⦃G0,L1⦄ ⊢ T1 ➡*[n2-n1,h] T & T1 ≛ T & ⦃G0,L2⦄ ⊢ T2 ➡*[n1-n2,h] T & T2 ≛ T.
+#h #a #G #L0 #T0 #IH2 #IH1 #n1 #T1 #H1T01 #H0T0 #H2T01
 generalize in match IH1; generalize in match IH2;
 @(cpms_tdeq_ind_sn … H1T01 H0T0 H2T01 IH1 IH2) -n1 -T0
 [ #H0T1 #IH2 #IH1 #n2 #T2 #H1T12 #H2T12 #L1 #HL01 #L2 #HL02
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpmuwe.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpmuwe.ma
new file mode 100644 (file)
index 0000000..09dcccc
--- /dev/null
@@ -0,0 +1,42 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/cpmuwe_csx.ma".
+include "basic_2/rt_equivalence/cpes.ma".
+include "basic_2/dynamic/cnv_preserve.ma".
+
+(* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
+
+(* Properties with t-unbound whd evaluation on terms ************************)
+
+lemma cnv_cpmuwe_trans (h) (a) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ T1 ![h,a] →
+      ∀n,T2. ⦃G,L⦄ ⊢ T1 ➡*𝐍𝐖*[h,n] T2 → ⦃G,L⦄ ⊢ T2 ![h,a].
+/3 width=4 by cpmuwe_fwd_cpms, cnv_cpms_trans/ qed-.
+
+lemma cnv_R_cpmuwe_total (h) (a) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ T1 ![h,a] → ∃n. R_cpmuwe h G L T1 n.
+/4 width=2 by cnv_fwd_fsb, fsb_inv_csx, R_cpmuwe_total_csx/ qed-.
+
+(* Main inversions with head evaluation for t-bound rt-transition on terms **)
+
+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.
+#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/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpmuwe_cpme.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpmuwe_cpme.ma
new file mode 100644 (file)
index 0000000..801a56a
--- /dev/null
@@ -0,0 +1,35 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/cpme_aaa.ma".
+include "basic_2/rt_computation/cnuw_cnuw.ma".
+include "basic_2/rt_computation/cpmuwe.ma".
+include "basic_2/dynamic/cnv_cpme.ma".
+
+(* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
+
+(* Advanced Properties with t-unbound whd evaluation on terms ***************)
+
+lemma cnv_R_cpmuwe_dec (h) (a) (G) (L):
+      ∀T. ⦃G,L⦄ ⊢ T ![h,a] → ∀n. Decidable (R_cpmuwe h G L T n).
+#h #a #G #L #T1 #HT1 #n
+elim (cnv_fwd_aaa … HT1) #A #HA
+elim (cpme_total_aaa h n … HA) -HA #T2 #HT12
+elim (cnuw_dec h G L T2) #HnT1
+[ /5 width=3 by cpme_fwd_cpms, cpmuwe_intro, ex_intro, or_introl/
+| @or_intror * #T3 * #HT13 #HT3
+  lapply (cnv_cpme_cpms_conf … HT1 … HT13 … HT12) -a -T1 #HT32
+  /4 width=9 by cpme_fwd_cpms, cnuw_cpms_trans/
+]
+qed-.
index e4d55446c657ab9b25fba34cd235430f0de92dba..bb1e540fea8a71e0e439c194cddf121c4bc68b1f 100644 (file)
 include "basic_2/rt_computation/cpms_drops.ma".
 include "basic_2/dynamic/cnv.ma".
 
-(* CONTEXT_SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
+(* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
 
 (* Advanced dproperties *****************************************************)
 
 (* Basic_2A1: uses: snv_lref *)
-lemma cnv_lref_drops (a) (h) (G): ∀I,K,V,i,L. ⦃G, K⦄ ⊢ V ![a, h] →
-                                  ⬇*[i] L ≘ K.ⓑ{I}V → ⦃G, L⦄ ⊢ #i ![a, h].
-#a #h #G #I #K #V #i elim i -i
+lemma cnv_lref_drops (h) (a) (G):
+      ∀I,K,V,i,L. ⦃G,K⦄ ⊢ V ![h,a] →
+      ⬇*[i] L ≘ K.ⓑ{I}V → ⦃G,L⦄ ⊢ #i ![h,a].
+#h #a #G #I #K #V #i elim i -i
 [ #L #HV #H
   lapply (drops_fwd_isid … H ?) -H // #H destruct
   /2 width=1 by cnv_zero/
@@ -35,10 +36,10 @@ qed.
 (* Advanced inversion lemmas ************************************************)
 
 (* Basic_2A1: uses: snv_inv_lref *)
-lemma cnv_inv_lref_drops (a) (h) (G):
-                         ∀i,L. ⦃G, L⦄ ⊢ #i ![a, h] →
-                         ∃∃I,K,V. ⬇*[i] L ≘ K.ⓑ{I}V & ⦃G, K⦄ ⊢ V ![a, h].
-#a #h #G #i elim i -i
+lemma cnv_inv_lref_drops (h) (a) (G):
+      ∀i,L. ⦃G,L⦄ ⊢ #i ![h,a] →
+      ∃∃I,K,V. ⬇*[i] L ≘ K.ⓑ{I}V & ⦃G,K⦄ ⊢ V ![h,a].
+#h #a #G #i elim i -i
 [ #L #H
   elim (cnv_inv_zero … H) -H #I #K #V #HV #H destruct
   /3 width=5 by drops_refl, ex2_3_intro/
@@ -49,21 +50,35 @@ lemma cnv_inv_lref_drops (a) (h) (G):
 ]
 qed-.
 
-(* Advanced forward lemmas **************************************************)
-
-lemma cnv_lref_fwd_drops (a) (h) (G):
-                         ∀i,L. ⦃G, L⦄ ⊢ #i ![a, h] →
-                         ∀I,K,V. ⬇*[i] L ≘ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ![a, h].
-#a #h #o #i #L #H #I #K #V #HLK
+lemma cnv_inv_lref_pair (h) (a) (G):
+      ∀i,L. ⦃G,L⦄ ⊢ #i ![h,a] →
+      ∀I,K,V. ⬇*[i] L ≘ K.ⓑ{I}V → ⦃G,K⦄ ⊢ V ![h,a].
+#h #a #G #i #L #H #I #K #V #HLK
 elim (cnv_inv_lref_drops … H) -H #Z #Y #X #HLY #HX
 lapply (drops_mono … HLY … HLK) -L #H destruct //
-qed-.   
+qed-.
+
+lemma cnv_inv_lref_atom (h) (a) (b) (G):
+      ∀i,L. ⦃G,L⦄ ⊢ #i ![h,a] → ⬇*[b,𝐔❴i❵] L ≘ ⋆ → ⊥.
+#h #a #b #G #i #L #H #Hi
+elim (cnv_inv_lref_drops … H) -H #Z #Y #X #HLY #_
+lapply (drops_gen b … HLY) -HLY #HLY
+lapply (drops_mono … HLY … Hi) -L #H destruct
+qed-.
+
+lemma cnv_inv_lref_unit (h) (a) (G):
+      ∀i,L. ⦃G,L⦄ ⊢ #i ![h,a] →
+      ∀I,K. ⬇*[i] L ≘ K.ⓤ{I} → ⊥.
+#h #a #G #i #L #H #I #K #HLK
+elim (cnv_inv_lref_drops … H) -H #Z #Y #X #HLY #_
+lapply (drops_mono … HLY … HLK) -L #H destruct
+qed-.
 
 (* Properties with generic slicing for local environments *******************)
 
 (* Basic_2A1: uses: snv_lift *)
-lemma cnv_lifts (a) (h): ∀G. d_liftable1 (cnv a h G).
-#a #h #G #K #T
+lemma cnv_lifts (h) (a): ∀G. d_liftable1 (cnv h a G).
+#h #a #G #K #T
 @(fqup_wf_ind_eq (Ⓣ) … G K T) -G -K -T #G0 #K0 #T0 #IH #G #K * * [|||| * ]
 [ #s #HG #HK #HT #_ #b #f #L #_ #X #H2 destruct
   >(lifts_inv_sort1 … H2) -X -K -f //
@@ -101,8 +116,8 @@ qed-.
 (* Inversion lemmas with generic slicing for local environments *************)
 
 (* Basic_2A1: uses: snv_inv_lift *)
-lemma cnv_inv_lifts (a) (h): ∀G. d_deliftable1 (cnv a h G).
-#a #h #G #L #U
+lemma cnv_inv_lifts (h) (a): ∀G. d_deliftable1 (cnv h a G).
+#h #a #G #L #U
 @(fqup_wf_ind_eq (Ⓣ) … G L U) -G -L -U #G0 #L0 #U0 #IH #G #L * * [|||| * ]
 [ #s #HG #HL #HU #H1 #b #f #K #HLK #X #H2 destruct
   >(lifts_inv_sort2 … H2) -X -L -f //
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_eval.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_eval.ma
new file mode 100644 (file)
index 0000000..d87201d
--- /dev/null
@@ -0,0 +1,106 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/cpmuwe_cpmuwe.ma".
+include "basic_2/rt_equivalence/cpes_cpes.ma".
+include "basic_2/dynamic/cnv_cpmuwe.ma". (**) (* should be included by the next *)
+include "basic_2/dynamic/cnv_cpmuwe_cpme.ma".
+include "basic_2/dynamic/cnv_cpes.ma".
+include "basic_2/dynamic/cnv_preserve_cpes.ma".
+
+(* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
+
+(* main properties with evaluations for rt-transition on terms **************)
+
+theorem cnv_dec (h) (a) (G) (L) (T): ac_props a →
+        Decidable (⦃G,L⦄ ⊢ T ![h,a]).
+#h #a #G #L #T #Ha
+@(fqup_wf_ind_eq (Ⓣ) … G L T) -G -L -T #G0 #L0 #T0 #IH #G #L * * [|||| * ]
+[ #s #HG #HL #HT destruct -Ha -IH
+  /2 width=1 by cnv_sort, or_introl/
+| #i #HG #HL #HT destruct -Ha
+  elim (drops_F_uni L i) [| * * ]
+  [ /3 width=8 by cnv_inv_lref_atom, or_intror/
+  | /3 width=9 by cnv_inv_lref_unit, or_intror/
+  | #I #V #K #HLK
+    elim (IH G K V) -IH [3: /2 width=2 by fqup_lref/ ]
+    [ /3 width=5 by cnv_lref_drops, or_introl/
+    | /4 width=5 by cnv_inv_lref_pair, or_intror/
+    ]
+  ]
+| #l #HG #HL #HT destruct -Ha -IH
+  /3 width=6 by cnv_inv_gref, or_intror/
+| #p #I #V #T #HG #HL #HT destruct -Ha
+  elim (IH G L V) [| -IH | // ] #HV
+  [ elim (IH G (L.ⓑ{I}V) T) -IH [3: // ] #HT
+    [ /3 width=1 by cnv_bind, or_introl/ ]
+  ]
+  @or_intror #H
+  elim (cnv_inv_bind … H) -H /2 width=1 by/
+| #V #T #HG #HL #HT destruct
+  elim (IH G L V) [| -IH #HV | // ]
+  [ elim (IH G L T) -IH [| #HT #HV | // ]
+    [ #HT #HV
+      elim (cnv_R_cpmuwe_total … HT) #n #Hn
+      elim (dec_min (R_cpmuwe h G L T) … Hn) -Hn
+      [| /2 width=2 by cnv_R_cpmuwe_dec/ ] #n0 #_ -n
+      elim (ac_dec … Ha n0) -Ha
+      [ * #n #Ha #Hn * #X0 #HX0 #_
+        elim (abst_dec X0)
+        [ * #p #W #U0 #H destruct
+          elim (cnv_cpes_dec … 1 0 … HV W) [ #HVW | #HnVW ]
+          [ lapply (cpmuwe_fwd_cpms … HX0) -HX0 #HTU0
+            elim (cnv_fwd_cpms_abst_dx_le … HT … HTU0 … Hn) #U #HTU #_ -U0 -n0
+            /3 width=7 by cnv_appl_cpes, or_introl/
+(* Note: argument type mismatch *)
+          | @or_intror #H -n
+            elim (cnv_inv_appl_cpes … H) -H #m0 #q #WX #UX #_ #_ #_ #HVWX #HTUX
+            lapply (cpmuwe_abst … HTUX) -HTUX #HTUX
+            elim (cnv_cpmuwe_mono … HT … HTUX … HX0) -a -T #H #_
+            elim (cpes_fwd_abst_bi … H) -H #_ #HWX -n0 -m0 -p -q -UX -U0
+            /3 width=3 by cpes_cpes_trans/
+          | lapply (cnv_cpmuwe_trans … HT … HX0) -T #H
+            elim (cnv_inv_bind … H) -H #HW #_ //
+          ]
+(* Note: no expected type *)
+        | #HnX0
+          @or_intror #H
+          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
+          /2 width=4 by/
+        ]
+(* Note: failed applicability *)
+      | #Hge #_ #Hlt
+        @or_intror #H
+        elim (cnv_inv_appl … H) -H #m0 #q #W0 #U0 #Hm0 #_ #_ #_ #HTU0
+        elim (lt_or_ge m0 n0) #H0 [| /3 width=3 by ex2_intro/ ] -Hm0 -Hge
+        /4 width=6 by cpmuwe_abst, ex_intro/
+      ]
+    ]
+  ]
+  @or_intror #H
+  elim (cnv_inv_appl … H) -H /2 width=1 by/
+| #U #T #HG #HL #HT destruct
+  elim (IH G L U) [| -IH | // ] #HU
+  [ elim (IH G L T) -IH [3: // ] #HT
+    [ elim (cnv_cpes_dec … 0 1 … HU … HT) #HUT
+      [ /3 width=1 by cnv_cast_cpes, or_introl/ ]
+    ]
+  ]
+  @or_intror #H
+  elim (cnv_inv_cast_cpes … H) -H /2 width=1 by/
+]
+qed-.
index cb79dfcc829748fdfb8155c05826fe27675718c7..50e4edbee00f04ccd9d58d09a0bdfcbea546ead6 100644 (file)
 include "static_2/s_computation/fqus_fqup.ma".
 include "basic_2/dynamic/cnv_drops.ma".
 
-(* CONTEXT_SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
+(* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
 
 (* Properties with supclosure ***********************************************)
 
 (* Basic_2A1: uses: snv_fqu_conf *)
-lemma cnv_fqu_conf (a) (h): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ →
-                            ⦃G1, L1⦄ ⊢ T1 ![a, h] → ⦃G2, L2⦄ ⊢ T2 ![a, h].
-#a #h #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
+lemma cnv_fqu_conf (h) (a):
+      ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂ ⦃G2,L2,T2⦄ →
+      ⦃G1,L1⦄ ⊢ T1 ![h,a] → ⦃G2,L2⦄ ⊢ T2 ![h,a].
+#h #a #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
 [ #I1 #G1 #L1 #V1 #H
   elim (cnv_inv_zero … H) -H #I2 #L2 #V2 #HV2 #H destruct //
 | * [ #p #I1 | * ] #G1 #L1 #V1 #T1 #H
@@ -30,7 +31,7 @@ lemma cnv_fqu_conf (a) (h): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2
   | elim (cnv_inv_appl … H) -H //
   | elim (cnv_inv_cast … H) -H //
   ]
-| #p #I1 #G1 #L1 #V1 #T1 #H
+| #p #I1 #G1 #L1 #V1 #T1 #_ #H
   elim (cnv_inv_bind … H) -H //
 | #p #I1 #G1 #L1 #V1 #T1 #H destruct
 | * #G1 #L1 #V1 #T1 #H
@@ -43,22 +44,25 @@ lemma cnv_fqu_conf (a) (h): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2
 qed-.
 
 (* Basic_2A1: uses: snv_fquq_conf *)
-lemma cnv_fquq_conf (a) (h): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ →
-                             ⦃G1, L1⦄ ⊢ T1 ![a, h] → ⦃G2, L2⦄ ⊢ T2 ![a, h].
-#a #h #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -H [|*]
+lemma cnv_fquq_conf (h) (a):
+      ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂⸮ ⦃G2,L2,T2⦄ →
+      ⦃G1,L1⦄ ⊢ T1 ![h,a] → ⦃G2,L2⦄ ⊢ T2 ![h,a].
+#h #a #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -H [|*]
 /2 width=5 by cnv_fqu_conf/
 qed-.
 
 (* Basic_2A1: uses: snv_fqup_conf *)
-lemma cnv_fqup_conf (a) (h): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ →
-                             ⦃G1, L1⦄ ⊢ T1 ![a, h] → ⦃G2, L2⦄ ⊢ T2 ![a, h].
-#a #h #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2
+lemma cnv_fqup_conf (h) (a):
+      ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂+ ⦃G2,L2,T2⦄ →
+      ⦃G1,L1⦄ ⊢ T1 ![h,a] → ⦃G2,L2⦄ ⊢ T2 ![h,a].
+#h #a #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2
 /3 width=5 by fqup_strap1, cnv_fqu_conf/
 qed-.
 
 (* Basic_2A1: uses: snv_fqus_conf *)
-lemma cnv_fqus_conf (a) (h): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ →
-                             ⦃G1, L1⦄ ⊢ T1 ![a, h] → ⦃G2, L2⦄ ⊢ T2 ![a, h].
-#a #h #G1 #G2 #L1 #L2 #T1 #T2 #H elim (fqus_inv_fqup … H) -H [|*]
+lemma cnv_fqus_conf (h) (a):
+      ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂* ⦃G2,L2,T2⦄ →
+      ⦃G1,L1⦄ ⊢ T1 ![h,a] → ⦃G2,L2⦄ ⊢ T2 ![h,a].
+#h #a #G1 #G2 #L1 #L2 #T1 #T2 #H elim (fqus_inv_fqup … H) -H [|*]
 /2 width=5 by cnv_fqup_conf/
 qed-.
index 4ce63d92a59b8e932c9faed5f4795d83c102637c..3716f67ea959a53a32bb8dd85668f3f0e4543cde 100644 (file)
@@ -19,13 +19,23 @@ include "basic_2/dynamic/cnv_aaa.ma".
 
 (* Forward lemmas with strongly rst-normalizing closures ********************)
 
+(* Note: this is the "big tree" theorem *)
 (* Basic_2A1: uses: snv_fwd_fsb *)
-lemma cnv_fwd_fsb (a) (h) (o): ∀G,L,T. ⦃G, L⦄ ⊢ T ![a, h] → ≥[h, o] 𝐒⦃G, L, T⦄.
-#a #h #o #G #L #T #H elim (cnv_fwd_aaa … H) -H /2 width=2 by aaa_fsb/
+lemma cnv_fwd_fsb (h) (a):
+      ∀G,L,T. ⦃G,L⦄ ⊢ T ![h,a] → ≥[h] 𝐒⦃G,L,T⦄.
+#h #a #G #L #T #H elim (cnv_fwd_aaa … H) -H /2 width=2 by aaa_fsb/
+qed-.
+
+(* Forward lemmas with strongly rt-normalizing terms ************************)
+
+lemma cnv_fwd_csx (h) (a):
+      ∀G,L,T. ⦃G,L⦄ ⊢ T ![h,a] → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄.
+#h #a #G #L #T #H
+/3 width=2 by cnv_fwd_fsb, fsb_inv_csx/
 qed-.
 
 (* Inversion lemmas with proper parallel rst-computation for closures *******)
 
-lemma cnv_fpbg_refl_false (a) (h) (o) (G) (L) (T):
-                          ⦃G, L⦄ ⊢ T ![a,h] → ⦃G, L, T⦄ >[h,o] ⦃G, L, T⦄ → ⊥.
+lemma cnv_fpbg_refl_false (h) (a):
+      ∀G,L,T. ⦃G,L⦄ ⊢ T ![h,a] → ⦃G,L,T⦄ >[h] ⦃G,L,T⦄ → ⊥.
 /3 width=7 by cnv_fwd_fsb, fsb_fpbg_refl_false/ qed-.
index c4edc5508768d9f2f4e7b8ce5525700077c19e02..9763d082ac986bfbe89de6466cacc63b8ed76cd5 100644 (file)
@@ -19,58 +19,57 @@ include "basic_2/dynamic/cnv_cpms_conf.ma".
 (* Main preservation properties *********************************************)
 
 (* Basic_2A1: uses: snv_preserve *)
-lemma cnv_preserve (a) (h): ∀G,L,T. ⦃G,L⦄ ⊢ T ![a,h] →
-                            ∧∧ IH_cnv_cpms_conf_lpr a h G L T
-                             & IH_cnv_cpm_trans_lpr a h G L T.
-#a #h #G #L #T #HT
-letin o ≝ (sd_O h)
-lapply (cnv_fwd_fsb … o … HT) -HT #H
+lemma cnv_preserve (h) (a): ∀G,L,T. ⦃G,L⦄ ⊢ T ![h,a] →
+      ∧∧ IH_cnv_cpms_conf_lpr h a G L T
+       & IH_cnv_cpm_trans_lpr h a G L T.
+#h #a #G #L #T #HT
+lapply (cnv_fwd_fsb … HT) -HT #H
 @(fsb_ind_fpbg … H) -G -L -T #G #L #T #_ #IH
 @conj [ letin aux ≝ cnv_cpms_conf_lpr_aux | letin aux ≝ cnv_cpm_trans_lpr_aux ]
-@(aux … o … G L T) // #G0 #L0 #T0 #H
+@(aux … G L T) // #G0 #L0 #T0 #H
 elim (IH … H) -IH -H //
 qed-.
 
-theorem cnv_cpms_conf_lpr (a) (h) (G) (L) (T): IH_cnv_cpms_conf_lpr a h G L T.
-#a #h #G #L #T #HT elim (cnv_preserve … HT) /2 width=1 by/
+theorem cnv_cpms_conf_lpr (h) (a) (G) (L) (T): IH_cnv_cpms_conf_lpr h a G L T.
+#h #a #G #L #T #HT elim (cnv_preserve … HT) /2 width=1 by/
 qed-.
 
 (* Basic_2A1: uses: snv_cpr_lpr *)
-theorem cnv_cpm_trans_lpr (a) (h) (G) (L) (T): IH_cnv_cpm_trans_lpr a h G L T.
-#a #h #G #L #T #HT elim (cnv_preserve … HT) /2 width=2 by/
+theorem cnv_cpm_trans_lpr (h) (a) (G) (L) (T): IH_cnv_cpm_trans_lpr h a G L T.
+#h #a #G #L #T #HT elim (cnv_preserve … HT) /2 width=2 by/
 qed-.
 
 (* Advanced preservation properties *****************************************)
 
-lemma cnv_cpms_conf (a) (h) (G) (L):
-      ∀T0. ⦃G,L⦄ ⊢ T0 ![a,h] →
+lemma cnv_cpms_conf (h) (a) (G) (L):
+      ∀T0. ⦃G,L⦄ ⊢ T0 ![h,a] →
       ∀n1,T1. ⦃G,L⦄ ⊢ T0 ➡*[n1,h] T1 → ∀n2,T2. ⦃G,L⦄ ⊢ T0 ➡*[n2,h] T2 →
       ∃∃T. ⦃G,L⦄ ⊢ T1 ➡*[n2-n1,h] T & ⦃G,L⦄ ⊢ T2 ➡*[n1-n2,h] T.
 /2 width=8 by cnv_cpms_conf_lpr/ qed-.
 
 (* Basic_2A1: uses: snv_cprs_lpr *)
-lemma cnv_cpms_trans_lpr (a) (h) (G) (L) (T): IH_cnv_cpms_trans_lpr a h G L T.
-#a #h #G #L1 #T1 #HT1 #n #T2 #H
+lemma cnv_cpms_trans_lpr (h) (a) (G) (L) (T): IH_cnv_cpms_trans_lpr h a G L T.
+#h #a #G #L1 #T1 #HT1 #n #T2 #H
 @(cpms_ind_dx … H) -n -T2 /3 width=6 by cnv_cpm_trans_lpr/
 qed-.
 
-lemma cnv_cpm_trans (a) (h) (G) (L):
-      ∀T1. ⦃G,L⦄ ⊢ T1 ![a,h] →
-      ∀n,T2. ⦃G,L⦄ ⊢ T1 ➡[n,h] T2 → ⦃G,L⦄ ⊢ T2 ![a,h].
+lemma cnv_cpm_trans (h) (a) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ T1 ![h,a] →
+      ∀n,T2. ⦃G,L⦄ ⊢ T1 ➡[n,h] T2 → ⦃G,L⦄ ⊢ T2 ![h,a].
 /2 width=6 by cnv_cpm_trans_lpr/ qed-.
 
 (* Note: this is the preservation property *)
-lemma cnv_cpms_trans (a) (h) (G) (L):
-      ∀T1. ⦃G,L⦄ ⊢ T1 ![a,h] →
-      ∀n,T2. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 → ⦃G,L⦄ ⊢ T2 ![a,h].
+lemma cnv_cpms_trans (h) (a) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ T1 ![h,a] →
+      ∀n,T2. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 → ⦃G,L⦄ ⊢ T2 ![h,a].
 /2 width=6 by cnv_cpms_trans_lpr/ qed-.
 
-lemma cnv_lpr_trans (a) (h) (G):
-      ∀L1,T. ⦃G,L1⦄ ⊢ T ![a,h] → ∀L2. ⦃G,L1⦄ ⊢ ➡[h] L2 → ⦃G,L2⦄ ⊢ T ![a,h].
+lemma cnv_lpr_trans (h) (a) (G):
+      ∀L1,T. ⦃G,L1⦄ ⊢ T ![h,a] → ∀L2. ⦃G,L1⦄ ⊢ ➡[h] L2 → ⦃G,L2⦄ ⊢ T ![h,a].
 /2 width=6 by cnv_cpm_trans_lpr/ qed-.
 
-lemma cnv_lprs_trans (a) (h) (G):
-      ∀L1,T. ⦃G,L1⦄ ⊢ T ![a,h] → ∀L2. ⦃G,L1⦄ ⊢ ➡*[h] L2 → ⦃G,L2⦄ ⊢ T ![a,h].
-#a #h #G #L1 #T #HT #L2 #H
+lemma cnv_lprs_trans (h) (a) (G):
+      ∀L1,T. ⦃G,L1⦄ ⊢ T ![h,a] → ∀L2. ⦃G,L1⦄ ⊢ ➡*[h] L2 → ⦃G,L2⦄ ⊢ T ![h,a].
+#h #a #G #L1 #T #HT #L2 #H
 @(lprs_ind_dx … H) -L2 /2 width=3 by cnv_lpr_trans/
 qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_preserve_cpcs.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_preserve_cpcs.ma
new file mode 100644 (file)
index 0000000..29d85f7
--- /dev/null
@@ -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_equivalence/cpcs_cprs.ma".
+include "basic_2/dynamic/cnv_preserve.ma".
+
+(* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
+
+(* Forward lemmas with r-equivalence ****************************************)
+
+lemma cnv_cpms_conf_eq (h) (a) (n) (G) (L):
+      ∀T. ⦃G,L⦄ ⊢ T ![h,a] →
+      ∀T1. ⦃G,L⦄ ⊢ T ➡*[n,h] T1 → ∀T2. ⦃G,L⦄ ⊢ T ➡*[n,h] T2 → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
+#h #a #n #G #L #T #HT #T1 #HT1 #T2 #HT2
+elim (cnv_cpms_conf … HT … HT1 … HT2) -T <minus_n_n #T #HT1 #HT2
+/2 width=3 by cprs_div/
+qed-.
+
+lemma cnv_cpms_fwd_appl_sn_decompose (h) (a) (G) (L):
+      ∀V,T. ⦃G,L⦄ ⊢ ⓐV.T ![h,a] → ∀n,X. ⦃G,L⦄ ⊢ ⓐV.T ➡*[n,h] X →
+      ∃∃U. ⦃G,L⦄ ⊢ T ![h,a] & ⦃G,L⦄ ⊢ T ➡*[n,h] U & ⦃G,L⦄ ⊢ ⓐV.U ⬌*[h] X.
+#h #a #G #L #V #T #H0 #n #X #HX
+elim (cnv_inv_appl … H0) #m #p #W #U #_ #_ #HT #_ #_ -m -p -W -U
+elim (cnv_fwd_cpms_total h … n … HT) #U #HTU
+lapply (cpms_appl_dx … V V … HTU) [ // ] #H
+/3 width=8 by cnv_cpms_conf_eq, ex3_intro/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_preserve_cpes.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_preserve_cpes.ma
new file mode 100644 (file)
index 0000000..57b9fc3
--- /dev/null
@@ -0,0 +1,41 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/cpme_aaa.ma".
+include "basic_2/rt_computation/cpre_cpre.ma".
+include "basic_2/rt_equivalence/cpes.ma".
+include "basic_2/dynamic/cnv_cpme.ma".
+
+(* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
+
+(* Properties with t-bound rt-equivalence for terms *************************)
+
+lemma cnv_cpes_dec (h) (a) (n1) (n2) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ T1 ![h,a] → ∀T2. ⦃G,L⦄ ⊢ T2 ![h,a] →
+      Decidable … (⦃G,L⦄ ⊢ T1 ⬌*[h,n1,n2] T2).
+#h #a #n1 #n2 #G #L #T1 #HT1 #T2 #HT2
+elim (cnv_fwd_aaa … HT1) #A1 #HA1
+elim (cnv_fwd_aaa … HT2) #A2 #HA2
+elim (cpme_total_aaa h n1 … HA1) -HA1 #U1 #HTU1
+elim (cpme_total_aaa h n2 … HA2) -HA2 #U2 #HTU2
+elim (eq_term_dec U1 U2) [ #H destruct | #HnU12 ]
+[ cases HTU1 -HTU1 #HTU1 #_
+  cases HTU2 -HTU2 #HTU2 #_
+  /3 width=3 by cpms_div, or_introl/
+| @or_intror * #T0 #HT10 #HT20
+  lapply (cnv_cpme_cpms_conf … HT1 … HT10 … HTU1) -T1 #H1
+  lapply (cnv_cpme_cpms_conf … HT2 … HT20 … HTU2) -T2 #H2
+  /3 width=6 by cpre_mono/
+]
+qed-.
index c99d6a5c08a7387f6416eee775775f3b520f73fd..94037ce79cd9628a784dd7cfea6e9015bdf0a048 100644 (file)
@@ -19,53 +19,53 @@ include "basic_2/dynamic/cnv.ma".
 
 (* Inductive premises for the preservation results **************************)
 
-definition IH_cnv_cpm_trans_lpr (a) (h): relation3 genv lenv term ≝
-                                λG,L1,T1. ⦃G, L1⦄ ⊢ T1 ![a,h] →
-                                ∀n,T2. ⦃G, L1⦄ ⊢ T1 ➡[n,h] T2 →
-                                ∀L2. ⦃G, L1⦄ ⊢ ➡[h] L2 → ⦃G, L2⦄ ⊢ T2 ![a,h].
+definition IH_cnv_cpm_trans_lpr (h) (a): relation3 genv lenv term ≝
+                                λG,L1,T1. ⦃G,L1⦄ ⊢ T1 ![h,a] →
+                                ∀n,T2. ⦃G,L1⦄ ⊢ T1 ➡[n,h] T2 →
+                                ∀L2. ⦃G,L1⦄ ⊢ ➡[h] L2 → ⦃G,L2⦄ ⊢ T2 ![h,a].
 
-definition IH_cnv_cpms_trans_lpr (a) (h): relation3 genv lenv term ≝
-                                 λG,L1,T1. ⦃G, L1⦄ ⊢ T1 ![a,h] →
-                                 ∀n,T2. ⦃G, L1⦄ ⊢ T1 ➡*[n,h] T2 →
-                                 ∀L2. ⦃G, L1⦄ ⊢ ➡[h] L2 → ⦃G, L2⦄ ⊢ T2 ![a,h].
+definition IH_cnv_cpms_trans_lpr (h) (a): relation3 genv lenv term ≝
+                                 λG,L1,T1. ⦃G,L1⦄ ⊢ T1 ![h,a] →
+                                 ∀n,T2. ⦃G,L1⦄ ⊢ T1 ➡*[n,h] T2 →
+                                 ∀L2. ⦃G,L1⦄ ⊢ ➡[h] L2 → ⦃G,L2⦄ ⊢ T2 ![h,a].
 
-definition IH_cnv_cpm_conf_lpr (a) (h): relation3 genv lenv term ≝
-                               λG,L0,T0. ⦃G, L0⦄ ⊢ T0 ![a,h] →
-                               ∀n1,T1. ⦃G, L0⦄ ⊢ T0 ➡[n1,h] T1 → ∀n2,T2. ⦃G, L0⦄ ⊢ T0 ➡[n2,h] T2 →
-                               ∀L1. ⦃G, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[h] L2 →
-                               ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡*[n2-n1,h] T & ⦃G, L2⦄ ⊢ T2 ➡*[n1-n2,h] T.
+definition IH_cnv_cpm_conf_lpr (h) (a): relation3 genv lenv term ≝
+                               λG,L0,T0. ⦃G,L0⦄ ⊢ T0 ![h,a] →
+                               ∀n1,T1. ⦃G,L0⦄ ⊢ T0 ➡[n1,h] T1 → ∀n2,T2. ⦃G,L0⦄ ⊢ T0 ➡[n2,h] T2 →
+                               ∀L1. ⦃G,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L0⦄ ⊢ ➡[h] L2 →
+                               ∃∃T. ⦃G,L1⦄ ⊢ T1 ➡*[n2-n1,h] T & ⦃G,L2⦄ ⊢ T2 ➡*[n1-n2,h] T.
 
-definition IH_cnv_cpms_strip_lpr (a) (h): relation3 genv lenv term ≝
-                                 λG,L0,T0. ⦃G, L0⦄ ⊢ T0 ![a,h] →
-                                 ∀n1,T1. ⦃G, L0⦄ ⊢ T0 ➡*[n1,h] T1 → ∀n2,T2. ⦃G, L0⦄ ⊢ T0 ➡[n2,h] T2 →
-                                 ∀L1. ⦃G, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[h] L2 →
-                                 ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡*[n2-n1,h] T & ⦃G, L2⦄ ⊢ T2 ➡*[n1-n2,h] T.
+definition IH_cnv_cpms_strip_lpr (h) (a): relation3 genv lenv term ≝
+                                 λG,L0,T0. ⦃G,L0⦄ ⊢ T0 ![h,a] →
+                                 ∀n1,T1. ⦃G,L0⦄ ⊢ T0 ➡*[n1,h] T1 → ∀n2,T2. ⦃G,L0⦄ ⊢ T0 ➡[n2,h] T2 →
+                                 ∀L1. ⦃G,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L0⦄ ⊢ ➡[h] L2 →
+                                 ∃∃T. ⦃G,L1⦄ ⊢ T1 ➡*[n2-n1,h] T & ⦃G,L2⦄ ⊢ T2 ➡*[n1-n2,h] T.
 
-definition IH_cnv_cpms_conf_lpr (a) (h): relation3 genv lenv term ≝
-                                λG,L0,T0. ⦃G, L0⦄ ⊢ T0 ![a,h] →
-                                ∀n1,T1. ⦃G, L0⦄ ⊢ T0 ➡*[n1,h] T1 → ∀n2,T2. ⦃G, L0⦄ ⊢ T0 ➡*[n2,h] T2 →
-                                ∀L1. ⦃G, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[h] L2 →
-                                ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡*[n2-n1,h] T & ⦃G, L2⦄ ⊢ T2 ➡*[n1-n2,h] T.
+definition IH_cnv_cpms_conf_lpr (h) (a): relation3 genv lenv term ≝
+                                λG,L0,T0. ⦃G,L0⦄ ⊢ T0 ![h,a] →
+                                ∀n1,T1. ⦃G,L0⦄ ⊢ T0 ➡*[n1,h] T1 → ∀n2,T2. ⦃G,L0⦄ ⊢ T0 ➡*[n2,h] T2 →
+                                ∀L1. ⦃G,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L0⦄ ⊢ ➡[h] L2 →
+                                ∃∃T. ⦃G,L1⦄ ⊢ T1 ➡*[n2-n1,h] T & ⦃G,L2⦄ ⊢ T2 ➡*[n1-n2,h] T.
 
 (* Auxiliary properties for preservation ************************************)
 
-fact cnv_cpms_trans_lpr_sub (a) (h) (o):
-                            ∀G0,L0,T0.
-                            (∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpm_trans_lpr a h G1 L1 T1) →
-                            ∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpms_trans_lpr a h G1 L1 T1.
-#a #h #o #G0 #L0 #T0 #IH #G1 #L1 #T1 #H01 #HT1 #n #T2 #H
+fact cnv_cpms_trans_lpr_sub (h) (a):
+     ∀G0,L0,T0.
+     (∀G1,L1,T1. ⦃G0,L0,T0⦄ >[h] ⦃G1,L1,T1⦄ → IH_cnv_cpm_trans_lpr h a G1 L1 T1) →
+     ∀G1,L1,T1. ⦃G0,L0,T0⦄ >[h] ⦃G1,L1,T1⦄ → IH_cnv_cpms_trans_lpr h a G1 L1 T1.
+#h #a #G0 #L0 #T0 #IH #G1 #L1 #T1 #H01 #HT1 #n #T2 #H
 @(cpms_ind_dx … H) -n -T2
 /3 width=7 by fpbg_cpms_trans/
 qed-.
 
-fact cnv_cpm_conf_lpr_sub (a) (h) (o):
-                          ∀G0,L0,T0.
-                          (∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpms_conf_lpr a h G1 L1 T1) →
-                          ∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpm_conf_lpr a h G1 L1 T1.
+fact cnv_cpm_conf_lpr_sub (h) (a):
+     ∀G0,L0,T0.
+     (∀G1,L1,T1. ⦃G0,L0,T0⦄ >[h] ⦃G1,L1,T1⦄ → IH_cnv_cpms_conf_lpr h a G1 L1 T1) →
+     ∀G1,L1,T1. ⦃G0,L0,T0⦄ >[h] ⦃G1,L1,T1⦄ → IH_cnv_cpm_conf_lpr h a G1 L1 T1.
 /3 width=8 by cpm_cpms/ qed-.
 
-fact cnv_cpms_strip_lpr_sub (a) (h) (o):
-                            ∀G0,L0,T0.
-                            (∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpms_conf_lpr a h G1 L1 T1) →
-                            ∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpms_strip_lpr a h G1 L1 T1.
+fact cnv_cpms_strip_lpr_sub (h) (a):
+     ∀G0,L0,T0.
+     (∀G1,L1,T1. ⦃G0,L0,T0⦄ >[h] ⦃G1,L1,T1⦄ → IH_cnv_cpms_conf_lpr h a G1 L1 T1) →
+     ∀G1,L1,T1. ⦃G0,L0,T0⦄ >[h] ⦃G1,L1,T1⦄ → IH_cnv_cpms_strip_lpr h a G1 L1 T1.
 /3 width=8 by cpm_cpms/ qed-.
index 20b5259d07c989cb8d5d8e2a799e5241c2a44535..2ff320b82a6aa2fa4060c223d92095cd3f343d4b 100644 (file)
@@ -17,21 +17,22 @@ include "basic_2/dynamic/cnv.ma".
 
 (* LOCAL ENVIRONMENT REFINEMENT FOR NATIVE VALIDITY *************************)
 
-inductive lsubv (a) (h) (G): relation lenv ≝
-| lsubv_atom: lsubv a h G (⋆) (⋆)
-| lsubv_bind: ∀I,L1,L2. lsubv a h G L1 L2 → lsubv a h G (L1.ⓘ{I}) (L2.ⓘ{I})
-| lsubv_beta: ∀L1,L2,W,V. ⦃G, L1⦄ ⊢ ⓝW.V ![a,h] →
-              lsubv a h G L1 L2 → lsubv a h G (L1.ⓓⓝW.V) (L2.ⓛW)
+inductive lsubv (h) (a) (G): relation lenv ≝
+| lsubv_atom: lsubv h a G (⋆) (⋆)
+| lsubv_bind: ∀I,L1,L2. lsubv h a G L1 L2 → lsubv h a G (L1.ⓘ{I}) (L2.ⓘ{I})
+| lsubv_beta: ∀L1,L2,W,V. ⦃G,L1⦄ ⊢ ⓝW.V ![h,a] →
+              lsubv h a G L1 L2 → lsubv h a G (L1.ⓓⓝW.V) (L2.ⓛW)
 .
 
 interpretation
   "local environment refinement (native validity)"
-  'LRSubEqV a h G L1 L2 = (lsubv a h G L1 L2).
+  'LRSubEqV h a G L1 L2 = (lsubv h a G L1 L2).
 
 (* Basic inversion lemmas ***************************************************)
 
-fact lsubv_inv_atom_sn_aux (a) (h) (G): ∀L1,L2. G ⊢ L1 ⫃![a,h] L2 → L1 = ⋆ → L2 = ⋆.
-#a #h #G #L1 #L2 * -L1 -L2
+fact lsubv_inv_atom_sn_aux (h) (a) (G):
+     ∀L1,L2. G ⊢ L1 ⫃![h,a] L2 → L1 = ⋆ → L2 = ⋆.
+#h #a #G #L1 #L2 * -L1 -L2
 [ //
 | #I #L1 #L2 #_ #H destruct
 | #L1 #L2 #W #V #_ #_ #H destruct
@@ -39,16 +40,16 @@ fact lsubv_inv_atom_sn_aux (a) (h) (G): ∀L1,L2. G ⊢ L1 ⫃![a,h] L2 → L1 =
 qed-.
 
 (* Basic_2A1: uses: lsubsv_inv_atom1 *)
-lemma lsubv_inv_atom_sn (a) (h) (G): ∀L2. G ⊢ ⋆ ⫃![a,h] L2 → L2 = ⋆.
+lemma lsubv_inv_atom_sn (h) (a) (G):
+      ∀L2. G ⊢ ⋆ ⫃![h,a] L2 → L2 = ⋆.
 /2 width=6 by lsubv_inv_atom_sn_aux/ qed-.
 
-fact lsubv_inv_bind_sn_aux (a) (h) (G): ∀L1,L2. G ⊢ L1 ⫃![a,h] L2 →
-                           ∀I,K1. L1 = K1.ⓘ{I} →
-                           ∨∨ ∃∃K2. G ⊢ K1 ⫃![a,h] K2 & L2 = K2.ⓘ{I}
-                            | ∃∃K2,W,V. ⦃G, K1⦄ ⊢ ⓝW.V ![a,h] &
-                                        G ⊢ K1 ⫃![a,h] K2 &
-                                        I = BPair Abbr (ⓝW.V) & L2 = K2.ⓛW.
-#a #h #G #L1 #L2 * -L1 -L2
+fact lsubv_inv_bind_sn_aux (h) (a) (G): ∀L1,L2. G ⊢ L1 ⫃![h,a] L2 →
+     ∀I,K1. L1 = K1.ⓘ{I} →
+     ∨∨ ∃∃K2. G ⊢ K1 ⫃![h,a] K2 & L2 = K2.ⓘ{I}
+      | ∃∃K2,W,V. ⦃G,K1⦄ ⊢ ⓝW.V ![h,a] & G ⊢ K1 ⫃![h,a] K2
+                & I = BPair Abbr (ⓝW.V) & L2 = K2.ⓛW.
+#h #a #G #L1 #L2 * -L1 -L2
 [ #J #K1 #H destruct
 | #I #L1 #L2 #HL12 #J #K1 #H destruct /3 width=3 by ex2_intro, or_introl/
 | #L1 #L2 #W #V #HWV #HL12 #J #K1 #H destruct /3 width=7 by ex4_3_intro, or_intror/
@@ -56,15 +57,16 @@ fact lsubv_inv_bind_sn_aux (a) (h) (G): ∀L1,L2. G ⊢ L1 ⫃![a,h] L2 →
 qed-.
 
 (* Basic_2A1: uses: lsubsv_inv_pair1 *)
-lemma lsubv_inv_bind_sn (a) (h) (G): ∀I,K1,L2. G ⊢ K1.ⓘ{I} ⫃![a,h] L2 →
-                        ∨∨ ∃∃K2. G ⊢ K1 ⫃![a,h] K2 & L2 = K2.ⓘ{I}
-                         | ∃∃K2,W,V. ⦃G, K1⦄ ⊢ ⓝW.V ![a,h] &
-                                     G ⊢ K1 ⫃![a,h] K2 &
-                                     I = BPair Abbr (ⓝW.V) & L2 = K2.ⓛW.
+lemma lsubv_inv_bind_sn (h) (a) (G):
+      ∀I,K1,L2. G ⊢ K1.ⓘ{I} ⫃![h,a] L2 →
+      ∨∨ ∃∃K2. G ⊢ K1 ⫃![h,a] K2 & L2 = K2.ⓘ{I}
+       | ∃∃K2,W,V. ⦃G,K1⦄ ⊢ ⓝW.V ![h,a] & G ⊢ K1 ⫃![h,a] K2
+                 & I = BPair Abbr (ⓝW.V) & L2 = K2.ⓛW.
 /2 width=3 by lsubv_inv_bind_sn_aux/ qed-.
 
-fact lsubv_inv_atom_dx_aux (a) (h) (G): ∀L1,L2. G ⊢ L1 ⫃![a,h] L2 → L2 = ⋆ → L1 = ⋆.
-#a #h #G #L1 #L2 * -L1 -L2
+fact lsubv_inv_atom_dx_aux (h) (a) (G):
+     ∀L1,L2. G ⊢ L1 ⫃![h,a] L2 → L2 = ⋆ → L1 = ⋆.
+#h #a #G #L1 #L2 * -L1 -L2
 [ //
 | #I #L1 #L2 #_ #H destruct
 | #L1 #L2 #W #V #_ #_ #H destruct
@@ -72,15 +74,17 @@ fact lsubv_inv_atom_dx_aux (a) (h) (G): ∀L1,L2. G ⊢ L1 ⫃![a,h] L2 → L2 =
 qed-.
 
 (* Basic_2A1: uses: lsubsv_inv_atom2 *)
-lemma lsubv_inv_atom2 (a) (h) (G): ∀L1. G ⊢ L1 ⫃![a,h] ⋆ → L1 = ⋆.
+lemma lsubv_inv_atom2 (h) (a) (G):
+      ∀L1. G ⊢ L1 ⫃![h,a] ⋆ → L1 = ⋆.
 /2 width=6 by lsubv_inv_atom_dx_aux/ qed-.
 
-fact lsubv_inv_bind_dx_aux (a) (h) (G): ∀L1,L2. G ⊢ L1 ⫃![a,h] L2 →
-                           ∀I,K2. L2 = K2.ⓘ{I} →
-                           ∨∨ ∃∃K1. G ⊢ K1 ⫃![a,h] K2 & L1 = K1.ⓘ{I}
-                            | ∃∃K1,W,V. ⦃G, K1⦄ ⊢ ⓝW.V ![a,h] &
-                                        G ⊢ K1 ⫃![a,h] K2 & I = BPair Abst W & L1 = K1.ⓓⓝW.V.
-#a #h #G #L1 #L2 * -L1 -L2
+fact lsubv_inv_bind_dx_aux (h) (a) (G):
+     ∀L1,L2. G ⊢ L1 ⫃![h,a] L2 →
+     ∀I,K2. L2 = K2.ⓘ{I} →
+     ∨∨ ∃∃K1. G ⊢ K1 ⫃![h,a] K2 & L1 = K1.ⓘ{I}
+      | ∃∃K1,W,V. ⦃G,K1⦄ ⊢ ⓝW.V ![h,a] &
+                  G ⊢ K1 ⫃![h,a] K2 & I = BPair Abst W & L1 = K1.ⓓⓝW.V.
+#h #a #G #L1 #L2 * -L1 -L2
 [ #J #K2 #H destruct
 | #I #L1 #L2 #HL12 #J #K2 #H destruct /3 width=3 by ex2_intro, or_introl/
 | #L1 #L2 #W #V #HWV #HL12 #J #K2 #H destruct /3 width=7 by ex4_3_intro, or_intror/
@@ -88,17 +92,19 @@ fact lsubv_inv_bind_dx_aux (a) (h) (G): ∀L1,L2. G ⊢ L1 ⫃![a,h] L2 →
 qed-.
 
 (* Basic_2A1: uses: lsubsv_inv_pair2 *)
-lemma lsubv_inv_bind_dx (a) (h) (G): ∀I,L1,K2. G ⊢ L1 ⫃![a,h] K2.ⓘ{I} →
-                        ∨∨ ∃∃K1. G ⊢ K1 ⫃![a,h] K2 & L1 = K1.ⓘ{I}
-                         | ∃∃K1,W,V. ⦃G, K1⦄ ⊢ ⓝW.V ![a,h] &
-                                     G ⊢ K1 ⫃![a,h] K2 & I = BPair Abst W & L1 = K1.ⓓⓝW.V.
+lemma lsubv_inv_bind_dx (h) (a) (G):
+      ∀I,L1,K2. G ⊢ L1 ⫃![h,a] K2.ⓘ{I} →
+      ∨∨ ∃∃K1. G ⊢ K1 ⫃![h,a] K2 & L1 = K1.ⓘ{I}
+       | ∃∃K1,W,V. ⦃G,K1⦄ ⊢ ⓝW.V ![h,a] &
+                   G ⊢ K1 ⫃![h,a] K2 & I = BPair Abst W & L1 = K1.ⓓⓝW.V.
 /2 width=3 by lsubv_inv_bind_dx_aux/ qed-.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma lsubv_inv_abst_sn (a) (h) (G): ∀K1,L2,W. G ⊢ K1.ⓛW ⫃![a,h] L2 →
-                        ∃∃K2. G ⊢ K1 ⫃![a,h] K2 & L2 = K2.ⓛW.
-#a #h #G #K1 #L2 #W #H
+lemma lsubv_inv_abst_sn (h) (a) (G):
+      ∀K1,L2,W. G ⊢ K1.ⓛW ⫃![h,a] L2 →
+      ∃∃K2. G ⊢ K1 ⫃![h,a] K2 & L2 = K2.ⓛW.
+#h #a #G #K1 #L2 #W #H
 elim (lsubv_inv_bind_sn … H) -H // *
 #K2 #XW #XV #_ #_ #H1 #H2 destruct
 qed-.
@@ -106,8 +112,8 @@ qed-.
 (* Basic properties *********************************************************)
 
 (* Basic_2A1: uses: lsubsv_refl *)
-lemma lsubv_refl (a) (h) (G): reflexive … (lsubv a h G).
-#a #h #G #L elim L -L /2 width=1 by lsubv_atom, lsubv_bind/
+lemma lsubv_refl (h) (a) (G): reflexive … (lsubv h a G).
+#h #a #G #L elim L -L /2 width=1 by lsubv_atom, lsubv_bind/
 qed.
 
 (* Basic_2A1: removed theorems 3:
index b1782a021e207393763ed81212409126b52a942a..122c30c41685ea68852ec060bde649e175644e90 100644 (file)
@@ -19,10 +19,10 @@ include "basic_2/dynamic/lsubv_cpms.ma".
 (* Forward lemmas with native validity **************************************)
 
 (* Basic_2A1: uses: lsubsv_snv_trans *)
-lemma lsubv_cnv_trans (a) (h) (G):
-                      ∀L2,T. ⦃G, L2⦄ ⊢ T ![a,h] →
-                      ∀L1. G ⊢ L1 ⫃![a,h] L2 → ⦃G, L1⦄ ⊢ T ![a,h].
-#a #h #G #L2 #T #H elim H -G -L2 -T //
+lemma lsubv_cnv_trans (h) (a) (G):
+      ∀L2,T. ⦃G,L2⦄ ⊢ T ![h,a] →
+      ∀L1. G ⊢ L1 ⫃![h,a] L2 → ⦃G,L1⦄ ⊢ T ![h,a].
+#h #a #G #L2 #T #H elim H -G -L2 -T //
 [ #I #G #K2 #V #HV #IH #L1 #H
   elim (lsubv_inv_bind_dx … H) -H * /3 width=1 by cnv_zero/
 | #I #G #K2 #i #_ #IH #L1 #H
index c02ec80b0f55354043d35505678840c2bd0748a1..aad53743d8e9394dc34746655ce5148adc1fdfa1 100644 (file)
@@ -20,6 +20,6 @@ include "basic_2/dynamic/lsubv_lsubr.ma".
 (* Forward lemmas with context-sensitive r-equivalence for terms ************)
 
 (* Basic_2A1: uses: lsubsv_cprs_trans *)
-lemma lsubv_cpcs_trans (a) (h) (G): lsub_trans … (cpcs h G) (lsubv a h G).
+lemma lsubv_cpcs_trans (h) (a) (G): lsub_trans … (cpcs h G) (lsubv h a G).
 /3 width=6 by lsubv_fwd_lsubr, lsubr_cpcs_trans/
 qed-.
index 81d385add2f224ab89190075a80a322534f536a1..6d53694c7b0660ca4e18cb36292e31d4f36fdc1c 100644 (file)
@@ -20,6 +20,7 @@ include "basic_2/dynamic/lsubv_lsubr.ma".
 (* Forward lemmas with t-bound contex-sensitive rt-computation for terms ****)
 
 (* Basic_2A1: uses: lsubsv_cprs_trans lsubsv_scpds_trans *)
-lemma lsubv_cpms_trans (a) (n) (h) (G): lsub_trans … (λL. cpms h G L n) (lsubv a h G).
+lemma lsubv_cpms_trans (h) (a) (n) (G):
+      lsub_trans … (λL. cpms h G L n) (lsubv h a G).
 /3 width=6 by lsubv_fwd_lsubr, lsubr_cpms_trans/
 qed-.
index 06d302d57df17dbc634d0e0e7708f8d76023c75b..6b0daf223665780c6e1cf4516219e732a8da1296 100644 (file)
@@ -21,11 +21,11 @@ include "basic_2/dynamic/lsubv.ma".
 
 (* Note: the premise 𝐔⦃f⦄ cannot be removed *)
 (* Basic_2A1: includes: lsubsv_drop_O1_conf *)
-lemma lsubv_drops_conf_isuni (a) (h) (G):
-                             ∀L1,L2. G ⊢ L1 ⫃![a,h] L2 →
-                             ∀b,f,K1. 𝐔⦃f⦄ → ⬇*[b,f] L1 ≘ K1 →
-                             ∃∃K2. G ⊢ K1 ⫃![a,h] K2 & ⬇*[b,f] L2 ≘ K2.
-#a #h #G #L1 #L2 #H elim H -L1 -L2
+lemma lsubv_drops_conf_isuni (h) (a) (G):
+      ∀L1,L2. G ⊢ L1 ⫃![h,a] L2 →
+      ∀b,f,K1. 𝐔⦃f⦄ → ⬇*[b,f] L1 ≘ K1 →
+      ∃∃K2. G ⊢ K1 ⫃![h,a] K2 & ⬇*[b,f] L2 ≘ K2.
+#h #a #G #L1 #L2 #H elim H -L1 -L2
 [ /2 width=3 by ex2_intro/
 | #I #L1 #L2 #HL12 #IH #b #f #K1 #Hf #H
   elim (drops_inv_bind1_isuni … Hf H) -Hf -H *
@@ -46,11 +46,11 @@ qed-.
 
 (* Note: the premise 𝐔⦃f⦄ cannot be removed *)
 (* Basic_2A1: includes: lsubsv_drop_O1_trans *)
-lemma lsubv_drops_trans_isuni (a) (h) (G):
-                              ∀L1,L2. G ⊢ L1 ⫃![a,h] L2 →
-                              ∀b,f,K2. 𝐔⦃f⦄ → ⬇*[b,f] L2 ≘ K2 →
-                              ∃∃K1. G ⊢ K1 ⫃![a,h] K2 & ⬇*[b,f] L1 ≘ K1.
-#a #h #G #L1 #L2 #H elim H -L1 -L2
+lemma lsubv_drops_trans_isuni (h) (a) (G):
+      ∀L1,L2. G ⊢ L1 ⫃![h,a] L2 →
+      ∀b,f,K2. 𝐔⦃f⦄ → ⬇*[b,f] L2 ≘ K2 →
+      ∃∃K1. G ⊢ K1 ⫃![h,a] K2 & ⬇*[b,f] L1 ≘ K1.
+#h #a #G #L1 #L2 #H elim H -L1 -L2
 [ /2 width=3 by ex2_intro/
 | #I #L1 #L2 #HL12 #IH #b #f #K2 #Hf #H
   elim (drops_inv_bind1_isuni … Hf H) -Hf -H *
index daede63b35dcfb5b9f368480a72881ea0017343f..969751d2d39edec0e4d1865a69078bf10bba2819 100644 (file)
@@ -20,8 +20,8 @@ include "basic_2/dynamic/lsubv.ma".
 (* Forward lemmas with lenv refinement for atomic arity assignment **********)
 
 (* Basic_2A1: uses: lsubsv_fwd_lsuba *)
-lemma lsubsv_fwd_lsuba (a) (h) (G): ∀L1,L2. G ⊢ L1 ⫃![a,h] L2 → G ⊢ L1 ⫃⁝ L2.
-#a #h #G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsuba_bind/
+lemma lsubsv_fwd_lsuba (h) (a) (G): ∀L1,L2. G ⊢ L1 ⫃![h,a] L2 → G ⊢ L1 ⫃⁝ L2.
+#h #a #G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsuba_bind/
 #L1 #L2 #W #V #H #_ #IH
 elim (cnv_inv_cast … H) -H #W0 #HW #HV #HW0 #HVW0
 elim (cnv_fwd_aaa … HW) -HW #B #HW
index 938c116c565af9f73b9bbb8d6341ca16305118c2..fe2f3760c27994e2618baa6d769ebe5c0f1d4dda 100644 (file)
@@ -20,6 +20,6 @@ include "basic_2/dynamic/lsubv.ma".
 (* Forward lemmas with restricted refinement for local environments *********)
 
 (* Basic_2A1: uses: lsubsv_fwd_lsubr *)
-lemma lsubv_fwd_lsubr (a) (h) (G): ∀L1,L2. G ⊢ L1 ⫃![a,h] L2 → L1 ⫃ L2.
-#a #h #G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsubr_bind, lsubr_beta/
+lemma lsubv_fwd_lsubr (h) (a) (G): ∀L1,L2. G ⊢ L1 ⫃![h,a] L2 → L1 ⫃ L2.
+#h #a #G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsubr_bind, lsubr_beta/
 qed-.
index d416b5f40fb4d55177c64fa7530a1871118e8c88..0108c016328eac68c593c2b291fc7e76c593e25a 100644 (file)
@@ -19,8 +19,8 @@ include "basic_2/dynamic/lsubv_cnv.ma".
 (* Main properties **********************************************************)
 
 (* Note: not valid in Basic_2A1 *)
-theorem lsubv_trans (a) (h) (G): Transitive … (lsubv a h G).
-#a #h #G #L1 #L #H elim H -L1 -L //
+theorem lsubv_trans (h) (a) (G): Transitive … (lsubv h a G).
+#h #a #G #L1 #L #H elim H -L1 -L //
 [ #I #K1 #K #HK1 #IH #Y #H
   elim (lsubv_inv_bind_sn … H) -H *
   [ #K2 #HK2 #H destruct /3 width=1 by lsubv_bind/
index 5b83675b3a62e855e74d9699b9c3ec58a2e13d28..c2c9393884c2d618abd16aabd12b24c983a202af 100644 (file)
 (**************************************************************************)
 
 include "basic_2/notation/relations/colon_6.ma".
-include "basic_2/notation/relations/colon_5.ma".
-include "basic_2/notation/relations/colonstar_5.ma".
 include "basic_2/dynamic/cnv.ma".
 
 (* NATIVE TYPE ASSIGNMENT FOR TERMS *****************************************)
 
-definition nta (a) (h): relation4 genv lenv term term ≝
-                        λG,L,T,U. ⦃G,L⦄ ⊢ ⓝU.T ![a,h].
+definition nta (h) (a): relation4 genv lenv term term ≝
+           λG,L,T,U. ⦃G,L⦄ ⊢ ⓝU.T ![h,a].
 
 interpretation "native type assignment (term)"
-   'Colon a h G L T U = (nta a h G L T U).
-
-interpretation "restricted native type assignment (term)"
-   'Colon h G L T U = (nta true h G L T U).
-
-interpretation "extended native type assignment (term)"
-   'ColonStar h G L T U = (nta false h G L T U).
+  'Colon h a G L T U = (nta h a G L T U).
 
 (* Basic properties *********************************************************)
 
 (* Basic_1: was by definition: ty3_sort *)
 (* Basic_2A1: was by definition: nta_sort ntaa_sort *)
-lemma nta_sort (a) (h) (G) (L) (s): ⦃G,L⦄ ⊢ ⋆s :[a,h] ⋆(next h s).
-#a #h #G #L #s /2 width=3 by cnv_sort, cnv_cast, cpms_sort/
+lemma nta_sort (h) (a) (G) (L): ∀s. ⦃G,L⦄ ⊢ ⋆s :[h,a] ⋆(⫯[h]s).
+#h #a #G #L #s /2 width=3 by cnv_sort, cnv_cast, cpms_sort/
 qed.
 
-lemma nta_bind_cnv (a) (h) (G) (K):
-      ∀V. ⦃G,K⦄ ⊢ V ![a,h] →
-      ∀I,T,U. ⦃G,K.ⓑ{I}V⦄ ⊢ T :[a,h] U →
-      ∀p. ⦃G,K⦄ ⊢ ⓑ{p,I}V.T :[a,h] ⓑ{p,I}V.U.
-#a #h #G #K #V #HV #I #T #U #H #p
+lemma nta_bind_cnv (h) (a) (G) (K):
+      ∀V. ⦃G,K⦄ ⊢ V ![h,a] →
+      ∀I,T,U. ⦃G,K.ⓑ{I}V⦄ ⊢ T :[h,a] U →
+      ∀p. ⦃G,K⦄ ⊢ ⓑ{p,I}V.T :[h,a] ⓑ{p,I}V.U.
+#h #a #G #K #V #HV #I #T #U #H #p
 elim (cnv_inv_cast … H) -H #X #HU #HT #HUX #HTX
 /3 width=5 by cnv_bind, cnv_cast, cpms_bind_dx/
 qed.
 
 (* Basic_2A1: was by definition: nta_cast *)
-lemma nta_cast (a) (h) (G) (L):
-      ∀T,U. ⦃G,L⦄ ⊢ T :[a,h] U → ⦃G,L⦄ ⊢ ⓝU.T :[a,h] U.
-#a #h #G #L #T #U #H
+lemma nta_cast (h) (a) (G) (L):
+      ∀T,U. ⦃G,L⦄ ⊢ T :[h,a] U → ⦃G,L⦄ ⊢ ⓝU.T :[h,a] U.
+#h #a #G #L #T #U #H
 elim (cnv_inv_cast … H) #X #HU #HT #HUX #HTX
 /3 width=3 by cnv_cast, cpms_eps/
 qed.
 
 (* Basic_1: was by definition: ty3_cast *)
-lemma nta_cast_old (a) (h) (G) (L):
-      ∀T0,T1. ⦃G,L⦄ ⊢ T0 :[a,h] T1 →
-      ∀T2. ⦃G,L⦄ ⊢ T1 :[a,h] T2 → ⦃G,L⦄ ⊢ ⓝT1.T0 :[a,h] ⓝT2.T1.
-#a #h #G #L #T0 #T1 #H1 #T2 #H2
+lemma nta_cast_old (h) (a) (G) (L):
+      ∀T0,T1. ⦃G,L⦄ ⊢ T0 :[h,a] T1 →
+      ∀T2. ⦃G,L⦄ ⊢ T1 :[h,a] T2 → ⦃G,L⦄ ⊢ ⓝT1.T0 :[h,a] ⓝT2.T1.
+#h #a #G #L #T0 #T1 #H1 #T2 #H2
 elim (cnv_inv_cast … H1) #X1 #_ #_ #HTX1 #HTX01
 elim (cnv_inv_cast … H2) #X2 #_ #_ #HTX2 #HTX12
 /3 width=3 by cnv_cast, cpms_eps/
@@ -68,25 +60,25 @@ qed.
 
 (* Basic inversion lemmas ***************************************************)
 
-lemma nta_inv_gref_sn (a) (h) (G) (L):
-      ∀X2,l. ⦃G,L⦄ ⊢ §l :[a,h] X2 → ⊥.
-#a #h #G #L #X2 #l #H
+lemma nta_inv_gref_sn (h) (a) (G) (L):
+      ∀X2,l. ⦃G,L⦄ ⊢ §l :[h,a] X2 → ⊥.
+#h #a #G #L #X2 #l #H
 elim (cnv_inv_cast … H) -H #X #_ #H #_ #_
 elim (cnv_inv_gref … H)
 qed-.
 
 (* Basic_forward lemmas *****************************************************)
 
-lemma nta_fwd_cnv_sn (a) (h) (G) (L):
-                     ∀T,U. ⦃G,L⦄ ⊢ T :[a,h] U → ⦃G,L⦄ ⊢ T ![a,h].
-#a #h #G #L #T #U #H
+lemma nta_fwd_cnv_sn (h) (a) (G) (L):
+      ∀T,U. ⦃G,L⦄ ⊢ T :[h,a] U → ⦃G,L⦄ ⊢ T ![h,a].
+#h #a #G #L #T #U #H
 elim (cnv_inv_cast … H) -H #X #_ #HT #_ #_ //
 qed-.
 
 (* Note: this is nta_fwd_correct_cnv *)
-lemma nta_fwd_cnv_dx (a) (h) (G) (L):
-                     ∀T,U. ⦃G,L⦄ ⊢ T :[a,h] U → ⦃G,L⦄ ⊢ U ![a,h].
-#a #h #G #L #T #U #H
+lemma nta_fwd_cnv_dx (h) (a) (G) (L):
+      ∀T,U. ⦃G,L⦄ ⊢ T :[h,a] U → ⦃G,L⦄ ⊢ U ![h,a].
+#h #a #G #L #T #U #H
 elim (cnv_inv_cast … H) -H #X #HU #_ #_ #_ //
 qed-.
 
index 0161996dd9f0a1aaf5e66d2f1baaf528ae6c97be..2a3eafa2843a4ba0676b69de06371a9700497576 100644 (file)
@@ -20,9 +20,9 @@ include "basic_2/dynamic/nta.ma".
 (* Forward lemmas with atomic arity assignment for terms ********************)
 
 (* Note: this means that no type is a universe *)
-lemma nta_fwd_aaa (a) (h) (G) (L):
-      ∀T,U. ⦃G,L⦄ ⊢ T :[a,h] U → ∃∃A. ⦃G,L⦄ ⊢ T ⁝ A & ⦃G,L⦄ ⊢ U ⁝ A.
-#a #h #G #L #T #U #H
+lemma nta_fwd_aaa (h) (a) (G) (L):
+      ∀T,U. ⦃G,L⦄ ⊢ T :[h,a] U → ∃∃A. ⦃G,L⦄ ⊢ T ⁝ A & ⦃G,L⦄ ⊢ U ⁝ A.
+#h #a #G #L #T #U #H
 elim (cnv_fwd_aaa … H) -H #A #H
 elim (aaa_inv_cast … H) -H #HU #HT
 /2 width=3 by ex2_intro/
@@ -31,20 +31,20 @@ qed-.
 (* Advanced inversion lemmas ************************************************)
 
 (* Basic_1: uses: ty3_predicative *)
-lemma nta_abst_predicative (a) (h) (p) (G) (L):
-      ∀W,T. ⦃G,L⦄ ⊢ ⓛ{p}W.T :[a,h] W → ⊥.
-#a #h #p #G #L #W #T #H
+lemma nta_abst_predicative (h) (a) (p) (G) (L):
+      ∀W,T. ⦃G,L⦄ ⊢ ⓛ{p}W.T :[h,a] W → ⊥.
+#h #a #p #G #L #W #T #H
 elim (nta_fwd_aaa … H) -a -h #X #H #H1W
 elim (aaa_inv_abst … H) -p #B #A #H2W #_ #H destruct -T
 lapply (aaa_mono … H1W … H2W) -G -L -W #H
 elim (discr_apair_xy_x … H)
 qed-.
 
-(* Basic_2A1: uses: ty3_repellent *)
-theorem nta_abst_repellent (a) (h) (p) (G) (K):
-        ∀W,T,U1. ⦃G,K⦄ ⊢ ⓛ{p}W.T :[a,h] U1 →
-        ∀U2. ⦃G,K.ⓛW⦄ ⊢ T :[a,h] U2 → ⬆*[1] U1 ≘ U2 → ⊥.
-#a #h #p #G #K #W #T #U1 #H1 #U2 #H2 #HU12
+(* Basic_1: uses: ty3_repellent *)
+theorem nta_abst_repellent (h) (a) (p) (G) (K):
+        ∀W,T,U1. ⦃G,K⦄ ⊢ ⓛ{p}W.T :[h,a] U1 →
+        ∀U2. ⦃G,K.ⓛW⦄ ⊢ T :[h,a] U2 → ⬆*[1] U1 ≘ U2 → ⊥.
+#h #a #p #G #K #W #T #U1 #H1 #U2 #H2 #HU12
 elim (nta_fwd_aaa … H2) -H2 #A2 #H2T #H2U2
 elim (nta_fwd_aaa … H1) -H1 #X1 #H1 #HU1
 elim (aaa_inv_abst … H1) -a -h -p #B #A1 #_ #H1T #H destruct
index 100d6317b9a5e543c85996b11be8070924228c30..4e505925c9cc92ec08528f72af7bf719dfda80aa 100644 (file)
@@ -19,10 +19,10 @@ include "basic_2/dynamic/nta.ma".
 
 (* Properties with r-equivalence for terms **********************************)
 
-lemma nta_conv_cnv (a) (h) (G) (L) (T):
-                   ∀U1. ⦃G,L⦄ ⊢ T :[a,h] U1 →
-                   ∀U2. ⦃G,L⦄  ⊢ U1 ⬌*[h] U2 → ⦃G,L⦄ ⊢ U2 ![a,h] → ⦃G,L⦄ ⊢ T :[a,h] U2.
-#a #h #G #L #T #U1 #H1 #U2 #HU12 #HU2
+lemma nta_conv_cnv (h) (a) (G) (L) (T):
+                   ∀U1. ⦃G,L⦄ ⊢ T :[h,a] U1 →
+                   ∀U2. ⦃G,L⦄  ⊢ U1 ⬌*[h] U2 → ⦃G,L⦄ ⊢ U2 ![h,a] → ⦃G,L⦄ ⊢ T :[h,a] U2.
+#h #a #G #L #T #U1 #H1 #U2 #HU12 #HU2
 elim (cnv_inv_cast … H1) -H1 #X1 #HU1 #HT #HUX1 #HTX1
 lapply (cpcs_cprs_conf … HUX1 … HU12) -U1 #H
 elim (cpcs_inv_cprs … H) -H #X2 #HX12 #HU12
@@ -31,11 +31,11 @@ qed-.
 
 (* Basic_1: was by definition: ty3_conv *)
 (* Basic_2A1: was by definition: nta_conv ntaa_conv *)
-lemma nta_conv (a) (h) (G) (L) (T):
-               ∀U1. ⦃G,L⦄ ⊢ T :[a,h] U1 →
+lemma nta_conv (h) (a) (G) (L) (T):
+               ∀U1. ⦃G,L⦄ ⊢ T :[h,a] U1 →
                ∀U2. ⦃G,L⦄  ⊢ U1 ⬌*[h] U2 →
-               ∀W2. ⦃G,L⦄ ⊢ U2 :[a,h] W2 → ⦃G,L⦄ ⊢ T :[a,h] U2.
-#a #h #G #L #T #U1 #H1 #U2 #HU12 #W2 #H2
+               ∀W2. ⦃G,L⦄ ⊢ U2 :[h,a] W2 → ⦃G,L⦄ ⊢ T :[h,a] U2.
+#h #a #G #L #T #U1 #H1 #U2 #HU12 #W2 #H2
 /3 width=3 by nta_conv_cnv, nta_fwd_cnv_sn/
 qed-.
 
@@ -43,19 +43,19 @@ qed-.
 
 (* Basic_1: was: ty3_gen_sort *)
 (* Basic_2A1: was: nta_inv_sort1 *)
-lemma nta_inv_sort_sn (a) (h) (G) (L) (X2):
-      ∀s. ⦃G,L⦄ ⊢ ⋆s :[a,h] X2 →
-      ∧∧ ⦃G,L⦄ ⊢ ⋆(next h s) ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 ![a,h].
-#a #h #G #L #X2 #s #H
+lemma nta_inv_sort_sn (h) (a) (G) (L) (X2):
+      ∀s. ⦃G,L⦄ ⊢ ⋆s :[h,a] X2 →
+      ∧∧ ⦃G,L⦄ ⊢ ⋆(⫯[h]s) ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 ![h,a].
+#h #a #G #L #X2 #s #H
 elim (cnv_inv_cast … H) -H #X1 #HX2 #_ #HX21 #H
 lapply (cpms_inv_sort1 … H) -H #H destruct
 /3 width=1 by cpcs_cprs_sn, conj/
 qed-.
 
-lemma nta_inv_ldec_sn_cnv (a) (h) (G) (K) (V):
-      ∀X2. ⦃G,K.ⓛV⦄ ⊢ #0 :[a,h] X2 →
-      ∃∃U. ⦃G,K⦄ ⊢ V ![a,h] & ⬆*[1] V ≘ U & ⦃G,K.ⓛV⦄ ⊢ U ⬌*[h] X2 & ⦃G,K.ⓛV⦄ ⊢ X2 ![a,h].
-#a #h #G #Y #X #X2 #H
+lemma nta_inv_ldec_sn_cnv (h) (a) (G) (K) (V):
+      ∀X2. ⦃G,K.ⓛV⦄ ⊢ #0 :[h,a] X2 →
+      ∃∃U. ⦃G,K⦄ ⊢ V ![h,a] & ⬆*[1] V ≘ U & ⦃G,K.ⓛV⦄ ⊢ U ⬌*[h] X2 & ⦃G,K.ⓛV⦄ ⊢ X2 ![h,a].
+#h #a #G #Y #X #X2 #H
 elim (cnv_inv_cast … H) -H #X1 #HX2 #H1 #HX21 #H2
 elim (cnv_inv_zero … H1) -H1 #Z #K #V #HV #H destruct
 elim (cpms_inv_ell_sn … H2) -H2 *
index 8dbb60c79088b3d04297b6d317cfc577d2044d70..f452902688aebfc2a977500512748fdeaa638244 100644 (file)
 (**************************************************************************)
 
 include "basic_2/rt_computation/cprs_cprs.ma".
-include "basic_2/rt_computation/lprs_cpms.ma".
+include "basic_2/dynamic/cnv_aaa.ma".
 include "basic_2/dynamic/nta.ma".
 
 (* NATIVE TYPE ASSIGNMENT FOR TERMS *****************************************)
 
 (* Properties with advanced rt_computation for terms ************************)
 
-(* Basic_2A1: was by definition nta_appl ntaa_appl *)
-lemma nta_appl_abst (a) (h) (p) (G) (K):
-      ∀V,W. ⦃G,K⦄ ⊢ V :[a,h] W →
-      ∀T,U. ⦃G,K.ⓛW⦄ ⊢ T :[a,h] U → ⦃G,K⦄ ⊢ ⓐV.ⓛ{p}W.T :[a,h] ⓐV.ⓛ{p}W.U.
-#a #h #p #G #K #V #W #H1 #T #U #H2
+(* Basic_2A1: uses by definition nta_appl ntaa_appl *)
+lemma nta_appl_abst (h) (a) (p) (G) (L):
+      ∀n. ad a n →
+      ∀V,W. ⦃G,L⦄ ⊢ V :[h,a] W →
+      ∀T,U. ⦃G,L.ⓛW⦄ ⊢ T :[h,a] U → ⦃G,L⦄ ⊢ ⓐV.ⓛ{p}W.T :[h,a] ⓐV.ⓛ{p}W.U.
+#h #a #p #G #L #n #Ha #V #W #H1 #T #U #H2
 elim (cnv_inv_cast … H1) -H1 #X1 #HW #HV #HWX1 #HVX1
 elim (cnv_inv_cast … H2) -H2 #X2 #HU #HT #HUX2 #HTX2
-/4 width=7 by cnv_bind, cnv_appl, cnv_cast, cpms_appl_dx, cpms_bind_dx/
+/4 width=11 by cnv_appl_ge, cnv_cast, cnv_bind, cpms_appl_dx, cpms_bind_dx/
 qed.
 
 (* Basic_1: was by definition: ty3_appl *)
 (* Basic_2A1: was nta_appl_old *)
-lemma nta_appl (a) (h) (p) (G) (L):
-      ∀V,W. ⦃G,L⦄ ⊢ V :[a,h] W →
-      ∀T,U. ⦃G,L⦄ ⊢ T :[a,h] ⓛ{p}W.U → ⦃G,L⦄ ⊢ ⓐV.T :[a,h] ⓐV.ⓛ{p}W.U.
-#a #h #p #G #L #V #W #H1 #T #U #H2
+lemma nta_appl (h) (a) (p) (G) (L):
+      ∀n. 1 ≤ n → ad a n →
+      ∀V,W. ⦃G,L⦄ ⊢ V :[h,a] W →
+      ∀T,U. ⦃G,L⦄ ⊢ T :[h,a] ⓛ{p}W.U → ⦃G,L⦄ ⊢ ⓐV.T :[h,a] ⓐV.ⓛ{p}W.U.
+#h #a #p #G #L #n #Hn #Ha #V #W #H1 #T #U #H2
 elim (cnv_inv_cast … H1) -H1 #X1 #HW #HV #HWX1 #HVX1
 elim (cnv_inv_cast … H2) -H2 #X2 #HU #HT #HUX2 #HTX2
 elim (cpms_inv_abst_sn … HUX2) #W0 #U0 #HW0 #HU0 #H destruct
 elim (cprs_conf … HWX1 … HW0) -HW0 #X0 #HX10 #HWX0
 @(cnv_cast … (ⓐV.ⓛ{p}W0.U0)) (**) (* full auto too slow *)
-[ /3 width=7 by cnv_appl, cpms_bind/
-| /4 width=11 by cnv_appl, cpms_cprs_trans, cpms_bind/
+[ /2 width=11 by cnv_appl_ge/
+| /3 width=11 by cnv_appl_ge, cpms_cprs_trans/
 | /2 width=1 by cpms_appl_dx/
 | /2 width=1 by cpms_appl_dx/
 ]
@@ -50,14 +52,14 @@ qed.
 
 (* Inversion lemmas with advanced rt_computation for terms ******************)
 
-lemma nta_inv_abst_bi_cnv (a) (h) (p) (G) (K) (W):
-      ∀T,U. ⦃G,K⦄ ⊢ ⓛ{p}W.T :[a,h] ⓛ{p}W.U →
-      ∧∧ ⦃G,K⦄ ⊢ W ![a,h] & ⦃G,K.ⓛW⦄ ⊢ T :[a,h] U.
-#a #h #p #G #K #W #T #U #H
+lemma nta_inv_abst_bi_cnv (h) (a) (p) (G) (K) (W):
+      ∀T,U. ⦃G,K⦄ ⊢ ⓛ{p}W.T :[h,a] ⓛ{p}W.U →
+      ∧∧ ⦃G,K⦄ ⊢ W ![h,a] & ⦃G,K.ⓛW⦄ ⊢ T :[h,a] U.
+#h #a #p #G #K #W #T #U #H
 elim (cnv_inv_cast … H) -H #X #HWU #HWT #HUX #HTX
 elim (cnv_inv_bind … HWU) -HWU #HW #HU
 elim (cnv_inv_bind … HWT) -HWT #_ #HT
 elim (cpms_inv_abst_sn … HUX) -HUX #W0 #X0 #_ #HUX0 #H destruct
-elim (cpms_inv_abst_bi … HTX) -HTX #_ #HTX0 -W0
+elim (cpms_inv_abst_bi … HTX) -HTX #_ #_ #HTX0 -W0
 /3 width=3 by cnv_cast, conj/
 qed-.
index b65c1bdc89c35c2fd3c90276014edafde9c0fc96..29cce8c0c0e16dc71d4ebe0c05e7b49a131bf6cd 100644 (file)
@@ -19,10 +19,10 @@ include "basic_2/dynamic/nta.ma".
 
 (* Advanced properties ******************************************************)
 
-lemma nta_ldef (a) (h) (G) (K):
-      ∀V,W. ⦃G,K⦄ ⊢ V :[a,h] W →
-      ∀U. ⬆*[1] W ≘ U → ⦃G,K.ⓓV⦄ ⊢ #0 :[a,h] U.
-#a #h #G #K #V #W #H #U #HWU
+lemma nta_ldef (h) (a) (G) (K):
+      ∀V,W. ⦃G,K⦄ ⊢ V :[h,a] W →
+      ∀U. ⬆*[1] W ≘ U → ⦃G,K.ⓓV⦄ ⊢ #0 :[h,a] U.
+#h #a #G #K #V #W #H #U #HWU
 elim (cnv_inv_cast … H) -H #X #HW #HV #HWX #HVX
 lapply (cnv_lifts … HW (Ⓣ) … (K.ⓓV) … HWU) -HW
 [ /3 width=3 by drops_refl, drops_drop/ ] #HU
@@ -31,18 +31,18 @@ elim (cpms_lifts_sn … HWX … (Ⓣ) … (K.ⓓV) … HWU) -W
 /3 width=5 by cnv_zero, cnv_cast, cpms_delta/
 qed.
 
-lemma nta_ldec_cnv (a) (h) (G) (K):
-      ∀W. ⦃G,K⦄ ⊢ W ![a,h] →
-      ∀U. ⬆*[1] W ≘ U → ⦃G,K.ⓛW⦄ ⊢ #0 :[a,h] U.
-#a #h #G #K #W #HW #U #HWU
+lemma nta_ldec_cnv (h) (a) (G) (K):
+      ∀W. ⦃G,K⦄ ⊢ W ![h,a] →
+      ∀U. ⬆*[1] W ≘ U → ⦃G,K.ⓛW⦄ ⊢ #0 :[h,a] U.
+#h #a #G #K #W #HW #U #HWU
 lapply (cnv_lifts … HW (Ⓣ) … (K.ⓛW) … HWU)
 /3 width=5 by cnv_zero, cnv_cast, cpms_ell, drops_refl, drops_drop/
 qed.
 
-lemma nta_lref (a) (h) (I) (G) (K):
-      ∀T,i. ⦃G,K⦄ ⊢ #i :[a,h] T →
-      ∀U. ⬆*[1] T ≘ U → ⦃G,K.ⓘ{I}⦄ ⊢ #(↑i) :[a,h] U.
-#a #h #I #G #K #T #i #H #U #HTU
+lemma nta_lref (h) (a) (I) (G) (K):
+      ∀T,i. ⦃G,K⦄ ⊢ #i :[h,a] T →
+      ∀U. ⬆*[1] T ≘ U → ⦃G,K.ⓘ{I}⦄ ⊢ #(↑i) :[h,a] U.
+#h #a #I #G #K #T #i #H #U #HTU
 elim (cnv_inv_cast … H) -H #X #HT #Hi #HTX #H2
 lapply (cnv_lifts … HT (Ⓣ) … (K.ⓘ{I}) … HTU) -HT
 [ /3 width=3 by drops_refl, drops_drop/ ] #HU
@@ -55,8 +55,8 @@ qed.
 
 (* Properties with generic slicing for local environments *******************)
 
-lemma nta_lifts_sn (a) (h) (G): d_liftable2_sn … lifts (nta a h G).
-#a #h #G #K #T1 #T2 #H #b #f #L #HLK #U1 #HTU1
+lemma nta_lifts_sn (h) (a) (G): d_liftable2_sn … lifts (nta a h G).
+#h #a #G #K #T1 #T2 #H #b #f #L #HLK #U1 #HTU1
 elim (cnv_inv_cast … H) -H #X #HT2 #HT1 #HT2X #HT1X
 elim (lifts_total T2 f) #U2 #HTU2
 lapply (cnv_lifts … HT2 … HLK … HTU2) -HT2 #HU2
@@ -69,23 +69,23 @@ qed-.
 
 (* Basic_1: was: ty3_lift *)
 (* Basic_2A1: was: nta_lift ntaa_lift *)
-lemma nta_lifts_bi (a) (h) (G): d_liftable2_bi … lifts (nta a h G).
+lemma nta_lifts_bi (h) (a) (G): d_liftable2_bi … lifts (nta a h G).
 /3 width=12 by nta_lifts_sn, d_liftable2_sn_bi, lifts_mono/ qed-.
 
 (* Basic_1: was by definition: ty3_abbr *)
 (* Basic_2A1: was by definition: nta_ldef ntaa_ldef *)
-lemma nta_ldef_drops (a) (h) (G) (K) (L) (i):
-      ∀V,W. ⦃G,K⦄ ⊢ V :[a,h] W →
-      ∀U. ⬆*[↑i] W ≘ U → ⬇*[i] L ≘ K.ⓓV → ⦃G,L⦄ ⊢ #i :[a,h] U.
-#a #h #G #K #L #i #V #W #HVW #U #HWU #HLK
+lemma nta_ldef_drops (h) (a) (G) (K) (L) (i):
+      ∀V,W. ⦃G,K⦄ ⊢ V :[h,a] W →
+      ∀U. ⬆*[↑i] W ≘ U → ⬇*[i] L ≘ K.ⓓV → ⦃G,L⦄ ⊢ #i :[h,a] U.
+#h #a #G #K #L #i #V #W #HVW #U #HWU #HLK
 elim (lifts_split_trans … HWU (𝐔❴1❵) (𝐔❴i❵)) [| // ] #X #HWX #HXU
 /3 width=9 by nta_lifts_bi, nta_ldef/
 qed.
 
-lemma nta_ldec_drops_cnv (a) (h) (G) (K) (L) (i):
-      ∀W. ⦃G,K⦄ ⊢ W ![a,h] →
-      ∀U. ⬆*[↑i] W ≘ U → ⬇*[i] L ≘ K.ⓛW → ⦃G,L⦄ ⊢ #i :[a,h] U.
-#a #h #G #K #L #i #W #HW #U #HWU #HLK
+lemma nta_ldec_drops_cnv (h) (a) (G) (K) (L) (i):
+      ∀W. ⦃G,K⦄ ⊢ W ![h,a] →
+      ∀U. ⬆*[↑i] W ≘ U → ⬇*[i] L ≘ K.ⓛW → ⦃G,L⦄ ⊢ #i :[h,a] U.
+#h #a #G #K #L #i #W #HW #U #HWU #HLK
 elim (lifts_split_trans … HWU (𝐔❴1❵) (𝐔❴i❵)) [| // ] #X #HWX #HXU
 /3 width=9 by nta_lifts_bi, nta_ldec_cnv/
 qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_eval.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_eval.ma
new file mode 100644 (file)
index 0000000..3a8971f
--- /dev/null
@@ -0,0 +1,35 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/dynamic/cnv_eval.ma".
+include "basic_2/dynamic/nta_preserve.ma".
+
+(* NATIVE TYPE ASSIGNMENT FOR TERMS *****************************************)
+
+(* Properties with evaluations for rt-transition on terms *******************)
+
+lemma nta_typecheck_dec (h) (a) (G) (L): ac_props a →
+      ∀T,U. Decidable … (⦃G,L⦄ ⊢ T :[h,a] U).
+/2 width=1 by cnv_dec/ qed-.
+
+(* Basic_1: uses: ty3_inference *)
+lemma nta_inference_dec (h) (a) (G) (L) (T): ac_props a →
+      Decidable (∃U. ⦃G,L⦄ ⊢ T :[h,a] U).
+#h #a #G #L #T #Ha
+elim (cnv_dec h … G L T Ha) -Ha #HT
+[ /3 width=1 by cnv_nta_sn, or_introl/
+| @or_intror * #U #HTU
+  /3 width=2 by nta_fwd_cnv_sn/
+]
+qed-.
index b96b1cfd54e068d210facc341d944c45bb2d7931..5aea50a665c3a15abf396c569fb9b1460add4092 100644 (file)
@@ -23,10 +23,10 @@ include "basic_2/dynamic/nta.ma".
 (* Note: this might use fsb_inv_cast (still to be proved) *)
 (* Basic_1: uses: ty3_sn3 *)
 (* Basic_2A1: uses: nta_fwd_csn *)
-theorem nta_fwd_fsb (a) (h) (o) (G) (L):
-        ∀T,U. ⦃G,L⦄ ⊢ T :[a,h] U →
-        ∧∧ ≥[h,o] 𝐒⦃G,L,T⦄ & ≥[h,o] 𝐒⦃G,L,U⦄.
-#a #h #o #G #L #T #U #H
+theorem nta_fwd_fsb (h) (a) (G) (L):
+        ∀T,U. ⦃G,L⦄ ⊢ T :[h,a] U →
+        ∧∧ ≥[h] 𝐒⦃G,L,T⦄ & ≥[h] 𝐒⦃G,L,U⦄.
+#h #a #G #L #T #U #H
 elim (cnv_inv_cast … H) #X #HU #HT #_ #_ -X
 /3 width=2 by cnv_fwd_fsb, conj/
 qed-. 
index 4f9b52385aa9f66de95b70727bbc951118120652..03ed818b1c255db1cfd8205a2e7967b12a2b87a9 100644 (file)
@@ -22,31 +22,31 @@ include "basic_2/dynamic/nta_preserve.ma".
 (* Advanced eliminators *****************************************************)
 
 lemma nta_ind_rest_cnv (h) (Q:relation4 …):
-      (∀G,L,s. Q G L (⋆s) (⋆(next h s))) →
+      (∀G,L,s. Q G L (⋆s) (⋆(⫯[h]s))) →
       (∀G,K,V,W,U.
-        ⦃G,K⦄ ⊢ V :[h] W → ⬆*[1] W ≘ U →
+        ⦃G,K⦄ ⊢ V :[h,𝟐] W → ⬆*[1] W ≘ U →
         Q G K V W → Q G (K.ⓓV) (#0) U
       ) →
-      (∀G,K,W,U. ⦃G,K⦄ ⊢ W ![h] → ⬆*[1] W ≘ U → Q G (K.ⓛW) (#0) U) →
+      (∀G,K,W,U. ⦃G,K⦄ ⊢ W ![h,𝟐] → ⬆*[1] W ≘ U → Q G (K.ⓛW) (#0) U) →
       (∀I,G,K,W,U,i.
-        ⦃G,K⦄ ⊢ #i :[h] W → ⬆*[1] W ≘ U →
+        ⦃G,K⦄ ⊢ #i :[h,𝟐] W → ⬆*[1] W ≘ U →
         Q G K (#i) W → Q G (K.ⓘ{I}) (#↑i) U
       ) →
       (∀p,I,G,K,V,T,U.
-        ⦃G,K⦄ ⊢ V ![h] → ⦃G,K.ⓑ{I}V⦄ ⊢ T :[h] U →
+        ⦃G,K⦄ ⊢ V ![h,𝟐] → ⦃G,K.ⓑ{I}V⦄ ⊢ T :[h,𝟐] U →
         Q G (K.ⓑ{I}V) T U → Q G K (ⓑ{p,I}V.T) (ⓑ{p,I}V.U)
       ) →
       (∀p,G,L,V,W,T,U.
-        ⦃G,L⦄ ⊢ V :[h] W → ⦃G,L⦄ ⊢ T :[h] ⓛ{p}W.U →
+        ⦃G,L⦄ ⊢ V :[h,𝟐] W → ⦃G,L⦄ ⊢ T :[h,𝟐] ⓛ{p}W.U →
         Q G L V W → Q G L T (ⓛ{p}W.U) → Q G L (ⓐV.T) (ⓐV.ⓛ{p}W.U)
       ) →
-      (∀G,L,T,U. ⦃G,L⦄ ⊢ T :[h] U → Q G L T U → Q G L (ⓝU.T) U
+      (∀G,L,T,U. ⦃G,L⦄ ⊢ T :[h,𝟐] U → Q G L T U → Q G L (ⓝU.T) U
       ) →
       (∀G,L,T,U1,U2.
-        ⦃G,L⦄ ⊢ T :[h] U1 → ⦃G,L⦄ ⊢ U1 ⬌*[h] U2 → ⦃G,L⦄ ⊢ U2 ![h] →
+        ⦃G,L⦄ ⊢ T :[h,𝟐] U1 → ⦃G,L⦄ ⊢ U1 ⬌*[h] U2 → ⦃G,L⦄ ⊢ U2 ![h,𝟐] →
         Q G L T U1 → Q G L T U2
       ) →
-      ∀G,L,T,U. ⦃G,L⦄ ⊢ T :[h] U → Q G L T U.
+      ∀G,L,T,U. ⦃G,L⦄ ⊢ T :[h,𝟐] U → Q G L T U.
 #h #Q #IH1 #IH2 #IH3 #IH4 #IH5 #IH6 #IH7 #IH8 #G #L #T
 @(fqup_wf_ind_eq (Ⓣ) … G L T) -G -L -T #G0 #L0 #T0 #IH #G #L * * [|||| * ]
 [ #s #HG #HL #HT #X #H destruct -IH
@@ -79,35 +79,35 @@ lemma nta_ind_rest_cnv (h) (Q:relation4 …):
 qed-.
 
 lemma nta_ind_ext_cnv_mixed (h) (Q:relation4 …):
-      (∀G,L,s. Q G L (⋆s) (⋆(next h s))) →
+      (∀G,L,s. Q G L (⋆s) (⋆(⫯[h]s))) →
       (∀G,K,V,W,U.
-        ⦃G,K⦄ ⊢ V :*[h] W → ⬆*[1] W ≘ U →
+        ⦃G,K⦄ ⊢ V :[h,𝛚] W → ⬆*[1] W ≘ U →
         Q G K V W → Q G (K.ⓓV) (#0) U
       ) →
-      (∀G,K,W,U. ⦃G,K⦄ ⊢ W !*[h] → ⬆*[1] W ≘ U → Q G (K.ⓛW) (#0) U) →
+      (∀G,K,W,U. ⦃G,K⦄ ⊢ W ![h,𝛚] → ⬆*[1] W ≘ U → Q G (K.ⓛW) (#0) U) →
       (∀I,G,K,W,U,i.
-        ⦃G,K⦄ ⊢ #i :*[h] W → ⬆*[1] W ≘ U →
+        ⦃G,K⦄ ⊢ #i :[h,𝛚] W → ⬆*[1] W ≘ U →
         Q G K (#i) W → Q G (K.ⓘ{I}) (#↑i) U
       ) →
       (∀p,I,G,K,V,T,U.
-        ⦃G,K⦄ ⊢ V !*[h] → ⦃G,K.ⓑ{I}V⦄ ⊢ T :*[h] U →
+        ⦃G,K⦄ ⊢ V ![h,𝛚] → ⦃G,K.ⓑ{I}V⦄ ⊢ T :[h,𝛚] U →
         Q G (K.ⓑ{I}V) T U → Q G K (ⓑ{p,I}V.T) (ⓑ{p,I}V.U)
       ) →
       (∀p,G,L,V,W,T,U.
-        ⦃G,L⦄ ⊢ V :*[h] W → ⦃G,L⦄ ⊢ T :*[h] ⓛ{p}W.U →
+        ⦃G,L⦄ ⊢ V :[h,𝛚] W → ⦃G,L⦄ ⊢ T :[h,𝛚] ⓛ{p}W.U →
         Q G L V W → Q G L T (ⓛ{p}W.U) → Q G L (ⓐV.T) (ⓐV.ⓛ{p}W.U)
       ) →
       (∀G,L,V,T,U.
-        ⦃G,L⦄ ⊢ T :*[h] U → ⦃G,L⦄ ⊢ ⓐV.U !*[h] →
+        ⦃G,L⦄ ⊢ T :[h,𝛚] U → ⦃G,L⦄ ⊢ ⓐV.U ![h,𝛚] →
         Q G L T U → Q G L (ⓐV.T) (ⓐV.U)
       ) →
-      (∀G,L,T,U. ⦃G,L⦄ ⊢ T :*[h] U → Q G L T U → Q G L (ⓝU.T) U
+      (∀G,L,T,U. ⦃G,L⦄ ⊢ T :[h,𝛚] U → Q G L T U → Q G L (ⓝU.T) U
       ) →
       (∀G,L,T,U1,U2.
-        ⦃G,L⦄ ⊢ T :*[h] U1 → ⦃G,L⦄ ⊢ U1 ⬌*[h] U2 → ⦃G,L⦄ ⊢ U2 !*[h] →
+        ⦃G,L⦄ ⊢ T :[h,𝛚] U1 → ⦃G,L⦄ ⊢ U1 ⬌*[h] U2 → ⦃G,L⦄ ⊢ U2 ![h,𝛚] →
         Q G L T U1 → Q G L T U2
       ) →
-      ∀G,L,T,U. ⦃G,L⦄ ⊢ T :*[h] U → Q G L T U.
+      ∀G,L,T,U. ⦃G,L⦄ ⊢ T :[h,𝛚] U → Q G L T U.
 #h #Q #IH1 #IH2 #IH3 #IH4 #IH5 #IH6 #IH7 #IH8 #IH9 #G #L #T
 @(fqup_wf_ind_eq (Ⓣ) … G L T) -G -L -T #G0 #L0 #T0 #IH #G #L * * [|||| * ]
 [ #s #HG #HL #HT #X #H destruct -IH
@@ -144,35 +144,35 @@ lemma nta_ind_ext_cnv_mixed (h) (Q:relation4 …):
 qed-.
 
 lemma nta_ind_ext_cnv (h) (Q:relation4 …):
-      (∀G,L,s. Q G L (⋆s) (⋆(next h s))) →
+      (∀G,L,s. Q G L (⋆s) (⋆(⫯[h]s))) →
       (∀G,K,V,W,U.
-        ⦃G,K⦄ ⊢ V :*[h] W → ⬆*[1] W ≘ U →
+        ⦃G,K⦄ ⊢ V :[h,𝛚] W → ⬆*[1] W ≘ U →
         Q G K V W → Q G (K.ⓓV) (#0) U
       ) →
-      (∀G,K,W,U. ⦃G,K⦄ ⊢ W !*[h] → ⬆*[1] W ≘ U → Q G (K.ⓛW) (#0) U) →
+      (∀G,K,W,U. ⦃G,K⦄ ⊢ W ![h,𝛚] → ⬆*[1] W ≘ U → Q G (K.ⓛW) (#0) U) →
       (∀I,G,K,W,U,i.
-        ⦃G,K⦄ ⊢ #i :*[h] W → ⬆*[1] W ≘ U →
+        ⦃G,K⦄ ⊢ #i :[h,𝛚] W → ⬆*[1] W ≘ U →
         Q G K (#i) W → Q G (K.ⓘ{I}) (#↑i) U
       ) →
       (∀p,I,G,K,V,T,U.
-        ⦃G,K⦄ ⊢ V !*[h] → ⦃G,K.ⓑ{I}V⦄ ⊢ T :*[h] U →
+        ⦃G,K⦄ ⊢ V ![h,𝛚] → ⦃G,K.ⓑ{I}V⦄ ⊢ T :[h,𝛚] U →
         Q G (K.ⓑ{I}V) T U → Q G K (ⓑ{p,I}V.T) (ⓑ{p,I}V.U)
       ) →
       (∀p,G,K,V,W,T,U.
-        ⦃G,K⦄ ⊢ V :*[h] W → ⦃G,K.ⓛW⦄ ⊢ T :*[h] U →
+        ⦃G,K⦄ ⊢ V :[h,𝛚] W → ⦃G,K.ⓛW⦄ ⊢ T :[h,𝛚] U →
         Q G K V W → Q G (K.ⓛW) T U → Q G K (ⓐV.ⓛ{p}W.T) (ⓐV.ⓛ{p}W.U)
       ) →
       (∀G,L,V,T,U.
-        ⦃G,L⦄ ⊢ T :*[h] U → ⦃G,L⦄ ⊢ ⓐV.U !*[h] →
+        ⦃G,L⦄ ⊢ T :[h,𝛚] U → ⦃G,L⦄ ⊢ ⓐV.U ![h,𝛚] →
         Q G L T U → Q G L (ⓐV.T) (ⓐV.U)
       ) →
-      (∀G,L,T,U. ⦃G,L⦄ ⊢ T :*[h] U → Q G L T U → Q G L (ⓝU.T) U
+      (∀G,L,T,U. ⦃G,L⦄ ⊢ T :[h,𝛚] U → Q G L T U → Q G L (ⓝU.T) U
       ) →
       (∀G,L,T,U1,U2.
-        ⦃G,L⦄ ⊢ T :*[h] U1 → ⦃G,L⦄ ⊢ U1 ⬌*[h] U2 → ⦃G,L⦄ ⊢ U2 !*[h] →
+        ⦃G,L⦄ ⊢ T :[h,𝛚] U1 → ⦃G,L⦄ ⊢ U1 ⬌*[h] U2 → ⦃G,L⦄ ⊢ U2 ![h,𝛚] →
         Q G L T U1 → Q G L T U2
       ) →
-      ∀G,L,T,U. ⦃G,L⦄ ⊢ T :*[h] U → Q G L T U.
+      ∀G,L,T,U. ⦃G,L⦄ ⊢ T :[h,𝛚] U → Q G L T U.
 #h #Q #IH1 #IH2 #IH3 #IH4 #IH5 #IH6 #IH7 #IH8 #IH9 #G #L #T #U #H
 @(nta_ind_ext_cnv_mixed … IH1 IH2 IH3 IH4 IH5 … IH7 IH8 IH9 … H) -G -L -T -U -IH1 -IH2 -IH3 -IH4 -IH5 -IH6 -IH8 -IH9
 #p #G #L #V #W #T #U #HVW #HTU #_ #IHTU
index 8d69b3ca21f7a2bc1246e88499586634eb6a363c..de01c6a0d3774a81e12ef3d7ab43e70c9718ba32 100644 (file)
 (**************************************************************************)
 
 include "basic_2/rt_equivalence/cpcs_cpcs.ma".
-include "basic_2/dynamic/cnv_cpcs.ma".
+include "basic_2/dynamic/cnv_preserve_cpcs.ma".
 include "basic_2/dynamic/nta.ma".
 
 (* NATIVE TYPE ASSIGNMENT FOR TERMS *****************************************)
 
 (* Properties based on preservation *****************************************)
 
-lemma cnv_cpms_nta (a) (h) (G) (L):
-      ∀T. ⦃G,L⦄ ⊢ T ![a,h] → ∀U.⦃G,L⦄ ⊢ T ➡*[1,h] U → ⦃G,L⦄ ⊢ T :[a,h] U.
+lemma cnv_cpms_nta (h) (a) (G) (L):
+      ∀T. ⦃G,L⦄ ⊢ T ![h,a] → ∀U.⦃G,L⦄ ⊢ T ➡*[1,h] U → ⦃G,L⦄ ⊢ T :[h,a] U.
 /3 width=4 by cnv_cast, cnv_cpms_trans/ qed.
 
-lemma cnv_nta_sn (a) (h) (G) (L):
-      ∀T. ⦃G,L⦄ ⊢ T ![a,h] → ∃U. ⦃G,L⦄ ⊢ T :[a,h] U.
-#a #h #G #L #T #HT
+lemma cnv_nta_sn (h) (a) (G) (L):
+      ∀T. ⦃G,L⦄ ⊢ T ![h,a] → ∃U. ⦃G,L⦄ ⊢ T :[h,a] U.
+#h #a #G #L #T #HT
 elim (cnv_fwd_cpm_SO … HT) #U #HTU
 /4 width=2 by cnv_cpms_nta, cpm_cpms, ex_intro/
 qed-.
 
 (* Basic_1: was: ty3_typecheck *)
-lemma nta_typecheck (a) (h) (G) (L):
-      ∀T,U. ⦃G,L⦄ ⊢ T :[a,h] U → ∃T0. ⦃G,L⦄ ⊢ ⓝU.T :[a,h] T0.
+lemma nta_typecheck (h) (a) (G) (L):
+      ∀T,U. ⦃G,L⦄ ⊢ T :[h,a] U → ∃T0. ⦃G,L⦄ ⊢ ⓝU.T :[h,a] T0.
 /3 width=1 by cnv_cast, cnv_nta_sn/ qed-.
 
 (* Basic_1: was: ty3_correct *)
 (* Basic_2A1: was: ntaa_fwd_correct *)
-lemma nta_fwd_correct (a) (h) (G) (L):
-      ∀T,U. ⦃G,L⦄ ⊢ T :[a,h] U → ∃T0. ⦃G,L⦄ ⊢ U :[a,h] T0.
+lemma nta_fwd_correct (h) (a) (G) (L):
+      ∀T,U. ⦃G,L⦄ ⊢ T :[h,a] U → ∃T0. ⦃G,L⦄ ⊢ U :[h,a] T0.
 /3 width=2 by nta_fwd_cnv_dx, cnv_nta_sn/ qed-.
 
 lemma nta_pure_cnv (h) (G) (L):
-      ∀T,U. ⦃G,L⦄ ⊢ T :*[h] U →
-      ∀V. ⦃G,L⦄ ⊢ ⓐV.U !*[h] → ⦃G,L⦄ ⊢ ⓐV.T :*[h] ⓐV.U.
+      ∀T,U. ⦃G,L⦄ ⊢ T :[h,𝛚] U →
+      ∀V. ⦃G,L⦄ ⊢ ⓐV.U ![h,𝛚] → ⦃G,L⦄ ⊢ ⓐV.T :[h,𝛚] ⓐV.U.
 #h #G #L #T #U #H1 #V #H2
 elim (cnv_inv_cast … H1) -H1 #X0 #HU #HT #HUX0 #HTX0
 elim (cnv_inv_appl … H2) #n #p #X1 #X2 #_ #HV #_ #HVX1 #HUX2
 elim (cnv_cpms_conf … HU … HUX0 … HUX2) -HU -HUX2
 <minus_O_n <minus_n_O #X #HX0 #H
 elim (cpms_inv_abst_sn … H) -H #X3 #X4 #HX13 #HX24 #H destruct
-@(cnv_cast … (ⓐV.X0)) [2:|*: /2 width=1 by cpms_appl_dx/ ]
-@(cnv_appl … X3) [4: |*: /2 width=7 by cpms_trans, cpms_cprs_trans/ ]
-#H destruct
+@(cnv_cast … (ⓐV.X0)) [2:|*: /2 width=1 by cpms_appl_dx/ ] (**) (* full auto a bit slow *)
+/3 width=10 by cnv_appl, cpms_trans, cpms_cprs_trans/
 qed.
 
 (* Basic_1: uses: ty3_sred_wcpr0_pr0 *)
-lemma nta_cpr_conf_lpr (a) (h) (G):
-      ∀L1,T1,U. ⦃G,L1⦄ ⊢ T1 :[a,h] U → ∀T2. ⦃G,L1⦄ ⊢ T1 ➡[h] T2 →
-      ∀L2. ⦃G,L1⦄ ⊢ ➡[h] L2 → ⦃G,L2⦄ ⊢ T2 :[a,h] U.
-#a #h #G #L1 #T1 #U #H #T2 #HT12 #L2 #HL12
+lemma nta_cpr_conf_lpr (h) (a) (G):
+      ∀L1,T1,U. ⦃G,L1⦄ ⊢ T1 :[h,a] U → ∀T2. ⦃G,L1⦄ ⊢ T1 ➡[h] T2 →
+      ∀L2. ⦃G,L1⦄ ⊢ ➡[h] L2 → ⦃G,L2⦄ ⊢ T2 :[h,a] U.
+#h #a #G #L1 #T1 #U #H #T2 #HT12 #L2 #HL12
 /3 width=6 by cnv_cpm_trans_lpr, cpm_cast/
 qed-.
 
 (* Basic_1: uses: ty3_sred_pr2 ty3_sred_pr0 *)
-lemma nta_cpr_conf (a) (h) (G) (L):
-      ∀T1,U. ⦃G,L⦄ ⊢ T1 :[a,h] U →
-      ∀T2. ⦃G,L⦄ ⊢ T1 ➡[h] T2 → ⦃G,L⦄ ⊢ T2 :[a,h] U.
-#a #h #G #L #T1 #U #H #T2 #HT12
+lemma nta_cpr_conf (h) (a) (G) (L):
+      ∀T1,U. ⦃G,L⦄ ⊢ T1 :[h,a] U →
+      ∀T2. ⦃G,L⦄ ⊢ T1 ➡[h] T2 → ⦃G,L⦄ ⊢ T2 :[h,a] U.
+#h #a #G #L #T1 #U #H #T2 #HT12
 /3 width=6 by cnv_cpm_trans, cpm_cast/
 qed-.
 
 (* Note: this is the preservation property *)
 (* Basic_1: uses: ty3_sred_pr3 ty3_sred_pr1 *)
-lemma nta_cprs_conf (a) (h) (G) (L):
-      ∀T1,U. ⦃G,L⦄ ⊢ T1 :[a,h] U →
-      ∀T2. ⦃G,L⦄ ⊢ T1 ➡*[h] T2 → ⦃G,L⦄ ⊢ T2 :[a,h] U.
-#a #h #G #L #T1 #U #H #T2 #HT12
+lemma nta_cprs_conf (h) (a) (G) (L):
+      ∀T1,U. ⦃G,L⦄ ⊢ T1 :[h,a] U →
+      ∀T2. ⦃G,L⦄ ⊢ T1 ➡*[h] T2 → ⦃G,L⦄ ⊢ T2 :[h,a] U.
+#h #a #G #L #T1 #U #H #T2 #HT12
 /3 width=6 by cnv_cpms_trans, cpms_cast/
 qed-.
 
 (* Basic_1: uses: ty3_cred_pr2 *)
-lemma nta_lpr_conf (a) (h) (G):
-      ∀L1,T,U. ⦃G,L1⦄ ⊢ T :[a,h] U →
-      ∀L2. ⦃G,L1⦄ ⊢ ➡[h] L2 → ⦃G,L2⦄ ⊢ T :[a,h] U.
-#a #h #G #L1 #T #U #HTU #L2 #HL12
+lemma nta_lpr_conf (h) (a) (G):
+      ∀L1,T,U. ⦃G,L1⦄ ⊢ T :[h,a] U →
+      ∀L2. ⦃G,L1⦄ ⊢ ➡[h] L2 → ⦃G,L2⦄ ⊢ T :[h,a] U.
+#h #a #G #L1 #T #U #HTU #L2 #HL12
 /2 width=3 by cnv_lpr_trans/
 qed-.
 
 (* Basic_1: uses: ty3_cred_pr3 *)
-lemma nta_lprs_conf (a) (h) (G):
-      ∀L1,T,U. ⦃G,L1⦄ ⊢ T :[a,h] U →
-      ∀L2. ⦃G,L1⦄ ⊢ ➡*[h] L2 → ⦃G,L2⦄ ⊢ T :[a,h] U.
-#a #h #G #L1 #T #U #HTU #L2 #HL12
+lemma nta_lprs_conf (h) (a) (G):
+      ∀L1,T,U. ⦃G,L1⦄ ⊢ T :[h,a] U →
+      ∀L2. ⦃G,L1⦄ ⊢ ➡*[h] L2 → ⦃G,L2⦄ ⊢ T :[h,a] U.
+#h #a #G #L1 #T #U #HTU #L2 #HL12
 /2 width=3 by cnv_lprs_trans/
 qed-.
 
 (* Inversion lemmas based on preservation ***********************************)
 
-lemma nta_inv_ldef_sn (a) (h) (G) (K) (V):
-      ∀X2. ⦃G,K.ⓓV⦄ ⊢ #0 :[a,h] X2 →
-      ∃∃W,U. ⦃G,K⦄ ⊢ V :[a,h] W & ⬆*[1] W ≘ U & ⦃G,K.ⓓV⦄ ⊢ U ⬌*[h] X2 & ⦃G,K.ⓓV⦄ ⊢ X2 ![a,h].
-#a #h #G #Y #X #X2 #H
+lemma nta_inv_ldef_sn (h) (a) (G) (K) (V):
+      ∀X2. ⦃G,K.ⓓV⦄ ⊢ #0 :[h,a] X2 →
+      ∃∃W,U. ⦃G,K⦄ ⊢ V :[h,a] W & ⬆*[1] W ≘ U & ⦃G,K.ⓓV⦄ ⊢ U ⬌*[h] X2 & ⦃G,K.ⓓV⦄ ⊢ X2 ![h,a].
+#h #a #G #Y #X #X2 #H
 elim (cnv_inv_cast … H) -H #X1 #HX2 #H1 #HX21 #H2
 elim (cnv_inv_zero … H1) -H1 #Z #K #V #HV #H destruct
 elim (cpms_inv_delta_sn … H2) -H2 *
@@ -112,10 +111,10 @@ elim (cpms_inv_delta_sn … H2) -H2 *
 ]
 qed-.
 
-lemma nta_inv_lref_sn (a) (h) (G) (L):
-      ∀X2,i. ⦃G,L⦄ ⊢ #↑i :[a,h] X2 →
-      ∃∃I,K,T2,U2. ⦃G,K⦄ ⊢ #i :[a,h] T2 & ⬆*[1] T2 ≘ U2 & ⦃G,K.ⓘ{I}⦄ ⊢ U2 ⬌*[h] X2 & ⦃G,K.ⓘ{I}⦄ ⊢ X2 ![a,h] & L = K.ⓘ{I}.
-#a #h #G #L #X2 #i #H
+lemma nta_inv_lref_sn (h) (a) (G) (L):
+      ∀X2,i. ⦃G,L⦄ ⊢ #↑i :[h,a] X2 →
+      ∃∃I,K,T2,U2. ⦃G,K⦄ ⊢ #i :[h,a] T2 & ⬆*[1] T2 ≘ U2 & ⦃G,K.ⓘ{I}⦄ ⊢ U2 ⬌*[h] X2 & ⦃G,K.ⓘ{I}⦄ ⊢ X2 ![h,a] & L = K.ⓘ{I}.
+#h #a #G #L #X2 #i #H
 elim (cnv_inv_cast … H) -H #X1 #HX2 #H1 #HX21 #H2
 elim (cnv_inv_lref … H1) -H1 #I #K #Hi #H destruct
 elim (cpms_inv_lref_sn … H2) -H2 *
@@ -125,11 +124,11 @@ elim (cpms_inv_lref_sn … H2) -H2 *
 ]
 qed-.
 
-lemma nta_inv_lref_sn_drops_cnv (a) (h) (G) (L): 
-      ∀X2, i. ⦃G,L⦄ ⊢ #i :[a,h] X2 →
-      ∨∨ ∃∃K,V,W,U. ⬇*[i] L ≘ K.ⓓV & ⦃G,K⦄ ⊢ V :[a,h] W & ⬆*[↑i] W ≘ U & ⦃G,L⦄ ⊢ U ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 ![a,h]
-       | ∃∃K,W,U. ⬇*[i] L ≘ K. ⓛW & ⦃G,K⦄ ⊢ W ![a,h] & ⬆*[↑i] W ≘ U & ⦃G,L⦄ ⊢ U ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 ![a,h].
-#a #h #G #L #X2 #i #H
+lemma nta_inv_lref_sn_drops_cnv (h) (a) (G) (L): 
+      ∀X2,i. ⦃G,L⦄ ⊢ #i :[h,a] X2 →
+      ∨∨ ∃∃K,V,W,U. ⬇*[i] L ≘ K.ⓓV & ⦃G,K⦄ ⊢ V :[h,a] W & ⬆*[↑i] W ≘ U & ⦃G,L⦄ ⊢ U ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 ![h,a]
+       | ∃∃K,W,U. ⬇*[i] L ≘ K. ⓛW & ⦃G,K⦄ ⊢ W ![h,a] & ⬆*[↑i] W ≘ U & ⦃G,L⦄ ⊢ U ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 ![h,a].
+#h #a #G #L #X2 #i #H
 elim (cnv_inv_cast … H) -H #X1 #HX2 #H1 #HX21 #H2
 elim (cnv_inv_lref_drops … H1) -H1 #I #K #V #HLK #HV
 elim (cpms_inv_lref1_drops … H2) -H2 *
@@ -146,10 +145,10 @@ elim (cpms_inv_lref1_drops … H2) -H2 *
 ]
 qed-.
 
-lemma nta_inv_bind_sn_cnv (a) (h) (p) (I) (G) (K) (X2):
-      ∀V,T. ⦃G,K⦄ ⊢ ⓑ{p,I}V.T :[a,h] X2 →
-      ∃∃U. ⦃G,K⦄ ⊢ V ![a,h] & ⦃G,K.ⓑ{I}V⦄ ⊢ T :[a,h] U & ⦃G,K⦄ ⊢ ⓑ{p,I}V.U ⬌*[h] X2 & ⦃G,K⦄ ⊢ X2 ![a,h].
-#a #h #p * #G #K #X2 #V #T #H
+lemma nta_inv_bind_sn_cnv (h) (a) (p) (I) (G) (K) (X2):
+      ∀V,T. ⦃G,K⦄ ⊢ ⓑ{p,I}V.T :[h,a] X2 →
+      ∃∃U. ⦃G,K⦄ ⊢ V ![h,a] & ⦃G,K.ⓑ{I}V⦄ ⊢ T :[h,a] U & ⦃G,K⦄ ⊢ ⓑ{p,I}V.U ⬌*[h] X2 & ⦃G,K⦄ ⊢ X2 ![h,a].
+#h #a #p * #G #K #X2 #V #T #H
 elim (cnv_inv_cast … H) -H #X1 #HX2 #H1 #HX21 #H2
 elim (cnv_inv_bind … H1) -H1 #HV #HT
 [ elim (cpms_inv_abbr_sn_dx … H2) -H2 *
@@ -165,25 +164,19 @@ qed-.
 
 (* Basic_1: uses: ty3_gen_appl *)
 lemma nta_inv_appl_sn (h) (G) (L) (X2):
-      ∀V,T. ⦃G,L⦄ ⊢ ⓐV.T :[h] X2 →
-      ∃∃p,W,U. ⦃G,L⦄ ⊢ V :[h] W & ⦃G,L⦄ ⊢ T :[h] ⓛ{p}W.U & ⦃G,L⦄ ⊢ ⓐV.ⓛ{p}W.U ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 ![h].
+      ∀V,T. ⦃G,L⦄ ⊢ ⓐV.T :[h,𝟐] X2 →
+      ∃∃p,W,U. ⦃G,L⦄ ⊢ V :[h,𝟐] W & ⦃G,L⦄ ⊢ T :[h,𝟐] ⓛ{p}W.U & ⦃G,L⦄ ⊢ ⓐV.ⓛ{p}W.U ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 ![h,𝟐].
 #h #G #L #X2 #V #T #H
 elim (cnv_inv_cast … H) -H #X #HX2 #H1 #HX2 #H2
-elim (cnv_inv_appl … H1) * [ | #n ] #p #W #U #Hn #HV #HT #HVW #HTU
-[ lapply (cnv_cpms_trans … HT … HTU) #H
-  elim (cnv_inv_bind … H) -H #_ #HU
-  elim (cnv_fwd_cpm_SO … HU) #U0 #HU0 -HU
-  lapply (cpms_step_dx … HTU 1 (ⓛ{p}W.U0) ?) -HTU [ /2 width=1 by cpm_bind/ ] #HTU
-| lapply (le_n_O_to_eq n ?) [ /3 width=1 by le_S_S_to_le/ ] -Hn #H destruct
-]
+elim (cnv_inv_appl … H1) #n #p #W #U #H <H -n #HV #HT #HVW #HTU
 /5 width=11 by cnv_cpms_nta, cnv_cpms_conf_eq, cpcs_cprs_div, cpms_appl_dx, ex4_3_intro/
 qed-.
 
 (* Basic_2A1: uses: nta_fwd_pure1 *)
 lemma nta_inv_pure_sn_cnv (h) (G) (L) (X2):
-                          ∀V,T. ⦃G,L⦄ ⊢ ⓐV.T :*[h] X2 →
-                          ∨∨ ∃∃p,W,U. ⦃G,L⦄ ⊢ V :*[h] W & ⦃G,L⦄ ⊢ T :*[h] ⓛ{p}W.U & ⦃G,L⦄ ⊢ ⓐV.ⓛ{p}W.U ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 !*[h]
-                           | ∃∃U. ⦃G,L⦄ ⊢ T :*[h] U & ⦃G,L⦄ ⊢ ⓐV.U !*[h] & ⦃G,L⦄ ⊢ ⓐV.U ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 !*[h].
+      ∀V,T. ⦃G,L⦄ ⊢ ⓐV.T :[h,𝛚] X2 →
+      ∨∨ ∃∃p,W,U. ⦃G,L⦄ ⊢ V :[h,𝛚] W & ⦃G,L⦄ ⊢ T :[h,𝛚] ⓛ{p}W.U & ⦃G,L⦄ ⊢ ⓐV.ⓛ{p}W.U ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 ![h,𝛚]
+       | ∃∃U. ⦃G,L⦄ ⊢ T :[h,𝛚] U & ⦃G,L⦄ ⊢ ⓐV.U ![h,𝛚] & ⦃G,L⦄ ⊢ ⓐV.U ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 ![h,𝛚].
 #h #G #L #X2 #V #T #H
 elim (cnv_inv_cast … H) -H #X1 #HX2 #H1 #HX21 #H
 elim (cnv_inv_appl … H1) * [| #n ] #p #W0 #T0 #Hn #HV #HT #HW0 #HT0
@@ -207,10 +200,10 @@ elim (cnv_inv_appl … H1) * [| #n ] #p #W0 #T0 #Hn #HV #HT #HW0 #HT0
 qed-.
 
 (* Basic_2A1: uses: nta_inv_cast1 *)
-lemma nta_inv_cast_sn (a) (h) (G) (L) (X2):
-      ∀U,T. ⦃G,L⦄ ⊢ ⓝU.T :[a,h] X2 →
-      ∧∧ ⦃G,L⦄ ⊢ T :[a,h] U & ⦃G,L⦄ ⊢ U ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 ![a,h].
-#a #h #G #L #X2 #U #T #H
+lemma nta_inv_cast_sn (h) (a) (G) (L) (X2):
+      ∀U,T. ⦃G,L⦄ ⊢ ⓝU.T :[h,a] X2 →
+      ∧∧ ⦃G,L⦄ ⊢ T :[h,a] U & ⦃G,L⦄ ⊢ U ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 ![h,a].
+#h #a #G #L #X2 #U #T #H
 elim (cnv_inv_cast … H) -H #X0 #HX2 #H1 #HX20 #H2
 elim (cnv_inv_cast … H1) #X #HU #HT #HUX #HTX
 elim (cpms_inv_cast1 … H2) -H2 [ * || * ]
@@ -226,10 +219,10 @@ elim (cpms_inv_cast1 … H2) -H2 [ * || * ]
 qed-.
 
 (* Basic_1: uses: ty3_gen_cast *)
-lemma nta_inv_cast_sn_old (a) (h) (G) (L) (X2):
-      ∀T0,T1. ⦃G,L⦄ ⊢ ⓝT1.T0 :[a,h] X2 →
-      ∃∃T2. ⦃G,L⦄ ⊢ T0 :[a,h] T1 & ⦃G,L⦄ ⊢ T1 :[a,h] T2 & ⦃G,L⦄ ⊢ ⓝT2.T1 ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 ![a,h].
-#a #h #G #L #X2 #T0 #T1 #H
+lemma nta_inv_cast_sn_old (h) (a) (G) (L) (X2):
+      ∀T0,T1. ⦃G,L⦄ ⊢ ⓝT1.T0 :[h,a] X2 →
+      ∃∃T2. ⦃G,L⦄ ⊢ T0 :[h,a] T1 & ⦃G,L⦄ ⊢ T1 :[h,a] T2 & ⦃G,L⦄ ⊢ ⓝT2.T1 ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 ![h,a].
+#h #a #G #L #X2 #T0 #T1 #H
 elim (cnv_inv_cast … H) -H #X0 #HX2 #H1 #HX20 #H2
 elim (cnv_inv_cast … H1) #X #HT1 #HT0 #HT1X #HT0X
 elim (cpms_inv_cast1 … H2) -H2 [ * || * ]
@@ -248,12 +241,12 @@ elim (cpms_inv_cast1 … H2) -H2 [ * || * ]
 qed-.
 
 (* Basic_1: uses: ty3_gen_lift *)
-(* Note: "⦃G,L⦄ ⊢ U2 ⬌*[h] X2" can be "⦃G,L⦄ ⊢ X2 ➡*[h] U2" *)
-lemma nta_inv_lifts_sn (a) (h) (G):
-      ∀L,T2,X2. ⦃G,L⦄ ⊢ T2 :[a,h] X2 →
+(* Note: "⦃G, L⦄ ⊢ U2 ⬌*[h] X2" can be "⦃G, L⦄ ⊢ X2 ➡*[h] U2" *)
+lemma nta_inv_lifts_sn (h) (a) (G):
+      ∀L,T2,X2. ⦃G,L⦄ ⊢ T2 :[h,a] X2 →
       ∀b,f,K. ⬇*[b,f] L ≘ K → ∀T1. ⬆*[f] T1 ≘ T2 →
-      ∃∃U1,U2. ⦃G,K⦄ ⊢ T1 :[a,h] U1 & ⬆*[f] U1 ≘ U2 & ⦃G,L⦄ ⊢ U2 ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 ![a,h].
-#a #h #G #L #T2 #X2 #H #b #f #K #HLK #T1 #HT12
+      ∃∃U1,U2. ⦃G,K⦄ ⊢ T1 :[h,a] U1 & ⬆*[f] U1 ≘ U2 & ⦃G,L⦄ ⊢ U2 ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 ![h,a].
+#h #a #G #L #T2 #X2 #H #b #f #K #HLK #T1 #HT12
 elim (cnv_inv_cast … H) -H #U2 #HX2 #HT2 #HXU2 #HTU2
 lapply (cnv_inv_lifts … HT2 … HLK … HT12) -HT2 #HT1
 elim (cpms_inv_lifts_sn … HTU2 … HLK … HT12) -T2 -HLK #U1 #HU12 #HTU1
@@ -263,9 +256,9 @@ qed-.
 (* Forward lemmas based on preservation *************************************)
 
 (* Basic_1: was: ty3_unique *)
-theorem nta_mono (a) (h) (G) (L) (T):
-        ∀U1. ⦃G,L⦄ ⊢ T :[a,h] U1 → ∀U2. ⦃G,L⦄ ⊢ T :[a,h] U2 → ⦃G,L⦄  ⊢ U1 ⬌*[h] U2.
-#a #h #G #L #T #U1 #H1 #U2 #H2
+theorem nta_mono (h) (a) (G) (L) (T):
+        ∀U1. ⦃G,L⦄ ⊢ T :[h,a] U1 → ∀U2. ⦃G,L⦄ ⊢ T :[h,a] U2 → ⦃G,L⦄  ⊢ U1 ⬌*[h] U2.
+#h #a #G #L #T #U1 #H1 #U2 #H2
 elim (cnv_inv_cast … H1) -H1 #X1 #_ #_ #HUX1 #HTX1
 elim (cnv_inv_cast … H2) -H2 #X2 #_ #HT #HUX2 #HTX2
 lapply (cnv_cpms_conf_eq … HT … HTX1 … HTX2) -T #HX12
@@ -275,10 +268,10 @@ qed-.
 (* Advanced properties ******************************************************)
 
 (* Basic_1: uses: ty3_sconv_pc3 *)
-lemma nta_cpcs_bi (a) (h) (G) (L):
-      ∀T1,U1. ⦃G,L⦄ ⊢ T1 :[a,h] U1 → ∀T2,U2. ⦃G,L⦄ ⊢ T2 :[a,h] U2 →
+lemma nta_cpcs_bi (h) (a) (G) (L):
+      ∀T1,U1. ⦃G,L⦄ ⊢ T1 :[h,a] U1 → ∀T2,U2. ⦃G,L⦄ ⊢ T2 :[h,a] U2 →
       ⦃G,L⦄ ⊢ T1 ⬌*[h] T2 → ⦃G,L⦄ ⊢ U1 ⬌*[h] U2.
-#a #h #G #L #T1 #U1 #HTU1 #T2 #U2 #HTU2 #HT12
+#h #a #G #L #T1 #U1 #HTU1 #T2 #U2 #HTU2 #HT12
 elim (cpcs_inv_cprs … HT12) -HT12 #T0 #HT10 #HT02
 /3 width=6 by nta_mono, nta_cprs_conf/
 qed-.
index cbcd378a4d774ce1a01444150e5d0cccc5a254e8..383742b7ad93beb5d44e6a3e7d4598199e2344f5 100644 (file)
@@ -20,43 +20,43 @@ include "basic_2/dynamic/nta_preserve.ma".
 (* Properties based on type equivalence and preservation *******************)
 
 (* Basic_1: uses: ty3_tred *)
-lemma nta_cprs_trans (a) (h) (G) (L):
-      ∀T,U1. ⦃G,L⦄ ⊢ T :[a,h] U1 → ∀U2.  ⦃G,L⦄ ⊢ U1 ➡*[h] U2 → ⦃G,L⦄ ⊢ T :[a,h] U2.
-#a #h #G #L #T #U1 #H #U2 #HU12
+lemma nta_cprs_trans (h) (a) (G) (L):
+      ∀T,U1. ⦃G,L⦄ ⊢ T :[h,a] U1 → ∀U2. ⦃G,L⦄ ⊢ U1 ➡*[h] U2 → ⦃G,L⦄ ⊢ T :[h,a] U2.
+#h #a #G #L #T #U1 #H #U2 #HU12
 /4 width=4 by nta_conv_cnv, nta_fwd_cnv_dx, cnv_cpms_trans, cpcs_cprs_dx/
 qed-.
 
 (* Basic_1: uses: ty3_sred_back *)
-lemma cprs_nta_trans (a) (h) (G) (L):
-      ∀T1,U0. ⦃G,L⦄ ⊢ T1 :[a,h] U0 → ∀T2.  ⦃G,L⦄ ⊢ T1 ➡*[h] T2 →
-      ∀U. ⦃G,L⦄ ⊢ T2 :[a,h] U →  ⦃G,L⦄ ⊢ T1 :[a,h] U.
-#a #h #G #L #T1 #U0 #HT1 #T2 #HT12 #U #H
+lemma cprs_nta_trans (h) (a) (G) (L):
+      ∀T1,U0. ⦃G,L⦄ ⊢ T1 :[h,a] U0 → ∀T2. ⦃G,L⦄ ⊢ T1 ➡*[h] T2 →
+      ∀U. ⦃G,L⦄ ⊢ T2 :[h,a] U →  ⦃G,L⦄ ⊢ T1 :[h,a] U.
+#h #a #G #L #T1 #U0 #HT1 #T2 #HT12 #U #H
 lapply (nta_cprs_conf … HT1 … HT12) -HT12 #HT2
 /4 width=6 by nta_mono, nta_conv_cnv, nta_fwd_cnv_dx/
 qed-.
 
-lemma cprs_nta_trans_cnv (a) (h) (G) (L):
-      ∀T1. ⦃G,L⦄ ⊢ T1 ![a,h] → ∀T2.  ⦃G,L⦄ ⊢ T1 ➡*[h] T2 →
-      ∀U. ⦃G,L⦄ ⊢ T2 :[a,h] U →  ⦃G,L⦄ ⊢ T1 :[a,h] U.
-#a #h #G #L #T1 #HT1 #T2 #HT12 #U #H
+lemma cprs_nta_trans_cnv (h) (a) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ T1 ![h,a] → ∀T2. ⦃G,L⦄ ⊢ T1 ➡*[h] T2 →
+      ∀U. ⦃G,L⦄ ⊢ T2 :[h,a] U → ⦃G,L⦄ ⊢ T1 :[h,a] U.
+#h #a #G #L #T1 #HT1 #T2 #HT12 #U #H
 elim (cnv_nta_sn … HT1) -HT1 #U0 #HT1
 /2 width=3 by cprs_nta_trans/
 qed-.
 
 (* Basic_1: uses: ty3_sconv *)
-lemma nta_cpcs_conf (a) (h) (G) (L):
-      ∀T1,U. ⦃G,L⦄ ⊢ T1 :[a,h] U → ∀T2.  ⦃G,L⦄ ⊢ T1 ⬌*[h] T2 →
-      ∀U0. ⦃G,L⦄ ⊢ T2 :[a,h] U0 →  ⦃G,L⦄ ⊢ T2 :[a,h] U.
-#a #h #G #L #T1 #U #HT1 #T2 #HT12 #U0 #HT2
+lemma nta_cpcs_conf (h) (a) (G) (L):
+      ∀T1,U. ⦃G,L⦄ ⊢ T1 :[h,a] U → ∀T2. ⦃G,L⦄ ⊢ T1 ⬌*[h] T2 →
+      ∀U0. ⦃G,L⦄ ⊢ T2 :[h,a] U0 → ⦃G,L⦄ ⊢ T2 :[h,a] U.
+#h #a #G #L #T1 #U #HT1 #T2 #HT12 #U0 #HT2
 elim (cpcs_inv_cprs … HT12) -HT12 #T0 #HT10 #HT02
 /3 width=5 by  cprs_nta_trans, nta_cprs_conf/
 qed-.
 
 (* Note: type preservation by valid r-equivalence *)
-lemma nta_cpcs_conf_cnv (a) (h) (G) (L):
-      ∀T1,U. ⦃G,L⦄ ⊢ T1 :[a,h] U →
-      ∀T2.  ⦃G,L⦄ ⊢ T1 ⬌*[h] T2 → ⦃G,L⦄ ⊢ T2 ![a,h] →  ⦃G,L⦄ ⊢ T2 :[a,h] U.
-#a #h #G #L #T1 #U #HT1 #T2 #HT12 #HT2
+lemma nta_cpcs_conf_cnv (h) (a) (G) (L):
+      ∀T1,U. ⦃G,L⦄ ⊢ T1 :[h,a] U →
+      ∀T2. ⦃G,L⦄ ⊢ T1 ⬌*[h] T2 → ⦃G,L⦄ ⊢ T2 ![h,a] → ⦃G,L⦄ ⊢ T2 :[h,a] U.
+#h #a #G #L #T1 #U #HT1 #T2 #HT12 #HT2
 elim (cnv_nta_sn … HT2) -HT2 #U0 #HT2
 /2 width=3 by nta_cpcs_conf/
 qed-.
index 1a307432d59574dd8c8172094a5b4762ca002fa0..23a5dc473236b2b342ac50508cce85d3176ce5a8 100644 (file)
@@ -1,51 +1,3 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/notation/relations/prednormal_3.ma".
-include "basic_2/reduction/cpr.ma".
-
-(* NORMAL TERMS FOR CONTEXT-SENSITIVE REDUCTION *****************************)
-
-definition cnr: relation3 genv lenv term ≝ λG,L. NF … (cpr G L) (eq …).
-
-interpretation
-   "normality for context-sensitive reduction (term)"
-   'PRedNormal G L T = (cnr G L T).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma cnr_inv_delta: ∀G,L,K,V,i. ⬇[i] L ≡ K.ⓓV → ⦃G, L⦄ ⊢ ➡ 𝐍⦃#i⦄ → ⊥.
-#G #L #K #V #i #HLK #H
-elim (lift_total V 0 (i+1)) #W #HVW
-lapply (H W ?) -H [ /3 width=6 by cpr_delta/ ] -HLK #H destruct
-elim (lift_inv_lref2_be … HVW) -HVW /2 width=1 by ylt_inj/
-qed-.
-
-lemma cnr_inv_abst: ∀a,G,L,V,T. ⦃G, L⦄ ⊢ ➡ 𝐍⦃ⓛ{a}V.T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃V⦄ ∧ ⦃G, L.ⓛV⦄ ⊢ ➡ 𝐍⦃T⦄.
-#a #G #L #V1 #T1 #HVT1 @conj
-[ #V2 #HV2 lapply (HVT1 (ⓛ{a}V2.T1) ?) -HVT1 /2 width=2 by cpr_pair_sn/ -HV2 #H destruct //
-| #T2 #HT2 lapply (HVT1 (ⓛ{a}V1.T2) ?) -HVT1 /2 width=2 by cpr_bind/ -HT2 #H destruct //
-]
-qed-.
-
-lemma cnr_inv_abbr: ∀G,L,V,T. ⦃G, L⦄ ⊢ ➡ 𝐍⦃-ⓓV.T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃V⦄ ∧ ⦃G, L.ⓓV⦄ ⊢ ➡ 𝐍⦃T⦄.
-#G #L #V1 #T1 #HVT1 @conj
-[ #V2 #HV2 lapply (HVT1 (-ⓓV2.T1) ?) -HVT1 /2 width=2 by cpr_pair_sn/ -HV2 #H destruct //
-| #T2 #HT2 lapply (HVT1 (-ⓓV1.T2) ?) -HVT1 /2 width=2 by cpr_bind/ -HT2 #H destruct //
-]
-qed-.
-
 lemma cnr_inv_zeta: ∀G,L,V,T. ⦃G, L⦄ ⊢ ➡ 𝐍⦃+ⓓV.T⦄ → ⊥.
 #G #L #V #T #H elim (is_lift_dec T 0 1)
 [ * #U #HTU
@@ -58,57 +10,8 @@ lemma cnr_inv_zeta: ∀G,L,V,T. ⦃G, L⦄ ⊢ ➡ 𝐍⦃+ⓓV.T⦄ → ⊥.
 ]
 qed-.
 
-lemma cnr_inv_appl: ∀G,L,V,T. ⦃G, L⦄ ⊢ ➡ 𝐍⦃ⓐV.T⦄ → ∧∧ ⦃G, L⦄ ⊢ ➡ 𝐍⦃V⦄ & ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄ & 𝐒⦃T⦄.
-#G #L #V1 #T1 #HVT1 @and3_intro
-[ #V2 #HV2 lapply (HVT1 (ⓐV2.T1) ?) -HVT1 /2 width=1 by cpr_pair_sn/ -HV2 #H destruct //
-| #T2 #HT2 lapply (HVT1 (ⓐV1.T2) ?) -HVT1 /2 width=1 by cpr_flat/ -HT2 #H destruct //
-| generalize in match HVT1; -HVT1 elim T1 -T1 * // #a * #W1 #U1 #_ #_ #H
-  [ elim (lift_total V1 0 1) #V2 #HV12
-    lapply (H (ⓓ{a}W1.ⓐV2.U1) ?) -H /3 width=3 by tpr_cpr, cpr_theta/ -HV12 #H destruct
-  | lapply (H (ⓓ{a}ⓝW1.V1.U1) ?) -H /3 width=1 by tpr_cpr, cpr_beta/ #H destruct
-]
-qed-.
-
-lemma cnr_inv_eps: ∀G,L,V,T. ⦃G, L⦄ ⊢ ➡ 𝐍⦃ⓝV.T⦄ → ⊥.
-#G #L #V #T #H lapply (H T ?) -H
-/2 width=4 by cpr_eps, discr_tpair_xy_y/
-qed-.
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was: nf2_sort *)
-lemma cnr_sort: ∀G,L,s. ⦃G, L⦄ ⊢ ➡ 𝐍⦃⋆s⦄.
-#G #L #s #X #H
->(cpr_inv_sort1 … H) //
-qed.
-
 lemma cnr_lref_free: ∀G,L,i. |L| ≤ i → ⦃G, L⦄ ⊢ ➡ 𝐍⦃#i⦄.
 #G #L #i #Hi #X #H elim (cpr_inv_lref1 … H) -H // *
 #K #V1 #V2 #HLK lapply (drop_fwd_length_lt2 … HLK) -HLK
 #H elim (lt_refl_false i) /2 width=3 by lt_to_le_to_lt/
 qed.
-
-(* Basic_1: was only: nf2_csort_lref *)
-lemma cnr_lref_atom: ∀G,L,i. ⬇[i] L ≡ ⋆ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃#i⦄.
-#G #L #i #HL @cnr_lref_free >(drop_fwd_length … HL) -HL //
-qed.
-
-(* Basic_1: was: nf2_abst *)
-lemma cnr_abst: ∀a,G,L,W,T. ⦃G, L⦄ ⊢ ➡ 𝐍⦃W⦄ → ⦃G, L.ⓛW⦄ ⊢ ➡ 𝐍⦃T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃ⓛ{a}W.T⦄.
-#a #G #L #W #T #HW #HT #X #H
-elim (cpr_inv_abst1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct
->(HW … HW0) -W0 >(HT … HT0) -T0 //
-qed.
-
-(* Basic_1: was only: nf2_appl_lref *)
-lemma cnr_appl_simple: ∀G,L,V,T. ⦃G, L⦄ ⊢ ➡ 𝐍⦃V⦄ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄ → 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃ⓐV.T⦄.
-#G #L #V #T #HV #HT #HS #X #H
-elim (cpr_inv_appl1_simple … H) -H // #V0 #T0 #HV0 #HT0 #H destruct
->(HV … HV0) -V0 >(HT … HT0) -T0 //
-qed.
-
-(* Basic_1: was: nf2_dec *)
-axiom cnr_dec: ∀G,L,T1. ⦃G, L⦄ ⊢ ➡ 𝐍⦃T1⦄ ∨
-               ∃∃T2. ⦃G, L⦄ ⊢ T1 ➡ T2 & (T1 = T2 → ⊥).
-
-(* Basic_1: removed theorems 1: nf2_abst_shift *)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cnr/cnr_lift.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cnr/cnr_lift.etc
deleted file mode 100644 (file)
index eef9aef..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/reduction/cpr_lift.ma".
-include "basic_2/reduction/cnr.ma".
-
-(* NORMAL TERMS FOR CONTEXT-SENSITIVE REDUCTION *****************************)
-
-(* Advanced properties ******************************************************)
-
-(* Basic_1: was: nf2_lref_abst *)
-lemma cnr_lref_abst: ∀G,L,K,V,i. ⬇[i] L ≡ K. ⓛV → ⦃G, L⦄ ⊢ ➡ 𝐍⦃#i⦄.
-#G #L #K #V #i #HLK #X #H
-elim (cpr_inv_lref1 … H) -H // *
-#K0 #V1 #V2 #HLK0 #_ #_
-lapply (drop_mono … HLK … HLK0) -L #H destruct
-qed.
-
-(* Relocation properties ****************************************************)
-
-(* Basic_1: was: nf2_lift *)
-lemma cnr_lift: ∀G,L0,L,T,T0,c,l,k. ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄ →
-                ⬇[c, l, k] L0 ≡ L → ⬆[l, k] T ≡ T0 → ⦃G, L0⦄ ⊢ ➡ 𝐍⦃T0⦄.
-#G #L0 #L #T #T0 #c #l #k #HLT #HL0 #HT0 #X #H
-elim (cpr_inv_lift1 … H … HL0 … HT0) -L0 #T1 #HT10 #HT1
-<(HLT … HT1) in HT0; -L #HT0
->(lift_mono … HT10 … HT0) -T1 -X //
-qed.
-
-(* Note: this was missing in basic_1 *)
-lemma cnr_inv_lift: ∀G,L0,L,T,T0,c,l,k. ⦃G, L0⦄ ⊢ ➡ 𝐍⦃T0⦄ →
-                    ⬇[c, l, k] L0 ≡ L → ⬆[l, k] T ≡ T0 → ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄.
-#G #L0 #L #T #T0 #c #l #k #HLT0 #HL0 #HT0 #X #H
-elim (lift_total X l k) #X0 #HX0
-lapply (cpr_lift … H … HL0 … HT0 … HX0) -L #HTX0
->(HLT0 … HTX0) in HX0; -L0 -X0 #H
->(lift_inj … H … HT0) -T0 -X -c -l -k //
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cnr/prednormal_3.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cnr/prednormal_3.etc
deleted file mode 100644 (file)
index a8806a1..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ ➡ 𝐍 break ⦃ term 46 T ⦄ )"
-   non associative with precedence 45
-   for @{ 'PRedNormal $G $L $T }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpre/cpre.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpre/cpre.etc
deleted file mode 100644 (file)
index d94fb6f..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/notation/relations/predeval_4.ma".
-include "basic_2/computation/cprs.ma".
-include "basic_2/computation/csx.ma".
-
-(* EVALUATION FOR CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS *************)
-
-definition cpre: relation4 genv lenv term term ≝
-                 λG,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 ∧ ⦃G, L⦄ ⊢ ➡ 𝐍⦃T2⦄.
-
-interpretation "evaluation for context-sensitive parallel reduction (term)"
-   'PRedEval G L T1 T2 = (cpre G L T1 T2).
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was just: nf2_sn3 *)
-lemma csx_cpre: ∀h,o,G,L,T1. ⦃G, L⦄ ⊢ ⬊*[h, o] T1 → ∃T2. ⦃G, L⦄ ⊢ T1 ➡* 𝐍⦃T2⦄.
-#h #o #G #L #T1 #H @(csx_ind … H) -T1
-#T1 #_ #IHT1 elim (cnr_dec G L T1) /3 width=3 by ex_intro, conj/
-* #T #H1T1 #H2T1 elim (IHT1 … H2T1) -IHT1 -H2T1 /2 width=2 by cpr_cpx/
-#T2 * /4 width=3 by cprs_strap2, ex_intro, conj/
-qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpre/cpre_cpre.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpre/cpre_cpre.etc
deleted file mode 100644 (file)
index 4fd4181..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/cprs_cprs.ma".
-include "basic_2/computation/cpre.ma".
-
-(* EVALUATION FOR CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS *************)
-
-(* Main properties *********************************************************)
-
-(* Basic_1: was: nf2_pr3_confluence *)
-theorem cpre_mono: ∀G,L,T,T1. ⦃G, L⦄ ⊢ T ➡* 𝐍⦃T1⦄ → ∀T2. ⦃G, L⦄ ⊢ T ➡* 𝐍⦃T2⦄ → T1 = T2.
-#G #L #T #T1 * #H1T1 #H2T1 #T2 * #H1T2 #H2T2
-elim (cprs_conf … H1T1 … H1T2) -T #T #HT1
->(cprs_inv_cnr1 … HT1 H2T1) -T1 #HT2
->(cprs_inv_cnr1 … HT2 H2T2) -T2 //
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpre/predeval_4.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpre/predeval_4.etc
deleted file mode 100644 (file)
index abf7b65..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 ➡ * 𝐍 ⦃ break term 46 T2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'PRedEval $G $L $T1 $T2 }.
index a51dba5d671847a033dacb2c67bed6de536f49ed..b20ba8ff81d54de03a5c2a7339dd379f87ebe831 100644 (file)
@@ -1,10 +1,3 @@
 (* Basic_1: was: pr3_pr1 *)
 lemma tprs_cprs: ∀G,L,T1,T2. ⦃G, ⋆⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ T1 ➡* T2.
 /2 width=3 by lsubr_cprs_trans/ qed.
-
-(* Basic_1: was: nf2_pr3_unfold *)
-lemma cprs_inv_cnr1: ∀G,L,T,U. ⦃G, L⦄ ⊢ T ➡* U → ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄ → T = U.
-#G #L #T #U #H @(cprs_ind_dx … H) -T //
-#T0 #T #H1T0 #_ #IHT #H2T0
-lapply (H2T0 … H1T0) -H1T0 #H destruct /2 width=1 by/
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnu.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnu.etc
new file mode 100644 (file)
index 0000000..19b1eaf
--- /dev/null
@@ -0,0 +1,61 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/notation/relations/preditnormal_4.ma".
+include "static_2/syntax/tueq.ma".
+include "basic_2/rt_transition/cpm.ma".
+
+(* NORMAL TERMS FOR T-UNUNBOUND RT-TRANSITION *******************************)
+
+definition cnu (h) (G) (L): predicate term ≝
+           λT1. ∀n,T2. ⦃G,L⦄ ⊢ T1 ➡[n,h] T2 → T1 ≅ T2.
+
+interpretation
+   "normality for t-unbound context-sensitive parallel rt-transition (term)"
+   'PRedITNormal h G L T = (cnu h G L T).
+
+(* Basic properties *********************************************************)
+
+lemma cnu_sort (h) (G) (L): ∀s. ⦃G,L⦄ ⊢ ⥲[h] 𝐍⦃⋆s⦄.
+#h #G #L #s1 #n #X #H
+elim (cpm_inv_sort1 … H) -H #H #_ destruct //
+qed.
+
+lemma cnu_ctop (h) (G): ∀i. ⦃G,⋆⦄ ⊢ ⥲[h] 𝐍⦃#i⦄.
+#h #G * [| #i ] #n #X #H
+[ elim (cpm_inv_zero1 … H) -H *
+  [ #H #_ destruct //
+  | #Y #X1 #X2 #_ #_ #H destruct
+  | #m #Y #X1 #X2 #_ #_ #H destruct
+  ]
+| elim (cpm_inv_lref1 … H) -H *
+  [ #H #_ destruct //
+  | #Z #Y #X0 #_ #_ #H destruct
+  ]
+]
+qed.
+
+lemma cnu_zero (h) (G) (L): ∀I. ⦃G,L.ⓤ{I}⦄ ⊢ ⥲[h] 𝐍⦃#0⦄.
+#h #G #L #I #n #X #H 
+elim (cpm_inv_zero1 … H) -H *
+[ #H #_ destruct //
+| #Y #X1 #X2 #_ #_ #H destruct
+| #m #Y #X1 #X2 #_ #_ #H destruct
+]
+qed.
+
+lemma cnu_gref (h) (G) (L): ∀l. ⦃G,L⦄ ⊢ ⥲[h] 𝐍⦃§l⦄.
+#h #G #L #l1 #n #X #H
+elim (cpm_inv_gref1 … H) -H #H #_ destruct //
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnu_cnr.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnu_cnr.etc
new file mode 100644 (file)
index 0000000..ce295d3
--- /dev/null
@@ -0,0 +1,37 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_transition/cnr.ma".
+include "basic_2/rt_transition/cnu.ma".
+
+(* NORMAL TERMS FOR T-UNUNBOUND RT-TRANSITION *******************************)
+
+(* Advanced properties with normal terms for r-transition *******************)
+
+lemma cnu_abst (h) (p) (G) (L):
+      ∀W. ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃W⦄ → ∀T.⦃G,L.ⓛW⦄ ⊢ ⥲[h] 𝐍⦃T⦄ → ⦃G,L⦄ ⊢ ⥲[h] 𝐍⦃ⓛ{p}W.T⦄.
+#h #p #G #L #W1 #HW1 #T1 #HT1 #n #X #H
+elim (cpm_inv_abst1 … H) -H #W2 #T2 #HW12 #HT12 #H destruct
+<(HW1 … HW12) -W2 /3 width=2 by tueq_bind/
+qed.
+
+lemma cnu_abbr_neg (h) (G) (L):
+      ∀V. ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃V⦄ → ∀T.⦃G,L.ⓓV⦄ ⊢ ⥲[h] 𝐍⦃T⦄ → ⦃G,L⦄ ⊢ ⥲[h] 𝐍⦃-ⓓV.T⦄.
+#h #G #L #V1 #HV1 #T1 #HT1 #n #X #H
+elim (cpm_inv_abbr1 … H) -H *
+[ #V2 #T2 #HV12 #HT12 #H destruct
+  <(HV1 … HV12) -V2 /3 width=2 by tueq_bind/
+| #X1 #_ #_ #H destruct
+]
+qed. 
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnu_cnr_simple.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnu_cnr_simple.etc
new file mode 100644 (file)
index 0000000..056c8e2
--- /dev/null
@@ -0,0 +1,29 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_transition/cpm_simple.ma".
+include "basic_2/rt_transition/cnr.ma".
+include "basic_2/rt_transition/cnu.ma".
+
+(* NORMAL TERMS FOR T-UNUNBOUND RT-TRANSITION *******************************)
+
+(* Advanced properties with simple terms and normal terms for r-transition **)
+
+lemma cnu_appl_simple (h) (G) (L):
+      ∀V,T. ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃V⦄ → ⦃G,L⦄ ⊢ ⥲[h] 𝐍⦃T⦄ → 𝐒⦃T⦄ → ⦃G,L⦄ ⊢ ⥲[h] 𝐍⦃ⓐV.T⦄.
+#h #G #L #V1 #T1 #HV1 #HT1 #HS #n #X #H
+elim (cpm_inv_appl1_simple … H HS) -H -HS #V2 #T2 #HV12 #HT12 #H destruct
+lapply (HV1 … HV12) -HV1 -HV12 #H destruct
+/3 width=2 by tueq_appl/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnu_cnu.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnu_cnu.etc
new file mode 100644 (file)
index 0000000..2bc4d3c
--- /dev/null
@@ -0,0 +1,29 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/tueq_tueq.ma".
+include "basic_2/rt_transition/cpm_tueq.ma".
+include "basic_2/rt_transition/cnu.ma".
+
+(* NORMAL TERMS FOR T-UNUNBOUND RT-TRANSITION *******************************)
+
+(* Advanced properties ******************************************************)
+
+lemma cnu_tueq_trans (h) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ ⥲[h] 𝐍⦃T1⦄ → ∀T2.T1 ≅ T2 → ⦃G,L⦄ ⊢ ⥲[h] 𝐍⦃T2⦄.
+#h #G #L #T1 #HT1 #T2 #HT12 #n #T0 #HT20
+@(tueq_canc_sn … HT12)
+elim (tueq_cpm_trans … HT12 … HT20) -T2 #T2 #HT13 #HT30
+/3 width=3 by tueq_trans/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnu_drops.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnu_drops.etc
new file mode 100644 (file)
index 0000000..97e13d2
--- /dev/null
@@ -0,0 +1,52 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/relocation/lifts_tueq.ma".
+include "basic_2/rt_transition/cpm_drops.ma".
+include "basic_2/rt_transition/cnu.ma".
+
+(* NORMAL TERMS FOR T-UNUNBOUND RT-TRANSITION *******************************)
+
+(* Advanced properties ******************************************************)
+
+lemma cnu_atom_drops (h) (b) (G) (L):
+      ∀i. ⬇*[b,𝐔❴i❵] L ≘ ⋆ → ⦃G,L⦄ ⊢ ⥲[h] 𝐍⦃#i⦄.
+#h #b #G #L #i #Hi #n #X #H
+elim (cpm_inv_lref1_drops … H) -H * [ // || #m ] #K #V1 #V2 #HLK
+lapply (drops_gen b … HLK) -HLK #HLK
+lapply (drops_mono … Hi … HLK) -L #H destruct
+qed.
+
+lemma cnu_unit_drops (h) (I) (G) (L):
+      ∀K,i. ⬇*[i] L ≘ K.ⓤ{I} → ⦃G,L⦄ ⊢ ⥲[h] 𝐍⦃#i⦄.
+#h #I #G #L #K #i #HLK #n #X #H
+elim (cpm_inv_lref1_drops … H) -H * [ // || #m ] #Y #V1 #V2 #HLY
+lapply (drops_mono … HLK … HLY) -L #H destruct
+qed.
+
+(* Properties with generic relocation ***************************************)
+
+lemma cnu_lifts (h) (G): d_liftable1 … (cnu h G).
+#h #G #K #T #HT #b #f #L #HLK #U #HTU #n #U0 #H
+elim (cpm_inv_lifts_sn … H … HLK … HTU) -b -L #T0 #HTU0 #HT0
+lapply (HT … HT0) -G -K /2 width=6 by tueq_lifts_bi/
+qed-.
+
+(* Inversion lemmas with generic relocation *********************************)
+
+lemma cnu_inv_lifts (h) (G): d_deliftable1 … (cnu h G).
+#h #G #L #U #HU #b #f #K #HLK #T #HTU #n #T0 #H
+elim (cpm_lifts_sn … H … HLK … HTU) -b -K #U0 #HTU0 #HU0
+lapply (HU … HU0) -G -L /2 width=6 by tueq_inv_lifts_bi/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnu_lifts.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnu_lifts.etc
new file mode 100644 (file)
index 0000000..051da51
--- /dev/null
@@ -0,0 +1,32 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/relocation/lifts_tueq.ma".
+include "basic_2/rt_transition/cnu.ma".
+
+(* NORMAL TERMS FOR T-UNUNBOUND RT-TRANSITION *******************************)
+
+(* Advanced properties with uniform relocation for terms ********************)
+
+lemma cnu_lref (h) (I) (G) (L):
+      ∀i. ⦃G,L⦄ ⊢ ⥲[h] 𝐍⦃#i⦄ → ⦃G,L.ⓘ{I}⦄ ⊢ ⥲[h] 𝐍⦃#↑i⦄.
+#h #I #G #L #i #Hi #n #X #H
+elim (cpm_inv_lref1 … H) -H *
+[ #H #_ destruct //
+| #J #K #V #HV #HVX #H destruct
+  lapply (Hi … HV) -Hi -HV #HV
+  elim (tueq_lifts_dx … HV … HVX) -V #Xi #Hi #HX
+  lapply (lifts_inv_lref1_uni … Hi) -Hi #H destruct //
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnu_tdeq.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnu_tdeq.etc
new file mode 100644 (file)
index 0000000..f6eb1a8
--- /dev/null
@@ -0,0 +1,98 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_transition/cnr_tdeq.ma".
+include "basic_2/rt_transition/cnu_drops.ma".
+include "basic_2/rt_transition/cnu_cnr.ma".
+include "basic_2/rt_transition/cnu_cnr_simple.ma".
+
+(* NORMAL TERMS FOR T-UNUNBOUND RT-TRANSITION *******************************)
+
+(* Properties with context-free sort-irrelevant equivalence for terms *******)
+
+lemma cnu_dec_tdeq (h) (G) (L):
+      ∀T1. ∨∨ ⦃G,L⦄ ⊢ ⥲[h] 𝐍⦃T1⦄
+            | ∃∃n,T2. ⦃G,L⦄ ⊢ T1 ➡[n,h] 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=5 by cnu_sort, or_introl/
+| #i #HG #HL #HT destruct -IH
+  elim (drops_F_uni L i)
+  [ /3 width=7 by cnu_atom_drops, or_introl/
+  | * * [ #I | * #V ] #K #HLK
+    [ /3 width=8 by cnu_unit_drops, or_introl/
+    | elim (lifts_total V 𝐔❴↑i❵) #W #HVW
+      @or_intror @(ex2_2_intro … W) [1,2: /2 width=7 by cpm_delta_drops/ ] #H
+      lapply (tdeq_inv_lref1 … 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 cpm_ell_drops/ ] #H
+      lapply (tdeq_inv_lref1 … H) -H #H destruct
+      /2 width=5 by lifts_inv_lref2_uni_lt/
+    ]
+  ]
+| #l #HG #HL #HT destruct -IH
+  /3 width=5 by cnu_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 (tdeq_dec T1 T2) [ -HT12 #HT12 | #HnT12 ]
+    [ elim (tdeq_inv_lifts_dx … HT12 … HXT2) -T2 #X1 #HXT1 #_ -X2
+      @or_intror @(ex2_2_intro … X1) [1,2: /2 width=4 by cpm_zeta/ ] #H
+      /2 width=7 by tdeq_lifts_inv_pair_sn/
+    | @or_intror @(ex2_2_intro … (+ⓓV1.T2)) [1,2: /2 width=2 by cpm_bind/ ] #H
+      elim (tdeq_inv_pair … H) -H /2 width=1 by/
+    ]
+  | elim (cnr_dec_tdeq h G L V1) [ elim (IH G (L.ⓓV1) T1) [| * | // ] | * ] -IH
+    [ #HT1 #HV1 /3 width=7 by cnu_abbr_neg, or_introl/
+    | #n #T2 #HT12 #HnT12 #_
+      @or_intror @(ex2_2_intro … (-ⓓV1.T2)) [1,2: /2 width=2 by cpm_bind/ ] #H
+      elim (tdeq_inv_pair … H) -H /2 width=1 by/
+    | #V2 #HV12 #HnV12
+      @or_intror @(ex2_2_intro … (-ⓓV2.T1)) [1,2: /2 width=2 by cpr_pair_sn/ ] #H
+      elim (tdeq_inv_pair … H) -H /2 width=1 by/
+    ]
+  | elim (cnr_dec_tdeq h G L V1) [ elim (IH G (L.ⓛV1) T1) [| * | // ] | * ] -IH
+    [ #HT1 #HV1 /3 width=7 by cnu_abst, or_introl/
+    | #n #T2 #HT12 #HnT12 #_
+      @or_intror @(ex2_2_intro … (ⓛ{p}V1.T2)) [1,2: /2 width=2 by cpm_bind/ ] #H
+      elim (tdeq_inv_pair … H) -H /2 width=1 by/
+    | #V2 #HV12 #HnV12
+      @or_intror @(ex2_2_intro … (ⓛ{p}V2.T1)) [1,2: /2 width=2 by cpr_pair_sn/ ] #H
+      elim (tdeq_inv_pair … H) -H /2 width=1 by/
+    ]
+  ]
+| * #V1 #T1 #HG #HL #HT destruct [| -IH ]
+  [ elim (cnr_dec_tdeq h G L V1) [ elim (IH G L T1) [| * | // ] | * ] -IH
+    [ #HT1 #HV1
+      elim (simple_dec_ex T1) [| * #p * #W1 #U1 #H destruct ]
+      [ /3 width=7 by cnu_appl_simple, or_introl/
+      | elim (lifts_total V1 𝐔❴1❵) #X1 #HVX1
+        @or_intror @(ex2_2_intro … (ⓓ{p}W1.ⓐX1.U1)) [1,2: /2 width=3 by cpm_theta/ ] #H
+        elim (tdeq_inv_pair … H) -H #H destruct
+      | @or_intror @(ex2_2_intro … (ⓓ{p}ⓝW1.V1.U1)) [1,2: /2 width=2 by cpm_beta/ ] #H
+        elim (tdeq_inv_pair … H) -H #H destruct
+      ]
+    | #n #T2 #HT12 #HnT12 #_
+      @or_intror @(ex2_2_intro … (ⓐV1.T2)) [1,2: /2 width=2 by cpm_appl/ ] #H
+      elim (tdeq_inv_pair … H) -H /2 width=1 by/
+    | #V2 #HV12 #HnV12
+      @or_intror @(ex2_2_intro … (ⓐV2.T1)) [1,2: /2 width=2 by cpr_pair_sn/ ] #H
+      elim (tdeq_inv_pair … H) -H /2 width=1 by/
+    ]
+  | @or_intror @(ex2_2_intro … T1) [1,2: /2 width=2 by cpm_eps/ ] #H
+    /2 width=4 by tdeq_inv_pair_xy_y/
+  ]
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnv_cpmue.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnv_cpmue.etc
new file mode 100644 (file)
index 0000000..99c8606
--- /dev/null
@@ -0,0 +1,46 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/cpms_cnu.ma".
+include "basic_2/rt_computation/cpmue.ma".
+include "basic_2/dynamic/cnv_preserve.ma".
+
+(* T-UNBOUND EVALUATION FOR T-BOUND RT-TRANSITION ON TERMS ******************)
+
+(* Properties with evaluation for t-unbound rt-transition on terms **********)
+
+lemma cnv_cpmue_trans (a) (h) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ T1 ![a,h] →
+      ∀T2,n. ⦃G,L⦄ ⊢ T1 ➡*[h,n] 𝐍*⦃T2⦄ → ⦃G,L⦄ ⊢ T2 ![a,h].
+/3 width=4 by cpmue_fwd_cpms, cnv_cpms_trans/ qed-.
+
+lemma cnv_cpmue_cpms_conf (a) (h) (G) (L):
+      ∀T0. ⦃G,L⦄ ⊢ T0 ![a,h] → ∀T1,n1. ⦃G,L⦄ ⊢ T0 ➡*[n1,h] T1 →
+      ∀T2,n2. ⦃G,L⦄ ⊢ T0 ➡*[h,n2] 𝐍*⦃T2⦄ →
+      ∃∃T. ⦃G,L⦄ ⊢ T1 ➡*[h,n2-n1] 𝐍*⦃T⦄ & T2 ≅ T.
+#a #h #G #L #T0 #HT0 #T1 #n1 #HT01 #T2 #n2 * #HT02 #HT2
+elim (cnv_cpms_conf … HT0 … HT01 … HT02) -T0 #T0 #HT10 #HT20
+lapply (cpms_inv_cnu_sn … HT20 HT2) -HT20 #HT20
+/4 width=8 by cpmue_intro, cnu_tueq_trans, ex2_intro/
+qed-.
+
+(* Main properties with evaluation for t-unbound rt-transition on terms *****)
+
+theorem cnv_cpmue_mono (a) (h) (G) (L):
+        ∀T0. ⦃G,L⦄ ⊢ T0 ![a,h] → ∀T1,n1. ⦃G,L⦄ ⊢ T0 ➡*[h,n1] 𝐍*⦃T1⦄ →
+        ∀T2,n2. ⦃G,L⦄ ⊢ T0 ➡*[h,n2] 𝐍*⦃T2⦄ → T1 ≅ T2.
+#a #h #G #L #T0 #HT0 #T1 #n1 * #HT01 #HT1 #T2 #n2 * #HT02 #HT2
+elim (cnv_cpms_conf … HT0 … HT01 … HT02) -T0 #T0 #HT10 #HT20
+/3 width=8 by cpms_inv_cnu_sn, tueq_canc_dx/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnv_cpue.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cnv_cpue.etc
new file mode 100644 (file)
index 0000000..a84fd5c
--- /dev/null
@@ -0,0 +1,48 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/cpms_cnu.ma".
+include "basic_2/rt_computation/cpue.ma".
+include "basic_2/dynamic/cnv_preserve.ma".
+
+(* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
+
+(* Properties with evaluation for t-unbound rt-transition on terms **********)
+
+lemma cnv_cpue_trans (a) (h) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ T1 ![a,h] →
+      ∀T2. ⦃G,L⦄ ⊢ T1 ⥲*[h] 𝐍⦃T2⦄ → ⦃G,L⦄ ⊢ T2 ![a,h].
+#a #h #G #L #T1 #HT1 #T2 * #n #HT12 #_
+/2 width=4 by cnv_cpms_trans/
+qed-.
+
+lemma cnv_cpue_cpms_conf (a) (h) (n) (G) (L):
+      ∀T0. ⦃G,L⦄ ⊢ T0 ![a,h] → ∀T1. ⦃G,L⦄ ⊢ T0 ➡*[n,h] T1 →
+      ∀T2. ⦃G,L⦄ ⊢ T0 ⥲*[h] 𝐍⦃T2⦄ →
+      ∃∃T. ⦃G,L⦄ ⊢ T1 ⥲*[h] 𝐍⦃T⦄ & T2 ≅ T.
+#a #h #n1 #G #L #T0 #HT0 #T1 #HT01 #T2 * #n2 #HT02 #HT2
+elim (cnv_cpms_conf … HT0 … HT01 … HT02) -T0 #T0 #HT10 #HT20
+lapply (cpms_inv_cnu_sn … HT20 HT2) -HT20 #HT20
+/4 width=8 by cnu_tueq_trans, ex2_intro/
+qed-.
+
+(* Main properties with evaluation for t-unbound rt-transition on terms *****)
+
+theorem cnv_cpue_mono (a) (h) (G) (L):
+        ∀T0. ⦃G,L⦄ ⊢ T0 ![a,h] → ∀T1. ⦃G,L⦄ ⊢ T0 ⥲*[h] 𝐍⦃T1⦄ →
+        ∀T2. ⦃G,L⦄ ⊢ T0 ⥲*[h] 𝐍⦃T2⦄ → T1 ≅ T2.
+#a #h #G #L #T0 #HT0 #T1 * #n1 #HT01 #HT1 #T2 * #n2 #HT02 #HT2
+elim (cnv_cpms_conf … HT0 … HT01 … HT02) -T0 #T0 #HT10 #HT20
+/3 width=8 by cpms_inv_cnu_sn, tueq_canc_dx/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cpm_tueq.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cpm_tueq.etc
new file mode 100644 (file)
index 0000000..2baeeef
--- /dev/null
@@ -0,0 +1,90 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/relocation/lifts_tueq.ma".
+include "basic_2/rt_transition/cpm.ma".
+
+(* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS ***************)
+
+(* Properties with tail sort-irrelevant equivalence on terms ****************)
+
+lemma cpm_tueq_conf (h) (n) (G) (L) (T0):
+      ∀T1.  ⦃G,L⦄ ⊢ T0 ➡[n,h] T1 → ∀T2. T0 ≅ T2 →
+      ∃∃T. ⦃G,L⦄ ⊢ T2 ➡[n,h] T & T1 ≅ T.
+#h #n #G #L #T0 #T1 #H @(cpm_ind … H) -G -L -T0 -T1 -n
+[ /2 width=3 by ex2_intro/
+| #G #L #s0 #X2 #H2
+  elim (tueq_inv_sort1 … H2) -H2 #s2 #H destruct
+  /3 width=3 by tueq_sort, ex2_intro/
+| #n #G #K0 #V0 #V1 #W1 #_ #IH #HVW1 #X2 #H2
+  >(tueq_inv_lref1 … H2) -X2
+  elim (IH V0) [| // ] -IH #V #HV0 #HV1
+  elim (tueq_lifts_sn … HV1 … HVW1) -V1
+  /3 width=3 by cpm_delta, ex2_intro/
+| #n #G #K0 #V0 #V1 #W1 #_ #IH #HVW1 #X2 #H2
+  >(tueq_inv_lref1 … H2) -X2
+  elim (IH V0) [| // ] -IH #V #HV0 #HV1
+  elim (tueq_lifts_sn … HV1 … HVW1) -V1
+  /3 width=3 by cpm_ell, ex2_intro/
+| #n #I #G #K0 #V1 #W1 #i #_ #IH #HVW1 #X2 #H2
+  >(tueq_inv_lref1 … H2) -X2
+  elim (IH (#i)) [| // ] -IH #V #HV0 #HV1
+  elim (tueq_lifts_sn … HV1 … HVW1) -V1
+  /3 width=3 by cpm_lref, ex2_intro/
+| #n #p #I #G #L #V0 #V1 #T0 #T1 #HV01 #_ #_ #IHT #X2 #H2
+  elim (tueq_inv_bind1 … H2) -H2 #T2 #HT02 #H destruct
+  elim (IHT … HT02) -T0 #T #HT2 #HT1
+  /3 width=3 by cpm_bind, tueq_bind, ex2_intro/
+| #n #G #L #V0 #V1 #T0 #T1 #HV10 #_ #_ #IHT #X2 #H2
+  elim (tueq_inv_appl1 … H2) -H2 #T2 #HT02 #H destruct
+  elim (IHT … HT02) -T0 #T #HT2 #HT1
+  /3 width=3 by cpm_appl, tueq_appl, ex2_intro/
+| #n #G #L #V0 #V1 #T0 #T1 #_ #_ #IHV #IHT #X2 #H2
+  elim (tueq_inv_cast1 … H2) -H2 #V2 #T2 #HV02 #HT02 #H destruct
+  elim (IHV … HV02) -V0 #V #HV2 #HV1
+  elim (IHT … HT02) -T0 #T #HT2 #HT1
+  /3 width=5 by cpm_cast, tueq_cast, ex2_intro/
+| #n #G #L #V0 #U0 #T0 #T1 #HTU0 #_ #IH #X2 #H2
+  elim (tueq_inv_bind1 … H2) -H2 #U2 #HU02 #H destruct
+  elim (tueq_inv_lifts_sn … HU02 … HTU0) -U0 #T2 #HTU2 #HT02
+  elim (IH … HT02) -T0 #T #HT2 #HT1
+  /3 width=3 by cpm_zeta, ex2_intro/
+| #n #G #L #V0 #T0 #T1 #_ #IH #X2 #H2
+  elim (tueq_inv_cast1 … H2) -H2 #V2 #T2 #_ #HT02 #H destruct
+  elim (IH … HT02) -V0 -T0
+  /3 width=3 by cpm_eps, ex2_intro/
+| #n #G #L #V0 #T0 #T1 #_ #IH #X2 #H2
+  elim (tueq_inv_cast1 … H2) -H2 #V2 #T2 #HV02 #_ #H destruct
+  elim (IH … HV02) -V0 -T1
+  /3 width=3 by cpm_ee, ex2_intro/
+| #n #p #G #L #V0 #V1 #W0 #W1 #T0 #T1 #HV01 #HW01 #_ #_ #_ #IHT #X2 #H2
+  elim (tueq_inv_appl1 … H2) -H2 #X #H2 #H destruct
+  elim (tueq_inv_bind1 … H2) -H2 #T2 #HT02 #H destruct
+  elim (IHT … HT02) -T0
+  /4 width=3 by cpm_beta, tueq_cast, tueq_bind, ex2_intro/
+| #n #p #G #L #V0 #V1 #U1 #W0 #W1 #T0 #T1 #HV01 #HW01 #_ #_ #_ #IHT #HVU1 #X2 #H2
+  elim (tueq_inv_appl1 … H2) -H2 #X #H2 #H destruct
+  elim (tueq_inv_bind1 … H2) -H2 #T2 #HT02 #H destruct
+  elim (IHT … HT02) -T0 #T #HT2 #HT1
+  /4 width=3 by cpm_theta, tueq_appl, tueq_bind, ex2_intro/
+]
+qed-.
+
+lemma tueq_cpm_trans (h) (n) (G) (L) (T0):
+      ∀T1. T1 ≅ T0 → ∀T2.  ⦃G,L⦄ ⊢ T0 ➡[n,h] T2 →
+      ∃∃T. ⦃G,L⦄ ⊢ T1 ➡[n,h] T & T ≅ T2.
+#h #n #G #L #T0 #T1 #HT10 #T2 #HT02
+elim (cpm_tueq_conf … HT02 T1)
+/3 width=3 by tueq_sym, ex2_intro/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cpms_cnu.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cpms_cnu.etc
new file mode 100644 (file)
index 0000000..5e77906
--- /dev/null
@@ -0,0 +1,27 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_transition/cnu_cnu.ma".
+include "basic_2/rt_computation/cpms.ma".
+
+(* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
+
+(* Inversion lemmas with normal terms for t-unbound rt-transition ***********)
+
+lemma cpms_inv_cnu_sn (h) (n) (G) (L):
+      ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 → ⦃G,L⦄ ⊢ ⥲[h] 𝐍⦃T1⦄ → T1 ≅ T2.
+#h #n #G #L #T1 #T2 #H @(cpms_ind_sn … H) -T1 //
+#n1 #n2 #T1 #T0 #HT10 #_ #IH #HT1
+/5 width=8 by cnu_tueq_trans, tueq_trans/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cpmue.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cpmue.etc
new file mode 100644 (file)
index 0000000..1132c8e
--- /dev/null
@@ -0,0 +1,41 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/notation/relations/predevalstar_6.ma".
+include "basic_2/rt_transition/cnu.ma".
+include "basic_2/rt_computation/cpms.ma".
+
+(* T-UNBOUND EVALUATION FOR T-BOUND RT-TRANSITION ON TERMS ******************)
+
+definition cpmue (h) (n) (G) (L): relation2 term term ≝
+           λT1,T2. ∧∧ ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 & ⦃G,L⦄ ⊢ ⥲[h] 𝐍⦃T2⦄.
+
+interpretation "t-unbound evaluation for t-bound context-sensitive parallel rt-transition (term)"
+   'PRedEvalStar h n G L T1 T2 = (cpmue h n G L T1 T2).
+
+definition R_cpmue (h) (G) (L) (T): predicate nat ≝
+           λn. ∃U. ⦃G,L⦄ ⊢ T ➡*[h,n] 𝐍*⦃U⦄.
+
+(* Basic properties *********************************************************)
+
+lemma cpmue_intro (h) (n) (G) (L):
+      ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 → ⦃G,L⦄ ⊢ ⥲[h] 𝐍⦃T2⦄ → ⦃G,L⦄ ⊢ T1 ➡*[h,n] 𝐍*⦃T2⦄.
+/2 width=1 by conj/ qed.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma cpmue_fwd_cpms (h) (n) (G) (L):
+      ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡*[h,n] 𝐍*⦃T2⦄ → ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2.
+#h #n #G #L #T1 #T2 * #HT12 #_ //
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cpmue_csx.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cpmue_csx.etc
new file mode 100644 (file)
index 0000000..7ad451c
--- /dev/null
@@ -0,0 +1,41 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_transition/cpm_cpx.ma".
+include "basic_2/rt_transition/cnu_tdeq.ma".
+include "basic_2/rt_computation/csx.ma".
+include "basic_2/rt_computation/cpmue.ma".
+
+(* T-UNBOUND EVALUATION FOR T-BOUND RT-TRANSITION ON TERMS ******************)
+
+(* Properties with strong normalization for unbound rt-transition for terms *)
+
+lemma cpmue_total_csx (h) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ → ∃∃T2,n. ⦃G,L⦄ ⊢ T1 ➡*[h,n] 𝐍*⦃T2⦄.
+#h #G #L #T1 #H
+@(csx_ind … H) -T1 #T1 #_ #IHT1
+elim (cnu_dec_tdeq h G L T1)
+[ -IHT1 #HT1 /3 width=4 by cpmue_intro, ex1_2_intro/
+| * #n1 #T0 #HT10 #HnT10
+  elim (IHT1 … HnT10) -IHT1 -HnT10 [| /2 width=2 by cpm_fwd_cpx/ ]
+  #T2 #n2 * #HT02 #HT2 /4 width=5 by cpms_step_sn, cpmue_intro, ex1_2_intro/
+]
+qed-.
+
+lemma R_cpmue_total_csx (h) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ → ∃n. R_cpmue h G L T1 n.
+#h #G #L #T1 #H
+elim (cpmue_total_csx … H) -H #T2 #n #HT12
+/3 width=3 by ex_intro (* 2x *)/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cpue.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cpue.etc
new file mode 100644 (file)
index 0000000..a22002a
--- /dev/null
@@ -0,0 +1,25 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/notation/relations/prediteval_5.ma".
+include "basic_2/rt_transition/cnu.ma".
+include "basic_2/rt_computation/cpms.ma".
+
+(* EVALUATION FOR T-UNBOUND RT-TRANSITION ON TERMS **************************)
+
+definition cpue (h) (G) (L): relation2 term term ≝
+           λT1,T2. ∃∃n. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 & ⦃G,L⦄ ⊢ ⥲[h] 𝐍⦃T2⦄.
+
+interpretation "evaluation for t-unbound context-sensitive parallel rt-transition (term)"
+   'PRedITEval h G L T1 T2 = (cpue h G L T1 T2).
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cpue_csx.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/cpue_csx.etc
new file mode 100644 (file)
index 0000000..2ba2ddb
--- /dev/null
@@ -0,0 +1,32 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_transition/cpm_cpx.ma".
+include "basic_2/rt_transition/cnu_tdeq.ma".
+include "basic_2/rt_computation/csx.ma".
+include "basic_2/rt_computation/cpue.ma".
+
+(* EVALUATION FOR T-UNBOUND RT-TRANSITION ON TERMS **************************)
+
+(* Properties with strong normalization for unbound rt-transition for terms *)
+
+lemma cpue_total_csx (h) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ → ∃T2. ⦃G,L⦄ ⊢ T1 ⥲*[h] 𝐍⦃T2⦄.
+#h #G #L #T1 #H
+@(csx_ind … H) -T1 #T1 #_ #IHT1
+elim (cnu_dec_tdeq h G L T1) [ /3 width=4 by ex2_intro, ex_intro/ ] *
+#n1 #T0 #HT10 #HnT10
+elim (IHT1 … HnT10) -IHT1 -HnT10 [| /2 width=2 by cpm_fwd_cpx/ ]
+#T2 * #n2 #HT02 #HT2 /4 width=7 by cpms_step_sn, ex2_intro, ex_intro/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/prediteval_5.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpue/prediteval_5.etc
new file mode 100644 (file)
index 0000000..b87e863
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 ⥲* [ break term 46 h ] 𝐍 ⦃ break term 46 T2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'PRedITEval $h $G $L $T1 $T2 }.
index 166fd2105a13bd98cf1938e2ccc1a2470d3f3912..9d0831b470b2281e7058e91ed2dfd76f8fb77829 100644 (file)
@@ -20,6 +20,9 @@ lemma nta_inv_lref_sn_drops
 (* Basic_1: uses: ty3_gen_abst_abst *)
 lemma nta_inv_abst_bi
 
+(* Basic_1: uses: pc3_dec *)
+lemma nta_cpcs_dec
+
 (* Advanced properties ******************************************************)
 
 | ntaa_cast: ∀L,T,U,W. ntaa h L T U → ntaa h L U W → ntaa h L (ⓝU. T) U
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_1a.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_1a.etc
new file mode 100644 (file)
index 0000000..e0ee809
--- /dev/null
@@ -0,0 +1,37 @@
+(* FROM BASIC_1
+
+(* NOTE: This can be generalized removing the last premise *)
+      Lemma ty3_gen_cvoid: (g:?; c:?; t1,t2:?) (ty3 g c t1 t2) ->
+                           (e:?; u:?; d:?) (getl d c (CHead e (Bind Void) u)) ->
+                           (a:?) (drop (1) d c a) ->
+                           (EX y1 y2 | t1 = (lift (1) d y1) &
+                                       t2 = (lift (1) d y2) &
+                                       (ty3 g a y1 y2)
+                           ).
+
+Lemma ty3_gen_appl_nf2: (g:?; c:?; w,v,x:?) (ty3 g c (THead (Flat Appl) w v) x) ->
+                        (EX u t | (pc3 c (THead (Flat Appl) w (THead (Bind Abst) u t)) x) &
+                                  (ty3 g c v (THead (Bind Abst) u t)) &
+                                  (ty3 g c w u) &
+                                  (nf2 c (THead (Bind Abst) u t))
+                        ).
+
+Lemma ty3_arity: (g:?; c:?; t1,t2:?) (ty3 g c t1 t2) ->
+                 (EX a1 | (arity g c t1 a1) &
+                          (arity g c t2 (asucc g a1))
+                 ).
+
+Lemma ty3_acyclic: (g:?; c:?; t,u:?)
+                   (ty3 g c t u) -> (pc3 c u t) -> (P:Prop) P.
+
+Theorem pc3_abst_dec: (g:?; c:?; u1,t1:?) (ty3 g c u1 t1) ->
+                      (u2,t2:?) (ty3 g c u2 t2) ->
+                      (EX u v2 | (pc3 c u1 (THead (Bind Abst) u2 u)) &
+                                 (ty3 g c (THead (Bind Abst) v2 u) t1) &
+                                 (pr3 c u2 v2) & (nf2 c v2)
+                      ) \/
+                      ((u:?) (pc3 c u1 (THead (Bind Abst) u2 u)) -> False).
+
+file ty3_nf2_gen
+
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/rdsx_csx.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/rdsx_csx.etc
new file mode 100644 (file)
index 0000000..cae7215
--- /dev/null
@@ -0,0 +1,44 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/csx_lsubr.ma".
+include "basic_2/rt_computation/csx_cpxs.ma".
+include "basic_2/rt_computation/sdsx_rdsx.ma".
+
+(* STRONGLY NORMALIZING REFERRED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******)
+
+(* Advanced properties ******************************************************)
+
+lemma rdsx_pair_lpxs (h) (I) (G):
+                     ∀K1,V1. G ⊢ ⬈*[h,V1] 𝐒⦃K1⦄ →
+                     ∀V2. ⦃G,K1⦄ ⊢ ⬈*[h] 𝐒⦃V2⦄ →
+                     (∀K. ⦃G,K1⦄ ⊢ ⬈*[h] K → ⦃G,K⦄ ⊢ V1 ⬈*[h] V2) →
+                     G ⊢ ⬈*[h,#0] 𝐒⦃K1.ⓑ{I}V2⦄.
+#h #I #G #K1 #V1 #H
+@(rdsx_ind_lpxs … H) -K1 #K1 #_ #IHK #V2 #H
+@(csx_ind_cpxs … H) -V2 #V2 #HV2 #IHV #HK
+@rdsx_intro_lpxs #Y #HY #HnY
+elim (lpxs_inv_pair_sn … HY) -HY #K3 #V3 #HK13 #HV23 #H destruct
+elim (tdeq_dec V2 V3)
+[ -IHV -HV23 #HV23
+  @(rdsx_rdeq_trans … (K3.ⓑ{I}V2)) [| /2 width=1 by rdeq_pair_refl/ ]
+  @(IHK … HK13) -IHK
+  [
+  |
+  | /3 width=3 by lpxs_trans/
+  ]
+| -IHK -HnY #HnV23
+  @(rdsx_lpxs_trans … (K1.ⓑ{I}V3)) [| /2 width=1 by lpxs_bind_refl_dx/ ]
+  @(IHV … HV23 HnV23) -IHV -HnV23
+  #K #HK
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/scpes/dpconvstar_8.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/scpes/dpconvstar_8.etc
deleted file mode 100644 (file)
index f0210a6..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 • * ⬌ * [ break term 46 h, break term 46 o, break term 46 n1, break term 46 n2 ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'DPConvStar $h $o $n1 $n2 $G $L $T1 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/scpes/scpes.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/scpes/scpes.etc
deleted file mode 100644 (file)
index 6577634..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/notation/relations/dpconvstar_8.ma".
-include "basic_2/computation/scpds.ma".
-
-(* STRATIFIED DECOMPOSED PARALLEL EQUIVALENCE FOR TERMS *********************)
-
-definition scpes: ∀h. sd h → nat → nat → relation4 genv lenv term term ≝
-                  λh,o,d1,d2,G,L,T1,T2.
-                  ∃∃T. ⦃G, L⦄ ⊢ T1 •*➡*[h, o, d1] T & ⦃G, L⦄ ⊢ T2 •*➡*[h, o, d2] T.
-
-interpretation "stratified decomposed parallel equivalence (term)"
-   'DPConvStar h o d1 d2 G L T1 T2 = (scpes h o d1 d2 G L T1 T2).
-
-(* Basic properties *********************************************************)
-
-lemma scpds_div: ∀h,o,G,L,T1,T2,T,d1,d2.
-                 ⦃G, L⦄ ⊢ T1 •*➡*[h, o, d1] T → ⦃G, L⦄ ⊢ T2 •*➡*[h, o, d2] T →
-                 ⦃G, L⦄ ⊢ T1 •*⬌*[h, o, d1, d2] T2.
-/2 width=3 by ex2_intro/ qed.
-
-lemma scpes_sym: ∀h,o,G,L,T1,T2,d1,d2. ⦃G, L⦄ ⊢ T1 •*⬌*[h, o, d1, d2] T2 →
-                 ⦃G, L⦄ ⊢ T2 •*⬌*[h, o, d2, d1] T1.
-#h #o #G #L #T1 #T2 #L1 #d2 * /2 width=3 by scpds_div/
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/scpes/scpes_aaa.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/scpes/scpes_aaa.etc
deleted file mode 100644 (file)
index f42ebdb..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/computation/scpds_aaa.ma".
-include "basic_2/equivalence/scpes.ma".
-
-(* DECOMPOSED EXTENDED PARALLEL EQUIVALENCE FOR TERMS ***********************)
-
-(* Main inversion lemmas about atomic arity assignment on terms *************)
-
-theorem scpes_aaa_mono: ∀h,o,G,L,T1,T2,d1,d2. ⦃G, L⦄ ⊢ T1 •*⬌*[h, o, d1, d2] T2 →
-                        ∀A1. ⦃G, L⦄ ⊢ T1 ⁝ A1 → ∀A2. ⦃G, L⦄ ⊢ T2 ⁝ A2 →
-                        A1 = A2.
-#h #o #G #L #T1 #T2 #d1 #d2 * #T #HT1 #HT2 #A1 #HA1 #A2 #HA2
-lapply (scpds_aaa_conf … HA1 … HT1) -T1 #HA1
-lapply (scpds_aaa_conf … HA2 … HT2) -T2 #HA2
-lapply (aaa_mono … HA1 … HA2) -L -T //
-qed-.
index 24ea20ec0e13475a71a6cd75d75bb274dbf135a7..6ed660a42ece918b81d3e9a93ff42249bc46f295 100644 (file)
@@ -28,13 +28,6 @@ qed-.
 
 (* Advanced properties ******************************************************)
 
-lemma scpes_refl: ∀h,o,G,L,T,d1,d2. d2 ≤ d1 → ⦃G, L⦄ ⊢ T ▪[h, o] d1 →
-                  ⦃G, L⦄ ⊢ T •*⬌*[h, o, d2, d2] T.
-#h #o #G #L #T #d1 #d2 #Hd21 #Hd1
-elim (da_lstas … Hd1 … d2) #U #HTU #_
-/3 width=3 by scpds_div, lstas_scpds/
-qed.
-
 lemma lstas_scpes_trans: ∀h,o,G,L,T1,d0,d1. ⦃G, L⦄ ⊢ T1 ▪[h, o] d0 → d1 ≤ d0 →
                          ∀T. ⦃G, L⦄ ⊢ T1 •*[h, d1] T →
                          ∀T2,d,d2. ⦃G, L⦄ ⊢ T •*⬌*[h,o,d,d2] T2 → ⦃G, L⦄ ⊢ T1 •*⬌*[h,o,d1+d,d2] T2.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/sdsx/sdsx.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/sdsx/sdsx.etc
new file mode 100644 (file)
index 0000000..c721bee
--- /dev/null
@@ -0,0 +1,145 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/rdsx.ma".
+
+(* STRONGLY NORMALIZING SELECTED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******)
+
+(* Basic_2A1: uses: lcosx *)
+inductive sdsx (h) (G): rtmap → predicate lenv ≝
+| sdsx_atom: ∀f. sdsx h G f (⋆)
+| sdsx_push: ∀f,I,K. sdsx h G f K → sdsx h G (⫯f) (K.ⓘ{I})
+| sdsx_unit: ∀f,I,K. sdsx h G f K → sdsx h G (↑f) (K.ⓤ{I})
+| sdsx_pair: ∀f,I,K,V. G ⊢ ⬈*[h,V] 𝐒⦃K⦄ →
+             sdsx h G f K → sdsx h G (↑f) (K.ⓑ{I}V)
+.
+
+interpretation
+   "strong normalization for unbound context-sensitive parallel rt-transition on selected entries (local environment)"
+   'PRedTySNStrong h f G L = (sdsx h G f L).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact sdsx_inv_push_aux (h) (G):
+     ∀g,L. G ⊢ ⬈*[h,g] 𝐒⦃L⦄ →
+     ∀f,I,K. g = ⫯f → L = K.ⓘ{I} → G ⊢ ⬈*[h,f] 𝐒⦃K⦄.
+#h #G #g #L * -g -L
+[ #f #g #J #L #_ #H destruct
+| #f #I #K #HK #g #J #L #H1 #H2 destruct //
+| #f #I #K #_ #g #J #L #H #_
+  elim (discr_next_push … H)
+| #f #I #K #V #_ #_ #g #J #L #H #_
+  elim (discr_next_push … H)
+]
+qed-.
+
+lemma sdsx_inv_push (h) (G):
+      ∀f,I,K. G ⊢ ⬈*[h,⫯f] 𝐒⦃K.ⓘ{I}⦄ → G ⊢ ⬈*[h,f] 𝐒⦃K⦄.
+/2 width=6 by sdsx_inv_push_aux/ qed-.
+
+fact sdsx_inv_unit_aux (h) (G):
+     ∀g,L. G ⊢ ⬈*[h,g] 𝐒⦃L⦄ →
+     ∀f,I,K. g = ↑f → L = K.ⓤ{I} → G ⊢ ⬈*[h,f] 𝐒⦃K⦄.
+#h #G #g #L * -g -L
+[ #f #g #J #L #_ #H destruct
+| #f #I #K #_ #g #J #L #H #_
+  elim (discr_push_next … H)
+| #f #I #K #HK #g #J #L #H1 #H2 destruct //
+| #f #I #K #V #_ #_ #g #J #L #_ #H destruct
+]
+qed-.
+
+lemma sdsx_inv_unit (h) (G):
+      ∀f,I,K. G ⊢ ⬈*[h,↑f] 𝐒⦃K.ⓤ{I}⦄ → G ⊢ ⬈*[h,f] 𝐒⦃K⦄.
+/2 width=6 by sdsx_inv_unit_aux/ qed-.
+
+fact sdsx_inv_pair_aux (h) (G):
+     ∀g,L. G ⊢ ⬈*[h,g] 𝐒⦃L⦄ →
+     ∀f,I,K,V. g = ↑f → L = K.ⓑ{I}V →
+     ∧∧ G ⊢ ⬈*[h,V] 𝐒⦃K⦄ & G ⊢ ⬈*[h,f] 𝐒⦃K⦄.
+#h #G #g #L * -g -L
+[ #f #g #J #L #W #_ #H destruct
+| #f #I #K #_ #g #J #L #W #H #_
+  elim (discr_push_next … H)
+| #f #I #K #_ #g #J #L #W #_ #H destruct
+| #f #I #K #V #HV #HK #g #J #L #W #H1 #H2 destruct
+  /2 width=1 by conj/
+]
+qed-.
+
+(* Basic_2A1: uses: lcosx_inv_pair *)
+lemma sdsx_inv_pair (h) (G):
+      ∀f,I,K,V. G ⊢ ⬈*[h,↑f] 𝐒⦃K.ⓑ{I}V⦄ →
+      ∧∧ G ⊢ ⬈*[h,V] 𝐒⦃K⦄ & G ⊢ ⬈*[h,f] 𝐒⦃K⦄.
+/2 width=6 by sdsx_inv_pair_aux/ qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma sdsx_inv_pair_gen (h) (G):
+      ∀g,I,K,V. G ⊢ ⬈*[h,g] 𝐒⦃K.ⓑ{I}V⦄ →
+      ∨∨ ∃∃f. G ⊢ ⬈*[h,f] 𝐒⦃K⦄ & g = ⫯f
+       | ∃∃f. G ⊢ ⬈*[h,V] 𝐒⦃K⦄ & G ⊢ ⬈*[h,f] 𝐒⦃K⦄ & g = ↑f.
+#h #G #g #I #K #V #H
+elim (pn_split g) * #f #Hf destruct
+[ lapply (sdsx_inv_push … H) -H /3 width=3 by ex2_intro, or_introl/
+| elim (sdsx_inv_pair … H) -H /3 width=3 by ex3_intro, or_intror/
+]
+qed-.
+
+(* Advanced forward lemmas **************************************************)
+
+lemma sdsx_fwd_bind (h) (G):
+      ∀g,I,K. G ⊢ ⬈*[h,g] 𝐒⦃K.ⓘ{I}⦄ → G ⊢ ⬈*[h,⫱g] 𝐒⦃K⦄.
+#h #G #g #I #K
+elim (pn_split g) * #f #Hf destruct
+[ #H lapply (sdsx_inv_push … H) -H //
+| cases I -I #I
+  [ #H lapply (sdsx_inv_unit … H) -H //
+  | #V #H elim (sdsx_inv_pair … H) -H //
+  ]
+]
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma sdsx_eq_repl_back (h) (G):
+      ∀L. eq_repl_back … (λf. G ⊢ ⬈*[h,f] 𝐒⦃L⦄).
+#h #G #L #f1 #H elim H -L -f1
+[ //
+| #f1 #I #L #_ #IH #x2 #H
+  elim (eq_inv_px … H) -H /3 width=3 by sdsx_push/
+| #f1 #I #L #_ #IH #x2 #H
+  elim (eq_inv_nx … H) -H /3 width=3 by sdsx_unit/
+| #f1 #I #L #V #HV #_ #IH #x2 #H
+  elim (eq_inv_nx … H) -H /3 width=3 by sdsx_pair/
+]
+qed-.
+
+lemma sdsx_eq_repl_fwd (h) (G):
+      ∀L. eq_repl_fwd … (λf. G ⊢ ⬈*[h,f] 𝐒⦃L⦄).
+#h #G #L @eq_repl_sym /2 width=3 by sdsx_eq_repl_back/
+qed-.
+
+(* Advanced properties ******************************************************)
+
+(* Basic_2A1: uses: lcosx_O *)
+lemma sdsx_isid (h) (G):
+      ∀f. 𝐈⦃f⦄ → ∀L. G ⊢ ⬈*[h,f] 𝐒⦃L⦄.
+#h #G #f #Hf #L elim L -L
+/3 width=3 by sdsx_eq_repl_back, sdsx_push, eq_push_inv_isid/
+qed.
+
+(* Basic_2A1: removed theorems 2:
+              lcosx_drop_trans_lt lcosx_inv_succ
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/sdsx/sdsx_rdsx.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/sdsx/sdsx_rdsx.etc
new file mode 100644 (file)
index 0000000..9c2c7d5
--- /dev/null
@@ -0,0 +1,94 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/relocation/scl.ma".
+include "basic_2/rt_computation/rdsx_drops.ma".
+include "basic_2/rt_computation/rdsx_lpxs.ma".
+include "basic_2/rt_computation/sdsx.ma".
+
+axiom pippo (h) (f) (G) (V:term):
+      ∀L1. G ⊢ ⬈*[h,V] 𝐒⦃L1⦄ →
+      ∀L2. L1 ⊐ⓧ[f] L2 → G ⊢ ⬈*[h,V] 𝐒⦃L2⦄.
+
+
+(* STRONGLY NORMALIZING SELECTED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******)
+
+(* Properties with strongly normalizing referred local environments *********)
+
+(* Basic_2A1: uses: lsx_cpx_trans_lcosx *)
+lemma rdsx_cpx_trans_sdsx (h):
+      ∀G,L0,T1,T2. ⦃G,L0⦄ ⊢ T1 ⬈[h] T2 →
+      ∀f. G ⊢ ⬈*[h,f] 𝐒⦃L0⦄ → ∀L. L0 ⊐ⓧ[f] L →
+      G ⊢ ⬈*[h,T1] 𝐒⦃L⦄ → G ⊢ ⬈*[h,T2] 𝐒⦃L⦄.
+#h #G #L0 #T1 #T2 #H @(cpx_ind … H) -G -L0 -T1 -T2
+[ //
+| //
+| #I #G #K0 #V1 #V2 #W2 #_ #IH #HVW2 #g #H1 #Y #H2 #H3
+  elim (sdsx_inv_pair_gen … H1) -H1 *
+  [ #f #HK0 #H destruct
+    elim (scl_inv_push_sn … H2) -H2 #K #HK #H destruct
+    /4 width=8 by rdsx_lifts, rdsx_fwd_pair, drops_refl, drops_drop/
+  | #f #HV1 #HK0 #H destruct
+    elim (scl_inv_next_sn … H2) -H2 #K #HK #H destruct
+    /4 width=8 by pippo, rdsx_lifts, drops_refl, drops_drop/
+  ]
+| #I0 #G #K0 #T #U #i #_ #IH #HTU #g #H1 #Y #H2 #H3
+  lapply (sdsx_fwd_bind … H1) -H1 #HK0
+  elim (scl_fwd_bind_sn … H2) -H2 #I #K #HK #H destruct
+  /6 width=8 by rdsx_inv_lifts, rdsx_lifts, drops_refl, drops_drop/
+| #p #I #G #L0 #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #f #H1 #L #H2 #H3
+  elim (rdsx_inv_bind_void … H3) -H3 #HV1 #HT1
+  @rdsx_bind_void
+  [ /2 width=3 by/
+  | @(IHT12 (↑f) … HT1) 
+    [ @(sdsx_pair … H1) 
+    | /2 width=1 by scl_next/
+  
+  /4 width=2 by lsubsx_pair, rdsx_bind_void/
+| #I0 #G #L0 #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #f #L #HL0 #HL
+  elim (rdsx_inv_flat … HL) -HL /3 width=2 by rdsx_flat/
+| #G #L0 #V #U1 #T1 #T2 #HTU1 #_ #IHT12 #f #L #HL0 #HL
+  elim (rdsx_inv_bind … HL) -HL #HV #HU1
+  /5 width=8 by rdsx_inv_lifts, drops_refl, drops_drop/
+| #G #L0 #V #T1 #T2 #_ #IHT12 #f #L #HL0 #HL
+  elim (rdsx_inv_flat … HL) -HL /2 width=2 by/
+| #G #L0 #V1 #V2 #T #_ #IHV12 #f #L #HL0 #HL
+  elim (rdsx_inv_flat … HL) -HL /2 width=2 by/
+| #p #G #L0 #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #f #L #HL0 #HL
+  elim (rdsx_inv_flat … HL) -HL #HV1 #HL
+  elim (rdsx_inv_bind … HL) -HL #HW1 #HT1
+  /4 width=2 by lsubsx_pair, rdsx_bind_void, rdsx_flat/
+| #p #G #L0 #V1 #V2 #U2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #HVU2 #f #L #HL0 #HL
+  elim (rdsx_inv_flat … HL) -HL #HV1 #HL
+  elim (rdsx_inv_bind … HL) -HL #HW1 #HT1
+  /6 width=8 by lsubsx_pair, rdsx_lifts, rdsx_bind_void, rdsx_flat, drops_refl, drops_drop/
+]
+qed-.
+
+(* Advanced properties of strongly normalizing referred local environments **)
+
+(* Basic_2A1: uses: lsx_cpx_trans_O *)
+lemma rdsx_cpx_trans (h):
+      ∀G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ⬈[h] T2 →
+      G ⊢ ⬈*[h,T1] 𝐒⦃L⦄ → G ⊢ ⬈*[h,T2] 𝐒⦃L⦄.
+/3 width=6 by rdsx_cpx_trans_lsubsx, lsubsx_refl/ qed-.
+
+lemma rdsx_cpxs_trans (h):
+      ∀G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 →
+      G ⊢ ⬈*[h,T1] 𝐒⦃L⦄ → G ⊢ ⬈*[h,T2] 𝐒⦃L⦄.
+#h #G #L #T1 #T2 #H
+@(cpxs_ind_dx ???????? H) -T1 //
+/3 width=3 by rdsx_cpx_trans/
+qed-.
+*)
index 3c65cbd7c6e204f3c1062811ba6e2531039331b2..c0d2b0cf1c1aa89bb4766d35638a795b4ccd71f7 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/notation/relations/colon_7.ma".
-include "basic_2/notation/relations/colon_6.ma".
-include "basic_2/notation/relations/colonstar_6.ma".
+include "basic_2/notation/relations/colonstar_7.ma".
 include "basic_2/dynamic/cnv.ma".
 
 (* ITERATED NATIVE TYPE ASSIGNMENT FOR TERMS ********************************)
 
-definition ntas (a) (h) (n) (G) (L): relation term ≝ λT,U.
-           ∃∃U0. ⦃G,L⦄ ⊢ U ![a,h] & ⦃G,L⦄ ⊢ T ![a,h] & ⦃G,L⦄ ⊢ U ➡*[h] U0 & ⦃G, L⦄ ⊢ T ➡*[n,h] U0.
+definition ntas (h) (a) (n) (G) (L): relation term ≝ λT,U.
+           ∃∃U0. ⦃G,L⦄ ⊢ U ![h,a] & ⦃G,L⦄ ⊢ T ![h,a] & ⦃G,L⦄ ⊢ U ➡*[h] U0 & ⦃G,L⦄ ⊢ T ➡*[n,h] U0.
 
 interpretation "iterated native type assignment (term)"
-   'Colon a h n G L T U = (ntas a h n G L T U).
-
-interpretation "restricted iterated native type assignment (term)"
-   'Colon h n G L T U = (ntas true h n G L T U).
-
-interpretation "extended iterated native type assignment (term)"
-   'ColonStar h n G L T U = (ntas false h n G L T U).
+   'ColonStar h a n G L T U = (ntas h a n G L T U).
 
 (* Basic properties *********************************************************)
 
-lemma ntas_refl (a) (h) (G) (L):
-      ∀T. ⦃G,L⦄ ⊢ T ![a,h] → ⦃G,L⦄ ⊢ T :[a,h,0] T.
+lemma ntas_intro (h) (a) (n) (G) (L):
+      ∀U. ⦃G,L⦄ ⊢ U ![h,a] → ∀T. ⦃G,L⦄ ⊢ T ![h,a] →
+      ∀U0. ⦃G,L⦄ ⊢ U ➡*[h] U0 → ⦃G,L⦄ ⊢ T ➡*[n,h] U0 → ⦃G,L⦄ ⊢ T :*[h,a,n] U.
 /2 width=3 by ex4_intro/ qed.
+
+lemma ntas_refl (h) (a) (G) (L):
+      ∀T. ⦃G,L⦄ ⊢ T ![h,a] → ⦃G,L⦄ ⊢ T :*[h,a,0] T.
+/2 width=3 by ntas_intro/ qed.
+
+lemma ntas_sort (h) (a) (n) (G) (L):
+      ∀s. ⦃G,L⦄ ⊢ ⋆s :*[h,a,n] ⋆((next h)^n s).
+#h #a #n #G #L #s
+/2 width=3 by ntas_intro, cnv_sort, cpms_sort/
+qed.
+
+lemma ntas_bind_cnv (h) (a) (n) (G) (K):
+      ∀V. ⦃G,K⦄ ⊢ V ![h,a] →
+      ∀I,T,U. ⦃G,K.ⓑ{I}V⦄ ⊢ T :*[h,a,n] U →
+      ∀p. ⦃G,K⦄ ⊢ ⓑ{p,I}V.T :*[h,a,n] ⓑ{p,I}V.U.
+#h #a #n #G #K #V #HV #I #T #U
+* #X #HU #HT #HUX #HTX #p
+/3 width=5 by ntas_intro, cnv_bind, cpms_bind_dx/
+qed.
+
+(* Basic_forward lemmas *****************************************************)
+
+lemma ntas_fwd_cnv_sn (h) (a) (n) (G) (L):
+      ∀T,U. ⦃G,L⦄ ⊢ T :*[h,a,n] U → ⦃G,L⦄ ⊢ T ![h,a].
+#h #a #n #G #L #T #U
+* #X #_ #HT #_ #_ //
+qed-.
+
+(* Note: this is ntas_fwd_correct_cnv *)
+lemma ntas_fwd_cnv_dx (h) (a) (n) (G) (L):
+      ∀T,U. ⦃G,L⦄ ⊢ T :*[h,a,n] U → ⦃G,L⦄ ⊢ U ![h,a].
+#h #a #n #G #L #T #U
+* #X #HU #_ #_ #_ //
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/i_dynamic/ntas_etc.ma b/matita/matita/contribs/lambdadelta/basic_2/i_dynamic/ntas_etc.ma
deleted file mode 100644 (file)
index 0d531af..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-(*
-include "basic_2/dynamic/nta_lift.ma".
-include "basic_2/hod/ntas.ma".
-
-(* HIGHER ORDER NATIVE TYPE ASSIGNMENT ON TERMS *****************************)
-
-(* Advanced properties on native type assignment for terms ******************)
-
-lemma nta_pure_ntas: ∀h,L,U,W,Y. ⦃h, L⦄ ⊢ U :* ⓛW.Y → ∀T. ⦃h, L⦄ ⊢ T : U →
-                     ∀V. ⦃h, L⦄ ⊢ V : W →  ⦃h, L⦄ ⊢ ⓐV.T : ⓐV.U.
-#h #L #U #W #Y #H @(ntas_ind_dx … H) -U /2 width=1/ /3 width=2/
-qed.
-
-axiom pippo: ∀h,L,T,W,Y. ⦃h, L⦄ ⊢ T :* ⓛW.Y → ∀U. ⦃h, L⦄ ⊢ T : U →
-             ∃Z. ⦃h, L⦄ ⊢ U :* ⓛW.Z.
-(* REQUIRES SUBJECT CONVERSION
-#h #L #T #W #Y #H @(ntas_ind_dx … H) -T
-[ #U #HYU
-  elim (nta_fwd_correct … HYU) #U0 #HU0 
-  elim (nta_inv_bind1 … HYU) #W0 #Y0 #HW0 #HY0 #HY0U
-*)
-
-(* Advanced inversion lemmas on native type assignment for terms ************)
-
-fact nta_inv_pure1_aux: ∀h,L,Z,U. ⦃h, L⦄ ⊢ Z : U → ∀X,Y. Z = ⓐY.X →
-                        ∃∃W,V,T. ⦃h, L⦄ ⊢ Y : W & ⦃h, L⦄ ⊢ X : V &
-                                 L ⊢ ⓐY.V ⬌* U & ⦃h, L⦄ ⊢ V :* ⓛW.T.
-#h #L #Z #U #H elim H -L -Z -U
-[ #L #k #X #Y #H destruct
-| #L #K #V #W #U #i #_ #_ #_ #_ #X #Y #H destruct
-| #L #K #W #V #U #i #_ #_ #_ #_ #X #Y #H destruct
-| #I #L #V #W #T #U #_ #_ #_ #_ #X #Y #H destruct
-| #L #V #W #Z #U #HVW #HZU #_ #_ #X #Y #H destruct /2 width=7/
-| #L #V #W #Z #U #HZU #_ #_ #IHUW #X #Y #H destruct
-  elim (IHUW U Y ?) -IHUW // /3 width=9/
-| #L #Z #U #_ #_ #X #Y #H destruct
-| #L #Z #U1 #U2 #V2 #_ #HU12 #_ #IHTU1 #_ #X #Y #H destruct
-  elim (IHTU1 ???) -IHTU1 [4: // |2,3: skip ] #W #V #T #HYW #HXV #HU1 #HVT
-  lapply (cpcs_trans … HU1 … HU12) -U1 /2 width=7/
-]
-qed.
-
-(* Basic_1: was only: ty3_gen_appl *)
-lemma nta_inv_pure1: ∀h,L,Y,X,U. ⦃h, L⦄ ⊢ ⓐY.X : U →
-                     ∃∃W,V,T. ⦃h, L⦄ ⊢ Y : W & ⦃h, L⦄ ⊢ X : V &
-                              L ⊢ ⓐY.V ⬌* U & ⦃h, L⦄ ⊢ V :* ⓛW.T.
-/2 width=3/ qed-.
-
-axiom nta_inv_appl1: ∀h,L,Z,Y,X,U. ⦃h, L⦄ ⊢ ⓐZ.ⓛY.X : U →
-                     ∃∃W. ⦃h, L⦄ ⊢ Z : Y & ⦃h, L⦄ ⊢ ⓛY.X : ⓛY.W &
-                     L ⊢ ⓐZ.ⓛY.W ⬌* U.
-(* REQUIRES SUBJECT REDUCTION
-#h #L #Z #Y #X #U #H
-elim (nta_inv_pure1 … H) -H #W #V #T #HZW #HXV #HVU #HVT
-elim (nta_inv_bind1 … HXV) -HXV #Y0 #X0 #HY0 #HX0 #HX0V
-lapply (cpcs_trans … (ⓐZ.ⓛY.X0) … HVU) -HVU /2 width=1/ -HX0V #HX0U
-@(ex3_1_intro … HX0U) /2 width=2/
-*)
-*)
index c9ae6d1ebf90b6c5efb52825d0a2b4086fd1aacf..17259cb17e45bb9403c73526ecde7f95be0ba517 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/dynamic/nta.ma".
-include "basic_2/i_dynamic/ntas.ma".
+include "basic_2/dynamic/nta_preserve.ma".
+include "basic_2/i_dynamic/ntas_preserve.ma".
 
 (* ITERATED NATIVE TYPE ASSIGNMENT FOR TERMS ********************************)
 
+(* Properties with native type assignment for terms *************************)
+
+lemma nta_ntas (h) (a) (G) (L):
+      ∀T,U. ⦃G,L⦄ ⊢ T :[h,a] U → ⦃G,L⦄ ⊢ T :*[h,a,1] U.
+#h #a #G #L #T #U #H
+elim (cnv_inv_cast … H) -H /2 width=3 by ntas_intro/
+qed-.
+
+(* Inversion lemmas with native type assignment for terms *******************)
+
+lemma ntas_inv_nta (h) (a) (G) (L):
+      ∀T,U. ⦃G,L⦄ ⊢ T :*[h,a,1] U → ⦃G,L⦄ ⊢ T :[h,a] U.
+#h #a #G #L #T #U
+* /2 width=3 by cnv_cast/
+qed-.
+
+(* Note: this follows from ntas_inv_appl_sn *)
+lemma nta_inv_appl_sn_ntas (h) (a) (G) (L) (V) (T):
+      ∀X. ⦃G,L⦄ ⊢ ⓐV.T :[h,a] X →
+      ∨∨ ∃∃p,W,U,U0. ad a 0 & ⦃G,L⦄ ⊢ V :[h,a] W & ⦃G,L⦄ ⊢ T :*[h,a,0] ⓛ{p}W.U0 & ⦃G,L.ⓛW⦄ ⊢ U0 :[h,a] U & ⦃G,L⦄ ⊢ ⓐV.ⓛ{p}W.U ⬌*[h] X & ⦃G,L⦄ ⊢ X ![h,a]
+       | ∃∃n,p,W,U,U0. ad a (↑n) & ⦃G,L⦄ ⊢ V :[h,a] W & ⦃G,L⦄ ⊢ T :[h,a] U & ⦃G,L⦄ ⊢ U :*[h,a,n] ⓛ{p}W.U0 & ⦃G,L⦄ ⊢ ⓐV.U ⬌*[h] X & ⦃G,L⦄ ⊢ X ![h,a].
+#h #a #G #L #V #T #X #H
+(*
+lapply (nta_ntas … H) -H #H
+elim (ntas_inv_appl_sn … H) -H * #n #p #W #U #U0 #Hn #Ha #HVW #HTU #HU #HUX #HX
+[ elim (eq_or_gt n) #H destruct
+  [ <minus_n_O in HU; #HU -Hn
+    /4 width=8 by ntas_inv_nta, ex6_4_intro, or_introl/
+  | lapply (le_to_le_to_eq … Hn H) -Hn -H #H destruct
+    <minus_n_n in HU; #HU
+    @or_intror
+    @(ex6_5_intro … Ha … HUX HX) -Ha -X
+    [2,4: /2 width=2 by ntas_inv_nta/
+    |6: @ntas_refl
+*)
+elim (cnv_inv_cast … H) -H #X0 #HX #HVT #HX0 #HTX0
+elim (cnv_inv_appl … HVT) #n #p #W #U0 #Ha #HV #HT #HVW #HTU0
+elim (eq_or_gt n) #Hn destruct
+[ elim (cnv_fwd_cpms_abst_dx_le … HT … HTU0 1) [| // ] <minus_n_O #U #H #HU0
+  lapply (cpms_appl_dx … V V … H) [ // ] -H #H
+  elim (cnv_cpms_conf … HVT … HTX0 … H) -HVT -HTX0 -H <minus_n_n #X1 #HX01 #HUX1
+  lapply (cpms_trans … HX0 … HX01) -X0 #HX1
+  lapply (cprs_div … HUX1 … HX1) -X1 #HUX
+  lapply (cnv_cpms_trans … HT … HTU0) #H
+  elim (cnv_inv_bind … H) -H #_ #HU0
+  /4 width=8 by cnv_cpms_ntas, cnv_cpms_nta, ex6_4_intro, or_introl/
+| >(plus_minus_m_m_commutative … Hn) in HTU0; #H
+  elim (cpms_inv_plus … H) -H #U #HTU #HU0
+  lapply (cpms_appl_dx … V V … HTU) [ // ] #H
+  elim (cnv_cpms_conf … HVT … HTX0 … H) -HVT -HTX0 -H <minus_n_n #X1 #HX01 #HUX1
+  lapply (cpms_trans … HX0 … HX01) -X0 #HX1
+  lapply (cprs_div … HUX1 … HX1) -X1 #HUX
+  <(S_pred … Hn) in Ha; -Hn #Ha
+  /5 width=10 by cnv_cpms_ntas, cnv_cpms_nta, cnv_cpms_trans, ex6_5_intro, or_intror/
+]
+qed-.
+
 (*
 
 definition ntas: sh → lenv → relation term ≝
@@ -25,8 +82,8 @@ definition ntas: sh → lenv → relation term ≝
 (* Basic eliminators ********************************************************)
 
 axiom ntas_ind_dx: ∀h,L,T2. ∀R:predicate term. R T2 →
-                   (∀T1,T. ⦃h, L⦄ ⊢ T1 : T → ⦃h, L⦄ ⊢ T :* T2 → R T → R T1) →
-                   ∀T1. ⦃h, L⦄ ⊢ T1 :* T2 → R T1.
+                   (∀T1,T. ⦃h,L⦄ ⊢ T1 : T → ⦃h,L⦄ ⊢ T :* T2 → R T → R T1) →
+                   ∀T1. ⦃h,L⦄ ⊢ T1 :* T2 → R T1.
 (*
 #h #L #T2 #R #HT2 #IHT2 #T1 #HT12
 @(star_ind_dx … HT2 IHT2 … HT12) //
@@ -35,10 +92,10 @@ qed-.
 (* Basic properties *********************************************************)
 
 lemma ntas_strap1: ∀h,L,T1,T,T2.
-                   ⦃h, L⦄ ⊢ T1 :* T → ⦃h, L⦄  ⊢ T : T2 → ⦃h, L⦄  ⊢ T1 :* T2.
+                   ⦃h,L⦄ ⊢ T1 :* T → ⦃h,L⦄  ⊢ T : T2 → ⦃h,L⦄  ⊢ T1 :* T2.
 /2 width=3/ qed.
 
 lemma ntas_strap2: ∀h,L,T1,T,T2.
-                   ⦃h, L⦄  ⊢ T1 : T → ⦃h, L⦄ ⊢ T :* T2 → ⦃h, L⦄ ⊢ T1 :* T2.
+                   ⦃h,L⦄  ⊢ T1 : T → ⦃h,L⦄ ⊢ T :* T2 → ⦃h,L⦄ ⊢ T1 :* T2.
 /2 width=3/ qed.
 *)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/i_dynamic/ntas_preserve.ma b/matita/matita/contribs/lambdadelta/basic_2/i_dynamic/ntas_preserve.ma
new file mode 100644 (file)
index 0000000..5d391ca
--- /dev/null
@@ -0,0 +1,108 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_equivalence/cpcs_cprs.ma".
+include "basic_2/dynamic/cnv_preserve.ma".
+include "basic_2/i_dynamic/ntas.ma".
+
+(* ITERATED NATIVE TYPE ASSIGNMENT FOR TERMS ********************************)
+
+(* Properties based on preservation *****************************************)
+
+lemma cnv_cpms_ntas (h) (a) (G) (L):
+      ∀T. ⦃G,L⦄ ⊢ T ![h,a] → ∀n,U.⦃G,L⦄ ⊢ T ➡*[n,h] U → ⦃G,L⦄ ⊢ T :*[h,a,n] U.
+/3 width=4 by ntas_intro, cnv_cpms_trans/ qed.
+
+(* Inversion lemmas based on preservation ***********************************)
+
+lemma ntas_inv_appl_sn (h) (a) (m) (G) (L) (V) (T):
+      ∀X. ⦃G,L⦄ ⊢ ⓐV.T :*[h,a,m] X →
+      ∨∨ ∃∃n,p,W,U,U0. n ≤ m & ad a n & ⦃G,L⦄ ⊢ V :*[h,a,1] W & ⦃G,L⦄ ⊢ T :*[h,a,n] ⓛ{p}W.U0 & ⦃G,L.ⓛW⦄ ⊢ U0 :*[h,a,m-n] U & ⦃G,L⦄ ⊢ ⓐV.ⓛ{p}W.U ⬌*[h] X & ⦃G,L⦄ ⊢ X ![h,a]
+       | ∃∃n,p,W,U,U0. m ≤ n & ad a n & ⦃G,L⦄ ⊢ V :*[h,a,1] W & ⦃G,L⦄ ⊢ T :*[h,a,m] U & ⦃G,L⦄ ⊢ U :*[h,a,n-m] ⓛ{p}W.U0 & ⦃G,L⦄ ⊢ ⓐV.U ⬌*[h] X & ⦃G,L⦄ ⊢ X ![h,a].
+#h #a #m #G #L #V #T #X
+* #X0 #HX #HVT #HX0 #HTX0
+elim (cnv_inv_appl … HVT) #n #p #W #U0 #Ha #HV #HT #HVW #HTU0
+elim (le_or_ge n m) #Hnm
+[ elim (cnv_fwd_cpms_abst_dx_le … HT … HTU0 … Hnm) #U #H #HU0
+  lapply (cpms_appl_dx … V V … H) [ // ] -H #H
+  elim (cnv_cpms_conf … HVT … HTX0 … H) -HVT -HTX0 -H <minus_n_n #X1 #HX01 #HUX1
+  lapply (cpms_trans … HX0 … HX01) -X0 #HX1
+  lapply (cprs_div … HUX1 … HX1) -X1 #HUX
+  lapply (cnv_cpms_trans … HT … HTU0) #H
+  elim (cnv_inv_bind … H) -H #_ #HU0
+  /4 width=11 by cnv_cpms_ntas, ex7_5_intro, or_introl/
+| >(plus_minus_m_m_commutative … Hnm) in HTU0; #H
+  elim (cpms_inv_plus … H) -H #U #HTU #HU0
+  lapply (cpms_appl_dx … V V … HTU) [ // ] #H
+  elim (cnv_cpms_conf … HVT … HTX0 … H) -HVT -HTX0 -H <minus_n_n #X1 #HX01 #HUX1
+  lapply (cpms_trans … HX0 … HX01) -X0 #HX1
+  lapply (cprs_div … HUX1 … HX1) -X1 #HUX
+  /5 width=11 by cnv_cpms_ntas, cnv_cpms_trans, ex7_5_intro, or_intror/
+]
+qed-.
+
+(*
+(* Advanced properties on native type assignment for terms ******************)
+
+lemma nta_pure_ntas: ∀h,L,U,W,Y. ⦃h,L⦄ ⊢ U :* ⓛW.Y → ∀T. ⦃h,L⦄ ⊢ T : U →
+                     ∀V. ⦃h,L⦄ ⊢ V : W →  ⦃h,L⦄ ⊢ ⓐV.T : ⓐV.U.
+#h #L #U #W #Y #H @(ntas_ind_dx … H) -U /2 width=1/ /3 width=2/
+qed.
+
+axiom pippo: ∀h,L,T,W,Y. ⦃h,L⦄ ⊢ T :* ⓛW.Y → ∀U. ⦃h,L⦄ ⊢ T : U →
+             ∃Z. ⦃h,L⦄ ⊢ U :* ⓛW.Z.
+(* REQUIRES SUBJECT CONVERSION
+#h #L #T #W #Y #H @(ntas_ind_dx … H) -T
+[ #U #HYU
+  elim (nta_fwd_correct … HYU) #U0 #HU0 
+  elim (nta_inv_bind1 … HYU) #W0 #Y0 #HW0 #HY0 #HY0U
+*)
+
+(* Advanced inversion lemmas on native type assignment for terms ************)
+
+fact nta_inv_pure1_aux: ∀h,L,Z,U. ⦃h,L⦄ ⊢ Z : U → ∀X,Y. Z = ⓐY.X →
+                        ∃∃W,V,T. ⦃h,L⦄ ⊢ Y : W & ⦃h,L⦄ ⊢ X : V &
+                                 L ⊢ ⓐY.V ⬌* U & ⦃h,L⦄ ⊢ V :* ⓛW.T.
+#h #L #Z #U #H elim H -L -Z -U
+[ #L #k #X #Y #H destruct
+| #L #K #V #W #U #i #_ #_ #_ #_ #X #Y #H destruct
+| #L #K #W #V #U #i #_ #_ #_ #_ #X #Y #H destruct
+| #I #L #V #W #T #U #_ #_ #_ #_ #X #Y #H destruct
+| #L #V #W #Z #U #HVW #HZU #_ #_ #X #Y #H destruct /2 width=7/
+| #L #V #W #Z #U #HZU #_ #_ #IHUW #X #Y #H destruct
+  elim (IHUW U Y ?) -IHUW // /3 width=9/
+| #L #Z #U #_ #_ #X #Y #H destruct
+| #L #Z #U1 #U2 #V2 #_ #HU12 #_ #IHTU1 #_ #X #Y #H destruct
+  elim (IHTU1 ???) -IHTU1 [4: // |2,3: skip ] #W #V #T #HYW #HXV #HU1 #HVT
+  lapply (cpcs_trans … HU1 … HU12) -U1 /2 width=7/
+]
+qed.
+
+(* Basic_1: was only: ty3_gen_appl *)
+lemma nta_inv_pure1: ∀h,L,Y,X,U. ⦃h,L⦄ ⊢ ⓐY.X : U →
+                     ∃∃W,V,T. ⦃h,L⦄ ⊢ Y : W & ⦃h,L⦄ ⊢ X : V &
+                              L ⊢ ⓐY.V ⬌* U & ⦃h,L⦄ ⊢ V :* ⓛW.T.
+/2 width=3/ qed-.
+
+axiom nta_inv_appl1: ∀h,L,Z,Y,X,U. ⦃h,L⦄ ⊢ ⓐZ.ⓛY.X : U →
+                     ∃∃W. ⦃h,L⦄ ⊢ Z : Y & ⦃h,L⦄ ⊢ ⓛY.X : ⓛY.W &
+                     L ⊢ ⓐZ.ⓛY.W ⬌* U.
+(* REQUIRES SUBJECT REDUCTION
+#h #L #Z #Y #X #U #H
+elim (nta_inv_pure1 … H) -H #W #V #T #HZW #HXV #HVU #HVT
+elim (nta_inv_bind1 … HXV) -HXV #Y0 #X0 #HY0 #HX0 #HX0V
+lapply (cpcs_trans … (ⓐZ.ⓛY.X0) … HVU) -HVU /2 width=1/ -HX0V #HX0U
+@(ex3_1_intro … HX0U) /2 width=2/
+*)
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/colon_5.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/colon_5.ma
deleted file mode 100644 (file)
index ae11ded..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 :[ break term 46 h ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'Colon $h $G $L $T1 $T2 }.
index 96a32c2308b456f75c96974b55ec395255ca1bbc..8807cb549422820def568acc6d831e1cb0e89ee0 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
 
-notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 :[ break term 46 a, break term 46 h ] break term 46 T2 )"
+notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 :[ break term 46 h, break term 46 a ] break term 46 T2 )"
    non associative with precedence 45
-   for @{ 'Colon $a $h $G $L $T1 $T2 }.
+   for @{ 'Colon $h $a $G $L $T1 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/colon_7.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/colon_7.ma
deleted file mode 100644 (file)
index 6d9fb69..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 :[ break term 46 a, break term 46 h, break term 46 n ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'Colon $a $h $n $G $L $T1 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/colonstar_5.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/colonstar_5.ma
deleted file mode 100644 (file)
index edbdd67..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 :*[ break term 46 h ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'ColonStar $h $G $L $T1 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/colonstar_6.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/colonstar_6.ma
deleted file mode 100644 (file)
index 72fbe6e..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 :*[ break term 46 h, break term 46 n ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'ColonStar $h $n $G $L $T1 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/colonstar_7.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/colonstar_7.ma
new file mode 100644 (file)
index 0000000..d459e10
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 :*[ break term 46 h, break term 46 a, break term 46 n ] break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'ColonStar $h $a $n $G $L $T1 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/exclaim_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/exclaim_4.ma
deleted file mode 100644 (file)
index d305586..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T ![ break term 46 h ] )"
-   non associative with precedence 45
-   for @{ 'Exclaim $h $G $L $T }.
index 15287584d555a5eebb5633630decacb6dc404898..58d0c539baad5e3c397eeaa95da571f8cf9788e6 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
 
-notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T ![ break term 46 a, break term 46 h ] )"
+notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T ![ break term 46 h, break term 46 a ] )"
    non associative with precedence 45
-   for @{ 'Exclaim $a $h $G $L $T }.
+   for @{ 'Exclaim $h $a $G $L $T }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/exclaimstar_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/exclaimstar_4.ma
deleted file mode 100644 (file)
index 7246d41..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T !*[ break term 46 h ] )"
-   non associative with precedence 45
-   for @{ 'ExclaimStar $h $G $L $T }.
index ff931332267a361d12fa124158356a2f5efd1ef3..c93efe31e0eb54d9714de6a38f6cfea8076b6ee4 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
 
-notation "hvbox( G ⊢ break term 46 L1 ⫃![ break term 46 a, break term 46 h ] break term 46 L2 )"
+notation "hvbox( G ⊢ break term 46 L1 ⫃![ break term 46 h, break term 46 a ] break term 46 L2 )"
    non associative with precedence 45
-   for @{ 'LRSubEqV $a $h $G $L1 $L2 }.
+   for @{ 'LRSubEqV $h $a $G $L1 $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lsubeqx_6.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/lsubeqx_6.ma
deleted file mode 100644 (file)
index 7f9afe8..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( G ⊢ break term 46 L1 ⊆ⓧ [ break term 46 h, break term 46 o, break term 46 f ] break term 46 L2 )"
-   non associative with precedence 45
-   for @{ 'LSubEqX $h $o $f $G $L1 $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/pconvstar_7.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/pconvstar_7.ma
new file mode 100644 (file)
index 0000000..a89f13d
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 ⬌* [ break term 46 h, break term 46 n1, break term 46 n2 ] break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'PConvStar $h $n1 $n2 $G $L $T1 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predeval_5.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predeval_5.ma
new file mode 100644 (file)
index 0000000..cee1d03
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 ➡* [ break term 46 h ] 𝐍 ⦃ break term 46 T2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'PRedEval $h $G $L $T1 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predeval_6.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predeval_6.ma
new file mode 100644 (file)
index 0000000..549a790
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 ➡* [ break term 46 h, break term 46 n ] 𝐍 ⦃ break term 46 T2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'PRedEval $h $n $G $L $T1 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predevalwstar_6.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predevalwstar_6.ma
new file mode 100644 (file)
index 0000000..065aeb2
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 ➡*𝐍𝐖*[ break term 46 h, break term 46 n ] break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'PRedEvalWStar $h $n $G $L $T1 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/preditnormal_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/preditnormal_4.ma
new file mode 100644 (file)
index 0000000..1defb54
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ ➡𝐍𝐖*[ break term 46 h ] break term 46 T )"
+   non associative with precedence 45
+   for @{ 'PRedITNormal $h $G $L $T }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/prednormal_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/prednormal_4.ma
new file mode 100644 (file)
index 0000000..c718260
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ ➡ [ break term 46 h ] 𝐍 ⦃ break term 46 T ⦄ )"
+   non associative with precedence 45
+   for @{ 'PRedNormal $h $G $L $T }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsnstar_3.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsnstar_3.ma
deleted file mode 100644 (file)
index 75777fb..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G, break term 46 L1 ⦄ ⊢ ➡* break term 46 L2 )"
-   non associative with precedence 45
-   for @{ 'PRedSnStar $G $L1 $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubty_7.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubty_7.ma
new file mode 100644 (file)
index 0000000..295c066
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≽ [ break term 46 h ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'PRedSubTy $h $G1 $L1 $T1 $G2 $L2 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubty_8.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubty_8.ma
deleted file mode 100644 (file)
index d7a706d..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≽ [ break term 46 h, break term 46 o ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'PRedSubTy $h $o $G1 $L1 $T1 $G2 $L2 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtyproper_7.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtyproper_7.ma
new file mode 100644 (file)
index 0000000..8568de9
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≻ [ break term 46 h ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'PRedSubTyProper $h $G1 $L1 $T1 $G2 $L2 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtyproper_8.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtyproper_8.ma
deleted file mode 100644 (file)
index 6dc58b0..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≻ [ break term 46 h, break term 46 o ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'PRedSubTyProper $h $o $G1 $L1 $T1 $G2 $L2 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtystar_7.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtystar_7.ma
new file mode 100644 (file)
index 0000000..1e33dd2
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≥ [ break term 46 h ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'PRedSubTyStar $h $G1 $L1 $T1 $G2 $L2 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtystar_8.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtystar_8.ma
deleted file mode 100644 (file)
index 75f409c..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≥ [ break term 46 h, break term 46 o ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'PRedSubTyStar $h $o $G1 $L1 $T1 $G2 $L2 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtystarproper_7.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtystarproper_7.ma
new file mode 100644 (file)
index 0000000..161820f
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ > [ break term 46 h ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'PRedSubTyStarProper $h $G1 $L1 $T1 $G2 $L2 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtystarproper_8.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtystarproper_8.ma
deleted file mode 100644 (file)
index 15b61d6..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ > [ break term 46 h, break term 46 o ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'PRedSubTyStarProper $h $o $G1 $L1 $T1 $G2 $L2 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtystrong_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtystrong_4.ma
new file mode 100644 (file)
index 0000000..d36f44f
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ≥ [ term 46 h ] 𝐒 ⦃ break term 46 G, break term 46 L, break term 46 T ⦄ )"
+   non associative with precedence 45
+   for @{ 'PRedSubTyStrong $h $G $L $T }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtystrong_5.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predsubtystrong_5.ma
deleted file mode 100644 (file)
index adc3137..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ≥ [ term 46 h, break term 46 o ] 𝐒 ⦃ break term 46 G, break term 46 L, break term 46 T ⦄ )"
-   non associative with precedence 45
-   for @{ 'PRedSubTyStrong $h $o $G $L $T }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predtynormal_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predtynormal_4.ma
new file mode 100644 (file)
index 0000000..21c22ee
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ ⬈ [ break term 46 h ] 𝐍 ⦃ break term 46 T ⦄ )"
+   non associative with precedence 45
+   for @{ 'PRedTyNormal $h $G $L $T }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predtynormal_5.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predtynormal_5.ma
deleted file mode 100644 (file)
index dca225a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ ⬈ [ break term 46 h, break term 46 o ] 𝐍 ⦃ break term 46 T ⦄ )"
-   non associative with precedence 45
-   for @{ 'PRedTyNormal $h $o $G $L $T }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predtysnstrong_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predtysnstrong_4.ma
new file mode 100644 (file)
index 0000000..6602630
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( G ⊢ ⬈ * [ break term 46 h, break term 46 T ] 𝐒 ⦃ break term 46 L ⦄ )"
+   non associative with precedence 45
+   for @{ 'PRedTySNStrong $h $T $G $L }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predtysnstrong_5.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predtysnstrong_5.ma
deleted file mode 100644 (file)
index c86dc86..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( G ⊢ ⬈ * [ break term 46 h, break term 46 o, break term 46 T ] 𝐒 ⦃ break term 46 L ⦄ )"
-   non associative with precedence 45
-   for @{ 'PRedTySNStrong $h $o $T $G $L }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predtystrong_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predtystrong_4.ma
new file mode 100644 (file)
index 0000000..34fb898
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ ⬈ * [ break term 46 h] 𝐒 ⦃ break term 46 T ⦄ )"
+   non associative with precedence 45
+   for @{ 'PRedTyStrong $h $G $L $T }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predtystrong_5.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/predtystrong_5.ma
deleted file mode 100644 (file)
index 141a8e8..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ ⬈ * [ break term 46 h, break term 46 o ] 𝐒 ⦃ break term 46 T ⦄ )"
-   non associative with precedence 45
-   for @{ 'PRedTyStrong $h $o $G $L $T }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/topredtysnstrong_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/topredtysnstrong_4.ma
new file mode 100644 (file)
index 0000000..7b0f2e4
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( G ⊢ break term 46 L1 ⊒[ break term 46 h] break term 46 L2 )"
+   non associative with precedence 45
+   for @{ 'ToPRedTySNStrong $h $G $L1 $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cnuw.ma
new file mode 100644 (file)
index 0000000..45b6552
--- /dev/null
@@ -0,0 +1,76 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/notation/relations/preditnormal_4.ma".
+include "static_2/syntax/tweq.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 ➡*[n,h] T2 → T1 ≅ T2.
+
+interpretation
+  "normality for t-unbound weak head context-sensitive parallel rt-transition (term)"
+  'PRedITNormal h G L T = (cnuw h G L T).
+
+(* Basic properties *********************************************************)
+
+lemma cnuw_sort (h) (G) (L): ∀s. ⦃G,L⦄ ⊢ ➡𝐍𝐖*[h] ⋆s.
+#h #G #L #s1 #n #X #H
+lapply (cpms_inv_sort1 … H) -H #H destruct //
+qed.
+
+lemma cnuw_ctop (h) (G): ∀i. ⦃G,⋆⦄ ⊢ ➡𝐍𝐖*[h] #i.
+#h #G #i #n #X #H
+elim (cpms_inv_lref1_ctop … H) -H #H #_ destruct //
+qed.
+
+lemma cnuw_zero_unit (h) (G) (L): ∀I. ⦃G,L.ⓤ{I}⦄ ⊢ ➡𝐍𝐖*[h] #0.
+#h #G #L #I #n #X #H
+elim (cpms_inv_zero1_unit … H) -H #H #_ destruct //
+qed.
+
+lemma cnuw_gref (h) (G) (L): ∀l. ⦃G,L⦄ ⊢ ➡𝐍𝐖*[h] §l.
+#h #G #L #l1 #n #X #H
+elim (cpms_inv_gref1 … H) -H #H #_ destruct //
+qed.
+
+(* Basic_inversion lemmas ***************************************************)
+
+lemma cnuw_inv_zero_pair (h) (I) (G) (L): ∀V. ⦃G,L.ⓑ{I}V⦄ ⊢ ➡𝐍𝐖*[h] #0 → ⊥.
+#h * #G #L #V #H
+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
+/2 width=5 by lifts_inv_lref2_uni_lt/
+qed-.
+
+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/
+qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+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/
+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
new file mode 100644 (file)
index 0000000..6cde759
--- /dev/null
@@ -0,0 +1,106 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/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/lprs_cpms.ma".
+
+(* NORMAL TERMS FOR T-UNUNBOUND WHD RT-TRANSITION ***************************)
+
+(* Advanced inversion lemmas ************************************************)
+
+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
+/3 width=2 by/
+qed-.
+
+(* Advanced properties ******************************************************)
+
+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/
+| #X1 #_ #_ #H destruct
+]
+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/
+qed.
+
+lemma cnuw_cpms_trans (h) (n) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ ➡𝐍𝐖*[h] T1 →
+      ∀T2. ⦃G,L⦄ ⊢ T1 ➡*[n,h] 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/
+qed-.
+
+lemma cnuw_dec_ex (h) (G) (L):
+      ∀T1. ∨∨ ⦃G,L⦄ ⊢ ➡𝐍𝐖*[h] T1
+            | ∃∃n,T2. ⦃G,L⦄ ⊢ T1 ➡*[n,h] 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)
+  [ /3 width=7 by cnuw_atom_drops, or_introl/
+  | * * [ #I | * #V ] #K #HLK
+    [ /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
+      /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
+      /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
+    /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/
+  ]
+| * #V1 #T1 #_ #IH
+  [ elim (simple_dec_ex T1) [ #HT1 | * #p * #W1 #U1 #H destruct ]
+    [ elim IH -IH
+      [ /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/
+      ]
+    | 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
+    | @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
+    ]
+  | @or_intror @(ex2_2_intro … T1) [1,2: /2 width=2 by cpms_eps/ ] #H
+    /2 width=4 by tweq_inv_cast_xy_y/
+  ]
+]
+qed-.
+
+lemma cnuw_dec (h) (G) (L): ∀T. Decidable (⦃G,L⦄ ⊢ ➡𝐍𝐖*[h] T).
+#h #G #L #T1
+elim (cnuw_dec_ex h G L T1)
+[ /2 width=1 by or_introl/
+| * #n #T2 #HT12 #nT12 /4 width=2 by or_intror/
+]
+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
new file mode 100644 (file)
index 0000000..374aa12
--- /dev/null
@@ -0,0 +1,64 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/relocation/lifts_tweq.ma".
+include "basic_2/rt_computation/cpms_drops.ma".
+include "basic_2/rt_computation/cnuw.ma".
+
+(* NORMAL TERMS FOR T-UNUNBOUND WHD RT-TRANSITION ***************************)
+
+(* Properties with generic relocation ***************************************)
+
+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/
+qed-.
+
+(* Inversion lemmas with generic relocation *********************************)
+
+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/
+qed-.
+
+(* Advanced properties ******************************************************)
+
+lemma cnuw_lref (h) (I) (G) (L):
+      ∀i. ⦃G,L⦄ ⊢ ➡𝐍𝐖*[h] #i → ⦃G,L.ⓘ{I}⦄ ⊢ ➡𝐍𝐖*[h] #↑i.
+#h #I #G #L #i #Hi #n #X2 #H
+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 (lifts_inv_lref1_uni … HTX2) -HTX2 #H destruct //
+]
+qed.
+
+lemma cnuw_atom_drops (h) (b) (G) (L):
+      ∀i. ⬇*[b,𝐔❴i❵] L ≘ ⋆ → ⦃G,L⦄ ⊢ ➡𝐍𝐖*[h] #i.
+#h #b #G #L #i #Hi #n #X #H
+elim (cpms_inv_lref1_drops … H) -H * [ // || #m ] #K #V1 #V2 #HLK
+lapply (drops_gen b … HLK) -HLK #HLK
+lapply (drops_mono … Hi … HLK) -L #H destruct
+qed.
+
+lemma cnuw_unit_drops (h) (I) (G) (L):
+      ∀K,i. ⬇*[i] L ≘ K.ⓤ{I} → ⦃G,L⦄ ⊢ ➡𝐍𝐖*[h] #i.
+#h #I #G #L #K #i #HLK #n #X #H
+elim (cpms_inv_lref1_drops … H) -H * [ // || #m ] #Y #V1 #V2 #HLY
+lapply (drops_mono … HLK … HLY) -L #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
new file mode 100644 (file)
index 0000000..d32e1b1
--- /dev/null
@@ -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/syntax/tweq_simple.ma".
+include "basic_2/rt_computation/cpms_cpms.ma".
+include "basic_2/rt_computation/cnuw.ma".
+
+(* NORMAL TERMS FOR T-UNUNBOUND WHD RT-TRANSITION ***************************)
+
+(* Advanced forward lemma with with simple terms ****************************)
+(*
+lemma cnuw_fwd_appl_simple (h) (G) (L):
+      ∀V,T. ⦃G,L⦄ ⊢ ➡𝐍𝐖*[h] ⓐV.T → 𝐒⦃T⦄.
+#h #G #L #V #T #HT
+elim (simple_dec_ex T) [ // ] * #p #I #W #U #H destruct
+*)
+(* Advanced properties with simple terms ************************************)
+
+lemma cnuw_appl_simple (h) (G) (L):
+      ∀V,T. 𝐒⦃T⦄ → ⦃G,L⦄ ⊢ ➡𝐍𝐖*[h] T → ⦃G,L⦄ ⊢ ➡𝐍𝐖*[h] ⓐV.T.
+#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/
+| #n1 #n2 #p #V2 #T2 #HT12 #_ #_ -n -n2
+  lapply (H2T1 … HT12) -H2T1 -n1 #H
+  lapply (tweq_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
+  elim (simple_inv_bind … H)
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpme.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpme.ma
new file mode 100644 (file)
index 0000000..dcee3eb
--- /dev/null
@@ -0,0 +1,39 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/notation/relations/predeval_6.ma".
+include "basic_2/rt_transition/cnr.ma".
+include "basic_2/rt_computation/cpms.ma".
+
+(* EVALUATION FOR T-BOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION ON TERMS *)
+
+(* Basic_2A1: uses: cpre *)
+definition cpme (h) (n) (G) (L): relation2 term term ≝
+           λT1,T2. ∧∧ ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 & ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃T2⦄.
+
+interpretation "evaluation for t-bound context-sensitive parallel rt-transition (term)"
+   'PRedEval h n G L T1 T2 = (cpme h n G L T1 T2).
+
+(* Basic properties *********************************************************)
+
+lemma cpme_intro (h) (n) (G) (L):
+      ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 → ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃T2⦄ → ⦃G,L⦄⊢T1➡*[h,n]𝐍⦃T2⦄.
+/2 width=1 by conj/ qed.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma cpme_fwd_cpms (h) (n) (G) (L):
+      ∀T1,T2. ⦃G,L⦄⊢T1➡*[h,n]𝐍⦃T2⦄ → ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2.
+#h #n #G #L #T1 #T2 * //
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpme_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpme_aaa.ma
new file mode 100644 (file)
index 0000000..6d61825
--- /dev/null
@@ -0,0 +1,32 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/csx_aaa.ma".
+include "basic_2/rt_computation/cpms_aaa.ma".
+include "basic_2/rt_computation/cpre_csx.ma".
+include "basic_2/rt_computation/cpre_cpms.ma".
+
+(* EVALUATION FOR T-BOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION ON TERMS *)
+
+(* Properties with atomic atomic arity assignment on terms ******************)
+
+lemma cpme_total_aaa (h) (n) (A) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ T1 ⁝ A → ∃T2. ⦃G,L⦄ ⊢ T1 ➡*[h,n] 𝐍⦃T2⦄.
+#h #n #A #G #L #T1 #HT1
+elim (cpms_total_aaa h … n … HT1) #T0 #HT10
+elim (cpre_total_csx h G L T0)
+[ #T2 /3 width=4 by cpms_cpre_trans, ex_intro/
+| /4 width=4 by cpms_fwd_cpxs, aaa_csx, csx_cpxs_trans/
+]
+qed-.
index 454ee83127c6499287d18df4e8decbff5ce1ae03..2f7d1f449b826168cc3ec6c31f53048f22657732 100644 (file)
@@ -35,15 +35,15 @@ interpretation
 
 lemma cpms_ind_sn (h) (G) (L) (T2) (Q:relation2 …):
                   Q 0 T2 →
-                  (∀n1,n2,T1,T. ⦃G, L⦄ ⊢ T1 ➡[n1, h] T → ⦃G, L⦄ ⊢ T ➡*[n2, h] T2 → Q n2 T → Q (n1+n2) T1) →
-                  ∀n,T1. ⦃G, L⦄ ⊢ T1 ➡*[n, h] T2 → Q n T1.
+                  (∀n1,n2,T1,T. ⦃G,L⦄ ⊢ T1 ➡[n1,h] T → ⦃G,L⦄ ⊢ T ➡*[n2,h] T2 → Q n2 T → Q (n1+n2) T1) →
+                  ∀n,T1. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 → Q n T1.
 #h #G #L #T2 #Q @ltc_ind_sn_refl //
 qed-.
 
 lemma cpms_ind_dx (h) (G) (L) (T1) (Q:relation2 …):
                   Q 0 T1 →
-                  (∀n1,n2,T,T2. ⦃G, L⦄ ⊢ T1 ➡*[n1, h] T → Q n1 T → ⦃G, L⦄ ⊢ T ➡[n2, h] T2 → Q (n1+n2) T2) →
-                  ∀n,T2. ⦃G, L⦄ ⊢ T1 ➡*[n, h] T2 → Q n T2.
+                  (∀n1,n2,T,T2. ⦃G,L⦄ ⊢ T1 ➡*[n1,h] T → Q n1 T → ⦃G,L⦄ ⊢ T ➡[n2,h] T2 → Q (n1+n2) T2) →
+                  ∀n,T2. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 → Q n T2.
 #h #G #L #T1 #Q @ltc_ind_dx_refl //
 qed-.
 
@@ -52,36 +52,36 @@ qed-.
 (* Basic_1: includes: pr1_pr0 *)
 (* Basic_1: uses: pr3_pr2 *)
 (* Basic_2A1: includes: cpr_cprs *)
-lemma cpm_cpms (h) (G) (L): ∀n,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[n, h] T2 → ⦃G, L⦄ ⊢ T1 ➡*[n, h] T2.
+lemma cpm_cpms (h) (G) (L): ∀n,T1,T2. ⦃G,L⦄ ⊢ T1 ➡[n,h] T2 → ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2.
 /2 width=1 by ltc_rc/ qed.
 
-lemma cpms_step_sn (h) (G) (L): ∀n1,T1,T. ⦃G, L⦄ ⊢ T1 ➡[n1, h] T →
-                                ∀n2,T2. ⦃G, L⦄ ⊢ T ➡*[n2, h] T2 → ⦃G, L⦄ ⊢ T1 ➡*[n1+n2, h] T2.
+lemma cpms_step_sn (h) (G) (L): ∀n1,T1,T. ⦃G,L⦄ ⊢ T1 ➡[n1,h] T →
+                                ∀n2,T2. ⦃G,L⦄ ⊢ T ➡*[n2,h] T2 → ⦃G,L⦄ ⊢ T1 ➡*[n1+n2,h] T2.
 /2 width=3 by ltc_sn/ qed-.
 
-lemma cpms_step_dx (h) (G) (L): ∀n1,T1,T. ⦃G, L⦄ ⊢ T1 ➡*[n1, h] T →
-                                ∀n2,T2. ⦃G, L⦄ ⊢ T ➡[n2, h] T2 → ⦃G, L⦄ ⊢ T1 ➡*[n1+n2, h] T2.
+lemma cpms_step_dx (h) (G) (L): ∀n1,T1,T. ⦃G,L⦄ ⊢ T1 ➡*[n1,h] T →
+                                ∀n2,T2. ⦃G,L⦄ ⊢ T ➡[n2,h] T2 → ⦃G,L⦄ ⊢ T1 ➡*[n1+n2,h] T2.
 /2 width=3 by ltc_dx/ qed-.
 
 (* Basic_2A1: uses: cprs_bind_dx *)
 lemma cpms_bind_dx (n) (h) (G) (L):
-                   ∀V1,V2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 →
-                   ∀I,T1,T2. ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ➡*[n, h] T2 →
-                   ∀p. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ➡*[n, h] ⓑ{p,I}V2.T2.
+                   ∀V1,V2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 →
+                   ∀I,T1,T2. ⦃G,L.ⓑ{I}V1⦄ ⊢ T1 ➡*[n,h] T2 →
+                   ∀p. ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ➡*[n,h] ⓑ{p,I}V2.T2.
 #n #h #G #L #V1 #V2 #HV12 #I #T1 #T2 #H #a @(cpms_ind_sn … H) -T1
 /3 width=3 by cpms_step_sn, cpm_cpms, cpm_bind/ qed.
 
 lemma cpms_appl_dx (n) (h) (G) (L):
-                   ∀V1,V2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 →
-                   ∀T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[n, h] T2 →
-                   ⦃G, L⦄ ⊢ ⓐV1.T1 ➡*[n, h] ⓐV2.T2.
+                   ∀V1,V2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 →
+                   ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 →
+                   ⦃G,L⦄ ⊢ ⓐV1.T1 ➡*[n,h] ⓐV2.T2.
 #n #h #G #L #V1 #V2 #HV12 #T1 #T2 #H @(cpms_ind_sn … H) -T1
 /3 width=3 by cpms_step_sn, cpm_cpms, cpm_appl/
 qed.
 
 lemma cpms_zeta (n) (h) (G) (L):
                 ∀T1,T. ⬆*[1] T ≘ T1 →
-                ∀V,T2. ⦃G, L⦄ ⊢ T ➡*[n, h] T2 → ⦃G, L⦄ ⊢ +ⓓV.T1 ➡*[n, h] T2.
+                ∀V,T2. ⦃G,L⦄ ⊢ T ➡*[n,h] T2 → ⦃G,L⦄ ⊢ +ⓓV.T1 ➡*[n,h] T2.
 #n #h #G #L #T1 #T #HT1 #V #T2 #H @(cpms_ind_dx … H) -T2
 /3 width=3 by cpms_step_dx, cpm_cpms, cpm_zeta/
 qed.
@@ -89,22 +89,22 @@ qed.
 (* Basic_2A1: uses: cprs_zeta *)
 lemma cpms_zeta_dx (n) (h) (G) (L):
                    ∀T2,T. ⬆*[1] T2 ≘ T →
-                   ∀V,T1. ⦃G, L.ⓓV⦄ ⊢ T1 ➡*[n, h] T → ⦃G, L⦄ ⊢ +ⓓV.T1 ➡*[n, h] T2.
+                   ∀V,T1. ⦃G,L.ⓓV⦄ ⊢ T1 ➡*[n,h] T → ⦃G,L⦄ ⊢ +ⓓV.T1 ➡*[n,h] T2.
 #n #h #G #L #T2 #T #HT2 #V #T1 #H @(cpms_ind_sn … H) -T1
 /3 width=3 by cpms_step_sn, cpm_cpms, cpm_bind, cpm_zeta/
 qed.
 
 (* Basic_2A1: uses: cprs_eps *)
 lemma cpms_eps (n) (h) (G) (L):
-               ∀T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[n, h] T2 →
-               ∀V. ⦃G, L⦄ ⊢ ⓝV.T1 ➡*[n, h] T2.
+               ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 →
+               ∀V. ⦃G,L⦄ ⊢ ⓝV.T1 ➡*[n,h] T2.
 #n #h #G #L #T1 #T2 #H @(cpms_ind_sn … H) -T1
 /3 width=3 by cpms_step_sn, cpm_cpms, cpm_eps/
 qed.
 
 lemma cpms_ee (n) (h) (G) (L):
-              ∀U1,U2. ⦃G, L⦄ ⊢ U1 ➡*[n, h] U2 →
-              ∀T. ⦃G, L⦄ ⊢ ⓝU1.T ➡*[↑n, h] U2.
+              ∀U1,U2. ⦃G,L⦄ ⊢ U1 ➡*[n,h] U2 →
+              ∀T. ⦃G,L⦄ ⊢ ⓝU1.T ➡*[↑n,h] U2.
 #n #h #G #L #U1 #U2 #H @(cpms_ind_sn … H) -U1 -n
 [ /3 width=1 by cpm_cpms, cpm_ee/
 | #n1 #n2 #U1 #U #HU1 #HU2 #_ #T >plus_S1
@@ -114,21 +114,21 @@ qed.
 
 (* Basic_2A1: uses: cprs_beta_dx *)
 lemma cpms_beta_dx (n) (h) (G) (L):
-                   ∀V1,V2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 →
-                   ∀W1,W2. ⦃G, L⦄ ⊢ W1 ➡[h] W2 →
-                   ∀T1,T2. ⦃G, L.ⓛW1⦄ ⊢ T1 ➡*[n, h] T2 →
-                   ∀p. ⦃G, L⦄ ⊢ ⓐV1.ⓛ{p}W1.T1 ➡*[n, h] ⓓ{p}ⓝW2.V2.T2.
+                   ∀V1,V2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 →
+                   ∀W1,W2. ⦃G,L⦄ ⊢ W1 ➡[h] W2 →
+                   ∀T1,T2. ⦃G,L.ⓛW1⦄ ⊢ T1 ➡*[n,h] T2 →
+                   ∀p. ⦃G,L⦄ ⊢ ⓐV1.ⓛ{p}W1.T1 ➡*[n,h] ⓓ{p}ⓝW2.V2.T2.
 #n #h #G #L #V1 #V2 #HV12 #W1 #W2 #HW12 #T1 #T2 #H @(cpms_ind_dx … H) -T2
 /4 width=7 by cpms_step_dx, cpm_cpms, cpms_bind_dx, cpms_appl_dx, cpm_beta/
 qed.
 
 (* Basic_2A1: uses: cprs_theta_dx *)
 lemma cpms_theta_dx (n) (h) (G) (L):
-                    ∀V1,V. ⦃G, L⦄ ⊢ V1 ➡[h] V →
+                    ∀V1,V. ⦃G,L⦄ ⊢ V1 ➡[h] V →
                     ∀V2. ⬆*[1] V ≘ V2 →
-                    ∀W1,W2. ⦃G, L⦄ ⊢ W1 ➡[h] W2 →
-                    ∀T1,T2. ⦃G, L.ⓓW1⦄ ⊢ T1 ➡*[n, h] T2 →
-                    ∀p. ⦃G, L⦄ ⊢ ⓐV1.ⓓ{p}W1.T1 ➡*[n, h] ⓓ{p}W2.ⓐV2.T2.
+                    ∀W1,W2. ⦃G,L⦄ ⊢ W1 ➡[h] W2 →
+                    ∀T1,T2. ⦃G,L.ⓓW1⦄ ⊢ T1 ➡*[n,h] T2 →
+                    ∀p. ⦃G,L⦄ ⊢ ⓐV1.ⓓ{p}W1.T1 ➡*[n,h] ⓓ{p}W2.ⓐV2.T2.
 #n #h #G #L #V1 #V #HV1 #V2 #HV2 #W1 #W2 #HW12 #T1 #T2 #H @(cpms_ind_dx … H) -T2
 /4 width=9 by cpms_step_dx, cpm_cpms, cpms_bind_dx, cpms_appl_dx, cpm_theta/
 qed.
@@ -150,17 +150,47 @@ qed.
 
 (* Basic inversion lemmas ***************************************************)
 
-lemma cpms_inv_sort1 (n) (h) (G) (L): ∀X2,s. ⦃G, L⦄ ⊢ ⋆s ➡*[n, h] X2 → X2 = ⋆(((next h)^n) s).
+lemma cpms_inv_sort1 (n) (h) (G) (L): ∀X2,s. ⦃G,L⦄ ⊢ ⋆s ➡*[n,h] X2 → X2 = ⋆(((next h)^n) s).
 #n #h #G #L #X2 #s #H @(cpms_ind_dx … H) -X2 //
 #n1 #n2 #X #X2 #_ #IH #HX2 destruct
 elim (cpm_inv_sort1 … HX2) -HX2 #H #_ destruct //
 qed-.
 
+lemma cpms_inv_lref1_ctop (n) (h) (G):
+      ∀X2,i. ⦃G,⋆⦄ ⊢ #i ➡*[n,h] X2 → ∧∧ X2 = #i & n = 0.
+#n #h #G #X2 #i #H @(cpms_ind_dx … H) -X2
+[ /2 width=1 by conj/
+| #n1 #n2 #X #X2 #_ * #HX #Hn1 #HX2 destruct
+  elim (cpm_inv_lref1_ctop … HX2) -HX2 #H1 #H2 destruct
+  /2 width=1 by conj/
+]
+qed-.
+
+lemma cpms_inv_zero1_unit (n) (h) (I) (K) (G):
+      ∀X2. ⦃G,K.ⓤ{I}⦄ ⊢ #0 ➡*[n,h] X2 → ∧∧ X2 = #0 & n = 0.
+#n #h #I #G #K #X2 #H @(cpms_ind_dx … H) -X2
+[ /2 width=1 by conj/
+| #n1 #n2 #X #X2 #_ * #HX #Hn1 #HX2 destruct
+  elim (cpm_inv_zero1_unit … HX2) -HX2 #H1 #H2 destruct
+  /2 width=1 by conj/
+]
+qed-.
+
+lemma cpms_inv_gref1 (n) (h) (G) (L):
+      ∀X2,l. ⦃G,L⦄ ⊢ §l ➡*[n,h] X2 → ∧∧ X2 = §l & n = 0.
+#n #h #G #L #X2 #l #H @(cpms_ind_dx … H) -X2
+[ /2 width=1 by conj/
+| #n1 #n2 #X #X2 #_ * #HX #Hn1 #HX2 destruct
+  elim (cpm_inv_gref1 … HX2) -HX2 #H1 #H2 destruct
+  /2 width=1 by conj/
+]
+qed-.
+
 lemma cpms_inv_cast1 (h) (n) (G) (L):
-      ∀W1,T1,X2. ⦃G, L⦄ ⊢ ⓝW1.T1 ➡*[n,h] X2 →
-      ∨∨ ∃∃W2,T2. ⦃G, L⦄ ⊢ W1 ➡*[n,h] W2 & ⦃G, L⦄ ⊢ T1 ➡*[n,h] T2 & X2 = ⓝW2.T2
-       | ⦃G, L⦄ ⊢ T1 ➡*[n,h] X2
-       | ∃∃m. ⦃G, L⦄ ⊢ W1 ➡*[m,h] X2 & n = ↑m.
+      ∀W1,T1,X2. ⦃G,L⦄ ⊢ ⓝW1.T1 ➡*[n,h] X2 →
+      ∨∨ ∃∃W2,T2. ⦃G,L⦄ ⊢ W1 ➡*[n,h] W2 & ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 & X2 = ⓝW2.T2
+       | ⦃G,L⦄ ⊢ T1 ➡*[n,h] X2
+       | ∃∃m. ⦃G,L⦄ ⊢ W1 ➡*[m,h] X2 & n = ↑m.
 #h #n #G #L #W1 #T1 #X2 #H @(cpms_ind_dx … H) -n -X2
 [ /3 width=5 by or3_intro0, ex3_2_intro/
 | #n1 #n2 #X #X2 #_ * [ * || * ]
index 08f2039c8bacd5fee9466f3f8eb72c61a83092c2..db4eefb221ed7e7826f978e7396cbf1108d3865f 100644 (file)
@@ -15,6 +15,7 @@
 include "basic_2/rt_transition/cpm_aaa.ma".
 include "basic_2/rt_computation/cpxs_aaa.ma".
 include "basic_2/rt_computation/cpms_cpxs.ma".
+include "basic_2/rt_computation/lprs_cpms.ma".
 
 (* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
 
@@ -22,11 +23,11 @@ include "basic_2/rt_computation/cpms_cpxs.ma".
 
 (* Basic_2A1: uses: scpds_aaa_conf *)
 (* Basic_2A1: includes: cprs_aaa_conf *)
-lemma cpms_aaa_conf (n) (h): ∀G,L. Conf3 … (aaa G L) (cpms h G L n).
+lemma cpms_aaa_conf (h) (G) (L) (n): Conf3 … (aaa G L) (cpms h G L n).
 /3 width=5 by cpms_fwd_cpxs, cpxs_aaa_conf/ qed-.
 
-lemma aaa_cpms_total (h) (G) (L) (n) (A):
-      ∀T. ⦃G, L⦄ ⊢ T ⁝ A → ∃U. ⦃G,L⦄ ⊢ T ➡*[n,h] U.
+lemma cpms_total_aaa (h) (G) (L) (n) (A):
+      ∀T. ⦃G,L⦄ ⊢ T ⁝ A → ∃U. ⦃G,L⦄ ⊢ T ➡*[n,h] U.
 #h #G #L #n elim n -n
 [ /2 width=3 by ex_intro/
 | #n #IH #A #T1 #HT1 <plus_SO
@@ -36,3 +37,15 @@ lemma aaa_cpms_total (h) (G) (L) (n) (A):
   /3 width=4 by cpms_step_dx, ex_intro/
 ]
 qed-.
+
+lemma cpms_abst_dx_le_aaa (h) (G) (L) (T) (W) (p):
+      ∀A. ⦃G,L⦄ ⊢ T ⁝ A →
+      ∀n1,U1. ⦃G,L⦄ ⊢ T ➡*[n1,h] ⓛ{p}W.U1 → ∀n2. n1 ≤ n2 →
+      ∃∃U2. ⦃G,L⦄ ⊢ T ➡*[n2,h] ⓛ{p}W.U2 & ⦃G,L.ⓛW⦄ ⊢ U1 ➡*[n2-n1,h] U2.
+#h #G #L #T #W #p #A #HA #n1 #U1 #HTU1 #n2 #Hn12
+lapply (cpms_aaa_conf … HA … HTU1) -HA #HA
+elim (cpms_total_aaa h … (n2-n1) … HA) -HA #X #H
+elim (cpms_inv_abst_sn … H) -H #W0 #U2 #_ #HU12 #H destruct -W0
+>(plus_minus_m_m_commutative … Hn12) in ⊢ (??%?); -Hn12
+/4 width=5 by cpms_trans, cpms_bind_dx, ex2_intro/
+qed-.
index fcd97f3b905b5192dc3c7cc908bfebe0ef7bab2a..0e09b27f0835401c3ace850d4ded61fecde069e3 100644 (file)
@@ -23,9 +23,9 @@ include "basic_2/rt_computation/cprs.ma".
 
 (* Basic_2A1: includes: cprs_bind *)
 theorem cpms_bind (n) (h) (G) (L):
-                  ∀I,V1,T1,T2. ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ➡*[n, h] T2 →
-                  ∀V2. ⦃G, L⦄ ⊢ V1 ➡*[h] V2 →
-                  ∀p. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ➡*[n, h] ⓑ{p,I}V2.T2.
+                  ∀I,V1,T1,T2. ⦃G,L.ⓑ{I}V1⦄ ⊢ T1 ➡*[n,h] T2 →
+                  ∀V2. ⦃G,L⦄ ⊢ V1 ➡*[h] V2 →
+                  ∀p. ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ➡*[n,h] ⓑ{p,I}V2.T2.
 #n #h #G #L #I #V1 #T1 #T2 #HT12 #V2 #H @(cprs_ind_dx … H) -V2
 [ /2 width=1 by cpms_bind_dx/
 | #V #V2 #_ #HV2 #IH #p >(plus_n_O … n) -HT12
@@ -34,9 +34,9 @@ theorem cpms_bind (n) (h) (G) (L):
 qed.
 
 theorem cpms_appl (n) (h) (G) (L):
-                  ∀T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[n, h] T2 →
-                  ∀V1,V2. ⦃G, L⦄ ⊢ V1 ➡*[h] V2 →
-                  ⦃G, L⦄ ⊢ ⓐV1.T1 ➡*[n, h] ⓐV2.T2.
+                  ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 →
+                  ∀V1,V2. ⦃G,L⦄ ⊢ V1 ➡*[h] V2 →
+                  ⦃G,L⦄ ⊢ ⓐV1.T1 ➡*[n,h] ⓐV2.T2.
 #n #h #G #L #T1 #T2 #HT12 #V1 #V2 #H @(cprs_ind_dx … H) -V2
 [ /2 width=1 by cpms_appl_dx/
 | #V #V2 #_ #HV2 #IH >(plus_n_O … n) -HT12
@@ -46,10 +46,10 @@ qed.
 
 (* Basic_2A1: includes: cprs_beta_rc *)
 theorem cpms_beta_rc (n) (h) (G) (L):
-                     ∀V1,V2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 →
-                     ∀W1,T1,T2. ⦃G, L.ⓛW1⦄ ⊢ T1 ➡*[n, h] T2 →
-                     ∀W2. ⦃G, L⦄ ⊢ W1 ➡*[h] W2 →
-                     ∀p. ⦃G, L⦄ ⊢ ⓐV1.ⓛ{p}W1.T1 ➡*[n, h] ⓓ{p}ⓝW2.V2.T2.
+                     ∀V1,V2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 →
+                     ∀W1,T1,T2. ⦃G,L.ⓛW1⦄ ⊢ T1 ➡*[n,h] T2 →
+                     ∀W2. ⦃G,L⦄ ⊢ W1 ➡*[h] W2 →
+                     ∀p. ⦃G,L⦄ ⊢ ⓐV1.ⓛ{p}W1.T1 ➡*[n,h] ⓓ{p}ⓝW2.V2.T2.
 #n #h #G #L #V1 #V2 #HV12 #W1 #T1 #T2 #HT12 #W2 #H @(cprs_ind_dx … H) -W2
 [ /2 width=1 by cpms_beta_dx/
 | #W #W2 #_ #HW2 #IH #p >(plus_n_O … n) -HT12
@@ -59,10 +59,10 @@ qed.
 
 (* Basic_2A1: includes: cprs_beta *)
 theorem cpms_beta (n) (h) (G) (L):
-                  ∀W1,T1,T2. ⦃G, L.ⓛW1⦄ ⊢ T1 ➡*[n, h] T2 →
-                  ∀W2. ⦃G, L⦄ ⊢ W1 ➡*[h] W2 →
-                  ∀V1,V2. ⦃G, L⦄ ⊢ V1 ➡*[h] V2 →
-                  ∀p. ⦃G, L⦄ ⊢ ⓐV1.ⓛ{p}W1.T1 ➡*[n, h] ⓓ{p}ⓝW2.V2.T2.
+                  ∀W1,T1,T2. ⦃G,L.ⓛW1⦄ ⊢ T1 ➡*[n,h] T2 →
+                  ∀W2. ⦃G,L⦄ ⊢ W1 ➡*[h] W2 →
+                  ∀V1,V2. ⦃G,L⦄ ⊢ V1 ➡*[h] V2 →
+                  ∀p. ⦃G,L⦄ ⊢ ⓐV1.ⓛ{p}W1.T1 ➡*[n,h] ⓓ{p}ⓝW2.V2.T2.
 #n #h #G #L #W1 #T1 #T2 #HT12 #W2 #HW12 #V1 #V2 #H @(cprs_ind_dx … H) -V2
 [ /2 width=1 by cpms_beta_rc/
 | #V #V2 #_ #HV2 #IH #p >(plus_n_O … n) -HT12
@@ -72,10 +72,10 @@ qed.
 
 (* Basic_2A1: includes: cprs_theta_rc *)
 theorem cpms_theta_rc (n) (h) (G) (L):
-                      ∀V1,V. ⦃G, L⦄ ⊢ V1 ➡[h] V → ∀V2. ⬆*[1] V ≘ V2 →
-                      ∀W1,T1,T2. ⦃G, L.ⓓW1⦄ ⊢ T1 ➡*[n, h] T2 →
-                      ∀W2. ⦃G, L⦄ ⊢ W1 ➡*[h] W2 →
-                      ∀p. ⦃G, L⦄ ⊢ ⓐV1.ⓓ{p}W1.T1 ➡*[n, h] ⓓ{p}W2.ⓐV2.T2.
+                      ∀V1,V. ⦃G,L⦄ ⊢ V1 ➡[h] V → ∀V2. ⬆*[1] V ≘ V2 →
+                      ∀W1,T1,T2. ⦃G,L.ⓓW1⦄ ⊢ T1 ➡*[n,h] T2 →
+                      ∀W2. ⦃G,L⦄ ⊢ W1 ➡*[h] W2 →
+                      ∀p. ⦃G,L⦄ ⊢ ⓐV1.ⓓ{p}W1.T1 ➡*[n,h] ⓓ{p}W2.ⓐV2.T2.
 #n #h #G #L #V1 #V #HV1 #V2 #HV2 #W1 #T1 #T2 #HT12 #W2 #H @(cprs_ind_dx … H) -W2
 [ /2 width=3 by cpms_theta_dx/
 | #W #W2 #_ #HW2 #IH #p >(plus_n_O … n) -HT12
@@ -85,10 +85,10 @@ qed.
 
 (* Basic_2A1: includes: cprs_theta *)
 theorem cpms_theta (n) (h) (G) (L):
-                   ∀V,V2. ⬆*[1] V ≘ V2 → ∀W1,W2. ⦃G, L⦄ ⊢ W1 ➡*[h] W2 →
-                   ∀T1,T2. ⦃G, L.ⓓW1⦄ ⊢ T1 ➡*[n, h] T2 →
-                   ∀V1. ⦃G, L⦄ ⊢ V1 ➡*[h] V → 
-                   ∀p. ⦃G, L⦄ ⊢ ⓐV1.ⓓ{p}W1.T1 ➡*[n, h] ⓓ{p}W2.ⓐV2.T2.
+                   ∀V,V2. ⬆*[1] V ≘ V2 → ∀W1,W2. ⦃G,L⦄ ⊢ W1 ➡*[h] W2 →
+                   ∀T1,T2. ⦃G,L.ⓓW1⦄ ⊢ T1 ➡*[n,h] T2 →
+                   ∀V1. ⦃G,L⦄ ⊢ V1 ➡*[h] V → 
+                   ∀p. ⦃G,L⦄ ⊢ ⓐV1.ⓓ{p}W1.T1 ➡*[n,h] ⓓ{p}W2.ⓐV2.T2.
 #n #h #G #L #V #V2 #HV2 #W1 #W2 #HW12 #T1 #T2 #HT12 #V1 #H @(cprs_ind_sn … H) -V1
 [ /2 width=3 by cpms_theta_rc/
 | #V1 #V0 #HV10 #_ #IH #p >(plus_O_n … n) -HT12
@@ -98,30 +98,30 @@ qed.
 
 (* Basic_2A1: uses: lstas_scpds_trans scpds_strap2 *)
 theorem cpms_trans (h) (G) (L):
-                   ∀n1,T1,T. ⦃G, L⦄ ⊢ T1 ➡*[n1, h] T →
-                   ∀n2,T2. ⦃G, L⦄ ⊢ T ➡*[n2, h] T2 → ⦃G, L⦄ ⊢ T1 ➡*[n1+n2, h] T2.
+                   ∀n1,T1,T. ⦃G,L⦄ ⊢ T1 ➡*[n1,h] T →
+                   ∀n2,T2. ⦃G,L⦄ ⊢ T ➡*[n2,h] T2 → ⦃G,L⦄ ⊢ T1 ➡*[n1+n2,h] T2.
 /2 width=3 by ltc_trans/ qed-.
 
 (* Basic_2A1: uses: scpds_cprs_trans *)
 theorem cpms_cprs_trans (n) (h) (G) (L):
-                        ∀T1,T. ⦃G, L⦄ ⊢ T1 ➡*[n, h] T →
-                        ∀T2. ⦃G, L⦄ ⊢ T ➡*[h] T2 → ⦃G, L⦄ ⊢ T1 ➡*[n, h] T2.
+                        ∀T1,T. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T →
+                        ∀T2. ⦃G,L⦄ ⊢ T ➡*[h] T2 → ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2.
 #n #h #G #L #T1 #T #HT1 #T2 #HT2 >(plus_n_O … n)
 /2 width=3 by cpms_trans/ qed-.
 
 (* Advanced inversion lemmas ************************************************)
 
 lemma cpms_inv_appl_sn (n) (h) (G) (L):
-                       ∀V1,T1,X2. ⦃G, L⦄ ⊢ ⓐV1.T1 ➡*[n, h] X2 →
+                       ∀V1,T1,X2. ⦃G,L⦄ ⊢ ⓐV1.T1 ➡*[n,h] X2 →
                        ∨∨ ∃∃V2,T2.
-                            ⦃G, L⦄ ⊢ V1 ➡*[h] V2 & ⦃G, L⦄ ⊢ T1 ➡*[n, h] T2 &
+                            ⦃G,L⦄ ⊢ V1 ➡*[h] V2 & ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 &
                             X2 = ⓐV2.T2
                         | ∃∃n1,n2,p,W,T.
-                            ⦃G, L⦄ ⊢ T1 ➡*[n1, h] ⓛ{p}W.T & ⦃G, L⦄ ⊢ ⓓ{p}ⓝW.V1.T ➡*[n2, h] X2 &
+                            ⦃G,L⦄ ⊢ T1 ➡*[n1,h] ⓛ{p}W.T & ⦃G,L⦄ ⊢ ⓓ{p}ⓝW.V1.T ➡*[n2,h] X2 &
                             n1 + n2 = n
                         | ∃∃n1,n2,p,V0,V2,V,T.
-                            ⦃G, L⦄ ⊢ V1 ➡*[h] V0 & ⬆*[1] V0 ≘ V2 &
-                            ⦃G, L⦄ ⊢ T1 ➡*[n1, h] ⓓ{p}V.T & ⦃G, L⦄ ⊢ ⓓ{p}V.ⓐV2.T ➡*[n2, h] X2 &
+                            ⦃G,L⦄ ⊢ V1 ➡*[h] V0 & ⬆*[1] V0 ≘ V2 &
+                            ⦃G,L⦄ ⊢ T1 ➡*[n1,h] ⓓ{p}V.T & ⦃G,L⦄ ⊢ ⓓ{p}V.ⓐV2.T ➡*[n2,h] X2 &
                             n1 + n2 = n.
 #n #h #G #L #V1 #T1 #U2 #H
 @(cpms_ind_dx … H) -U2 /3 width=5 by or3_intro0, ex3_2_intro/
@@ -145,8 +145,8 @@ lemma cpms_inv_appl_sn (n) (h) (G) (L):
 ]
 qed-.
 
-lemma cpms_inv_plus (h) (G) (L): ∀n1,n2,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[n1+n2, h] T2 →
-                                 ∃∃T. ⦃G, L⦄ ⊢ T1 ➡*[n1, h] T & ⦃G, L⦄ ⊢ T ➡*[n2, h] T2.
+lemma cpms_inv_plus (h) (G) (L): ∀n1,n2,T1,T2. ⦃G,L⦄ ⊢ T1 ➡*[n1+n2,h] T2 →
+                                 ∃∃T. ⦃G,L⦄ ⊢ T1 ➡*[n1,h] T & ⦃G,L⦄ ⊢ T ➡*[n2,h] T2.
 #h #G #L #n1 elim n1 -n1 /2 width=3 by ex2_intro/
 #n1 #IH #n2 #T1 #T2 <plus_S1 #H
 elim (cpms_inv_succ_sn … H) -H #T0 #HT10 #HT02
@@ -158,9 +158,9 @@ qed-.
 (* Advanced main properties *************************************************)
 
 theorem cpms_cast (n) (h) (G) (L):
-                  ∀T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[n, h] T2 →
-                  ∀U1,U2. ⦃G, L⦄ ⊢ U1 ➡*[n, h] U2 →
-                  ⦃G, L⦄ ⊢ ⓝU1.T1 ➡*[n, h] ⓝU2.T2.
+                  ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 →
+                  ∀U1,U2. ⦃G,L⦄ ⊢ U1 ➡*[n,h] U2 →
+                  ⦃G,L⦄ ⊢ ⓝU1.T1 ➡*[n,h] ⓝU2.T2.
 #n #h #G #L #T1 #T2 #H @(cpms_ind_sn … H) -T1 -n
 [ /3 width=3 by cpms_cast_sn/
 | #n1 #n2 #T1 #T #HT1 #_ #IH #U1 #U2 #H
index 6d898a9abf9012921c87d2e9bed217672b24d040..24eab2400ad881b8f01dc99a7f7d74be55dfc84b 100644 (file)
@@ -21,7 +21,7 @@ include "basic_2/rt_computation/cpms.ma".
 (* Forward lemmas with unbound context-sensitive rt-computation for terms ***)
 
 (* Basic_2A1: includes: scpds_fwd_cpxs cprs_cpxs *)
-lemma cpms_fwd_cpxs (n) (h): ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[n, h] T2 → ⦃G, L⦄ ⊢ T1 ⬈*[h] T2.
+lemma cpms_fwd_cpxs (n) (h): ∀G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 → ⦃G,L⦄ ⊢ T1 ⬈*[h] T2.
 #n #h #G #L #T1 #T2 #H @(cpms_ind_dx … H) -T2
 /3 width=4 by cpxs_strap1, cpm_fwd_cpx/
 qed-.
index a4f1a35b4be905b07fdda1df9147bbcc2385f816..12f11ae451db36acbcd54b93bb348e6427062c79 100644 (file)
@@ -46,8 +46,8 @@ qed-.
 
 (* Advanced properties ******************************************************)
 
-lemma cpms_delta (n) (h) (G): ∀K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡*[n, h] V2 →
-                              ∀W2. ⬆*[1] V2 ≘ W2 → ⦃G, K.ⓓV1⦄ ⊢ #0 ➡*[n, h] W2.
+lemma cpms_delta (n) (h) (G): ∀K,V1,V2. ⦃G,K⦄ ⊢ V1 ➡*[n,h] V2 →
+                              ∀W2. ⬆*[1] V2 ≘ W2 → ⦃G,K.ⓓV1⦄ ⊢ #0 ➡*[n,h] W2.
 #n #h #G #K #V1 #V2 #H @(cpms_ind_dx … H) -V2
 [ /3 width=3 by cpm_cpms, cpm_delta/
 | #n1 #n2 #V #V2 #_ #IH #HV2 #W2 #HVW2
@@ -56,8 +56,8 @@ lemma cpms_delta (n) (h) (G): ∀K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡*[n, h] V2 →
 ]
 qed.
 
-lemma cpms_ell (n) (h) (G): ∀K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡*[n, h] V2 →
-                            ∀W2. ⬆*[1] V2 ≘ W2 → ⦃G, K.ⓛV1⦄ ⊢ #0 ➡*[↑n, h] W2.
+lemma cpms_ell (n) (h) (G): ∀K,V1,V2. ⦃G,K⦄ ⊢ V1 ➡*[n,h] V2 →
+                            ∀W2. ⬆*[1] V2 ≘ W2 → ⦃G,K.ⓛV1⦄ ⊢ #0 ➡*[↑n,h] W2.
 #n #h #G #K #V1 #V2 #H @(cpms_ind_dx … H) -V2
 [ /3 width=3 by cpm_cpms, cpm_ell/
 | #n1 #n2 #V #V2 #_ #IH #HV2 #W2 #HVW2
@@ -66,8 +66,8 @@ lemma cpms_ell (n) (h) (G): ∀K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡*[n, h] V2 →
 ]
 qed.
 
-lemma cpms_lref (n) (h) (I) (G): ∀K,T,i. ⦃G, K⦄ ⊢ #i ➡*[n, h] T →
-                                 ∀U. ⬆*[1] T ≘ U → ⦃G, K.ⓘ{I}⦄ ⊢ #↑i ➡*[n, h] U.
+lemma cpms_lref (n) (h) (I) (G): ∀K,T,i. ⦃G,K⦄ ⊢ #i ➡*[n,h] T →
+                                 ∀U. ⬆*[1] T ≘ U → ⦃G,K.ⓘ{I}⦄ ⊢ #↑i ➡*[n,h] U.
 #n #h #I #G #K #T #i #H @(cpms_ind_dx … H) -T
 [ /3 width=3 by cpm_cpms, cpm_lref/
 | #n1 #n2 #T #T2 #_ #IH #HT2 #U2 #HTU2
@@ -77,9 +77,9 @@ lemma cpms_lref (n) (h) (I) (G): ∀K,T,i. ⦃G, K⦄ ⊢ #i ➡*[n, h] T →
 qed.
 
 lemma cpms_cast_sn (n) (h) (G) (L):
-                   ∀U1,U2. ⦃G, L⦄ ⊢ U1 ➡*[n, h] U2 →
-                   ∀T1,T2. ⦃G, L⦄ ⊢ T1 ➡[n, h] T2 →
-                   ⦃G, L⦄ ⊢ ⓝU1.T1 ➡*[n, h] ⓝU2.T2.
+                   ∀U1,U2. ⦃G,L⦄ ⊢ U1 ➡*[n,h] U2 →
+                   ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡[n,h] T2 →
+                   ⦃G,L⦄ ⊢ ⓝU1.T1 ➡*[n,h] ⓝU2.T2.
 #n #h #G #L #U1 #U2 #H @(cpms_ind_sn … H) -U1 -n
 [ /3 width=3 by cpm_cpms, cpm_cast/
 | #n1 #n2 #U1 #U #HU1 #_ #IH #T1 #T2 #H
@@ -92,8 +92,8 @@ qed.
 (* Basic_2A1: uses: cprs_delta *)
 lemma cpms_delta_drops (n) (h) (G):
                        ∀L,K,V,i. ⬇*[i] L ≘ K.ⓓV →
-                       ∀V2. ⦃G, K⦄ ⊢ V ➡*[n, h] V2 →
-                       ∀W2. ⬆*[↑i] V2 ≘ W2 → ⦃G, L⦄ ⊢ #i ➡*[n, h] W2.
+                       ∀V2. ⦃G,K⦄ ⊢ V ➡*[n,h] V2 →
+                       ∀W2. ⬆*[↑i] V2 ≘ W2 → ⦃G,L⦄ ⊢ #i ➡*[n,h] W2.
 #n #h #G #L #K #V #i #HLK #V2 #H @(cpms_ind_dx … H) -V2
 [ /3 width=6 by cpm_cpms, cpm_delta_drops/
 | #n1 #n2 #V1 #V2 #_ #IH #HV12 #W2 #HVW2
@@ -105,8 +105,8 @@ qed.
 
 lemma cpms_ell_drops (n) (h) (G):
                      ∀L,K,W,i. ⬇*[i] L ≘ K.ⓛW →
-                     ∀W2. ⦃G, K⦄ ⊢ W ➡*[n, h] W2 →
-                     ∀V2. ⬆*[↑i] W2 ≘ V2 → ⦃G, L⦄ ⊢ #i ➡*[↑n, h] V2.
+                     ∀W2. ⦃G,K⦄ ⊢ W ➡*[n,h] W2 →
+                     ∀V2. ⬆*[↑i] W2 ≘ V2 → ⦃G,L⦄ ⊢ #i ➡*[↑n,h] V2.
 #n #h #G #L #K #W #i #HLK #W2 #H @(cpms_ind_dx … H) -W2
 [ /3 width=6 by cpm_cpms, cpm_ell_drops/
 | #n1 #n2 #W1 #W2 #_ #IH #HW12 #V2 #HWV2
@@ -119,11 +119,11 @@ qed.
 (* Advanced inversion lemmas ************************************************)
 
 lemma cpms_inv_lref1_drops (n) (h) (G):
-                           ∀L,T2,i. ⦃G, L⦄ ⊢ #i ➡*[n, h] T2 →
+                           ∀L,T2,i. ⦃G,L⦄ ⊢ #i ➡*[n,h] T2 →
                            ∨∨ ∧∧ T2 = #i & n = 0
-                            | ∃∃K,V,V2. ⬇*[i] L ≘ K.ⓓV & ⦃G, K⦄ ⊢ V ➡*[n, h] V2 &
+                            | ∃∃K,V,V2. ⬇*[i] L ≘ K.ⓓV & ⦃G,K⦄ ⊢ V ➡*[n,h] V2 &
                                         ⬆*[↑i] V2 ≘ T2
-                            | ∃∃m,K,V,V2. ⬇*[i] L ≘ K.ⓛV & ⦃G, K⦄ ⊢ V ➡*[m, h] V2 &
+                            | ∃∃m,K,V,V2. ⬇*[i] L ≘ K.ⓛV & ⦃G,K⦄ ⊢ V ➡*[m,h] V2 &
                                           ⬆*[↑i] V2 ≘ T2 & n = ↑m.
 #n #h #G #L #T2 #i #H @(cpms_ind_dx … H) -T2
 [ /3 width=1 by or3_intro0, conj/
@@ -197,8 +197,8 @@ elim (cpms_inv_lref1_drops … H) -H *
 qed-.
 
 fact cpms_inv_succ_sn (n) (h) (G) (L):
-                      ∀T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[↑n, h] T2 →
-                      ∃∃T. ⦃G, L⦄ ⊢ T1 ➡*[1, h] T & ⦃G, L⦄ ⊢ T ➡*[n, h] T2.
+                      ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡*[↑n,h] T2 →
+                      ∃∃T. ⦃G,L⦄ ⊢ T1 ➡*[1,h] T & ⦃G,L⦄ ⊢ T ➡*[n,h] T2.
 #n #h #G #L #T1 #T2
 @(insert_eq_0 … (↑n)) #m #H
 @(cpms_ind_sn … H) -T1 -m
index 7584e81c958387d86623830876b0c4b01bd3955c..5a0471b2a0e6def262d0a70cba5f4e9d0bc2e556 100644 (file)
 (**************************************************************************)
 
 include "basic_2/rt_computation/fpbg_fqup.ma".
-include "basic_2/rt_computation/fpbg_fpbs.ma".
+include "basic_2/rt_computation/fpbg_cpxs.ma".
 include "basic_2/rt_computation/cpms_fpbs.ma".
 
 (* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
 
 (* Forward lemmas with proper parallel rst-computation for closures *********)
 
-lemma fpbg_cpms_trans (h) (o) (n): ∀G1,G2,L1,L2,T1,T. ⦃G1, L1, T1⦄ >[h,o] ⦃G2, L2, T⦄ →
-                                   ∀T2. ⦃G2, L2⦄ ⊢ T ➡*[n,h] T2 → ⦃G1, L1, T1⦄ >[h,o] ⦃G2, L2, T2⦄.
+lemma cpms_tdneq_fwd_fpbg (h) (n):
+      ∀G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 →
+      (T1 ≛ T2 → ⊥) → ⦃G,L,T1⦄ >[h] ⦃G,L,T2⦄.
+/3 width=2 by cpms_fwd_cpxs, cpxs_tdneq_fpbg/ qed-.
+
+lemma fpbg_cpms_trans (h) (n):
+      ∀G1,G2,L1,L2,T1,T. ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T⦄ →
+      ∀T2. ⦃G2,L2⦄ ⊢ T ➡*[n,h] T2 → ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄.
 /3 width=5 by fpbg_fpbs_trans, cpms_fwd_fpbs/ qed-.
 
-lemma cpms_fpbg_trans (h) (o) (n): ∀G1,L1,T1,T. ⦃G1, L1⦄ ⊢ T1 ➡*[n,h] T →
-                                   ∀G2,L2,T2. ⦃G1, L1, T⦄ >[h,o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ >[h,o] ⦃G2, L2, T2⦄.
+lemma cpms_fpbg_trans (h) (n):
+      ∀G1,L1,T1,T. ⦃G1,L1⦄ ⊢ T1 ➡*[n,h] T →
+      ∀G2,L2,T2. ⦃G1,L1,T⦄ >[h] ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄.
 /3 width=5 by fpbs_fpbg_trans, cpms_fwd_fpbs/ qed-.
 
-lemma fqup_cpms_fwd_fpbg (h) (o): ∀G1,G2,L1,L2,T1,T. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T⦄ →
-                                  ∀n,T2. ⦃G2, L2⦄ ⊢ T ➡*[n,h] T2 → ⦃G1, L1, T1⦄ >[h,o] ⦃G2, L2, T2⦄.
-/3 width=5 by cpms_fwd_fpbs, fqup_fpbg,fpbg_fpbs_trans/ qed-.
+lemma fqup_cpms_fwd_fpbg (h):
+      ∀G1,G2,L1,L2,T1,T. ⦃G1,L1,T1⦄ ⬂+ ⦃G2,L2,T⦄ →
+      ∀n,T2. ⦃G2,L2⦄ ⊢ T ➡*[n,h] T2 → ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄.
+/3 width=5 by cpms_fwd_fpbs, fqup_fpbg, fpbg_fpbs_trans/ qed-.
 
-lemma cpm_tdneq_cpm_cpms_tdeq_sym_fwd_fpbg (h) (o) (G) (L) (T1):
-      ∀n1,T. ⦃G,L⦄ ⊢ T1 ➡[n1,h] T → (T1 ≛[h,o] T → ⊥) →
-      ∀n2,T2. ⦃G,L⦄⊢ T ➡*[n2,h] T2 → T1 ≛[h,o] T2 → ⦃G,L,T1⦄ >[h,o] ⦃G,L,T1⦄.
-#h #o #G #L #T1 #n1 #T #H1T1 #H2T1 #n2 #T2 #H1T2 #H2T12
+lemma cpm_tdneq_cpm_cpms_tdeq_sym_fwd_fpbg (h) (G) (L) (T1):
+      ∀n1,T. ⦃G,L⦄ ⊢ T1 ➡[n1,h] T → (T1 ≛ T → ⊥) →
+      ∀n2,T2. ⦃G,L⦄⊢ T ➡*[n2,h] T2 → T1 ≛ T2 → ⦃G,L,T1⦄ >[h] ⦃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_tdeq_trans, tdeq_sym, ex2_3_intro/
 qed-.
index 4a65edb8b4f471f5003d007f003cda55b3f00ac4..0fb54e8a64ea31b17fcca21642c00c01b9909123 100644 (file)
@@ -20,5 +20,6 @@ include "basic_2/rt_computation/cpms_cpxs.ma".
 (* Forward lemmas with parallel rst-computation for closures ****************)
 
 (* Basic_2A1: uses: cprs_fpbs *)
-lemma cpms_fwd_fpbs (n) (h) (o): ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[n,h] T2 → ⦃G, L, T1⦄ ≥[h,o] ⦃G, L, T2⦄.
+lemma cpms_fwd_fpbs (n) (h):
+      ∀G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 → ⦃G,L,T1⦄ ≥[h] ⦃G,L,T2⦄.
 /3 width=2 by cpms_fwd_cpxs, cpxs_fpbs/ qed-.
index a636655eb00dcc6776191d11afb29951e9a86a7f..dc6c0f0651eccaa9bda6dce507b6be0ab2e07e93 100644 (file)
@@ -20,8 +20,8 @@ include "basic_2/rt_computation/cpms_cpms.ma".
 (* Properties with parallel rt-transition for full local environments *******)
 
 lemma lpr_cpm_trans (n) (h) (G):
-                    ∀L2,T1,T2. ⦃G, L2⦄ ⊢ T1 ➡[n, h] T2 →
-                    ∀L1. ⦃G, L1⦄ ⊢ ➡[h] L2 → ⦃G, L1⦄ ⊢ T1 ➡*[n, h] T2.
+                    ∀L2,T1,T2. ⦃G,L2⦄ ⊢ T1 ➡[n,h] T2 →
+                    ∀L1. ⦃G,L1⦄ ⊢ ➡[h] L2 → ⦃G,L1⦄ ⊢ T1 ➡*[n,h] T2.
 #n #h #G #L2 #T1 #T2 #H @(cpm_ind … H) -n -G -L2 -T1 -T2
 [ /2 width=3 by/
 | /3 width=2 by cpm_cpms/
@@ -46,8 +46,8 @@ lemma lpr_cpm_trans (n) (h) (G):
 qed-.
 
 lemma lpr_cpms_trans (n) (h) (G):
-                     ∀L1,L2. ⦃G, L1⦄ ⊢ ➡[h] L2 →
-                     ∀T1,T2. ⦃G, L2⦄ ⊢ T1 ➡*[n, h] T2 → ⦃G, L1⦄ ⊢ T1 ➡*[n, h] T2.
+                     ∀L1,L2. ⦃G,L1⦄ ⊢ ➡[h] L2 →
+                     ∀T1,T2. ⦃G,L2⦄ ⊢ T1 ➡*[n,h] T2 → ⦃G,L1⦄ ⊢ T1 ➡*[n,h] T2.
 #n #h #G #L1 #L2 #HL12 #T1 #T2 #H @(cpms_ind_sn … H) -n -T1
 /3 width=3 by lpr_cpm_trans, cpms_trans/
 qed-.
@@ -56,14 +56,14 @@ qed-.
 
 (* Basic_2A1: includes cpr_bind2 *)
 lemma cpm_bind2 (n) (h) (G) (L):
-                ∀V1,V2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 →
-                ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ➡[n, h] T2 →
-                ∀p. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ➡*[n, h] ⓑ{p,I}V2.T2.
+                ∀V1,V2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 →
+                ∀I,T1,T2. ⦃G,L.ⓑ{I}V2⦄ ⊢ T1 ➡[n,h] T2 →
+                ∀p. ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ➡*[n,h] ⓑ{p,I}V2.T2.
 /4 width=5 by lpr_cpm_trans, cpms_bind_dx, lpr_pair/ qed.
 
 (* Basic_2A1: includes cprs_bind2_dx *)
 lemma cpms_bind2_dx (n) (h) (G) (L):
-                    ∀V1,V2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 →
-                    ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ➡*[n, h] T2 →
-                    ∀p. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ➡*[n, h] ⓑ{p,I}V2.T2.
+                    ∀V1,V2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 →
+                    ∀I,T1,T2. ⦃G,L.ⓑ{I}V2⦄ ⊢ T1 ➡*[n,h] T2 →
+                    ∀p. ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ➡*[n,h] ⓑ{p,I}V2.T2.
 /4 width=5 by lpr_cpms_trans, cpms_bind_dx, lpr_pair/ qed.
index b335ae60365067ec70a85166a3893bb7a5164ac5..f6c8198acd73517a2b58ac42f3529af7fe104a64 100644 (file)
@@ -17,14 +17,14 @@ include "basic_2/rt_computation/cpms_cpxs.ma".
 
 (* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
 
-(* Properties with degree-based equivalence for local environments **********)
+(* Properties with sort-irrelevant equivalence for local environments *******)
 
-lemma cpms_rdeq_conf_sn (h) (n) (o) (G) (L1) (L2):
-                        ∀T1,T2. ⦃G, L1⦄ ⊢ T1 ➡*[n,h] T2 →
-                        L1 ≛[h,o,T1] L2 → L1 ≛[h,o,T2] L2.
-/3 width=4 by cpms_fwd_cpxs, cpxs_rdeq_conf_sn/ qed-.
+lemma cpms_rdeq_conf_sn (h) (n) (G) (L1) (L2):
+                        ∀T1,T2. ⦃G,L1⦄ ⊢ T1 ➡*[n,h] T2 →
+                        L1 ≛[T1] L2 → L1 ≛[T2] L2.
+/3 width=5 by cpms_fwd_cpxs, cpxs_rdeq_conf_sn/ qed-.
 
-lemma cpms_rdeq_conf_dx (h) (n) (o) (G) (L1) (L2):
-                        ∀T1,T2. ⦃G, L2⦄ ⊢ T1 ➡*[n,h] T2 →
-                        L1 ≛[h,o,T1] L2 → L1 ≛[h,o,T2] L2.
-/3 width=4 by cpms_fwd_cpxs, cpxs_rdeq_conf_dx/ qed-.
+lemma cpms_rdeq_conf_dx (h) (n) (G) (L1) (L2):
+                        ∀T1,T2. ⦃G,L2⦄ ⊢ T1 ➡*[n,h] T2 →
+                        L1 ≛[T1] L2 → L1 ≛[T2] L2.
+/3 width=5 by cpms_fwd_cpxs, cpxs_rdeq_conf_dx/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpmuwe.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpmuwe.ma
new file mode 100644 (file)
index 0000000..44d91e8
--- /dev/null
@@ -0,0 +1,58 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/notation/relations/predevalwstar_6.ma".
+include "basic_2/rt_computation/cnuw.ma".
+
+(* T-UNBOUND WHD EVALUATION FOR T-BOUND RT-TRANSITION ON TERMS **************)
+
+definition cpmuwe (h) (n) (G) (L): relation2 term term ≝
+           λT1,T2. ∧∧ ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 & ⦃G,L⦄ ⊢ ➡𝐍𝐖*[h] T2.
+
+interpretation "t-unbound whd evaluation for t-bound context-sensitive parallel rt-transition (term)"
+   'PRedEvalWStar h n G L T1 T2 = (cpmuwe h n G L T1 T2).
+
+definition R_cpmuwe (h) (G) (L) (T): predicate nat ≝
+           λn. ∃U. ⦃G,L⦄ ⊢ T ➡*𝐍𝐖*[h,n] U.
+
+(* Basic properties *********************************************************)
+
+lemma cpmuwe_intro (h) (n) (G) (L):
+      ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 → ⦃G,L⦄ ⊢ ➡𝐍𝐖*[h] T2 → ⦃G,L⦄ ⊢ T1 ➡*𝐍𝐖*[h,n] T2.
+/2 width=1 by conj/ qed.
+
+(* Advanced properties ******************************************************)
+
+lemma cpmuwe_sort (h) (n) (G) (L) (T):
+      ∀s. ⦃G,L⦄ ⊢ T ➡*[n,h] ⋆s → ⦃G,L⦄ ⊢ T ➡*𝐍𝐖*[h,n] ⋆s.
+/3 width=5 by cnuw_sort, cpmuwe_intro/ qed.
+
+lemma cpmuwe_ctop (h) (n) (G) (T):
+      ∀i. ⦃G,⋆⦄ ⊢ T ➡*[n,h] #i → ⦃G,⋆⦄ ⊢ T ➡*𝐍𝐖*[h,n] #i.
+/3 width=5 by cnuw_ctop, cpmuwe_intro/ qed.
+
+lemma cpmuwe_zero_unit (h) (n) (G) (L) (T):
+      ∀I. ⦃G,L.ⓤ{I}⦄ ⊢ T ➡*[n,h] #0 → ⦃G,L.ⓤ{I}⦄ ⊢ T ➡*𝐍𝐖*[h,n] #0.
+/3 width=6 by cnuw_zero_unit, cpmuwe_intro/ qed.
+
+lemma cpmuwe_gref (h) (n) (G) (L) (T):
+      ∀l. ⦃G,L⦄ ⊢ T ➡*[n,h] §l → ⦃G,L⦄ ⊢ T ➡*𝐍𝐖*[h,n] §l.
+/3 width=5 by cnuw_gref, cpmuwe_intro/ qed.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma cpmuwe_fwd_cpms (h) (n) (G) (L):
+      ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡*𝐍𝐖*[h,n] T2 → ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2.
+#h #n #G #L #T1 #T2 * #HT12 #_ //
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpmuwe_cpmuwe.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpmuwe_cpmuwe.ma
new file mode 100644 (file)
index 0000000..deea7cd
--- /dev/null
@@ -0,0 +1,28 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/cnuw_cnuw.ma".
+include "basic_2/rt_computation/cpmuwe.ma".
+
+(* T-UNBOUND WHD EVALUATION FOR T-BOUND RT-TRANSITION ON TERMS **************)
+
+(* Advanced properties ******************************************************)
+
+lemma cpmuwe_abbr_neg (h) (n) (G) (L) (T):
+      ∀V,U. ⦃G,L⦄ ⊢ T ➡*[n,h] -ⓓV.U → ⦃G,L⦄ ⊢ T ➡*𝐍𝐖*[h,n] -ⓓV.U.
+/3 width=5 by cnuw_abbr_neg, cpmuwe_intro/ qed.
+
+lemma cpmuwe_abst (h) (n) (p) (G) (L) (T):
+      ∀W,U. ⦃G,L⦄ ⊢ T ➡*[n,h] ⓛ{p}W.U → ⦃G,L⦄ ⊢ T ➡*𝐍𝐖*[h,n] ⓛ{p}W.U.
+/3 width=5 by cnuw_abst, cpmuwe_intro/ 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
new file mode 100644 (file)
index 0000000..1939101
--- /dev/null
@@ -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/syntax/tweq_tdeq.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".
+include "basic_2/rt_computation/cpmuwe.ma".
+
+(* T-UNBOUND WHD EVALUATION FOR T-BOUND RT-TRANSITION ON TERMS **************)
+
+(* Properties with strong normalization for unbound rt-transition for terms *)
+
+lemma cpmuwe_total_csx (h) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ → ∃∃T2,n. ⦃G,L⦄ ⊢ T1 ➡*𝐍𝐖*[h,n] T2.
+#h #G #L #T1 #H
+@(csx_ind_cpxs … H) -T1 #T1 #_ #IHT1
+elim (cnuw_dec_ex h G L T1)
+[ -IHT1 #HT1 /3 width=4 by cpmuwe_intro, ex1_2_intro/
+| * #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 tdeq_tweq/
+  | /2 width=2 by cpms_fwd_cpxs/
+  ]
+]
+qed-.
+
+lemma R_cpmuwe_total_csx (h) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ → ∃n. R_cpmuwe h G L T1 n.
+#h #G #L #T1 #H
+elim (cpmuwe_total_csx … H) -H #T2 #n #HT12
+/3 width=3 by ex_intro (* 2x *)/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpre.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpre.ma
new file mode 100644 (file)
index 0000000..6059150
--- /dev/null
@@ -0,0 +1,22 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/notation/relations/predeval_5.ma".
+include "basic_2/rt_computation/cpme.ma".
+include "basic_2/rt_computation/cprs.ma".
+
+(* EVALUATION FOR CONTEXT-SENSITIVE PARALLEL R-TRANSITION ON TERMS ***********)
+
+interpretation "evaluation for context-sensitive parallel r-transition (term)"
+   'PRedEval h G L T1 T2 = (cpme h O G L T1 T2).
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpre_cpms.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpre_cpms.ma
new file mode 100644 (file)
index 0000000..2dd997c
--- /dev/null
@@ -0,0 +1,27 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/cpms_cpms.ma".
+include "basic_2/rt_computation/cpre.ma".
+
+(* EVALUATION FOR CONTEXT-SENSITIVE PARALLEL R-TRANSITION ON TERMS **********)
+
+(* Properties with t-bound rt-computarion on terms **************************)
+
+lemma cpms_cpre_trans (h) (n) (G) (L):
+      ∀T1,T0. ⦃G,L⦄ ⊢T1 ➡*[n,h] T0 →
+      ∀T2. ⦃G,L⦄ ⊢ T0 ➡*[h] 𝐍⦃T2⦄ → ⦃G,L⦄ ⊢ T1 ➡*[h,n] 𝐍⦃T2⦄.
+#h #n #G #L #T1 #T0 #HT10 #T2 * #HT02 #HT2
+/3 width=3 by cpms_cprs_trans, cpme_intro/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpre_cpre.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpre_cpre.ma
new file mode 100644 (file)
index 0000000..a855b32
--- /dev/null
@@ -0,0 +1,40 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/cprs_cnr.ma".
+include "basic_2/rt_computation/cprs_cprs.ma".
+include "basic_2/rt_computation/cpre.ma".
+
+(* EVALUATION FOR CONTEXT-SENSITIVE PARALLEL R-TRANSITION ON TERMS *********)
+
+(* Properties with context-sensitive parallel r-computation for terms ******)
+
+lemma cpre_cprs_conf (h) (G) (L) (T):
+      ∀T1. ⦃G,L⦄ ⊢ T ➡*[h] T1 → ∀T2. ⦃G,L⦄ ⊢ T ➡*[h] 𝐍⦃T2⦄ → ⦃G,L⦄ ⊢ T1 ➡*[h] 𝐍⦃T2⦄.
+#h #G #L #T0 #T1 #HT01 #T2 * #HT02 #HT2
+elim (cprs_conf … HT01 … HT02) -T0 #T0 #HT10 #HT20
+lapply (cprs_inv_cnr_sn … HT20 HT2) -HT20 #H destruct
+/2 width=1 by cpme_intro/
+qed-.
+
+(* Main properties *********************************************************)
+
+(* Basic_1: was: nf2_pr3_confluence *)
+theorem cpre_mono (h) (G) (L) (T):
+        ∀T1. ⦃G,L⦄ ⊢ T ➡*[h] 𝐍⦃T1⦄ → ∀T2. ⦃G,L⦄ ⊢ T ➡*[h] 𝐍⦃T2⦄ → T1 = T2.
+#h #G #L #T0 #T1 * #HT01 #HT1 #T2 * #HT02 #HT2
+elim (cprs_conf … HT01 … HT02) -T0 #T0 #HT10 #HT20
+>(cprs_inv_cnr_sn … HT10 HT1) -T1
+>(cprs_inv_cnr_sn … HT20 HT2) -T2 //
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpre_csx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpre_csx.ma
new file mode 100644 (file)
index 0000000..555ff0c
--- /dev/null
@@ -0,0 +1,33 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_transition/cpm_cpx.ma".
+include "basic_2/rt_transition/cnr_tdeq.ma".
+include "basic_2/rt_computation/csx.ma".
+include "basic_2/rt_computation/cpre.ma".
+
+(* EVALUATION FOR CONTEXT-SENSITIVE PARALLEL R-TRANSITION ON TERMS **********)
+
+(* Properties with strong normalization for unbound rt-transition for terms *)
+
+(* Basic_1: was just: nf2_sn3 *)
+lemma cpre_total_csx (h) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ → ∃T2. ⦃G,L⦄ ⊢ T1 ➡*[h] 𝐍⦃T2⦄.
+#h #G #L #T1 #H
+@(csx_ind … H) -T1 #T1 #_ #IHT1
+elim (cnr_dec_tdeq h G L T1) [ /3 width=3 by ex_intro, cpme_intro/ ] *
+#T0 #HT10 #HnT10
+elim (IHT1 … HnT10) -IHT1 -HnT10 [| /2 width=2 by cpm_fwd_cpx/ ]
+#T2 * /4 width=3 by cprs_step_sn, ex_intro, cpme_intro/
+qed-.
index ff8271ebda2a482c36b7ed9734a64c6444c9bf3d..7a9df49a5f806445a12b1b289a4634fdbebd0106 100644 (file)
@@ -22,8 +22,8 @@ include "basic_2/rt_computation/cpms.ma".
 (* Basic_2A1: was: cprs_ind_dx *)
 lemma cprs_ind_sn (h) (G) (L) (T2) (Q:predicate …):
                   Q T2 →
-                  (∀T1,T. ⦃G, L⦄ ⊢ T1 ➡[h] T → ⦃G, L⦄ ⊢ T ➡*[h] T2 → Q T → Q T1) →
-                  ∀T1. ⦃G, L⦄ ⊢ T1 ➡*[h] T2 → Q T1.
+                  (∀T1,T. ⦃G,L⦄ ⊢ T1 ➡[h] T → ⦃G,L⦄ ⊢ T ➡*[h] T2 → Q T → Q T1) →
+                  ∀T1. ⦃G,L⦄ ⊢ T1 ➡*[h] T2 → Q T1.
 #h #G #L #T2 #Q #IH1 #IH2 #T1
 @(insert_eq_0 … 0) #n #H
 @(cpms_ind_sn … H) -n -T1 //
@@ -35,8 +35,8 @@ qed-.
 (* Basic_2A1: was: cprs_ind *)
 lemma cprs_ind_dx (h) (G) (L) (T1) (Q:predicate …):
                   Q T1 →
-                  (∀T,T2. ⦃G, L⦄ ⊢ T1 ➡*[h] T → ⦃G, L⦄ ⊢ T ➡[h] T2 → Q T → Q T2) →
-                  ∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h] T2 → Q T2.
+                  (∀T,T2. ⦃G,L⦄ ⊢ T1 ➡*[h] T → ⦃G,L⦄ ⊢ T ➡[h] T2 → Q T → Q T2) →
+                  ∀T2. ⦃G,L⦄ ⊢ T1 ➡*[h] T2 → Q T2.
 #h #G #L #T1 #Q #IH1 #IH2 #T2
 @(insert_eq_0 … 0) #n #H
 @(cpms_ind_dx … H) -n -T2 //
@@ -50,28 +50,28 @@ qed-.
 (* Basic_1: was: pr3_step *)
 (* Basic_2A1: was: cprs_strap2 *)
 lemma cprs_step_sn (h) (G) (L):
-                   ∀T1,T. ⦃G, L⦄ ⊢ T1 ➡[h] T →
-                   ∀T2. ⦃G, L⦄ ⊢ T ➡*[h] T2 → ⦃G, L⦄ ⊢ T1 ➡*[h] T2.
+                   ∀T1,T. ⦃G,L⦄ ⊢ T1 ➡[h] T →
+                   ∀T2. ⦃G,L⦄ ⊢ T ➡*[h] T2 → ⦃G,L⦄ ⊢ T1 ➡*[h] T2.
 /2 width=3 by cpms_step_sn/ qed-.
 
 (* Basic_2A1: was: cprs_strap1 *)
 lemma cprs_step_dx (h) (G) (L):
-                   ∀T1,T. ⦃G, L⦄ ⊢ T1 ➡*[h] T →
-                   ∀T2. ⦃G, L⦄ ⊢ T ➡[h] T2 → ⦃G, L⦄ ⊢ T1 ➡*[h] T2.
+                   ∀T1,T. ⦃G,L⦄ ⊢ T1 ➡*[h] T →
+                   ∀T2. ⦃G,L⦄ ⊢ T ➡[h] T2 → ⦃G,L⦄ ⊢ T1 ➡*[h] T2.
 /2 width=3 by cpms_step_dx/ qed-.
 
 (* Basic_1: was only: pr3_thin_dx *)
 lemma cprs_flat_dx (h) (I) (G) (L):
-                   ∀V1,V2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 →
-                   ∀T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h] T2 →
-                   ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ➡*[h] ⓕ{I}V2.T2.
+                   ∀V1,V2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 →
+                   ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡*[h] T2 →
+                   ⦃G,L⦄ ⊢ ⓕ{I}V1.T1 ➡*[h] ⓕ{I}V2.T2.
 #h #I #G #L #V1 #V2 #HV12 #T1 #T2 #H @(cprs_ind_sn … H) -T1
 /3 width=3 by cprs_step_sn, cpm_cpms, cpr_flat/
 qed.
 
 lemma cprs_flat_sn (h) (I) (G) (L):
-                   ∀T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h] T2 → ∀V1,V2. ⦃G, L⦄ ⊢ V1 ➡*[h] V2 →
-                   ⦃G, L⦄ ⊢ ⓕ{I} V1. T1 ➡*[h] ⓕ{I} V2. T2.
+                   ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡[h] T2 → ∀V1,V2. ⦃G,L⦄ ⊢ V1 ➡*[h] V2 →
+                   ⦃G,L⦄ ⊢ ⓕ{I} V1. T1 ➡*[h] ⓕ{I} V2. T2.
 #h #I #G #L #T1 #T2 #HT12 #V1 #V2 #H @(cprs_ind_sn … H) -V1
 /3 width=3 by cprs_step_sn, cpm_cpms, cpr_flat/
 qed.
@@ -79,13 +79,13 @@ qed.
 (* Basic inversion lemmas ***************************************************)
 
 (* Basic_1: was: pr3_gen_sort *)
-lemma cprs_inv_sort1 (h) (G) (L): ∀X2,s. ⦃G, L⦄ ⊢ ⋆s ➡*[h] X2 → X2 = ⋆s.
+lemma cprs_inv_sort1 (h) (G) (L): ∀X2,s. ⦃G,L⦄ ⊢ ⋆s ➡*[h] X2 → X2 = ⋆s.
 /2 width=4 by cpms_inv_sort1/ qed-.
 
 (* Basic_1: was: pr3_gen_cast *)
-lemma cprs_inv_cast1 (h) (G) (L): ∀W1,T1,X2. ⦃G, L⦄ ⊢ ⓝW1.T1 ➡*[h] X2 →
-                                  ∨∨ ∃∃W2,T2. ⦃G, L⦄ ⊢ W1 ➡*[h] W2 & ⦃G, L⦄ ⊢ T1 ➡*[h] T2 & X2 = ⓝW2.T2
-                                   | ⦃G, L⦄ ⊢ T1 ➡*[h] X2.
+lemma cprs_inv_cast1 (h) (G) (L): ∀W1,T1,X2. ⦃G,L⦄ ⊢ ⓝW1.T1 ➡*[h] X2 →
+                                  ∨∨ ∃∃W2,T2. ⦃G,L⦄ ⊢ W1 ➡*[h] W2 & ⦃G,L⦄ ⊢ T1 ➡*[h] T2 & X2 = ⓝW2.T2
+                                   | ⦃G,L⦄ ⊢ T1 ➡*[h] X2.
 #h #G #L #W1 #T1 #X2 #H
 elim (cpms_inv_cast1 … H) -H
 [ /2 width=1 by or_introl/
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs_cnr.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs_cnr.ma
new file mode 100644 (file)
index 0000000..8cbb2ee
--- /dev/null
@@ -0,0 +1,29 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_transition/cnr.ma".
+include "basic_2/rt_computation/cprs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL R-COMPUTATION FOR TERMS ***********************)
+
+(* Inversion lemmas with normal terms for r-transition **********************)
+
+(* Basic_1: was: nf2_pr3_unfold *)
+(* Basic_2A1: was: cprs_inv_cnr1 *)
+lemma cprs_inv_cnr_sn (h) (G) (L):
+      ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡*[h] T2 → ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃T1⦄ → T1 = T2.
+#h #G #L #T1 #T2 #H @(cprs_ind_sn … H) -T1 //
+#T1 #T0 #HT10 #_ #IH #HT1
+lapply (HT1 … HT10) -HT10 #H destruct /2 width=1 by/
+qed-.
index 990051c3a4039a08351e6cbfcaf7a4812a5c75c1..069323fb4fa30d9a38c9d03b9fcb8de3f3f814c3 100644 (file)
@@ -38,9 +38,9 @@ qed-.
 
 (* Basic_1: was: pr3_flat *)
 theorem cprs_flat (h) (G) (L):
-                  ∀T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h] T2 →
-                  ∀V1,V2. ⦃G, L⦄ ⊢ V1 ➡*[h] V2 →
-                  ∀I. ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ➡*[h] ⓕ{I}V2.T2.
+                  ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡*[h] T2 →
+                  ∀V1,V2. ⦃G,L⦄ ⊢ V1 ➡*[h] V2 →
+                  ∀I. ⦃G,L⦄ ⊢ ⓕ{I}V1.T1 ➡*[h] ⓕ{I}V2.T2.
 #h #G #L #T1 #T2 #HT12 #V1 #V2 #H @(cprs_ind_dx … H) -V2
 [ /2 width=3 by cprs_flat_dx/
 | /3 width=3 by cpr_pair_sn, cprs_step_dx/
@@ -52,15 +52,15 @@ qed.
 (* Basic_1: was pr3_gen_appl *)
 (* Basic_2A1: was: cprs_inv_appl1 *)
 lemma cprs_inv_appl_sn (h) (G) (L):
-                       ∀V1,T1,X2. ⦃G, L⦄ ⊢ ⓐV1.T1 ➡*[h] X2 →
-                       ∨∨ ∃∃V2,T2.       ⦃G, L⦄ ⊢ V1 ➡*[h] V2 &
-                                         ⦃G, L⦄ ⊢ T1 ➡*[h] T2 &
+                       ∀V1,T1,X2. ⦃G,L⦄ ⊢ ⓐV1.T1 ➡*[h] X2 →
+                       ∨∨ ∃∃V2,T2.       ⦃G,L⦄ ⊢ V1 ➡*[h] V2 &
+                                         ⦃G,L⦄ ⊢ T1 ➡*[h] T2 &
                                          X2 = ⓐV2. T2
-                        | ∃∃p,W,T.       ⦃G, L⦄ ⊢ T1 ➡*[h] ⓛ{p}W.T &
-                                         ⦃G, L⦄ ⊢ ⓓ{p}ⓝW.V1.T ➡*[h] X2
-                        | ∃∃p,V0,V2,V,T. ⦃G, L⦄ ⊢ V1 ➡*[h] V0 & ⬆*[1] V0 ≘ V2 &
-                                         ⦃G, L⦄ ⊢ T1 ➡*[h] ⓓ{p}V.T &
-                                         ⦃G, L⦄ ⊢ ⓓ{p}V.ⓐV2.T ➡*[h] X2.
+                        | ∃∃p,W,T.       ⦃G,L⦄ ⊢ T1 ➡*[h] ⓛ{p}W.T &
+                                         ⦃G,L⦄ ⊢ ⓓ{p}ⓝW.V1.T ➡*[h] X2
+                        | ∃∃p,V0,V2,V,T. ⦃G,L⦄ ⊢ V1 ➡*[h] V0 & ⬆*[1] V0 ≘ V2 &
+                                         ⦃G,L⦄ ⊢ T1 ➡*[h] ⓓ{p}V.T &
+                                         ⦃G,L⦄ ⊢ ⓓ{p}V.ⓐV2.T ➡*[h] X2.
 #h #G #L #V1 #T1 #X2 #H elim (cpms_inv_appl_sn … H) -H *
 [ /3 width=5 by or3_intro0, ex3_2_intro/
 | #n1 #n2 #p #V2 #T2 #HT12 #HTX2 #H
index 19829738f5f4f473c8f21c90f4a670b3c1b1dead..bd1afeec3492043b8bf47e684b8862d7013e525e 100644 (file)
@@ -20,9 +20,9 @@ include "basic_2/rt_computation/cpms_drops.ma".
 
 (* Basic_1: was: pr3_gen_lref *)
 (* Basic_2A1: was: cprs_inv_lref1 *)
-lemma cprs_inv_lref1_drops (h) (G): ∀L,T2,i. ⦃G, L⦄ ⊢ #i ➡*[h] T2 →
+lemma cprs_inv_lref1_drops (h) (G): ∀L,T2,i. ⦃G,L⦄ ⊢ #i ➡*[h] T2 →
                                     ∨∨ T2 = #i
-                                     | ∃∃K,V1,T1. ⬇*[i] L ≘ K.ⓓV1 & ⦃G, K⦄ ⊢ V1 ➡*[h] T1 &
+                                     | ∃∃K,V1,T1. ⬇*[i] L ≘ K.ⓓV1 & ⦃G,K⦄ ⊢ V1 ➡*[h] T1 &
                                                   ⬆*[↑i] T1 ≘ T2.
 #h #G #L #T2 #i #H elim (cpms_inv_lref1_drops … H) -H *
 [ /2 width=1 by or_introl/
index 1ea7cc963ca5c7fa08677136522c0e67281fca85..8a578cf5b2c0c5bf062ef152bfa9287f4c5cd142 100644 (file)
@@ -31,8 +31,8 @@ lemma lpr_cprs_trans (h) (G): s_rs_transitive … (λL. cpm h G L 0) (λ_. lpr h
 qed-.
 
 lemma cprs_lpr_conf_dx (h) (G):
-                       ∀L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡*[h] T1 → ∀L1. ⦃G, L0⦄ ⊢ ➡[h] L1 →
-                       ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡*[h] T & ⦃G, L1⦄ ⊢ T0 ➡*[h] T.
+                       ∀L0,T0,T1. ⦃G,L0⦄ ⊢ T0 ➡*[h] T1 → ∀L1. ⦃G,L0⦄ ⊢ ➡[h] L1 →
+                       ∃∃T. ⦃G,L1⦄ ⊢ T1 ➡*[h] T & ⦃G,L1⦄ ⊢ T0 ➡*[h] T.
 #h #G #L0 #T0 #T1 #H
 @(cprs_ind_dx … H) -T1 /2 width=3 by ex2_intro/
 #T #T1 #_ #HT1 #IHT0 #L1 #HL01
@@ -43,9 +43,9 @@ elim (cprs_strip … HT2 … HT3) -T
 qed-.
 
 lemma cprs_lpr_conf_sn (h) (G):
-                       ∀L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡*[h] T1 →
-                       ∀L1. ⦃G, L0⦄ ⊢ ➡[h] L1 →
-                       ∃∃T. ⦃G, L0⦄ ⊢ T1 ➡*[h] T & ⦃G, L1⦄ ⊢ T0 ➡*[h] T.
+                       ∀L0,T0,T1. ⦃G,L0⦄ ⊢ T0 ➡*[h] T1 →
+                       ∀L1. ⦃G,L0⦄ ⊢ ➡[h] L1 →
+                       ∃∃T. ⦃G,L0⦄ ⊢ T1 ➡*[h] T & ⦃G,L1⦄ ⊢ T0 ➡*[h] T.
 #h #G #L0 #T0 #T1 #HT01 #L1 #HL01
 elim (cprs_lpr_conf_dx … HT01 … HL01) -HT01 #T #HT1 #HT0
 /3 width=3 by lpr_cpms_trans, ex2_intro/
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs_tweq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs_tweq.ma
new file mode 100644 (file)
index 0000000..7c8102a
--- /dev/null
@@ -0,0 +1,35 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/tweq_tweq.ma".
+include "static_2/relocation/lifts_tweq.ma".
+include "basic_2/rt_transition/cpr_drops_basic.ma".
+include "basic_2/rt_computation/cpms.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL R-COMPUTATION FOR TERMS ***********************)
+
+(* Properties with sort-irrelevant whd equivalence on terms *****************)
+
+lemma cprs_abbr_pos_twneq (h) (G) (L) (V) (T1):
+      ∃∃T2. ⦃G,L⦄ ⊢ +ⓓV.T1 ➡*[h] 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 ]
+[ @(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=3 by cpm_cpms, cpm_bind, tweq_inv_abbr_pos_bi, ex2_intro/
+]
+qed-.
index ce01889c15f5d71b16ed8a65b11bc89cedbfee66..e0048f7d7a5fcad57f4a6489cf460b7a5837a28e 100644 (file)
@@ -27,71 +27,71 @@ interpretation "unbound context-sensitive parallel rt-computation (term)"
 (* Basic eliminators ********************************************************)
 
 lemma cpxs_ind: ∀h,G,L,T1. ∀Q:predicate term. Q T1 →
-                (∀T,T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T → ⦃G, L⦄ ⊢ T ⬈[h] T2 → Q T → Q T2) →
-                ∀T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 → Q T2.
+                (∀T,T2. ⦃G,L⦄ ⊢ T1 ⬈*[h] T → ⦃G,L⦄ ⊢ T ⬈[h] T2 → Q T → Q T2) →
+                ∀T2. ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 → Q T2.
 #h #L #G #T1 #Q #HT1 #IHT1 #T2 #HT12
 @(TC_star_ind … HT1 IHT1 … HT12) //
 qed-.
 
 lemma cpxs_ind_dx: ∀h,G,L,T2. ∀Q:predicate term. Q T2 →
-                   (∀T1,T. ⦃G, L⦄ ⊢ T1 ⬈[h] T → ⦃G, L⦄ ⊢ T ⬈*[h] T2 → Q T → Q T1) →
-                   ∀T1. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 → Q T1.
+                   (∀T1,T. ⦃G,L⦄ ⊢ T1 ⬈[h] T → ⦃G,L⦄ ⊢ T ⬈*[h] T2 → Q T → Q T1) →
+                   ∀T1. ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 → Q T1.
 #h #G #L #T2 #Q #HT2 #IHT2 #T1 #HT12
 @(TC_star_ind_dx … HT2 IHT2 … HT12) //
 qed-.
 
 (* Basic properties *********************************************************)
 
-lemma cpxs_refl: ∀h,G,L,T. ⦃G, L⦄ ⊢ T ⬈*[h] T.
+lemma cpxs_refl: ∀h,G,L,T. ⦃G,L⦄ ⊢ T ⬈*[h] T.
 /2 width=1 by inj/ qed.
 
-lemma cpx_cpxs: ∀h,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ⬈[h] T2 → ⦃G, L⦄ ⊢ T1 ⬈*[h] T2.
+lemma cpx_cpxs: ∀h,G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ⬈[h] T2 → ⦃G,L⦄ ⊢ T1 ⬈*[h] T2.
 /2 width=1 by inj/ qed.
 
-lemma cpxs_strap1: ∀h,G,L,T1,T. ⦃G, L⦄ ⊢ T1 ⬈*[h] T →
-                   ∀T2. ⦃G, L⦄ ⊢ T ⬈[h] T2 → ⦃G, L⦄ ⊢ T1 ⬈*[h] T2.
+lemma cpxs_strap1: ∀h,G,L,T1,T. ⦃G,L⦄ ⊢ T1 ⬈*[h] T →
+                   ∀T2. ⦃G,L⦄ ⊢ T ⬈[h] T2 → ⦃G,L⦄ ⊢ T1 ⬈*[h] T2.
 normalize /2 width=3 by step/ qed-.
 
-lemma cpxs_strap2: ∀h,G,L,T1,T. ⦃G, L⦄ ⊢ T1 ⬈[h] T →
-                   ∀T2. ⦃G, L⦄ ⊢ T ⬈*[h] T2 → ⦃G, L⦄ ⊢ T1 ⬈*[h] T2.
+lemma cpxs_strap2: ∀h,G,L,T1,T. ⦃G,L⦄ ⊢ T1 ⬈[h] T →
+                   ∀T2. ⦃G,L⦄ ⊢ T ⬈*[h] T2 → ⦃G,L⦄ ⊢ T1 ⬈*[h] T2.
 normalize /2 width=3 by TC_strap/ qed-.
 
 (* Basic_2A1: was just: cpxs_sort *)
-lemma cpxs_sort: ∀h,G,L,s,n. ⦃G, L⦄ ⊢ ⋆s ⬈*[h] ⋆((next h)^n s).
+lemma cpxs_sort: ∀h,G,L,s,n. ⦃G,L⦄ ⊢ ⋆s ⬈*[h] ⋆((next h)^n s).
 #h #G #L #s #n elim n -n /2 width=1 by cpx_cpxs/
 #n >iter_S /2 width=3 by cpxs_strap1/
 qed.
 
-lemma cpxs_bind_dx: ∀h,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 →
-                    ∀I,T1,T2. ⦃G, L. ⓑ{I}V1⦄ ⊢ T1 ⬈*[h] T2 →
-                    ∀p. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈*[h] ⓑ{p,I}V2.T2.
+lemma cpxs_bind_dx: ∀h,G,L,V1,V2. ⦃G,L⦄ ⊢ V1 ⬈[h] V2 →
+                    ∀I,T1,T2. ⦃G,L. ⓑ{I}V1⦄ ⊢ T1 ⬈*[h] T2 →
+                    ∀p. ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈*[h] ⓑ{p,I}V2.T2.
 #h #G #L #V1 #V2 #HV12 #I #T1 #T2 #HT12 #a @(cpxs_ind_dx … HT12) -T1
 /3 width=3 by cpxs_strap2, cpx_cpxs, cpx_pair_sn, cpx_bind/
 qed.
 
-lemma cpxs_flat_dx: ∀h,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 →
-                    ∀T1,T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 →
-                    ∀I. ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ⬈*[h] ⓕ{I}V2.T2.
+lemma cpxs_flat_dx: ∀h,G,L,V1,V2. ⦃G,L⦄ ⊢ V1 ⬈[h] V2 →
+                    ∀T1,T2. ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 →
+                    ∀I. ⦃G,L⦄ ⊢ ⓕ{I}V1.T1 ⬈*[h] ⓕ{I}V2.T2.
 #h #G #L #V1 #V2 #HV12 #T1 #T2 #HT12 @(cpxs_ind … HT12) -T2
 /3 width=5 by cpxs_strap1, cpx_cpxs, cpx_pair_sn, cpx_flat/
 qed.
 
-lemma cpxs_flat_sn: ∀h,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ⬈[h] T2 →
-                    ∀V1,V2. ⦃G, L⦄ ⊢ V1 ⬈*[h] V2 →
-                    ∀I. ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ⬈*[h] ⓕ{I}V2.T2.
+lemma cpxs_flat_sn: ∀h,G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ⬈[h] T2 →
+                    ∀V1,V2. ⦃G,L⦄ ⊢ V1 ⬈*[h] V2 →
+                    ∀I. ⦃G,L⦄ ⊢ ⓕ{I}V1.T1 ⬈*[h] ⓕ{I}V2.T2.
 #h #G #L #T1 #T2 #HT12 #V1 #V2 #H @(cpxs_ind … H) -V2
 /3 width=5 by cpxs_strap1, cpx_cpxs, cpx_pair_sn, cpx_flat/
 qed.
 
-lemma cpxs_pair_sn: ∀h,I,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ⬈*[h] V2 →
-                    ∀T. ⦃G, L⦄ ⊢ ②{I}V1.T ⬈*[h] ②{I}V2.T.
+lemma cpxs_pair_sn: ∀h,I,G,L,V1,V2. ⦃G,L⦄ ⊢ V1 ⬈*[h] V2 →
+                    ∀T. ⦃G,L⦄ ⊢ ②{I}V1.T ⬈*[h] ②{I}V2.T.
 #h #I #G #L #V1 #V2 #H @(cpxs_ind … H) -V2
 /3 width=3 by cpxs_strap1, cpx_pair_sn/
 qed.
 
 lemma cpxs_zeta (h) (G) (L) (V):
                 ∀T1,T. ⬆*[1] T ≘ T1 →
-                ∀T2. ⦃G, L⦄ ⊢ T ⬈*[h] T2 → ⦃G, L⦄ ⊢ +ⓓV.T1 ⬈*[h] T2.
+                ∀T2. ⦃G,L⦄ ⊢ T ⬈*[h] T2 → ⦃G,L⦄ ⊢ +ⓓV.T1 ⬈*[h] T2.
 #h #G #L #V #T1 #T #HT1 #T2 #H @(cpxs_ind … H) -T2
 /3 width=3 by cpxs_strap1, cpx_cpxs, cpx_zeta/
 qed.
@@ -99,34 +99,34 @@ qed.
 (* Basic_2A1: was: cpxs_zeta *)
 lemma cpxs_zeta_dx (h) (G) (L) (V):
                    ∀T2,T. ⬆*[1] T2 ≘ T →
-                   ∀T1. ⦃G, L.ⓓV⦄ ⊢ T1 ⬈*[h] T → ⦃G, L⦄ ⊢ +ⓓV.T1 ⬈*[h] T2.
+                   ∀T1. ⦃G,L.ⓓV⦄ ⊢ T1 ⬈*[h] T → ⦃G,L⦄ ⊢ +ⓓV.T1 ⬈*[h] T2.
 #h #G #L #V #T2 #T #HT2 #T1 #H @(cpxs_ind_dx … H) -T1
 /3 width=3 by cpxs_strap2, cpx_cpxs, cpx_bind, cpx_zeta/
 qed.
 
-lemma cpxs_eps: ∀h,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 →
-                ∀V. ⦃G, L⦄ ⊢ ⓝV.T1 ⬈*[h] T2.
+lemma cpxs_eps: ∀h,G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 →
+                ∀V. ⦃G,L⦄ ⊢ ⓝV.T1 ⬈*[h] T2.
 #h #G #L #T1 #T2 #H @(cpxs_ind … H) -T2
 /3 width=3 by cpxs_strap1, cpx_cpxs, cpx_eps/
 qed.
 
 (* Basic_2A1: was: cpxs_ct *)
-lemma cpxs_ee: ∀h,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ⬈*[h] V2 →
-               ∀T. ⦃G, L⦄ ⊢ ⓝV1.T ⬈*[h] V2.
+lemma cpxs_ee: ∀h,G,L,V1,V2. ⦃G,L⦄ ⊢ V1 ⬈*[h] V2 →
+               ∀T. ⦃G,L⦄ ⊢ ⓝV1.T ⬈*[h] V2.
 #h #G #L #V1 #V2 #H @(cpxs_ind … H) -V2
 /3 width=3 by cpxs_strap1, cpx_cpxs, cpx_ee/
 qed.
 
 lemma cpxs_beta_dx: ∀h,p,G,L,V1,V2,W1,W2,T1,T2.
-                    ⦃G, L⦄ ⊢ V1 ⬈[h] V2 → ⦃G, L.ⓛW1⦄ ⊢ T1 ⬈*[h] T2 → ⦃G, L⦄ ⊢ W1 ⬈[h] W2 →
-                    ⦃G, L⦄ ⊢ ⓐV1.ⓛ{p}W1.T1 ⬈*[h] ⓓ{p}ⓝW2.V2.T2.
+                    ⦃G,L⦄ ⊢ V1 ⬈[h] V2 → ⦃G,L.ⓛW1⦄ ⊢ T1 ⬈*[h] T2 → ⦃G,L⦄ ⊢ W1 ⬈[h] W2 →
+                    ⦃G,L⦄ ⊢ ⓐV1.ⓛ{p}W1.T1 ⬈*[h] ⓓ{p}ⓝW2.V2.T2.
 #h #p #G #L #V1 #V2 #W1 #W2 #T1 #T2 #HV12 * -T2
 /4 width=7 by cpx_cpxs, cpxs_strap1, cpxs_bind_dx, cpxs_flat_dx, cpx_beta/
 qed.
 
 lemma cpxs_theta_dx: ∀h,p,G,L,V1,V,V2,W1,W2,T1,T2.
-                     ⦃G, L⦄ ⊢ V1 ⬈[h] V → ⬆*[1] V ≘ V2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ⬈*[h] T2 →
-                     ⦃G, L⦄ ⊢ W1 ⬈[h] W2 → ⦃G, L⦄ ⊢ ⓐV1.ⓓ{p}W1.T1 ⬈*[h] ⓓ{p}W2.ⓐV2.T2.
+                     ⦃G,L⦄ ⊢ V1 ⬈[h] V → ⬆*[1] V ≘ V2 → ⦃G,L.ⓓW1⦄ ⊢ T1 ⬈*[h] T2 →
+                     ⦃G,L⦄ ⊢ W1 ⬈[h] W2 → ⦃G,L⦄ ⊢ ⓐV1.ⓓ{p}W1.T1 ⬈*[h] ⓓ{p}W2.ⓐV2.T2.
 #h #p #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 * -T2 
 /4 width=9 by cpx_cpxs, cpxs_strap1, cpxs_bind_dx, cpxs_flat_dx, cpx_theta/
 qed.
@@ -134,7 +134,7 @@ qed.
 (* Basic inversion lemmas ***************************************************)
 
 (* Basic_2A1: wa just: cpxs_inv_sort1 *)
-lemma cpxs_inv_sort1: ∀h,G,L,X2,s. ⦃G, L⦄ ⊢ ⋆s ⬈*[h] X2 →
+lemma cpxs_inv_sort1: ∀h,G,L,X2,s. ⦃G,L⦄ ⊢ ⋆s ⬈*[h] X2 →
                       ∃n. X2 = ⋆((next h)^n s).
 #h #G #L #X2 #s #H @(cpxs_ind … H) -X2 /2 width=2 by ex_intro/
 #X #X2 #_ #HX2 * #n #H destruct
@@ -142,10 +142,10 @@ elim (cpx_inv_sort1 … HX2) -HX2 #H destruct /2 width=2 by ex_intro/
 @(ex_intro … (↑n)) >iter_S //
 qed-.
 
-lemma cpxs_inv_cast1: ∀h,G,L,W1,T1,U2. ⦃G, L⦄ ⊢ ⓝW1.T1 ⬈*[h] U2 →
-                      ∨∨ ∃∃W2,T2. ⦃G, L⦄ ⊢ W1 ⬈*[h] W2 & ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 & U2 = ⓝW2.T2
-                       | ⦃G, L⦄ ⊢ T1 ⬈*[h] U2
-                       | ⦃G, L⦄ ⊢ W1 ⬈*[h] U2.
+lemma cpxs_inv_cast1: ∀h,G,L,W1,T1,U2. ⦃G,L⦄ ⊢ ⓝW1.T1 ⬈*[h] U2 →
+                      ∨∨ ∃∃W2,T2. ⦃G,L⦄ ⊢ W1 ⬈*[h] W2 & ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 & U2 = ⓝW2.T2
+                       | ⦃G,L⦄ ⊢ T1 ⬈*[h] U2
+                       | ⦃G,L⦄ ⊢ W1 ⬈*[h] U2.
 #h #G #L #W1 #T1 #U2 #H @(cpxs_ind … H) -U2 /3 width=5 by or3_intro0, ex3_2_intro/
 #U2 #U #_ #HU2 * /3 width=3 by cpxs_strap1, or3_intro1, or3_intro2/ *
 #W #T #HW1 #HT1 #H destruct
index 49f74a202ab8afb2f1162dd6fbd34952d0797575..453c91e452825612c20b170cc3d322cd6f40c1e7 100644 (file)
@@ -17,10 +17,16 @@ include "basic_2/rt_computation/cpxs.ma".
 
 (* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
 
+(* Properties with normal forms *********************************************)
+
+lemma cpxs_cnx (h) (G) (L) (T1):
+      (∀T2. ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 → T1 ≛ T2) → ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃T1⦄.
+/3 width=1 by cpx_cpxs/ qed.
+
 (* Inversion lemmas with normal terms ***************************************)
 
-lemma cpxs_inv_cnx1: ∀h,o,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 → ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃T1⦄ →
-                     T1 ≛[h, o] T2.
-#h #o #G #L #T1 #T2 #H @(cpxs_ind_dx … H) -T1
-/5 width=8 by cnx_tdeq_trans, tdeq_trans/
+lemma cpxs_inv_cnx1 (h) (G) (L):
+      ∀T1,T2. ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 → ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃T1⦄ → T1 ≛ T2.
+#h #G #L #T1 #T2 #H @(cpxs_ind_dx … H) -T1
+/5 width=9 by cnx_tdeq_trans, tdeq_trans/
 qed-.
index 4740fc09278589f7bb42052736016135b9f20d5e..60ddf6394ca9621351724650c5f18c663e286940 100644 (file)
@@ -22,58 +22,58 @@ include "basic_2/rt_computation/cpxs.ma".
 theorem cpxs_trans: ∀h,G,L. Transitive … (cpxs h G L).
 normalize /2 width=3 by trans_TC/ qed-.
 
-theorem cpxs_bind: ∀h,p,I,G,L,V1,V2,T1,T2. ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ⬈*[h] T2 →
-                   ⦃G, L⦄ ⊢ V1 ⬈*[h] V2 →
-                   ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈*[h] ⓑ{p,I}V2.T2.
+theorem cpxs_bind: ∀h,p,I,G,L,V1,V2,T1,T2. ⦃G,L.ⓑ{I}V1⦄ ⊢ T1 ⬈*[h] T2 →
+                   ⦃G,L⦄ ⊢ V1 ⬈*[h] V2 →
+                   ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈*[h] ⓑ{p,I}V2.T2.
 #h #p #I #G #L #V1 #V2 #T1 #T2 #HT12 #H @(cpxs_ind … H) -V2
 /3 width=5 by cpxs_trans, cpxs_bind_dx/
 qed.
 
-theorem cpxs_flat: ∀h,I,G,L,V1,V2,T1,T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 →
-                   ⦃G, L⦄ ⊢ V1 ⬈*[h] V2 →
-                   ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ⬈*[h] ⓕ{I}V2.T2.
+theorem cpxs_flat: ∀h,I,G,L,V1,V2,T1,T2. ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 →
+                   ⦃G,L⦄ ⊢ V1 ⬈*[h] V2 →
+                   ⦃G,L⦄ ⊢ ⓕ{I}V1.T1 ⬈*[h] ⓕ{I}V2.T2.
 #h #I #G #L #V1 #V2 #T1 #T2 #HT12 #H @(cpxs_ind … H) -V2
 /3 width=5 by cpxs_trans, cpxs_flat_dx/
 qed.
 
 theorem cpxs_beta_rc: ∀h,p,G,L,V1,V2,W1,W2,T1,T2.
-                      ⦃G, L⦄ ⊢ V1 ⬈[h] V2 → ⦃G, L.ⓛW1⦄ ⊢ T1 ⬈*[h] T2 → ⦃G, L⦄ ⊢ W1 ⬈*[h] W2 →
-                      ⦃G, L⦄ ⊢ ⓐV1.ⓛ{p}W1.T1 ⬈*[h] ⓓ{p}ⓝW2.V2.T2.
+                      ⦃G,L⦄ ⊢ V1 ⬈[h] V2 → ⦃G,L.ⓛW1⦄ ⊢ T1 ⬈*[h] T2 → ⦃G,L⦄ ⊢ W1 ⬈*[h] W2 →
+                      ⦃G,L⦄ ⊢ ⓐV1.ⓛ{p}W1.T1 ⬈*[h] ⓓ{p}ⓝW2.V2.T2.
 #h #p #G #L #V1 #V2 #W1 #W2 #T1 #T2 #HV12 #HT12 #H @(cpxs_ind … H) -W2
 /4 width=5 by cpxs_trans, cpxs_beta_dx, cpxs_bind_dx, cpx_pair_sn/
 qed.
 
 theorem cpxs_beta: ∀h,p,G,L,V1,V2,W1,W2,T1,T2.
-                   ⦃G, L.ⓛW1⦄ ⊢ T1 ⬈*[h] T2 → ⦃G, L⦄ ⊢ W1 ⬈*[h] W2 → ⦃G, L⦄ ⊢ V1 ⬈*[h] V2 →
-                   ⦃G, L⦄ ⊢ ⓐV1.ⓛ{p}W1.T1 ⬈*[h] ⓓ{p}ⓝW2.V2.T2.
+                   ⦃G,L.ⓛW1⦄ ⊢ T1 ⬈*[h] T2 → ⦃G,L⦄ ⊢ W1 ⬈*[h] W2 → ⦃G,L⦄ ⊢ V1 ⬈*[h] V2 →
+                   ⦃G,L⦄ ⊢ ⓐV1.ⓛ{p}W1.T1 ⬈*[h] ⓓ{p}ⓝW2.V2.T2.
 #h #p #G #L #V1 #V2 #W1 #W2 #T1 #T2 #HT12 #HW12 #H @(cpxs_ind … H) -V2
 /4 width=5 by cpxs_trans, cpxs_beta_rc, cpxs_bind_dx, cpx_flat/
 qed.
 
 theorem cpxs_theta_rc: ∀h,p,G,L,V1,V,V2,W1,W2,T1,T2.
-                       ⦃G, L⦄ ⊢ V1 ⬈[h] V → ⬆*[1] V ≘ V2 →
-                       ⦃G, L.ⓓW1⦄ ⊢ T1 ⬈*[h] T2 → ⦃G, L⦄ ⊢ W1 ⬈*[h] W2 →
-                       ⦃G, L⦄ ⊢ ⓐV1.ⓓ{p}W1.T1 ⬈*[h] ⓓ{p}W2.ⓐV2.T2.
+                       ⦃G,L⦄ ⊢ V1 ⬈[h] V → ⬆*[1] V ≘ V2 →
+                       ⦃G,L.ⓓW1⦄ ⊢ T1 ⬈*[h] T2 → ⦃G,L⦄ ⊢ W1 ⬈*[h] W2 →
+                       ⦃G,L⦄ ⊢ ⓐV1.ⓓ{p}W1.T1 ⬈*[h] ⓓ{p}W2.ⓐV2.T2.
 #h #p #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 #HT12 #H @(cpxs_ind … H) -W2
 /3 width=5 by cpxs_trans, cpxs_theta_dx, cpxs_bind_dx/
 qed.
 
 theorem cpxs_theta: ∀h,p,G,L,V1,V,V2,W1,W2,T1,T2.
-                    ⬆*[1] V ≘ V2 → ⦃G, L⦄ ⊢ W1 ⬈*[h] W2 →
-                    ⦃G, L.ⓓW1⦄ ⊢ T1 ⬈*[h] T2 → ⦃G, L⦄ ⊢ V1 ⬈*[h] V →
-                    ⦃G, L⦄ ⊢ ⓐV1.ⓓ{p}W1.T1 ⬈*[h] ⓓ{p}W2.ⓐV2.T2.
+                    ⬆*[1] V ≘ V2 → ⦃G,L⦄ ⊢ W1 ⬈*[h] W2 →
+                    ⦃G,L.ⓓW1⦄ ⊢ T1 ⬈*[h] T2 → ⦃G,L⦄ ⊢ V1 ⬈*[h] V →
+                    ⦃G,L⦄ ⊢ ⓐV1.ⓓ{p}W1.T1 ⬈*[h] ⓓ{p}W2.ⓐV2.T2.
 #h #p #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV2 #HW12 #HT12 #H @(TC_ind_dx … V1 H) -V1
 /3 width=5 by cpxs_trans, cpxs_theta_rc, cpxs_flat_dx/
 qed.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma cpxs_inv_appl1: ∀h,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓐV1.T1 ⬈*[h] U2 →
-                      ∨∨ ∃∃V2,T2.       ⦃G, L⦄ ⊢ V1 ⬈*[h] V2 & ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 &
+lemma cpxs_inv_appl1: ∀h,G,L,V1,T1,U2. ⦃G,L⦄ ⊢ ⓐV1.T1 ⬈*[h] U2 →
+                      ∨∨ ∃∃V2,T2.       ⦃G,L⦄ ⊢ V1 ⬈*[h] V2 & ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 &
                                         U2 = ⓐV2.T2
-                       | ∃∃p,W,T.       ⦃G, L⦄ ⊢ T1 ⬈*[h] ⓛ{p}W.T & ⦃G, L⦄ ⊢ ⓓ{p}ⓝW.V1.T ⬈*[h] U2
-                       | ∃∃p,V0,V2,V,T. ⦃G, L⦄ ⊢ V1 ⬈*[h] V0 & ⬆*[1] V0 ≘ V2 &
-                                        ⦃G, L⦄ ⊢ T1 ⬈*[h] ⓓ{p}V.T & ⦃G, L⦄ ⊢ ⓓ{p}V.ⓐV2.T ⬈*[h] U2.
+                       | ∃∃p,W,T.       ⦃G,L⦄ ⊢ T1 ⬈*[h] ⓛ{p}W.T & ⦃G,L⦄ ⊢ ⓓ{p}ⓝW.V1.T ⬈*[h] U2
+                       | ∃∃p,V0,V2,V,T. ⦃G,L⦄ ⊢ V1 ⬈*[h] V0 & ⬆*[1] V0 ≘ V2 &
+                                        ⦃G,L⦄ ⊢ T1 ⬈*[h] ⓓ{p}V.T & ⦃G,L⦄ ⊢ ⓓ{p}V.ⓐV2.T ⬈*[h] U2.
 #h #G #L #V1 #T1 #U2 #H @(cpxs_ind … H) -U2 [ /3 width=5 by or3_intro0, ex3_2_intro/ ]
 #U #U2 #_ #HU2 * *
 [ #V0 #T0 #HV10 #HT10 #H destruct
index c42f94f83b665ee43394297b61cda43a7aa5fd6a..09ba0f251932c474629c31958aaeed997f4a49a4 100644 (file)
@@ -20,8 +20,8 @@ include "basic_2/rt_computation/cpxs.ma".
 
 (* Advanced properties ******************************************************)
 
-lemma cpxs_delta: ∀h,I,G,K,V1,V2. ⦃G, K⦄ ⊢ V1 ⬈*[h] V2 →
-                  ∀W2. ⬆*[1] V2 ≘ W2 → ⦃G, K.ⓑ{I}V1⦄ ⊢ #0 ⬈*[h] W2.
+lemma cpxs_delta: ∀h,I,G,K,V1,V2. ⦃G,K⦄ ⊢ V1 ⬈*[h] V2 →
+                  ∀W2. ⬆*[1] V2 ≘ W2 → ⦃G,K.ⓑ{I}V1⦄ ⊢ #0 ⬈*[h] W2.
 #h #I #G #K #V1 #V2 #H @(cpxs_ind … H) -V2
 [ /3 width=3 by cpx_cpxs, cpx_delta/
 | #V #V2 #_ #HV2 #IH #W2 #HVW2
@@ -30,8 +30,8 @@ lemma cpxs_delta: ∀h,I,G,K,V1,V2. ⦃G, K⦄ ⊢ V1 ⬈*[h] V2 →
 ]
 qed.
 
-lemma cpxs_lref: ∀h,I,G,K,T,i. ⦃G, K⦄ ⊢ #i ⬈*[h] T →
-                 ∀U. ⬆*[1] T ≘ U → ⦃G, K.ⓘ{I}⦄ ⊢ #↑i ⬈*[h] U.
+lemma cpxs_lref: ∀h,I,G,K,T,i. ⦃G,K⦄ ⊢ #i ⬈*[h] T →
+                 ∀U. ⬆*[1] T ≘ U → ⦃G,K.ⓘ{I}⦄ ⊢ #↑i ⬈*[h] U.
 #h #I #G #K #T #i #H @(cpxs_ind … H) -T
 [ /3 width=3 by cpx_cpxs, cpx_lref/
 | #T0 #T #_ #HT2 #IH #U #HTU
@@ -42,8 +42,8 @@ qed.
 
 (* Basic_2A1: was: cpxs_delta *)
 lemma cpxs_delta_drops: ∀h,I,G,L,K,V1,V2,i.
-                        ⬇*[i] L ≘ K.ⓑ{I}V1 → ⦃G, K⦄ ⊢ V1 ⬈*[h] V2 →
-                        ∀W2. ⬆*[↑i] V2 ≘ W2 → ⦃G, L⦄ ⊢ #i ⬈*[h] W2.
+                        ⬇*[i] L ≘ K.ⓑ{I}V1 → ⦃G,K⦄ ⊢ V1 ⬈*[h] V2 →
+                        ∀W2. ⬆*[↑i] V2 ≘ W2 → ⦃G,L⦄ ⊢ #i ⬈*[h] W2.
 #h #I #G #L #K #V1 #V2 #i #HLK #H @(cpxs_ind … H) -V2
 [ /3 width=7 by cpx_cpxs, cpx_delta_drops/
 | #V #V2 #_ #HV2 #IH #W2 #HVW2
@@ -54,9 +54,9 @@ qed.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma cpxs_inv_zero1: ∀h,G,L,T2. ⦃G, L⦄ ⊢ #0 ⬈*[h] T2 →
+lemma cpxs_inv_zero1: ∀h,G,L,T2. ⦃G,L⦄ ⊢ #0 ⬈*[h] T2 →
                       T2 = #0 ∨
-                      ∃∃I,K,V1,V2. ⦃G, K⦄ ⊢ V1 ⬈*[h] V2 & ⬆*[1] V2 ≘ T2 &
+                      ∃∃I,K,V1,V2. ⦃G,K⦄ ⊢ V1 ⬈*[h] V2 & ⬆*[1] V2 ≘ T2 &
                                    L = K.ⓑ{I}V1.
 #h #G #L #T2 #H @(cpxs_ind … H) -T2 /2 width=1 by or_introl/
 #T #T2 #_ #HT2 *
@@ -69,9 +69,9 @@ lemma cpxs_inv_zero1: ∀h,G,L,T2. ⦃G, L⦄ ⊢ #0 ⬈*[h] T2 →
 ]
 qed-.
 
-lemma cpxs_inv_lref1: ∀h,G,L,T2,i. ⦃G, L⦄ ⊢ #↑i ⬈*[h] T2 →
+lemma cpxs_inv_lref1: ∀h,G,L,T2,i. ⦃G,L⦄ ⊢ #↑i ⬈*[h] T2 →
                       T2 = #(↑i) ∨
-                      ∃∃I,K,T. ⦃G, K⦄ ⊢ #i ⬈*[h] T & ⬆*[1] T ≘ T2 & L = K.ⓘ{I}.
+                      ∃∃I,K,T. ⦃G,K⦄ ⊢ #i ⬈*[h] T & ⬆*[1] T ≘ T2 & L = K.ⓘ{I}.
 #h #G #L #T2 #i #H @(cpxs_ind … H) -T2 /2 width=1 by or_introl/
 #T #T2 #_ #HT2 *
 [ #H destruct
@@ -84,9 +84,9 @@ lemma cpxs_inv_lref1: ∀h,G,L,T2,i. ⦃G, L⦄ ⊢ #↑i ⬈*[h] T2 →
 qed-.
 
 (* Basic_2A1: was: cpxs_inv_lref1 *)
-lemma cpxs_inv_lref1_drops: ∀h,G,L,T2,i. ⦃G, L⦄ ⊢ #i ⬈*[h] T2 →
+lemma cpxs_inv_lref1_drops: ∀h,G,L,T2,i. ⦃G,L⦄ ⊢ #i ⬈*[h] T2 →
                             T2 = #i ∨
-                            ∃∃I,K,V1,T1. ⬇*[i] L ≘ K.ⓑ{I}V1 & ⦃G, K⦄ ⊢ V1 ⬈*[h] T1 &
+                            ∃∃I,K,V1,T1. ⬇*[i] L ≘ K.ⓑ{I}V1 & ⦃G,K⦄ ⊢ V1 ⬈*[h] T1 &
                                          ⬆*[↑i] T1 ≘ T2.
 #h #G #L #T2 #i #H @(cpxs_ind … H) -T2 /2 width=1 by or_introl/
 #T #T2 #_ #HT2 *
index 1db09aeb5cbec699ed86f55c172f489c6861bcd7..1b12ae605e7467d1d70468310e7029eada2b271f 100644 (file)
@@ -17,12 +17,12 @@ include "basic_2/rt_computation/cpxs_rdeq.ma".
 
 (* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
 
-(* Properties with degree-based equivalence for closures ********************)
+(* Properties with sort-irrelevant equivalence for closures *****************)
 
-lemma fdeq_cpxs_trans: ∀h,o,G1,G2,L1,L2,T1,T. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T⦄ →
-                       ∀T2. ⦃G2, L2⦄ ⊢ T ⬈*[h] T2 →
-                       ∃∃T0. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] T0 & ⦃G1, L1, T0⦄ ≛[h, o] ⦃G2, L2, T2⦄.
-#h #o #G1 #G2 #L1 #L2 #T1 #T #H #T2 #HT2
+lemma fdeq_cpxs_trans: ∀h,G1,G2,L1,L2,T1,T. ⦃G1,L1,T1⦄ ≛ ⦃G2,L2,T⦄ →
+                       ∀T2. ⦃G2,L2⦄ ⊢ T ⬈*[h] T2 →
+                       ∃∃T0. ⦃G1,L1⦄ ⊢ T1 ⬈*[h] T0 & ⦃G1,L1,T0⦄ ≛ ⦃G2,L2,T2⦄.
+#h #G1 #G2 #L1 #L2 #T1 #T #H #T2 #HT2
 elim (fdeq_inv_gen_dx … H) -H #H #HL12 #HT1 destruct
 elim (rdeq_cpxs_trans … HT2 … HL12) #T0 #HT0 #HT02
 lapply (cpxs_rdeq_conf_dx … HT2 … HL12) -HL12 #HL12
index c6206f82ffc043b7ff427bdb9d57457b654235da..eb8e6748ac386f51411fddb8c9dc00ecd1bae6ab 100644 (file)
@@ -21,33 +21,33 @@ include "basic_2/rt_computation/cpxs_cpxs.ma".
 
 (* Properties on supclosure *************************************************)
 
-lemma fqu_cpxs_trans: ∀h,b,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h] U2 →
-                      ∀T1. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
-                      ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] U1 & ⦃G1, L1, U1⦄ ⊐[b] ⦃G2, L2, U2⦄.
+lemma fqu_cpxs_trans: ∀h,b,G1,G2,L1,L2,T2,U2. ⦃G2,L2⦄ ⊢ T2 ⬈*[h] U2 →
+                      ∀T1. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ →
+                      ∃∃U1. ⦃G1,L1⦄ ⊢ T1 ⬈*[h] U1 & ⦃G1,L1,U1⦄ ⬂[b] ⦃G2,L2,U2⦄.
 #h #b #G1 #G2 #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 /2 width=3 by ex2_intro/
 #T #T2 #HT2 #_ #IHTU2 #T1 #HT1 elim (fqu_cpx_trans … HT1 … HT2) -T
 #T #HT1 #HT2 elim (IHTU2 … HT2) -T2 /3 width=3 by cpxs_strap2, ex2_intro/
 qed-.
 
-lemma fquq_cpxs_trans: ∀h,b,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h] U2 →
-                       ∀T1. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ →
-                       ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] U1 & ⦃G1, L1, U1⦄ ⊐⸮[b] ⦃G2, L2, U2⦄.
+lemma fquq_cpxs_trans: ∀h,b,G1,G2,L1,L2,T2,U2. ⦃G2,L2⦄ ⊢ T2 ⬈*[h] U2 →
+                       ∀T1. ⦃G1,L1,T1⦄ ⬂⸮[b] ⦃G2,L2,T2⦄ →
+                       ∃∃U1. ⦃G1,L1⦄ ⊢ T1 ⬈*[h] U1 & ⦃G1,L1,U1⦄ ⬂⸮[b] ⦃G2,L2,U2⦄.
 #h #b #G1 #G2 #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 /2 width=3 by ex2_intro/
 #T #T2 #HT2 #_ #IHTU2 #T1 #HT1 elim (fquq_cpx_trans … HT1 … HT2) -T
 #T #HT1 #HT2 elim (IHTU2 … HT2) -T2 /3 width=3 by cpxs_strap2, ex2_intro/
 qed-.
 
-lemma fqup_cpxs_trans: ∀h,b,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h] U2 →
-                       ∀T1. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ →
-                       ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] U1 & ⦃G1, L1, U1⦄ ⊐+[b] ⦃G2, L2, U2⦄.
+lemma fqup_cpxs_trans: ∀h,b,G1,G2,L1,L2,T2,U2. ⦃G2,L2⦄ ⊢ T2 ⬈*[h] U2 →
+                       ∀T1. ⦃G1,L1,T1⦄ ⬂+[b] ⦃G2,L2,T2⦄ →
+                       ∃∃U1. ⦃G1,L1⦄ ⊢ T1 ⬈*[h] U1 & ⦃G1,L1,U1⦄ ⬂+[b] ⦃G2,L2,U2⦄.
 #h #b #G1 #G2 #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 /2 width=3 by ex2_intro/
 #T #T2 #HT2 #_ #IHTU2 #T1 #HT1 elim (fqup_cpx_trans … HT1 … HT2) -T
 #U1 #HTU1 #H2 elim (IHTU2 … H2) -T2 /3 width=3 by cpxs_strap2, ex2_intro/
 qed-.
 
-lemma fqus_cpxs_trans: ∀h,b,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h] U2 →
-                       ∀T1. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
-                       ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] U1 & ⦃G1, L1, U1⦄ ⊐*[b] ⦃G2, L2, U2⦄.
+lemma fqus_cpxs_trans: ∀h,b,G1,G2,L1,L2,T2,U2. ⦃G2,L2⦄ ⊢ T2 ⬈*[h] U2 →
+                       ∀T1. ⦃G1,L1,T1⦄ ⬂*[b] ⦃G2,L2,T2⦄ →
+                       ∃∃U1. ⦃G1,L1⦄ ⊢ T1 ⬈*[h] U1 & ⦃G1,L1,U1⦄ ⬂*[b] ⦃G2,L2,U2⦄.
 #h #b #G1 #G2 #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 /2 width=3 by ex2_intro/
 #T #T2 #HT2 #_ #IHTU2 #T1 #HT1 elim (fqus_cpx_trans … HT1 … HT2) -T
 #U1 #HTU1 #H2 elim (IHTU2 … H2) -T2 /3 width=3 by cpxs_strap2, ex2_intro/
@@ -55,10 +55,10 @@ qed-.
 
 (* Note: a proof based on fqu_cpx_trans_tdneq might exist *)
 (* Basic_2A1: uses: fqu_cpxs_trans_neq *)
-lemma fqu_cpxs_trans_tdneq: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
-                            ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h] U2 → (T2 ≛[h, o] U2 → ⊥) →
-                            ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] U1 & T1 ≛[h, o] U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐[b] ⦃G2, L2, U2⦄.
-#h #o #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
+lemma fqu_cpxs_trans_tdneq: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ →
+                            ∀U2. ⦃G2,L2⦄ ⊢ T2 ⬈*[h] U2 → (T2 ≛ U2 → ⊥) →
+                            ∃∃U1. ⦃G1,L1⦄ ⊢ T1 ⬈*[h] U1 & T1 ≛ U1 → ⊥ & ⦃G1,L1,U1⦄ ⬂[b] ⦃G2,L2,U2⦄.
+#h #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/
@@ -69,7 +69,7 @@ lemma fqu_cpxs_trans_tdneq: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b]
   [1,3: /2 width=4 by fqu_pair_sn, cpxs_pair_sn/
   | #H elim (tdeq_inv_pair … H) -H /2 width=1 by/
   ]
-| #p #I #G #L #V #T1 #T2 #HT12 #H0 @(ex3_intro … (ⓑ{p,I}V.T2))
+| #p #I #G #L #V #T1 #Hb #T2 #HT12 #H0 @(ex3_intro … (ⓑ{p,I}V.T2))
   [1,3: /2 width=4 by fqu_bind_dx, cpxs_bind/
   | #H elim (tdeq_inv_pair … H) -H /2 width=1 by/
   ]
@@ -88,10 +88,10 @@ lemma fqu_cpxs_trans_tdneq: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b]
 qed-.
 
 (* Basic_2A1: uses: fquq_cpxs_trans_neq *)
-lemma fquq_cpxs_trans_tdneq: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ →
-                             ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h] U2 → (T2 ≛[h, o] U2 → ⊥) →
-                             ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] U1 & T1 ≛[h, o] U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐⸮[b] ⦃G2, L2, U2⦄.
-#h #o #b #G1 #G2 #L1 #L2 #T1 #T2 #H12 elim H12 -H12
+lemma fquq_cpxs_trans_tdneq: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂⸮[b] ⦃G2,L2,T2⦄ →
+                             ∀U2. ⦃G2,L2⦄ ⊢ T2 ⬈*[h] U2 → (T2 ≛ U2 → ⊥) →
+                             ∃∃U1. ⦃G1,L1⦄ ⊢ T1 ⬈*[h] U1 & T1 ≛ U1 → ⊥ & ⦃G1,L1,U1⦄ ⬂⸮[b] ⦃G2,L2,U2⦄.
+#h #b #G1 #G2 #L1 #L2 #T1 #T2 #H12 elim H12 -H12
 [ #H12 #U2 #HTU2 #H elim (fqu_cpxs_trans_tdneq … H12 … HTU2 H) -T2
   /3 width=4 by fqu_fquq, ex3_intro/
 | * #HG #HL #HT destruct /3 width=4 by ex3_intro/
@@ -99,10 +99,10 @@ lemma fquq_cpxs_trans_tdneq: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮
 qed-.
 
 (* Basic_2A1: uses: fqup_cpxs_trans_neq *)
-lemma fqup_cpxs_trans_tdneq: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ →
-                             ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h] U2 → (T2 ≛[h, o] U2 → ⊥) →
-                             ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] U1 & T1 ≛[h, o] U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐+[b] ⦃G2, L2, U2⦄.
-#h #o #b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1
+lemma fqup_cpxs_trans_tdneq: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂+[b] ⦃G2,L2,T2⦄ →
+                             ∀U2. ⦃G2,L2⦄ ⊢ T2 ⬈*[h] U2 → (T2 ≛ U2 → ⊥) →
+                             ∃∃U1. ⦃G1,L1⦄ ⊢ T1 ⬈*[h] U1 & T1 ≛ U1 → ⊥ & ⦃G1,L1,U1⦄ ⬂+[b] ⦃G2,L2,U2⦄.
+#h #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_tdneq … H12 … HTU2 H) -T2
   /3 width=4 by fqu_fqup, ex3_intro/
 | #G #G1 #L #L1 #T #T1 #H1 #_ #IH12 #U2 #HTU2 #H elim (IH12 … HTU2 H) -T2
@@ -112,10 +112,10 @@ lemma fqup_cpxs_trans_tdneq: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+[b
 qed-.
 
 (* Basic_2A1: uses: fqus_cpxs_trans_neq *)
-lemma fqus_cpxs_trans_tdneq: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
-                             ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h] U2 → (T2 ≛[h, o] U2 → ⊥) →
-                             ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] U1 & T1 ≛[h, o] U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐*[b] ⦃G2, L2, U2⦄.
-#h #o #b #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fqus_inv_fqup … H12) -H12
+lemma fqus_cpxs_trans_tdneq: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂*[b] ⦃G2,L2,T2⦄ →
+                             ∀U2. ⦃G2,L2⦄ ⊢ T2 ⬈*[h] U2 → (T2 ≛ U2 → ⊥) →
+                             ∃∃U1. ⦃G1,L1⦄ ⊢ T1 ⬈*[h] U1 & T1 ≛ U1 → ⊥ & ⦃G1,L1,U1⦄ ⬂*[b] ⦃G2,L2,U2⦄.
+#h #b #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fqus_inv_fqup … H12) -H12
 [ #H12 elim (fqup_cpxs_trans_tdneq … H12 … HTU2 H) -T2
   /3 width=4 by fqup_fqus, ex3_intro/
 | * #HG #HL #HT destruct /3 width=4 by ex3_intro/
index f5cefda3a524037cc042e8c29622feb8addd650a..599e41a203e90fede89e156c7f71bee5b3979c7e 100644 (file)
@@ -44,22 +44,22 @@ qed-.
 
 (* Advanced properties ******************************************************)
 
-lemma cpx_bind2: ∀h,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 →
-                 ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ⬈[h] T2 →
-                 ∀p. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈*[h] ⓑ{p,I}V2.T2.
+lemma cpx_bind2: ∀h,G,L,V1,V2. ⦃G,L⦄ ⊢ V1 ⬈[h] V2 →
+                 ∀I,T1,T2. ⦃G,L.ⓑ{I}V2⦄ ⊢ T1 ⬈[h] T2 →
+                 ∀p. ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈*[h] ⓑ{p,I}V2.T2.
 /4 width=5 by lpx_cpx_trans, cpxs_bind_dx, lpx_pair/ qed.
 
-lemma cpxs_bind2_dx: ∀h,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 →
-                     ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ⬈*[h] T2 →
-                     ∀p. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈*[h] ⓑ{p,I}V2.T2.
+lemma cpxs_bind2_dx: ∀h,G,L,V1,V2. ⦃G,L⦄ ⊢ V1 ⬈[h] V2 →
+                     ∀I,T1,T2. ⦃G,L.ⓑ{I}V2⦄ ⊢ T1 ⬈*[h] T2 →
+                     ∀p. ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈*[h] ⓑ{p,I}V2.T2.
 /4 width=5 by lpx_cpxs_trans, cpxs_bind_dx, lpx_pair/ qed.
 
 (* Properties with plus-iterated structural successor for closures **********)
 
 (* Basic_2A1: uses: lpx_fqup_trans *)
-lemma lpx_fqup_trans: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ →
-                      ∀K1. ⦃G1, K1⦄ ⊢ ⬈[h] L1 →
-                      ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ⬈*[h] T & ⦃G1, K1, T⦄ ⊐+[b] ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ⬈[h] L2.
+lemma lpx_fqup_trans: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂+[b] ⦃G2,L2,T2⦄ →
+                      ∀K1. ⦃G1,K1⦄ ⊢ ⬈[h] L1 →
+                      ∃∃K2,T. ⦃G1,K1⦄ ⊢ T1 ⬈*[h] T & ⦃G1,K1,T⦄ ⬂+[b] ⦃G2,K2,T2⦄ & ⦃G2,K2⦄ ⊢ ⬈[h] L2.
 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2
 [ #G2 #L2 #T2 #H12 #K1 #HKL1 elim (lpx_fqu_trans … H12 … HKL1) -L1
   /3 width=5 by cpx_cpxs, fqu_fqup, ex3_2_intro/
@@ -73,9 +73,9 @@ qed-.
 (* Properties with star-iterated structural successor for closures **********)
 
 (* Basic_2A1: uses: lpx_fqus_trans *)
-lemma lpx_fqus_trans: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
-                      ∀K1. ⦃G1, K1⦄ ⊢ ⬈[h] L1 →
-                      ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ⬈*[h] T & ⦃G1, K1, T⦄ ⊐*[b] ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ⬈[h] L2.
+lemma lpx_fqus_trans: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂*[b] ⦃G2,L2,T2⦄ →
+                      ∀K1. ⦃G1,K1⦄ ⊢ ⬈[h] L1 →
+                      ∃∃K2,T. ⦃G1,K1⦄ ⊢ T1 ⬈*[h] T & ⦃G1,K1,T⦄ ⬂*[b] ⦃G2,K2,T2⦄ & ⦃G2,K2⦄ ⊢ ⬈[h] L2.
 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #HKL1 elim (fqus_inv_fqup … H) -H
 [ #H12 elim (lpx_fqup_trans … H12 … HKL1) -L1 /3 width=5 by fqup_fqus, ex3_2_intro/
 | * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/
index 292dc54e1609be9441ec59872869e10e29865fba..1d3dfa50d0d8208584c11f1eebe4ecca14154b8b 100644 (file)
@@ -17,33 +17,33 @@ include "basic_2/rt_computation/cpxs_tdeq.ma".
 
 (* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
 
-(* Properties with degree-based equivalence for local environments **********)
+(* Properties with sort-irrelevant equivalence for local environments *******)
 
 (* Basic_2A1: was just: lleq_cpxs_trans *) 
-lemma rdeq_cpxs_trans: ∀h,o,G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ⬈*[h] T1 →
-                       ∀L2. L2 ≛[h, o, T0] L0 →
-                       ∃∃T. ⦃G, L2⦄ ⊢ T0 ⬈*[h] T & T ≛[h, o] T1.
-#h #o #G #L0 #T0 #T1 #H @(cpxs_ind_dx … H) -T0 /2 width=3 by ex2_intro/
+lemma rdeq_cpxs_trans: ∀h,G,L0,T0,T1. ⦃G,L0⦄ ⊢ T0 ⬈*[h] T1 →
+                       ∀L2. L2 ≛[T0] L0 →
+                       ∃∃T. ⦃G,L2⦄ ⊢ T0 ⬈*[h] T & T ≛ T1.
+#h #G #L0 #T0 #T1 #H @(cpxs_ind_dx … H) -T0 /2 width=3 by ex2_intro/
 #T0 #T #HT0 #_ #IH #L2 #HL2
 elim (rdeq_cpx_trans … HL2 … HT0) #U1 #H1 #H2
-elim (IH L2) -IH /2 width=4 by cpx_rdeq_conf_dx/ -L0 #U2 #H3 #H4
+elim (IH L2) -IH /2 width=5 by cpx_rdeq_conf_dx/ -L0 #U2 #H3 #H4
 elim (tdeq_cpxs_trans … H2 … H3) -T #U0 #H2 #H3
 /3 width=5 by cpxs_strap2, tdeq_trans, ex2_intro/
 qed-.
 
 (* Basic_2A1: was just: cpxs_lleq_conf *) 
-lemma cpxs_rdeq_conf: ∀h,o,G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ⬈*[h] T1 →
-                      ∀L2. L0 ≛[h, o, T0] L2 →
-                      ∃∃T. ⦃G, L2⦄ ⊢ T0 ⬈*[h] T & T ≛[h, o] T1.
+lemma cpxs_rdeq_conf: ∀h,G,L0,T0,T1. ⦃G,L0⦄ ⊢ T0 ⬈*[h] T1 →
+                      ∀L2. L0 ≛[T0] L2 →
+                      ∃∃T. ⦃G,L2⦄ ⊢ T0 ⬈*[h] T & T ≛ T1.
 /3 width=3 by rdeq_cpxs_trans, rdeq_sym/ qed-.
 
 (* Basic_2A1: was just: cpxs_lleq_conf_dx *) 
-lemma cpxs_rdeq_conf_dx: ∀h,o,G,L2,T1,T2. ⦃G, L2⦄ ⊢ T1 ⬈*[h] T2 →
-                         ∀L1. L1 ≛[h, o, T1] L2 → L1 ≛[h, o, T2] L2.
-#h #o #G #L2 #T1 #T2 #H @(cpxs_ind … H) -T2 /3 width=6 by cpx_rdeq_conf_dx/
+lemma cpxs_rdeq_conf_dx: ∀h,G,L2,T1,T2. ⦃G,L2⦄ ⊢ T1 ⬈*[h] T2 →
+                         ∀L1. L1 ≛[T1] L2 → L1 ≛[T2] L2.
+#h #G #L2 #T1 #T2 #H @(cpxs_ind … H) -T2 /3 width=6 by cpx_rdeq_conf_dx/
 qed-.
 
 (* Basic_2A1: was just: lleq_conf_sn *) 
-lemma cpxs_rdeq_conf_sn: ∀h,o,G,L1,T1,T2. ⦃G, L1⦄ ⊢ T1 ⬈*[h] T2 →
-                         ∀L2. L1 ≛[h, o, T1] L2 → L1 ≛[h, o, T2] L2.
+lemma cpxs_rdeq_conf_sn: ∀h,G,L1,T1,T2. ⦃G,L1⦄ ⊢ T1 ⬈*[h] T2 →
+                         ∀L2. L1 ≛[T1] L2 → L1 ≛[T2] L2.
 /4 width=6 by cpxs_rdeq_conf_dx, rdeq_sym/ qed-.
index 279ee212eb6529b2ea9abd5c092f47d1ea9f3c8a..b1d2c94642019cca899fcc9cb366517801dc0d97 100644 (file)
@@ -17,23 +17,23 @@ include "basic_2/rt_computation/cpxs.ma".
 
 (* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
 
-(* Properties with degree-based equivalence for terms ***********************)
+(* Properties with sort-irrelevant equivalence for terms ********************)
 
-lemma tdeq_cpxs_trans: ∀h,o,U1,T1. U1 ≛[h, o] T1 → ∀G,L,T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 → 
-                       ∃∃U2. ⦃G, L⦄ ⊢ U1 ⬈*[h] U2 & U2 ≛[h, o] T2.
-#h #o #U1 #T1 #HUT1 #G #L #T2 #HT12 @(cpxs_ind … HT12) -T2 /2 width=3 by ex2_intro/
+lemma tdeq_cpxs_trans: ∀h,U1,T1. U1 ≛ T1 → ∀G,L,T2. ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 → 
+                       ∃∃U2. ⦃G,L⦄ ⊢ U1 ⬈*[h] U2 & U2 ≛ T2.
+#h #U1 #T1 #HUT1 #G #L #T2 #HT12 @(cpxs_ind … HT12) -T2 /2 width=3 by ex2_intro/
 #T #T2 #_ #HT2 * #U #HU1 #HUT elim (tdeq_cpx_trans … HUT … HT2) -T -T1
 /3 width=3 by ex2_intro, cpxs_strap1/
 qed-.
 
 (* Note: this requires tdeq to be symmetric *)
 (* Nasic_2A1: uses: cpxs_neq_inv_step_sn *)
-lemma cpxs_tdneq_fwd_step_sn: ∀h,o,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 → (T1 ≛[h, o] T2 → ⊥) →
-                              ∃∃T,T0. ⦃G, L⦄ ⊢ T1 ⬈[h] T & T1 ≛[h, o] T → ⊥ & ⦃G, L⦄ ⊢ T ⬈*[h] T0 & T0 ≛[h, o] T2.
-#h #o #G #L #T1 #T2 #H @(cpxs_ind_dx … H) -T1
+lemma cpxs_tdneq_fwd_step_sn: ∀h,G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 → (T1 ≛ T2 → ⊥) →
+                              ∃∃T,T0. ⦃G,L⦄ ⊢ T1 ⬈[h] T & T1 ≛ T → ⊥ & ⦃G,L⦄ ⊢ T ⬈*[h] T0 & T0 ≛ T2.
+#h #G #L #T1 #T2 #H @(cpxs_ind_dx … H) -T1
 [ #H elim H -H //
 | #T1 #T0 #HT10 #HT02 #IH #Hn12
-  elim (tdeq_dec h o T1 T0) [ -HT10 -HT02 #H10 | -IH #Hn10 ]
+  elim (tdeq_dec T1 T0) [ -HT10 -HT02 #H10 | -IH #Hn10 ]
   [ elim IH -IH /3 width=3 by tdeq_trans/ -Hn12
     #T3 #T4 #HT03 #Hn03 #HT34 #H42
     elim (tdeq_cpx_trans … H10 … HT03) -HT03 #T5 #HT15 #H53
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_theq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_theq.ma
deleted file mode 100644 (file)
index 4bd1dd0..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "static_2/syntax/theq_tdeq.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".
-
-(* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
-
-(* Forward lemmas with head equivalence for terms ***************************)
-
-lemma cpxs_fwd_sort: ∀h,o,G,L,U,s. ⦃G, L⦄ ⊢ ⋆s ⬈*[h] U →
-                     ⋆s ⩳[h, o] U ∨ ⦃G, L⦄ ⊢ ⋆(next h s) ⬈*[h] U.
-#h #o #G #L #U #s #H elim (cpxs_inv_sort1 … H) -H *
-[ #H destruct /2 width=1 by or_introl/
-| #n #H destruct
-  @or_intror >iter_S <(iter_n_Sm … (next h)) // (**)
-]
-qed-.
-
-(* Note: probably this is an inversion lemma *)
-(* Basic_2A1: was: cpxs_fwd_delta *)
-lemma cpxs_fwd_delta_drops: ∀h,o,I,G,L,K,V1,i. ⬇*[i] L ≘ K.ⓑ{I}V1 →
-                            ∀V2. ⬆*[↑i] V1 ≘ V2 →
-                            ∀U. ⦃G, L⦄ ⊢ #i ⬈*[h] U →
-                            #i ⩳[h, o] U ∨ ⦃G, L⦄ ⊢ V2 ⬈*[h] U.
-#h #o #I #G #L #K #V1 #i #HLK #V2 #HV12 #U #H
-elim (cpxs_inv_lref1_drops … H) -H /2 width=1 by or_introl/
-* #I0 #K0 #V0 #U0 #HLK0 #HVU0 #HU0
-lapply (drops_mono … HLK0 … HLK) -HLK0 #H destruct
-/4 width=9 by cpxs_lifts_bi, drops_isuni_fwd_drop2, or_intror/
-qed-.
-
-(* Basic_1: was just: pr3_iso_beta *)
-lemma cpxs_fwd_beta: ∀h,o,p,G,L,V,W,T,U. ⦃G, L⦄ ⊢ ⓐV.ⓛ{p}W.T ⬈*[h] U →
-                     ⓐV.ⓛ{p}W.T ⩳[h, o] U ∨ ⦃G, L⦄ ⊢ ⓓ{p}ⓝW.V.T ⬈*[h] U.
-#h #o #p #G #L #V #W #T #U #H elim (cpxs_inv_appl1 … H) -H *
-[ #V0 #T0 #_ #_ #H destruct /2 width=1 by theq_pair, or_introl/
-| #b #W0 #T0 #HT0 #HU
-  elim (cpxs_inv_abst1 … HT0) -HT0 #W1 #T1 #HW1 #HT1 #H destruct
-  lapply (lsubr_cpxs_trans … HT1 (L.ⓓⓝW.V) ?) -HT1
-  /5 width=3 by cpxs_trans, cpxs_bind, cpxs_pair_sn, lsubr_beta, or_intror/
-| #b #V1 #V2 #V0 #T1 #_ #_ #HT1 #_
-  elim (cpxs_inv_abst1 … HT1) -HT1 #W2 #T2 #_ #_ #H destruct
-]
-qed-.
-
-lemma cpxs_fwd_theta: ∀h,o,p,G,L,V1,V,T,U. ⦃G, L⦄ ⊢ ⓐV1.ⓓ{p}V.T ⬈*[h] U →
-                      ∀V2. ⬆*[1] V1 ≘ V2 → ⓐV1.ⓓ{p}V.T ⩳[h, o] U ∨
-                      ⦃G, L⦄ ⊢ ⓓ{p}V.ⓐV2.T ⬈*[h] U.
-#h #o #p #G #L #V1 #V #T #U #H #V2 #HV12
-elim (cpxs_inv_appl1 … H) -H *
-[ -HV12 #V0 #T0 #_ #_ #H destruct /2 width=1 by theq_pair, or_introl/
-| #q #W #T0 #HT0 #HU
-  elim (cpxs_inv_abbr1_dx … HT0) -HT0 *
-  [ #V3 #T3 #_ #_ #H destruct
-  | #X #HT2 #H #H0 destruct
-    elim (lifts_inv_bind1 … H) -H #W2 #T2 #HW2 #HT02 #H destruct
-    @or_intror @(cpxs_trans … HU) -U (**) (* explicit constructor *)
-    @(cpxs_trans … (+ⓓV.ⓐV2.ⓛ{q}W2.T2)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T
-    @(cpxs_strap2 … (ⓐV1.ⓛ{q}W.T0)) [2: /2 width=1 by cpxs_beta_dx/ ]
-    /4 width=7 by cpx_zeta, lifts_bind, lifts_flat/
-  ]
-| #q #V3 #V4 #V0 #T0 #HV13 #HV34 #HT0 #HU
-  @or_intror @(cpxs_trans … HU) -U (**) (* explicit constructor *)
-  elim (cpxs_inv_abbr1_dx … HT0) -HT0 *
-  [ #V5 #T5 #HV5 #HT5 #H destruct
-    /6 width=9 by cpxs_lifts_bi, drops_refl, drops_drop, cpxs_flat, cpxs_bind/
-  | #X #HT1 #H #H0 destruct
-    elim (lifts_inv_bind1 … H) -H #V5 #T5 #HV05 #HT05 #H destruct
-    lapply (cpxs_lifts_bi … HV13 (Ⓣ) … (L.ⓓV0) … HV12 … HV34) -V3 /3 width=1 by drops_refl, drops_drop/ #HV24
-    @(cpxs_trans … (+ⓓV.ⓐV2.ⓓ{q}V5.T5)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T
-    @(cpxs_strap2 … (ⓐV1.ⓓ{q}V0.T0)) [ /4 width=7 by cpx_zeta, lifts_bind, lifts_flat/ ] -V -V5 -T5
-    @(cpxs_strap2 … (ⓓ{q}V0.ⓐV2.T0)) /3 width=3 by cpxs_pair_sn, cpxs_bind_dx, cpx_theta/
-  ]
-]
-qed-.
-
-lemma cpxs_fwd_cast: ∀h,o,G,L,W,T,U. ⦃G, L⦄ ⊢ ⓝW.T ⬈*[h] U →
-                     ∨∨ ⓝW. T ⩳[h, o] U | ⦃G, L⦄ ⊢ T ⬈*[h] U | ⦃G, L⦄ ⊢ W ⬈*[h] U.
-#h #o #G #L #W #T #U #H
-elim (cpxs_inv_cast1 … H) -H /2 width=1 by or3_intro1, or3_intro2/ *
-#W0 #T0 #_ #_ #H destruct /2 width=1 by theq_pair, or3_intro0/
-qed-.
-
-lemma cpxs_fwd_cnx: ∀h,o,G,L,T. ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃T⦄ →
-                    ∀U. ⦃G, L⦄ ⊢ T ⬈*[h] U → T ⩳[h, o] U.
-/3 width=4 by cpxs_inv_cnx1, tdeq_theq/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_theq_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_theq_vector.ma
deleted file mode 100644 (file)
index 8c03262..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "static_2/syntax/theq_simple_vector.ma".
-include "static_2/relocation/lifts_vector.ma".
-include "basic_2/rt_computation/cpxs_theq.ma".
-
-(* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
-
-(* Vector form of forward lemmas with head equivalence for terms ************)
-
-lemma cpxs_fwd_sort_vector: ∀h,o,G,L,s,Vs,U. ⦃G, L⦄ ⊢ ⒶVs.⋆s ⬈*[h] U →
-                            ⒶVs.⋆s ⩳[h, o] U ∨ ⦃G, L⦄ ⊢ ⒶVs.⋆(next h s) ⬈*[h] U.
-#h #o #G #L #s #Vs elim Vs -Vs /2 width=1 by cpxs_fwd_sort/
-#V #Vs #IHVs #U #H
-elim (cpxs_inv_appl1 … H) -H *
-[ -IHVs #V1 #T1 #_ #_ #H destruct /2 width=1 by theq_pair, or_introl/
-| #p #W1 #T1 #HT1 #HU
-  elim (IHVs … HT1) -IHVs -HT1 #HT1
-  [ elim (theq_inv_applv_bind_simple … HT1) //
-  | @or_intror (**) (* explicit constructor *)
-    @(cpxs_trans … HU) -U
-    @(cpxs_strap1 … (ⓐV.ⓛ{p}W1.T1)) /3 width=1 by cpxs_flat_dx, cpx_beta/
-  ]
-| #p #V1 #V2 #V3 #T1 #HV01 #HV12 #HT1 #HU
-  elim (IHVs … HT1) -IHVs -HT1 #HT1
-  [ elim (theq_inv_applv_bind_simple … HT1) //
-  | @or_intror (**) (* explicit constructor *)
-    @(cpxs_trans … HU) -U
-    @(cpxs_strap1 … (ⓐV1.ⓓ{p}V3.T1)) /3 width=3 by cpxs_flat, cpx_theta/
-  ]
-]
-qed-.
-
-(* Basic_2A1: was: cpxs_fwd_delta_vector *)
-lemma cpxs_fwd_delta_drops_vector: ∀h,o,I,G,L,K,V1,i. ⬇*[i] L ≘ K.ⓑ{I}V1 →
-                                   ∀V2. ⬆*[↑i] V1 ≘ V2 →
-                                   ∀Vs,U. ⦃G, L⦄ ⊢ ⒶVs.#i ⬈*[h] U →
-                                   ⒶVs.#i ⩳[h, o] U ∨ ⦃G, L⦄ ⊢ ⒶVs.V2 ⬈*[h] U.
-#h #o #I #G #L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs /2 width=5 by cpxs_fwd_delta_drops/
-#V #Vs #IHVs #U #H -K -V1
-elim (cpxs_inv_appl1 … H) -H *
-[ -IHVs #V0 #T0 #_ #_ #H destruct /2 width=1 by theq_pair, or_introl/
-| #q #W0 #T0 #HT0 #HU
-  elim (IHVs … HT0) -IHVs -HT0 #HT0
-  [ elim (theq_inv_applv_bind_simple … HT0) //
-  | @or_intror -i (**) (* explicit constructor *)
-    @(cpxs_trans … HU) -U
-    @(cpxs_strap1 … (ⓐV.ⓛ{q}W0.T0)) /3 width=1 by cpxs_flat_dx, cpx_beta/
-  ]
-| #q #V0 #V1 #V3 #T0 #HV0 #HV01 #HT0 #HU
-  elim (IHVs … HT0) -IHVs -HT0 #HT0
-  [ elim (theq_inv_applv_bind_simple … HT0) //
-  | @or_intror -i (**) (* explicit constructor *)
-    @(cpxs_trans … HU) -U
-    @(cpxs_strap1 … (ⓐV0.ⓓ{q}V3.T0)) /3 width=3 by cpxs_flat, cpx_theta/
-  ]
-]
-qed-.
-
-(* Basic_1: was just: pr3_iso_appls_beta *)
-lemma cpxs_fwd_beta_vector: ∀h,o,p,G,L,Vs,V,W,T,U. ⦃G, L⦄ ⊢ ⒶVs.ⓐV.ⓛ{p}W.T ⬈*[h] U →
-                            ⒶVs.ⓐV.ⓛ{p}W. T ⩳[h, o] U ∨ ⦃G, L⦄ ⊢ ⒶVs.ⓓ{p}ⓝW.V.T ⬈*[h] U.
-#h #o #p #G #L #Vs elim Vs -Vs /2 width=1 by cpxs_fwd_beta/
-#V0 #Vs #IHVs #V #W #T #U #H
-elim (cpxs_inv_appl1 … H) -H *
-[ -IHVs #V1 #T1 #_ #_ #H destruct /2 width=1 by theq_pair, or_introl/
-| #q #W1 #T1 #HT1 #HU
-  elim (IHVs … HT1) -IHVs -HT1 #HT1
-  [ elim (theq_inv_applv_bind_simple … HT1) //
-  | @or_intror (**) (* explicit constructor *)
-    @(cpxs_trans … HU) -U
-    @(cpxs_strap1 … (ⓐV0.ⓛ{q}W1.T1)) /3 width=1 by cpxs_flat_dx, cpx_beta/
-  ]
-| #q #V1 #V2 #V3 #T1 #HV01 #HV12 #HT1 #HU
-  elim (IHVs … HT1) -IHVs -HT1 #HT1
-  [ elim (theq_inv_applv_bind_simple … HT1) //
-  | @or_intror (**) (* explicit constructor *)
-    @(cpxs_trans … HU) -U
-    @(cpxs_strap1 … (ⓐV1.ⓓ{q}V3.T1)) /3 width=3 by cpxs_flat, cpx_theta/
-  ]
-]
-qed-.
-
-(* Basic_1: was just: pr3_iso_appls_abbr *)
-lemma cpxs_fwd_theta_vector: ∀h,o,G,L,V1b,V2b. ⬆*[1] V1b ≘ V2b →
-                             ∀p,V,T,U. ⦃G, L⦄ ⊢ ⒶV1b.ⓓ{p}V.T ⬈*[h] U →
-                             ⒶV1b.ⓓ{p}V.T ⩳[h, o] U ∨ ⦃G, L⦄ ⊢ ⓓ{p}V.ⒶV2b.T ⬈*[h] U.
-#h #o #G #L #V1b #V2b * -V1b -V2b /3 width=1 by or_intror/
-#V1b #V2b #V1a #V2a #HV12a #HV12b #p
-generalize in match HV12a; -HV12a
-generalize in match V2a; -V2a
-generalize in match V1a; -V1a
-elim HV12b -V1b -V2b /2 width=1 by cpxs_fwd_theta/
-#V1b #V2b #V1b #V2b #HV12b #_ #IHV12b #V1a #V2a #HV12a #V #T #U #H
-elim (cpxs_inv_appl1 … H) -H *
-[ -IHV12b -HV12a -HV12b #V0 #T0 #_ #_ #H destruct /2 width=1 by theq_pair, or_introl/
-| #q #W0 #T0 #HT0 #HU
-  elim (IHV12b … HV12b … HT0) -IHV12b -HT0 #HT0
-  [ -HV12a -HV12b -HU
-    elim (theq_inv_pair1 … HT0) #V1 #T1 #H destruct
-  | @or_intror -V1b (**) (* explicit constructor *)
-    @(cpxs_trans … HU) -U
-    elim (cpxs_inv_abbr1_dx … HT0) -HT0 *
-    [ -HV12a #V1 #T1 #_ #_ #H destruct
-    | -V1b #X #HT1 #H #H0 destruct
-      elim (lifts_inv_bind1 … H) -H #W1 #T1 #HW01 #HT01 #H destruct
-      @(cpxs_trans … (+ⓓV.ⓐV2a.ⓛ{q}W1.T1)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T -V2b -V2b
-      @(cpxs_strap2 … (ⓐV1a.ⓛ{q}W0.T0))
-      /4 width=7 by cpxs_beta_dx, cpx_zeta, lifts_bind, lifts_flat/
-    ]
-  ]
-| #q #V0a #Va #V0 #T0 #HV10a #HV0a #HT0 #HU
-  elim (IHV12b … HV12b … HT0) -HV12b -IHV12b -HT0 #HT0
-  [ -HV12a -HV10a -HV0a -HU
-    elim (theq_inv_pair1 … HT0) #V1 #T1 #H destruct
-  | @or_intror -V1b -V1b (**) (* explicit constructor *)
-    @(cpxs_trans … HU) -U
-    elim (cpxs_inv_abbr1_dx … HT0) -HT0 *
-    [ #V1 #T1 #HV1 #HT1 #H destruct
-      lapply (cpxs_lifts_bi … HV10a (Ⓣ) … (L.ⓓV) … HV12a … HV0a) -V1a -V0a /3 width=1 by drops_refl, drops_drop/ #HV2a
-      @(cpxs_trans … (ⓓ{p}V.ⓐV2a.T1)) /3 width=1 by cpxs_bind, cpxs_pair_sn, cpxs_flat_dx, cpxs_bind_dx/
-    | #X #HT1 #H #H0 destruct
-      elim (lifts_inv_bind1 … H) -H #V1 #T1 #HW01 #HT01 #H destruct
-      lapply (cpxs_lifts_bi … HV10a (Ⓣ) … (L.ⓓV0) … HV12a … HV0a) -V0a /3 width=1 by drops_refl, drops_drop/ #HV2a
-      @(cpxs_trans … (+ⓓV.ⓐV2a.ⓓ{q}V1.T1)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T -V2b -V2b
-      @(cpxs_strap2 … (ⓐV1a.ⓓ{q}V0.T0)) [ /4 width=7 by cpx_zeta, lifts_bind, lifts_flat/ ] -V -V1 -T1
-      @(cpxs_strap2 … (ⓓ{q}V0.ⓐV2a.T0)) /3 width=3 by cpxs_pair_sn, cpxs_bind_dx, cpx_theta/
-    ]
-  ]
-]
-qed-.
-
-(* Basic_1: was just: pr3_iso_appls_cast *)
-lemma cpxs_fwd_cast_vector: ∀h,o,G,L,Vs,W,T,U. ⦃G, L⦄ ⊢ ⒶVs.ⓝW.T ⬈*[h] U →
-                            ∨∨ ⒶVs. ⓝW. T ⩳[h, o] U
-                             | ⦃G, L⦄ ⊢ ⒶVs.T ⬈*[h] U
-                             | ⦃G, L⦄ ⊢ ⒶVs.W ⬈*[h] U.
-#h #o #G #L #Vs elim Vs -Vs /2 width=1 by cpxs_fwd_cast/
-#V #Vs #IHVs #W #T #U #H
-elim (cpxs_inv_appl1 … H) -H *
-[ -IHVs #V0 #T0 #_ #_ #H destruct /2 width=1 by theq_pair, or3_intro0/
-| #q #W0 #T0 #HT0 #HU elim (IHVs … HT0) -IHVs -HT0 #HT0
-  [ elim (theq_inv_applv_bind_simple … HT0) //
-  | @or3_intro1 -W (**) (* explicit constructor *)
-    @(cpxs_trans … HU) -U
-    @(cpxs_strap1 … (ⓐV.ⓛ{q}W0.T0)) /2 width=1 by cpxs_flat_dx, cpx_beta/
-  | @or3_intro2 -T (**) (* explicit constructor *)
-    @(cpxs_trans … HU) -U
-    @(cpxs_strap1 … (ⓐV.ⓛ{q}W0.T0)) /2 width=1 by cpxs_flat_dx, cpx_beta/
-  ]
-| #q #V0 #V1 #V2 #T0 #HV0 #HV01 #HT0 #HU
-  elim (IHVs … HT0) -IHVs -HT0 #HT0
-  [ elim (theq_inv_applv_bind_simple … HT0) //
-  | @or3_intro1 -W (**) (* explicit constructor *)
-    @(cpxs_trans … HU) -U
-    @(cpxs_strap1 … (ⓐV0.ⓓ{q}V2.T0)) /2 width=3 by cpxs_flat, cpx_theta/
-  | @or3_intro2 -T (**) (* explicit constructor *)
-    @(cpxs_trans … HU) -U
-    @(cpxs_strap1 … (ⓐV0.ⓓ{q}V2.T0)) /2 width=3 by cpxs_flat, cpx_theta/
-  ]
-]
-qed-.
-
-(* Basic_1: was just: nf2_iso_appls_lref *)
-lemma cpxs_fwd_cnx_vector: ∀h,o,G,L,T. 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃T⦄ →
-                           ∀Vs,U. ⦃G, L⦄ ⊢ ⒶVs.T ⬈*[h] U → ⒶVs.T ⩳[h, o] U.
-#h #o #G #L #T #H1T #H2T #Vs elim Vs -Vs [ @(cpxs_fwd_cnx … H2T) ] (**) (* /2 width=3 by cpxs_fwd_cnx/ does not work *)
-#V #Vs #IHVs #U #H
-elim (cpxs_inv_appl1 … H) -H *
-[ -IHVs #V0 #T0 #_ #_ #H destruct /2 width=1 by theq_pair/
-| #p #W0 #T0 #HT0 #HU
-  lapply (IHVs … HT0) -IHVs -HT0 #HT0
-  elim (theq_inv_applv_bind_simple … HT0) //
-| #p #V1 #V2 #V0 #T0 #HV1 #HV12 #HT0 #HU
-  lapply (IHVs … HT0) -IHVs -HT0 #HT0
-  elim (theq_inv_applv_bind_simple … HT0) //
-]
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_toeq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_toeq.ma
new file mode 100644 (file)
index 0000000..f0782e1
--- /dev/null
@@ -0,0 +1,102 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/toeq_tdeq.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".
+
+(* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
+
+(* Forward lemmas with sort-irrelevant outer equivalence for terms **********)
+
+lemma cpxs_fwd_sort (h) (G) (L):
+      ∀X2,s1. ⦃G,L⦄ ⊢ ⋆s1 ⬈*[h] X2 → ⋆s1 ⩳ X2.
+#h #G #L #X2 #s1 #H
+elim (cpxs_inv_sort1 … H) -H #s2 #H destruct //
+qed-.
+
+(* Note: probably this is an inversion lemma *)
+(* Basic_2A1: was: cpxs_fwd_delta *)
+lemma cpxs_fwd_delta_drops (h) (I) (G) (L) (K):
+      ∀V1,i. ⬇*[i] L ≘ K.ⓑ{I}V1 →
+      ∀V2. ⬆*[↑i] V1 ≘ V2 →
+      ∀X2. ⦃G,L⦄ ⊢ #i ⬈*[h] X2 →
+      ∨∨ #i ⩳ X2 | ⦃G,L⦄ ⊢ V2 ⬈*[h] X2.
+#h #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
+lapply (drops_mono … HLK0 … HLK) -HLK0 #H destruct
+/4 width=9 by cpxs_lifts_bi, drops_isuni_fwd_drop2, or_intror/
+qed-.
+
+(* Basic_1: was just: pr3_iso_beta *)
+lemma cpxs_fwd_beta (h) (p) (G) (L):
+      ∀V,W,T,X2. ⦃G,L⦄ ⊢ ⓐV.ⓛ{p}W.T ⬈*[h] X2 →
+      ∨∨ ⓐV.ⓛ{p}W.T ⩳ X2 | ⦃G,L⦄ ⊢ ⓓ{p}ⓝW.V.T ⬈*[h] X2.
+#h #p #G #L #V #W #T #X2 #H elim (cpxs_inv_appl1 … H) -H *
+[ #V0 #T0 #_ #_ #H destruct /2 width=1 by toeq_pair, or_introl/
+| #b #W0 #T0 #HT0 #HU
+  elim (cpxs_inv_abst1 … HT0) -HT0 #W1 #T1 #HW1 #HT1 #H destruct
+  lapply (lsubr_cpxs_trans … HT1 (L.ⓓⓝW.V) ?) -HT1
+  /5 width=3 by cpxs_trans, cpxs_bind, cpxs_pair_sn, lsubr_beta, or_intror/
+| #b #V1 #V2 #V0 #T1 #_ #_ #HT1 #_
+  elim (cpxs_inv_abst1 … HT1) -HT1 #W2 #T2 #_ #_ #H destruct
+]
+qed-.
+
+lemma cpxs_fwd_theta (h) (p) (G) (L):
+           ∀V1,V,T,X2. ⦃G,L⦄ ⊢ ⓐV1.ⓓ{p}V.T ⬈*[h] X2 →
+           ∀V2. ⬆*[1] V1 ≘ V2 →
+           ∨∨ ⓐV1.ⓓ{p}V.T ⩳ X2 | ⦃G,L⦄ ⊢ ⓓ{p}V.ⓐV2.T ⬈*[h] X2.
+#h #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 toeq_pair, or_introl/
+| #q #W #T0 #HT0 #HU
+  elim (cpxs_inv_abbr1_dx … HT0) -HT0 *
+  [ #V3 #T3 #_ #_ #H destruct
+  | #X #HT2 #H #H0 destruct
+    elim (lifts_inv_bind1 … H) -H #W2 #T2 #HW2 #HT02 #H destruct
+    @or_intror @(cpxs_trans … HU) -X2 (**) (* explicit constructor *)
+    @(cpxs_trans … (+ⓓV.ⓐV2.ⓛ{q}W2.T2)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T
+    @(cpxs_strap2 … (ⓐV1.ⓛ{q}W.T0)) [2: /2 width=1 by cpxs_beta_dx/ ]
+    /4 width=7 by cpx_zeta, lifts_bind, lifts_flat/
+  ]
+| #q #V3 #V4 #V0 #T0 #HV13 #HV34 #HT0 #HU
+  @or_intror @(cpxs_trans … HU) -X2 (**) (* explicit constructor *)
+  elim (cpxs_inv_abbr1_dx … HT0) -HT0 *
+  [ #V5 #T5 #HV5 #HT5 #H destruct
+    /6 width=9 by cpxs_lifts_bi, drops_refl, drops_drop, cpxs_flat, cpxs_bind/
+  | #X #HT1 #H #H0 destruct
+    elim (lifts_inv_bind1 … H) -H #V5 #T5 #HV05 #HT05 #H destruct
+    lapply (cpxs_lifts_bi … HV13 (Ⓣ) … (L.ⓓV0) … HV12 … HV34) -V3 /3 width=1 by drops_refl, drops_drop/ #HV24
+    @(cpxs_trans … (+ⓓV.ⓐV2.ⓓ{q}V5.T5)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T
+    @(cpxs_strap2 … (ⓐV1.ⓓ{q}V0.T0)) [ /4 width=7 by cpx_zeta, lifts_bind, lifts_flat/ ] -V -V5 -T5
+    @(cpxs_strap2 … (ⓓ{q}V0.ⓐV2.T0)) /3 width=3 by cpxs_pair_sn, cpxs_bind_dx, cpx_theta/
+  ]
+]
+qed-.
+
+lemma cpxs_fwd_cast (h) (G) (L):
+      ∀W,T,X2. ⦃G,L⦄ ⊢ ⓝW.T ⬈*[h] X2 →
+      ∨∨ ⓝW. T ⩳ X2 | ⦃G,L⦄ ⊢ T ⬈*[h] X2 | ⦃G,L⦄ ⊢ W ⬈*[h] X2.
+#h #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 toeq_pair, or3_intro0/
+qed-.
+
+lemma cpxs_fwd_cnx (h) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃T1⦄ →
+      ∀X2. ⦃G,L⦄ ⊢ T1 ⬈*[h] X2 → T1 ⩳ X2.
+/3 width=5 by cpxs_inv_cnx1, tdeq_toeq/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_toeq_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_toeq_vector.ma
new file mode 100644 (file)
index 0000000..bbd7c5c
--- /dev/null
@@ -0,0 +1,188 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/toeq_simple_vector.ma".
+include "static_2/relocation/lifts_vector.ma".
+include "basic_2/rt_computation/cpxs_toeq.ma".
+
+(* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
+
+(* Vector form of forward lemmas with outer equivalence for terms ***********)
+
+lemma cpxs_fwd_sort_vector (h) (G) (L):
+      ∀s,Vs,X2. ⦃G,L⦄ ⊢ ⒶVs.⋆s ⬈*[h] X2 → ⒶVs.⋆s ⩳ X2.
+#h #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 *
+[ -IHVs #V1 #T1 #_ #_ #H destruct /2 width=1 by toeq_pair/
+| #p #W1 #T1 #HT1 #HU
+  lapply (IHVs … HT1) -IHVs -HT1 #HT1
+  elim (toeq_inv_applv_bind_simple … HT1) //
+| #p #V1 #V2 #V3 #T1 #HV01 #HV12 #HT1 #HU
+  lapply (IHVs … HT1) -IHVs -HT1 #HT1
+  elim (toeq_inv_applv_bind_simple … HT1) //
+]
+qed-.
+
+(* Basic_2A1: was: cpxs_fwd_delta_vector *)
+lemma cpxs_fwd_delta_drops_vector (h) (I) (G) (L) (K):
+      ∀V1,i. ⬇*[i] L ≘ K.ⓑ{I}V1 →
+      ∀V2. ⬆*[↑i] V1 ≘ V2 →
+      ∀Vs,X2. ⦃G,L⦄ ⊢ ⒶVs.#i ⬈*[h] X2 →
+      ∨∨ ⒶVs.#i ⩳ X2 | ⦃G,L⦄ ⊢ ⒶVs.V2 ⬈*[h] X2.
+#h #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
+elim (cpxs_inv_appl1 … H) -H *
+[ -IHVs #V0 #T0 #_ #_ #H destruct /2 width=1 by toeq_pair, or_introl/
+| #q #W0 #T0 #HT0 #HU
+  elim (IHVs … HT0) -IHVs -HT0 #HT0
+  [ elim (toeq_inv_applv_bind_simple … HT0) //
+  | @or_intror -i (**) (* explicit constructor *)
+    @(cpxs_trans … HU) -X2
+    @(cpxs_strap1 … (ⓐV.ⓛ{q}W0.T0)) /3 width=1 by cpxs_flat_dx, cpx_beta/
+  ]
+| #q #V0 #V1 #V3 #T0 #HV0 #HV01 #HT0 #HU
+  elim (IHVs … HT0) -IHVs -HT0 #HT0
+  [ elim (toeq_inv_applv_bind_simple … HT0) //
+  | @or_intror -i (**) (* explicit constructor *)
+    @(cpxs_trans … HU) -X2
+    @(cpxs_strap1 … (ⓐV0.ⓓ{q}V3.T0)) /3 width=3 by cpxs_flat, cpx_theta/
+  ]
+]
+qed-.
+
+(* Basic_1: was just: pr3_iso_appls_beta *)
+lemma cpxs_fwd_beta_vector (h) (p) (G) (L):
+      ∀Vs,V,W,T,X2. ⦃G,L⦄ ⊢ ⒶVs.ⓐV.ⓛ{p}W.T ⬈*[h] X2 →
+      ∨∨ ⒶVs.ⓐV.ⓛ{p}W. T ⩳ X2 | ⦃G,L⦄ ⊢ ⒶVs.ⓓ{p}ⓝW.V.T ⬈*[h] X2.
+#h #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 *
+[ -IHVs #V1 #T1 #_ #_ #H destruct /2 width=1 by toeq_pair, or_introl/
+| #q #W1 #T1 #HT1 #HU
+  elim (IHVs … HT1) -IHVs -HT1 #HT1
+  [ elim (toeq_inv_applv_bind_simple … HT1) //
+  | @or_intror (**) (* explicit constructor *)
+    @(cpxs_trans … HU) -X2
+    @(cpxs_strap1 … (ⓐV0.ⓛ{q}W1.T1)) /3 width=1 by cpxs_flat_dx, cpx_beta/
+  ]
+| #q #V1 #V2 #V3 #T1 #HV01 #HV12 #HT1 #HU
+  elim (IHVs … HT1) -IHVs -HT1 #HT1
+  [ elim (toeq_inv_applv_bind_simple … HT1) //
+  | @or_intror (**) (* explicit constructor *)
+    @(cpxs_trans … HU) -X2
+    @(cpxs_strap1 … (ⓐV1.ⓓ{q}V3.T1)) /3 width=3 by cpxs_flat, cpx_theta/
+  ]
+]
+qed-.
+
+(* Basic_1: was just: pr3_iso_appls_abbr *)
+lemma cpxs_fwd_theta_vector (h) (G) (L):
+      ∀V1b,V2b. ⬆*[1] V1b ≘ V2b →
+      ∀p,V,T,X2. ⦃G,L⦄ ⊢ ⒶV1b.ⓓ{p}V.T ⬈*[h] X2 →
+      ∨∨ ⒶV1b.ⓓ{p}V.T ⩳ X2 | ⦃G,L⦄ ⊢ ⓓ{p}V.ⒶV2b.T ⬈*[h] X2.
+#h #G #L #V1b #V2b * -V1b -V2b /3 width=1 by or_intror/
+#V1b #V2b #V1a #V2a #HV12a #HV12b #p
+generalize in match HV12a; -HV12a
+generalize in match V2a; -V2a
+generalize in match V1a; -V1a
+elim HV12b -V1b -V2b /2 width=1 by cpxs_fwd_theta/
+#V1b #V2b #V1b #V2b #HV12b #_ #IHV12b #V1a #V2a #HV12a #V #T #X2 #H
+elim (cpxs_inv_appl1 … H) -H *
+[ -IHV12b -HV12a -HV12b #V0 #T0 #_ #_ #H destruct /2 width=1 by toeq_pair, or_introl/
+| #q #W0 #T0 #HT0 #HU
+  elim (IHV12b … HV12b … HT0) -IHV12b -HT0 #HT0
+  [ -HV12a -HV12b -HU
+    elim (toeq_inv_pair1 … HT0) #V1 #T1 #H destruct
+  | @or_intror -V1b (**) (* explicit constructor *)
+    @(cpxs_trans … HU) -X2
+    elim (cpxs_inv_abbr1_dx … HT0) -HT0 *
+    [ -HV12a #V1 #T1 #_ #_ #H destruct
+    | -V1b #X #HT1 #H #H0 destruct
+      elim (lifts_inv_bind1 … H) -H #W1 #T1 #HW01 #HT01 #H destruct
+      @(cpxs_trans … (+ⓓV.ⓐV2a.ⓛ{q}W1.T1)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T -V2b -V2b
+      @(cpxs_strap2 … (ⓐV1a.ⓛ{q}W0.T0))
+      /4 width=7 by cpxs_beta_dx, cpx_zeta, lifts_bind, lifts_flat/
+    ]
+  ]
+| #q #V0a #Va #V0 #T0 #HV10a #HV0a #HT0 #HU
+  elim (IHV12b … HV12b … HT0) -HV12b -IHV12b -HT0 #HT0
+  [ -HV12a -HV10a -HV0a -HU
+    elim (toeq_inv_pair1 … HT0) #V1 #T1 #H destruct
+  | @or_intror -V1b -V1b (**) (* explicit constructor *)
+    @(cpxs_trans … HU) -X2
+    elim (cpxs_inv_abbr1_dx … HT0) -HT0 *
+    [ #V1 #T1 #HV1 #HT1 #H destruct
+      lapply (cpxs_lifts_bi … HV10a (Ⓣ) … (L.ⓓV) … HV12a … HV0a) -V1a -V0a /3 width=1 by drops_refl, drops_drop/ #HV2a
+      @(cpxs_trans … (ⓓ{p}V.ⓐV2a.T1)) /3 width=1 by cpxs_bind, cpxs_pair_sn, cpxs_flat_dx, cpxs_bind_dx/
+    | #X #HT1 #H #H0 destruct
+      elim (lifts_inv_bind1 … H) -H #V1 #T1 #HW01 #HT01 #H destruct
+      lapply (cpxs_lifts_bi … HV10a (Ⓣ) … (L.ⓓV0) … HV12a … HV0a) -V0a /3 width=1 by drops_refl, drops_drop/ #HV2a
+      @(cpxs_trans … (+ⓓV.ⓐV2a.ⓓ{q}V1.T1)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T -V2b -V2b
+      @(cpxs_strap2 … (ⓐV1a.ⓓ{q}V0.T0)) [ /4 width=7 by cpx_zeta, lifts_bind, lifts_flat/ ] -V -V1 -T1
+      @(cpxs_strap2 … (ⓓ{q}V0.ⓐV2a.T0)) /3 width=3 by cpxs_pair_sn, cpxs_bind_dx, cpx_theta/
+    ]
+  ]
+]
+qed-.
+
+(* Basic_1: was just: pr3_iso_appls_cast *)
+lemma cpxs_fwd_cast_vector (h) (G) (L):
+      ∀Vs,W,T,X2. ⦃G,L⦄ ⊢ ⒶVs.ⓝW.T ⬈*[h] X2 →
+      ∨∨ ⒶVs. ⓝW. T ⩳ X2
+       | ⦃G,L⦄ ⊢ ⒶVs.T ⬈*[h] X2
+       | ⦃G,L⦄ ⊢ ⒶVs.W ⬈*[h] X2.
+#h #G #L #Vs elim Vs -Vs /2 width=1 by cpxs_fwd_cast/
+#V #Vs #IHVs #W #T #X2 #H
+elim (cpxs_inv_appl1 … H) -H *
+[ -IHVs #V0 #T0 #_ #_ #H destruct /2 width=1 by toeq_pair, or3_intro0/
+| #q #W0 #T0 #HT0 #HU elim (IHVs … HT0) -IHVs -HT0 #HT0
+  [ elim (toeq_inv_applv_bind_simple … HT0) //
+  | @or3_intro1 -W (**) (* explicit constructor *)
+    @(cpxs_trans … HU) -X2
+    @(cpxs_strap1 … (ⓐV.ⓛ{q}W0.T0)) /2 width=1 by cpxs_flat_dx, cpx_beta/
+  | @or3_intro2 -T (**) (* explicit constructor *)
+    @(cpxs_trans … HU) -X2
+    @(cpxs_strap1 … (ⓐV.ⓛ{q}W0.T0)) /2 width=1 by cpxs_flat_dx, cpx_beta/
+  ]
+| #q #V0 #V1 #V2 #T0 #HV0 #HV01 #HT0 #HU
+  elim (IHVs … HT0) -IHVs -HT0 #HT0
+  [ elim (toeq_inv_applv_bind_simple … HT0) //
+  | @or3_intro1 -W (**) (* explicit constructor *)
+    @(cpxs_trans … HU) -X2
+    @(cpxs_strap1 … (ⓐV0.ⓓ{q}V2.T0)) /2 width=3 by cpxs_flat, cpx_theta/
+  | @or3_intro2 -T (**) (* explicit constructor *)
+    @(cpxs_trans … HU) -X2
+    @(cpxs_strap1 … (ⓐV0.ⓓ{q}V2.T0)) /2 width=3 by cpxs_flat, cpx_theta/
+  ]
+]
+qed-.
+
+(* Basic_1: was just: nf2_iso_appls_lref *)
+lemma cpxs_fwd_cnx_vector (h) (G) (L):
+      ∀T. 𝐒⦃T⦄ → ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃T⦄ →
+      ∀Vs,X2. ⦃G,L⦄ ⊢ ⒶVs.T ⬈*[h] X2 → ⒶVs.T ⩳ X2.
+#h #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 *
+[ -IHVs #V0 #T0 #_ #_ #H destruct /2 width=1 by toeq_pair/
+| #p #W0 #T0 #HT0 #HU
+  lapply (IHVs … HT0) -IHVs -HT0 #HT0
+  elim (toeq_inv_applv_bind_simple … HT0) //
+| #p #V1 #V2 #V0 #T0 #HV1 #HV12 #HT0 #HU
+  lapply (IHVs … HT0) -IHVs -HT0 #HT0
+  elim (toeq_inv_applv_bind_simple … HT0) //
+]
+qed-.
index 4c8371a0b74f9b8c748e9e9a35140b56ed215879..7fe343b8a557d90ada8d869f9266d3d26ccca4ab 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/notation/relations/predtystrong_5.ma".
+include "basic_2/notation/relations/predtystrong_4.ma".
 include "static_2/syntax/tdeq.ma".
 include "basic_2/rt_transition/cpx.ma".
 
 (* STRONGLY NORMALIZING TERMS FOR UNBOUND PARALLEL RT-TRANSITION ************)
 
-definition csx: ∀h. sd h → relation3 genv lenv term ≝
-                λh,o,G,L. SN … (cpx h G L) (tdeq h o …).
+definition csx: ∀h. relation3 genv lenv term ≝
+                λh,G,L. SN … (cpx h G L) tdeq.
 
 interpretation
    "strong normalization for unbound context-sensitive parallel rt-transition (term)"
-   'PRedTyStrong h o G L T = (csx h o G L T).
+   'PRedTyStrong h G L T = (csx h G L T).
 
 (* Basic eliminators ********************************************************)
 
-lemma csx_ind: ∀h,o,G,L. ∀Q:predicate term.
-               (∀T1. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄ →
-                     (∀T2. ⦃G, L⦄ ⊢ T1 ⬈[h] T2 → (T1 ≛[h, o] T2 → ⊥) → Q T2) →
+lemma csx_ind: ∀h,G,L. ∀Q:predicate term.
+               (∀T1. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ →
+                     (∀T2. ⦃G,L⦄ ⊢ T1 ⬈[h] T2 → (T1 ≛ T2 → ⊥) → Q T2) →
                      Q T1
                ) →
-               ∀T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ →  Q T.
-#h #o #G #L #Q #H0 #T1 #H elim H -T1
+               ∀T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ →  Q T.
+#h #G #L #Q #H0 #T1 #H elim H -T1
 /5 width=1 by SN_intro/
 qed-.
 
 (* Basic properties *********************************************************)
 
 (* Basic_1: was just: sn3_pr2_intro *)
-lemma csx_intro: ∀h,o,G,L,T1.
-                 (∀T2. ⦃G, L⦄ ⊢ T1 ⬈[h] T2 → (T1 ≛[h, o] T2 → ⊥) → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T2⦄) →
-                 ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄.
+lemma csx_intro: ∀h,G,L,T1.
+                 (∀T2. ⦃G,L⦄ ⊢ T1 ⬈[h] T2 → (T1 ≛ T2 → ⊥) → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T2⦄) →
+                 ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄.
 /4 width=1 by SN_intro/ qed.
 
 (* Basic forward lemmas *****************************************************)
 
-fact csx_fwd_pair_sn_aux: ∀h,o,G,L,U. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃U⦄ →
-                          ∀I,V,T. U = ②{I}V.T → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄.
-#h #o #G #L #U #H elim H -H #U0 #_ #IH #I #V #T #H destruct
+fact csx_fwd_pair_sn_aux: ∀h,G,L,U. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃U⦄ →
+                          ∀I,V,T. U = ②{I}V.T → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃V⦄.
+#h #G #L #U #H elim H -H #U0 #_ #IH #I #V #T #H destruct
 @csx_intro #V2 #HLV2 #HV2
 @(IH (②{I}V2.T)) -IH /2 width=3 by cpx_pair_sn/ -HLV2
 #H elim (tdeq_inv_pair … H) -H /2 width=1 by/
 qed-.
 
 (* Basic_1: was just: sn3_gen_head *)
-lemma csx_fwd_pair_sn: ∀h,o,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃②{I}V.T⦄ → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄.
+lemma csx_fwd_pair_sn: ∀h,I,G,L,V,T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃②{I}V.T⦄ → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃V⦄.
 /2 width=5 by csx_fwd_pair_sn_aux/ qed-.
 
-fact csx_fwd_bind_dx_aux: ∀h,o,G,L,U. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃U⦄ →
-                          ∀p,I,V,T. U = ⓑ{p,I}V.T → ⦃G, L.ⓑ{I}V⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄.
-#h #o #G #L #U #H elim H -H #U0 #_ #IH #p #I #V #T #H destruct
+fact csx_fwd_bind_dx_aux: ∀h,G,L,U. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃U⦄ →
+                          ∀p,I,V,T. U = ⓑ{p,I}V.T → ⦃G,L.ⓑ{I}V⦄ ⊢ ⬈*[h] 𝐒⦃T⦄.
+#h #G #L #U #H elim H -H #U0 #_ #IH #p #I #V #T #H destruct
 @csx_intro #T2 #HLT2 #HT2
-@(IH (ⓑ{p,I}V.T2)) -IH /2 width=3 by cpx_bind/ -HLT2
+@(IH (ⓑ{p, I}V.T2)) -IH /2 width=3 by cpx_bind/ -HLT2
 #H elim (tdeq_inv_pair … H) -H /2 width=1 by/
 qed-.
 
 (* Basic_1: was just: sn3_gen_bind *)
-lemma csx_fwd_bind_dx: ∀h,o,p,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓑ{p,I}V.T⦄ → ⦃G, L.ⓑ{I}V⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄.
+lemma csx_fwd_bind_dx: ∀h,p,I,G,L,V,T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⓑ{p,I}V.T⦄ → ⦃G,L.ⓑ{I}V⦄ ⊢ ⬈*[h] 𝐒⦃T⦄.
 /2 width=4 by csx_fwd_bind_dx_aux/ qed-.
 
-fact csx_fwd_flat_dx_aux: ∀h,o,G,L,U. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃U⦄ →
-                          ∀I,V,T. U = ⓕ{I}V.T → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄.
-#h #o #G #L #U #H elim H -H #U0 #_ #IH #I #V #T #H destruct
+fact csx_fwd_flat_dx_aux: ∀h,G,L,U. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃U⦄ →
+                          ∀I,V,T. U = ⓕ{I}V.T → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄.
+#h #G #L #U #H elim H -H #U0 #_ #IH #I #V #T #H destruct
 @csx_intro #T2 #HLT2 #HT2
 @(IH (ⓕ{I}V.T2)) -IH /2 width=3 by cpx_flat/ -HLT2
 #H elim (tdeq_inv_pair … H) -H /2 width=1 by/
 qed-.
 
 (* Basic_1: was just: sn3_gen_flat *)
-lemma csx_fwd_flat_dx: ∀h,o,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓕ{I}V.T⦄ → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄.
+lemma csx_fwd_flat_dx: ∀h,I,G,L,V,T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⓕ{I}V.T⦄ → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄.
 /2 width=5 by csx_fwd_flat_dx_aux/ qed-.
 
-lemma csx_fwd_bind: ∀h,o,p,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓑ{p,I}V.T⦄ →
-                    ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄ ∧ ⦃G, L.ⓑ{I}V⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄.
+lemma csx_fwd_bind: ∀h,p,I,G,L,V,T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⓑ{p,I}V.T⦄ →
+                    ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃V⦄ ∧ ⦃G,L.ⓑ{I}V⦄ ⊢ ⬈*[h] 𝐒⦃T⦄.
 /3 width=3 by csx_fwd_pair_sn, csx_fwd_bind_dx, conj/ qed-.
 
-lemma csx_fwd_flat: ∀h,o,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓕ{I}V.T⦄ →
-                    ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄ ∧ ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄.
+lemma csx_fwd_flat: ∀h,I,G,L,V,T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⓕ{I}V.T⦄ →
+                    ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃V⦄ ∧ ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄.
 /3 width=3 by csx_fwd_pair_sn, csx_fwd_flat_dx, conj/ qed-.
 
 (* Basic_1: removed theorems 14:
index 6cc0664aae5a3b5f3339f306e56a6cf0d228a3e4..dfbcf7e487e76635ecf64acd42010ef56c7ebc45 100644 (file)
@@ -21,40 +21,40 @@ include "basic_2/rt_computation/csx_gcr.ma".
 
 (* Main properties with atomic arity assignment *****************************)
 
-theorem aaa_csx: ∀h,o,G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄.
-#h #o #G #L #T #A #H
-@(gcr_aaa … (csx_gcp h o) (csx_gcr h o) … H)
+theorem aaa_csx: ∀h,G,L,T,A. ⦃G,L⦄ ⊢ T ⁝ A → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄.
+#h #G #L #T #A #H
+@(gcr_aaa … (csx_gcp h) (csx_gcr h) … H)
 qed.
 
 (* Advanced eliminators *****************************************************)
 
-fact aaa_ind_csx_aux: ∀h,o,G,L,A. ∀Q:predicate term.
-                      (∀T1. ⦃G, L⦄ ⊢ T1 ⁝ A →
-                            (∀T2. ⦃G, L⦄ ⊢ T1 ⬈[h] T2 → (T1 ≛[h, o] T2 → ⊥) → Q T2) → Q T1
+fact aaa_ind_csx_aux: ∀h,G,L,A. ∀Q:predicate term.
+                      (∀T1. ⦃G,L⦄ ⊢ T1 ⁝ A →
+                            (∀T2. ⦃G,L⦄ ⊢ T1 ⬈[h] T2 → (T1 ≛ T2 → ⊥) → Q T2) → Q T1
                       ) →
-                      ∀T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ T ⁝ A →  Q T.
-#h #o #G #L #A #Q #IH #T #H @(csx_ind … H) -T /4 width=5 by cpx_aaa_conf/
+                      ∀T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ → ⦃G,L⦄ ⊢ T ⁝ A →  Q T.
+#h #G #L #A #Q #IH #T #H @(csx_ind … H) -T /4 width=5 by cpx_aaa_conf/
 qed-.
 
-lemma aaa_ind_csx: ∀h,o,G,L,A. ∀Q:predicate term.
-                   (∀T1. ⦃G, L⦄ ⊢ T1 ⁝ A →
-                         (∀T2. ⦃G, L⦄ ⊢ T1 ⬈[h] T2 → (T1 ≛[h, o] T2 → ⊥) → Q T2) → Q T1
+lemma aaa_ind_csx: ∀h,G,L,A. ∀Q:predicate term.
+                   (∀T1. ⦃G,L⦄ ⊢ T1 ⁝ A →
+                         (∀T2. ⦃G,L⦄ ⊢ T1 ⬈[h] T2 → (T1 ≛ T2 → ⊥) → Q T2) → Q T1
                    ) →
-                   ∀T. ⦃G, L⦄ ⊢ T ⁝ A → Q T.
+                   ∀T. ⦃G,L⦄ ⊢ T ⁝ A → Q T.
 /5 width=9 by aaa_ind_csx_aux, aaa_csx/ qed-.
 
-fact aaa_ind_csx_cpxs_aux: ∀h,o,G,L,A. ∀Q:predicate term.
-                           (∀T1. ⦃G, L⦄ ⊢ T1 ⁝ A →
-                                 (∀T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 → (T1 ≛[h, o] T2 → ⊥) → Q T2) → Q T1
+fact aaa_ind_csx_cpxs_aux: ∀h,G,L,A. ∀Q:predicate term.
+                           (∀T1. ⦃G,L⦄ ⊢ T1 ⁝ A →
+                                 (∀T2. ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 → (T1 ≛ T2 → ⊥) → Q T2) → Q T1
                            ) →
-                           ∀T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ T ⁝ A →  Q T.
-#h #o #G #L #A #Q #IH #T #H @(csx_ind_cpxs … H) -T /4 width=5 by cpxs_aaa_conf/
+                           ∀T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ → ⦃G,L⦄ ⊢ T ⁝ A →  Q T.
+#h #G #L #A #Q #IH #T #H @(csx_ind_cpxs … H) -T /4 width=5 by cpxs_aaa_conf/
 qed-.
 
 (* Basic_2A1: was: aaa_ind_csx_alt *)
-lemma aaa_ind_csx_cpxs: ∀h,o,G,L,A. ∀Q:predicate term.
-                        (∀T1. ⦃G, L⦄ ⊢ T1 ⁝ A →
-                              (∀T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 → (T1 ≛[h, o] T2 → ⊥) → Q T2) → Q T1
+lemma aaa_ind_csx_cpxs: ∀h,G,L,A. ∀Q:predicate term.
+                        (∀T1. ⦃G,L⦄ ⊢ T1 ⁝ A →
+                              (∀T2. ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 → (T1 ≛ T2 → ⊥) → Q T2) → Q T1
                         ) →
-                        ∀T. ⦃G, L⦄ ⊢ T ⁝ A → Q T.
+                        ∀T. ⦃G,L⦄ ⊢ T ⁝ A → Q T.
 /5 width=9 by aaa_ind_csx_cpxs_aux, aaa_csx/ qed-.
index 24320b69feb4ff24d47962c69f4324ce1fdd2ed2..3cd1edff96a9cbf29fd7d3d10d55c7bbf40fd43d 100644 (file)
@@ -20,18 +20,10 @@ include "basic_2/rt_computation/csx.ma".
 (* Properties with normal terms for unbound parallel rt-transition **********)
 
 (* Basic_1: was just: sn3_nf2 *)
-lemma cnx_csx: ∀h,o,G,L,T. ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃T⦄ → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄.
+lemma cnx_csx: ∀h,G,L,T. ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃T⦄ → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄.
 /2 width=1 by NF_to_SN/ qed.
 
 (* Advanced properties ******************************************************)
 
-lemma csx_sort: ∀h,o,G,L,s. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃⋆s⦄.
-#h #o #G #L #s elim (deg_total h o s)
-#d generalize in match s; -s elim d -d
-[ /3 width=3 by cnx_csx, cnx_sort/
-| #d #IH #s #Hsd lapply (deg_next_SO … Hsd) -Hsd
-  #Hsd @csx_intro #X #H #HX
-  elim (cpx_inv_sort1 … H) -H #H destruct /2 width=1 by/
-  elim HX -HX //
-]
-qed.
+lemma csx_sort: ∀h,G,L,s. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃⋆s⦄.
+/3 width=4 by cnx_csx, cnx_sort/ qed.
index 4a93b473e1c6a0f0e9ac330f3fdcc0149632f12d..6d75480ff3fded39131fabf5e1b61064d890c345 100644 (file)
@@ -14,8 +14,8 @@
 
 (* STRONGLY NORMALIZING TERM VECTORS FOR UNBOUND PARALLEL RT-TRANSITION *****)
 
-include "basic_2/rt_computation/cpxs_theq_vector.ma".
-include "basic_2/rt_computation/csx_simple_theq.ma".
+include "basic_2/rt_computation/cpxs_toeq_vector.ma".
+include "basic_2/rt_computation/csx_simple_toeq.ma".
 include "basic_2/rt_computation/csx_cnx.ma".
 include "basic_2/rt_computation/csx_cpxs.ma".
 include "basic_2/rt_computation/csx_vector.ma".
@@ -23,34 +23,23 @@ include "basic_2/rt_computation/csx_vector.ma".
 (* Properties with normal terms for unbound parallel rt-transition **********)
 
 (* Basic_1: was just: sn3_appls_lref *)
-lemma csx_applv_cnx: ∀h,o,G,L,T. 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃T⦄ →
-                     ∀Vs. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃Vs⦄ → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⒶVs.T⦄.
-#h #o #G #L #T #H1T #H2T #Vs elim Vs -Vs
-[ #_ normalize in ⊢ (?????%); /2 width=1/
+lemma csx_applv_cnx (h) (G) (L):
+      ∀T. 𝐒⦃T⦄ → ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃T⦄ →
+      ∀Vs. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃Vs⦄ → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⒶVs.T⦄.
+#h #G #L #T #H1T #H2T #Vs elim Vs -Vs
+[ #_ normalize in ⊢ (????%); /2 width=1 by cnx_csx/
 | #V #Vs #IHV #H
   elim (csxv_inv_cons … H) -H #HV #HVs
-  @csx_appl_simple_theq /2 width=1 by applv_simple/ -IHV -HV -HVs
+  @csx_appl_simple_toeq /2 width=1 by applv_simple/ -IHV -HV -HVs
   #X #H #H0
-  lapply (cpxs_fwd_cnx_vector … o … H) -H // -H1T -H2T #H
+  lapply (cpxs_fwd_cnx_vector … H) -H // -H1T -H2T #H
   elim (H0) -H0 //
 ]
 qed.
 
 (* Advanced properties ******************************************************)
 
-lemma csx_applv_sort: ∀h,o,G,L,s,Vs. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃Vs⦄ → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⒶVs.⋆s⦄.
-#h #o #G #L #s elim (deg_total h o s)
-#d generalize in match s; -s elim d -d
-[ /3 width=6 by csx_applv_cnx, cnx_sort, simple_atom/
-| #d #IHd #s #Hd #Vs elim Vs -Vs /2 width=1 by/
-  #V #Vs #IHVs #HVVs
-  elim (csxv_inv_cons … HVVs) #HV #HVs
-  @csx_appl_simple_theq /2 width=1 by applv_simple, simple_atom/
-  #X #H #H0
-  elim (cpxs_fwd_sort_vector … o … H) -H #H
-  [ elim H0 -H0 //
-  | -H0 @(csx_cpxs_trans … (Ⓐ(V⨮Vs).⋆(next h s)))
-    /3 width=1 by cpxs_flat_dx, deg_next_SO/
-  ]
-]
-qed.
+(* Note: strong normalization does not depend on this any more *)
+lemma csx_applv_sort (h) (G) (L):
+      ∀s,Vs. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃Vs⦄ → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⒶVs.⋆s⦄.
+/3 width=6 by csx_applv_cnx, cnx_sort, simple_atom/ qed.
index 3a8a70ef9499a537b30916d88f9dae74f9454bec..aa206225c6475e422dd4b2e8b1648958ae186fd0 100644 (file)
@@ -21,33 +21,33 @@ include "basic_2/rt_computation/csx_csx.ma".
 (* Properties with unbound context-sensitive rt-computation for terms *******)
 
 (* Basic_1: was just: sn3_intro *)
-lemma csx_intro_cpxs: ∀h,o,G,L,T1.
-                      (∀T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 → (T1 ≛[h, o] T2 → ⊥) → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T2⦄) →
-                      ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄.
+lemma csx_intro_cpxs: ∀h,G,L,T1.
+                      (∀T2. ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 → (T1 ≛ T2 → ⊥) → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T2⦄) →
+                      ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄.
 /4 width=1 by cpx_cpxs, csx_intro/ qed-.
 
 (* Basic_1: was just: sn3_pr3_trans *)
-lemma csx_cpxs_trans: ∀h,o,G,L,T1. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄ →
-                      ∀T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T2⦄.
-#h #o #G #L #T1 #HT1 #T2 #H @(cpxs_ind … H) -T2
+lemma csx_cpxs_trans: ∀h,G,L,T1. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ →
+                      ∀T2. ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T2⦄.
+#h #G #L #T1 #HT1 #T2 #H @(cpxs_ind … H) -T2
 /2 width=3 by csx_cpx_trans/
 qed-.
 
 (* Eliminators with unbound context-sensitive rt-computation for terms ******)
 
-lemma csx_ind_cpxs_tdeq: ∀h,o,G,L. ∀Q:predicate term.
-                         (∀T1. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄ →
-                               (∀T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 → (T1 ≛[h, o] T2 → ⊥) → Q T2) → Q T1
+lemma csx_ind_cpxs_tdeq: ∀h,G,L. ∀Q:predicate term.
+                         (∀T1. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ →
+                               (∀T2. ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 → (T1 ≛ T2 → ⊥) → Q T2) → Q T1
                          ) →
-                         ∀T1. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄ →
-                         ∀T0. ⦃G, L⦄ ⊢ T1 ⬈*[h] T0 → ∀T2. T0 ≛[h, o] T2 → Q T2.
-#h #o #G #L #Q #IH #T1 #H @(csx_ind … H) -T1
+                         ∀T1. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ →
+                         ∀T0. ⦃G,L⦄ ⊢ T1 ⬈*[h] T0 → ∀T2. T0 ≛ T2 → Q T2.
+#h #G #L #Q #IH #T1 #H @(csx_ind … H) -T1
 #T1 #HT1 #IH1 #T0 #HT10 #T2 #HT02
 @IH -IH /3 width=3 by csx_cpxs_trans, csx_tdeq_trans/ -HT1 #V2 #HTV2 #HnTV2
 lapply (tdeq_tdneq_trans … HT02 … HnTV2) -HnTV2 #H
 elim (tdeq_cpxs_trans … HT02 … HTV2) -T2 #V0 #HTV0 #HV02
 lapply (tdneq_tdeq_canc_dx … H … HV02) -H #HnTV0
-elim (tdeq_dec h o T1 T0) #H
+elim (tdeq_dec T1 T0) #H
 [ lapply (tdeq_tdneq_trans … H … HnTV0) -H -HnTV0 #Hn10
   lapply (cpxs_trans … HT10 … HTV0) -T0 #H10
   elim (cpxs_tdneq_fwd_step_sn … H10 …  Hn10) -H10 -Hn10
@@ -59,11 +59,11 @@ elim (tdeq_dec h o T1 T0) #H
 qed-.
 
 (* Basic_2A1: was: csx_ind_alt *)
-lemma csx_ind_cpxs: ∀h,o,G,L. ∀Q:predicate term.
-                    (∀T1. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄ →
-                          (∀T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 → (T1 ≛[h, o] T2 → ⊥) → Q T2) → Q T1
+lemma csx_ind_cpxs: ∀h,G,L. ∀Q:predicate term.
+                    (∀T1. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ →
+                          (∀T2. ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 → (T1 ≛ T2 → ⊥) → Q T2) → Q T1
                     ) →
-                    ∀T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ →  Q T.
-#h #o #G #L #Q #IH #T #HT
+                    ∀T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ →  Q T.
+#h #G #L #Q #IH #T #HT
 @(csx_ind_cpxs_tdeq … IH … HT) -IH -HT // (**) (* full auto fails *)
 qed-.
index 5efee8db4b43d00cfc4cefb70a1958296c44d734..b0921440d36c723ed8c4d76c15db87d9e2ad519e 100644 (file)
@@ -19,23 +19,26 @@ include "basic_2/rt_computation/csx_drops.ma".
 
 (* Advanced properties ******************************************************)
 
-lemma csx_tdeq_trans: ∀h,o,G,L,T1. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄ →
-                      ∀T2. T1 ≛[h, o] T2 → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T2⦄.
-#h #o #G #L #T1 #H @(csx_ind … H) -T1 #T #_ #IH #T2 #HT2
+lemma csx_tdeq_trans (h) (G):
+      ∀L,T1. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ →
+      ∀T2. T1 ≛ T2 → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T2⦄.
+#h #G #L #T1 #H @(csx_ind … H) -T1 #T #_ #IH #T2 #HT2
 @csx_intro #T1 #HT21 #HnT21 elim (tdeq_cpx_trans … HT2 … HT21) -HT21
 /4 width=5 by tdeq_repl/
 qed-.
 
-lemma csx_cpx_trans: ∀h,o,G,L,T1. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄ →
-                     ∀T2. ⦃G, L⦄ ⊢ T1 ⬈[h] T2 → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T2⦄.
-#h #o #G #L #T1 #H @(csx_ind … H) -T1 #T1 #HT1 #IHT1 #T2 #HLT12
-elim (tdeq_dec h o T1 T2) /3 width=4 by csx_tdeq_trans/
+lemma csx_cpx_trans (h) (G):
+      ∀L,T1. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ →
+      ∀T2. ⦃G,L⦄ ⊢ T1 ⬈[h] T2 → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T2⦄.
+#h #G #L #T1 #H @(csx_ind … H) -T1 #T1 #HT1 #IHT1 #T2 #HLT12
+elim (tdeq_dec T1 T2) /3 width=4 by csx_tdeq_trans/
 qed-.
 
 (* Basic_1: was just: sn3_cast *)
-lemma csx_cast: ∀h,o,G,L,W. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃W⦄ →
-                ∀T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓝW.T⦄.
-#h #o #G #L #W #HW @(csx_ind … HW) -W
+lemma csx_cast (h) (G):
+      ∀L,W. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃W⦄ →
+      ∀T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⓝW.T⦄.
+#h #G #L #W #HW @(csx_ind … HW) -W
 #W #HW #IHW #T #HT @(csx_ind … HT) -T
 #T #HT #IHT @csx_intro
 #X #H1 #H2 elim (cpx_inv_cast1 … H1) -H1
@@ -51,9 +54,10 @@ qed.
 
 (* Basic_1: was just: sn3_abbr *)
 (* Basic_2A1: was: csx_lref_bind *)
-lemma csx_lref_pair: ∀h,o,I,G,L,K,V,i. ⬇*[i] L ≘ K.ⓑ{I}V →
-                     ⦃G, K⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄ → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃#i⦄.
-#h #o #I #G #L #K #V #i #HLK #HV
+lemma csx_lref_pair_drops (h) (G): 
+      ∀I,L,K,V,i. ⬇*[i] L ≘ K.ⓑ{I}V →
+      ⦃G,K⦄ ⊢ ⬈*[h] 𝐒⦃V⦄ → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃#i⦄.
+#h #G #I #L #K #V #i #HLK #HV
 @csx_intro #X #H #Hi elim (cpx_inv_lref1_drops … H) -H
 [ #H destruct elim Hi //
 | -Hi * #I0 #K0 #V0 #V1 #HLK0 #HV01 #HV1
@@ -66,17 +70,19 @@ qed.
 
 (* Basic_1: was: sn3_gen_def *)
 (* Basic_2A1: was: csx_inv_lref_bind *)
-lemma csx_inv_lref_pair: ∀h,o,I,G,L,K,V,i. ⬇*[i] L ≘ K.ⓑ{I}V →
-                         ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃#i⦄ → ⦃G, K⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄.
-#h #o #I #G #L #K #V #i #HLK #Hi
+lemma csx_inv_lref_pair_drops (h) (G):
+      ∀I,L,K,V,i. ⬇*[i] L ≘ K.ⓑ{I}V →
+      ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃#i⦄ → ⦃G,K⦄ ⊢ ⬈*[h] 𝐒⦃V⦄.
+#h #G #I #L #K #V #i #HLK #Hi
 elim (lifts_total V (𝐔❴↑i❵))
 /4 width=9 by csx_inv_lifts, csx_cpx_trans, cpx_delta_drops, drops_isuni_fwd_drop2/
 qed-.
 
-lemma csx_inv_lref: ∀h,o,G,L,i. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃#i⦄ →
-                    ∨∨ ⬇*[Ⓕ, 𝐔❴i❵] L ≘ ⋆
-                     | ∃∃I,K. ⬇*[i] L ≘ K.ⓤ{I}
-                     | ∃∃I,K,V. ⬇*[i] L ≘ K.ⓑ{I}V & ⦃G, K⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄.
-#h #o #G #L #i #H elim (drops_F_uni L i) /2 width=1 by or3_intro0/
-* * /4 width=9 by csx_inv_lref_pair, ex2_3_intro, ex1_2_intro, or3_intro2, or3_intro1/
+lemma csx_inv_lref_drops (h) (G):
+      ∀L,i. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃#i⦄ →
+      ∨∨ ⬇*[Ⓕ,𝐔❴i❵] L ≘ ⋆
+       | ∃∃I,K. ⬇*[i] L ≘ K.ⓤ{I}
+       | ∃∃I,K,V. ⬇*[i] L ≘ K.ⓑ{I}V & ⦃G,K⦄ ⊢ ⬈*[h] 𝐒⦃V⦄.
+#h #G #L #i #H elim (drops_F_uni L i) /2 width=1 by or3_intro0/
+* * /4 width=9 by csx_inv_lref_pair_drops, ex2_3_intro, ex1_2_intro, or3_intro2, or3_intro1/
 qed-.
index 30f35f70fef5a1de10d690f9e4fbaf2d6b9cc9dd..571a8154685126d61a309f77c45d6a7e071a5c35 100644 (file)
@@ -12,8 +12,8 @@
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/rt_computation/cpxs_theq_vector.ma".
-include "basic_2/rt_computation/csx_simple_theq.ma".
+include "basic_2/rt_computation/cpxs_toeq_vector.ma".
+include "basic_2/rt_computation/csx_simple_toeq.ma".
 include "basic_2/rt_computation/csx_lsubr.ma".
 include "basic_2/rt_computation/csx_lpx.ma".
 include "basic_2/rt_computation/csx_vector.ma".
@@ -23,31 +23,33 @@ include "basic_2/rt_computation/csx_vector.ma".
 (* Advanced properties ************************************* ****************)
 
 (* Basic_1: was just: sn3_appls_beta *)
-lemma csx_applv_beta: ∀h,o,p,G,L,Vs,V,W,T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⒶVs.ⓓ{p}ⓝW.V.T⦄ →
-                      ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⒶVs.ⓐV.ⓛ{p}W.T⦄.
-#h #o #p #G #L #Vs elim Vs -Vs /2 width=1 by csx_appl_beta/
+lemma csx_applv_beta (h) (G):
+      ∀p,L,Vs,V,W,T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⒶVs.ⓓ{p}ⓝW.V.T⦄ →
+      ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⒶVs.ⓐV.ⓛ{p}W.T⦄.
+#h #G #p #L #Vs elim Vs -Vs /2 width=1 by csx_appl_beta/
 #V0 #Vs #IHV #V #W #T #H1T
 lapply (csx_fwd_pair_sn … H1T) #HV0
 lapply (csx_fwd_flat_dx … H1T) #H2T
-@csx_appl_simple_theq /2 width=1 by applv_simple, simple_flat/ -IHV -HV0 -H2T
+@csx_appl_simple_toeq /2 width=1 by applv_simple, simple_flat/ -IHV -HV0 -H2T
 #X #H #H0
-elim (cpxs_fwd_beta_vector … o … H) -H #H
+elim (cpxs_fwd_beta_vector … H) -H #H
 [ -H1T elim H0 -H0 //
 | -H0 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/
 ]
 qed.
 
-lemma csx_applv_delta: ∀h,o,I,G,L,K,V1,i. ⬇*[i] L ≘ K.ⓑ{I}V1 →
-                       ∀V2. ⬆*[↑i] V1 ≘ V2 →
-                       ∀Vs. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⒶVs.V2⦄ → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⒶVs.#i⦄.
-#h #o #I #G #L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs
-[ /4 width=11 by csx_inv_lifts, csx_lref_pair, drops_isuni_fwd_drop2/
+lemma csx_applv_delta_drops (h) (G):
+      ∀I,L,K,V1,i. ⬇*[i] L ≘ K.ⓑ{I}V1 →
+      ∀V2. ⬆*[↑i] V1 ≘ V2 →
+      ∀Vs. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⒶVs.V2⦄ → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⒶVs.#i⦄.
+#h #G #I #L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs
+[ /4 width=11 by csx_inv_lifts, csx_lref_pair_drops, drops_isuni_fwd_drop2/
 | #V #Vs #IHV #H1T
   lapply (csx_fwd_pair_sn … H1T) #HV
   lapply (csx_fwd_flat_dx … H1T) #H2T
-  @csx_appl_simple_theq /2 width=1 by applv_simple, simple_atom/ -IHV -HV  -H2T
+  @csx_appl_simple_toeq /2 width=1 by applv_simple, simple_atom/ -IHV -HV  -H2T
   #X #H #H0
-  elim (cpxs_fwd_delta_drops_vector … o … HLK … HV12 … H) -HLK -HV12 -H #H
+  elim (cpxs_fwd_delta_drops_vector … HLK … HV12 … H) -HLK -HV12 -H #H
   [ -H1T elim H0 -H0 //
   | -H0 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/
   ]
@@ -55,10 +57,10 @@ lemma csx_applv_delta: ∀h,o,I,G,L,K,V1,i. ⬇*[i] L ≘ K.ⓑ{I}V1 →
 qed.
 
 (* Basic_1: was just: sn3_appls_abbr *)
-lemma csx_applv_theta: ∀h,o,p,G,L,V1b,V2b. ⬆*[1] V1b ≘ V2b →
-                       ∀V,T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓓ{p}V.ⒶV2b.T⦄ →
-                       ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⒶV1b.ⓓ{p}V.T⦄.
-#h #o #p #G #L #V1b #V2b * -V1b -V2b /2 width=1 by/
+lemma csx_applv_theta (h) (G):
+      ∀p,L,V1b,V2b. ⬆*[1] V1b ≘ V2b →
+      ∀V,T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⓓ{p}V.ⒶV2b.T⦄ → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⒶV1b.ⓓ{p}V.T⦄.
+#h #G #p #L #V1b #V2b * -V1b -V2b /2 width=1 by/
 #V1b #V2b #V1 #V2 #HV12 #H
 generalize in match HV12; -HV12 generalize in match V2; -V2 generalize in match V1; -V1
 elim H -V1b -V2b /2 width=3 by csx_appl_theta/
@@ -66,24 +68,25 @@ elim H -V1b -V2b /2 width=3 by csx_appl_theta/
 lapply (csx_appl_theta … H … HW12) -H -HW12 #H
 lapply (csx_fwd_pair_sn … H) #HW1
 lapply (csx_fwd_flat_dx … H) #H1
-@csx_appl_simple_theq /2 width=3 by simple_flat/ -IHV12b -HW1 -H1 #X #H1 #H2
-elim (cpxs_fwd_theta_vector … o … (V2⨮V2b) … H1) -H1 /2 width=1 by liftsv_cons/ -HV12b -HV12
+@csx_appl_simple_toeq /2 width=3 by simple_flat/ -IHV12b -HW1 -H1 #X #H1 #H2
+elim (cpxs_fwd_theta_vector … (V2⨮V2b) … H1) -H1 /2 width=1 by liftsv_cons/ -HV12b -HV12
 [ -H #H elim H2 -H2 //
 | -H2 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/
 ]
 qed.
 
 (* Basic_1: was just: sn3_appls_cast *)
-lemma csx_applv_cast: ∀h,o,G,L,Vs,U. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⒶVs.U⦄ →
-                      ∀T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⒶVs.T⦄ → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⒶVs.ⓝU.T⦄.
-#h #o #G #L #Vs elim Vs -Vs /2 width=1 by csx_cast/
+lemma csx_applv_cast (h) (G):
+      ∀L,Vs,U. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⒶVs.U⦄ →
+      ∀T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⒶVs.T⦄ → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⒶVs.ⓝU.T⦄.
+#h #G #L #Vs elim Vs -Vs /2 width=1 by csx_cast/
 #V #Vs #IHV #U #H1U #T #H1T
 lapply (csx_fwd_pair_sn … H1U) #HV
 lapply (csx_fwd_flat_dx … H1U) #H2U
 lapply (csx_fwd_flat_dx … H1T) #H2T
-@csx_appl_simple_theq /2 width=1 by applv_simple, simple_flat/ -IHV -HV -H2U -H2T
+@csx_appl_simple_toeq /2 width=1 by applv_simple, simple_flat/ -IHV -HV -H2U -H2T
 #X #H #H0
-elim (cpxs_fwd_cast_vector … o … H) -H #H
+elim (cpxs_fwd_cast_vector … H) -H #H
 [ -H1U -H1T elim H0 -H0 //
 | -H1U -H0 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/
 | -H1T -H0 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/
index c0ecbf084361cdac1e3612e2aab29ee2fbf080dd..ad0c072fb097cb60e0c0b52991ebd1f609474381 100644 (file)
@@ -22,8 +22,8 @@ include "basic_2/rt_computation/csx.ma".
 
 (* Basic_1: was just: sn3_lift *)
 (* Basic_2A1: was just: csx_lift *)
-lemma csx_lifts: ∀h,o,G. d_liftable1 … (csx h o G).
-#h #o #G #K #T #H @(csx_ind … H) -T
+lemma csx_lifts: ∀h,G. d_liftable1 … (csx h G).
+#h #G #K #T #H @(csx_ind … H) -T
 #T1 #_ #IH #b #f #L #HLK #U1 #HTU1
 @csx_intro #U2 #HU12 #HnU12
 elim (cpx_inv_lifts_sn … HU12 … HLK … HTU1) -HU12
@@ -34,8 +34,8 @@ qed-.
 
 (* Basic_1: was just: sn3_gen_lift *)
 (* Basic_2A1: was just: csx_inv_lift *)
-lemma csx_inv_lifts: ∀h,o,G. d_deliftable1 … (csx h o G).
-#h #o #G #L #U #H @(csx_ind … H) -U
+lemma csx_inv_lifts: ∀h,G. d_deliftable1 … (csx h G).
+#h #G #L #U #H @(csx_ind … H) -U
 #U1 #_ #IH #b #f #K #HLK #T1 #HTU1
 @csx_intro #T2 #HT12 #HnT12
 elim (cpx_lifts_sn … HT12 … HLK … HTU1) -HT12
index 7c58163b38b2d3e837e5568089cdc3e7c061a82f..fcb2f9af8de4f51d934021ba78234496e78ac335 100644 (file)
@@ -17,10 +17,10 @@ include "basic_2/rt_computation/csx_rdeq.ma".
 
 (* STRONGLY NORMALIZING TERMS FOR UNBOUND PARALLEL RT-TRANSITION ************)
 
-(* Properties with degree-based equivalence for closures ********************)
+(* Properties with sort-irrelevant equivalence for closures *****************)
 
-lemma csx_fdeq_conf: ∀h,o,G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄ →
-                     ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ → ⦃G2, L2⦄ ⊢ ⬈*[h, o] 𝐒⦃T2⦄.
-#h #o #G1 #L1 #T1 #HT1 #G2 #L2 #T2 * -G2 -L2 -T2
+lemma csx_fdeq_conf: ∀h,G1,L1,T1. ⦃G1,L1⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ →
+                     ∀G2,L2,T2. ⦃G1,L1,T1⦄ ≛ ⦃G2,L2,T2⦄ → ⦃G2,L2⦄ ⊢ ⬈*[h] 𝐒⦃T2⦄.
+#h #G1 #L1 #T1 #HT1 #G2 #L2 #T2 * -G2 -L2 -T2
 /3 width=3 by csx_rdeq_conf, csx_tdeq_trans/
 qed-.
index fbc312d03157e225330b56e0df6594b9f810b7a1..6027a70f537b778a0a31c4dc95fa54ed5a1cdf7f 100644 (file)
@@ -22,8 +22,8 @@ include "basic_2/rt_computation/csx_lpx.ma".
 (* Properties with parallel rst-transition for closures *********************)
 
 (* Basic_2A1: was: csx_fpb_conf *)
-lemma csx_fpbq_conf: ∀h,o,G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄ →
-                     ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≽[h, o] ⦃G2, L2, T2⦄ → ⦃G2, L2⦄ ⊢ ⬈*[h, o] 𝐒⦃T2⦄.
-#h #o #G1 #L1 #T1 #HT1 #G2 #L2 #T2 *
+lemma csx_fpbq_conf: ∀h,G1,L1,T1. ⦃G1,L1⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ →
+                     ∀G2,L2,T2. ⦃G1,L1,T1⦄ ≽[h] ⦃G2,L2,T2⦄ → ⦃G2,L2⦄ ⊢ ⬈*[h] 𝐒⦃T2⦄.
+#h #G1 #L1 #T1 #HT1 #G2 #L2 #T2 *
 /2 width=6 by csx_cpx_trans, csx_fquq_conf, csx_lpx_conf, csx_fdeq_conf/
 qed-.
index 0943a9adda981eb1d83517aa7c3b04180c40ab9a..c35a584bbc8e283b95588b9e07ea67741c46579c 100644 (file)
@@ -19,10 +19,11 @@ include "basic_2/rt_computation/csx_lsubr.ma".
 
 (* Properties with extended supclosure **************************************)
 
-lemma csx_fqu_conf: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
-                    ⦃G1, L1⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄ → ⦃G2, L2⦄ ⊢ ⬈*[h, o] 𝐒⦃T2⦄.
-#h #o #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
-[ /3 width=5 by csx_inv_lref_pair, drops_refl/
+lemma csx_fqu_conf (h) (b):
+      ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ →
+      ⦃G1,L1⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ → ⦃G2,L2⦄ ⊢ ⬈*[h] 𝐒⦃T2⦄.
+#h #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
+[ /3 width=5 by csx_inv_lref_pair_drops, drops_refl/
 | /2 width=3 by csx_fwd_pair_sn/
 | /2 width=2 by csx_fwd_bind_dx/
 | /2 width=4 by csx_fwd_bind_dx_unit/
@@ -31,20 +32,23 @@ lemma csx_fqu_conf: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L
 ]
 qed-.
 
-lemma csx_fquq_conf: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ →
-                     ⦃G1, L1⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄ → ⦃G2, L2⦄ ⊢ ⬈*[h, o] 𝐒⦃T2⦄.
-#h #o #b #G1 #G2 #L1 #L2 #T1 #T2 * /2 width=6 by csx_fqu_conf/
+lemma csx_fquq_conf (h) (b):
+      ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂⸮[b] ⦃G2,L2,T2⦄ →
+      ⦃G1,L1⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ → ⦃G2,L2⦄ ⊢ ⬈*[h] 𝐒⦃T2⦄.
+#h #b #G1 #G2 #L1 #L2 #T1 #T2 * /2 width=6 by csx_fqu_conf/
 * #HG #HL #HT destruct //
 qed-.
 
-lemma csx_fqup_conf: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ →
-                     ⦃G1, L1⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄ → ⦃G2, L2⦄ ⊢ ⬈*[h, o] 𝐒⦃T2⦄.
-#h #o #b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2
+lemma csx_fqup_conf (h) (b):
+      ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂+[b] ⦃G2,L2,T2⦄ →
+      ⦃G1,L1⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ → ⦃G2,L2⦄ ⊢ ⬈*[h] 𝐒⦃T2⦄.
+#h #b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2
 /3 width=6 by csx_fqu_conf/
 qed-.
 
-lemma csx_fqus_conf: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
-                     ⦃G1, L1⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄ → ⦃G2, L2⦄ ⊢ ⬈*[h, o] 𝐒⦃T2⦄.
-#h #o #b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -H
+lemma csx_fqus_conf (h) (b):
+      ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂*[b] ⦃G2,L2,T2⦄ →
+      ⦃G1,L1⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ → ⦃G2,L2⦄ ⊢ ⬈*[h] 𝐒⦃T2⦄.
+#h #b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -H
 /3 width=6 by csx_fquq_conf/
 qed-.
index f5b17093014998fd5c0911584bd04b0268f6efca..716032c859f208b85a488c4782e72033dca7bd39 100644 (file)
@@ -20,10 +20,10 @@ include "basic_2/rt_computation/csx_drops.ma".
 
 (* Main properties with generic computation properties **********************)
 
-theorem csx_gcp: ∀h,o. gcp (cpx h) (tdeq h o) (csx h o).
-#h #o @mk_gcp
+theorem csx_gcp: ∀h. gcp (cpx h) tdeq (csx h).
+#h @mk_gcp
 [ normalize /3 width=13 by cnx_lifts/
-| #G #L elim (deg_total h o 0) /3 width=8 by cnx_sort_iter, ex_intro/
+| /2 width=4 by cnx_sort/
 | /2 width=8 by csx_lifts/
 | /2 width=3 by csx_fwd_flat_dx/
 ]
index 03970d35b9b85bd3fe03c077015806f1de354605..d0644bbf56f09946315bbc2479f9b62bc72b4acb 100644 (file)
@@ -20,13 +20,14 @@ include "basic_2/rt_computation/csx_csx_vector.ma".
 
 (* Main properties with generic candidates of reducibility ******************)
 
-theorem csx_gcr: ∀h,o. gcr (cpx h) (tdeq h o) (csx h o) (csx h o).
-#h #o @mk_gcr //
-[ /3 width=1 by csx_applv_cnx/
-|2,3,6: /2 width=1 by csx_applv_beta, csx_applv_sort, csx_applv_cast/
-| /2 width=7 by csx_applv_delta/
-| #G #L #V1b #V2b #HV12b #a #V #T #H #HV
-  @(csx_applv_theta … HV12b) -HV12b
-  @csx_abbr //
+theorem csx_gcr (h): gcr (cpx h) tdeq (csx h) (csx h).
+#h @mk_gcr
+[ //
+| #G #L #Vs #Hvs #T #HT #H
+  @(csx_applv_cnx … H) -H // (**) (* auto fails *)
+| /2 width=1 by csx_applv_beta/
+| /2 width=7 by csx_applv_delta_drops/
+| /3 width=3 by csx_applv_theta, csx_abbr/
+| /2 width=1 by csx_applv_cast/
 ]
 qed.
index 980c1f12d376f88cf450c7efa47228dd76cf651f..8c4f35b6ca572dda243a2f0aee5ac33965e2edcc 100644 (file)
@@ -19,32 +19,35 @@ include "basic_2/rt_computation/csx_cpxs.ma".
 
 (* Properties with unbound parallel rt-transition on all entries ************)
 
-lemma csx_lpx_conf: ∀h,o,G,L1,T. ⦃G, L1⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ →
-                    ∀L2. ⦃G, L1⦄ ⊢ ⬈[h] L2 → ⦃G, L2⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄.
-#h #o #G #L1 #T #H @(csx_ind_cpxs … H) -T
+lemma csx_lpx_conf (h) (G):
+      ∀L1,T. ⦃G,L1⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ →
+      ∀L2. ⦃G,L1⦄ ⊢ ⬈[h] L2 → ⦃G,L2⦄ ⊢ ⬈*[h] 𝐒⦃T⦄.
+#h #G #L1 #T #H @(csx_ind_cpxs … H) -T
 /4 width=3 by csx_intro, lpx_cpx_trans/
 qed-.
 
 (* Advanced properties ******************************************************)
 
-lemma csx_abst: ∀h,o,p,G,L,W. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃W⦄ →
-                ∀T. ⦃G, L.ⓛW⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓛ{p}W.T⦄.
-#h #o #p #G #L #W #HW
+lemma csx_abst (h) (G):
+      ∀p,L,W. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃W⦄ →
+      ∀T. ⦃G,L.ⓛW⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⓛ{p}W.T⦄.
+#h #G #p #L #W #HW
 @(csx_ind … HW) -W #W #_ #IHW #T #HT
 @(csx_ind … HT) -T #T #HT #IHT
 @csx_intro #X #H1 #H2
 elim (cpx_inv_abst1 … H1) -H1 #W0 #T0 #HLW0 #HLT0 #H destruct
 elim (tdneq_inv_pair  … H2) -H2
 [ #H elim H -H //
-| -IHT #H lapply (csx_cpx_trans … o … HLT0) // -HT #HT0
+| -IHT #H lapply (csx_cpx_trans … HLT0) // -HT #HT0
   /4 width=5 by csx_lpx_conf, lpx_pair/
 | -IHW -HT /4 width=3 by csx_cpx_trans, cpx_pair_sn/
 ]
 qed.
 
-lemma csx_abbr: ∀h,o,p,G,L,V. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄ →
-                ∀T. ⦃G, L.ⓓV⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓓ{p}V.T⦄.
-#h #o #p #G #L #V #HV
+lemma csx_abbr (h) (G):
+      ∀p,L,V. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃V⦄ →
+      ∀T. ⦃G,L.ⓓV⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⓓ{p}V.T⦄.
+#h #G #p #L #V #HV
 @(csx_ind … HV) -V #V #_ #IHV #T #HT
 @(csx_ind_cpxs … HT) -T #T #HT #IHT
 @csx_intro #X #H1 #H2
@@ -60,9 +63,17 @@ elim (cpx_inv_abbr1 … H1) -H1 *
 ]
 qed.
 
-fact csx_appl_theta_aux: ∀h,o,p,G,L,U. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃U⦄ → ∀V1,V2. ⬆*[1] V1 ≘ V2 →
-                         ∀V,T. U = ⓓ{p}V.ⓐV2.T → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓐV1.ⓓ{p}V.T⦄.
-#h #o #p #G #L #X #H
+lemma csx_bind (h) (G):
+      ∀p,I,L,V. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃V⦄ →
+      ∀T. ⦃G,L.ⓑ{I}V⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⓑ{p,I}V.T⦄.
+#h #G #p * #L #V #HV #T #HT
+/2 width=1 by csx_abbr, csx_abst/
+qed.
+
+fact csx_appl_theta_aux (h) (G):
+     ∀p,L,U. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃U⦄ → ∀V1,V2. ⬆*[1] V1 ≘ V2 →
+     ∀V,T. U = ⓓ{p}V.ⓐV2.T → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⓐV1.ⓓ{p}V.T⦄.
+#h #G #p #L #X #H
 @(csx_ind_cpxs … H) -X #X #HVT #IHVT #V1 #V2 #HV12 #V #T #H destruct
 lapply (csx_fwd_pair_sn … HVT) #HV
 lapply (csx_fwd_bind_dx … HVT) -HVT #HVT
@@ -72,13 +83,13 @@ elim (cpx_inv_appl1 … HL) -HL *
   elim (cpx_inv_abbr1 … HL) -HL *
   [ #V3 #T3 #HV3 #HLT3 #H0 destruct
     elim (cpx_lifts_sn … HLV10 (Ⓣ) … (L.ⓓV) … HV12) -HLV10 /3 width=1 by drops_refl, drops_drop/ #V4 #HV04 #HV24
-    elim (tdeq_dec h o (ⓓ{p}V.ⓐV2.T) (ⓓ{p}V3.ⓐV4.T3)) #H0
+    elim (tdeq_dec (ⓓ{p}V.ⓐV2.T) (ⓓ{p}V3.ⓐV4.T3)) #H0
     [ -IHVT -HV3 -HV24 -HLT3
       elim (tdeq_inv_pair … H0) -H0 #_ #HV3 #H0
       elim (tdeq_inv_pair … H0) -H0 #_ #HV24 #HT3
       elim (tdneq_inv_pair … H) -H #H elim H -H -G -L
       /3 width=6 by tdeq_inv_lifts_bi, tdeq_pair/
-    | -V1 @(IHVT … H0 … HV04) -o -V0 /4 width=1 by cpx_cpxs, cpx_flat, cpx_bind/
+    | -V1 @(IHVT … H0 … HV04) -V0 /4 width=1 by cpx_cpxs, cpx_flat, cpx_bind/
     ]
   | #T0 #HT0 #HLT0 #H0 destruct -H -IHVT
     lapply (csx_inv_lifts … HVT (Ⓣ) … L ???) -HVT
@@ -94,6 +105,7 @@ elim (cpx_inv_appl1 … HL) -HL *
 ]
 qed-.
 
-lemma csx_appl_theta: ∀h,o,p,G,L,V,V2,T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓓ{p}V.ⓐV2.T⦄ →
-                      ∀V1. ⬆*[1] V1 ≘ V2 → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓐV1.ⓓ{p}V.T⦄.
+lemma csx_appl_theta (h) (G):
+      ∀p,L,V,V2,T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⓓ{p}V.ⓐV2.T⦄ →
+      ∀V1. ⬆*[1] V1 ≘ V2 → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⓐV1.ⓓ{p}V.T⦄.
 /2 width=5 by csx_appl_theta_aux/ qed.
index cc9ae833de3accff99b7adb5906833114a6d4da8..84086bcb6cd79b4a3b39921429a6bedb5d248bbe 100644 (file)
@@ -19,8 +19,8 @@ include "basic_2/rt_computation/lpxs_lpx.ma".
 
 (* Properties with unbound parallel rt-computation on all entries ***********)
 
-lemma csx_lpxs_conf: ∀h,o,G,L1,L2,T. ⦃G, L1⦄ ⊢ ⬈*[h] L2 →
-                     ⦃G, L1⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ → ⦃G, L2⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄.
-#h #o #G #L1 #L2 #T #H @(lpxs_ind_dx … H) -L2
+lemma csx_lpxs_conf: ∀h,G,L1,L2,T. ⦃G,L1⦄ ⊢ ⬈*[h] L2 →
+                     ⦃G,L1⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ → ⦃G,L2⦄ ⊢ ⬈*[h] 𝐒⦃T⦄.
+#h #G #L1 #L2 #T #H @(lpxs_ind_dx … H) -L2
 /3 by lpxs_step_dx, csx_lpx_conf/
 qed-.
index 169970ed12ca49d1f68b9353850544fdcd89a787..5e32b0e6d3e007132aefaadd069a729c5b39eb03 100644 (file)
@@ -19,9 +19,10 @@ include "basic_2/rt_computation/csx_csx.ma".
 
 (* Advanced properties ******************************************************)
 
-fact csx_appl_beta_aux: ∀h,o,p,G,L,U1. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃U1⦄ →
-                        ∀V,W,T1. U1 = ⓓ{p}ⓝW.V.T1 → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓐV.ⓛ{p}W.T1⦄.
-#h #o #p #G #L #X #H @(csx_ind … H) -X
+fact csx_appl_beta_aux (h) (G):
+     ∀p,L,U1. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃U1⦄ →
+     ∀V,W,T1. U1 = ⓓ{p}ⓝW.V.T1 → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⓐV.ⓛ{p}W.T1⦄.
+#h #G #p #L #X #H @(csx_ind … H) -X
 #X #HT1 #IHT1 #V #W #T1 #H1 destruct
 @csx_intro #X #H1 #H2
 elim (cpx_inv_appl1 … H1) -H1 *
@@ -42,23 +43,37 @@ elim (cpx_inv_appl1 … H1) -H1 *
 qed-.
 
 (* Basic_1: was just: sn3_beta *)
-lemma csx_appl_beta: ∀h,o,p,G,L,V,W,T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓓ{p}ⓝW.V.T⦄ → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓐV.ⓛ{p}W.T⦄.
+lemma csx_appl_beta (h) (G):
+      ∀p,L,V,W,T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⓓ{p}ⓝW.V.T⦄ → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⓐV.ⓛ{p}W.T⦄.
 /2 width=3 by csx_appl_beta_aux/ qed.
 
 (* Advanced forward lemmas **************************************************)
 
-fact csx_fwd_bind_dx_unit_aux: ∀h,o,G,L,U. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃U⦄ →
-                               ∀p,I,J,V,T. U = ⓑ{p,I}V.T → ⦃G, L.ⓤ{J}⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄.
-#h #o #G #L #U #H elim H -H #U0 #_ #IH #p #I #J #V #T #H destruct
+fact csx_fwd_bind_dx_unit_aux (h) (G):
+     ∀L,U. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃U⦄ →
+     ∀p,I,J,V,T. U = ⓑ{p,I}V.T → ⦃G,L.ⓤ{J}⦄ ⊢ ⬈*[h] 𝐒⦃T⦄.
+#h #G #L #U #H elim H -H #U0 #_ #IH #p #I #J #V #T #H destruct
 @csx_intro #T2 #HLT2 #HT2
-@(IH (ⓑ{p,I}V.T2)) -IH /2 width=4 by cpx_bind_unit/ -HLT2
+@(IH (ⓑ{p, I}V.T2)) -IH /2 width=4 by cpx_bind_unit/ -HLT2
 #H elim (tdeq_inv_pair … H) -H /2 width=1 by/
 qed-.
 
-lemma csx_fwd_bind_dx_unit: ∀h,o,p,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓑ{p,I}V.T⦄ →
-                            ∀J. ⦃G, L.ⓤ{J}⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄.
+lemma csx_fwd_bind_dx_unit (h) (G):
+      ∀p,I,L,V,T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⓑ{p,I}V.T⦄ →
+      ∀J. ⦃G,L.ⓤ{J}⦄ ⊢ ⬈*[h] 𝐒⦃T⦄.
 /2 width=6 by csx_fwd_bind_dx_unit_aux/ qed-.
 
-lemma csx_fwd_bind_unit: ∀h,o,p,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓑ{p,I}V.T⦄ →
-                         ∀J. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄ ∧ ⦃G, L.ⓤ{J}⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄.
+lemma csx_fwd_bind_unit (h) (G):
+      ∀p,I,L,V,T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⓑ{p,I}V.T⦄ →
+      ∀J. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃V⦄ ∧ ⦃G,L.ⓤ{J}⦄ ⊢ ⬈*[h] 𝐒⦃T⦄.
 /3 width=4 by csx_fwd_pair_sn, csx_fwd_bind_dx_unit, conj/ qed-.
+
+(* Properties with restricted refinement for local environments *************)
+
+lemma csx_lsubr_conf (h) (G):
+      ∀L1,T. ⦃G,L1⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ → ∀L2. L1 ⫃ L2 → ⦃G,L2⦄ ⊢ ⬈*[h] 𝐒⦃T⦄.
+#h #G #L1 #T #H
+@(csx_ind … H) -T #T1 #_ #IH #L2 #HL12
+@csx_intro #T2 #HT12 #HnT12
+/3 width=3 by lsubr_cpx_trans/
+qed-.
index de6114d2f75b64577c3ec71d8a402c96bcafdc92..dcd0462e185298b22875092fb9d451468c96e8be 100644 (file)
@@ -17,19 +17,19 @@ include "basic_2/rt_computation/csx_csx.ma".
 
 (* STRONGLY NORMALIZING TERMS FOR UNBOUND PARALLEL RT-TRANSITION ************)
 
-(* Properties with degree-based equivalence for local environments **********)
+(* Properties with sort-irrelevant equivalence for local environments *******)
 
 (* Basic_2A1: uses: csx_lleq_conf *)
-lemma csx_rdeq_conf: ∀h,o,G,L1,T. ⦃G, L1⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ →
-                     ∀L2. L1 ≛[h, o, T] L2 → ⦃G, L2⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄.
-#h #o #G #L1 #T #H
+lemma csx_rdeq_conf: ∀h,G,L1,T. ⦃G,L1⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ →
+                     ∀L2. L1 ≛[T] L2 → ⦃G,L2⦄ ⊢ ⬈*[h] 𝐒⦃T⦄.
+#h #G #L1 #T #H
 @(csx_ind … H) -T #T1 #_ #IH #L2 #HL12
 @csx_intro #T2 #HT12 #HnT12
 elim (rdeq_cpx_trans … HL12 … HT12) -HT12
-/5 width=4 by cpx_rdeq_conf_sn, csx_tdeq_trans, tdeq_trans/
+/5 width=5 by cpx_rdeq_conf_sn, csx_tdeq_trans, tdeq_trans/
 qed-.
 
 (* Basic_2A1: uses: csx_lleq_conf *)
-lemma csx_rdeq_trans: ∀h,o,L1,L2,T. L1 ≛[h, o, T] L2 →
-                      ∀G. ⦃G, L2⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ → ⦃G, L1⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄.
+lemma csx_rdeq_trans: ∀h,L1,L2,T. L1 ≛[T] L2 →
+                      ∀G. ⦃G,L2⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ → ⦃G,L1⦄ ⊢ ⬈*[h] 𝐒⦃T⦄.
 /3 width=3 by csx_rdeq_conf, rdeq_sym/ qed-.
index efa69cff7a0af3861ea6579fd6166c15da866fcd..50a4607323d820a3c52b8822f047dd305d425920 100644 (file)
@@ -19,10 +19,10 @@ include "basic_2/rt_computation/csx_csx.ma".
 
 (* Properties with simple terms *********************************************)
 
-lemma csx_appl_simple: ∀h,o,G,L,V. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄ → ∀T1.
-                       (∀T2. ⦃G, L⦄ ⊢ T1 ⬈[h] T2 → (T1 ≛[h, o] T2 → ⊥) → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓐV.T2⦄) →
-                       𝐒⦃T1⦄ → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓐV.T1⦄.
-#h #o #G #L #V #H @(csx_ind … H) -V
+lemma csx_appl_simple: ∀h,G,L,V. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃V⦄ → ∀T1.
+                       (∀T2. ⦃G,L⦄ ⊢ T1 ⬈[h] T2 → (T1 ≛ T2 → ⊥) → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⓐV.T2⦄) →
+                       𝐒⦃T1⦄ → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⓐV.T1⦄.
+#h #G #L #V #H @(csx_ind … H) -V
 #V #_ #IHV #T1 #IHT1 #HT1
 @csx_intro #X #H1 #H2
 elim (cpx_inv_appl1_simple … H1) // -H1
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_simple_theq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_simple_theq.ma
deleted file mode 100644 (file)
index cc286ae..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "static_2/syntax/theq_simple.ma".
-include "static_2/syntax/theq_theq.ma".
-include "basic_2/rt_transition/cpx_simple.ma".
-include "basic_2/rt_computation/cpxs.ma".
-include "basic_2/rt_computation/csx_csx.ma".
-
-(* STRONGLY NORMALIZING TERMS FOR UNBOUND PARALLEL RT-TRANSITION ************)
-
-(* Properties with head equivalence for terms *******************************)
-
-(* Basic_1: was just: sn3_appl_appl *)
-(* Basic_2A1: was: csx_appl_simple_tsts *)
-lemma csx_appl_simple_theq: ∀h,o,G,L,V. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄ → ∀T1. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄ →
-                            (∀T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 → (T1 ⩳[h, o] T2 → ⊥) → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓐV.T2⦄) →
-                            𝐒⦃T1⦄ → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓐV.T1⦄.
-#h #o #G #L #V #H @(csx_ind … H) -V
-#V #_ #IHV #T1 #H @(csx_ind … H) -T1
-#T1 #H1T1 #IHT1 #H2T1 #H3T1
-@csx_intro #X #HL #H
-elim (cpx_inv_appl1_simple … HL) -HL //
-#V0 #T0 #HLV0 #HLT10 #H0 destruct
-elim (tdneq_inv_pair … H) -H
-[ #H elim H -H //
-| -IHT1 #HV0
-  @(csx_cpx_trans … (ⓐV0.T1)) /2 width=1 by cpx_flat/ -HLT10
-  @IHV -IHV /4 width=3 by csx_cpx_trans, cpx_pair_sn/
-| -IHV -H1T1 #H1T10
-  @(csx_cpx_trans … (ⓐV.T0)) /2 width=1 by cpx_flat/ -HLV0
-  elim (theq_dec h o T1 T0) #H2T10
-  [ @IHT1 -IHT1 /4 width=5 by cpxs_strap2, cpxs_strap1, theq_canc_sn, simple_theq_repl_dx/
-  | -IHT1 -H3T1 -H1T10 /3 width=1 by cpx_cpxs/
-  ]
-]
-qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_simple_toeq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_simple_toeq.ma
new file mode 100644 (file)
index 0000000..8fb3386
--- /dev/null
@@ -0,0 +1,49 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/toeq_simple.ma".
+include "static_2/syntax/toeq_toeq.ma".
+include "basic_2/rt_transition/cpx_simple.ma".
+include "basic_2/rt_computation/cpxs.ma".
+include "basic_2/rt_computation/csx_csx.ma".
+
+(* STRONGLY NORMALIZING TERMS FOR UNBOUND PARALLEL RT-TRANSITION ************)
+
+(* Properties with outer equivalence for terms ******************************)
+
+(* Basic_1: was just: sn3_appl_appl *)
+(* Basic_2A1: was: csx_appl_simple_tsts *)
+lemma csx_appl_simple_toeq (h) (G) (L):
+      ∀V. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃V⦄ → ∀T1. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ →
+      (∀T2. ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 → (T1 ⩳ T2 → ⊥) → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⓐV.T2⦄) →
+      𝐒⦃T1⦄ → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⓐV.T1⦄.
+#h #G #L #V #H @(csx_ind … H) -V
+#V #_ #IHV #T1 #H @(csx_ind … H) -T1
+#T1 #H1T1 #IHT1 #H2T1 #H3T1
+@csx_intro #X #HL #H
+elim (cpx_inv_appl1_simple … HL) -HL //
+#V0 #T0 #HLV0 #HLT10 #H0 destruct
+elim (tdneq_inv_pair … H) -H
+[ #H elim H -H //
+| -IHT1 #HV0
+  @(csx_cpx_trans … (ⓐV0.T1)) /2 width=1 by cpx_flat/ -HLT10
+  @IHV -IHV /4 width=3 by csx_cpx_trans, cpx_pair_sn/
+| -IHV -H1T1 #H1T10
+  @(csx_cpx_trans … (ⓐV.T0)) /2 width=1 by cpx_flat/ -HLV0
+  elim (toeq_dec T1 T0) #H2T10
+  [ @IHT1 -IHT1 /4 width=5 by cpxs_strap2, cpxs_strap1, toeq_canc_sn, simple_toeq_repl_dx/
+  | -IHT1 -H3T1 -H1T10 /3 width=1 by cpx_cpxs/
+  ]
+]
+qed.
index 32afe79a4a87cf73d6d69943f70b3261fd8d655e..f4b85eb9d2566f8a40a64921f16e58a33ead0b26 100644 (file)
@@ -17,24 +17,24 @@ include "basic_2/rt_computation/csx.ma".
 
 (* STRONGLY NORMALIZING TERMS VECTORS FOR UNBOUND PARALLEL RT-TRANSITION ****)
 
-definition csxv: ∀h. sd h → relation3 genv lenv (list term) ≝
-                 λh,o,G,L. all … (csx h o G L).
+definition csxv: ∀h. relation3 genv lenv (list term) ≝
+                 λh,G,L. all … (csx h G L).
 
 interpretation
    "strong normalization for unbound context-sensitive parallel rt-transition (term vector)"
-   'PRedTyStrong h o G L Ts = (csxv h o G L Ts).
+   'PRedTyStrong h G L Ts = (csxv h G L Ts).
 
 (* Basic inversion lemmas ***************************************************)
 
-lemma csxv_inv_cons: ∀h,o,G,L,T,Ts. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⨮Ts⦄ →
-                     ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ ∧ ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃Ts⦄.
+lemma csxv_inv_cons: ∀h,G,L,T,Ts. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⨮Ts⦄ →
+                     ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ ∧ ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃Ts⦄.
 normalize // qed-.
 
 (* Basic forward lemmas *****************************************************)
 
-lemma csx_fwd_applv: ∀h,o,G,L,T,Vs. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⒶVs.T⦄ →
-                     ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃Vs⦄ ∧ ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄.
-#h #o #G #L #T #Vs elim Vs -Vs /2 width=1 by conj/
+lemma csx_fwd_applv: ∀h,G,L,T,Vs. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃ⒶVs.T⦄ →
+                     ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃Vs⦄ ∧ ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄.
+#h #G #L #T #Vs elim Vs -Vs /2 width=1 by conj/
 #V #Vs #IHVs #HVs
 lapply (csx_fwd_pair_sn … HVs) #HV
 lapply (csx_fwd_flat_dx … HVs) -HVs #HVs
index bda560f425b152f8674c39ce778c325599d94cf6..b14847da03a338bfb3bda7ebad945b551e82f4fd 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/notation/relations/predsubtystarproper_8.ma".
+include "basic_2/notation/relations/predsubtystarproper_7.ma".
 include "basic_2/rt_transition/fpb.ma".
 include "basic_2/rt_computation/fpbs.ma".
 
 (* PROPER PARALLEL RST-COMPUTATION FOR CLOSURES *****************************)
 
-definition fpbg: ∀h. sd h → tri_relation genv lenv term ≝
-                 λh,o,G1,L1,T1,G2,L2,T2.
-                 ∃∃G,L,T. ⦃G1, L1, T1⦄ ≻[h, o] ⦃G, L, T⦄ & ⦃G, L, T⦄ ≥[h, o] ⦃G2, L2, T2⦄.
+definition fpbg: ∀h. tri_relation genv lenv term ≝
+                 λh,G1,L1,T1,G2,L2,T2.
+                 ∃∃G,L,T. ⦃G1,L1,T1⦄ ≻[h] ⦃G,L,T⦄ & ⦃G,L,T⦄ ≥[h] ⦃G2,L2,T2⦄.
 
 interpretation "proper parallel rst-computation (closure)"
-   'PRedSubTyStarProper h o G1 L1 T1 G2 L2 T2 = (fpbg h o G1 L1 T1 G2 L2 T2).
+   'PRedSubTyStarProper h G1 L1 T1 G2 L2 T2 = (fpbg h G1 L1 T1 G2 L2 T2).
 
 (* Basic properties *********************************************************)
 
-lemma fpb_fpbg: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, o] ⦃G2, L2, T2⦄ →
-                ⦃G1, L1, T1⦄ >[h, o] ⦃G2, L2, T2⦄.
+lemma fpb_fpbg: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ≻[h] ⦃G2,L2,T2⦄ →
+                ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄.
 /2 width=5 by ex2_3_intro/ qed.
 
-lemma fpbg_fpbq_trans: ∀h,o,G1,G,G2,L1,L,L2,T1,T,T2.
-                       ⦃G1, L1, T1⦄ >[h, o] ⦃G, L, T⦄ → ⦃G, L, T⦄ ≽[h, o] ⦃G2, L2, T2⦄ →
-                       ⦃G1, L1, T1⦄ >[h, o] ⦃G2, L2, T2⦄.
-#h #o #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 *
+lemma fpbg_fpbq_trans: ∀h,G1,G,G2,L1,L,L2,T1,T,T2.
+                       ⦃G1,L1,T1⦄ >[h] ⦃G,L,T⦄ → ⦃G,L,T⦄ ≽[h] ⦃G2,L2,T2⦄ →
+                       ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄.
+#h #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 *
 /3 width=9 by fpbs_strap1, ex2_3_intro/
 qed-.
 
+lemma fpbg_fqu_trans (h): ∀G1,G,G2,L1,L,L2,T1,T,T2.
+                          ⦃G1,L1,T1⦄ >[h] ⦃G,L,T⦄ → ⦃G,L,T⦄ ⬂ ⦃G2,L2,T2⦄ →
+                          ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄.
+#h #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2
+/4 width=5 by fpbg_fpbq_trans, fpbq_fquq, fqu_fquq/
+qed-.
+
 (* Note: this is used in the closure proof *)
-lemma fpbg_fpbs_trans: ∀h,o,G,G2,L,L2,T,T2. ⦃G, L, T⦄ ≥[h, o] ⦃G2, L2, T2⦄ →
-                       ∀G1,L1,T1. ⦃G1, L1, T1⦄ >[h, o] ⦃G, L, T⦄ → ⦃G1, L1, T1⦄ >[h, o] ⦃G2, L2, T2⦄.
-#h #o #G #G2 #L #L2 #T #T2 #H @(fpbs_ind_dx … H) -G -L -T /3 width=5 by fpbg_fpbq_trans/
+lemma fpbg_fpbs_trans: ∀h,G,G2,L,L2,T,T2. ⦃G,L,T⦄ ≥[h] ⦃G2,L2,T2⦄ →
+                       ∀G1,L1,T1. ⦃G1,L1,T1⦄ >[h] ⦃G,L,T⦄ → ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄.
+#h #G #G2 #L #L2 #T #T2 #H @(fpbs_ind_dx … H) -G -L -T /3 width=5 by fpbg_fpbq_trans/
 qed-.
 
 (* Basic_2A1: uses: fpbg_fleq_trans *)
-lemma fpbg_fdeq_trans: ∀h,o,G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ >[h, o] ⦃G, L, T⦄ →
-                       ∀G2,L2,T2. ⦃G, L, T⦄ ≛[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ >[h, o] ⦃G2, L2, T2⦄.
+lemma fpbg_fdeq_trans: ∀h,G1,G,L1,L,T1,T. ⦃G1,L1,T1⦄ >[h] ⦃G,L,T⦄ →
+                       ∀G2,L2,T2. ⦃G,L,T⦄ ≛ ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄.
 /3 width=5 by fpbg_fpbq_trans, fpbq_fdeq/ qed-.
 
 (* Properties with t-bound rt-transition for terms **************************)
 
-lemma cpm_tdneq_cpm_fpbg (h) (o) (G) (L):
-                         ∀n1,T1,T. ⦃G, L⦄ ⊢ T1 ➡[n1,h] T → (T1 ≛[h,o] T → ⊥) →
-                         ∀n2,T2. ⦃G, L⦄ ⊢ T ➡[n2,h] T2 →
-                         ⦃G, L, T1⦄ >[h,o] ⦃G, L, T2⦄.
+lemma cpm_tdneq_cpm_fpbg (h) (G) (L):
+                         ∀n1,T1,T. ⦃G,L⦄ ⊢ T1 ➡[n1,h] T → (T1 ≛ T → ⊥) →
+                         ∀n2,T2. ⦃G,L⦄ ⊢ T ➡[n2,h] T2 → ⦃G,L,T1⦄ >[h] ⦃G,L,T2⦄.
 /4 width=5 by fpbq_fpbs, cpm_fpbq, cpm_fpb, ex2_3_intro/ qed. 
index e70619a8d9742df72fc7cec6c60a23711bfbc3dc..6fef34261e8d68ea25c7da5de9f135fe384b7f17 100644 (file)
@@ -21,13 +21,13 @@ include "basic_2/rt_computation/fpbg_fpbs.ma".
 (* Properties with unbound context-sensitive parallel rt-computation ********)
 
 (* Basic_2A1: was: cpxs_fpbg *)
-lemma cpxs_tdneq_fpbg (h) (o): ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 →
-                               (T1 ≛[h, o] T2 → ⊥) → ⦃G, L, T1⦄ >[h, o] ⦃G, L, T2⦄.
-#h #o #G #L #T1 #T2 #H #H0
+lemma cpxs_tdneq_fpbg (h): ∀G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 →
+                           (T1 ≛ T2 → ⊥) → ⦃G,L,T1⦄ >[h] ⦃G,L,T2⦄.
+#h #G #L #T1 #T2 #H #H0
 elim (cpxs_tdneq_fwd_step_sn … H … H0) -H -H0
 /4 width=5 by cpxs_tdeq_fpbs, fpb_cpx, ex2_3_intro/
 qed.
 
-lemma cpxs_fpbg_trans (h) (o): ∀G1,L1,T1,T. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] T →
-                               ∀G2,L2,T2. ⦃G1, L1, T⦄ >[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ >[h, o] ⦃G2, L2, T2⦄.
+lemma cpxs_fpbg_trans (h): ∀G1,L1,T1,T. ⦃G1,L1⦄ ⊢ T1 ⬈*[h] T →
+                           ∀G2,L2,T2. ⦃G1,L1,T⦄ >[h] ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄.
 /3 width=5 by fpbs_fpbg_trans, cpxs_fpbs/ qed-.
index 636f2095505846d15fe22617e62391e1519f4b33..6d511b7f4bc09bbf2238f73051d10de4db7ed35b 100644 (file)
@@ -18,5 +18,5 @@ include "basic_2/rt_computation/fpbg_fpbs.ma".
 
 (* Main properties **********************************************************)
 
-theorem fpbg_trans: ∀h,o. tri_transitive … (fpbg h o).
+theorem fpbg_trans: ∀h. tri_transitive … (fpbg h).
 /3 width=5 by fpbg_fpbs_trans, fpbg_fwd_fpbs/ qed-.
index d7a1ccae06e091ef9a0396aa2af7c639a53cdae3..e80960d047dc8f3d91cfda9c1e6469d025c31de2 100644 (file)
@@ -21,60 +21,60 @@ include "basic_2/rt_computation/fpbg.ma".
 
 (* Advanced forward lemmas **************************************************)
 
-lemma fpbg_fwd_fpbs: ∀h,o,G1,G2,L1,L2,T1,T2.
-                     ⦃G1, L1, T1⦄ >[h,o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
-#h #o #G1 #G2 #L1 #L2 #T1 #T2 *
+lemma fpbg_fwd_fpbs: ∀h,G1,G2,L1,L2,T1,T2.
+                     ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
+#h #G1 #G2 #L1 #L2 #T1 #T2 *
 /3 width=5 by fpbs_strap2, fpb_fpbq/
 qed-.
 
-(* Advanced properties with degree-based equivalence on closures ************)
+(* Advanced properties with sort-irrelevant equivalence on closures *********)
 
 (* Basic_2A1: uses: fleq_fpbg_trans *)
-lemma fdeq_fpbg_trans: ∀h,o,G,G2,L,L2,T,T2. ⦃G, L, T⦄ >[h, o] ⦃G2, L2, T2⦄ →
-                       ∀G1,L1,T1. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G, L, T⦄ → ⦃G1, L1, T1⦄ >[h, o] ⦃G2, L2, T2⦄.
-#h #o #G #G2 #L #L2 #T #T2 * #G0 #L0 #T0 #H0 #H02 #G1 #L1 #T1 #H1
+lemma fdeq_fpbg_trans: ∀h,G,G2,L,L2,T,T2. ⦃G,L,T⦄ >[h] ⦃G2,L2,T2⦄ →
+                       ∀G1,L1,T1. ⦃G1,L1,T1⦄ ≛ ⦃G,L,T⦄ → ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄.
+#h #G #G2 #L #L2 #T #T2 * #G0 #L0 #T0 #H0 #H02 #G1 #L1 #T1 #H1
 elim (fdeq_fpb_trans …  H1 … H0) -G -L -T
 /4 width=9 by fpbs_strap2, fpbq_fdeq, ex2_3_intro/
 qed-.
 
 (* Properties with parallel proper rst-reduction on closures ****************)
 
-lemma fpb_fpbg_trans: ∀h,o,G1,G,G2,L1,L,L2,T1,T,T2.
-                      ⦃G1, L1, T1⦄ ≻[h, o] ⦃G, L, T⦄ → ⦃G, L, T⦄ >[h, o] ⦃G2, L2, T2⦄ →
-                      ⦃G1, L1, T1⦄ >[h, o] ⦃G2, L2, T2⦄.
+lemma fpb_fpbg_trans: ∀h,G1,G,G2,L1,L,L2,T1,T,T2.
+                      ⦃G1,L1,T1⦄ ≻[h] ⦃G,L,T⦄ → ⦃G,L,T⦄ >[h] ⦃G2,L2,T2⦄ →
+                      ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄.
 /3 width=5 by fpbg_fwd_fpbs, ex2_3_intro/ qed-.
 
 (* Properties with parallel rst-reduction on closures ***********************)
 
-lemma fpbq_fpbg_trans: ∀h,o,G1,G,G2,L1,L,L2,T1,T,T2.
-                       ⦃G1, L1, T1⦄ ≽[h, o] ⦃G, L, T⦄ → ⦃G, L, T⦄ >[h, o] ⦃G2, L2, T2⦄ →
-                       ⦃G1, L1, T1⦄ >[h, o] ⦃G2, L2, T2⦄.
-#h #o #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2
+lemma fpbq_fpbg_trans: ∀h,G1,G,G2,L1,L,L2,T1,T,T2.
+                       ⦃G1,L1,T1⦄ ≽[h] ⦃G,L,T⦄ → ⦃G,L,T⦄ >[h] ⦃G2,L2,T2⦄ →
+                       ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄.
+#h #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2
 elim (fpbq_inv_fpb … H1) -H1
 /2 width=5 by fdeq_fpbg_trans, fpb_fpbg_trans/
 qed-.
 
 (* Properties with parallel rst-compuutation on closures ********************)
 
-lemma fpbs_fpbg_trans: ∀h,o,G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G, L, T⦄ →
-                       ∀G2,L2,T2. ⦃G, L, T⦄ >[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ >[h, o] ⦃G2, L2, T2⦄.
-#h #o #G1 #G #L1 #L #T1 #T #H @(fpbs_ind … H) -G -L -T /3 width=5 by fpbq_fpbg_trans/
+lemma fpbs_fpbg_trans: ∀h,G1,G,L1,L,T1,T. ⦃G1,L1,T1⦄ ≥[h] ⦃G,L,T⦄ →
+                       ∀G2,L2,T2. ⦃G,L,T⦄ >[h] ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄.
+#h #G1 #G #L1 #L #T1 #T #H @(fpbs_ind … H) -G -L -T /3 width=5 by fpbq_fpbg_trans/
 qed-.
 
 (* Advanced properties with plus-iterated structural successor for closures *)
 
-lemma fqup_fpbg_trans (h) (o):
-      â\88\80G1,G,L1,L,T1,T. â¦\83G1,L1,T1â¦\84 â\8a\90+ ⦃G,L,T⦄ →
-      ∀G2,L2,T2. ⦃G,L,T⦄ >[h,o] ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ >[h,o] ⦃G2,L2,T2⦄.
+lemma fqup_fpbg_trans (h):
+      â\88\80G1,G,L1,L,T1,T. â¦\83G1,L1,T1â¦\84 â¬\82+ ⦃G,L,T⦄ →
+      ∀G2,L2,T2. ⦃G,L,T⦄ >[h] ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄.
 /3 width=5 by fpbs_fpbg_trans, fqup_fpbs/ qed-.
 
 (* Advanced inversion lemmas of parallel rst-computation on closures ********)
 
 (* Basic_2A1: was: fpbs_fpbg *)
-lemma fpbs_inv_fpbg: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ →
-                     ∨∨ ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄
-                      | ⦃G1, L1, T1⦄ >[h, o] ⦃G2, L2, T2⦄.
-#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind … H) -G2 -L2 -T2
+lemma fpbs_inv_fpbg: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄ →
+                     ∨∨ ⦃G1,L1,T1⦄ ≛ ⦃G2,L2,T2⦄
+                      | ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄.
+#h #G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind … H) -G2 -L2 -T2
 [ /2 width=1 by or_introl/
 | #G #G2 #L #L2 #T #T2 #_ #H2 * #H1
   elim (fpbq_inv_fpb … H2) -H2 #H2
@@ -89,10 +89,10 @@ qed-.
 
 (* Advanced properties of parallel rst-computation on closures **************)
 
-lemma fpbs_fpb_trans: ∀h,o,F1,F2,K1,K2,T1,T2. ⦃F1, K1, T1⦄ ≥[h, o] ⦃F2, K2, T2⦄ →
-                      ∀G2,L2,U2. ⦃F2, K2, T2⦄ ≻[h, o] ⦃G2, L2, U2⦄ →
-                      ∃∃G1,L1,U1. ⦃F1, K1, T1⦄ ≻[h, o] ⦃G1, L1, U1⦄ & ⦃G1, L1, U1⦄ ≥[h, o] ⦃G2, L2, U2⦄.
-#h #o #F1 #F2 #K1 #K2 #T1 #T2 #H elim (fpbs_inv_fpbg … H) -H
+lemma fpbs_fpb_trans: ∀h,F1,F2,K1,K2,T1,T2. ⦃F1,K1,T1⦄ ≥[h] ⦃F2,K2,T2⦄ →
+                      ∀G2,L2,U2. ⦃F2,K2,T2⦄ ≻[h] ⦃G2,L2,U2⦄ →
+                      ∃∃G1,L1,U1. ⦃F1,K1,T1⦄ ≻[h] ⦃G1,L1,U1⦄ & ⦃G1,L1,U1⦄ ≥[h] ⦃G2,L2,U2⦄.
+#h #F1 #F2 #K1 #K2 #T1 #T2 #H elim (fpbs_inv_fpbg … H) -H
 [ #H12 #G2 #L2 #U2 #H2 elim (fdeq_fpb_trans … H12 … H2) -F2 -K2 -T2
   /3 width=5 by fdeq_fpbs, ex2_3_intro/
 | * #H1 #H2 #H3 #H4 #H5 #H6 #H7 #H8 #H9
index ce02c890aa3a096ad3b30a74ce42bb50d3ad4ff8..746aa695379d1a84b61276a50fb48f9a893b6f06 100644 (file)
@@ -17,16 +17,16 @@ include "basic_2/rt_computation/fpbg.ma".
 
 (* PROPER PARALLEL RST-COMPUTATION FOR CLOSURES *****************************)
 
-(* Advanced properties with degree-based equivalence for terms **************)
+(* Advanced properties with sort-irrelevant equivalence for terms ***********)
 
-lemma fpbg_tdeq_div: ∀h,o,G1,G2,L1,L2,T1,T. ⦃G1, L1, T1⦄ >[h, o] ⦃G2, L2, T⦄ →
-                     ∀T2. T2 ≛[h, o] T → ⦃G1, L1, T1⦄ >[h, o] ⦃G2, L2, T2⦄.
+lemma fpbg_tdeq_div: ∀h,G1,G2,L1,L2,T1,T. ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T⦄ →
+                     ∀T2. T2 ≛ T → ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄.
 /4 width=5 by fpbg_fdeq_trans, tdeq_fdeq, tdeq_sym/ qed-.
 
 (* Properties with plus-iterated structural successor for closures **********)
 
 (* Note: this is used in the closure proof *)
-lemma fqup_fpbg: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ >[h, o] ⦃G2, L2, T2⦄.
-#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H elim (fqup_inv_step_sn … H) -H
+lemma fqup_fpbg: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂+ ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄.
+#h #G1 #G2 #L1 #L2 #T1 #T2 #H elim (fqup_inv_step_sn … H) -H
 /3 width=5 by fqus_fpbs, fpb_fqu, ex2_3_intro/
 qed.
index 71dcdc50aa5701cb2ef7ed0b01327e1ac687df53..0921a5e123e09f5bed0f2ccb710e942fc92f4cb9 100644 (file)
@@ -20,9 +20,9 @@ include "basic_2/rt_computation/fpbg.ma".
 (* Properties with unbound rt-computation on full local environments ********)
 
 (* Basic_2A1: uses: lpxs_fpbg *)
-lemma lpxs_rdneq_fpbg: ∀h,o,G,L1,L2,T. ⦃G, L1⦄ ⊢ ⬈*[h] L2 →
-                       (L1 ≛[h, o, T] L2 → ⊥) → ⦃G, L1, T⦄ >[h, o] ⦃G, L2, T⦄.
-#h #o #G #L1 #L2 #T #H #H0
+lemma lpxs_rdneq_fpbg: ∀h,G,L1,L2,T. ⦃G,L1⦄ ⊢ ⬈*[h] L2 →
+                       (L1 ≛[T] L2 → ⊥) → ⦃G,L1,T⦄ >[h] ⦃G,L2,T⦄.
+#h #G #L1 #L2 #T #H #H0
 elim (lpxs_rdneq_inv_step_sn … H … H0) -H -H0
 /4 width=7 by fpb_lpx, lpxs_fdeq_fpbs, fdeq_intro_sn, ex2_3_intro/
 qed.
index f5c9176b0ba3acbf9b12455e4c3fb152aa393021..9d6f5c2801c0cd12f1ec64ad7e491630bb4739c1 100644 (file)
 (**************************************************************************)
 
 include "ground_2/lib/star.ma".
-include "basic_2/notation/relations/predsubtystar_8.ma".
+include "basic_2/notation/relations/predsubtystar_7.ma".
 include "basic_2/rt_transition/fpbq.ma".
 
 (* PARALLEL RST-COMPUTATION FOR CLOSURES ************************************)
 
-definition fpbs: ∀h. sd h → tri_relation genv lenv term ≝
-                 λh,o. tri_TC … (fpbq h o).
+definition fpbs: ∀h. tri_relation genv lenv term ≝
+                 λh. tri_TC … (fpbq h).
 
 interpretation "parallel rst-computation (closure)"
-   'PRedSubTyStar  h o G1 L1 T1 G2 L2 T2 = (fpbs h o G1 L1 T1 G2 L2 T2).
+   'PRedSubTyStar  h G1 L1 T1 G2 L2 T2 = (fpbs h G1 L1 T1 G2 L2 T2).
 
 (* Basic eliminators ********************************************************)
 
-lemma fpbs_ind: ∀h,o,G1,L1,T1. ∀Q:relation3 genv lenv term. Q G1 L1 T1 →
-                (∀G,G2,L,L2,T,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G, L, T⦄ → ⦃G, L, T⦄ ≽[h, o] ⦃G2, L2, T2⦄ → Q G L T → Q G2 L2 T2) →
-                ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ → Q G2 L2 T2.
+lemma fpbs_ind: ∀h,G1,L1,T1. ∀Q:relation3 genv lenv term. Q G1 L1 T1 →
+                (∀G,G2,L,L2,T,T2. ⦃G1,L1,T1⦄ ≥[h] ⦃G,L,T⦄ → ⦃G,L,T⦄ ≽[h] ⦃G2,L2,T2⦄ → Q G L T → Q G2 L2 T2) →
+                ∀G2,L2,T2. ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄ → Q G2 L2 T2.
 /3 width=8 by tri_TC_star_ind/ qed-.
 
-lemma fpbs_ind_dx: ∀h,o,G2,L2,T2. ∀Q:relation3 genv lenv term. Q G2 L2 T2 →
-                   (∀G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≽[h, o] ⦃G, L, T⦄ → ⦃G, L, T⦄ ≥[h, o] ⦃G2, L2, T2⦄ → Q G L T → Q G1 L1 T1) →
-                   ∀G1,L1,T1. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ → Q G1 L1 T1.
+lemma fpbs_ind_dx: ∀h,G2,L2,T2. ∀Q:relation3 genv lenv term. Q G2 L2 T2 →
+                   (∀G1,G,L1,L,T1,T. ⦃G1,L1,T1⦄ ≽[h] ⦃G,L,T⦄ → ⦃G,L,T⦄ ≥[h] ⦃G2,L2,T2⦄ → Q G L T → Q G1 L1 T1) →
+                   ∀G1,L1,T1. ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄ → Q G1 L1 T1.
 /3 width=8 by tri_TC_star_ind_dx/ qed-.
 
 (* Basic properties *********************************************************)
 
-lemma fpbs_refl: ∀h,o. tri_reflexive … (fpbs h o).
+lemma fpbs_refl: ∀h. tri_reflexive … (fpbs h).
 /2 width=1 by tri_inj/ qed.
 
-lemma fpbq_fpbs: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≽[h, o] ⦃G2, L2, T2⦄ →
-                 ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
+lemma fpbq_fpbs: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ≽[h] ⦃G2,L2,T2⦄ →
+                 ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
 /2 width=1 by tri_inj/ qed.
 
-lemma fpbs_strap1: ∀h,o,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G, L, T⦄ →
-                   ⦃G, L, T⦄ ≽[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
+lemma fpbs_strap1: ∀h,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1,L1,T1⦄ ≥[h] ⦃G,L,T⦄ →
+                   ⦃G,L,T⦄ ≽[h] ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
 /2 width=5 by tri_step/ qed-.
 
-lemma fpbs_strap2: ∀h,o,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ≽[h, o] ⦃G, L, T⦄ →
-                   ⦃G, L, T⦄ ≥[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
+lemma fpbs_strap2: ∀h,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1,L1,T1⦄ ≽[h] ⦃G,L,T⦄ →
+                   ⦃G,L,T⦄ ≥[h] ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
 /2 width=5 by tri_TC_strap/ qed-.
 
 (* Basic_2A1: uses: lleq_fpbs fleq_fpbs *)
-lemma fdeq_fpbs: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
+lemma fdeq_fpbs: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ≛ ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
 /3 width=1 by fpbq_fpbs, fpbq_fdeq/ qed.
 
 (* Basic_2A1: uses: fpbs_lleq_trans *)
-lemma fpbs_fdeq_trans: ∀h,o,G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G, L, T⦄ →
-                       ∀G2,L2,T2. ⦃G, L, T⦄ ≛[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
+lemma fpbs_fdeq_trans: ∀h,G1,G,L1,L,T1,T. ⦃G1,L1,T1⦄ ≥[h] ⦃G,L,T⦄ →
+                       ∀G2,L2,T2. ⦃G,L,T⦄ ≛ ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
 /3 width=9 by fpbs_strap1, fpbq_fdeq/ qed-.
 
 (* Basic_2A1: uses: lleq_fpbs_trans *)
-lemma fdeq_fpbs_trans: ∀h,o,G,G2,L,L2,T,T2. ⦃G, L, T⦄ ≥[h, o] ⦃G2, L2, T2⦄ →
-                       ∀G1,L1,T1. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G, L, T⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
+lemma fdeq_fpbs_trans: ∀h,G,G2,L,L2,T,T2. ⦃G,L,T⦄ ≥[h] ⦃G2,L2,T2⦄ →
+                       ∀G1,L1,T1. ⦃G1,L1,T1⦄ ≛ ⦃G,L,T⦄ → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
 /3 width=5 by fpbs_strap2, fpbq_fdeq/ qed-.
 
-lemma tdeq_rdeq_lpx_fpbs: ∀h,o,T1,T2. T1 ≛[h, o] T2 → ∀L1,L0. L1 ≛[h, o, T2] L0 →
-                          ∀G,L2. ⦃G, L0⦄ ⊢ ⬈[h] L2 → ⦃G, L1, T1⦄ ≥[h, o] ⦃G, L2, T2⦄.
+lemma tdeq_rdeq_lpx_fpbs: ∀h,T1,T2. T1 ≛ T2 → ∀L1,L0. L1 ≛[T2] L0 →
+                          ∀G,L2. ⦃G,L0⦄ ⊢ ⬈[h] L2 → ⦃G,L1,T1⦄ ≥[h] ⦃G,L2,T2⦄.
 /4 width=5 by fdeq_fpbs, fpbs_strap1, fpbq_lpx, fdeq_intro_dx/ qed.
 
 (* Basic_2A1: removed theorems 3:
index 601758e03de828ac2ceabfbadcff225ff9d5bca2..9d27bacb8afa3a63bc9028b493353d5a57a5fd51 100644 (file)
@@ -19,9 +19,9 @@ include "basic_2/rt_computation/fpbs.ma".
 
 (* Properties with atomic arity assignment for terms ************************)
 
-lemma fpbs_aaa_conf: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ →
-                     ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2.
-#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind … H) -G2 -L2 -T2 /2 width=2 by ex_intro/
+lemma fpbs_aaa_conf: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄ →
+                     ∀A1. ⦃G1,L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2,L2⦄ ⊢ T2 ⁝ A2.
+#h #G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind … H) -G2 -L2 -T2 /2 width=2 by ex_intro/
 #G #G2 #L #L2 #T #T2 #_ #H2 #IH1 #A #HA elim (IH1 … HA) -IH1 -A
 /2 width=8 by fpbq_aaa_conf/
 qed-.
index c3cdaf038300adf182435d7c6f27a4c9ad6ba15e..5dd4e537859d5b530c56b76a397522a0ac2f530e 100644 (file)
@@ -21,18 +21,18 @@ include "basic_2/rt_computation/fpbs_lpxs.ma".
 (* Properties with unbound context-sensitive parallel rt-transition *********)
 
 (* Basic_2A1: uses: fpbs_cpx_trans_neq *)
-lemma fpbs_cpx_tdneq_trans: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ →
-                            ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 → (T2 ≛[h, o] U2 → ⊥) →
-                            ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & T1 ≛[h, o] U1 → ⊥ & ⦃G1, L1, U1⦄ ≥[h, o] ⦃G2, L2, U2⦄.
-#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 #HnTU2
+lemma fpbs_cpx_tdneq_trans: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄ →
+                            ∀U2. ⦃G2,L2⦄ ⊢ T2 ⬈[h] U2 → (T2 ≛ U2 → ⊥) →
+                            ∃∃U1. ⦃G1,L1⦄ ⊢ T1 ⬈[h] U1 & T1 ≛ U1 → ⊥ & ⦃G1,L1,U1⦄ ≥[h] ⦃G2,L2,U2⦄.
+#h #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 (fdeq_cpx_trans … H32 … HTU2) -HTU2 #T4 #HT34 #H42
 lapply (fdeq_tdneq_repl_dx … H32 … H42 … HnTU2) -T2 #HnT34
 lapply (lpxs_cpx_trans … HT34 … HL03) -HT34 #HT34
 elim (fqus_cpxs_trans_tdneq … H10 … HT34 HnT34) -T3 #T2 #HT02 #HnT02 #H24
-elim (tdeq_dec h o T1 T0) [ #H10 | -HnT02 #HnT10 ]
+elim (tdeq_dec T1 T0) [ #H10 | -HnT02 #HnT10 ]
 [ lapply (cpxs_trans … HT10 … HT02) -HT10 -HT02 #HT12
-  elim (cpxs_tdneq_fwd_step_sn … o … HT12) [2: /3 width=3 by tdeq_canc_sn/ ] -T0 -HT12
+  elim (cpxs_tdneq_fwd_step_sn … HT12) [2: /3 width=3 by tdeq_canc_sn/ ] -T0 -HT12
 | elim (cpxs_tdneq_fwd_step_sn … HT10 … HnT10) -HT10 -HnT10
 ]
 /4 width=16 by fpbs_intro_star, cpxs_tdeq_fpbs_trans, ex3_intro/
index 4f23c0d0095759e30b7fe22eebf212f8bc76d6d8..ec1d680a817ab4e0885d70996a825db685531cce 100644 (file)
@@ -19,40 +19,40 @@ include "basic_2/rt_computation/fpbs_fqup.ma".
 
 (* Properties with unbound context-sensitive parallel rt-computation ********)
 
-lemma cpxs_fpbs: ∀h,o,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 → ⦃G, L, T1⦄ ≥[h, o] ⦃G, L, T2⦄.
-#h #o #G #L #T1 #T2 #H @(cpxs_ind … H) -T2
+lemma cpxs_fpbs: ∀h,G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 → ⦃G,L,T1⦄ ≥[h] ⦃G,L,T2⦄.
+#h #G #L #T1 #T2 #H @(cpxs_ind … H) -T2
 /3 width=5 by fpbq_cpx, fpbs_strap1/
 qed.
 
-lemma fpbs_cpxs_trans: ∀h,o,G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G, L, T⦄ →
-                       ∀T2. ⦃G, L⦄ ⊢ T ⬈*[h] T2 → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G, L, T2⦄.
-#h #o #G1 #G #L1 #L #T1 #T #H1 #T2 #H @(cpxs_ind … H) -T2
+lemma fpbs_cpxs_trans: ∀h,G1,G,L1,L,T1,T. ⦃G1,L1,T1⦄ ≥[h] ⦃G,L,T⦄ →
+                       ∀T2. ⦃G,L⦄ ⊢ T ⬈*[h] T2 → ⦃G1,L1,T1⦄ ≥[h] ⦃G,L,T2⦄.
+#h #G1 #G #L1 #L #T1 #T #H1 #T2 #H @(cpxs_ind … H) -T2
 /3 width=5 by fpbs_strap1, fpbq_cpx/
 qed-.
 
-lemma cpxs_fpbs_trans: ∀h,o,G1,G2,L1,L2,T,T2. ⦃G1, L1, T⦄ ≥[h, o] ⦃G2, L2, T2⦄ →
-                       ∀T1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] T → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
-#h #o #G1 #G2 #L1 #L2 #T #T2 #H1 #T1 #H @(cpxs_ind_dx … H) -T1
+lemma cpxs_fpbs_trans: ∀h,G1,G2,L1,L2,T,T2. ⦃G1,L1,T⦄ ≥[h] ⦃G2,L2,T2⦄ →
+                       ∀T1. ⦃G1,L1⦄ ⊢ T1 ⬈*[h] T → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
+#h #G1 #G2 #L1 #L2 #T #T2 #H1 #T1 #H @(cpxs_ind_dx … H) -T1
 /3 width=5 by fpbs_strap2, fpbq_cpx/
 qed-.
 
-lemma cpxs_tdeq_fpbs_trans: ∀h,o,G1,L1,T1,T. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] T →
-                            ∀T0. T ≛[h, o] T0 →
-                            ∀G2,L2,T2. ⦃G1, L1, T0⦄ ≥[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
+lemma cpxs_tdeq_fpbs_trans: ∀h,G1,L1,T1,T. ⦃G1,L1⦄ ⊢ T1 ⬈*[h] T →
+                            ∀T0. T ≛ T0 →
+                            ∀G2,L2,T2. ⦃G1,L1,T0⦄ ≥[h] ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
 /3 width=3 by cpxs_fpbs_trans, tdeq_fpbs_trans/ qed-.
 
-lemma cpxs_tdeq_fpbs: ∀h,o,G,L,T1,T. ⦃G, L⦄ ⊢ T1 ⬈*[h] T →
-                      ∀T2. T ≛[h, o] T2 → ⦃G, L, T1⦄ ≥[h, o] ⦃G, L, T2⦄.
+lemma cpxs_tdeq_fpbs: ∀h,G,L,T1,T. ⦃G,L⦄ ⊢ T1 ⬈*[h] T →
+                      ∀T2. T ≛ T2 → ⦃G,L,T1⦄ ≥[h] ⦃G,L,T2⦄.
 /4 width=3 by cpxs_fpbs_trans, fdeq_fpbs, tdeq_fdeq/ qed.
 
 (* Properties with star-iterated structural successor for closures **********)
 
-lemma cpxs_fqus_fpbs: ∀h,o,G1,L1,T1,T. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] T →
-                      ∀G2,L2,T2. ⦃G1, L1, T⦄ ⊐* ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
+lemma cpxs_fqus_fpbs: ∀h,G1,L1,T1,T. ⦃G1,L1⦄ ⊢ T1 ⬈*[h] T →
+                      ∀G2,L2,T2. ⦃G1,L1,T⦄ ⬂* ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
 /3 width=5 by fpbs_fqus_trans, cpxs_fpbs/ qed.
 
 (* Properties with plus-iterated structural successor for closures **********)
 
-lemma cpxs_fqup_fpbs: ∀h,o,G1,L1,T1,T. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] T →
-                      ∀G2,L2,T2. ⦃G1, L1, T⦄ ⊐+ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
+lemma cpxs_fqup_fpbs: ∀h,G1,L1,T1,T. ⦃G1,L1⦄ ⊢ T1 ⬈*[h] T →
+                      ∀G2,L2,T2. ⦃G1,L1,T⦄ ⬂+ ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
 /3 width=5 by fpbs_fqup_trans, cpxs_fpbs/ qed.
index ce44e7e7bb20687d5374f380db3852294db97f6a..583f5e31f27367dc6884c60949b8e51de5cf9a38 100644 (file)
@@ -20,8 +20,8 @@ include "basic_2/rt_computation/fpbs.ma".
 (* Properties with sn for unbound parallel rt-transition for terms **********)
 
 (* Basic_2A1: was: csx_fpbs_conf *)
-lemma fpbs_csx_conf: ∀h,o,G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄ →
-                     ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ → ⦃G2, L2⦄ ⊢ ⬈*[h, o] 𝐒⦃T2⦄.
-#h #o #G1 #L1 #T1 #HT1 #G2 #L2 #T2 #H @(fpbs_ind … H) -G2 -L2 -T2
+lemma fpbs_csx_conf: ∀h,G1,L1,T1. ⦃G1,L1⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ →
+                     ∀G2,L2,T2. ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄ → ⦃G2,L2⦄ ⊢ ⬈*[h] 𝐒⦃T2⦄.
+#h #G1 #L1 #T1 #HT1 #G2 #L2 #T2 #H @(fpbs_ind … H) -G2 -L2 -T2
 /2 width=5 by csx_fpbq_conf/
 qed-.
index 632fe7dc6d656672c7727201a3ecd5f5cec83325..428644da82247a3ab3b8c238a4ae9ab8f7e33058 100644 (file)
@@ -19,6 +19,6 @@ include "basic_2/rt_computation/fpbs.ma".
 
 (* Properties with proper parallel rst-reduction on closures ****************)
 
-lemma fpb_fpbs: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, o] ⦃G2, L2, T2⦄ →
-                ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
+lemma fpb_fpbs: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ≻[h] ⦃G2,L2,T2⦄ →
+                ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
 /3 width=1 by fpbq_fpbs, fpb_fpbq/ qed.
index 12d5d8de6b779b86b1ef38c03f297d50b9855c1f..6e75949fc07b855c5532624a4518f72e0d2d3190 100644 (file)
@@ -18,5 +18,5 @@ include "basic_2/rt_computation/fpbs.ma".
 
 (* Main properties **********************************************************)
 
-theorem fpbs_trans: ∀h,o. tri_transitive … (fpbs h o).
+theorem fpbs_trans: ∀h. tri_transitive … (fpbs h).
 /2 width=5 by tri_TC_transitive/ qed-.
index b625f889bb16a308b9888043d337b21e13656b04..4a970e58b3d769478556301c9b4521a63fb2a9a7 100644 (file)
@@ -20,26 +20,26 @@ include "basic_2/rt_computation/fpbs_fqus.ma".
 
 (* Advanced properties ******************************************************)
 
-lemma tdeq_fpbs_trans: ∀h,o,T1,T. T1 ≛[h, o] T →
-                       ∀G1,G2,L1,L2,T2. ⦃G1, L1, T⦄ ≥[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
+lemma tdeq_fpbs_trans: ∀h,T1,T. T1 ≛ T →
+                       ∀G1,G2,L1,L2,T2. ⦃G1,L1,T⦄ ≥[h] ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
 /3 width=5 by fdeq_fpbs_trans, tdeq_fdeq/ qed-.
 
-lemma fpbs_tdeq_trans: ∀h,o,G1,G2,L1,L2,T1,T. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T⦄ →
-                       ∀T2. T ≛[h, o] T2 →  ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
+lemma fpbs_tdeq_trans: ∀h,G1,G2,L1,L2,T1,T. ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T⦄ →
+                       ∀T2. T ≛ T2 →  ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
 /3 width=5 by fpbs_fdeq_trans, tdeq_fdeq/ qed-.
 
 (* Properties with plus-iterated structural successor for closures **********)
 
-lemma fqup_fpbs: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ →
-                 ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
-#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 
+lemma fqup_fpbs: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂+ ⦃G2,L2,T2⦄ →
+                 ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
+#h #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 
 /4 width=5 by fqu_fquq, fpbq_fquq, tri_step/
 qed.
 
-lemma fpbs_fqup_trans: ∀h,o,G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G, L, T⦄ →
-                       ∀G2,L2,T2. ⦃G, L, T⦄ ⊐+ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
+lemma fpbs_fqup_trans: ∀h,G1,G,L1,L,T1,T. ⦃G1,L1,T1⦄ ≥[h] ⦃G,L,T⦄ →
+                       ∀G2,L2,T2. ⦃G,L,T⦄ ⬂+ ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
 /3 width=5 by fpbs_fqus_trans, fqup_fqus/ qed-.
 
-lemma fqup_fpbs_trans: ∀h,o,G,G2,L,L2,T,T2. ⦃G, L, T⦄ ≥[h, o] ⦃G2, L2, T2⦄ →
-                       ∀G1,L1,T1. ⦃G1, L1, T1⦄ ⊐+ ⦃G, L, T⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
+lemma fqup_fpbs_trans: ∀h,G,G2,L,L2,T,T2. ⦃G,L,T⦄ ≥[h] ⦃G2,L2,T2⦄ →
+                       ∀G1,L1,T1. ⦃G1,L1,T1⦄ ⬂+ ⦃G,L,T⦄ → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
 /3 width=5 by fqus_fpbs_trans, fqup_fqus/ qed-.
index db3925f7125d1103c1bcd409982ea8b70286d266..3f1e06fabc2f9fc698938781bfe6b36bd619e330 100644 (file)
@@ -19,20 +19,20 @@ include "basic_2/rt_computation/fpbs.ma".
 
 (* Properties with star-iterated structural successor for closures **********)
 
-lemma fqus_fpbs: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ →
-                 ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
-#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -G2 -L2 -T2
+lemma fqus_fpbs: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂* ⦃G2,L2,T2⦄ →
+                 ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
+#h #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -G2 -L2 -T2
 /3 width=5 by fpbq_fquq, tri_step/
 qed.
 
-lemma fpbs_fqus_trans: ∀h,o,G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G, L, T⦄ →
-                       ∀G2,L2,T2. ⦃G, L, T⦄ ⊐* ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
-#h #o #G1 #G #L1 #L #T1 #T #H1 #G2 #L2 #T2 #H @(fqus_ind … H) -G2 -L2 -T2
+lemma fpbs_fqus_trans: ∀h,G1,G,L1,L,T1,T. ⦃G1,L1,T1⦄ ≥[h] ⦃G,L,T⦄ →
+                       ∀G2,L2,T2. ⦃G,L,T⦄ ⬂* ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
+#h #G1 #G #L1 #L #T1 #T #H1 #G2 #L2 #T2 #H @(fqus_ind … H) -G2 -L2 -T2
 /3 width=5 by fpbs_strap1, fpbq_fquq/
 qed-.
 
-lemma fqus_fpbs_trans: ∀h,o,G,G2,L,L2,T,T2. ⦃G, L, T⦄ ≥[h, o] ⦃G2, L2, T2⦄ →
-                       ∀G1,L1,T1. ⦃G1, L1, T1⦄ ⊐* ⦃G, L, T⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
-#h #o #G #G2 #L #L2 #T #T2 #H1 #G1 #L1 #T1 #H @(fqus_ind_dx … H) -G1 -L1 -T1
+lemma fqus_fpbs_trans: ∀h,G,G2,L,L2,T,T2. ⦃G,L,T⦄ ≥[h] ⦃G2,L2,T2⦄ →
+                       ∀G1,L1,T1. ⦃G1,L1,T1⦄ ⬂* ⦃G,L,T⦄ → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
+#h #G #G2 #L #L2 #T #T2 #H1 #G1 #L1 #T1 #H @(fqus_ind_dx … H) -G1 -L1 -T1
 /3 width=5 by fpbs_strap2, fpbq_fquq/
 qed-.
index 2760e2a338e72cd8d351f50e03a5780d9ea5dff4..d3b96eb96795631c9fe2352629abeae1c13eeb9f 100644 (file)
@@ -23,50 +23,50 @@ include "basic_2/rt_computation/fpbs_cpxs.ma".
 
 (* Properties with unbound rt-computation on full local environments  *******)
 
-lemma lpxs_fpbs: ∀h,o,G,L1,L2,T. ⦃G, L1⦄ ⊢ ⬈*[h] L2 → ⦃G, L1, T⦄ ≥[h, o] ⦃G, L2, T⦄.
-#h #o #G #L1 #L2 #T #H @(lpxs_ind_dx … H) -L2
+lemma lpxs_fpbs: ∀h,G,L1,L2,T. ⦃G,L1⦄ ⊢ ⬈*[h] L2 → ⦃G,L1,T⦄ ≥[h] ⦃G,L2,T⦄.
+#h #G #L1 #L2 #T #H @(lpxs_ind_dx … H) -L2
 /3 width=5 by fpbq_lpx, fpbs_strap1/
 qed.
 
-lemma fpbs_lpxs_trans: ∀h,o,G1,G2,L1,L,T1,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L, T2⦄ →
-                       ∀L2. ⦃G2, L⦄ ⊢ ⬈*[h] L2 → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
-#h #o #G1 #G2 #L1 #L #T1 #T2 #H1 #L2 #H @(lpxs_ind_dx … H) -L2
+lemma fpbs_lpxs_trans: ∀h,G1,G2,L1,L,T1,T2. ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L,T2⦄ →
+                       ∀L2. ⦃G2,L⦄ ⊢ ⬈*[h] L2 → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
+#h #G1 #G2 #L1 #L #T1 #T2 #H1 #L2 #H @(lpxs_ind_dx … H) -L2
 /3 width=5 by fpbs_strap1, fpbq_lpx/
 qed-.
 
-lemma lpxs_fpbs_trans: ∀h,o,G1,G2,L,L2,T1,T2. ⦃G1, L, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ →
-                       ∀L1. ⦃G1, L1⦄ ⊢ ⬈*[h] L → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
-#h #o #G1 #G2 #L #L2 #T1 #T2 #H1 #L1 #H @(lpxs_ind_sn … H) -L1
+lemma lpxs_fpbs_trans: ∀h,G1,G2,L,L2,T1,T2. ⦃G1,L,T1⦄ ≥[h] ⦃G2,L2,T2⦄ →
+                       ∀L1. ⦃G1,L1⦄ ⊢ ⬈*[h] L → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
+#h #G1 #G2 #L #L2 #T1 #T2 #H1 #L1 #H @(lpxs_ind_sn … H) -L1
 /3 width=5 by fpbs_strap2, fpbq_lpx/
 qed-.
 
 (* Basic_2A1: uses: lpxs_lleq_fpbs *)
-lemma lpxs_fdeq_fpbs: ∀h,o,G1,L1,L,T1. ⦃G1, L1⦄ ⊢ ⬈*[h] L →
-                      ∀G2,L2,T2. ⦃G1, L, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
+lemma lpxs_fdeq_fpbs: ∀h,G1,L1,L,T1. ⦃G1,L1⦄ ⊢ ⬈*[h] L →
+                      ∀G2,L2,T2. ⦃G1,L,T1⦄ ≛ ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
 /3 width=3 by lpxs_fpbs_trans, fdeq_fpbs/ qed.
 
-lemma fpbs_lpx_trans: ∀h,o,G1,G2,L1,L,T1,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L, T2⦄ →
-                      ∀L2. ⦃G2, L⦄ ⊢ ⬈[h] L2 → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
+lemma fpbs_lpx_trans: ∀h,G1,G2,L1,L,T1,T2. ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L,T2⦄ →
+                      ∀L2. ⦃G2,L⦄ ⊢ ⬈[h] L2 → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
 /3 width=3 by fpbs_lpxs_trans, lpx_lpxs/ qed-.
 
 (* Properties with star-iterated structural successor for closures **********)
 
-lemma fqus_lpxs_fpbs: ∀h,o,G1,G2,L1,L,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L, T2⦄ →
-                      ∀L2. ⦃G2, L⦄ ⊢ ⬈*[h] L2 → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
+lemma fqus_lpxs_fpbs: ∀h,G1,G2,L1,L,T1,T2. ⦃G1,L1,T1⦄ ⬂* ⦃G2,L,T2⦄ →
+                      ∀L2. ⦃G2,L⦄ ⊢ ⬈*[h] L2 → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
 /3 width=3 by fpbs_lpxs_trans, fqus_fpbs/ qed.
 
 (* Properties with unbound context-sensitive parallel rt-computation ********)
 
-lemma cpxs_fqus_lpxs_fpbs: ∀h,o,G1,L1,T1,T. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] T →
-                           ∀G2,L,T2. ⦃G1, L1, T⦄ ⊐* ⦃G2, L, T2⦄ →
-                           ∀L2.⦃G2, L⦄ ⊢ ⬈*[h] L2 → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄.
+lemma cpxs_fqus_lpxs_fpbs: ∀h,G1,L1,T1,T. ⦃G1,L1⦄ ⊢ T1 ⬈*[h] T →
+                           ∀G2,L,T2. ⦃G1,L1,T⦄ ⬂* ⦃G2,L,T2⦄ →
+                           ∀L2.⦃G2,L⦄ ⊢ ⬈*[h] L2 → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄.
 /3 width=5 by cpxs_fqus_fpbs, fpbs_lpxs_trans/ qed.
 
-lemma fpbs_cpxs_tdeq_fqup_lpx_trans: ∀h,o,G1,G3,L1,L3,T1,T3. ⦃G1, L1, T1⦄ ≥ [h, o] ⦃G3, L3, T3⦄ →
-                                     ∀T4. ⦃G3, L3⦄ ⊢ T3 ⬈*[h] T4 → ∀T5. T4 ≛[h, o] T5 →
-                                     ∀G2,L4,T2. ⦃G3, L3, T5⦄ ⊐+ ⦃G2, L4, T2⦄ →
-                                     ∀L2. ⦃G2, L4⦄ ⊢ ⬈[h] L2 → ⦃G1, L1, T1⦄ ≥ [h, o] ⦃G2, L2, T2⦄.
-#h #o #G1 #G3 #L1 #L3 #T1 #T3 #H13 #T4 #HT34 #T5 #HT45 #G2 #L4 #T2 #H34 #L2 #HL42  
+lemma fpbs_cpxs_tdeq_fqup_lpx_trans: ∀h,G1,G3,L1,L3,T1,T3. ⦃G1,L1,T1⦄ ≥ [h] ⦃G3,L3,T3⦄ →
+                                     ∀T4. ⦃G3,L3⦄ ⊢ T3 ⬈*[h] T4 → ∀T5. T4 ≛ T5 →
+                                     ∀G2,L4,T2. ⦃G3,L3,T5⦄ ⬂+ ⦃G2,L4,T2⦄ →
+                                     ∀L2. ⦃G2,L4⦄ ⊢ ⬈[h] L2 → ⦃G1,L1,T1⦄ ≥ [h] ⦃G2,L2,T2⦄.
+#h #G1 #G3 #L1 #L3 #T1 #T3 #H13 #T4 #HT34 #T5 #HT45 #G2 #L4 #T2 #H34 #L2 #HL42  
 @(fpbs_lpx_trans … HL42) -L2 (**) (* full auto too slow *)
 @(fpbs_fqup_trans … H34) -G2 -L4 -T2
 /3 width=3 by fpbs_cpxs_trans, fpbs_tdeq_trans/
@@ -75,19 +75,19 @@ qed-.
 (* Advanced properties ******************************************************)
 
 (* Basic_2A1: uses: fpbs_intro_alt *)
-lemma fpbs_intro_star: ∀h,o,G1,L1,T1,T. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] T →
-                       ∀G,L,T0. ⦃G1, L1, T⦄ ⊐* ⦃G, L, T0⦄ →
-                       ∀L0. ⦃G, L⦄ ⊢ ⬈*[h] L0 →
-                       ∀G2,L2,T2. ⦃G, L0, T0⦄ ≛[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ .
+lemma fpbs_intro_star: ∀h,G1,L1,T1,T. ⦃G1,L1⦄ ⊢ T1 ⬈*[h] T →
+                       ∀G,L,T0. ⦃G1,L1,T⦄ ⬂* ⦃G,L,T0⦄ →
+                       ∀L0. ⦃G,L⦄ ⊢ ⬈*[h] L0 →
+                       ∀G2,L2,T2. ⦃G,L0,T0⦄ ≛ ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄ .
 /3 width=5 by cpxs_fqus_lpxs_fpbs, fpbs_strap1, fpbq_fdeq/ qed.
 
 (* Advanced inversion lemmas *************************************************)
 
 (* Basic_2A1: uses: fpbs_inv_alt *)
-lemma fpbs_inv_star: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ →
-                     ∃∃G,L,L0,T,T0. ⦃G1, L1⦄ ⊢ T1 ⬈*[h] T & ⦃G1, L1, T⦄ ⊐* ⦃G, L, T0⦄
-                                  & ⦃G, L⦄ ⊢ ⬈*[h] L0 & ⦃G, L0, T0⦄ ≛[h, o] ⦃G2, L2, T2⦄.
-#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind_dx … H) -G1 -L1 -T1
+lemma fpbs_inv_star: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄ →
+                     ∃∃G,L,L0,T,T0. ⦃G1,L1⦄ ⊢ T1 ⬈*[h] T & ⦃G1,L1,T⦄ ⬂* ⦃G,L,T0⦄
+                                  & ⦃G,L⦄ ⊢ ⬈*[h] L0 & ⦃G,L0,T0⦄ ≛ ⦃G2,L2,T2⦄.
+#h #G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind_dx … H) -G1 -L1 -T1
 [ /2 width=9 by 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
index 8ae6b26e8b8e44ca793715dd43375c2b295d316b..e5a0108c3383bcfb0da418c525187851c034af1b 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/notation/relations/predsubtystrong_5.ma".
+include "basic_2/notation/relations/predsubtystrong_4.ma".
 include "basic_2/rt_transition/fpb.ma".
 
 (* STRONGLY NORMALIZING CLOSURES FOR PARALLEL RST-TRANSITION ****************)
 
-inductive fsb (h) (o): relation3 genv lenv term ≝
+inductive fsb (h): relation3 genv lenv term ≝
 | fsb_intro: ∀G1,L1,T1. (
-                ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, o] ⦃G2, L2, T2⦄ → fsb h o G2 L2 T2
-             ) → fsb h G1 L1 T1
+                ∀G2,L2,T2. ⦃G1,L1,T1⦄ ≻[h] ⦃G2,L2,T2⦄ → fsb h G2 L2 T2
+             ) → fsb h G1 L1 T1
 .
 
 interpretation
    "strong normalization for parallel rst-transition (closure)"
-   'PRedSubTyStrong h o G L T = (fsb h o G L T).
+   'PRedSubTyStrong h G L T = (fsb h G L T).
 
 (* Basic eliminators ********************************************************)
 
 (* Note: eliminator with shorter ground hypothesis *)
 (* Note: to be named fsb_ind when fsb becomes a definition like csx, lfsx ***)
-lemma fsb_ind_alt: ∀h,o. ∀Q: relation3 …. (
-                      ∀G1,L1,T1. ≥[h,o] 𝐒⦃G1, L1, T1⦄ → (
-                         ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, o] ⦃G2, L2, T2⦄ → Q G2 L2 T2
+lemma fsb_ind_alt: ∀h. ∀Q: relation3 …. (
+                      ∀G1,L1,T1. ≥[h] 𝐒⦃G1,L1,T1⦄ → (
+                         ∀G2,L2,T2. ⦃G1,L1,T1⦄ ≻[h] ⦃G2,L2,T2⦄ → Q G2 L2 T2
                       ) → Q G1 L1 T1
                    ) →
-                   ∀G,L,T. ≥[h, o] 𝐒⦃G, L, T⦄ →  Q G L T.
-#h #o #Q #IH #G #L #T #H elim H -G -L -T
+                   ∀G,L,T. ≥[h] 𝐒⦃G,L,T⦄ →  Q G L T.
+#h #Q #IH #G #L #T #H elim H -G -L -T
 /4 width=1 by fsb_intro/
 qed-.
 
index 43eb814dc017629381af95a5c8a8bc960e238239..b95c6ced6f27940cee4ca3a022484537d759e059 100644 (file)
@@ -21,48 +21,47 @@ include "basic_2/rt_computation/fsb_csx.ma".
 
 (* Main properties with atomic arity assignment for terms *******************)
 
-(* Note: this is the "big tree" theorem *)
-theorem aaa_fsb: ∀h,o,G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ≥[h, o] 𝐒⦃G, L, T⦄.
+theorem aaa_fsb: ∀h,G,L,T,A. ⦃G,L⦄ ⊢ T ⁝ A → ≥[h] 𝐒⦃G,L,T⦄.
 /3 width=2 by aaa_csx, csx_fsb/ qed.
 
 (* Advanced eliminators with atomic arity assignment for terms **************)
 
-fact aaa_ind_fpb_aux: ∀h,o. ∀Q:relation3 ….
-                      (∀G1,L1,T1,A. ⦃G1, L1⦄ ⊢ T1 ⁝ A →
-                                    (∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, o] ⦃G2, L2, T2⦄ → Q G2 L2 T2) →
+fact aaa_ind_fpb_aux: ∀h. ∀Q:relation3 ….
+                      (∀G1,L1,T1,A. ⦃G1,L1⦄ ⊢ T1 ⁝ A →
+                                    (∀G2,L2,T2. ⦃G1,L1,T1⦄ ≻[h] ⦃G2,L2,T2⦄ → Q G2 L2 T2) →
                                     Q G1 L1 T1
                       ) →
-                      ∀G,L,T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ → ∀A. ⦃G, L⦄ ⊢ T ⁝ A →  Q G L T.
-#h #o #R #IH #G #L #T #H @(csx_ind_fpb … H) -G -L -T
+                      ∀G,L,T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ → ∀A. ⦃G,L⦄ ⊢ T ⁝ A →  Q G L T.
+#h #R #IH #G #L #T #H @(csx_ind_fpb … H) -G -L -T
 #G1 #L1 #T1 #H1 #IH1 #A1 #HTA1 @IH -IH //
-#G2 #L2 #T2 #H12 elim (fpbs_aaa_conf h o … G2 … L2 … T2 … HTA1) -A1
+#G2 #L2 #T2 #H12 elim (fpbs_aaa_conf … G2 … L2 … T2 … HTA1) -A1
 /2 width=2 by fpb_fpbs/
 qed-.
 
-lemma aaa_ind_fpb: ∀h,o. ∀Q:relation3 ….
-                   (∀G1,L1,T1,A. ⦃G1, L1⦄ ⊢ T1 ⁝ A →
-                                 (∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, o] ⦃G2, L2, T2⦄ → Q G2 L2 T2) →
+lemma aaa_ind_fpb: ∀h. ∀Q:relation3 ….
+                   (∀G1,L1,T1,A. ⦃G1,L1⦄ ⊢ T1 ⁝ A →
+                                 (∀G2,L2,T2. ⦃G1,L1,T1⦄ ≻[h] ⦃G2,L2,T2⦄ → Q G2 L2 T2) →
                                  Q G1 L1 T1
                    ) →
-                   ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → Q G L T.
+                   ∀G,L,T,A. ⦃G,L⦄ ⊢ T ⁝ A → Q G L T.
 /4 width=4 by aaa_ind_fpb_aux, aaa_csx/ qed-.
 
-fact aaa_ind_fpbg_aux: ∀h,o. ∀Q:relation3 ….
-                       (∀G1,L1,T1,A. ⦃G1, L1⦄ ⊢ T1 ⁝ A →
-                                     (∀G2,L2,T2. ⦃G1, L1, T1⦄ >[h, o] ⦃G2, L2, T2⦄ → Q G2 L2 T2) →
+fact aaa_ind_fpbg_aux: ∀h. ∀Q:relation3 ….
+                       (∀G1,L1,T1,A. ⦃G1,L1⦄ ⊢ T1 ⁝ A →
+                                     (∀G2,L2,T2. ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄ → Q G2 L2 T2) →
                                      Q G1 L1 T1
                        ) →
-                       ∀G,L,T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ → ∀A. ⦃G, L⦄ ⊢ T ⁝ A →  Q G L T.
-#h #o #Q #IH #G #L #T #H @(csx_ind_fpbg … H) -G -L -T
+                       ∀G,L,T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ → ∀A. ⦃G,L⦄ ⊢ T ⁝ A →  Q G L T.
+#h #Q #IH #G #L #T #H @(csx_ind_fpbg … H) -G -L -T
 #G1 #L1 #T1 #H1 #IH1 #A1 #HTA1 @IH -IH //
-#G2 #L2 #T2 #H12 elim (fpbs_aaa_conf h o … G2 … L2 … T2 … HTA1) -A1
+#G2 #L2 #T2 #H12 elim (fpbs_aaa_conf … G2 … L2 … T2 … HTA1) -A1
 /2 width=2 by fpbg_fwd_fpbs/
 qed-.
 
-lemma aaa_ind_fpbg: ∀h,o. ∀Q:relation3 ….
-                    (∀G1,L1,T1,A. ⦃G1, L1⦄ ⊢ T1 ⁝ A →
-                                  (∀G2,L2,T2. ⦃G1, L1, T1⦄ >[h, o] ⦃G2, L2, T2⦄ → Q G2 L2 T2) →
+lemma aaa_ind_fpbg: ∀h. ∀Q:relation3 ….
+                    (∀G1,L1,T1,A. ⦃G1,L1⦄ ⊢ T1 ⁝ A →
+                                  (∀G2,L2,T2. ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄ → Q G2 L2 T2) →
                                   Q G1 L1 T1
                     ) →
-                    ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → Q G L T.
+                    ∀G,L,T,A. ⦃G,L⦄ ⊢ T ⁝ A → Q G L T.
 /4 width=4 by aaa_ind_fpbg_aux, aaa_csx/ qed-.
index 2746e54576ed0331401ef3290a2dcd4a84d3777c..de36632c3bc8c77fe54a1861beee440ae471f858 100644 (file)
@@ -12,7 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/rt_computation/rdsx_csx.ma".
+include "basic_2/rt_computation/rsx_csx.ma".
 include "basic_2/rt_computation/fpbs_cpx.ma".
 include "basic_2/rt_computation/fpbs_csx.ma".
 include "basic_2/rt_computation/fsb_fpbg.ma".
@@ -21,20 +21,20 @@ include "basic_2/rt_computation/fsb_fpbg.ma".
 
 (* Inversion lemmas with context-sensitive stringly rt-normalizing terms ****)
 
-lemma fsb_inv_csx: ∀h,o,G,L,T. ≥[h, o] 𝐒⦃G, L, T⦄ → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄.
-#h #o #G #L #T #H @(fsb_ind_alt … H) -G -L -T /5 width=1 by csx_intro, fpb_cpx/
+lemma fsb_inv_csx: ∀h,G,L,T. ≥[h] 𝐒⦃G,L,T⦄ → ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄.
+#h #G #L #T #H @(fsb_ind_alt … H) -G -L -T /5 width=1 by csx_intro, fpb_cpx/
 qed-.
 
 (* Propreties with context-sensitive stringly rt-normalizing terms **********)
 
-lemma csx_fsb_fpbs: ∀h,o,G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄ →
-                    ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ → ≥[h, o] 𝐒⦃G2, L2, T2⦄.
-#h #o #G1 #L1 #T1 #H @(csx_ind … H) -T1
+lemma csx_fsb_fpbs: ∀h,G1,L1,T1. ⦃G1,L1⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ →
+                    ∀G2,L2,T2. ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄ → ≥[h] 𝐒⦃G2,L2,T2⦄.
+#h #G1 #L1 #T1 #H @(csx_ind … H) -T1
 #T1 #HT1 #IHc #G2 #L2 #T2 @(fqup_wf_ind (Ⓣ) … G2 L2 T2) -G2 -L2 -T2
 #G0 #L0 #T0 #IHu #H10 
 lapply (fpbs_csx_conf … H10) // -HT1 #HT0
 generalize in match IHu; -IHu generalize in match H10; -H10
-@(rdsx_ind … (csx_rdsx … HT0)) -L0
+@(rsx_ind … (csx_rsx … HT0)) -L0
 #L0 #_ #IHd #H10 #IHu @fsb_intro
 #G2 #L2 #T2 * -G2 -L2 -T2 [ -IHd -IHc | -IHu -IHd |  ]
 [ /4 width=5 by fpbs_fqup_trans, fqu_fqup/
@@ -45,7 +45,7 @@ generalize in match IHu; -IHu generalize in match H10; -H10
   [ /3 width=3 by fpbs_lpxs_trans, lpx_lpxs/
   | #G3 #L3 #T3 #H03 #_
     elim (lpx_fqup_trans … H03 … HL02) -L2 #L4 #T4 #HT04 #H43 #HL43
-    elim (tdeq_dec h o T0 T4) [ -IHc -HT04 #HT04 | -IHu #HnT04 ]
+    elim (tdeq_dec T0 T4) [ -IHc -HT04 #HT04 | -IHu #HnT04 ]
     [ elim (tdeq_fqup_trans … H43 … HT04) -T4 #L2 #T4 #H04 #HT43 #HL24
       /4 width=7 by fsb_fpbs_trans, tdeq_rdeq_lpx_fpbs, fpbs_fqup_trans/
     | elim (cpxs_tdneq_fwd_step_sn … HT04 HnT04) -HT04 -HnT04 #T2 #T5 #HT02 #HnT02 #HT25 #HT54
@@ -56,23 +56,23 @@ generalize in match IHu; -IHu generalize in match H10; -H10
 ]
 qed.
 
-lemma csx_fsb: ∀h,o,G,L,T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ → ≥[h, o] 𝐒⦃G, L, T⦄.
+lemma csx_fsb: ∀h,G,L,T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ → ≥[h] 𝐒⦃G,L,T⦄.
 /2 width=5 by csx_fsb_fpbs/ qed.
 
 (* Advanced eliminators *****************************************************)
 
-lemma csx_ind_fpb: ∀h,o. ∀Q:relation3 genv lenv term.
-                   (∀G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄ →
-                               (∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, o] ⦃G2, L2, T2⦄ → Q G2 L2 T2) →
+lemma csx_ind_fpb: ∀h. ∀Q:relation3 genv lenv term.
+                   (∀G1,L1,T1. ⦃G1,L1⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ →
+                               (∀G2,L2,T2. ⦃G1,L1,T1⦄ ≻[h] ⦃G2,L2,T2⦄ → Q G2 L2 T2) →
                                Q G1 L1 T1
                    ) →
-                   ∀G,L,T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ →  Q G L T.
+                   ∀G,L,T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ →  Q G L T.
 /4 width=4 by fsb_inv_csx, csx_fsb, fsb_ind_alt/ qed-.
 
-lemma csx_ind_fpbg: ∀h,o. ∀Q:relation3 genv lenv term.
-                    (∀G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄ →
-                                (∀G2,L2,T2. ⦃G1, L1, T1⦄ >[h, o] ⦃G2, L2, T2⦄ → Q G2 L2 T2) →
+lemma csx_ind_fpbg: ∀h. ∀Q:relation3 genv lenv term.
+                    (∀G1,L1,T1. ⦃G1,L1⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ →
+                                (∀G2,L2,T2. ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄ → Q G2 L2 T2) →
                                 Q G1 L1 T1
                     ) →
-                    ∀G,L,T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ →  Q G L T.
+                    ∀G,L,T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ →  Q G L T.
 /4 width=4 by fsb_inv_csx, csx_fsb, fsb_ind_fpbg/ qed-.
index 271a0e47610caccbec5a3d3fdece97e2ae52604b..a24b46ffe7a19284f97d6ef498eac052a0d8d845 100644 (file)
@@ -17,11 +17,11 @@ include "basic_2/rt_computation/fsb.ma".
 
 (* STRONGLY NORMALIZING CLOSURES FOR PARALLEL RST-TRANSITION ****************)
 
-(* Properties with degree-based equivalence for closures ********************)
+(* Properties with sort-irrelevant equivalence for closures *****************)
 
-lemma fsb_fdeq_trans: ∀h,o,G1,L1,T1. ≥[h, o] 𝐒⦃G1, L1, T1⦄ →
-                      ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ → ≥[h, o] 𝐒⦃G2, L2, T2⦄.
-#h #o #G1 #L1 #T1 #H @(fsb_ind_alt … H) -G1 -L1 -T1 
+lemma fsb_fdeq_trans: ∀h,G1,L1,T1. ≥[h] 𝐒⦃G1,L1,T1⦄ →
+                      ∀G2,L2,T2. ⦃G1,L1,T1⦄ ≛ ⦃G2,L2,T2⦄ → ≥[h] 𝐒⦃G2,L2,T2⦄.
+#h #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 (fdeq_fpb_trans … H12 … H2) -G2 -L2 -T2
index cd2c4124815b517af7783d98d82d5843562fd9e7..0ebebad3aaef9fddce10d502768f9d37a032215d 100644 (file)
@@ -19,9 +19,9 @@ include "basic_2/rt_computation/fsb_fdeq.ma".
 
 (* Properties with parallel rst-computation for closures ********************)
 
-lemma fsb_fpbs_trans: ∀h,o,G1,L1,T1. ≥[h, o] 𝐒⦃G1, L1, T1⦄ →
-                      ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ → ≥[h, o] 𝐒⦃G2, L2, T2⦄.
-#h #o #G1 #L1 #T1 #H @(fsb_ind_alt … H) -G1 -L1 -T1
+lemma fsb_fpbs_trans: ∀h,G1,L1,T1. ≥[h] 𝐒⦃G1,L1,T1⦄ →
+                      ∀G2,L2,T2. ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄ → ≥[h] 𝐒⦃G2,L2,T2⦄.
+#h #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_fdeq_trans/
@@ -31,21 +31,21 @@ qed-.
 
 (* Properties with proper parallel rst-computation for closures *************)
 
-lemma fsb_intro_fpbg: ∀h,o,G1,L1,T1. (
-                         ∀G2,L2,T2. ⦃G1, L1, T1⦄ >[h, o] ⦃G2, L2, T2⦄ → ≥[h, o] 𝐒⦃G2, L2, T2⦄
-                      ) → ≥[h, o] 𝐒⦃G1, L1, T1⦄.
+lemma fsb_intro_fpbg: ∀h,G1,L1,T1. (
+                         ∀G2,L2,T2. ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄ → ≥[h] 𝐒⦃G2,L2,T2⦄
+                      ) → ≥[h] 𝐒⦃G1,L1,T1⦄.
 /4 width=1 by fsb_intro, fpb_fpbg/ qed.
 
 (* Eliminators with proper parallel rst-computation for closures ************)
 
-lemma fsb_ind_fpbg_fpbs: ∀h,o. ∀Q:relation3 genv lenv term.
-                         (∀G1,L1,T1. ≥[h, o] 𝐒⦃G1, L1, T1⦄ →
-                                     (∀G2,L2,T2. ⦃G1, L1, T1⦄ >[h, o] ⦃G2, L2, T2⦄ → Q G2 L2 T2) →
+lemma fsb_ind_fpbg_fpbs: ∀h. ∀Q:relation3 genv lenv term.
+                         (∀G1,L1,T1. ≥[h] 𝐒⦃G1,L1,T1⦄ →
+                                     (∀G2,L2,T2. ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄ → Q G2 L2 T2) →
                                      Q G1 L1 T1
                          ) →
-                         ∀G1,L1,T1. ≥[h, o] 𝐒⦃G1, L1, T1⦄ → 
-                         ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ → Q G2 L2 T2.
-#h #o #Q #IH1 #G1 #L1 #T1 #H @(fsb_ind_alt … H) -G1 -L1 -T1
+                         ∀G1,L1,T1. ≥[h] 𝐒⦃G1,L1,T1⦄ → 
+                         ∀G2,L2,T2. ⦃G1,L1,T1⦄ ≥[h] ⦃G2,L2,T2⦄ → Q G2 L2 T2.
+#h #Q #IH1 #G1 #L1 #T1 #H @(fsb_ind_alt … H) -G1 -L1 -T1
 #G1 #L1 #T1 #H1 #IH #G2 #L2 #T2 #H12
 @IH1 -IH1
 [ -IH /2 width=5 by fsb_fpbs_trans/
@@ -55,21 +55,21 @@ lemma fsb_ind_fpbg_fpbs: ∀h,o. ∀Q:relation3 genv lenv term.
 ]
 qed-.
 
-lemma fsb_ind_fpbg: ∀h,o. ∀Q:relation3 genv lenv term.
-                    (∀G1,L1,T1. ≥[h, o] 𝐒⦃G1, L1, T1⦄ →
-                                (∀G2,L2,T2. ⦃G1, L1, T1⦄ >[h, o] ⦃G2, L2, T2⦄ → Q G2 L2 T2) →
+lemma fsb_ind_fpbg: ∀h. ∀Q:relation3 genv lenv term.
+                    (∀G1,L1,T1. ≥[h] 𝐒⦃G1,L1,T1⦄ →
+                                (∀G2,L2,T2. ⦃G1,L1,T1⦄ >[h] ⦃G2,L2,T2⦄ → Q G2 L2 T2) →
                                 Q G1 L1 T1
                     ) →
-                    ∀G1,L1,T1. ≥[h, o] 𝐒⦃G1, L1, T1⦄ →  Q G1 L1 T1.
-#h #o #Q #IH #G1 #L1 #T1 #H @(fsb_ind_fpbg_fpbs … H) -H
+                    ∀G1,L1,T1. ≥[h] 𝐒⦃G1,L1,T1⦄ →  Q G1 L1 T1.
+#h #Q #IH #G1 #L1 #T1 #H @(fsb_ind_fpbg_fpbs … H) -H
 /3 width=1 by/
 qed-.
 
 (* Inversion lemmas with proper parallel rst-computation for closures *******)
 
-lemma fsb_fpbg_refl_false (h) (o) (G) (L) (T):
-                          ≥[h,o] 𝐒⦃G, L, T⦄ → ⦃G, L, T⦄ >[h,o] ⦃G, L, T⦄ → ⊥.
-#h #o #G #L #T #H
+lemma fsb_fpbg_refl_false (h) (G) (L) (T):
+                          ≥[h] 𝐒⦃G,L,T⦄ → ⦃G,L,T⦄ >[h] ⦃G,L,T⦄ → ⊥.
+#h #G #L #T #H
 @(fsb_ind_fpbg … H) -G -L -T #G1 #L1 #T1 #_ #IH #H
 /2 width=5 by/
 qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/jsx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/jsx.ma
new file mode 100644 (file)
index 0000000..9521a9b
--- /dev/null
@@ -0,0 +1,104 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/notation/relations/topredtysnstrong_4.ma".
+include "basic_2/rt_computation/rsx.ma".
+
+(* COMPATIBILITY OF STRONG NORMALIZATION FOR UNBOUND RT-TRANSITION **********)
+
+(* Note: this should be an instance of a more general sex *)
+(* Basic_2A1: uses: lcosx *)
+inductive jsx (h) (G): relation lenv ≝
+| jsx_atom: jsx h G (⋆) (⋆)
+| jsx_bind: ∀I,K1,K2. jsx h G K1 K2 →
+            jsx h G (K1.ⓘ{I}) (K2.ⓘ{I})
+| jsx_pair: ∀I,K1,K2,V. jsx h G K1 K2 →
+            G ⊢ ⬈*[h,V] 𝐒⦃K2⦄ → jsx h G (K1.ⓑ{I}V) (K2.ⓧ)
+.
+
+interpretation
+  "strong normalization for unbound parallel rt-transition (compatibility)"
+  'ToPRedTySNStrong h G L1 L2 = (jsx h G L1 L2).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact jsx_inv_atom_sn_aux (h) (G):
+     ∀L1,L2. G ⊢ L1 ⊒[h] L2 → L1 = ⋆ → L2 = ⋆.
+#h #G #L1 #L2 * -L1 -L2
+[ //
+| #I #K1 #K2 #_ #H destruct
+| #I #K1 #K2 #V #_ #_ #H destruct
+]
+qed-.
+
+lemma jsx_inv_atom_sn (h) (G): ∀L2. G ⊢ ⋆ ⊒[h] L2 → L2 = ⋆.
+/2 width=5 by jsx_inv_atom_sn_aux/ qed-.
+
+fact jsx_inv_bind_sn_aux (h) (G):
+     ∀L1,L2. G ⊢ L1 ⊒[h] L2 →
+     ∀I,K1. L1 = K1.ⓘ{I} →
+     ∨∨ ∃∃K2. G ⊢ K1 ⊒[h] K2 & L2 = K2.ⓘ{I}
+      | ∃∃J,K2,V. G ⊢ K1 ⊒[h] K2 & G ⊢ ⬈*[h,V] 𝐒⦃K2⦄  & I = BPair J V & L2 = K2.ⓧ.
+#h #G #L1 #L2 * -L1 -L2
+[ #J #L1 #H destruct
+| #I #K1 #K2 #HK12 #J #L1 #H destruct /3 width=3 by ex2_intro, or_introl/
+| #I #K1 #K2 #V #HK12 #HV #J #L1 #H destruct /3 width=7 by ex4_3_intro, or_intror/
+]
+qed-.
+
+lemma jsx_inv_bind_sn (h) (G):
+     ∀I,K1,L2. G ⊢ K1.ⓘ{I} ⊒[h] L2 →
+     ∨∨ ∃∃K2. G ⊢ K1 ⊒[h] K2 & L2 = K2.ⓘ{I}
+      | ∃∃J,K2,V. G ⊢ K1 ⊒[h] K2 & G ⊢ ⬈*[h,V] 𝐒⦃K2⦄  & I = BPair J V & L2 = K2.ⓧ.
+/2 width=3 by jsx_inv_bind_sn_aux/ qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+(* Basic_2A1: uses: lcosx_inv_pair *)
+lemma jsx_inv_pair_sn (h) (G):
+      ∀I,K1,L2,V. G ⊢ K1.ⓑ{I}V ⊒[h] L2 →
+      ∨∨ ∃∃K2. G ⊢ K1 ⊒[h] K2 & L2 = K2.ⓑ{I}V
+       | ∃∃K2. G ⊢ K1 ⊒[h] K2 & G ⊢ ⬈*[h,V] 𝐒⦃K2⦄ & L2 = K2.ⓧ.
+#h #G #I #K1 #L2 #V #H elim (jsx_inv_bind_sn … H) -H *
+[ /3 width=3 by ex2_intro, or_introl/
+| #J #K2 #X #HK12 #HX #H1 #H2 destruct /3 width=4 by ex3_intro, or_intror/ 
+]
+qed-.
+
+lemma jsx_inv_void_sn (h) (G):
+      ∀K1,L2. G ⊢ K1.ⓧ ⊒[h] L2 →
+      ∃∃K2. G ⊢ K1 ⊒[h] K2 & L2 = K2.ⓧ.
+#h #G #K1 #L2 #H elim (jsx_inv_bind_sn … H) -H *
+/2 width=3 by ex2_intro/
+qed-.
+
+(* Advanced forward lemmas **************************************************)
+
+lemma jsx_fwd_bind_sn (h) (G):
+      ∀I1,K1,L2. G ⊢ K1.ⓘ{I1} ⊒[h] L2 →
+      ∃∃I2,K2. G ⊢ K1 ⊒[h] K2 & L2 = K2.ⓘ{I2}.
+#h #G #I1 #K1 #L2 #H elim (jsx_inv_bind_sn … H) -H *
+/2 width=4 by ex2_2_intro/
+qed-.
+
+(* Advanced properties ******************************************************)
+
+(* Basic_2A1: uses: lcosx_O *)
+lemma jsx_refl (h) (G): reflexive … (jsx h G).
+#h #G #L elim L -L /2 width=1 by jsx_atom, jsx_bind/
+qed.
+
+(* Basic_2A1: removed theorems 2:
+              lcosx_drop_trans_lt lcosx_inv_succ
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/jsx_csx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/jsx_csx.ma
new file mode 100644 (file)
index 0000000..b8e919b
--- /dev/null
@@ -0,0 +1,61 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/rsx_csx.ma".
+include "basic_2/rt_computation/jsx_drops.ma".
+include "basic_2/rt_computation/jsx_lsubr.ma".
+
+(* COMPATIBILITY OF STRONG NORMALIZATION FOR UNBOUND RT-TRANSITION **********)
+
+(* Properties with strongly rt-normalizing terms ****************************)
+
+lemma jsx_csx_conf (h) (G):
+      ∀L1,L2. G ⊢ L1 ⊒[h] L2 →
+      ∀T. ⦃G,L1⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ → ⦃G,L2⦄ ⊢ ⬈*[h] 𝐒⦃T⦄.
+/3 width=5 by jsx_fwd_lsubr, csx_lsubr_conf/ qed-.
+
+(* Properties with strongly rt-normalizing referred local environments ******)
+
+(* Note: Try by induction on the 2nd premise by generalizing V with f *) 
+lemma rsx_jsx_trans (h) (G):
+      ∀L1,V. G ⊢ ⬈*[h,V] 𝐒⦃L1⦄ →
+      ∀L2. G ⊢ L1 ⊒[h] L2 → G ⊢ ⬈*[h,V] 𝐒⦃L2⦄.
+#h #G #L1 #V @(fqup_wf_ind_eq (Ⓕ) … G L1 V) -G -L1 -V
+#G0 #L0 #V0 #IH #G #L1 * *
+[ //
+| #i #HG #HL #HV #H #L2 #HL12 destruct
+  elim (rsx_inv_lref_drops … H) -H [|*: * ]
+  [ #HL1 -IH
+    lapply (jsx_fwd_drops_atom_sn … HL12 … HL1) -L1
+    /2 width=1 by rsx_lref_atom_drops/
+  | #I #K1 #HLK1 -IH
+    elim (jsx_fwd_drops_unit_sn … HL12 … HLK1) -L1 [| // ] #K2 #HK12 #HLK2
+    /2 width=3 by rsx_lref_unit_drops/
+  | #I #K1 #V1 #HLK1 #HV1 #HK1
+    elim (jsx_fwd_drops_pair_sn … HL12 … HLK1) -HL12 [3: // |*: * ]
+    [ #K2 #HK12 #HLK2
+      /4 width=6 by rsx_lref_pair_drops, jsx_csx_conf, fqup_lref/
+    | #K2 #_ #HLK2 #_
+      /2 width=3 by rsx_lref_unit_drops/
+    ]
+  ]
+| //
+| #p #I #V #T #HG #HL #HV #H #L2 #HL12 destruct
+  elim (rsx_inv_bind_void … H) -H #HV #HT
+  /4 width=4 by jsx_bind, rsx_bind_void/
+| #I #V #T #HG #HL #HV #H #L2 #HL12 destruct
+  elim (rsx_inv_flat … H) -H #HV #HT
+  /3 width=4 by rsx_flat/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/jsx_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/jsx_drops.ma
new file mode 100644 (file)
index 0000000..93368d5
--- /dev/null
@@ -0,0 +1,75 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/relocation/drops.ma".
+include "basic_2/rt_computation/jsx.ma".
+
+(* COMPATIBILITY OF STRONG NORMALIZATION FOR UNBOUND RT-TRANSITION **********)
+
+(* Forward lemmas with uniform slicing for local environments ***************)
+
+lemma jsx_fwd_drops_atom_sn (h) (b) (G):
+      ∀L1,L2. G ⊢ L1 ⊒[h] L2 →
+      ∀f. 𝐔⦃f⦄ → ⬇*[b,f]L1 ≘ ⋆ → ⬇*[b,f]L2 ≘ ⋆.
+#h #b #G #L1 #L2 #H elim H -L1 -L2
+[ #f #_ #H //
+| #I #K1 #K2 #_ #IH #f #Hf #H
+| #I #K1 #K2 #V #_ #HV #IH #f #Hf #H
+]
+elim (drops_inv_bind1_isuni … H) -H [3,6: // |*: * -Hf ]
+[1,3: #_ #H destruct
+|2,4: #g #Hg #HK1 #H destruct /3 width=1 by drops_drop/
+]
+qed-.
+
+lemma jsx_fwd_drops_unit_sn (h) (b) (G):
+      ∀L1,L2. G ⊢ L1 ⊒[h] L2 →
+      ∀f. 𝐔⦃f⦄ → ∀I,K1. ⬇*[b,f]L1 ≘ K1.ⓤ{I} →
+      ∃∃K2. G ⊢ K1 ⊒[h] K2 & ⬇*[b,f]L2 ≘ K2.ⓤ{I}.
+#h #b #G #L1 #L2 #H elim H -L1 -L2
+[ #f #_ #J #Y1 #H
+  lapply (drops_inv_atom1 … H) -H * #H #_ destruct
+| #I #K1 #K2 #HK12 #IH #f #Hf #J #Y1 #H
+| #I #K1 #K2 #V #HK12 #HV #IH #f #Hf #J #Y1 #H
+]
+elim (drops_inv_bind1_isuni … H) -H [3,6: // |*: * -Hf ]
+[1,3: #Hf #H destruct -IH /3 width=3 by drops_refl, ex2_intro/
+|2,4:
+  #g #Hg #HK1 #H destruct
+  elim (IH … Hg … HK1) -K1 -Hg #Y2 #HY12 #HKY2 
+  /3 width=3 by drops_drop, ex2_intro/
+]
+qed-.
+
+lemma jsx_fwd_drops_pair_sn (h) (b) (G):
+      ∀L1,L2. G ⊢ L1 ⊒[h] L2 →
+      ∀f. 𝐔⦃f⦄ → ∀I,K1,V. ⬇*[b,f]L1 ≘ K1.ⓑ{I}V →
+      ∨∨ ∃∃K2. G ⊢ K1 ⊒[h] K2 & ⬇*[b,f]L2 ≘ K2.ⓑ{I}V
+       | ∃∃K2. G ⊢ K1 ⊒[h] K2 & ⬇*[b,f]L2 ≘ K2.ⓧ & G ⊢ ⬈*[h,V] 𝐒⦃K2⦄.
+#h #b #G #L1 #L2 #H elim H -L1 -L2
+[ #f #_ #J #Y1 #X1 #H
+  lapply (drops_inv_atom1 … H) -H * #H #_ destruct
+| #I #K1 #K2 #HK12 #IH #f #Hf #J #Y1 #X1 #H
+| #I #K1 #K2 #V #HK12 #HV #IH #f #Hf #J #Y1 #X1 #H
+]
+elim (drops_inv_bind1_isuni … H) -H [3,6: // |*: * -Hf ]
+[1,3:
+  #Hf #H destruct -IH
+  /4 width=4 by drops_refl, ex3_intro, ex2_intro, or_introl, or_intror/
+|2,4:
+  #g #Hg #HK1 #H destruct
+  elim (IH … Hg … HK1) -K1 -Hg * #Y2 #HY12 #HKY2 [2,4: #HX1 ]
+  /4 width=4 by drops_drop, ex3_intro, ex2_intro, or_introl, or_intror/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/jsx_jsx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/jsx_jsx.ma
new file mode 100644 (file)
index 0000000..b53d0d6
--- /dev/null
@@ -0,0 +1,34 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/jsx_csx.ma".
+
+(* COMPATIBILITY OF STRONG NORMALIZATION FOR UNBOUND RT-TRANSITION **********)
+
+(* Main properties **********************************************************)
+
+theorem jsx_trans (h) (G): Transitive … (jsx h G).
+#h #G #L1 #L #H elim H -L1 -L
+[ #L2 #H
+  >(jsx_inv_atom_sn … H) -L2 //
+| #I #K1 #K #_ #IH #L2 #H
+  elim (jsx_inv_bind_sn … H) -H *
+  [ #K2 #HK2 #H destruct /3 width=1 by jsx_bind/
+  | #J #K2 #V #HK2 #HV #H1 #H2 destruct /3 width=1 by jsx_pair/
+  ]
+| #I #K1 #K #V #_ #HV #IH #L2 #H
+  elim (jsx_inv_void_sn … H) -H #K2 #HK2 #H destruct
+  /3 width=3 by rsx_jsx_trans, jsx_pair/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/jsx_lsubr.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/jsx_lsubr.ma
new file mode 100644 (file)
index 0000000..6fc7232
--- /dev/null
@@ -0,0 +1,25 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/static/lsubr.ma".
+include "basic_2/rt_computation/jsx.ma".
+
+(* COMPATIBILITY OF STRONG NORMALIZATION FOR UNBOUND RT-TRANSITION **********)
+
+(* Forward lemmas with restricted refinement for local environments *********)
+
+lemma jsx_fwd_lsubr (h) (G): ∀L1,L2. G ⊢ L1 ⊒[h] L2 → L1 ⫃ L2.
+#h #G #L1 #L2 #H elim H -L1 -L2
+/2 width=1 by lsubr_bind, lsubr_unit/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/jsx_rsx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/jsx_rsx.ma
new file mode 100644 (file)
index 0000000..4d294b2
--- /dev/null
@@ -0,0 +1,77 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/rsx_drops.ma".
+include "basic_2/rt_computation/rsx_lpxs.ma".
+include "basic_2/rt_computation/jsx.ma".
+
+(* COMPATIBILITY OF STRONG NORMALIZATION FOR UNBOUND RT-TRANSITION **********)
+
+(* Properties with strongly normalizing referred local environments *********)
+
+(* Basic_2A1: uses: lsx_cpx_trans_lcosx *)
+lemma rsx_cpx_trans_jsx (h) (G):
+      ∀L0,T1,T2. ⦃G,L0⦄ ⊢ T1 ⬈[h] T2 →
+      ∀L. G ⊢ L0 ⊒[h] L → G ⊢ ⬈*[h,T1] 𝐒⦃L⦄ → G ⊢ ⬈*[h,T2] 𝐒⦃L⦄.
+#h #G #L0 #T1 #T2 #H @(cpx_ind … H) -G -L0 -T1 -T2
+[ //
+| //
+| #I0 #G #K0 #V1 #V2 #W2 #_ #IH #HVW2 #L #HK0 #HL
+  elim (jsx_inv_pair_sn … HK0) -HK0 *
+  [ #K #HK0 #H destruct
+    /4 width=8 by rsx_lifts, rsx_fwd_pair, drops_refl, drops_drop/
+  | #K #HK0 #HV1 #H destruct
+    /4 width=8 by rsx_lifts, drops_refl, drops_drop/
+  ]
+| #I0 #G #K0 #T #U #i #_ #IH #HTU #L #HK0 #HL
+  elim (jsx_fwd_bind_sn … HK0) -HK0 #I #K #HK0 #H destruct
+  /6 width=8 by rsx_inv_lifts, rsx_lifts, drops_refl, drops_drop/
+| #p #I0 #G #L0 #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L #HL0 #HL
+  elim (rsx_inv_bind_void … HL) -HL
+  /4 width=2 by jsx_pair, rsx_bind_void/
+| #I0 #G #L0 #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L #HL0 #HL
+  elim (rsx_inv_flat … HL) -HL /3 width=2 by rsx_flat/
+| #G #L0 #V #U1 #T1 #T2 #HTU1 #_ #IHT12 #L #HL0 #HL
+  elim (rsx_inv_bind_void … HL) -HL #HV #HU1
+  /5 width=8 by rsx_inv_lifts, drops_refl, drops_drop/
+| #G #L0 #V #T1 #T2 #_ #IHT12 #L #HL0 #HL
+  elim (rsx_inv_flat … HL) -HL /2 width=2 by/
+| #G #L0 #V1 #V2 #T #_ #IHV12 #L #HL0 #HL
+  elim (rsx_inv_flat … HL) -HL /2 width=2 by/
+| #p #G #L0 #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #L #HL0 #HL
+  elim (rsx_inv_flat … HL) -HL #HV1 #HL
+  elim (rsx_inv_bind_void … HL) -HL #HW1 #HT1
+  /4 width=2 by jsx_pair, rsx_bind_void, rsx_flat/
+| #p #G #L0 #V1 #V2 #U2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #HVU2 #L #HL0 #HL
+  elim (rsx_inv_flat … HL) -HL #HV1 #HL
+  elim (rsx_inv_bind_void … HL) -HL #HW1 #HT1
+  /6 width=8 by jsx_pair, rsx_lifts, rsx_bind_void, rsx_flat, drops_refl, drops_drop/
+]
+qed-.
+
+(* Advanced properties of strongly normalizing referred local environments **)
+
+(* Basic_2A1: uses: lsx_cpx_trans_O *)
+lemma rsx_cpx_trans (h) (G):
+      ∀L,T1,T2. ⦃G,L⦄ ⊢ T1 ⬈[h] T2 →
+      G ⊢ ⬈*[h,T1] 𝐒⦃L⦄ → G ⊢ ⬈*[h,T2] 𝐒⦃L⦄.
+/3 width=6 by rsx_cpx_trans_jsx, jsx_refl/ qed-.
+
+lemma rsx_cpxs_trans (h) (G):
+      ∀L,T1,T2. ⦃G,L⦄ ⊢ T1 ⬈*[h] T2 →
+      G ⊢ ⬈*[h,T1] 𝐒⦃L⦄ → G ⊢ ⬈*[h,T2] 𝐒⦃L⦄.
+#h #G #L #T1 #T2 #H
+@(cpxs_ind_dx ???????? H) -T1 //
+/3 width=3 by rsx_cpx_trans/
+qed-.
index 880278d222f394b538eda0566f3a905ae18fa057..7a3de7dcac5e45652037f0d7743080b9205cdae1 100644 (file)
@@ -28,38 +28,38 @@ interpretation
 (* Basic properties *********************************************************)
 
 (* Basic_2A1: uses: lprs_pair_refl *)
-lemma lprs_bind_refl_dx (h) (G): ∀L1,L2. ⦃G, L1⦄ ⊢ ➡*[h] L2 →
-                                 ∀I. ⦃G, L1.ⓘ{I}⦄ ⊢ ➡*[h] L2.ⓘ{I}.
+lemma lprs_bind_refl_dx (h) (G): ∀L1,L2. ⦃G,L1⦄ ⊢ ➡*[h] L2 →
+                                 ∀I. ⦃G,L1.ⓘ{I}⦄ ⊢ ➡*[h] L2.ⓘ{I}.
 /2 width=1 by lex_bind_refl_dx/ qed.
 
-lemma lprs_pair (h) (G): ∀L1,L2. ⦃G, L1⦄ ⊢ ➡*[h] L2 →
-                         ∀V1,V2. ⦃G, L1⦄ ⊢ V1 ➡*[h] V2 →
-                         ∀I. ⦃G, L1.ⓑ{I}V1⦄ ⊢ ➡*[h] L2.ⓑ{I}V2.
+lemma lprs_pair (h) (G): ∀L1,L2. ⦃G,L1⦄ ⊢ ➡*[h] L2 →
+                         ∀V1,V2. ⦃G,L1⦄ ⊢ V1 ➡*[h] V2 →
+                         ∀I. ⦃G,L1.ⓑ{I}V1⦄ ⊢ ➡*[h] L2.ⓑ{I}V2.
 /2 width=1 by lex_pair/ qed.
 
-lemma lprs_refl (h) (G): ∀L. ⦃G, L⦄ ⊢ ➡*[h] L.
+lemma lprs_refl (h) (G): ∀L. ⦃G,L⦄ ⊢ ➡*[h] L.
 /2 width=1 by lex_refl/ qed.
 
 (* Basic inversion lemmas ***************************************************)
 
 (* Basic_2A1: uses: lprs_inv_atom1 *)
-lemma lprs_inv_atom_sn (h) (G): ∀L2. ⦃G, ⋆⦄ ⊢ ➡*[h] L2 → L2 = ⋆.
+lemma lprs_inv_atom_sn (h) (G): ∀L2. ⦃G,⋆⦄ ⊢ ➡*[h] L2 → L2 = ⋆.
 /2 width=2 by lex_inv_atom_sn/ qed-.
 
 (* Basic_2A1: was: lprs_inv_pair1 *)
 lemma lprs_inv_pair_sn (h) (G):
-                       ∀I,K1,L2,V1. ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡*[h] L2 →
-                       ∃∃K2,V2. ⦃G, K1⦄ ⊢ ➡*[h] K2 & ⦃G, K1⦄ ⊢ V1 ➡*[h] V2 & L2 = K2.ⓑ{I}V2.
+                       ∀I,K1,L2,V1. ⦃G,K1.ⓑ{I}V1⦄ ⊢ ➡*[h] L2 →
+                       ∃∃K2,V2. ⦃G,K1⦄ ⊢ ➡*[h] K2 & ⦃G,K1⦄ ⊢ V1 ➡*[h] V2 & L2 = K2.ⓑ{I}V2.
 /2 width=1 by lex_inv_pair_sn/ qed-.
 
 (* Basic_2A1: uses: lprs_inv_atom2 *)
-lemma lprs_inv_atom_dx (h) (G): ∀L1. ⦃G, L1⦄ ⊢ ➡*[h] ⋆ → L1 = ⋆.
+lemma lprs_inv_atom_dx (h) (G): ∀L1. ⦃G,L1⦄ ⊢ ➡*[h] ⋆ → L1 = ⋆.
 /2 width=2 by lex_inv_atom_dx/ qed-.
 
 (* Basic_2A1: was: lprs_inv_pair2 *)
 lemma lprs_inv_pair_dx (h) (G):
-                       ∀I,L1,K2,V2. ⦃G, L1⦄ ⊢ ➡*[h] K2.ⓑ{I}V2 →
-                       ∃∃K1,V1. ⦃G, K1⦄ ⊢ ➡*[h] K2 & ⦃G, K1⦄ ⊢ V1 ➡*[h] V2 & L1 = K1.ⓑ{I}V1.
+                       ∀I,L1,K2,V2. ⦃G,L1⦄ ⊢ ➡*[h] K2.ⓑ{I}V2 →
+                       ∃∃K1,V1. ⦃G,K1⦄ ⊢ ➡*[h] K2 & ⦃G,K1⦄ ⊢ V1 ➡*[h] V2 & L1 = K1.ⓑ{I}V1.
 /2 width=1 by lex_inv_pair_dx/ qed-.
 
 (* Basic eliminators ********************************************************)
@@ -68,12 +68,12 @@ lemma lprs_inv_pair_dx (h) (G):
 lemma lprs_ind (h) (G): ∀Q:relation lenv.
                         Q (⋆) (⋆) → (
                           ∀I,K1,K2.
-                          ⦃G, K1⦄ ⊢ ➡*[h] K2 →
+                          ⦃G,K1⦄ ⊢ ➡*[h] K2 →
                           Q K1 K2 → Q (K1.ⓘ{I}) (K2.ⓘ{I})
                         ) → (
                           ∀I,K1,K2,V1,V2.
-                          ⦃G, K1⦄ ⊢ ➡*[h] K2 → ⦃G, K1⦄ ⊢ V1 ➡*[h] V2 →
+                          ⦃G,K1⦄ ⊢ ➡*[h] K2 → ⦃G,K1⦄ ⊢ V1 ➡*[h] V2 →
                           Q K1 K2 → Q (K1.ⓑ{I}V1) (K2.ⓑ{I}V2)
                         ) →
-                        ∀L1,L2. ⦃G, L1⦄ ⊢ ➡*[h] L2 → Q L1 L2.
+                        ∀L1,L2. ⦃G,L1⦄ ⊢ ➡*[h] L2 → Q L1 L2.
 /3 width=4 by lex_ind/ qed-.
index 0c625a2da98c46baf9f391a9d5d3975d52991f0a..591dbd1c1eeb46bbfa180b0e09ab75f14aae0af6 100644 (file)
@@ -19,22 +19,22 @@ include "basic_2/rt_computation/lprs_lpr.ma".
 (* Properties with t-bound context-sensitive rt-computarion for terms *******)
 
 lemma lprs_cpms_trans (n) (h) (G):
-                      ∀L2,T1,T2. ⦃G, L2⦄ ⊢ T1 ➡*[n, h] T2 →
-                      ∀L1. ⦃G, L1⦄ ⊢ ➡*[h] L2 → ⦃G, L1⦄ ⊢ T1 ➡*[n, h] T2.
+                      ∀L2,T1,T2. ⦃G,L2⦄ ⊢ T1 ➡*[n,h] T2 →
+                      ∀L1. ⦃G,L1⦄ ⊢ ➡*[h] L2 → ⦃G,L1⦄ ⊢ T1 ➡*[n,h] T2.
 #n #h #G #L2 #T1 #T2 #HT12 #L1 #H
 @(lprs_ind_sn … H) -L1 /2 width=3 by lpr_cpms_trans/
 qed-.
 
 lemma lprs_cpm_trans (n) (h) (G):
-                     ∀L2,T1,T2. ⦃G, L2⦄ ⊢ T1 ➡[n, h] T2 →
-                     ∀L1. ⦃G, L1⦄ ⊢ ➡*[h] L2 → ⦃G, L1⦄ ⊢ T1 ➡*[n, h] T2.
+                     ∀L2,T1,T2. ⦃G,L2⦄ ⊢ T1 ➡[n,h] T2 →
+                     ∀L1. ⦃G,L1⦄ ⊢ ➡*[h] L2 → ⦃G,L1⦄ ⊢ T1 ➡*[n,h] T2.
 /3 width=3 by lprs_cpms_trans, cpm_cpms/ qed-.
 
 (* Basic_2A1: includes cprs_bind2 *)
 lemma cpms_bind_dx (n) (h) (G) (L):
-                   ∀V1,V2. ⦃G, L⦄ ⊢ V1 ➡*[h] V2 →
-                   ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ➡*[n, h] T2 →
-                   ∀p. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ➡*[n, h] ⓑ{p,I}V2.T2.
+                   ∀V1,V2. ⦃G,L⦄ ⊢ V1 ➡*[h] V2 →
+                   ∀I,T1,T2. ⦃G,L.ⓑ{I}V2⦄ ⊢ T1 ➡*[n,h] T2 →
+                   ∀p. ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ➡*[n,h] ⓑ{p,I}V2.T2.
 /4 width=5 by lprs_cpms_trans, lprs_pair, cpms_bind/ qed.
 
 (* Inversion lemmas with t-bound context-sensitive rt-computarion for terms *)
@@ -43,8 +43,8 @@ lemma cpms_bind_dx (n) (h) (G) (L):
 (* Basic_2A1: includes: cprs_inv_abst1 *)
 (* Basic_2A1: uses: scpds_inv_abst1 *)
 lemma cpms_inv_abst_sn (n) (h) (G) (L):
-                       ∀p,V1,T1,X2. ⦃G, L⦄ ⊢ ⓛ{p}V1.T1 ➡*[n, h] X2 →
-                       ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡*[h] V2 & ⦃G, L.ⓛV1⦄ ⊢ T1 ➡*[n, h] T2 &
+                       ∀p,V1,T1,X2. ⦃G,L⦄ ⊢ ⓛ{p}V1.T1 ➡*[n,h] X2 →
+                       ∃∃V2,T2. ⦃G,L⦄ ⊢ V1 ➡*[h] V2 & ⦃G,L.ⓛV1⦄ ⊢ T1 ➡*[n,h] T2 &
                                 X2 = ⓛ{p}V2.T2.
 #n #h #G #L #p #V1 #T1 #X2 #H
 @(cpms_ind_dx … H) -X2 /2 width=5 by ex3_2_intro/
@@ -62,20 +62,20 @@ elim (cpms_inv_abst_sn … H) -H #W0 #U #HW0 #HTU #H destruct
 qed-.
 
 (* Basic_2A1: includes: cprs_inv_abst *)
-lemma cpms_inv_abst_bi (n) (h) (G) (L):
-                       ∀p,W1,W2,T1,T2. ⦃G, L⦄ ⊢ ⓛ{p}W1.T1 ➡*[n, h] ⓛ{p}W2.T2 →
-                       ∧∧ ⦃G, L⦄ ⊢ W1 ➡*[h] W2 & ⦃G, L.ⓛW1⦄ ⊢ T1 ➡*[n, h] T2.
-#n #h #G #L #p #W1 #W2 #T1 #T2 #H
+lemma cpms_inv_abst_bi (n) (h) (p1) (p2) (G) (L):
+                       ∀W1,W2,T1,T2. ⦃G,L⦄ ⊢ ⓛ{p1}W1.T1 ➡*[n,h] ⓛ{p2}W2.T2 →
+                       ∧∧ p1 = p2 & ⦃G,L⦄ ⊢ W1 ➡*[h] W2 & ⦃G,L.ⓛW1⦄ ⊢ T1 ➡*[n,h] T2.
+#n #h #p1 #p2 #G #L #W1 #W2 #T1 #T2 #H
 elim (cpms_inv_abst_sn … H) -H #W #T #HW1 #HT1 #H destruct
-/2 width=1 by conj/
+/2 width=1 by and3_intro/
 qed-.
 
 (* Basic_1: was pr3_gen_abbr *)
 (* Basic_2A1: includes: cprs_inv_abbr1 *)
 lemma cpms_inv_abbr_sn_dx (n) (h) (G) (L):
-                          ∀p,V1,T1,X2. ⦃G, L⦄ ⊢ ⓓ{p}V1.T1 ➡*[n, h] X2 →
-                          ∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡*[h] V2 & ⦃G, L.ⓓV1⦄ ⊢ T1 ➡*[n, h] T2 & X2 = ⓓ{p}V2.T2
-                           | ∃∃T2. ⦃G, L.ⓓV1⦄ ⊢ T1 ➡*[n ,h] T2 & ⬆*[1] X2 ≘ T2 & p = Ⓣ.
+                          ∀p,V1,T1,X2. ⦃G,L⦄ ⊢ ⓓ{p}V1.T1 ➡*[n,h] X2 →
+                          ∨∨ ∃∃V2,T2. ⦃G,L⦄ ⊢ V1 ➡*[h] V2 & ⦃G,L.ⓓV1⦄ ⊢ T1 ➡*[n,h] T2 & X2 = ⓓ{p}V2.T2
+                           | ∃∃T2. ⦃G,L.ⓓV1⦄ ⊢ T1 ➡*[n ,h] T2 & ⬆*[1] X2 ≘ T2 & p = Ⓣ.
 #n #h #G #L #p #V1 #T1 #X2 #H
 @(cpms_ind_dx … H) -X2 -n /3 width=5 by ex3_2_intro, or_introl/
 #n1 #n2 #X #X2 #_ * *
@@ -95,8 +95,8 @@ qed-.
 
 (* Basic_2A1: uses: scpds_inv_abbr_abst *)
 lemma cpms_inv_abbr_abst (n) (h) (G) (L):
-                         ∀p1,p2,V1,W2,T1,T2. ⦃G, L⦄ ⊢ ⓓ{p1}V1.T1 ➡*[n, h] ⓛ{p2}W2.T2 →
-                         ∃∃T. ⦃G, L.ⓓV1⦄ ⊢ T1 ➡*[n, h] T & ⬆*[1] ⓛ{p2}W2.T2 ≘ T & p1 = Ⓣ.
+                         ∀p1,p2,V1,W2,T1,T2. ⦃G,L⦄ ⊢ ⓓ{p1}V1.T1 ➡*[n,h] ⓛ{p2}W2.T2 →
+                         ∃∃T. ⦃G,L.ⓓV1⦄ ⊢ T1 ➡*[n,h] T & ⬆*[1] ⓛ{p2}W2.T2 ≘ T & p1 = Ⓣ.
 #n #h #G #L #p1 #p2 #V1 #W2 #T1 #T2 #H
 elim (cpms_inv_abbr_sn_dx … H) -H *
 [ #V #T #_ #_ #H destruct
index 958fcab3bc781053975b060c8f5cf558b8dfb4a0..1706ae98ea926422c2355c0bcc9f71977bf34c0c 100644 (file)
@@ -20,16 +20,16 @@ include "basic_2/rt_computation/lprs_cpms.ma".
 (* Advanced properties ******************************************************)
 
 (* Basic_2A1: was: lprs_pair2 *)
-lemma lprs_pair_dx (h) (G): ∀L1,L2. ⦃G, L1⦄ ⊢ ➡*[h] L2 →
-                            ∀V1,V2. ⦃G, L2⦄ ⊢ V1 ➡*[h] V2 →
-                            ∀I. ⦃G, L1.ⓑ{I}V1⦄ ⊢ ➡*[h] L2.ⓑ{I}V2.
+lemma lprs_pair_dx (h) (G): ∀L1,L2. ⦃G,L1⦄ ⊢ ➡*[h] L2 →
+                            ∀V1,V2. ⦃G,L2⦄ ⊢ V1 ➡*[h] V2 →
+                            ∀I. ⦃G,L1.ⓑ{I}V1⦄ ⊢ ➡*[h] L2.ⓑ{I}V2.
 /3 width=3 by lprs_pair, lprs_cpms_trans/ qed.
 
 (* Properties on context-sensitive parallel r-computation for terms *********)
 
-lemma lprs_cprs_conf_dx (h) (G): ∀L0.∀T0,T1:term. ⦃G, L0⦄ ⊢ T0 ➡*[h] T1 →
-                                 ∀L1. ⦃G, L0⦄ ⊢ ➡*[h] L1 →
-                                 ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡*[h] T & ⦃G, L1⦄ ⊢ T0 ➡*[h] T.
+lemma lprs_cprs_conf_dx (h) (G): ∀L0.∀T0,T1:term. ⦃G,L0⦄ ⊢ T0 ➡*[h] T1 →
+                                 ∀L1. ⦃G,L0⦄ ⊢ ➡*[h] L1 →
+                                 ∃∃T. ⦃G,L1⦄ ⊢ T1 ➡*[h] T & ⦃G,L1⦄ ⊢ T0 ➡*[h] T.
 #h #G #L0 #T0 #T1 #HT01 #L1 #H
 @(lprs_ind_dx … H) -L1 /2 width=3 by ex2_intro/
 #L #L1 #_ #HL1 * #T #HT1 #HT0 -L0
@@ -39,21 +39,21 @@ elim (cprs_conf … HT2 … HT3) -T
 /3 width=5 by cprs_trans, ex2_intro/
 qed-.
 
-lemma lprs_cpr_conf_dx (h) (G): ∀L0. ∀T0,T1:term. ⦃G, L0⦄ ⊢ T0 ➡[h] T1 →
-                                ∀L1. ⦃G, L0⦄ ⊢ ➡*[h] L1 →
-                                ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡*[h] T & ⦃G, L1⦄ ⊢ T0 ➡*[h] T.
+lemma lprs_cpr_conf_dx (h) (G): ∀L0. ∀T0,T1:term. ⦃G,L0⦄ ⊢ T0 ➡[h] T1 →
+                                ∀L1. ⦃G,L0⦄ ⊢ ➡*[h] L1 →
+                                ∃∃T. ⦃G,L1⦄ ⊢ T1 ➡*[h] T & ⦃G,L1⦄ ⊢ T0 ➡*[h] T.
 /3 width=3 by lprs_cprs_conf_dx, cpm_cpms/ qed-.
 
 (* Note: this can be proved on its own using lprs_ind_sn *)
-lemma lprs_cprs_conf_sn (h) (G): ∀L0. ∀T0,T1:term. ⦃G, L0⦄ ⊢ T0 ➡*[h] T1 →
-                                 ∀L1. ⦃G, L0⦄ ⊢ ➡*[h] L1 →
-                                 ∃∃T. ⦃G, L0⦄ ⊢ T1 ➡*[h] T & ⦃G, L1⦄ ⊢ T0 ➡*[h] T.
+lemma lprs_cprs_conf_sn (h) (G): ∀L0. ∀T0,T1:term. ⦃G,L0⦄ ⊢ T0 ➡*[h] T1 →
+                                 ∀L1. ⦃G,L0⦄ ⊢ ➡*[h] L1 →
+                                 ∃∃T. ⦃G,L0⦄ ⊢ T1 ➡*[h] T & ⦃G,L1⦄ ⊢ T0 ➡*[h] T.
 #h #G #L0 #T0 #T1 #HT01 #L1 #HL01
 elim (lprs_cprs_conf_dx … HT01 … HL01) -HT01
 /3 width=3 by lprs_cpms_trans, ex2_intro/
 qed-.
 
-lemma lprs_cpr_conf_sn (h) (G): ∀L0. ∀T0,T1:term. ⦃G, L0⦄ ⊢ T0 ➡[h] T1 →
-                                ∀L1. ⦃G, L0⦄ ⊢ ➡*[h] L1 →
-                                ∃∃T. ⦃G, L0⦄ ⊢ T1 ➡*[h] T & ⦃G, L1⦄ ⊢ T0 ➡*[h] T.
+lemma lprs_cpr_conf_sn (h) (G): ∀L0. ∀T0,T1:term. ⦃G,L0⦄ ⊢ T0 ➡[h] T1 →
+                                ∀L1. ⦃G,L0⦄ ⊢ ➡*[h] L1 →
+                                ∃∃T. ⦃G,L0⦄ ⊢ T1 ➡*[h] T & ⦃G,L1⦄ ⊢ T0 ➡*[h] T.
 /3 width=3 by lprs_cprs_conf_sn, cpm_cpms/ qed-.
index ecef51fe5d26729449f682817c05be89582c895c..742a0038ae51cea23edcfed2dc832b8adfd7dd1e 100644 (file)
@@ -20,11 +20,11 @@ include "basic_2/rt_computation/lprs.ma".
 (* Properties with contextual transitive closure ****************************)
 
 lemma lprs_CTC (h) (G):
-               ∀L1,L2. L1⪤[CTC … (λL. cpm h G L 0)] L2 → ⦃G, L1⦄⊢ ➡*[h] L2. 
+               ∀L1,L2. L1⪤[CTC … (λL. cpm h G L 0)] L2 → ⦃G,L1⦄⊢ ➡*[h] L2. 
 /3 width=3 by cprs_CTC, lex_co/ qed.
 
 (* Inversion lemmas with contextual transitive closure **********************)
 
 lemma lprs_inv_CTC (h) (G):
-                   ∀L1,L2. ⦃G, L1⦄⊢ ➡*[h] L2 → L1⪤[CTC … (λL. cpm h G L 0)] L2.
+                   ∀L1,L2. ⦃G,L1⦄⊢ ➡*[h] L2 → L1⪤[CTC … (λL. cpm h G L 0)] L2.
 /3 width=3 by cprs_inv_CTC, lex_co/ qed-.
index ae38e76a475a6471e4d1fbecd6b5ed7146d24f15..4327dcb7b6d7016c49fbf58f1447e6e0978521ce 100644 (file)
@@ -19,5 +19,5 @@ include "basic_2/rt_computation/lprs.ma".
 
 (* Forward lemmas with length for local environments ************************)
 
-lemma lprs_fwd_length (h) (G): ∀L1,L2. ⦃G, L1⦄ ⊢ ➡*[h] L2 → |L1| = |L2|.
+lemma lprs_fwd_length (h) (G): ∀L1,L2. ⦃G,L1⦄ ⊢ ➡*[h] L2 → |L1| = |L2|.
 /2 width=2 by lex_fwd_length/ qed-.
index 120177208760d6e3f28ecdaf3acfecf7bb8ee7be..ea0456434b7cd0da409de24134690f0fee2113a6 100644 (file)
@@ -20,29 +20,29 @@ include "basic_2/rt_computation/lprs_tc.ma".
 
 (* Basic_2A1: was: lprs_ind_dx *)
 lemma lprs_ind_sn (h) (G) (L2): ∀Q:predicate lenv. Q L2 →
-                                (∀L1,L. ⦃G, L1⦄ ⊢ ➡[h] L → ⦃G, L⦄ ⊢ ➡*[h] L2 → Q L → Q L1) →
-                                ∀L1. ⦃G, L1⦄ ⊢ ➡*[h] L2 → Q L1.
+                                (∀L1,L. ⦃G,L1⦄ ⊢ ➡[h] L → ⦃G,L⦄ ⊢ ➡*[h] L2 → Q L → Q L1) →
+                                ∀L1. ⦃G,L1⦄ ⊢ ➡*[h] L2 → Q L1.
 /4 width=8 by lprs_inv_CTC, lprs_CTC, lpr_cprs_trans, cpr_refl, lex_CTC_ind_sn/ qed-.
 
 (* Basic_2A1: was: lprs_ind *)
 lemma lprs_ind_dx (h) (G) (L1): ∀Q:predicate lenv. Q L1 →
-                                (∀L,L2. ⦃G, L1⦄ ⊢ ➡*[h] L → ⦃G, L⦄ ⊢ ➡[h] L2 → Q L → Q L2) →
-                                ∀L2. ⦃G, L1⦄ ⊢ ➡*[h] L2 → Q L2.
+                                (∀L,L2. ⦃G,L1⦄ ⊢ ➡*[h] L → ⦃G,L⦄ ⊢ ➡[h] L2 → Q L → Q L2) →
+                                ∀L2. ⦃G,L1⦄ ⊢ ➡*[h] L2 → Q L2.
 /4 width=8 by lprs_inv_CTC, lprs_CTC, lpr_cprs_trans, cpr_refl, lex_CTC_ind_dx/ qed-.
 
 (* Properties with unbound rt-transition for full local environments ********)
 
-lemma lpr_lprs (h) (G): ∀L1,L2. ⦃G, L1⦄ ⊢ ➡[h] L2 → ⦃G, L1⦄ ⊢ ➡*[h] L2.
+lemma lpr_lprs (h) (G): ∀L1,L2. ⦃G,L1⦄ ⊢ ➡[h] L2 → ⦃G,L1⦄ ⊢ ➡*[h] L2.
 /4 width=3 by lprs_CTC, lpr_cprs_trans, lex_CTC_inj/ qed.
 
 (* Basic_2A1: was: lprs_strap2 *)
-lemma lprs_step_sn (h) (G): ∀L1,L. ⦃G, L1⦄ ⊢ ➡[h] L →
-                            ∀L2.⦃G, L⦄ ⊢ ➡*[h] L2 → ⦃G, L1⦄ ⊢ ➡*[h] L2.
+lemma lprs_step_sn (h) (G): ∀L1,L. ⦃G,L1⦄ ⊢ ➡[h] L →
+                            ∀L2.⦃G,L⦄ ⊢ ➡*[h] L2 → ⦃G,L1⦄ ⊢ ➡*[h] L2.
 /4 width=3 by lprs_inv_CTC, lprs_CTC, lpr_cprs_trans, lex_CTC_step_sn/ qed-.
 
 (* Basic_2A1: was: lpxs_strap1 *)
-lemma lprs_step_dx (h) (G): ∀L1,L. ⦃G, L1⦄ ⊢ ➡*[h] L →
-                            ∀L2. ⦃G, L⦄ ⊢ ➡[h] L2 → ⦃G, L1⦄ ⊢ ➡*[h] L2.
+lemma lprs_step_dx (h) (G): ∀L1,L. ⦃G,L1⦄ ⊢ ➡*[h] L →
+                            ∀L2. ⦃G,L⦄ ⊢ ➡[h] L2 → ⦃G,L1⦄ ⊢ ➡*[h] L2.
 /4 width=3 by lprs_inv_CTC, lprs_CTC, lpr_cprs_trans, lex_CTC_step_dx/ qed-.
 
 lemma lprs_strip (h) (G): confluent2 … (lprs h G) (lpr h G).
index fe2d59ee76a8fe44d5e86d813b9343149973a035..5709df1f30d450ff8be54d5f6020ac38c1667c23 100644 (file)
@@ -22,5 +22,5 @@ include "basic_2/rt_computation/lprs.ma".
 
 (* Basic_2A1: was: lprs_lpxs *)
 (* Note: original proof uses lpr_fwd_lpx and monotonic_TC *)
-lemma lprs_fwd_lpxs (h) (G) : ∀L1,L2. ⦃G, L1⦄ ⊢ ➡*[h] L2 → ⦃G, L1⦄ ⊢ ⬈*[h] L2.
+lemma lprs_fwd_lpxs (h) (G) : ∀L1,L2. ⦃G,L1⦄ ⊢ ➡*[h] L2 → ⦃G,L1⦄ ⊢ ⬈*[h] L2.
 /3 width=3 by cpms_fwd_cpxs, lex_co/ qed-.
index 122051b4d7c4a97d679ba78055715374b5b1552c..3b031c6d50f6f0c72039284b290e01c7d588d5ef 100644 (file)
@@ -21,11 +21,11 @@ include "basic_2/rt_computation/cprs_lpr.ma".
 (* Properties with transitive closure ***************************************)
 
 lemma lprs_TC (h) (G):
-              ∀L1,L2. TC … (lex (λL.cpm h G L 0)) L1 L2 → ⦃G, L1⦄⊢ ➡*[h] L2.
+              ∀L1,L2. TC … (lex (λL.cpm h G L 0)) L1 L2 → ⦃G,L1⦄⊢ ➡*[h] L2.
 /4 width=3 by lprs_CTC, lex_CTC, lpr_cprs_trans/ qed.
 
 (* Inversion lemmas with transitive closure *********************************)
 
 lemma lprs_inv_TC (h) (G):
-                  ∀L1,L2. ⦃G, L1⦄⊢ ➡*[h] L2 → TC … (lex (λL.cpm h G L 0)) L1 L2.
+                  ∀L1,L2. ⦃G,L1⦄⊢ ➡*[h] L2 → TC … (lex (λL.cpm h G L 0)) L1 L2.
 /3 width=3 by lprs_inv_CTC, lex_inv_CTC/ qed-.
index 322f437124e4b37efefbde394cc60b118da5110f..d532c62bfaeb65a7021d757a10b0c3b620f055c7 100644 (file)
@@ -28,13 +28,13 @@ interpretation
 (* Basic properties *********************************************************)
 
 (* Basic_2A1: uses: lpxs_pair_refl *)
-lemma lpxs_bind_refl_dx (h) (G): ∀L1,L2. ⦃G, L1⦄ ⊢ ⬈*[h] L2 →
-                                 ∀I. ⦃G, L1.ⓘ{I}⦄ ⊢ ⬈*[h] L2.ⓘ{I}.
+lemma lpxs_bind_refl_dx (h) (G): ∀L1,L2. ⦃G,L1⦄ ⊢ ⬈*[h] L2 →
+                                 ∀I. ⦃G,L1.ⓘ{I}⦄ ⊢ ⬈*[h] L2.ⓘ{I}.
 /2 width=1 by lex_bind_refl_dx/ qed.
 
-lemma lpxs_pair (h) (G): ∀L1,L2. ⦃G, L1⦄ ⊢ ⬈*[h] L2 →
-                         ∀V1,V2. ⦃G, L1⦄ ⊢ V1 ⬈*[h] V2 →
-                         ∀I. ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈*[h] L2.ⓑ{I}V2.
+lemma lpxs_pair (h) (G): ∀L1,L2. ⦃G,L1⦄ ⊢ ⬈*[h] L2 →
+                         ∀V1,V2. ⦃G,L1⦄ ⊢ V1 ⬈*[h] V2 →
+                         ∀I. ⦃G,L1.ⓑ{I}V1⦄ ⊢ ⬈*[h] L2.ⓑ{I}V2.
 /2 width=1 by lex_pair/ qed.
 
 lemma lpxs_refl (h) (G): reflexive … (lpxs h G).
@@ -43,25 +43,25 @@ lemma lpxs_refl (h) (G): reflexive … (lpxs h G).
 (* Basic inversion lemmas ***************************************************)
 
 (* Basic_2A1: was: lpxs_inv_atom1 *)
-lemma lpxs_inv_atom_sn (h) (G): ∀L2. ⦃G, ⋆⦄ ⊢ ⬈*[h] L2 → L2 = ⋆.
+lemma lpxs_inv_atom_sn (h) (G): ∀L2. ⦃G,⋆⦄ ⊢ ⬈*[h] L2 → L2 = ⋆.
 /2 width=2 by lex_inv_atom_sn/ qed-.
 
-lemma lpxs_inv_bind_sn (h) (G): ∀I1,L2,K1. ⦃G, K1.ⓘ{I1}⦄ ⊢ ⬈*[h] L2 →
-                                ∃∃I2,K2. ⦃G, K1⦄ ⊢ ⬈*[h] K2 & ⦃G, K1⦄ ⊢ I1 ⬈*[h] I2 & L2 = K2.ⓘ{I2}.
+lemma lpxs_inv_bind_sn (h) (G): ∀I1,L2,K1. ⦃G,K1.ⓘ{I1}⦄ ⊢ ⬈*[h] L2 →
+                                ∃∃I2,K2. ⦃G,K1⦄ ⊢ ⬈*[h] K2 & ⦃G,K1⦄ ⊢ I1 ⬈*[h] I2 & L2 = K2.ⓘ{I2}.
 /2 width=1 by lex_inv_bind_sn/ qed-.
 
 (* Basic_2A1: was: lpxs_inv_pair1 *)
-lemma lpxs_inv_pair_sn (h) (G): ∀I,L2,K1,V1. ⦃G, K1.ⓑ{I}V1⦄ ⊢ ⬈*[h] L2 →
-                                ∃∃K2,V2. ⦃G, K1⦄ ⊢ ⬈*[h] K2 & ⦃G, K1⦄ ⊢ V1 ⬈*[h] V2 & L2 = K2.ⓑ{I}V2.
+lemma lpxs_inv_pair_sn (h) (G): ∀I,L2,K1,V1. ⦃G,K1.ⓑ{I}V1⦄ ⊢ ⬈*[h] L2 →
+                                ∃∃K2,V2. ⦃G,K1⦄ ⊢ ⬈*[h] K2 & ⦃G,K1⦄ ⊢ V1 ⬈*[h] V2 & L2 = K2.ⓑ{I}V2.
 /2 width=1 by lex_inv_pair_sn/ qed-.
 
 (* Basic_2A1: was: lpxs_inv_atom2 *)
-lemma lpxs_inv_atom_dx (h) (G): ∀L1. ⦃G, L1⦄ ⊢ ⬈*[h] ⋆ → L1 = ⋆.
+lemma lpxs_inv_atom_dx (h) (G): ∀L1. ⦃G,L1⦄ ⊢ ⬈*[h] ⋆ → L1 = ⋆.
 /2 width=2 by lex_inv_atom_dx/ qed-.
 
 (* Basic_2A1: was: lpxs_inv_pair2 *)
-lemma lpxs_inv_pair_dx (h) (G): ∀I,L1,K2,V2. ⦃G, L1⦄ ⊢ ⬈*[h] K2.ⓑ{I}V2 →
-                                ∃∃K1,V1. ⦃G, K1⦄ ⊢ ⬈*[h] K2 & ⦃G, K1⦄ ⊢ V1 ⬈*[h] V2 & L1 = K1.ⓑ{I}V1.
+lemma lpxs_inv_pair_dx (h) (G): ∀I,L1,K2,V2. ⦃G,L1⦄ ⊢ ⬈*[h] K2.ⓑ{I}V2 →
+                                ∃∃K1,V1. ⦃G,K1⦄ ⊢ ⬈*[h] K2 & ⦃G,K1⦄ ⊢ V1 ⬈*[h] V2 & L1 = K1.ⓑ{I}V1.
 /2 width=1 by lex_inv_pair_dx/ qed-.
 
 (* Basic eliminators ********************************************************)
@@ -70,12 +70,12 @@ lemma lpxs_inv_pair_dx (h) (G): ∀I,L1,K2,V2. ⦃G, L1⦄ ⊢ ⬈*[h] K2.ⓑ{I}
 lemma lpxs_ind (h) (G): ∀Q:relation lenv.
                         Q (⋆) (⋆) → (
                           ∀I,K1,K2.
-                          ⦃G, K1⦄ ⊢ ⬈*[h] K2 →
+                          ⦃G,K1⦄ ⊢ ⬈*[h] K2 →
                           Q K1 K2 → Q (K1.ⓘ{I}) (K2.ⓘ{I})
                         ) → (
                           ∀I,K1,K2,V1,V2.
-                          ⦃G, K1⦄ ⊢ ⬈*[h] K2 → ⦃G, K1⦄ ⊢ V1 ⬈*[h] V2 →
+                          ⦃G,K1⦄ ⊢ ⬈*[h] K2 → ⦃G,K1⦄ ⊢ V1 ⬈*[h] V2 →
                           Q K1 K2 → Q (K1.ⓑ{I}V1) (K2.ⓑ{I}V2)
                         ) →
-                        ∀L1,L2. ⦃G, L1⦄ ⊢ ⬈*[h] L2 → Q L1 L2.
+                        ∀L1,L2. ⦃G,L1⦄ ⊢ ⬈*[h] L2 → Q L1 L2.
 /3 width=4 by lex_ind/ qed-.
index 71742516cce320c28e7e12cc6cad368299672ee6..611aab47bd68cbf362050ae69f517f6364f8d9d9 100644 (file)
@@ -19,15 +19,15 @@ include "basic_2/rt_computation/lpxs_lpx.ma".
 (* Properties with context-sensitive extended rt-computation for terms ******)
 
 (* Basic_2A1: was: cpxs_bind2 *)
-lemma cpxs_bind_dx (h) (G): ∀L,V1,V2. ⦃G, L⦄ ⊢ V1 ⬈*[h] V2 →
-                            ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ⬈*[h] T2 →
-                            ∀p. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈*[h] ⓑ{p,I}V2.T2.
+lemma cpxs_bind_dx (h) (G): ∀L,V1,V2. ⦃G,L⦄ ⊢ V1 ⬈*[h] V2 →
+                            ∀I,T1,T2. ⦃G,L.ⓑ{I}V2⦄ ⊢ T1 ⬈*[h] T2 →
+                            ∀p. ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈*[h] ⓑ{p,I}V2.T2.
 /4 width=5 by lpxs_cpxs_trans, lpxs_pair, cpxs_bind/ qed.
 
 (* Inversion lemmas with context-sensitive ext rt-computation for terms *****)
 
-lemma cpxs_inv_abst1 (h) (G): ∀p,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓛ{p}V1.T1 ⬈*[h] U2 →
-                              ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ⬈*[h] V2 & ⦃G, L.ⓛV1⦄ ⊢ T1 ⬈*[h] T2 &
+lemma cpxs_inv_abst1 (h) (G): ∀p,L,V1,T1,U2. ⦃G,L⦄ ⊢ ⓛ{p}V1.T1 ⬈*[h] U2 →
+                              ∃∃V2,T2. ⦃G,L⦄ ⊢ V1 ⬈*[h] V2 & ⦃G,L.ⓛV1⦄ ⊢ T1 ⬈*[h] T2 &
                                        U2 = ⓛ{p}V2.T2.
 #h #G #p #L #V1 #T1 #U2 #H @(cpxs_ind … H) -U2 /2 width=5 by ex3_2_intro/
 #U0 #U2 #_ #HU02 * #V0 #T0 #HV10 #HT10 #H destruct
@@ -38,10 +38,10 @@ qed-.
 
 (* Basic_2A1: was: cpxs_inv_abbr1 *)
 lemma cpxs_inv_abbr1_dx (h) (p) (G) (L):
-                        ∀V1,T1,U2. ⦃G, L⦄ ⊢ ⓓ{p}V1.T1 ⬈*[h] U2 →
-                        ∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ⬈*[h] V2 & ⦃G, L.ⓓV1⦄ ⊢ T1 ⬈*[h] T2 &
+                        ∀V1,T1,U2. ⦃G,L⦄ ⊢ ⓓ{p}V1.T1 ⬈*[h] U2 →
+                        ∨∨ ∃∃V2,T2. ⦃G,L⦄ ⊢ V1 ⬈*[h] V2 & ⦃G,L.ⓓV1⦄ ⊢ T1 ⬈*[h] T2 &
                                     U2 = ⓓ{p}V2.T2
-                         | ∃∃T2. ⦃G, L.ⓓV1⦄ ⊢ T1 ⬈*[h] T2 & ⬆*[1] U2 ≘ T2 & p = Ⓣ.
+                         | ∃∃T2. ⦃G,L.ⓓV1⦄ ⊢ T1 ⬈*[h] T2 & ⬆*[1] U2 ≘ T2 & p = Ⓣ.
 #h #p #G #L #V1 #T1 #U2 #H
 @(cpxs_ind … H) -U2 /3 width=5 by ex3_2_intro, or_introl/
 #U0 #U2 #_ #HU02 * *
index 8a5676cc062c6b26f9757f3d7bc2899a7329d626..e21438d6328ed459a4c4a2060b898722346c4470 100644 (file)
@@ -17,12 +17,12 @@ include "basic_2/rt_computation/lpxs_rdeq.ma".
 
 (* UNBOUND PARALLEL RT-COMPUTATION FOR FULL LOCAL ENVIRONMENTS **************)
 
-(* Properties with degree-based equivalence on closures *********************)
+(* Properties with sort-irrelevant equivalence on closures ******************)
 
-lemma fdeq_lpxs_trans (h) (o): ∀G1,G2,L1,L0,T1,T2. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L0, T2⦄ →
-                               ∀L2. ⦃G2, L0⦄ ⊢⬈*[h] L2 →
-                               ∃∃L. ⦃G1, L1⦄ ⊢⬈*[h] L & ⦃G1, L, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄.
-#h #o #G1 #G2 #L1 #L0 #T1 #T2 #H1 #L2 #HL02
+lemma fdeq_lpxs_trans (h): ∀G1,G2,L1,L0,T1,T2. ⦃G1,L1,T1⦄ ≛ ⦃G2,L0,T2⦄ →
+                           ∀L2. ⦃G2,L0⦄ ⊢⬈*[h] L2 →
+                           ∃∃L. ⦃G1,L1⦄ ⊢⬈*[h] L & ⦃G1,L,T1⦄ ≛ ⦃G2,L2,T2⦄.
+#h #G1 #G2 #L1 #L0 #T1 #T2 #H1 #L2 #HL02
 elim (fdeq_inv_gen_dx … H1) -H1 #HG #HL10 #HT12 destruct
 elim (rdeq_lpxs_trans … HL02 … HL10) -L0 #L0 #HL10 #HL02
 /3 width=3 by fdeq_intro_dx, ex2_intro/
index fd664b95ca3771151079a6224185f2b87df3a3e3..8ab26578eacd07dd90ecfca4b00e5eeed7a1f3e5 100644 (file)
@@ -19,5 +19,5 @@ include "basic_2/rt_computation/lpxs.ma".
 
 (* Forward lemmas with length for local environments ************************)
 
-lemma lpxs_fwd_length (h) (G): ∀L1,L2. ⦃G, L1⦄ ⊢ ⬈*[h] L2 → |L1| = |L2|.
+lemma lpxs_fwd_length (h) (G): ∀L1,L2. ⦃G,L1⦄ ⊢ ⬈*[h] L2 → |L1| = |L2|.
 /2 width=2 by lex_fwd_length/ qed-.
index 52a4186179ff5f7f358d4d69c61ee78ce87a7ac0..c275077765fae748d0d98d64bd42c381e2657701 100644 (file)
@@ -20,31 +20,31 @@ include "basic_2/rt_computation/lpxs.ma".
 
 (* Properties with unbound rt-transition for full local environments ********)
 
-lemma lpx_lpxs (h) (G): ∀L1,L2. ⦃G, L1⦄ ⊢ ⬈[h] L2 → ⦃G, L1⦄ ⊢ ⬈*[h] L2.
+lemma lpx_lpxs (h) (G): ∀L1,L2. ⦃G,L1⦄ ⊢ ⬈[h] L2 → ⦃G,L1⦄ ⊢ ⬈*[h] L2.
 /3 width=3 by lpx_cpxs_trans, lex_CTC_inj/ qed.
 
 (* Basic_2A1: was: lpxs_strap2 *)
-lemma lpxs_step_sn (h) (G): ∀L1,L. ⦃G, L1⦄ ⊢ ⬈[h] L →
-                            ∀L2. ⦃G, L⦄ ⊢ ⬈*[h] L2 → ⦃G, L1⦄ ⊢ ⬈*[h] L2.
+lemma lpxs_step_sn (h) (G): ∀L1,L. ⦃G,L1⦄ ⊢ ⬈[h] L →
+                            ∀L2. ⦃G,L⦄ ⊢ ⬈*[h] L2 → ⦃G,L1⦄ ⊢ ⬈*[h] L2.
 /3 width=3 by lpx_cpxs_trans, lex_CTC_step_sn/ qed-.
 
 (* Basic_2A1: was: lpxs_strap1 *)
-lemma lpxs_step_dx (h) (G): ∀L1,L. ⦃G, L1⦄ ⊢ ⬈*[h] L →
-                            ∀L2. ⦃G, L⦄ ⊢ ⬈[h] L2 → ⦃G, L1⦄ ⊢ ⬈*[h] L2.
+lemma lpxs_step_dx (h) (G): ∀L1,L. ⦃G,L1⦄ ⊢ ⬈*[h] L →
+                            ∀L2. ⦃G,L⦄ ⊢ ⬈[h] L2 → ⦃G,L1⦄ ⊢ ⬈*[h] L2.
 /3 width=3 by lpx_cpxs_trans, lex_CTC_step_dx/ qed-.
 
 (* Eliminators with unbound rt-transition for full local environments *******)
 
 (* Basic_2A1: was: lpxs_ind_dx *)
 lemma lpxs_ind_sn (h) (G) (L2): ∀Q:predicate lenv. Q L2 →
-                                (∀L1,L. ⦃G, L1⦄ ⊢ ⬈[h] L → ⦃G, L⦄ ⊢ ⬈*[h] L2 → Q L → Q L1) →
-                                ∀L1. ⦃G, L1⦄ ⊢ ⬈*[h] L2 → Q L1.
+                                (∀L1,L. ⦃G,L1⦄ ⊢ ⬈[h] L → ⦃G,L⦄ ⊢ ⬈*[h] L2 → Q L → Q L1) →
+                                ∀L1. ⦃G,L1⦄ ⊢ ⬈*[h] L2 → Q L1.
 /3 width=7 by lpx_cpxs_trans, cpx_refl, lex_CTC_ind_sn/ qed-.
 
 (* Basic_2A1: was: lpxs_ind *)
 lemma lpxs_ind_dx (h) (G) (L1): ∀Q:predicate lenv. Q L1 →
-                                (∀L,L2. ⦃G, L1⦄ ⊢ ⬈*[h] L → ⦃G, L⦄ ⊢ ⬈[h] L2 → Q L → Q L2) →
-                                ∀L2. ⦃G, L1⦄ ⊢ ⬈*[h] L2 → Q L2.
+                                (∀L,L2. ⦃G,L1⦄ ⊢ ⬈*[h] L → ⦃G,L⦄ ⊢ ⬈[h] L2 → Q L → Q L2) →
+                                ∀L2. ⦃G,L1⦄ ⊢ ⬈*[h] L2 → Q L2.
 /3 width=7 by lpx_cpxs_trans, cpx_refl, lex_CTC_ind_dx/ qed-.
 
 (* Properties with context-sensitive extended rt-transition for terms *******)
@@ -65,7 +65,7 @@ qed-.
 (* Advanced properties ******************************************************)
 
 (* Basic_2A1: was: lpxs_pair2 *)
-lemma lpxs_pair_dx (h) (G): ∀L1,L2. ⦃G, L1⦄ ⊢ ⬈*[h] L2 →
-                            ∀V1,V2. ⦃G, L2⦄ ⊢ V1 ⬈*[h] V2 →
-                            ∀I. ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈*[h] L2.ⓑ{I}V2.
+lemma lpxs_pair_dx (h) (G): ∀L1,L2. ⦃G,L1⦄ ⊢ ⬈*[h] L2 →
+                            ∀V1,V2. ⦃G,L2⦄ ⊢ V1 ⬈*[h] V2 →
+                            ∀I. ⦃G,L1.ⓑ{I}V1⦄ ⊢ ⬈*[h] L2.ⓑ{I}V2.
 /3 width=3 by lpxs_pair, lpxs_cpxs_trans/ qed.
index 3526c22c2c3c748d9f300cf972535e6ae75e4534..dd0a02ce285de71fedd6bb640385f61745f335e7 100644 (file)
@@ -17,13 +17,14 @@ include "basic_2/rt_computation/lpxs_lpx.ma".
 
 (* UNBOUND PARALLEL RT-COMPUTATION FOR FULL LOCAL ENVIRONMENTS **************)
 
-(* Properties with degree-based equivalence on referred entries *************)
+(* Properties with sort-irrelevant equivalence on referred entries **********)
 
 (* Basic_2A1: uses: lleq_lpxs_trans *)
-lemma rdeq_lpxs_trans (h) (o) (G) (T:term): ∀L2,K2. ⦃G, L2⦄ ⊢ ⬈*[h] K2 →
-                                            ∀L1. L1 ≛[h, o, T] L2 →
-                                            ∃∃K1. ⦃G, L1⦄ ⊢ ⬈*[h] K1 & K1 ≛[h, o, T] K2.
-#h #o #G #T #L2 #K2 #H @(lpxs_ind_sn … H) -L2 /2 width=3 by ex2_intro/
+lemma rdeq_lpxs_trans (h) (G) (T:term):
+                      ∀L2,K2. ⦃G,L2⦄ ⊢ ⬈*[h] K2 →
+                      ∀L1. L1 ≛[T] L2 →
+                      ∃∃K1. ⦃G,L1⦄ ⊢ ⬈*[h] K1 & K1 ≛[T] K2.
+#h #G #T #L2 #K2 #H @(lpxs_ind_sn … H) -L2 /2 width=3 by ex2_intro/
 #L #L2 #HL2 #_ #IH #L1 #HT
 elim (rdeq_lpx_trans … HL2 … HT) -L #L #HL1 #HT
 elim (IH … HT) -L2 #K #HLK #HT
@@ -31,13 +32,13 @@ elim (IH … HT) -L2 #K #HLK #HT
 qed-.
 
 (* Basic_2A1: uses: lpxs_nlleq_inv_step_sn *)
-lemma lpxs_rdneq_inv_step_sn (h) (o) (G) (T:term):
-                             ∀L1,L2. ⦃G, L1⦄ ⊢ ⬈*[h] L2 → (L1 ≛[h, o, T] L2 → ⊥) →
-                             ∃∃L,L0. ⦃G, L1⦄ ⊢ ⬈[h] L & L1 ≛[h, o, T] L → ⊥ &
-                                     ⦃G, L⦄ ⊢ ⬈*[h] L0 & L0 ≛[h, o, T] L2.
-#h #o #G #T #L1 #L2 #H @(lpxs_ind_sn … H) -L1
+lemma lpxs_rdneq_inv_step_sn (h) (G) (T:term):
+                             ∀L1,L2. ⦃G,L1⦄ ⊢ ⬈*[h] L2 → (L1 ≛[T] L2 → ⊥) →
+                             ∃∃L,L0. ⦃G,L1⦄ ⊢ ⬈[h] L & L1 ≛[T] L → ⊥ &
+                                     ⦃G,L⦄ ⊢ ⬈*[h] L0 & L0 ≛[T] L2.
+#h #G #T #L1 #L2 #H @(lpxs_ind_sn … H) -L1
 [ #H elim H -H //
-| #L1 #L #H1 #H2 #IH2 #H12 elim (rdeq_dec h o L1 L T) #H
+| #L1 #L #H1 #H2 #IH2 #H12 elim (rdeq_dec L1 L T) #H
   [ -H1 -H2 elim IH2 -IH2 /3 width=3 by rdeq_trans/ -H12
     #L0 #L3 #H1 #H2 #H3 #H4 lapply (rdeq_rdneq_trans … H … H2) -H2
     #H2 elim (rdeq_lpx_trans … H1 … H) -L
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lsubsx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lsubsx.ma
deleted file mode 100644 (file)
index 0f46012..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/notation/relations/lsubeqx_6.ma".
-include "basic_2/rt_computation/rdsx.ma".
-
-(* CLEAR OF STRONGLY NORMALIZING ENTRIES FOR UNBOUND RT-TRANSITION **********)
-
-(* Note: this should be an instance of a more general sex *)
-(* Basic_2A1: uses: lcosx *)
-inductive lsubsx (h) (o) (G): rtmap → relation lenv ≝
-| lsubsx_atom: ∀f. lsubsx h o G f (⋆) (⋆)
-| lsubsx_push: ∀f,I,K1,K2. lsubsx h o G f K1 K2 →
-               lsubsx h o G (⫯f) (K1.ⓘ{I}) (K2.ⓘ{I})
-| lsubsx_unit: ∀f,I,K1,K2. lsubsx h o G f K1 K2 →
-               lsubsx h o G (↑f) (K1.ⓤ{I}) (K2.ⓧ)
-| lsubsx_pair: ∀f,I,K1,K2,V. G ⊢ ⬈*[h, o, V] 𝐒⦃K2⦄ →
-               lsubsx h o G f K1 K2 → lsubsx h o G (↑f) (K1.ⓑ{I}V) (K2.ⓧ)
-.
-
-interpretation
-  "local environment refinement (clear)"
-  'LSubEqX h o f G L1 L2 = (lsubsx h o G f L1 L2).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact lsubsx_inv_atom_sn_aux: ∀h,o,g,G,L1,L2. G ⊢ L1 ⊆ⓧ[h, o, g] L2 →
-                             L1 = ⋆ → L2 = ⋆.
-#h #o #g #G #L1 #L2 * -g -L1 -L2 //
-[ #f #I #K1 #K2 #_ #H destruct
-| #f #I #K1 #K2 #_ #H destruct
-| #f #I #K1 #K2 #V #_ #_ #H destruct
-]
-qed-.
-
-lemma lsubsx_inv_atom_sn: ∀h,o,g,G,L2. G ⊢ ⋆ ⊆ⓧ[h, o, g] L2 → L2 = ⋆.
-/2 width=7 by lsubsx_inv_atom_sn_aux/ qed-.
-
-fact lsubsx_inv_push_sn_aux: ∀h,o,g,G,L1,L2. G ⊢ L1 ⊆ⓧ[h, o, g] L2 →
-                             ∀f,I,K1. g = ⫯f → L1 = K1.ⓘ{I} →
-                             ∃∃K2. G ⊢ K1 ⊆ⓧ[h, o, f] K2 & L2 = K2.ⓘ{I}.
-#h #o #g #G #L1 #L2 * -g -L1 -L2
-[ #f #g #J #L1 #_ #H destruct
-| #f #I #K1 #K2 #HK12 #g #J #L1 #H1 #H2 destruct
-  <(injective_push … H1) -g /2 width=3 by ex2_intro/
-| #f #I #K1 #K2 #_ #g #J #L1 #H
-  elim (discr_next_push … H)
-| #f #I #K1 #K2 #V #_ #_ #g #J #L1 #H
-  elim (discr_next_push … H)
-]
-qed-.
-
-lemma lsubsx_inv_push_sn: ∀h,o,f,I,G,K1,L2. G ⊢ K1.ⓘ{I} ⊆ⓧ[h, o, ⫯f] L2 →
-                          ∃∃K2. G ⊢ K1 ⊆ⓧ[h, o, f] K2 & L2 = K2.ⓘ{I}.
-/2 width=5 by lsubsx_inv_push_sn_aux/ qed-.
-
-fact lsubsx_inv_unit_sn_aux: ∀h,o,g,G,L1,L2. G ⊢ L1 ⊆ⓧ[h, o, g] L2 →
-                             ∀f,I,K1. g = ↑f → L1 = K1.ⓤ{I} →
-                             ∃∃K2. G ⊢ K1 ⊆ⓧ[h, o, f] K2 & L2 = K2.ⓧ.
-#h #o #g #G #L1 #L2 * -g -L1 -L2
-[ #f #g #J #L1 #_ #H destruct
-| #f #I #K1 #K2 #_ #g #J #L1 #H
-  elim (discr_push_next … H)
-| #f #I #K1 #K2 #HK12 #g #J #L1 #H1 #H2 destruct
-  <(injective_next … H1) -g /2 width=3 by ex2_intro/
-| #f #I #K1 #K2 #V #_ #_ #g #J #L1 #_ #H destruct
-]
-qed-.
-
-lemma lsubsx_inv_unit_sn: ∀h,o,f,I,G,K1,L2. G ⊢ K1.ⓤ{I} ⊆ⓧ[h, o, ↑f] L2 →
-                          ∃∃K2. G ⊢ K1 ⊆ⓧ[h, o, f] K2 & L2 = K2.ⓧ.
-/2 width=6 by lsubsx_inv_unit_sn_aux/ qed-.
-
-fact lsubsx_inv_pair_sn_aux: ∀h,o,g,G,L1,L2. G ⊢ L1 ⊆ⓧ[h, o, g] L2 →
-                             ∀f,I,K1,V. g = ↑f → L1 = K1.ⓑ{I}V →
-                             ∃∃K2. G ⊢ ⬈*[h, o, V] 𝐒⦃K2⦄ &
-                                   G ⊢ K1 ⊆ⓧ[h, o, f] K2 & L2 = K2.ⓧ.
-#h #o #g #G #L1 #L2 * -g -L1 -L2
-[ #f #g #J #L1 #W #_ #H destruct
-| #f #I #K1 #K2 #_ #g #J #L1 #W #H
-  elim (discr_push_next … H)
-| #f #I #K1 #K2 #_ #g #J #L1 #W #_ #H destruct
-| #f #I #K1 #K2 #V #HV #HK12 #g #J #L1 #W #H1 #H2 destruct
-  <(injective_next … H1) -g /2 width=4 by ex3_intro/
-]
-qed-.
-
-(* Basic_2A1: uses: lcosx_inv_pair *)
-lemma lsubsx_inv_pair_sn: ∀h,o,f,I,G,K1,L2,V. G ⊢ K1.ⓑ{I}V ⊆ⓧ[h, o, ↑f] L2 →
-                          ∃∃K2. G ⊢ ⬈*[h, o, V] 𝐒⦃K2⦄ &
-                                G ⊢ K1 ⊆ⓧ[h, o, f] K2 & L2 = K2.ⓧ.
-/2 width=6 by lsubsx_inv_pair_sn_aux/ qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma lsubsx_inv_pair_sn_gen: ∀h,o,g,I,G,K1,L2,V. G ⊢ K1.ⓑ{I}V ⊆ⓧ[h, o, g] L2 →
-                              ∨∨ ∃∃f,K2. G ⊢ K1 ⊆ⓧ[h, o, f] K2 & g = ⫯f & L2 = K2.ⓑ{I}V
-                               | ∃∃f,K2. G ⊢ ⬈*[h, o, V] 𝐒⦃K2⦄ &
-                                         G ⊢ K1 ⊆ⓧ[h, o, f] K2 & g = ↑f & L2 = K2.ⓧ.
-#h #o #g #I #G #K1 #L2 #V #H
-elim (pn_split g) * #f #Hf destruct
-[ elim (lsubsx_inv_push_sn … H) -H /3 width=5 by ex3_2_intro, or_introl/
-| elim (lsubsx_inv_pair_sn … H) -H /3 width=6 by ex4_2_intro, or_intror/
-]
-qed-.
-
-(* Advanced forward lemmas **************************************************)
-
-lemma lsubsx_fwd_bind_sn: ∀h,o,g,I1,G,K1,L2. G ⊢ K1.ⓘ{I1} ⊆ⓧ[h, o, g] L2 →
-                          ∃∃I2,K2. G ⊢ K1 ⊆ⓧ[h, o, ⫱g] K2 & L2 = K2.ⓘ{I2}.
-#h #o #g #I1 #G #K1 #L2
-elim (pn_split g) * #f #Hf destruct
-[ #H elim (lsubsx_inv_push_sn … H) -H
-| cases I1 -I1 #I1
-  [ #H elim (lsubsx_inv_unit_sn … H) -H
-  | #V #H elim (lsubsx_inv_pair_sn … H) -H
-  ]
-]
-/2 width=4 by ex2_2_intro/
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma lsubsx_eq_repl_back: ∀h,o,G,L1,L2. eq_repl_back … (λf. G ⊢ L1 ⊆ⓧ[h, o, f] L2).
-#h #o #G #L1 #L2 #f1 #H elim H -L1 -L2 -f1 //
-[ #f #I #L1 #L2 #_ #IH #x #H
-  elim (eq_inv_px … H) -H /3 width=3 by lsubsx_push/
-| #f #I #L1 #L2 #_ #IH #x #H
-  elim (eq_inv_nx … H) -H /3 width=3 by lsubsx_unit/
-| #f #I #L1 #L2 #V #HV #_ #IH #x #H
-  elim (eq_inv_nx … H) -H /3 width=3 by lsubsx_pair/
-]
-qed-.
-
-lemma lsubsx_eq_repl_fwd: ∀h,o,G,L1,L2. eq_repl_fwd … (λf. G ⊢ L1 ⊆ⓧ[h, o, f] L2).
-#h #o #G #L1 #L2 @eq_repl_sym /2 width=3 by lsubsx_eq_repl_back/
-qed-.
-
-(* Advanced properties ******************************************************)
-
-(* Basic_2A1: uses: lcosx_O *)
-lemma lsubsx_refl: ∀h,o,f,G. 𝐈⦃f⦄ → reflexive … (lsubsx h o G f).
-#h #o #f #G #Hf #L elim L -L
-/3 width=3 by lsubsx_eq_repl_back, lsubsx_push, eq_push_inv_isid/
-qed.
-
-(* Basic_2A1: removed theorems 2:
-              lcosx_drop_trans_lt lcosx_inv_succ
-*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lsubsx_lsubsx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lsubsx_lsubsx.ma
deleted file mode 100644 (file)
index 018e5c2..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/rt_computation/lsubsx.ma".
-
-(* CLEAR OF STRONGLY NORMALIZING ENTRIES FOR UNBOUND RT-TRANSITION **********)
-
-(* Main properties **********************************************************)
-
-theorem lsubsx_fix: ∀h,o,f,G,L1,L. G ⊢ L1 ⊆ⓧ[h, o, f] L →
-                    ∀L2. G ⊢ L ⊆ⓧ[h, o, f] L2 → L = L2.
-#h #o #f #G #L1 #L #H elim H -f -L1 -L
-[ #f #L2 #H
-  >(lsubsx_inv_atom_sn … H) -L2 //
-| #f #I #K1 #K2 #_ #IH #L2 #H
-  elim (lsubsx_inv_push_sn … H) -H /3 width=1 by eq_f2/
-| #f #I #K1 #K2 #_ #IH #L2 #H
-  elim (lsubsx_inv_unit_sn … H) -H /3 width=1 by eq_f2/
-| #f #I #K1 #K2 #V #_ #_ #IH #L2 #H
-  elim (lsubsx_inv_unit_sn … H) -H /3 width=1 by eq_f2/
-]
-qed-.
-
-theorem lsubsx_trans: ∀h,o,f,G. Transitive … (lsubsx h o G f).
-#h #o #f #G #L1 #L #H1 #L2 #H2
-<(lsubsx_fix … H1 … H2) -L2 //
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lsubsx_rdsx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/lsubsx_rdsx.ma
deleted file mode 100644 (file)
index 52454a2..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/rt_computation/rdsx_drops.ma".
-include "basic_2/rt_computation/rdsx_lpxs.ma".
-include "basic_2/rt_computation/lsubsx.ma".
-
-(* CLEAR OF STRONGLY NORMALIZING ENTRIES FOR UNBOUND RT-TRANSITION **********)
-
-(* Properties with strongly normalizing referred local environments *********)
-
-(* Basic_2A1: uses: lsx_cpx_trans_lcosx *)
-lemma rdsx_cpx_trans_lsubsx (h) (o): ∀G,L0,T1,T2. ⦃G, L0⦄ ⊢ T1 ⬈[h] T2 →
-                                     ∀f,L. G ⊢ L0 ⊆ⓧ[h, o, f] L →
-                                     G ⊢ ⬈*[h, o, T1] 𝐒⦃L⦄ → G ⊢ ⬈*[h, o, T2] 𝐒⦃L⦄.
-#h #o #G #L0 #T1 #T2 #H @(cpx_ind … H) -G -L0 -T1 -T2 //
-[ #I0 #G #K0 #V1 #V2 #W2 #_ #IH #HVW2 #g #L #HK0 #HL
-  elim (lsubsx_inv_pair_sn_gen … HK0) -HK0 *
-  [ #f #K #HK0 #H1 #H2 destruct
-    /4 width=8 by rdsx_lifts, rdsx_fwd_pair, drops_refl, drops_drop/
-  | #f #K #HV1 #HK0 #H1 #H2 destruct
-    /4 width=8 by rdsx_lifts, drops_refl, drops_drop/
-  ]
-| #I0 #G #K0 #T #U #i #_ #IH #HTU #g #L #HK0 #HL
-  elim (lsubsx_fwd_bind_sn … HK0) -HK0 #I #K #HK0 #H destruct
-  /6 width=8 by rdsx_inv_lifts, rdsx_lifts, drops_refl, drops_drop/
-| #p #I0 #G #L0 #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #f #L #HL0 #HL
-  elim (rdsx_inv_bind … HL) -HL
-  /4 width=2 by lsubsx_pair, rdsx_bind_void/
-| #I0 #G #L0 #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #f #L #HL0 #HL
-  elim (rdsx_inv_flat … HL) -HL /3 width=2 by rdsx_flat/
-| #G #L0 #V #U1 #T1 #T2 #HTU1 #_ #IHT12 #f #L #HL0 #HL
-  elim (rdsx_inv_bind … HL) -HL #HV #HU1
-  /5 width=8 by rdsx_inv_lifts, drops_refl, drops_drop/
-| #G #L0 #V #T1 #T2 #_ #IHT12 #f #L #HL0 #HL
-  elim (rdsx_inv_flat … HL) -HL /2 width=2 by/
-| #G #L0 #V1 #V2 #T #_ #IHV12 #f #L #HL0 #HL
-  elim (rdsx_inv_flat … HL) -HL /2 width=2 by/
-| #p #G #L0 #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #f #L #HL0 #HL
-  elim (rdsx_inv_flat … HL) -HL #HV1 #HL
-  elim (rdsx_inv_bind … HL) -HL #HW1 #HT1
-  /4 width=2 by lsubsx_pair, rdsx_bind_void, rdsx_flat/
-| #p #G #L0 #V1 #V2 #U2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #HVU2 #f #L #HL0 #HL
-  elim (rdsx_inv_flat … HL) -HL #HV1 #HL
-  elim (rdsx_inv_bind … HL) -HL #HW1 #HT1
-  /6 width=8 by lsubsx_pair, rdsx_lifts, rdsx_bind_void, rdsx_flat, drops_refl, drops_drop/
-]
-qed-.
-
-(* Advanced properties of strongly normalizing referred local environments **)
-
-(* Basic_2A1: uses: lsx_cpx_trans_O *)
-lemma rdsx_cpx_trans (h) (o): ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ⬈[h] T2 →
-                              G ⊢ ⬈*[h, o, T1] 𝐒⦃L⦄ → G ⊢ ⬈*[h, o, T2] 𝐒⦃L⦄.
-/3 width=6 by rdsx_cpx_trans_lsubsx, lsubsx_refl/ qed-.
-
-lemma rdsx_cpxs_trans (h) (o): ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 →
-                               G ⊢ ⬈*[h, o, T1] 𝐒⦃L⦄ → G ⊢ ⬈*[h, o, T2] 𝐒⦃L⦄.
-#h #o #G #L #T1 #T2 #H
-@(cpxs_ind_dx ???????? H) -T1 //
-/3 width=3 by rdsx_cpx_trans/
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx.ma
deleted file mode 100644 (file)
index 5b62dba..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/notation/relations/predtysnstrong_5.ma".
-include "static_2/static/rdeq.ma".
-include "basic_2/rt_transition/lpx.ma".
-
-(* STRONGLY NORMALIZING REFERRED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******)
-
-definition rdsx (h) (o) (G) (T): predicate lenv ≝
-                                 SN … (lpx h G) (rdeq h o T).
-
-interpretation
-   "strong normalization for unbound context-sensitive parallel rt-transition on referred entries (local environment)"
-   'PRedTySNStrong h o T G L = (rdsx h o G T L).
-
-(* Basic eliminators ********************************************************)
-
-(* Basic_2A1: uses: lsx_ind *)
-lemma rdsx_ind (h) (o) (G) (T):
-               ∀Q:predicate lenv.
-               (∀L1. G ⊢ ⬈*[h, o, T] 𝐒⦃L1⦄ →
-                     (∀L2. ⦃G, L1⦄ ⊢ ⬈[h] L2 → (L1 ≛[h, o, T] L2 → ⊥) → Q L2) →
-                     Q L1
-               ) →
-               ∀L. G ⊢ ⬈*[h, o, T] 𝐒⦃L⦄ →  Q L.
-#h #o #G #T #Q #H0 #L1 #H elim H -L1
-/5 width=1 by SN_intro/
-qed-.
-
-(* Basic properties *********************************************************)
-
-(* Basic_2A1: uses: lsx_intro *)
-lemma rdsx_intro (h) (o) (G) (T):
-                 ∀L1.
-                 (∀L2. ⦃G, L1⦄ ⊢ ⬈[h] L2 → (L1 ≛[h, o, T] L2 → ⊥) → G ⊢ ⬈*[h, o, T] 𝐒⦃L2⦄) →
-                 G ⊢ ⬈*[h, o, T] 𝐒⦃L1⦄.
-/5 width=1 by SN_intro/ qed.
-
-(* Basic forward lemmas *****************************************************)
-
-(* Basic_2A1: uses: lsx_fwd_pair_sn lsx_fwd_bind_sn lsx_fwd_flat_sn *)
-lemma rdsx_fwd_pair_sn (h) (o) (G):
-                       ∀I,L,V,T. G ⊢ ⬈*[h, o, ②{I}V.T] 𝐒⦃L⦄ →
-                       G ⊢ ⬈*[h, o, V] 𝐒⦃L⦄.
-#h #o #G #I #L #V #T #H
-@(rdsx_ind … H) -L #L1 #_ #IHL1
-@rdsx_intro #L2 #HL12 #HnL12
-/4 width=3 by rdeq_fwd_pair_sn/
-qed-.
-
-(* Basic_2A1: uses: lsx_fwd_flat_dx *)
-lemma rdsx_fwd_flat_dx (h) (o) (G):
-                       ∀I,L,V,T. G ⊢ ⬈*[h, o, ⓕ{I}V.T] 𝐒⦃L⦄ →
-                       G ⊢ ⬈*[h, o, T] 𝐒⦃L⦄.
-#h #o #G #I #L #V #T #H 
-@(rdsx_ind … H) -L #L1 #_ #IHL1
-@rdsx_intro #L2 #HL12 #HnL12
-/4 width=3 by rdeq_fwd_flat_dx/
-qed-.
-
-fact rdsx_fwd_pair_aux (h) (o) (G): ∀L. G ⊢ ⬈*[h, o, #0] 𝐒⦃L⦄ →
-                                    ∀I,K,V. L = K.ⓑ{I}V → G ⊢ ⬈*[h, o, V] 𝐒⦃K⦄.
-#h #o #G #L #H
-@(rdsx_ind … H) -L #L1 #_ #IH #I #K1 #V #H destruct
-/5 width=5 by lpx_pair, rdsx_intro, rdeq_fwd_zero_pair/
-qed-.
-
-lemma rdsx_fwd_pair (h) (o) (G):
-                    ∀I,K,V. G ⊢ ⬈*[h, o, #0] 𝐒⦃K.ⓑ{I}V⦄ → G ⊢ ⬈*[h, o, V] 𝐒⦃K⦄.
-/2 width=4 by rdsx_fwd_pair_aux/ qed-.
-
-(* Basic inversion lemmas ***************************************************)
-
-(* Basic_2A1: uses: lsx_inv_flat *)
-lemma rdsx_inv_flat (h) (o) (G): ∀I,L,V,T. G ⊢ ⬈*[h, o, ⓕ{I}V.T] 𝐒⦃L⦄ →
-                                 ∧∧ G ⊢ ⬈*[h, o, V] 𝐒⦃L⦄ & G ⊢ ⬈*[h, o, T] 𝐒⦃L⦄.
-/3 width=3 by rdsx_fwd_pair_sn, rdsx_fwd_flat_dx, conj/ qed-.
-
-(* Basic_2A1: removed theorems 9:
-              lsx_ge_up lsx_ge
-              lsxa_ind lsxa_intro lsxa_lleq_trans lsxa_lpxs_trans lsxa_intro_lpx lsx_lsxa lsxa_inv_lsx
-*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_csx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_csx.ma
deleted file mode 100644 (file)
index 355ecb0..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/rt_computation/csx_lsubr.ma".
-include "basic_2/rt_computation/csx_cpxs.ma".
-include "basic_2/rt_computation/lsubsx_rdsx.ma".
-
-(* STRONGLY NORMALIZING REFERRED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******)
-
-(* Advanced properties ******************************************************)
-
-(* Basic_2A1: uses: lsx_lref_be_lpxs *)
-lemma rdsx_pair_lpxs (h) (o) (G):
-                     ∀K1,V. ⦃G, K1⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄ →
-                     ∀K2. G ⊢ ⬈*[h, o, V] 𝐒⦃K2⦄ → ⦃G, K1⦄ ⊢ ⬈*[h] K2 →
-                     ∀I. G ⊢ ⬈*[h, o, #0] 𝐒⦃K2.ⓑ{I}V⦄.
-#h #o #G #K1 #V #H
-@(csx_ind_cpxs … H) -V #V0 #_ #IHV0 #K2 #H
-@(rdsx_ind … H) -K2 #K0 #HK0 #IHK0 #HK10 #I
-@rdsx_intro #Y #HY #HnY
-elim (lpx_inv_pair_sn … HY) -HY #K2 #V2 #HK02 #HV02 #H destruct
-elim (tdeq_dec h o V0 V2) #HnV02 destruct [ -IHV0 -HV02 -HK0 | -IHK0 -HnY ]
-[ /5 width=5 by rdsx_rdeq_trans, lpxs_step_dx, rdeq_pair/
-| @(IHV0 … HnV02) -IHV0 -HnV02
-  [ /2 width=3 by lpxs_cpx_trans/
-  | /3 width=3 by rdsx_lpx_trans, rdsx_cpx_trans/
-  | /2 width=3 by lpxs_step_dx/
-  ]
-]
-qed.
-
-(* Basic_2A1: uses: lsx_lref_be *)
-lemma rdsx_lref_pair_drops (h) (o) (G):
-                           ∀K,V. ⦃G, K⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄ → G ⊢ ⬈*[h, o, V] 𝐒⦃K⦄ →
-                           ∀I,i,L. ⬇*[i] L ≘ K.ⓑ{I}V → G ⊢ ⬈*[h, o, #i] 𝐒⦃L⦄.
-#h #o #G #K #V #HV #HK #I #i elim i -i
-[ #L #H >(drops_fwd_isid … H) -H /2 width=3 by rdsx_pair_lpxs/
-| #i #IH #L #H
-  elim (drops_inv_bind2_isuni_next … H) -H // #J #Y #HY #H destruct
-  @(rdsx_lifts … (𝐔❴1❵)) /3 width=6 by drops_refl, drops_drop/ (**) (* full auto fails *)
-]
-qed.
-
-(* Main properties **********************************************************)
-
-(* Basic_2A1: uses: csx_lsx *)
-theorem csx_rdsx (h) (o): ∀G,L,T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ → G ⊢ ⬈*[h, o, T] 𝐒⦃L⦄.
-#h #o #G #L #T @(fqup_wf_ind_eq (Ⓕ) … G L T) -G -L -T
-#Z #Y #X #IH #G #L * * //
-[ #i #HG #HL #HT #H destruct
-  elim (csx_inv_lref … H) -H [ |*: * ]
-  [ /2 width=1 by rdsx_lref_atom/
-  | /2 width=3 by rdsx_lref_unit/
-  | /4 width=6 by rdsx_lref_pair_drops, fqup_lref/
-  ]
-| #p #I #V #T #HG #HL #HT #H destruct
-  elim (csx_fwd_bind_unit … H Void) -H /3 width=1 by rdsx_bind_void/
-| #I #V #T #HG #HL #HT #H destruct
-  elim (csx_fwd_flat … H) -H /3 width=1 by rdsx_flat/
-]
-qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_drops.ma
deleted file mode 100644 (file)
index ed5e990..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "static_2/static/rdeq_drops.ma".
-include "basic_2/rt_transition/lpx_drops.ma".
-include "basic_2/rt_computation/rdsx_length.ma".
-include "basic_2/rt_computation/rdsx_fqup.ma".
-
-(* STRONGLY NORMALIZING REFERRED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******)
-
-(* Properties with generic relocation ***************************************)
-
-(* Note: this uses length *)
-(* Basic_2A1: uses: lsx_lift_le lsx_lift_ge *)
-lemma rdsx_lifts (h) (o) (G): d_liftable1_isuni … (λL,T. G ⊢ ⬈*[h, o, T] 𝐒⦃L⦄).
-#h #o #G #K #T #H @(rdsx_ind … H) -K
-#K1 #_ #IH #b #f #L1 #HLK1 #Hf #U #HTU @rdsx_intro
-#L2 #HL12 #HnL12 elim (lpx_drops_conf … HLK1 … HL12) 
-/5 width=9 by rdeq_lifts_bi, lpx_fwd_length/
-qed-.
-
-(* Inversion lemmas on relocation *******************************************)
-
-(* Basic_2A1: uses: lsx_inv_lift_le lsx_inv_lift_be lsx_inv_lift_ge *)
-lemma rdsx_inv_lifts (h) (o) (G): d_deliftable1_isuni … (λL,T. G ⊢ ⬈*[h, o, T] 𝐒⦃L⦄).
-#h #o #G #L #U #H @(rdsx_ind … H) -L
-#L1 #_ #IH #b #f #K1 #HLK1 #Hf #T #HTU @rdsx_intro
-#K2 #HK12 #HnK12 elim (drops_lpx_trans … HLK1 … HK12) -HK12
-/4 width=10 by rdeq_inv_lifts_bi/
-qed-.
-
-(* Advanced properties ******************************************************)
-
-(* Basic_2A1: uses: lsx_lref_free *)
-lemma rdsx_lref_atom (h) (o) (G): ∀L,i. ⬇*[Ⓕ, 𝐔❴i❵] L ≘ ⋆ → G ⊢ ⬈*[h, o, #i] 𝐒⦃L⦄.
-#h #o #G #L1 #i #HL1
-@(rdsx_lifts … (#0) … HL1) -HL1 //
-qed.
-
-(* Basic_2A1: uses: lsx_lref_skip *)
-lemma rdsx_lref_unit (h) (o) (G): ∀I,L,K,i. ⬇*[i] L ≘ K.ⓤ{I} → G ⊢ ⬈*[h, o, #i] 𝐒⦃L⦄.
-#h #o #G #I #L1 #K1 #i #HL1
-@(rdsx_lifts … (#0) … HL1) -HL1 //
-qed.
-
-(* Advanced forward lemmas **************************************************)
-
-(* Basic_2A1: uses: lsx_fwd_lref_be *)
-lemma rdsx_fwd_lref_pair (h) (o) (G):
-                         ∀L,i. G ⊢ ⬈*[h, o, #i] 𝐒⦃L⦄ →
-                         ∀I,K,V. ⬇*[i] L ≘ K.ⓑ{I}V → G ⊢ ⬈*[h, o, V] 𝐒⦃K⦄.
-#h #o #G #L #i #HL #I #K #V #HLK
-lapply (rdsx_inv_lifts … HL … HLK … (#0) ?) -L
-/2 width=2 by rdsx_fwd_pair/
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_fqup.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_fqup.ma
deleted file mode 100644 (file)
index 2913cb9..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "static_2/static/rdeq_fqup.ma".
-include "basic_2/rt_computation/rdsx.ma".
-
-(* STRONGLY NORMALIZING REFERRED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******)
-
-(* Advanced properties ******************************************************)
-
-(* Basic_2A1: uses: lsx_atom *)
-lemma lfsx_atom (h) (o) (G) (T): G ⊢ ⬈*[h, o, T] 𝐒⦃⋆⦄.
-#h #o #G #T
-@rdsx_intro #Y #H #HnT
-lapply (lpx_inv_atom_sn … H) -H #H destruct
-elim HnT -HnT //
-qed.
-
-(* Advanced forward lemmas **************************************************)
-
-(* Basic_2A1: uses: lsx_fwd_bind_dx *)
-(* Note: the exclusion binder (ⓧ) makes this more elegant and much simpler *)
-(* Note: the old proof without the exclusion binder requires lreq *)
-lemma rdsx_fwd_bind_dx (h) (o) (G):
-                       ∀p,I,L,V,T. G ⊢ ⬈*[h, o, ⓑ{p,I}V.T] 𝐒⦃L⦄ →
-                       G ⊢ ⬈*[h, o, T] 𝐒⦃L.ⓧ⦄.
-#h #o #G #p #I #L #V #T #H
-@(rdsx_ind … H) -L #L1 #_ #IH
-@rdsx_intro #Y #H #HT
-elim (lpx_inv_unit_sn … H) -H #L2 #HL12 #H destruct
-/4 width=4 by rdeq_fwd_bind_dx_void/
-qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-(* Basic_2A1: uses: lsx_inv_bind *)
-lemma rdsx_inv_bind (h) (o) (G): ∀p,I,L,V,T. G ⊢ ⬈*[h, o, ⓑ{p,I}V.T] 𝐒⦃L⦄ →
-                                 ∧∧ G ⊢ ⬈*[h, o, V] 𝐒⦃L⦄ & G ⊢ ⬈*[h, o, T] 𝐒⦃L.ⓧ⦄.
-/3 width=4 by rdsx_fwd_pair_sn, rdsx_fwd_bind_dx, conj/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_length.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_length.ma
deleted file mode 100644 (file)
index 2245199..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "static_2/static/rdeq_length.ma".
-include "basic_2/rt_transition/lpx_length.ma".
-include "basic_2/rt_computation/rdsx.ma".
-
-(* STRONGLY NORMALIZING REFERRED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******)
-
-(* Advanced properties ******************************************************)
-
-(* Basic_2A1: uses: lsx_sort *)
-lemma rdsx_sort (h) (o) (G): ∀L,s. G ⊢ ⬈*[h, o, ⋆s] 𝐒⦃L⦄.
-#h #o #G #L1 #s @rdsx_intro #L2 #H #Hs
-elim Hs -Hs /3 width=3 by lpx_fwd_length, rdeq_sort_length/
-qed.
-
-(* Basic_2A1: uses: lsx_gref *)
-lemma rdsx_gref (h) (o) (G): ∀L,l. G ⊢ ⬈*[h, o, §l] 𝐒⦃L⦄.
-#h #o #G #L1 #s @rdsx_intro #L2 #H #Hs
-elim Hs -Hs /3 width=3 by lpx_fwd_length, rdeq_gref_length/
-qed.
-
-lemma rdsx_unit (h) (o) (G): ∀I,L. G ⊢ ⬈*[h, o, #0] 𝐒⦃L.ⓤ{I}⦄.
-#h #o #G #I #L1 @rdsx_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, rdeq_unit_length/
-qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_lpxs.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_lpxs.ma
deleted file mode 100644 (file)
index 0664921..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/rt_computation/lpxs_rdeq.ma".
-include "basic_2/rt_computation/lpxs_lpxs.ma".
-include "basic_2/rt_computation/rdsx_rdsx.ma".
-
-(* STRONGLY NORMALIZING REFERRED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******)
-
-(* Properties with unbound rt-computation for full local environments *******)
-
-(* Basic_2A1: uses: lsx_intro_alt *)
-lemma rdsx_intro_lpxs (h) (o) (G):
-                      ∀L1,T. (∀L2. ⦃G, L1⦄ ⊢ ⬈*[h] L2 → (L1 ≛[h, o, T] L2 → ⊥) → G ⊢ ⬈*[h, o, T] 𝐒⦃L2⦄) →
-                      G ⊢ ⬈*[h, o, T] 𝐒⦃L1⦄.
-/4 width=1 by lpx_lpxs, rdsx_intro/ qed-.
-
-(* Basic_2A1: uses: lsx_lpxs_trans *)
-lemma rdsx_lpxs_trans (h) (o) (G): ∀L1,T. G ⊢ ⬈*[h, o, T] 𝐒⦃L1⦄ →
-                                   ∀L2. ⦃G, L1⦄ ⊢ ⬈*[h] L2 → G ⊢ ⬈*[h, o, T] 𝐒⦃L2⦄.
-#h #o #G #L1 #T #HL1 #L2 #H @(lpxs_ind_dx … H) -L2
-/2 width=3 by rdsx_lpx_trans/
-qed-.
-
-(* Eliminators with unbound rt-computation for full local environments ******)
-
-lemma rdsx_ind_lpxs_rdeq (h) (o) (G):
-                         ∀T. ∀Q:predicate lenv.
-                         (∀L1. G ⊢ ⬈*[h, o, T] 𝐒⦃L1⦄ →
-                               (∀L2. ⦃G, L1⦄ ⊢ ⬈*[h] L2 → (L1 ≛[h, o, T] L2 → ⊥) → Q L2) →
-                               Q L1
-                         ) →
-                         ∀L1. G ⊢ ⬈*[h, o, T] 𝐒⦃L1⦄  →
-                         ∀L0. ⦃G, L1⦄ ⊢ ⬈*[h] L0 → ∀L2. L0 ≛[h, o, T] L2 → Q L2.
-#h #o #G #T #Q #IH #L1 #H @(rdsx_ind … H) -L1
-#L1 #HL1 #IH1 #L0 #HL10 #L2 #HL02
-@IH -IH /3 width=3 by rdsx_lpxs_trans, rdsx_rdeq_trans/ -HL1 #K2 #HLK2 #HnLK2
-lapply (rdeq_rdneq_trans … HL02 … HnLK2) -HnLK2 #H
-elim (rdeq_lpxs_trans … HLK2 … HL02) -L2 #K0 #HLK0 #HK02
-lapply (rdneq_rdeq_canc_dx … H … HK02) -H #HnLK0
-elim (rdeq_dec h o L1 L0 T) #H
-[ lapply (rdeq_rdneq_trans … H … HnLK0) -H -HnLK0 #Hn10
-  lapply (lpxs_trans … HL10 … HLK0) -L0 #H10
-  elim (lpxs_rdneq_inv_step_sn … H10 …  Hn10) -H10 -Hn10
-  /3 width=8 by rdeq_trans/
-| elim (lpxs_rdneq_inv_step_sn … HL10 … H) -HL10 -H #L #K #HL1 #HnL1 #HLK #HKL0
-  elim (rdeq_lpxs_trans … HLK0 … HKL0) -L0
-  /3 width=8 by lpxs_trans, rdeq_trans/
-]
-qed-.
-
-(* Basic_2A1: uses: lsx_ind_alt *)
-lemma rdsx_ind_lpxs (h) (o) (G):
-                    ∀T. ∀Q:predicate lenv.
-                    (∀L1. G ⊢ ⬈*[h, o, T] 𝐒⦃L1⦄ →
-                          (∀L2. ⦃G, L1⦄ ⊢ ⬈*[h] L2 → (L1 ≛[h, o, T] L2 → ⊥) → Q L2) →
-                          Q L1
-                    ) →
-                    ∀L. G ⊢ ⬈*[h, o, T] 𝐒⦃L⦄  → Q L.
-#h #o #G #T #Q #IH #L #HL
-@(rdsx_ind_lpxs_rdeq … IH … HL) -IH -HL // (**) (* full auto fails *)
-qed-.
-
-(* Advanced properties ******************************************************)
-
-fact rdsx_bind_lpxs_aux (h) (o) (G):
-                        ∀p,I,L1,V. G ⊢ ⬈*[h, o, V] 𝐒⦃L1⦄ →
-                        ∀Y,T. G ⊢ ⬈*[h, o, T] 𝐒⦃Y⦄ →
-                        ∀L2. Y = L2.ⓑ{I}V → ⦃G, L1⦄ ⊢ ⬈*[h] L2 →
-                        G ⊢ ⬈*[h, o, ⓑ{p,I}V.T] 𝐒⦃L2⦄.
-#h #o #G #p #I #L1 #V #H @(rdsx_ind_lpxs … H) -L1
-#L1 #_ #IHL1 #Y #T #H @(rdsx_ind_lpxs … H) -Y
-#Y #HY #IHY #L2 #H #HL12 destruct
-@rdsx_intro_lpxs #L0 #HL20
-lapply (lpxs_trans … HL12 … HL20) #HL10 #H
-elim (rdneq_inv_bind … H) -H [ -IHY | -HY -IHL1 -HL12 ]
-[ #HnV elim (rdeq_dec h o L1 L2 V)
-  [ #HV @(IHL1 … HL10) -IHL1 -HL12 -HL10
-    /3 width=4 by rdsx_lpxs_trans, lpxs_bind_refl_dx, rdeq_canc_sn/ (**) (* full auto too slow *)
-  | -HnV -HL10 /4 width=4 by rdsx_lpxs_trans, lpxs_bind_refl_dx/
-  ]
-| /3 width=4 by lpxs_bind_refl_dx/
-]
-qed-.
-
-(* Basic_2A1: uses: lsx_bind *)
-lemma rdsx_bind (h) (o) (G):
-                ∀p,I,L,V. G ⊢ ⬈*[h, o, V] 𝐒⦃L⦄ →
-                ∀T. G ⊢ ⬈*[h, o, T] 𝐒⦃L.ⓑ{I}V⦄ →
-                G ⊢ ⬈*[h, o, ⓑ{p,I}V.T] 𝐒⦃L⦄.
-/2 width=3 by rdsx_bind_lpxs_aux/ qed.
-
-(* Basic_2A1: uses: lsx_flat_lpxs *)
-lemma rdsx_flat_lpxs (h) (o) (G):
-                     ∀I,L1,V. G ⊢ ⬈*[h, o, V] 𝐒⦃L1⦄ →
-                     ∀L2,T. G ⊢ ⬈*[h, o, T] 𝐒⦃L2⦄ → ⦃G, L1⦄ ⊢ ⬈*[h] L2 →
-                     G ⊢ ⬈*[h, o, ⓕ{I}V.T] 𝐒⦃L2⦄.
-#h #o #G #I #L1 #V #H @(rdsx_ind_lpxs … H) -L1
-#L1 #HL1 #IHL1 #L2 #T #H @(rdsx_ind_lpxs … H) -L2
-#L2 #HL2 #IHL2 #HL12 @rdsx_intro_lpxs
-#L0 #HL20 lapply (lpxs_trans … HL12 … HL20)
-#HL10 #H elim (rdneq_inv_flat … H) -H [ -HL1 -IHL2 | -HL2 -IHL1 ]
-[ #HnV elim (rdeq_dec h o L1 L2 V)
-  [ #HV @(IHL1 … HL10) -IHL1 -HL12 -HL10
-    /3 width=5 by rdsx_lpxs_trans, rdeq_canc_sn/ (**) (* full auto too slow: 47s *)
-  | -HnV -HL10 /3 width=4 by rdsx_lpxs_trans/
-  ]
-| /3 width=3 by/
-]
-qed-.
-
-(* Basic_2A1: uses: lsx_flat *)
-lemma rdsx_flat (h) (o) (G):
-                ∀I,L,V. G ⊢ ⬈*[h, o, V] 𝐒⦃L⦄ →
-                ∀T. G ⊢ ⬈*[h, o, T] 𝐒⦃L⦄ → G ⊢ ⬈*[h, o, ⓕ{I}V.T] 𝐒⦃L⦄.
-/2 width=3 by rdsx_flat_lpxs/ qed.
-
-fact rdsx_bind_lpxs_void_aux (h) (o) (G):
-                             ∀p,I,L1,V. G ⊢ ⬈*[h, o, V] 𝐒⦃L1⦄ →
-                             ∀Y,T. G ⊢ ⬈*[h, o, T] 𝐒⦃Y⦄ →
-                             ∀L2. Y = L2.ⓧ → ⦃G, L1⦄ ⊢ ⬈*[h] L2 →
-                             G ⊢ ⬈*[h, o, ⓑ{p,I}V.T] 𝐒⦃L2⦄.
-#h #o #G #p #I #L1 #V #H @(rdsx_ind_lpxs … H) -L1
-#L1 #_ #IHL1 #Y #T #H @(rdsx_ind_lpxs … H) -Y
-#Y #HY #IHY #L2 #H #HL12 destruct
-@rdsx_intro_lpxs #L0 #HL20
-lapply (lpxs_trans … HL12 … HL20) #HL10 #H
-elim (rdneq_inv_bind_void … H) -H [ -IHY | -HY -IHL1 -HL12 ]
-[ #HnV elim (rdeq_dec h o L1 L2 V)
-  [ #HV @(IHL1 … HL10) -IHL1 -HL12 -HL10
-    /3 width=6 by rdsx_lpxs_trans, lpxs_bind_refl_dx, rdeq_canc_sn/ (**) (* full auto too slow *)
-  | -HnV -HL10 /4 width=4 by rdsx_lpxs_trans, lpxs_bind_refl_dx/
-  ]
-| /3 width=4 by lpxs_bind_refl_dx/
-]
-qed-.
-
-lemma rdsx_bind_void (h) (o) (G):
-                     ∀p,I,L,V. G ⊢ ⬈*[h, o, V] 𝐒⦃L⦄ →
-                     ∀T. G ⊢ ⬈*[h, o, T] 𝐒⦃L.ⓧ⦄ →
-                     G ⊢ ⬈*[h, o, ⓑ{p,I}V.T] 𝐒⦃L⦄.
-/2 width=3 by rdsx_bind_lpxs_void_aux/ qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_rdsx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/rdsx_rdsx.ma
deleted file mode 100644 (file)
index 2305aac..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/rt_transition/lpx_rdeq.ma".
-include "basic_2/rt_computation/rdsx.ma".
-
-(* STRONGLY NORMALIZING REFERRED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******)
-
-(* Advanced properties ******************************************************)
-
-(* Basic_2A1: uses: lsx_lleq_trans *)
-lemma rdsx_rdeq_trans (h) (o) (G):
-                      ∀L1,T. G ⊢ ⬈*[h, o, T] 𝐒⦃L1⦄ →
-                      ∀L2. L1 ≛[h, o, T] L2 → G ⊢ ⬈*[h, o, T] 𝐒⦃L2⦄.
-#h #o #G #L1 #T #H @(rdsx_ind … H) -L1
-#L1 #_ #IHL1 #L2 #HL12 @rdsx_intro
-#L #HL2 #HnL2 elim (rdeq_lpx_trans … HL2 … HL12) -HL2
-/4 width=5 by rdeq_repl/
-qed-.
-
-(* Basic_2A1: uses: lsx_lpx_trans *)
-lemma rdsx_lpx_trans (h) (o) (G):
-                     ∀L1,T. G ⊢ ⬈*[h, o, T] 𝐒⦃L1⦄ →
-                     ∀L2. ⦃G, L1⦄ ⊢ ⬈[h] L2 → G ⊢ ⬈*[h, o, T] 𝐒⦃L2⦄.
-#h #o #G #L1 #T #H @(rdsx_ind … H) -L1 #L1 #HL1 #IHL1 #L2 #HL12
-elim (rdeq_dec h o L1 L2 T) /3 width=4 by rdsx_rdeq_trans/
-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
new file mode 100644 (file)
index 0000000..43e4b04
--- /dev/null
@@ -0,0 +1,95 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/notation/relations/predtysnstrong_4.ma".
+include "static_2/static/rdeq.ma".
+include "basic_2/rt_transition/lpx.ma".
+
+(* STRONGLY NORMALIZING REFERRED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******)
+
+definition rsx (h) (G) (T): predicate lenv ≝
+           SN … (lpx h G) (rdeq T).
+
+interpretation
+   "strong normalization for unbound context-sensitive parallel rt-transition on referred entries (local environment)"
+   'PRedTySNStrong h T G L = (rsx h G T L).
+
+(* Basic eliminators ********************************************************)
+
+(* Basic_2A1: uses: lsx_ind *)
+lemma rsx_ind (h) (G) (T) (Q:predicate lenv):
+      (∀L1. G ⊢ ⬈*[h,T] 𝐒⦃L1⦄ →
+            (∀L2. ⦃G,L1⦄ ⊢ ⬈[h] L2 → (L1 ≛[T] L2 → ⊥) → Q L2) →
+            Q L1
+      ) →
+      ∀L. G ⊢ ⬈*[h,T] 𝐒⦃L⦄ →  Q L.
+#h #G #T #Q #H0 #L1 #H elim H -L1
+/5 width=1 by SN_intro/
+qed-.
+
+(* Basic properties *********************************************************)
+
+(* Basic_2A1: uses: lsx_intro *)
+lemma rsx_intro (h) (G) (T):
+      ∀L1.
+      (∀L2. ⦃G,L1⦄ ⊢ ⬈[h] L2 → (L1 ≛[T] L2 → ⊥) → G ⊢ ⬈*[h,T] 𝐒⦃L2⦄) →
+      G ⊢ ⬈*[h,T] 𝐒⦃L1⦄.
+/5 width=1 by SN_intro/ qed.
+
+(* Basic forward lemmas *****************************************************)
+
+(* Basic_2A1: uses: lsx_fwd_pair_sn lsx_fwd_bind_sn lsx_fwd_flat_sn *)
+lemma rsx_fwd_pair_sn (h) (G):
+      ∀I,L,V,T. G ⊢ ⬈*[h,②{I}V.T] 𝐒⦃L⦄ →
+      G ⊢ ⬈*[h,V] 𝐒⦃L⦄.
+#h #G #I #L #V #T #H
+@(rsx_ind … H) -L #L1 #_ #IHL1
+@rsx_intro #L2 #HL12 #HnL12
+/4 width=3 by rdeq_fwd_pair_sn/
+qed-.
+
+(* Basic_2A1: uses: lsx_fwd_flat_dx *)
+lemma rsx_fwd_flat_dx (h) (G):
+      ∀I,L,V,T. G ⊢ ⬈*[h,ⓕ{I}V.T] 𝐒⦃L⦄ →
+      G ⊢ ⬈*[h,T] 𝐒⦃L⦄.
+#h #G #I #L #V #T #H 
+@(rsx_ind … H) -L #L1 #_ #IHL1
+@rsx_intro #L2 #HL12 #HnL12
+/4 width=3 by rdeq_fwd_flat_dx/
+qed-.
+
+fact rsx_fwd_pair_aux (h) (G):
+     ∀L. G ⊢ ⬈*[h,#0] 𝐒⦃L⦄ →
+     ∀I,K,V. L = K.ⓑ{I}V → G ⊢ ⬈*[h,V] 𝐒⦃K⦄.
+#h #G #L #H
+@(rsx_ind … H) -L #L1 #_ #IH #I #K1 #V #H destruct
+/5 width=5 by lpx_pair, rsx_intro, rdeq_fwd_zero_pair/
+qed-.
+
+lemma rsx_fwd_pair (h) (G):
+      ∀I,K,V. G ⊢ ⬈*[h,#0] 𝐒⦃K.ⓑ{I}V⦄ → G ⊢ ⬈*[h,V] 𝐒⦃K⦄.
+/2 width=4 by rsx_fwd_pair_aux/ qed-.
+
+(* Basic inversion lemmas ***************************************************)
+
+(* Basic_2A1: uses: lsx_inv_flat *)
+lemma rsx_inv_flat (h) (G):
+      ∀I,L,V,T. G ⊢ ⬈*[h,ⓕ{I}V.T] 𝐒⦃L⦄ →
+      ∧∧ G ⊢ ⬈*[h,V] 𝐒⦃L⦄ & G ⊢ ⬈*[h,T] 𝐒⦃L⦄.
+/3 width=3 by rsx_fwd_pair_sn, rsx_fwd_flat_dx, conj/ qed-.
+
+(* Basic_2A1: removed theorems 9:
+              lsx_ge_up lsx_ge
+              lsxa_ind lsxa_intro lsxa_lleq_trans lsxa_lpxs_trans lsxa_intro_lpx lsx_lsxa lsxa_inv_lsx
+*)
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
new file mode 100644 (file)
index 0000000..2e12948
--- /dev/null
@@ -0,0 +1,133 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/csx_lsubr.ma".
+include "basic_2/rt_computation/csx_cpxs.ma".
+include "basic_2/rt_computation/jsx_rsx.ma".
+
+(* STRONGLY NORMALIZING REFERRED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******)
+
+(* Forward lemmas with strongly rt-normalizing terms ************************)
+
+fact rsx_fwd_lref_pair_csx_aux (h) (G):
+     ∀L. G ⊢ ⬈*[h,#0] 𝐒⦃L⦄ →
+     ∀I,K,V. L = K.ⓑ{I}V → ⦃G,K⦄ ⊢ ⬈*[h] 𝐒⦃V⦄.
+#h #G #L #H
+@(rsx_ind … H) -L #L #_ #IH #I #K #V1 #H destruct
+@csx_intro #V2 #HV12 #HnV12
+@(IH … I) -IH [1,4: // | -HnV12 | -G #H ]
+[ /2 width=1 by lpx_pair/
+| elim (rdeq_inv_zero_pair_sn … H) -H #Y #X #_ #H1 #H2 destruct -I
+  /2 width=1 by/
+]
+qed-.
+
+lemma rsx_fwd_lref_pair_csx (h) (G):
+      ∀I,K,V. G ⊢ ⬈*[h,#0] 𝐒⦃K.ⓑ{I}V⦄ → ⦃G,K⦄ ⊢ ⬈*[h] 𝐒⦃V⦄.
+/2 width=4 by rsx_fwd_lref_pair_csx_aux/ qed-.
+
+lemma rsx_fwd_lref_pair_csx_drops (h) (G):
+      ∀I,K,V,i,L. ⬇*[i] L ≘ K.ⓑ{I}V → G ⊢ ⬈*[h,#i] 𝐒⦃L⦄ → ⦃G,K⦄ ⊢ ⬈*[h] 𝐒⦃V⦄.
+#h #G #I #K #V #i elim i -i
+[ #L #H >(drops_fwd_isid … H) -H
+  /2 width=2 by rsx_fwd_lref_pair_csx/
+| #i #IH #L #H1 #H2
+  elim (drops_inv_bind2_isuni_next … H1) -H1 // #J #Y #HY #H destruct
+  lapply (rsx_inv_lifts … H2 … (𝐔❴1❵) ?????) -H2
+  /3 width=6 by drops_refl, drops_drop/
+]
+qed-.
+
+(* Inversion lemmas with strongly rt-normalizing terms **********************)
+
+lemma rsx_inv_lref_pair (h) (G):
+      ∀I,K,V. G ⊢ ⬈*[h,#0] 𝐒⦃K.ⓑ{I}V⦄ →
+      ∧∧ ⦃G,K⦄ ⊢ ⬈*[h] 𝐒⦃V⦄  & G ⊢ ⬈*[h,V] 𝐒⦃K⦄.
+/3 width=2 by rsx_fwd_lref_pair_csx, rsx_fwd_pair, conj/ qed-.
+
+lemma rsx_inv_lref_pair_drops (h) (G):
+      ∀I,K,V,i,L. ⬇*[i] L ≘ K.ⓑ{I}V → G ⊢ ⬈*[h,#i] 𝐒⦃L⦄ →
+      ∧∧ ⦃G,K⦄ ⊢ ⬈*[h] 𝐒⦃V⦄ & G ⊢ ⬈*[h,V] 𝐒⦃K⦄.
+/3 width=5 by rsx_fwd_lref_pair_csx_drops, rsx_fwd_lref_pair_drops, conj/ qed-.
+
+lemma rsx_inv_lref_drops (h) (G):
+      ∀L,i. G ⊢ ⬈*[h,#i] 𝐒⦃L⦄ →
+      ∨∨ ⬇*[Ⓕ,𝐔❴i❵] L ≘ ⋆
+       | ∃∃I,K. ⬇*[i] L ≘ K.ⓤ{I}
+       | ∃∃I,K,V. ⬇*[i] L ≘ K.ⓑ{I}V & ⦃G,K⦄ ⊢ ⬈*[h] 𝐒⦃V⦄ & G ⊢ ⬈*[h,V] 𝐒⦃K⦄.
+#h #G #L #i #H elim (drops_F_uni L i)
+[ /2 width=1 by or3_intro0/
+| * * /4 width=10 by rsx_fwd_lref_pair_csx_drops, rsx_fwd_lref_pair_drops, ex3_3_intro, ex1_2_intro, or3_intro2, or3_intro1/
+]
+qed-.
+
+(* Properties with strongly rt-normalizing terms ****************************)
+
+(* Note: swapping the eliminations to avoid rsx_cpx_trans: no solution found *)
+(* Basic_2A1: uses: lsx_lref_be_lpxs *)
+lemma rsx_lref_pair_lpxs (h) (G):
+      ∀K1,V. ⦃G,K1⦄ ⊢ ⬈*[h] 𝐒⦃V⦄ →
+      ∀K2. G ⊢ ⬈*[h,V] 𝐒⦃K2⦄ → ⦃G,K1⦄ ⊢ ⬈*[h] K2 →
+      ∀I. G ⊢ ⬈*[h,#0] 𝐒⦃K2.ⓑ{I}V⦄.
+#h #G #K1 #V #H
+@(csx_ind_cpxs … H) -V #V0 #_ #IHV0 #K2 #H
+@(rsx_ind … H) -K2 #K0 #HK0 #IHK0 #HK10 #I
+@rsx_intro #Y #HY #HnY
+elim (lpx_inv_pair_sn … HY) -HY #K2 #V2 #HK02 #HV02 #H destruct
+elim (tdeq_dec V0 V2) #HnV02 destruct [ -IHV0 -HV02 -HK0 | -IHK0 -HnY ]
+[ /5 width=5 by rsx_rdeq_trans, lpxs_step_dx, rdeq_pair/
+| @(IHV0 … HnV02) -IHV0 -HnV02
+  [ /2 width=3 by lpxs_cpx_trans/
+  | /3 width=3 by rsx_lpx_trans, rsx_cpx_trans/
+  | /2 width=3 by lpxs_step_dx/
+  ]
+]
+qed.
+
+lemma rsx_lref_pair (h) (G):
+      ∀K,V. ⦃G,K⦄ ⊢ ⬈*[h] 𝐒⦃V⦄ → G ⊢ ⬈*[h,V] 𝐒⦃K⦄ → ∀I. G ⊢ ⬈*[h,#0] 𝐒⦃K.ⓑ{I}V⦄.
+/2 width=3 by rsx_lref_pair_lpxs/ qed.
+
+(* Basic_2A1: uses: lsx_lref_be *)
+lemma rsx_lref_pair_drops (h) (G):
+      ∀K,V. ⦃G,K⦄ ⊢ ⬈*[h] 𝐒⦃V⦄ → G ⊢ ⬈*[h,V] 𝐒⦃K⦄ →
+      ∀I,i,L. ⬇*[i] L ≘ K.ⓑ{I}V → G ⊢ ⬈*[h,#i] 𝐒⦃L⦄.
+#h #G #K #V #HV #HK #I #i elim i -i
+[ #L #H >(drops_fwd_isid … H) -H /2 width=1 by rsx_lref_pair/
+| #i #IH #L #H
+  elim (drops_inv_bind2_isuni_next … H) -H // #J #Y #HY #H destruct
+  @(rsx_lifts … (𝐔❴1❵)) /3 width=6 by drops_refl, drops_drop/ (**) (* full auto fails *)
+]
+qed.
+
+(* Main properties with strongly rt-normalizing terms ***********************)
+
+(* Basic_2A1: uses: csx_lsx *)
+theorem csx_rsx (h) (G): ∀L,T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ → G ⊢ ⬈*[h,T] 𝐒⦃L⦄.
+#h #G #L #T @(fqup_wf_ind_eq (Ⓣ) … G L T) -G -L -T
+#Z #Y #X #IH #G #L * *
+[ //
+| #i #HG #HL #HT #H destruct
+  elim (csx_inv_lref_drops … H) -H [ |*: * ]
+  [ /2 width=1 by rsx_lref_atom_drops/
+  | /2 width=3 by rsx_lref_unit_drops/
+  | /4 width=6 by rsx_lref_pair_drops, fqup_lref/
+  ]
+| //
+| #p #I #V #T #HG #HL #HT #H destruct
+  elim (csx_fwd_bind … H) -H /3 width=1 by rsx_bind/
+| #I #V #T #HG #HL #HT #H destruct
+  elim (csx_fwd_flat … H) -H /3 width=1 by rsx_flat/
+]
+qed.
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
new file mode 100644 (file)
index 0000000..64ebcd6
--- /dev/null
@@ -0,0 +1,66 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/static/rdeq_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".
+
+(* STRONGLY NORMALIZING REFERRED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******)
+
+(* Properties with generic relocation ***************************************)
+
+(* Note: this uses length *)
+(* Basic_2A1: uses: lsx_lift_le lsx_lift_ge *)
+lemma rsx_lifts (h) (G): d_liftable1_isuni … (λL,T. G ⊢ ⬈*[h,T] 𝐒⦃L⦄).
+#h #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 rdeq_lifts_bi, lpx_fwd_length/
+qed-.
+
+(* Inversion lemmas on relocation *******************************************)
+
+(* Basic_2A1: uses: lsx_inv_lift_le lsx_inv_lift_be lsx_inv_lift_ge *)
+lemma rsx_inv_lifts (h) (G): d_deliftable1_isuni … (λL,T. G ⊢ ⬈*[h,T] 𝐒⦃L⦄).
+#h #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 rdeq_inv_lifts_bi/
+qed-.
+
+(* Advanced properties ******************************************************)
+
+(* Basic_2A1: uses: lsx_lref_free *)
+lemma rsx_lref_atom_drops (h) (G): ∀L,i. ⬇*[Ⓕ,𝐔❴i❵] L ≘ ⋆ → G ⊢ ⬈*[h,#i] 𝐒⦃L⦄.
+#h #G #L1 #i #HL1
+@(rsx_lifts … (#0) … HL1) -HL1 //
+qed.
+
+(* Basic_2A1: uses: lsx_lref_skip *)
+lemma rsx_lref_unit_drops (h) (G): ∀I,L,K,i. ⬇*[i] L ≘ K.ⓤ{I} → G ⊢ ⬈*[h,#i] 𝐒⦃L⦄.
+#h #G #I #L1 #K1 #i #HL1
+@(rsx_lifts … (#0) … HL1) -HL1 //
+qed.
+
+(* Advanced forward lemmas **************************************************)
+
+(* Basic_2A1: uses: lsx_fwd_lref_be *)
+lemma rsx_fwd_lref_pair_drops (h) (G):
+      ∀L,i. G ⊢ ⬈*[h,#i] 𝐒⦃L⦄ →
+      ∀I,K,V. ⬇*[i] L ≘ K.ⓑ{I}V → G ⊢ ⬈*[h,V] 𝐒⦃K⦄.
+#h #G #L #i #HL #I #K #V #HLK
+lapply (rsx_inv_lifts … HL … HLK … (#0) ?) -L
+/2 width=2 by rsx_fwd_pair/
+qed-.
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
new file mode 100644 (file)
index 0000000..b41e150
--- /dev/null
@@ -0,0 +1,50 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/static/rdeq_fqup.ma".
+include "basic_2/rt_computation/rsx.ma".
+
+(* STRONGLY NORMALIZING REFERRED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******)
+
+(* Advanced properties ******************************************************)
+
+(* Basic_2A1: uses: lsx_atom *)
+lemma lfsx_atom (h) (G) (T): G ⊢ ⬈*[h,T] 𝐒⦃⋆⦄.
+#h #G #T
+@rsx_intro #Y #H #HnT
+lapply (lpx_inv_atom_sn … H) -H #H destruct
+elim HnT -HnT //
+qed.
+
+(* Advanced forward lemmas **************************************************)
+
+(* Basic_2A1: uses: lsx_fwd_bind_dx *)
+(* Note: the exclusion binder (ⓧ) makes this more elegant and much simpler *)
+(* Note: the old proof without the exclusion binder requires lreq *)
+lemma rsx_fwd_bind_dx_void (h) (G):
+      ∀p,I,L,V,T. G ⊢ ⬈*[h,ⓑ{p,I}V.T] 𝐒⦃L⦄ → G ⊢ ⬈*[h,T] 𝐒⦃L.ⓧ⦄.
+#h #G #p #I #L #V #T #H
+@(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 rdeq_fwd_bind_dx_void/
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+(* Basic_2A1: uses: lsx_inv_bind *)
+lemma rsx_inv_bind_void (h) (G):
+      ∀p,I,L,V,T. G ⊢ ⬈*[h,ⓑ{p,I}V.T] 𝐒⦃L⦄ →
+      ∧∧ G ⊢ ⬈*[h,V] 𝐒⦃L⦄ & G ⊢ ⬈*[h,T] 𝐒⦃L.ⓧ⦄.
+/3 width=4 by rsx_fwd_pair_sn, rsx_fwd_bind_dx_void, conj/ qed-.
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
new file mode 100644 (file)
index 0000000..ae3d769
--- /dev/null
@@ -0,0 +1,40 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/static/rdeq_length.ma".
+include "basic_2/rt_transition/lpx_length.ma".
+include "basic_2/rt_computation/rsx.ma".
+
+(* STRONGLY NORMALIZING REFERRED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******)
+
+(* Advanced properties ******************************************************)
+
+(* Basic_2A1: uses: lsx_sort *)
+lemma rsx_sort (h) (G): ∀L,s. G ⊢ ⬈*[h,⋆s] 𝐒⦃L⦄.
+#h #G #L1 #s @rsx_intro #L2 #H #Hs
+elim Hs -Hs /3 width=3 by lpx_fwd_length, rdeq_sort_length/
+qed.
+
+(* Basic_2A1: uses: lsx_gref *)
+lemma rsx_gref (h) (G): ∀L,l. G ⊢ ⬈*[h,§l] 𝐒⦃L⦄.
+#h #G #L1 #s @rsx_intro #L2 #H #Hs
+elim Hs -Hs /3 width=3 by lpx_fwd_length, rdeq_gref_length/
+qed.
+
+lemma rsx_unit (h) (G): ∀I,L. G ⊢ ⬈*[h,#0] 𝐒⦃L.ⓤ{I}⦄.
+#h #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, rdeq_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
new file mode 100644 (file)
index 0000000..9598d49
--- /dev/null
@@ -0,0 +1,152 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/lpxs_rdeq.ma".
+include "basic_2/rt_computation/lpxs_lpxs.ma".
+include "basic_2/rt_computation/rsx_rsx.ma".
+
+(* STRONGLY NORMALIZING REFERRED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******)
+
+(* Properties with unbound rt-computation for full local environments *******)
+
+(* Basic_2A1: uses: lsx_intro_alt *)
+lemma rsx_intro_lpxs (h) (G):
+      ∀L1,T. (∀L2. ⦃G,L1⦄ ⊢ ⬈*[h] L2 → (L1 ≛[T] L2 → ⊥) → G ⊢ ⬈*[h,T] 𝐒⦃L2⦄) →
+      G ⊢ ⬈*[h,T] 𝐒⦃L1⦄.
+/4 width=1 by lpx_lpxs, rsx_intro/ qed-.
+
+(* Basic_2A1: uses: lsx_lpxs_trans *)
+lemma rsx_lpxs_trans (h) (G):
+      ∀L1,T. G ⊢ ⬈*[h,T] 𝐒⦃L1⦄ →
+      ∀L2. ⦃G,L1⦄ ⊢ ⬈*[h] L2 → G ⊢ ⬈*[h,T] 𝐒⦃L2⦄.
+#h #G #L1 #T #HL1 #L2 #H @(lpxs_ind_dx … H) -L2
+/2 width=3 by rsx_lpx_trans/
+qed-.
+
+(* Eliminators with unbound rt-computation for full local environments ******)
+
+lemma rsx_ind_lpxs_rdeq (h) (G) (T) (Q:predicate lenv):
+      (∀L1. G ⊢ ⬈*[h,T] 𝐒⦃L1⦄ →
+            (∀L2. ⦃G,L1⦄ ⊢ ⬈*[h] L2 → (L1 ≛[T] L2 → ⊥) → Q L2) →
+            Q L1
+      ) →
+      ∀L1. G ⊢ ⬈*[h,T] 𝐒⦃L1⦄  →
+      ∀L0. ⦃G,L1⦄ ⊢ ⬈*[h] L0 → ∀L2. L0 ≛[T] L2 → Q L2.
+#h #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_rdeq_trans/ -HL1 #K2 #HLK2 #HnLK2
+lapply (rdeq_rdneq_trans … HL02 … HnLK2) -HnLK2 #H
+elim (rdeq_lpxs_trans … HLK2 … HL02) -L2 #K0 #HLK0 #HK02
+lapply (rdneq_rdeq_canc_dx … H … HK02) -H #HnLK0
+elim (rdeq_dec L1 L0 T) #H
+[ lapply (rdeq_rdneq_trans … H … HnLK0) -H -HnLK0 #Hn10
+  lapply (lpxs_trans … HL10 … HLK0) -L0 #H10
+  elim (lpxs_rdneq_inv_step_sn … H10 …  Hn10) -H10 -Hn10
+  /3 width=8 by rdeq_trans/
+| elim (lpxs_rdneq_inv_step_sn … HL10 … H) -HL10 -H #L #K #HL1 #HnL1 #HLK #HKL0
+  elim (rdeq_lpxs_trans … HLK0 … HKL0) -L0
+  /3 width=8 by lpxs_trans, rdeq_trans/
+]
+qed-.
+
+(* Basic_2A1: uses: lsx_ind_alt *)
+lemma rsx_ind_lpxs (h) (G) (T) (Q:predicate lenv):
+      (∀L1. G ⊢ ⬈*[h,T] 𝐒⦃L1⦄ →
+            (∀L2. ⦃G,L1⦄ ⊢ ⬈*[h] L2 → (L1 ≛[T] L2 → ⊥) → Q L2) →
+            Q L1
+      ) →
+      ∀L. G ⊢ ⬈*[h,T] 𝐒⦃L⦄  → Q L.
+#h #G #T #Q #IH #L #HL
+@(rsx_ind_lpxs_rdeq … IH … HL) -IH -HL // (**) (* full auto fails *)
+qed-.
+
+(* Advanced properties ******************************************************)
+
+fact rsx_bind_lpxs_aux (h) (G):
+     ∀p,I,L1,V. G ⊢ ⬈*[h,V] 𝐒⦃L1⦄ →
+     ∀Y,T. G ⊢ ⬈*[h,T] 𝐒⦃Y⦄ →
+     ∀L2. Y = L2.ⓑ{I}V → ⦃G,L1⦄ ⊢ ⬈*[h] L2 →
+     G ⊢ ⬈*[h,ⓑ{p,I}V.T] 𝐒⦃L2⦄.
+#h #G #p #I #L1 #V #H @(rsx_ind_lpxs … H) -L1
+#L1 #_ #IHL1 #Y #T #H @(rsx_ind_lpxs … H) -Y
+#Y #HY #IHY #L2 #H #HL12 destruct
+@rsx_intro_lpxs #L0 #HL20
+lapply (lpxs_trans … HL12 … HL20) #HL10 #H
+elim (rdneq_inv_bind … H) -H [ -IHY | -HY -IHL1 -HL12 ]
+[ #HnV elim (rdeq_dec L1 L2 V)
+  [ #HV @(IHL1 … HL10) -IHL1 -HL12 -HL10
+    /3 width=4 by rsx_lpxs_trans, lpxs_bind_refl_dx, rdeq_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/
+]
+qed-.
+
+(* Basic_2A1: uses: lsx_bind *)
+lemma rsx_bind (h) (G):
+      ∀p,I,L,V. G ⊢ ⬈*[h,V] 𝐒⦃L⦄ →
+      ∀T. G ⊢ ⬈*[h,T] 𝐒⦃L.ⓑ{I}V⦄ →
+      G ⊢ ⬈*[h,ⓑ{p,I}V.T] 𝐒⦃L⦄.
+/2 width=3 by rsx_bind_lpxs_aux/ qed.
+
+(* Basic_2A1: uses: lsx_flat_lpxs *)
+lemma rsx_flat_lpxs (h) (G):
+      ∀I,L1,V. G ⊢ ⬈*[h,V] 𝐒⦃L1⦄ →
+      ∀L2,T. G ⊢ ⬈*[h,T] 𝐒⦃L2⦄ → ⦃G,L1⦄ ⊢ ⬈*[h] L2 →
+      G ⊢ ⬈*[h,ⓕ{I}V.T] 𝐒⦃L2⦄.
+#h #G #I #L1 #V #H @(rsx_ind_lpxs … H) -L1
+#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 (rdneq_inv_flat … H) -H [ -HL1 -IHL2 | -HL2 -IHL1 ]
+[ #HnV elim (rdeq_dec L1 L2 V)
+  [ #HV @(IHL1 … HL10) -IHL1 -HL12 -HL10
+    /3 width=5 by rsx_lpxs_trans, rdeq_canc_sn/ (**) (* full auto too slow: 47s *)
+  | -HnV -HL10 /3 width=4 by rsx_lpxs_trans/
+  ]
+| /3 width=3 by/
+]
+qed-.
+
+(* Basic_2A1: uses: lsx_flat *)
+lemma rsx_flat (h) (G):
+      ∀I,L,V. G ⊢ ⬈*[h,V] 𝐒⦃L⦄ →
+      ∀T. G ⊢ ⬈*[h,T] 𝐒⦃L⦄ → G ⊢ ⬈*[h,ⓕ{I}V.T] 𝐒⦃L⦄.
+/2 width=3 by rsx_flat_lpxs/ qed.
+
+fact rsx_bind_lpxs_void_aux (h) (G):
+     ∀p,I,L1,V. G ⊢ ⬈*[h,V] 𝐒⦃L1⦄ →
+     ∀Y,T. G ⊢ ⬈*[h,T] 𝐒⦃Y⦄ →
+     ∀L2. Y = L2.ⓧ → ⦃G,L1⦄ ⊢ ⬈*[h] L2 →
+     G ⊢ ⬈*[h,ⓑ{p,I}V.T] 𝐒⦃L2⦄.
+#h #G #p #I #L1 #V #H @(rsx_ind_lpxs … H) -L1
+#L1 #_ #IHL1 #Y #T #H @(rsx_ind_lpxs … H) -Y
+#Y #HY #IHY #L2 #H #HL12 destruct
+@rsx_intro_lpxs #L0 #HL20
+lapply (lpxs_trans … HL12 … HL20) #HL10 #H
+elim (rdneq_inv_bind_void … H) -H [ -IHY | -HY -IHL1 -HL12 ]
+[ #HnV elim (rdeq_dec L1 L2 V)
+  [ #HV @(IHL1 … HL10) -IHL1 -HL12 -HL10
+    /3 width=6 by rsx_lpxs_trans, lpxs_bind_refl_dx, rdeq_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/
+]
+qed-.
+
+lemma rsx_bind_void (h) (G):
+      ∀p,I,L,V. G ⊢ ⬈*[h,V] 𝐒⦃L⦄ →
+      ∀T. G ⊢ ⬈*[h,T] 𝐒⦃L.ⓧ⦄ →
+      G ⊢ ⬈*[h,ⓑ{p,I}V.T] 𝐒⦃L⦄.
+/2 width=3 by rsx_bind_lpxs_void_aux/ qed.
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
new file mode 100644 (file)
index 0000000..f801c96
--- /dev/null
@@ -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/lpx_rdeq.ma".
+include "basic_2/rt_computation/rsx.ma".
+
+(* STRONGLY NORMALIZING REFERRED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******)
+
+(* Advanced properties ******************************************************)
+
+(* Basic_2A1: uses: lsx_lleq_trans *)
+lemma rsx_rdeq_trans (h) (G):
+      ∀L1,T. G ⊢ ⬈*[h,T] 𝐒⦃L1⦄ →
+      ∀L2. L1 ≛[T] L2 → G ⊢ ⬈*[h,T] 𝐒⦃L2⦄.
+#h #G #L1 #T #H @(rsx_ind … H) -L1
+#L1 #_ #IHL1 #L2 #HL12 @rsx_intro
+#L #HL2 #HnL2 elim (rdeq_lpx_trans … HL2 … HL12) -HL2
+/4 width=5 by rdeq_repl/
+qed-.
+
+(* Basic_2A1: uses: lsx_lpx_trans *)
+lemma rsx_lpx_trans (h) (G):
+      ∀L1,T. G ⊢ ⬈*[h,T] 𝐒⦃L1⦄ →
+      ∀L2. ⦃G,L1⦄ ⊢ ⬈[h] L2 → G ⊢ ⬈*[h,T] 𝐒⦃L2⦄.
+#h #G #L1 #T #H @(rsx_ind … H) -L1 #L1 #HL1 #IHL1 #L2 #HL12
+elim (rdeq_dec L1 L2 T) /3 width=4 by rsx_rdeq_trans/
+qed-.
index 156374e3fe96ef719d3750bc2cb5e8f4d9f6d3f7..df250a17b69d1d44d267e8b049f91591957ac52e 100644 (file)
@@ -18,7 +18,7 @@ include "basic_2/rt_transition/cpm.ma".
 (* CONTEXT-SENSITIVE PARALLEL R-CONVERSION FOR TERMS ************************)
 
 definition cpc: sh → relation4 genv lenv term term ≝
-                λh,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h] T2 ∨ ⦃G, L⦄ ⊢ T2 ➡[h] T1.
+                λh,G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ➡[h] T2 ∨ ⦃G,L⦄ ⊢ T2 ➡[h] T1.
 
 interpretation
    "context-sensitive parallel r-conversion (term)"
@@ -35,7 +35,7 @@ qed-.
 
 (* Basic forward lemmas *****************************************************)
 
-lemma cpc_fwd_cpr: ∀h,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ⬌[h] T2 →
-                   ∃∃T. ⦃G, L⦄ ⊢ T1 ➡[h] T & ⦃G, L⦄ ⊢ T2 ➡[h] T.
+lemma cpc_fwd_cpr: ∀h,G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ⬌[h] T2 →
+                   ∃∃T. ⦃G,L⦄ ⊢ T1 ➡[h] T & ⦃G,L⦄ ⊢ T2 ➡[h] T.
 #h #G #L #T1 #T2 * /2 width=3 by ex2_intro/
 qed-.
index b5b9ac86c0a8552331c665f121c037e73bddaed1..d3151122a0bf9560eece7f5c586535f4488fc208 100644 (file)
@@ -18,6 +18,6 @@ include "basic_2/rt_conversion/cpc.ma".
 
 (* Main properties **********************************************************)
 
-theorem cpc_conf: ∀h,G,L,T0,T1,T2. ⦃G, L⦄ ⊢ T0 ⬌[h] T1 → ⦃G, L⦄ ⊢ T0 ⬌[h] T2 →
-                  ∃∃T. ⦃G, L⦄ ⊢ T1 ⬌[h] T & ⦃G, L⦄ ⊢ T2 ⬌[h] T.
+theorem cpc_conf: ∀h,G,L,T0,T1,T2. ⦃G,L⦄ ⊢ T0 ⬌[h] T1 → ⦃G,L⦄ ⊢ T0 ⬌[h] T2 →
+                  ∃∃T. ⦃G,L⦄ ⊢ T1 ⬌[h] T & ⦃G,L⦄ ⊢ T2 ⬌[h] T.
 /3 width=3 by cpc_sym, ex2_intro/ qed-.
index 259fc7b0799d8dc1f2afb848f3191cb84edf5164..3da6a15983bd05a8893b04f7f5d01cf76e30128c 100644 (file)
@@ -12,6 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
+include "ground_2/xoa/ex_5_7.ma".
 include "basic_2/notation/relations/pconveta_5.ma".
 include "basic_2/rt_computation/cpms.ma".
 
@@ -20,13 +21,14 @@ include "basic_2/rt_computation/cpms.ma".
 (* avtivate genv *)
 inductive cpce (h): relation4 genv lenv term term ≝
 | cpce_sort: ∀G,L,s. cpce h G L (⋆s) (⋆s)
-| cpce_ldef: ∀G,K,V. cpce h G (K.ⓓV) (#0) (#0)
-| cpce_ldec: ∀n,G,K,V,s. ⦃G,K⦄ ⊢ V ➡*[n,h] ⋆s →
-             cpce h G (K.â\93\9bV) (#0) (#0)
-| cpce_eta : ∀n,p,G,K,V,W1,W2,T. ⦃G,K⦄ ⊢ V ➡*[n,h] ⓛ{p}W1.T →
-             cpce h G K W1 W2 → cpce h G (K.ⓛV) (#0) (+ⓛW2.ⓐ#0.#1)
+| cpce_atom: ∀G,i. cpce h G (⋆) (#i) (#i)
+| cpce_zero: ∀G,K,I. (∀n,p,W,V,U. I = BPair Abst W → ⦃G,K⦄ ⊢ W ➡*[n,h] ⓛ{p}V.U → ⊥) →
+             cpce h G (K.â\93\98{I}) (#0) (#0)
+| cpce_eta : ∀n,p,G,K,W,V1,V2,W2,U. ⦃G,K⦄ ⊢ W ➡*[n,h] ⓛ{p}V1.U →
+             cpce h G K V1 V2 → ⬆*[1] V2 ≘ W2 → cpce h G (K.ⓛW) (#0) (+ⓛW2.ⓐ#0.#1)
 | cpce_lref: ∀I,G,K,T,U,i. cpce h G K (#i) T →
              ⬆*[1] T ≘ U → cpce h G (K.ⓘ{I}) (#↑i) U
+| cpce_gref: ∀G,L,l. cpce h G L (§l) (§l)
 | cpce_bind: ∀p,I,G,K,V1,V2,T1,T2.
              cpce h G K V1 V2 → cpce h G (K.ⓑ{I}V1) T1 T2 →
              cpce h G K (ⓑ{p,I}V1.T1) (ⓑ{p,I}V2.T2)
@@ -46,44 +48,48 @@ lemma cpce_inv_sort_sn (h) (G) (L) (X2):
 #h #G #Y #X2 #s0
 @(insert_eq_0 … (⋆s0)) #X1 * -G -Y -X1 -X2
 [ #G #L #s #_ //
-| #G #K #V #_ //
-| #n #G #K #V #s #_ #_ //
-| #n #p #G #K #V #W1 #W2 #T #_ #_ #H destruct
+| #G #i #_ //
+| #G #K #I #_ #_ //
+| #n #p #G #K #W #V1 #V2 #W2 #U #_ #_ #_ #H destruct
 | #I #G #K #T #U #i #_ #_ #H destruct
+| #G #L #l #_ //
 | #p #I #G #K #V1 #V2 #T1 #T2 #_ #_ #H destruct
 | #I #G #L #V1 #V2 #T1 #T2 #_ #_ #H destruct
 ]
 qed-.
 
-lemma cpce_inv_ldef_sn (h) (G) (K) (X2):
-      ∀V. ⦃G,K.ⓓV⦄ ⊢ #0 ⬌η[h] X2 → #0 = X2.
-#h #G #Y #X2 #X
-@(insert_eq_0 … (Y.ⓓX)) #Y1
-@(insert_eq_0 … (#0)) #X1
-* -G -Y1 -X1 -X2
+lemma cpce_inv_atom_sn (h) (G) (X2):
+      ∀i. ⦃G,⋆⦄ ⊢ #i ⬌η[h] X2 → #i = X2.
+#h #G #X2 #j
+@(insert_eq_0 … LAtom) #Y
+@(insert_eq_0 … (#j)) #X1
+* -G -Y -X1 -X2
 [ #G #L #s #_ #_ //
-| #G #K #V #_ #_ //
-| #n #G #K #V #s #_ #_ #_ //
-| #n #p #G #K #V #W1 #W2 #T #_ #_ #_ #H destruct
-| #I #G #K #T #U #i #_ #_ #H #_ destruct
+| #G #i #_ #_ //
+| #G #K #I #_ #_ #_ //
+| #n #p #G #K #W #V1 #V2 #W2 #U #_ #_ #_ #_ #H destruct
+| #I #G #K #T #U #i #_ #_ #_ #H destruct
+| #G #L #l #_ #_ //
 | #p #I #G #K #V1 #V2 #T1 #T2 #_ #_ #H #_ destruct
 | #I #G #L #V1 #V2 #T1 #T2 #_ #_ #H #_ destruct
 ]
 qed-.
 
-lemma cpce_inv_ldec_sn (h) (G) (K) (X2):
-      ∀V. ⦃G,K.ⓛV⦄ ⊢ #0 ⬌η[h] X2 →
-      ∨∨ ∃∃n,s. ⦃G,K⦄ ⊢ V ➡*[n,h] ⋆s & #0 = X2
-       | ∃∃n,p,W1,W2,T. ⦃G,K⦄ ⊢ V ➡*[n,h] ⓛ{p}W1.T & ⦃G,K⦄ ⊢ W1 ⬌η[h] W2 & +ⓛW2.ⓐ#0.#1 = X2.
-#h #G #Y #X2 #X
-@(insert_eq_0 … (Y.ⓛX)) #Y1
+lemma cpce_inv_zero_sn (h) (G) (K) (X2):
+      ∀I. ⦃G,K.ⓘ{I}⦄ ⊢ #0 ⬌η[h] X2 →
+      ∨∨ ∧∧ ∀n,p,W,V,U. I = BPair Abst W → ⦃G,K⦄ ⊢ W ➡*[n,h] ⓛ{p}V.U → ⊥ & #0 = X2
+       | ∃∃n,p,W,V1,V2,W2,U. ⦃G,K⦄ ⊢ W ➡*[n,h] ⓛ{p}V1.U & ⦃G,K⦄ ⊢ V1 ⬌η[h] V2
+                           & ⬆*[1] V2 ≘ W2 & I = BPair Abst W & +ⓛW2.ⓐ#0.#1 = X2.
+#h #G #Y0 #X2 #Z
+@(insert_eq_0 … (Y0.ⓘ{Z})) #Y
 @(insert_eq_0 … (#0)) #X1
-* -G -Y1 -X1 -X2
+* -G -Y -X1 -X2
 [ #G #L #s #H #_ destruct
-| #G #K #V #_ #H destruct
-| #n #G #K #V #s #HV #_ #H destruct /3 width=3 by ex2_2_intro, or_introl/
-| #n #p #G #K #V #W1 #W2 #T #HV #HW #_ #H destruct /3 width=8 by ex3_5_intro, or_intror/
+| #G #i #_ #H destruct
+| #G #K #I #HI #_ #H destruct /4 width=7 by or_introl, conj/
+| #n #p #G #K #W #V1 #V2 #W2 #U #HWU #HV12 #HVW2 #_ #H destruct /3 width=12 by or_intror, ex5_7_intro/
 | #I #G #K #T #U #i #_ #_ #H #_ destruct
+| #G #L #l #H #_ destruct
 | #p #I #G #K #V1 #V2 #T1 #T2 #_ #_ #H #_ destruct
 | #I #G #L #V1 #V2 #T1 #T2 #_ #_ #H #_ destruct
 ]
@@ -92,30 +98,47 @@ qed-.
 lemma cpce_inv_lref_sn (h) (G) (K) (X2):
       ∀I,i. ⦃G,K.ⓘ{I}⦄ ⊢ #↑i ⬌η[h] X2 →
       ∃∃T2. ⦃G,K⦄ ⊢ #i ⬌η[h] T2 & ⬆*[1] T2 ≘ X2.
-#h #G #Y #X2 #Z #j
-@(insert_eq_0 … (Y.ⓘ{Z})) #Y1
+#h #G #Y0 #X2 #Z #j
+@(insert_eq_0 … (Y0.ⓘ{Z})) #Y
 @(insert_eq_0 … (#↑j)) #X1
-* -G -Y1 -X1 -X2
+* -G -Y -X1 -X2
 [ #G #L #s #H #_ destruct
-| #G #K #V #H #_ destruct
-| #n #G #K #V #s #_ #H #_ destruct
-| #n #p #G #K #V #W1 #W2 #T #_ #_ #H #_ destruct
+| #G #i #_ #H destruct
+| #G #K #I #_ #H #_ destruct
+| #n #p #G #K #W #V1 #V2 #W2 #U #_ #_ #_ #H #_ destruct
 | #I #G #K #T #U #i #Hi #HTU #H1 #H2 destruct /2 width=3 by ex2_intro/
+| #G #L #l #H #_ destruct
 | #p #I #G #K #V1 #V2 #T1 #T2 #_ #_ #H #_ destruct
 | #I #G #L #V1 #V2 #T1 #T2 #_ #_ #H #_ destruct
 ]
 qed-.
 
+lemma cpce_inv_gref_sn (h) (G) (L) (X2):
+      ∀l. ⦃G,L⦄ ⊢ §l ⬌η[h] X2 → §l = X2.
+#h #G #Y #X2 #k
+@(insert_eq_0 … (§k)) #X1 * -G -Y -X1 -X2
+[ #G #L #s #_ //
+| #G #i #_ //
+| #G #K #I #_ #_ //
+| #n #p #G #K #W #V1 #V2 #W2 #U #_ #_ #_ #H destruct
+| #I #G #K #T #U #i #_ #_ #H destruct
+| #G #L #l #_ //
+| #p #I #G #K #V1 #V2 #T1 #T2 #_ #_ #H destruct
+| #I #G #L #V1 #V2 #T1 #T2 #_ #_ #H destruct
+]
+qed-.
+
 lemma cpce_inv_bind_sn (h) (G) (K) (X2):
       ∀p,I,V1,T1. ⦃G,K⦄ ⊢ ⓑ{p,I}V1.T1 ⬌η[h] X2 →
       ∃∃V2,T2. ⦃G,K⦄ ⊢ V1 ⬌η[h] V2 & ⦃G,K.ⓑ{I}V1⦄ ⊢ T1 ⬌η[h] T2 & ⓑ{p,I}V2.T2 = X2.
 #h #G #Y #X2 #q #Z #U #X
 @(insert_eq_0 … (ⓑ{q,Z}U.X)) #X1 * -G -Y -X1 -X2
 [ #G #L #s #H destruct
-| #G #K #V #H destruct
-| #n #G #K #V #s #_ #H destruct
-| #n #p #G #K #V #W1 #W2 #T #_ #_ #H destruct
+| #G #i #H destruct
+| #G #K #I #_ #H destruct
+| #n #p #G #K #W #V1 #V2 #W2 #U #_ #_ #_ #H destruct
 | #I #G #K #T #U #i #_ #_ #H destruct
+| #G #L #l #H destruct
 | #p #I #G #K #V1 #V2 #T1 #T2 #HV #HT #H destruct /2 width=5 by ex3_2_intro/
 | #I #G #L #V1 #V2 #T1 #T2 #_ #_ #H destruct
 ]
@@ -127,10 +150,11 @@ lemma cpce_inv_flat_sn (h) (G) (L) (X2):
 #h #G #Y #X2 #Z #U #X
 @(insert_eq_0 … (ⓕ{Z}U.X)) #X1 * -G -Y -X1 -X2
 [ #G #L #s #H destruct
-| #G #K #V #H destruct
-| #n #G #K #V #s #_ #H destruct
-| #n #p #G #K #V #W1 #W2 #T #_ #_ #H destruct
+| #G #i #H destruct
+| #G #K #I #_ #H destruct
+| #n #p #G #K #W #V1 #V2 #W2 #U #_ #_ #_ #H destruct
 | #I #G #K #T #U #i #_ #_ #H destruct
+| #G #L #l #H destruct
 | #p #I #G #L #V1 #V2 #T1 #T2 #_ #_ #H destruct
 | #I #G #K #V1 #V2 #T1 #T2 #HV #HT #H destruct /2 width=5 by ex3_2_intro/
 ]
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_conversion/cpce_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_conversion/cpce_drops.ma
new file mode 100644 (file)
index 0000000..49bf1e8
--- /dev/null
@@ -0,0 +1,46 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/relocation/drops.ma".
+include "basic_2/rt_conversion/cpce.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL ETA-CONVERSION FOR TERMS **********************)
+
+(* Properties with uniform slicing for local environments *******************)
+
+lemma cpce_eta_drops (h) (n) (G) (K):
+      ∀p,W,V1,U. ⦃G,K⦄ ⊢ W ➡*[n,h] ⓛ{p}V1.U →
+      ∀V2. ⦃G,K⦄ ⊢ V1 ⬌η[h] V2 →
+      ∀i,L. ⬇*[i] L ≘ K.ⓛW →
+      ∀W2. ⬆*[↑i] V2 ≘ W2 → ⦃G,L⦄ ⊢ #i ⬌η[h] +ⓛW2.ⓐ#0.#↑i.
+#h #n #G #K #p #W #V1 #U #HWU #V2 #HV12 #i elim i -i
+[ #L #HLK #W2 #HVW2
+  >(drops_fwd_isid … HLK) -L [| // ] /2 width=8 by cpce_eta/
+| #i #IH #L #HLK #W2 #HVW2
+  elim (drops_inv_succ … HLK) -HLK #I #Y #HYK #H destruct
+  elim (lifts_split_trans … HVW2 (𝐔❴↑i❵) (𝐔❴1❵)) [| // ] #X2 #HVX2 #HXW2 
+  /5 width=7 by cpce_lref, lifts_push_lref, lifts_bind, lifts_flat/
+]
+qed.
+
+lemma cpce_zero_drops (h) (G):
+      ∀i,L. (∀n,p,K,W,V,U. ⬇*[i] L ≘ K.ⓛW → ⦃G,K⦄ ⊢ W ➡*[n,h] ⓛ{p}V.U → ⊥) →
+      ⦃G,L⦄ ⊢ #i ⬌η[h] #i.
+#h #G #i elim i -i
+[ * [ #_ // ] #L #I #Hi
+  /4 width=8 by cpce_zero, drops_refl/
+| #i #IH * [ -IH #_ // ] #L #I #Hi
+  /5 width=8 by cpce_lref, drops_drop/
+]
+qed.
index b74313dae70a5bf42891f4404498663ad833fe0a..8da6c1af49c1378e4bb34e543aff6651b478f5b9 100644 (file)
@@ -62,7 +62,7 @@ lemma lpce_inv_bind_dx (h) (G):
 
 lemma lpce_inv_unit_sn (h) (G):
       ∀I,L2,K1. ⦃G,K1.ⓤ{I}⦄ ⊢ ⬌η[h] L2 →
-      ∃∃K2. ⦃G, K1⦄ ⊢ ⬌η[h] K2 & L2 = K2.ⓤ{I}.
+      ∃∃K2. ⦃G,K1⦄ ⊢ ⬌η[h] K2 & L2 = K2.ⓤ{I}.
 /2 width=1 by lex_inv_unit_sn/ qed-.
 
 lemma lpce_inv_pair_sn (h) (G):
index 59848b0680c2325e3ce4437a644c6f53e857146e..4daecd3eb0240d29a8d6a5a6ada519ea9a5d4e05 100644 (file)
@@ -29,16 +29,16 @@ interpretation "context-sensitive parallel r-equivalence (term)"
 (* Basic_2A1: was: cpcs_ind_dx *)
 lemma cpcs_ind_sn (h) (G) (L) (T2):
                   ∀Q:predicate term. Q T2 →
-                  (∀T1,T. ⦃G, L⦄ ⊢ T1 ⬌[h] T → ⦃G, L⦄ ⊢ T ⬌*[h] T2 → Q T → Q T1) →
-                  ∀T1. ⦃G, L⦄ ⊢ T1 ⬌*[h] T2 → Q T1.
+                  (∀T1,T. ⦃G,L⦄ ⊢ T1 ⬌[h] T → ⦃G,L⦄ ⊢ T ⬌*[h] T2 → Q T → Q T1) →
+                  ∀T1. ⦃G,L⦄ ⊢ T1 ⬌*[h] T2 → Q T1.
 normalize /3 width=6 by TC_star_ind_dx/
 qed-.
 
 (* Basic_2A1: was: cpcs_ind *)
 lemma cpcs_ind_dx (h) (G) (L) (T1):
                   ∀Q:predicate term. Q T1 →
-                  (∀T,T2. ⦃G, L⦄ ⊢ T1 ⬌*[h] T → ⦃G, L⦄ ⊢ T ⬌[h] T2 → Q T → Q T2) →
-                  ∀T2. ⦃G, L⦄ ⊢ T1 ⬌*[h] T2 → Q T2.
+                  (∀T,T2. ⦃G,L⦄ ⊢ T1 ⬌*[h] T → ⦃G,L⦄ ⊢ T ⬌[h] T2 → Q T → Q T2) →
+                  ∀T2. ⦃G,L⦄ ⊢ T1 ⬌*[h] T2 → Q T2.
 normalize /3 width=6 by TC_star_ind/
 qed-.
 
@@ -54,50 +54,50 @@ lemma cpcs_sym (h) (G) (L): symmetric … (cpcs h G L).
 /2 width=1 by cpc_sym/
 qed-.
 
-lemma cpc_cpcs (h) (G) (L): ∀T1,T2. ⦃G, L⦄ ⊢ T1 ⬌[h] T2 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
+lemma cpc_cpcs (h) (G) (L): ∀T1,T2. ⦃G,L⦄ ⊢ T1 ⬌[h] T2 → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
 /2 width=1 by inj/ qed.
 
 (* Basic_2A1: was: cpcs_strap2 *)
-lemma cpcs_step_sn (h) (G) (L): ∀T1,T. ⦃G, L⦄ ⊢ T1 ⬌[h] T →
-                                ∀T2. ⦃G, L⦄ ⊢ T ⬌*[h] T2 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
+lemma cpcs_step_sn (h) (G) (L): ∀T1,T. ⦃G,L⦄ ⊢ T1 ⬌[h] T →
+                                ∀T2. ⦃G,L⦄ ⊢ T ⬌*[h] T2 → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
 normalize /2 width=3 by TC_strap/
 qed-.
 
 (* Basic_2A1: was: cpcs_strap1 *)
-lemma cpcs_step_dx (h) (G) (L): ∀T1,T. ⦃G, L⦄ ⊢ T1 ⬌*[h] T →
-                                ∀T2. ⦃G, L⦄ ⊢ T ⬌[h] T2 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
+lemma cpcs_step_dx (h) (G) (L): ∀T1,T. ⦃G,L⦄ ⊢ T1 ⬌*[h] T →
+                                ∀T2. ⦃G,L⦄ ⊢ T ⬌[h] T2 → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
 normalize /2 width=3 by step/
 qed-.
 
 (* Basic_1: was: pc3_pr2_r *)
-lemma cpr_cpcs_dx (h) (G) (L): ∀T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h] T2 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
+lemma cpr_cpcs_dx (h) (G) (L): ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡[h] T2 → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
 /3 width=1 by cpc_cpcs, or_introl/ qed.
 
 (* Basic_1: was: pc3_pr2_x *)
-lemma cpr_cpcs_sn (h) (G) (L): ∀T1,T2. ⦃G, L⦄ ⊢ T2 ➡[h] T1 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
+lemma cpr_cpcs_sn (h) (G) (L): ∀T1,T2. ⦃G,L⦄ ⊢ T2 ➡[h] T1 → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
 /3 width=1 by cpc_cpcs, or_intror/ qed.
 
 (* Basic_1: was: pc3_pr2_u *)
 (* Basic_2A1: was: cpcs_cpr_strap2 *)
-lemma cpcs_cpr_step_sn (h) (G) (L): ∀T1,T. ⦃G, L⦄ ⊢ T1 ➡[h] T → ∀T2. ⦃G, L⦄ ⊢ T ⬌*[h] T2 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
+lemma cpcs_cpr_step_sn (h) (G) (L): ∀T1,T. ⦃G,L⦄ ⊢ T1 ➡[h] T → ∀T2. ⦃G,L⦄ ⊢ T ⬌*[h] T2 → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
 /3 width=3 by cpcs_step_sn, or_introl/ qed-.
 
 (* Basic_2A1: was: cpcs_cpr_strap1 *)
-lemma cpcs_cpr_step_dx (h) (G) (L): ∀T1,T. ⦃G, L⦄ ⊢ T1 ⬌*[h] T →
-                                    ∀T2. ⦃G, L⦄ ⊢ T ➡[h] T2 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
+lemma cpcs_cpr_step_dx (h) (G) (L): ∀T1,T. ⦃G,L⦄ ⊢ T1 ⬌*[h] T →
+                                    ∀T2. ⦃G,L⦄ ⊢ T ➡[h] T2 → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
 /3 width=3 by cpcs_step_dx, or_introl/ qed-.
 
-lemma cpcs_cpr_div (h) (G) (L): ∀T1,T. ⦃G, L⦄ ⊢ T1 ⬌*[h] T →
-                                ∀T2. ⦃G, L⦄ ⊢ T2 ➡[h] T → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
+lemma cpcs_cpr_div (h) (G) (L): ∀T1,T. ⦃G,L⦄ ⊢ T1 ⬌*[h] T →
+                                ∀T2. ⦃G,L⦄ ⊢ T2 ➡[h] T → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
 /3 width=3 by cpcs_step_dx, or_intror/ qed-.
 
-lemma cpr_div (h) (G) (L): ∀T1,T. ⦃G, L⦄ ⊢ T1 ➡[h] T →
-                           ∀T2. ⦃G, L⦄ ⊢ T2 ➡[h] T → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
+lemma cpr_div (h) (G) (L): ∀T1,T. ⦃G,L⦄ ⊢ T1 ➡[h] T →
+                           ∀T2. ⦃G,L⦄ ⊢ T2 ➡[h] T → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
 /3 width=3 by cpr_cpcs_dx, cpcs_step_dx, or_intror/ qed-.
 
 (* Basic_1: was: pc3_pr2_u2 *)
-lemma cpcs_cpr_conf (h) (G) (L): ∀T1,T. ⦃G, L⦄ ⊢ T ➡[h] T1 →
-                                 ∀T2. ⦃G, L⦄ ⊢ T ⬌*[h] T2 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
+lemma cpcs_cpr_conf (h) (G) (L): ∀T1,T. ⦃G,L⦄ ⊢ T ➡[h] T1 →
+                                 ∀T2. ⦃G,L⦄ ⊢ T ⬌*[h] T2 → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
 /3 width=3 by cpcs_step_sn, or_intror/ qed-.
 
 (* Basic_1: removed theorems 9:
index 13d12e5ad7d9f9c30d498fa7f07dd7840ed67c61..2c1be91f46b812aa4515510773cbf4f79d9a496c 100644 (file)
@@ -20,8 +20,8 @@ include "basic_2/rt_equivalence/cpcs_cprs.ma".
 (* Main inversion lemmas with atomic arity assignment on terms **************)
 
 (* Note: lemma 1500 *)
-theorem cpcs_aaa_mono (h) (G) (L): ∀T1,T2. ⦃G, L⦄ ⊢ T1 ⬌*[h] T2 →
-                                   ∀A1. ⦃G, L⦄ ⊢ T1 ⁝ A1 → ∀A2. ⦃G, L⦄ ⊢ T2 ⁝ A2 →
+theorem cpcs_aaa_mono (h) (G) (L): ∀T1,T2. ⦃G,L⦄ ⊢ T1 ⬌*[h] T2 →
+                                   ∀A1. ⦃G,L⦄ ⊢ T1 ⁝ A1 → ∀A2. ⦃G,L⦄ ⊢ T2 ⁝ A2 →
                                    A1 = A2.
 #h #G #L #T1 #T2 #HT12 #A1 #HA1 #A2 #HA2
 elim (cpcs_inv_cprs … HT12) -HT12 #T #HT1 #HT2
index a29055eeea426895a0e15325f034fa6e299cd50c..85cd8c7322f25fbf1675e8783bb908daf4949594 100644 (file)
@@ -31,21 +31,21 @@ theorem cpcs_canc_dx (h) (G) (L): right_cancellable … (cpcs h G L).
 
 (* Advanced properties ******************************************************)
 
-lemma cpcs_bind1 (h) (G) (L): ∀V1,V2. ⦃G, L⦄ ⊢ V1 ⬌*[h] V2 →
-                              ∀I,T1,T2. ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ⬌*[h] T2 →
-                              ∀p. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ⬌*[h] ⓑ{p,I}V2.T2.
+lemma cpcs_bind1 (h) (G) (L): ∀V1,V2. ⦃G,L⦄ ⊢ V1 ⬌*[h] V2 →
+                              ∀I,T1,T2. ⦃G,L.ⓑ{I}V1⦄ ⊢ T1 ⬌*[h] T2 →
+                              ∀p. ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ⬌*[h] ⓑ{p,I}V2.T2.
 /3 width=3 by cpcs_trans, cpcs_bind_sn, cpcs_bind_dx/ qed.
 
-lemma cpcs_bind2 (h) (G) (L): ∀V1,V2. ⦃G, L⦄ ⊢ V1 ⬌*[h] V2 →
-                              ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ⬌*[h] T2 →
-                              ∀p. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ⬌*[h] ⓑ{p,I}V2.T2.
+lemma cpcs_bind2 (h) (G) (L): ∀V1,V2. ⦃G,L⦄ ⊢ V1 ⬌*[h] V2 →
+                              ∀I,T1,T2. ⦃G,L.ⓑ{I}V2⦄ ⊢ T1 ⬌*[h] T2 →
+                              ∀p. ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ⬌*[h] ⓑ{p,I}V2.T2.
 /3 width=3 by cpcs_trans, cpcs_bind_sn, cpcs_bind_dx/ qed.
 
 (* Advanced properties with r-transition for full local environments ********)
 
 (* Basic_1: was: pc3_wcpr0 *)
-lemma lpr_cpcs_conf (h) (G): ∀L1,L2. ⦃G, L1⦄ ⊢ ➡[h] L2 →
-                             ∀T1,T2. ⦃G, L1⦄ ⊢ T1 ⬌*[h] T2 → ⦃G, L2⦄ ⊢ T1 ⬌*[h] T2.
+lemma lpr_cpcs_conf (h) (G): ∀L1,L2. ⦃G,L1⦄ ⊢ ➡[h] L2 →
+                             ∀T1,T2. ⦃G,L1⦄ ⊢ T1 ⬌*[h] T2 → ⦃G,L2⦄ ⊢ T1 ⬌*[h] T2.
 #h #G #L1 #L2 #HL12 #T1 #T2 #H elim (cpcs_inv_cprs … H) -H
 /3 width=5 by cpcs_canc_dx, lpr_cprs_conf/
 qed-.
index 5292a2665d0b0fb607620bbddfa871bdf7585aab..bd40f01c3553147e817b5ed18d0b80e8c351bbc1 100644 (file)
@@ -20,8 +20,8 @@ include "basic_2/rt_equivalence/cpcs.ma".
 
 (* Inversion lemmas with context sensitive r-computation on terms ***********)
 
-lemma cpcs_inv_cprs (h) (G) (L): ∀T1,T2. ⦃G, L⦄ ⊢ T1 ⬌*[h] T2 →
-                                 ∃∃T. ⦃G, L⦄ ⊢ T1 ➡*[h] T & ⦃G, L⦄ ⊢ T2 ➡*[h] T.
+lemma cpcs_inv_cprs (h) (G) (L): ∀T1,T2. ⦃G,L⦄ ⊢ T1 ⬌*[h] T2 →
+                                 ∃∃T. ⦃G,L⦄ ⊢ T1 ➡*[h] T & ⦃G,L⦄ ⊢ T2 ➡*[h] T.
 #h #G #L #T1 #T2 #H @(cpcs_ind_dx … H) -T2
 [ /3 width=3 by ex2_intro/
 | #T #T2 #_ #HT2 * #T0 #HT10 elim HT2 -HT2 #HT2 #HT0
@@ -35,7 +35,7 @@ qed-.
 
 (* Basic_1: was: pc3_gen_sort *)
 (* Basic_2A1: was: cpcs_inv_sort *)
-lemma cpcs_inv_sort_bi (h) (G) (L): ∀s1,s2. ⦃G, L⦄ ⊢ ⋆s1 ⬌*[h] ⋆s2 → s1 = s2.
+lemma cpcs_inv_sort_bi (h) (G) (L): ∀s1,s2. ⦃G,L⦄ ⊢ ⋆s1 ⬌*[h] ⋆s2 → s1 = s2.
 #h #G #L #s1 #s2 #H elim (cpcs_inv_cprs … H) -H
 #T #H1 >(cprs_inv_sort1 … H1) -T #H2
 lapply (cprs_inv_sort1 … H2) -L #H destruct //
@@ -43,8 +43,8 @@ qed-.
 
 (* Basic_2A1: was: cpcs_inv_abst1 *)
 lemma cpcs_inv_abst_sn (h) (G) (L):
-                       ∀p,W1,T1,X. ⦃G, L⦄ ⊢ ⓛ{p}W1.T1 ⬌*[h] X →
-                       ∃∃W2,T2. ⦃G, L⦄ ⊢ X ➡*[h] ⓛ{p}W2.T2 & ⦃G, L⦄ ⊢ ⓛ{p}W1.T1 ➡*[h] ⓛ{p}W2.T2.
+                       ∀p,W1,T1,X. ⦃G,L⦄ ⊢ ⓛ{p}W1.T1 ⬌*[h] X →
+                       ∃∃W2,T2. ⦃G,L⦄ ⊢ X ➡*[h] ⓛ{p}W2.T2 & ⦃G,L⦄ ⊢ ⓛ{p}W1.T1 ➡*[h] ⓛ{p}W2.T2.
 #h #G #L #p #W1 #T1 #T #H
 elim (cpcs_inv_cprs … H) -H #X #H1 #H2
 elim (cpms_inv_abst_sn … H1) -H1 #W2 #T2 #HW12 #HT12 #H destruct
@@ -53,13 +53,13 @@ qed-.
 
 (* Basic_2A1: was: cpcs_inv_abst2 *)
 lemma cpcs_inv_abst_dx (h) (G) (L):
-                       ∀p,W1,T1,X. ⦃G, L⦄ ⊢ X ⬌*[h] ⓛ{p}W1.T1 →
-                       ∃∃W2,T2. ⦃G, L⦄ ⊢ X ➡*[h] ⓛ{p}W2.T2 & ⦃G, L⦄ ⊢ ⓛ{p}W1.T1 ➡*[h] ⓛ{p}W2.T2.
+                       ∀p,W1,T1,X. ⦃G,L⦄ ⊢ X ⬌*[h] ⓛ{p}W1.T1 →
+                       ∃∃W2,T2. ⦃G,L⦄ ⊢ X ➡*[h] ⓛ{p}W2.T2 & ⦃G,L⦄ ⊢ ⓛ{p}W1.T1 ➡*[h] ⓛ{p}W2.T2.
 /3 width=1 by cpcs_inv_abst_sn, cpcs_sym/ qed-.
 
 (* Basic_1: was: pc3_gen_sort_abst *)
 lemma cpcs_inv_sort_abst (h) (G) (L):
-                         ∀p,W,T,s. ⦃G, L⦄ ⊢ ⋆s ⬌*[h] ⓛ{p}W.T → ⊥.
+                         ∀p,W,T,s. ⦃G,L⦄ ⊢ ⋆s ⬌*[h] ⓛ{p}W.T → ⊥.
 #h #G #L #p #W #T #s #H
 elim (cpcs_inv_cprs … H) -H #X #H1
 >(cprs_inv_sort1 … H1) -X #H2
@@ -69,97 +69,97 @@ qed-.
 (* Properties with context sensitive r-computation on terms *****************)
 
 (* Basic_1: was: pc3_pr3_r *)
-lemma cpcs_cprs_dx (h) (G) (L): ∀T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h] T2 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
+lemma cpcs_cprs_dx (h) (G) (L): ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡*[h] T2 → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
 #h #G #L #T1 #T2 #H @(cprs_ind_dx … H) -T2
 /3 width=3 by cpcs_cpr_step_dx, cpcs_step_dx, cpc_cpcs/
 qed.
 
 (* Basic_1: was: pc3_pr3_x *)
-lemma cpcs_cprs_sn (h) (G) (L): ∀T1,T2. ⦃G, L⦄ ⊢ T2 ➡*[h] T1 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
+lemma cpcs_cprs_sn (h) (G) (L): ∀T1,T2. ⦃G,L⦄ ⊢ T2 ➡*[h] T1 → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
 #h #G #L #T1 #T2 #H @(cprs_ind_sn … H) -T2
 /3 width=3 by cpcs_cpr_div, cpcs_step_sn, cpcs_cprs_dx/
 qed.
 
 (* Basic_2A1: was: cpcs_cprs_strap1 *)
-lemma cpcs_cprs_step_dx (h) (G) (L): ∀T1,T. ⦃G, L⦄ ⊢ T1 ⬌*[h] T →
-                                     ∀T2. ⦃G, L⦄ ⊢ T ➡*[h] T2 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
+lemma cpcs_cprs_step_dx (h) (G) (L): ∀T1,T. ⦃G,L⦄ ⊢ T1 ⬌*[h] T →
+                                     ∀T2. ⦃G,L⦄ ⊢ T ➡*[h] T2 → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
 #h #G #L #T1 #T #HT1 #T2 #H @(cprs_ind_dx … H) -T2 /2 width=3 by cpcs_cpr_step_dx/
 qed-.
 
 (* Basic_2A1: was: cpcs_cprs_strap2 *)
-lemma cpcs_cprs_step_sn (h) (G) (L): ∀T1,T. ⦃G, L⦄ ⊢ T1 ➡*[h] T →
-                                     ∀T2. ⦃G, L⦄ ⊢ T ⬌*[h] T2 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
+lemma cpcs_cprs_step_sn (h) (G) (L): ∀T1,T. ⦃G,L⦄ ⊢ T1 ➡*[h] T →
+                                     ∀T2. ⦃G,L⦄ ⊢ T ⬌*[h] T2 → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
 #h #G #L #T1 #T #H #T2 #HT2 @(cprs_ind_sn … H) -T1 /2 width=3 by cpcs_cpr_step_sn/
 qed-.
 
-lemma cpcs_cprs_div (h) (G) (L): ∀T1,T. ⦃G, L⦄ ⊢ T1 ⬌*[h] T →
-                                 ∀T2. ⦃G, L⦄ ⊢ T2 ➡*[h] T → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
+lemma cpcs_cprs_div (h) (G) (L): ∀T1,T. ⦃G,L⦄ ⊢ T1 ⬌*[h] T →
+                                 ∀T2. ⦃G,L⦄ ⊢ T2 ➡*[h] T → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
 #h #G #L #T1 #T #HT1 #T2 #H @(cprs_ind_sn … H) -T2 /2 width=3 by cpcs_cpr_div/
 qed-.
 
 (* Basic_1: was: pc3_pr3_conf *)
-lemma cpcs_cprs_conf (h) (G) (L): ∀T1,T. ⦃G, L⦄ ⊢ T ➡*[h] T1 →
-                                  ∀T2. ⦃G, L⦄ ⊢ T ⬌*[h] T2 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
+lemma cpcs_cprs_conf (h) (G) (L): ∀T1,T. ⦃G,L⦄ ⊢ T ➡*[h] T1 →
+                                  ∀T2. ⦃G,L⦄ ⊢ T ⬌*[h] T2 → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
 #h #G #L #T1 #T #H #T2 #HT2 @(cprs_ind_dx … H) -T1 /2 width=3 by cpcs_cpr_conf/
 qed-.
 
 (* Basic_1: was: pc3_pr3_t *)
 (* Basic_1: note: pc3_pr3_t should be renamed *)
-lemma cprs_div (h) (G) (L): ∀T1,T. ⦃G, L⦄ ⊢ T1 ➡*[h] T →
-                            ∀T2. ⦃G, L⦄ ⊢ T2 ➡*[h] T → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
+lemma cprs_div (h) (G) (L): ∀T1,T. ⦃G,L⦄ ⊢ T1 ➡*[h] T →
+                            ∀T2. ⦃G,L⦄ ⊢ T2 ➡*[h] T → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
 #h #G #L #T1 #T #HT1 #T2 #H @(cprs_ind_sn … H) -T2
 /2 width=3 by cpcs_cpr_div, cpcs_cprs_dx/
 qed.
 
-lemma cprs_cpr_div (h) (G) (L): ∀T1,T. ⦃G, L⦄ ⊢ T1 ➡*[h] T →
-                                ∀T2. ⦃G, L⦄ ⊢ T2 ➡[h] T → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
+lemma cprs_cpr_div (h) (G) (L): ∀T1,T. ⦃G,L⦄ ⊢ T1 ➡*[h] T →
+                                ∀T2. ⦃G,L⦄ ⊢ T2 ➡[h] T → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
 /3 width=5 by cpm_cpms, cprs_div/ qed-.
 
-lemma cpr_cprs_div (h) (G) (L): ∀T1,T. ⦃G, L⦄ ⊢ T1 ➡[h] T →
-                                ∀T2. ⦃G, L⦄ ⊢ T2 ➡*[h] T → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
+lemma cpr_cprs_div (h) (G) (L): ∀T1,T. ⦃G,L⦄ ⊢ T1 ➡[h] T →
+                                ∀T2. ⦃G,L⦄ ⊢ T2 ➡*[h] T → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
 /3 width=3 by cpm_cpms, cprs_div/ qed-.
 
-lemma cpr_cprs_conf_cpcs (h) (G) (L): ∀T,T1. ⦃G, L⦄ ⊢ T ➡*[h] T1 →
-                                      ∀T2. ⦃G, L⦄ ⊢ T ➡[h] T2 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
+lemma cpr_cprs_conf_cpcs (h) (G) (L): ∀T,T1. ⦃G,L⦄ ⊢ T ➡*[h] T1 →
+                                      ∀T2. ⦃G,L⦄ ⊢ T ➡[h] T2 → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
 #h #G #L #T #T1 #HT1 #T2 #HT2 elim (cprs_strip … HT1 … HT2) -HT1 -HT2
 /2 width=3 by cpr_cprs_div/
 qed-.
 
-lemma cprs_cpr_conf_cpcs (h) (G) (L): ∀T,T1. ⦃G, L⦄ ⊢ T ➡*[h] T1 →
-                                      ∀T2. ⦃G, L⦄ ⊢ T ➡[h] T2 → ⦃G, L⦄ ⊢ T2 ⬌*[h] T1.
+lemma cprs_cpr_conf_cpcs (h) (G) (L): ∀T,T1. ⦃G,L⦄ ⊢ T ➡*[h] T1 →
+                                      ∀T2. ⦃G,L⦄ ⊢ T ➡[h] T2 → ⦃G,L⦄ ⊢ T2 ⬌*[h] T1.
 #h #G #L #T #T1 #HT1 #T2 #HT2 elim (cprs_strip … HT1 … HT2) -HT1 -HT2
 /2 width=3 by cprs_cpr_div/
 qed-.
 
-lemma cprs_conf_cpcs (h) (G) (L): ∀T,T1. ⦃G, L⦄ ⊢ T ➡*[h] T1 →
-                                  ∀T2. ⦃G, L⦄ ⊢ T ➡*[h] T2 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
+lemma cprs_conf_cpcs (h) (G) (L): ∀T,T1. ⦃G,L⦄ ⊢ T ➡*[h] T1 →
+                                  ∀T2. ⦃G,L⦄ ⊢ T ➡*[h] T2 → ⦃G,L⦄ ⊢ T1 ⬌*[h] T2.
 #h #G #L #T #T1 #HT1 #T2 #HT2 elim (cprs_conf … HT1 … HT2) -HT1 -HT2
 /2 width=3 by cprs_div/
 qed-.
 
 (* Basic_1: was only: pc3_thin_dx *)
-lemma cpcs_flat (h) (G) (L): ∀V1,V2. ⦃G, L⦄ ⊢ V1 ⬌*[h] V2 →
-                             ∀T1,T2. ⦃G, L⦄ ⊢ T1 ⬌*[h] T2 →
-                             ∀I. ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ⬌*[h] ⓕ{I}V2.T2.
+lemma cpcs_flat (h) (G) (L): ∀V1,V2. ⦃G,L⦄ ⊢ V1 ⬌*[h] V2 →
+                             ∀T1,T2. ⦃G,L⦄ ⊢ T1 ⬌*[h] T2 →
+                             ∀I. ⦃G,L⦄ ⊢ ⓕ{I}V1.T1 ⬌*[h] ⓕ{I}V2.T2.
 #h #G #L #V1 #V2 #HV12 #T1 #T2 #HT12
 elim (cpcs_inv_cprs … HV12) -HV12
 elim (cpcs_inv_cprs … HT12) -HT12
 /3 width=5 by cprs_flat, cprs_div/
 qed.
 
-lemma cpcs_flat_dx_cpr_rev (h) (G) (L): ∀V1,V2. ⦃G, L⦄ ⊢ V2 ➡[h] V1 →
-                                        ∀T1,T2. ⦃G, L⦄ ⊢ T1 ⬌*[h] T2 →
-                                        ∀I. ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ⬌*[h] ⓕ{I}V2.T2.
+lemma cpcs_flat_dx_cpr_rev (h) (G) (L): ∀V1,V2. ⦃G,L⦄ ⊢ V2 ➡[h] V1 →
+                                        ∀T1,T2. ⦃G,L⦄ ⊢ T1 ⬌*[h] T2 →
+                                        ∀I. ⦃G,L⦄ ⊢ ⓕ{I}V1.T1 ⬌*[h] ⓕ{I}V2.T2.
 /3 width=1 by cpr_cpcs_sn, cpcs_flat/ qed.
 
-lemma cpcs_bind_dx (h) (G) (L): ∀I,V,T1,T2. ⦃G, L.ⓑ{I}V⦄ ⊢ T1 ⬌*[h] T2 →
-                                ∀p. ⦃G, L⦄ ⊢ ⓑ{p,I}V.T1 ⬌*[h] ⓑ{p,I}V.T2.
+lemma cpcs_bind_dx (h) (G) (L): ∀I,V,T1,T2. ⦃G,L.ⓑ{I}V⦄ ⊢ T1 ⬌*[h] T2 →
+                                ∀p. ⦃G,L⦄ ⊢ ⓑ{p,I}V.T1 ⬌*[h] ⓑ{p,I}V.T2.
 #h #G #L #I #V #T1 #T2 #HT12 elim (cpcs_inv_cprs … HT12) -HT12
 /3 width=5 by cprs_div, cpms_bind/
 qed.
 
-lemma cpcs_bind_sn (h) (G) (L): ∀I,V1,V2,T. ⦃G, L⦄ ⊢ V1 ⬌*[h] V2 →
-                                ∀p. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T ⬌*[h] ⓑ{p,I}V2.T.
+lemma cpcs_bind_sn (h) (G) (L): ∀I,V1,V2,T. ⦃G,L⦄ ⊢ V1 ⬌*[h] V2 →
+                                ∀p. ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T ⬌*[h] ⓑ{p,I}V2.T.
 #h #G #L #I #V1 #V2 #T #HV12 elim (cpcs_inv_cprs … HV12) -HV12
 /3 width=5 by cprs_div, cpms_bind/
 qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpcs_csx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpcs_csx.ma
new file mode 100644 (file)
index 0000000..f37dc41
--- /dev/null
@@ -0,0 +1,40 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/cpre_csx.ma".
+include "basic_2/rt_computation/cpre_cpre.ma".
+include "basic_2/rt_equivalence/cpcs_cprs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL R-EQUIVALENCE FOR TERMS ***********************)
+
+(* Properties with strongly normalizing terms for unbound rt-transition *****)
+
+(* Basic_1: was: cpcs_dec *)
+lemma csx_cpcs_dec (h) (G) (L):
+      ∀T1. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T1⦄ → ∀T2. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T2⦄ →
+      Decidable … (⦃G,L⦄ ⊢ T1 ⬌*[h] T2).
+#h #G #L #T1 #HT1 #T2 #HT2
+elim (cpre_total_csx … HT1) -HT1 #U1 #HTU1
+elim (cpre_total_csx … HT2) -HT2 #U2 #HTU2
+elim (eq_term_dec U1 U2) [ #H destruct | #HnU12 ]
+[ cases HTU1 -HTU1 #HTU1 #_
+  cases HTU2 -HTU2 #HTU2 #_
+  /3 width=3 by cprs_div, or_introl/
+| @or_intror #H
+  elim (cpcs_inv_cprs … H) -H #T0 #HT10 #HT20
+  lapply (cpre_cprs_conf … HT10 … HTU1) -T1 #H1
+  lapply (cpre_cprs_conf … HT20 … HTU2) -T2 #H2
+  /3 width=6 by cpre_mono/
+]
+qed-.
index 3564a480a1ab5c769c29f6f5a8fd7227c94af943..6da444ce16f119823f85eba2942f9cbd7fb66e82 100644 (file)
@@ -19,20 +19,20 @@ include "basic_2/rt_equivalence/cpcs_cprs.ma".
 
 (* Properties with parallel r-computation for full local environments *******)
 
-lemma lpr_cpcs_trans (h) (G): ∀L1,L2. ⦃G, L1⦄ ⊢ ➡[h] L2 →
-                              ∀T1,T2. ⦃G, L2⦄ ⊢ T1 ⬌*[h] T2 → ⦃G, L1⦄ ⊢ T1 ⬌*[h] T2.
+lemma lpr_cpcs_trans (h) (G): ∀L1,L2. ⦃G,L1⦄ ⊢ ➡[h] L2 →
+                              ∀T1,T2. ⦃G,L2⦄ ⊢ T1 ⬌*[h] T2 → ⦃G,L1⦄ ⊢ T1 ⬌*[h] T2.
 #h #G #L1 #L2 #HL12 #T1 #T2 #H elim (cpcs_inv_cprs … H) -H
  /4 width=5 by cprs_div, lpr_cpms_trans/
 qed-.
 
-lemma lprs_cpcs_trans (h) (G): ∀L1,L2. ⦃G, L1⦄ ⊢ ➡*[h] L2 →
-                               ∀T1,T2. ⦃G, L2⦄ ⊢ T1 ⬌*[h] T2 → ⦃G, L1⦄ ⊢ T1 ⬌*[h] T2.
+lemma lprs_cpcs_trans (h) (G): ∀L1,L2. ⦃G,L1⦄ ⊢ ➡*[h] L2 →
+                               ∀T1,T2. ⦃G,L2⦄ ⊢ T1 ⬌*[h] T2 → ⦃G,L1⦄ ⊢ T1 ⬌*[h] T2.
 #h #G #L1 #L2 #HL12 #T1 #T2 #H elim (cpcs_inv_cprs … H) -H
 /4 width=5 by cprs_div, lprs_cpms_trans/
 qed-.
 
-lemma lprs_cprs_conf (h) (G): ∀L1,L2. ⦃G, L1⦄ ⊢ ➡*[h] L2 →
-                              ∀T1,T2. ⦃G, L1⦄ ⊢ T1 ➡*[h] T2 → ⦃G, L2⦄ ⊢ T1 ⬌*[h] T2.
+lemma lprs_cprs_conf (h) (G): ∀L1,L2. ⦃G,L1⦄ ⊢ ➡*[h] L2 →
+                              ∀T1,T2. ⦃G,L1⦄ ⊢ T1 ➡*[h] T2 → ⦃G,L2⦄ ⊢ T1 ⬌*[h] T2.
 #h #G #L1 #L2 #HL12 #T1 #T2 #HT12 elim (lprs_cprs_conf_dx … HT12 … HL12) -L1
 /2 width=3 by cprs_div/
 qed-.
@@ -40,23 +40,23 @@ qed-.
 (* Basic_1: was: pc3_wcpr0_t *)
 (* Basic_1: note: pc3_wcpr0_t should be renamed *)
 (* Note: alternative proof /3 width=5 by lprs_cprs_conf, lpr_lprs/ *)
-lemma lpr_cprs_conf (h) (G): ∀L1,L2. ⦃G, L1⦄ ⊢ ➡[h] L2 →
-                             ∀T1,T2. ⦃G, L1⦄ ⊢ T1 ➡*[h] T2 → ⦃G, L2⦄ ⊢ T1 ⬌*[h] T2.
+lemma lpr_cprs_conf (h) (G): ∀L1,L2. ⦃G,L1⦄ ⊢ ➡[h] L2 →
+                             ∀T1,T2. ⦃G,L1⦄ ⊢ T1 ➡*[h] T2 → ⦃G,L2⦄ ⊢ T1 ⬌*[h] T2.
 #h #G #L1 #L2 #HL12 #T1 #T2 #HT12 elim (cprs_lpr_conf_dx … HT12 … HL12) -L1
 /2 width=3 by cprs_div/
 qed-.
 
 (* Basic_1: was only: pc3_pr0_pr2_t *)
 (* Basic_1: note: pc3_pr0_pr2_t should be renamed *)
-lemma lpr_cpr_conf (h) (G): ∀L1,L2. ⦃G, L1⦄ ⊢ ➡[h] L2 →
-                            ∀T1,T2. ⦃G, L1⦄ ⊢ T1 ➡[h] T2 → ⦃G, L2⦄ ⊢ T1 ⬌*[h] T2.
+lemma lpr_cpr_conf (h) (G): ∀L1,L2. ⦃G,L1⦄ ⊢ ➡[h] L2 →
+                            ∀T1,T2. ⦃G,L1⦄ ⊢ T1 ➡[h] T2 → ⦃G,L2⦄ ⊢ T1 ⬌*[h] T2.
 /3 width=5 by lpr_cprs_conf, cpm_cpms/ qed-.
 
 (* Advanced inversion lemmas ************************************************)
 
 (* Note: there must be a proof suitable for lfpr *)
-lemma cpcs_inv_abst_sn (h) (G) (L): ∀p1,p2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ ⓛ{p1}W1.T1 ⬌*[h] ⓛ{p2}W2.T2 →
-                                    ∧∧ ⦃G, L⦄ ⊢ W1 ⬌*[h] W2 & ⦃G, L.ⓛW1⦄ ⊢ T1 ⬌*[h] T2 & p1 = p2.
+lemma cpcs_inv_abst_sn (h) (G) (L): ∀p1,p2,W1,W2,T1,T2. ⦃G,L⦄ ⊢ ⓛ{p1}W1.T1 ⬌*[h] ⓛ{p2}W2.T2 →
+                                    ∧∧ ⦃G,L⦄ ⊢ W1 ⬌*[h] W2 & ⦃G,L.ⓛW1⦄ ⊢ T1 ⬌*[h] T2 & p1 = p2.
 #h #G #L #p1 #p2 #W1 #W2 #T1 #T2 #H
 elim (cpcs_inv_cprs … H) -H #T #H1 #H2
 elim (cpms_inv_abst_sn … H1) -H1 #W0 #T0 #HW10 #HT10 #H destruct
@@ -66,8 +66,8 @@ lapply (lprs_cpcs_trans … (L.ⓛW1) … HT2) /2 width=1 by lprs_pair/ -HT2 #HT
 /4 width=3 by and3_intro, cprs_div, cpcs_cprs_div, cpcs_sym/
 qed-.
 
-lemma cpcs_inv_abst_dx (h) (G) (L): ∀p1,p2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ ⓛ{p1}W1.T1 ⬌*[h] ⓛ{p2}W2.T2 →
-                                   ∧∧ ⦃G, L⦄ ⊢ W1 ⬌*[h] W2 & ⦃G, L.ⓛW2⦄ ⊢ T1 ⬌*[h] T2 & p1 = p2.
+lemma cpcs_inv_abst_dx (h) (G) (L): ∀p1,p2,W1,W2,T1,T2. ⦃G,L⦄ ⊢ ⓛ{p1}W1.T1 ⬌*[h] ⓛ{p2}W2.T2 →
+                                   ∧∧ ⦃G,L⦄ ⊢ W1 ⬌*[h] W2 & ⦃G,L.ⓛW2⦄ ⊢ T1 ⬌*[h] T2 & p1 = p2.
 #h #G #L #p1 #p2 #W1 #W2 #T1 #T2 #HT12 lapply (cpcs_sym … HT12) -HT12
 #HT12 elim (cpcs_inv_abst_sn … HT12) -HT12 /3 width=1 by cpcs_sym, and3_intro/
 qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpes.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpes.ma
new file mode 100644 (file)
index 0000000..de444a0
--- /dev/null
@@ -0,0 +1,43 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/notation/relations/pconvstar_7.ma".
+include "basic_2/rt_computation/cpms.ma".
+
+(* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-EQUIVALENCE FOR TERMS **************)
+
+(* Basic_2A1: uses: scpes *)
+definition cpes (h) (n1) (n2): relation4 genv lenv term term ≝
+           λG,L,T1,T2.
+           ∃∃T. ⦃G,L⦄ ⊢ T1 ➡*[n1,h] T & ⦃G,L⦄ ⊢ T2 ➡*[n2,h] T.
+
+interpretation "t-bound context-sensitive parallel rt-equivalence (term)"
+   'PConvStar h n1 n2 G L T1 T2 = (cpes h n1 n2 G L T1 T2).
+
+(* Basic properties *********************************************************)
+
+(* Basic_2A1: uses: scpds_div *)
+lemma cpms_div (h) (n1) (n2):
+      ∀G,L,T1,T. ⦃G,L⦄ ⊢ T1 ➡*[n1,h] T →
+      ∀T2. ⦃G,L⦄ ⊢ T2 ➡*[n2,h] T → ⦃G,L⦄ ⊢ T1 ⬌*[h,n1,n2] T2.
+/2 width=3 by ex2_intro/ qed.
+
+lemma cpes_refl (h): ∀G,L. reflexive … (cpes h 0 0 G L).
+/2 width=3 by cpms_div/ qed.
+
+(* Basic_2A1: uses: scpes_sym *)
+lemma cpes_sym (h) (n1) (n2):
+      ∀G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ⬌*[h,n1,n2] T2 → ⦃G,L⦄ ⊢ T2 ⬌*[h,n2,n1] T1.
+#h #n1 #n2 #G #L #T1 #T2 * /2 width=3 by cpms_div/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpes_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpes_aaa.ma
new file mode 100644 (file)
index 0000000..06eacc6
--- /dev/null
@@ -0,0 +1,40 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/cpms_aaa.ma".
+include "basic_2/rt_equivalence/cpes.ma".
+
+(* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-EQUIVALENCE FOR TERMS **************)
+
+(* Properties with atomic arity assignment on terms *************************)
+
+(* Basic_2A1: uses: scpes_refl *)
+lemma cpes_refl_aaa (h) (n):
+      ∀G,L,T,A.  ⦃G,L⦄ ⊢ T ⁝ A → ⦃G,L⦄ ⊢ T ⬌*[h,n,n] T.
+#h #n #G #L #T #A #HA
+elim (cpms_total_aaa h … n … HA) #U #HTU
+/2 width=3 by cpms_div/
+qed.
+
+(* Main inversion lemmas with atomic arity assignment on terms **************)
+
+(* Basic_2A1: uses: scpes_aaa_mono *)
+theorem cpes_aaa_mono (h) (n1) (n2):
+        ∀G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ⬌*[h,n1,n2] T2 →
+        ∀A1. ⦃G,L⦄ ⊢ T1 ⁝ A1 → ∀A2. ⦃G,L⦄ ⊢ T2 ⁝ A2 → A1 = A2.
+#h #n1 #n2 #G #L #T1 #T2 * #T #HT1 #HT2 #A1 #HA1 #A2 #HA2
+lapply (cpms_aaa_conf … HA1 … HT1) -T1 #HA1
+lapply (cpms_aaa_conf … HA2 … HT2) -T2 #HA2
+lapply (aaa_mono … HA1 … HA2) -L -T //
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpes_cpes.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpes_cpes.ma
new file mode 100644 (file)
index 0000000..73dca97
--- /dev/null
@@ -0,0 +1,39 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/lprs_cpms.ma".
+include "basic_2/rt_equivalence/cpes_cpms.ma".
+
+(* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-EQUIVALENCE FOR TERMS **************)
+
+(* Advanced forward lemmas **************************************************)
+
+lemma cpes_fwd_abst_bi (h) (n1) (n2) (p1) (p2) (G) (L):
+      ∀W1,W2,T1,T2. ⦃G,L⦄ ⊢ ⓛ{p1}W1.T1 ⬌*[h,n1,n2] ⓛ{p2}W2.T2 →
+      ∧∧ p1 = p2 & ⦃G,L⦄ ⊢ W1 ⬌*[h,0,O] W2.
+#h #n1 #n2 #p1 #p2 #G #L #W1 #W2 #T1 #T2 * #X #H1 #H2
+elim (cpms_inv_abst_sn … H1) #W0 #X0 #HW10 #_ #H destruct
+elim (cpms_inv_abst_bi … H2) #H #HW20 #_ destruct
+/3 width=3 by cpms_div, conj/
+qed-.
+
+(* Main properties **********************************************************)
+
+theorem cpes_cpes_trans (h) (n1) (n2) (G) (L) (T):
+        ∀T1. ⦃G,L⦄ ⊢ T ⬌*[h,n1,0] T1 →
+        ∀T2. ⦃G,L⦄ ⊢ T1 ⬌*[h,0,n2] T2 → ⦃G,L⦄ ⊢ T ⬌*[h,n1,n2] T2.
+#h #n1 #n2 #G #L #T #T1 #HT1 #T2 * #X #HX1 #HX2
+lapply (cpes_cprs_trans … HT1 … HX1) -T1 #HTX
+lapply (cpes_cpms_div … HTX … HX2) -X //
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpes_cpms.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpes_cpms.ma
new file mode 100644 (file)
index 0000000..48b0ceb
--- /dev/null
@@ -0,0 +1,36 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/cprs_cprs.ma".
+include "basic_2/rt_equivalence/cpes.ma".
+
+(* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-EQUIVALENCE FOR TERMS **************)
+
+(* Properties with t-bound rt-computation on terms **************************)
+
+lemma cpes_cprs_trans (h) (n) (G) (L) (T0):
+      ∀T1.  ⦃G,L⦄ ⊢ T1 ⬌*[h,n,0] T0 →
+      ∀T2.  ⦃G,L⦄ ⊢ T0 ➡*[h] T2 → ⦃G,L⦄ ⊢ T1 ⬌*[h,n,0] T2.
+#h #n #G #L #T0 #T1 * #T #HT1 #HT0 #T2 #HT02
+elim (cprs_conf … HT0 … HT02) -T0 #T0 #HT0 #HT20
+/3 width=3 by cpms_div, cpms_cprs_trans/
+qed-.
+
+lemma cpes_cpms_div (h) (n) (n1) (n2) (G) (L) (T0):
+      ∀T1.  ⦃G,L⦄ ⊢ T1 ⬌*[h,n,n1] T0 →
+      ∀T2.  ⦃G,L⦄ ⊢ T2 ➡*[n2,h] T0 → ⦃G,L⦄ ⊢ T1 ⬌*[h,n,n2+n1] T2.
+#h #n #n1 #n2 #G #L #T0 #T1 * #T #HT1 #HT0 #T2 #HT20
+lapply (cpms_trans … HT20 … HT0) -T0 #HT2
+/2 width=3 by cpms_div/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnr.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnr.ma
new file mode 100644 (file)
index 0000000..aa739d6
--- /dev/null
@@ -0,0 +1,83 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/notation/relations/prednormal_4.ma".
+include "basic_2/rt_transition/cpr.ma".
+
+(* NORMAL TERMS FOR CONTEXT-SENSITIVE R-TRANSITION **************************)
+
+definition cnr (h) (G) (L): predicate term ≝ NF … (cpm h G L 0) (eq …).
+
+interpretation
+   "normality for context-sensitive r-transition (term)"
+   'PRedNormal h G L T = (cnr h G L T).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma cnr_inv_abst (h) (p) (G) (L):
+      ∀V,T. ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃ⓛ{p}V.T⦄ → ∧∧ ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃V⦄ & ⦃G,L.ⓛV⦄ ⊢ ➡[h] 𝐍⦃T⦄.
+#h #p #G #L #V1 #T1 #HVT1 @conj
+[ #V2 #HV2 lapply (HVT1 (ⓛ{p}V2.T1) ?) -HVT1 /2 width=2 by cpr_pair_sn/ -HV2 #H destruct //
+| #T2 #HT2 lapply (HVT1 (ⓛ{p}V1.T2) ?) -HVT1 /2 width=2 by cpm_bind/ -HT2 #H destruct //
+]
+qed-.
+
+(* Basic_2A1: was: cnr_inv_abbr *)
+lemma cnr_inv_abbr_neg (h) (G) (L):
+      ∀V,T. ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃-ⓓV.T⦄ → ∧∧ ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃V⦄ & ⦃G,L.ⓓV⦄ ⊢ ➡[h] 𝐍⦃T⦄.
+#h #G #L #V1 #T1 #HVT1 @conj
+[ #V2 #HV2 lapply (HVT1 (-ⓓV2.T1) ?) -HVT1 /2 width=2 by cpr_pair_sn/ -HV2 #H destruct //
+| #T2 #HT2 lapply (HVT1 (-ⓓV1.T2) ?) -HVT1 /2 width=2 by cpm_bind/ -HT2 #H destruct //
+]
+qed-.
+
+(* Basic_2A1: was: cnr_inv_eps *)
+lemma cnr_inv_cast (h) (G) (L): ∀V,T. ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃ⓝV.T⦄ → ⊥.
+#h #G #L #V #T #H lapply (H T ?) -H
+/2 width=4 by cpm_eps, discr_tpair_xy_y/
+qed-.
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was: nf2_sort *)
+lemma cnr_sort (h) (G) (L): ∀s. ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃⋆s⦄.
+#h #G #L #s #X #H
+>(cpr_inv_sort1 … H) //
+qed.
+
+lemma cnr_gref (h) (G) (L): ∀l. ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃§l⦄.
+#h #G #L #l #X #H
+>(cpr_inv_gref1 … H) //
+qed.
+
+(* Basic_1: was: nf2_abst *)
+lemma cnr_abst (h) (p) (G) (L):
+      ∀W,T. ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃W⦄ → ⦃G,L.ⓛW⦄ ⊢ ➡[h] 𝐍⦃T⦄ → ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃ⓛ{p}W.T⦄.
+#h #p #G #L #W #T #HW #HT #X #H
+elim (cpm_inv_abst1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct
+<(HW … HW0) -W0 <(HT … HT0) -T0 //
+qed.
+
+lemma cnr_abbr_neg (h) (G) (L):
+      ∀V,T. ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃V⦄ → ⦃G,L.ⓓV⦄ ⊢ ➡[h] 𝐍⦃T⦄ → ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃-ⓓV.T⦄.
+#h #G #L #V #T #HV #HT #X #H
+elim (cpm_inv_abbr1 … H) -H *
+[ #V0 #T0 #HV0 #HT0 #H destruct
+  <(HV … HV0) -V0 <(HT … HT0) -T0 //
+| #T0 #_ #_ #H destruct
+]
+qed.
+
+
+(* Basic_1: removed theorems 1: nf2_abst_shift *)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnr_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnr_drops.ma
new file mode 100644 (file)
index 0000000..8d9a8ce
--- /dev/null
@@ -0,0 +1,77 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_transition/cpr_drops.ma".
+include "basic_2/rt_transition/cnr.ma".
+
+(* NORMAL TERMS FOR CONTEXT-SENSITIVE R-TRANSITION **************************)
+
+(* Advanced properties ******************************************************)
+
+(* Basic_1: was only: nf2_csort_lref *)
+lemma cnr_lref_atom (h) (b) (G) (L):
+      ∀i. ⬇*[b,𝐔❴i❵] L ≘ ⋆ → ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃#i⦄.
+#h #b #G #L #i #Hi #X #H
+elim (cpr_inv_lref1_drops … H) -H // * #K #V1 #V2 #HLK
+lapply (drops_gen b … HLK) -HLK #HLK
+lapply (drops_mono … Hi … HLK) -L #H destruct
+qed.
+
+(* Basic_1: was: nf2_lref_abst *)
+lemma cnr_lref_abst (h) (G) (L):
+      ∀K,V,i. ⬇*[i] L ≘ K.ⓛV → ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃#i⦄.
+#h #G #L #K #V #i #HLK #X #H
+elim (cpr_inv_lref1_drops … H) -H // *
+#K0 #V1 #V2 #HLK0 #_ #_
+lapply (drops_mono … HLK … HLK0) -L #H destruct
+qed.
+
+lemma cnr_lref_unit (h) (I) (G) (L):
+      ∀K,i. ⬇*[i] L ≘ K.ⓤ{I} → ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃#i⦄.
+#h #I #G #L #K #i #HLK #X #H
+elim (cpr_inv_lref1_drops … H) -H // *
+#K0 #V1 #V2 #HLK0 #_ #_
+lapply (drops_mono … HLK … HLK0) -L #H destruct
+qed.
+
+(* Properties with generic relocation ***************************************)
+
+(* Basic_1: was: nf2_lift *)
+(* Basic_2A1: uses: cnr_lift *)
+lemma cnr_lifts (h) (G): d_liftable1 … (cnr h G).
+#h #G #K #T #HT #b #f #L #HLK #U #HTU #U0 #H
+elim (cpm_inv_lifts_sn … H … HLK … HTU) -b -L #T0 #HTU0 #HT0
+lapply (HT … HT0) -G -K #H destruct /2 width=4 by lifts_mono/
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+(* Basic_2A1: was: cnr_inv_delta *)
+lemma cnr_inv_lref_abbr (h) (G) (L):
+      ∀K,V,i. ⬇*[i] L ≘ K.ⓓV → ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃#i⦄ → ⊥.
+#h #G #L #K #V #i #HLK #H
+elim (lifts_total V 𝐔❴↑i❵) #W #HVW
+lapply (H W ?) -H [ /3 width=6 by cpm_delta_drops/ ] -HLK #H destruct
+elim (lifts_inv_lref2_uni_lt … HVW) -HVW //
+qed-.
+
+(* Inversion lemmas with generic relocation *********************************)
+
+(* Note: this was missing in Basic_1 *)
+(* Basic_2A1: uses: cnr_inv_lift *)
+lemma cnr_inv_lifts (h) (G): d_deliftable1 … (cnr h G).
+#h #G #L #U #HU #b #f #K #HLK #T #HTU #T0 #H
+elim (cpm_lifts_sn … H … HLK … HTU) -b -K #U0 #HTU0 #HU0
+lapply (HU … HU0) -G -L #H destruct /2 width=4 by lifts_inj/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnr_simple.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnr_simple.ma
new file mode 100644 (file)
index 0000000..20039da
--- /dev/null
@@ -0,0 +1,43 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/rt_transition/cpm_simple.ma".
+include "basic_2/rt_transition/cnr.ma".
+
+(* NORMAL TERMS FOR CONTEXT-SENSITIVE R-TRANSITION **************************)
+
+(* Inversion lemmas with simple terms ***************************************)
+
+lemma cnr_inv_appl (h) (G) (L):
+      ∀V,T. ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃ⓐV.T⦄ → ∧∧ ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃V⦄ & ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃T⦄ & 𝐒⦃T⦄.
+#h #G #L #V1 #T1 #HVT1 @and3_intro
+[ #V2 #HV2 lapply (HVT1 (ⓐV2.T1) ?) -HVT1 /2 width=1 by cpr_pair_sn/ -HV2 #H destruct //
+| #T2 #HT2 lapply (HVT1 (ⓐV1.T2) ?) -HVT1 /2 width=1 by cpr_flat/ -HT2 #H destruct //
+| generalize in match HVT1; -HVT1 elim T1 -T1 * // #a * #W1 #U1 #_ #_ #H
+  [ elim (lifts_total V1 𝐔❴1❵) #V2 #HV12
+    lapply (H (ⓓ{a}W1.ⓐV2.U1) ?) -H /2 width=3 by cpm_theta/ -HV12 #H destruct
+  | lapply (H (ⓓ{a}ⓝW1.V1.U1) ?) -H /2 width=1 by cpm_beta/ #H destruct
+  ]
+]
+qed-.
+
+(* Properties with simple terms *********************************************)
+
+(* Basic_1: was only: nf2_appl_lref *)
+lemma cnr_appl_simple (h) (G) (L):
+      ∀V,T. ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃V⦄ → ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃T⦄ → 𝐒⦃T⦄ → ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃ⓐV.T⦄.
+#h #G #L #V #T #HV #HT #HS #X #H
+elim (cpm_inv_appl1_simple … H) -H // #V0 #T0 #HV0 #HT0 #H destruct
+<(HV … HV0) -V0 <(HT … HT0) -T0 //
+qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnr_tdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnr_tdeq.ma
new file mode 100644 (file)
index 0000000..00d42e1
--- /dev/null
@@ -0,0 +1,97 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/relocation/lifts_tdeq.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 sort-irrelevant equivalence for terms *******)
+
+(* Basic_1: was: nf2_dec *)
+(* Basic_2A1: uses: cnr_dec *)
+lemma cnr_dec_tdeq (h) (G) (L):
+      ∀T1. ∨∨ ⦃G,L⦄ ⊢ ➡[h] 𝐍⦃T1⦄
+            | ∃∃T2. ⦃G,L⦄ ⊢ T1 ➡[h] 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 (tdeq_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 (tdeq_dec T1 T2) [ -HT12 #HT12 | #HnT12 ]
+    [ elim (tdeq_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 tdeq_lifts_inv_pair_sn/
+    | @or_intror @(ex2_intro … (+ⓓV1.T2)) [ /2 width=1 by cpm_bind/ ] #H
+      elim (tdeq_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 (tdeq_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 (tdeq_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 (tdeq_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 (tdeq_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 (tdeq_inv_pair … H) -H #H destruct
+      | @or_intror @(ex2_intro … (ⓓ{p}ⓝW1.V1.U1)) [ /2 width=1 by cpm_beta/ ] #H
+        elim (tdeq_inv_pair … H) -H #H destruct
+      ]
+    | #T2 #HT12 #HnT12 #_
+      @or_intror @(ex2_intro … (ⓐV1.T2)) [ /2 width=1 by cpm_appl/ ] #H
+      elim (tdeq_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 (tdeq_inv_pair … H) -H /2 width=1 by/
+    ]
+  | @or_intror @(ex2_intro … T1) [ /2 width=1 by cpm_eps/ ] #H
+    /2 width=4 by tdeq_inv_pair_xy_y/
+  ]
+]
+qed-.
index cc2397d0f8dbf569165da561cac9bd99fc340cb1..a79e8d74e25bb945fc5dbc152cbd7eb05d4a96fe 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/notation/relations/predtynormal_5.ma".
+include "basic_2/notation/relations/predtynormal_4.ma".
 include "static_2/syntax/tdeq.ma".
 include "basic_2/rt_transition/cpx.ma".
 
 (* NORMAL TERMS FOR UNBOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION ********)
 
-definition cnx: ∀h. sd h → relation3 genv lenv term ≝
-                λh,o,G,L. NF … (cpx h G L) (tdeq h o …).
+definition cnx: ∀h. relation3 genv lenv term ≝
+                λh,G,L. NF … (cpx h G L) tdeq.
 
 interpretation
    "normality for unbound context-sensitive parallel rt-transition (term)"
-   'PRedTyNormal h o G L T = (cnx h o G L T).
+   'PRedTyNormal h G L T = (cnx h G L T).
 
 (* Basic inversion lemmas ***************************************************)
 
-lemma cnx_inv_sort: ∀h,o,G,L,s. ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃⋆s⦄ → deg h o s 0.
-#h #o #G #L #s #H
-lapply (H (⋆(next h s)) ?) -H /2 width=2 by cpx_ess/ -G -L #H
-elim (tdeq_inv_sort1 … H) -H #s0 #d #H1 #H2 #H destruct
-lapply (deg_next … H1) #H0
-lapply (deg_mono … H0 … H2) -H0 -H2 #H
->(pred_inv_fix_sn … H) -H //
-qed-.
-
-lemma cnx_inv_abst: ∀h,o,p,G,L,V,T. ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃ⓛ{p}V.T⦄ →
-                    ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃V⦄ ∧ ⦃G, L.ⓛV⦄ ⊢ ⬈[h, o] 𝐍⦃T⦄.
-#h #o #p #G #L #V1 #T1 #HVT1 @conj
+lemma cnx_inv_abst: ∀h,p,G,L,V,T. ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃ⓛ{p}V.T⦄ →
+                    ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃V⦄ ∧ ⦃G,L.ⓛV⦄ ⊢ ⬈[h] 𝐍⦃T⦄.
+#h #p #G #L #V1 #T1 #HVT1 @conj
 [ #V2 #HV2 lapply (HVT1 (ⓛ{p}V2.T1) ?) -HVT1 /2 width=2 by cpx_pair_sn/ -HV2
 | #T2 #HT2 lapply (HVT1 (ⓛ{p}V1.T2) ?) -HVT1 /2 width=2 by cpx_bind/ -HT2
 ]
@@ -46,9 +37,9 @@ lemma cnx_inv_abst: ∀h,o,p,G,L,V,T. ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃ⓛ{p}V.T
 qed-.
 
 (* Basic_2A1: was: cnx_inv_abbr *)
-lemma cnx_inv_abbr_neg: ∀h,o,G,L,V,T. ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃-ⓓV.T⦄ →
-                        ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃V⦄ ∧ ⦃G, L.ⓓV⦄ ⊢ ⬈[h, o] 𝐍⦃T⦄.
-#h #o #G #L #V1 #T1 #HVT1 @conj
+lemma cnx_inv_abbr_neg: ∀h,G,L,V,T. ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃-ⓓV.T⦄ →
+                        ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃V⦄ ∧ ⦃G,L.ⓓV⦄ ⊢ ⬈[h] 𝐍⦃T⦄.
+#h #G #L #V1 #T1 #HVT1 @conj
 [ #V2 #HV2 lapply (HVT1 (-ⓓV2.T1) ?) -HVT1 /2 width=2 by cpx_pair_sn/ -HV2 
 | #T2 #HT2 lapply (HVT1 (-ⓓV1.T2) ?) -HVT1 /2 width=2 by cpx_bind/ -HT2
 ]
@@ -56,26 +47,21 @@ lemma cnx_inv_abbr_neg: ∀h,o,G,L,V,T. ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃-ⓓV.T
 qed-.
 
 (* Basic_2A1: was: cnx_inv_eps *)
-lemma cnx_inv_cast: ∀h,o,G,L,V,T. ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃ⓝV.T⦄ → ⊥.
-#h #o #G #L #V #T #H lapply (H T ?) -H
+lemma cnx_inv_cast: ∀h,G,L,V,T. ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃ⓝV.T⦄ → ⊥.
+#h #G #L #V #T #H lapply (H T ?) -H
 /2 width=6 by cpx_eps, tdeq_inv_pair_xy_y/
 qed-.
 
 (* Basic properties *********************************************************)
 
-lemma cnx_sort: ∀h,o,G,L,s. deg h o s 0 → ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃⋆s⦄.
-#h #o #G #L #s #Hs #X #H elim (cpx_inv_sort1 … H) -H
-/3 width=3 by tdeq_sort, deg_next/
-qed.
-
-lemma cnx_sort_iter: ∀h,o,G,L,s,d. deg h o s d → ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃⋆((next h)^d s)⦄.
-#h #o #G #L #s #d #Hs lapply (deg_iter … d Hs) -Hs
-<minus_n_n /2 width=6 by cnx_sort/
+lemma cnx_sort: ∀h,G,L,s. ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃⋆s⦄.
+#h #G #L #s #X #H elim (cpx_inv_sort1 … H) -H
+/2 width=1 by tdeq_sort/
 qed.
 
-lemma cnx_abst: ∀h,o,p,G,L,W,T. ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃W⦄ → ⦃G, L.ⓛW⦄ ⊢ ⬈[h, o] 𝐍⦃T⦄ →
-                ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃ⓛ{p}W.T⦄.
-#h #o #p #G #L #W #T #HW #HT #X #H
+lemma cnx_abst: ∀h,p,G,L,W,T. ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃W⦄ → ⦃G,L.ⓛW⦄ ⊢ ⬈[h] 𝐍⦃T⦄ →
+                ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃ⓛ{p}W.T⦄.
+#h #p #G #L #W #T #HW #HT #X #H
 elim (cpx_inv_abst1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct
 @tdeq_pair [ @HW | @HT ] // (**) (* auto fails because δ-expansion gets in the way *)
 qed.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx_basic.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx_basic.ma
new file mode 100644 (file)
index 0000000..6f7976b
--- /dev/null
@@ -0,0 +1,33 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/relocation/lifts_tdeq.ma".
+include "basic_2/rt_transition/cpx_drops_basic.ma".
+include "basic_2/rt_transition/cnx.ma".
+
+(* NORMAL TERMS FOR UNBOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION ********)
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma cnx_inv_abbr_pos (h) (G) (L): ∀V,T.  ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃+ⓓV.T⦄ → ⊥.
+#h #G #L #V #U1 #H
+elim (cpx_subst h G (L.ⓓV) U1 … 0) [|*: /2 width=4 by drops_refl/ ] #U2 #T2 #HU12 #HTU2
+elim (tdeq_dec U1 U2) #HnU12 [ -HU12 | -HTU2 ]
+[ elim (tdeq_inv_lifts_dx … HnU12 … HTU2) -U2 #T1 #HTU1 #_ -T2
+  lapply (H T1 ?) -H [ /2 width=3 by cpx_zeta/ ] #H
+  /2 width=9 by tdeq_lifts_inv_pair_sn/
+| lapply (H (+ⓓV.U2) ?) -H [ /2 width=1 by cpx_bind/ ] -HU12 #H
+  elim (tdeq_inv_pair … H) -H #_ #_ /2 width=1 by/
+]
+qed-.
index 1cd716e8eed08dc94c7a6d9eff907959b805e776..abbc125a0cad2bd4dd7adcc797def8759a0b8ebe 100644 (file)
@@ -19,9 +19,9 @@ include "basic_2/rt_transition/cnx.ma".
 
 (* Advanced properties ******************************************************)
 
-lemma cnx_tdeq_trans: ∀h,o,G,L,T1. ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃T1⦄ →
-                      ∀T2. T1 ≛[h, o] T2 → ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃T2⦄.
-#h #o #G #L #T1 #HT1 #T2 #HT12 #T #HT2
+lemma cnx_tdeq_trans: ∀h,G,L,T1. ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃T1⦄ →
+                      ∀T2. T1 ≛ T2 → ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃T2⦄.
+#h #G #L #T1 #HT1 #T2 #HT12 #T #HT2
 elim (tdeq_cpx_trans … HT12 … HT2) -HT2 #T0 #HT10 #HT0
 lapply (HT1 … HT10) -HT1 -HT10 /2 width=5 by tdeq_repl/ (**) (* full auto fails *)
 qed-.
index 2e593f991b8040673256f39b789216ecec5174ee..e532b364a13f277bc5087a985890f053f8cf0f81 100644 (file)
@@ -20,19 +20,19 @@ include "basic_2/rt_transition/cnx.ma".
 
 (* Properties with generic slicing ******************************************)
 
-lemma cnx_lref_atom: ∀h,o,G,L,i. ⬇*[i] L ≘ ⋆ → ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃#i⦄.
-#h #o #G #L #i #Hi #X #H elim (cpx_inv_lref1_drops … H) -H // *
+lemma cnx_lref_atom: ∀h,G,L,i. ⬇*[i] L ≘ ⋆ → ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃#i⦄.
+#h #G #L #i #Hi #X #H elim (cpx_inv_lref1_drops … H) -H // *
 #I #K #V1 #V2 #HLK lapply (drops_mono … Hi … HLK) -L #H destruct
 qed.
 
-lemma cnx_lref_unit: ∀h,o,I,G,L,K,i. ⬇*[i] L ≘ K.ⓤ{I} → ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃#i⦄.
-#h #o #I #G #L #K #i #HLK #X #H elim (cpx_inv_lref1_drops … H) -H // *
+lemma cnx_lref_unit: ∀h,I,G,L,K,i. ⬇*[i] L ≘ K.ⓤ{I} → ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃#i⦄.
+#h #I #G #L #K #i #HLK #X #H elim (cpx_inv_lref1_drops … H) -H // *
 #Z #Y #V1 #V2 #HLY lapply (drops_mono … HLK … HLY) -L #H destruct
 qed.
 
 (* Basic_2A1: includes: cnx_lift *)
-lemma cnx_lifts: ∀h,o,G. d_liftable1 … (cnx h o G).
-#h #o #G #K #T #HT #b #f #L #HLK #U #HTU #U0 #H
+lemma cnx_lifts: ∀h,G. d_liftable1 … (cnx h G).
+#h #G #K #T #HT #b #f #L #HLK #U #HTU #U0 #H
 elim (cpx_inv_lifts_sn … H … HLK … HTU) -b -L #T0 #HTU0 #HT0
 lapply (HT … HT0) -G -K /2 width=6 by tdeq_lifts_bi/
 qed-.
@@ -40,8 +40,8 @@ qed-.
 (* Inversion lemmas with generic slicing ************************************)
 
 (* Basic_2A1: was: cnx_inv_delta *)
-lemma cnx_inv_lref_pair: ∀h,o,I,G,L,K,V,i. ⬇*[i] L ≘ K.ⓑ{I}V → ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃#i⦄ → ⊥.
-#h #o #I #G #L #K #V #i #HLK #H
+lemma cnx_inv_lref_pair: ∀h,I,G,L,K,V,i. ⬇*[i] L ≘ K.ⓑ{I}V → ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃#i⦄ → ⊥.
+#h #I #G #L #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 (tdeq_inv_lref1 … H) -H #H destruct
@@ -49,8 +49,8 @@ lapply (H W ?) -H /2 width=7 by cpx_delta_drops/ -HLK
 qed-.
 
 (* Basic_2A1: includes: cnx_inv_lift *)
-lemma cnx_inv_lifts: ∀h,o,G. d_deliftable1 … (cnx h o G).
-#h #o #G #L #U #HU #b #f #K #HLK #T #HTU #T0 #H
+lemma cnx_inv_lifts: ∀h,G. d_deliftable1 … (cnx h G).
+#h #G #L #U #HU #b #f #K #HLK #T #HTU #T0 #H
 elim (cpx_lifts_sn … H … HLK … HTU) -b -K #U0 #HTU0 #HU0
 lapply (HU … HU0) -G -L /2 width=6 by tdeq_inv_lifts_bi/
 qed-.
index 640e24d372274b829e76517cde123c6e7f8a3f32..322930c7fd6825008ea2aaf9fe1fcc4001406350 100644 (file)
@@ -19,9 +19,9 @@ include "basic_2/rt_transition/cnx.ma".
 
 (* Inversion lemmas with simple terms ***************************************)
 
-lemma cnx_inv_appl: ∀h,o,G,L,V,T. ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃ⓐV.T⦄ →
-                    ∧∧ ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃V⦄ & ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃T⦄ & 𝐒⦃T⦄.
-#h #o #G #L #V1 #T1 #HVT1 @and3_intro
+lemma cnx_inv_appl: ∀h,G,L,V,T. ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃ⓐV.T⦄ →
+                    ∧∧ ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃V⦄ & ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃T⦄ & 𝐒⦃T⦄.
+#h #G #L #V1 #T1 #HVT1 @and3_intro
 [ #V2 #HV2 lapply (HVT1 (ⓐV2.T1) ?) -HVT1 /2 width=1 by cpx_pair_sn/ -HV2
   #H elim (tdeq_inv_pair … H) -H //
 | #T2 #HT2 lapply (HVT1 (ⓐV1.T2) ?) -HVT1 /2 width=1 by cpx_flat/ -HT2
@@ -39,9 +39,9 @@ qed-.
 
 (* Properties with simple terms *********************************************)
 
-lemma cnx_appl_simple: ∀h,o,G,L,V,T. ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃V⦄ → ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃T⦄ → 𝐒⦃T⦄ →
-                       ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃ⓐV.T⦄.
-#h #o #G #L #V #T #HV #HT #HS #X #H elim (cpx_inv_appl1_simple … H) -H //
+lemma cnx_appl_simple: ∀h,G,L,V,T. ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃V⦄ → ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃T⦄ → 𝐒⦃T⦄ →
+                       ⦃G,L⦄ ⊢ ⬈[h] 𝐍⦃ⓐV.T⦄.
+#h #G #L #V #T #HV #HT #HS #X #H elim (cpx_inv_appl1_simple … H) -H //
 #V0 #T0 #HV0 #HT0 #H destruct
 @tdeq_pair [ @HV | @HT ] // (**) (* auto fails because δ-expansion gets in the way *)
 qed.
index 1ebd7f744e97ea9118e4b4d41129f0f6e01aff42..72656dd1ad04c852b33433f4790c709635316a59 100644 (file)
@@ -15,7 +15,7 @@
 include "ground_2/steps/rtc_max.ma".
 include "ground_2/steps/rtc_plus.ma".
 include "basic_2/notation/relations/predty_7.ma".
-include "static_2/syntax/item_sh.ma".
+include "static_2/syntax/sh.ma".
 include "static_2/syntax/lenv.ma".
 include "static_2/syntax/genv.ma".
 include "static_2/relocation/lifts.ma".
@@ -25,7 +25,7 @@ include "static_2/relocation/lifts.ma".
 (* avtivate genv *)
 inductive cpg (Rt:relation rtc) (h): rtc → relation4 genv lenv term term ≝
 | cpg_atom : ∀I,G,L. cpg Rt h (𝟘𝟘) G L (⓪{I}) (⓪{I})
-| cpg_ess  : ∀G,L,s. cpg Rt h (𝟘𝟙) G L (⋆s) (⋆(next h s))
+| cpg_ess  : ∀G,L,s. cpg Rt h (𝟘𝟙) G L (⋆s) (⋆(⫯[h]s))
 | cpg_delta: ∀c,G,L,V1,V2,W2. cpg Rt h c G L V1 V2 →
              ⬆*[1] V2 ≘ W2 → cpg Rt h c G (L.ⓓV1) (#0) W2
 | cpg_ell  : ∀c,G,L,V1,V2,W2. cpg Rt h c G L V1 V2 →
@@ -61,21 +61,21 @@ interpretation
 (* Basic properties *********************************************************)
 
 (* Note: this is "∀Rt. reflexive … Rt → ∀h,g,L. reflexive … (cpg Rt h (𝟘𝟘) L)" *)
-lemma cpg_refl: ∀Rt. reflexive … Rt → ∀h,G,T,L. ⦃G, L⦄ ⊢ T ⬈[Rt, 𝟘𝟘, h] T.
+lemma cpg_refl: ∀Rt. reflexive … Rt → ∀h,G,T,L. ⦃G,L⦄ ⊢ T ⬈[Rt,𝟘𝟘,h] T.
 #Rt #HRt #h #G #T elim T -T // * /2 width=1 by cpg_bind/
 * /2 width=1 by cpg_appl, cpg_cast/
 qed.
 
 (* Basic inversion lemmas ***************************************************)
 
-fact cpg_inv_atom1_aux: ∀Rt,c,h,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ⬈[Rt, c, h] T2 → ∀J. T1 = ⓪{J} →
+fact cpg_inv_atom1_aux: ∀Rt,c,h,G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ⬈[Rt,c,h] T2 → ∀J. T1 = ⓪{J} →
                         ∨∨ T2 = ⓪{J} ∧ c = 𝟘𝟘 
-                         | ∃∃s. J = Sort s & T2 = ⋆(next h s) & c = 𝟘𝟙
-                         | ∃∃cV,K,V1,V2. ⦃G, K⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⬆*[1] V2 ≘ T2 &
+                         | ∃∃s. J = Sort s & T2 = ⋆(⫯[h]s) & c = 𝟘𝟙
+                         | ∃∃cV,K,V1,V2. ⦃G,K⦄ ⊢ V1 ⬈[Rt,cV,h] V2 & ⬆*[1] V2 ≘ T2 &
                                          L = K.ⓓV1 & J = LRef 0 & c = cV
-                         | ∃∃cV,K,V1,V2. ⦃G, K⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⬆*[1] V2 ≘ T2 &
+                         | ∃∃cV,K,V1,V2. ⦃G,K⦄ ⊢ V1 ⬈[Rt,cV,h] V2 & ⬆*[1] V2 ≘ T2 &
                                          L = K.ⓛV1 & J = LRef 0 & c = cV+𝟘𝟙
-                         | ∃∃I,K,T,i. ⦃G, K⦄ ⊢ #i ⬈[Rt, c, h] T & ⬆*[1] T ≘ T2 &
+                         | ∃∃I,K,T,i. ⦃G,K⦄ ⊢ #i ⬈[Rt,c,h] T & ⬆*[1] T ≘ T2 &
                                       L = K.ⓘ{I} & J = LRef (↑i).
 #Rt #c #h #G #L #T1 #T2 * -c -G -L -T1 -T2
 [ #I #G #L #J #H destruct /3 width=1 by or5_intro0, conj/
@@ -94,19 +94,19 @@ fact cpg_inv_atom1_aux: ∀Rt,c,h,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ⬈[Rt, c, h] T2
 ]
 qed-.
 
-lemma cpg_inv_atom1: ∀Rt,c,h,J,G,L,T2. ⦃G, L⦄ ⊢ ⓪{J} ⬈[Rt, c, h] T2 →
+lemma cpg_inv_atom1: ∀Rt,c,h,J,G,L,T2. ⦃G,L⦄ ⊢ ⓪{J} ⬈[Rt,c,h] T2 →
                      ∨∨ T2 = ⓪{J} ∧ c = 𝟘𝟘 
-                      | ∃∃s. J = Sort s & T2 = ⋆(next h s) & c = 𝟘𝟙
-                      | ∃∃cV,K,V1,V2. ⦃G, K⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⬆*[1] V2 ≘ T2 &
+                      | ∃∃s. J = Sort s & T2 = ⋆(⫯[h]s) & c = 𝟘𝟙
+                      | ∃∃cV,K,V1,V2. ⦃G,K⦄ ⊢ V1 ⬈[Rt,cV,h] V2 & ⬆*[1] V2 ≘ T2 &
                                       L = K.ⓓV1 & J = LRef 0 & c = cV
-                      | ∃∃cV,K,V1,V2. ⦃G, K⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⬆*[1] V2 ≘ T2 &
+                      | ∃∃cV,K,V1,V2. ⦃G,K⦄ ⊢ V1 ⬈[Rt,cV,h] V2 & ⬆*[1] V2 ≘ T2 &
                                       L = K.ⓛV1 & J = LRef 0 & c = cV+𝟘𝟙
-                      | ∃∃I,K,T,i. ⦃G, K⦄ ⊢ #i ⬈[Rt, c, h] T & ⬆*[1] T ≘ T2 &
+                      | ∃∃I,K,T,i. ⦃G,K⦄ ⊢ #i ⬈[Rt,c,h] T & ⬆*[1] T ≘ T2 &
                                    L = K.ⓘ{I} & J = LRef (↑i).
 /2 width=3 by cpg_inv_atom1_aux/ qed-.
 
-lemma cpg_inv_sort1: ∀Rt,c,h,G,L,T2,s. ⦃G, L⦄ ⊢ ⋆s ⬈[Rt, c, h] T2 →
-                     ∨∨ T2 = ⋆s ∧ c = 𝟘𝟘 | T2 = ⋆(next h s) ∧ c = 𝟘𝟙.
+lemma cpg_inv_sort1: ∀Rt,c,h,G,L,T2,s. ⦃G,L⦄ ⊢ ⋆s ⬈[Rt,c,h] T2 →
+                     ∨∨ T2 = ⋆s ∧ c = 𝟘𝟘 | T2 = ⋆(⫯[h]s) ∧ c = 𝟘𝟙.
 #Rt #c #h #G #L #T2 #s #H
 elim (cpg_inv_atom1 … H) -H * /3 width=1 by or_introl, conj/
 [ #s0 #H destruct /3 width=1 by or_intror, conj/
@@ -115,11 +115,11 @@ elim (cpg_inv_atom1 … H) -H * /3 width=1 by or_introl, conj/
 ]
 qed-.
 
-lemma cpg_inv_zero1: ∀Rt,c,h,G,L,T2. ⦃G, L⦄ ⊢ #0 ⬈[Rt, c, h] T2 →
+lemma cpg_inv_zero1: ∀Rt,c,h,G,L,T2. ⦃G,L⦄ ⊢ #0 ⬈[Rt,c,h] T2 →
                      ∨∨ T2 = #0 ∧ c = 𝟘𝟘
-                      | ∃∃cV,K,V1,V2. ⦃G, K⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⬆*[1] V2 ≘ T2 &
+                      | ∃∃cV,K,V1,V2. ⦃G,K⦄ ⊢ V1 ⬈[Rt,cV,h] V2 & ⬆*[1] V2 ≘ T2 &
                                       L = K.ⓓV1 & c = cV
-                      | ∃∃cV,K,V1,V2. ⦃G, K⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⬆*[1] V2 ≘ T2 &
+                      | ∃∃cV,K,V1,V2. ⦃G,K⦄ ⊢ V1 ⬈[Rt,cV,h] V2 & ⬆*[1] V2 ≘ T2 &
                                       L = K.ⓛV1 & c = cV+𝟘𝟙.
 #Rt #c #h #G #L #T2 #H
 elim (cpg_inv_atom1 … H) -H * /3 width=1 by or3_intro0, conj/
@@ -129,9 +129,9 @@ elim (cpg_inv_atom1 … H) -H * /3 width=1 by or3_intro0, conj/
 ]
 qed-.
 
-lemma cpg_inv_lref1: ∀Rt,c,h,G,L,T2,i. ⦃G, L⦄ ⊢ #↑i ⬈[Rt, c, h] T2 →
+lemma cpg_inv_lref1: ∀Rt,c,h,G,L,T2,i. ⦃G,L⦄ ⊢ #↑i ⬈[Rt,c,h] T2 →
                      ∨∨ T2 = #(↑i) ∧ c = 𝟘𝟘
-                      | ∃∃I,K,T. ⦃G, K⦄ ⊢ #i ⬈[Rt, c, h] T & ⬆*[1] T ≘ T2 & L = K.ⓘ{I}.
+                      | ∃∃I,K,T. ⦃G,K⦄ ⊢ #i ⬈[Rt,c,h] T & ⬆*[1] T ≘ T2 & L = K.ⓘ{I}.
 #Rt #c #h #G #L #T2 #i #H
 elim (cpg_inv_atom1 … H) -H * /3 width=1 by or_introl, conj/
 [ #s #H destruct
@@ -140,7 +140,7 @@ elim (cpg_inv_atom1 … H) -H * /3 width=1 by or_introl, conj/
 ]
 qed-.
 
-lemma cpg_inv_gref1: ∀Rt,c,h,G,L,T2,l. ⦃G, L⦄ ⊢ §l ⬈[Rt, c, h] T2 → T2 = §l ∧ c = 𝟘𝟘.
+lemma cpg_inv_gref1: ∀Rt,c,h,G,L,T2,l. ⦃G,L⦄ ⊢ §l ⬈[Rt,c,h] T2 → T2 = §l ∧ c = 𝟘𝟘.
 #Rt #c #h #G #L #T2 #l #H
 elim (cpg_inv_atom1 … H) -H * /2 width=1 by conj/
 [ #s #H destruct
@@ -149,11 +149,11 @@ elim (cpg_inv_atom1 … H) -H * /2 width=1 by conj/
 ]
 qed-.
 
-fact cpg_inv_bind1_aux: ∀Rt,c,h,G,L,U,U2. ⦃G, L⦄ ⊢ U ⬈[Rt, c, h] U2 →
+fact cpg_inv_bind1_aux: ∀Rt,c,h,G,L,U,U2. ⦃G,L⦄ ⊢ U ⬈[Rt,c,h] U2 →
                         ∀p,J,V1,U1. U = ⓑ{p,J}V1.U1 →
-                        ∨∨ ∃∃cV,cT,V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⦃G, L.ⓑ{J}V1⦄ ⊢ U1 ⬈[Rt, cT, h] T2 &
+                        ∨∨ ∃∃cV,cT,V2,T2. ⦃G,L⦄ ⊢ V1 ⬈[Rt,cV,h] V2 & ⦃G,L.ⓑ{J}V1⦄ ⊢ U1 ⬈[Rt,cT,h] T2 &
                                           U2 = ⓑ{p,J}V2.T2 & c = ((↕*cV)∨cT)
-                         | ∃∃cT,T. ⬆*[1] T ≘ U1 & ⦃G, L⦄ ⊢ T ⬈[Rt, cT, h] U2 & 
+                         | ∃∃cT,T. ⬆*[1] T ≘ U1 & ⦃G,L⦄ ⊢ T ⬈[Rt,cT,h] U2 & 
                                    p = true & J = Abbr & c = cT+𝟙𝟘.
 #Rt #c #h #G #L #U #U2 * -c -G -L -U -U2
 [ #I #G #L #q #J #W #U1 #H destruct
@@ -172,24 +172,24 @@ fact cpg_inv_bind1_aux: ∀Rt,c,h,G,L,U,U2. ⦃G, L⦄ ⊢ U ⬈[Rt, c, h] U2 
 ]
 qed-.
 
-lemma cpg_inv_bind1: ∀Rt,c,h,p,I,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈[Rt, c, h] U2 →
-                     ∨∨ ∃∃cV,cT,V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ⬈[Rt, cT, h] T2 &
+lemma cpg_inv_bind1: ∀Rt,c,h,p,I,G,L,V1,T1,U2. ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈[Rt,c,h] U2 →
+                     ∨∨ ∃∃cV,cT,V2,T2. ⦃G,L⦄ ⊢ V1 ⬈[Rt,cV,h] V2 & ⦃G,L.ⓑ{I}V1⦄ ⊢ T1 ⬈[Rt,cT,h] T2 &
                                        U2 = ⓑ{p,I}V2.T2 & c = ((↕*cV)∨cT)
-                      | ∃∃cT,T. ⬆*[1] T ≘ T1 & ⦃G, L⦄ ⊢ T ⬈[Rt, cT, h] U2 &
+                      | ∃∃cT,T. ⬆*[1] T ≘ T1 & ⦃G,L⦄ ⊢ T ⬈[Rt,cT,h] U2 &
                                 p = true & I = Abbr & c = cT+𝟙𝟘.
 /2 width=3 by cpg_inv_bind1_aux/ qed-.
 
-lemma cpg_inv_abbr1: ∀Rt,c,h,p,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓓ{p}V1.T1 ⬈[Rt, c, h] U2 →
-                     ∨∨ ∃∃cV,cT,V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⦃G, L.ⓓV1⦄ ⊢ T1 ⬈[Rt, cT, h] T2 &
+lemma cpg_inv_abbr1: ∀Rt,c,h,p,G,L,V1,T1,U2. ⦃G,L⦄ ⊢ ⓓ{p}V1.T1 ⬈[Rt,c,h] U2 →
+                     ∨∨ ∃∃cV,cT,V2,T2. ⦃G,L⦄ ⊢ V1 ⬈[Rt,cV,h] V2 & ⦃G,L.ⓓV1⦄ ⊢ T1 ⬈[Rt,cT,h] T2 &
                                        U2 = ⓓ{p}V2.T2 & c = ((↕*cV)∨cT)
-                      | ∃∃cT,T. ⬆*[1] T ≘ T1 & ⦃G, L⦄ ⊢ T ⬈[Rt, cT, h] U2 &
+                      | ∃∃cT,T. ⬆*[1] T ≘ T1 & ⦃G,L⦄ ⊢ T ⬈[Rt,cT,h] U2 &
                                 p = true & c = cT+𝟙𝟘.
 #Rt #c #h #p #G #L #V1 #T1 #U2 #H elim (cpg_inv_bind1 … H) -H *
 /3 width=8 by ex4_4_intro, ex4_2_intro, or_introl, or_intror/
 qed-.
 
-lemma cpg_inv_abst1: ∀Rt,c,h,p,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓛ{p}V1.T1 ⬈[Rt, c, h] U2 →
-                     ∃∃cV,cT,V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⦃G, L.ⓛV1⦄ ⊢ T1 ⬈[Rt, cT, h] T2 &
+lemma cpg_inv_abst1: ∀Rt,c,h,p,G,L,V1,T1,U2. ⦃G,L⦄ ⊢ ⓛ{p}V1.T1 ⬈[Rt,c,h] U2 →
+                     ∃∃cV,cT,V2,T2. ⦃G,L⦄ ⊢ V1 ⬈[Rt,cV,h] V2 & ⦃G,L.ⓛV1⦄ ⊢ T1 ⬈[Rt,cT,h] T2 &
                                     U2 = ⓛ{p}V2.T2 & c = ((↕*cV)∨cT).
 #Rt #c #h #p #G #L #V1 #T1 #U2 #H elim (cpg_inv_bind1 … H) -H * 
 [ /3 width=8 by ex4_4_intro/
@@ -197,13 +197,13 @@ lemma cpg_inv_abst1: ∀Rt,c,h,p,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓛ{p}V1.T1 ⬈[Rt
 ]
 qed-.
 
-fact cpg_inv_appl1_aux: ∀Rt,c,h,G,L,U,U2. ⦃G, L⦄ ⊢ U ⬈[Rt, c, h] U2 →
+fact cpg_inv_appl1_aux: ∀Rt,c,h,G,L,U,U2. ⦃G,L⦄ ⊢ U ⬈[Rt,c,h] U2 →
                         ∀V1,U1. U = ⓐV1.U1 →
-                        ∨∨ ∃∃cV,cT,V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⦃G, L⦄ ⊢ U1 ⬈[Rt, cT, h] T2 &
+                        ∨∨ ∃∃cV,cT,V2,T2. ⦃G,L⦄ ⊢ V1 ⬈[Rt,cV,h] V2 & ⦃G,L⦄ ⊢ U1 ⬈[Rt,cT,h] T2 &
                                           U2 = ⓐV2.T2 & c = ((↕*cV)∨cT)
-                         | ∃∃cV,cW,cT,p,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⦃G, L⦄ ⊢ W1 ⬈[Rt, cW, h] W2 & ⦃G, L.ⓛW1⦄ ⊢ T1 ⬈[Rt, cT, h] T2 &
+                         | ∃∃cV,cW,cT,p,V2,W1,W2,T1,T2. ⦃G,L⦄ ⊢ V1 ⬈[Rt,cV,h] V2 & ⦃G,L⦄ ⊢ W1 ⬈[Rt,cW,h] W2 & ⦃G,L.ⓛW1⦄ ⊢ T1 ⬈[Rt,cT,h] T2 &
                                                         U1 = ⓛ{p}W1.T1 & U2 = ⓓ{p}ⓝW2.V2.T2 & c = ((↕*cV)∨(↕*cW)∨cT)+𝟙𝟘
-                         | ∃∃cV,cW,cT,p,V,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V & ⬆*[1] V ≘ V2 & ⦃G, L⦄ ⊢ W1 ⬈[Rt, cW, h] W2 & ⦃G, L.ⓓW1⦄ ⊢ T1 ⬈[Rt, cT, h] T2 &
+                         | ∃∃cV,cW,cT,p,V,V2,W1,W2,T1,T2. ⦃G,L⦄ ⊢ V1 ⬈[Rt,cV,h] V & ⬆*[1] V ≘ V2 & ⦃G,L⦄ ⊢ W1 ⬈[Rt,cW,h] W2 & ⦃G,L.ⓓW1⦄ ⊢ T1 ⬈[Rt,cT,h] T2 &
                                                           U1 = ⓓ{p}W1.T1 & U2 = ⓓ{p}W2.ⓐV2.T2 & c = ((↕*cV)∨(↕*cW)∨cT)+𝟙𝟘.
 #Rt #c #h #G #L #U #U2 * -c -G -L -U -U2
 [ #I #G #L #W #U1 #H destruct
@@ -222,21 +222,21 @@ fact cpg_inv_appl1_aux: ∀Rt,c,h,G,L,U,U2. ⦃G, L⦄ ⊢ U ⬈[Rt, c, h] U2 
 ]
 qed-.
 
-lemma cpg_inv_appl1: ∀Rt,c,h,G,L,V1,U1,U2. ⦃G, L⦄ ⊢ ⓐV1.U1 ⬈[Rt, c, h] U2 →
-                     ∨∨ ∃∃cV,cT,V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⦃G, L⦄ ⊢ U1 ⬈[Rt, cT, h] T2 &
+lemma cpg_inv_appl1: ∀Rt,c,h,G,L,V1,U1,U2. ⦃G,L⦄ ⊢ ⓐV1.U1 ⬈[Rt,c,h] U2 →
+                     ∨∨ ∃∃cV,cT,V2,T2. ⦃G,L⦄ ⊢ V1 ⬈[Rt,cV,h] V2 & ⦃G,L⦄ ⊢ U1 ⬈[Rt,cT,h] T2 &
                                        U2 = ⓐV2.T2 & c = ((↕*cV)∨cT)
-                      | ∃∃cV,cW,cT,p,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⦃G, L⦄ ⊢ W1 ⬈[Rt, cW, h] W2 & ⦃G, L.ⓛW1⦄ ⊢ T1 ⬈[Rt, cT, h] T2 &
+                      | ∃∃cV,cW,cT,p,V2,W1,W2,T1,T2. ⦃G,L⦄ ⊢ V1 ⬈[Rt,cV,h] V2 & ⦃G,L⦄ ⊢ W1 ⬈[Rt,cW,h] W2 & ⦃G,L.ⓛW1⦄ ⊢ T1 ⬈[Rt,cT,h] T2 &
                                                      U1 = ⓛ{p}W1.T1 & U2 = ⓓ{p}ⓝW2.V2.T2 & c = ((↕*cV)∨(↕*cW)∨cT)+𝟙𝟘
-                      | ∃∃cV,cW,cT,p,V,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V & ⬆*[1] V ≘ V2 & ⦃G, L⦄ ⊢ W1 ⬈[Rt, cW, h] W2 & ⦃G, L.ⓓW1⦄ ⊢ T1 ⬈[Rt, cT, h] T2 &
+                      | ∃∃cV,cW,cT,p,V,V2,W1,W2,T1,T2. ⦃G,L⦄ ⊢ V1 ⬈[Rt,cV,h] V & ⬆*[1] V ≘ V2 & ⦃G,L⦄ ⊢ W1 ⬈[Rt,cW,h] W2 & ⦃G,L.ⓓW1⦄ ⊢ T1 ⬈[Rt,cT,h] T2 &
                                                        U1 = ⓓ{p}W1.T1 & U2 = ⓓ{p}W2.ⓐV2.T2 & c = ((↕*cV)∨(↕*cW)∨cT)+𝟙𝟘.
 /2 width=3 by cpg_inv_appl1_aux/ qed-.
 
-fact cpg_inv_cast1_aux: ∀Rt,c,h,G,L,U,U2. ⦃G, L⦄ ⊢ U ⬈[Rt, c, h] U2 →
+fact cpg_inv_cast1_aux: ∀Rt,c,h,G,L,U,U2. ⦃G,L⦄ ⊢ U ⬈[Rt,c,h] U2 →
                         ∀V1,U1. U = ⓝV1.U1 →
-                        ∨∨ ∃∃cV,cT,V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⦃G, L⦄ ⊢ U1 ⬈[Rt, cT, h] T2 &
+                        ∨∨ ∃∃cV,cT,V2,T2. ⦃G,L⦄ ⊢ V1 ⬈[Rt,cV,h] V2 & ⦃G,L⦄ ⊢ U1 ⬈[Rt,cT,h] T2 &
                                           Rt cV cT & U2 = ⓝV2.T2 & c = (cV∨cT)
-                         | ∃∃cT. ⦃G, L⦄ ⊢ U1 ⬈[Rt, cT, h] U2 & c = cT+𝟙𝟘
-                         | ∃∃cV. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] U2 & c = cV+𝟘𝟙.
+                         | ∃∃cT. ⦃G,L⦄ ⊢ U1 ⬈[Rt,cT,h] U2 & c = cT+𝟙𝟘
+                         | ∃∃cV. ⦃G,L⦄ ⊢ V1 ⬈[Rt,cV,h] U2 & c = cV+𝟘𝟙.
 #Rt #c #h #G #L #U #U2 * -c -G -L -U -U2
 [ #I #G #L #W #U1 #H destruct
 | #G #L #s #W #U1 #H destruct
@@ -254,36 +254,36 @@ fact cpg_inv_cast1_aux: ∀Rt,c,h,G,L,U,U2. ⦃G, L⦄ ⊢ U ⬈[Rt, c, h] U2 
 ]
 qed-.
 
-lemma cpg_inv_cast1: ∀Rt,c,h,G,L,V1,U1,U2. ⦃G, L⦄ ⊢ ⓝV1.U1 ⬈[Rt, c, h] U2 →
-                     ∨∨ ∃∃cV,cT,V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⦃G, L⦄ ⊢ U1 ⬈[Rt, cT, h] T2 &
+lemma cpg_inv_cast1: ∀Rt,c,h,G,L,V1,U1,U2. ⦃G,L⦄ ⊢ ⓝV1.U1 ⬈[Rt,c,h] U2 →
+                     ∨∨ ∃∃cV,cT,V2,T2. ⦃G,L⦄ ⊢ V1 ⬈[Rt,cV,h] V2 & ⦃G,L⦄ ⊢ U1 ⬈[Rt,cT,h] T2 &
                                        Rt cV cT & U2 = ⓝV2.T2 & c = (cV∨cT)
-                      | ∃∃cT. ⦃G, L⦄ ⊢ U1 ⬈[Rt, cT, h] U2 & c = cT+𝟙𝟘
-                      | ∃∃cV. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] U2 & c = cV+𝟘𝟙.
+                      | ∃∃cT. ⦃G,L⦄ ⊢ U1 ⬈[Rt,cT,h] U2 & c = cT+𝟙𝟘
+                      | ∃∃cV. ⦃G,L⦄ ⊢ V1 ⬈[Rt,cV,h] U2 & c = cV+𝟘𝟙.
 /2 width=3 by cpg_inv_cast1_aux/ qed-.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma cpg_inv_zero1_pair: ∀Rt,c,h,I,G,K,V1,T2. ⦃G, K.ⓑ{I}V1⦄ ⊢ #0 ⬈[Rt, c, h] T2 →
+lemma cpg_inv_zero1_pair: ∀Rt,c,h,I,G,K,V1,T2. ⦃G,K.ⓑ{I}V1⦄ ⊢ #0 ⬈[Rt,c,h] T2 →
                           ∨∨ T2 = #0 ∧ c = 𝟘𝟘
-                           | ∃∃cV,V2. ⦃G, K⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⬆*[1] V2 ≘ T2 &
+                           | ∃∃cV,V2. ⦃G,K⦄ ⊢ V1 ⬈[Rt,cV,h] V2 & ⬆*[1] V2 ≘ T2 &
                                       I = Abbr & c = cV
-                           | ∃∃cV,V2. ⦃G, K⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⬆*[1] V2 ≘ T2 &
+                           | ∃∃cV,V2. ⦃G,K⦄ ⊢ V1 ⬈[Rt,cV,h] V2 & ⬆*[1] V2 ≘ T2 &
                                       I = Abst & c = cV+𝟘𝟙.
 #Rt #c #h #I #G #K #V1 #T2 #H elim (cpg_inv_zero1 … H) -H /2 width=1 by or3_intro0/
 * #z #Y #X1 #X2 #HX12 #HXT2 #H1 #H2 destruct /3 width=5 by or3_intro1, or3_intro2, ex4_2_intro/
 qed-.
 
-lemma cpg_inv_lref1_bind: ∀Rt,c,h,I,G,K,T2,i. ⦃G, K.ⓘ{I}⦄ ⊢ #↑i ⬈[Rt, c, h] T2 →
+lemma cpg_inv_lref1_bind: ∀Rt,c,h,I,G,K,T2,i. ⦃G,K.ⓘ{I}⦄ ⊢ #↑i ⬈[Rt,c,h] T2 →
                           ∨∨ T2 = #(↑i) ∧ c = 𝟘𝟘
-                           | ∃∃T. ⦃G, K⦄ ⊢ #i ⬈[Rt, c, h] T & ⬆*[1] T ≘ T2.
+                           | ∃∃T. ⦃G,K⦄ ⊢ #i ⬈[Rt,c,h] T & ⬆*[1] T ≘ T2.
 #Rt #c #h #I #G #L #T2 #i #H elim (cpg_inv_lref1 … H) -H /2 width=1 by or_introl/
 * #Z #Y #T #HT #HT2 #H destruct /3 width=3 by ex2_intro, or_intror/
 qed-.
 
 (* Basic forward lemmas *****************************************************)
 
-lemma cpg_fwd_bind1_minus: ∀Rt,c,h,I,G,L,V1,T1,T. ⦃G, L⦄ ⊢ -ⓑ{I}V1.T1 ⬈[Rt, c, h] T → ∀p.
-                           ∃∃V2,T2. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈[Rt, c, h] ⓑ{p,I}V2.T2 &
+lemma cpg_fwd_bind1_minus: ∀Rt,c,h,I,G,L,V1,T1,T. ⦃G,L⦄ ⊢ -ⓑ{I}V1.T1 ⬈[Rt,c,h] T → ∀p.
+                           ∃∃V2,T2. ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈[Rt,c,h] ⓑ{p,I}V2.T2 &
                                     T = -ⓑ{I}V2.T2.
 #Rt #c #h #I #G #L #V1 #T1 #T #H #p elim (cpg_inv_bind1 … H) -H *
 [ #cV #cT #V2 #T2 #HV12 #HT12 #H1 #H2 destruct /3 width=4 by cpg_bind, ex2_2_intro/
index 37ac3fa834e67223eb546590d4d5286d1bf3b0d4..977ec175d1728520f85d8fb8fde5cc712a6feaa2 100644 (file)
@@ -21,8 +21,8 @@ include "basic_2/rt_transition/cpg.ma".
 
 (* Advanced properties ******************************************************)
 
-lemma cpg_delta_drops: ∀Rt,c,h,G,K,V,V2,i,L,T2. ⬇*[i] L ≘ K.ⓓV → ⦃G, K⦄ ⊢ V ⬈[Rt, c, h] V2 →
-                       ⬆*[↑i] V2 ≘ T2 →  ⦃G, L⦄ ⊢ #i ⬈[Rt, c, h] T2.
+lemma cpg_delta_drops: ∀Rt,c,h,G,K,V,V2,i,L,T2. ⬇*[i] L ≘ K.ⓓV → ⦃G,K⦄ ⊢ V ⬈[Rt,c,h] V2 →
+                       ⬆*[↑i] V2 ≘ T2 →  ⦃G,L⦄ ⊢ #i ⬈[Rt,c,h] T2.
 #Rt #c #h #G #K #V #V2 #i elim i -i
 [ #L #T2 #HLK lapply (drops_fwd_isid … HLK ?) // #H destruct /3 width=3 by cpg_delta/
 | #i #IH #L0 #T0 #H0 #HV2 #HVT2
@@ -31,8 +31,8 @@ lemma cpg_delta_drops: ∀Rt,c,h,G,K,V,V2,i,L,T2. ⬇*[i] L ≘ K.ⓓV → ⦃G,
 ]
 qed.
 
-lemma cpg_ell_drops: ∀Rt,c,h,G,K,V,V2,i,L,T2. ⬇*[i] L ≘ K.ⓛV → ⦃G, K⦄ ⊢ V ⬈[Rt,c, h] V2 →
-                     ⬆*[↑i] V2 ≘ T2 →  ⦃G, L⦄ ⊢ #i ⬈[Rt, c+𝟘𝟙, h] T2.
+lemma cpg_ell_drops: ∀Rt,c,h,G,K,V,V2,i,L,T2. ⬇*[i] L ≘ K.ⓛV → ⦃G,K⦄ ⊢ V ⬈[Rt,c,h] V2 →
+                     ⬆*[↑i] V2 ≘ T2 →  ⦃G,L⦄ ⊢ #i ⬈[Rt,c+𝟘𝟙,h] T2.
 #Rt #c #h #G #K #V #V2 #i elim i -i
 [ #L #T2 #HLK lapply (drops_fwd_isid … HLK ?) // #H destruct /3 width=3 by cpg_ell/
 | #i #IH #L0 #T0 #H0 #HV2 #HVT2
@@ -43,11 +43,11 @@ qed.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma cpg_inv_lref1_drops: ∀Rt,c,h,G,i,L,T2. ⦃G, L⦄ ⊢ #i ⬈[Rt,c, h] T2 →
+lemma cpg_inv_lref1_drops: ∀Rt,c,h,G,i,L,T2. ⦃G,L⦄ ⊢ #i ⬈[Rt,c,h] T2 →
                            ∨∨ T2 = #i ∧ c = 𝟘𝟘
-                            | ∃∃cV,K,V,V2. ⬇*[i] L ≘ K.ⓓV & ⦃G, K⦄ ⊢ V ⬈[Rt, cV, h] V2 &
+                            | ∃∃cV,K,V,V2. ⬇*[i] L ≘ K.ⓓV & ⦃G,K⦄ ⊢ V ⬈[Rt,cV,h] V2 &
                                            ⬆*[↑i] V2 ≘ T2 & c = cV
-                            | ∃∃cV,K,V,V2. ⬇*[i] L ≘ K.ⓛV & ⦃G, K⦄ ⊢ V ⬈[Rt, cV, h] V2 &
+                            | ∃∃cV,K,V,V2. ⬇*[i] L ≘ K.ⓛV & ⦃G,K⦄ ⊢ V ⬈[Rt,cV,h] V2 &
                                            ⬆*[↑i] V2 ≘ T2 & c = cV + 𝟘𝟙.
 #Rt #c #h #G #i elim i -i
 [ #L #T2 #H elim (cpg_inv_zero1 … H) -H * /3 width=1 by or3_intro0, conj/
@@ -61,12 +61,12 @@ lemma cpg_inv_lref1_drops: ∀Rt,c,h,G,i,L,T2. ⦃G, L⦄ ⊢ #i ⬈[Rt,c, h] T2
 ]
 qed-.
 
-lemma cpg_inv_atom1_drops: ∀Rt,c,h,I,G,L,T2. ⦃G, L⦄ ⊢ ⓪{I} ⬈[Rt, c, h] T2 →
+lemma cpg_inv_atom1_drops: ∀Rt,c,h,I,G,L,T2. ⦃G,L⦄ ⊢ ⓪{I} ⬈[Rt,c,h] T2 →
                            ∨∨ T2 = ⓪{I} ∧ c = 𝟘𝟘
-                            | ∃∃s. T2 = ⋆(next h s) & I = Sort s & c = 𝟘𝟙
-                            | ∃∃cV,i,K,V,V2. ⬇*[i] L ≘ K.ⓓV & ⦃G, K⦄ ⊢ V ⬈[Rt, cV, h] V2 &
+                            | ∃∃s. T2 = ⋆(⫯[h]s) & I = Sort s & c = 𝟘𝟙
+                            | ∃∃cV,i,K,V,V2. ⬇*[i] L ≘ K.ⓓV & ⦃G,K⦄ ⊢ V ⬈[Rt,cV,h] V2 &
                                              ⬆*[↑i] V2 ≘ T2 & I = LRef i & c = cV
-                            | ∃∃cV,i,K,V,V2. ⬇*[i] L ≘ K.ⓛV & ⦃G, K⦄ ⊢ V ⬈[Rt, cV, h] V2 &
+                            | ∃∃cV,i,K,V,V2. ⬇*[i] L ≘ K.ⓛV & ⦃G,K⦄ ⊢ V ⬈[Rt,cV,h] V2 &
                                              ⬆*[↑i] V2 ≘ T2 & I = LRef i & c = cV + 𝟘𝟙.
 #Rt #c #h * #n #G #L #T2 #H
 [ elim (cpg_inv_sort1 … H) -H *
index 39228c24717bbe8b05d5d32ac0d0274b01d9c8e8..7d4b85f06249ef0bb0f9ff78ba21ac99aff4f982 100644 (file)
@@ -20,8 +20,8 @@ include "basic_2/rt_transition/cpg.ma".
 (* Properties with simple terms *********************************************)
 
 (* Note: the main property of simple terms *)
-lemma cpg_inv_appl1_simple: ∀Rt,c,h,G,L,V1,T1,U. ⦃G, L⦄ ⊢ ⓐV1.T1 ⬈[Rt, c, h] U → 𝐒⦃T1⦄ →
-                            ∃∃cV,cT,V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⦃G, L⦄ ⊢ T1 ⬈[Rt, cT, h] T2 &
+lemma cpg_inv_appl1_simple: ∀Rt,c,h,G,L,V1,T1,U. ⦃G,L⦄ ⊢ ⓐV1.T1 ⬈[Rt,c,h] U → 𝐒⦃T1⦄ →
+                            ∃∃cV,cT,V2,T2. ⦃G,L⦄ ⊢ V1 ⬈[Rt,cV,h] V2 & ⦃G,L⦄ ⊢ T1 ⬈[Rt,cT,h] T2 &
                                            U = ⓐV2.T2 & c = ((↕*cV)∨cT).
 #Rt #c #h #G #L #V1 #T1 #U #H #HT1 elim (cpg_inv_appl1 … H) -H *
 [ /2 width=8 by ex4_4_intro/
index 341ecee8cfde5b23e00b615b04c4d3ef40673cc7..c069b4ca0e625ef09521d807d3266d1d63bc897a 100644 (file)
@@ -20,7 +20,7 @@ include "basic_2/rt_transition/cpg.ma".
 
 (* Basic_2A1: includes: cpr *)
 definition cpm (h) (G) (L) (n): relation2 term term ≝
-                                λT1,T2. ∃∃c. 𝐑𝐓⦃n, c⦄ & ⦃G, L⦄ ⊢ T1 ⬈[eq_t, c, h] T2.
+                                λT1,T2. ∃∃c. 𝐑𝐓⦃n,c⦄ & ⦃G,L⦄ ⊢ T1 ⬈[eq_t,c,h] T2.
 
 interpretation
    "t-bound context-sensitive parallel rt-transition (term)"
@@ -32,81 +32,81 @@ interpretation
 
 (* Basic properties *********************************************************)
 
-lemma cpm_ess: ∀h,G,L,s. ⦃G, L⦄ ⊢ ⋆s ➡[1, h] ⋆(next h s).
+lemma cpm_ess: ∀h,G,L,s. ⦃G,L⦄ ⊢ ⋆s ➡[1,h] ⋆(⫯[h]s).
 /2 width=3 by cpg_ess, ex2_intro/ qed.
 
-lemma cpm_delta: ∀n,h,G,K,V1,V2,W2. ⦃G, K⦄ ⊢ V1 ➡[n, h] V2 →
-                 ⬆*[1] V2 ≘ W2 → ⦃G, K.ⓓV1⦄ ⊢ #0 ➡[n, h] W2.
+lemma cpm_delta: ∀n,h,G,K,V1,V2,W2. ⦃G,K⦄ ⊢ V1 ➡[n,h] V2 →
+                 ⬆*[1] V2 ≘ W2 → ⦃G,K.ⓓV1⦄ ⊢ #0 ➡[n,h] W2.
 #n #h #G #K #V1 #V2 #W2 *
 /3 width=5 by cpg_delta, ex2_intro/
 qed.
 
-lemma cpm_ell: ∀n,h,G,K,V1,V2,W2. ⦃G, K⦄ ⊢ V1 ➡[n, h] V2 →
-               ⬆*[1] V2 ≘ W2 → ⦃G, K.ⓛV1⦄ ⊢ #0 ➡[↑n, h] W2.
+lemma cpm_ell: ∀n,h,G,K,V1,V2,W2. ⦃G,K⦄ ⊢ V1 ➡[n,h] V2 →
+               ⬆*[1] V2 ≘ W2 → ⦃G,K.ⓛV1⦄ ⊢ #0 ➡[↑n,h] W2.
 #n #h #G #K #V1 #V2 #W2 *
 /3 width=5 by cpg_ell, ex2_intro, isrt_succ/
 qed.
 
-lemma cpm_lref: ∀n,h,I,G,K,T,U,i. ⦃G, K⦄ ⊢ #i ➡[n, h] T →
-                ⬆*[1] T ≘ U → ⦃G, K.ⓘ{I}⦄ ⊢ #↑i ➡[n, h] U.
+lemma cpm_lref: ∀n,h,I,G,K,T,U,i. ⦃G,K⦄ ⊢ #i ➡[n,h] T →
+                ⬆*[1] T ≘ U → ⦃G,K.ⓘ{I}⦄ ⊢ #↑i ➡[n,h] U.
 #n #h #I #G #K #T #U #i *
 /3 width=5 by cpg_lref, ex2_intro/
 qed.
 
 (* Basic_2A1: includes: cpr_bind *)
 lemma cpm_bind: ∀n,h,p,I,G,L,V1,V2,T1,T2.
-                ⦃G, L⦄ ⊢ V1 ➡[h] V2 → ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ➡[n, h] T2 →
-                ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ➡[n, h] ⓑ{p,I}V2.T2.
+                ⦃G,L⦄ ⊢ V1 ➡[h] V2 → ⦃G,L.ⓑ{I}V1⦄ ⊢ T1 ➡[n,h] T2 →
+                ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ➡[n,h] ⓑ{p,I}V2.T2.
 #n #h #p #I #G #L #V1 #V2 #T1 #T2 * #cV #HcV #HV12 *
 /5 width=5 by cpg_bind, isrt_max_O1, isr_shift, ex2_intro/
 qed.
 
 lemma cpm_appl: ∀n,h,G,L,V1,V2,T1,T2.
-                ⦃G, L⦄ ⊢ V1 ➡[h] V2 → ⦃G, L⦄ ⊢ T1 ➡[n, h] T2 →
-                ⦃G, L⦄ ⊢ ⓐV1.T1 ➡[n, h] ⓐV2.T2.
+                ⦃G,L⦄ ⊢ V1 ➡[h] V2 → ⦃G,L⦄ ⊢ T1 ➡[n,h] T2 →
+                ⦃G,L⦄ ⊢ ⓐV1.T1 ➡[n,h] ⓐV2.T2.
 #n #h #G #L #V1 #V2 #T1 #T2 * #cV #HcV #HV12 *
 /5 width=5 by isrt_max_O1, isr_shift, cpg_appl, ex2_intro/
 qed.
 
 lemma cpm_cast: ∀n,h,G,L,U1,U2,T1,T2.
-                ⦃G, L⦄ ⊢ U1 ➡[n, h] U2 → ⦃G, L⦄ ⊢ T1 ➡[n, h] T2 →
-                ⦃G, L⦄ ⊢ ⓝU1.T1 ➡[n, h] ⓝU2.T2.
+                ⦃G,L⦄ ⊢ U1 ➡[n,h] U2 → ⦃G,L⦄ ⊢ T1 ➡[n,h] T2 →
+                ⦃G,L⦄ ⊢ ⓝU1.T1 ➡[n,h] ⓝU2.T2.
 #n #h #G #L #U1 #U2 #T1 #T2 * #cU #HcU #HU12 *
 /4 width=6 by cpg_cast, isrt_max_idem1, isrt_mono, ex2_intro/
 qed.
 
 (* Basic_2A1: includes: cpr_zeta *)
 lemma cpm_zeta (n) (h) (G) (L):
-               ∀T1,T. ⬆*[1] T ≘ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡[n,h] T2 →
-               ∀V. ⦃G, L⦄ ⊢ +ⓓV.T1 ➡[n, h] T2.
+               ∀T1,T. ⬆*[1] T ≘ T1 → ∀T2. ⦃G,L⦄ ⊢ T ➡[n,h] T2 →
+               ∀V. ⦃G,L⦄ ⊢ +ⓓV.T1 ➡[n,h] T2.
 #n #h #G #L #T1 #T #HT1 #T2 *
 /3 width=5 by cpg_zeta, isrt_plus_O2, ex2_intro/
 qed.
 
 (* Basic_2A1: includes: cpr_eps *)
-lemma cpm_eps: ∀n,h,G,L,V,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[n, h] T2 → ⦃G, L⦄ ⊢ ⓝV.T1 ➡[n, h] T2.
+lemma cpm_eps: ∀n,h,G,L,V,T1,T2. ⦃G,L⦄ ⊢ T1 ➡[n,h] T2 → ⦃G,L⦄ ⊢ ⓝV.T1 ➡[n,h] T2.
 #n #h #G #L #V #T1 #T2 *
 /3 width=3 by cpg_eps, isrt_plus_O2, ex2_intro/
 qed.
 
-lemma cpm_ee: ∀n,h,G,L,V1,V2,T. ⦃G, L⦄ ⊢ V1 ➡[n, h] V2 → ⦃G, L⦄ ⊢ ⓝV1.T ➡[↑n, h] V2.
+lemma cpm_ee: ∀n,h,G,L,V1,V2,T. ⦃G,L⦄ ⊢ V1 ➡[n,h] V2 → ⦃G,L⦄ ⊢ ⓝV1.T ➡[↑n,h] V2.
 #n #h #G #L #V1 #V2 #T *
 /3 width=3 by cpg_ee, isrt_succ, ex2_intro/
 qed.
 
 (* Basic_2A1: includes: cpr_beta *)
 lemma cpm_beta: ∀n,h,p,G,L,V1,V2,W1,W2,T1,T2.
-                ⦃G, L⦄ ⊢ V1 ➡[h] V2 → ⦃G, L⦄ ⊢ W1 ➡[h] W2 → ⦃G, L.ⓛW1⦄ ⊢ T1 ➡[n, h] T2 →
-                ⦃G, L⦄ ⊢ ⓐV1.ⓛ{p}W1.T1 ➡[n, h] ⓓ{p}ⓝW2.V2.T2.
+                ⦃G,L⦄ ⊢ V1 ➡[h] V2 → ⦃G,L⦄ ⊢ W1 ➡[h] W2 → ⦃G,L.ⓛW1⦄ ⊢ T1 ➡[n,h] T2 →
+                ⦃G,L⦄ ⊢ ⓐV1.ⓛ{p}W1.T1 ➡[n,h] ⓓ{p}ⓝW2.V2.T2.
 #n #h #p #G #L #V1 #V2 #W1 #W2 #T1 #T2 * #riV #rhV #HV12 * #riW #rhW #HW12 *
 /6 width=7 by cpg_beta, isrt_plus_O2, isrt_max, isr_shift, ex2_intro/
 qed.
 
 (* Basic_2A1: includes: cpr_theta *)
 lemma cpm_theta: ∀n,h,p,G,L,V1,V,V2,W1,W2,T1,T2.
-                 ⦃G, L⦄ ⊢ V1 ➡[h] V → ⬆*[1] V ≘ V2 → ⦃G, L⦄ ⊢ W1 ➡[h] W2 →
-                 ⦃G, L.ⓓW1⦄ ⊢ T1 ➡[n, h] T2 →
-                 ⦃G, L⦄ ⊢ ⓐV1.ⓓ{p}W1.T1 ➡[n, h] ⓓ{p}W2.ⓐV2.T2.
+                 ⦃G,L⦄ ⊢ V1 ➡[h] V → ⬆*[1] V ≘ V2 → ⦃G,L⦄ ⊢ W1 ➡[h] W2 →
+                 ⦃G,L.ⓓW1⦄ ⊢ T1 ➡[n,h] T2 →
+                 ⦃G,L⦄ ⊢ ⓐV1.ⓓ{p}W1.T1 ➡[n,h] ⓓ{p}W2.ⓐV2.T2.
 #n #h #p #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 * #riV #rhV #HV1 #HV2 * #riW #rhW #HW12 *
 /6 width=9 by cpg_theta, isrt_plus_O2, isrt_max, isr_shift, ex2_intro/
 qed.
@@ -129,14 +129,14 @@ qed.
 
 (* Basic inversion lemmas ***************************************************)
 
-lemma cpm_inv_atom1: ∀n,h,J,G,L,T2. ⦃G, L⦄ ⊢ ⓪{J} ➡[n, h] T2 →
+lemma cpm_inv_atom1: ∀n,h,J,G,L,T2. ⦃G,L⦄ ⊢ ⓪{J} ➡[n,h] T2 →
                      ∨∨ T2 = ⓪{J} ∧ n = 0
-                      | ∃∃s. T2 = ⋆(next h s) & J = Sort s & n = 1
-                      | ∃∃K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[n, h] V2 & ⬆*[1] V2 ≘ T2 &
+                      | ∃∃s. T2 = ⋆(⫯[h]s) & J = Sort s & n = 1
+                      | ∃∃K,V1,V2. ⦃G,K⦄ ⊢ V1 ➡[n,h] V2 & ⬆*[1] V2 ≘ T2 &
                                    L = K.ⓓV1 & J = LRef 0
-                      | ∃∃m,K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[m, h] V2 & ⬆*[1] V2 ≘ T2 &
+                      | ∃∃m,K,V1,V2. ⦃G,K⦄ ⊢ V1 ➡[m,h] V2 & ⬆*[1] V2 ≘ T2 &
                                      L = K.ⓛV1 & J = LRef 0 & n = ↑m
-                      | ∃∃I,K,T,i. ⦃G, K⦄ ⊢ #i ➡[n, h] T & ⬆*[1] T ≘ T2 &
+                      | ∃∃I,K,T,i. ⦃G,K⦄ ⊢ #i ➡[n,h] T & ⬆*[1] T ≘ T2 &
                                    L = K.ⓘ{I} & J = LRef (↑i).
 #n #h #J #G #L #T2 * #c #Hc #H elim (cpg_inv_atom1 … H) -H *
 [ #H1 #H2 destruct /4 width=1 by isrt_inv_00, or5_intro0, conj/
@@ -151,7 +151,7 @@ lemma cpm_inv_atom1: ∀n,h,J,G,L,T2. ⦃G, L⦄ ⊢ ⓪{J} ➡[n, h] T2 →
 ]
 qed-.
 
-lemma cpm_inv_sort1: ∀n,h,G,L,T2,s. ⦃G, L⦄ ⊢ ⋆s ➡[n,h] T2 →
+lemma cpm_inv_sort1: ∀n,h,G,L,T2,s. ⦃G,L⦄ ⊢ ⋆s ➡[n,h] T2 →
                      ∧∧ T2 = ⋆(((next h)^n) s) & n ≤ 1.
 #n #h #G #L #T2 #s * #c #Hc #H
 elim (cpg_inv_sort1 … H) -H * #H1 #H2 destruct
@@ -159,11 +159,11 @@ elim (cpg_inv_sort1 … H) -H * #H1 #H2 destruct
 #H destruct /2 width=1 by conj/
 qed-.
 
-lemma cpm_inv_zero1: ∀n,h,G,L,T2. ⦃G, L⦄ ⊢ #0 ➡[n, h] T2 →
+lemma cpm_inv_zero1: ∀n,h,G,L,T2. ⦃G,L⦄ ⊢ #0 ➡[n,h] T2 →
                      ∨∨ T2 = #0 ∧ n = 0
-                      | ∃∃K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[n, h] V2 & ⬆*[1] V2 ≘ T2 &
+                      | ∃∃K,V1,V2. ⦃G,K⦄ ⊢ V1 ➡[n,h] V2 & ⬆*[1] V2 ≘ T2 &
                                    L = K.ⓓV1
-                      | ∃∃m,K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[m, h] V2 & ⬆*[1] V2 ≘ T2 &
+                      | ∃∃m,K,V1,V2. ⦃G,K⦄ ⊢ V1 ➡[m,h] V2 & ⬆*[1] V2 ≘ T2 &
                                      L = K.ⓛV1 & n = ↑m.
 #n #h #G #L #T2 * #c #Hc #H elim (cpg_inv_zero1 … H) -H *
 [ #H1 #H2 destruct /4 width=1 by isrt_inv_00, or3_intro0, conj/
@@ -175,9 +175,19 @@ lemma cpm_inv_zero1: ∀n,h,G,L,T2. ⦃G, L⦄ ⊢ #0 ➡[n, h] T2 →
 ]
 qed-.
 
-lemma cpm_inv_lref1: ∀n,h,G,L,T2,i. ⦃G, L⦄ ⊢ #↑i ➡[n, h] T2 →
+lemma cpm_inv_zero1_unit (n) (h) (I) (K) (G):
+      ∀X2. ⦃G,K.ⓤ{I}⦄ ⊢ #0 ➡[n,h] X2 → ∧∧ X2 = #0 & n = 0.
+#n #h #I #G #K #X2 #H
+elim (cpm_inv_zero1 … H) -H *
+[ #H1 #H2 destruct /2 width=1 by conj/
+| #Y #X1 #X2 #_ #_ #H destruct
+| #m #Y #X1 #X2 #_ #_ #H destruct
+]
+qed.
+
+lemma cpm_inv_lref1: ∀n,h,G,L,T2,i. ⦃G,L⦄ ⊢ #↑i ➡[n,h] T2 →
                      ∨∨ T2 = #(↑i) ∧ n = 0
-                      | ∃∃I,K,T. ⦃G, K⦄ ⊢ #i ➡[n, h] T & ⬆*[1] T ≘ T2 & L = K.ⓘ{I}.
+                      | ∃∃I,K,T. ⦃G,K⦄ ⊢ #i ➡[n,h] T & ⬆*[1] T ≘ T2 & L = K.ⓘ{I}.
 #n #h #G #L #T2 #i * #c #Hc #H elim (cpg_inv_lref1 … H) -H *
 [ #H1 #H2 destruct /4 width=1 by isrt_inv_00, or_introl, conj/
 | #I #K #V2 #HV2 #HVT2 #H destruct
@@ -185,16 +195,31 @@ lemma cpm_inv_lref1: ∀n,h,G,L,T2,i. ⦃G, L⦄ ⊢ #↑i ➡[n, h] T2 →
 ]
 qed-.
 
-lemma cpm_inv_gref1: ∀n,h,G,L,T2,l. ⦃G, L⦄ ⊢ §l ➡[n, h] T2 → T2 = §l ∧ n = 0.
+lemma cpm_inv_lref1_ctop (n) (h) (G):
+      ∀X2,i. ⦃G,⋆⦄ ⊢ #i ➡[n,h] X2 → ∧∧ X2 = #i & n = 0.
+#n #h #G #X2 * [| #i ] #H
+[ elim (cpm_inv_zero1 … H) -H *
+  [ #H1 #H2 destruct /2 width=1 by conj/
+  | #Y #X1 #X2 #_ #_ #H destruct
+  | #m #Y #X1 #X2 #_ #_ #H destruct
+  ]
+| elim (cpm_inv_lref1 … H) -H *
+  [ #H1 #H2 destruct /2 width=1 by conj/
+  | #Z #Y #X0 #_ #_ #H destruct
+  ]
+]
+qed.
+
+lemma cpm_inv_gref1: ∀n,h,G,L,T2,l. ⦃G,L⦄ ⊢ §l ➡[n,h] T2 → T2 = §l ∧ n = 0.
 #n #h #G #L #T2 #l * #c #Hc #H elim (cpg_inv_gref1 … H) -H
 #H1 #H2 destruct /3 width=1 by isrt_inv_00, conj/ 
 qed-.
 
 (* Basic_2A1: includes: cpr_inv_bind1 *)
-lemma cpm_inv_bind1: ∀n,h,p,I,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ➡[n, h] U2 →
-                     ∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 & ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ➡[n, h] T2 &
+lemma cpm_inv_bind1: ∀n,h,p,I,G,L,V1,T1,U2. ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ➡[n,h] U2 →
+                     ∨∨ ∃∃V2,T2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 & ⦃G,L.ⓑ{I}V1⦄ ⊢ T1 ➡[n,h] T2 &
                                  U2 = ⓑ{p,I}V2.T2
-                      | ∃∃T. ⬆*[1] T ≘ T1 & ⦃G, L⦄ ⊢ T ➡[n, h] U2 & 
+                      | ∃∃T. ⬆*[1] T ≘ T1 & ⦃G,L⦄ ⊢ T ➡[n,h] U2 & 
                              p = true & I = Abbr.
 #n #h #p #I #G #L #V1 #T1 #U2 * #c #Hc #H elim (cpg_inv_bind1 … H) -H *
 [ #cV #cT #V2 #T2 #HV12 #HT12 #H1 #H2 destruct
@@ -208,10 +233,10 @@ qed-.
 
 (* Basic_1: includes: pr0_gen_abbr pr2_gen_abbr *)
 (* Basic_2A1: includes: cpr_inv_abbr1 *)
-lemma cpm_inv_abbr1: ∀n,h,p,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓓ{p}V1.T1 ➡[n, h] U2 →
-                     ∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 & ⦃G, L.ⓓV1⦄ ⊢ T1 ➡[n, h] T2 &
+lemma cpm_inv_abbr1: ∀n,h,p,G,L,V1,T1,U2. ⦃G,L⦄ ⊢ ⓓ{p}V1.T1 ➡[n,h] U2 →
+                     ∨∨ ∃∃V2,T2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 & ⦃G,L.ⓓV1⦄ ⊢ T1 ➡[n,h] T2 &
                                  U2 = ⓓ{p}V2.T2
-                      | ∃∃T. ⬆*[1] T ≘ T1 & ⦃G, L⦄ ⊢ T ➡[n, h] U2 & p = true.
+                      | ∃∃T. ⬆*[1] T ≘ T1 & ⦃G,L⦄ ⊢ T ➡[n,h] U2 & p = true.
 #n #h #p #G #L #V1 #T1 #U2 #H
 elim (cpm_inv_bind1 … H) -H
 [ /3 width=1 by or_introl/
@@ -221,8 +246,8 @@ qed-.
 
 (* Basic_1: includes: pr0_gen_abst pr2_gen_abst *)
 (* Basic_2A1: includes: cpr_inv_abst1 *)
-lemma cpm_inv_abst1: ∀n,h,p,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓛ{p}V1.T1 ➡[n, h] U2 →
-                     ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 & ⦃G, L.ⓛV1⦄ ⊢ T1 ➡[n, h] T2 &
+lemma cpm_inv_abst1: ∀n,h,p,G,L,V1,T1,U2. ⦃G,L⦄ ⊢ ⓛ{p}V1.T1 ➡[n,h] U2 →
+                     ∃∃V2,T2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 & ⦃G,L.ⓛV1⦄ ⊢ T1 ➡[n,h] T2 &
                               U2 = ⓛ{p}V2.T2.
 #n #h #p #G #L #V1 #T1 #U2 #H
 elim (cpm_inv_bind1 … H) -H
@@ -240,14 +265,14 @@ qed-.
 
 (* Basic_1: includes: pr0_gen_appl pr2_gen_appl *)
 (* Basic_2A1: includes: cpr_inv_appl1 *)
-lemma cpm_inv_appl1: ∀n,h,G,L,V1,U1,U2. ⦃G, L⦄ ⊢ ⓐ V1.U1 ➡[n, h] U2 →
-                     ∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 & ⦃G, L⦄ ⊢ U1 ➡[n, h] T2 &
+lemma cpm_inv_appl1: ∀n,h,G,L,V1,U1,U2. ⦃G,L⦄ ⊢ ⓐ V1.U1 ➡[n,h] U2 →
+                     ∨∨ ∃∃V2,T2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 & ⦃G,L⦄ ⊢ U1 ➡[n,h] T2 &
                                  U2 = ⓐV2.T2
-                      | ∃∃p,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 & ⦃G, L⦄ ⊢ W1 ➡[h] W2 &
-                                            ⦃G, L.ⓛW1⦄ ⊢ T1 ➡[n, h] T2 &
+                      | ∃∃p,V2,W1,W2,T1,T2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 & ⦃G,L⦄ ⊢ W1 ➡[h] W2 &
+                                            ⦃G,L.ⓛW1⦄ ⊢ T1 ➡[n,h] T2 &
                                             U1 = ⓛ{p}W1.T1 & U2 = ⓓ{p}ⓝW2.V2.T2
-                      | ∃∃p,V,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V & ⬆*[1] V ≘ V2 &
-                                              ⦃G, L⦄ ⊢ W1 ➡[h] W2 & ⦃G, L.ⓓW1⦄ ⊢ T1 ➡[n, h] T2 &
+                      | ∃∃p,V,V2,W1,W2,T1,T2. ⦃G,L⦄ ⊢ V1 ➡[h] V & ⬆*[1] V ≘ V2 &
+                                              ⦃G,L⦄ ⊢ W1 ➡[h] W2 & ⦃G,L.ⓓW1⦄ ⊢ T1 ➡[n,h] T2 &
                                               U1 = ⓓ{p}W1.T1 & U2 = ⓓ{p}W2.ⓐV2.T2.
 #n #h #G #L #V1 #U1 #U2 * #c #Hc #H elim (cpg_inv_appl1 … H) -H *
 [ #cV #cT #V2 #T2 #HV12 #HT12 #H1 #H2 destruct
@@ -271,11 +296,11 @@ lemma cpm_inv_appl1: ∀n,h,G,L,V1,U1,U2. ⦃G, L⦄ ⊢ ⓐ V1.U1 ➡[n, h] U2
 ]
 qed-.
 
-lemma cpm_inv_cast1: ∀n,h,G,L,V1,U1,U2. ⦃G, L⦄ ⊢ ⓝV1.U1 ➡[n, h] U2 →
-                     ∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡[n, h] V2 & ⦃G, L⦄ ⊢ U1 ➡[n, h] T2 &
+lemma cpm_inv_cast1: ∀n,h,G,L,V1,U1,U2. ⦃G,L⦄ ⊢ ⓝV1.U1 ➡[n,h] U2 →
+                     ∨∨ ∃∃V2,T2. ⦃G,L⦄ ⊢ V1 ➡[n,h] V2 & ⦃G,L⦄ ⊢ U1 ➡[n,h] T2 &
                                  U2 = ⓝV2.T2
-                      | ⦃G, L⦄ ⊢ U1 ➡[n, h] U2
-                      | ∃∃m. ⦃G, L⦄ ⊢ V1 ➡[m, h] U2 & n = ↑m.
+                      | ⦃G,L⦄ ⊢ U1 ➡[n,h] U2
+                      | ∃∃m. ⦃G,L⦄ ⊢ V1 ➡[m,h] U2 & n = ↑m.
 #n #h #G #L #V1 #U1 #U2 * #c #Hc #H elim (cpg_inv_cast1 … H) -H *
 [ #cV #cT #V2 #T2 #HV12 #HT12 #HcVT #H1 #H2 destruct
   elim (isrt_inv_max … Hc) -Hc #nV #nT #HcV #HcT #H destruct
@@ -293,8 +318,8 @@ qed-.
 (* Basic forward lemmas *****************************************************)
 
 (* Basic_2A1: includes: cpr_fwd_bind1_minus *)
-lemma cpm_fwd_bind1_minus: ∀n,h,I,G,L,V1,T1,T. ⦃G, L⦄ ⊢ -ⓑ{I}V1.T1 ➡[n, h] T → ∀p.
-                           ∃∃V2,T2. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ➡[n, h] ⓑ{p,I}V2.T2 &
+lemma cpm_fwd_bind1_minus: ∀n,h,I,G,L,V1,T1,T. ⦃G,L⦄ ⊢ -ⓑ{I}V1.T1 ➡[n,h] T → ∀p.
+                           ∃∃V2,T2. ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ➡[n,h] ⓑ{p,I}V2.T2 &
                                     T = -ⓑ{I}V2.T2.
 #n #h #I #G #L #V1 #T1 #T * #c #Hc #H #p elim (cpg_fwd_bind1_minus … H p) -H
 /3 width=4 by ex2_2_intro, ex2_intro/
@@ -304,33 +329,33 @@ qed-.
 
 lemma cpm_ind (h): ∀Q:relation5 nat genv lenv term term.
                    (∀I,G,L. Q 0 G L (⓪{I}) (⓪{I})) →
-                   (∀G,L,s. Q 1 G L (⋆s) (⋆(next h s))) →
-                   (∀n,G,K,V1,V2,W2. ⦃G, K⦄ ⊢ V1 ➡[n, h] V2 → Q n G K V1 V2 →
+                   (∀G,L,s. Q 1 G L (⋆s) (⋆(⫯[h]s))) →
+                   (∀n,G,K,V1,V2,W2. ⦃G,K⦄ ⊢ V1 ➡[n,h] V2 → Q n G K V1 V2 →
                      ⬆*[1] V2 ≘ W2 → Q n G (K.ⓓV1) (#0) W2
-                   ) → (∀n,G,K,V1,V2,W2. ⦃G, K⦄ ⊢ V1 ➡[n, h] V2 → Q n G K V1 V2 →
+                   ) → (∀n,G,K,V1,V2,W2. ⦃G,K⦄ ⊢ V1 ➡[n,h] V2 → Q n G K V1 V2 →
                      ⬆*[1] V2 ≘ W2 → Q (↑n) G (K.ⓛV1) (#0) W2
-                   ) → (∀n,I,G,K,T,U,i. ⦃G, K⦄ ⊢ #i ➡[n, h] T → Q n G K (#i) T →
+                   ) → (∀n,I,G,K,T,U,i. ⦃G,K⦄ ⊢ #i ➡[n,h] T → Q n G K (#i) T →
                      ⬆*[1] T ≘ U → Q n G (K.ⓘ{I}) (#↑i) (U)
-                   ) → (∀n,p,I,G,L,V1,V2,T1,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 → ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ➡[n, h] T2 →
+                   ) → (∀n,p,I,G,L,V1,V2,T1,T2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 → ⦃G,L.ⓑ{I}V1⦄ ⊢ T1 ➡[n,h] T2 →
                      Q 0 G L V1 V2 → Q n G (L.ⓑ{I}V1) T1 T2 → Q n G L (ⓑ{p,I}V1.T1) (ⓑ{p,I}V2.T2)
-                   ) → (∀n,G,L,V1,V2,T1,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 → ⦃G, L⦄ ⊢ T1 ➡[n, h] T2 →
+                   ) → (∀n,G,L,V1,V2,T1,T2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 → ⦃G,L⦄ ⊢ T1 ➡[n,h] T2 →
                      Q 0 G L V1 V2 → Q n G L T1 T2 → Q n G L (ⓐV1.T1) (ⓐV2.T2)
-                   ) → (∀n,G,L,V1,V2,T1,T2. ⦃G, L⦄ ⊢ V1 ➡[n, h] V2 → ⦃G, L⦄ ⊢ T1 ➡[n, h] T2 →
+                   ) → (∀n,G,L,V1,V2,T1,T2. ⦃G,L⦄ ⊢ V1 ➡[n,h] V2 → ⦃G,L⦄ ⊢ T1 ➡[n,h] T2 →
                      Q n G L V1 V2 → Q n G L T1 T2 → Q n G L (ⓝV1.T1) (ⓝV2.T2)
-                   ) → (∀n,G,L,V,T1,T,T2. ⬆*[1] T ≘ T1 → ⦃G, L⦄ ⊢ T ➡[n, h] T2 →
+                   ) → (∀n,G,L,V,T1,T,T2. ⬆*[1] T ≘ T1 → ⦃G,L⦄ ⊢ T ➡[n,h] T2 →
                      Q n G L T T2 → Q n G L (+ⓓV.T1) T2
-                   ) → (∀n,G,L,V,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[n, h] T2 →
+                   ) → (∀n,G,L,V,T1,T2. ⦃G,L⦄ ⊢ T1 ➡[n,h] T2 →
                      Q n G L T1 T2 → Q n G L (ⓝV.T1) T2
-                   ) → (∀n,G,L,V1,V2,T. ⦃G, L⦄ ⊢ V1 ➡[n, h] V2 →
+                   ) → (∀n,G,L,V1,V2,T. ⦃G,L⦄ ⊢ V1 ➡[n,h] V2 →
                      Q n G L V1 V2 → Q (↑n) G L (ⓝV1.T) V2
-                   ) → (∀n,p,G,L,V1,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 → ⦃G, L⦄ ⊢ W1 ➡[h] W2 → ⦃G, L.ⓛW1⦄ ⊢ T1 ➡[n, h] T2 →
+                   ) → (∀n,p,G,L,V1,V2,W1,W2,T1,T2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 → ⦃G,L⦄ ⊢ W1 ➡[h] W2 → ⦃G,L.ⓛW1⦄ ⊢ T1 ➡[n,h] T2 →
                      Q 0 G L V1 V2 → Q 0 G L W1 W2 → Q n G (L.ⓛW1) T1 T2 →
                      Q n G L (ⓐV1.ⓛ{p}W1.T1) (ⓓ{p}ⓝW2.V2.T2)
-                   ) → (∀n,p,G,L,V1,V,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V → ⦃G, L⦄ ⊢ W1 ➡[h] W2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ➡[n, h] T2 →
+                   ) → (∀n,p,G,L,V1,V,V2,W1,W2,T1,T2. ⦃G,L⦄ ⊢ V1 ➡[h] V → ⦃G,L⦄ ⊢ W1 ➡[h] W2 → ⦃G,L.ⓓW1⦄ ⊢ T1 ➡[n,h] T2 →
                      Q 0 G L V1 V → Q 0 G L W1 W2 → Q n G (L.ⓓW1) T1 T2 →
                      ⬆*[1] V ≘ V2 → Q n G L (ⓐV1.ⓓ{p}W1.T1) (ⓓ{p}W2.ⓐV2.T2)
                    ) →
-                   ∀n,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[n, h] T2 → Q n G L T1 T2.
+                   ∀n,G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ➡[n,h] T2 → Q n G L T1 T2.
 #h #Q #IH1 #IH2 #IH3 #IH4 #IH5 #IH6 #IH7 #IH8 #IH9 #IH10 #IH11 #IH12 #IH13 #n #G #L #T1 #T2
 * #c #HC #H generalize in match HC; -HC generalize in match n; -n
 elim H -c -G -L -T1 -T2
index 8fa425fc5faec08abbd400c59ac655a22fd0f436..b5a67ac4e6be04b043135dc225635e65374ddcbc 100644 (file)
@@ -25,7 +25,7 @@ lemma cpm_aaa_conf (n) (h): ∀G,L. Conf3 … (aaa G L) (cpm h G L n).
 
 (* Note: one of these U is the inferred type of T *)
 lemma aaa_cpm_SO (h) (G) (L) (A):
-      ∀T. ⦃G, L⦄ ⊢ T ⁝ A → ∃U. ⦃G,L⦄ ⊢ T ➡[1,h] U.
+      ∀T. ⦃G,L⦄ ⊢ T ⁝ A → ∃U. ⦃G,L⦄ ⊢ T ➡[1,h] U.
 #h #G #L #A #T #H elim H -G -L -T -A
 [ /3 width=2 by ex_intro/
 | * #G #L #V #B #_ * #V0 #HV0
index 6f07b064779ddfca259c03297eea352ee9f05de2..8cbb8fc1834b92edb21125c735fd9ffdc9f6a7fd 100644 (file)
@@ -20,7 +20,7 @@ include "basic_2/rt_transition/cpm.ma".
 (* Forward lemmas with unbound context-sensitive rt-transition for terms ****)
 
 (* Basic_2A1: includes: cpr_cpx *)
-lemma cpm_fwd_cpx: ∀n,h,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[n, h] T2 → ⦃G, L⦄ ⊢ T1 ⬈[h] T2.
+lemma cpm_fwd_cpx: ∀n,h,G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ➡[n,h] T2 → ⦃G,L⦄ ⊢ T1 ⬈[h] T2.
 #n #h #G #L #T1 #T2 * #c #Hc #H elim H -L -T1 -T2
 /2 width=3 by cpx_theta, cpx_beta, cpx_ee, cpx_eps, cpx_zeta, cpx_flat, cpx_bind, cpx_lref, cpx_delta/
 qed-.
index beddc2697d0e9a5277ec643012c1a8048be7cc6a..bc9463c958390c5a16ec878d6d4b3f5bf6d30fcf 100644 (file)
@@ -50,27 +50,27 @@ qed-.
 (* Basic_1: includes: pr2_delta1 *)
 (* Basic_2A1: includes: cpr_delta *)
 lemma cpm_delta_drops: ∀n,h,G,L,K,V,V2,W2,i.
-                       ⬇*[i] L ≘ K.ⓓV → ⦃G, K⦄ ⊢ V ➡[n, h] V2 →
-                       ⬆*[↑i] V2 ≘ W2 → ⦃G, L⦄ ⊢ #i ➡[n, h] W2.
+                       ⬇*[i] L ≘ K.ⓓV → ⦃G,K⦄ ⊢ V ➡[n,h] V2 →
+                       ⬆*[↑i] V2 ≘ W2 → ⦃G,L⦄ ⊢ #i ➡[n,h] W2.
 #n #h #G #L #K #V #V2 #W2 #i #HLK *
 /3 width=8 by cpg_delta_drops, ex2_intro/
 qed.
 
 lemma cpm_ell_drops: ∀n,h,G,L,K,V,V2,W2,i.
-                     ⬇*[i] L ≘ K.ⓛV → ⦃G, K⦄ ⊢ V ➡[n, h] V2 →
-                     ⬆*[↑i] V2 ≘ W2 → ⦃G, L⦄ ⊢ #i ➡[↑n, h] W2.
+                     ⬇*[i] L ≘ K.ⓛV → ⦃G,K⦄ ⊢ V ➡[n,h] V2 →
+                     ⬆*[↑i] V2 ≘ W2 → ⦃G,L⦄ ⊢ #i ➡[↑n,h] W2.
 #n #h #G #L #K #V #V2 #W2 #i #HLK *
 /3 width=8 by cpg_ell_drops, isrt_succ, ex2_intro/
 qed.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma cpm_inv_atom1_drops: ∀n,h,I,G,L,T2. ⦃G, L⦄ ⊢ ⓪{I} ➡[n, h] T2 →
+lemma cpm_inv_atom1_drops: ∀n,h,I,G,L,T2. ⦃G,L⦄ ⊢ ⓪{I} ➡[n,h] T2 →
                            ∨∨ T2 = ⓪{I} ∧ n = 0
-                            | ∃∃s. T2 = ⋆(next h s) & I = Sort s & n = 1
-                            | ∃∃K,V,V2,i. ⬇*[i] L ≘ K.ⓓV & ⦃G, K⦄ ⊢ V ➡[n, h] V2 &
+                            | ∃∃s. T2 = ⋆(⫯[h]s) & I = Sort s & n = 1
+                            | ∃∃K,V,V2,i. ⬇*[i] L ≘ K.ⓓV & ⦃G,K⦄ ⊢ V ➡[n,h] V2 &
                                           ⬆*[↑i] V2 ≘ T2 & I = LRef i
-                            | ∃∃m,K,V,V2,i. ⬇*[i] L ≘ K.ⓛV & ⦃G, K⦄ ⊢ V ➡[m, h] V2 &
+                            | ∃∃m,K,V,V2,i. ⬇*[i] L ≘ K.ⓛV & ⦃G,K⦄ ⊢ V ➡[m,h] V2 &
                                             ⬆*[↑i] V2 ≘ T2 & I = LRef i & n = ↑m.
 #n #h #I #G #L #T2 * #c #Hc #H elim (cpg_inv_atom1_drops … H) -H *
 [ #H1 #H2 destruct lapply (isrt_inv_00 … Hc) -Hc
@@ -85,11 +85,11 @@ lemma cpm_inv_atom1_drops: ∀n,h,I,G,L,T2. ⦃G, L⦄ ⊢ ⓪{I} ➡[n, h] T2 
 ]
 qed-.
 
-lemma cpm_inv_lref1_drops: ∀n,h,G,L,T2,i. ⦃G, L⦄ ⊢ #i ➡[n, h] T2 →
+lemma cpm_inv_lref1_drops: ∀n,h,G,L,T2,i. ⦃G,L⦄ ⊢ #i ➡[n,h] T2 →
                            ∨∨ T2 = #i ∧ n = 0
-                            | ∃∃K,V,V2. ⬇*[i] L ≘ K.ⓓV & ⦃G, K⦄ ⊢ V ➡[n, h] V2 &
+                            | ∃∃K,V,V2. ⬇*[i] L ≘ K.ⓓV & ⦃G,K⦄ ⊢ V ➡[n,h] V2 &
                                         ⬆*[↑i] V2 ≘ T2
-                            | ∃∃m,K,V,V2. ⬇*[i] L ≘ K. ⓛV & ⦃G, K⦄ ⊢ V ➡[m, h] V2 &
+                            | ∃∃m,K,V,V2. ⬇*[i] L ≘ K. ⓛV & ⦃G,K⦄ ⊢ V ➡[m,h] V2 &
                                           ⬆*[↑i] V2 ≘ T2 & n = ↑m.
 #n #h #G #L #T2 #i * #c #Hc #H elim (cpg_inv_lref1_drops … H) -H *
 [ #H1 #H2 destruct lapply (isrt_inv_00 … Hc) -Hc
@@ -104,9 +104,9 @@ qed-.
 
 (* Advanced forward lemmas **************************************************)
 
-fact cpm_fwd_plus_aux (n) (h): ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[n, h] T2 →
+fact cpm_fwd_plus_aux (n) (h): ∀G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ➡[n,h] T2 →
                                ∀n1,n2. n1+n2 = n →
-                               ∃∃T. ⦃G, L⦄ ⊢ T1 ➡[n1, h] T & ⦃G, L⦄ ⊢ T ➡[n2, h] T2.
+                               ∃∃T. ⦃G,L⦄ ⊢ T1 ➡[n1,h] T & ⦃G,L⦄ ⊢ T ➡[n2,h] T2.
 #n #h #G #L #T1 #T2 #H @(cpm_ind … H) -G -L -T1 -T2 -n
 [ #I #G #L #n1 #n2 #H
   elim (plus_inv_O3 … H) -H #H1 #H2 destruct
@@ -165,6 +165,6 @@ fact cpm_fwd_plus_aux (n) (h): ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[n, h] T2 →
 ]
 qed-.
 
-lemma cpm_fwd_plus (h) (G) (L): ∀n1,n2,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[n1+n2, h] T2 →
-                                ∃∃T. ⦃G, L⦄ ⊢ T1 ➡[n1, h] T & ⦃G, L⦄ ⊢ T ➡[n2, h] T2.
+lemma cpm_fwd_plus (h) (G) (L): ∀n1,n2,T1,T2. ⦃G,L⦄ ⊢ T1 ➡[n1+n2,h] T2 →
+                                ∃∃T. ⦃G,L⦄ ⊢ T1 ➡[n1,h] T & ⦃G,L⦄ ⊢ T ➡[n2,h] T2.
 /2 width=3 by cpm_fwd_plus_aux/ qed-.
index 29f43808c0746504d69c5570863a4ae409c12df4..7b4cde75a9897afe315d150262b166ef6246eac9 100644 (file)
@@ -24,7 +24,7 @@ lemma lsubr_cpm_trans (n) (h) (G): lsub_trans … (λL. cpm h G L n) lsubr.
 #n #h #G #L1 #T1 #T2 * /3 width=5 by lsubr_cpg_trans, ex2_intro/
 qed-.
 
-lemma cpm_bind_unit (n) (h) (G): ∀L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 →
-                                 ∀J,T1,T2. ⦃G, L.ⓤ{J}⦄ ⊢ T1 ➡[n, h] T2 →
-                                 ∀p,I. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ➡[n, h] ⓑ{p,I}V2.T2.
+lemma cpm_bind_unit (n) (h) (G): ∀L,V1,V2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 →
+                                 ∀J,T1,T2. ⦃G,L.ⓤ{J}⦄ ⊢ T1 ➡[n,h] T2 →
+                                 ∀p,I. ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ➡[n,h] ⓑ{p,I}V2.T2.
 /4 width=4 by lsubr_cpm_trans, cpm_bind, lsubr_unit/ qed.
index 9a37802e68afe7e9353153b1b4b057edf399b729..b160f471c1f56a1771f2f8007afb48d1e3c000f6 100644 (file)
@@ -20,8 +20,8 @@ include "basic_2/rt_transition/cpm.ma".
 (* Properties with simple terms *********************************************)
 
 (* Basic_2A1: includes: cpr_inv_appl1_simple *)
-lemma cpm_inv_appl1_simple: ∀n,h,G,L,V1,T1,U. ⦃G, L⦄ ⊢ ⓐV1.T1 ➡[n, h] U → 𝐒⦃T1⦄ →
-                            ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 & ⦃G, L⦄ ⊢ T1 ➡[n, h] T2 &
+lemma cpm_inv_appl1_simple: ∀n,h,G,L,V1,T1,U. ⦃G,L⦄ ⊢ ⓐV1.T1 ➡[n,h] U → 𝐒⦃T1⦄ →
+                            ∃∃V2,T2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 & ⦃G,L⦄ ⊢ T1 ➡[n,h] T2 &
                                      U = ⓐV2.T2.
 #n #h #G #L #V1 #T1 #U * #c #Hc #H #HT1 elim (cpg_inv_appl1_simple … H HT1) -H -HT1
 #cV #cT #V2 #T2 #HV12 #HT12 #H1 #H2 destruct elim (isrt_inv_max … Hc) -Hc
index ed7d341d434d72b9b49e48688ee7c2af8cef1aba..7f05e3b1c0e1c4ce84631abb0c8ffc4f8e447be2 100644 (file)
@@ -17,32 +17,28 @@ include "basic_2/rt_transition/cpm_drops.ma".
 
 (* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS ***************)
 
-(* Inversion lemmas with degree-based equivalence for terms *****************)
+(* Inversion lemmas with sort-irrelevant equivalence for terms **************)
 
-lemma cpm_tdeq_inv_lref_sn (n) (h) (o) (G) (L) (i):
-                           ∀X.  ⦃G,L⦄ ⊢ #i ➡[n,h] X → #i ≛[h,o] X →
+lemma cpm_tdeq_inv_lref_sn (n) (h) (G) (L) (i):
+                           ∀X.  ⦃G,L⦄ ⊢ #i ➡[n,h] X → #i ≛ X →
                            ∧∧ X = #i & n = 0.
-#n #h #o #G #L #i #X #H1 #H2
+#n #h #G #L #i #X #H1 #H2
 lapply (tdeq_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_tdeq_inv_atom_sn (n) (h) (o) (I) (G) (L):
-                           ∀X. ⦃G,L⦄ ⊢ ⓪{I} ➡[n,h] X → ⓪{I} ≛[h,o] X →
+lemma cpm_tdeq_inv_atom_sn (n) (h) (I) (G) (L):
+                           ∀X. ⦃G,L⦄ ⊢ ⓪{I} ➡[n,h] X → ⓪{I} ≛ X →
                            ∨∨ ∧∧ X = ⓪{I} & n = 0
-                            | ∃∃s. X = ⋆(next h s) & I = Sort s & n = 1 & deg h o s 0.
-#n #h #o * #s #G #L #X #H1 #H2
+                            | ∃∃s. X = ⋆(⫯[h]s) & I = Sort s & n = 1.
+#n #h * #s #G #L #X #H1 #H2
 [ elim (cpm_inv_sort1 … H1) -H1
-  cases n -n [| #n ] #H #Hn destruct
+  cases n -n [| #n ] #H #Hn destruct -H2
   [ /3 width=1 by or_introl, conj/
-  | elim (tdeq_inv_sort1 … H2) -H2 #x #d #Hs
-    <(le_n_O_to_eq n) [| /2 width=3 by le_S_S_to_le/ ] -n #Hx #H destruct
-    lapply (deg_next … Hs) #H
-    lapply (deg_mono … H Hx) -H -Hx #Hd
-    lapply (pred_inv_fix_sn … Hd) -Hd #H destruct
-    /3 width=4 by refl, ex4_intro, or_intror/
+  | <(le_n_O_to_eq n) [| /2 width=3 by le_S_S_to_le/ ] -n
+    /3 width=3 by ex3_intro, or_intror/
   ]
 | elim (cpm_tdeq_inv_lref_sn … H1 H2) -H1 -H2 /3 width=1 by or_introl, conj/
 | elim (cpm_inv_gref1 … H1) -H1 -H2 /3 width=1 by or_introl, conj/
index fb1f479dd4d3f02789abadcf140350596c886aeb..9d984e384c0af1d03322c75c3ddf7f5b13592032 100644 (file)
@@ -22,24 +22,24 @@ include "basic_2/rt_transition/cpm.ma".
 (* Note: cpr_flat: does not hold in basic_1 *)
 (* Basic_1: includes: pr2_thin_dx *)
 lemma cpr_flat: ∀h,I,G,L,V1,V2,T1,T2.
-                ⦃G, L⦄ ⊢ V1 ➡[h] V2 → ⦃G, L⦄ ⊢ T1 ➡[h] T2 →
-                ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ➡[h] ⓕ{I}V2.T2.
+                ⦃G,L⦄ ⊢ V1 ➡[h] V2 → ⦃G,L⦄ ⊢ T1 ➡[h] T2 →
+                ⦃G,L⦄ ⊢ ⓕ{I}V1.T1 ➡[h] ⓕ{I}V2.T2.
 #h * /2 width=1 by cpm_cast, cpm_appl/
 qed. 
 
 (* Basic_1: was: pr2_head_1 *)
-lemma cpr_pair_sn: ∀h,I,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 →
-                   ∀T. ⦃G, L⦄ ⊢ ②{I}V1.T ➡[h] ②{I}V2.T.
+lemma cpr_pair_sn: ∀h,I,G,L,V1,V2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 →
+                   ∀T. ⦃G,L⦄ ⊢ ②{I}V1.T ➡[h] ②{I}V2.T.
 #h * /2 width=1 by cpm_bind, cpr_flat/
 qed.
 
 (* Basic inversion properties ***********************************************)
 
-lemma cpr_inv_atom1: ∀h,J,G,L,T2. ⦃G, L⦄ ⊢ ⓪{J} ➡[h] T2 →
+lemma cpr_inv_atom1: ∀h,J,G,L,T2. ⦃G,L⦄ ⊢ ⓪{J} ➡[h] T2 →
                      ∨∨ T2 = ⓪{J}
-                      | ∃∃K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[h] V2 & ⬆*[1] V2 ≘ T2 &
+                      | ∃∃K,V1,V2. ⦃G,K⦄ ⊢ V1 ➡[h] V2 & ⬆*[1] V2 ≘ T2 &
                                    L = K.ⓓV1 & J = LRef 0
-                      | ∃∃I,K,T,i. ⦃G, K⦄ ⊢ #i ➡[h] T & ⬆*[1] T ≘ T2 &
+                      | ∃∃I,K,T,i. ⦃G,K⦄ ⊢ #i ➡[h] T & ⬆*[1] T ≘ T2 &
                                    L = K.ⓘ{I} & J = LRef (↑i).
 #h #J #G #L #T2 #H elim (cpm_inv_atom1 … H) -H *
 [2,4:|*: /3 width=8 by or3_intro0, or3_intro1, or3_intro2, ex4_4_intro, ex4_3_intro/ ]
@@ -49,48 +49,48 @@ lemma cpr_inv_atom1: ∀h,J,G,L,T2. ⦃G, L⦄ ⊢ ⓪{J} ➡[h] T2 →
 qed-.
 
 (* Basic_1: includes: pr0_gen_sort pr2_gen_sort *)
-lemma cpr_inv_sort1: ∀h,G,L,T2,s. ⦃G, L⦄ ⊢ ⋆s ➡[h] T2 → T2 = ⋆s.
+lemma cpr_inv_sort1: ∀h,G,L,T2,s. ⦃G,L⦄ ⊢ ⋆s ➡[h] T2 → T2 = ⋆s.
 #h #G #L #T2 #s #H elim (cpm_inv_sort1 … H) -H //
 qed-.
 
-lemma cpr_inv_zero1: ∀h,G,L,T2. ⦃G, L⦄ ⊢ #0 ➡[h] T2 →
+lemma cpr_inv_zero1: ∀h,G,L,T2. ⦃G,L⦄ ⊢ #0 ➡[h] T2 →
                      ∨∨ T2 = #0
-                      | ∃∃K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[h] V2 & ⬆*[1] V2 ≘ T2 &
+                      | ∃∃K,V1,V2. ⦃G,K⦄ ⊢ V1 ➡[h] V2 & ⬆*[1] V2 ≘ T2 &
                                    L = K.ⓓV1.
 #h #G #L #T2 #H elim (cpm_inv_zero1 … H) -H *
 /3 width=6 by ex3_3_intro, or_introl, or_intror/
 #n #K #V1 #V2 #_ #_ #_ #H destruct
 qed-.
 
-lemma cpr_inv_lref1: ∀h,G,L,T2,i. ⦃G, L⦄ ⊢ #↑i ➡[h] T2 →
+lemma cpr_inv_lref1: ∀h,G,L,T2,i. ⦃G,L⦄ ⊢ #↑i ➡[h] T2 →
                      ∨∨ T2 = #(↑i)
-                      | ∃∃I,K,T. ⦃G, K⦄ ⊢ #i ➡[h] T & ⬆*[1] T ≘ T2 & L = K.ⓘ{I}.
+                      | ∃∃I,K,T. ⦃G,K⦄ ⊢ #i ➡[h] T & ⬆*[1] T ≘ T2 & L = K.ⓘ{I}.
 #h #G #L #T2 #i #H elim (cpm_inv_lref1 … H) -H *
 /3 width=6 by ex3_3_intro, or_introl, or_intror/
 qed-.
 
-lemma cpr_inv_gref1: ∀h,G,L,T2,l. ⦃G, L⦄ ⊢ §l ➡[h] T2 → T2 = §l.
+lemma cpr_inv_gref1: ∀h,G,L,T2,l. ⦃G,L⦄ ⊢ §l ➡[h] T2 → T2 = §l.
 #h #G #L #T2 #l #H elim (cpm_inv_gref1 … H) -H //
 qed-.
 
 (* Basic_1: includes: pr0_gen_cast pr2_gen_cast *)
-lemma cpr_inv_cast1: ∀h,G,L,V1,U1,U2. ⦃G, L⦄ ⊢ ⓝ V1.U1 ➡[h] U2 →
-                     ∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 & ⦃G, L⦄ ⊢ U1 ➡[h] T2 &
+lemma cpr_inv_cast1: ∀h,G,L,V1,U1,U2. ⦃G,L⦄ ⊢ ⓝ V1.U1 ➡[h] U2 →
+                     ∨∨ ∃∃V2,T2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 & ⦃G,L⦄ ⊢ U1 ➡[h] T2 &
                                  U2 = ⓝV2.T2
-                      | ⦃G, L⦄ ⊢ U1 ➡[h] U2.
+                      | ⦃G,L⦄ ⊢ U1 ➡[h] U2.
 #h #G #L #V1 #U1 #U2 #H elim (cpm_inv_cast1 … H) -H
 /2 width=1 by or_introl, or_intror/ * #n #_ #H destruct
 qed-.
 
-lemma cpr_inv_flat1: ∀h,I,G,L,V1,U1,U2. ⦃G, L⦄ ⊢ ⓕ{I}V1.U1 ➡[h] U2 →
-                     ∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 & ⦃G, L⦄ ⊢ U1 ➡[h] T2 &
+lemma cpr_inv_flat1: ∀h,I,G,L,V1,U1,U2. ⦃G,L⦄ ⊢ ⓕ{I}V1.U1 ➡[h] U2 →
+                     ∨∨ ∃∃V2,T2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 & ⦃G,L⦄ ⊢ U1 ➡[h] T2 &
                                  U2 = ⓕ{I}V2.T2
-                      | (⦃G, L⦄ ⊢ U1 ➡[h] U2 ∧ I = Cast)
-                      | ∃∃p,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 & ⦃G, L⦄ ⊢ W1 ➡[h] W2 &
-                                            ⦃G, L.ⓛW1⦄ ⊢ T1 ➡[h] T2 & U1 = ⓛ{p}W1.T1 &
+                      | (⦃G,L⦄ ⊢ U1 ➡[h] U2 ∧ I = Cast)
+                      | ∃∃p,V2,W1,W2,T1,T2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 & ⦃G,L⦄ ⊢ W1 ➡[h] W2 &
+                                            ⦃G,L.ⓛW1⦄ ⊢ T1 ➡[h] T2 & U1 = ⓛ{p}W1.T1 &
                                             U2 = ⓓ{p}ⓝW2.V2.T2 & I = Appl
-                      | ∃∃p,V,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V & ⬆*[1] V ≘ V2 &
-                                              ⦃G, L⦄ ⊢ W1 ➡[h] W2 & ⦃G, L.ⓓW1⦄ ⊢ T1 ➡[h] T2 &
+                      | ∃∃p,V,V2,W1,W2,T1,T2. ⦃G,L⦄ ⊢ V1 ➡[h] V & ⬆*[1] V ≘ V2 &
+                                              ⦃G,L⦄ ⊢ W1 ➡[h] W2 & ⦃G,L.ⓓW1⦄ ⊢ T1 ➡[h] T2 &
                                               U1 = ⓓ{p}W1.T1 &
                                               U2 = ⓓ{p}W2.ⓐV2.T2 & I = Appl.
 #h * #G #L #V1 #U1 #U2 #H
@@ -105,26 +105,26 @@ qed-.
 
 lemma cpr_ind (h): ∀Q:relation4 genv lenv term term.
                    (∀I,G,L. Q G L (⓪{I}) (⓪{I})) →
-                   (∀G,K,V1,V2,W2. ⦃G, K⦄ ⊢ V1 ➡[h] V2 → Q G K V1 V2 →
+                   (∀G,K,V1,V2,W2. ⦃G,K⦄ ⊢ V1 ➡[h] V2 → Q G K V1 V2 →
                      ⬆*[1] V2 ≘ W2 → Q G (K.ⓓV1) (#0) W2
-                   ) → (∀I,G,K,T,U,i. ⦃G, K⦄ ⊢ #i ➡[h] T → Q G K (#i) T →
+                   ) → (∀I,G,K,T,U,i. ⦃G,K⦄ ⊢ #i ➡[h] T → Q G K (#i) T →
                      ⬆*[1] T ≘ U → Q G (K.ⓘ{I}) (#↑i) (U)
-                   ) → (∀p,I,G,L,V1,V2,T1,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 → ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ➡[h] T2 →
+                   ) → (∀p,I,G,L,V1,V2,T1,T2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 → ⦃G,L.ⓑ{I}V1⦄ ⊢ T1 ➡[h] T2 →
                      Q G L V1 V2 → Q G (L.ⓑ{I}V1) T1 T2 → Q G L (ⓑ{p,I}V1.T1) (ⓑ{p,I}V2.T2)
-                   ) → (∀I,G,L,V1,V2,T1,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 → ⦃G, L⦄ ⊢ T1 ➡[h] T2 →
+                   ) → (∀I,G,L,V1,V2,T1,T2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 → ⦃G,L⦄ ⊢ T1 ➡[h] T2 →
                      Q G L V1 V2 → Q G L T1 T2 → Q G L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2)
-                   ) → (∀G,L,V,T1,T,T2. ⬆*[1] T ≘ T1 → ⦃G, L⦄ ⊢ T ➡[h] T2 →
+                   ) → (∀G,L,V,T1,T,T2. ⬆*[1] T ≘ T1 → ⦃G,L⦄ ⊢ T ➡[h] T2 →
                      Q G L T T2 → Q G L (+ⓓV.T1) T2
-                   ) → (∀G,L,V,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h] T2 → Q G L T1 T2 →
+                   ) → (∀G,L,V,T1,T2. ⦃G,L⦄ ⊢ T1 ➡[h] T2 → Q G L T1 T2 →
                      Q G L (ⓝV.T1) T2
-                   ) → (∀p,G,L,V1,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 → ⦃G, L⦄ ⊢ W1 ➡[h] W2 → ⦃G, L.ⓛW1⦄ ⊢ T1 ➡[h] T2 →
+                   ) → (∀p,G,L,V1,V2,W1,W2,T1,T2. ⦃G,L⦄ ⊢ V1 ➡[h] V2 → ⦃G,L⦄ ⊢ W1 ➡[h] W2 → ⦃G,L.ⓛW1⦄ ⊢ T1 ➡[h] T2 →
                      Q G L V1 V2 → Q G L W1 W2 → Q G (L.ⓛW1) T1 T2 →
                      Q G L (ⓐV1.ⓛ{p}W1.T1) (ⓓ{p}ⓝW2.V2.T2)
-                   ) → (∀p,G,L,V1,V,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V → ⦃G, L⦄ ⊢ W1 ➡[h] W2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ➡[h] T2 →
+                   ) → (∀p,G,L,V1,V,V2,W1,W2,T1,T2. ⦃G,L⦄ ⊢ V1 ➡[h] V → ⦃G,L⦄ ⊢ W1 ➡[h] W2 → ⦃G,L.ⓓW1⦄ ⊢ T1 ➡[h] T2 →
                      Q G L V1 V → Q G L W1 W2 → Q G (L.ⓓW1) T1 T2 →
                      ⬆*[1] V ≘ V2 → Q G L (ⓐV1.ⓓ{p}W1.T1) (ⓓ{p}W2.ⓐV2.T2)
                    ) →
-                   ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h] T2 → Q G L T1 T2.
+                   ∀G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ➡[h] T2 → Q G L T1 T2.
 #h #Q #IH1 #IH2 #IH3 #IH4 #IH5 #IH6 #IH7 #IH8 #IH9 #G #L #T1 #T2
 @(insert_eq_0 … 0) #n #H
 @(cpm_ind … H) -G -L -T1 -T2 -n [2,4,11:|*: /3 width=4 by/ ]
index ba96c07fbbe290cc2f8fd312d87e3e18d91b6009..afd2d3fda6e7a341cdcbf2407faf3e6d49899f4f 100644 (file)
@@ -19,9 +19,9 @@ include "basic_2/rt_transition/cpm_drops.ma".
 (* Advanced inversion lemmas ************************************************)
 
 (* Basic_2A1: includes: cpr_inv_atom1 *)
-lemma cpr_inv_atom1_drops: ∀h,I,G,L,T2. ⦃G, L⦄ ⊢ ⓪{I} ➡[h] T2 →
+lemma cpr_inv_atom1_drops: ∀h,I,G,L,T2. ⦃G,L⦄ ⊢ ⓪{I} ➡[h] T2 →
                            ∨∨ T2 = ⓪{I}
-                            | ∃∃K,V,V2,i. ⬇*[i] L ≘ K.ⓓV & ⦃G, K⦄ ⊢ V ➡[h] V2 &
+                            | ∃∃K,V,V2,i. ⬇*[i] L ≘ K.ⓓV & ⦃G,K⦄ ⊢ V ➡[h] V2 &
                                           ⬆*[↑i] V2 ≘ T2 & I = LRef i.
 #h #I #G #L #T2 #H elim (cpm_inv_atom1_drops … H) -H *
 [ /2 width=1 by or_introl/
@@ -33,9 +33,9 @@ qed-.
 
 (* Basic_1: includes: pr0_gen_lref pr2_gen_lref *)
 (* Basic_2A1: includes: cpr_inv_lref1 *)
-lemma cpr_inv_lref1_drops: ∀h,G,L,T2,i. ⦃G, L⦄ ⊢ #i ➡[h] T2 →
+lemma cpr_inv_lref1_drops: ∀h,G,L,T2,i. ⦃G,L⦄ ⊢ #i ➡[h] T2 →
                            ∨∨ T2 = #i
-                            | ∃∃K,V,V2. ⬇*[i] L ≘ K. ⓓV & ⦃G, K⦄ ⊢ V ➡[h] V2 &
+                            | ∃∃K,V,V2. ⬇*[i] L ≘ K. ⓓV & ⦃G,K⦄ ⊢ V ➡[h] V2 &
                                         ⬆*[↑i] V2 ≘ T2.
 #h #G #L #T2 #i #H elim (cpm_inv_lref1_drops … H) -H *
 [ /2 width=1 by or_introl/
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpr_drops_basic.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpr_drops_basic.ma
new file mode 100644 (file)
index 0000000..ab99dbf
--- /dev/null
@@ -0,0 +1,49 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/relocation/lifts_basic.ma".
+include "basic_2/rt_transition/cpm_drops.ma".
+include "basic_2/rt_transition/cpr.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL R-TRANSITION FOR TERMS ************************)
+
+(* Properties with basic relocation *****************************************)
+
+lemma cpr_subst (h) (G) (L) (U1) (i):
+                ∀K,V. ⬇*[i] L ≘ K.ⓓV →
+                ∃∃U2,T2. ⦃G,L⦄ ⊢ U1 ➡[h] U2 & ⬆[i,1] T2 ≘ U2.
+#h #G #L #U1 @(fqup_wf_ind_eq (Ⓣ) … G L U1) -G -L -U1
+#G0 #L0 #U0 #IH #G #L * *
+[ #s #HG #HL #HT #i #K #V #_ destruct -IH
+  /2 width=4 by lifts_sort, ex2_2_intro/
+| #j #HG #HL #HT #i #K #V #HLK destruct -IH
+  elim (lt_or_eq_or_gt i j) #Hij
+  [ /3 width=4 by lifts_lref_ge_minus, cpr_refl, ex2_2_intro/
+  | elim (lifts_total V (𝐔❴↑i❵)) #U2 #HU2
+    elim (lifts_split_trans … HU2 (𝐔❴i❵) (𝐁❴i,1❵)) [2: @(after_basic_rc i 0) ]
+    /3 width=7 by cpm_delta_drops, ex2_2_intro/
+  | /3 width=4 by lifts_lref_lt, cpr_refl, ex2_2_intro/
+  ]
+| #l #HG #HL #HT #i #K #V #_ destruct -IH
+  /2 width=4 by lifts_gref, ex2_2_intro/
+| #p #J #W1 #U1 #HG #HL #HT #i #K #V #HLK destruct
+  elim (IH G L W1 … HLK) [| // ] #W2 #V2 #HW12 #HVW2
+  elim (IH G (L.ⓑ{J}W1) U1 … (↑i)) [|*: /3 width=4 by drops_drop/ ] #U2 #T2 #HU12 #HTU2
+  /3 width=9 by cpm_bind, lifts_bind, ex2_2_intro/
+| #J #W1 #U1 #HG #HL #HT #i #K #V #HLK destruct
+  elim (IH G L W1 … HLK) [| // ] #W2 #V2 #HW12 #HVW2
+  elim (IH G L U1 … HLK) [| // ] #U2 #T2 #HU12 #HTU2
+  /3 width=8 by cpr_flat, lifts_flat, ex2_2_intro/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpr_tdeq.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpr_tdeq.ma
new file mode 100644 (file)
index 0000000..910c7ab
--- /dev/null
@@ -0,0 +1,32 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/relocation/lifts_tdeq.ma".
+include "basic_2/rt_transition/cpr_drops_basic.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL R-TRANSITION FOR TERMS ************************)
+
+(* Properties with context-free sort-irrelevant equivalence *****************)
+
+lemma cpr_abbr_pos_tdneq (h) (G) (L) (V) (T1):
+      ∃∃T2. ⦃G,L⦄ ⊢ +ⓓV.T1 ➡[h] 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 (tdeq_dec U1 U2) [ -HU12 #HU12 | -HTU2 #HnU12 ]
+[ elim (tdeq_inv_lifts_dx … HU12 … HTU2) -U2 #T1 #HTU1 #_ -T2
+  /3 width=9 by cpm_zeta, tdeq_lifts_inv_pair_sn, ex2_intro/
+| @(ex2_intro … (+ⓓV.U2)) [ /2 width=1 by cpm_bind/ ] -HU12 #H
+  elim (tdeq_inv_pair … H) -H #_ #_ /2 width=1 by/
+]
+qed-.
index 3da67484aaa0d1f427d6cb6decbcb85a7b363226..005c4335504d9dbf4d79f963c654bb888b4461db 100644 (file)
@@ -18,7 +18,7 @@ include "basic_2/rt_transition/cpg.ma".
 (* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS ***************)
 
 definition cpx (h): relation4 genv lenv term term ≝
-                    λG,L,T1,T2. ∃c. ⦃G, L⦄ ⊢ T1 ⬈[eq_f, c, h] T2.
+                    λG,L,T1,T2. ∃c. ⦃G,L⦄ ⊢ T1 ⬈[eq_f,c,h] T2.
 
 interpretation
    "unbound context-sensitive parallel rt-transition (term)"
@@ -27,64 +27,64 @@ interpretation
 (* Basic properties *********************************************************)
 
 (* Basic_2A1: was: cpx_st *)
-lemma cpx_ess: ∀h,G,L,s. ⦃G, L⦄ ⊢ ⋆s ⬈[h] ⋆(next h s).
+lemma cpx_ess: ∀h,G,L,s. ⦃G,L⦄ ⊢ ⋆s ⬈[h] ⋆(⫯[h]s).
 /2 width=2 by cpg_ess, ex_intro/ qed.
 
-lemma cpx_delta: ∀h,I,G,K,V1,V2,W2. ⦃G, K⦄ ⊢ V1 ⬈[h] V2 →
-                 ⬆*[1] V2 ≘ W2 → ⦃G, K.ⓑ{I}V1⦄ ⊢ #0 ⬈[h] W2.
+lemma cpx_delta: ∀h,I,G,K,V1,V2,W2. ⦃G,K⦄ ⊢ V1 ⬈[h] V2 →
+                 ⬆*[1] V2 ≘ W2 → ⦃G,K.ⓑ{I}V1⦄ ⊢ #0 ⬈[h] W2.
 #h * #G #K #V1 #V2 #W2 *
 /3 width=4 by cpg_delta, cpg_ell, ex_intro/
 qed.
 
-lemma cpx_lref: ∀h,I,G,K,T,U,i. ⦃G, K⦄ ⊢ #i ⬈[h] T →
-                ⬆*[1] T ≘ U → ⦃G, K.ⓘ{I}⦄ ⊢ #↑i ⬈[h] U.
+lemma cpx_lref: ∀h,I,G,K,T,U,i. ⦃G,K⦄ ⊢ #i ⬈[h] T →
+                ⬆*[1] T ≘ U → ⦃G,K.ⓘ{I}⦄ ⊢ #↑i ⬈[h] U.
 #h #I #G #K #T #U #i *
 /3 width=4 by cpg_lref, ex_intro/
 qed.
 
 lemma cpx_bind: ∀h,p,I,G,L,V1,V2,T1,T2.
-                ⦃G, L⦄ ⊢ V1 ⬈[h] V2 → ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ⬈[h] T2 →
-                ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈[h] ⓑ{p,I}V2.T2.
+                ⦃G,L⦄ ⊢ V1 ⬈[h] V2 → ⦃G,L.ⓑ{I}V1⦄ ⊢ T1 ⬈[h] T2 →
+                ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈[h] ⓑ{p,I}V2.T2.
 #h #p #I #G #L #V1 #V2 #T1 #T2 * #cV #HV12 *
 /3 width=2 by cpg_bind, ex_intro/
 qed.
 
 lemma cpx_flat: ∀h,I,G,L,V1,V2,T1,T2.
-                ⦃G, L⦄ ⊢ V1 ⬈[h] V2 → ⦃G, L⦄ ⊢ T1 ⬈[h] T2 →
-                ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ⬈[h] ⓕ{I}V2.T2.
+                ⦃G,L⦄ ⊢ V1 ⬈[h] V2 → ⦃G,L⦄ ⊢ T1 ⬈[h] T2 →
+                ⦃G,L⦄ ⊢ ⓕ{I}V1.T1 ⬈[h] ⓕ{I}V2.T2.
 #h * #G #L #V1 #V2 #T1 #T2 * #cV #HV12 *
 /3 width=5 by cpg_appl, cpg_cast, ex_intro/
 qed.
 
 lemma cpx_zeta (h) (G) (L):
-               ∀T1,T. ⬆*[1] T ≘ T1 → ∀T2. ⦃G, L⦄ ⊢ T ⬈[h] T2 →
-               ∀V. ⦃G, L⦄ ⊢ +ⓓV.T1 ⬈[h] T2.
+               ∀T1,T. ⬆*[1] T ≘ T1 → ∀T2. ⦃G,L⦄ ⊢ T ⬈[h] T2 →
+               ∀V. ⦃G,L⦄ ⊢ +ⓓV.T1 ⬈[h] T2.
 #h #G #L #T1 #T #HT1 #T2 *
 /3 width=4 by cpg_zeta, ex_intro/
 qed.
 
-lemma cpx_eps: ∀h,G,L,V,T1,T2. ⦃G, L⦄ ⊢ T1 ⬈[h] T2 → ⦃G, L⦄ ⊢ ⓝV.T1 ⬈[h] T2.
+lemma cpx_eps: ∀h,G,L,V,T1,T2. ⦃G,L⦄ ⊢ T1 ⬈[h] T2 → ⦃G,L⦄ ⊢ ⓝV.T1 ⬈[h] T2.
 #h #G #L #V #T1 #T2 *
 /3 width=2 by cpg_eps, ex_intro/
 qed.
 
 (* Basic_2A1: was: cpx_ct *)
-lemma cpx_ee: ∀h,G,L,V1,V2,T. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 → ⦃G, L⦄ ⊢ ⓝV1.T ⬈[h] V2.
+lemma cpx_ee: ∀h,G,L,V1,V2,T. ⦃G,L⦄ ⊢ V1 ⬈[h] V2 → ⦃G,L⦄ ⊢ ⓝV1.T ⬈[h] V2.
 #h #G #L #V1 #V2 #T *
 /3 width=2 by cpg_ee, ex_intro/
 qed.
 
 lemma cpx_beta: ∀h,p,G,L,V1,V2,W1,W2,T1,T2.
-                ⦃G, L⦄ ⊢ V1 ⬈[h] V2 → ⦃G, L⦄ ⊢ W1 ⬈[h] W2 → ⦃G, L.ⓛW1⦄ ⊢ T1 ⬈[h] T2 →
-                ⦃G, L⦄ ⊢ ⓐV1.ⓛ{p}W1.T1 ⬈[h] ⓓ{p}ⓝW2.V2.T2.
+                ⦃G,L⦄ ⊢ V1 ⬈[h] V2 → ⦃G,L⦄ ⊢ W1 ⬈[h] W2 → ⦃G,L.ⓛW1⦄ ⊢ T1 ⬈[h] T2 →
+                ⦃G,L⦄ ⊢ ⓐV1.ⓛ{p}W1.T1 ⬈[h] ⓓ{p}ⓝW2.V2.T2.
 #h #p #G #L #V1 #V2 #W1 #W2 #T1 #T2 * #cV #HV12 * #cW #HW12 * 
 /3 width=2 by cpg_beta, ex_intro/
 qed.
 
 lemma cpx_theta: ∀h,p,G,L,V1,V,V2,W1,W2,T1,T2.
-                 ⦃G, L⦄ ⊢ V1 ⬈[h] V → ⬆*[1] V ≘ V2 → ⦃G, L⦄ ⊢ W1 ⬈[h] W2 →
-                 ⦃G, L.ⓓW1⦄ ⊢ T1 ⬈[h] T2 →
-                 ⦃G, L⦄ ⊢ ⓐV1.ⓓ{p}W1.T1 ⬈[h] ⓓ{p}W2.ⓐV2.T2.
+                 ⦃G,L⦄ ⊢ V1 ⬈[h] V → ⬆*[1] V ≘ V2 → ⦃G,L⦄ ⊢ W1 ⬈[h] W2 →
+                 ⦃G,L.ⓓW1⦄ ⊢ T1 ⬈[h] T2 →
+                 ⦃G,L⦄ ⊢ ⓐV1.ⓓ{p}W1.T1 ⬈[h] ⓓ{p}W2.ⓐV2.T2.
 #h #p #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 * #cV #HV1 #HV2 * #cW #HW12 * 
 /3 width=4 by cpg_theta, ex_intro/
 qed.
@@ -95,8 +95,8 @@ lemma cpx_refl: ∀h,G,L. reflexive … (cpx h G L).
 
 (* Advanced properties ******************************************************)
 
-lemma cpx_pair_sn: ∀h,I,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 →
-                   ∀T. ⦃G, L⦄ ⊢ ②{I}V1.T ⬈[h] ②{I}V2.T.
+lemma cpx_pair_sn: ∀h,I,G,L,V1,V2. ⦃G,L⦄ ⊢ V1 ⬈[h] V2 →
+                   ∀T. ⦃G,L⦄ ⊢ ②{I}V1.T ⬈[h] ②{I}V2.T.
 #h * /2 width=2 by cpx_flat, cpx_bind/
 qed.
 
@@ -108,115 +108,115 @@ qed.
 
 (* Basic inversion lemmas ***************************************************)
 
-lemma cpx_inv_atom1: ∀h,J,G,L,T2. ⦃G, L⦄ ⊢ ⓪{J} ⬈[h] T2 →
+lemma cpx_inv_atom1: ∀h,J,G,L,T2. ⦃G,L⦄ ⊢ ⓪{J} ⬈[h] T2 →
                      ∨∨ T2 = ⓪{J}
-                      | ∃∃s. T2 = ⋆(next h s) & J = Sort s
-                      | ∃∃I,K,V1,V2. ⦃G, K⦄ ⊢ V1 ⬈[h] V2 & ⬆*[1] V2 ≘ T2 &
+                      | ∃∃s. T2 = ⋆(⫯[h]s) & J = Sort s
+                      | ∃∃I,K,V1,V2. ⦃G,K⦄ ⊢ V1 ⬈[h] V2 & ⬆*[1] V2 ≘ T2 &
                                      L = K.ⓑ{I}V1 & J = LRef 0
-                      | ∃∃I,K,T,i. ⦃G, K⦄ ⊢ #i ⬈[h] T & ⬆*[1] T ≘ T2 &
+                      | ∃∃I,K,T,i. ⦃G,K⦄ ⊢ #i ⬈[h] T & ⬆*[1] T ≘ T2 &
                                    L = K.ⓘ{I} & J = LRef (↑i).
 #h #J #G #L #T2 * #c #H elim (cpg_inv_atom1 … H) -H *
 /4 width=8 by or4_intro0, or4_intro1, or4_intro2, or4_intro3, ex4_4_intro, ex2_intro, ex_intro/
 qed-.
 
-lemma cpx_inv_sort1: ∀h,G,L,T2,s. ⦃G, L⦄ ⊢ ⋆s ⬈[h] T2 →
-                     ∨∨ T2 = ⋆s | T2 = ⋆(next h s).
+lemma cpx_inv_sort1: ∀h,G,L,T2,s. ⦃G,L⦄ ⊢ ⋆s ⬈[h] T2 →
+                     ∨∨ T2 = ⋆s | T2 = ⋆(⫯[h]s).
 #h #G #L #T2 #s * #c #H elim (cpg_inv_sort1 … H) -H *
 /2 width=1 by or_introl, or_intror/
 qed-.
 
-lemma cpx_inv_zero1: ∀h,G,L,T2. ⦃G, L⦄ ⊢ #0 ⬈[h] T2 →
+lemma cpx_inv_zero1: ∀h,G,L,T2. ⦃G,L⦄ ⊢ #0 ⬈[h] T2 →
                      ∨∨ T2 = #0
-                      | ∃∃I,K,V1,V2. ⦃G, K⦄ ⊢ V1 ⬈[h] V2 & ⬆*[1] V2 ≘ T2 &
+                      | ∃∃I,K,V1,V2. ⦃G,K⦄ ⊢ V1 ⬈[h] V2 & ⬆*[1] V2 ≘ T2 &
                                      L = K.ⓑ{I}V1.
 #h #G #L #T2 * #c #H elim (cpg_inv_zero1 … H) -H *
 /4 width=7 by ex3_4_intro, ex_intro, or_introl, or_intror/
 qed-.
 
-lemma cpx_inv_lref1: ∀h,G,L,T2,i. ⦃G, L⦄ ⊢ #↑i ⬈[h] T2 →
+lemma cpx_inv_lref1: ∀h,G,L,T2,i. ⦃G,L⦄ ⊢ #↑i ⬈[h] T2 →
                      ∨∨ T2 = #(↑i)
-                      | ∃∃I,K,T. ⦃G, K⦄ ⊢ #i ⬈[h] T & ⬆*[1] T ≘ T2 & L = K.ⓘ{I}.
+                      | ∃∃I,K,T. ⦃G,K⦄ ⊢ #i ⬈[h] T & ⬆*[1] T ≘ T2 & L = K.ⓘ{I}.
 #h #G #L #T2 #i * #c #H elim (cpg_inv_lref1 … H) -H *
 /4 width=6 by ex3_3_intro, ex_intro, or_introl, or_intror/
 qed-.
 
-lemma cpx_inv_gref1: ∀h,G,L,T2,l. ⦃G, L⦄ ⊢ §l ⬈[h] T2 → T2 = §l.
+lemma cpx_inv_gref1: ∀h,G,L,T2,l. ⦃G,L⦄ ⊢ §l ⬈[h] T2 → T2 = §l.
 #h #G #L #T2 #l * #c #H elim (cpg_inv_gref1 … H) -H //
 qed-.
 
-lemma cpx_inv_bind1: ∀h,p,I,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈[h] U2 →
-                     ∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 & ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ⬈[h] T2 &
+lemma cpx_inv_bind1: ∀h,p,I,G,L,V1,T1,U2. ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈[h] U2 →
+                     ∨∨ ∃∃V2,T2. ⦃G,L⦄ ⊢ V1 ⬈[h] V2 & ⦃G,L.ⓑ{I}V1⦄ ⊢ T1 ⬈[h] T2 &
                                  U2 = ⓑ{p,I}V2.T2
-                      | ∃∃T. ⬆*[1] T ≘ T1 & ⦃G, L⦄ ⊢ T ⬈[h] U2 & 
+                      | ∃∃T. ⬆*[1] T ≘ T1 & ⦃G,L⦄ ⊢ T ⬈[h] U2 & 
                              p = true & I = Abbr.
 #h #p #I #G #L #V1 #T1 #U2 * #c #H elim (cpg_inv_bind1 … H) -H *
 /4 width=5 by ex4_intro, ex3_2_intro, ex_intro, or_introl, or_intror/
 qed-.
 
-lemma cpx_inv_abbr1: ∀h,p,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓓ{p}V1.T1 ⬈[h] U2 →
-                     ∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 & ⦃G, L.ⓓV1⦄ ⊢ T1 ⬈[h] T2 &
+lemma cpx_inv_abbr1: ∀h,p,G,L,V1,T1,U2. ⦃G,L⦄ ⊢ ⓓ{p}V1.T1 ⬈[h] U2 →
+                     ∨∨ ∃∃V2,T2. ⦃G,L⦄ ⊢ V1 ⬈[h] V2 & ⦃G,L.ⓓV1⦄ ⊢ T1 ⬈[h] T2 &
                                  U2 = ⓓ{p}V2.T2
-                      | ∃∃T. ⬆*[1] T ≘ T1 & ⦃G, L⦄ ⊢ T ⬈[h] U2 & p = true.
+                      | ∃∃T. ⬆*[1] T ≘ T1 & ⦃G,L⦄ ⊢ T ⬈[h] U2 & p = true.
 #h #p #G #L #V1 #T1 #U2 * #c #H elim (cpg_inv_abbr1 … H) -H *
 /4 width=5 by ex3_2_intro, ex3_intro, ex_intro, or_introl, or_intror/
 qed-.
 
-lemma cpx_inv_abst1: ∀h,p,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓛ{p}V1.T1 ⬈[h] U2 →
-                     ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 & ⦃G, L.ⓛV1⦄ ⊢ T1 ⬈[h] T2 &
+lemma cpx_inv_abst1: ∀h,p,G,L,V1,T1,U2. ⦃G,L⦄ ⊢ ⓛ{p}V1.T1 ⬈[h] U2 →
+                     ∃∃V2,T2. ⦃G,L⦄ ⊢ V1 ⬈[h] V2 & ⦃G,L.ⓛV1⦄ ⊢ T1 ⬈[h] T2 &
                               U2 = ⓛ{p}V2.T2.
 #h #p #G #L #V1 #T1 #U2 * #c #H elim (cpg_inv_abst1 … H) -H
 /3 width=5 by ex3_2_intro, ex_intro/
 qed-.
 
-lemma cpx_inv_appl1: ∀h,G,L,V1,U1,U2. ⦃G, L⦄ ⊢ ⓐ V1.U1 ⬈[h] U2 →
-                     ∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 & ⦃G, L⦄ ⊢ U1 ⬈[h] T2 &
+lemma cpx_inv_appl1: ∀h,G,L,V1,U1,U2. ⦃G,L⦄ ⊢ ⓐ V1.U1 ⬈[h] U2 →
+                     ∨∨ ∃∃V2,T2. ⦃G,L⦄ ⊢ V1 ⬈[h] V2 & ⦃G,L⦄ ⊢ U1 ⬈[h] T2 &
                                  U2 = ⓐV2.T2
-                      | ∃∃p,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 & ⦃G, L⦄ ⊢ W1 ⬈[h] W2 &
-                                            ⦃G, L.ⓛW1⦄ ⊢ T1 ⬈[h] T2 &
+                      | ∃∃p,V2,W1,W2,T1,T2. ⦃G,L⦄ ⊢ V1 ⬈[h] V2 & ⦃G,L⦄ ⊢ W1 ⬈[h] W2 &
+                                            ⦃G,L.ⓛW1⦄ ⊢ T1 ⬈[h] T2 &
                                             U1 = ⓛ{p}W1.T1 & U2 = ⓓ{p}ⓝW2.V2.T2
-                      | ∃∃p,V,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ⬈[h] V & ⬆*[1] V ≘ V2 &
-                                              ⦃G, L⦄ ⊢ W1 ⬈[h] W2 & ⦃G, L.ⓓW1⦄ ⊢ T1 ⬈[h] T2 &
+                      | ∃∃p,V,V2,W1,W2,T1,T2. ⦃G,L⦄ ⊢ V1 ⬈[h] V & ⬆*[1] V ≘ V2 &
+                                              ⦃G,L⦄ ⊢ W1 ⬈[h] W2 & ⦃G,L.ⓓW1⦄ ⊢ T1 ⬈[h] T2 &
                                               U1 = ⓓ{p}W1.T1 & U2 = ⓓ{p}W2.ⓐV2.T2.
 #h #G #L #V1 #U1 #U2 * #c #H elim (cpg_inv_appl1 … H) -H *
 /4 width=13 by or3_intro0, or3_intro1, or3_intro2, ex6_7_intro, ex5_6_intro, ex3_2_intro, ex_intro/
 qed-.
 
-lemma cpx_inv_cast1: ∀h,G,L,V1,U1,U2. ⦃G, L⦄ ⊢ ⓝV1.U1 ⬈[h] U2 →
-                     ∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 & ⦃G, L⦄ ⊢ U1 ⬈[h] T2 &
+lemma cpx_inv_cast1: ∀h,G,L,V1,U1,U2. ⦃G,L⦄ ⊢ ⓝV1.U1 ⬈[h] U2 →
+                     ∨∨ ∃∃V2,T2. ⦃G,L⦄ ⊢ V1 ⬈[h] V2 & ⦃G,L⦄ ⊢ U1 ⬈[h] T2 &
                                  U2 = ⓝV2.T2
-                      | ⦃G, L⦄ ⊢ U1 ⬈[h] U2
-                      | ⦃G, L⦄ ⊢ V1 ⬈[h] U2.
+                      | ⦃G,L⦄ ⊢ U1 ⬈[h] U2
+                      | ⦃G,L⦄ ⊢ V1 ⬈[h] U2.
 #h #G #L #V1 #U1 #U2 * #c #H elim (cpg_inv_cast1 … H) -H *
 /4 width=5 by or3_intro0, or3_intro1, or3_intro2, ex3_2_intro, ex_intro/
 qed-.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma cpx_inv_zero1_pair: ∀h,I,G,K,V1,T2. ⦃G, K.ⓑ{I}V1⦄ ⊢ #0 ⬈[h] T2 →
+lemma cpx_inv_zero1_pair: ∀h,I,G,K,V1,T2. ⦃G,K.ⓑ{I}V1⦄ ⊢ #0 ⬈[h] T2 →
                           ∨∨ T2 = #0
-                           | ∃∃V2. ⦃G, K⦄ ⊢ V1 ⬈[h] V2 & ⬆*[1] V2 ≘ T2.
+                           | ∃∃V2. ⦃G,K⦄ ⊢ V1 ⬈[h] V2 & ⬆*[1] V2 ≘ T2.
 #h #I #G #L #V1 #T2 * #c #H elim (cpg_inv_zero1_pair … H) -H *
 /4 width=3 by ex2_intro, ex_intro, or_intror, or_introl/
 qed-.
 
-lemma cpx_inv_lref1_bind: ∀h,I,G,K,T2,i. ⦃G, K.ⓘ{I}⦄ ⊢ #↑i ⬈[h] T2 →
+lemma cpx_inv_lref1_bind: ∀h,I,G,K,T2,i. ⦃G,K.ⓘ{I}⦄ ⊢ #↑i ⬈[h] T2 →
                           ∨∨ T2 = #(↑i)
-                           | ∃∃T. ⦃G, K⦄ ⊢ #i ⬈[h] T & ⬆*[1] T ≘ T2.
+                           | ∃∃T. ⦃G,K⦄ ⊢ #i ⬈[h] T & ⬆*[1] T ≘ T2.
 #h #I #G #L #T2 #i * #c #H elim (cpg_inv_lref1_bind … H) -H *
 /4 width=3 by ex2_intro, ex_intro, or_introl, or_intror/
 qed-.
 
-lemma cpx_inv_flat1: ∀h,I,G,L,V1,U1,U2. ⦃G, L⦄ ⊢ ⓕ{I}V1.U1 ⬈[h] U2 →
-                     ∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 & ⦃G, L⦄ ⊢ U1 ⬈[h] T2 &
+lemma cpx_inv_flat1: ∀h,I,G,L,V1,U1,U2. ⦃G,L⦄ ⊢ ⓕ{I}V1.U1 ⬈[h] U2 →
+                     ∨∨ ∃∃V2,T2. ⦃G,L⦄ ⊢ V1 ⬈[h] V2 & ⦃G,L⦄ ⊢ U1 ⬈[h] T2 &
                                  U2 = ⓕ{I}V2.T2
-                      | (⦃G, L⦄ ⊢ U1 ⬈[h] U2 ∧ I = Cast)
-                      | (⦃G, L⦄ ⊢ V1 ⬈[h] U2 ∧ I = Cast)
-                      | ∃∃p,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 & ⦃G, L⦄ ⊢ W1 ⬈[h] W2 &
-                                            ⦃G, L.ⓛW1⦄ ⊢ T1 ⬈[h] T2 &
+                      | (⦃G,L⦄ ⊢ U1 ⬈[h] U2 ∧ I = Cast)
+                      | (⦃G,L⦄ ⊢ V1 ⬈[h] U2 ∧ I = Cast)
+                      | ∃∃p,V2,W1,W2,T1,T2. ⦃G,L⦄ ⊢ V1 ⬈[h] V2 & ⦃G,L⦄ ⊢ W1 ⬈[h] W2 &
+                                            ⦃G,L.ⓛW1⦄ ⊢ T1 ⬈[h] T2 &
                                             U1 = ⓛ{p}W1.T1 &
                                             U2 = ⓓ{p}ⓝW2.V2.T2 & I = Appl
-                      | ∃∃p,V,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ⬈[h] V & ⬆*[1] V ≘ V2 &
-                                              ⦃G, L⦄ ⊢ W1 ⬈[h] W2 & ⦃G, L.ⓓW1⦄ ⊢ T1 ⬈[h] T2 &
+                      | ∃∃p,V,V2,W1,W2,T1,T2. ⦃G,L⦄ ⊢ V1 ⬈[h] V & ⬆*[1] V ≘ V2 &
+                                              ⦃G,L⦄ ⊢ W1 ⬈[h] W2 & ⦃G,L.ⓓW1⦄ ⊢ T1 ⬈[h] T2 &
                                               U1 = ⓓ{p}W1.T1 &
                                               U2 = ⓓ{p}W2.ⓐV2.T2 & I = Appl.
 #h * #G #L #V1 #U1 #U2 #H
@@ -229,8 +229,8 @@ qed-.
 
 (* Basic forward lemmas *****************************************************)
 
-lemma cpx_fwd_bind1_minus: ∀h,I,G,L,V1,T1,T. ⦃G, L⦄ ⊢ -ⓑ{I}V1.T1 ⬈[h] T → ∀p.
-                           ∃∃V2,T2. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈[h] ⓑ{p,I}V2.T2 &
+lemma cpx_fwd_bind1_minus: ∀h,I,G,L,V1,T1,T. ⦃G,L⦄ ⊢ -ⓑ{I}V1.T1 ⬈[h] T → ∀p.
+                           ∃∃V2,T2. ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈[h] ⓑ{p,I}V2.T2 &
                                     T = -ⓑ{I}V2.T2.
 #h #I #G #L #V1 #T1 #T * #c #H #p elim (cpg_fwd_bind1_minus … H p) -H
 /3 width=4 by ex2_2_intro, ex_intro/
@@ -240,29 +240,29 @@ qed-.
 
 lemma cpx_ind: ∀h. ∀Q:relation4 genv lenv term term.
                (∀I,G,L. Q G L (⓪{I}) (⓪{I})) →
-               (∀G,L,s. Q G L (⋆s) (⋆(next h s))) →
-               (∀I,G,K,V1,V2,W2. ⦃G, K⦄ ⊢ V1 ⬈[h] V2 → Q G K V1 V2 →
+               (∀G,L,s. Q G L (⋆s) (⋆(⫯[h]s))) →
+               (∀I,G,K,V1,V2,W2. ⦃G,K⦄ ⊢ V1 ⬈[h] V2 → Q G K V1 V2 →
                  ⬆*[1] V2 ≘ W2 → Q G (K.ⓑ{I}V1) (#0) W2
-               ) → (∀I,G,K,T,U,i. ⦃G, K⦄ ⊢ #i ⬈[h] T → Q G K (#i) T →
+               ) → (∀I,G,K,T,U,i. ⦃G,K⦄ ⊢ #i ⬈[h] T → Q G K (#i) T →
                  ⬆*[1] T ≘ U → Q G (K.ⓘ{I}) (#↑i) (U)
-               ) → (∀p,I,G,L,V1,V2,T1,T2. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 → ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ⬈[h] T2 →
+               ) → (∀p,I,G,L,V1,V2,T1,T2. ⦃G,L⦄ ⊢ V1 ⬈[h] V2 → ⦃G,L.ⓑ{I}V1⦄ ⊢ T1 ⬈[h] T2 →
                   Q G L V1 V2 → Q G (L.ⓑ{I}V1) T1 T2 → Q G L (ⓑ{p,I}V1.T1) (ⓑ{p,I}V2.T2)
-               ) → (∀I,G,L,V1,V2,T1,T2. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 → ⦃G, L⦄ ⊢ T1 ⬈[h] T2 →
+               ) → (∀I,G,L,V1,V2,T1,T2. ⦃G,L⦄ ⊢ V1 ⬈[h] V2 → ⦃G,L⦄ ⊢ T1 ⬈[h] T2 →
                   Q G L V1 V2 → Q G L T1 T2 → Q G L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2)
-               ) → (∀G,L,V,T1,T,T2. ⬆*[1] T ≘ T1 → ⦃G, L⦄ ⊢ T ⬈[h] T2 → Q G L T T2 →
+               ) → (∀G,L,V,T1,T,T2. ⬆*[1] T ≘ T1 → ⦃G,L⦄ ⊢ T ⬈[h] T2 → Q G L T T2 →
                   Q G L (+ⓓV.T1) T2
-               ) → (∀G,L,V,T1,T2. ⦃G, L⦄ ⊢ T1 ⬈[h] T2 → Q G L T1 T2 →
+               ) → (∀G,L,V,T1,T2. ⦃G,L⦄ ⊢ T1 ⬈[h] T2 → Q G L T1 T2 →
                   Q G L (ⓝV.T1) T2
-               ) → (∀G,L,V1,V2,T. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 → Q G L V1 V2 →
+               ) → (∀G,L,V1,V2,T. ⦃G,L⦄ ⊢ V1 ⬈[h] V2 → Q G L V1 V2 →
                   Q G L (ⓝV1.T) V2
-               ) → (∀p,G,L,V1,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 → ⦃G, L⦄ ⊢ W1 ⬈[h] W2 → ⦃G, L.ⓛW1⦄ ⊢ T1 ⬈[h] T2 →
+               ) → (∀p,G,L,V1,V2,W1,W2,T1,T2. ⦃G,L⦄ ⊢ V1 ⬈[h] V2 → ⦃G,L⦄ ⊢ W1 ⬈[h] W2 → ⦃G,L.ⓛW1⦄ ⊢ T1 ⬈[h] T2 →
                   Q G L V1 V2 → Q G L W1 W2 → Q G (L.ⓛW1) T1 T2 →
                   Q G L (ⓐV1.ⓛ{p}W1.T1) (ⓓ{p}ⓝW2.V2.T2)
-               ) → (∀p,G,L,V1,V,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ⬈[h] V → ⦃G, L⦄ ⊢ W1 ⬈[h] W2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ⬈[h] T2 →
+               ) → (∀p,G,L,V1,V,V2,W1,W2,T1,T2. ⦃G,L⦄ ⊢ V1 ⬈[h] V → ⦃G,L⦄ ⊢ W1 ⬈[h] W2 → ⦃G,L.ⓓW1⦄ ⊢ T1 ⬈[h] T2 →
                   Q G L V1 V → Q G L W1 W2 → Q G (L.ⓓW1) T1 T2 →
                   ⬆*[1] V ≘ V2 → Q G L (ⓐV1.ⓓ{p}W1.T1) (ⓓ{p}W2.ⓐV2.T2)
                ) →
-               ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ⬈[h] T2 → Q G L T1 T2.
+               ∀G,L,T1,T2. ⦃G,L⦄ ⊢ T1 ⬈[h] T2 → Q G L T1 T2.
 #h #Q #IH1 #IH2 #IH3 #IH4 #IH5 #IH6 #IH7 #IH8 #IH9 #IH10 #IH11 #G #L #T1 #T2
 * #c #H elim H -c -G -L -T1 -T2 /3 width=4 by ex_intro/
 qed-.
index 4fcea047067889c063d199d53446713c4278076f..500929b1d35f82a6531189142ee6125c011a6698 100644 (file)
@@ -21,8 +21,8 @@ include "basic_2/rt_transition/cpx.ma".
 
 (* Basic_2A1: was: cpx_delta *)
 lemma cpx_delta_drops: ∀h,I,G,L,K,V,V2,W2,i.
-                       ⬇*[i] L ≘ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ⬈[h] V2 →
-                       ⬆*[↑i] V2 ≘ W2 → ⦃G, L⦄ ⊢ #i ⬈[h] W2.
+                       ⬇*[i] L ≘ K.ⓑ{I}V → ⦃G,K⦄ ⊢ V ⬈[h] V2 →
+                       ⬆*[↑i] V2 ≘ W2 → ⦃G,L⦄ ⊢ #i ⬈[h] W2.
 #h * #G #L #K #V #V2 #W2 #i #HLK *
 /3 width=7 by cpg_ell_drops, cpg_delta_drops, ex_intro/
 qed.
@@ -30,19 +30,19 @@ qed.
 (* Advanced inversion lemmas ************************************************)
 
 (* Basic_2A1: was: cpx_inv_atom1 *)
-lemma cpx_inv_atom1_drops: ∀h,I,G,L,T2. ⦃G, L⦄ ⊢ ⓪{I} ⬈[h] T2 →
+lemma cpx_inv_atom1_drops: ∀h,I,G,L,T2. ⦃G,L⦄ ⊢ ⓪{I} ⬈[h] T2 →
                            ∨∨ T2 = ⓪{I}
-                            | ∃∃s. T2 = ⋆(next h s) & I = Sort s
-                            | ∃∃J,K,V,V2,i. ⬇*[i] L ≘ K.ⓑ{J}V & ⦃G, K⦄ ⊢ V ⬈[h] V2 &
+                            | ∃∃s. T2 = ⋆(⫯[h]s) & I = Sort s
+                            | ∃∃J,K,V,V2,i. ⬇*[i] L ≘ K.ⓑ{J}V & ⦃G,K⦄ ⊢ V ⬈[h] V2 &
                                             ⬆*[↑i] V2 ≘ T2 & I = LRef i.
 #h #I #G #L #T2 * #c #H elim (cpg_inv_atom1_drops … H) -H *
 /4 width=9 by or3_intro0, or3_intro1, or3_intro2, ex4_5_intro, ex2_intro, ex_intro/
 qed-.
 
 (* Basic_2A1: was: cpx_inv_lref1 *)
-lemma cpx_inv_lref1_drops: ∀h,G,L,T2,i. ⦃G, L⦄ ⊢ #i ⬈[h] T2 →
+lemma cpx_inv_lref1_drops: ∀h,G,L,T2,i. ⦃G,L⦄ ⊢ #i ⬈[h] T2 →
                            T2 = #i ∨
-                           ∃∃J,K,V,V2. ⬇*[i] L ≘ K. ⓑ{J}V & ⦃G, K⦄ ⊢ V ⬈[h] V2 &
+                           ∃∃J,K,V,V2. ⬇*[i] L ≘ K. ⓑ{J}V & ⦃G,K⦄ ⊢ V ⬈[h] V2 &
                                        ⬆*[↑i] V2 ≘ T2.
 #h #G #L #T1 #i * #c #H elim (cpg_inv_lref1_drops … H) -H *
 /4 width=7 by ex3_4_intro, ex_intro, or_introl, or_intror/
diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_drops_basic.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_drops_basic.ma
new file mode 100644 (file)
index 0000000..12d23e2
--- /dev/null
@@ -0,0 +1,48 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/relocation/lifts_basic.ma".
+include "basic_2/rt_transition/cpx_drops.ma".
+
+(* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS ***************)
+
+(* Properties with basic relocation *****************************************)
+
+lemma cpx_subst (h) (G) (L) (U1) (i):
+                ∀I,K,V. ⬇*[i] L ≘ K.ⓑ{I}V →
+                ∃∃U2,T2. ⦃G,L⦄ ⊢ U1 ⬈[h] U2 & ⬆[i,1] T2 ≘ U2.
+#h #G #L #U1 @(fqup_wf_ind_eq (Ⓣ) … G L U1) -G -L -U1
+#G0 #L0 #U0 #IH #G #L * *
+[ #s #HG #HL #HT #i #I #K #V #_ destruct -IH
+  /2 width=4 by lifts_sort, ex2_2_intro/
+| #j #HG #HL #HT #i #I #K #V #HLK destruct -IH
+  elim (lt_or_eq_or_gt i j) #Hij
+  [ /3 width=4 by lifts_lref_ge_minus, cpx_refl, ex2_2_intro/
+  | elim (lifts_total V (𝐔❴↑i❵)) #U2 #HU2
+    elim (lifts_split_trans … HU2 (𝐔❴i❵) (𝐁❴i,1❵)) [2: @(after_basic_rc i 0) ]
+    /3 width=7 by cpx_delta_drops, ex2_2_intro/
+  | /3 width=4 by lifts_lref_lt, cpx_refl, ex2_2_intro/
+  ]
+| #l #HG #HL #HT #i #I #K #V #_ destruct -IH
+  /2 width=4 by lifts_gref, ex2_2_intro/
+| #p #J #W1 #U1 #HG #HL #HT #i #I #K #V #HLK destruct
+  elim (IH G L W1 … HLK) [| // ] #W2 #V2 #HW12 #HVW2
+  elim (IH G (L.ⓑ{J}W1) U1 … (↑i)) [|*: /3 width=4 by drops_drop/ ] #U2 #T2 #HU12 #HTU2
+  /3 width=9 by cpx_bind, lifts_bind, ex2_2_intro/
+| #J #W1 #U1 #HG #HL #HT #i #I #K #V #HLK destruct
+  elim (IH G L W1 … HLK) [| // ] #W2 #V2 #HW12 #HVW2
+  elim (IH G L U1 … HLK) [| // ] #U2 #T2 #HU12 #HTU2
+  /3 width=8 by cpx_flat, lifts_flat, ex2_2_intro/
+]
+qed-.
index 5124d8684d1fd04bb60b3be4072b6671a351c60c..f8224c2471b2965c6a9296ae99a3ddcfd640ec16 100644 (file)
@@ -18,12 +18,12 @@ include "basic_2/rt_transition/rpx_rdeq.ma".
 
 (* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS ***************)
 
-(* Properties with degree-based equivalence for closures ********************)
+(* Properties with sort-irrelevant equivalence for closures *****************)
 
-lemma fdeq_cpx_trans: ∀h,o,G1,G2,L1,L2,T1,T. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T⦄ →
-                      ∀T2. ⦃G2, L2⦄ ⊢ T ⬈[h] T2 →
-                      ∃∃T0. ⦃G1, L1⦄ ⊢ T1 ⬈[h] T0 & ⦃G1, L1, T0⦄ ≛[h, o] ⦃G2, L2, T2⦄.
-#h #o #G1 #G2 #L1 #L2 #T1 #T #H #T2 #HT2
+lemma fdeq_cpx_trans: ∀h,G1,G2,L1,L2,T1,T. ⦃G1,L1,T1⦄ ≛ ⦃G2,L2,T⦄ →
+                      ∀T2. ⦃G2,L2⦄ ⊢ T ⬈[h] T2 →
+                      ∃∃T0. ⦃G1,L1⦄ ⊢ T1 ⬈[h] T0 & ⦃G1,L1,T0⦄ ≛ ⦃G2,L2,T2⦄.
+#h #G1 #G2 #L1 #L2 #T1 #T #H #T2 #HT2
 elim (fdeq_inv_gen_dx … H) -H #H #HL12 #HT1 destruct
 elim (rdeq_cpx_trans … HL12 … HT2) #T0 #HT0 #HT02
 lapply (cpx_rdeq_conf_dx … HT2 … HL12) -HL12 #HL12
index c500be141fa322b2d6d0a1b12e6c1eb89a2d6af0..7cddd25cd47b817021f6d1ed5a548fe5e134ddde 100644 (file)
@@ -21,9 +21,9 @@ include "basic_2/rt_transition/cpx_lsubr.ma".
 
 (* Properties on supclosure *************************************************)
 
-lemma fqu_cpx_trans: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
-                     ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 →
-                     ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & ⦃G1, L1, U1⦄ ⊐[b] ⦃G2, L2, U2⦄.
+lemma fqu_cpx_trans: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ →
+                     ∀U2. ⦃G2,L2⦄ ⊢ T2 ⬈[h] U2 →
+                     ∃∃U1. ⦃G1,L1⦄ ⊢ T1 ⬈[h] U1 & ⦃G1,L1,U1⦄ ⬂[b] ⦃G2,L2,U2⦄.
 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
 /3 width=3 by cpx_pair_sn, cpx_bind, cpx_flat, fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, ex2_intro/
 [ #I #G #L2 #V2 #X2 #HVX2
@@ -36,18 +36,18 @@ lemma fqu_cpx_trans: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2
 ]
 qed-.
 
-lemma fquq_cpx_trans: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ →
-                      ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 →
-                      ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & ⦃G1, L1, U1⦄ ⊐⸮[b] ⦃G2, L2, U2⦄.
+lemma fquq_cpx_trans: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂⸮[b] ⦃G2,L2,T2⦄ →
+                      ∀U2. ⦃G2,L2⦄ ⊢ T2 ⬈[h] U2 →
+                      ∃∃U1. ⦃G1,L1⦄ ⊢ T1 ⬈[h] U1 & ⦃G1,L1,U1⦄ ⬂⸮[b] ⦃G2,L2,U2⦄.
 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -H
 [ #HT12 #U2 #HTU2 elim (fqu_cpx_trans … HT12 … HTU2) /3 width=3 by fqu_fquq, ex2_intro/
 | * #H1 #H2 #H3 destruct /2 width=3 by ex2_intro/
 ]
 qed-.
 
-lemma fqup_cpx_trans: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ →
-                      ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 →
-                      ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & ⦃G1, L1, U1⦄ ⊐+[b] ⦃G2, L2, U2⦄.
+lemma fqup_cpx_trans: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂+[b] ⦃G2,L2,T2⦄ →
+                      ∀U2. ⦃G2,L2⦄ ⊢ T2 ⬈[h] U2 →
+                      ∃∃U1. ⦃G1,L1⦄ ⊢ T1 ⬈[h] U1 & ⦃G1,L1,U1⦄ ⬂+[b] ⦃G2,L2,U2⦄.
 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2
 [ #G2 #L2 #T2 #H12 #U2 #HTU2 elim (fqu_cpx_trans … H12 … HTU2) -T2
   /3 width=3 by fqu_fqup, ex2_intro/
@@ -57,19 +57,19 @@ lemma fqup_cpx_trans: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2,
 ]
 qed-.
 
-lemma fqus_cpx_trans: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
-                      ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 →
-                      ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & ⦃G1, L1, U1⦄ ⊐*[b] ⦃G2, L2, U2⦄.
+lemma fqus_cpx_trans: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂*[b] ⦃G2,L2,T2⦄ →
+                      ∀U2. ⦃G2,L2⦄ ⊢ T2 ⬈[h] U2 →
+                      ∃∃U1. ⦃G1,L1⦄ ⊢ T1 ⬈[h] U1 & ⦃G1,L1,U1⦄ ⬂*[b] ⦃G2,L2,U2⦄.
 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim (fqus_inv_fqup … H) -H
 [ #HT12 #U2 #HTU2 elim (fqup_cpx_trans … HT12 … HTU2) /3 width=3 by fqup_fqus, ex2_intro/
 | * #H1 #H2 #H3 destruct /2 width=3 by ex2_intro/
 ]
 qed-.
 
-lemma fqu_cpx_trans_tdneq: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
-                           ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 → (T2 ≛[h, o] U2 → ⊥) →
-                           ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & T1 ≛[h, o] U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐[b] ⦃G2, L2, U2⦄.
-#h #o #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
+lemma fqu_cpx_trans_tdneq: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ →
+                           ∀U2. ⦃G2,L2⦄ ⊢ T2 ⬈[h] U2 → (T2 ≛ U2 → ⊥) →
+                           ∃∃U1. ⦃G1,L1⦄ ⊢ T1 ⬈[h] U1 & T1 ≛ U1 → ⊥ & ⦃G1,L1,U1⦄ ⬂[b] ⦃G2,L2,U2⦄.
+#h #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/
@@ -80,7 +80,7 @@ lemma fqu_cpx_trans_tdneq: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] 
   [1,3: /2 width=4 by fqu_pair_sn, cpx_pair_sn/
   | #H elim (tdeq_inv_pair … H) -H /2 width=1 by/
   ]
-| #p #I #G #L #V #T1 #T2 #HT12 #H0 @(ex3_intro … (ⓑ{p,I}V.T2))
+| #p #I #G #L #V #T1 #Hb #T2 #HT12 #H0 @(ex3_intro … (ⓑ{p,I}V.T2))
   [1,3: /2 width=4 by fqu_bind_dx, cpx_bind/
   | #H elim (tdeq_inv_pair … H) -H /2 width=1 by/
   ]
@@ -98,20 +98,20 @@ lemma fqu_cpx_trans_tdneq: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] 
 ]
 qed-.
 
-lemma fquq_cpx_trans_tdneq: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ →
-                            ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 → (T2 ≛[h, o] U2 → ⊥) →
-                            ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & T1 ≛[h, o] U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐⸮[b] ⦃G2, L2, U2⦄.
-#h #o #b #G1 #G2 #L1 #L2 #T1 #T2 #H12 elim H12 -H12 
+lemma fquq_cpx_trans_tdneq: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂⸮[b] ⦃G2,L2,T2⦄ →
+                            ∀U2. ⦃G2,L2⦄ ⊢ T2 ⬈[h] U2 → (T2 ≛ U2 → ⊥) →
+                            ∃∃U1. ⦃G1,L1⦄ ⊢ T1 ⬈[h] U1 & T1 ≛ U1 → ⊥ & ⦃G1,L1,U1⦄ ⬂⸮[b] ⦃G2,L2,U2⦄.
+#h #b #G1 #G2 #L1 #L2 #T1 #T2 #H12 elim H12 -H12 
 [ #H12 #U2 #HTU2 #H elim (fqu_cpx_trans_tdneq … H12 … HTU2 H) -T2
   /3 width=4 by fqu_fquq, ex3_intro/
 | * #HG #HL #HT destruct /3 width=4 by ex3_intro/
 ]
 qed-.
 
-lemma fqup_cpx_trans_tdneq: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ →
-                            ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 → (T2 ≛[h, o] U2 → ⊥) →
-                            ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & T1 ≛[h, o] U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐+[b] ⦃G2, L2, U2⦄.
-#h #o #b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1
+lemma fqup_cpx_trans_tdneq: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂+[b] ⦃G2,L2,T2⦄ →
+                            ∀U2. ⦃G2,L2⦄ ⊢ T2 ⬈[h] U2 → (T2 ≛ U2 → ⊥) →
+                            ∃∃U1. ⦃G1,L1⦄ ⊢ T1 ⬈[h] U1 & T1 ≛ U1 → ⊥ & ⦃G1,L1,U1⦄ ⬂+[b] ⦃G2,L2,U2⦄.
+#h #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_tdneq … H12 … HTU2 H) -T2
   /3 width=4 by fqu_fqup, ex3_intro/
 | #G #G1 #L #L1 #T #T1 #H1 #_ #IH12 #U2 #HTU2 #H elim (IH12 … HTU2 H) -T2
@@ -120,10 +120,10 @@ lemma fqup_cpx_trans_tdneq: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+[b]
 ]
 qed-.
 
-lemma fqus_cpx_trans_tdneq: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
-                            ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 → (T2 ≛[h, o] U2 → ⊥) →
-                            ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & T1 ≛[h, o] U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐*[b] ⦃G2, L2, U2⦄.
-#h #o #b #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fqus_inv_fqup … H12) -H12
+lemma fqus_cpx_trans_tdneq: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂*[b] ⦃G2,L2,T2⦄ →
+                            ∀U2. ⦃G2,L2⦄ ⊢ T2 ⬈[h] U2 → (T2 ≛ U2 → ⊥) →
+                            ∃∃U1. ⦃G1,L1⦄ ⊢ T1 ⬈[h] U1 & T1 ≛ U1 → ⊥ & ⦃G1,L1,U1⦄ ⬂*[b] ⦃G2,L2,U2⦄.
+#h #b #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fqus_inv_fqup … H12) -H12
 [ #H12 elim (fqup_cpx_trans_tdneq … H12 … HTU2 H) -T2
   /3 width=4 by fqup_fqus, ex3_intro/
 | * #HG #HL #HT destruct /3 width=4 by ex3_intro/
index b116946807d2aa4abdbc203b88a06b45d9021e5e..7eb730a800f84e7b984b147dcf5776e1c0fde266 100644 (file)
@@ -23,8 +23,8 @@ lemma lsubr_cpx_trans (h) (G): lsub_trans … (cpx h G) lsubr.
 #h #G #L1 #T1 #T2 * /3 width=4 by lsubr_cpg_trans, ex_intro/
 qed-.
 
-lemma cpx_bind_unit (h) (G): ∀L,V1,V2. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 →
-                             ∀J,T1,T2. ⦃G, L.ⓤ{J}⦄ ⊢ T1 ⬈[h] T2 →
-                             ∀p,I. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈[h] ⓑ{p,I}V2.T2.
+lemma cpx_bind_unit (h) (G): ∀L,V1,V2. ⦃G,L⦄ ⊢ V1 ⬈[h] V2 →
+                             ∀J,T1,T2. ⦃G,L.ⓤ{J}⦄ ⊢ T1 ⬈[h] T2 →
+                             ∀p,I. ⦃G,L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈[h] ⓑ{p,I}V2.T2.
 /4 width=4 by lsubr_cpx_trans, cpx_bind, lsubr_unit/ qed.
 
index 33f937a227f4a7dbf6b6d551cd17b63a971ef9bc..8e84ffab9bccd90ac55786b57e45738bbe07e1eb 100644 (file)
@@ -17,13 +17,13 @@ include "basic_2/rt_transition/rpx_fsle.ma".
 
 (* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS ***************)
 
-(* Properties with degree-based equivalence for local environments **********)
+(* Properties with sort-irrelevant equivalence for local environments *******)
 
 (* Basic_2A1: was just: cpx_lleq_conf_sn *)
-lemma cpx_rdeq_conf_sn: ∀h,o,G. s_r_confluent1 … (cpx h G) (rdeq h o).
+lemma cpx_rdeq_conf_sn: ∀h,G. s_r_confluent1 … (cpx h G) rdeq.
 /3 width=6 by cpx_rex_conf/ qed-.
 
 (* Basic_2A1: was just: cpx_lleq_conf_dx *)
-lemma cpx_rdeq_conf_dx: ∀h,o,G,L2,T1,T2. ⦃G, L2⦄ ⊢ T1 ⬈[h] T2 →
-                        ∀L1. L1 ≛[h, o, T1] L2 → L1 ≛[h, o, T2] L2.
-/4 width=4 by cpx_rdeq_conf_sn, rdeq_sym/ qed-.
+lemma cpx_rdeq_conf_dx: ∀h,G,L2,T1,T2. ⦃G,L2⦄ ⊢ T1 ⬈[h] T2 →
+                        ∀L1. L1 ≛[T1] L2 → L1 ≛[T2] L2.
+/4 width=5 by cpx_rdeq_conf_sn, rdeq_sym/ qed-.
index b0d2b9922cbacc2ec13dd63e7916f95797708256..5f0c34f6c84e2a8f51efe0bb22c9deb930ecea99 100644 (file)
@@ -50,8 +50,8 @@ lemma req_cpx_trans: ∀h,G. req_transitive (cpx h G).
 qed-.
 (*
 (* Basic_2A1: was: cpx_lleq_conf *)
-lemma cpx_req_conf: ∀h,G,L2,T1,T2. ⦃G, L2⦄ ⊢ T1 ⬈[h] T2 →
-                    ∀L1. L2 ≘[T1] L1 → ⦃G, L1⦄ ⊢ T1 ⬈[h] T2.
+lemma cpx_req_conf: ∀h,G,L2,T1,T2. ⦃G,L2⦄ ⊢ T1 ⬈[h] T2 →
+                    ∀L1. L2 ≘[T1] L1 → ⦃G,L1⦄ ⊢ T1 ⬈[h] T2.
 /3 width=3 by req_cpx_trans, req_sym/ qed-.
 *)
 (* Basic_2A1: was: cpx_lleq_conf_sn *)
@@ -59,7 +59,7 @@ lemma cpx_req_conf_sn: ∀h,G. s_r_confluent1 … (cpx h G) req.
 /2 width=5 by cpx_rex_conf/ qed-.
 (*
 (* Basic_2A1: was: cpx_lleq_conf_dx *)
-lemma cpx_req_conf_dx: ∀h,G,L2,T1,T2. ⦃G, L2⦄ ⊢ T1 ⬈[h] T2 →
+lemma cpx_req_conf_dx: ∀h,G,L2,T1,T2. ⦃G,L2⦄ ⊢ T1 ⬈[h] T2 →
                        ∀L1. L1 ≘[T1] L2 → L1 ≘[T2] L2.
 /4 width=6 by cpx_req_conf_sn, req_sym/ qed-.
 *)
index a18e14b6c87bada576320461271953cea883545d..1ce5b538d7aa0a0a906caba74c59855f6d138b93 100644 (file)
@@ -19,8 +19,8 @@ include "basic_2/rt_transition/cpx.ma".
 
 (* Inversion lemmas with simple terms ***************************************)
 
-lemma cpx_inv_appl1_simple: ∀h,G,L,V1,T1,U. ⦃G, L⦄ ⊢ ⓐV1.T1 ⬈[h] U → 𝐒⦃T1⦄ →
-                            ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 & ⦃G, L⦄ ⊢ T1 ⬈[h] T2 &
+lemma cpx_inv_appl1_simple: ∀h,G,L,V1,T1,U. ⦃G,L⦄ ⊢ ⓐV1.T1 ⬈[h] U → 𝐒⦃T1⦄ →
+                            ∃∃V2,T2. ⦃G,L⦄ ⊢ V1 ⬈[h] V2 & ⦃G,L⦄ ⊢ T1 ⬈[h] T2 &
                                      U = ⓐV2.T2.
 #h #G #L #V1 #T1 #U * #c #H #HT1 elim (cpg_inv_appl1_simple … H) -H
 /3 width=5 by ex3_2_intro, ex_intro/
index 51c4141120850b6e50fad61dee448b386d504efb..8c07020568502c8e748d6c942bd837df29e6cbf5 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/notation/relations/predsubtyproper_8.ma".
+include "basic_2/notation/relations/predsubtyproper_7.ma".
 include "static_2/s_transition/fqu.ma".
 include "static_2/static/rdeq.ma".
 include "basic_2/rt_transition/lpr_lpx.ma".
 
 (* PROPER PARALLEL RST-TRANSITION FOR CLOSURES ******************************)
 
-inductive fpb (h) (o) (G1) (L1) (T1): relation3 genv lenv term ≝
-| fpb_fqu: ∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → fpb h o G1 L1 T1 G2 L2 T2
-| fpb_cpx: ∀T2. ⦃G1, L1⦄ ⊢ T1 ⬈[h] T2 → (T1 ≛[h, o] T2 → ⊥) → fpb h o G1 L1 T1 G1 L1 T2
-| fpb_lpx: ∀L2. ⦃G1, L1⦄ ⊢ ⬈[h] L2 → (L1 ≛[h, o, T1] L2 → ⊥) → fpb h o G1 L1 T1 G1 L2 T1
+inductive fpb (h) (G1) (L1) (T1): relation3 genv lenv term ≝
+| fpb_fqu: ∀G2,L2,T2. ⦃G1,L1,T1⦄ ⬂ ⦃G2,L2,T2⦄ → fpb h G1 L1 T1 G2 L2 T2
+| fpb_cpx: ∀T2. ⦃G1,L1⦄ ⊢ T1 ⬈[h] T2 → (T1 ≛ T2 → ⊥) → fpb h G1 L1 T1 G1 L1 T2
+| fpb_lpx: ∀L2. ⦃G1,L1⦄ ⊢ ⬈[h] L2 → (L1 ≛[T1] L2 → ⊥) → fpb h G1 L1 T1 G1 L2 T1
 .
 
 interpretation
    "proper parallel rst-transition (closure)"
-   'PRedSubTyProper h o G1 L1 T1 G2 L2 T2 = (fpb h o G1 L1 T1 G2 L2 T2).
+   'PRedSubTyProper h G1 L1 T1 G2 L2 T2 = (fpb h G1 L1 T1 G2 L2 T2).
 
 (* Basic properties *********************************************************)
 
 (* Basic_2A1: includes: cpr_fpb *)
-lemma cpm_fpb (n) (h) (o) (G) (L): ∀T1,T2. ⦃G, L⦄ ⊢ T1 ➡[n, h] T2 → (T1 ≛[h, o] T2 → ⊥) →
-                                   ⦃G, L, T1⦄ ≻[h, o] ⦃G, L, T2⦄.
+lemma cpm_fpb (n) (h) (G) (L): ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡[n,h] T2 → (T1 ≛ T2 → ⊥) →
+                                   ⦃G,L,T1⦄ ≻[h] ⦃G,L,T2⦄.
 /3 width=2 by fpb_cpx, cpm_fwd_cpx/ qed.
 
-lemma lpr_fpb (h) (o) (G) (T): ∀L1,L2. ⦃G, L1⦄ ⊢ ➡[h] L2 → (L1 ≛[h, o, T] L2 → ⊥) →
-                           ⦃G, L1, T⦄ ≻[h, o] ⦃G, L2, T⦄.
+lemma lpr_fpb (h) (G) (T): ∀L1,L2. ⦃G,L1⦄ ⊢ ➡[h] L2 → (L1 ≛[T] L2 → ⊥) →
+                           ⦃G,L1,T⦄ ≻[h] ⦃G,L2,T⦄.
 /3 width=1 by fpb_lpx, lpr_fwd_lpx/ qed.
index a0d0419803cb9a2cf6a61055e7805b63a5b3e2ff..a08244671f39314be833ccefa859a5e5a5912c22 100644 (file)
@@ -21,10 +21,10 @@ include "basic_2/rt_transition/fpb_rdeq.ma".
 (* Properties with degree-based equivalence for closures ********************)
 
 (* Basic_2A1: uses: fleq_fpb_trans *)
-lemma fdeq_fpb_trans: ∀h,o,F1,F2,K1,K2,T1,T2. ⦃F1, K1, T1⦄ ≛[h, o] ⦃F2, K2, T2⦄ →
-                      ∀G2,L2,U2. ⦃F2, K2, T2⦄ ≻[h, o] ⦃G2, L2, U2⦄ →
-                      ∃∃G1,L1,U1. ⦃F1, K1, T1⦄ ≻[h, o] ⦃G1, L1, U1⦄ & ⦃G1, L1, U1⦄ ≛[h, o] ⦃G2, L2, U2⦄.
-#h #o #F1 #F2 #K1 #K2 #T1 #T2 * -F2 -K2 -T2
+lemma fdeq_fpb_trans: ∀h,F1,F2,K1,K2,T1,T2. ⦃F1,K1,T1⦄ ≛ ⦃F2,K2,T2⦄ →
+                      ∀G2,L2,U2. ⦃F2,K2,T2⦄ ≻[h] ⦃G2,L2,U2⦄ →
+                      ∃∃G1,L1,U1. ⦃F1,K1,T1⦄ ≻[h] ⦃G1,L1,U1⦄ & ⦃G1,L1,U1⦄ ≛ ⦃G2,L2,U2⦄.
+#h #F1 #F2 #K1 #K2 #T1 #T2 * -F2 -K2 -T2
 #K2 #T2 #HK12 #HT12 #G2 #L2 #U2 #H12
 elim (tdeq_fpb_trans … HT12 … H12) -T2 #K0 #T0 #H #HT0 #HK0
 elim (rdeq_fpb_trans … HK12 … H) -K2 #L0 #U0 #H #HUT0 #HLK0
@@ -35,9 +35,9 @@ qed-.
 (* Inversion lemmas with degree-based equivalence for closures **************)
 
 (* Basic_2A1: uses: fpb_inv_fleq *)
-lemma fpb_inv_fdeq: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, o] ⦃G2, L2, T2⦄ →
-                    ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ → ⊥.
-#h #o #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
+lemma fpb_inv_fdeq: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ≻[h] ⦃G2,L2,T2⦄ →
+                    ⦃G1,L1,T1⦄ ≛ ⦃G2,L2,T2⦄ → ⊥.
+#h #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
 [ #G2 #L2 #T2 #H12 #H elim (fdeq_inv_gen_sn … H) -H
   /3 width=11 by rdeq_fwd_length, fqu_inv_tdeq/
 | #T2 #_ #HnT #H elim (fdeq_inv_gen_sn … H) -H /2 width=1 by/
index eab2408fe4291c8d46cb0482f3fd34d046c0b629..b09005fafa180c8acfb0d8e357d45518122a1450 100644 (file)
@@ -19,12 +19,12 @@ include "basic_2/rt_transition/fpb.ma".
 
 (* PROPER PARALLEL RST-TRANSITION FOR CLOSURES ******************************)
 
-(* Properties with degree-based equivalence for local environments **********)
+(* Properties with sort-irrelevant equivalence for local environments *******)
 
-lemma tdeq_fpb_trans: ∀h,o,U2,U1. U2 ≛[h, o] U1 →
-                      ∀G1,G2,L1,L2,T1. ⦃G1, L1, U1⦄ ≻[h, o] ⦃G2, L2, T1⦄ → 
-                      ∃∃L,T2. ⦃G1, L1, U2⦄ ≻[h, o] ⦃G2, L, T2⦄ & T2 ≛[h, o] T1 & L ≛[h, o, T1] L2.
-#h #o #U2 #U1 #HU21 #G1 #G2 #L1 #L2 #T1 * -G2 -L2 -T1
+lemma tdeq_fpb_trans: ∀h,U2,U1. U2 ≛ U1 →
+                      ∀G1,G2,L1,L2,T1. ⦃G1,L1,U1⦄ ≻[h] ⦃G2,L2,T1⦄ → 
+                      ∃∃L,T2. ⦃G1,L1,U2⦄ ≻[h] ⦃G2,L,T2⦄ & T2 ≛ T1 & L ≛[T1] L2.
+#h #U2 #U1 #HU21 #G1 #G2 #L1 #L2 #T1 * -G2 -L2 -T1
 [ #G2 #L2 #T1 #H
   elim (tdeq_fqu_trans … H … HU21) -H
   /3 width=5 by fpb_fqu, ex3_2_intro/
@@ -36,14 +36,14 @@ lemma tdeq_fpb_trans: ∀h,o,U2,U1. U2 ≛[h, o] U1 →
 qed-.
 
 (* Basic_2A1: was just: lleq_fpb_trans *)
-lemma rdeq_fpb_trans: ∀h,o,F,K1,K2,T. K1 ≛[h, o, T] K2 →
-                      ∀G,L2,U. ⦃F, K2, T⦄ ≻[h, o] ⦃G, L2, U⦄ →
-                      ∃∃L1,U0. ⦃F, K1, T⦄ ≻[h, o] ⦃G, L1, U0⦄ & U0 ≛[h, o] U & L1 ≛[h, o, U] L2.
-#h #o #F #K1 #K2 #T #HT #G #L2 #U * -G -L2 -U
+lemma rdeq_fpb_trans: ∀h,F,K1,K2,T. K1 ≛[T] K2 →
+                      ∀G,L2,U. ⦃F,K2,T⦄ ≻[h] ⦃G,L2,U⦄ →
+                      ∃∃L1,U0. ⦃F,K1,T⦄ ≻[h] ⦃G,L1,U0⦄ & U0 ≛ U & L1 ≛[U] L2.
+#h #F #K1 #K2 #T #HT #G #L2 #U * -G -L2 -U
 [ #G #L2 #U #H2 elim (rdeq_fqu_trans … H2 … HT) -K2
   /3 width=5 by fpb_fqu, ex3_2_intro/
 | #U #HTU #HnTU elim (rdeq_cpx_trans … HT … HTU) -HTU
-  /5 width=10 by fpb_cpx, cpx_rdeq_conf_sn, tdeq_trans, tdeq_rdeq_conf, ex3_2_intro/
+  /5 width=11 by fpb_cpx, cpx_rdeq_conf_sn, tdeq_trans, tdeq_rdeq_conf, ex3_2_intro/ (**) (* time: 36s on dev *)
 | #L2 #HKL2 #HnKL2 elim (rdeq_lpx_trans … HKL2 … HT) -HKL2
   /6 width=5 by fpb_lpx, (* 2x *) rdeq_canc_sn, ex3_2_intro/
 ]
index a652d5c185118fa52022eda7994f85f054e7976c..690e8ff3238c68381c1ae9269c18e9040f22623c 100644 (file)
@@ -12,7 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/notation/relations/predsubty_8.ma".
+include "basic_2/notation/relations/predsubty_7.ma".
 include "static_2/static/fdeq.ma".
 include "static_2/s_transition/fquq.ma".
 include "basic_2/rt_transition/lpr_lpx.ma".
@@ -20,27 +20,27 @@ include "basic_2/rt_transition/lpr_lpx.ma".
 (* PARALLEL RST-TRANSITION FOR CLOSURES *************************************)
 
 (* Basic_2A1: includes: fleq_fpbq fpbq_lleq *)
-inductive fpbq (h) (o) (G1) (L1) (T1): relation3 genv lenv term ≝
-| fpbq_fquq: ∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → fpbq h o G1 L1 T1 G2 L2 T2
-| fpbq_cpx : ∀T2. ⦃G1, L1⦄ ⊢ T1 ⬈[h] T2 → fpbq h o G1 L1 T1 G1 L1 T2
-| fpbq_lpx : ∀L2. ⦃G1, L1⦄ ⊢ ⬈[h] L2 → fpbq h o G1 L1 T1 G1 L2 T1
-| fpbq_fdeq: ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ → fpbq h o G1 L1 T1 G2 L2 T2
+inductive fpbq (h) (G1) (L1) (T1): relation3 genv lenv term ≝
+| fpbq_fquq: ∀G2,L2,T2. ⦃G1,L1,T1⦄ ⬂⸮ ⦃G2,L2,T2⦄ → fpbq h G1 L1 T1 G2 L2 T2
+| fpbq_cpx : ∀T2. ⦃G1,L1⦄ ⊢ T1 ⬈[h] T2 → fpbq h G1 L1 T1 G1 L1 T2
+| fpbq_lpx : ∀L2. ⦃G1,L1⦄ ⊢ ⬈[h] L2 → fpbq h G1 L1 T1 G1 L2 T1
+| fpbq_fdeq: ∀G2,L2,T2. ⦃G1,L1,T1⦄ ≛ ⦃G2,L2,T2⦄ → fpbq h G1 L1 T1 G2 L2 T2
 .
 
 interpretation
    "parallel rst-transition (closure)"
-   'PRedSubTy h o G1 L1 T1 G2 L2 T2 = (fpbq h o G1 L1 T1 G2 L2 T2).
+   'PRedSubTy h G1 L1 T1 G2 L2 T2 = (fpbq h G1 L1 T1 G2 L2 T2).
 
 (* Basic properties *********************************************************)
 
-lemma fpbq_refl (h) (o): tri_reflexive … (fpbq h o).
+lemma fpbq_refl (h): tri_reflexive … (fpbq h).
 /2 width=1 by fpbq_cpx/ qed.
 
 (* Basic_2A1: includes: cpr_fpbq *)
-lemma cpm_fpbq (n) (h) (o) (G) (L): ∀T1,T2. ⦃G, L⦄ ⊢ T1 ➡[n, h] T2 → ⦃G, L, T1⦄ ≽[h, o] ⦃G, L, T2⦄. 
+lemma cpm_fpbq (n) (h) (G) (L): ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡[n,h] T2 → ⦃G,L,T1⦄ ≽[h] ⦃G,L,T2⦄. 
 /3 width=2 by fpbq_cpx, cpm_fwd_cpx/ qed.
 
-lemma lpr_fpbq (h) (o) (G) (T): ∀L1,L2. ⦃G, L1⦄ ⊢ ➡[h] L2 → ⦃G, L1, T⦄ ≽[h, o] ⦃G, L2, T⦄.
+lemma lpr_fpbq (h) (G) (T): ∀L1,L2. ⦃G,L1⦄ ⊢ ➡[h] L2 → ⦃G,L1,T⦄ ≽[h] ⦃G,L2,T⦄.
 /3 width=1 by fpbq_lpx, lpr_fwd_lpx/ qed.
 
 (* Basic_2A1: removed theorems 2:
index 7f539a77c5762930d8f1057db4ac4987ed82932f..a29292aaeb7914b007f170f79cbc999ed0736cd2 100644 (file)
@@ -21,8 +21,8 @@ include "basic_2/rt_transition/fpbq.ma".
 
 (* Properties with atomic arity assignment for terms ************************)
 
-lemma fpbq_aaa_conf: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≽[h, o] ⦃G2, L2, T2⦄ →
-                     ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2.
-#h #o #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
+lemma fpbq_aaa_conf: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ≽[h] ⦃G2,L2,T2⦄ →
+                     ∀A1. ⦃G1,L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2,L2⦄ ⊢ T2 ⁝ A2.
+#h #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
 /3 width=8 by lpx_aaa_conf, cpx_aaa_conf, aaa_fdeq_conf, aaa_fquq_conf, ex_intro/
 qed-.
index 1fa7b7209b12254bdd1a0b9b6c91f426e9a023e1..21143003b145dcf83da393acf52f7cc0678d9f86 100644 (file)
@@ -19,37 +19,37 @@ include "basic_2/rt_transition/fpbq.ma".
 
 (* Properties with proper parallel rst-transition for closures **************)
 
-lemma fpb_fpbq: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, o] ⦃G2, L2, T2⦄ →
-                ⦃G1, L1, T1⦄ ≽[h, o] ⦃G2, L2, T2⦄.
-#h #o #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
+lemma fpb_fpbq: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ≻[h] ⦃G2,L2,T2⦄ →
+                ⦃G1,L1,T1⦄ ≽[h] ⦃G2,L2,T2⦄.
+#h #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
 /3 width=1 by fpbq_fquq, fpbq_cpx, fpbq_lpx, fqu_fquq/
 qed.
 
 (* Basic_2A1: fpb_fpbq_alt *)
-lemma fpb_fpbq_ffdneq: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, o] ⦃G2, L2, T2⦄ →
-                       ∧∧ ⦃G1, L1, T1⦄ ≽[h, o] ⦃G2, L2, T2⦄ & (⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ → ⊥).
+lemma fpb_fpbq_ffdneq: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ≻[h] ⦃G2,L2,T2⦄ →
+                       ∧∧ ⦃G1,L1,T1⦄ ≽[h] ⦃G2,L2,T2⦄ & (⦃G1,L1,T1⦄ ≛ ⦃G2,L2,T2⦄ → ⊥).
 /3 width=10 by fpb_fpbq, fpb_inv_fdeq, conj/ qed-.
 
 (* Inversrion lemmas with proper parallel rst-transition for closures *******)
 
 (* Basic_2A1: uses: fpbq_ind_alt *)
-lemma fpbq_inv_fpb: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≽[h, o] ⦃G2, L2, T2⦄ →
-                    ∨∨ ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄
-                     | ⦃G1, L1, T1⦄ ≻[h, o] ⦃G2, L2, T2⦄.
-#h #o #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
+lemma fpbq_inv_fpb: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ≽[h] ⦃G2,L2,T2⦄ →
+                    ∨∨ ⦃G1,L1,T1⦄ ≛ ⦃G2,L2,T2⦄
+                     | ⦃G1,L1,T1⦄ ≻[h] ⦃G2,L2,T2⦄.
+#h #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
 [ #G2 #L2 #T2 * [2: * #H1 #H2 #H3 destruct ]
   /3 width=1 by fpb_fqu, fdeq_intro_sn, or_intror, or_introl/
-| #T2 #H elim (tdeq_dec h o T1 T2)
+| #T2 #H elim (tdeq_dec T1 T2)
   /4 width=1 by fpb_cpx, fdeq_intro_sn, or_intror, or_introl/
-| #L2 elim (rdeq_dec h o L1 L2 T1)
+| #L2 elim (rdeq_dec L1 L2 T1)
   /4 width=1 by fpb_lpx, fdeq_intro_sn, or_intror, or_introl/
 | /2 width=1 by or_introl/
 ]
 qed-.
 
 (* Basic_2A1: fpbq_inv_fpb_alt *)
-lemma fpbq_ffdneq_inv_fpb: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≽[h, o] ⦃G2, L2, T2⦄ →
-                           (⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ → ⊥) → ⦃G1, L1, T1⦄ ≻[h, o] ⦃G2, L2, T2⦄.
-#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H #H0
+lemma fpbq_ffdneq_inv_fpb: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ≽[h] ⦃G2,L2,T2⦄ →
+                           (⦃G1,L1,T1⦄ ≛ ⦃G2,L2,T2⦄ → ⊥) → ⦃G1,L1,T1⦄ ≻[h] ⦃G2,L2,T2⦄.
+#h #G1 #G2 #L1 #L2 #T1 #T2 #H #H0
 elim (fpbq_inv_fpb … H) -H // #H elim H0 -H0 //
 qed-.
index f69cb5e673d3ffdbf7f325f179ff30f0dd963c49..f47d6640e7641206ded87e8082f3599e238d2329 100644 (file)
@@ -27,8 +27,8 @@ interpretation
 
 (* Basic properties *********************************************************)
 
-lemma lpr_bind (h) (G): ∀K1,K2. ⦃G, K1⦄ ⊢ ➡[h] K2 →
-                        ∀I1,I2. ⦃G, K1⦄ ⊢ I1 ➡[h] I2 → ⦃G, K1.ⓘ{I1}⦄ ⊢ ➡[h] K2.ⓘ{I2}.
+lemma lpr_bind (h) (G): ∀K1,K2. ⦃G,K1⦄ ⊢ ➡[h] K2 →
+                        ∀I1,I2. ⦃G,K1⦄ ⊢ I1 ➡[h] I2 → ⦃G,K1.ⓘ{I1}⦄ ⊢ ➡[h] K2.ⓘ{I2}.
 /2 width=1 by lex_bind/ qed.
 
 (* Note: lemma 250 *)
@@ -37,60 +37,60 @@ lemma lpr_refl (h) (G): reflexive … (lpr h G).
 
 (* Advanced properties ******************************************************)
 
-lemma lpr_bind_refl_dx (h) (G): ∀K1,K2. ⦃G, K1⦄ ⊢ ➡[h] K2 →
-                                ∀I. ⦃G, K1.ⓘ{I}⦄ ⊢ ➡[h] K2.ⓘ{I}.
+lemma lpr_bind_refl_dx (h) (G): ∀K1,K2. ⦃G,K1⦄ ⊢ ➡[h] K2 →
+                                ∀I. ⦃G,K1.ⓘ{I}⦄ ⊢ ➡[h] K2.ⓘ{I}.
 /2 width=1 by lex_bind_refl_dx/ qed.
 
-lemma lpr_pair (h) (G): ∀K1,K2,V1,V2. ⦃G, K1⦄ ⊢ ➡[h] K2 → ⦃G, K1⦄ ⊢ V1 ➡[h] V2 →
-                        ∀I. ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡[h] K2.ⓑ{I}V2.
+lemma lpr_pair (h) (G): ∀K1,K2,V1,V2. ⦃G,K1⦄ ⊢ ➡[h] K2 → ⦃G,K1⦄ ⊢ V1 ➡[h] V2 →
+                        ∀I. ⦃G,K1.ⓑ{I}V1⦄ ⊢ ➡[h] K2.ⓑ{I}V2.
 /2 width=1 by lex_pair/ qed.
 
 (* Basic inversion lemmas ***************************************************)
 
 (* Basic_2A1: was: lpr_inv_atom1 *)
 (* Basic_1: includes: wcpr0_gen_sort *)
-lemma lpr_inv_atom_sn (h) (G): ∀L2. ⦃G, ⋆⦄ ⊢ ➡[h] L2 → L2 = ⋆.
+lemma lpr_inv_atom_sn (h) (G): ∀L2. ⦃G,⋆⦄ ⊢ ➡[h] L2 → L2 = ⋆.
 /2 width=2 by lex_inv_atom_sn/ qed-.
 
-lemma lpr_inv_bind_sn (h) (G): ∀I1,L2,K1. ⦃G, K1.ⓘ{I1}⦄ ⊢ ➡[h] L2 →
-                               ∃∃I2,K2. ⦃G, K1⦄ ⊢ ➡[h] K2 & ⦃G, K1⦄ ⊢ I1 ➡[h] I2 &
+lemma lpr_inv_bind_sn (h) (G): ∀I1,L2,K1. ⦃G,K1.ⓘ{I1}⦄ ⊢ ➡[h] L2 →
+                               ∃∃I2,K2. ⦃G,K1⦄ ⊢ ➡[h] K2 & ⦃G,K1⦄ ⊢ I1 ➡[h] I2 &
                                         L2 = K2.ⓘ{I2}.
 /2 width=1 by lex_inv_bind_sn/ qed-.
 
 (* Basic_2A1: was: lpr_inv_atom2 *)
-lemma lpr_inv_atom_dx (h) (G): ∀L1. ⦃G, L1⦄ ⊢ ➡[h] ⋆ → L1 = ⋆.
+lemma lpr_inv_atom_dx (h) (G): ∀L1. ⦃G,L1⦄ ⊢ ➡[h] ⋆ → L1 = ⋆.
 /2 width=2 by lex_inv_atom_dx/ qed-.
 
-lemma lpr_inv_bind_dx (h) (G): ∀I2,L1,K2. ⦃G, L1⦄ ⊢ ➡[h] K2.ⓘ{I2} →
-                               ∃∃I1,K1. ⦃G, K1⦄ ⊢ ➡[h] K2 & ⦃G, K1⦄ ⊢ I1 ➡[h] I2 &
+lemma lpr_inv_bind_dx (h) (G): ∀I2,L1,K2. ⦃G,L1⦄ ⊢ ➡[h] K2.ⓘ{I2} →
+                               ∃∃I1,K1. ⦃G,K1⦄ ⊢ ➡[h] K2 & ⦃G,K1⦄ ⊢ I1 ➡[h] I2 &
                                         L1 = K1.ⓘ{I1}.
 /2 width=1 by lex_inv_bind_dx/ qed-.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma lpr_inv_unit_sn (h) (G): ∀I,L2,K1. ⦃G, K1.ⓤ{I}⦄ ⊢ ➡[h] L2 →
-                               ∃∃K2. ⦃G, K1⦄ ⊢ ➡[h] K2 & L2 = K2.ⓤ{I}.
+lemma lpr_inv_unit_sn (h) (G): ∀I,L2,K1. ⦃G,K1.ⓤ{I}⦄ ⊢ ➡[h] L2 →
+                               ∃∃K2. ⦃G,K1⦄ ⊢ ➡[h] K2 & L2 = K2.ⓤ{I}.
 /2 width=1 by lex_inv_unit_sn/ qed-.
 
 (* Basic_2A1: was: lpr_inv_pair1 *)
 (* Basic_1: includes: wcpr0_gen_head *)
-lemma lpr_inv_pair_sn (h) (G): ∀I,L2,K1,V1. ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡[h] L2 →
-                               ∃∃K2,V2. ⦃G, K1⦄ ⊢ ➡[h] K2 & ⦃G, K1⦄ ⊢ V1 ➡[h] V2 &
+lemma lpr_inv_pair_sn (h) (G): ∀I,L2,K1,V1. ⦃G,K1.ⓑ{I}V1⦄ ⊢ ➡[h] L2 →
+                               ∃∃K2,V2. ⦃G,K1⦄ ⊢ ➡[h] K2 & ⦃G,K1⦄ ⊢ V1 ➡[h] V2 &
                                         L2 = K2.ⓑ{I}V2.
 /2 width=1 by lex_inv_pair_sn/ qed-.
 
-lemma lpr_inv_unit_dx (h) (G): ∀I,L1,K2. ⦃G, L1⦄ ⊢ ➡[h] K2.ⓤ{I} →
-                               ∃∃K1. ⦃G, K1⦄ ⊢ ➡[h] K2 & L1 = K1.ⓤ{I}.
+lemma lpr_inv_unit_dx (h) (G): ∀I,L1,K2. ⦃G,L1⦄ ⊢ ➡[h] K2.ⓤ{I} →
+                               ∃∃K1. ⦃G,K1⦄ ⊢ ➡[h] K2 & L1 = K1.ⓤ{I}.
 /2 width=1 by lex_inv_unit_dx/ qed-.
 
 (* Basic_2A1: was: lpr_inv_pair2 *)
-lemma lpr_inv_pair_dx (h) (G): ∀I,L1,K2,V2. ⦃G, L1⦄ ⊢ ➡[h] K2.ⓑ{I}V2 →
-                               ∃∃K1,V1. ⦃G, K1⦄ ⊢ ➡[h] K2 & ⦃G, K1⦄ ⊢ V1 ➡[h] V2 &
+lemma lpr_inv_pair_dx (h) (G): ∀I,L1,K2,V2. ⦃G,L1⦄ ⊢ ➡[h] K2.ⓑ{I}V2 →
+                               ∃∃K1,V1. ⦃G,K1⦄ ⊢ ➡[h] K2 & ⦃G,K1⦄ ⊢ V1 ➡[h] V2 &
                                         L1 = K1.ⓑ{I}V1.
 /2 width=1 by lex_inv_pair_dx/ qed-.
 
-lemma lpr_inv_pair (h) (G): ∀I1,I2,L1,L2,V1,V2. ⦃G, L1.ⓑ{I1}V1⦄ ⊢ ➡[h] L2.ⓑ{I2}V2 →
-                            ∧∧ ⦃G, L1⦄ ⊢ ➡[h] L2 & ⦃G, L1⦄ ⊢ V1 ➡[h] V2 & I1 = I2.
+lemma lpr_inv_pair (h) (G): ∀I1,I2,L1,L2,V1,V2. ⦃G,L1.ⓑ{I1}V1⦄ ⊢ ➡[h] L2.ⓑ{I2}V2 →
+                            ∧∧ ⦃G,L1⦄ ⊢ ➡[h] L2 & ⦃G,L1⦄ ⊢ V1 ➡[h] V2 & I1 = I2.
 /2 width=1 by lex_inv_pair/ qed-.
 
 (* Basic_1: removed theorems 3: wcpr0_getl wcpr0_getl_back
index e1256efc58a5db1ad1487e72d92e05f41958437e..c31e2d0ab08ba08ad5a0f8cee0cb0f6d072f0306 100644 (file)
@@ -22,9 +22,9 @@ include "basic_2/rt_transition/lpr.ma".
 
 (* Properties with extended structural successor for closures ***************)
 
-lemma fqu_cpr_trans_sn (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
-                                ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡[h] U2 →
-                                ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡[h] L & ⦃G1, L1⦄ ⊢ T1 ➡[h] U1 & ⦃G1, L, U1⦄ ⊐[b] ⦃G2, L2, U2⦄.
+lemma fqu_cpr_trans_sn (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ →
+                                ∀U2. ⦃G2,L2⦄ ⊢ T2 ➡[h] U2 →
+                                ∃∃L,U1. ⦃G1,L1⦄ ⊢ ➡[h] L & ⦃G1,L1⦄ ⊢ T1 ➡[h] U1 & ⦃G1,L,U1⦄ ⬂[b] ⦃G2,L2,U2⦄.
 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
 [ /3 width=5 by lpr_pair, fqu_lref_O, ex3_2_intro/
 | /3 width=5 by cpr_pair_sn, fqu_pair_sn, ex3_2_intro/
@@ -37,9 +37,9 @@ lemma fqu_cpr_trans_sn (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] 
 ]
 qed-.
 
-lemma fqu_cpr_trans_dx (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
-                                ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡[h] U2 →
-                                ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡[h] L & ⦃G1, L⦄ ⊢ T1 ➡[h] U1 & ⦃G1, L, U1⦄ ⊐[b] ⦃G2, L2, U2⦄.
+lemma fqu_cpr_trans_dx (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ →
+                                ∀U2. ⦃G2,L2⦄ ⊢ T2 ➡[h] U2 →
+                                ∃∃L,U1. ⦃G1,L1⦄ ⊢ ➡[h] L & ⦃G1,L⦄ ⊢ T1 ➡[h] U1 & ⦃G1,L,U1⦄ ⬂[b] ⦃G2,L2,U2⦄.
 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
 [ /3 width=5 by lpr_pair, fqu_lref_O, ex3_2_intro/
 | /3 width=5 by cpr_pair_sn, fqu_pair_sn, ex3_2_intro/
@@ -52,13 +52,13 @@ lemma fqu_cpr_trans_dx (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] 
 ]
 qed-.
 
-lemma fqu_lpr_trans (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
-                             ∀K2. ⦃G2, L2⦄ ⊢ ➡[h] K2 →
-                             ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡[h] K1 & ⦃G1, L1⦄ ⊢ T1 ➡[h] T & ⦃G1, K1, T⦄ ⊐[b] ⦃G2, K2, T2⦄.
+lemma fqu_lpr_trans (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ →
+                             ∀K2. ⦃G2,L2⦄ ⊢ ➡[h] K2 →
+                             ∃∃K1,T. ⦃G1,L1⦄ ⊢ ➡[h] K1 & ⦃G1,L1⦄ ⊢ T1 ➡[h] T & ⦃G1,K1,T⦄ ⬂[b] ⦃G2,K2,T2⦄.
 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
 [ /3 width=5 by lpr_bind_refl_dx, fqu_lref_O, ex3_2_intro/
 | /3 width=5 by cpr_pair_sn, fqu_pair_sn, ex3_2_intro/
-| #p #I #G2 #L2 #V2 #T2 #X #H
+| #p #I #G2 #L2 #V2 #T2 #Hb #X #H
   elim (lpr_inv_pair_sn … H) -H #K2 #W2 #HLK2 #HVW2 #H destruct
   /3 width=5 by cpr_pair_sn, fqu_bind_dx, ex3_2_intro/
 | #p #I #G2 #L2 #V2 #T2 #Hb #X #H
@@ -71,9 +71,9 @@ qed-.
 
 (* Note: does not hold in Basic_2A1 because it requires cpm *)
 (* Note: L1 = K0.ⓛV0 and T1 = #0 require n = 1 *)
-lemma lpr_fqu_trans (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
-                             ∀K1. ⦃G1, K1⦄ ⊢ ➡[h] L1 →
-                             ∃∃n,K2,T. ⦃G1, K1⦄ ⊢ T1 ➡[n, h] T & ⦃G1, K1, T⦄ ⊐[b] ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h] L2 & n ≤ 1.
+lemma lpr_fqu_trans (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ →
+                             ∀K1. ⦃G1,K1⦄ ⊢ ➡[h] L1 →
+                             ∃∃n,K2,T. ⦃G1,K1⦄ ⊢ T1 ➡[n,h] T & ⦃G1,K1,T⦄ ⬂[b] ⦃G2,K2,T2⦄ & ⦃G2,K2⦄ ⊢ ➡[h] L2 & n ≤ 1.
 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
 [ * #G #K #V #K1 #H
   elim (lpr_inv_pair_dx … H) -H #K0 #V0 #HK0 #HV0 #H destruct
@@ -91,36 +91,36 @@ qed-.
 
 (* Properties with extended optional structural successor for closures ******)
 
-lemma fquq_cpr_trans_sn (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ →
-                                 ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡[h] U2 →
-                                 ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡[h] L & ⦃G1, L1⦄ ⊢ T1 ➡[h] U1 & ⦃G1, L, U1⦄ ⊐⸮[b] ⦃G2, L2, U2⦄.
+lemma fquq_cpr_trans_sn (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂⸮[b] ⦃G2,L2,T2⦄ →
+                                 ∀U2. ⦃G2,L2⦄ ⊢ T2 ➡[h] U2 →
+                                 ∃∃L,U1. ⦃G1,L1⦄ ⊢ ➡[h] L & ⦃G1,L1⦄ ⊢ T1 ➡[h] U1 & ⦃G1,L,U1⦄ ⬂⸮[b] ⦃G2,L2,U2⦄.
 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 cases H -H
 [ #HT12 elim (fqu_cpr_trans_sn … HT12 … HTU2) /3 width=5 by fqu_fquq, ex3_2_intro/
 | * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/
 ]
 qed-.
 
-lemma fquq_cpr_trans_dx (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ →
-                                 ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡[h] U2 →
-                                 ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡[h] L & ⦃G1, L⦄ ⊢ T1 ➡[h] U1 & ⦃G1, L, U1⦄ ⊐⸮[b] ⦃G2, L2, U2⦄.
+lemma fquq_cpr_trans_dx (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂⸮[b] ⦃G2,L2,T2⦄ →
+                                 ∀U2. ⦃G2,L2⦄ ⊢ T2 ➡[h] U2 →
+                                 ∃∃L,U1. ⦃G1,L1⦄ ⊢ ➡[h] L & ⦃G1,L⦄ ⊢ T1 ➡[h] U1 & ⦃G1,L,U1⦄ ⬂⸮[b] ⦃G2,L2,U2⦄.
 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 cases H -H
 [ #HT12 elim (fqu_cpr_trans_dx … HT12 … HTU2) /3 width=5 by fqu_fquq, ex3_2_intro/
 | * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/
 ]
 qed-.
 
-lemma fquq_lpr_trans (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ →
-                              ∀K2. ⦃G2, L2⦄ ⊢ ➡[h] K2 →
-                              ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡[h] K1 & ⦃G1, L1⦄ ⊢ T1 ➡[h] T & ⦃G1, K1, T⦄ ⊐⸮[b] ⦃G2, K2, T2⦄.
+lemma fquq_lpr_trans (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂⸮[b] ⦃G2,L2,T2⦄ →
+                              ∀K2. ⦃G2,L2⦄ ⊢ ➡[h] K2 →
+                              ∃∃K1,T. ⦃G1,L1⦄ ⊢ ➡[h] K1 & ⦃G1,L1⦄ ⊢ T1 ➡[h] T & ⦃G1,K1,T⦄ ⬂⸮[b] ⦃G2,K2,T2⦄.
 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H #K2 #HLK2 cases H -H
 [ #H12 elim (fqu_lpr_trans … H12 … HLK2) /3 width=5 by fqu_fquq, ex3_2_intro/
 | * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/
 ]
 qed-.
 
-lemma lpr_fquq_trans (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ →
-                              ∀K1. ⦃G1, K1⦄ ⊢ ➡[h] L1 →
-                              ∃∃n,K2,T. ⦃G1, K1⦄ ⊢ T1 ➡[n, h] T & ⦃G1, K1, T⦄ ⊐⸮[b] ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h] L2 & n ≤ 1.
+lemma lpr_fquq_trans (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂⸮[b] ⦃G2,L2,T2⦄ →
+                              ∀K1. ⦃G1,K1⦄ ⊢ ➡[h] L1 →
+                              ∃∃n,K2,T. ⦃G1,K1⦄ ⊢ T1 ➡[n,h] T & ⦃G1,K1,T⦄ ⬂⸮[b] ⦃G2,K2,T2⦄ & ⦃G2,K2⦄ ⊢ ➡[h] L2 & n ≤ 1.
 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #HKL1 cases H -H
 [ #H12 elim (lpr_fqu_trans … H12 … HKL1) -L1 /3 width=7 by fqu_fquq, ex4_3_intro/
 | * #H1 #H2 #H3 destruct /2 width=7 by ex4_3_intro/
index 51f2da5f2af4cb1e6971e796e7e2d3da8445a0ce..db3c8e334f23630990ffc7a1beaaac1f1b9ad284 100644 (file)
@@ -17,5 +17,5 @@ include "basic_2/rt_transition/lpr.ma".
 
 (* PARALLEL R-TRANSITION FOR FULL LOCAL ENVIRONMENTS ************************)
 
-lemma lpr_fwd_length (h) (G): ∀L1,L2. ⦃G, L1⦄ ⊢ ➡[h] L2 → |L1| = |L2|.
+lemma lpr_fwd_length (h) (G): ∀L1,L2. ⦃G,L1⦄ ⊢ ➡[h] L2 → |L1| = |L2|.
 /2 width=2 by lex_fwd_length/ qed-.
index 7dedda628f309762d132fd35b56fc6449476fb91..54d5d3bc86d565fd4fb6bd20beac0efcf0826636 100644 (file)
@@ -21,24 +21,24 @@ include "basic_2/rt_transition/lpr_drops.ma".
 (* PARALLEL R-TRANSITION FOR FULL LOCAL ENVIRONMENTS ************************)
 
 definition IH_cpr_conf_lpr (h): relation3 genv lenv term ≝ λG,L,T.
-                           ∀T1. ⦃G, L⦄ ⊢ T ➡[h] T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡[h] T2 →
-                           ∀L1. ⦃G, L⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G, L⦄ ⊢ ➡[h] L2 →
-                           ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡[h] T0 & ⦃G, L2⦄ ⊢ T2 ➡[h] T0.
+                           ∀T1. ⦃G,L⦄ ⊢ T ➡[h] T1 → ∀T2. ⦃G,L⦄ ⊢ T ➡[h] T2 →
+                           ∀L1. ⦃G,L⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L⦄ ⊢ ➡[h] L2 →
+                           ∃∃T0. ⦃G,L1⦄ ⊢ T1 ➡[h] T0 & ⦃G,L2⦄ ⊢ T2 ➡[h] T0.
 
 (* Main properties with context-sensitive parallel reduction for terms ******)
 
 fact cpr_conf_lpr_atom_atom (h):
-   ∀I,G,L1,L2. ∃∃T. ⦃G, L1⦄ ⊢ ⓪{I} ➡[h] T & ⦃G, L2⦄ ⊢ ⓪{I} ➡[h] T.
+   ∀I,G,L1,L2. ∃∃T. ⦃G,L1⦄ ⊢ ⓪{I} ➡[h] T & ⦃G,L2⦄ ⊢ ⓪{I} ➡[h] T.
 /2 width=3 by cpr_refl, ex2_intro/ qed-.
 
 fact cpr_conf_lpr_atom_delta (h):
    ∀G0,L0,i. (
-      ∀G,L,T. ⦃G0, L0, #i⦄ ⊐+ ⦃G, L, T⦄ → IH_cpr_conf_lpr h G L T
+      ∀G,L,T. ⦃G0,L0,#i⦄ ⬂+ ⦃G,L,T⦄ → IH_cpr_conf_lpr h G L T
    ) →
    ∀K0,V0. ⬇*[i] L0 ≘ K0.ⓓV0 →
-   ∀V2. ⦃G0, K0⦄ ⊢ V0 ➡[h] V2 → ∀T2. ⬆*[↑i] V2 ≘ T2 →
-   ∀L1. ⦃G0, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0, L0⦄ ⊢ ➡[h] L2 →
-   ∃∃T. ⦃G0, L1⦄ ⊢ #i ➡[h] T & ⦃G0, L2⦄ ⊢ T2 ➡[h] T.
+   ∀V2. ⦃G0,K0⦄ ⊢ V0 ➡[h] V2 → ∀T2. ⬆*[↑i] V2 ≘ T2 →
+   ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
+   ∃∃T. ⦃G0,L1⦄ ⊢ #i ➡[h] T & ⦃G0,L2⦄ ⊢ T2 ➡[h] T.
 #h #G0 #L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
 elim (lpr_drops_conf … HLK0 … HL01) -HL01 // #X1 #H1 #HLK1
 elim (lpr_inv_pair_sn … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct
@@ -54,14 +54,14 @@ qed-.
 (* Basic_1: includes: pr0_delta_delta pr2_delta_delta *)
 fact cpr_conf_lpr_delta_delta (h):
    ∀G0,L0,i. (
-      ∀G,L,T. ⦃G0, L0, #i⦄ ⊐+ ⦃G, L, T⦄ → IH_cpr_conf_lpr h G L T
+      ∀G,L,T. ⦃G0,L0,#i⦄ ⬂+ ⦃G,L,T⦄ → IH_cpr_conf_lpr h G L T
    ) →
    ∀K0,V0. ⬇*[i] L0 ≘ K0.ⓓV0 →
-   ∀V1. ⦃G0, K0⦄ ⊢ V0 ➡[h] V1 → ∀T1. ⬆*[↑i] V1 ≘ T1 →
+   ∀V1. ⦃G0,K0⦄ ⊢ V0 ➡[h] V1 → ∀T1. ⬆*[↑i] V1 ≘ T1 →
    ∀KX,VX. ⬇*[i] L0 ≘ KX.ⓓVX →
-   ∀V2. ⦃G0, KX⦄ ⊢ VX ➡[h] V2 → ∀T2. ⬆*[↑i] V2 ≘ T2 →
-   ∀L1. ⦃G0, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0, L0⦄ ⊢ ➡[h] L2 →
-   ∃∃T. ⦃G0, L1⦄ ⊢ T1 ➡[h] T & ⦃G0, L2⦄ ⊢ T2 ➡[h] T.
+   ∀V2. ⦃G0,KX⦄ ⊢ VX ➡[h] V2 → ∀T2. ⬆*[↑i] V2 ≘ T2 →
+   ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
+   ∃∃T. ⦃G0,L1⦄ ⊢ T1 ➡[h] T & ⦃G0,L2⦄ ⊢ T2 ➡[h] T.
 #h #G0 #L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1
 #KX #VX #H #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
 lapply (drops_mono … H … HLK0) -H #H destruct
@@ -79,12 +79,12 @@ qed-.
 
 fact cpr_conf_lpr_bind_bind (h):
    ∀p,I,G0,L0,V0,T0. (
-      ∀G,L,T. ⦃G0, L0, ⓑ{p,I}V0.T0⦄ ⊐+ ⦃G, L, T⦄ → IH_cpr_conf_lpr h G L T
+      ∀G,L,T. ⦃G0,L0,ⓑ{p,I}V0.T0⦄ ⬂+ ⦃G,L,T⦄ → IH_cpr_conf_lpr h G L T
    ) →
-   ∀V1. ⦃G0, L0⦄ ⊢ V0 ➡[h] V1 → ∀T1. ⦃G0, L0.ⓑ{I}V0⦄ ⊢ T0 ➡[h] T1 →
-   ∀V2. ⦃G0, L0⦄ ⊢ V0 ➡[h] V2 → ∀T2. ⦃G0, L0.ⓑ{I}V0⦄ ⊢ T0 ➡[h] T2 →
-   ∀L1. ⦃G0, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0, L0⦄ ⊢ ➡[h] L2 →
-   ∃∃T. ⦃G0, L1⦄ ⊢ ⓑ{p,I}V1.T1 ➡[h] T & ⦃G0, L2⦄ ⊢ ⓑ{p,I}V2.T2 ➡[h] T.
+   ∀V1. ⦃G0,L0⦄ ⊢ V0 ➡[h] V1 → ∀T1. ⦃G0,L0.ⓑ{I}V0⦄ ⊢ T0 ➡[h] T1 →
+   ∀V2. ⦃G0,L0⦄ ⊢ V0 ➡[h] V2 → ∀T2. ⦃G0,L0.ⓑ{I}V0⦄ ⊢ T0 ➡[h] T2 →
+   ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
+   ∃∃T. ⦃G0,L1⦄ ⊢ ⓑ{p,I}V1.T1 ➡[h] T & ⦃G0,L2⦄ ⊢ ⓑ{p,I}V2.T2 ➡[h] T.
 #h #p #I #G0 #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
 #V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
 elim (IH … HV01 … HV02 … HL01 … HL02) //
@@ -94,12 +94,12 @@ qed-.
 
 fact cpr_conf_lpr_bind_zeta (h):
    ∀G0,L0,V0,T0. (
-      ∀G,L,T. ⦃G0, L0, +ⓓV0.T0⦄ ⊐+ ⦃G, L, T⦄ → IH_cpr_conf_lpr h G L T
+      ∀G,L,T. ⦃G0,L0,+ⓓV0.T0⦄ ⬂+ ⦃G,L,T⦄ → IH_cpr_conf_lpr h G L T
    ) →
-   ∀V1. ⦃G0, L0⦄ ⊢ V0 ➡[h] V1 → ∀T1. ⦃G0, L0.ⓓV0⦄ ⊢ T0 ➡[h] T1 →
-   ∀T2. ⬆*[1]T2 ≘ T0 → ∀X2. ⦃G0, L0⦄ ⊢ T2 ➡[h] X2 →  
-   ∀L1. ⦃G0, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0, L0⦄ ⊢ ➡[h] L2 →
-   ∃∃T. ⦃G0, L1⦄ ⊢ +ⓓV1.T1 ➡[h] T & ⦃G0, L2⦄ ⊢ X2 ➡[h] T.
+   ∀V1. ⦃G0,L0⦄ ⊢ V0 ➡[h] V1 → ∀T1. ⦃G0,L0.ⓓV0⦄ ⊢ T0 ➡[h] T1 →
+   ∀T2. ⬆*[1]T2 ≘ T0 → ∀X2. ⦃G0,L0⦄ ⊢ T2 ➡[h] X2 →  
+   ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
+   ∃∃T. ⦃G0,L1⦄ ⊢ +ⓓV1.T1 ➡[h] T & ⦃G0,L2⦄ ⊢ X2 ➡[h] T.
 #h #G0 #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
 #T2 #HT20 #X2 #HTX2 #L1 #HL01 #L2 #HL02
 elim (cpm_inv_lifts_sn … HT01 (Ⓣ) … L0 … HT20) -HT01 [| /3 width=1 by drops_refl, drops_drop/ ] #T #HT1 #HT2
@@ -109,12 +109,12 @@ qed-.
 
 fact cpr_conf_lpr_zeta_zeta (h):
    ∀G0,L0,V0,T0. (
-      ∀G,L,T. ⦃G0, L0, +ⓓV0.T0⦄ ⊐+ ⦃G, L, T⦄ → IH_cpr_conf_lpr h G L T
+      ∀G,L,T. ⦃G0,L0,+ⓓV0.T0⦄ ⬂+ ⦃G,L,T⦄ → IH_cpr_conf_lpr h G L T
    ) →
-   ∀T1. ⬆*[1] T1 ≘ T0 → ∀X1. ⦃G0, L0⦄ ⊢ T1 ➡[h] X1 →
-   ∀T2. ⬆*[1] T2 ≘ T0 → ∀X2. ⦃G0, L0⦄ ⊢ T2 ➡[h] X2 →
-   ∀L1. ⦃G0, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0, L0⦄ ⊢ ➡[h] L2 →
-   ∃∃T. ⦃G0, L1⦄ ⊢ X1 ➡[h] T & ⦃G0, L2⦄ ⊢ X2 ➡[h] T.
+   ∀T1. ⬆*[1] T1 ≘ T0 → ∀X1. ⦃G0,L0⦄ ⊢ T1 ➡[h] X1 →
+   ∀T2. ⬆*[1] T2 ≘ T0 → ∀X2. ⦃G0,L0⦄ ⊢ T2 ➡[h] X2 →
+   ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
+   ∃∃T. ⦃G0,L1⦄ ⊢ X1 ➡[h] T & ⦃G0,L2⦄ ⊢ X2 ➡[h] T.
 #h #G0 #L0 #V0 #T0 #IH #T1 #HT10 #X1 #HTX1
 #T2 #HT20 #X2 #HTX2 #L1 #HL01 #L2 #HL02
 lapply (lifts_inj … HT20 … HT10) -HT20 #H destruct
@@ -124,12 +124,12 @@ qed-.
 
 fact cpr_conf_lpr_flat_flat (h):
    ∀I,G0,L0,V0,T0. (
-      ∀G,L,T. ⦃G0, L0, ⓕ{I}V0.T0⦄ ⊐+ ⦃G, L, T⦄ → IH_cpr_conf_lpr h G L T
+      ∀G,L,T. ⦃G0,L0,ⓕ{I}V0.T0⦄ ⬂+ ⦃G,L,T⦄ → IH_cpr_conf_lpr h G L T
    ) →
-   ∀V1. ⦃G0, L0⦄ ⊢ V0 ➡[h] V1 → ∀T1. ⦃G0, L0⦄ ⊢ T0 ➡[h] T1 →
-   ∀V2. ⦃G0, L0⦄ ⊢ V0 ➡[h] V2 → ∀T2. ⦃G0, L0⦄ ⊢ T0 ➡[h] T2 →
-   ∀L1. ⦃G0, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0, L0⦄ ⊢ ➡[h] L2 →
-   ∃∃T. ⦃G0, L1⦄ ⊢ ⓕ{I}V1.T1 ➡[h] T & ⦃G0, L2⦄ ⊢ ⓕ{I}V2.T2 ➡[h] T.
+   ∀V1. ⦃G0,L0⦄ ⊢ V0 ➡[h] V1 → ∀T1. ⦃G0,L0⦄ ⊢ T0 ➡[h] T1 →
+   ∀V2. ⦃G0,L0⦄ ⊢ V0 ➡[h] V2 → ∀T2. ⦃G0,L0⦄ ⊢ T0 ➡[h] T2 →
+   ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
+   ∃∃T. ⦃G0,L1⦄ ⊢ ⓕ{I}V1.T1 ➡[h] T & ⦃G0,L2⦄ ⊢ ⓕ{I}V2.T2 ➡[h] T.
 #h #I #G0 #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
 #V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
 elim (IH … HV01 … HV02 … HL01 … HL02) //
@@ -139,11 +139,11 @@ qed-.
 
 fact cpr_conf_lpr_flat_eps (h):
    ∀G0,L0,V0,T0. (
-      ∀G,L,T. ⦃G0, L0, ⓝV0.T0⦄ ⊐+ ⦃G, L, T⦄ → IH_cpr_conf_lpr h G L T
+      ∀G,L,T. ⦃G0,L0,ⓝV0.T0⦄ ⬂+ ⦃G,L,T⦄ → IH_cpr_conf_lpr h G L T
    ) →
-   ∀V1,T1. ⦃G0, L0⦄ ⊢ T0 ➡[h] T1 → ∀T2. ⦃G0, L0⦄ ⊢ T0 ➡[h] T2 →
-   ∀L1. ⦃G0, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0, L0⦄ ⊢ ➡[h] L2 →
-   ∃∃T. ⦃G0, L1⦄ ⊢ ⓝV1.T1 ➡[h] T & ⦃G0, L2⦄ ⊢ T2 ➡[h] T.
+   ∀V1,T1. ⦃G0,L0⦄ ⊢ T0 ➡[h] T1 → ∀T2. ⦃G0,L0⦄ ⊢ T0 ➡[h] T2 →
+   ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
+   ∃∃T. ⦃G0,L1⦄ ⊢ ⓝV1.T1 ➡[h] T & ⦃G0,L2⦄ ⊢ T2 ➡[h] T.
 #h #G0 #L0 #V0 #T0 #IH #V1 #T1 #HT01
 #T2 #HT02 #L1 #HL01 #L2 #HL02
 elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0
@@ -152,11 +152,11 @@ qed-.
 
 fact cpr_conf_lpr_eps_eps (h):
    ∀G0,L0,V0,T0. (
-      ∀G,L,T. ⦃G0, L0, ⓝV0.T0⦄ ⊐+ ⦃G, L, T⦄ → IH_cpr_conf_lpr h G L T
+      ∀G,L,T. ⦃G0,L0,ⓝV0.T0⦄ ⬂+ ⦃G,L,T⦄ → IH_cpr_conf_lpr h G L T
    ) →
-   ∀T1. ⦃G0, L0⦄ ⊢ T0 ➡[h] T1 → ∀T2. ⦃G0, L0⦄ ⊢ T0 ➡[h] T2 →
-   ∀L1. ⦃G0, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0, L0⦄ ⊢ ➡[h] L2 →
-   ∃∃T. ⦃G0, L1⦄ ⊢ T1 ➡[h] T & ⦃G0, L2⦄ ⊢ T2 ➡[h] T.
+   ∀T1. ⦃G0,L0⦄ ⊢ T0 ➡[h] T1 → ∀T2. ⦃G0,L0⦄ ⊢ T0 ➡[h] T2 →
+   ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
+   ∃∃T. ⦃G0,L1⦄ ⊢ T1 ➡[h] T & ⦃G0,L2⦄ ⊢ T2 ➡[h] T.
 #h #G0 #L0 #V0 #T0 #IH #T1 #HT01
 #T2 #HT02 #L1 #HL01 #L2 #HL02
 elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0
@@ -165,12 +165,12 @@ qed-.
 
 fact cpr_conf_lpr_flat_beta (h):
    ∀p,G0,L0,V0,W0,T0. (
-      ∀G,L,T. ⦃G0, L0, ⓐV0.ⓛ{p}W0.T0⦄ ⊐+ ⦃G, L, T⦄ → IH_cpr_conf_lpr h G L T
+      ∀G,L,T. ⦃G0,L0,ⓐV0.ⓛ{p}W0.T0⦄ ⬂+ ⦃G,L,T⦄ → IH_cpr_conf_lpr h G L T
    ) →
-   ∀V1. ⦃G0, L0⦄ ⊢ V0 ➡[h] V1 → ∀T1. ⦃G0, L0⦄ ⊢ ⓛ{p}W0.T0 ➡[h] T1 →
-   ∀V2. ⦃G0, L0⦄ ⊢ V0 ➡[h] V2 → ∀W2. ⦃G0, L0⦄ ⊢ W0 ➡[h] W2 → ∀T2. ⦃G0, L0.ⓛW0⦄ ⊢ T0 ➡[h] T2 →
-   ∀L1. ⦃G0, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0, L0⦄ ⊢ ➡[h] L2 →
-   ∃∃T. ⦃G0, L1⦄ ⊢ ⓐV1.T1 ➡[h] T & ⦃G0, L2⦄ ⊢ ⓓ{p}ⓝW2.V2.T2 ➡[h] T.
+   ∀V1. ⦃G0,L0⦄ ⊢ V0 ➡[h] V1 → ∀T1. ⦃G0,L0⦄ ⊢ ⓛ{p}W0.T0 ➡[h] T1 →
+   ∀V2. ⦃G0,L0⦄ ⊢ V0 ➡[h] V2 → ∀W2. ⦃G0,L0⦄ ⊢ W0 ➡[h] W2 → ∀T2. ⦃G0,L0.ⓛW0⦄ ⊢ T0 ➡[h] T2 →
+   ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
+   ∃∃T. ⦃G0,L1⦄ ⊢ ⓐV1.T1 ➡[h] T & ⦃G0,L2⦄ ⊢ ⓓ{p}ⓝW2.V2.T2 ➡[h] T.
 #h #p #G0 #L0 #V0 #W0 #T0 #IH #V1 #HV01 #X #H
 #V2 #HV02 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02
 elim (cpm_inv_abst1 … H) -H #W1 #T1 #HW01 #HT01 #H destruct
@@ -187,13 +187,13 @@ qed-.
 *)
 fact cpr_conf_lpr_flat_theta (h):
    ∀p,G0,L0,V0,W0,T0. (
-      ∀G,L,T. ⦃G0, L0, ⓐV0.ⓓ{p}W0.T0⦄ ⊐+ ⦃G, L, T⦄ → IH_cpr_conf_lpr h G L T
+      ∀G,L,T. ⦃G0,L0,ⓐV0.ⓓ{p}W0.T0⦄ ⬂+ ⦃G,L,T⦄ → IH_cpr_conf_lpr h G L T
    ) →
-   ∀V1. ⦃G0, L0⦄ ⊢ V0 ➡[h] V1 → ∀T1. ⦃G0, L0⦄ ⊢ ⓓ{p}W0.T0 ➡[h] T1 →
-   ∀V2. ⦃G0, L0⦄ ⊢ V0 ➡[h] V2 → ∀U2. ⬆*[1] V2 ≘ U2 →
-   ∀W2. ⦃G0, L0⦄ ⊢ W0 ➡[h] W2 → ∀T2. ⦃G0, L0.ⓓW0⦄ ⊢ T0 ➡[h] T2 →
-   ∀L1. ⦃G0, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0, L0⦄ ⊢ ➡[h] L2 →
-   ∃∃T. ⦃G0, L1⦄ ⊢ ⓐV1.T1 ➡[h] T & ⦃G0, L2⦄ ⊢ ⓓ{p}W2.ⓐU2.T2 ➡[h] T.
+   ∀V1. ⦃G0,L0⦄ ⊢ V0 ➡[h] V1 → ∀T1. ⦃G0,L0⦄ ⊢ ⓓ{p}W0.T0 ➡[h] T1 →
+   ∀V2. ⦃G0,L0⦄ ⊢ V0 ➡[h] V2 → ∀U2. ⬆*[1] V2 ≘ U2 →
+   ∀W2. ⦃G0,L0⦄ ⊢ W0 ➡[h] W2 → ∀T2. ⦃G0,L0.ⓓW0⦄ ⊢ T0 ➡[h] T2 →
+   ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
+   ∃∃T. ⦃G0,L1⦄ ⊢ ⓐV1.T1 ➡[h] T & ⦃G0,L2⦄ ⊢ ⓓ{p}W2.ⓐU2.T2 ➡[h] T.
 #h #p #G0 #L0 #V0 #W0 #T0 #IH #V1 #HV01 #X #H
 #V2 #HV02 #U2 #HVU2 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02
 elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2
@@ -212,12 +212,12 @@ qed-.
 
 fact cpr_conf_lpr_beta_beta (h):
    ∀p,G0,L0,V0,W0,T0. (
-      ∀G,L,T. ⦃G0, L0, ⓐV0.ⓛ{p}W0.T0⦄ ⊐+ ⦃G, L, T⦄ → IH_cpr_conf_lpr h G L T
+      ∀G,L,T. ⦃G0,L0,ⓐV0.ⓛ{p}W0.T0⦄ ⬂+ ⦃G,L,T⦄ → IH_cpr_conf_lpr h G L T
    ) →
-   ∀V1. ⦃G0, L0⦄ ⊢ V0 ➡[h] V1 → ∀W1. ⦃G0, L0⦄ ⊢ W0 ➡[h] W1 → ∀T1. ⦃G0, L0.ⓛW0⦄ ⊢ T0 ➡[h] T1 →
-   ∀V2. ⦃G0, L0⦄ ⊢ V0 ➡[h] V2 → ∀W2. ⦃G0, L0⦄ ⊢ W0 ➡[h] W2 → ∀T2. ⦃G0, L0.ⓛW0⦄ ⊢ T0 ➡[h] T2 →
-   ∀L1. ⦃G0, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0, L0⦄ ⊢ ➡[h] L2 →
-   ∃∃T. ⦃G0, L1⦄ ⊢ ⓓ{p}ⓝW1.V1.T1 ➡[h] T & ⦃G0, L2⦄ ⊢ ⓓ{p}ⓝW2.V2.T2 ➡[h] T.
+   ∀V1. ⦃G0,L0⦄ ⊢ V0 ➡[h] V1 → ∀W1. ⦃G0,L0⦄ ⊢ W0 ➡[h] W1 → ∀T1. ⦃G0,L0.ⓛW0⦄ ⊢ T0 ➡[h] T1 →
+   ∀V2. ⦃G0,L0⦄ ⊢ V0 ➡[h] V2 → ∀W2. ⦃G0,L0⦄ ⊢ W0 ➡[h] W2 → ∀T2. ⦃G0,L0.ⓛW0⦄ ⊢ T0 ➡[h] T2 →
+   ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
+   ∃∃T. ⦃G0,L1⦄ ⊢ ⓓ{p}ⓝW1.V1.T1 ➡[h] T & ⦃G0,L2⦄ ⊢ ⓓ{p}ⓝW2.V2.T2 ➡[h] T.
 #h #p #G0 #L0 #V0 #W0 #T0 #IH #V1 #HV01 #W1 #HW01 #T1 #HT01
 #V2 #HV02 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02
 elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2
@@ -231,14 +231,14 @@ qed-.
 (* Basic_1: was: pr0_upsilon_upsilon *)
 fact cpr_conf_lpr_theta_theta (h):
    ∀p,G0,L0,V0,W0,T0. (
-      ∀G,L,T. ⦃G0, L0, ⓐV0.ⓓ{p}W0.T0⦄ ⊐+ ⦃G, L, T⦄ → IH_cpr_conf_lpr h G L T
+      ∀G,L,T. ⦃G0,L0,ⓐV0.ⓓ{p}W0.T0⦄ ⬂+ ⦃G,L,T⦄ → IH_cpr_conf_lpr h G L T
    ) →
-   ∀V1. ⦃G0, L0⦄ ⊢ V0 ➡[h] V1 → ∀U1. ⬆*[1] V1 ≘ U1 →
-   ∀W1. ⦃G0, L0⦄ ⊢ W0 ➡[h] W1 → ∀T1. ⦃G0, L0.ⓓW0⦄ ⊢ T0 ➡[h] T1 →
-   ∀V2. ⦃G0, L0⦄ ⊢ V0 ➡[h] V2 → ∀U2. ⬆*[1] V2 ≘ U2 →
-   ∀W2. ⦃G0, L0⦄ ⊢ W0 ➡[h] W2 → ∀T2. ⦃G0, L0.ⓓW0⦄ ⊢ T0 ➡[h] T2 →
-   ∀L1. ⦃G0, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0, L0⦄ ⊢ ➡[h] L2 →
-   ∃∃T. ⦃G0, L1⦄ ⊢ ⓓ{p}W1.ⓐU1.T1 ➡[h] T & ⦃G0, L2⦄ ⊢ ⓓ{p}W2.ⓐU2.T2 ➡[h] T.
+   ∀V1. ⦃G0,L0⦄ ⊢ V0 ➡[h] V1 → ∀U1. ⬆*[1] V1 ≘ U1 →
+   ∀W1. ⦃G0,L0⦄ ⊢ W0 ➡[h] W1 → ∀T1. ⦃G0,L0.ⓓW0⦄ ⊢ T0 ➡[h] T1 →
+   ∀V2. ⦃G0,L0⦄ ⊢ V0 ➡[h] V2 → ∀U2. ⬆*[1] V2 ≘ U2 →
+   ∀W2. ⦃G0,L0⦄ ⊢ W0 ➡[h] W2 → ∀T2. ⦃G0,L0.ⓓW0⦄ ⊢ T0 ➡[h] T2 →
+   ∀L1. ⦃G0,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G0,L0⦄ ⊢ ➡[h] L2 →
+   ∃∃T. ⦃G0,L1⦄ ⊢ ⓓ{p}W1.ⓐU1.T1 ➡[h] T & ⦃G0,L2⦄ ⊢ ⓓ{p}W2.ⓐU2.T2 ➡[h] T.
 #h #p #G0 #L0 #V0 #W0 #T0 #IH #V1 #HV01 #U1 #HVU1 #W1 #HW01 #T1 #HT01
 #V2 #HV02 #U2 #HVU2 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02
 elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2
@@ -308,15 +308,15 @@ qed-.
 
 (* Properties with context-sensitive parallel reduction for terms ***********)
 
-lemma lpr_cpr_conf_dx (h) (G): ∀L0. ∀T0,T1:term. ⦃G, L0⦄ ⊢ T0 ➡[h] T1 → ∀L1. ⦃G, L0⦄ ⊢ ➡[h] L1 →
-                               ∃∃T. ⦃G, L1⦄ ⊢ T0 ➡[h] T & ⦃G, L1⦄ ⊢ T1 ➡[h] T.
+lemma lpr_cpr_conf_dx (h) (G): ∀L0. ∀T0,T1:term. ⦃G,L0⦄ ⊢ T0 ➡[h] T1 → ∀L1. ⦃G,L0⦄ ⊢ ➡[h] L1 →
+                               ∃∃T. ⦃G,L1⦄ ⊢ T0 ➡[h] T & ⦃G,L1⦄ ⊢ T1 ➡[h] T.
 #h #G #L0 #T0 #T1 #HT01 #L1 #HL01
 elim (cpr_conf_lpr … HT01 T0 … HL01 … HL01) -HT01 -HL01
 /2 width=3 by ex2_intro/
 qed-.
 
-lemma lpr_cpr_conf_sn (h) (G): ∀L0. ∀T0,T1:term. ⦃G, L0⦄ ⊢ T0 ➡[h] T1 → ∀L1. ⦃G, L0⦄ ⊢ ➡[h] L1 →
-                               ∃∃T. ⦃G, L1⦄ ⊢ T0 ➡[h] T & ⦃G, L0⦄ ⊢ T1 ➡[h] T.
+lemma lpr_cpr_conf_sn (h) (G): ∀L0. ∀T0,T1:term. ⦃G,L0⦄ ⊢ T0 ➡[h] T1 → ∀L1. ⦃G,L0⦄ ⊢ ➡[h] L1 →
+                               ∃∃T. ⦃G,L1⦄ ⊢ T0 ➡[h] T & ⦃G,L0⦄ ⊢ T1 ➡[h] T.
 #h #G #L0 #T0 #T1 #HT01 #L1 #HL01
 elim (cpr_conf_lpr … HT01 T0 … L0 … HL01) -HT01 -HL01
 /2 width=3 by ex2_intro/
index 484ae046f298d997caae47b768aa5cccc29fde76..6cc94e31fa87f6aa63798cc888d919d57adbfebf 100644 (file)
@@ -21,5 +21,5 @@ include "basic_2/rt_transition/lpr.ma".
 (* Forward lemmas with unbound parallel rt-transition for ref local envs ****)
 
 (* Basic_2A1: was: lpr_lpx *)
-lemma lpr_fwd_lpx (h) (G): ∀L1,L2. ⦃G, L1⦄ ⊢ ➡[h] L2 → ⦃G, L1⦄ ⊢ ⬈[h] L2.
+lemma lpr_fwd_lpx (h) (G): ∀L1,L2. ⦃G,L1⦄ ⊢ ➡[h] L2 → ⦃G,L1⦄ ⊢ ⬈[h] L2.
 /3 width=3 by cpm_fwd_cpx, lex_co/ qed-.
index ae782872ca431f30b3d9f09ecd363a76274d45bf..14d34b21a87bede5bed3119697c4a13d8d6ef545 100644 (file)
@@ -27,8 +27,8 @@ interpretation
 
 (* Basic properties *********************************************************)
 
-lemma lpx_bind (h) (G): ∀K1,K2. ⦃G, K1⦄ ⊢ ⬈[h] K2 →
-                        ∀I1,I2. ⦃G, K1⦄ ⊢ I1 ⬈[h] I2 → ⦃G, K1.ⓘ{I1}⦄ ⊢ ⬈[h] K2.ⓘ{I2}.
+lemma lpx_bind (h) (G): ∀K1,K2. ⦃G,K1⦄ ⊢ ⬈[h] K2 →
+                        ∀I1,I2. ⦃G,K1⦄ ⊢ I1 ⬈[h] I2 → ⦃G,K1.ⓘ{I1}⦄ ⊢ ⬈[h] K2.ⓘ{I2}.
 /2 width=1 by lex_bind/ qed.
 
 lemma lpx_refl (h) (G): reflexive … (lpx h G).
@@ -36,56 +36,56 @@ lemma lpx_refl (h) (G): reflexive … (lpx h G).
 
 (* Advanced properties ******************************************************)
 
-lemma lpx_bind_refl_dx (h) (G): ∀K1,K2. ⦃G, K1⦄ ⊢ ⬈[h] K2 →
-                                ∀I. ⦃G, K1.ⓘ{I}⦄ ⊢ ⬈[h] K2.ⓘ{I}.
+lemma lpx_bind_refl_dx (h) (G): ∀K1,K2. ⦃G,K1⦄ ⊢ ⬈[h] K2 →
+                                ∀I. ⦃G,K1.ⓘ{I}⦄ ⊢ ⬈[h] K2.ⓘ{I}.
 /2 width=1 by lex_bind_refl_dx/ qed.
 
-lemma lpx_pair (h) (G): ∀K1,K2. ⦃G, K1⦄ ⊢ ⬈[h] K2 → ∀V1,V2. ⦃G, K1⦄ ⊢ V1 ⬈[h] V2 →
-                        ∀I.⦃G, K1.ⓑ{I}V1⦄ ⊢ ⬈[h] K2.ⓑ{I}V2.
+lemma lpx_pair (h) (G): ∀K1,K2. ⦃G,K1⦄ ⊢ ⬈[h] K2 → ∀V1,V2. ⦃G,K1⦄ ⊢ V1 ⬈[h] V2 →
+                        ∀I.⦃G,K1.ⓑ{I}V1⦄ ⊢ ⬈[h] K2.ⓑ{I}V2.
 /2 width=1 by lex_pair/ qed.
 
 (* Basic inversion lemmas ***************************************************)
 
 (* Basic_2A1: was: lpx_inv_atom1 *)
-lemma lpx_inv_atom_sn (h) (G): ∀L2. ⦃G, ⋆⦄ ⊢ ⬈[h] L2 → L2 = ⋆.
+lemma lpx_inv_atom_sn (h) (G): ∀L2. ⦃G,⋆⦄ ⊢ ⬈[h] L2 → L2 = ⋆.
 /2 width=2 by lex_inv_atom_sn/ qed-.
 
-lemma lpx_inv_bind_sn (h) (G): ∀I1,L2,K1. ⦃G, K1.ⓘ{I1}⦄ ⊢ ⬈[h] L2 →
-                               ∃∃I2,K2. ⦃G, K1⦄ ⊢ ⬈[h] K2 & ⦃G, K1⦄ ⊢ I1 ⬈[h] I2 &
+lemma lpx_inv_bind_sn (h) (G): ∀I1,L2,K1. ⦃G,K1.ⓘ{I1}⦄ ⊢ ⬈[h] L2 →
+                               ∃∃I2,K2. ⦃G,K1⦄ ⊢ ⬈[h] K2 & ⦃G,K1⦄ ⊢ I1 ⬈[h] I2 &
                                         L2 = K2.ⓘ{I2}.
 /2 width=1 by lex_inv_bind_sn/ qed-.
 
 (* Basic_2A1: was: lpx_inv_atom2 *)
-lemma lpx_inv_atom_dx: ∀h,G,L1. ⦃G, L1⦄ ⊢ ⬈[h] ⋆ → L1 = ⋆.
+lemma lpx_inv_atom_dx: ∀h,G,L1. ⦃G,L1⦄ ⊢ ⬈[h] ⋆ → L1 = ⋆.
 /2 width=2 by lex_inv_atom_dx/ qed-.
 
-lemma lpx_inv_bind_dx (h) (G): ∀I2,L1,K2. ⦃G, L1⦄ ⊢ ⬈[h] K2.ⓘ{I2} →
-                               ∃∃I1,K1. ⦃G, K1⦄ ⊢ ⬈[h] K2 & ⦃G, K1⦄ ⊢ I1 ⬈[h] I2 &
+lemma lpx_inv_bind_dx (h) (G): ∀I2,L1,K2. ⦃G,L1⦄ ⊢ ⬈[h] K2.ⓘ{I2} →
+                               ∃∃I1,K1. ⦃G,K1⦄ ⊢ ⬈[h] K2 & ⦃G,K1⦄ ⊢ I1 ⬈[h] I2 &
                                         L1 = K1.ⓘ{I1}.
 /2 width=1 by lex_inv_bind_dx/ qed-.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma lpx_inv_unit_sn (h) (G): ∀I,L2,K1. ⦃G, K1.ⓤ{I}⦄ ⊢ ⬈[h] L2 →
-                               ∃∃K2. ⦃G, K1⦄ ⊢ ⬈[h] K2 & L2 = K2.ⓤ{I}.
+lemma lpx_inv_unit_sn (h) (G): ∀I,L2,K1. ⦃G,K1.ⓤ{I}⦄ ⊢ ⬈[h] L2 →
+                               ∃∃K2. ⦃G,K1⦄ ⊢ ⬈[h] K2 & L2 = K2.ⓤ{I}.
 /2 width=1 by lex_inv_unit_sn/ qed-.
 
 (* Basic_2A1: was: lpx_inv_pair1 *)
-lemma lpx_inv_pair_sn (h) (G): ∀I,L2,K1,V1. ⦃G, K1.ⓑ{I}V1⦄ ⊢ ⬈[h] L2 →
-                               ∃∃K2,V2. ⦃G, K1⦄ ⊢ ⬈[h] K2 & ⦃G, K1⦄ ⊢ V1 ⬈[h] V2 &
+lemma lpx_inv_pair_sn (h) (G): ∀I,L2,K1,V1. ⦃G,K1.ⓑ{I}V1⦄ ⊢ ⬈[h] L2 →
+                               ∃∃K2,V2. ⦃G,K1⦄ ⊢ ⬈[h] K2 & ⦃G,K1⦄ ⊢ V1 ⬈[h] V2 &
                                         L2 = K2.ⓑ{I}V2.
 /2 width=1 by lex_inv_pair_sn/ qed-.
 
-lemma lpx_inv_unit_dx (h) (G): ∀I,L1,K2. ⦃G, L1⦄ ⊢ ⬈[h] K2.ⓤ{I} →
-                               ∃∃K1. ⦃G, K1⦄ ⊢ ⬈[h] K2 & L1 = K1.ⓤ{I}.
+lemma lpx_inv_unit_dx (h) (G): ∀I,L1,K2. ⦃G,L1⦄ ⊢ ⬈[h] K2.ⓤ{I} →
+                               ∃∃K1. ⦃G,K1⦄ ⊢ ⬈[h] K2 & L1 = K1.ⓤ{I}.
 /2 width=1 by lex_inv_unit_dx/ qed-.
 
 (* Basic_2A1: was: lpx_inv_pair2 *)
-lemma lpx_inv_pair_dx (h) (G): ∀I,L1,K2,V2. ⦃G, L1⦄ ⊢ ⬈[h] K2.ⓑ{I}V2 →
-                               ∃∃K1,V1. ⦃G, K1⦄ ⊢ ⬈[h] K2 & ⦃G, K1⦄ ⊢ V1 ⬈[h] V2 &
+lemma lpx_inv_pair_dx (h) (G): ∀I,L1,K2,V2. ⦃G,L1⦄ ⊢ ⬈[h] K2.ⓑ{I}V2 →
+                               ∃∃K1,V1. ⦃G,K1⦄ ⊢ ⬈[h] K2 & ⦃G,K1⦄ ⊢ V1 ⬈[h] V2 &
                                         L1 = K1.ⓑ{I}V1.
 /2 width=1 by lex_inv_pair_dx/ qed-.
 
-lemma lpx_inv_pair (h) (G): ∀I1,I2,L1,L2,V1,V2. ⦃G, L1.ⓑ{I1}V1⦄ ⊢ ⬈[h] L2.ⓑ{I2}V2 →
-                            ∧∧ ⦃G, L1⦄ ⊢ ⬈[h] L2 & ⦃G, L1⦄ ⊢ V1 ⬈[h] V2 & I1 = I2.
+lemma lpx_inv_pair (h) (G): ∀I1,I2,L1,L2,V1,V2. ⦃G,L1.ⓑ{I1}V1⦄ ⊢ ⬈[h] L2.ⓑ{I2}V2 →
+                            ∧∧ ⦃G,L1⦄ ⊢ ⬈[h] L2 & ⦃G,L1⦄ ⊢ V1 ⬈[h] V2 & I1 = I2.
 /2 width=1 by lex_inv_pair/ qed-.
index 85ff65ecc6dec304140d81b058e3d9b80ead37dc..6e2319f19a39bbdd632deb0293bf6b74dc14b4ee 100644 (file)
@@ -22,9 +22,9 @@ include "basic_2/rt_transition/lpx_drops.ma".
 
 (* Note: lemma 500 *)
 (* Basic_2A1: was: cpx_lpx_aaa_conf *)
-lemma cpx_aaa_conf_lpx (h): ∀G,L1,T1,A. ⦃G, L1⦄ ⊢ T1 ⁝ A →
-                            ∀T2. ⦃G, L1⦄ ⊢ T1 ⬈[h] T2 →
-                            ∀L2. ⦃G, L1⦄ ⊢ ⬈[h] L2 → ⦃G, L2⦄ ⊢ T2 ⁝ A.
+lemma cpx_aaa_conf_lpx (h): ∀G,L1,T1,A. ⦃G,L1⦄ ⊢ T1 ⁝ A →
+                            ∀T2. ⦃G,L1⦄ ⊢ T1 ⬈[h] T2 →
+                            ∀L2. ⦃G,L1⦄ ⊢ ⬈[h] L2 → ⦃G,L2⦄ ⊢ T2 ⁝ A.
 #h #G #L1 #T1 #A #H elim H -G -L1 -T1 -A
 [ #G #L1 #s #X #H
   elim (cpx_inv_sort1 … H) -H #H destruct //
index 11ae99e7dfc52ead9b1abf66a37d379c37d1bf53..b73fe99b5fe3146b0c23af1de9058bea2ca388c5 100644 (file)
@@ -19,9 +19,9 @@ include "basic_2/rt_transition/lpx.ma".
 
 (* Properties with extended structural successor for closures ***************)
 
-lemma lpx_fqu_trans (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
-                             ∀K1. ⦃G1, K1⦄ ⊢ ⬈[h] L1 →
-                             ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ⬈[h] T & ⦃G1, K1, T⦄ ⊐[b] ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ⬈[h] L2.
+lemma lpx_fqu_trans (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ →
+                             ∀K1. ⦃G1,K1⦄ ⊢ ⬈[h] L1 →
+                             ∃∃K2,T. ⦃G1,K1⦄ ⊢ T1 ⬈[h] T & ⦃G1,K1,T⦄ ⬂[b] ⦃G2,K2,T2⦄ & ⦃G2,K2⦄ ⊢ ⬈[h] L2.
 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
 [ #I #G #K #V #K1 #H
   elim (lpx_inv_pair_dx … H) -H #K0 #V0 #HK0 #HV0 #H destruct
@@ -37,13 +37,13 @@ lemma lpx_fqu_trans (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2
 ]
 qed-.
 
-lemma fqu_lpx_trans (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
-                             ∀K2. ⦃G2, L2⦄ ⊢ ⬈[h] K2 →
-                             ∃∃K1,T. ⦃G1, L1⦄ ⊢ ⬈[h] K1 & ⦃G1, L1⦄ ⊢ T1 ⬈[h] T & ⦃G1, K1, T⦄ ⊐[b] ⦃G2, K2, T2⦄.
+lemma fqu_lpx_trans (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ →
+                             ∀K2. ⦃G2,L2⦄ ⊢ ⬈[h] K2 →
+                             ∃∃K1,T. ⦃G1,L1⦄ ⊢ ⬈[h] K1 & ⦃G1,L1⦄ ⊢ T1 ⬈[h] T & ⦃G1,K1,T⦄ ⬂[b] ⦃G2,K2,T2⦄.
 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
 [ /3 width=5 by lpx_bind_refl_dx, fqu_lref_O, ex3_2_intro/
 | /3 width=5 by cpx_pair_sn, fqu_pair_sn, ex3_2_intro/
-| #p #I #G2 #L2 #V2 #T2 #X #H
+| #p #I #G2 #L2 #V2 #T2 #Hb #X #H
   elim (lpx_inv_pair_sn … H) -H #K2 #W2 #HLK2 #HVW2 #H destruct
   /3 width=5 by cpx_pair_sn, fqu_bind_dx, ex3_2_intro/
 | #p #I #G2 #L2 #V2 #T2 #Hb #X #H
@@ -56,18 +56,18 @@ qed-.
 
 (* Properties with extended optional structural successor for closures ******)
 
-lemma lpx_fquq_trans (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ →
-                              ∀K1. ⦃G1, K1⦄ ⊢ ⬈[h] L1 →
-                              ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ⬈[h] T & ⦃G1, K1, T⦄ ⊐⸮[b] ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ⬈[h] L2.
+lemma lpx_fquq_trans (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂⸮[b] ⦃G2,L2,T2⦄ →
+                              ∀K1. ⦃G1,K1⦄ ⊢ ⬈[h] L1 →
+                              ∃∃K2,T. ⦃G1,K1⦄ ⊢ T1 ⬈[h] T & ⦃G1,K1,T⦄ ⬂⸮[b] ⦃G2,K2,T2⦄ & ⦃G2,K2⦄ ⊢ ⬈[h] L2.
 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #HKL1 cases H -H
 [ #H12 elim (lpx_fqu_trans … H12 … HKL1) -L1 /3 width=5 by fqu_fquq, ex3_2_intro/
 | * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/
 ]
 qed-.
 
-lemma fquq_lpx_trans (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ →
-                              ∀K2. ⦃G2, L2⦄ ⊢ ⬈[h] K2 →
-                              ∃∃K1,T. ⦃G1, L1⦄ ⊢ ⬈[h] K1 & ⦃G1, L1⦄ ⊢ T1 ⬈[h] T & ⦃G1, K1, T⦄ ⊐⸮[b] ⦃G2, K2, T2⦄.
+lemma fquq_lpx_trans (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂⸮[b] ⦃G2,L2,T2⦄ →
+                              ∀K2. ⦃G2,L2⦄ ⊢ ⬈[h] K2 →
+                              ∃∃K1,T. ⦃G1,L1⦄ ⊢ ⬈[h] K1 & ⦃G1,L1⦄ ⊢ T1 ⬈[h] T & ⦃G1,K1,T⦄ ⬂⸮[b] ⦃G2,K2,T2⦄.
 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H #K2 #HLK2 cases H -H
 [ #H12 elim (fqu_lpx_trans … H12 … HLK2) /3 width=5 by fqu_fquq, ex3_2_intro/
 | * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/
index f40b6b6276a95a0e196a4a39f82ad1b052657dff..ed31446250d2530f7181bd3d257ab8b1c95dd224 100644 (file)
@@ -19,10 +19,10 @@ include "basic_2/rt_transition/rpx_lpx.ma".
 (* Forward lemmas with free variables inclusion for restricted closures *****)
 
 (* Basic_2A1: uses: lpx_cpx_frees_trans *)
-lemma lpx_cpx_conf_fsge (h) (G): ∀L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ⬈[h] T1 →
-                                 ∀L2. ⦃G, L0⦄ ⊢ ⬈[h] L2 → ⦃L2, T1⦄ ⊆ ⦃L0, T0⦄.
+lemma lpx_cpx_conf_fsge (h) (G): ∀L0,T0,T1. ⦃G,L0⦄ ⊢ T0 ⬈[h] T1 →
+                                 ∀L2. ⦃G,L0⦄ ⊢ ⬈[h] L2 → ⦃L2,T1⦄ ⊆ ⦃L0,T0⦄.
 /3 width=4 by rpx_cpx_conf_fsge, lpx_rpx/ qed-.
 
 (* Basic_2A1: uses: lpx_frees_trans *)
-lemma lpx_fsge_comp (h) (G): ∀L0,L2,T0. ⦃G, L0⦄ ⊢ ⬈[h] L2 → ⦃L2, T0⦄ ⊆ ⦃L0, T0⦄.
+lemma lpx_fsge_comp (h) (G): ∀L0,L2,T0. ⦃G,L0⦄ ⊢ ⬈[h] L2 → ⦃L2,T0⦄ ⊆ ⦃L0,T0⦄.
 /2 width=4 by lpx_cpx_conf_fsge/ qed-.
index 29b3e5e46c6c8c17639dcfe32ffec9a279afda13..1c416b934f9f6f59fc76ea810c54b02e2b8a5d3c 100644 (file)
@@ -19,5 +19,5 @@ include "basic_2/rt_transition/lpx.ma".
 
 (* Forward lemmas with length for local environments ************************)
 
-lemma lpx_fwd_length (h) (G): ∀L1,L2. ⦃G, L1⦄ ⊢ ⬈[h] L2 → |L1| = |L2|.
+lemma lpx_fwd_length (h) (G): ∀L1,L2. ⦃G,L1⦄ ⊢ ⬈[h] L2 → |L1| = |L2|.
 /2 width=2 by lex_fwd_length/ qed-.
index 583214a04bcfde350ceccfb0c27c7813b22ad00d..8055506a69e9c2b0ec908ff7d6435942b480652f 100644 (file)
@@ -18,13 +18,13 @@ include "basic_2/rt_transition/rpx_lpx.ma".
 
 (* UNBOUND PARALLEL RT-TRANSITION FOR FULL LOCAL ENVIRONMENTS ***************)
 
-(* Properties with degree-based equivalence for local environments **********)
+(* Properties with sort-irrelevant equivalence for local environments *******)
 
 (* Basic_2A1: uses: lleq_lpx_trans *)
-lemma rdeq_lpx_trans (h) (o) (G): ∀L2,K2. ⦃G, L2⦄ ⊢ ⬈[h] K2 →
-                                  ∀L1. ∀T:term. L1 ≛[h, o, T] L2 →
-                                  ∃∃K1. ⦃G, L1⦄ ⊢ ⬈[h] K1 & K1 ≛[h, o, T] K2.
-#h #o #G #L2 #K2 #HLK2 #L1 #T #HL12
+lemma rdeq_lpx_trans (h) (G): ∀L2,K2. ⦃G,L2⦄ ⊢ ⬈[h] K2 →
+                              ∀L1. ∀T:term. L1 ≛[T] L2 →
+                              ∃∃K1. ⦃G,L1⦄ ⊢ ⬈[h] K1 & K1 ≛[T] K2.
+#h #G #L2 #K2 #HLK2 #L1 #T #HL12
 lapply (lpx_rpx … T HLK2) -HLK2 #HLK2
 elim (rdeq_rpx_trans … HLK2 … HL12) -L2 #K #H #HK2
 elim (rpx_inv_lpx_req … H) -H #K1 #HLK1 #HK1
index f45abc6d72143506b98e7f040f58bcc866a10559..70351ad4f0bd7d1eeb8a5f2df770790fdf8dd497 100644 (file)
@@ -27,111 +27,111 @@ interpretation
 
 (* Basic properties ***********************************************************)
 
-lemma rpx_atom: ∀h,I,G. ⦃G, ⋆⦄ ⊢ ⬈[h, ⓪{I}] ⋆.
+lemma rpx_atom: ∀h,I,G. ⦃G,⋆⦄ ⊢ ⬈[h,⓪{I}] ⋆.
 /2 width=1 by rex_atom/ qed.
 
 lemma rpx_sort: ∀h,I1,I2,G,L1,L2,s.
-                ⦃G, L1⦄ ⊢ ⬈[h, ⋆s] L2 → ⦃G, L1.ⓘ{I1}⦄ ⊢ ⬈[h, ⋆s] L2.ⓘ{I2}.
+                ⦃G,L1⦄ ⊢ ⬈[h,⋆s] L2 → ⦃G,L1.ⓘ{I1}⦄ ⊢ ⬈[h,⋆s] L2.ⓘ{I2}.
 /2 width=1 by rex_sort/ qed.
 
 lemma rpx_pair: ∀h,I,G,L1,L2,V1,V2.
-                ⦃G, L1⦄ ⊢ ⬈[h, V1] L2 → ⦃G, L1⦄ ⊢ V1 ⬈[h] V2 → ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈[h, #0] L2.ⓑ{I}V2.
+                ⦃G,L1⦄ ⊢ ⬈[h,V1] L2 → ⦃G,L1⦄ ⊢ V1 ⬈[h] V2 → ⦃G,L1.ⓑ{I}V1⦄ ⊢ ⬈[h,#0] L2.ⓑ{I}V2.
 /2 width=1 by rex_pair/ qed.
 
 lemma rpx_lref: ∀h,I1,I2,G,L1,L2,i.
-                ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 → ⦃G, L1.ⓘ{I1}⦄ ⊢ ⬈[h, #↑i] L2.ⓘ{I2}.
+                ⦃G,L1⦄ ⊢ ⬈[h,#i] L2 → ⦃G,L1.ⓘ{I1}⦄ ⊢ ⬈[h,#↑i] L2.ⓘ{I2}.
 /2 width=1 by rex_lref/ qed.
 
 lemma rpx_gref: ∀h,I1,I2,G,L1,L2,l.
-                ⦃G, L1⦄ ⊢ ⬈[h, §l] L2 → ⦃G, L1.ⓘ{I1}⦄ ⊢ ⬈[h, §l] L2.ⓘ{I2}.
+                ⦃G,L1⦄ ⊢ ⬈[h,§l] L2 → ⦃G,L1.ⓘ{I1}⦄ ⊢ ⬈[h,§l] L2.ⓘ{I2}.
 /2 width=1 by rex_gref/ qed.
 
 lemma rpx_bind_repl_dx: ∀h,I,I1,G,L1,L2,T.
-                        ⦃G, L1.ⓘ{I}⦄ ⊢ ⬈[h, T] L2.ⓘ{I1} →
-                        ∀I2. ⦃G, L1⦄ ⊢ I ⬈[h] I2 →
-                        ⦃G, L1.ⓘ{I}⦄ ⊢ ⬈[h, T] L2.ⓘ{I2}.
+                        ⦃G,L1.ⓘ{I}⦄ ⊢ ⬈[h,T] L2.ⓘ{I1} →
+                        ∀I2. ⦃G,L1⦄ ⊢ I ⬈[h] I2 →
+                        ⦃G,L1.ⓘ{I}⦄ ⊢ ⬈[h,T] L2.ⓘ{I2}.
 /2 width=2 by rex_bind_repl_dx/ qed-.
 
 (* Basic inversion lemmas ***************************************************)
 
-lemma rpx_inv_atom_sn: ∀h,G,Y2,T. ⦃G, ⋆⦄ ⊢ ⬈[h, T] Y2 → Y2 = ⋆.
+lemma rpx_inv_atom_sn: ∀h,G,Y2,T. ⦃G,⋆⦄ ⊢ ⬈[h,T] Y2 → Y2 = ⋆.
 /2 width=3 by rex_inv_atom_sn/ qed-.
 
-lemma rpx_inv_atom_dx: ∀h,G,Y1,T. ⦃G, Y1⦄ ⊢ ⬈[h, T] ⋆ → Y1 = ⋆.
+lemma rpx_inv_atom_dx: ∀h,G,Y1,T. ⦃G,Y1⦄ ⊢ ⬈[h,T] ⋆ → Y1 = ⋆.
 /2 width=3 by rex_inv_atom_dx/ qed-.
 
-lemma rpx_inv_sort: ∀h,G,Y1,Y2,s. ⦃G, Y1⦄ ⊢ ⬈[h, ⋆s] Y2 →
+lemma rpx_inv_sort: ∀h,G,Y1,Y2,s. ⦃G,Y1⦄ ⊢ ⬈[h,⋆s] Y2 →
                     ∨∨ Y1 = ⋆ ∧ Y2 = ⋆
-                     | ∃∃I1,I2,L1,L2. ⦃G, L1⦄ ⊢ ⬈[h, ⋆s] L2 &
+                     | ∃∃I1,I2,L1,L2. ⦃G,L1⦄ ⊢ ⬈[h,⋆s] L2 &
                                       Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
 /2 width=1 by rex_inv_sort/ qed-.
 
-lemma rpx_inv_lref: ∀h,G,Y1,Y2,i. ⦃G, Y1⦄ ⊢ ⬈[h, #↑i] Y2 →
+lemma rpx_inv_lref: ∀h,G,Y1,Y2,i. ⦃G,Y1⦄ ⊢ ⬈[h,#↑i] Y2 →
                     ∨∨ Y1 = ⋆ ∧ Y2 = ⋆
-                     | ∃∃I1,I2,L1,L2. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 &
+                     | ∃∃I1,I2,L1,L2. ⦃G,L1⦄ ⊢ ⬈[h,#i] L2 &
                                       Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
 /2 width=1 by rex_inv_lref/ qed-.
 
-lemma rpx_inv_gref: ∀h,G,Y1,Y2,l. ⦃G, Y1⦄ ⊢ ⬈[h, §l] Y2 →
+lemma rpx_inv_gref: ∀h,G,Y1,Y2,l. ⦃G,Y1⦄ ⊢ ⬈[h,§l] Y2 →
                     ∨∨ Y1 = ⋆ ∧ Y2 = ⋆
-                     | ∃∃I1,I2,L1,L2. ⦃G, L1⦄ ⊢ ⬈[h, §l] L2 &
+                     | ∃∃I1,I2,L1,L2. ⦃G,L1⦄ ⊢ ⬈[h,§l] L2 &
                                       Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
 /2 width=1 by rex_inv_gref/ qed-.
 
-lemma rpx_inv_bind: ∀h,p,I,G,L1,L2,V,T. ⦃G, L1⦄ ⊢ ⬈[h, ⓑ{p,I}V.T] L2 →
-                    ∧∧ ⦃G, L1⦄ ⊢ ⬈[h, V] L2 & ⦃G, L1.ⓑ{I}V⦄ ⊢ ⬈[h, T] L2.ⓑ{I}V.
+lemma rpx_inv_bind: ∀h,p,I,G,L1,L2,V,T. ⦃G,L1⦄ ⊢ ⬈[h,ⓑ{p,I}V.T] L2 →
+                    ∧∧ ⦃G,L1⦄ ⊢ ⬈[h,V] L2 & ⦃G,L1.ⓑ{I}V⦄ ⊢ ⬈[h,T] L2.ⓑ{I}V.
 /2 width=2 by rex_inv_bind/ qed-.
 
-lemma rpx_inv_flat: ∀h,I,G,L1,L2,V,T. ⦃G, L1⦄ ⊢ ⬈[h, ⓕ{I}V.T] L2 →
-                    ∧∧ ⦃G, L1⦄ ⊢ ⬈[h, V] L2 & ⦃G, L1⦄ ⊢ ⬈[h, T] L2.
+lemma rpx_inv_flat: ∀h,I,G,L1,L2,V,T. ⦃G,L1⦄ ⊢ ⬈[h,ⓕ{I}V.T] L2 →
+                    ∧∧ ⦃G,L1⦄ ⊢ ⬈[h,V] L2 & ⦃G,L1⦄ ⊢ ⬈[h,T] L2.
 /2 width=2 by rex_inv_flat/ qed-.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma rpx_inv_sort_bind_sn: ∀h,I1,G,Y2,L1,s. ⦃G, L1.ⓘ{I1}⦄ ⊢ ⬈[h, ⋆s] Y2 →
-                            ∃∃I2,L2. ⦃G, L1⦄ ⊢ ⬈[h, ⋆s] L2 & Y2 = L2.ⓘ{I2}.
+lemma rpx_inv_sort_bind_sn: ∀h,I1,G,Y2,L1,s. ⦃G,L1.ⓘ{I1}⦄ ⊢ ⬈[h,⋆s] Y2 →
+                            ∃∃I2,L2. ⦃G,L1⦄ ⊢ ⬈[h,⋆s] L2 & Y2 = L2.ⓘ{I2}.
 /2 width=2 by rex_inv_sort_bind_sn/ qed-.
 
-lemma rpx_inv_sort_bind_dx: ∀h,I2,G,Y1,L2,s. ⦃G, Y1⦄ ⊢ ⬈[h, ⋆s] L2.ⓘ{I2} →
-                            ∃∃I1,L1. ⦃G, L1⦄ ⊢ ⬈[h, ⋆s] L2 & Y1 = L1.ⓘ{I1}.
+lemma rpx_inv_sort_bind_dx: ∀h,I2,G,Y1,L2,s. ⦃G,Y1⦄ ⊢ ⬈[h,⋆s] L2.ⓘ{I2} →
+                            ∃∃I1,L1. ⦃G,L1⦄ ⊢ ⬈[h,⋆s] L2 & Y1 = L1.ⓘ{I1}.
 /2 width=2 by rex_inv_sort_bind_dx/ qed-.
 
-lemma rpx_inv_zero_pair_sn: ∀h,I,G,Y2,L1,V1. ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈[h, #0] Y2 →
-                            ∃∃L2,V2. ⦃G, L1⦄ ⊢ ⬈[h, V1] L2 & ⦃G, L1⦄ ⊢ V1 ⬈[h] V2 &
+lemma rpx_inv_zero_pair_sn: ∀h,I,G,Y2,L1,V1. ⦃G,L1.ⓑ{I}V1⦄ ⊢ ⬈[h,#0] Y2 →
+                            ∃∃L2,V2. ⦃G,L1⦄ ⊢ ⬈[h,V1] L2 & ⦃G,L1⦄ ⊢ V1 ⬈[h] V2 &
                                      Y2 = L2.ⓑ{I}V2.
 /2 width=1 by rex_inv_zero_pair_sn/ qed-.
 
-lemma rpx_inv_zero_pair_dx: ∀h,I,G,Y1,L2,V2. ⦃G, Y1⦄ ⊢ ⬈[h, #0] L2.ⓑ{I}V2 →
-                            ∃∃L1,V1. ⦃G, L1⦄ ⊢ ⬈[h, V1] L2 & ⦃G, L1⦄ ⊢ V1 ⬈[h] V2 &
+lemma rpx_inv_zero_pair_dx: ∀h,I,G,Y1,L2,V2. ⦃G,Y1⦄ ⊢ ⬈[h,#0] L2.ⓑ{I}V2 →
+                            ∃∃L1,V1. ⦃G,L1⦄ ⊢ ⬈[h,V1] L2 & ⦃G,L1⦄ ⊢ V1 ⬈[h] V2 &
                                      Y1 = L1.ⓑ{I}V1.
 /2 width=1 by rex_inv_zero_pair_dx/ qed-.
 
-lemma rpx_inv_lref_bind_sn: ∀h,I1,G,Y2,L1,i. ⦃G, L1.ⓘ{I1}⦄ ⊢ ⬈[h, #↑i] Y2 →
-                            ∃∃I2,L2. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 & Y2 = L2.ⓘ{I2}.
+lemma rpx_inv_lref_bind_sn: ∀h,I1,G,Y2,L1,i. ⦃G,L1.ⓘ{I1}⦄ ⊢ ⬈[h,#↑i] Y2 →
+                            ∃∃I2,L2. ⦃G,L1⦄ ⊢ ⬈[h,#i] L2 & Y2 = L2.ⓘ{I2}.
 /2 width=2 by rex_inv_lref_bind_sn/ qed-.
 
-lemma rpx_inv_lref_bind_dx: ∀h,I2,G,Y1,L2,i. ⦃G, Y1⦄ ⊢ ⬈[h, #↑i] L2.ⓘ{I2} →
-                            ∃∃I1,L1. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 & Y1 = L1.ⓘ{I1}.
+lemma rpx_inv_lref_bind_dx: ∀h,I2,G,Y1,L2,i. ⦃G,Y1⦄ ⊢ ⬈[h,#↑i] L2.ⓘ{I2} →
+                            ∃∃I1,L1. ⦃G,L1⦄ ⊢ ⬈[h,#i] L2 & Y1 = L1.ⓘ{I1}.
 /2 width=2 by rex_inv_lref_bind_dx/ qed-.
 
-lemma rpx_inv_gref_bind_sn: ∀h,I1,G,Y2,L1,l. ⦃G, L1.ⓘ{I1}⦄ ⊢ ⬈[h, §l] Y2 →
-                            ∃∃I2,L2. ⦃G, L1⦄ ⊢ ⬈[h, §l] L2 & Y2 = L2.ⓘ{I2}.
+lemma rpx_inv_gref_bind_sn: ∀h,I1,G,Y2,L1,l. ⦃G,L1.ⓘ{I1}⦄ ⊢ ⬈[h,§l] Y2 →
+                            ∃∃I2,L2. ⦃G,L1⦄ ⊢ ⬈[h,§l] L2 & Y2 = L2.ⓘ{I2}.
 /2 width=2 by rex_inv_gref_bind_sn/ qed-.
 
-lemma rpx_inv_gref_bind_dx: ∀h,I2,G,Y1,L2,l. ⦃G, Y1⦄ ⊢ ⬈[h, §l] L2.ⓘ{I2} →
-                            ∃∃I1,L1. ⦃G, L1⦄ ⊢ ⬈[h, §l] L2 & Y1 = L1.ⓘ{I1}.
+lemma rpx_inv_gref_bind_dx: ∀h,I2,G,Y1,L2,l. ⦃G,Y1⦄ ⊢ ⬈[h,§l] L2.ⓘ{I2} →
+                            ∃∃I1,L1. ⦃G,L1⦄ ⊢ ⬈[h,§l] L2 & Y1 = L1.ⓘ{I1}.
 /2 width=2 by rex_inv_gref_bind_dx/ qed-.
 
 (* Basic forward lemmas *****************************************************)
 
 lemma rpx_fwd_pair_sn: ∀h,I,G,L1,L2,V,T.
-                       ⦃G, L1⦄ ⊢ ⬈[h, ②{I}V.T] L2 → ⦃G, L1⦄ ⊢ ⬈[h, V] L2.
+                       ⦃G,L1⦄ ⊢ ⬈[h,②{I}V.T] L2 → ⦃G,L1⦄ ⊢ ⬈[h,V] L2.
 /2 width=3 by rex_fwd_pair_sn/ qed-.
 
 lemma rpx_fwd_bind_dx: ∀h,p,I,G,L1,L2,V,T.
-                       ⦃G, L1⦄ ⊢ ⬈[h, ⓑ{p,I}V.T] L2 → ⦃G, L1.ⓑ{I}V⦄ ⊢ ⬈[h, T] L2.ⓑ{I}V.
+                       ⦃G,L1⦄ ⊢ ⬈[h,ⓑ{p,I}V.T] L2 → ⦃G,L1.ⓑ{I}V⦄ ⊢ ⬈[h,T] L2.ⓑ{I}V.
 /2 width=2 by rex_fwd_bind_dx/ qed-.
 
 lemma rpx_fwd_flat_dx: ∀h,I,G,L1,L2,V,T.
-                       ⦃G, L1⦄ ⊢ ⬈[h, ⓕ{I}V.T] L2 → ⦃G, L1⦄ ⊢ ⬈[h, T] L2.
+                       ⦃G,L1⦄ ⊢ ⬈[h,ⓕ{I}V.T] L2 → ⦃G,L1⦄ ⊢ ⬈[h,T] L2.
 /2 width=3 by rex_fwd_flat_dx/ qed-.
index 8a71e9b6a334d8119e038a3c1febce5222f93136..43f6f81b296e9fc4b965fd88c5ae447b29492cd1 100644 (file)
@@ -22,18 +22,18 @@ include "basic_2/rt_transition/rpx.ma".
 lemma rpx_refl: ∀h,G,T. reflexive … (rpx h G T).
 /2 width=1 by rex_refl/ qed.
 
-lemma rpx_pair_refl: ∀h,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 →
-                     ∀I,T. ⦃G, L.ⓑ{I}V1⦄ ⊢ ⬈[h, T] L.ⓑ{I}V2.
+lemma rpx_pair_refl: ∀h,G,L,V1,V2. ⦃G,L⦄ ⊢ V1 ⬈[h] V2 →
+                     ∀I,T. ⦃G,L.ⓑ{I}V1⦄ ⊢ ⬈[h,T] L.ⓑ{I}V2.
 /2 width=1 by rex_pair_refl/ qed.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma rpx_inv_bind_void: ∀h,p,I,G,L1,L2,V,T. ⦃G, L1⦄ ⊢ ⬈[h, ⓑ{p,I}V.T] L2 →
-                         ∧∧ ⦃G, L1⦄ ⊢ ⬈[h, V] L2 & ⦃G, L1.ⓧ⦄ ⊢ ⬈[h, T] L2.ⓧ.
+lemma rpx_inv_bind_void: ∀h,p,I,G,L1,L2,V,T. ⦃G,L1⦄ ⊢ ⬈[h,ⓑ{p,I}V.T] L2 →
+                         ∧∧ ⦃G,L1⦄ ⊢ ⬈[h,V] L2 & ⦃G,L1.ⓧ⦄ ⊢ ⬈[h,T] L2.ⓧ.
 /2 width=3 by rex_inv_bind_void/ qed-.
 
 (* Advanced forward lemmas **************************************************)
 
 lemma rpx_fwd_bind_dx_void: ∀h,p,I,G,L1,L2,V,T.
-                            ⦃G, L1⦄ ⊢ ⬈[h, ⓑ{p,I}V.T] L2 → ⦃G, L1.ⓧ⦄ ⊢ ⬈[h, T] L2.ⓧ.
+                            ⦃G,L1⦄ ⊢ ⬈[h,ⓑ{p,I}V.T] L2 → ⦃G,L1.ⓧ⦄ ⊢ ⬈[h,T] L2.ⓧ.
 /2 width=4 by rex_fwd_bind_dx_void/ qed-.
index fd4ddc459e41cd81b4cd9ebe8f33fcb78937a4df..b610f09586a981a271454aaa4ecd7fbebecc2f85 100644 (file)
@@ -24,10 +24,10 @@ include "basic_2/rt_transition/rpx_fqup.ma".
 
 (* Note: "⦃L2, T1⦄ ⊆ ⦃L2, T0⦄" does not hold *)
 (* Note: Take L0 = K0.ⓓ(ⓝW.V), L2 = K0.ⓓW, T0 = #0, T1 = ⬆*[1]V *)
-(* Note: This invalidates rpxs_cpx_conf: "∀h,G. s_r_confluent1 … (cpx h G) (rpxs h G)" *)
-lemma rpx_cpx_conf_fsge (h) (G): ∀L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ⬈[h] T1 →
-                                 ∀L2. ⦃G, L0⦄ ⊢⬈[h, T0] L2 → ⦃L2, T1⦄ ⊆ ⦃L0, T0⦄.
-#h #G0 #L0 #T0 @(fqup_wf_ind_eq (â\92») … G0 L0 T0) -G0 -L0 -T0
+(* Note: This invalidates rpxs_cpx_conf: "∀h, G. s_r_confluent1 … (cpx h G) (rpxs h G)" *)
+lemma rpx_cpx_conf_fsge (h) (G): ∀L0,T0,T1. ⦃G,L0⦄ ⊢ T0 ⬈[h] T1 →
+                                 ∀L2. ⦃G,L0⦄ ⊢⬈[h,T0] L2 → ⦃L2,T1⦄ ⊆ ⦃L0,T0⦄.
+#h #G0 #L0 #T0 @(fqup_wf_ind_eq (â\93\89) … G0 L0 T0) -G0 -L0 -T0
 #G #L #T #IH #G0 #L0 * *
 [ #s #HG #HL #HT #X #HX #Y #HY destruct -IH
   elim (cpx_inv_sort1 … HX) -HX #H destruct
@@ -133,6 +133,6 @@ lemma cpx_rex_conf (R) (h) (G): s_r_confluent1 … (cpx h G) (rex R).
 lemma rpx_cpx_conf (h) (G): s_r_confluent1 … (cpx h G) (rpx h G).
 /2 width=5 by cpx_rex_conf/ qed-.
 
-lemma rpx_cpx_conf_fsge_dx (h) (G): ∀L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ⬈[h] T1 →
-                                    ∀L2. ⦃G, L0⦄ ⊢⬈[h, T0] L2 → ⦃L2, T1⦄ ⊆ ⦃L0, T1⦄.
+lemma rpx_cpx_conf_fsge_dx (h) (G): ∀L0,T0,T1. ⦃G,L0⦄ ⊢ T0 ⬈[h] T1 →
+                                    ∀L2. ⦃G,L0⦄ ⊢⬈[h,T0] L2 → ⦃L2,T1⦄ ⊆ ⦃L0,T1⦄.
 /3 width=5 by rpx_cpx_conf, rpx_fsge_comp/ qed-.
index 209b010ed06fe3c4711c285237869317b24989a9..45a052c6764800f9420a506f6ea4e2d907d02b13 100644 (file)
@@ -19,15 +19,15 @@ include "basic_2/rt_transition/rpx.ma".
 
 (* Forward lemmas with length for local environments ************************)
 
-lemma rpx_fwd_length: ∀h,G,L1,L2,T. ⦃G, L1⦄ ⊢ ⬈[h, T] L2 → |L1| = |L2|.
+lemma rpx_fwd_length: ∀h,G,L1,L2,T. ⦃G,L1⦄ ⊢ ⬈[h,T] L2 → |L1| = |L2|.
 /2 width=3 by rex_fwd_length/ qed-.
 
 (* Inversion lemmas with length for local environments **********************)
 
-lemma rpx_inv_zero_length: ∀h,G,Y1,Y2. ⦃G, Y1⦄ ⊢ ⬈[h, #0] Y2 →
+lemma rpx_inv_zero_length: ∀h,G,Y1,Y2. ⦃G,Y1⦄ ⊢ ⬈[h,#0] Y2 →
                            ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆
-                            | ∃∃I,L1,L2,V1,V2. ⦃G, L1⦄ ⊢ ⬈[h, V1] L2 &
-                                               ⦃G, L1⦄ ⊢ V1 ⬈[h] V2 &
+                            | ∃∃I,L1,L2,V1,V2. ⦃G,L1⦄ ⊢ ⬈[h,V1] L2 &
+                                               ⦃G,L1⦄ ⊢ V1 ⬈[h] V2 &
                                                Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2
                             | ∃∃I,L1,L2. |L1| = |L2| & Y1 = L1.ⓤ{I} & Y2 = L2.ⓤ{I}.
 /2 width=1 by rex_inv_zero_length/ qed-.
index 24e840b1f1a528eb7877c515c327861203859907..ba4a29ec5d513a0b33dda2d4549e882750ea25c2 100644 (file)
@@ -20,16 +20,16 @@ include "basic_2/rt_transition/lpx.ma".
 
 (* Properties with syntactic equivalence for referred local environments ****)
 
-lemma fleq_rpx (h) (G): ∀L1,L2,T. L1 ≡[T] L2 → ⦃G, L1⦄ ⊢ ⬈[h, T] L2.
+lemma fleq_rpx (h) (G): ∀L1,L2,T. L1 ≡[T] L2 → ⦃G,L1⦄ ⊢ ⬈[h,T] L2.
 /2 width=1 by req_fwd_rex/ qed.
 
 (* Properties with unbound parallel rt-transition for full local envs *******)
 
-lemma lpx_rpx: ∀h,G,L1,L2,T. ⦃G, L1⦄ ⊢ ⬈[h] L2 → ⦃G, L1⦄ ⊢ ⬈[h, T] L2.
+lemma lpx_rpx: ∀h,G,L1,L2,T. ⦃G,L1⦄ ⊢ ⬈[h] L2 → ⦃G,L1⦄ ⊢ ⬈[h,T] L2.
 /2 width=1 by rex_lex/ qed.
 
 (* Inversion lemmas with unbound parallel rt-transition for full local envs *)
 
-lemma rpx_inv_lpx_req: ∀h,G,L1,L2,T. ⦃G, L1⦄ ⊢ ⬈[h, T] L2 →
-                       ∃∃L. ⦃G, L1⦄ ⊢ ⬈[h] L & L ≡[T] L2.
+lemma rpx_inv_lpx_req: ∀h,G,L1,L2,T. ⦃G,L1⦄ ⊢ ⬈[h,T] L2 →
+                       ∃∃L. ⦃G,L1⦄ ⊢ ⬈[h] L & L ≡[T] L2.
 /3 width=3 by rpx_fsge_comp, rex_inv_lex_req/ qed-.
index b43cbfd042d6faf1d62eb633d926f0be883c21e9..b8117c0477ab8eeb9ecc47762b36a4cba2e74ced 100644 (file)
@@ -19,36 +19,36 @@ include "basic_2/rt_transition/rpx_fsle.ma".
 
 (* UNBOUND PARALLEL RT-TRANSITION FOR REFERRED LOCAL ENVIRONMENTS ***********)
 
-(* Properties with degree-based equivalence for local environments **********)
+(* Properties with sort-irrelevant equivalence for local environments *******)
 
-lemma rpx_pair_sn_split: ∀h,G,L1,L2,V. ⦃G, L1⦄ ⊢ ⬈[h, V] L2 → ∀o,I,T.
-                         ∃∃L. ⦃G, L1⦄ ⊢ ⬈[h, ②{I}V.T] L & L ≛[h, o, V] L2.
+lemma rpx_pair_sn_split: ∀h,G,L1,L2,V. ⦃G,L1⦄ ⊢ ⬈[h,V] L2 → ∀I,T.
+                         ∃∃L. ⦃G,L1⦄ ⊢ ⬈[h,②{I}V.T] L & L ≛[V] L2.
 /3 width=5 by rpx_fsge_comp, rex_pair_sn_split/ qed-.
 
-lemma rpx_flat_dx_split: ∀h,G,L1,L2,T. ⦃G, L1⦄ ⊢ ⬈[h, T] L2 → ∀o,I,V.
-                         ∃∃L. ⦃G, L1⦄ ⊢ ⬈[h, ⓕ{I}V.T] L & L ≛[h, o, T] L2.
+lemma rpx_flat_dx_split: ∀h,G,L1,L2,T. ⦃G,L1⦄ ⊢ ⬈[h,T] L2 → ∀I,V.
+                         ∃∃L. ⦃G,L1⦄ ⊢ ⬈[h,ⓕ{I}V.T] L & L ≛[T] L2.
 /3 width=5 by rpx_fsge_comp, rex_flat_dx_split/ qed-.
 
-lemma rpx_bind_dx_split: ∀h,I,G,L1,L2,V1,T. ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈[h, T] L2 → ∀o,p.
-                         ∃∃L,V. ⦃G, L1⦄ ⊢ ⬈[h, ⓑ{p,I}V1.T] L & L.ⓑ{I}V ≛[h, o, T] L2 & ⦃G, L1⦄ ⊢ V1 ⬈[h] V.
+lemma rpx_bind_dx_split: ∀h,I,G,L1,L2,V1,T. ⦃G,L1.ⓑ{I}V1⦄ ⊢ ⬈[h,T] L2 → ∀p.
+                         ∃∃L,V. ⦃G,L1⦄ ⊢ ⬈[h,ⓑ{p,I}V1.T] L & L.ⓑ{I}V ≛[T] L2 & ⦃G,L1⦄ ⊢ V1 ⬈[h] V.
 /3 width=5 by rpx_fsge_comp, rex_bind_dx_split/ qed-.
 
-lemma rpx_bind_dx_split_void: ∀h,G,K1,L2,T. ⦃G, K1.ⓧ⦄ ⊢ ⬈[h, T] L2 → ∀o,p,I,V.
-                              ∃∃K2. ⦃G, K1⦄ ⊢ ⬈[h, ⓑ{p,I}V.T] K2 & K2.ⓧ ≛[h, o, T] L2.
+lemma rpx_bind_dx_split_void: ∀h,G,K1,L2,T. ⦃G,K1.ⓧ⦄ ⊢ ⬈[h,T] L2 → ∀p,I,V.
+                              ∃∃K2. ⦃G,K1⦄ ⊢ ⬈[h,ⓑ{p,I}V.T] K2 & K2.ⓧ ≛[T] L2.
 /3 width=5 by rpx_fsge_comp, rex_bind_dx_split_void/ qed-.
 
-lemma rpx_tdeq_conf: ∀h,o,G. s_r_confluent1 … (cdeq h o) (rpx h G).
+lemma rpx_tdeq_conf: ∀h,G. s_r_confluent1 … cdeq (rpx h G).
 /2 width=5 by tdeq_rex_conf/ qed-.
 
-lemma rpx_tdeq_div: ∀h,o,T1,T2. T1 ≛[h, o] T2 →
-                    ∀G,L1,L2. ⦃G, L1⦄ ⊢ ⬈[h, T2] L2 → ⦃G, L1⦄ ⊢ ⬈[h, T1] L2.
+lemma rpx_tdeq_div: ∀h,T1,T2. T1 ≛ T2 →
+                    ∀G,L1,L2. ⦃G,L1⦄ ⊢ ⬈[h,T2] L2 → ⦃G,L1⦄ ⊢ ⬈[h,T1] L2.
 /2 width=5 by tdeq_rex_div/ qed-.
 
-lemma cpx_tdeq_conf_sex: ∀h,o,G. R_confluent2_rex … (cpx h G) (cdeq h o) (cpx h G) (cdeq h o).
-#h #o #G #L0 #T0 #T1 #H @(cpx_ind … H) -G -L0 -T0 -T1 /2 width=3 by ex2_intro/
+lemma cpx_tdeq_conf_rex: ∀h,G. R_confluent2_rex … (cpx h G) cdeq (cpx h G) cdeq.
+#h #G #L0 #T0 #T1 #H @(cpx_ind … H) -G -L0 -T0 -T1 /2 width=3 by ex2_intro/
 [ #G #L0 #s0 #X0 #H0 #L1 #HL01 #L2 #HL02
-  elim (tdeq_inv_sort1 … H0) -H0 #s1 #d1 #Hs0 #Hs1 #H destruct
-  /4 width=3 by tdeq_sort, deg_next, ex2_intro/
+  elim (tdeq_inv_sort1 … H0) -H0 #s1 #H destruct
+  /3 width=3 by tdeq_sort, ex2_intro/
 | #I #G #K0 #V0 #V1 #W1 #_ #IH #HVW1 #T2 #H0 #L1 #H1 #L2 #H2
   >(tdeq_inv_lref1 … H0) -H0
   elim (rpx_inv_zero_pair_sn … H1) -H1 #K1 #X1 #HK01 #HX1 #H destruct
@@ -125,46 +125,46 @@ lemma cpx_tdeq_conf_sex: ∀h,o,G. R_confluent2_rex … (cpx h G) (cdeq h o) (cp
 ]
 qed-.
 
-lemma cpx_tdeq_conf: ∀h,o,G,L. ∀T0:term. ∀T1. ⦃G, L⦄ ⊢ T0 ⬈[h] T1 →
-                     ∀T2. T0 ≛[h, o] T2 →
-                     ∃∃T. T1 ≛[h, o] T & ⦃G, L⦄ ⊢ T2 ⬈[h] T.
-#h #o #G #L #T0 #T1 #HT01 #T2 #HT02
-elim (cpx_tdeq_conf_sex … HT01 … HT02 L … L) -HT01 -HT02
+lemma cpx_tdeq_conf: ∀h,G,L. ∀T0:term. ∀T1. ⦃G,L⦄ ⊢ T0 ⬈[h] T1 →
+                     ∀T2. T0 ≛ T2 →
+                     ∃∃T. T1 ≛ T & ⦃G,L⦄ ⊢ T2 ⬈[h] T.
+#h #G #L #T0 #T1 #HT01 #T2 #HT02
+elim (cpx_tdeq_conf_rex … HT01 … HT02 L … L) -HT01 -HT02
 /2 width=3 by rex_refl, ex2_intro/
 qed-.
 
-lemma tdeq_cpx_trans: ∀h,o,G,L,T2. ∀T0:term. T2 ≛[h, o] T0 →
-                      ∀T1. ⦃G, L⦄ ⊢ T0 ⬈[h] T1 → 
-                      ∃∃T. ⦃G, L⦄ ⊢ T2 ⬈[h] T & T ≛[h, o] T1.
-#h #o #G #L #T2 #T0 #HT20 #T1 #HT01
+lemma tdeq_cpx_trans: ∀h,G,L,T2. ∀T0:term. T2 ≛ T0 →
+                      ∀T1. ⦃G,L⦄ ⊢ T0 ⬈[h] T1 → 
+                      ∃∃T. ⦃G,L⦄ ⊢ T2 ⬈[h] T & T ≛ T1.
+#h #G #L #T2 #T0 #HT20 #T1 #HT01
 elim (cpx_tdeq_conf … HT01 T2) -HT01 /3 width=3 by tdeq_sym, ex2_intro/
 qed-.
 
 (* Basic_2A1: uses: cpx_lleq_conf *)
-lemma cpx_rdeq_conf: ∀h,o,G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ⬈[h] T1 →
-                     ∀L2. L0 ≛[h, o, T0] L2 →
-                     ∃∃T. ⦃G, L2⦄ ⊢ T0 ⬈[h] T & T1 ≛[h, o] T.
-#h #o #G #L0 #T0 #T1 #HT01 #L2 #HL02
-elim (cpx_tdeq_conf_sex … HT01 T0 … L0 … HL02) -HT01 -HL02
+lemma cpx_rdeq_conf: ∀h,G,L0,T0,T1. ⦃G,L0⦄ ⊢ T0 ⬈[h] T1 →
+                     ∀L2. L0 ≛[T0] L2 →
+                     ∃∃T. ⦃G,L2⦄ ⊢ T0 ⬈[h] T & T1 ≛ T.
+#h #G #L0 #T0 #T1 #HT01 #L2 #HL02
+elim (cpx_tdeq_conf_rex … HT01 T0 … L0 … HL02) -HT01 -HL02
 /2 width=3 by rex_refl, ex2_intro/
 qed-.
 
 (* Basic_2A1: uses: lleq_cpx_trans *)
-lemma rdeq_cpx_trans: ∀h,o,G,L2,L0,T0. L2 ≛[h, o, T0] L0 →
-                      ∀T1. ⦃G, L0⦄ ⊢ T0 ⬈[h] T1 →
-                      ∃∃T. ⦃G, L2⦄ ⊢ T0 ⬈[h] T & T ≛[h, o] T1.
-#h #o #G #L2 #L0 #T0 #HL20 #T1 #HT01
-elim (cpx_rdeq_conf … o … HT01 L2) -HT01
+lemma rdeq_cpx_trans: ∀h,G,L2,L0,T0. L2 ≛[T0] L0 →
+                      ∀T1. ⦃G,L0⦄ ⊢ T0 ⬈[h] T1 →
+                      ∃∃T. ⦃G,L2⦄ ⊢ T0 ⬈[h] T & T ≛ T1.
+#h #G #L2 #L0 #T0 #HL20 #T1 #HT01
+elim (cpx_rdeq_conf … HT01 L2) -HT01
 /3 width=3 by rdeq_sym, tdeq_sym, ex2_intro/
 qed-.
 
-lemma rpx_rdeq_conf: ∀h,o,G,T. confluent2 … (rpx h G T) (rdeq h o T).
-/3 width=6 by rpx_fsge_comp, rdeq_fsge_comp, cpx_tdeq_conf_sex, rex_conf/ qed-.
+lemma rpx_rdeq_conf: ∀h,G,T. confluent2 … (rpx h G T) (rdeq T).
+/3 width=6 by rpx_fsge_comp, rdeq_fsge_comp, cpx_tdeq_conf_rex, rex_conf/ qed-.
 
-lemma rdeq_rpx_trans: ∀h,o,G,T,L2,K2. ⦃G, L2⦄ ⊢ ⬈[h, T] K2 →
-                      ∀L1. L1 ≛[h, o, T] L2 →
-                      ∃∃K1. ⦃G, L1⦄ ⊢ ⬈[h, T] K1 & K1 ≛[h, o, T] K2.
-#h #o #G #T #L2 #K2 #HLK2 #L1 #HL12
-elim (rpx_rdeq_conf … o … HLK2 L1)
+lemma rdeq_rpx_trans: ∀h,G,T,L2,K2. ⦃G,L2⦄ ⊢ ⬈[h,T] K2 →
+                      ∀L1. L1 ≛[T] L2 →
+                      ∃∃K1. ⦃G,L1⦄ ⊢ ⬈[h,T] K1 & K1 ≛[T] K2.
+#h #G #T #L2 #K2 #HLK2 #L1 #HL12
+elim (rpx_rdeq_conf … HLK2 L1)
 /3 width=3 by rdeq_sym, ex2_intro/
 qed-.
index 56899e45ddeaac854a9fc0e7654abd4749c597ee..8b6716c10ddc9c9141a3a4ac9b47dddceccd4a70 100644 (file)
@@ -19,16 +19,16 @@ include "basic_2/rt_transition/rpx.ma".
 
 (* Main properties **********************************************************)
 
-theorem rpx_bind: ∀h,G,L1,L2,V1. ⦃G, L1⦄ ⊢ ⬈[h, V1] L2 →
-                  ∀I,V2,T. ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈[h, T] L2.ⓑ{I}V2 →
-                  ∀p. ⦃G, L1⦄ ⊢ ⬈[h, ⓑ{p,I}V1.T] L2.
+theorem rpx_bind: ∀h,G,L1,L2,V1. ⦃G,L1⦄ ⊢ ⬈[h,V1] L2 →
+                  ∀I,V2,T. ⦃G,L1.ⓑ{I}V1⦄ ⊢ ⬈[h,T] L2.ⓑ{I}V2 →
+                  ∀p. ⦃G,L1⦄ ⊢ ⬈[h,ⓑ{p,I}V1.T] L2.
 /2 width=2 by rex_bind/ qed.
 
-theorem rpx_flat: ∀h,G,L1,L2,V. ⦃G, L1⦄ ⊢ ⬈[h, V] L2 →
-                  ∀I,T. ⦃G, L1⦄ ⊢ ⬈[h, T] L2 → ⦃G, L1⦄ ⊢ ⬈[h, ⓕ{I}V.T] L2.
+theorem rpx_flat: ∀h,G,L1,L2,V. ⦃G,L1⦄ ⊢ ⬈[h,V] L2 →
+                  ∀I,T. ⦃G,L1⦄ ⊢ ⬈[h,T] L2 → ⦃G,L1⦄ ⊢ ⬈[h,ⓕ{I}V.T] L2.
 /2 width=1 by rex_flat/ qed.
 
-theorem rpx_bind_void: ∀h,G,L1,L2,V. ⦃G, L1⦄ ⊢ ⬈[h, V] L2 →
-                       ∀T. ⦃G, L1.ⓧ⦄ ⊢ ⬈[h, T] L2.ⓧ →
-                       ∀p,I. ⦃G, L1⦄ ⊢ ⬈[h, ⓑ{p,I}V.T] L2.
+theorem rpx_bind_void: ∀h,G,L1,L2,V. ⦃G,L1⦄ ⊢ ⬈[h,V] L2 →
+                       ∀T. ⦃G,L1.ⓧ⦄ ⊢ ⬈[h,T] L2.ⓧ →
+                       ∀p,I. ⦃G,L1⦄ ⊢ ⬈[h,ⓑ{p,I}V.T] L2.
 /2 width=1 by rex_bind_void/ qed.
index 66fb5e30c9db52626deb2aaafa8994454cb793c5..1be3304c95f9752a36c39238bca256f904f543e2 100644 (file)
    <table name="basic_2_sum"/>
 
    <subsection name="B">Stage "B"</subsection>
+   <news class="beta" date="2019 September 3.">
+         Applicability condition is now parametrized
+         with a generic subset of numbers.
+   </news>
+   <news class="beta" date="2019 June 2.">
+         Applicability condition parametrized
+         with an initial interval of numbers
+         allows λδ-2B to generalize both λδ-2A and λδ-1B.
+   </news>
+   <news class="beta" date="2019 April 16.">
+         Extended (λδ-2A) and restricted (λδ-1B) validity is decidable
+         (anniversary milestone).
+   </news>
+   <news class="beta" date="2019 March 25.">
+         Preservation of validity for rt-computation
+         does not need the sort degree parameter
+         (i.e. no induction on the degree).
+   </news>
    <news class="beta" date="2018 November 1.">
-         Extended (λδ-2) and restricted (λδ-1) type rules justified.
+         Extended (λδ-2A) and restricted (λδ-1A) type rules justified.
    </news>
    <news class="alpha" date="2018 September 21.">
          λδ-2A completed with
index 850588ce1fe30ac73e1e3b6045b351d98272ea60..4176396a0b38f03f87019622dedc351336d00146 100644 (file)
@@ -12,7 +12,7 @@ table {
    class "wine"
    [ { "iterated dynamic typing" * } {
         [ { "context-sensitive iterated native type assignment" * } {
-             [ [ "for terms" ] "ntas" + "( ⦃?,?⦄ ⊢ ? :[?,?,?] ? )" + "( ⦃?,?⦄ ⊢ ? :[?,?] ? )" + "( ⦃?,?⦄ ⊢ ? :*[?,?] ? )" * ] 
+             [ [ "for terms" ] "ntas" + "( ⦃?,?⦄ ⊢ ? :*[?,?,?] ? )" "ntas_nta" + "ntas_preserve" * ]
           }
         ]
      }
@@ -20,12 +20,12 @@ table {
    class "magenta"
    [ { "dynamic typing" * } {
         [ { "context-sensitive native type assignment" * } {
-             [ [ "for terms" ] "nta" + "( ⦃?,?⦄ ⊢ ? :[?,?] ? )" + "( ⦃?,?⦄ ⊢ ? :[?] ? )" + "( ⦃?,?⦄ ⊢ ? :*[?] ? )" "nta_drops" + "nta_aaa" + "nta_fsb" + "nta_cpms" + "nta_cpcs" + "nta_preserve" + "nta_preserve_cpcs" + "nta_ind" * ]
+             [ [ "for terms" ] "nta" + "( ⦃?,?⦄ ⊢ ? :[?,?] ? )" "nta_drops" + "nta_aaa" + "nta_fsb" + "nta_cpms" + "nta_cpcs" + "nta_preserve" + "nta_preserve_cpcs" + "nta_ind" + "nta_eval" * ]
           }
         ]
         [ { "context-sensitive native validity" * } {
              [ [ "restricted refinement for lenvs" ] "lsubv ( ? ⊢ ? ⫃![?,?] ? )" "lsubv_drops" + "lsubv_lsubr" + "lsubv_lsuba" + "lsubv_cpms" + "lsubv_cpcs" + "lsubv_cnv" + "lsubv_lsubv" * ]
-             [ [ "for terms" ] "cnv" + "( ⦃?,?⦄ ⊢ ? ![?,?] )" + "( ⦃?,?⦄ ⊢ ? ![?] )" + "( ⦃?,?⦄ ⊢ ? !*[?] )" "cnv_drops" + "cnv_fqus" + "cnv_aaa" + "cnv_fsb" + "cnv_cpm_trans" + "cnv_cpm_conf" + "cnv_cpm_tdeq" + "cnv_cpm_tdeq_trans" + "cnv_cpm_tdeq_conf" + "cnv_cpms_tdeq" + "cnv_cpms_conf" + "cnv_cpms_tdeq_conf" + "cnv_cpcs" + "cnv_preserve_sub" + "cnv_preserve" * ]
+             [ [ "for terms" ] "cnv" + "( ⦃?,?⦄ ⊢ ? ![?,?] )" "cnv_acle" + "cnv_drops" + "cnv_fqus" + "cnv_aaa" + "cnv_fsb" + "cnv_cpm_trans" + "cnv_cpm_conf" + "cnv_cpm_tdeq" + "cnv_cpm_tdeq_trans" + "cnv_cpm_tdeq_conf" + "cnv_cpms_tdeq" + "cnv_cpms_conf" + "cnv_cpms_tdeq_conf" + "cnv_cpme" + "cnv_cpmuwe" + "cnv_cpmuwe_cpme" + "cnv_eval" + "cnv_cpce" + "cnv_cpes" + "cnv_cpcs" + "cnv_preserve_sub" + "cnv_preserve" + "cnv_preserve_cpes" + "cnv_preserve_cpcs" * ]
           }
         ]
      }
@@ -33,7 +33,11 @@ table {
    class "prune"
    [ { "rt-equivalence" * } {        
         [ { "context-sensitive parallel r-equivalence" * } {
-             [ [ "for terms" ] "cpcs ( ⦃?,?⦄ ⊢ ? ⬌*[?] ? )" "cpcs_drops" + "cpcs_lsubr" + "cpcs_aaa" + "cpcs_cprs" + "cpcs_lprs" + "cpcs_cpc" + "cpcs_cpcs" * ]
+             [ [ "for terms" ] "cpcs ( ⦃?,?⦄ ⊢ ? ⬌*[?] ? )" "cpcs_drops" + "cpcs_lsubr" + "cpcs_aaa" + "cpcs_csx" + "cpcs_cprs" + "cpcs_lprs" + "cpcs_cpc" + "cpcs_cpcs" * ]
+          }
+        ]
+        [ { "t-bound context-sensitive parallel rt-equivalence" * } {
+             [ [ "for terms" ] "cpes ( ⦃?,?⦄ ⊢ ? ⬌*[?,?,?] ? )" "cpes_aaa" + "cpes_cpms" + "cpes_cpes" * ]
           }
         ]
      }
@@ -43,7 +47,7 @@ table {
         [ { "context-sensitive parallel eta-conversion" * } {
              [ [ "for lenvs on all entries" ] "lpce ( ⦃?,?⦄ ⊢ ⬌η[?] ? )" * ]
              [ [ "for binders" ] "cpce_ext" + "( ⦃?,?⦄ ⊢ ? ⬌η[?] ? )" * ]
-             [ [ "for terms" ] "cpce" + "( ⦃?,?⦄ ⊢ ? ⬌η[?] ? )" * ]
+             [ [ "for terms" ] "cpce" + "( ⦃?,?⦄ ⊢ ? ⬌η[?] ? )" "cpce_drops" * ]
           }
         ]
         [ { "context-sensitive parallel r-conversion" * } {
@@ -55,56 +59,61 @@ table {
    class "sky"
    [ { "rt-computation" * } {
         [ { "context-sensitive parallel r-computation" * } {
+             [ [ "evaluation for terms" ] "cpre ( ⦃?,?⦄ ⊢ ? ➡*[?] 𝐍⦃?⦄ )" "cpre_csx" + "cpre_cpms" + "cpre_cpre" * ]
              [ [ "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_drops" + "cprs_cpr" + "cprs_lpr" + "cprs_cprs" * ]
+             [ [ "for terms" ] "cprs" + "( ⦃?,?⦄ ⊢ ? ➡*[?] ?)" "cprs_ctc" + "cprs_tweq" + "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" ] "cpme ( ⦃?,?⦄ ⊢ ? ➡*[?,?] 𝐍⦃?⦄ )" "cpme_aaa" * ]
              [ [ "for terms" ] "cpms" + "( ⦃?,?⦄ ⊢ ? ➡*[?,?] ? )" "cpms_drops" + "cpms_lsubr" + "cpms_rdeq" + "cpms_aaa" + "cpms_lpr" + "cpms_cpxs" + "cpms_fpbs" + "cpms_fpbg" + "cpms_cpms" * ]
           }
         ]
         [ { "unbound context-sensitive parallel rst-computation" * } {
-             [ [ "strongly normalizing for closures" ] "fsb" + "( ≥[?,?] 𝐒⦃?,?,?⦄ )" "fsb_fdeq" + "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" * ]
+             [ [ "strongly normalizing for closures" ] "fsb" + "( ≥[?] 𝐒⦃?,?,?⦄ )" "fsb_fdeq" + "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" * ]
           }
         ]
         [ { "unbound context-sensitive parallel rt-computation" * } {
-             [ [ "refinement for lenvs on selected entries" ] "lsubsx" + "( ? ⊢ ? ⊆ⓧ[?,?,?] ? )" "lsubsx_lfsx" + "lsubsx_lsubsx" * ]
-             [ [ "strongly normalizing for lenvs on referred entries" ] "rdsx" + "( ? ⊢ ⬈*[?,?,?] 𝐒⦃?⦄ )" "rdsx_length" + "rdsx_drops" + "rdsx_fqup" + "rdsx_cpxs" + "rdsx_csx" + "rdsx_rdsx" * ]
-             [ [ "strongly normalizing for term vectors" ] "csx_vector" + "( ⦃?,?⦄ ⊢ ⬈*[?,?] 𝐒⦃?⦄ )" "csx_cnx_vector" + "csx_csx_vector" * ]
-             [ [ "strongly normalizing for terms" ] "csx" + "( ⦃?,?⦄ ⊢ ⬈*[?,?] 𝐒⦃?⦄ )" "csx_simple" + "csx_simple_theq" + "csx_drops" + "csx_fqus" + "csx_lsubr" + "csx_rdeq" + "csx_fdeq" + "csx_aaa" + "csx_gcp" + "csx_gcr" + "csx_lpx" + "csx_cnx" + "csx_fpbq" + "csx_cpxs" + "csx_lpxs" + "csx_csx" * ]
+             [ [ "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_toeq" + "csx_drops" + "csx_fqus" + "csx_lsubr" + "csx_rdeq" + "csx_fdeq" + "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_rdeq" + "lpxs_fdeq" + "lpxs_aaa" + "lpxs_lpx" + "lpxs_cpxs" + "lpxs_lpxs" * ]
              [ [ "for binders" ] "cpxs_ext" + "( ⦃?,?⦄ ⊢ ? ⬈*[?] ? )" * ]
-             [ [ "for terms" ] "cpxs" + "( ⦃?,?⦄ ⊢ ? ⬈*[?] ? )" "cpxs_tdeq" + "cpxs_theq" + "cpxs_theq_vector" + "cpxs_drops" + "cpxs_fqus" + "cpxs_lsubr" + "cpxs_rdeq" + "cpxs_fdeq" + "cpxs_aaa" + "cpxs_lpx" + "cpxs_cnx" + "cpxs_cpxs" * ] 
+             [ [ "for terms" ] "cpxs" + "( ⦃?,?⦄ ⊢ ? ⬈*[?] ? )" "cpxs_tdeq" + "cpxs_toeq" + "cpxs_toeq_vector" + "cpxs_drops" + "cpxs_fqus" + "cpxs_lsubr" + "cpxs_rdeq" + "cpxs_fdeq" + "cpxs_aaa" + "cpxs_lpx" + "cpxs_cnx" + "cpxs_cpxs" * ] 
           }
         ]
      }
    ]
    class "cyan"
    [ { "rt-transition" * } {
-        [ { "unbound parallel rst-transition" * } {
-             [ [ "for closures" ] "fpbq" + "( ⦃?,?,?⦄ ≽[?,?] ⦃?,?,?⦄ )" "fpbq_aaa" + "fpbq_fpb" * ]
-             [ [ "proper for closures" ] "fpb" + "( ⦃?,?,?⦄ ≻[?,?] ⦃?,?,?⦄ )" "fpb_rdeq" + "fpb_fdeq" * ]
-          }
-        ]
         [ { "context-sensitive parallel r-transition" * } {
+             [ [ "normal form for terms" ] "cnr ( ⦃?,?⦄ ⊢ ➡[?] 𝐍⦃?⦄ )" "cnr_simple" + "cnr_tdeq" + "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_cpr" * ]
+             [ [ "for terms" ] "cpr" + "( ⦃?,?⦄ ⊢ ? ➡[?] ? )" "cpr_drops" + "cpr_drops_basic" + "cpr_tdeq" + "cpr_cpr" * ]
           }
         ]
         [ { "t-bound context-sensitive parallel rt-transition" * } {
              [ [ "for terms" ] "cpm" + "( ⦃?,?⦄ ⊢ ? ➡[?,?] ? )" "cpm_simple" + "cpm_tdeq" + "cpm_drops" + "cpm_lsubr" + "cpm_fsle" + "cpm_aaa" + "cpm_cpx" * ]
           }
         ]
+        [ { "unbound parallel rst-transition" * } {
+             [ [ "for closures" ] "fpbq" + "( ⦃?,?,?⦄ ≽[?] ⦃?,?,?⦄ )" "fpbq_aaa" + "fpbq_fpb" * ]
+             [ [ "proper for closures" ] "fpb" + "( ⦃?,?,?⦄ ≻[?] ⦃?,?,?⦄ )" "fpb_rdeq" + "fpb_fdeq" * ]
+          }
+        ]
         [ { "unbound context-sensitive parallel rt-transition" * } {
-             [ [ "normal form for terms" ] "cnx" + "( ⦃?,?⦄ ⊢ ⬈[?,?] 𝐍⦃?⦄ )" "cnx_simple" + "cnx_drops" + "cnx_cnx" * ]
+             [ [ "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_rdeq" + "rpx_lpx" + "rpx_rpx" * ]
              [ [ "for lenvs on all entries" ] "lpx" + "( ⦃?,?⦄ ⊢ ⬈[?] ? )" "lpx_length" + "lpx_drops" + "lpx_fquq" + "lpx_fsle" + "lpx_rdeq" + "lpx_aaa" * ]
              [ [ "for binders" ] "cpx_ext" + "( ⦃?,?⦄ ⊢ ? ⬈[?] ? )" * ]
-             [ [ "for terms" ] "cpx" + "( ⦃?,?⦄ ⊢ ? ⬈[?] ? )" "cpx_simple" + "cpx_drops" + "cpx_fqus" + "cpx_lsubr" + "cpx_req" + "cpx_rdeq" + "cpx_fdeq" * ]
+             [ [ "for terms" ] "cpx" + "( ⦃?,?⦄ ⊢ ? ⬈[?] ? )" "cpx_simple" + "cpx_drops" + "cpx_drops_basic" + "cpx_fqus" + "cpx_lsubr" + "cpx_req" + "cpx_rdeq" + "cpx_fdeq" * ]
           }
         ]
         [ { "bound context-sensitive parallel rt-transition" * } {
@@ -128,7 +137,7 @@ class "italic"            { 2 }
         ]
              [ [ "" ] "shnv ( ⦃?,?⦄ ⊢ ? ¡[?,?,?] )" * ]
         [ { "decomposed rt-equivalence" * } {
-             [ [ "" ] "scpes ( ⦃?,?⦄ ⊢ ? •*⬌*[?,?,?,?] ? )" "scpes_aaa" + "scpes_cpcs" + "scpes_scpes" * ]
+             "scpes_cpcs" + "scpes_scpes"
           }
         ]
         [ [ "for lenvs on referred entries" ] "rpxs" + "( ⦃?,?⦄ ⊢ ⬈*[?,?] ? )" "rpxs_length" + "rpxs_drops" + "rpxs_fqup" + "rpxs_rdeq" + "rpxs_fdeq" + "rpxs_aaa" + "rpxs_cpxs" + "rpxs_lpxs" + "rpxs_rpxs" * ]
@@ -138,10 +147,6 @@ class "italic"            { 2 }
              [ [ "" ] "cpxe ( ⦃?,?⦄ ⊢ ➡*[?,?] 𝐍⦃?⦄ )" * ]
           }
         ]
-        [ { "evaluation for context-sensitive reduction" * } {
-             [ [ "" ] "cpre ( ⦃?,?⦄ ⊢ ➡* 𝐍⦃?⦄ )" "cpre_cpre" * ]
-          }
-        ]
         [ { "normal forms for context-sensitive rt-reduction" * } {
              [ [ "" ] "cnx_crx" + "cnx_cix" * ]
           }
@@ -155,7 +160,7 @@ class "italic"            { 2 }
           }
         ]
         [ { "normal forms for context-sensitive reduction" * } {
-             [ [ "" ] "cnr ( ⦃?,?⦄ ⊢ ➡ 𝐍⦃?⦄ )" "cnr_lift" + "cnr_crr" + "cnr_cir" * ]
+             "cnr_crr" + "cnr_cir"
           }
         ]
         [ { "irreducible forms for context-sensitive reduction" * } {
index 817d68bc02bb44e6da35712baeed99300484e43c..13afbaf0450002b59f738149f0a46c582d4e7b04 100644 (file)
@@ -1 +1,4 @@
-../../matitac.opt `cat partial.txt`
+../../matitac.opt ground_2
+../../matitac.opt static_2
+../../matitac.opt basic_2
+../../matitac.opt apps_2
index 1af2859d70e14f7e17e5469cbf3a217d3287bab9..11ef739da890ce612a551e5556c118b53b04beac 100644 (file)
@@ -30,3 +30,7 @@ lemma false_lt_to_le: ∀x,y. (x < y → ⊥) → y ≤ x.
 #x #y #H elim (decidable_lt x y) /2 width=1 by not_lt_to_le/
 #Hxy elim (H Hxy)
 qed-.
+
+lemma arith_m2 (x) (y): x < y → x+(y-↑x) = ↓y.
+#x #y #Hxy >minus_minus [|*: // ] <minus_Sn_n //
+qed-.
index a29899d451a6b8b10152012ced8c0b7ed252839b..6ce878b44bf0d73d1ba13dfd8e23a19cf008441e 100644 (file)
@@ -57,6 +57,9 @@ lemma plus_SO: ∀n. n + 1 = ↑n.
 lemma minus_plus_m_m_commutative: ∀n,m:nat. n = m + n - m.
 // qed-.
 
+lemma plus_minus_m_m_commutative (n) (m): m ≤ n → n = m+(n-m).
+/2 width=1 by plus_minus_associative/ qed-.
+
 lemma plus_to_minus_2: ∀m1,m2,n1,n2. n1 ≤ m1 → n2 ≤ m2 →
                        m1+n2 = m2+n1 → m1-n1 = m2-n2.
 #m1 #m2 #n1 #n2 #H1 #H2 #H
@@ -127,6 +130,14 @@ qed-.
 lemma le_plus_to_minus_comm: ∀n,m,p. n ≤ p+m → n-p ≤ m.
 /2 width=1 by le_plus_to_minus/ qed-.
 
+lemma le_inv_S1: ∀m,n. ↑m ≤ n → ∃∃p. m ≤ p & ↑p = n.
+#m *
+[ #H lapply (le_n_O_to_eq … H) -H
+  #H destruct
+| /3 width=3 by monotonic_pred, ex2_intro/
+]
+qed-.
+
 (* Note: this might interfere with nat.ma *)
 lemma monotonic_lt_pred: ∀m,n. m < n → 0 < m → pred m < pred n.
 #m #n #Hmn #Hm whd >(S_pred … Hm)
@@ -158,6 +169,15 @@ qed-.
 lemma lt_le_false: ∀x,y. x < y → y ≤ x → ⊥.
 /3 width=4 by lt_refl_false, lt_to_le_to_lt/ qed-.
 
+lemma le_dec (n) (m): Decidable (n≤m).
+#n elim n -n [ /2 width=1 by or_introl/ ]
+#n #IH * [ /3 width=2 by lt_zero_false, or_intror/ ]
+#m elim (IH m) -IH
+[ /3 width=1 by or_introl, le_S_S/
+| /4 width=1 by or_intror, le_S_S_to_le/
+]
+qed-.
+
 lemma succ_inv_refl_sn: ∀x. ↑x = x → ⊥.
 #x #H @(lt_le_false x (↑x)) //
 qed-.
@@ -322,3 +342,34 @@ lemma tri_gt: ∀A,a1,a2,a3,n1,n2. n2 < n1 → tri A n1 n2 a1 a2 a3 = a3.
 | #n1 #IH #n2 elim n2 -n2 /3 width=1 by monotonic_lt_pred/
 ]
 qed.
+
+(* Decidability of predicates ***********************************************)
+
+lemma dec_lt (R:predicate nat):
+      (∀n. Decidable … (R n)) →
+      ∀n. Decidable … (∃∃m. m < n & R m).
+#R #HR #n elim n -n [| #n * ]
+[ @or_intror * /2 width=2 by lt_zero_false/
+| * /4 width=3 by lt_S, or_introl, ex2_intro/
+| #H0 elim (HR n) -HR
+  [ /3 width=3 by or_introl, ex2_intro/
+  | #Hn @or_intror * #m #Hmn #Hm
+    elim (le_to_or_lt_eq … Hmn) -Hmn #H destruct [ -Hn | -H0 ]
+    /4 width=3 by lt_S_S_to_lt, ex2_intro/
+  ]
+]
+qed-.
+
+lemma dec_min (R:predicate nat):
+      (∀n. Decidable … (R n)) → ∀n. R n →
+      ∃∃m. m ≤ n & R m & (∀p. p < m → R p → ⊥).
+#R #HR #n
+@(nat_elim1 n) -n #n #IH #Hn
+elim (dec_lt … HR n) -HR [ -Hn | -IH ]
+[ * #p #Hpn #Hp
+  elim (IH … Hpn Hp) -IH -Hp #m #Hmp #Hm #HNm
+  @(ex3_intro … Hm HNm) -HNm
+  /3 width=3 by lt_to_le, le_to_lt_to_lt/
+| /4 width=4 by ex3_intro, ex2_intro/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/ground_2/lib/list_eq.ma b/matita/matita/contribs/lambdadelta/ground_2/lib/list_eq.ma
new file mode 100644 (file)
index 0000000..d1b2be4
--- /dev/null
@@ -0,0 +1,57 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "ground_2/notation/relations/ringeq_3.ma".
+include "ground_2/lib/list.ma".
+
+(* EXTENSIONAL EQUIVALENCE OF LISTS *****************************************)
+
+rec definition eq_list A (l1,l2:list A) on l1 ≝
+match l1 with
+[ nil        ⇒
+  match l2 with
+  [ nil      ⇒ ⊤
+  | cons _ _ ⇒ ⊥
+  ]
+| cons a1 l1 ⇒
+  match l2 with
+  [ nil        ⇒ ⊥
+  | cons a2 l2 ⇒ a1 = a2 ∧ eq_list A l1 l2
+  ]
+].
+
+interpretation "extensional equivalence (list)"
+   'RingEq A l1 l2 = (eq_list A l1 l2).
+
+(* Basic properties *********************************************************)
+
+lemma eq_list_refl (A): reflexive … (eq_list A).
+#A #l elim l -l /2 width=1 by conj/
+qed.
+
+(* Main properties **********************************************************)
+
+theorem eq_eq_list (A,l1,l2): l1 = l2 → l1 ≗{A} l2.
+// qed.
+
+(* Main inversion propertiess ***********************************************)
+
+theorem eq_list_inv_eq (A,l1,l2): l1 ≗{A} l2 → l1 = l2.
+#A #l1 elim l1 -l1 [| #a1 #l1 #IH ] *
+[ //
+| #a2 #l2 #H elim H
+| #H elim H
+| #a2 #l2 * #Ha #Hl /3 width=1 by eq_f2/
+]
+qed-.
index fa8bae34356880363acc0a6369876121b7bbe6d9..d272c0dbee63dfdbb474d8e6fa64a8ec7d099a89 100644 (file)
@@ -18,7 +18,7 @@ include "ground_2/lib/logic.ma".
 (* GENERIC RELATIONS ********************************************************)
 
 definition replace_2 (A) (B): relation3 (relation2 A B) (relation A) (relation B) ≝
-                              λR,Sa,Sb. ∀a1,b1. R a1 b1 → ∀a2. Sa a1 a2 → ∀b2. Sb b1 b2 → R a2 b2.
+           λR,Sa,Sb. ∀a1,b1. R a1 b1 → ∀a2. Sa a1 a2 → ∀b2. Sb b1 b2 → R a2 b2.
 
 (* Inclusion ****************************************************************)
 
@@ -36,81 +36,93 @@ interpretation "3-relation inclusion"
 
 (* Properties of relations **************************************************)
 
-definition relation5: Type[0] → Type[0] → Type[0] → Type[0] → Type[0] → Type[0]
- λA,B,C,D,E.A→B→C→D→E→Prop.
+definition relation5: Type[0] → Type[0] → Type[0] → Type[0] → Type[0] → Type[0] ≝
+           λA,B,C,D,E.A→B→C→D→E→Prop.
 
-definition relation6: Type[0] → Type[0] → Type[0] → Type[0] → Type[0] → Type[0] → Type[0]
- λA,B,C,D,E,F.A→B→C→D→E→F→Prop.
+definition relation6: Type[0] → Type[0] → Type[0] → Type[0] → Type[0] → Type[0] → Type[0] ≝
+           λA,B,C,D,E,F.A→B→C→D→E→F→Prop.
 
-(**) (* we dont use "∀a. reflexive … (R a)" since auto seems to dislike repeatd δ-expansion *)  
+(**) (* we don't use "∀a. reflexive … (R a)" since auto seems to dislike repeatd δ-expansion *)  
 definition c_reflexive (A) (B): predicate (relation3 A B B) ≝
-                                λR. ∀a,b. R a b b.
+           λR. ∀a,b. R a b b.
 
 definition Decidable: Prop → Prop ≝ λR. R ∨ (R → ⊥).
 
-definition Transitive: ∀A. ∀R: relation A. Prop ≝ λA,R.
-                       ∀a1,a0. R a1 a0 → ∀a2. R a0 a2 → R a1 a2.
+definition Transitive (A) (R:relation A): Prop ≝
+           ∀a1,a0. R a1 a0 → ∀a2. R a0 a2 → R a1 a2.
 
-definition left_cancellable: ∀A. ∀R: relation A. Prop ≝ λA,R.
-                             ∀a0,a1. R a0 a1 → ∀a2. R a0 a2 → R a1 a2.
+definition left_cancellable (A) (R:relation A): Prop ≝
+           ∀a0,a1. R a0 a1 → ∀a2. R a0 a2 → R a1 a2.
 
-definition right_cancellable: ∀A. ∀R: relation A. Prop ≝ λA,R.
-                              ∀a1,a0. R a1 a0 → ∀a2. R a2 a0 → R a1 a2.
+definition right_cancellable (A) (R:relation A): Prop ≝
+           ∀a1,a0. R a1 a0 → ∀a2. R a2 a0 → R a1 a2.
 
-definition pw_confluent2: ∀A. relation A → relation A → predicate A ≝ λA,R1,R2,a0.
-                          ∀a1. R1 a0 a1 → ∀a2. R2 a0 a2 →
-                          ∃∃a. R2 a1 a & R1 a2 a.
+definition pw_confluent2 (A) (R1,R2:relation A): predicate A ≝
+           λa0.
+           ∀a1. R1 a0 a1 → ∀a2. R2 a0 a2 →
+           ∃∃a. R2 a1 a & R1 a2 a.
 
-definition confluent2: ∀A. relation (relation A) ≝ λA,R1,R2.
-                       ∀a0. pw_confluent2 A R1 R2 a0.
+definition confluent2 (A): relation (relation A) ≝
+           λR1,R2.
+           ∀a0. pw_confluent2 A R1 R2 a0.
 
-definition transitive2: ∀A. ∀R1,R2: relation A. Prop ≝ λA,R1,R2.
-                        ∀a1,a0. R1 a1 a0 → ∀a2. R2 a0 a2 →
-                        ∃∃a. R2 a1 a & R1 a a2.
+definition transitive2 (A) (R1,R2:relation A): Prop ≝
+           ∀a1,a0. R1 a1 a0 → ∀a2. R2 a0 a2 →
+           ∃∃a. R2 a1 a & R1 a a2.
 
-definition bi_confluent: ∀A,B. ∀R: bi_relation A B. Prop ≝ λA,B,R.
-                         ∀a0,a1,b0,b1. R a0 b0 a1 b1 → ∀a2,b2. R a0 b0 a2 b2 →
-                         ∃∃a,b. R a1 b1 a b & R a2 b2 a b.
+definition bi_confluent (A) (B) (R: bi_relation A B): Prop ≝
+           ∀a0,a1,b0,b1. R a0 b0 a1 b1 → ∀a2,b2. R a0 b0 a2 b2 →
+           ∃∃a,b. R a1 b1 a b & R a2 b2 a b.
 
-definition lsub_trans: ∀A,B. relation2 (A→relation B) (relation A) ≝ λA,B,R1,R2.
-                       ∀L2,T1,T2. R1 L2 T1 T2 → ∀L1. R2 L1 L2 → R1 L1 T1 T2.
+definition lsub_trans (A) (B): relation2 (A→relation B) (relation A) ≝
+           λR1,R2.
+           ∀L2,T1,T2. R1 L2 T1 T2 → ∀L1. R2 L1 L2 → R1 L1 T1 T2.
 
-definition s_r_confluent1: ∀A,B. relation2 (A→relation B) (B→relation A) ≝ λA,B,R1,R2.
-                           ∀L1,T1,T2. R1 L1 T1 T2 → ∀L2. R2 T1 L1 L2 → R2 T2 L1 L2.
+definition s_r_confluent1 (A) (B): relation2 (A→relation B) (B→relation A) ≝
+           λR1,R2.
+           ∀L1,T1,T2. R1 L1 T1 T2 → ∀L2. R2 T1 L1 L2 → R2 T2 L1 L2.
 
-definition is_mono: ∀B:Type[0]. predicate (predicate B) ≝ 
-                    λB,R. ∀b1. R b1 → ∀b2. R b2 → b1 = b2.
+definition is_mono (B:Type[0]): predicate (predicate B) ≝
+           λR. ∀b1. R b1 → ∀b2. R b2 → b1 = b2.
 
-definition is_inj2: ∀A,B:Type[0]. predicate (relation2 A B) ≝ 
-                    λA,B,R. ∀a1,b. R a1 b → ∀a2. R a2 b → a1 = a2.
+definition is_inj2 (A,B:Type[0]): predicate (relation2 A B) ≝
+           λR. ∀a1,b. R a1 b → ∀a2. R a2 b → a1 = a2.
+
+(* Main properties of equality **********************************************)
+
+theorem canc_sn_eq (A): left_cancellable A (eq …).
+// qed-.
+
+theorem canc_dx_eq (A): right_cancellable A (eq …).
+// qed-.
 
 (* Normal form and strong normalization *************************************)
 
-definition NF: ∀A. relation A → relation A → predicate A ≝
-   λA,R,S,a1. ∀a2. R a1 a2 → S a1 a2.
+definition NF (A): relation A → relation A → predicate A ≝
+           λR,S,a1. ∀a2. R a1 a2 → S a1 a2.
 
-definition NF_dec: ∀A. relation A → relation A → Prop ≝
-                   λA,R,S. ∀a1. NF A R S a1 ∨
-                   ∃∃a2. R … a1 a2 & (S a1 a2 → ⊥).
+definition NF_dec (A): relation A → relation A → Prop ≝
+           λR,S. ∀a1. NF A R S a1 ∨
+           ∃∃a2. R … a1 a2 & (S a1 a2 → ⊥).
 
 inductive SN (A) (R,S:relation A): predicate A ≝
 | SN_intro: ∀a1. (∀a2. R a1 a2 → (S a1 a2 → ⊥) → SN A R S a2) → SN A R S a1
 .
 
-lemma NF_to_SN: ∀A,R,S,a. NF A R S a → SN A R S a.
+lemma NF_to_SN (A) (R) (S): ∀a. NF A R S a → SN A R S a.
 #A #R #S #a1 #Ha1
 @SN_intro #a2 #HRa12 #HSa12
 elim HSa12 -HSa12 /2 width=1 by/
 qed.
 
-definition NF_sn: ∀A. relation A → relation A → predicate A ≝
-   λA,R,S,a2. ∀a1. R a1 a2 → S a1 a2.
+definition NF_sn (A): relation A → relation A → predicate A ≝
+   λR,S,a2. ∀a1. R a1 a2 → S a1 a2.
 
 inductive SN_sn (A) (R,S:relation A): predicate A ≝
 | SN_sn_intro: ∀a2. (∀a1. R a1 a2 → (S a1 a2 → ⊥) → SN_sn A R S a1) → SN_sn A R S a2
 .
 
-lemma NF_to_SN_sn: ∀A,R,S,a. NF_sn A R S a → SN_sn A R S a.
+lemma NF_to_SN_sn (A) (R) (S): ∀a. NF_sn A R S a → SN_sn A R S a.
 #A #R #S #a2 #Ha2
 @SN_sn_intro #a1 #HRa12 #HSa12
 elim HSa12 -HSa12 /2 width=1 by/
@@ -118,9 +130,10 @@ qed.
 
 (* Relations on unboxed triples *********************************************)
 
-definition tri_RC: ∀A,B,C. tri_relation A B C → tri_relation A B C ≝
-                   λA,B,C,R,a1,b1,c1,a2,b2,c2. R … a1 b1 c1 a2 b2 c2 ∨
-                   ∧∧ a1 = a2 & b1 = b2 & c1 = c2.
+definition tri_RC (A,B,C): tri_relation A B C → tri_relation A B C ≝
+           λR,a1,b1,c1,a2,b2,c2.
+           ∨∨ R … a1 b1 c1 a2 b2 c2
+            | ∧∧ a1 = a2 & b1 = b2 & c1 = c2.
 
-lemma tri_RC_reflexive: ∀A,B,C,R. tri_reflexive A B C (tri_RC … R).
+lemma tri_RC_reflexive (A) (B) (C): ∀R. tri_reflexive A B C (tri_RC … R).
 /3 width=1 by and3_intro, or_intror/ qed.
diff --git a/matita/matita/contribs/lambdadelta/ground_2/lib/stream.ma b/matita/matita/contribs/lambdadelta/ground_2/lib/stream.ma
new file mode 100644 (file)
index 0000000..757bfe7
--- /dev/null
@@ -0,0 +1,30 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "ground_2/notation/functions/oplusright_3.ma".
+include "ground_2/lib/relations.ma".
+
+(* STREAMS ******************************************************************)
+
+coinductive stream (A:Type[0]): Type[0] ≝
+| seq: A → stream A → stream A
+.
+
+interpretation "cons (stream)" 'OPlusRight A a u = (seq A a u).
+
+(* Basic properties *********************************************************)
+
+lemma stream_rew (A) (t:stream A): match t with [ seq a u ⇒ a ⨮ u ] = t.
+#A * //
+qed.
diff --git a/matita/matita/contribs/lambdadelta/ground_2/lib/stream_eq.ma b/matita/matita/contribs/lambdadelta/ground_2/lib/stream_eq.ma
new file mode 100644 (file)
index 0000000..cee2483
--- /dev/null
@@ -0,0 +1,71 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "ground_2/notation/relations/ringeq_3.ma".
+include "ground_2/lib/stream.ma".
+
+(* STREAMS ******************************************************************)
+
+coinductive eq_stream (A): relation (stream A) ≝
+| eq_seq: ∀t1,t2,b1,b2. b1 = b2 → eq_stream A t1 t2 → eq_stream A (b1⨮t1) (b2⨮t2)
+.
+
+interpretation "extensional equivalence (stream)"
+   'RingEq A t1 t2 = (eq_stream A t1 t2).
+
+definition eq_stream_repl (A) (R:relation …) ≝
+                          ∀t1,t2. t1 ≗{A} t2 → R t1 t2.
+
+definition eq_stream_repl_back (A) (R:predicate …) ≝
+                               ∀t1. R t1 → ∀t2. t1 ≗{A} t2 → R t2.
+
+definition eq_stream_repl_fwd (A) (R:predicate …) ≝
+                              ∀t1. R t1 → ∀t2. t2 ≗{A} t1 → R t2.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma eq_stream_inv_seq: ∀A,t1,t2. t1 ≗{A} t2 →
+                         ∀u1,u2,a1,a2. a1⨮u1 = t1 → a2⨮u2 = t2 →
+                         u1 ≗ u2 ∧ a1 = a2.
+#A #t1 #t2 * -t1 -t2
+#t1 #t2 #b1 #b2 #Hb #Ht #u1 #u2 #a1 #a2 #H1 #H2 destruct /2 width=1 by conj/
+qed-.
+
+(* Basic properties *********************************************************)
+
+corec lemma eq_stream_refl: ∀A. reflexive … (eq_stream A).
+#A * #b #t @eq_seq //
+qed.
+
+corec lemma eq_stream_sym: ∀A. symmetric … (eq_stream A).
+#A #t1 #t2 * -t1 -t2
+#t1 #t2 #b1 #b2 #Hb #Ht @eq_seq /2 width=1 by/
+qed-.
+
+lemma eq_stream_repl_sym: ∀A,R. eq_stream_repl_back A R → eq_stream_repl_fwd A R.
+/3 width=3 by eq_stream_sym/ qed-.
+
+(* Main properties **********************************************************)
+
+corec theorem eq_stream_trans: ∀A. Transitive … (eq_stream A).
+#A #t1 #t * -t1 -t
+#t1 #t #b1 #b * #Ht1 * #b2 #t2 #H cases (eq_stream_inv_seq A … H) -H -b
+/3 width=7 by eq_seq/
+qed-.
+
+theorem eq_stream_canc_sn: ∀A,t,t1,t2. t ≗ t1 → t ≗ t2 → t1 ≗{A} t2.
+/3 width=3 by eq_stream_trans, eq_stream_sym/ qed-.
+
+theorem eq_stream_canc_dx: ∀A,t,t1,t2. t1 ≗ t → t2 ≗ t → t1 ≗{A} t2.
+/3 width=3 by eq_stream_trans, eq_stream_sym/ qed-. 
diff --git a/matita/matita/contribs/lambdadelta/ground_2/lib/stream_hdtl.ma b/matita/matita/contribs/lambdadelta/ground_2/lib/stream_hdtl.ma
new file mode 100644 (file)
index 0000000..ff518a2
--- /dev/null
@@ -0,0 +1,39 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "ground_2/notation/functions/downspoon_2.ma".
+include "ground_2/lib/stream_eq.ma".
+include "ground_2/lib/arith.ma".
+
+(* STREAMS ******************************************************************)
+
+definition hd (A:Type[0]): stream A → A ≝
+              λt. match t with [ seq a _ ⇒ a ].
+
+definition tl (A:Type[0]): stream A → stream A ≝
+              λt. match t with [ seq _ t ⇒ t ].
+
+interpretation "tail (stream)" 'DownSpoon A t = (tl A t).
+
+(* basic properties *********************************************************)
+
+lemma hd_rew (A) (a) (t): a = hd A (a⨮t).
+// qed.
+
+lemma tl_rew (A) (a) (t): t = tl A (a⨮t).
+// qed.
+
+lemma eq_stream_split (A) (t): (hd … t) ⨮ ⫰t ≗{A} t.
+#A * //
+qed.
diff --git a/matita/matita/contribs/lambdadelta/ground_2/lib/stream_tls.ma b/matita/matita/contribs/lambdadelta/ground_2/lib/stream_tls.ma
new file mode 100644 (file)
index 0000000..3649255
--- /dev/null
@@ -0,0 +1,41 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "ground_2/notation/functions/downspoonstar_3.ma".
+include "ground_2/lib/stream_hdtl.ma".
+
+(* STREAMS ******************************************************************)
+
+rec definition tls (A:Type[0]) (n:nat) on n: stream A → stream A ≝ ?.
+cases n -n [ #t @t | #n #t @tl @(tls … n t) ]
+defined.
+
+interpretation "iterated tail (stram)" 'DownSpoonStar A n f = (tls A n f).
+
+(* basic properties *********************************************************)
+
+lemma tls_rew_O (A) (t): t = tls A 0 t.
+// qed.
+
+lemma tls_rew_S (A) (n) (t): ⫰⫰*[n]t = tls A (↑n) t.
+// qed.
+
+lemma tls_S1 (A) (n) (t): ⫰*[n]⫰t = tls A (↑n) t.
+#A #n elim n -n //
+qed.
+
+lemma tls_eq_repl (A) (n): eq_stream_repl A (λt1,t2. ⫰*[n] t1 ≗ ⫰*[n] t2).
+#A #n elim n -n //
+#n #IH * #n1 #t1 * #n2 #t2 #H elim (eq_stream_inv_seq … H) /2 width=7 by/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/ground_2/lib/streams.ma b/matita/matita/contribs/lambdadelta/ground_2/lib/streams.ma
deleted file mode 100644 (file)
index e1b3a68..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "ground_2/notation/functions/oplusright_3.ma".
-include "ground_2/lib/relations.ma".
-
-(* STREAMS ******************************************************************)
-
-coinductive stream (A:Type[0]): Type[0] ≝
-| seq: A → stream A → stream A
-.
-
-interpretation "cons (nstream)" 'OPlusRight A a u = (seq A a u).
-
-(* Basic properties *********************************************************)
-
-lemma stream_rew (A) (t:stream A): match t with [ seq a u ⇒ a ⨮ u ] = t.
-#A * //
-qed.
diff --git a/matita/matita/contribs/lambdadelta/ground_2/lib/streams_eq.ma b/matita/matita/contribs/lambdadelta/ground_2/lib/streams_eq.ma
deleted file mode 100644 (file)
index 878185c..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/ringeq_3.ma".
-include "ground_2/lib/streams.ma".
-
-(* STREAMS ******************************************************************)
-
-coinductive eq_stream (A): relation (stream A) ≝
-| eq_seq: ∀t1,t2,b1,b2. b1 = b2 → eq_stream A t1 t2 → eq_stream A (b1⨮t1) (b2⨮t2)
-.
-
-interpretation "extensional equivalence (nstream)"
-   'RingEq A t1 t2 = (eq_stream A t1 t2).
-
-definition eq_stream_repl (A) (R:relation …) ≝
-                          ∀t1,t2. t1 ≗{A} t2 → R t1 t2.
-
-definition eq_stream_repl_back (A) (R:predicate …) ≝
-                               ∀t1. R t1 → ∀t2. t1 ≗{A} t2 → R t2.
-
-definition eq_stream_repl_fwd (A) (R:predicate …) ≝
-                              ∀t1. R t1 → ∀t2. t2 ≗{A} t1 → R t2.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma eq_stream_inv_seq: ∀A,t1,t2. t1 ≗{A} t2 →
-                         ∀u1,u2,a1,a2. a1⨮u1 = t1 → a2⨮u2 = t2 →
-                         u1 ≗ u2 ∧ a1 = a2.
-#A #t1 #t2 * -t1 -t2
-#t1 #t2 #b1 #b2 #Hb #Ht #u1 #u2 #a1 #a2 #H1 #H2 destruct /2 width=1 by conj/
-qed-.
-
-(* Basic properties *********************************************************)
-
-corec lemma eq_stream_refl: ∀A. reflexive … (eq_stream A).
-#A * #b #t @eq_seq //
-qed.
-
-corec lemma eq_stream_sym: ∀A. symmetric … (eq_stream A).
-#A #t1 #t2 * -t1 -t2
-#t1 #t2 #b1 #b2 #Hb #Ht @eq_seq /2 width=1 by/
-qed-.
-
-lemma eq_stream_repl_sym: ∀A,R. eq_stream_repl_back A R → eq_stream_repl_fwd A R.
-/3 width=3 by eq_stream_sym/ qed-.
-
-(* Main properties **********************************************************)
-
-corec theorem eq_stream_trans: ∀A. Transitive … (eq_stream A).
-#A #t1 #t * -t1 -t
-#t1 #t #b1 #b * #Ht1 * #b2 #t2 #H cases (eq_stream_inv_seq A … H) -H -b
-/3 width=7 by eq_seq/
-qed-.
-
-theorem eq_stream_canc_sn: ∀A,t,t1,t2. t ≗ t1 → t ≗ t2 → t1 ≗{A} t2.
-/3 width=3 by eq_stream_trans, eq_stream_sym/ qed-.
-
-theorem eq_stream_canc_dx: ∀A,t,t1,t2. t1 ≗ t → t2 ≗ t → t1 ≗{A} t2.
-/3 width=3 by eq_stream_trans, eq_stream_sym/ qed-. 
diff --git a/matita/matita/contribs/lambdadelta/ground_2/lib/streams_hdtl.ma b/matita/matita/contribs/lambdadelta/ground_2/lib/streams_hdtl.ma
deleted file mode 100644 (file)
index f128e5f..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "ground_2/notation/functions/downspoon_2.ma".
-include "ground_2/lib/streams_eq.ma".
-include "ground_2/lib/arith.ma".
-
-(* STREAMS ******************************************************************)
-
-definition hd (A:Type[0]): stream A → A ≝
-              λt. match t with [ seq a _ ⇒ a ].
-
-definition tl (A:Type[0]): stream A → stream A ≝
-              λt. match t with [ seq _ t ⇒ t ].
-
-interpretation "tail (streams)" 'DownSpoon A t = (tl A t).
-
-(* basic properties *********************************************************)
-
-lemma hd_rew (A) (a) (t): a = hd A (a⨮t).
-// qed.
-
-lemma tl_rew (A) (a) (t): t = tl A (a⨮t).
-// qed.
-
-lemma eq_stream_split (A) (t): (hd … t) ⨮ ⫰t ≗{A} t.
-#A * //
-qed.
diff --git a/matita/matita/contribs/lambdadelta/ground_2/lib/streams_tls.ma b/matita/matita/contribs/lambdadelta/ground_2/lib/streams_tls.ma
deleted file mode 100644 (file)
index f2a910a..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "ground_2/notation/functions/downspoonstar_3.ma".
-include "ground_2/lib/streams_hdtl.ma".
-
-(* STREAMS ******************************************************************)
-
-rec definition tls (A:Type[0]) (n:nat) on n: stream A → stream A ≝ ?.
-cases n -n [ #t @t | #n #t @tl @(tls … n t) ]
-defined.
-
-interpretation "iterated tail (strams)" 'DownSpoonStar A n f = (tls A n f).
-
-(* basic properties *********************************************************)
-
-lemma tls_rew_O (A) (t): t = tls A 0 t.
-// qed.
-
-lemma tls_rew_S (A) (n) (t): ⫰⫰*[n]t = tls A (↑n) t.
-// qed.
-
-lemma tls_S1 (A) (n) (t): ⫰*[n]⫰t = tls A (↑n) t.
-#A #n elim n -n //
-qed.
-
-lemma tls_eq_repl (A) (n): eq_stream_repl A (λt1,t2. ⫰*[n] t1 ≗ ⫰*[n] t2).
-#A #n elim n -n //
-#n #IH * #n1 #t1 * #n2 #t2 #H elim (eq_stream_inv_seq … H) /2 width=7 by/
-qed.
index f18cd54f3b333896263425cce696949fa291db4a..5a122b8ec49645f7929c89f086e44c90a97d890d 100644 (file)
@@ -14,6 +14,6 @@
 
 (* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
 
-notation "hvbox( 𝐁❴ break term 46 l, break term 46 h ❵ )"
+notation "hvbox( 𝐁❴ term 46 l, break term 46 h ❵ )"
   non associative with precedence 90
   for @{ 'Basic $l $h }.
index 32741b07ba303b50c85a04518159c88918c67c3b..992179f983b3c3e2528592d5be79e6821d2256c4 100644 (file)
@@ -14,6 +14,6 @@
 
 (* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
 
-notation "hvbox(f2 ~ \circ break f1)" 
+notation "hvbox(f2 ~ \circ break f1)" (**)
   right associative with precedence 60
   for @{ 'CoCompose $f2 $f1 }.
index 1b10938b7d477977dafe2bfaf33eaceef8afe22d..d740100736a74a98f5447b73404a67c98e28e813 100644 (file)
@@ -14,6 +14,6 @@
 
 (* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
 
-notation "hvbox( ⫱ * [ term 46 n ] term 46 T )"
+notation "hvbox( ⫱ * [ term 46 n ] break term 46 T )"
    non associative with precedence 46
    for @{ 'DropPreds $n $T }.
index 553c4e494099a926cadd941a7ed573d6999d1228..a0ab933d8bd26c9b8639032fe7116d0d0e4b59c9 100644 (file)
@@ -14,6 +14,6 @@
 
 (* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
 
-notation "hvbox( ↑ * [ term 46 n ] term 70 T )"
+notation "hvbox( ↑ * [ term 46 n ] break term 70 T )"
    non associative with precedence 70
    for @{ 'UpArrowStar $n $T }.
index 12beff4ec7821f4ce7984889df89ab1429b12998..de75ff05107b7193fb07d3ea81b219592a7e7056 100644 (file)
@@ -14,6 +14,6 @@
 
 (* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
 
-notation "hvbox( ⫯ * [ term 46 n ] term 46 T )"
+notation "hvbox( ⫯ * [ term 46 n ] break term 46 T )"
    non associative with precedence 46
    for @{ 'UpSpoonStar $n $T }.
diff --git a/matita/matita/contribs/lambdadelta/ground_2/notation/xoa/ex_1_4.ma b/matita/matita/contribs/lambdadelta/ground_2/notation/xoa/ex_1_4.ma
new file mode 100644 (file)
index 0000000..0fbf2a4
--- /dev/null
@@ -0,0 +1,26 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (1, 4) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0)"
+ non associative with precedence 20
+ for @{ 'Ex4 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0)"
+ non associative with precedence 20
+ for @{ 'Ex4 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) }.
+
index e1ef5d2875cfd78e4eadc2cfd50b1e881d2483a2..94c5610326e209ed885cb6fc9f631fa3b7585776 100644 (file)
@@ -18,7 +18,7 @@ include "ground_2/relocation/mr2.ma".
 
 rec definition pluss (cs:mr2) (i:nat) on cs ≝ match cs with
 [ nil2         ⇒ ◊
-| cons2 l m cs ⇒ {l + i, m};pluss cs i
+| cons2 l m cs ⇒ {l + i,m};pluss cs i
 ].
 
 interpretation "plus (multiple relocation with pairs)"
@@ -26,7 +26,7 @@ interpretation "plus (multiple relocation with pairs)"
 
 (* Basic properties *********************************************************)
 
-lemma pluss_SO2: ∀l,m,cs. ({l, m};cs) + 1 = {↑l, m};cs + 1.
+lemma pluss_SO2: ∀l,m,cs. ({l,m};cs) + 1 = {↑l,m};cs + 1.
 normalize // qed.
 
 (* Basic inversion lemmas ***************************************************)
@@ -36,8 +36,8 @@ lemma pluss_inv_nil2: ∀i,cs. cs + i = ◊ → cs = ◊.
 #l #m #cs #H destruct
 qed.
 
-lemma pluss_inv_cons2: ∀i,l,m,cs2,cs. cs + i = {l, m};cs2 →
-                       ∃∃cs1. cs1 + i = cs2 & cs = {l - i, m};cs1.
+lemma pluss_inv_cons2: ∀i,l,m,cs2,cs. cs + i = {l,m};cs2 →
+                       ∃∃cs1. cs1 + i = cs2 & cs = {l - i,m};cs1.
 #i #l #m #cs2 *
 [ normalize #H destruct
 | #l1 #m1 #cs1 whd in ⊢ (??%?→?); #H destruct
index 3803c254be949ffde13f8470b65ad689e4fadc99..c5ccb7373a489400abfad21e4e23e1170713cb11 100644 (file)
@@ -13,7 +13,7 @@
 (**************************************************************************)
 
 include "ground_2/notation/functions/upspoon_1.ma".
-include "ground_2/lib/streams_tls.ma".
+include "ground_2/lib/stream_tls.ma".
 
 (* RELOCATION N-STREAM ******************************************************)
 
index 4a03364b86c4117fa04e715b5d7f1f491a715c93..93980c881f9f41b5b20d89592c7358f255c84c40 100644 (file)
@@ -27,20 +27,20 @@ interpretation "relational application (rtmap)"
    'RAt i1 f i2 = (at f i1 i2).
 
 definition H_at_div: relation4 rtmap rtmap rtmap rtmap ≝ λf2,g2,f1,g1.
-                     ∀jf,jg,j. @⦃jf, f2⦄ ≘ j → @⦃jg, g2⦄ ≘ j →
-                     ∃∃j0. @⦃j0, f1⦄ ≘ jf & @⦃j0, g1⦄ ≘ jg.
+                     ∀jf,jg,j. @⦃jf,f2⦄ ≘ j → @⦃jg,g2⦄ ≘ j →
+                     ∃∃j0. @⦃j0,f1⦄ ≘ jf & @⦃j0,g1⦄ ≘ jg.
 
 (* Basic inversion lemmas ***************************************************)
 
-lemma at_inv_ppx: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 → ∀g. 0 = i1 → ⫯g = f → 0 = i2.
+lemma at_inv_ppx: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 → ∀g. 0 = i1 → ⫯g = f → 0 = i2.
 #f #i1 #i2 * -f -i1 -i2 //
 [ #f #i1 #i2 #_ #g #j1 #j2 #_ * #_ #x #H destruct
 | #f #i1 #i2 #_ #g #j2 * #_ #x #_ #H elim (discr_push_next … H)
 ]
 qed-.
 
-lemma at_inv_npx: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 → ∀g,j1. ↑j1 = i1 → ⫯g = f →
-                  ∃∃j2. @⦃j1, g⦄ ≘ j2 & ↑j2 = i2.
+lemma at_inv_npx: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 → ∀g,j1. ↑j1 = i1 → ⫯g = f →
+                  ∃∃j2. @⦃j1,g⦄ ≘ j2 & ↑j2 = i2.
 #f #i1 #i2 * -f -i1 -i2
 [ #f #g #j1 #j2 #_ * #_ #x #x1 #H destruct
 | #f #i1 #i2 #Hi #g #j1 #j2 * * * #x #x1 #H #Hf >(injective_push … Hf) -g destruct /2 width=3 by ex2_intro/
@@ -48,8 +48,8 @@ lemma at_inv_npx: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 → ∀g,j1. ↑j1 = i1 → 
 ]
 qed-.
 
-lemma at_inv_xnx: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 → ∀g. ↑g = f →
-                  ∃∃j2. @⦃i1, g⦄ ≘ j2 & ↑j2 = i2.
+lemma at_inv_xnx: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 → ∀g. ↑g = f →
+                  ∃∃j2. @⦃i1,g⦄ ≘ j2 & ↑j2 = i2.
 #f #i1 #i2 * -f -i1 -i2
 [ #f #g #j1 #j2 * #_ #_ #x #H elim (discr_next_push … H)
 | #f #i1 #i2 #_ #g #j1 #j2 * #_ #_ #x #H elim (discr_next_push … H)
@@ -59,43 +59,43 @@ qed-.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma at_inv_ppn: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 →
+lemma at_inv_ppn: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 →
                   ∀g,j2. 0 = i1 → ⫯g = f → ↑j2 = i2 → ⊥.
 #f #i1 #i2 #Hf #g #j2 #H1 #H <(at_inv_ppx … Hf … H1 H) -f -g -i1 -i2
 #H destruct
 qed-.
 
-lemma at_inv_npp: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 →
+lemma at_inv_npp: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 →
                   ∀g,j1. ↑j1 = i1 → ⫯g = f → 0 = i2 → ⊥.
 #f #i1 #i2 #Hf #g #j1 #H1 #H elim (at_inv_npx … Hf … H1 H) -f -i1
 #x2 #Hg * -i2 #H destruct
 qed-.
 
-lemma at_inv_npn: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 →
-                  ∀g,j1,j2. ↑j1 = i1 → ⫯g = f → ↑j2 = i2 → @⦃j1, g⦄ ≘ j2.
+lemma at_inv_npn: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 →
+                  ∀g,j1,j2. ↑j1 = i1 → ⫯g = f → ↑j2 = i2 → @⦃j1,g⦄ ≘ j2.
 #f #i1 #i2 #Hf #g #j1 #j2 #H1 #H elim (at_inv_npx … Hf … H1 H) -f -i1
 #x2 #Hg * -i2 #H destruct //
 qed-.
 
-lemma at_inv_xnp: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 →
+lemma at_inv_xnp: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 →
                   ∀g. ↑g = f → 0 = i2 → ⊥.
 #f #i1 #i2 #Hf #g #H elim (at_inv_xnx … Hf … H) -f
 #x2 #Hg * -i2 #H destruct
 qed-.
 
-lemma at_inv_xnn: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 →
-                  ∀g,j2. ↑g = f → ↑j2 = i2 → @⦃i1, g⦄ ≘ j2.
+lemma at_inv_xnn: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 →
+                  ∀g,j2. ↑g = f → ↑j2 = i2 → @⦃i1,g⦄ ≘ j2.
 #f #i1 #i2 #Hf #g #j2 #H elim (at_inv_xnx … Hf … H) -f
 #x2 #Hg * -i2 #H destruct //
 qed-.
 
-lemma at_inv_pxp: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 → 0 = i1 → 0 = i2 → ∃g. ⫯g = f.
+lemma at_inv_pxp: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 → 0 = i1 → 0 = i2 → ∃g. ⫯g = f.
 #f elim (pn_split … f) * /2 width=2 by ex_intro/
 #g #H #i1 #i2 #Hf #H1 #H2 cases (at_inv_xnp … Hf … H H2)
 qed-.
 
-lemma at_inv_pxn: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 → ∀j2. 0 = i1 → ↑j2 = i2 →
-                  ∃∃g. @⦃i1, g⦄ ≘ j2 & ↑g = f.
+lemma at_inv_pxn: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 → ∀j2. 0 = i1 → ↑j2 = i2 →
+                  ∃∃g. @⦃i1,g⦄ ≘ j2 & ↑g = f.
 #f elim (pn_split … f) *
 #g #H #i1 #i2 #Hf #j2 #H1 #H2
 [ elim (at_inv_ppn … Hf … H1 H H2)
@@ -103,7 +103,7 @@ lemma at_inv_pxn: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 → ∀j2. 0 = i1 → ↑j2 =
 ]
 qed-.
 
-lemma at_inv_nxp: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 →
+lemma at_inv_nxp: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 →
                   ∀j1. ↑j1 = i1 → 0 = i2 → ⊥.
 #f elim (pn_split f) *
 #g #H #i1 #i2 #Hf #j1 #H1 #H2
@@ -112,37 +112,37 @@ lemma at_inv_nxp: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 →
 ]
 qed-.
 
-lemma at_inv_nxn: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 → ∀j1,j2. ↑j1 = i1 → ↑j2 = i2 →
-                  (∃∃g. @⦃j1, g⦄ ≘ j2 & ⫯g = f) ∨
-                  ∃∃g. @⦃i1, g⦄ ≘ j2 & ↑g = f.
+lemma at_inv_nxn: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 → ∀j1,j2. ↑j1 = i1 → ↑j2 = i2 →
+                  (∃∃g. @⦃j1,g⦄ ≘ j2 & ⫯g = f) ∨
+                  ∃∃g. @⦃i1,g⦄ ≘ j2 & ↑g = f.
 #f elim (pn_split f) *
 /4 width=7 by at_inv_xnn, at_inv_npn, ex2_intro, or_intror, or_introl/
 qed-.
 
 (* Note: the following inversion lemmas must be checked *)
-lemma at_inv_xpx: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 → ∀g. ⫯g = f →
+lemma at_inv_xpx: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 → ∀g. ⫯g = f →
                   (0 = i1 ∧ 0 = i2) ∨
-                  ∃∃j1,j2. @⦃j1, g⦄ ≘ j2 & ↑j1 = i1 & ↑j2 = i2.
+                  ∃∃j1,j2. @⦃j1,g⦄ ≘ j2 & ↑j1 = i1 & ↑j2 = i2.
 #f * [2: #i1 ] #i2 #Hf #g #H
 [ elim (at_inv_npx … Hf … H) -f /3 width=5 by or_intror, ex3_2_intro/
 | >(at_inv_ppx … Hf … H) -f /3 width=1 by conj, or_introl/
 ]
 qed-.
 
-lemma at_inv_xpp: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 → ∀g. ⫯g = f → 0 = i2 → 0 = i1.
+lemma at_inv_xpp: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 → ∀g. ⫯g = f → 0 = i2 → 0 = i1.
 #f #i1 #i2 #Hf #g #H elim (at_inv_xpx … Hf … H) -f * //
 #j1 #j2 #_ #_ * -i2 #H destruct
 qed-.
 
-lemma at_inv_xpn: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 → ∀g,j2. ⫯g = f → ↑j2 = i2 →
-                  ∃∃j1. @⦃j1, g⦄ ≘ j2 & ↑j1 = i1.
+lemma at_inv_xpn: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 → ∀g,j2. ⫯g = f → ↑j2 = i2 →
+                  ∃∃j1. @⦃j1,g⦄ ≘ j2 & ↑j1 = i1.
 #f #i1 #i2 #Hf #g #j2 #H elim (at_inv_xpx … Hf … H) -f *
 [ #_ * -i2 #H destruct
 | #x1 #x2 #Hg #H1 * -i2 #H destruct /2 width=3 by ex2_intro/
 ]
 qed-.
 
-lemma at_inv_xxp: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 → 0 = i2 →
+lemma at_inv_xxp: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 → 0 = i2 →
                   ∃∃g. 0 = i1 & ⫯g = f.
 #f elim (pn_split f) *
 #g #H #i1 #i2 #Hf #H2
@@ -151,9 +151,9 @@ lemma at_inv_xxp: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 → 0 = i2 →
 ]
 qed-.
 
-lemma at_inv_xxn: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 → ∀j2.  ↑j2 = i2 →
-                  (∃∃g,j1. @⦃j1, g⦄ ≘ j2 & ↑j1 = i1 & ⫯g = f) ∨
-                  ∃∃g. @⦃i1, g⦄ ≘ j2 & ↑g = f.
+lemma at_inv_xxn: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 → ∀j2.  ↑j2 = i2 →
+                  (∃∃g,j1. @⦃j1,g⦄ ≘ j2 & ↑j1 = i1 & ⫯g = f) ∨
+                  ∃∃g. @⦃i1,g⦄ ≘ j2 & ↑g = f.
 #f elim (pn_split f) *
 #g #H #i1 #i2 #Hf #j2 #H2
 [ elim (at_inv_xpn … Hf … H H2) -i2 /3 width=5 by or_introl, ex3_2_intro/
@@ -163,7 +163,7 @@ qed-.
 
 (* Basic forward lemmas *****************************************************)
 
-lemma at_increasing: ∀i2,i1,f. @⦃i1, f⦄ ≘ i2 → i1 ≤ i2.
+lemma at_increasing: ∀i2,i1,f. @⦃i1,f⦄ ≘ i2 → i1 ≤ i2.
 #i2 elim i2 -i2
 [ #i1 #f #Hf elim (at_inv_xxp … Hf) -Hf //
 | #i2 #IH * //
@@ -172,13 +172,13 @@ lemma at_increasing: ∀i2,i1,f. @⦃i1, f⦄ ≘ i2 → i1 ≤ i2.
 ]
 qed-.
 
-lemma at_increasing_strict: ∀g,i1,i2. @⦃i1, g⦄ ≘ i2 → ∀f. ↑f = g →
-                            i1 < i2 ∧ @⦃i1, f⦄ ≘ ↓i2.
+lemma at_increasing_strict: ∀g,i1,i2. @⦃i1,g⦄ ≘ i2 → ∀f. ↑f = g →
+                            i1 < i2 ∧ @⦃i1,f⦄ ≘ ↓i2.
 #g #i1 #i2 #Hg #f #H elim (at_inv_xnx … Hg … H) -Hg -H
 /4 width=2 by conj, at_increasing, le_S_S/
 qed-.
 
-lemma at_fwd_id_ex: ∀f,i. @⦃i, f⦄ ≘ i → ∃g. ⫯g = f.
+lemma at_fwd_id_ex: ∀f,i. @⦃i,f⦄ ≘ i → ∃g. ⫯g = f.
 #f elim (pn_split f) * /2 width=2 by ex_intro/
 #g #H #i #Hf elim (at_inv_xnx … Hf … H) -Hf -H
 #j2 #Hg #H destruct lapply (at_increasing … Hg) -Hg
@@ -187,7 +187,7 @@ qed-.
 
 (* Basic properties *********************************************************)
 
-corec lemma at_eq_repl_back: ∀i1,i2. eq_repl_back (λf. @⦃i1, f⦄ ≘ i2).
+corec lemma at_eq_repl_back: ∀i1,i2. eq_repl_back (λf. @⦃i1,f⦄ ≘ i2).
 #i1 #i2 #f1 #H1 cases H1 -f1 -i1 -i2
 [ #f1 #g1 #j1 #j2 #H #H1 #H2 #f2 #H12 cases (eq_inv_px … H12 … H) -g1 /2 width=2 by at_refl/
 | #f1 #i1 #i2 #Hf1 #g1 #j1 #j2 #H #H1 #H2 #f2 #H12 cases (eq_inv_px … H12 … H) -g1 /3 width=7 by at_push/
@@ -195,12 +195,12 @@ corec lemma at_eq_repl_back: ∀i1,i2. eq_repl_back (λf. @⦃i1, f⦄ ≘ i2).
 ]
 qed-.
 
-lemma at_eq_repl_fwd: ∀i1,i2. eq_repl_fwd (λf. @⦃i1, f⦄ ≘ i2).
+lemma at_eq_repl_fwd: ∀i1,i2. eq_repl_fwd (λf. @⦃i1,f⦄ ≘ i2).
 #i1 #i2 @eq_repl_sym /2 width=3 by at_eq_repl_back/
 qed-.
 
-lemma at_le_ex: ∀j2,i2,f. @⦃i2, f⦄ ≘ j2 → ∀i1. i1 ≤ i2 →
-                ∃∃j1. @⦃i1, f⦄ ≘ j1 & j1 ≤ j2.
+lemma at_le_ex: ∀j2,i2,f. @⦃i2,f⦄ ≘ j2 → ∀i1. i1 ≤ i2 →
+                ∃∃j1. @⦃i1,f⦄ ≘ j1 & j1 ≤ j2.
 #j2 elim j2 -j2 [2: #j2 #IH ] #i2 #f #Hf
 [ elim (at_inv_xxn … Hf) -Hf [1,3: * |*: // ]
   #g [ #x2 ] #Hg [ #H2 ] #H0
@@ -217,14 +217,14 @@ lemma at_le_ex: ∀j2,i2,f. @⦃i2, f⦄ ≘ j2 → ∀i1. i1 ≤ i2 →
 ]
 qed-.
 
-lemma at_id_le: ∀i1,i2. i1 ≤ i2 → ∀f. @⦃i2, f⦄ ≘ i2 → @⦃i1, f⦄ ≘ i1.
+lemma at_id_le: ∀i1,i2. i1 ≤ i2 → ∀f. @⦃i2,f⦄ ≘ i2 → @⦃i1,f⦄ ≘ i1.
 #i1 #i2 #H @(le_elim … H) -i1 -i2 [ #i2 | #i1 #i2 #IH ]
 #f #Hf elim (at_fwd_id_ex … Hf) /4 width=7 by at_inv_npn, at_push, at_refl/
 qed-.
 
 (* Main properties **********************************************************)
 
-theorem at_monotonic: ∀j2,i2,f. @⦃i2, f⦄ ≘ j2 → ∀j1,i1. @⦃i1, f⦄ ≘ j1 →
+theorem at_monotonic: ∀j2,i2,f. @⦃i2,f⦄ ≘ j2 → ∀j1,i1. @⦃i1,f⦄ ≘ j1 →
                       i1 < i2 → j1 < j2.
 #j2 elim j2 -j2
 [ #i2 #f #H2f elim (at_inv_xxp … H2f) -H2f //
@@ -240,7 +240,7 @@ theorem at_monotonic: ∀j2,i2,f. @⦃i2, f⦄ ≘ j2 → ∀j1,i1. @⦃i1, f⦄
 ]
 qed-.
 
-theorem at_inv_monotonic: ∀j1,i1,f. @⦃i1, f⦄ ≘ j1 → ∀j2,i2. @⦃i2, f⦄ ≘ j2 →
+theorem at_inv_monotonic: ∀j1,i1,f. @⦃i1,f⦄ ≘ j1 → ∀j2,i2. @⦃i2,f⦄ ≘ j2 →
                           j1 < j2 → i1 < i2.
 #j1 elim j1 -j1
 [ #i1 #f #H1f elim (at_inv_xxp … H1f) -H1f //
@@ -261,12 +261,12 @@ theorem at_inv_monotonic: ∀j1,i1,f. @⦃i1, f⦄ ≘ j1 → ∀j2,i2. @⦃i2,
 ]
 qed-.
 
-theorem at_mono: ∀f,i,i1. @⦃i, f⦄ ≘ i1 → ∀i2. @⦃i, f⦄ ≘ i2 → i2 = i1.
+theorem at_mono: ∀f,i,i1. @⦃i,f⦄ ≘ i1 → ∀i2. @⦃i,f⦄ ≘ i2 → i2 = i1.
 #f #i #i1 #H1 #i2 #H2 elim (lt_or_eq_or_gt i2 i1) //
 #Hi elim (lt_le_false i i) /3 width=6 by at_inv_monotonic, eq_sym/
 qed-.
 
-theorem at_inj: ∀f,i1,i. @⦃i1, f⦄ ≘ i → ∀i2. @⦃i2, f⦄ ≘ i → i1 = i2.
+theorem at_inj: ∀f,i1,i. @⦃i1,f⦄ ≘ i → ∀i2. @⦃i2,f⦄ ≘ i → i1 = i2.
 #f #i1 #i #H1 #i2 #H2 elim (lt_or_eq_or_gt i2 i1) //
 #Hi elim (lt_le_false i i) /3 width=6 by at_monotonic, eq_sym/
 qed-.
@@ -312,14 +312,14 @@ theorem at_div_pn: ∀f2,g2,f1,g1.
 
 (* Properties on tls ********************************************************)
 
-lemma at_pxx_tls: ∀n,f. @⦃0, f⦄ ≘ n → @⦃0, ⫱*[n]f⦄ ≘ 0.
+lemma at_pxx_tls: ∀n,f. @⦃0,f⦄ ≘ n → @⦃0,⫱*[n]f⦄ ≘ 0.
 #n elim n -n //
 #n #IH #f #Hf
 cases (at_inv_pxn … Hf) -Hf [ |*: // ] #g #Hg #H0 destruct
 <tls_xn /2 width=1 by/
 qed.
 
-lemma at_tls: ∀i2,f. ⫯⫱*[↑i2]f ≡ ⫱*[i2]f → ∃i1. @⦃i1, f⦄ ≘ i2.
+lemma at_tls: ∀i2,f. ⫯⫱*[↑i2]f ≡ ⫱*[i2]f → ∃i1. @⦃i1,f⦄ ≘ i2.
 #i2 elim i2 -i2
 [ /4 width=4 by at_eq_repl_back, at_refl, ex_intro/
 | #i2 #IH #f <tls_xn <tls_xn in ⊢ (??%→?); #H
@@ -330,8 +330,8 @@ qed-.
 
 (* Inversion lemmas with tls ************************************************)
 
-lemma at_inv_nxx: ∀n,g,i1,j2. @⦃↑i1, g⦄ ≘ j2 → @⦃0, g⦄ ≘ n →
-                  ∃∃i2. @⦃i1, ⫱*[↑n]g⦄ ≘ i2 & ↑(n+i2) = j2.
+lemma at_inv_nxx: ∀n,g,i1,j2. @⦃↑i1,g⦄ ≘ j2 → @⦃0,g⦄ ≘ n →
+                  ∃∃i2. @⦃i1,⫱*[↑n]g⦄ ≘ i2 & ↑(n+i2) = j2.
 #n elim n -n
 [ #g #i1 #j2 #Hg #H
   elim (at_inv_pxp … H) -H [ |*: // ] #f #H0
@@ -345,7 +345,7 @@ lemma at_inv_nxx: ∀n,g,i1,j2. @⦃↑i1, g⦄ ≘ j2 → @⦃0, g⦄ ≘ n →
 ]
 qed-.
 
-lemma at_inv_tls: ∀i2,i1,f. @⦃i1, f⦄ ≘ i2 → ⫯⫱*[↑i2]f ≡ ⫱*[i2]f.
+lemma at_inv_tls: ∀i2,i1,f. @⦃i1,f⦄ ≘ i2 → ⫯⫱*[↑i2]f ≡ ⫱*[i2]f.
 #i2 elim i2 -i2
 [ #i1 #f #Hf elim (at_inv_xxp … Hf) -Hf // #g #H1 #H destruct
   /2 width=1 by eq_refl/
@@ -358,19 +358,19 @@ qed-.
 
 (* Advanced inversion lemmas on isid ****************************************)
 
-lemma isid_inv_at: ∀i,f. 𝐈⦃f⦄ → @⦃i, f⦄ ≘ i.
+lemma isid_inv_at: ∀i,f. 𝐈⦃f⦄ → @⦃i,f⦄ ≘ i.
 #i elim i -i
 [ #f #H elim (isid_inv_gen … H) -H /2 width=2 by at_refl/
 | #i #IH #f #H elim (isid_inv_gen … H) -H /3 width=7 by at_push/
 ]
 qed.
 
-lemma isid_inv_at_mono: ∀f,i1,i2. 𝐈⦃f⦄ → @⦃i1, f⦄ ≘ i2 → i1 = i2.
+lemma isid_inv_at_mono: ∀f,i1,i2. 𝐈⦃f⦄ → @⦃i1,f⦄ ≘ i2 → i1 = i2.
 /3 width=6 by isid_inv_at, at_mono/ qed-.
 
 (* Advanced properties on isid **********************************************)
 
-corec lemma isid_at: ∀f. (∀i. @⦃i, f⦄ ≘ i) → 𝐈⦃f⦄.
+corec lemma isid_at: ∀f. (∀i. @⦃i,f⦄ ≘ i) → 𝐈⦃f⦄.
 #f #Hf lapply (Hf 0)
 #H cases (at_fwd_id_ex … H) -H
 #g #H @(isid_push … H) /3 width=7 by at_inv_npn/
@@ -378,15 +378,15 @@ qed-.
 
 (* Advanced properties on id ************************************************)
 
-lemma id_inv_at: ∀f. (∀i. @⦃i, f⦄ ≘ i) → 𝐈𝐝 ≡ f.
+lemma id_inv_at: ∀f. (∀i. @⦃i,f⦄ ≘ i) → 𝐈𝐝 ≡ f.
 /3 width=1 by isid_at, eq_id_inv_isid/ qed-.
 
-lemma id_at: ∀i. @⦃i, 𝐈𝐝⦄ ≘ i.
+lemma id_at: ∀i. @⦃i,𝐈𝐝⦄ ≘ i.
 /2 width=1 by isid_inv_at/ qed.
 
 (* Advanced forward lemmas on id ********************************************)
 
-lemma at_id_fwd: ∀i1,i2. @⦃i1, 𝐈𝐝⦄ ≘ i2 → i1 = i2.
+lemma at_id_fwd: ∀i1,i2. @⦃i1,𝐈𝐝⦄ ≘ i2 → i1 = i2.
 /2 width=4 by at_mono/ qed.
 
 (* Main properties on id ****************************************************)
diff --git a/matita/matita/contribs/lambdadelta/ground_2/relocation/rtmap_basic_after.ma b/matita/matita/contribs/lambdadelta/ground_2/relocation/rtmap_basic_after.ma
new file mode 100644 (file)
index 0000000..788d8c2
--- /dev/null
@@ -0,0 +1,39 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "ground_2/relocation/rtmap_after.ma".
+include "ground_2/relocation/rtmap_basic.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+(* Properties with composition **********************************************)
+
+lemma after_basic_rc (m2,m1,n2,n1):
+                     m1 ≤ m2 → m2 ≤ m1+n1 → 𝐁❴m2,n2❵ ⊚ 𝐁❴m1,n1❵ ≘ 𝐁❴m1,n2+n1❵.
+#m2 elim m2 -m2
+[ #m1 #n2 #n1 #Hm21 #_
+  <(le_n_O_to_eq … Hm21) -m1 //
+| #m2 #IH *
+  [ #n2 #n1 #_ < plus_O_n #H
+    elim (le_inv_S1 … H) -H #x #Hx #H destruct
+    <plus_n_Sm
+    @after_push [4:|*: // ]
+    @(IH 0 … Hx) -IH -n2 -x //
+  | #m1 #n2 #n1 #H1 #H2
+    lapply (le_S_S_to_le … H1) -H1 #H1
+    lapply (le_S_S_to_le … H2) -H2 #H2
+    /3 width=7 by after_refl/
+  ]
+]
+qed.
index e65c3c11333112bdc1de3553589793b56afed98f..87087b273bfb4b5382ddd32e314017c709129956 100644 (file)
@@ -17,7 +17,7 @@ include "ground_2/relocation/rtmap_at.ma".
 
 (* RELOCATION MAP ***********************************************************)
 
-definition istot: predicate rtmap ≝ λf. ∀i. ∃j. @⦃i, f⦄ ≘ j.
+definition istot: predicate rtmap ≝ λf. ∀i. ∃j. @⦃i,f⦄ ≘ j.
 
 interpretation "test for totality (rtmap)"
    'IsTotal f = (istot f).
@@ -50,7 +50,7 @@ qed.
 (* Main forward lemmas on at ************************************************)
 
 corec theorem at_ext: ∀f1,f2. 𝐓⦃f1⦄ → 𝐓⦃f2⦄ →
-                      (∀i,i1,i2. @⦃i, f1⦄ ≘ i1 → @⦃i, f2⦄ ≘ i2 → i1 = i2) →
+                      (∀i,i1,i2. @⦃i,f1⦄ ≘ i1 → @⦃i,f2⦄ ≘ i2 → i1 = i2) →
                       f1 ≡ f2.
 #f1 cases (pn_split f1) * #g1 #H1
 #f2 cases (pn_split f2) * #g2 #H2
@@ -72,7 +72,7 @@ qed-.
 
 (* Advanced properties on at ************************************************)
 
-lemma at_dec: ∀f,i1,i2. 𝐓⦃f⦄ → Decidable (@⦃i1, f⦄ ≘ i2).
+lemma at_dec: ∀f,i1,i2. 𝐓⦃f⦄ → Decidable (@⦃i1,f⦄ ≘ i2).
 #f #i1 #i2 #Hf lapply (Hf i1) -Hf *
 #j2 #Hf elim (eq_nat_dec i2 j2)
 [ #H destruct /2 width=1 by or_introl/
@@ -80,8 +80,8 @@ lemma at_dec: ∀f,i1,i2. 𝐓⦃f⦄ → Decidable (@⦃i1, f⦄ ≘ i2).
 ]
 qed-.
 
-lemma is_at_dec_le: ∀f,i2,i. 𝐓⦃f⦄ → (∀i1. i1 + i ≤ i2 → @⦃i1, f⦄ ≘ i2 → ⊥) →
-                    Decidable (∃i1. @⦃i1, f⦄ ≘ i2).
+lemma is_at_dec_le: ∀f,i2,i. 𝐓⦃f⦄ → (∀i1. i1 + i ≤ i2 → @⦃i1,f⦄ ≘ i2 → ⊥) →
+                    Decidable (∃i1. @⦃i1,f⦄ ≘ i2).
 #f #i2 #i #Hf elim i -i
 [ #Ht @or_intror * /3 width=3 by at_increasing/
 | #i #IH #Ht elim (at_dec f (i2-i) i2) /3 width=2 by ex_intro, or_introl/
@@ -90,13 +90,13 @@ lemma is_at_dec_le: ∀f,i2,i. 𝐓⦃f⦄ → (∀i1. i1 + i ≤ i2 → @⦃i1,
 ]
 qed-.
 
-lemma is_at_dec: ∀f,i2. 𝐓⦃f⦄ → Decidable (∃i1. @⦃i1, f⦄ ≘ i2).
+lemma is_at_dec: ∀f,i2. 𝐓⦃f⦄ → Decidable (∃i1. @⦃i1,f⦄ ≘ i2).
 #f #i2 #Hf @(is_at_dec_le ?? (↑i2)) /2 width=4 by lt_le_false/
 qed-.
 
 (* Advanced properties on isid **********************************************)
 
-lemma isid_at_total: ∀f. 𝐓⦃f⦄ → (∀i1,i2. @⦃i1, f⦄ ≘ i2 → i1 = i2) → 𝐈⦃f⦄.
+lemma isid_at_total: ∀f. 𝐓⦃f⦄ → (∀i1,i2. @⦃i1,f⦄ ≘ i2 → i1 = i2) → 𝐈⦃f⦄.
 #f #H1f #H2f @isid_at
 #i lapply (H1f i) -H1f *
 #j #Hf >(H2f … Hf) in ⊢ (???%); -H2f //
index 1e08d2474be31943ed50dcfd6fd1e55c50051768..482a6da39ed2684266e34d1f3f16fecc878e0bd6 100644 (file)
@@ -43,7 +43,7 @@ definition eq_f: relation rtc ≝ λc1,c2. ⊤.
 
 inductive eq_t: relation rtc ≝
 | eq_t_intro: ∀ri1,ri2,rs1,rs2,ti,ts.
-              eq_t (〈ri1, rs1, ti, ts〉) (〈ri2, rs2, ti, ts〉)
+              eq_t (〈ri1,rs1,ti,ts〉) (〈ri2,rs2,ti,ts〉)
 .
 
 (* Basic properties *********************************************************)
index 9c988abea63f85bd33a65e7d05b191bfe96b1244..45be4c4adb03cd6593477afe3ebeca5cebf271d9 100644 (file)
@@ -18,47 +18,47 @@ include "ground_2/steps/rtc.ma".
 (* RT-TRANSITION COUNTER ****************************************************)
 
 definition isrt: relation2 nat rtc ≝ λts,c.
-                 ∃∃ri,rs. 〈ri, rs, 0, ts〉 = c.
+                 ∃∃ri,rs. 〈ri,rs,0,ts〉 = c.
 
 interpretation "test for costrained rt-transition counter (rtc)"
    'IsRedType ts c = (isrt ts c).
 
 (* Basic properties *********************************************************)
 
-lemma isr_00: 𝐑𝐓⦃0, 𝟘𝟘⦄.
+lemma isr_00: 𝐑𝐓⦃0,𝟘𝟘⦄.
 /2 width=3 by ex1_2_intro/ qed.
 
-lemma isr_10: 𝐑𝐓⦃0, 𝟙𝟘⦄.
+lemma isr_10: 𝐑𝐓⦃0,𝟙𝟘⦄.
 /2 width=3 by ex1_2_intro/ qed.
 
-lemma isrt_01: 𝐑𝐓⦃1, 𝟘𝟙⦄.
+lemma isrt_01: 𝐑𝐓⦃1,𝟘𝟙⦄.
 /2 width=3 by ex1_2_intro/ qed.
 
-lemma isrt_eq_t_trans: ∀n,c1,c2. 𝐑𝐓⦃n, c1⦄ → eq_t c1 c2 → 𝐑𝐓⦃n, c2⦄.
+lemma isrt_eq_t_trans: ∀n,c1,c2. 𝐑𝐓⦃n,c1⦄ → eq_t c1 c2 → 𝐑𝐓⦃n,c2⦄.
 #n #c1 #c2 * #ri1 #rs1 #H destruct
 #H elim (eq_t_inv_dx … H) -H /2 width=3 by ex1_2_intro/
 qed-.
 
 (* Basic inversion properties ***********************************************)
 
-lemma isrt_inv_00: ∀n. 𝐑𝐓⦃n, 𝟘𝟘⦄ → 0 = n.
+lemma isrt_inv_00: ∀n. 𝐑𝐓⦃n,𝟘𝟘⦄ → 0 = n.
 #n * #ri #rs #H destruct //
 qed-.
 
-lemma isrt_inv_10: ∀n. 𝐑𝐓⦃n, 𝟙𝟘⦄ → 0 = n.
+lemma isrt_inv_10: ∀n. 𝐑𝐓⦃n,𝟙𝟘⦄ → 0 = n.
 #n * #ri #rs #H destruct //
 qed-.
 
-lemma isrt_inv_01: ∀n. 𝐑𝐓⦃n, 𝟘𝟙⦄ → 1 = n.
+lemma isrt_inv_01: ∀n. 𝐑𝐓⦃n,𝟘𝟙⦄ → 1 = n.
 #n * #ri #rs #H destruct //
 qed-.
 
 (* Main inversion properties ************************************************)
 
-theorem isrt_inj: ∀n1,n2,c. 𝐑𝐓⦃n1, c⦄ → 𝐑𝐓⦃n2, c⦄ → n1 = n2.
+theorem isrt_inj: ∀n1,n2,c. 𝐑𝐓⦃n1,c⦄ → 𝐑𝐓⦃n2,c⦄ → n1 = n2.
 #n1 #n2 #c * #ri1 #rs1 #H1 * #ri2 #rs2 #H2 destruct //
 qed-.
 
-theorem isrt_mono: ∀n,c1,c2. 𝐑𝐓⦃n, c1⦄ → 𝐑𝐓⦃n, c2⦄ → eq_t c1 c2.
+theorem isrt_mono: ∀n,c1,c2. 𝐑𝐓⦃n,c1⦄ → 𝐑𝐓⦃n,c2⦄ → eq_t c1 c2.
 #n #c1 #c2 * #ri1 #rs1 #H1 * #ri2 #rs2 #H2 destruct //
 qed-.
index bfa170972e886103eac16ea7eceac7984358da86..bf31a291fec87b2d9d48ab1008e1245e4d3f2173 100644 (file)
@@ -18,7 +18,7 @@ include "ground_2/steps/rtc_shift.ma".
 
 definition max (c1:rtc) (c2:rtc): rtc ≝ match c1 with [
    mk_rtc ri1 rs1 ti1 ts1 ⇒ match c2 with [
-      mk_rtc ri2 rs2 ti2 ts2 ⇒ 〈ri1∨ri2, rs1∨rs2, ti1∨ti2, ts1∨ts2〉
+      mk_rtc ri2 rs2 ti2 ts2 ⇒ 〈ri1∨ri2,rs1∨rs2,ti1∨ti2,ts1∨ts2〉
    ]
 ].
 
@@ -28,7 +28,7 @@ interpretation "maximum (rtc)"
 (* Basic properties *********************************************************)
 
 lemma max_rew: ∀ri1,ri2,rs1,rs2,ti1,ti2,ts1,ts2.
-                 〈ri1∨ri2, rs1∨rs2, ti1∨ti2, ts1∨ts2〉 =
+                 〈ri1∨ri2,rs1∨rs2,ti1∨ti2,ts1∨ts2〉 =
                  (〈ri1,rs1,ti1,ts1〉 ∨ 〈ri2,rs2,ti2,ts2〉).
 // qed.
 
@@ -59,46 +59,46 @@ qed.
 
 (* Properties with test for constrained rt-transition counter ***************)
 
-lemma isrt_max: ∀n1,n2,c1,c2. 𝐑𝐓⦃n1, c1⦄ → 𝐑𝐓⦃n2, c2⦄ → 𝐑𝐓⦃n1∨n2, c1∨c2⦄.
+lemma isrt_max: ∀n1,n2,c1,c2. 𝐑𝐓⦃n1,c1⦄ → 𝐑𝐓⦃n2,c2⦄ → 𝐑𝐓⦃n1∨n2,c1∨c2⦄.
 #n1 #n2 #c1 #c2 * #ri1 #rs1 #H1 * #ri2 #rs2 #H2 destruct
 /2 width=3 by ex1_2_intro/
 qed.
 
-lemma isrt_max_O1: ∀n,c1,c2. 𝐑𝐓⦃0, c1⦄ → 𝐑𝐓⦃n, c2⦄ → 𝐑𝐓⦃n, c1∨c2⦄.
+lemma isrt_max_O1: ∀n,c1,c2. 𝐑𝐓⦃0,c1⦄ → 𝐑𝐓⦃n,c2⦄ → 𝐑𝐓⦃n,c1∨c2⦄.
 /2 width=1 by isrt_max/ qed.
 
-lemma isrt_max_O2: ∀n,c1,c2. 𝐑𝐓⦃n, c1⦄ → 𝐑𝐓⦃0, c2⦄ → 𝐑𝐓⦃n, c1∨c2⦄.
+lemma isrt_max_O2: ∀n,c1,c2. 𝐑𝐓⦃n,c1⦄ → 𝐑𝐓⦃0,c2⦄ → 𝐑𝐓⦃n,c1∨c2⦄.
 #n #c1 #c2 #H1 #H2 >(max_O2 n) /2 width=1 by isrt_max/
 qed.
 
-lemma isrt_max_idem1: ∀n,c1,c2. 𝐑𝐓⦃n, c1⦄ → 𝐑𝐓⦃n, c2⦄ → 𝐑𝐓⦃n, c1∨c2⦄.
+lemma isrt_max_idem1: ∀n,c1,c2. 𝐑𝐓⦃n,c1⦄ → 𝐑𝐓⦃n,c2⦄ → 𝐑𝐓⦃n,c1∨c2⦄.
 #n #c1 #c2 #H1 #H2 >(idempotent_max n) /2 width=1 by isrt_max/
 qed.
 
 (* Inversion properties with test for constrained rt-transition counter *****)
 
-lemma isrt_inv_max: ∀n,c1,c2. 𝐑𝐓⦃n, c1 ∨ c2⦄ →
-                    ∃∃n1,n2. 𝐑𝐓⦃n1, c1⦄ & 𝐑𝐓⦃n2, c2⦄ & (n1 ∨ n2) = n.
+lemma isrt_inv_max: ∀n,c1,c2. 𝐑𝐓⦃n,c1 ∨ c2⦄ →
+                    ∃∃n1,n2. 𝐑𝐓⦃n1,c1⦄ & 𝐑𝐓⦃n2,c2⦄ & (n1 ∨ n2) = n.
 #n #c1 #c2 * #ri #rs #H
 elim (max_inv_dx … H) -H #ri1 #rs1 #ti1 #ts1 #ri2 #rs2 #ti2 #ts2 #_ #_ #H1 #H2 #H3 #H4
 elim (max_inv_O3 … H1) -H1 /3 width=5 by ex3_2_intro, ex1_2_intro/
 qed-.
 
-lemma isrt_O_inv_max: ∀c1,c2. 𝐑𝐓⦃0, c1 ∨ c2⦄ → ∧∧ 𝐑𝐓⦃0, c1⦄ & 𝐑𝐓⦃0, c2⦄.
+lemma isrt_O_inv_max: ∀c1,c2. 𝐑𝐓⦃0,c1 ∨ c2⦄ → ∧∧ 𝐑𝐓⦃0,c1⦄ & 𝐑𝐓⦃0,c2⦄.
 #c1 #c2 #H
 elim (isrt_inv_max … H) -H #n1 #n2 #Hn1 #Hn2 #H
 elim (max_inv_O3 … H) -H #H1 #H2 destruct
 /2 width=1 by conj/
 qed-.
 
-lemma isrt_inv_max_O_dx: ∀n,c1,c2. 𝐑𝐓⦃n, c1 ∨ c2⦄ → 𝐑𝐓⦃0, c2⦄ → 𝐑𝐓⦃n, c1⦄.
+lemma isrt_inv_max_O_dx: ∀n,c1,c2. 𝐑𝐓⦃n,c1 ∨ c2⦄ → 𝐑𝐓⦃0,c2⦄ → 𝐑𝐓⦃n,c1⦄.
 #n #c1 #c2 #H #H2
 elim (isrt_inv_max … H) -H #n1 #n2 #Hn1 #Hn2 #H destruct
 lapply (isrt_inj … Hn2 H2) -c2 #H destruct //
 qed-.
 
-lemma isrt_inv_max_eq_t: ∀n,c1,c2. 𝐑𝐓⦃n, c1 ∨ c2⦄ → eq_t c1 c2 →
-                         ∧∧ 𝐑𝐓⦃n, c1⦄ & 𝐑𝐓⦃n, c2⦄.
+lemma isrt_inv_max_eq_t: ∀n,c1,c2. 𝐑𝐓⦃n,c1 ∨ c2⦄ → eq_t c1 c2 →
+                         ∧∧ 𝐑𝐓⦃n,c1⦄ & 𝐑𝐓⦃n,c2⦄.
 #n #c1 #c2 #H #Hc12
 elim (isrt_inv_max … H) -H #n1 #n2 #Hc1 #Hc2 #H destruct
 lapply (isrt_eq_t_trans … Hc1 … Hc12) -Hc12 #H
@@ -115,8 +115,8 @@ qed.
 
 (* Inversion lemmaswith shift ***********************************************)
 
-lemma isrt_inv_max_shift_sn: ∀n,c1,c2. 𝐑𝐓⦃n, ↕*c1 ∨ c2⦄ →
-                             ∧∧ 𝐑𝐓⦃0, c1⦄ & 𝐑𝐓⦃n, c2⦄.
+lemma isrt_inv_max_shift_sn: ∀n,c1,c2. 𝐑𝐓⦃n,↕*c1 ∨ c2⦄ →
+                             ∧∧ 𝐑𝐓⦃0,c1⦄ & 𝐑𝐓⦃n,c2⦄.
 #n #c1 #c2 #H
 elim (isrt_inv_max … H) -H #n1 #n2 #Hc1 #Hc2 #H destruct
 elim (isrt_inv_shift … Hc1) -Hc1 #Hc1 * -n1
index 49ce55082238d18d774b43970648fd2f0c457321..a5237af26b17a96981bda3ef94c805f23a050002 100644 (file)
@@ -18,7 +18,7 @@ include "ground_2/steps/rtc_isrt.ma".
 
 definition plus (c1:rtc) (c2:rtc): rtc ≝ match c1 with [
    mk_rtc ri1 rs1 ti1 ts1 ⇒ match c2 with [
-      mk_rtc ri2 rs2 ti2 ts2 ⇒ 〈ri1+ri2, rs1+rs2, ti1+ti2, ts1+ts2〉
+      mk_rtc ri2 rs2 ti2 ts2 ⇒ 〈ri1+ri2,rs1+rs2,ti1+ti2,ts1+ts2〉
    ]
 ].
 
@@ -29,7 +29,7 @@ interpretation "plus (rtc)"
 
 (**) (* plus is not disambiguated parentheses *) 
 lemma plus_rew: ∀ri1,ri2,rs1,rs2,ti1,ti2,ts1,ts2.
-                 〈ri1+ri2, rs1+rs2, ti1+ti2, ts1+ts2〉 =
+                 〈ri1+ri2,rs1+rs2,ti1+ti2,ts1+ts2〉 =
                  (〈ri1,rs1,ti1,ts1〉) + (〈ri2,rs2,ti2,ts2〉).
 // qed.
 
@@ -56,38 +56,38 @@ qed.
 
 (* Properties with test for constrained rt-transition counter ***************)
 
-lemma isrt_plus: ∀n1,n2,c1,c2. 𝐑𝐓⦃n1, c1⦄ → 𝐑𝐓⦃n2, c2⦄ → 𝐑𝐓⦃n1+n2, c1+c2⦄.
+lemma isrt_plus: ∀n1,n2,c1,c2. 𝐑𝐓⦃n1,c1⦄ → 𝐑𝐓⦃n2,c2⦄ → 𝐑𝐓⦃n1+n2,c1+c2⦄.
 #n1 #n2 #c1 #c2 * #ri1 #rs1 #H1 * #ri2 #rs2 #H2 destruct
 /2 width=3 by ex1_2_intro/
 qed.
 
-lemma isrt_plus_O1: ∀n,c1,c2. 𝐑𝐓⦃0, c1⦄ → 𝐑𝐓⦃n, c2⦄ → 𝐑𝐓⦃n, c1+c2⦄.
+lemma isrt_plus_O1: ∀n,c1,c2. 𝐑𝐓⦃0,c1⦄ → 𝐑𝐓⦃n,c2⦄ → 𝐑𝐓⦃n,c1+c2⦄.
 /2 width=1 by isrt_plus/ qed.
 
-lemma isrt_plus_O2: ∀n,c1,c2. 𝐑𝐓⦃n, c1⦄ → 𝐑𝐓⦃0, c2⦄ → 𝐑𝐓⦃n, c1+c2⦄.
+lemma isrt_plus_O2: ∀n,c1,c2. 𝐑𝐓⦃n,c1⦄ → 𝐑𝐓⦃0,c2⦄ → 𝐑𝐓⦃n,c1+c2⦄.
 #n #c1 #c2 #H1 #H2 >(plus_n_O n) /2 width=1 by isrt_plus/
 qed.
 
-lemma isrt_succ: ∀n,c. 𝐑𝐓⦃n, c⦄ → 𝐑𝐓⦃↑n, c+𝟘𝟙⦄.
+lemma isrt_succ: ∀n,c. 𝐑𝐓⦃n,c⦄ → 𝐑𝐓⦃↑n,c+𝟘𝟙⦄.
 /2 width=1 by isrt_plus/ qed.
 
 (* Inversion properties with test for constrained rt-transition counter *****)
 
-lemma isrt_inv_plus: ∀n,c1,c2. 𝐑𝐓⦃n, c1 + c2⦄ →
-                     ∃∃n1,n2. 𝐑𝐓⦃n1, c1⦄ & 𝐑𝐓⦃n2, c2⦄ & n1 + n2 = n.
+lemma isrt_inv_plus: ∀n,c1,c2. 𝐑𝐓⦃n,c1 + c2⦄ →
+                     ∃∃n1,n2. 𝐑𝐓⦃n1,c1⦄ & 𝐑𝐓⦃n2,c2⦄ & n1 + n2 = n.
 #n #c1 #c2 * #ri #rs #H
 elim (plus_inv_dx … H) -H #ri1 #rs1 #ti1 #ts1 #ri2 #rs2 #ti2 #ts2 #_ #_ #H1 #H2 #H3 #H4
 elim (plus_inv_O3 … H1) -H1 /3 width=5 by ex3_2_intro, ex1_2_intro/
 qed-.
 
-lemma isrt_inv_plus_O_dx: ∀n,c1,c2. 𝐑𝐓⦃n, c1 + c2⦄ → 𝐑𝐓⦃0, c2⦄ → 𝐑𝐓⦃n, c1⦄.
+lemma isrt_inv_plus_O_dx: ∀n,c1,c2. 𝐑𝐓⦃n,c1 + c2⦄ → 𝐑𝐓⦃0,c2⦄ → 𝐑𝐓⦃n,c1⦄.
 #n #c1 #c2 #H #H2
 elim (isrt_inv_plus … H) -H #n1 #n2 #Hn1 #Hn2 #H destruct
 lapply (isrt_inj … Hn2 H2) -c2 #H destruct //
 qed-.
 
-lemma isrt_inv_plus_SO_dx: ∀n,c1,c2. 𝐑𝐓⦃n, c1 + c2⦄ → 𝐑𝐓⦃1, c2⦄ →
-                           ∃∃m. 𝐑𝐓⦃m, c1⦄ & n = ↑m.
+lemma isrt_inv_plus_SO_dx: ∀n,c1,c2. 𝐑𝐓⦃n,c1 + c2⦄ → 𝐑𝐓⦃1,c2⦄ →
+                           ∃∃m. 𝐑𝐓⦃m,c1⦄ & n = ↑m.
 #n #c1 #c2 #H #H2
 elim (isrt_inv_plus … H) -H #n1 #n2 #Hn1 #Hn2 #H destruct
 lapply (isrt_inj … Hn2 H2) -c2 #H destruct
index e2f739d69572e6405257b51420dcff6dd05674d9..165e1eeda586863948d44f2f2c2ab32a061ac84d 100644 (file)
@@ -18,14 +18,14 @@ include "ground_2/steps/rtc_isrt.ma".
 (* RT-TRANSITION COUNTER ****************************************************)
 
 definition shift (c:rtc): rtc ≝ match c with
-[ mk_rtc ri rs ti ts ⇒ 〈ri∨rs, 0, ti∨ts, 0〉 ].
+[ mk_rtc ri rs ti ts ⇒ 〈ri∨rs,0,ti∨ts,0〉 ].
 
 interpretation "shift (rtc)"
    'UpDownArrowStar c = (shift c).
 
 (* Basic properties *********************************************************)
 
-lemma shift_rew: ∀ri,rs,ti,ts. 〈ri∨rs, 0, ti∨ts, 0〉 = ↕*〈ri, rs, ti, ts〉.
+lemma shift_rew: ∀ri,rs,ti,ts. 〈ri∨rs,0,ti∨ts,0〉 = ↕*〈ri,rs,ti,ts〉.
 normalize //
 qed.
 
@@ -34,27 +34,27 @@ lemma shift_O: 𝟘𝟘 = ↕*𝟘𝟘.
 
 (* Basic inversion properties ***********************************************)
 
-lemma shift_inv_dx: ∀ri,rs,ti,ts,c. 〈ri, rs, ti, ts〉 = ↕*c →
+lemma shift_inv_dx: ∀ri,rs,ti,ts,c. 〈ri,rs,ti,ts〉 = ↕*c →
                     ∃∃ri0,rs0,ti0,ts0. (ri0∨rs0) = ri & 0 = rs & (ti0∨ts0) = ti & 0 = ts &
-                                       〈ri0, rs0, ti0, ts0〉 = c.
+                                       〈ri0,rs0,ti0,ts0〉 = c.
 #ri #rs #ti #ts * #ri0 #rs0 #ti0 #ts0 <shift_rew #H destruct
 /2 width=7 by ex5_4_intro/
 qed-.
 
 (* Properties with test for costrained rt-transition counter ****************)
 
-lemma isr_shift: ∀c. 𝐑𝐓⦃0, c⦄ → 𝐑𝐓⦃0, ↕*c⦄.
+lemma isr_shift: ∀c. 𝐑𝐓⦃0,c⦄ → 𝐑𝐓⦃0,↕*c⦄.
 #c * #ri #rs #H destruct /2 width=3 by ex1_2_intro/
 qed.
 
 (* Inversion properties with test for costrained rt-counter *****************)
 
-lemma isrt_inv_shift: ∀n,c. 𝐑𝐓⦃n, ↕*c⦄ → 𝐑𝐓⦃0, c⦄ ∧ 0 = n.
+lemma isrt_inv_shift: ∀n,c. 𝐑𝐓⦃n,↕*c⦄ → 𝐑𝐓⦃0,c⦄ ∧ 0 = n.
 #n #c * #ri #rs #H
 elim (shift_inv_dx … H) -H #rt0 #rs0 #ti0 #ts0 #_ #_ #H1 #H2 #H3
 elim (max_inv_O3 … H1) -H1 /3 width=3 by ex1_2_intro, conj/
 qed-.
 
-lemma isr_inv_shift: ∀c. 𝐑𝐓⦃0, ↕*c⦄ → 𝐑𝐓⦃0, c⦄.
+lemma isr_inv_shift: ∀c. 𝐑𝐓⦃0,↕*c⦄ → 𝐑𝐓⦃0,c⦄.
 #c #H elim (isrt_inv_shift … H) -H //
 qed-.
index 501d4f30fb22fa59a6a39623ee34418d17c3d19f..bf328791298d24d94054d63d9821802883b3bc1c 100644 (file)
@@ -25,14 +25,14 @@ table {
                "rtmap_fcla ( 𝐂⦃?⦄ ≘ ? )" "rtmap_isfin ( 𝐅⦃?⦄ )" "rtmap_isuni ( 𝐔⦃?⦄ )" "rtmap_uni ( 𝐔❴?❵ )"
                "rtmap_sle ( ? ⊆ ? )" "rtmap_sdj ( ? ∥ ? )" "rtmap_sand ( ? ⋒ ? ≘ ? )" "rtmap_sor ( ? ⋓ ? ≘ ? )"
                "rtmap_at ( @⦃?,?⦄ ≘ ? )" "rtmap_istot ( 𝐓⦃?⦄ )" "rtmap_after ( ? ⊚ ? ≘ ? )" "rtmap_coafter ( ? ~⊚ ? ≘ ? )"
-               "rtmap_basic ( 𝐁❴?,?❵ )"
+               "rtmap_basic ( 𝐁❴?,?❵ )" "rtmap_basic_after"
              * ]
              [ "nstream ( ⫯? ) ( ↑? )" "nstream_eq" "" ""
                "" "" "nstream_isid" "nstream_id ( 𝐈𝐝 )" ""
                "" "" "" ""
                "" "" "" "nstream_sor"
                "" "nstream_istot ( ?@❴?❵ )" "nstream_after ( ? ∘ ? )" "nstream_coafter ( ? ~∘ ? )"
-               "nstream_basic"
+               "nstream_basic" ""
              * ]
 (*
              [ "trace ( ∥?∥ )" "trace_at ( @⦃?,?⦄ ≘ ? )" "trace_after ( ? ⊚ ? ≘ ? )" "trace_isid ( 𝐈⦃?⦄ )" "trace_isun ( 𝐔⦃?⦄ )"
diff --git a/matita/matita/contribs/lambdadelta/ground_2/xoa/ex_1_4.ma b/matita/matita/contribs/lambdadelta/ground_2/xoa/ex_1_4.ma
new file mode 100644 (file)
index 0000000..b5faca4
--- /dev/null
@@ -0,0 +1,28 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground_2/notation/xoa/ex_1_4.ma".
+
+(* multiple existental quantifier (1, 4) *)
+
+inductive ex1_4 (A0,A1,A2,A3:Type[0]) (P0:A0→A1→A2→A3→Prop) : Prop ≝
+   | ex1_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → ex1_4 ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (1, 4)" 'Ex4 P0 = (ex1_4 ? ? ? ? P0).
+
index fe081386b301b8498ae764032fe547fe601817b6..3841d916a28a659ca574facaf19f8a183fb109b2 100644 (file)
@@ -14,7 +14,7 @@
 
 include "ground_2/xoa/xoa.ma".
 
-(* Properties with multiple existental quantifier (5, 1) ********************)
+(* Properties with multiple existental quantifier (4, 1) ********************)
 
 lemma ex4_commute (A0) (P0,P1,P2,P3:A0→Prop):
                   (∃∃x0. P0 x0 & P1 x0 & P2 x0 & P3 x0) → ∃∃x0. P2 x0 & P3 x0 & P0 x0 & P1 x0.
index d40726d0251919547d94c5ae8fea20331cfdf13e..8f974dbe06f453fe7051fc3ade93ebb294e742f9 100644 (file)
@@ -5,6 +5,7 @@
     <key name="objects">ground_2/xoa</key>
     <key name="notations">ground_2/notation/xoa</key>
     <key name="include">basics/pts.ma</key>
+    <key name="ex">1 4</key>
     <key name="ex">5 1</key>
     <key name="ex">5 7</key>
     <key name="ex">9 3</key>
index ab87ca2788bb1f747103094451963e85e03206e2..ab9cf4565cc365d28ff3d8d94b3a8b2359e91c02 100644 (file)
@@ -199,6 +199,10 @@ lemma yle_ylt_trans: ∀x:ynat. ∀y:ynat. ∀z:ynat. y < z → x ≤ y → x <
 ]
 qed-.
 
+lemma le_ylt_trans (x) (y) (z): x ≤ y → yinj y < z → yinj x < z.  
+/3 width=3 by yle_ylt_trans, yle_inj/
+qed-.
+
 lemma yle_inv_succ1_lt: ∀x,y:ynat. ↑x ≤ y → 0 < y ∧ x ≤ ↓y.
 #x #y #H elim (yle_inv_succ1 … H) -H /3 width=1 by ylt_O1, conj/
 qed-.
@@ -219,6 +223,10 @@ theorem ylt_trans: Transitive … ylt.
 ]
 qed-.
 
+lemma lt_ylt_trans (x) (y) (z): x < y → yinj y < z → yinj x < z.  
+/3 width=3 by ylt_trans, ylt_inj/
+qed-.
+
 (* Elimination principles ***************************************************)
 
 fact ynat_ind_lt_le_aux: ∀R:predicate ynat.
diff --git a/matita/matita/contribs/lambdadelta/partial.txt b/matita/matita/contribs/lambdadelta/partial.txt
deleted file mode 100644 (file)
index 11b4d45..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-ground_2
-static_2
-basic_2
-apps_2
index fcc328a85b694da2ebb5259a597afd483dda4678..d077dcb594cb8bc2b4573a44455602477a53184f 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
-for SRC in `find grond_2 static_2 basic_2 apps_2 -name "*.ma" -or -name "*.tbl"`; do
-   sed "s!$1!$2!g" ${SRC} > ${SRC}.new
+for SRC in `find ground_2 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; 
       else echo ${SRC}; mv -f ${SRC} ${SRC}.old; mv -f ${SRC}.new ${SRC};
diff --git a/matita/matita/contribs/lambdadelta/static_2/etc/scl/clearsn_3.etc b/matita/matita/contribs/lambdadelta/static_2/etc/scl/clearsn_3.etc
new file mode 100644 (file)
index 0000000..d430b8d
--- /dev/null
@@ -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 f ] break term 46 L2 )"
+   non associative with precedence 45
+   for @{ 'ClearSn $f $L1 $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/static_2/etc/scl/scl.etc b/matita/matita/contribs/lambdadelta/static_2/etc/scl/scl.etc
new file mode 100644 (file)
index 0000000..9d7e924
--- /dev/null
@@ -0,0 +1,110 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/notation/relations/clearsn_3.ma".
+include "static_2/syntax/cext2.ma".
+include "static_2/relocation/sex.ma".
+
+(* CLEAR FOR LOCAL ENVIRONMENTS ON SELECTED ENTRIES *************************)
+
+definition ccl: relation3 lenv bind bind ≝ λL,I1,I2. BUnit Void = I2.
+
+definition scl: rtmap → relation lenv ≝ sex ccl (cext2 ceq).
+
+interpretation
+  "clear (local environment)"
+  'ClearSn f L1 L2 = (scl f L1 L2).
+
+(* Basic eliminators ********************************************************)
+
+lemma scl_ind (Q:rtmap→relation lenv): 
+      (∀f. Q f (⋆) (⋆)) →
+      (∀f,I,K1,K2. K1 ⊐ⓧ[f] K2 → Q f K1 K2 → Q (⫯f) (K1.ⓘ{I}) (K2.ⓘ{I})) →
+      (∀f,I,K1,K2. K1 ⊐ⓧ[f] K2 → Q f K1 K2 → Q (↑f) (K1.ⓘ{I}) (K2.ⓧ)) →
+      ∀f,L1,L2. L1 ⊐ⓧ[f] L2 → Q f L1 L2.
+#Q #IH1 #IH2 #IH3 #f #L1 #L2 #H elim H -f -L1 -L2 
+[ //
+| #f #I1 #I2 #K1 #K2 #HK #H #IH destruct /2 by/
+| #f #I1 #I2 #K1 #K2 #HK * #I [| #V1 #V2 #H ] #IH destruct /2 by/
+]
+qed-.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma scl_inv_atom_sn: ∀g,L2. ⋆ ⊐ⓧ[g] L2 → L2 = ⋆.
+/2 width=4 by sex_inv_atom1/ qed-.
+
+lemma scl_inv_push_sn: ∀f,I,K1,L2. K1.ⓘ{I} ⊐ⓧ[⫯f] L2 →
+                       ∃∃K2. K1 ⊐ⓧ[f] K2 & L2 = K2.ⓘ{I}.
+#f #I #K1 #L2 #H
+elim (sex_inv_push1 … H) -H #J #K2 #HK12 *
+/2 width=3 by ex2_intro/
+qed-.
+
+lemma scl_inv_next_sn: ∀f,I,K1,L2. K1.ⓘ{I} ⊐ⓧ[↑f] L2 →
+                       ∃∃K2. K1 ⊐ⓧ[f] K2 & L2 = K2.ⓧ.
+#f #I #K1 #L2 #H
+elim (sex_inv_next1 … H) -H
+/2 width=3 by ex2_intro/
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma scl_inv_bind_sn_gen: ∀g,I,K1,L2. K1.ⓘ{I} ⊐ⓧ[g] L2 →
+                           ∨∨ ∃∃f,K2. K1 ⊐ⓧ[f] K2 & g = ⫯f & L2 = K2.ⓘ{I}
+                            | ∃∃f,K2. K1 ⊐ⓧ[f] K2 & g = ↑f & L2 = K2.ⓧ.
+#g #I #K1 #L2 #H
+elim (pn_split g) * #f #Hf destruct
+[ elim (scl_inv_push_sn … H) -H
+| elim (scl_inv_next_sn … H) -H
+]
+/3 width=5 by ex3_2_intro, or_intror, or_introl/
+qed-.
+
+(* Advanced forward lemmas **************************************************)
+
+lemma scl_fwd_bind_sn: ∀g,I1,K1,L2. K1.ⓘ{I1} ⊐ⓧ[g] L2 →
+                       ∃∃I2,K2. K1 ⊐ⓧ[⫱g] K2 & L2 = K2.ⓘ{I2}.
+#g #I1 #K1 #L2
+elim (pn_split g) * #f #Hf destruct #H
+[ elim (scl_inv_push_sn … H) -H
+| elim (scl_inv_next_sn … H) -H
+]
+/2 width=4 by ex2_2_intro/
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma scl_atom: ∀f. ⋆ ⊐ⓧ[f] ⋆.
+/by sex_atom/ qed.
+
+lemma scl_push: ∀f,K1,K2. K1 ⊐ⓧ[f] K2 → ∀I. K1.ⓘ{I} ⊐ⓧ[⫯f] K2.ⓘ{I}.
+#f #K1 #K2 #H * /3 width=1 by sex_push, ext2_unit, ext2_pair/
+qed.
+
+lemma scl_next: ∀f,K1,K2. K1 ⊐ⓧ[f] K2 → ∀I. K1.ⓘ{I} ⊐ⓧ[↑f] K2.ⓧ.
+/2 width=1 by sex_next/ qed.
+
+lemma scl_eq_repl_back: ∀L1,L2. eq_repl_back … (λf. L1 ⊐ⓧ[f] L2).
+/2 width=3 by sex_eq_repl_back/ qed-.
+
+lemma scl_eq_repl_fwd: ∀L1,L2. eq_repl_fwd … (λf. L1 ⊐ⓧ[f] L2).
+/2 width=3 by sex_eq_repl_fwd/ qed-.
+
+(* Advanced properties ******************************************************)
+
+lemma scl_refl: ∀f. 𝐈⦃f⦄ → reflexive … (scl f).
+#f #Hf #L elim L -L
+/3 width=3 by scl_eq_repl_back, scl_push, eq_push_inv_isid/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/static_2/etc/scl/scl_scl.etc b/matita/matita/contribs/lambdadelta/static_2/etc/scl/scl_scl.etc
new file mode 100644 (file)
index 0000000..6ca737b
--- /dev/null
@@ -0,0 +1,36 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/relocation/scl.ma".
+
+(* CLEAR FOR LOCAL ENVIRONMENTS ON SELECTED ENTRIES *************************)
+
+(* Main properties **********************************************************)
+
+theorem scl_fix: ∀f,L1,L. L1 ⊐ⓧ[f] L →
+                 ∀L2. L ⊐ⓧ[f] L2 → L = L2.
+#f #L1 #L #H @(scl_ind … H) -f -L1 -L
+[ #f #L2 #H
+  >(scl_inv_atom_sn … H) -L2 //
+| #f #I #K1 #K2 #_ #IH #L2 #H
+  elim (scl_inv_push_sn … H) -H /3 width=1 by eq_f2/
+| #f #I #K1 #K2 #_ #IH #L2 #H
+  elim (scl_inv_next_sn … H) -H /3 width=1 by eq_f2/
+]
+qed-.
+
+theorem scl_trans: ∀f. Transitive … (scl f).
+#f #L1 #L #H1 #L2 #H2
+<(scl_fix … H1 … H2) -L2 //
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/static_2/etc/sh_lt.etc b/matita/matita/contribs/lambdadelta/static_2/etc/sh_lt.etc
new file mode 100644 (file)
index 0000000..c623e79
--- /dev/null
@@ -0,0 +1,2 @@
+definition sh_N: sh ≝ mk_sh S ….
+// defined.
diff --git a/matita/matita/contribs/lambdadelta/static_2/etc/tueq/lifts_tueq.etc b/matita/matita/contribs/lambdadelta/static_2/etc/tueq/lifts_tueq.etc
new file mode 100644 (file)
index 0000000..a9805a9
--- /dev/null
@@ -0,0 +1,80 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/tueq.ma".
+include "static_2/relocation/lifts_lifts.ma".
+
+(* GENERIC RELOCATION FOR TERMS *********************************************)
+
+(* Properties with tail sort-irrelevant equivalence for terms ***************)
+
+lemma tueq_lifts_sn: liftable2_sn tueq.
+#T1 #T2 #H elim H -T1 -T2
+[ #s1 #s2 #f #X #H >(lifts_inv_sort1 … H) -H
+  /3 width=3 by lifts_sort, tueq_sort, ex2_intro/
+| #i #f #X #H elim (lifts_inv_lref1 … H) -H
+  /3 width=3 by lifts_lref, tueq_lref, ex2_intro/
+| #l #f #X #H >(lifts_inv_gref1 … H) -H
+  /2 width=3 by lifts_gref, tueq_gref, ex2_intro/
+| #p #I #V #T1 #T2 #_ #IHT #f #X #H elim (lifts_inv_bind1 … H) -H
+  #W1 #U1 #HVW1 #HTU1 #H destruct
+  elim (IHT … HTU1) -T1
+  /3 width=3 by lifts_bind, tueq_bind, ex2_intro/
+| #V #T1 #T2 #_ #IHT #f #X #H elim (lifts_inv_flat1 … H) -H
+  #W1 #U1 #HVW1 #HTU1 #H destruct
+  elim (IHT … HTU1) -T1
+  /3 width=3 by lifts_flat, tueq_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 elim (IHT … HTU1) -T1
+  /3 width=5 by lifts_flat, tueq_cast, ex2_intro/  
+]
+qed-.
+
+lemma tueq_lifts_dx: liftable2_dx tueq.
+/3 width=3 by tueq_lifts_sn, liftable2_sn_dx, tueq_sym/ qed-.
+
+lemma tueq_lifts_bi: liftable2_bi tueq.
+/3 width=6 by tueq_lifts_sn, liftable2_sn_bi/ qed-.
+
+(* Inversion lemmas with tail sort-irrelevant equivalence for terms *********)
+
+lemma tueq_inv_lifts_sn: deliftable2_sn tueq.
+#U1 #U2 #H elim H -U1 -U2
+[ #s1 #s2 #f #X #H >(lifts_inv_sort2 … H) -H
+  /3 width=3 by lifts_sort, tueq_sort, ex2_intro/
+| #i #f #X #H elim (lifts_inv_lref2 … H) -H
+  /3 width=3 by lifts_lref, tueq_lref, ex2_intro/
+| #l #f #X #H >(lifts_inv_gref2 … H) -H
+  /2 width=3 by lifts_gref, tueq_gref, ex2_intro/
+| #p #I #W #U1 #U2 #_ #IHU #f #X #H elim (lifts_inv_bind2 … H) -H
+  #V1 #T1 #HVW1 #HTU1 #H destruct
+  elim (IHU … HTU1) -U1
+  /3 width=3 by lifts_bind, tueq_bind, ex2_intro/
+| #W #U1 #U2 #_ #IHU #f #X #H elim (lifts_inv_flat2 … H) -H
+  #V1 #T1 #HVW1 #HTU1 #H destruct
+  elim (IHU … HTU1) -U1
+  /3 width=3 by lifts_flat, tueq_appl, ex2_intro/
+| #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, tueq_cast, ex2_intro/
+]
+qed-.
+
+lemma tueq_inv_lifts_dx: deliftable2_dx tueq.
+/3 width=3 by tueq_inv_lifts_sn, deliftable2_sn_dx, tueq_sym/ qed-.
+
+lemma tueq_inv_lifts_bi: deliftable2_bi tueq.
+/3 width=6 by tueq_inv_lifts_sn, deliftable2_sn_bi/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/static_2/etc/tueq/tueq.etc b/matita/matita/contribs/lambdadelta/static_2/etc/tueq/tueq.etc
new file mode 100644 (file)
index 0000000..49a6b2f
--- /dev/null
@@ -0,0 +1,143 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM 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/approxeq_2.ma".
+include "static_2/syntax/term.ma".
+
+(* TAIL SORT-IRRELEVANT EQUIVALENCE ON TERMS ********************************)
+
+inductive tueq: relation term ≝
+| tueq_sort: ∀s1,s2. tueq (⋆s1) (⋆s2)
+| tueq_lref: ∀i. tueq (#i) (#i)
+| tueq_gref: ∀l. tueq (§l) (§l)
+| tueq_bind: ∀p,I,V,T1,T2. tueq T1 T2 → tueq (ⓑ{p,I}V.T1) (ⓑ{p,I}V.T2)
+| tueq_appl: ∀V,T1,T2. tueq T1 T2 → tueq (ⓐV.T1) (ⓐV.T2)
+| tueq_cast: ∀V1,V2,T1,T2. tueq V1 V2 → tueq T1 T2 → tueq (ⓝV1.T1) (ⓝV2.T2)
+.
+
+interpretation
+   "context-free tail sort-irrelevant equivalence (term)"
+   'ApproxEq T1 T2 = (tueq T1 T2).
+
+(* Basic properties *********************************************************)
+
+lemma tueq_refl: reflexive … tueq.
+#T elim T -T * [|||| * ] 
+/2 width=1 by tueq_sort, tueq_lref, tueq_gref, tueq_bind, tueq_appl, tueq_cast/
+qed.
+
+lemma tueq_sym: symmetric … tueq.
+#T1 #T2 #H elim H -T1 -T2
+/2 width=3 by tueq_sort, tueq_bind, tueq_appl, tueq_cast/
+qed-.
+
+(* Left basic inversion lemmas **********************************************)
+
+fact tueq_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
+| #p #I #V #T1 #T2 #_ #s #H destruct
+| #V #T1 #T2 #_ #s #H destruct
+| #V1 #V2 #T1 #T2 #_ #_ #s #H destruct
+]
+qed-.
+
+lemma tueq_inv_sort1: ∀Y,s1. ⋆s1 ≅ Y →
+                      ∃s2. Y = ⋆s2.
+/2 width=4 by tueq_inv_sort1_aux/ qed-.
+
+fact tueq_inv_lref1_aux: ∀X,Y. X ≅ Y → ∀i. X = #i → Y = #i.
+#X #Y * -X -Y //
+[ #s1 #s2 #j #H destruct
+| #p #I #V #T1 #T2 #_ #j #H destruct
+| #V #T1 #T2 #_ #j #H destruct
+| #V1 #V2 #T1 #T2 #_ #_ #j #H destruct
+]
+qed-.
+
+lemma tueq_inv_lref1: ∀Y,i. #i ≅ Y → Y = #i.
+/2 width=5 by tueq_inv_lref1_aux/ qed-.
+
+fact tueq_inv_gref1_aux: ∀X,Y. X ≅ Y → ∀l. X = §l → Y = §l.
+#X #Y * -X -Y //
+[ #s1 #s2 #k #H destruct
+| #p #I #V #T1 #T2 #_ #k #H destruct
+| #V #T1 #T2 #_ #k #H destruct
+| #V1 #V2 #T1 #T2 #_ #_ #k #H destruct
+]
+qed-.
+
+lemma tueq_inv_gref1: ∀Y,l. §l ≅ Y → Y = §l.
+/2 width=5 by tueq_inv_gref1_aux/ qed-.
+
+fact tueq_inv_bind1_aux: ∀X,Y. X ≅ Y → ∀p,I,V,T1. X = ⓑ{p,I}V.T1 →
+                         ∃∃T2. T1 ≅ T2 & Y = ⓑ{p,I}V.T2.
+#X #Y * -X -Y
+[ #s1 #s2 #q #J #W #U1 #H destruct
+| #i #q #J #W #U1 #H destruct
+| #l #q #J #W #U1 #H destruct
+| #p #I #V #T1 #T2 #HT #q #J #W #U1 #H destruct /2 width=3 by ex2_intro/
+| #V #T1 #T2 #_ #q #J #W #U1 #H destruct
+| #V1 #V2 #T1 #T2 #_ #_ #q #J #W #U1 #H destruct
+]
+qed-.
+
+lemma tueq_inv_bind1: ∀p,I,V,T1,Y. ⓑ{p,I}V.T1 ≅ Y →
+                      ∃∃T2. T1 ≅ T2 & Y = ⓑ{p,I}V.T2.
+/2 width=3 by tueq_inv_bind1_aux/ qed-.
+
+fact tueq_inv_appl1_aux: ∀X,Y. X ≅ Y → ∀V,T1. X = ⓐV.T1 →
+                         ∃∃T2. T1 ≅ T2 & Y = ⓐV.T2.
+#X #Y * -X -Y
+[ #s1 #s2 #W #U1 #H destruct
+| #i #W #U1 #H destruct
+| #l #W #U1 #H destruct
+| #p #I #V #T1 #T2 #_ #W #U1 #H destruct
+| #V #T1 #T2 #HT #W #U1 #H destruct /2 width=3 by ex2_intro/
+| #V1 #V2 #T1 #T2 #_ #_ #W #U1 #H destruct
+]
+qed-.
+
+lemma tueq_inv_appl1: ∀V,T1,Y. ⓐV.T1 ≅ Y →
+                      ∃∃T2. T1 ≅ T2 & Y = ⓐV.T2.
+/2 width=3 by tueq_inv_appl1_aux/ qed-.
+
+fact tueq_inv_cast1_aux: ∀X,Y. X ≅ Y → ∀V1,T1. X = ⓝV1.T1 →
+                         ∃∃V2,T2. V1 ≅ V2 & T1 ≅ T2 & Y = ⓝV2.T2.
+#X #Y * -X -Y
+[ #s1 #s2 #W1 #U1 #H destruct
+| #i #W1 #U1 #H destruct
+| #l #W1 #U1 #H destruct
+| #p #I #V #T1 #T2 #_ #W1 #U1 #H destruct
+| #V #T1 #T2 #_ #W1 #U1 #H destruct
+| #V1 #V2 #T1 #T2 #HV #HT #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/
+]
+qed-.
+
+lemma tueq_inv_cast1: ∀V1,T1,Y. ⓝV1.T1 ≅ Y →
+                      ∃∃V2,T2. V1 ≅ V2 & T1 ≅ T2 & Y = ⓝV2.T2.
+/2 width=3 by tueq_inv_cast1_aux/ qed-.
+
+(* Right basic inversion lemmas *********************************************)
+
+lemma tueq_inv_bind2: ∀p,I,V,T2,X1. X1 ≅ ⓑ{p,I}V.T2 →
+                      ∃∃T1. T1 ≅ T2 & X1 = ⓑ{p,I}V.T1.
+#p #I #V #T2 #X1 #H
+elim (tueq_inv_bind1 p I V T2 X1)
+[ #T1 #HT #H destruct ]
+/3 width=3 by tueq_sym, ex2_intro/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/static_2/etc/tueq/tueq_tueq.etc b/matita/matita/contribs/lambdadelta/static_2/etc/tueq/tueq_tueq.etc
new file mode 100644 (file)
index 0000000..4d8d21f
--- /dev/null
@@ -0,0 +1,44 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/tueq.ma".
+
+(* TAIL SORT-IRRELEVANT EQUIVALENCE ON TERMS ********************************)
+
+(* Main properties **********************************************************)
+
+theorem tueq_trans: Transitive … tueq.
+#T1 #T #H elim H -T1 -T
+[ #s1 #s #X #H
+  elim (tueq_inv_sort1 … H) -s /2 width=1 by tueq_sort/
+| #i1 #i #H //
+| #l1 #l #H //
+| #p #I #V #T1 #T #_ #IHT #X #H
+  elim (tueq_inv_bind1 … H) -H /3 width=1 by tueq_bind/
+| #V #T1 #T #_ #IHT #X #H
+  elim (tueq_inv_appl1 … H) -H /3 width=1 by tueq_appl/
+| #V1 #V #T1 #T #_ #_ #IHV #IHT #X #H
+  elim (tueq_inv_cast1 … H) -H /3 width=1 by tueq_cast/
+]
+qed-.
+
+theorem tueq_canc_sn: left_cancellable … tueq.
+/3 width=3 by tueq_trans, tueq_sym/ qed-.
+
+theorem tueq_canc_dx: right_cancellable … tueq.
+/3 width=3 by tueq_trans, tueq_sym/ qed-.
+
+theorem tueq_repl: ∀T1,T2. T1 ≅ T2 →
+                   ∀U1. T1 ≅ U1 → ∀U2. T2 ≅ U2 → U1 ≅ U2.
+/3 width=3 by tueq_canc_sn, tueq_trans/ qed-.
index 8beb5bc3f7b93fee884647bc2297aa7b43574a8a..a53ee2c823636520601d31342a6210a725efc554 100644 (file)
@@ -25,50 +25,50 @@ interpretation "iterated extension on referred entries (local environment)"
 
 (* Basic properties *********************************************************)
 
-lemma rexs_step_dx: ∀R,L1,L,T. L1 ⪤*[R, T] L →
-                    ∀L2. L ⪤[R, T] L2 → L1 ⪤*[R, T] L2.
+lemma rexs_step_dx: ∀R,L1,L,T. L1 ⪤*[R,T] L →
+                    ∀L2. L ⪤[R,T] L2 → L1 ⪤*[R,T] L2.
 #R #L1 #L2 #T #HL1 #L2 @step @HL1 (**) (* auto fails *)
 qed-.
 
-lemma rexs_step_sn: ∀R,L1,L,T. L1 ⪤[R, T] L →
-                    ∀L2. L ⪤*[R, T] L2 → L1 ⪤*[R, T] L2.
+lemma rexs_step_sn: ∀R,L1,L,T. L1 ⪤[R,T] L →
+                    ∀L2. L ⪤*[R,T] L2 → L1 ⪤*[R,T] L2.
 #R #L1 #L2 #T #HL1 #L2 @TC_strap @HL1 (**) (* auto fails *)
 qed-.
 
-lemma rexs_atom: ∀R,I. ⋆ ⪤*[R, ⓪{I}] ⋆.
+lemma rexs_atom: ∀R,I. ⋆ ⪤*[R,⓪{I}] ⋆.
 /2 width=1 by inj/ qed.
 
 lemma rexs_sort: ∀R,I,L1,L2,V1,V2,s.
-                 L1 ⪤*[R, ⋆s] L2 → L1.ⓑ{I}V1 ⪤*[R, ⋆s] L2.ⓑ{I}V2.
+                 L1 ⪤*[R,⋆s] L2 → L1.ⓑ{I}V1 ⪤*[R,⋆s] L2.ⓑ{I}V2.
 #R #I #L1 #L2 #V1 #V2 #s #H elim H -L2
 /3 width=4 by rex_sort, rexs_step_dx, inj/
 qed.
 
 lemma rexs_pair: ∀R. (∀L. reflexive … (R L)) →
-                 ∀I,L1,L2,V. L1 ⪤*[R, V] L2 →
-                 L1.ⓑ{I}V ⪤*[R, #0] L2.ⓑ{I}V.
+                 ∀I,L1,L2,V. L1 ⪤*[R,V] L2 →
+                 L1.ⓑ{I}V ⪤*[R,#0] L2.ⓑ{I}V.
 #R #HR #I #L1 #L2 #V #H elim H -L2
 /3 width=5 by rex_pair, rexs_step_dx, inj/
 qed.
 
-lemma rexs_unit: ∀R,f,I,L1,L2. 𝐈⦃f⦄ → L1 ⪤[cext2 R, cfull, f] L2 →
-                 L1.ⓤ{I} ⪤*[R, #0] L2.ⓤ{I}.
+lemma rexs_unit: ∀R,f,I,L1,L2. 𝐈⦃f⦄ → L1 ⪤[cext2 R,cfull,f] L2 →
+                 L1.ⓤ{I} ⪤*[R,#0] L2.ⓤ{I}.
 /3 width=3 by rex_unit, inj/ qed.
 
 lemma rexs_lref: ∀R,I,L1,L2,V1,V2,i.
-                 L1 ⪤*[R, #i] L2 → L1.ⓑ{I}V1 ⪤*[R, #↑i] L2.ⓑ{I}V2.
+                 L1 ⪤*[R,#i] L2 → L1.ⓑ{I}V1 ⪤*[R,#↑i] L2.ⓑ{I}V2.
 #R #I #L1 #L2 #V1 #V2 #i #H elim H -L2
 /3 width=4 by rex_lref, rexs_step_dx, inj/
 qed.
 
 lemma rexs_gref: ∀R,I,L1,L2,V1,V2,l.
-                 L1 ⪤*[R, §l] L2 → L1.ⓑ{I}V1 ⪤*[R, §l] L2.ⓑ{I}V2.
+                 L1 ⪤*[R,§l] L2 → L1.ⓑ{I}V1 ⪤*[R,§l] L2.ⓑ{I}V2.
 #R #I #L1 #L2 #V1 #V2 #l #H elim H -L2
 /3 width=4 by rex_gref, rexs_step_dx, inj/
 qed.
 
 lemma rexs_co: ∀R1,R2. (∀L,T1,T2. R1 L T1 T2 → R2 L T1 T2) →
-               ∀L1,L2,T. L1 ⪤*[R1, T] L2 → L1 ⪤*[R2, T] L2.
+               ∀L1,L2,T. L1 ⪤*[R1,T] L2 → L1 ⪤*[R2,T] L2.
 #R1 #R2 #HR #L1 #L2 #T #H elim H -L2
 /4 width=5 by rex_co, rexs_step_dx, inj/
 qed-.
@@ -76,19 +76,19 @@ qed-.
 (* Basic inversion lemmas ***************************************************)
 
 (* Basic_2A1: uses: TC_lpx_sn_inv_atom1 *)
-lemma rexs_inv_atom_sn: ∀R,I,Y2. ⋆ ⪤*[R, ⓪{I}] Y2 → Y2 = ⋆.
+lemma rexs_inv_atom_sn: ∀R,I,Y2. ⋆ ⪤*[R,⓪{I}] Y2 → Y2 = ⋆.
 #R #I #Y2 #H elim H -Y2 /3 width=3 by inj, rex_inv_atom_sn/
 qed-.
 
 (* Basic_2A1: uses: TC_lpx_sn_inv_atom2 *)
-lemma rexs_inv_atom_dx: ∀R,I,Y1. Y1 ⪤*[R, ⓪{I}] ⋆ → Y1 = ⋆.
+lemma rexs_inv_atom_dx: ∀R,I,Y1. Y1 ⪤*[R,⓪{I}] ⋆ → Y1 = ⋆.
 #R #I #Y1 #H @(TC_ind_dx ??????? H) -Y1
 /3 width=3 by inj, rex_inv_atom_dx/
 qed-.
 
-lemma rexs_inv_sort: ∀R,Y1,Y2,s. Y1 ⪤*[R, ⋆s] Y2 →
+lemma rexs_inv_sort: ∀R,Y1,Y2,s. Y1 ⪤*[R,⋆s] Y2 →
                      ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆
-                      | ∃∃I1,I2,L1,L2. L1 ⪤*[R, ⋆s] L2 &
+                      | ∃∃I1,I2,L1,L2. L1 ⪤*[R,⋆s] L2 &
                                        Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
 #R #Y1 #Y2 #s #H elim H -Y2
 [ #Y2 #H elim (rex_inv_sort … H) -H *
@@ -104,9 +104,9 @@ lemma rexs_inv_sort: ∀R,Y1,Y2,s. Y1 ⪤*[R, ⋆s] Y2 →
 ] 
 qed-.
 
-lemma rexs_inv_gref: ∀R,Y1,Y2,l. Y1 ⪤*[R, §l] Y2 →
+lemma rexs_inv_gref: ∀R,Y1,Y2,l. Y1 ⪤*[R,§l] Y2 →
                      ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆
-                      | ∃∃I1,I2,L1,L2. L1 ⪤*[R, §l] L2 &
+                      | ∃∃I1,I2,L1,L2. L1 ⪤*[R,§l] L2 &
                                        Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
 #R #Y1 #Y2 #l #H elim H -Y2
 [ #Y2 #H elim (rex_inv_gref … H) -H *
@@ -123,16 +123,16 @@ lemma rexs_inv_gref: ∀R,Y1,Y2,l. Y1 ⪤*[R, §l] Y2 →
 qed-.
 
 lemma rexs_inv_bind: ∀R. (∀L. reflexive … (R L)) →
-                     ∀p,I,L1,L2,V,T. L1 ⪤*[R, ⓑ{p,I}V.T] L2 →
-                     ∧∧ L1 ⪤*[R, V] L2 & L1.ⓑ{I}V ⪤*[R, T] L2.ⓑ{I}V.
+                     ∀p,I,L1,L2,V,T. L1 ⪤*[R,ⓑ{p,I}V.T] L2 →
+                     ∧∧ L1 ⪤*[R,V] L2 & L1.ⓑ{I}V ⪤*[R,T] L2.ⓑ{I}V.
 #R #HR #p #I #L1 #L2 #V #T #H elim H -L2
 [ #L2 #H elim (rex_inv_bind … V ? H) -H /3 width=1 by inj, conj/
 | #L #L2 #_ #H * elim (rex_inv_bind … V ? H) -H /3 width=3 by rexs_step_dx, conj/
 ]
 qed-.
 
-lemma rexs_inv_flat: ∀R,I,L1,L2,V,T. L1 ⪤*[R, ⓕ{I}V.T] L2 →
-                     ∧∧ L1 ⪤*[R, V] L2 & L1 ⪤*[R, T] L2.
+lemma rexs_inv_flat: ∀R,I,L1,L2,V,T. L1 ⪤*[R,ⓕ{I}V.T] L2 →
+                     ∧∧ L1 ⪤*[R,V] L2 & L1 ⪤*[R,T] L2.
 #R #I #L1 #L2 #V #T #H elim H -L2
 [ #L2 #H elim (rex_inv_flat … H) -H /3 width=1 by inj, conj/
 | #L #L2 #_ #H * elim (rex_inv_flat … H) -H /3 width=3 by rexs_step_dx, conj/
@@ -141,32 +141,32 @@ qed-.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma rexs_inv_sort_bind_sn: ∀R,I1,Y2,L1,s. L1.ⓘ{I1} ⪤*[R, ⋆s] Y2 →
-                             ∃∃I2,L2. L1 ⪤*[R, ⋆s] L2 & Y2 = L2.ⓘ{I2}.
+lemma rexs_inv_sort_bind_sn: ∀R,I1,Y2,L1,s. L1.ⓘ{I1} ⪤*[R,⋆s] Y2 →
+                             ∃∃I2,L2. L1 ⪤*[R,⋆s] L2 & Y2 = L2.ⓘ{I2}.
 #R #I1 #Y2 #L1 #s #H elim (rexs_inv_sort … H) -H *
 [ #H destruct
 | #Z #I2 #Y1 #L2 #Hs #H1 #H2 destruct /2 width=4 by ex2_2_intro/
 ]
 qed-.
 
-lemma rexs_inv_sort_bind_dx: ∀R,I2,Y1,L2,s. Y1 ⪤*[R, ⋆s] L2.ⓘ{I2} →
-                             ∃∃I1,L1. L1 ⪤*[R, ⋆s] L2 & Y1 = L1.ⓘ{I1}.
+lemma rexs_inv_sort_bind_dx: ∀R,I2,Y1,L2,s. Y1 ⪤*[R,⋆s] L2.ⓘ{I2} →
+                             ∃∃I1,L1. L1 ⪤*[R,⋆s] L2 & Y1 = L1.ⓘ{I1}.
 #R #I2 #Y1 #L2 #s #H elim (rexs_inv_sort … H) -H *
 [ #_ #H destruct
 | #I1 #Z #L1 #Y2 #Hs #H1 #H2 destruct /2 width=4 by ex2_2_intro/
 ]
 qed-.
 
-lemma rexs_inv_gref_bind_sn: ∀R,I1,Y2,L1,l. L1.ⓘ{I1} ⪤*[R, §l] Y2 →
-                             ∃∃I2,L2. L1 ⪤*[R, §l] L2 & Y2 = L2.ⓘ{I2}.
+lemma rexs_inv_gref_bind_sn: ∀R,I1,Y2,L1,l. L1.ⓘ{I1} ⪤*[R,§l] Y2 →
+                             ∃∃I2,L2. L1 ⪤*[R,§l] L2 & Y2 = L2.ⓘ{I2}.
 #R #I1 #Y2 #L1 #l #H elim (rexs_inv_gref … H) -H *
 [ #H destruct
 | #Z #I2 #Y1 #L2 #Hl #H1 #H2 destruct /2 width=4 by ex2_2_intro/
 ]
 qed-.
 
-lemma rexs_inv_gref_bind_dx: ∀R,I2,Y1,L2,l. Y1 ⪤*[R, §l] L2.ⓘ{I2} →
-                             ∃∃I1,L1. L1 ⪤*[R, §l] L2 & Y1 = L1.ⓘ{I1}.
+lemma rexs_inv_gref_bind_dx: ∀R,I2,Y1,L2,l. Y1 ⪤*[R,§l] L2.ⓘ{I2} →
+                             ∃∃I1,L1. L1 ⪤*[R,§l] L2 & Y1 = L1.ⓘ{I1}.
 #R #I2 #Y1 #L2 #l #H elim (rexs_inv_gref … H) -H *
 [ #_ #H destruct
 | #I1 #Z #L1 #Y2 #Hl #H1 #H2 destruct /2 width=4 by ex2_2_intro/
@@ -175,18 +175,18 @@ qed-.
 
 (* Basic forward lemmas *****************************************************)
 
-lemma rexs_fwd_pair_sn: ∀R,I,L1,L2,V,T. L1 ⪤*[R, ②{I}V.T] L2 → L1 ⪤*[R, V] L2.
+lemma rexs_fwd_pair_sn: ∀R,I,L1,L2,V,T. L1 ⪤*[R,②{I}V.T] L2 → L1 ⪤*[R,V] L2.
 #R #I #L1 #L2 #V #T #H elim H -L2
 /3 width=5 by rex_fwd_pair_sn, rexs_step_dx, inj/
 qed-.
 
 lemma rexs_fwd_bind_dx: ∀R. (∀L. reflexive … (R L)) →
-                        ∀p,I,L1,L2,V,T. L1 ⪤*[R, ⓑ{p,I}V.T] L2 →
-                        L1.ⓑ{I}V ⪤*[R, T] L2.ⓑ{I}V.
+                        ∀p,I,L1,L2,V,T. L1 ⪤*[R,ⓑ{p,I}V.T] L2 →
+                        L1.ⓑ{I}V ⪤*[R,T] L2.ⓑ{I}V.
 #R #HR #p #I #L1 #L2 #V #T #H elim (rexs_inv_bind … H) -H //
 qed-.
 
-lemma rexs_fwd_flat_dx: ∀R,I,L1,L2,V,T. L1 ⪤*[R, ⓕ{I}V.T] L2 → L1 ⪤*[R, T] L2.
+lemma rexs_fwd_flat_dx: ∀R,I,L1,L2,V,T. L1 ⪤*[R,ⓕ{I}V.T] L2 → L1 ⪤*[R,T] L2.
 #R #I #L1 #L2 #V #T #H elim (rexs_inv_flat … H) -H //
 qed-.
 
index 0b83c6431078f2d4ba70c1ac78c9c0596f07b111..11025a4a19dccfeb741a85eb11892a1eb219adfa 100644 (file)
@@ -19,19 +19,19 @@ include "static_2/i_static/rexs.ma".
 (* ITERATED EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ***)
 
 definition tc_f_dedropable_sn: predicate (relation3 lenv term term) ≝
-                               λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 →
-                               ∀K2,T. K1 ⪤*[R, T] K2 → ∀U. ⬆*[f] T ≘ U →
-                               ∃∃L2. L1 ⪤*[R, U] L2 & ⬇*[b, f] L2 ≘ K2 & L1 ≡[f] L2.
+                               λR. ∀b,f,L1,K1. ⬇*[b,f] L1 ≘ K1 →
+                               ∀K2,T. K1 ⪤*[R,T] K2 → ∀U. ⬆*[f] T ≘ U →
+                               ∃∃L2. L1 ⪤*[R,U] L2 & ⬇*[b,f] L2 ≘ K2 & L1 ≡[f] L2.
 
 definition tc_f_dropable_sn: predicate (relation3 lenv term term) ≝
-                             λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → 𝐔⦃f⦄ →
-                             ∀L2,U. L1 ⪤*[R, U] L2 → ∀T. ⬆*[f] T ≘ U →
-                             ∃∃K2. K1 ⪤*[R, T] K2 & ⬇*[b, f] L2 ≘ K2.
+                             λR. ∀b,f,L1,K1. ⬇*[b,f] L1 ≘ K1 → 𝐔⦃f⦄ →
+                             ∀L2,U. L1 ⪤*[R,U] L2 → ∀T. ⬆*[f] T ≘ U →
+                             ∃∃K2. K1 ⪤*[R,T] K2 & ⬇*[b,f] L2 ≘ K2.
 
 definition tc_f_dropable_dx: predicate (relation3 lenv term term) ≝
-                             λR. ∀L1,L2,U. L1 ⪤*[R, U] L2 →
-                             ∀b,f,K2. ⬇*[b, f] L2 ≘ K2 → 𝐔⦃f⦄ → ∀T. ⬆*[f] T ≘ U →
-                             ∃∃K1. ⬇*[b, f] L1 ≘ K1 & K1 ⪤*[R, T] K2.
+                             λR. ∀L1,L2,U. L1 ⪤*[R,U] L2 →
+                             ∀b,f,K2. ⬇*[b,f] L2 ≘ K2 → 𝐔⦃f⦄ → ∀T. ⬆*[f] T ≘ U →
+                             ∃∃K1. ⬇*[b,f] L1 ≘ K1 & K1 ⪤*[R,T] K2.
 
 (* Properties with generic slicing for local environments *******************)
 
index c21d8201700847f34929c3de4b03a74a6ed53dcd..fbb41879cf8d2827e0009108c50b82247625e7cc 100644 (file)
@@ -25,13 +25,13 @@ lemma rexs_refl: ∀R. c_reflexive … R →
 
 (* Basic_2A1: uses: TC_lpx_sn_pair TC_lpx_sn_pair_refl *)
 lemma rexs_pair_refl: ∀R. c_reflexive … R →
-                      ∀L,V1,V2. CTC … R L V1 V2 → ∀I,T. L.ⓑ{I}V1 ⪤*[R, T] L.ⓑ{I}V2.
+                      ∀L,V1,V2. CTC … R L V1 V2 → ∀I,T. L.ⓑ{I}V1 ⪤*[R,T] L.ⓑ{I}V2.
 #R #HR #L #V1 #V2 #H elim H -V2
 /3 width=3 by rexs_step_dx, rex_pair_refl, inj/
 qed.
 
 lemma rexs_tc: ∀R,L1,L2,T,f. 𝐈⦃f⦄ → TC … (sex cfull (cext2 R) f) L1 L2 →
-               L1 ⪤*[R, T] L2.
+               L1 ⪤*[R,T] L2.
 #R #L1 #L2 #T #f #Hf #H elim H -L2
 [ elim (frees_total L1 T) | #L elim (frees_total L T) ]
 /5 width=7 by sex_sdj, rexs_step_dx, sdj_isid_sn, inj, ex2_intro/
@@ -41,16 +41,16 @@ qed.
 
 lemma rexs_ind_sn: ∀R. c_reflexive … R →
                    ∀L1,T. ∀Q:predicate …. Q L1 →
-                   (∀L,L2. L1 ⪤*[R, T] L → L ⪤[R, T] L2 → Q L → Q L2) →
-                   ∀L2. L1 ⪤*[R, T] L2 → Q L2.
+                   (∀L,L2. L1 ⪤*[R,T] L → L ⪤[R,T] L2 → Q L → Q L2) →
+                   ∀L2. L1 ⪤*[R,T] L2 → Q L2.
 #R #HR #L1 #T #Q #HL1 #IHL1 #L2 #HL12
 @(TC_star_ind … HL1 IHL1 … HL12) /2 width=1 by rex_refl/
 qed-.
 
 lemma rexs_ind_dx: ∀R. c_reflexive … R →
                    ∀L2,T. ∀Q:predicate …. Q L2 →
-                   (∀L1,L. L1 ⪤[R, T] L → L ⪤*[R, T] L2 → Q L → Q L1) →
-                   ∀L1. L1 ⪤*[R, T] L2 → Q L1.
+                   (∀L1,L. L1 ⪤[R,T] L → L ⪤*[R,T] L2 → Q L → Q L1) →
+                   ∀L1. L1 ⪤*[R,T] L2 → Q L1.
 #R #HR #L2 #Q #HL2 #IHL2 #L1 #HL12
 @(TC_star_ind_dx … HL2 IHL2 … HL12) /2 width=4 by rex_refl/
 qed-.
@@ -58,8 +58,8 @@ qed-.
 (* Advanced inversion lemmas ************************************************)
 
 lemma rexs_inv_bind_void: ∀R. c_reflexive … R →
-                          ∀p,I,L1,L2,V,T. L1 ⪤*[R, ⓑ{p,I}V.T] L2 →
-                          ∧∧ L1 ⪤*[R, V] L2 & L1.ⓧ ⪤*[R, T] L2.ⓧ.
+                          ∀p,I,L1,L2,V,T. L1 ⪤*[R,ⓑ{p,I}V.T] L2 →
+                          ∧∧ L1 ⪤*[R,V] L2 & L1.ⓧ ⪤*[R,T] L2.ⓧ.
 #R #HR #p #I #L1 #L2 #V #T #H @(rexs_ind_sn … HR … H) -L2
 [ /3 width=1 by rexs_refl, conj/
 | #L #L2 #_ #H * elim (rex_inv_bind_void … H) -H /3 width=3 by rexs_step_dx, conj/
@@ -69,7 +69,7 @@ qed-.
 (* Advanced forward lemmas **************************************************)
 
 lemma rexs_fwd_bind_dx_void: ∀R. c_reflexive … R →
-                             ∀p,I,L1,L2,V,T. L1 ⪤*[R, ⓑ{p,I}V.T] L2 →
-                             L1.ⓧ ⪤*[R, T] L2.ⓧ.
+                             ∀p,I,L1,L2,V,T. L1 ⪤*[R,ⓑ{p,I}V.T] L2 →
+                             L1.ⓧ ⪤*[R,T] L2.ⓧ.
 #R #HR #p #I #L1 #L2 #V #T #H elim (rexs_inv_bind_void … H) -H //
 qed-.
index a5c82f9f5a7b78987fe5e4a51bea28ee994da1e5..7e0bc2e01188f8ef400087adecec27eaa16394e8 100644 (file)
@@ -20,7 +20,7 @@ include "static_2/i_static/rexs.ma".
 (* Forward lemmas with length for local environments ************************)
 
 (* Basic_2A1: uses: TC_lpx_sn_fwd_length *)
-lemma rexs_fwd_length: ∀R,L1,L2,T. L1 ⪤*[R, T] L2 → |L1| = |L2|.
+lemma rexs_fwd_length: ∀R,L1,L2,T. L1 ⪤*[R,T] L2 → |L1| = |L2|.
 #R #L1 #L2 #T #H elim H -L2
 [ #L2 #HL12 >(rex_fwd_length … HL12) -HL12 //
 | #L #L2 #_ #HL2 #IHL1
index 4ac00b7a1115b4d47726c2490281c04dc1f2b424..46d28f330dcc4028288fb8e0cfcff6f19f7e6a8c 100644 (file)
@@ -22,14 +22,14 @@ include "static_2/i_static/rexs_fqup.ma".
 (* Properties with generic extension of a context sensitive relation ********)
 
 lemma rexs_lex: ∀R. c_reflexive … R →
-                ∀L1,L2,T. L1 ⪤[CTC … R] L2 → L1 ⪤*[R, T] L2.
+                ∀L1,L2,T. L1 ⪤[CTC … R] L2 → L1 ⪤*[R,T] L2.
 #R #HR #L1 #L2 #T *
 /5 width=7 by rexs_tc, sex_inv_tc_dx, sex_co, ext2_inv_tc, ext2_refl/
 qed.
 
 lemma rexs_lex_req: ∀R. c_reflexive … R →
                     ∀L1,L. L1 ⪤[CTC … R] L → ∀L2,T. L ≡[T] L2 →
-                    L1 ⪤*[R, T] L2.
+                    L1 ⪤*[R,T] L2.
 /3 width=3 by rexs_lex, rexs_step_dx, req_fwd_rex/ qed.
 
 (* Inversion lemmas with generic extension of a context sensitive relation **)
@@ -39,7 +39,7 @@ lemma rexs_inv_lex_req: ∀R. c_reflexive … R →
                         rex_fsge_compatible R →
                         s_rs_transitive … R (λ_.lex R) →
                         req_transitive R →
-                        ∀L1,L2,T. L1 ⪤*[R, T] L2 →
+                        ∀L1,L2,T. L1 ⪤*[R,T] L2 →
                         ∃∃L. L1 ⪤[CTC … R] L & L ≡[T] L2.
 #R #H1R #H2R #H3R #H4R #L1 #L2 #T #H
 lapply (s_rs_transitive_lex_inv_isid … H3R) -H3R #H3R
index 1eea5226e3706876355dae5ab892f0b0a0096fe6..1c31b90fcf288d7f5727071748edac44718c5592 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
 
-notation "hvbox( L. break ⓓ T1 )"
+notation "hvbox( L. ⓓ break T1 )"
  left associative with precedence 50
  for @{ 'DxAbbr $L $T1 }.
index 3bb334e8699cfc9a3c8ff137cbc7f93738a827c3..6c385b47bf91f002c63609697646c97682331cc7 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
 
-notation "hvbox( L. break ⓛ T1 )"
+notation "hvbox( L. ⓛ break T1 )"
  left associative with precedence 51
  for @{ 'DxAbst $L $T1 }.
index 5e78eeb18aabc64ba591036e5f98421378a76853..a427352ddcf38b462c4376f71fb968c940cd76c6 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
 
-notation "hvbox( L. break ⓤ { term 46 I } )"
+notation "hvbox( L. ⓤ { break term 46 I } )"
  non associative with precedence 47
  for @{ 'DxBind1 $L $I }.
index 6800d8e5c2f247f9c252e464a7c9fc23a4af1de0..3b9e4369906db0b12edc53ad2c52331e840c170c 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
 
-notation "hvbox( L. break ⓑ { term 46 I } break term 49 T1 )"
+notation "hvbox( L. ⓑ { break term 46 I } break term 49 T1 )"
  non associative with precedence 48
  for @{ 'DxBind2 $L $I $T1 }.
diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/omega_0.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/omega_0.ma
new file mode 100644 (file)
index 0000000..7894ebc
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "𝛚"
+ non associative with precedence 46
+ for @{ 'Omega }.
diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/one_0.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/one_0.ma
new file mode 100644 (file)
index 0000000..e36371a
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "𝟏"
+ non associative with precedence 46
+ for @{ 'One }.
diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/two_0.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/two_0.ma
new file mode 100644 (file)
index 0000000..60e31d6
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "𝟐"
+ non associative with precedence 46
+ for @{ 'Two }.
diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/functions/upspoon_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/functions/upspoon_2.ma
new file mode 100644 (file)
index 0000000..c04bf22
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⫯[ term 46 h ] break term 46 s )"
+   non associative with precedence 46
+   for @{ 'UpSpoon $h $s }.
diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/approxeq_2.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/approxeq_2.ma
new file mode 100644 (file)
index 0000000..4cb1216
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( T1 ≅ break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'ApproxEq $T1 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/freeplus_3.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/freeplus_3.ma
new file mode 100644 (file)
index 0000000..19dc43e
--- /dev/null
@@ -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 T ⦄ ≘ break term 46 f )"
+   non associative with precedence 45
+   for @{ 'FreePlus $L $T $f }.
diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/freestar_3.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/freestar_3.ma
deleted file mode 100644 (file)
index 02c3385..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( L ⊢ 𝐅 * ⦃ break term 46 T ⦄ ≘ break term 46 f )"
-   non associative with precedence 45
-   for @{ 'FreeStar $L $T $f }.
index 413553ccd9c2bffe3a9a1a64c523aa073fa2246b..9847c85317702d4084c1f3ccc9073df93d77cab2 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
 
-notation "hvbox( ⦃ term 46 L1, break term 46 f1 ⦄ ⫃ 𝐅* ⦃ break term 46 L2, break term 46 f2 ⦄ )"
+notation "hvbox( ⦃ term 46 L1, break term 46 f1 ⦄ ⫃ 𝐅+ ⦃ break term 46 L2, break term 46 f2 ⦄ )"
    non associative with precedence 45
    for @{ 'LRSubEqF $L1 $f1 $L2 $f2 }.
diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/rlift_4.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/rlift_4.ma
new file mode 100644 (file)
index 0000000..fb0fc24
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⬆[ term 46 m, break term 46 n ] break term 46 T1 ≘ break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'RLift $m $n $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/stareq_2.ma
new file mode 100644 (file)
index 0000000..04a438a
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( T1 ≛ break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'StarEq $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
new file mode 100644 (file)
index 0000000..fbb650a
--- /dev/null
@@ -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 T2 )"
+   non associative with precedence 45
+   for @{ 'StarEq $L $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
deleted file mode 100644 (file)
index 0f67a83..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( T1 ≛ [ break term 46 h, break term 46 o ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'StarEq $h $o $T1 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_5.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareq_5.ma
deleted file mode 100644 (file)
index 5532059..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.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 h, break term 46 o ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'StarEq $h $o $L $T1 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_3.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_3.ma
new file mode 100644 (file)
index 0000000..5d7cb99
--- /dev/null
@@ -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 @{ 'StarEqSn $T $L1 $L2 }.
diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_5.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_5.ma
deleted file mode 100644 (file)
index af611f7..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.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 h, break term 46 o, break term 46 T ] break term 46 L2 )"
-   non associative with precedence 45
-   for @{ 'StarEqSn $h $o $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/stareqsn_6.ma
new file mode 100644 (file)
index 0000000..7117482
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≛ ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'StarEqSn $G1 $L1 $T1 $G2 $L2 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_8.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/stareqsn_8.ma
deleted file mode 100644 (file)
index 6e4ed5d..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≛ [ break term 46 h, break term 46 o ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )"
-   non associative with precedence 45
-   for @{ 'StarEqSn $h $o $G1 $L1 $T1 $G2 $L2 $T2 }.
index 72533dc3c7427b903857edf601e4e4c186ca6a87..a8dfc7e72c7089ea42d1eae4a23decd1430f3b24 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
 
-notation "hvbox( â¦\83 term 46 G1, break term 46 L1, break term 46 T1 â¦\84 â\8a\90 ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )"
+notation "hvbox( â¦\83 term 46 G1, break term 46 L1, break term 46 T1 â¦\84 â¬\82 ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )"
    non associative with precedence 45
    for @{ 'SupTerm $G1 $L1 $T1 $G2 $L2 $T2 }.
index 2e12296b42284154ed7fff78a51668d8e24c7be9..011caa06b7ed76b9ab6a40db6ae56f7028d7a429 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
 
-notation "hvbox( â¦\83 term 46 G1, break term 46 L1, break term 46 T1 â¦\84 â\8a\90 [ break term 46 b ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )"
+notation "hvbox( â¦\83 term 46 G1, break term 46 L1, break term 46 T1 â¦\84 â¬\82 [ break term 46 b ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )"
    non associative with precedence 45
    for @{ 'SupTerm $b $G1 $L1 $T1 $G2 $L2 $T2 }.
index 62a8cbb0bfd3eecc6571ec9fe98123f355177c01..f52c205c37096fa3456d77247514f1cd331ef235 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
 
-notation "hvbox( â¦\83 term 46 G1, break term 46 L1, break term 46 T1 â¦\84 â\8a\90⸮ ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )"
+notation "hvbox( â¦\83 term 46 G1, break term 46 L1, break term 46 T1 â¦\84 â¬\82⸮ ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )"
    non associative with precedence 45
    for @{ 'SupTermOpt $G1 $L1 $T1 $G2 $L2 $T2 }.
index dd6db78c2424dbb4c4a3a91cd253233d8f112702..60b22c90d4400747c57591934c5d913ed2469703 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
 
-notation "hvbox( â¦\83 term 46 G1, break term 46 L1, break term 46 T1 â¦\84 â\8a\90⸮ [ break term 46 b ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )"
+notation "hvbox( â¦\83 term 46 G1, break term 46 L1, break term 46 T1 â¦\84 â¬\82⸮ [ break term 46 b ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )"
    non associative with precedence 45
    for @{ 'SupTermOpt $b $G1 $L1 $T1 $G2 $L2 $T2 }.
index 57bdc3d943d83bc44e181fd9b51db706cde15fb3..5b60a957d2f824b14c382644a43d97718f1531cc 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
 
-notation "hvbox( ⦃ term 46 G1, term 46 L1, break term 46 T1 ⦄ ⊐ + ⦃ break term 46 G2, term 46 L2, break term 46 T2 ⦄ )"
+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 @{ 'SupTermPlus $G1 $L1 $T1 $G2 $L2 $T2 }.
index 3bbe31a8312700032f867715a55e570111898e09..d4b9a8669437861fe669c6c7889e0959f0538c1a 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
 
-notation "hvbox( ⦃ term 46 G1, term 46 L1, break term 46 T1 ⦄ ⊐ + [ break term 46 b ] ⦃ break term 46 G2, term 46 L2, break term 46 T2 ⦄ )"
+notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ⬂ + [ break term 46 b ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )"
    non associative with precedence 45
    for @{ 'SupTermPlus $b $G1 $L1 $T1 $G2 $L2 $T2 }.
index a0bf55faaf5ff8f593a94bfd156d79e879da3681..1a9c2442b81349762d4417238e5e398793db5f42 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
 
-notation "hvbox( ⦃ term 46 G1, 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 @{ 'SupTermStar $G1 $L1 $T1 $G2 $L2 $T2 }.
index 86501986074c4635ecd89236e4a00cbb7bbcb3e7..3d137035c24a911740ae914ab8ccc1b9f3706033 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
 
-notation "hvbox( ⦃ term 46 G1, term 46 L1, break term 46 T1 ⦄ ⊐ * [ break term 46 b ] ⦃ 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 b ] ⦃ break term 46 G2, break term 46 L2, break term 46 T2 ⦄ )"
    non associative with precedence 45
    for @{ 'SupTermStar $b $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/topiso_2.ma
new file mode 100644 (file)
index 0000000..35dd475
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( T1 ⩳ break term 46 T2 )"
+   non associative with precedence 45
+   for @{ 'TopIso $T1 $T2 }.
diff --git a/matita/matita/contribs/lambdadelta/static_2/notation/relations/topiso_4.ma b/matita/matita/contribs/lambdadelta/static_2/notation/relations/topiso_4.ma
deleted file mode 100644 (file)
index e8c080f..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( T1 ⩳ [ break term 46 h, break term 46 o ] break term 46 T2 )"
-   non associative with precedence 45
-   for @{ 'TopIso $h $o $T1 $T2 }.
index 939aeb534b85e8f6d201690e95193b571c1f4cff..dc4d6d75c211308ca41ef18f3b6577532a00c1aa 100644 (file)
@@ -39,68 +39,68 @@ interpretation "generic slicing (local environment)"
    'RDropStar b f L1 L2 = (drops b f L1 L2).
 
 definition d_liftable1: predicate (relation2 lenv term) ≝
-                        λR. ∀K,T. R K T → ∀b,f,L. ⬇*[b, f] L ≘ K →
+                        λR. ∀K,T. R K T → ∀b,f,L. ⬇*[b,f] L ≘ K →
                         ∀U. ⬆*[f] T ≘ U → R L U.
 
 definition d_liftable1_isuni: predicate (relation2 lenv term) ≝
-                              λR. ∀K,T. R K T → ∀b,f,L. ⬇*[b, f] L ≘ K → 𝐔⦃f⦄ →
+                              λR. ∀K,T. R K T → ∀b,f,L. ⬇*[b,f] L ≘ K → 𝐔⦃f⦄ →
                               ∀U. ⬆*[f] T ≘ U → R L U.
 
 definition d_deliftable1: predicate (relation2 lenv term) ≝
-                          λR. ∀L,U. R L U → ∀b,f,K. ⬇*[b, f] L ≘ K →
+                          λR. ∀L,U. R L U → ∀b,f,K. ⬇*[b,f] L ≘ K →
                           ∀T. ⬆*[f] T ≘ U → R K T.
 
 definition d_deliftable1_isuni: predicate (relation2 lenv term) ≝
-                                λR. ∀L,U. R L U → ∀b,f,K. ⬇*[b, f] L ≘ K → 𝐔⦃f⦄ →
+                                λR. ∀L,U. R L U → ∀b,f,K. ⬇*[b,f] L ≘ K → 𝐔⦃f⦄ →
                                 ∀T. ⬆*[f] T ≘ U → R K T.
 
 definition d_liftable2_sn: ∀C:Type[0]. ∀S:rtmap → relation C.
                            predicate (lenv → relation C) ≝
-                           λC,S,R. ∀K,T1,T2. R K T1 T2 → ∀b,f,L. ⬇*[b, f] L ≘ K →
+                           λC,S,R. ∀K,T1,T2. R K T1 T2 → ∀b,f,L. ⬇*[b,f] L ≘ K →
                            ∀U1. S f T1 U1 →
                            ∃∃U2. S f T2 U2 & R L U1 U2.
 
 definition d_deliftable2_sn: ∀C:Type[0]. ∀S:rtmap → relation C.
                              predicate (lenv → relation C) ≝
-                             λC,S,R. ∀L,U1,U2. R L U1 U2 → ∀b,f,K. ⬇*[b, f] L ≘ K →
+                             λC,S,R. ∀L,U1,U2. R L U1 U2 → ∀b,f,K. ⬇*[b,f] L ≘ K →
                              ∀T1. S f T1 U1 →
                              ∃∃T2. S f T2 U2 & R K T1 T2.
 
 definition d_liftable2_bi: ∀C:Type[0]. ∀S:rtmap → relation C.
                            predicate (lenv → relation C) ≝
-                           λC,S,R. ∀K,T1,T2. R K T1 T2 → ∀b,f,L. ⬇*[b, f] L ≘ K →
+                           λC,S,R. ∀K,T1,T2. R K T1 T2 → ∀b,f,L. ⬇*[b,f] L ≘ K →
                            ∀U1. S f T1 U1 →
                            ∀U2. S f T2 U2 → R L U1 U2.
 
 definition d_deliftable2_bi: ∀C:Type[0]. ∀S:rtmap → relation C.
                              predicate (lenv → relation C) ≝
-                             λC,S,R. ∀L,U1,U2. R L U1 U2 → ∀b,f,K. ⬇*[b, f] L ≘ K →
+                             λC,S,R. ∀L,U1,U2. R L U1 U2 → ∀b,f,K. ⬇*[b,f] L ≘ K →
                              ∀T1. S f T1 U1 →
                              ∀T2. S f T2 U2 → R K T1 T2.
 
 definition co_dropable_sn: predicate (rtmap → relation lenv) ≝
-                           λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → 𝐔⦃f⦄ →
+                           λR. ∀b,f,L1,K1. ⬇*[b,f] L1 ≘ K1 → 𝐔⦃f⦄ →
                            ∀f2,L2. R f2 L1 L2 → ∀f1. f ~⊚ f1 ≘ f2 →
-                           ∃∃K2. R f1 K1 K2 & ⬇*[b, f] L2 ≘ K2.
+                           ∃∃K2. R f1 K1 K2 & ⬇*[b,f] L2 ≘ K2.
 
 definition co_dropable_dx: predicate (rtmap → relation lenv) ≝
                            λR. ∀f2,L1,L2. R f2 L1 L2 →
-                           ∀b,f,K2. ⬇*[b, f] L2 ≘ K2 → 𝐔⦃f⦄ →
+                           ∀b,f,K2. ⬇*[b,f] L2 ≘ K2 → 𝐔⦃f⦄ →
                            ∀f1. f ~⊚ f1 ≘ f2 → 
-                           ∃∃K1. ⬇*[b, f] L1 ≘ K1 & R f1 K1 K2.
+                           ∃∃K1. ⬇*[b,f] L1 ≘ K1 & R f1 K1 K2.
 
 definition co_dedropable_sn: predicate (rtmap → relation lenv) ≝
-                             λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → ∀f1,K2. R f1 K1 K2 →
+                             λR. ∀b,f,L1,K1. ⬇*[b,f] L1 ≘ K1 → ∀f1,K2. R f1 K1 K2 →
                              ∀f2. f ~⊚ f1 ≘ f2 →
-                             ∃∃L2. R f2 L1 L2 & ⬇*[b, f] L2 ≘ K2 & L1 ≡[f] L2.
+                             ∃∃L2. R f2 L1 L2 & ⬇*[b,f] L2 ≘ K2 & L1 ≡[f] L2.
 
 (* Basic properties *********************************************************)
 
-lemma drops_atom_F: ∀f. ⬇*[Ⓕ, f] ⋆ ≘ ⋆.
+lemma drops_atom_F: ∀f. ⬇*[Ⓕ,f] ⋆ ≘ ⋆.
 #f @drops_atom #H destruct
 qed.
 
-lemma drops_eq_repl_back: ∀b,L1,L2. eq_repl_back … (λf. ⬇*[b, f] L1 ≘ L2).
+lemma drops_eq_repl_back: ∀b,L1,L2. eq_repl_back … (λf. ⬇*[b,f] L1 ≘ L2).
 #b #L1 #L2 #f1 #H elim H -f1 -L1 -L2
 [ /4 width=3 by drops_atom, isid_eq_repl_back/
 | #f1 #I #L1 #L2 #_ #IH #f2 #H elim (eq_inv_nx … H) -H
@@ -110,23 +110,23 @@ lemma drops_eq_repl_back: ∀b,L1,L2. eq_repl_back … (λf. ⬇*[b, f] L1 ≘ L
 ]
 qed-.
 
-lemma drops_eq_repl_fwd: ∀b,L1,L2. eq_repl_fwd … (λf. ⬇*[b, f] L1 ≘ L2).
+lemma drops_eq_repl_fwd: ∀b,L1,L2. eq_repl_fwd … (λf. ⬇*[b,f] L1 ≘ L2).
 #b #L1 #L2 @eq_repl_sym /2 width=3 by drops_eq_repl_back/ (**) (* full auto fails *)
 qed-.
 
 (* Basic_2A1: includes: drop_FT *)
-lemma drops_TF: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → ⬇*[Ⓕ, f] L1 ≘ L2.
+lemma drops_TF: ∀f,L1,L2. ⬇*[Ⓣ,f] L1 ≘ L2 → ⬇*[Ⓕ,f] L1 ≘ L2.
 #f #L1 #L2 #H elim H -f -L1 -L2
 /3 width=1 by drops_atom, drops_drop, drops_skip/
 qed.
 
 (* Basic_2A1: includes: drop_gen *)
-lemma drops_gen: ∀b,f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → ⬇*[b, f] L1 ≘ L2.
+lemma drops_gen: ∀b,f,L1,L2. ⬇*[Ⓣ,f] L1 ≘ L2 → ⬇*[b,f] L1 ≘ L2.
 * /2 width=1 by drops_TF/
 qed-.
 
 (* Basic_2A1: includes: drop_T *)
-lemma drops_F: ∀b,f,L1,L2. ⬇*[b, f] L1 ≘ L2 → ⬇*[Ⓕ, f] L1 ≘ L2.
+lemma drops_F: ∀b,f,L1,L2. ⬇*[b,f] L1 ≘ L2 → ⬇*[Ⓕ,f] L1 ≘ L2.
 * /2 width=1 by drops_TF/
 qed-.
 
@@ -146,7 +146,7 @@ qed-.
 
 (* Basic inversion lemmas ***************************************************)
 
-fact drops_inv_atom1_aux: ∀b,f,X,Y. ⬇*[b, f] X ≘ Y → X = ⋆ →
+fact drops_inv_atom1_aux: ∀b,f,X,Y. ⬇*[b,f] X ≘ Y → X = ⋆ →
                           Y = ⋆ ∧ (b = Ⓣ → 𝐈⦃f⦄).
 #b #f #X #Y * -f -X -Y
 [ /3 width=1 by conj/
@@ -157,11 +157,11 @@ qed-.
 
 (* Basic_1: includes: drop_gen_sort *)
 (* Basic_2A1: includes: drop_inv_atom1 *)
-lemma drops_inv_atom1: ∀b,f,Y. ⬇*[b, f] ⋆ ≘ Y → Y = ⋆ ∧ (b = Ⓣ → 𝐈⦃f⦄).
+lemma drops_inv_atom1: ∀b,f,Y. ⬇*[b,f] ⋆ ≘ Y → Y = ⋆ ∧ (b = Ⓣ → 𝐈⦃f⦄).
 /2 width=3 by drops_inv_atom1_aux/ qed-.
 
-fact drops_inv_drop1_aux: ∀b,f,X,Y. ⬇*[b, f] X ≘ Y → ∀g,I,K. X = K.ⓘ{I} → f = ↑g →
-                          ⬇*[b, g] K ≘ Y.
+fact drops_inv_drop1_aux: ∀b,f,X,Y. ⬇*[b,f] X ≘ Y → ∀g,I,K. X = K.ⓘ{I} → f = ↑g →
+                          ⬇*[b,g] K ≘ Y.
 #b #f #X #Y * -f -X -Y
 [ #f #Hf #g #J #K #H destruct
 | #f #I #L1 #L2 #HL #g #J #K #H1 #H2 <(injective_next … H2) -g destruct //
@@ -171,11 +171,11 @@ qed-.
 
 (* Basic_1: includes: drop_gen_drop *)
 (* Basic_2A1: includes: drop_inv_drop1_lt drop_inv_drop1 *)
-lemma drops_inv_drop1: ∀b,f,I,K,Y. ⬇*[b, ↑f] K.ⓘ{I} ≘ Y → ⬇*[b, f] K ≘ Y.
+lemma drops_inv_drop1: ∀b,f,I,K,Y. ⬇*[b,↑f] K.ⓘ{I} ≘ Y → ⬇*[b,f] K ≘ Y.
 /2 width=6 by drops_inv_drop1_aux/ qed-.
 
-fact drops_inv_skip1_aux: ∀b,f,X,Y. ⬇*[b, f] X ≘ Y → ∀g,I1,K1. X = K1.ⓘ{I1} → f = ⫯g →
-                          ∃∃I2,K2. ⬇*[b, g] K1 ≘ K2 & ⬆*[g] I2 ≘ I1 & Y = K2.ⓘ{I2}.
+fact drops_inv_skip1_aux: ∀b,f,X,Y. ⬇*[b,f] X ≘ Y → ∀g,I1,K1. X = K1.ⓘ{I1} → f = ⫯g →
+                          ∃∃I2,K2. ⬇*[b,g] K1 ≘ K2 & ⬆*[g] I2 ≘ I1 & Y = K2.ⓘ{I2}.
 #b #f #X #Y * -f -X -Y
 [ #f #Hf #g #J1 #K1 #H destruct
 | #f #I #L1 #L2 #_ #g #J1 #K1 #_ #H2 elim (discr_next_push … H2)
@@ -186,12 +186,12 @@ qed-.
 
 (* Basic_1: includes: drop_gen_skip_l *)
 (* Basic_2A1: includes: drop_inv_skip1 *)
-lemma drops_inv_skip1: ∀b,f,I1,K1,Y. ⬇*[b, ⫯f] K1.ⓘ{I1} ≘ Y →
-                       ∃∃I2,K2. ⬇*[b, f] K1 ≘ K2 & ⬆*[f] I2 ≘ I1 & Y = K2.ⓘ{I2}.
+lemma drops_inv_skip1: ∀b,f,I1,K1,Y. ⬇*[b,⫯f] K1.ⓘ{I1} ≘ Y →
+                       ∃∃I2,K2. ⬇*[b,f] K1 ≘ K2 & ⬆*[f] I2 ≘ I1 & Y = K2.ⓘ{I2}.
 /2 width=5 by drops_inv_skip1_aux/ qed-.
 
-fact drops_inv_skip2_aux: ∀b,f,X,Y. ⬇*[b, f] X ≘ Y → ∀g,I2,K2. Y = K2.ⓘ{I2} → f = ⫯g →
-                          ∃∃I1,K1. ⬇*[b, g] K1 ≘ K2 & ⬆*[g] I2 ≘ I1 & X = K1.ⓘ{I1}.
+fact drops_inv_skip2_aux: ∀b,f,X,Y. ⬇*[b,f] X ≘ Y → ∀g,I2,K2. Y = K2.ⓘ{I2} → f = ⫯g →
+                          ∃∃I1,K1. ⬇*[b,g] K1 ≘ K2 & ⬆*[g] I2 ≘ I1 & X = K1.ⓘ{I1}.
 #b #f #X #Y * -f -X -Y
 [ #f #Hf #g #J2 #K2 #H destruct
 | #f #I #L1 #L2 #_ #g #J2 #K2 #_ #H2 elim (discr_next_push … H2)
@@ -202,14 +202,14 @@ qed-.
 
 (* Basic_1: includes: drop_gen_skip_r *)
 (* Basic_2A1: includes: drop_inv_skip2 *)
-lemma drops_inv_skip2: ∀b,f,I2,X,K2. ⬇*[b, ⫯f] X ≘ K2.ⓘ{I2} →
-                       ∃∃I1,K1. ⬇*[b, f] K1 ≘ K2 & ⬆*[f] I2 ≘ I1 & X = K1.ⓘ{I1}.
+lemma drops_inv_skip2: ∀b,f,I2,X,K2. ⬇*[b,⫯f] X ≘ K2.ⓘ{I2} →
+                       ∃∃I1,K1. ⬇*[b,f] K1 ≘ K2 & ⬆*[f] I2 ≘ I1 & X = K1.ⓘ{I1}.
 /2 width=5 by drops_inv_skip2_aux/ qed-.
 
 (* Basic forward lemmas *****************************************************)
 
-fact drops_fwd_drop2_aux: ∀b,f2,X,Y. ⬇*[b, f2] X ≘ Y → ∀I,K. Y = K.ⓘ{I} →
-                          ∃∃f1,f. 𝐈⦃f1⦄ & f2 ⊚ ↑f1 ≘ f & ⬇*[b, f] X ≘ K.
+fact drops_fwd_drop2_aux: ∀b,f2,X,Y. ⬇*[b,f2] X ≘ Y → ∀I,K. Y = K.ⓘ{I} →
+                          ∃∃f1,f. 𝐈⦃f1⦄ & f2 ⊚ ↑f1 ≘ f & ⬇*[b,f] X ≘ K.
 #b #f2 #X #Y #H elim H -f2 -X -Y
 [ #f2 #Hf2 #J #K #H destruct
 | #f2 #I #L1 #L2 #_ #IHL #J #K #H elim (IHL … H) -IHL
@@ -219,14 +219,14 @@ fact drops_fwd_drop2_aux: ∀b,f2,X,Y. ⬇*[b, f2] X ≘ Y → ∀I,K. Y = K.ⓘ
 ]
 qed-.
 
-lemma drops_fwd_drop2: ∀b,f2,I,X,K. ⬇*[b, f2] X ≘ K.ⓘ{I} →
-                       ∃∃f1,f. 𝐈⦃f1⦄ & f2 ⊚ ↑f1 ≘ f & ⬇*[b, f] X ≘ K.
+lemma drops_fwd_drop2: ∀b,f2,I,X,K. ⬇*[b,f2] X ≘ K.ⓘ{I} →
+                       ∃∃f1,f. 𝐈⦃f1⦄ & f2 ⊚ ↑f1 ≘ f & ⬇*[b,f] X ≘ K.
 /2 width=4 by drops_fwd_drop2_aux/ qed-.
 
 (* Properties with test for identity ****************************************)
 
 (* Basic_2A1: includes: drop_refl *)
-lemma drops_refl: ∀b,L,f. 𝐈⦃f⦄ → ⬇*[b, f] L ≘ L.
+lemma drops_refl: ∀b,L,f. 𝐈⦃f⦄ → ⬇*[b,f] L ≘ L.
 #b #L elim L -L /2 width=1 by drops_atom/
 #L #I #IHL #f #Hf elim (isid_inv_gen … Hf) -Hf
 /3 width=1 by drops_skip, liftsb_refl/
@@ -236,15 +236,15 @@ qed.
 
 (* Basic_1: includes: drop_gen_refl *)
 (* Basic_2A1: includes: drop_inv_O2 *)
-lemma drops_fwd_isid: ∀b,f,L1,L2. ⬇*[b, f] L1 ≘ L2 → 𝐈⦃f⦄ → L1 = L2.
+lemma drops_fwd_isid: ∀b,f,L1,L2. ⬇*[b,f] L1 ≘ L2 → 𝐈⦃f⦄ → L1 = L2.
 #b #f #L1 #L2 #H elim H -f -L1 -L2 //
 [ #f #I #L1 #L2 #_ #_ #H elim (isid_inv_next … H) //
 | /5 width=5 by isid_inv_push, liftsb_fwd_isid, eq_f2, sym_eq/
 ]
 qed-.
 
-lemma drops_after_fwd_drop2: ∀b,f2,I,X,K. ⬇*[b, f2] X ≘ K.ⓘ{I} →
-                             ∀f1,f. 𝐈⦃f1⦄ → f2 ⊚ ↑f1 ≘ f → ⬇*[b, f] X ≘ K.
+lemma drops_after_fwd_drop2: ∀b,f2,I,X,K. ⬇*[b,f2] X ≘ K.ⓘ{I} →
+                             ∀f1,f. 𝐈⦃f1⦄ → f2 ⊚ ↑f1 ≘ f → ⬇*[b,f] X ≘ K.
 #b #f2 #I #X #K #H #f1 #f #Hf1 #Hf elim (drops_fwd_drop2 … H) -H
 #g1 #g #Hg1 #Hg #HK lapply (after_mono_eq … Hg … Hf ??) -Hg -Hf
 /3 width=5 by drops_eq_repl_back, isid_inv_eq_repl, eq_next/
@@ -252,14 +252,14 @@ qed-.
 
 (* Forward lemmas with test for finite colength *****************************)
 
-lemma drops_fwd_isfin: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → 𝐅⦃f⦄.
+lemma drops_fwd_isfin: ∀f,L1,L2. ⬇*[Ⓣ,f] L1 ≘ L2 → 𝐅⦃f⦄.
 #f #L1 #L2 #H elim H -f -L1 -L2
 /3 width=1 by isfin_next, isfin_push, isfin_isid/
 qed-.
 
 (* Properties with test for uniformity **************************************)
 
-lemma drops_isuni_ex: ∀f. 𝐔⦃f⦄ → ∀L. ∃K. ⬇*[Ⓕ, f] L ≘ K.
+lemma drops_isuni_ex: ∀f. 𝐔⦃f⦄ → ∀L. ∃K. ⬇*[Ⓕ,f] L ≘ K.
 #f #H elim H -f /4 width=2 by drops_refl, drops_TF, ex_intro/
 #f #_ #g #H #IH destruct * /2 width=2 by ex_intro/ 
 #L #I elim (IH L) -IH /3 width=2 by drops_drop, ex_intro/
@@ -267,9 +267,9 @@ qed-.
 
 (* Inversion lemmas with test for uniformity ********************************)
 
-lemma drops_inv_isuni: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → 𝐔⦃f⦄ →
+lemma drops_inv_isuni: ∀f,L1,L2. ⬇*[Ⓣ,f] L1 ≘ L2 → 𝐔⦃f⦄ →
                        (𝐈⦃f⦄ ∧ L1 = L2) ∨
-                       ∃∃g,I,K. ⬇*[Ⓣ, g] K ≘ L2 & 𝐔⦃g⦄ & L1 = K.ⓘ{I} & f = ↑g.
+                       ∃∃g,I,K. ⬇*[Ⓣ,g] K ≘ L2 & 𝐔⦃g⦄ & L1 = K.ⓘ{I} & f = ↑g.
 #f #L1 #L2 * -f -L1 -L2
 [ /4 width=1 by or_introl, conj/
 | /4 width=7 by isuni_inv_next, ex4_3_intro, or_intror/
@@ -278,9 +278,9 @@ lemma drops_inv_isuni: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → 𝐔⦃f⦄ →
 qed-.
 
 (* Basic_2A1: was: drop_inv_O1_pair1 *)
-lemma drops_inv_bind1_isuni: ∀b,f,I,K,L2. 𝐔⦃f⦄ → ⬇*[b, f] K.ⓘ{I} ≘ L2 →
+lemma drops_inv_bind1_isuni: ∀b,f,I,K,L2. 𝐔⦃f⦄ → ⬇*[b,f] K.ⓘ{I} ≘ L2 →
                              (𝐈⦃f⦄ ∧ L2 = K.ⓘ{I}) ∨
-                             ∃∃g. 𝐔⦃g⦄ & ⬇*[b, g] K ≘ L2 & f = ↑g.
+                             ∃∃g. 𝐔⦃g⦄ & ⬇*[b,g] K ≘ L2 & f = ↑g.
 #b #f #I #K #L2 #Hf #H elim (isuni_split … Hf) -Hf * #g #Hg #H0 destruct
 [ lapply (drops_inv_skip1 … H) -H * #Z #Y #HY #HZ #H destruct
   <(drops_fwd_isid … HY Hg) -Y >(liftsb_fwd_isid … HZ Hg) -Z
@@ -290,9 +290,9 @@ lemma drops_inv_bind1_isuni: ∀b,f,I,K,L2. 𝐔⦃f⦄ → ⬇*[b, f] K.ⓘ{I}
 qed-.
 
 (* Basic_2A1: was: drop_inv_O1_pair2 *)
-lemma drops_inv_bind2_isuni: ∀b,f,I,K,L1. 𝐔⦃f⦄ → ⬇*[b, f] L1 ≘ K.ⓘ{I} →
+lemma drops_inv_bind2_isuni: ∀b,f,I,K,L1. 𝐔⦃f⦄ → ⬇*[b,f] L1 ≘ K.ⓘ{I} →
                              (𝐈⦃f⦄ ∧ L1 = K.ⓘ{I}) ∨
-                             ∃∃g,I1,K1. 𝐔⦃g⦄ & ⬇*[b, g] K1 ≘ K.ⓘ{I} & L1 = K1.ⓘ{I1} & f = ↑g.
+                             ∃∃g,I1,K1. 𝐔⦃g⦄ & ⬇*[b,g] K1 ≘ K.ⓘ{I} & L1 = K1.ⓘ{I1} & f = ↑g.
 #b #f #I #K *
 [ #Hf #H elim (drops_inv_atom1 … H) -H #H destruct
 | #L1 #I1 #Hf #H elim (drops_inv_bind1_isuni … Hf H) -Hf -H *
@@ -302,16 +302,16 @@ lemma drops_inv_bind2_isuni: ∀b,f,I,K,L1. 𝐔⦃f⦄ → ⬇*[b, f] L1 ≘ K.
 ]
 qed-.
 
-lemma drops_inv_bind2_isuni_next: ∀b,f,I,K,L1. 𝐔⦃f⦄ → ⬇*[b, ↑f] L1 ≘ K.ⓘ{I} →
-                                  ∃∃I1,K1. ⬇*[b, f] K1 ≘ K.ⓘ{I} & L1 = K1.ⓘ{I1}.
+lemma drops_inv_bind2_isuni_next: ∀b,f,I,K,L1. 𝐔⦃f⦄ → ⬇*[b,↑f] L1 ≘ K.ⓘ{I} →
+                                  ∃∃I1,K1. ⬇*[b,f] K1 ≘ K.ⓘ{I} & L1 = K1.ⓘ{I1}.
 #b #f #I #K #L1 #Hf #H elim (drops_inv_bind2_isuni … H) -H /2 width=3 by isuni_next/ -Hf *
 [ #H elim (isid_inv_next … H) -H //
 | /2 width=4 by ex2_2_intro/
 ]
 qed-.
 
-fact drops_inv_TF_aux: ∀f,L1,L2. ⬇*[Ⓕ, f] L1 ≘ L2 → 𝐔⦃f⦄ →
-                       ∀I,K. L2 = K.ⓘ{I} → ⬇*[Ⓣ, f] L1 ≘ K.ⓘ{I}.
+fact drops_inv_TF_aux: ∀f,L1,L2. ⬇*[Ⓕ,f] L1 ≘ L2 → 𝐔⦃f⦄ →
+                       ∀I,K. L2 = K.ⓘ{I} → ⬇*[Ⓣ,f] L1 ≘ K.ⓘ{I}.
 #f #L1 #L2 #H elim H -f -L1 -L2
 [ #f #_ #_ #J #K #H destruct
 | #f #I #L1 #L2 #_ #IH #Hf #J #K #H destruct
@@ -324,16 +324,16 @@ fact drops_inv_TF_aux: ∀f,L1,L2. ⬇*[Ⓕ, f] L1 ≘ L2 → 𝐔⦃f⦄ →
 qed-.
 
 (* Basic_2A1: includes: drop_inv_FT *)
-lemma drops_inv_TF: ∀f,I,L,K. ⬇*[Ⓕ, f] L ≘ K.ⓘ{I} → 𝐔⦃f⦄ → ⬇*[Ⓣ, f] L ≘ K.ⓘ{I}.
+lemma drops_inv_TF: ∀f,I,L,K. ⬇*[Ⓕ,f] L ≘ K.ⓘ{I} → 𝐔⦃f⦄ → ⬇*[Ⓣ,f] L ≘ K.ⓘ{I}.
 /2 width=3 by drops_inv_TF_aux/ qed-.
 
 (* Basic_2A1: includes: drop_inv_gen *)
-lemma drops_inv_gen: ∀b,f,I,L,K. ⬇*[b, f] L ≘ K.ⓘ{I} → 𝐔⦃f⦄ → ⬇*[Ⓣ, f] L ≘ K.ⓘ{I}.
+lemma drops_inv_gen: ∀b,f,I,L,K. ⬇*[b,f] L ≘ K.ⓘ{I} → 𝐔⦃f⦄ → ⬇*[Ⓣ,f] L ≘ K.ⓘ{I}.
 * /2 width=1 by drops_inv_TF/
 qed-.
 
 (* Basic_2A1: includes: drop_inv_T *)
-lemma drops_inv_F: ∀b,f,I,L,K. ⬇*[Ⓕ, f] L ≘ K.ⓘ{I} → 𝐔⦃f⦄ → ⬇*[b, f] L ≘ K.ⓘ{I}.
+lemma drops_inv_F: ∀b,f,I,L,K. ⬇*[Ⓕ,f] L ≘ K.ⓘ{I} → 𝐔⦃f⦄ → ⬇*[b,f] L ≘ K.ⓘ{I}.
 * /2 width=1 by drops_inv_TF/
 qed-.
 
@@ -341,13 +341,13 @@ qed-.
 
 (* Basic_1: was: drop_S *)
 (* Basic_2A1: was: drop_fwd_drop2 *)
-lemma drops_isuni_fwd_drop2: ∀b,f,I,X,K. 𝐔⦃f⦄ → ⬇*[b, f] X ≘ K.ⓘ{I} → ⬇*[b, ↑f] X ≘ K.
+lemma drops_isuni_fwd_drop2: ∀b,f,I,X,K. 𝐔⦃f⦄ → ⬇*[b,f] X ≘ K.ⓘ{I} → ⬇*[b,↑f] X ≘ K.
 /3 width=7 by drops_after_fwd_drop2, after_isid_isuni/ qed-.
 
 (* Inversion lemmas with uniform relocations ********************************)
 
-lemma drops_inv_atom2: ∀b,L,f. ⬇*[b, f] L ≘ ⋆ →
-                       ∃∃n,f1. ⬇*[b, 𝐔❴n❵] L ≘ ⋆ & 𝐔❴n❵ ⊚ f1 ≘ f.
+lemma drops_inv_atom2: ∀b,L,f. ⬇*[b,f] L ≘ ⋆ →
+                       ∃∃n,f1. ⬇*[b,𝐔❴n❵] L ≘ ⋆ & 𝐔❴n❵ ⊚ f1 ≘ f.
 #b #L elim L -L
 [ /3 width=4 by drops_atom, after_isid_sn, ex2_2_intro/
 | #L #I #IH #f #H elim (pn_split f) * #g #H0 destruct
@@ -368,7 +368,7 @@ qed-.
 
 (* Properties with uniform relocations **************************************)
 
-lemma drops_F_uni: ∀L,i. ⬇*[Ⓕ, 𝐔❴i❵] L ≘ ⋆ ∨ ∃∃I,K. ⬇*[i] L ≘ K.ⓘ{I}.
+lemma drops_F_uni: ∀L,i. ⬇*[Ⓕ,𝐔❴i❵] L ≘ ⋆ ∨ ∃∃I,K. ⬇*[i] L ≘ K.ⓘ{I}.
 #L elim L -L /2 width=1 by or_introl/
 #L #I #IH * /4 width=3 by drops_refl, ex1_2_intro, or_intror/
 #i elim (IH i) -IH /3 width=1 by drops_drop, or_introl/
@@ -376,8 +376,8 @@ lemma drops_F_uni: ∀L,i. ⬇*[Ⓕ, 𝐔❴i❵] L ≘ ⋆ ∨ ∃∃I,K. ⬇*[
 qed-.
 
 (* Basic_2A1: includes: drop_split *)
-lemma drops_split_trans: ∀b,f,L1,L2. ⬇*[b, f] L1 ≘ L2 → ∀f1,f2. f1 ⊚ f2 ≘ f → 𝐔⦃f1⦄ →
-                         ∃∃L. ⬇*[b, f1] L1 ≘ L & ⬇*[b, f2] L ≘ L2.
+lemma drops_split_trans: ∀b,f,L1,L2. ⬇*[b,f] L1 ≘ L2 → ∀f1,f2. f1 ⊚ f2 ≘ f → 𝐔⦃f1⦄ →
+                         ∃∃L. ⬇*[b,f1] L1 ≘ L & ⬇*[b,f2] L ≘ L2.
 #b #f #L1 #L2 #H elim H -f -L1 -L2
 [ #f #H0f #f1 #f2 #Hf #Hf1 @(ex2_intro … (⋆)) @drops_atom
   #H lapply (H0f H) -b
@@ -396,8 +396,8 @@ lemma drops_split_trans: ∀b,f,L1,L2. ⬇*[b, f] L1 ≘ L2 → ∀f1,f2. f1 ⊚
 ]
 qed-.
 
-lemma drops_split_div: ∀b,f1,L1,L. ⬇*[b, f1] L1 ≘ L → ∀f2,f. f1 ⊚ f2 ≘ f → 𝐔⦃f2⦄ →
-                       ∃∃L2. ⬇*[Ⓕ, f2] L ≘ L2 & ⬇*[Ⓕ, f] L1 ≘ L2.
+lemma drops_split_div: ∀b,f1,L1,L. ⬇*[b,f1] L1 ≘ L → ∀f2,f. f1 ⊚ f2 ≘ f → 𝐔⦃f2⦄ →
+                       ∃∃L2. ⬇*[Ⓕ,f2] L ≘ L2 & ⬇*[Ⓕ,f] L1 ≘ L2.
 #b #f1 #L1 #L #H elim H -f1 -L1 -L
 [ #f1 #Hf1 #f2 #f #Hf #Hf2 @(ex2_intro … (⋆)) @drops_atom #H destruct
 | #f1 #I #L1 #L #HL1 #IH #f2 #f #Hf #Hf2 elim (after_inv_nxx … Hf) -Hf [2,3: // ]
@@ -421,8 +421,8 @@ lemma drops_tls_at: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 →
                     ⬇*[b,⫯⫱*[↑i2]f] L1 ≘ L2.
 /3 width=3 by drops_eq_repl_fwd, at_inv_tls/ qed-.
 
-lemma drops_split_trans_bind2: ∀b,f,I,L,K0. ⬇*[b, f] L ≘ K0.ⓘ{I} → ∀i. @⦃O, f⦄ ≘ i →
-                               ∃∃J,K. ⬇*[i]L ≘ K.ⓘ{J} & ⬇*[b, ⫱*[↑i]f] K ≘ K0 & ⬆*[⫱*[↑i]f] I ≘ J.
+lemma drops_split_trans_bind2: ∀b,f,I,L,K0. ⬇*[b,f] L ≘ K0.ⓘ{I} → ∀i. @⦃O,f⦄ ≘ i →
+                               ∃∃J,K. ⬇*[i]L ≘ K.ⓘ{J} & ⬇*[b,⫱*[↑i]f] K ≘ K0 & ⬆*[⫱*[↑i]f] I ≘ J.
 #b #f #I #L #K0 #H #i #Hf
 elim (drops_split_trans … H) -H [ |5: @(after_uni_dx … Hf) |2,3: skip ] /2 width=1 by after_isid_dx/ #Y #HLY #H
 lapply (drops_tls_at … Hf … H) -H #H
index 1c44ed555a9e0956d3746e84c4cfc01972054393..4e241edfdf1946c97276d1a02eaf92a933b2aa03 100644 (file)
@@ -20,9 +20,9 @@ include "static_2/relocation/drops_weight.ma".
 (* Main properties **********************************************************)
 
 (* Basic_2A1: includes: drop_conf_ge drop_conf_be drop_conf_le *)
-theorem drops_conf: ∀b1,f1,L1,L. ⬇*[b1, f1] L1 ≘ L →
-                    ∀b2,f,L2. ⬇*[b2, f] L1 ≘ L2 →
-                    ∀f2. f1 ⊚ f2 ≘ f → ⬇*[b2, f2] L ≘ L2.
+theorem drops_conf: ∀b1,f1,L1,L. ⬇*[b1,f1] L1 ≘ L →
+                    ∀b2,f,L2. ⬇*[b2,f] L1 ≘ L2 →
+                    ∀f2. f1 ⊚ f2 ≘ f → ⬇*[b2,f2] L ≘ L2.
 #b1 #f1 #L1 #L #H elim H -f1 -L1 -L
 [ #f1 #_ #b2 #f #L2 #HL2 #f2 #Hf12 elim (drops_inv_atom1 … HL2) -b1 -HL2
   #H #Hf destruct @drops_atom
@@ -41,9 +41,9 @@ qed-.
 (* Basic_2A1: includes: drop_trans_ge drop_trans_le drop_trans_ge_comm 
                         drops_drop_trans
 *)
-theorem drops_trans: ∀b1,f1,L1,L. ⬇*[b1, f1] L1 ≘ L →
-                     ∀b2,f2,L2. ⬇*[b2, f2] L ≘ L2 →
-                     ∀f. f1 ⊚ f2 ≘ f → ⬇*[b1∧b2, f] L1 ≘ L2.
+theorem drops_trans: ∀b1,f1,L1,L. ⬇*[b1,f1] L1 ≘ L →
+                     ∀b2,f2,L2. ⬇*[b2,f2] L ≘ L2 →
+                     ∀f. f1 ⊚ f2 ≘ f → ⬇*[b1∧b2,f] L1 ≘ L2.
 #b1 #f1 #L1 #L #H elim H -f1 -L1 -L
 [ #f1 #Hf1 #b2 #f2 #L2 #HL2 #f #Hf elim (drops_inv_atom1 … HL2) -HL2
   #H #Hf2 destruct @drops_atom #H elim (andb_inv_true_dx … H) -H
@@ -85,28 +85,42 @@ qed-.
 (* Advanced properties ******************************************************)
 
 (* Basic_2A1: includes: drop_mono *)
-lemma drops_mono: ∀b1,f,L,L1. ⬇*[b1, f] L ≘ L1 →
-                  ∀b2,L2. ⬇*[b2, f] L ≘ L2 → L1 = L2.
+lemma drops_mono: ∀b1,f,L,L1. ⬇*[b1,f] L ≘ L1 →
+                  ∀b2,L2. ⬇*[b2,f] L ≘ L2 → L1 = L2.
 #b1 #f #L #L1 lapply (after_isid_dx 𝐈𝐝 … f)
 /3 width=8 by drops_conf, drops_fwd_isid/
 qed-.
 
+lemma drops_inv_uni: ∀L,i. ⬇*[Ⓕ,𝐔❴i❵] L ≘ ⋆ → ∀I,K. ⬇*[i] L ≘ K.ⓘ{I} → ⊥.
+#L #i #H1 #I #K #H2
+lapply (drops_F … H2) -H2 #H2
+lapply (drops_mono … H2 … H1) -L -i #H destruct
+qed-.
+
+lemma drops_ldec_dec: ∀L,i. Decidable (∃∃K,W. ⬇*[i] L ≘ K.ⓛW).
+#L #i elim (drops_F_uni L i) [| * * [ #I #K1 | * #W1 #K1 ] ]
+[4: /3 width=3 by ex1_2_intro, or_introl/
+|*: #H1L @or_intror * #K2 #W2 #H2L
+    lapply (drops_mono … H2L … H1L) -L #H destruct
+]
+qed-.
+
 (* Basic_2A1: includes: drop_conf_lt *)
-lemma drops_conf_skip1: ∀b2,f,L,L2. ⬇*[b2, f] L ≘ L2 →
-                        ∀b1,f1,I1,K1. ⬇*[b1, f1] L ≘ K1.ⓘ{I1} →
+lemma drops_conf_skip1: ∀b2,f,L,L2. ⬇*[b2,f] L ≘ L2 →
+                        ∀b1,f1,I1,K1. ⬇*[b1,f1] L ≘ K1.ⓘ{I1} →
                         ∀f2. f1 ⊚ ⫯f2 ≘ f →
                         ∃∃I2,K2. L2 = K2.ⓘ{I2} &
-                                 ⬇*[b2, f2] K1 ≘ K2 & ⬆*[f2] I2 ≘ I1.
+                                 ⬇*[b2,f2] K1 ≘ K2 & ⬆*[f2] I2 ≘ I1.
 #b2 #f #L #L2 #H2 #b1 #f1 #I1 #K1 #H1 #f2 #Hf lapply (drops_conf … H1 … H2 … Hf) -L -Hf
 #H elim (drops_inv_skip1 … H) -H /2 width=5 by ex3_2_intro/
 qed-.
 
 (* Basic_2A1: includes: drop_trans_lt *)
-lemma drops_trans_skip2: ∀b1,f1,L1,L. ⬇*[b1, f1] L1 ≘ L →
-                         ∀b2,f2,I2,K2. ⬇*[b2, f2] L ≘ K2.ⓘ{I2} →
+lemma drops_trans_skip2: ∀b1,f1,L1,L. ⬇*[b1,f1] L1 ≘ L →
+                         ∀b2,f2,I2,K2. ⬇*[b2,f2] L ≘ K2.ⓘ{I2} →
                          ∀f. f1 ⊚ f2 ≘ ⫯f →
                          ∃∃I1,K1. L1 = K1.ⓘ{I1} &
-                                  ⬇*[b1∧b2, f] K1 ≘ K2 & ⬆*[f] I2 ≘ I1.
+                                  ⬇*[b1∧b2,f] K1 ≘ K2 & ⬆*[f] I2 ≘ I1.
 #b1 #f1 #L1 #L #H1 #b2 #f2 #I2 #K2 #H2 #f #Hf
 lapply (drops_trans … H1 … H2 … Hf) -L -Hf
 #H elim (drops_inv_skip2 … H) -H /2 width=5 by ex3_2_intro/
@@ -114,7 +128,7 @@ qed-.
 
 (* Basic_2A1: includes: drops_conf_div *)
 lemma drops_conf_div_bind: ∀f1,f2,I1,I2,L,K.
-                           ⬇*[Ⓣ, f1] L ≘ K.ⓘ{I1} → ⬇*[Ⓣ, f2] L ≘ K.ⓘ{I2} →
+                           ⬇*[Ⓣ,f1] L ≘ K.ⓘ{I1} → ⬇*[Ⓣ,f2] L ≘ K.ⓘ{I2} →
                            𝐔⦃f1⦄ → 𝐔⦃f2⦄ → f1 ≡ f2 ∧ I1 = I2.
 #f1 #f2 #I1 #I2 #L #K #Hf1 #Hf2 #HU1 #HU2
 lapply (drops_isuni_fwd_drop2 … Hf1) // #H1
@@ -125,9 +139,3 @@ lapply (drops_eq_repl_back … Hf1 … H12) -Hf1 #H0
 lapply (drops_mono … H0 … Hf2) -L #H
 destruct /2 width=1 by conj/
 qed-.
-
-lemma drops_inv_uni: ∀L,i. ⬇*[Ⓕ, 𝐔❴i❵] L ≘ ⋆ → ∀I,K. ⬇*[i] L ≘ K.ⓘ{I} → ⊥.
-#L #i #H1 #I #K #H2
-lapply (drops_F … H2) -H2 #H2
-lapply (drops_mono … H2 … H1) -L -i #H destruct
-qed-.
index 94085a331cce0eb0792cfcbbc2e749106e03a5e4..1a20d722f2e8160f4a20e89515bcd261b91da5fb 100644 (file)
@@ -20,13 +20,13 @@ include "static_2/relocation/drops.ma".
 (* Forward lemmas with length for local environments ************************)
 
 (* Basic_2A1: includes: drop_fwd_length_le4 *)
-lemma drops_fwd_length_le4: ∀b,f,L1,L2. ⬇*[b, f] L1 ≘ L2 → |L2| ≤ |L1|.
+lemma drops_fwd_length_le4: ∀b,f,L1,L2. ⬇*[b,f] L1 ≘ L2 → |L2| ≤ |L1|.
 #b #f #L1 #L2 #H elim H -f -L1 -L2 /2 width=1 by le_S, le_S_S/
 qed-.
 
 (* Basic_2A1: includes: drop_fwd_length_eq1 *)
-theorem drops_fwd_length_eq1: ∀b1,b2,f,L1,K1. ⬇*[b1, f] L1 ≘ K1 →
-                              ∀L2,K2. ⬇*[b2, f] L2 ≘ K2 →
+theorem drops_fwd_length_eq1: ∀b1,b2,f,L1,K1. ⬇*[b1,f] L1 ≘ K1 →
+                              ∀L2,K2. ⬇*[b2,f] L2 ≘ K2 →
                               |L1| = |L2| → |K1| = |K2|.
 #b1 #b2 #f #L1 #K1 #HLK1 elim HLK1 -f -L1 -K1
 [ #f #_ #L2 #K2 #HLK2 #H lapply (length_inv_zero_sn … H) -H
@@ -43,7 +43,7 @@ qed-.
 
 (* forward lemmas with finite colength assignment ***************************)
 
-lemma drops_fwd_fcla: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 →
+lemma drops_fwd_fcla: ∀f,L1,L2. ⬇*[Ⓣ,f] L1 ≘ L2 →
                       ∃∃n. 𝐂⦃f⦄ ≘ n & |L1| = |L2| + n.
 #f #L1 #L2 #H elim H -f -L1 -L2
 [ /4 width=3 by fcla_isid, ex2_intro/
@@ -53,25 +53,25 @@ lemma drops_fwd_fcla: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 →
 qed-.
 
 (* Basic_2A1: includes: drop_fwd_length *)
-lemma drops_fcla_fwd: ∀f,L1,L2,n. ⬇*[Ⓣ, f] L1 ≘ L2 → 𝐂⦃f⦄ ≘ n →
+lemma drops_fcla_fwd: ∀f,L1,L2,n. ⬇*[Ⓣ,f] L1 ≘ L2 → 𝐂⦃f⦄ ≘ n →
                       |L1| = |L2| + n.
 #f #l1 #l2 #n #Hf #Hn elim (drops_fwd_fcla … Hf) -Hf
 #k #Hm #H <(fcla_mono … Hm … Hn) -f //
 qed-.
 
-lemma drops_fwd_fcla_le2: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 →
+lemma drops_fwd_fcla_le2: ∀f,L1,L2. ⬇*[Ⓣ,f] L1 ≘ L2 →
                           ∃∃n. 𝐂⦃f⦄ ≘ n & n ≤ |L1|.
 #f #L1 #L2 #H elim (drops_fwd_fcla … H) -H /2 width=3 by ex2_intro/
 qed-.
 
 (* Basic_2A1: includes: drop_fwd_length_le2 *)
-lemma drops_fcla_fwd_le2: ∀f,L1,L2,n. ⬇*[Ⓣ, f] L1 ≘ L2 → 𝐂⦃f⦄ ≘ n →
+lemma drops_fcla_fwd_le2: ∀f,L1,L2,n. ⬇*[Ⓣ,f] L1 ≘ L2 → 𝐂⦃f⦄ ≘ n →
                           n ≤ |L1|.
 #f #L1 #L2 #n #H #Hn elim (drops_fwd_fcla_le2 … H) -H
 #k #Hm #H <(fcla_mono … Hm … Hn) -f //
 qed-.
 
-lemma drops_fwd_fcla_lt2: ∀f,L1,I2,K2. ⬇*[Ⓣ, f] L1 ≘ K2.ⓘ{I2} →
+lemma drops_fwd_fcla_lt2: ∀f,L1,I2,K2. ⬇*[Ⓣ,f] L1 ≘ K2.ⓘ{I2} →
                           ∃∃n. 𝐂⦃f⦄ ≘ n & n < |L1|.
 #f #L1 #I2 #K2 #H elim (drops_fwd_fcla … H) -H
 #n #Hf #H >H -L1 /3 width=3 by le_S_S, ex2_intro/
@@ -79,27 +79,27 @@ qed-.
 
 (* Basic_2A1: includes: drop_fwd_length_lt2 *)
 lemma drops_fcla_fwd_lt2: ∀f,L1,I2,K2,n.
-                          ⬇*[Ⓣ, f] L1 ≘ K2.ⓘ{I2} → 𝐂⦃f⦄ ≘ n →
+                          ⬇*[Ⓣ,f] L1 ≘ K2.ⓘ{I2} → 𝐂⦃f⦄ ≘ n →
                           n < |L1|.
 #f #L1 #I2 #K2 #n #H #Hn elim (drops_fwd_fcla_lt2 … H) -H
 #k #Hm #H <(fcla_mono … Hm … Hn) -f //
 qed-.
 
 (* Basic_2A1: includes: drop_fwd_length_lt4 *)
-lemma drops_fcla_fwd_lt4: ∀f,L1,L2,n. ⬇*[Ⓣ, f] L1 ≘ L2 → 𝐂⦃f⦄ ≘ n → 0 < n →
+lemma drops_fcla_fwd_lt4: ∀f,L1,L2,n. ⬇*[Ⓣ,f] L1 ≘ L2 → 𝐂⦃f⦄ ≘ n → 0 < n →
                           |L2| < |L1|.
 #f #L1 #L2 #n #H #Hf #Hn lapply (drops_fcla_fwd … H Hf) -f
 /2 width=1 by lt_minus_to_plus_r/ qed-.
 
 (* Basic_2A1: includes: drop_inv_length_eq *)
-lemma drops_inv_length_eq: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → |L1| = |L2| → 𝐈⦃f⦄.
+lemma drops_inv_length_eq: ∀f,L1,L2. ⬇*[Ⓣ,f] L1 ≘ L2 → |L1| = |L2| → 𝐈⦃f⦄.
 #f #L1 #L2 #H #HL12 elim (drops_fwd_fcla … H) -H
 #n #Hn <HL12 -L2 #H lapply (discr_plus_x_xy … H) -H
 /2 width=3 by fcla_inv_xp/
 qed-.
 
 (* Basic_2A1: includes: drop_fwd_length_eq2 *)
-theorem drops_fwd_length_eq2: ∀f,L1,L2,K1,K2. ⬇*[Ⓣ, f] L1 ≘ K1 → ⬇*[Ⓣ, f] L2 ≘ K2 →
+theorem drops_fwd_length_eq2: ∀f,L1,L2,K1,K2. ⬇*[Ⓣ,f] L1 ≘ K1 → ⬇*[Ⓣ,f] L2 ≘ K2 →
                               |K1| = |K2| → |L1| = |L2|.
 #f #L1 #L2 #K1 #K2 #HLK1 #HLK2 #HL12
 elim (drops_fwd_fcla … HLK1) -HLK1 #n1 #Hn1 #H1 >H1 -L1
@@ -107,7 +107,7 @@ elim (drops_fwd_fcla … HLK2) -HLK2 #n2 #Hn2 #H2 >H2 -L2
 <(fcla_mono … Hn2 … Hn1) -f //
 qed-.
 
-theorem drops_conf_div: ∀f1,f2,L1,L2. ⬇*[Ⓣ, f1] L1 ≘ L2 → ⬇*[Ⓣ, f2] L1 ≘ L2 →
+theorem drops_conf_div: ∀f1,f2,L1,L2. ⬇*[Ⓣ,f1] L1 ≘ L2 → ⬇*[Ⓣ,f2] L1 ≘ L2 →
                         ∃∃n. 𝐂⦃f1⦄ ≘ n & 𝐂⦃f2⦄ ≘ n.
 #f1 #f2 #L1 #L2 #H1 #H2
 elim (drops_fwd_fcla … H1) -H1 #n1 #Hf1 #H1
@@ -116,7 +116,7 @@ lapply (injective_plus_r … H) -L2 #H destruct /2 width=3 by ex2_intro/
 qed-.
 
 theorem drops_conf_div_fcla: ∀f1,f2,L1,L2,n1,n2.
-                             ⬇*[Ⓣ, f1] L1 ≘ L2 → ⬇*[Ⓣ, f2] L1 ≘ L2 → 𝐂⦃f1⦄ ≘ n1 → 𝐂⦃f2⦄ ≘ n2 →
+                             ⬇*[Ⓣ,f1] L1 ≘ L2 → ⬇*[Ⓣ,f2] L1 ≘ L2 → 𝐂⦃f1⦄ ≘ n1 → 𝐂⦃f2⦄ ≘ n2 →
                              n1 = n2.
 #f1 #f2 #L1 #L2 #n1 #n2 #Hf1 #Hf2 #Hn1 #Hn2
 lapply (drops_fcla_fwd … Hf1 Hn1) -f1 #H1
index 1e33fc3d8c3fd292a187f38a90b3d480c7d16d50..8db2c8830dc915f1ff681744a461ea17b054ef79 100644 (file)
@@ -19,16 +19,16 @@ include "static_2/relocation/drops_sex.ma".
 (* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************)
 
 definition dedropable_sn: predicate … ≝
-                          λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → ∀K2. K1 ⪤[R] K2 →
-                          ∃∃L2. L1 ⪤[R] L2 & ⬇*[b, f] L2 ≘ K2 & L1 ≡[f] L2.
+                          λR. ∀b,f,L1,K1. ⬇*[b,f] L1 ≘ K1 → ∀K2. K1 ⪤[R] K2 →
+                          ∃∃L2. L1 ⪤[R] L2 & ⬇*[b,f] L2 ≘ K2 & L1 ≡[f] L2.
 
 definition dropable_sn: predicate … ≝
-                        λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → 𝐔⦃f⦄ → ∀L2. L1 ⪤[R] L2 →
-                        ∃∃K2. K1 ⪤[R] K2 & ⬇*[b, f] L2 ≘ K2.
+                        λR. ∀b,f,L1,K1. ⬇*[b,f] L1 ≘ K1 → 𝐔⦃f⦄ → ∀L2. L1 ⪤[R] L2 →
+                        ∃∃K2. K1 ⪤[R] K2 & ⬇*[b,f] L2 ≘ K2.
 
 definition dropable_dx: predicate … ≝
-                        λR. ∀L1,L2. L1 ⪤[R] L2 → ∀b,f,K2. ⬇*[b, f] L2 ≘ K2 → 𝐔⦃f⦄ →
-                        ∃∃K1. ⬇*[b, f] L1 ≘ K1 & K1 ⪤[R] K2.
+                        λR. ∀L1,L2. L1 ⪤[R] L2 → ∀b,f,K2. ⬇*[b,f] L2 ≘ K2 → 𝐔⦃f⦄ →
+                        ∃∃K1. ⬇*[b,f] L1 ≘ K1 & K1 ⪤[R] K2.
 
 (* Properties with generic extension ****************************************)
 
@@ -58,8 +58,8 @@ qed-.
 
 (* Basic_2A1: includes: lpx_sn_drop_conf *)
 lemma lex_drops_conf_pair (R): ∀L1,L2. L1 ⪤[R] L2 →
-                               ∀b,f,I,K1,V1. ⬇*[b, f] L1 ≘ K1.ⓑ{I}V1 → 𝐔⦃f⦄ →
-                               ∃∃K2,V2. ⬇*[b, f] L2 ≘ K2.ⓑ{I}V2 & K1 ⪤[R] K2 & R K1 V1 V2.
+                               ∀b,f,I,K1,V1. ⬇*[b,f] L1 ≘ K1.ⓑ{I}V1 → 𝐔⦃f⦄ →
+                               ∃∃K2,V2. ⬇*[b,f] L2 ≘ K2.ⓑ{I}V2 & K1 ⪤[R] K2 & R K1 V1 V2.
 #R #L1 #L2 * #f2 #Hf2 #HL12 #b #f #I #K1 #V1 #HLK1 #Hf
 elim (sex_drops_conf_push … HL12 … HLK1 Hf f2) -L1 -Hf
 [ #Z2 #K2 #HLK2 #HK12 #H
@@ -71,8 +71,8 @@ qed-.
 
 (* Basic_2A1: includes: lpx_sn_drop_trans *)
 lemma lex_drops_trans_pair (R): ∀L1,L2. L1 ⪤[R] L2 →
-                                ∀b,f,I,K2,V2. ⬇*[b, f] L2 ≘ K2.ⓑ{I}V2 → 𝐔⦃f⦄ →
-                                ∃∃K1,V1. ⬇*[b, f] L1 ≘ K1.ⓑ{I}V1 & K1 ⪤[R] K2 & R K1 V1 V2.
+                                ∀b,f,I,K2,V2. ⬇*[b,f] L2 ≘ K2.ⓑ{I}V2 → 𝐔⦃f⦄ →
+                                ∃∃K1,V1. ⬇*[b,f] L1 ≘ K1.ⓑ{I}V1 & K1 ⪤[R] K2 & R K1 V1 V2.
 #R #L1 #L2 * #f2 #Hf2 #HL12 #b #f #I #K2 #V2 #HLK2 #Hf
 elim (sex_drops_trans_push … HL12 … HLK2 Hf f2) -L2 -Hf
 [ #Z1 #K1 #HLK1 #HK12 #H
index 94beb0a7142fd9c4e994745df8bb86ec39075325..e214e9480c97ae83e308c8f85ab3dcdcd2b459f6 100644 (file)
@@ -30,9 +30,9 @@ lemma seq_co_dropable_dx: co_dropable_dx seq.
 
 (* Basic_2A1: includes: lreq_drop_trans_be *)
 lemma seq_drops_trans_next: ∀f2,L1,L2. L1 ≡[f2] L2 →
-                            ∀b,f,I,K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I} → 𝐔⦃f⦄ →
+                            ∀b,f,I,K2. ⬇*[b,f] L2 ≘ K2.ⓘ{I} → 𝐔⦃f⦄ →
                             ∀f1. f ~⊚ ↑f1 ≘ f2 →
-                            ∃∃K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I} & K1 ≡[f1] K2.
+                            ∃∃K1. ⬇*[b,f] L1 ≘ K1.ⓘ{I} & K1 ≡[f1] K2.
 #f2 #L1 #L2 #HL12 #b #f #I2 #K2 #HLK2 #Hf #f1 #Hf2
 elim (sex_drops_trans_next … HL12 … HLK2 Hf … Hf2) -f2 -L2 -Hf
 #I1 #K1 #HLK1 #HK12 #H <(ceq_ext_inv_eq … H) -I2
@@ -41,18 +41,18 @@ qed-.
 
 (* Basic_2A1: includes: lreq_drop_conf_be *)
 lemma seq_drops_conf_next: ∀f2,L1,L2. L1 ≡[f2] L2 →
-                           ∀b,f,I,K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I} → 𝐔⦃f⦄ →
+                           ∀b,f,I,K1. ⬇*[b,f] L1 ≘ K1.ⓘ{I} → 𝐔⦃f⦄ →
                            ∀f1. f ~⊚ ↑f1 ≘ f2 →
-                           ∃∃K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I} & K1 ≡[f1] K2.
+                           ∃∃K2. ⬇*[b,f] L2 ≘ K2.ⓘ{I} & K1 ≡[f1] K2.
 #f2 #L1 #L2 #HL12 #b #f #I1 #K1 #HLK1 #Hf #f1 #Hf2
 elim (seq_drops_trans_next … (seq_sym … HL12) … HLK1 … Hf2) // -f2 -L1 -Hf
 /3 width=3 by seq_sym, ex2_intro/
 qed-.
 
 lemma drops_seq_trans_next: ∀f1,K1,K2. K1 ≡[f1] K2 →
-                            ∀b,f,I,L1. ⬇*[b, f] L1.ⓘ{I} ≘ K1 →
+                            ∀b,f,I,L1. ⬇*[b,f] L1.ⓘ{I} ≘ K1 →
                             ∀f2. f ~⊚ f1 ≘ ↑f2 →
-                            ∃∃L2. ⬇*[b, f] L2.ⓘ{I} ≘ K2 & L1 ≡[f2] L2 & L1.ⓘ{I} ≡[f] L2.ⓘ{I}.
+                            ∃∃L2. ⬇*[b,f] L2.ⓘ{I} ≘ K2 & L1 ≡[f2] L2 & L1.ⓘ{I} ≡[f] L2.ⓘ{I}.
 #f1 #K1 #K2 #HK12 #b #f #I1 #L1 #HLK1 #f2 #Hf2
 elim (drops_sex_trans_next … HK12 … HLK1 … Hf2) -f1 -K1
 /2 width=6 by cfull_lift_sn, ceq_lift_sn/
index e1263a2fdedff474d5cb837d06f621bce898bfa3..8f3058cb9c4df9e987ceae60568cab86a12e3d88 100644 (file)
@@ -42,9 +42,9 @@ lemma sex_co_dropable_sn: ∀RN,RP. co_dropable_sn (sex RN RP).
 qed-.
 
 lemma sex_liftable_co_dedropable_bi: ∀RN,RP. d_liftable2_sn … liftsb RN → d_liftable2_sn … liftsb RP →
-                                     ∀f2,L1,L2. L1 ⪤[cfull, RP, f2] L2 → ∀f1,K1,K2. K1 ⪤[RN, RP, f1] K2 →
-                                     ∀b,f. ⬇*[b, f] L1 ≘ K1 → ⬇*[b, f] L2 ≘ K2 →
-                                     f ~⊚ f1 ≘ f2 → L1 ⪤[RN, RP, f2] L2.
+                                     ∀f2,L1,L2. L1 ⪤[cfull,RP,f2] L2 → ∀f1,K1,K2. K1 ⪤[RN,RP,f1] K2 →
+                                     ∀b,f. ⬇*[b,f] L1 ≘ K1 → ⬇*[b,f] L2 ≘ K2 →
+                                     f ~⊚ f1 ≘ f2 → L1 ⪤[RN,RP,f2] L2.
 #RN #RP #HRN #HRP #f2 #L1 #L2 #H elim H -f2 -L1 -L2 //
 #g2 #I1 #I2 #L1 #L2 #HL12 #HI12 #IH #f1 #Y1 #Y2 #HK12 #b #f #HY1 #HY2 #H
 [ elim (coafter_inv_xxn … H) [ |*: // ] -H #g #g1 #Hg2 #H1 #H2 destruct
@@ -87,9 +87,9 @@ lemma sex_liftable_co_dedropable_sn: ∀RN,RP. (∀L. reflexive … (RN L)) →
 ]
 qed-.
 
-fact sex_dropable_dx_aux: ∀RN,RP,b,f,L2,K2. ⬇*[b, f] L2 ≘ K2 → 𝐔⦃f⦄ →
-                          ∀f2,L1. L1 ⪤[RN, RP, f2] L2 → ∀f1. f ~⊚ f1 ≘ f2 →
-                          ∃∃K1. ⬇*[b, f] L1 ≘ K1 & K1 ⪤[RN, RP, f1] K2.
+fact sex_dropable_dx_aux: ∀RN,RP,b,f,L2,K2. ⬇*[b,f] L2 ≘ K2 → 𝐔⦃f⦄ →
+                          ∀f2,L1. L1 ⪤[RN,RP,f2] L2 → ∀f1. f ~⊚ f1 ≘ f2 →
+                          ∃∃K1. ⬇*[b,f] L1 ≘ K1 & K1 ⪤[RN,RP,f1] K2.
 #RN #RP #b #f #L2 #K2 #H elim H -f -L2 -K2
 [ #f #Hf #_ #f2 #X #H #f1 #Hf2 lapply (sex_inv_atom2 … H) -H
   #H destruct /4 width=3 by sex_atom, drops_atom, ex2_intro/
@@ -113,10 +113,10 @@ lemma sex_co_dropable_dx: ∀RN,RP. co_dropable_dx (sex RN RP).
 /2 width=5 by sex_dropable_dx_aux/ qed-.
 
 lemma sex_drops_conf_next: ∀RN,RP.
-                           ∀f2,L1,L2. L1 ⪤[RN, RP, f2] L2 →
-                           ∀b,f,I1,K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I1} → 𝐔⦃f⦄ →
+                           ∀f2,L1,L2. L1 ⪤[RN,RP,f2] L2 →
+                           ∀b,f,I1,K1. ⬇*[b,f] L1 ≘ K1.ⓘ{I1} → 𝐔⦃f⦄ →
                            ∀f1. f ~⊚ ↑f1 ≘ f2 →
-                           ∃∃I2,K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I2} & K1 ⪤[RN, RP, f1] K2 & RN K1 I1 I2.
+                           ∃∃I2,K2. ⬇*[b,f] L2 ≘ K2.ⓘ{I2} & K1 ⪤[RN,RP,f1] K2 & RN K1 I1 I2.
 #RN #RP #f2 #L1 #L2 #HL12 #b #f #I1 #K1 #HLK1 #Hf #f1 #Hf2
 elim (sex_co_dropable_sn … HLK1 … Hf … HL12 … Hf2) -L1 -f2 -Hf
 #X #HX #HLK2 elim (sex_inv_next1 … HX) -HX
@@ -124,30 +124,30 @@ elim (sex_co_dropable_sn … HLK1 … Hf … HL12 … Hf2) -L1 -f2 -Hf
 qed-.
 
 lemma sex_drops_conf_push: ∀RN,RP.
-                           ∀f2,L1,L2. L1 ⪤[RN, RP, f2] L2 →
-                           ∀b,f,I1,K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I1} → 𝐔⦃f⦄ →
+                           ∀f2,L1,L2. L1 ⪤[RN,RP,f2] L2 →
+                           ∀b,f,I1,K1. ⬇*[b,f] L1 ≘ K1.ⓘ{I1} → 𝐔⦃f⦄ →
                            ∀f1. f ~⊚ ⫯f1 ≘ f2 →
-                           ∃∃I2,K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I2} & K1 ⪤[RN, RP, f1] K2 & RP K1 I1 I2.
+                           ∃∃I2,K2. ⬇*[b,f] L2 ≘ K2.ⓘ{I2} & K1 ⪤[RN,RP,f1] K2 & RP K1 I1 I2.
 #RN #RP #f2 #L1 #L2 #HL12 #b #f #I1 #K1 #HLK1 #Hf #f1 #Hf2
 elim (sex_co_dropable_sn … HLK1 … Hf … HL12 … Hf2) -L1 -f2 -Hf
 #X #HX #HLK2 elim (sex_inv_push1 … HX) -HX
 #I2 #K2 #HK12 #HI12 #H destruct /2 width=5 by ex3_2_intro/
 qed-.
 
-lemma sex_drops_trans_next: ∀RN,RP,f2,L1,L2. L1 ⪤[RN, RP, f2] L2 →
-                            ∀b,f,I2,K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I2} → 𝐔⦃f⦄ →
+lemma sex_drops_trans_next: ∀RN,RP,f2,L1,L2. L1 ⪤[RN,RP,f2] L2 →
+                            ∀b,f,I2,K2. ⬇*[b,f] L2 ≘ K2.ⓘ{I2} → 𝐔⦃f⦄ →
                             ∀f1. f ~⊚ ↑f1 ≘ f2 →
-                            ∃∃I1,K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I1} & K1 ⪤[RN, RP, f1] K2 & RN K1 I1 I2.
+                            ∃∃I1,K1. ⬇*[b,f] L1 ≘ K1.ⓘ{I1} & K1 ⪤[RN,RP,f1] K2 & RN K1 I1 I2.
 #RN #RP #f2 #L1 #L2 #HL12 #b #f #I2 #K2 #HLK2 #Hf #f1 #Hf2
 elim (sex_co_dropable_dx … HL12 … HLK2 … Hf … Hf2) -L2 -f2 -Hf
 #X #HLK1 #HX elim (sex_inv_next2 … HX) -HX
 #I1 #K1 #HK12 #HI12 #H destruct /2 width=5 by ex3_2_intro/
 qed-.
 
-lemma sex_drops_trans_push: ∀RN,RP,f2,L1,L2. L1 ⪤[RN, RP, f2] L2 →
-                            ∀b,f,I2,K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I2} → 𝐔⦃f⦄ →
+lemma sex_drops_trans_push: ∀RN,RP,f2,L1,L2. L1 ⪤[RN,RP,f2] L2 →
+                            ∀b,f,I2,K2. ⬇*[b,f] L2 ≘ K2.ⓘ{I2} → 𝐔⦃f⦄ →
                             ∀f1. f ~⊚ ⫯f1 ≘ f2 →
-                            ∃∃I1,K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I1} & K1 ⪤[RN, RP, f1] K2 & RP K1 I1 I2.
+                            ∃∃I1,K1. ⬇*[b,f] L1 ≘ K1.ⓘ{I1} & K1 ⪤[RN,RP,f1] K2 & RP K1 I1 I2.
 #RN #RP #f2 #L1 #L2 #HL12 #b #f #I2 #K2 #HLK2 #Hf #f1 #Hf2
 elim (sex_co_dropable_dx … HL12 … HLK2 … Hf … Hf2) -L2 -f2 -Hf
 #X #HLK1 #HX elim (sex_inv_push2 … HX) -HX
@@ -156,10 +156,10 @@ qed-.
 
 lemma drops_sex_trans_next: ∀RN,RP. (∀L. reflexive ? (RN L)) → (∀L. reflexive ? (RP L)) →
                             d_liftable2_sn … liftsb RN → d_liftable2_sn … liftsb RP →
-                            ∀f1,K1,K2. K1 ⪤[RN, RP, f1] K2 →
-                            ∀b,f,I1,L1. ⬇*[b, f] L1.ⓘ{I1} ≘ K1 →
+                            ∀f1,K1,K2. K1 ⪤[RN,RP,f1] K2 →
+                            ∀b,f,I1,L1. ⬇*[b,f] L1.ⓘ{I1} ≘ K1 →
                             ∀f2. f ~⊚ f1 ≘ ↑f2 →
-                            ∃∃I2,L2. ⬇*[b, f] L2.ⓘ{I2} ≘ K2 & L1 ⪤[RN, RP, f2] L2 & RN L1 I1 I2 & L1.ⓘ{I1} ≡[f] L2.ⓘ{I2}.
+                            ∃∃I2,L2. ⬇*[b,f] L2.ⓘ{I2} ≘ K2 & L1 ⪤[RN,RP,f2] L2 & RN L1 I1 I2 & L1.ⓘ{I1} ≡[f] L2.ⓘ{I2}.
 #RN #RP #H1RN #H1RP #H2RN #H2RP #f1 #K1 #K2 #HK12 #b #f #I1 #L1 #HLK1 #f2 #Hf2
 elim (sex_liftable_co_dedropable_sn … H1RN H1RP H2RN H2RP … HLK1 … HK12 … Hf2) -K1 -f1 -H1RN -H1RP -H2RN -H2RP
 #X #HX #HLK2 #H1L12 elim (sex_inv_next1 … HX) -HX
@@ -168,19 +168,19 @@ qed-.
 
 lemma drops_sex_trans_push: ∀RN,RP. (∀L. reflexive ? (RN L)) → (∀L. reflexive ? (RP L)) →
                             d_liftable2_sn … liftsb RN → d_liftable2_sn … liftsb RP →
-                            ∀f1,K1,K2. K1 ⪤[RN, RP, f1] K2 →
-                            ∀b,f,I1,L1. ⬇*[b, f] L1.ⓘ{I1} ≘ K1 →
+                            ∀f1,K1,K2. K1 ⪤[RN,RP,f1] K2 →
+                            ∀b,f,I1,L1. ⬇*[b,f] L1.ⓘ{I1} ≘ K1 →
                             ∀f2. f ~⊚ f1 ≘ ⫯f2 →
-                            ∃∃I2,L2. ⬇*[b, f] L2.ⓘ{I2} ≘ K2 & L1 ⪤[RN, RP, f2] L2 & RP L1 I1 I2 & L1.ⓘ{I1} ≡[f] L2.ⓘ{I2}.
+                            ∃∃I2,L2. ⬇*[b,f] L2.ⓘ{I2} ≘ K2 & L1 ⪤[RN,RP,f2] L2 & RP L1 I1 I2 & L1.ⓘ{I1} ≡[f] L2.ⓘ{I2}.
 #RN #RP #H1RN #H1RP #H2RN #H2RP #f1 #K1 #K2 #HK12 #b #f #I1 #L1 #HLK1 #f2 #Hf2
 elim (sex_liftable_co_dedropable_sn … H1RN H1RP H2RN H2RP … HLK1 … HK12 … Hf2) -K1 -f1 -H1RN -H1RP -H2RN -H2RP
 #X #HX #HLK2 #H1L12 elim (sex_inv_push1 … HX) -HX
 #I2 #L2 #H2L12 #HI12 #H destruct /2 width=6 by ex4_2_intro/
 qed-.
 
-lemma drops_atom2_sex_conf: ∀RN,RP,b,f1,L1. ⬇*[b, f1] L1 ≘ ⋆ → 𝐔⦃f1⦄ →
-                            ∀f,L2. L1 ⪤[RN, RP, f] L2 →
-                            ∀f2. f1 ~⊚ f2 ≘f → ⬇*[b, f1] L2 ≘ ⋆.
+lemma drops_atom2_sex_conf: ∀RN,RP,b,f1,L1. ⬇*[b,f1] L1 ≘ ⋆ → 𝐔⦃f1⦄ →
+                            ∀f,L2. L1 ⪤[RN,RP,f] L2 →
+                            ∀f2. f1 ~⊚ f2 ≘f → ⬇*[b,f1] L2 ≘ ⋆.
 #RN #RP #b #f1 #L1 #H1 #Hf1 #f #L2 #H2 #f2 #H3
 elim (sex_co_dropable_sn … H1 … H2 … H3) // -H1 -H2 -H3 -Hf1
 #L #H #HL2 lapply (sex_inv_atom1 … H) -H //
index 8c43b6404fa841598cc24115fa1b9991c03d2815..4f5eef0173ddbf9403981669c043934cfeea5a30 100644 (file)
@@ -19,7 +19,7 @@ include "static_2/relocation/drops.ma".
 
 definition d_liftable1_all: predicate (relation2 lenv term) ≝
                             λR. ∀K,Ts. all … (R K) Ts →
-                            ∀b,f,L. ⬇*[b, f] L ≘ K →
+                            ∀b,f,L. ⬇*[b,f] L ≘ K →
                             ∀Us. ⬆*[f] Ts ≘ Us → all … (R L) Us.
 
 (* Properties with generic relocation for term vectors **********************)
index dfcb44500df010d17e30c207e238f9db17379b44..8c94cce14a187565c7196643884f6f099c12b3f0 100644 (file)
@@ -21,7 +21,7 @@ include "static_2/relocation/drops.ma".
 (* Forward lemmas with weight for local environments ************************)
 
 (* Basic_2A1: includes: drop_fwd_lw *)
-lemma drops_fwd_lw: ∀b,f,L1,L2. ⬇*[b, f] L1 ≘ L2 → ♯{L2} ≤ ♯{L1}.
+lemma drops_fwd_lw: ∀b,f,L1,L2. ⬇*[b,f] L1 ≘ L2 → ♯{L2} ≤ ♯{L1}.
 #b #f #L1 #L2 #H elim H -f -L1 -L2 //
 [ /2 width=3 by transitive_le/
 | #f #I1 #I2 #L1 #L2 #_ #HI21 #IHL12 normalize
@@ -30,7 +30,7 @@ lemma drops_fwd_lw: ∀b,f,L1,L2. ⬇*[b, f] L1 ≘ L2 → ♯{L2} ≤ ♯{L1}.
 qed-.
 
 (* Basic_2A1: includes: drop_fwd_lw_lt *)
-lemma drops_fwd_lw_lt: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 →
+lemma drops_fwd_lw_lt: ∀f,L1,L2. ⬇*[Ⓣ,f] L1 ≘ L2 →
                        (𝐈⦃f⦄ → ⊥) → ♯{L2} < ♯{L1}.
 #f #L1 #L2 #H elim H -f -L1 -L2
 [ #f #Hf #Hnf elim Hnf -Hnf /2 width=1 by/
@@ -43,14 +43,14 @@ qed-.
 (* Forward lemmas with restricted weight for closures ***********************)
 
 (* Basic_2A1: includes: drop_fwd_rfw *)
-lemma drops_bind2_fwd_rfw: ∀b,f,I,L,K,V. ⬇*[b, f] L ≘ K.ⓑ{I}V → ∀T. ♯{K, V} < ♯{L, T}.
+lemma drops_bind2_fwd_rfw: ∀b,f,I,L,K,V. ⬇*[b,f] L ≘ K.ⓑ{I}V → ∀T. ♯{K,V} < ♯{L,T}.
 #b #f #I #L #K #V #HLK lapply (drops_fwd_lw … HLK) -HLK
 normalize in ⊢ (%→?→?%%); /3 width=3 by le_to_lt_to_lt, monotonic_lt_plus_r/
 qed-.
 
 (* Advanced inversion lemma *************************************************)
 
-lemma drops_inv_x_bind_xy: ∀b,f,I,L. ⬇*[b, f] L ≘ L.ⓘ{I} → ⊥.
+lemma drops_inv_x_bind_xy: ∀b,f,I,L. ⬇*[b,f] L ≘ L.ⓘ{I} → ⊥.
 #b #f #I #L #H lapply (drops_fwd_lw … H) -b -f
 /2 width=4 by lt_le_false/ (**) (* full auto is a bit slow: 19s *)
 qed-.
index 1900d273dd0010bfb8da8ecf6eed4d2c1629542f..76381a9faba10bdac541bd41d8395db1d991d360 100644 (file)
@@ -22,7 +22,7 @@ include "static_2/relocation/sex.ma".
 (* GENERIC EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS **************)
 
 definition lex (R): relation lenv ≝
-                    λL1,L2. ∃∃f. 𝐈⦃f⦄ & L1 ⪤[cfull, cext2 R, f] L2.
+                    λL1,L2. ∃∃f. 𝐈⦃f⦄ & L1 ⪤[cfull,cext2 R,f] L2.
 
 interpretation "generic extension (local environment)"
    'Relation R L1 L2 = (lex R L1 L2).
index 060f3b8057d843e509201ed69a526d62895c6f01..4ec47cc91e47a93787cc259b65cc02b62541d386 100644 (file)
@@ -24,7 +24,7 @@ include "static_2/syntax/term.ma".
 *)
 inductive lifts: rtmap → relation term ≝
 | lifts_sort: ∀f,s. lifts f (⋆s) (⋆s)
-| lifts_lref: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 → lifts f (#i1) (#i2)
+| lifts_lref: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 → lifts f (#i1) (#i2)
 | lifts_gref: ∀f,l. lifts f (§l) (§l)
 | lifts_bind: ∀f,p,I,V1,V2,T1,T2.
               lifts f V1 V2 → lifts (⫯f) T1 T2 →
@@ -56,6 +56,10 @@ definition deliftable2_bi: predicate (relation term) ≝
                            λR. ∀U1,U2. R U1 U2 → ∀f,T1. ⬆*[f] T1 ≘ U1 →
                            ∀T2. ⬆*[f] T2 ≘ U2 → R T1 T2.
 
+definition liftable2_dx: predicate (relation term) ≝
+                         λR. ∀T1,T2. R T1 T2 → ∀f,U2. ⬆*[f] T2 ≘ U2 →
+                         ∃∃U1. ⬆*[f] T1 ≘ U1 & R U1 U2.
+
 definition deliftable2_dx: predicate (relation term) ≝
                            λR. ∀U1,U2. R U1 U2 → ∀f,T2. ⬆*[f] T2 ≘ U2 →
                            ∃∃T1. ⬆*[f] T1 ≘ U1 & R T1 T2.
@@ -76,7 +80,7 @@ lemma lifts_inv_sort1: ∀f,Y,s. ⬆*[f] ⋆s ≘ Y → Y = ⋆s.
 /2 width=4 by lifts_inv_sort1_aux/ qed-.
 
 fact lifts_inv_lref1_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → ∀i1. X = #i1 →
-                          ∃∃i2. @⦃i1, f⦄ ≘ i2 & Y = #i2.
+                          ∃∃i2. @⦃i1,f⦄ ≘ i2 & Y = #i2.
 #f #X #Y * -f -X -Y
 [ #f #s #x #H destruct
 | #f #i1 #i2 #Hi12 #x #H destruct /2 width=3 by ex2_intro/
@@ -89,7 +93,7 @@ qed-.
 (* Basic_1: was: lift1_lref *)
 (* Basic_2A1: includes: lift_inv_lref1 lift_inv_lref1_lt lift_inv_lref1_ge *)
 lemma lifts_inv_lref1: ∀f,Y,i1. ⬆*[f] #i1 ≘ Y →
-                       ∃∃i2. @⦃i1, f⦄ ≘ i2 & Y = #i2.
+                       ∃∃i2. @⦃i1,f⦄ ≘ i2 & Y = #i2.
 /2 width=3 by lifts_inv_lref1_aux/ qed-.
 
 fact lifts_inv_gref1_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → ∀l. X = §l → Y = §l.
@@ -158,7 +162,7 @@ lemma lifts_inv_sort2: ∀f,X,s. ⬆*[f] X ≘ ⋆s → X = ⋆s.
 /2 width=4 by lifts_inv_sort2_aux/ qed-.
 
 fact lifts_inv_lref2_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → ∀i2. Y = #i2 →
-                          ∃∃i1. @⦃i1, f⦄ ≘ i2 & X = #i1.
+                          ∃∃i1. @⦃i1,f⦄ ≘ i2 & X = #i1.
 #f #X #Y * -f -X -Y
 [ #f #s #x #H destruct
 | #f #i1 #i2 #Hi12 #x #H destruct /2 width=3 by ex2_intro/
@@ -171,7 +175,7 @@ qed-.
 (* Basic_1: includes: lift_gen_lref lift_gen_lref_lt lift_gen_lref_false lift_gen_lref_ge *)
 (* Basic_2A1: includes: lift_inv_lref2 lift_inv_lref2_lt lift_inv_lref2_be lift_inv_lref2_ge lift_inv_lref2_plus *)
 lemma lifts_inv_lref2: ∀f,X,i2. ⬆*[f] X ≘ #i2 →
-                       ∃∃i1. @⦃i1, f⦄ ≘ i2 & X = #i1.
+                       ∃∃i1. @⦃i1,f⦄ ≘ i2 & X = #i1.
 /2 width=3 by lifts_inv_lref2_aux/ qed-.
 
 fact lifts_inv_gref2_aux: ∀f,X,Y. ⬆*[f] X ≘ Y → ∀l. Y = §l → X = §l.
@@ -230,7 +234,7 @@ lemma lifts_inv_flat2: ∀f:rtmap. ∀I,V2,T2,X. ⬆*[f] X ≘ ⓕ{I}V2.T2 →
 
 lemma lifts_inv_atom1: ∀f,I,Y. ⬆*[f] ⓪{I} ≘ Y →
                        ∨∨ ∃∃s. I = Sort s & Y = ⋆s
-                        | ∃∃i,j. @⦃i, f⦄ ≘ j & I = LRef i & Y = #j
+                        | ∃∃i,j. @⦃i,f⦄ ≘ j & I = LRef i & Y = #j
                         | ∃∃l. I = GRef l & Y = §l.
 #f * #n #Y #H
 [ lapply (lifts_inv_sort1 … H)
@@ -241,7 +245,7 @@ qed-.
 
 lemma lifts_inv_atom2: ∀f,I,X. ⬆*[f] X ≘ ⓪{I} →
                        ∨∨ ∃∃s. X = ⋆s & I = Sort s
-                        | ∃∃i,j. @⦃i, f⦄ ≘ j & X = #i & I = LRef j
+                        | ∃∃i,j. @⦃i,f⦄ ≘ j & X = #i & I = LRef j
                         | ∃∃l. X = §l & I = GRef l.
 #f * #n #X #H
 [ lapply (lifts_inv_sort2 … H)
@@ -333,6 +337,11 @@ qed-.
 
 (* Basic properties *********************************************************)
 
+lemma liftable2_sn_dx (R): symmetric … R → liftable2_sn R → liftable2_dx R.
+#R #H2R #H1R #T1 #T2 #HT12 #f #U2 #HTU2
+elim (H1R … T1 … HTU2) -H1R /3 width=3 by ex2_intro/
+qed-.
+
 lemma deliftable2_sn_dx (R): symmetric … R → deliftable2_sn R → deliftable2_dx R.
 #R #H2R #H1R #U1 #U2 #HU12 #f #T2 #HTU2
 elim (H1R … U1 … HTU2) -H1R /3 width=3 by ex2_intro/
@@ -365,7 +374,7 @@ elim (IHV1 f) -IHV1 #V2 #HV12
 ]
 qed-.
 
-lemma lifts_push_zero (f): ⬆*[⫯f]#O ≘ #0.
+lemma lifts_push_zero (f): ⬆*[⫯f]#0 ≘ #0.
 /2 width=1 by lifts_lref/ qed.
 
 lemma lifts_push_lref (f) (i1) (i2): ⬆*[f]#i1 ≘ #i2 → ⬆*[⫯f]#(↑i1) ≘ #(↑i2).
diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_basic.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_basic.ma
new file mode 100644 (file)
index 0000000..6d2ca03
--- /dev/null
@@ -0,0 +1,36 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "ground_2/relocation/rtmap_basic_after.ma".
+include "static_2/notation/relations/rlift_4.ma".
+include "static_2/relocation/lifts.ma".
+
+(* GENERIC RELOCATION FOR TERMS *********************************************)
+
+interpretation "basic relocation (term)"
+   'RLift m n T1 T2 = (lifts (basic m n) T1 T2).
+
+(* Properties with basic relocation *****************************************)
+
+lemma lifts_lref_lt (m,n,i): i < m → ⬆[m,n] #i ≘ #i.
+/3 width=1 by lifts_lref, at_basic_lt/ qed.
+
+lemma lifts_lref_ge (m,n,i): m ≤ i → ⬆[m,n] #i ≘ #(n+i).
+/3 width=1 by lifts_lref, at_basic_ge/ qed.
+
+lemma lifts_lref_ge_minus (m,n,i): n+m ≤ i → ⬆[m,n] #(i-n) ≘ #i.
+#m #n #i #Hi
+>(plus_minus_m_m i n) in ⊢ (???%);
+/3 width=2 by lifts_lref_ge, le_plus_to_minus_l, le_plus_b/
+qed.
index 12affa3a16a3af71a20070431cb5b934cf22cabc..c76781d117fcfb7ecf7a04f265aea2eef98c4a69 100644 (file)
@@ -17,12 +17,12 @@ include "static_2/relocation/lifts_lifts.ma".
 
 (* GENERIC RELOCATION FOR TERMS *********************************************)
 
-(* Properties with degree-based equivalence for terms ***********************)
+(* Properties with sort-irrelevant equivalence for terms ********************)
 
-lemma tdeq_lifts_sn: ∀h,o. liftable2_sn (tdeq h o).
-#h #o #T1 #T2 #H elim H -T1 -T2 [||| * ]
-[ #s1 #s2 #d #Hs1 #Hs2 #f #X #H >(lifts_inv_sort1 … H) -H
-  /3 width=5 by lifts_sort, tdeq_sort, ex2_intro/
+lemma tdeq_lifts_sn: liftable2_sn tdeq.
+#T1 #T2 #H elim H -T1 -T2 [||| * ]
+[ #s1 #s2 #f #X #H >(lifts_inv_sort1 … H) -H
+  /3 width=3 by lifts_sort, tdeq_sort, ex2_intro/
 | #i #f #X #H elim (lifts_inv_lref1 … H) -H
   /3 width=3 by lifts_lref, tdeq_lref, ex2_intro/
 | #l #f #X #H >(lifts_inv_gref1 … H) -H
@@ -38,15 +38,18 @@ lemma tdeq_lifts_sn: ∀h,o. liftable2_sn (tdeq h o).
 ]
 qed-.
 
-lemma tdeq_lifts_bi: ∀h,o. liftable2_bi (tdeq h o).
+lemma tdeq_lifts_dx: liftable2_dx tdeq.
+/3 width=3 by tdeq_lifts_sn, liftable2_sn_dx, tdeq_sym/ qed-.
+
+lemma tdeq_lifts_bi: liftable2_bi tdeq.
 /3 width=6 by tdeq_lifts_sn, liftable2_sn_bi/ qed-.
 
-(* Inversion lemmas with degree-based equivalence for terms *****************)
+(* Inversion lemmas with sort-irrelevant equivalence for terms **************)
 
-lemma tdeq_inv_lifts_sn: ∀h,o. deliftable2_sn (tdeq h o).
-#h #o #U1 #U2 #H elim H -U1 -U2 [||| * ]
-[ #s1 #s2 #d #Hs1 #Hs2 #f #X #H >(lifts_inv_sort2 … H) -H
-  /3 width=5 by lifts_sort, tdeq_sort, ex2_intro/
+lemma tdeq_inv_lifts_sn: deliftable2_sn tdeq.
+#U1 #U2 #H elim H -U1 -U2 [||| * ]
+[ #s1 #s2 #f #X #H >(lifts_inv_sort2 … H) -H
+  /3 width=3 by lifts_sort, tdeq_sort, ex2_intro/
 | #i #f #X #H elim (lifts_inv_lref2 … H) -H
   /3 width=3 by lifts_lref, tdeq_lref, ex2_intro/
 | #l #f #X #H >(lifts_inv_gref2 … H) -H
@@ -62,15 +65,15 @@ lemma tdeq_inv_lifts_sn: ∀h,o. deliftable2_sn (tdeq h o).
 ]
 qed-.
 
-lemma tdeq_inv_lifts_dx (h) (o): deliftable2_dx (tdeq h o).
+lemma tdeq_inv_lifts_dx: deliftable2_dx tdeq.
 /3 width=3 by tdeq_inv_lifts_sn, deliftable2_sn_dx, tdeq_sym/ qed-.
 
-lemma tdeq_inv_lifts_bi: ∀h,o. deliftable2_bi (tdeq h o).
+lemma tdeq_inv_lifts_bi: deliftable2_bi tdeq.
 /3 width=6 by tdeq_inv_lifts_sn, deliftable2_sn_bi/ qed-.
 
-lemma tdeq_lifts_inv_pair_sn (h) (o) (I) (f:rtmap):
-                             ∀X,T. ⬆*[f]X ≘ T → ∀V. ②{I}V.T ≛[h,o] X → ⊥.
-#h #o #I #f #X #T #H elim H -f -X -T
+lemma tdeq_lifts_inv_pair_sn (I) (f:rtmap):
+                             ∀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 (tdeq_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct
 | #f #i #j #_ #V #H
diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_toeq.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_toeq.ma
new file mode 100644 (file)
index 0000000..ffbddcb
--- /dev/null
@@ -0,0 +1,76 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/toeq.ma".
+include "static_2/relocation/lifts_lifts.ma".
+
+(* GENERIC RELOCATION FOR TERMS *********************************************)
+
+(* Properties with sort-irrelevant outer equivalence for terms **************)
+
+lemma toeq_lifts_sn: liftable2_sn toeq.
+#T1 #T2 #H elim H -T1 -T2 [||| * ]
+[ #s1 #s2 #f #X #H 
+  >(lifts_inv_sort1 … H) -H
+  /2 width=3 by toeq_sort, ex2_intro/
+| #i #f #X #H
+  elim (lifts_inv_lref1 … H) -H #j #Hj #H destruct
+  /3 width=3 by toeq_lref, lifts_lref, ex2_intro/
+| #l #f #X #H
+  >(lifts_inv_gref1 … H) -H
+  /2 width=3 by toeq_gref, ex2_intro/
+| #p #I #V1 #V2 #T1 #T2 #f #X #H
+  elim (lifts_inv_bind1 … H) -H #W1 #U1 #_ #_ #H destruct -V1 -T1
+  elim (lifts_total V2 f) #W2 #HVW2
+  elim (lifts_total T2 (⫯f)) #U2 #HTU2
+  /3 width=3 by toeq_pair, lifts_bind, ex2_intro/
+| #I #V1 #V2 #T1 #T2 #f #X #H
+  elim (lifts_inv_flat1 … H) -H #W1 #U1 #_ #_ #H destruct -V1 -T1
+  elim (lifts_total V2 f) #W2 #HVW2
+  elim (lifts_total T2 f) #U2 #HTU2
+  /3 width=3 by toeq_pair, lifts_flat, ex2_intro/
+]
+qed-.
+
+lemma toeq_lifts_dx: liftable2_dx toeq.
+/3 width=3 by toeq_lifts_sn, liftable2_sn_dx, toeq_sym/ qed-.
+
+lemma toeq_lifts_bi: liftable2_bi toeq.
+/3 width=6 by toeq_lifts_sn, liftable2_sn_bi/ qed-.
+
+(* Inversion lemmas with sort-irrelevant outer equivalence for terms ********)
+
+lemma toeq_inv_lifts_bi: deliftable2_bi toeq.
+#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 toeq_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 toeq_lref/
+| #l #f #X1 #H1 #X2 #H2
+  >(lifts_inv_gref2 … H1) -H1 >(lifts_inv_gref2 … H2) -H2
+  /1 width=1 by toeq_gref/
+| #p #I #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 toeq_pair/
+| #I #W1 #W2 #U1 #U2 #f #X1 #H1 #X2 #H2
+  elim (lifts_inv_flat2 … H1) -H1 #V1 #T1 #_ #_ #H destruct -W1 -U1
+  elim (lifts_inv_flat2 … H2) -H2 #V2 #T2 #_ #_ #H destruct -W2 -U2
+  /1 width=1 by toeq_pair/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_tweq.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/lifts_tweq.ma
new file mode 100644 (file)
index 0000000..addd91c
--- /dev/null
@@ -0,0 +1,105 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/tweq.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.
+#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/
+| #i #f #X #H elim (lifts_inv_lref1 … H) -H
+  /3 width=3 by lifts_lref, tweq_lref, ex2_intro/
+| #l #f #X #H >(lifts_inv_gref1 … H) -H
+  /2 width=3 by lifts_gref, tweq_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
+  elim (true_or_false p) #H destruct
+  [ 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/
+| #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
+  elim (lifts_total T2 (⫯f)) #U2 #HTU2
+  /3 width=3 by lifts_bind, ex2_intro/
+| #V1 #V2 #T1 #T2 #_ #IHT #f #X #H
+  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/
+| #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/
+]
+qed-.
+
+lemma tweq_lifts_dx: liftable2_dx tweq.
+/3 width=3 by tweq_lifts_sn, liftable2_sn_dx, tweq_sym/ qed-.
+
+lemma tweq_lifts_bi: liftable2_bi tweq.
+/3 width=6 by tweq_lifts_sn, liftable2_sn_bi/ qed-.
+
+(* Inversion lemmas with sort-irrelevant whd equivalence for terms **********)
+
+lemma tweq_inv_lifts_bi: deliftable2_bi tweq.
+#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/
+| #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/
+| #l #f #X1 #H1 #X2 #H2
+  >(lifts_inv_gref2 … H1) -H1 >(lifts_inv_gref2 … H2) -H2
+  /1 width=1 by tweq_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/
+  ]
+| #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/
+| #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/
+| #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/
+]
+qed-.
+
+lemma tweq_inv_abbr_pos_x_lifts_y_y (T) (f:rtmap):
+      ∀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 (lifts_inv_bind1 … H2) -H2 #Y1 #Y2 #_ #HXY2 #H destruct
+/2 width=7 by/
+qed-.
index df09463c8085877bc9bdd7fc0c7ae95dcc99a1d9..6247b8686c3b92c04ea24ab3b1a33ed24bbc3ca3 100644 (file)
@@ -38,7 +38,7 @@ definition R_pw_confluent2_sex: relation3 lenv bind bind → relation3 lenv bind
                                 relation3 rtmap lenv bind ≝
                                 λR1,R2,RN1,RP1,RN2,RP2,f,L0,I0.
                                 ∀I1. R1 L0 I0 I1 → ∀I2. R2 L0 I0 I2 →
-                                ∀L1. L0 ⪤[RN1, RP1, f] L1 → ∀L2. L0 ⪤[RN2, RP2, f] L2 →
+                                ∀L1. L0 ⪤[RN1,RP1,f] L1 → ∀L2. L0 ⪤[RN2,RP2,f] L2 →
                                 ∃∃I. R2 L1 I1 I & R1 L2 I2 I.
 
 definition sex_transitive: relation3 lenv bind bind → relation3 lenv bind bind →
@@ -46,22 +46,22 @@ definition sex_transitive: relation3 lenv bind bind → relation3 lenv bind bind
                            relation3 lenv bind bind → relation3 lenv bind bind →
                            relation3 rtmap lenv bind ≝
                            λR1,R2,R3,RN,RP,f,L1,I1.
-                           ∀I. R1 L1 I1 I → ∀L2. L1 ⪤[RN, RP, f] L2 →
+                           ∀I. R1 L1 I1 I → ∀L2. L1 ⪤[RN,RP,f] L2 →
                            ∀I2. R2 L2 I I2 → R3 L1 I1 I2.
 
 (* Basic inversion lemmas ***************************************************)
 
-fact sex_inv_atom1_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → X = ⋆ → Y = ⋆.
+fact sex_inv_atom1_aux: ∀RN,RP,f,X,Y. X ⪤[RN,RP,f] Y → X = ⋆ → Y = ⋆.
 #RN #RP #f #X #Y * -f -X -Y //
 #f #I1 #I2 #L1 #L2 #_ #_ #H destruct
 qed-.
 
 (* Basic_2A1: includes lpx_sn_inv_atom1 *)
-lemma sex_inv_atom1: ∀RN,RP,f,Y. ⋆ ⪤[RN, RP, f] Y → Y = ⋆.
+lemma sex_inv_atom1: ∀RN,RP,f,Y. ⋆ ⪤[RN,RP,f] Y → Y = ⋆.
 /2 width=6 by sex_inv_atom1_aux/ qed-.
 
-fact sex_inv_next1_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → ∀g,J1,K1. X = K1.ⓘ{J1} → f = ↑g →
-                        ∃∃J2,K2. K1 ⪤[RN, RP, g] K2 & RN K1 J1 J2 & Y = K2.ⓘ{J2}.
+fact sex_inv_next1_aux: ∀RN,RP,f,X,Y. X ⪤[RN,RP,f] Y → ∀g,J1,K1. X = K1.ⓘ{J1} → f = ↑g →
+                        ∃∃J2,K2. K1 ⪤[RN,RP,g] K2 & RN K1 J1 J2 & Y = K2.ⓘ{J2}.
 #RN #RP #f #X #Y * -f -X -Y
 [ #f #g #J1 #K1 #H destruct
 | #f #I1 #I2 #L1 #L2 #HL #HI #g #J1 #K1 #H1 #H2 <(injective_next … H2) -g destruct
@@ -71,12 +71,12 @@ fact sex_inv_next1_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → ∀g,J1,K1. X = K
 qed-.
 
 (* Basic_2A1: includes lpx_sn_inv_pair1 *)
-lemma sex_inv_next1: ∀RN,RP,g,J1,K1,Y. K1.ⓘ{J1} ⪤[RN, RP, ↑g] Y →
-                     ∃∃J2,K2. K1 ⪤[RN, RP, g] K2 & RN K1 J1 J2 & Y = K2.ⓘ{J2}.
+lemma sex_inv_next1: ∀RN,RP,g,J1,K1,Y. K1.ⓘ{J1} ⪤[RN,RP,↑g] Y →
+                     ∃∃J2,K2. K1 ⪤[RN,RP,g] K2 & RN K1 J1 J2 & Y = K2.ⓘ{J2}.
 /2 width=7 by sex_inv_next1_aux/ qed-.
 
-fact sex_inv_push1_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → ∀g,J1,K1. X = K1.ⓘ{J1} → f = ⫯g →
-                        ∃∃J2,K2. K1 ⪤[RN, RP, g] K2 & RP K1 J1 J2 & Y = K2.ⓘ{J2}.
+fact sex_inv_push1_aux: ∀RN,RP,f,X,Y. X ⪤[RN,RP,f] Y → ∀g,J1,K1. X = K1.ⓘ{J1} → f = ⫯g →
+                        ∃∃J2,K2. K1 ⪤[RN,RP,g] K2 & RP K1 J1 J2 & Y = K2.ⓘ{J2}.
 #RN #RP #f #X #Y * -f -X -Y
 [ #f #g #J1 #K1 #H destruct
 | #f #I1 #I2 #L1 #L2 #_ #_ #g #J1 #K1 #_ #H elim (discr_next_push … H)
@@ -85,21 +85,21 @@ fact sex_inv_push1_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → ∀g,J1,K1. X = K
 ]
 qed-.
 
-lemma sex_inv_push1: ∀RN,RP,g,J1,K1,Y. K1.ⓘ{J1} ⪤[RN, RP, ⫯g] Y →
-                     ∃∃J2,K2. K1 ⪤[RN, RP, g] K2 & RP K1 J1 J2 & Y = K2.ⓘ{J2}.
+lemma sex_inv_push1: ∀RN,RP,g,J1,K1,Y. K1.ⓘ{J1} ⪤[RN,RP,⫯g] Y →
+                     ∃∃J2,K2. K1 ⪤[RN,RP,g] K2 & RP K1 J1 J2 & Y = K2.ⓘ{J2}.
 /2 width=7 by sex_inv_push1_aux/ qed-.
 
-fact sex_inv_atom2_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → Y = ⋆ → X = ⋆.
+fact sex_inv_atom2_aux: ∀RN,RP,f,X,Y. X ⪤[RN,RP,f] Y → Y = ⋆ → X = ⋆.
 #RN #RP #f #X #Y * -f -X -Y //
 #f #I1 #I2 #L1 #L2 #_ #_ #H destruct
 qed-.
 
 (* Basic_2A1: includes lpx_sn_inv_atom2 *)
-lemma sex_inv_atom2: ∀RN,RP,f,X. X ⪤[RN, RP, f] ⋆ → X = ⋆.
+lemma sex_inv_atom2: ∀RN,RP,f,X. X ⪤[RN,RP,f] ⋆ → X = ⋆.
 /2 width=6 by sex_inv_atom2_aux/ qed-.
 
-fact sex_inv_next2_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → ∀g,J2,K2. Y = K2.ⓘ{J2} → f = ↑g →
-                        ∃∃J1,K1. K1 ⪤[RN, RP, g] K2 & RN K1 J1 J2 & X = K1.ⓘ{J1}.
+fact sex_inv_next2_aux: ∀RN,RP,f,X,Y. X ⪤[RN,RP,f] Y → ∀g,J2,K2. Y = K2.ⓘ{J2} → f = ↑g →
+                        ∃∃J1,K1. K1 ⪤[RN,RP,g] K2 & RN K1 J1 J2 & X = K1.ⓘ{J1}.
 #RN #RP #f #X #Y * -f -X -Y
 [ #f #g #J2 #K2 #H destruct
 | #f #I1 #I2 #L1 #L2 #HL #HI #g #J2 #K2 #H1 #H2 <(injective_next … H2) -g destruct
@@ -109,12 +109,12 @@ fact sex_inv_next2_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → ∀g,J2,K2. Y = K
 qed-.
 
 (* Basic_2A1: includes lpx_sn_inv_pair2 *)
-lemma sex_inv_next2: ∀RN,RP,g,J2,X,K2. X ⪤[RN, RP, ↑g] K2.ⓘ{J2} →
-                     ∃∃J1,K1. K1 ⪤[RN, RP, g] K2 & RN K1 J1 J2 & X = K1.ⓘ{J1}.
+lemma sex_inv_next2: ∀RN,RP,g,J2,X,K2. X ⪤[RN,RP,↑g] K2.ⓘ{J2} →
+                     ∃∃J1,K1. K1 ⪤[RN,RP,g] K2 & RN K1 J1 J2 & X = K1.ⓘ{J1}.
 /2 width=7 by sex_inv_next2_aux/ qed-.
 
-fact sex_inv_push2_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → ∀g,J2,K2. Y = K2.ⓘ{J2} → f = ⫯g →
-                        ∃∃J1,K1. K1 ⪤[RN, RP, g] K2 & RP K1 J1 J2 & X = K1.ⓘ{J1}.
+fact sex_inv_push2_aux: ∀RN,RP,f,X,Y. X ⪤[RN,RP,f] Y → ∀g,J2,K2. Y = K2.ⓘ{J2} → f = ⫯g →
+                        ∃∃J1,K1. K1 ⪤[RN,RP,g] K2 & RP K1 J1 J2 & X = K1.ⓘ{J1}.
 #RN #RP #f #X #Y * -f -X -Y
 [ #f #J2 #K2 #g #H destruct
 | #f #I1 #I2 #L1 #L2 #_ #_ #g #J2 #K2 #_ #H elim (discr_next_push … H)
@@ -123,28 +123,28 @@ fact sex_inv_push2_aux: ∀RN,RP,f,X,Y. X ⪤[RN, RP, f] Y → ∀g,J2,K2. Y = K
 ]
 qed-.
 
-lemma sex_inv_push2: ∀RN,RP,g,J2,X,K2. X ⪤[RN, RP, ⫯g] K2.ⓘ{J2} →
-                     ∃∃J1,K1. K1 ⪤[RN, RP, g] K2 & RP K1 J1 J2 & X = K1.ⓘ{J1}.
+lemma sex_inv_push2: ∀RN,RP,g,J2,X,K2. X ⪤[RN,RP,⫯g] K2.ⓘ{J2} →
+                     ∃∃J1,K1. K1 ⪤[RN,RP,g] K2 & RP K1 J1 J2 & X = K1.ⓘ{J1}.
 /2 width=7 by sex_inv_push2_aux/ qed-.
 
 (* Basic_2A1: includes lpx_sn_inv_pair *)
 lemma sex_inv_next: ∀RN,RP,f,I1,I2,L1,L2.
-                    L1.ⓘ{I1} ⪤[RN, RP, ↑f] L2.ⓘ{I2} →
-                    L1 ⪤[RN, RP, f] L2 ∧ RN L1 I1 I2.
+                    L1.ⓘ{I1} ⪤[RN,RP,↑f] L2.ⓘ{I2} →
+                    L1 ⪤[RN,RP,f] L2 ∧ RN L1 I1 I2.
 #RN #RP #f #I1 #I2 #L1 #L2 #H elim (sex_inv_next1 … H) -H
 #I0 #L0 #HL10 #HI10 #H destruct /2 width=1 by conj/
 qed-.
 
 lemma sex_inv_push: ∀RN,RP,f,I1,I2,L1,L2.
-                    L1.ⓘ{I1} ⪤[RN, RP, ⫯f] L2.ⓘ{I2} →
-                    L1 ⪤[RN, RP, f] L2 ∧ RP L1 I1 I2.
+                    L1.ⓘ{I1} ⪤[RN,RP,⫯f] L2.ⓘ{I2} →
+                    L1 ⪤[RN,RP,f] L2 ∧ RP L1 I1 I2.
 #RN #RP #f #I1 #I2 #L1 #L2 #H elim (sex_inv_push1 … H) -H
 #I0 #L0 #HL10 #HI10 #H destruct /2 width=1 by conj/
 qed-.
 
-lemma sex_inv_tl: ∀RN,RP,f,I1,I2,L1,L2. L1 ⪤[RN, RP, ⫱f] L2 →
+lemma sex_inv_tl: ∀RN,RP,f,I1,I2,L1,L2. L1 ⪤[RN,RP,⫱f] L2 →
                   RN L1 I1 I2 → RP L1 I1 I2 → 
-                  L1.ⓘ{I1} ⪤[RN, RP, f] L2.ⓘ{I2}.
+                  L1.ⓘ{I1} ⪤[RN,RP,f] L2.ⓘ{I2}.
 #RN #RP #f #I1 #I2 #L2 #L2 elim (pn_split f) *
 /2 width=1 by sex_next, sex_push/
 qed-.
@@ -152,8 +152,8 @@ qed-.
 (* Basic forward lemmas *****************************************************)
 
 lemma sex_fwd_bind: ∀RN,RP,f,I1,I2,L1,L2. 
-                    L1.ⓘ{I1} ⪤[RN, RP, f] L2.ⓘ{I2} →
-                    L1 ⪤[RN, RP, ⫱f] L2.
+                    L1.ⓘ{I1} ⪤[RN,RP,f] L2.ⓘ{I2} →
+                    L1 ⪤[RN,RP,⫱f] L2.
 #RN #RP #f #I1 #I2 #L1 #L2 #Hf
 elim (pn_split f) * #g #H destruct
 [ elim (sex_inv_push … Hf) | elim (sex_inv_next … Hf) ] -Hf //
@@ -161,7 +161,7 @@ qed-.
 
 (* Basic properties *********************************************************)
 
-lemma sex_eq_repl_back: ∀RN,RP,L1,L2. eq_repl_back … (λf. L1 ⪤[RN, RP, f] L2).
+lemma sex_eq_repl_back: ∀RN,RP,L1,L2. eq_repl_back … (λf. L1 ⪤[RN,RP,f] L2).
 #RN #RP #L1 #L2 #f1 #H elim H -f1 -L1 -L2 //
 #f1 #I1 #I2 #L1 #L2 #_ #HI #IH #f2 #H
 [ elim (eq_inv_nx … H) -H /3 width=3 by sex_next/
@@ -169,7 +169,7 @@ lemma sex_eq_repl_back: ∀RN,RP,L1,L2. eq_repl_back … (λf. L1 ⪤[RN, RP, f]
 ]
 qed-.
 
-lemma sex_eq_repl_fwd: ∀RN,RP,L1,L2. eq_repl_fwd … (λf. L1 ⪤[RN, RP, f] L2).
+lemma sex_eq_repl_fwd: ∀RN,RP,L1,L2. eq_repl_fwd … (λf. L1 ⪤[RN,RP,f] L2).
 #RN #RP #L1 #L2 @eq_repl_sym /2 width=3 by sex_eq_repl_back/ (**) (* full auto fails *)
 qed-.
 
@@ -189,20 +189,20 @@ lemma sex_sym: ∀RN,RP.
 qed-.
 
 lemma sex_pair_repl: ∀RN,RP,f,I1,I2,L1,L2.
-                     L1.ⓘ{I1} ⪤[RN, RP, f] L2.ⓘ{I2} →
+                     L1.ⓘ{I1} ⪤[RN,RP,f] L2.ⓘ{I2} →
                      ∀J1,J2. RN L1 J1 J2 → RP L1 J1 J2 →
-                     L1.ⓘ{J1} ⪤[RN, RP, f] L2.ⓘ{J2}.
+                     L1.ⓘ{J1} ⪤[RN,RP,f] L2.ⓘ{J2}.
 /3 width=3 by sex_inv_tl, sex_fwd_bind/ qed-.
 
 lemma sex_co: ∀RN1,RP1,RN2,RP2. RN1 ⊆ RN2 → RP1 ⊆ RP2 →
-              ∀f,L1,L2. L1 ⪤[RN1, RP1, f] L2 → L1 ⪤[RN2, RP2, f] L2.
+              ∀f,L1,L2. L1 ⪤[RN1,RP1,f] L2 → L1 ⪤[RN2,RP2,f] L2.
 #RN1 #RP1 #RN2 #RP2 #HRN #HRP #f #L1 #L2 #H elim H -f -L1 -L2
 /3 width=1 by sex_atom, sex_next, sex_push/
 qed-.
 
 lemma sex_co_isid: ∀RN1,RP1,RN2,RP2. RP1 ⊆ RP2 →
-                   ∀f,L1,L2. L1 ⪤[RN1, RP1, f] L2 → 𝐈⦃f⦄ →
-                   L1 ⪤[RN2, RP2, f] L2.
+                   ∀f,L1,L2. L1 ⪤[RN1,RP1,f] L2 → 𝐈⦃f⦄ →
+                   L1 ⪤[RN2,RP2,f] L2.
 #RN1 #RP1 #RN2 #RP2 #HR #f #L1 #L2 #H elim H -f -L1 -L2 //
 #f #I1 #I2 #K1 #K2 #_ #HI12 #IH #H
 [ elim (isid_inv_next … H) -H //
@@ -211,8 +211,8 @@ lemma sex_co_isid: ∀RN1,RP1,RN2,RP2. RP1 ⊆ RP2 →
 qed-.
 
 lemma sex_sdj: ∀RN,RP. RP ⊆ RN →
-               ∀f1,L1,L2. L1 ⪤[RN, RP, f1] L2 →
-               ∀f2. f1 ∥ f2 → L1 ⪤[RP, RN, f2] L2.
+               ∀f1,L1,L2. L1 ⪤[RN,RP,f1] L2 →
+               ∀f2. f1 ∥ f2 → L1 ⪤[RP,RN,f2] L2.
 #RN #RP #HR #f1 #L1 #L2 #H elim H -f1 -L1 -L2 //
 #f1 #I1 #I2 #L1 #L2 #_ #HI12 #IH #f2 #H12
 [ elim (sdj_inv_nx … H12) -H12 [2,3: // ]
@@ -223,8 +223,8 @@ lemma sex_sdj: ∀RN,RP. RP ⊆ RN →
 qed-.
 
 lemma sle_sex_trans: ∀RN,RP. RN ⊆ RP →
-                     ∀f2,L1,L2. L1 ⪤[RN, RP, f2] L2 →
-                     ∀f1. f1 ⊆ f2 → L1 ⪤[RN, RP, f1] L2.
+                     ∀f2,L1,L2. L1 ⪤[RN,RP,f2] L2 →
+                     ∀f1. f1 ⊆ f2 → L1 ⪤[RN,RP,f1] L2.
 #RN #RP #HR #f2 #L1 #L2 #H elim H -f2 -L1 -L2 //
 #f2 #I1 #I2 #L1 #L2 #_ #HI12 #IH #f1 #H12
 [ elim (pn_split f1) * ]
@@ -236,8 +236,8 @@ lemma sle_sex_trans: ∀RN,RP. RN ⊆ RP →
 qed-.
 
 lemma sle_sex_conf: ∀RN,RP. RP ⊆ RN →
-                    ∀f1,L1,L2. L1 ⪤[RN, RP, f1] L2 →
-                    ∀f2. f1 ⊆ f2 → L1 ⪤[RN, RP, f2] L2.
+                    ∀f1,L1,L2. L1 ⪤[RN,RP,f1] L2 →
+                    ∀f2. f1 ⊆ f2 → L1 ⪤[RN,RP,f2] L2.
 #RN #RP #HR #f1 #L1 #L2 #H elim H -f1 -L1 -L2 //
 #f1 #I1 #I2 #L1 #L2 #_ #HI12 #IH #f2 #H12
 [2: elim (pn_split f2) * ]
@@ -249,8 +249,8 @@ lemma sle_sex_conf: ∀RN,RP. RP ⊆ RN →
 qed-.
 
 lemma sex_sle_split: ∀R1,R2,RP. c_reflexive … R1 → c_reflexive … R2 →
-                     ∀f,L1,L2. L1 ⪤[R1, RP, f] L2 → ∀g. f ⊆ g →
-                     ∃∃L. L1 ⪤[R1, RP, g] L & L ⪤[R2, cfull, f] L2.
+                     ∀f,L1,L2. L1 ⪤[R1,RP,f] L2 → ∀g. f ⊆ g →
+                     ∃∃L. L1 ⪤[R1,RP,g] L & L ⪤[R2,cfull,f] L2.
 #R1 #R2 #RP #HR1 #HR2 #f #L1 #L2 #H elim H -f -L1 -L2
 [ /2 width=3 by sex_atom, ex2_intro/ ]
 #f #I1 #I2 #L1 #L2 #_ #HI12 #IH #y #H
@@ -262,8 +262,8 @@ lemma sex_sle_split: ∀R1,R2,RP. c_reflexive … R1 → c_reflexive … R2 →
 qed-.
 
 lemma sex_sdj_split: ∀R1,R2,RP. c_reflexive … R1 → c_reflexive … R2 →
-                     ∀f,L1,L2. L1 ⪤[R1, RP, f] L2 → ∀g. f ∥ g →
-                     ∃∃L. L1 ⪤[RP, R1, g] L & L ⪤[R2, cfull, f] L2.
+                     ∀f,L1,L2. L1 ⪤[R1,RP,f] L2 → ∀g. f ∥ g →
+                     ∃∃L. L1 ⪤[RP,R1,g] L & L ⪤[R2,cfull,f] L2.
 #R1 #R2 #RP #HR1 #HR2 #f #L1 #L2 #H elim H -f -L1 -L2
 [ /2 width=3 by sex_atom, ex2_intro/ ]
 #f #I1 #I2 #L1 #L2 #_ #HI12 #IH #y #H
@@ -277,7 +277,7 @@ qed-.
 lemma sex_dec: ∀RN,RP.
                (∀L,I1,I2. Decidable (RN L I1 I2)) →
                (∀L,I1,I2. Decidable (RP L I1 I2)) →
-               ∀L1,L2,f. Decidable (L1 ⪤[RN, RP, f] L2).
+               ∀L1,L2,f. Decidable (L1 ⪤[RN,RP,f] L2).
 #RN #RP #HRN #HRP #L1 elim L1 -L1 [ * | #L1 #I1 #IH * ]
 [ /2 width=1 by sex_atom, or_introl/
 | #L2 #I2 #f @or_intror #H
index a7b2a5d718fa202536f3f310be29c660496e23fb..4a2379889da3ad04835f4b9a18009dcdce3a291a 100644 (file)
@@ -20,13 +20,13 @@ include "static_2/relocation/sex.ma".
 (* Forward lemmas with length for local environments ************************)
 
 (* Note: "#f #I1 #I2 #L1 #L2 >length_bind >length_bind //" was needed to conclude *)
-lemma sex_fwd_length: ∀RN,RP,f,L1,L2. L1 ⪤[RN, RP, f] L2 → |L1| = |L2|.
+lemma sex_fwd_length: ∀RN,RP,f,L1,L2. L1 ⪤[RN,RP,f] L2 → |L1| = |L2|.
 #RN #RP #f #L1 #L2 #H elim H -f -L1 -L2 //
 qed-.
 
 (* Properties with length for local environments ****************************)
 
-lemma sex_length_cfull: ∀L1,L2. |L1| = |L2| → ∀f. L1 ⪤[cfull, cfull, f] L2.
+lemma sex_length_cfull: ∀L1,L2. |L1| = |L2| → ∀f. L1 ⪤[cfull,cfull,f] L2.
 #L1 elim L1 -L1
 [ #Y2 #H >(length_inv_zero_sn … H) -Y2 //
 | #L1 #I1 #IH #Y2 #H #f
@@ -36,7 +36,7 @@ lemma sex_length_cfull: ∀L1,L2. |L1| = |L2| → ∀f. L1 ⪤[cfull, cfull, f]
 qed.
 
 lemma sex_length_isid: ∀R,L1,L2. |L1| = |L2| →
-                       ∀f. 𝐈⦃f⦄ → L1 ⪤[R, cfull, f] L2.
+                       ∀f. 𝐈⦃f⦄ → L1 ⪤[R,cfull,f] L2.
 #R #L1 elim L1 -L1
 [ #Y2 #H >(length_inv_zero_sn … H) -Y2 //
 | #L1 #I1 #IH #Y2 #H #f #Hf
index 571379e2f49b00b576659753838654ce5a5dfee0..c1954b1a789f00b113efbbd08973972c36a51afd 100644 (file)
@@ -23,9 +23,9 @@ theorem sex_trans_gen (RN1) (RP1) (RN2) (RP2) (RN) (RP):
                       ∀L1,f.
                       (∀g,I,K,n. ⬇*[n] L1 ≘ K.ⓘ{I} → ↑g = ⫱*[n] f → sex_transitive RN1 RN2 RN RN1 RP1 g K I) →
                       (∀g,I,K,n. ⬇*[n] L1 ≘ K.ⓘ{I} → ⫯g = ⫱*[n] f → sex_transitive RP1 RP2 RP RN1 RP1 g K I) →
-                      ∀L0. L1 ⪤[RN1, RP1, f] L0 →
-                      ∀L2. L0 ⪤[RN2, RP2, f] L2 →
-                      L1 ⪤[RN, RP, f] L2.
+                      ∀L0. L1 ⪤[RN1,RP1,f] L0 →
+                      ∀L2. L0 ⪤[RN2,RP2,f] L2 →
+                      L1 ⪤[RN,RP,f] L2.
 #RN1 #RP1 #RN2 #RP2 #RN #RP #L1 elim L1 -L1
 [ #f #_ #_ #L0 #H1 #L2 #H2
   lapply (sex_inv_atom1 … H1) -H1 #H destruct
@@ -50,8 +50,8 @@ theorem sex_trans (RN) (RP) (f): (∀g,I,K. sex_transitive RN RN RN RN RP g K I)
                                  Transitive … (sex RN RP f).
 /2 width=9 by sex_trans_gen/ qed-.
 
-theorem sex_trans_id_cfull: ∀R1,R2,R3,L1,L,f. L1 ⪤[R1, cfull, f] L → 𝐈⦃f⦄ →
-                            ∀L2. L ⪤[R2, cfull, f] L2 → L1 ⪤[R3, cfull, f] L2.
+theorem sex_trans_id_cfull: ∀R1,R2,R3,L1,L,f. L1 ⪤[R1,cfull,f] L → 𝐈⦃f⦄ →
+                            ∀L2. L ⪤[R2,cfull,f] L2 → L1 ⪤[R3,cfull,f] L2.
 #R1 #R2 #R3 #L1 #L #f #H elim H -L1 -L -f
 [ #f #Hf #L2 #H >(sex_inv_atom1 … H) -L2 // ]
 #f #I1 #I #K1 #K #HK1 #_ #IH #Hf #L2 #H
@@ -93,9 +93,9 @@ theorem sex_canc_dx: ∀RN,RP,f. Transitive … (sex RN RP f) →
 /3 width=3 by/ qed-.
 
 lemma sex_meet: ∀RN,RP,L1,L2.
-                ∀f1. L1 ⪤[RN, RP, f1] L2 →
-                ∀f2. L1 ⪤[RN, RP, f2] L2 →
-                ∀f. f1 ⋒ f2 ≘ f → L1 ⪤[RN, RP, f] L2.
+                ∀f1. L1 ⪤[RN,RP,f1] L2 →
+                ∀f2. L1 ⪤[RN,RP,f2] L2 →
+                ∀f. f1 ⋒ f2 ≘ f → L1 ⪤[RN,RP,f] L2.
 #RN #RP #L1 #L2 #f1 #H elim H -f1 -L1 -L2 //
 #f1 #I1 #I2 #L1 #L2 #_ #HI12 #IH #f2 #H #f #Hf
 elim (pn_split f2) * #g2 #H2 destruct
@@ -106,9 +106,9 @@ try elim (sex_inv_push … H) try elim (sex_inv_next … H) -H
 qed-.
 
 lemma sex_join: ∀RN,RP,L1,L2.
-                ∀f1. L1 ⪤[RN, RP, f1] L2 →
-                ∀f2. L1 ⪤[RN, RP, f2] L2 →
-                ∀f. f1 ⋓ f2 ≘ f → L1 ⪤[RN, RP, f] L2.
+                ∀f1. L1 ⪤[RN,RP,f1] L2 →
+                ∀f2. L1 ⪤[RN,RP,f2] L2 →
+                ∀f. f1 ⋓ f2 ≘ f → L1 ⪤[RN,RP,f] L2.
 #RN #RP #L1 #L2 #f1 #H elim H -f1 -L1 -L2 //
 #f1 #I1 #I2 #L1 #L2 #_ #HI12 #IH #f2 #H #f #Hf
 elim (pn_split f2) * #g2 #H2 destruct
index 339ac98a7d55c7a6343409e8656965b723c790ca..8d1cf55389dfd0df2135d685a5fe8ee1a18138c9 100644 (file)
@@ -34,7 +34,7 @@ lemma sex_tc_next_sn: ∀RN,RP. c_reflexive … RN →
 qed.
 
 lemma sex_tc_next_dx: ∀RN,RP. c_reflexive … RN → c_reflexive … RP →
-                      ∀f,I1,I2,L1. (CTC … RN) L1 I1 I2 → ∀L2. L1 ⪤[RN, RP, f] L2 →
+                      ∀f,I1,I2,L1. (CTC … RN) L1 I1 I2 → ∀L2. L1 ⪤[RN,RP,f] L2 →
                       TC … (sex RN RP (↑f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}).
 #RN #RP #HRN #HRP #f #I1 #I2 #L1 #H elim H -I2
 /4 width=5 by sex_refl, sex_next, step, inj/
@@ -48,18 +48,18 @@ lemma sex_tc_push_sn: ∀RN,RP. c_reflexive … RP →
 qed.
 
 lemma sex_tc_push_dx: ∀RN,RP. c_reflexive … RN → c_reflexive … RP →
-                      ∀f,I1,I2,L1. (CTC … RP) L1 I1 I2 → ∀L2. L1 ⪤[RN, RP, f] L2 →
+                      ∀f,I1,I2,L1. (CTC … RP) L1 I1 I2 → ∀L2. L1 ⪤[RN,RP,f] L2 →
                       TC … (sex RN RP (⫯f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}).
 #RN #RP #HRN #HRP #f #I1 #I2 #L1 #H elim H -I2
 /4 width=5 by sex_refl, sex_push, step, inj/
 qed.
 
-lemma sex_tc_inj_sn: ∀RN,RP,f,L1,L2. L1 ⪤[RN, RP, f] L2 → L1 ⪤[CTC … RN, RP, f] L2.
+lemma sex_tc_inj_sn: ∀RN,RP,f,L1,L2. L1 ⪤[RN,RP,f] L2 → L1 ⪤[CTC … RN,RP,f] L2.
 #RN #RP #f #L1 #L2 #H elim H -f -L1 -L2
 /3 width=1 by sex_push, sex_next, inj/
 qed.
 
-lemma sex_tc_inj_dx: ∀RN,RP,f,L1,L2. L1 ⪤[RN, RP, f] L2 → L1 ⪤[RN, CTC … RP, f] L2.
+lemma sex_tc_inj_dx: ∀RN,RP,f,L1,L2. L1 ⪤[RN,RP,f] L2 → L1 ⪤[RN,CTC … RP,f] L2.
 #RN #RP #f #L1 #L2 #H elim H -f -L1 -L2
 /3 width=1 by sex_push, sex_next, inj/
 qed.
@@ -82,8 +82,8 @@ qed.
 
 (* Basic_2A1: uses: TC_lpx_sn_ind *)
 theorem sex_tc_step_dx: ∀RN,RP. s_rs_transitive_isid RN RP →
-                        ∀f,L1,L. L1 ⪤[RN, RP, f] L → 𝐈⦃f⦄ →
-                        ∀L2. L ⪤[RN, CTC … RP, f] L2 → L1⪤ [RN, CTC … RP, f] L2.
+                        ∀f,L1,L. L1 ⪤[RN,RP,f] L → 𝐈⦃f⦄ →
+                        ∀L2. L ⪤[RN,CTC … RP,f] L2 → L1⪤ [RN,CTC … RP,f] L2.
 #RN #RP #HRP #f #L1 #L #H elim H -f -L1 -L
 [ #f #_ #Y #H -HRP >(sex_inv_atom1 … H) -Y // ]
 #f #I1 #I #L1 #L #HL1 #HI1 #IH #Hf #Y #H
@@ -99,7 +99,7 @@ qed-.
 (* Advanced properties ******************************************************)
 
 lemma sex_tc_dx: ∀RN,RP. s_rs_transitive_isid RN RP →
-                 ∀f. 𝐈⦃f⦄ → ∀L1,L2. TC … (sex RN RP f) L1 L2 → L1 ⪤[RN, CTC … RP, f] L2.
+                 ∀f. 𝐈⦃f⦄ → ∀L1,L2. TC … (sex RN RP f) L1 L2 → L1 ⪤[RN,CTC … RP,f] L2.
 #RN #RP #HRP #f #Hf #L1 #L2 #H @(TC_ind_dx ??????? H) -L1
 /3 width=3 by sex_tc_step_dx, sex_tc_inj_dx/
 qed.
@@ -107,13 +107,13 @@ qed.
 (* Advanced inversion lemmas ************************************************)
 
 lemma sex_inv_tc_sn: ∀RN,RP. c_reflexive … RN → c_reflexive … RP →
-                     ∀f,L1,L2. L1 ⪤[CTC … RN, RP, f] L2 → TC … (sex RN RP f) L1 L2.
+                     ∀f,L1,L2. L1 ⪤[CTC … RN,RP,f] L2 → TC … (sex RN RP f) L1 L2.
 #RN #RP #HRN #HRP #f #L1 #L2 #H elim H -f -L1 -L2
 /2 width=1 by sex_tc_next, sex_tc_push_sn, sex_atom, inj/
 qed-.
 
 lemma sex_inv_tc_dx: ∀RN,RP. c_reflexive … RN → c_reflexive … RP →
-                     ∀f,L1,L2. L1 ⪤[RN, CTC … RP, f] L2 → TC … (sex RN RP f) L1 L2.
+                     ∀f,L1,L2. L1 ⪤[RN,CTC … RP,f] L2 → TC … (sex RN RP f) L1 L2.
 #RN #RP #HRN #HRP #f #L1 #L2 #H elim H -f -L1 -L2
 /2 width=1 by sex_tc_push, sex_tc_next_sn, sex_atom, inj/
 qed-.
index e3dae5bf4c4393f7de655c5bdd21283207681e40..28cfb9ce0c5c928cfea1bb6f6b06a67af7c038c8 100644 (file)
@@ -30,55 +30,55 @@ interpretation "plus-iterated structural successor (closure)"
 
 (* Basic properties *********************************************************)
 
-lemma fqu_fqup: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
-                ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄.
+lemma fqu_fqup: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ →
+                ⦃G1,L1,T1⦄ ⬂+[b] ⦃G2,L2,T2⦄.
 /2 width=1 by tri_inj/ qed.
 
 lemma fqup_strap1: ∀b,G1,G,G2,L1,L,L2,T1,T,T2.
-                   ⦃G1, L1, T1⦄ ⊐+[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐[b] ⦃G2, L2, T2⦄ →
-                   ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄.
+                   ⦃G1,L1,T1⦄ ⬂+[b] ⦃G,L,T⦄ → ⦃G,L,T⦄ ⬂[b] ⦃G2,L2,T2⦄ →
+                   ⦃G1,L1,T1⦄ ⬂+[b] ⦃G2,L2,T2⦄.
 /2 width=5 by tri_step/ qed.
 
 lemma fqup_strap2: ∀b,G1,G,G2,L1,L,L2,T1,T,T2.
-                   ⦃G1, L1, T1⦄ ⊐[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐+[b] ⦃G2, L2, T2⦄ →
-                   ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄.
+                   ⦃G1,L1,T1⦄ ⬂[b] ⦃G,L,T⦄ → ⦃G,L,T⦄ ⬂+[b] ⦃G2,L2,T2⦄ →
+                   ⦃G1,L1,T1⦄ ⬂+[b] ⦃G2,L2,T2⦄.
 /2 width=5 by tri_TC_strap/ qed.
 
-lemma fqup_pair_sn: ∀b,I,G,L,V,T. ⦃G, L, ②{I}V.T⦄ ⊐+[b] ⦃G, L, V⦄.
+lemma fqup_pair_sn: ∀b,I,G,L,V,T. ⦃G,L,②{I}V.T⦄ ⬂+[b] ⦃G,L,V⦄.
 /2 width=1 by fqu_pair_sn, fqu_fqup/ qed.
 
-lemma fqup_bind_dx: ∀b,p,I,G,L,V,T. ⦃G, L, ⓑ{p,I}V.T⦄ ⊐+[b] ⦃G, L.ⓑ{I}V, T⦄.
-/2 width=1 by fqu_bind_dx, fqu_fqup/ qed.
+lemma fqup_bind_dx: ∀p,I,G,L,V,T. ⦃G,L,ⓑ{p,I}V.T⦄ ⬂+[Ⓣ] ⦃G,L.ⓑ{I}V,T⦄.
+/3 width=1 by fqu_bind_dx, fqu_fqup/ qed.
 
-lemma fqup_clear: ∀p,I,G,L,V,T. ⦃G, L, ⓑ{p,I}V.T⦄ ⊐+[Ⓕ] ⦃G, L.ⓧ, T⦄.
+lemma fqup_clear: ∀p,I,G,L,V,T. ⦃G,L,ⓑ{p,I}V.T⦄ ⬂+[Ⓕ] ⦃G,L.ⓧ,T⦄.
 /3 width=1 by fqu_clear, fqu_fqup/ qed.
 
-lemma fqup_flat_dx: ∀b,I,G,L,V,T. ⦃G, L, ⓕ{I}V.T⦄ ⊐+[b] ⦃G, L, T⦄.
+lemma fqup_flat_dx: ∀b,I,G,L,V,T. ⦃G,L,ⓕ{I}V.T⦄ ⬂+[b] ⦃G,L,T⦄.
 /2 width=1 by fqu_flat_dx, fqu_fqup/ qed.
 
-lemma fqup_flat_dx_pair_sn: ∀b,I1,I2,G,L,V1,V2,T. ⦃G, L, ⓕ{I1}V1.②{I2}V2.T⦄ ⊐+[b] ⦃G, L, V2⦄.
+lemma fqup_flat_dx_pair_sn: ∀b,I1,I2,G,L,V1,V2,T. ⦃G,L,ⓕ{I1}V1.②{I2}V2.T⦄ ⬂+[b] ⦃G,L,V2⦄.
 /2 width=5 by fqu_pair_sn, fqup_strap1/ qed.
 
-lemma fqup_bind_dx_flat_dx: ∀b,p,G,I1,I2,L,V1,V2,T. ⦃G, L, ⓑ{p,I1}V1.ⓕ{I2}V2.T⦄ ⊐+[b] ⦃G, L.ⓑ{I1}V1, T⦄.
+lemma fqup_bind_dx_flat_dx: ∀p,G,I1,I2,L,V1,V2,T. ⦃G,L,ⓑ{p,I1}V1.ⓕ{I2}V2.T⦄ ⬂+[Ⓣ] ⦃G,L.ⓑ{I1}V1,T⦄.
 /2 width=5 by fqu_flat_dx, fqup_strap1/ qed.
 
-lemma fqup_flat_dx_bind_dx: ∀b,p,I1,I2,G,L,V1,V2,T. ⦃G, L, ⓕ{I1}V1.ⓑ{p,I2}V2.T⦄ ⊐+[b] ⦃G, L.ⓑ{I2}V2, T⦄.
-/2 width=5 by fqu_bind_dx, fqup_strap1/ qed.
+lemma fqup_flat_dx_bind_dx: ∀p,I1,I2,G,L,V1,V2,T. ⦃G,L,ⓕ{I1}V1.ⓑ{p,I2}V2.T⦄ ⬂+[Ⓣ] ⦃G,L.ⓑ{I2}V2,T⦄.
+/3 width=5 by fqu_bind_dx, fqup_strap1/ qed.
 
 (* Basic eliminators ********************************************************)
 
 lemma fqup_ind: ∀b,G1,L1,T1. ∀Q:relation3 ….
-                (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → Q G2 L2 T2) →
-                (∀G,G2,L,L2,T,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐[b] ⦃G2, L2, T2⦄ → Q G L T → Q G2 L2 T2) →
-                ∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ → Q G2 L2 T2.
+                (∀G2,L2,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ → Q G2 L2 T2) →
+                (∀G,G2,L,L2,T,T2. ⦃G1,L1,T1⦄ ⬂+[b] ⦃G,L,T⦄ → ⦃G,L,T⦄ ⬂[b] ⦃G2,L2,T2⦄ → Q G L T → Q G2 L2 T2) →
+                ∀G2,L2,T2. ⦃G1,L1,T1⦄ ⬂+[b] ⦃G2,L2,T2⦄ → Q G2 L2 T2.
 #b #G1 #L1 #T1 #Q #IH1 #IH2 #G2 #L2 #T2 #H
 @(tri_TC_ind … IH1 IH2 G2 L2 T2 H)
 qed-.
 
 lemma fqup_ind_dx: ∀b,G2,L2,T2. ∀Q:relation3 ….
-                   (∀G1,L1,T1. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → Q G1 L1 T1) →
-                   (∀G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ⊐[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐+[b] ⦃G2, L2, T2⦄ → Q G L T → Q G1 L1 T1) →
-                   ∀G1,L1,T1. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ → Q G1 L1 T1.
+                   (∀G1,L1,T1. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ → Q G1 L1 T1) →
+                   (∀G1,G,L1,L,T1,T. ⦃G1,L1,T1⦄ ⬂[b] ⦃G,L,T⦄ → ⦃G,L,T⦄ ⬂+[b] ⦃G2,L2,T2⦄ → Q G L T → Q G1 L1 T1) →
+                   ∀G1,L1,T1. ⦃G1,L1,T1⦄ ⬂+[b] ⦃G2,L2,T2⦄ → Q G1 L1 T1.
 #b #G2 #L2 #T2 #Q #IH1 #IH2 #G1 #L1 #T1 #H
 @(tri_TC_ind_dx … IH1 IH2 G1 L1 T1 H)
 qed-.
@@ -86,7 +86,7 @@ qed-.
 (* Advanced properties ******************************************************)
 
 lemma fqup_zeta (b) (p) (I) (G) (K) (V):
-                â\88\80T1,T2. â¬\86*[1]T2 â\89\98 T1 â\86\92 â¦\83G,K,â\93\91{p,I}V.T1â¦\84 â\8a\90+[b] ⦃G,K,T2⦄.
-/4 width=5 by fqup_strap2, fqu_fqup, fqu_drop/ qed.
+                â\88\80T1,T2. â¬\86*[1]T2 â\89\98 T1 â\86\92 â¦\83G,K,â\93\91{p,I}V.T1â¦\84 â¬\82+[b] ⦃G,K,T2⦄.
+* /4 width=5 by fqup_strap2, fqu_fqup, fqu_drop, fqu_clear, fqu_bind_dx/ qed.
 
 (* Basic_2A1: removed theorems 1: fqup_drop *)
index 4eafa94d2205b9db2452f19901f724ce5c592f0e..c21d46c6026be363201aa91140a85b6e272829f8 100644 (file)
@@ -20,7 +20,7 @@ include "static_2/s_computation/fqup.ma".
 (* Properties with generic slicing for local environments *******************)
 
 lemma fqup_drops_succ: ∀b,G,K,T,i,L,U. ⬇*[↑i] L ≘ K → ⬆*[↑i] T ≘ U →
-                       ⦃G, L, U⦄ ⊐+[b] ⦃G, K, T⦄.
+                       ⦃G,L,U⦄ ⬂+[b] ⦃G,K,T⦄.
 #b #G #K #T #i elim i -i
 [ #L #U #HLK #HTU elim (drops_inv_succ … HLK) -HLK
   #I #Y #HY #H destruct <(drops_fwd_isid … HY) -K //
@@ -33,7 +33,7 @@ lemma fqup_drops_succ: ∀b,G,K,T,i,L,U. ⬇*[↑i] L ≘ K → ⬆*[↑i] T ≘
 qed.
 
 lemma fqup_drops_strap1: ∀b,G1,G2,L1,K1,K2,T1,T2,U1,i. ⬇*[i] L1 ≘ K1 → ⬆*[i] T1 ≘ U1 →
-                         ⦃G1, K1, T1⦄ ⊐[b] ⦃G2, K2, T2⦄ → ⦃G1, L1, U1⦄ ⊐+[b] ⦃G2, K2, T2⦄.
+                         ⦃G1,K1,T1⦄ ⬂[b] ⦃G2,K2,T2⦄ → ⦃G1,L1,U1⦄ ⬂+[b] ⦃G2,K2,T2⦄.
 #b #G1 #G2 #L1 #K1 #K2 #T1 #T2 #U1 *
 [ #HLK1 #HTU1 #HT12
   >(drops_fwd_isid … HLK1) -L1 //
@@ -42,5 +42,5 @@ lemma fqup_drops_strap1: ∀b,G1,G2,L1,K1,K2,T1,T2,U1,i. ⬇*[i] L1 ≘ K1 → 
 ]
 qed-.
 
-lemma fqup_lref: ∀b,I,G,L,K,V,i. ⬇*[i] L ≘ K.ⓑ{I}V → ⦃G, L, #i⦄ ⊐+[b] ⦃G, K, V⦄.
+lemma fqup_lref: ∀b,I,G,L,K,V,i. ⬇*[i] L ≘ K.ⓑ{I}V → ⦃G,L,#i⦄ ⬂+[b] ⦃G,K,V⦄.
 /2 width=6 by fqup_drops_strap1/ qed.
index 25a81dfa8af7319b209f0c98229232417d370be8..94319671a3aba1cde2622705a1b51c62e28d72a1 100644 (file)
@@ -19,8 +19,8 @@ include "static_2/s_computation/fqup.ma".
 
 (* Forward lemmas with weight for closures **********************************)
 
-lemma fqup_fwd_fw: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ →
-                   ♯{G2, L2, T2} < ♯{G1, L1, T1}.
+lemma fqup_fwd_fw: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂+[b] ⦃G2,L2,T2⦄ →
+                   ♯{G2,L2,T2} < ♯{G1,L1,T1}.
 #b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2
 /3 width=3 by fqu_fwd_fw, transitive_lt/
 qed-.
@@ -28,7 +28,7 @@ qed-.
 (* Advanced eliminators *****************************************************)
 
 lemma fqup_wf_ind: ∀b. ∀Q:relation3 …. (
-                      ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ → Q G2 L2 T2) →
+                      ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1,L1,T1⦄ ⬂+[b] ⦃G2,L2,T2⦄ → Q G2 L2 T2) →
                       Q G1 L1 T1
                    ) → ∀G1,L1,T1. Q G1 L1 T1.
 #b #Q #HQ @(f3_ind … fw) #x #IHx #G1 #L1 #T1 #H destruct
@@ -36,7 +36,7 @@ lemma fqup_wf_ind: ∀b. ∀Q:relation3 …. (
 qed-.
 
 lemma fqup_wf_ind_eq: ∀b. ∀Q:relation3 …. (
-                         ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ → Q G2 L2 T2) →
+                         ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1,L1,T1⦄ ⬂+[b] ⦃G2,L2,T2⦄ → Q G2 L2 T2) →
                          ∀G2,L2,T2. G1 = G2 → L1 = L2 → T1 = T2 → Q G2 L2 T2
                       ) → ∀G1,L1,T1. Q G1 L1 T1.
 #b #Q #HQ @(f3_ind … fw) #x #IHx #G1 #L1 #T1 #H destruct
index fb6a7ea7def256a305786849b19089e9ddc1e302..d1183daff751761d5b9dc82127d237223f3bb4a6 100644 (file)
@@ -31,15 +31,15 @@ interpretation "star-iterated structural successor (closure)"
 (* Basic eliminators ********************************************************)
 
 lemma fqus_ind: ∀b,G1,L1,T1. ∀Q:relation3 …. Q G1 L1 T1 →
-                (∀G,G2,L,L2,T,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ → Q G L T → Q G2 L2 T2) →
-                ∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ → Q G2 L2 T2.
+                (∀G,G2,L,L2,T,T2. ⦃G1,L1,T1⦄ ⬂*[b] ⦃G,L,T⦄ → ⦃G,L,T⦄ ⬂⸮[b] ⦃G2,L2,T2⦄ → Q G L T → Q G2 L2 T2) →
+                ∀G2,L2,T2. ⦃G1,L1,T1⦄ ⬂*[b] ⦃G2,L2,T2⦄ → Q G2 L2 T2.
 #b #G1 #L1 #T1 #R #IH1 #IH2 #G2 #L2 #T2 #H
 @(tri_TC_star_ind … IH1 IH2 G2 L2 T2 H) //
 qed-.
 
 lemma fqus_ind_dx: ∀b,G2,L2,T2. ∀Q:relation3 …. Q G2 L2 T2 →
-                   (∀G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄ → Q G L T → Q G1 L1 T1) →
-                   ∀G1,L1,T1. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ → Q G1 L1 T1.
+                   (∀G1,G,L1,L,T1,T. ⦃G1,L1,T1⦄ ⬂⸮[b] ⦃G,L,T⦄ → ⦃G,L,T⦄ ⬂*[b] ⦃G2,L2,T2⦄ → Q G L T → Q G1 L1 T1) →
+                   ∀G1,L1,T1. ⦃G1,L1,T1⦄ ⬂*[b] ⦃G2,L2,T2⦄ → Q G1 L1 T1.
 #b #G2 #L2 #T2 #Q #IH1 #IH2 #G1 #L1 #T1 #H
 @(tri_TC_star_ind_dx … IH1 IH2 G1 L1 T1 H) //
 qed-.
@@ -49,78 +49,78 @@ qed-.
 lemma fqus_refl: ∀b. tri_reflexive … (fqus b).
 /2 width=1 by tri_inj/ qed.
 
-lemma fquq_fqus: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ →
-                 ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄.
+lemma fquq_fqus: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂⸮[b] ⦃G2,L2,T2⦄ →
+                 ⦃G1,L1,T1⦄ ⬂*[b] ⦃G2,L2,T2⦄.
 /2 width=1 by tri_inj/ qed.
 
-lemma fqus_strap1: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G, L, T⦄ →
-                   ⦃G, L, T⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄.
+lemma fqus_strap1: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1,L1,T1⦄ ⬂*[b] ⦃G,L,T⦄ →
+                   ⦃G,L,T⦄ ⬂⸮[b] ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ ⬂*[b] ⦃G2,L2,T2⦄.
 /2 width=5 by tri_step/ qed-.
 
-lemma fqus_strap2: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G, L, T⦄ →
-                   ⦃G, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄.
+lemma fqus_strap2: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1,L1,T1⦄ ⬂⸮[b] ⦃G,L,T⦄ →
+                   ⦃G,L,T⦄ ⬂*[b] ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ ⬂*[b] ⦃G2,L2,T2⦄.
 /2 width=5 by tri_TC_strap/ qed-.
 
 (* Basic inversion lemmas ***************************************************)
 
-lemma fqus_inv_fqu_sn: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
+lemma fqus_inv_fqu_sn: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂*[b] ⦃G2,L2,T2⦄ →
                        (∧∧ G1 = G2 & L1 = L2 & T1 = T2) ∨
-                       ∃∃G,L,T. ⦃G1, L1, T1⦄ ⊐[b] ⦃G, L, T⦄ & ⦃G, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄.
+                       ∃∃G,L,T. ⦃G1,L1,T1⦄ ⬂[b] ⦃G,L,T⦄ & ⦃G,L,T⦄ ⬂*[b] ⦃G2,L2,T2⦄.
 #b #G1 #G2 #L1 #L2 #T1 #T2 #H12 @(fqus_ind_dx … H12) -G1 -L1 -T1 /3 width=1 by and3_intro, or_introl/
 #G1 #G #L1 #L #T1 #T * /3 width=5 by ex2_3_intro, or_intror/
 * #HG #HL #HT #_ destruct //
 qed-.
 
-lemma fqus_inv_sort1: ∀b,G1,G2,L1,L2,T2,s. ⦃G1, L1, ⋆s⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
+lemma fqus_inv_sort1: ∀b,G1,G2,L1,L2,T2,s. ⦃G1,L1,⋆s⦄ ⬂*[b] ⦃G2,L2,T2⦄ →
                       (∧∧ G1 = G2 & L1 = L2 & ⋆s = T2) ∨
-                      ∃∃J,L. ⦃G1, L, ⋆s⦄ ⊐*[b] ⦃G2, L2, T2⦄ & L1 = L.ⓘ{J}.
+                      ∃∃J,L. ⦃G1,L,⋆s⦄ ⬂*[b] ⦃G2,L2,T2⦄ & L1 = L.ⓘ{J}.
 #b #G1 #G2 #L1 #L2 #T2 #s #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or_introl/
 #G #L #T #H elim (fqu_inv_sort1 … H) -H /3 width=4 by ex2_2_intro, or_intror/
 qed-.
 
-lemma fqus_inv_lref1: ∀b,G1,G2,L1,L2,T2,i. ⦃G1, L1, #i⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
+lemma fqus_inv_lref1: ∀b,G1,G2,L1,L2,T2,i. ⦃G1,L1,#i⦄ ⬂*[b] ⦃G2,L2,T2⦄ →
                       ∨∨ ∧∧ G1 = G2 & L1 = L2 & #i = T2
-                       | ∃∃J,L,V. ⦃G1, L, V⦄ ⊐*[b] ⦃G2, L2, T2⦄ & L1 = L.ⓑ{J}V & i = 0
-                       | ∃∃J,L,j. ⦃G1, L, #j⦄ ⊐*[b] ⦃G2, L2, T2⦄ & L1 = L.ⓘ{J} & i = ↑j.
+                       | ∃∃J,L,V. ⦃G1,L,V⦄ ⬂*[b] ⦃G2,L2,T2⦄ & L1 = L.ⓑ{J}V & i = 0
+                       | ∃∃J,L,j. ⦃G1,L,#j⦄ ⬂*[b] ⦃G2,L2,T2⦄ & L1 = L.ⓘ{J} & i = ↑j.
 #b #G1 #G2 #L1 #L2 #T2 #i #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or3_intro0/
 #G #L #T #H elim (fqu_inv_lref1 … H) -H * /3 width=7 by or3_intro1, or3_intro2, ex3_4_intro, ex3_3_intro/
 qed-.
 
-lemma fqus_inv_gref1: ∀b,G1,G2,L1,L2,T2,l. ⦃G1, L1, §l⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
+lemma fqus_inv_gref1: ∀b,G1,G2,L1,L2,T2,l. ⦃G1,L1,§l⦄ ⬂*[b] ⦃G2,L2,T2⦄ →
                       (∧∧ G1 = G2 & L1 = L2 & §l = T2) ∨
-                      ∃∃J,L. ⦃G1, L, §l⦄ ⊐*[b] ⦃G2, L2, T2⦄ & L1 = L.ⓘ{J}.
+                      ∃∃J,L. ⦃G1,L,§l⦄ ⬂*[b] ⦃G2,L2,T2⦄ & L1 = L.ⓘ{J}.
 #b #G1 #G2 #L1 #L2 #T2 #l #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or_introl/
 #G #L #T #H elim (fqu_inv_gref1 … H) -H /3 width=4 by ex2_2_intro, or_intror/
 qed-.
 
-lemma fqus_inv_bind1: ∀b,p,I,G1,G2,L1,L2,V1,T1,T2. ⦃G1, L1, ⓑ{p,I}V1.T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
+lemma fqus_inv_bind1: ∀b,p,I,G1,G2,L1,L2,V1,T1,T2. ⦃G1,L1,ⓑ{p,I}V1.T1⦄ ⬂*[b] ⦃G2,L2,T2⦄ →
                       ∨∨ ∧∧ G1 = G2 & L1 = L2 & ⓑ{p,I}V1.T1 = T2
-                       | ⦃G1, L1, V1⦄ ⊐*[b] ⦃G2, L2, T2⦄
-                       | â¦\83G1, L1.â\93\91{I}V1, T1â¦\84 â\8a\90*[b] â¦\83G2, L2, T2â¦\84
-                       | â¦\83G1, L1.â\93§, T1â¦\84 â\8a\90*[b] â¦\83G2, L2, T2â¦\84 â\88§ b = Ⓕ
-                       | ∃∃J,L,T. ⦃G1, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄ & ⬆*[1] T ≘ ⓑ{p,I}V1.T1 & L1 = L.ⓘ{J}.
+                       | ⦃G1,L1,V1⦄ ⬂*[b] ⦃G2,L2,T2⦄
+                       | â\88§â\88§ â¦\83G1,L1.â\93\91{I}V1,T1â¦\84 â¬\82*[b] â¦\83G2,L2,T2â¦\84 & b = â\93\89 
+                       | â\88§â\88§ â¦\83G1,L1.â\93§,T1â¦\84 â¬\82*[b] â¦\83G2,L2,T2â¦\84 & b = Ⓕ
+                       | ∃∃J,L,T. ⦃G1,L,T⦄ ⬂*[b] ⦃G2,L2,T2⦄ & ⬆*[1] T ≘ ⓑ{p,I}V1.T1 & L1 = L.ⓘ{J}.
 #b #p #I #G1 #G2 #L1 #L2 #V1 #T1 #T2 #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or5_intro0/
 #G #L #T #H elim (fqu_inv_bind1 … H) -H *
-[4: #J ] #H1 #H2 #H3 [4: #Hb ] #H destruct
+[4: #J ] #H1 #H2 #H3 [3,4: #Hb ] #H destruct
 /3 width=6 by or5_intro1, or5_intro2, or5_intro3, or5_intro4, ex3_3_intro, conj/
 qed-.
 
 
-lemma fqus_inv_bind1_true: ∀p,I,G1,G2,L1,L2,V1,T1,T2. ⦃G1, L1, ⓑ{p,I}V1.T1⦄ ⊐* ⦃G2, L2, T2⦄ →
+lemma fqus_inv_bind1_true: ∀p,I,G1,G2,L1,L2,V1,T1,T2. ⦃G1,L1,ⓑ{p,I}V1.T1⦄ ⬂* ⦃G2,L2,T2⦄ →
                            ∨∨ ∧∧ G1 = G2 & L1 = L2 & ⓑ{p,I}V1.T1 = T2
-                               | ⦃G1, L1, V1⦄ ⊐* ⦃G2, L2, T2⦄
-                               | ⦃G1, L1.ⓑ{I}V1, T1⦄ ⊐* ⦃G2, L2, T2⦄
-                               | ∃∃J,L,T. ⦃G1, L, T⦄ ⊐* ⦃G2, L2, T2⦄ & ⬆*[1] T ≘ ⓑ{p,I}V1.T1 & L1 = L.ⓘ{J}.
-#p #I #G1 #G2 #L1 #L2 #V1 #T1 #T2 #H elim (fqus_inv_bind1 … H) -H [1,4: * ]
-/3 width=1 by and3_intro, or4_intro0, or4_intro1, or4_intro2, or4_intro3, ex3_3_intro/
+                               | ⦃G1,L1,V1⦄ ⬂* ⦃G2,L2,T2⦄
+                               | ⦃G1,L1.ⓑ{I}V1,T1⦄ ⬂* ⦃G2,L2,T2⦄
+                               | ∃∃J,L,T. ⦃G1,L,T⦄ ⬂* ⦃G2,L2,T2⦄ & ⬆*[1] T ≘ ⓑ{p,I}V1.T1 & L1 = L.ⓘ{J}.
+#p #I #G1 #G2 #L1 #L2 #V1 #T1 #T2 #H elim (fqus_inv_bind1 … H) -H [1,3,4: * ]
+/3 width=1 by and3_intro, or4_intro0, or4_intro1, or4_intro2, or4_intro3/
 #_ #H destruct
 qed-.
 
-lemma fqus_inv_flat1: ∀b,I,G1,G2,L1,L2,V1,T1,T2. ⦃G1, L1, ⓕ{I}V1.T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
+lemma fqus_inv_flat1: ∀b,I,G1,G2,L1,L2,V1,T1,T2. ⦃G1,L1,ⓕ{I}V1.T1⦄ ⬂*[b] ⦃G2,L2,T2⦄ →
                       ∨∨ ∧∧ G1 = G2 & L1 = L2 & ⓕ{I}V1.T1 = T2
-                       | ⦃G1, L1, V1⦄ ⊐*[b] ⦃G2, L2, T2⦄
-                       | ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄
-                       | ∃∃J,L,T. ⦃G1, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄ & ⬆*[1] T ≘ ⓕ{I}V1.T1 & L1 = L.ⓘ{J}.
+                       | ⦃G1,L1,V1⦄ ⬂*[b] ⦃G2,L2,T2⦄
+                       | ⦃G1,L1,T1⦄ ⬂*[b] ⦃G2,L2,T2⦄
+                       | ∃∃J,L,T. ⦃G1,L,T⦄ ⬂*[b] ⦃G2,L2,T2⦄ & ⬆*[1] T ≘ ⓕ{I}V1.T1 & L1 = L.ⓘ{J}.
 #b #I #G1 #G2 #L1 #L2 #V1 #T1 #T2 #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or4_intro0/
 #G #L #T #H elim (fqu_inv_flat1 … H) -H *
 [3: #J ] #H1 #H2 #H3 #H destruct
@@ -129,35 +129,35 @@ qed-.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma fqus_inv_atom1: ∀b,I,G1,G2,L2,T2. ⦃G1, ⋆, ⓪{I}⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
+lemma fqus_inv_atom1: ∀b,I,G1,G2,L2,T2. ⦃G1,⋆,⓪{I}⦄ ⬂*[b] ⦃G2,L2,T2⦄ →
                       ∧∧ G1 = G2 & ⋆ = L2 & ⓪{I} = T2.
 #b #I #G1 #G2 #L2 #T2 #H elim (fqus_inv_fqu_sn … H) -H * /2 width=1 by and3_intro/
 #G #L #T #H elim (fqu_inv_atom1 … H)
 qed-.
 
-lemma fqus_inv_sort1_bind: ∀b,I,G1,G2,L1,L2,T2,s. ⦃G1, L1.ⓘ{I}, ⋆s⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
-                           (∧∧ G1 = G2 & L1.ⓘ{I} = L2 & ⋆s = T2) ∨ ⦃G1, L1, ⋆s⦄ ⊐*[b] ⦃G2, L2, T2⦄.
+lemma fqus_inv_sort1_bind: ∀b,I,G1,G2,L1,L2,T2,s. ⦃G1,L1.ⓘ{I},⋆s⦄ ⬂*[b] ⦃G2,L2,T2⦄ →
+                           (∧∧ G1 = G2 & L1.ⓘ{I} = L2 & ⋆s = T2) ∨ ⦃G1,L1,⋆s⦄ ⬂*[b] ⦃G2,L2,T2⦄.
 #b #I #G1 #G2 #L1 #L2 #T2 #s #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or_introl/
 #G #L #T #H elim (fqu_inv_sort1_bind … H) -H
 #H1 #H2 #H3 #H destruct /2 width=1 by or_intror/
 qed-.
 
-lemma fqus_inv_zero1_pair: ∀b,I,G1,G2,L1,L2,V1,T2. ⦃G1, L1.ⓑ{I}V1, #0⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
-                           (∧∧ G1 = G2 & L1.ⓑ{I}V1 = L2 & #0 = T2) ∨ ⦃G1, L1, V1⦄ ⊐*[b] ⦃G2, L2, T2⦄.
+lemma fqus_inv_zero1_pair: ∀b,I,G1,G2,L1,L2,V1,T2. ⦃G1,L1.ⓑ{I}V1,#0⦄ ⬂*[b] ⦃G2,L2,T2⦄ →
+                           (∧∧ G1 = G2 & L1.ⓑ{I}V1 = L2 & #0 = T2) ∨ ⦃G1,L1,V1⦄ ⬂*[b] ⦃G2,L2,T2⦄.
 #b #I #G1 #G2 #L1 #L2 #V1 #T2 #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or_introl/
 #G #L #T #H elim (fqu_inv_zero1_pair … H) -H
 #H1 #H2 #H3 #H destruct /2 width=1 by or_intror/
 qed-.
 
-lemma fqus_inv_lref1_bind: ∀b,I,G1,G2,L1,L2,T2,i. ⦃G1, L1.ⓘ{I}, #↑i⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
-                           (∧∧ G1 = G2 & L1.ⓘ{I} = L2 & #(↑i) = T2) ∨ ⦃G1, L1, #i⦄ ⊐*[b] ⦃G2, L2, T2⦄.
+lemma fqus_inv_lref1_bind: ∀b,I,G1,G2,L1,L2,T2,i. ⦃G1,L1.ⓘ{I},#↑i⦄ ⬂*[b] ⦃G2,L2,T2⦄ →
+                           (∧∧ G1 = G2 & L1.ⓘ{I} = L2 & #(↑i) = T2) ∨ ⦃G1,L1,#i⦄ ⬂*[b] ⦃G2,L2,T2⦄.
 #b #I #G1 #G2 #L1 #L2 #T2 #i #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or_introl/
 #G #L #T #H elim (fqu_inv_lref1_bind … H) -H
 #H1 #H2 #H3 #H destruct /2 width=1 by or_intror/
 qed-.
 
-lemma fqus_inv_gref1_bind: ∀b,I,G1,G2,L1,L2,T2,l. ⦃G1, L1.ⓘ{I}, §l⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
-                           (∧∧ G1 = G2 & L1.ⓘ{I} = L2 & §l = T2) ∨ ⦃G1, L1, §l⦄ ⊐*[b] ⦃G2, L2, T2⦄.
+lemma fqus_inv_gref1_bind: ∀b,I,G1,G2,L1,L2,T2,l. ⦃G1,L1.ⓘ{I},§l⦄ ⬂*[b] ⦃G2,L2,T2⦄ →
+                           (∧∧ G1 = G2 & L1.ⓘ{I} = L2 & §l = T2) ∨ ⦃G1,L1,§l⦄ ⬂*[b] ⦃G2,L2,T2⦄.
 #b #I #G1 #G2 #L1 #L2 #T2 #l #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or_introl/
 #G #L #T #H elim (fqu_inv_gref1_bind … H) -H
 #H1 #H2 #H3 #H destruct /2 width=1 by or_intror/
index 0d27971390e92f23770dd61cb7b75388a8130e37..24ba92a09c499df96a40bc98178744e5ad180d94 100644 (file)
@@ -20,7 +20,7 @@ include "static_2/s_computation/fqus_fqup.ma".
 (* Properties with generic slicing for local environments *******************)
 
 lemma fqus_drops: ∀b,G,L,K,T,U,i. ⬇*[i] L ≘ K → ⬆*[i] T ≘ U →
-                  ⦃G, L, U⦄ ⊐*[b] ⦃G, K, T⦄.
+                  ⦃G,L,U⦄ ⬂*[b] ⦃G,K,T⦄.
 #b #G #L #K #T #U * /3 width=3 by fqup_drops_succ, fqup_fqus/
 #HLK #HTU <(lifts_fwd_isid … HTU) -U // <(drops_fwd_isid … HLK) -K //
 qed.
index 05a450dae356403b3c59504038b8c7bcd83b40c1..f59fd10aac770645ef49e9a87567e84c7ae54bb9 100644 (file)
@@ -19,14 +19,14 @@ include "static_2/s_computation/fqus.ma".
 
 (* Alternative definition with plus-iterated supclosure *********************)
 
-lemma fqup_fqus: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄.
+lemma fqup_fqus: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂+[b] ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ ⬂*[b] ⦃G2,L2,T2⦄.
 #b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2
 /3 width=5 by fqus_strap1, fquq_fqus, fqu_fquq/
 qed.
 
 (* Basic_2A1: was: fqus_inv_gen *)
-lemma fqus_inv_fqup: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
-                     ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ ∨ (∧∧ G1 = G2 & L1 = L2 & T1 = T2).
+lemma fqus_inv_fqup: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂*[b] ⦃G2,L2,T2⦄ →
+                     ⦃G1,L1,T1⦄ ⬂+[b] ⦃G2,L2,T2⦄ ∨ (∧∧ G1 = G2 & L1 = L2 & T1 = T2).
 #b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -G2 -L2 -T2 //
 #G #G2 #L #L2 #T #T2 #_ *
 [ #H2 * /3 width=5 by fqup_strap1, or_introl/
@@ -37,38 +37,38 @@ qed-.
 
 (* Advanced properties ******************************************************)
 
-lemma fqus_strap1_fqu: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐[b] ⦃G2, L2, T2⦄ →
-                       ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄.
+lemma fqus_strap1_fqu: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1,L1,T1⦄ ⬂*[b] ⦃G,L,T⦄ → ⦃G,L,T⦄ ⬂[b] ⦃G2,L2,T2⦄ →
+                       ⦃G1,L1,T1⦄ ⬂+[b] ⦃G2,L2,T2⦄.
 #b #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 elim (fqus_inv_fqup … H1) -H1
 [ /2 width=5 by fqup_strap1/
 | * /2 width=1 by fqu_fqup/
 ]
 qed-.
 
-lemma fqus_strap2_fqu: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
-                       ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄.
+lemma fqus_strap2_fqu: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G,L,T⦄ → ⦃G,L,T⦄ ⬂*[b] ⦃G2,L2,T2⦄ →
+                       ⦃G1,L1,T1⦄ ⬂+[b] ⦃G2,L2,T2⦄.
 #b #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 elim (fqus_inv_fqup … H2) -H2
 [ /2 width=5 by fqup_strap2/
 | * /2 width=1 by fqu_fqup/
 ]
 qed-.
 
-lemma fqus_fqup_trans: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐+[b] ⦃G2, L2, T2⦄ →
-                       ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄.
+lemma fqus_fqup_trans: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1,L1,T1⦄ ⬂*[b] ⦃G,L,T⦄ → ⦃G,L,T⦄ ⬂+[b] ⦃G2,L2,T2⦄ →
+                       ⦃G1,L1,T1⦄ ⬂+[b] ⦃G2,L2,T2⦄.
 #b #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 @(fqup_ind … H2) -H2 -G2 -L2 -T2
 /2 width=5 by fqus_strap1_fqu, fqup_strap1/
 qed-.
 
-lemma fqup_fqus_trans: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G, L, T⦄ →
-                       ⦃G, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄.
+lemma fqup_fqus_trans: ∀b,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1,L1,T1⦄ ⬂+[b] ⦃G,L,T⦄ →
+                       ⦃G,L,T⦄ ⬂*[b] ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ ⬂+[b] ⦃G2,L2,T2⦄.
 #b #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 @(fqup_ind_dx … H1) -H1 -G1 -L1 -T1
 /3 width=5 by fqus_strap2_fqu, fqup_strap2/
 qed-.
 
 (* Advanced inversion lemmas for plus-iterated supclosure *******************)
 
-lemma fqup_inv_step_sn: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ →
-                        ∃∃G,L,T. ⦃G1, L1, T1⦄ ⊐[b] ⦃G, L, T⦄ & ⦃G, L, T⦄ ⊐*[b] ⦃G2, L2, T2⦄.
+lemma fqup_inv_step_sn: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂+[b] ⦃G2,L2,T2⦄ →
+                        ∃∃G,L,T. ⦃G1,L1,T1⦄ ⬂[b] ⦃G,L,T⦄ & ⦃G,L,T⦄ ⬂*[b] ⦃G2,L2,T2⦄.
 #b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1 /2 width=5 by ex2_3_intro/
 #G1 #G #L1 #L #T1 #T #H1 #_ * /4 width=9 by fqus_strap2, fqu_fquq, ex2_3_intro/
 qed-.
index f9436670662f07b12baaf98305d68bfe8ceff931..72c46008f1e9f68dabe5418e37b5eb36c64bd103 100644 (file)
@@ -19,15 +19,15 @@ include "static_2/s_computation/fqus.ma".
 
 (* Forward lemmas with weight for closures **********************************)
 
-lemma fqus_fwd_fw: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
-                   ♯{G2, L2, T2} ≤ ♯{G1, L1, T1}.
+lemma fqus_fwd_fw: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂*[b] ⦃G2,L2,T2⦄ →
+                   ♯{G2,L2,T2} ≤ ♯{G1,L1,T1}.
 #b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -L2 -T2
 /3 width=3 by fquq_fwd_fw, transitive_le/
 qed-.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma fqus_inv_refl_atom3: ∀b,I,G,L,X. ⦃G, L, ⓪{I}⦄ ⊐*[b] ⦃G, L, X⦄ → ⓪{I} = X.
+lemma fqus_inv_refl_atom3: ∀b,I,G,L,X. ⦃G,L,⓪{I}⦄ ⬂*[b] ⦃G,L,X⦄ → ⓪{I} = X.
 #b #I #G #L #X #H elim (fqus_inv_fqu_sn … H) -H * //
 #G0 #L0 #T0 #H1 #H2 lapply (fqu_fwd_fw … H1) lapply (fqus_fwd_fw … H2) -H2 -H1
 #H2 #H1 lapply (le_to_lt_to_lt … H2 H1) -G0 -L0 -T0
index b834566d303abb0b99470f21aa052d6cf2f3e770..19dd4d45d0ab14148dbe2405d4f50b2b57ca9615 100644 (file)
@@ -28,7 +28,7 @@ include "static_2/relocation/lifts.ma".
 inductive fqu (b:bool): tri_relation genv lenv term ≝
 | fqu_lref_O : ∀I,G,L,V. fqu b G (L.ⓑ{I}V) (#0) G L V
 | fqu_pair_sn: ∀I,G,L,V,T. fqu b G L (②{I}V.T) G L V
-| fqu_bind_dx: ∀p,I,G,L,V,T. fqu b G L (ⓑ{p,I}V.T) G (L.ⓑ{I}V) T
+| fqu_bind_dx: ∀p,I,G,L,V,T. b = Ⓣ → fqu b G L (ⓑ{p,I}V.T) G (L.ⓑ{I}V) T
 | fqu_clear  : ∀p,I,G,L,V,T. b = Ⓕ → fqu b G L (ⓑ{p,I}V.T) G (L.ⓧ) T
 | fqu_flat_dx: ∀I,G,L,V,T. fqu b G L (ⓕ{I}V.T) G L T
 | fqu_drop   : ∀I,G,L,T,U. ⬆*[1] T ≘ U → fqu b G (L.ⓘ{I}) U G L T
@@ -44,24 +44,24 @@ interpretation
 
 (* Basic properties *********************************************************)
 
-lemma fqu_sort: ∀b,I,G,L,s. ⦃G, L.ⓘ{I}, ⋆s⦄ ⊐[b] ⦃G, L, ⋆s⦄.
+lemma fqu_sort: ∀b,I,G,L,s. ⦃G,L.ⓘ{I},⋆s⦄ ⬂[b] ⦃G,L,⋆s⦄.
 /2 width=1 by fqu_drop/ qed.
 
-lemma fqu_lref_S: ∀b,I,G,L,i. ⦃G, L.ⓘ{I}, #↑i⦄ ⊐[b] ⦃G, L, #i⦄.
+lemma fqu_lref_S: ∀b,I,G,L,i. ⦃G,L.ⓘ{I},#↑i⦄ ⬂[b] ⦃G,L,#i⦄.
 /2 width=1 by fqu_drop/ qed.
 
-lemma fqu_gref: ∀b,I,G,L,l. ⦃G, L.ⓘ{I}, §l⦄ ⊐[b] ⦃G, L, §l⦄.
+lemma fqu_gref: ∀b,I,G,L,l. ⦃G,L.ⓘ{I},§l⦄ ⬂[b] ⦃G,L,§l⦄.
 /2 width=1 by fqu_drop/ qed.
 
 (* Basic inversion lemmas ***************************************************)
 
-fact fqu_inv_sort1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
+fact fqu_inv_sort1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ →
                         ∀s. T1 = ⋆s →
                         ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & T2 = ⋆s.
 #b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2
 [ #I #G #L #T #s #H destruct
 | #I #G #L #V #T #s #H destruct
-| #p #I #G #L #V #T #s #H destruct
+| #p #I #G #L #V #T #_ #s #H destruct
 | #p #I #G #L #V #T #_ #s #H destruct
 | #I #G #L #V #T #s #H destruct
 | #I #G #L #T #U #HI12 #s #H destruct
@@ -69,18 +69,18 @@ fact fqu_inv_sort1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L
 ]
 qed-.
 
-lemma fqu_inv_sort1: ∀b,G1,G2,L1,L2,T2,s. ⦃G1, L1, ⋆s⦄ ⊐[b] ⦃G2, L2, T2⦄ →
+lemma fqu_inv_sort1: ∀b,G1,G2,L1,L2,T2,s. ⦃G1,L1,⋆s⦄ ⬂[b] ⦃G2,L2,T2⦄ →
                      ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & T2 = ⋆s.
 /2 width=4 by fqu_inv_sort1_aux/ qed-.
 
-fact fqu_inv_lref1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
+fact fqu_inv_lref1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ →
                         ∀i. T1 = #i →
                         (∃∃J,V. G1 = G2 & L1 = L2.ⓑ{J}V & T2 = V & i = 0) ∨
                         ∃∃J,j. G1 = G2 & L1 = L2.ⓘ{J} & T2 = #j & i = ↑j.
 #b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2
 [ #I #G #L #T #i #H destruct /3 width=4 by ex4_2_intro, or_introl/
 | #I #G #L #V #T #i #H destruct
-| #p #I #G #L #V #T #i #H destruct
+| #p #I #G #L #V #T #_ #i #H destruct
 | #p #I #G #L #V #T #_ #i #H destruct
 | #I #G #L #V #T #i #H destruct
 | #I #G #L #T #U #HI12 #i #H destruct
@@ -88,18 +88,18 @@ fact fqu_inv_lref1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L
 ]
 qed-.
 
-lemma fqu_inv_lref1: ∀b,G1,G2,L1,L2,T2,i. ⦃G1, L1, #i⦄ ⊐[b] ⦃G2, L2, T2⦄ →
+lemma fqu_inv_lref1: ∀b,G1,G2,L1,L2,T2,i. ⦃G1,L1,#i⦄ ⬂[b] ⦃G2,L2,T2⦄ →
                      (∃∃J,V. G1 = G2 & L1 = L2.ⓑ{J}V & T2 = V & i = 0) ∨
                      ∃∃J,j. G1 = G2 & L1 = L2.ⓘ{J} & T2 = #j & i = ↑j.
 /2 width=4 by fqu_inv_lref1_aux/ qed-.
 
-fact fqu_inv_gref1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
+fact fqu_inv_gref1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ →
                         ∀l. T1 = §l →
                         ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & T2 = §l.
 #b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2
 [ #I #G #L #T #l #H destruct
 | #I #G #L #V #T #l #H destruct
-| #p #I #G #L #V #T #l #H destruct
+| #p #I #G #L #V #T #_ #l #H destruct
 | #p #I #G #L #V #T #_ #l #H destruct
 | #I #G #L #V #T #s #H destruct
 | #I #G #L #T #U #HI12 #l #H destruct
@@ -107,43 +107,44 @@ fact fqu_inv_gref1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L
 ]
 qed-.
 
-lemma fqu_inv_gref1: ∀b,G1,G2,L1,L2,T2,l. ⦃G1, L1, §l⦄ ⊐[b] ⦃G2, L2, T2⦄ →
+lemma fqu_inv_gref1: ∀b,G1,G2,L1,L2,T2,l. ⦃G1,L1,§l⦄ ⬂[b] ⦃G2,L2,T2⦄ →
                      ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & T2 = §l.
 /2 width=4 by fqu_inv_gref1_aux/ qed-.
 
-fact fqu_inv_bind1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
+fact fqu_inv_bind1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ →
                         ∀p,I,V1,U1. T1 = ⓑ{p,I}V1.U1 →
                         ∨∨ ∧∧ G1 = G2 & L1 = L2 & V1 = T2
-                         | ∧∧ G1 = G2 & L1.ⓑ{I}V1 = L2 & U1 = T2
+                         | ∧∧ G1 = G2 & L1.ⓑ{I}V1 = L2 & U1 = T2 & b = Ⓣ
                          | ∧∧ G1 = G2 & L1.ⓧ = L2 & U1 = T2 & b = Ⓕ
                          | ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & ⬆*[1] T2 ≘ ⓑ{p,I}V1.U1.
 #b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2
 [ #I #G #L #T #q #J #V0 #U0 #H destruct
 | #I #G #L #V #T #q #J #V0 #U0 #H destruct /3 width=1 by and3_intro, or4_intro0/
-| #p #I #G #L #V #T #q #J #V0 #U0 #H destruct /3 width=1 by and3_intro, or4_intro1/
+| #p #I #G #L #V #T #Hb #q #J #V0 #U0 #H destruct /3 width=1 by and4_intro, or4_intro1/
 | #p #I #G #L #V #T #Hb #q #J #V0 #U0 #H destruct /3 width=1 by and4_intro, or4_intro2/
 | #I #G #L #V #T #q #J #V0 #U0 #H destruct
 | #I #G #L #T #U #HTU #q #J #V0 #U0 #H destruct /3 width=2 by or4_intro3, ex3_intro/
 ]
 qed-.
 
-lemma fqu_inv_bind1: ∀b,p,I,G1,G2,L1,L2,V1,U1,T2. ⦃G1, L1, ⓑ{p,I}V1.U1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
+lemma fqu_inv_bind1: ∀b,p,I,G1,G2,L1,L2,V1,U1,T2. ⦃G1,L1,ⓑ{p,I}V1.U1⦄ ⬂[b] ⦃G2,L2,T2⦄ →
                      ∨∨ ∧∧ G1 = G2 & L1 = L2 & V1 = T2
-                      | ∧∧ G1 = G2 & L1.ⓑ{I}V1 = L2 & U1 = T2
+                      | ∧∧ G1 = G2 & L1.ⓑ{I}V1 = L2 & U1 = T2 & b = Ⓣ
                       | ∧∧ G1 = G2 & L1.ⓧ = L2 & U1 = T2 & b = Ⓕ
                       | ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & ⬆*[1] T2 ≘ ⓑ{p,I}V1.U1.
 /2 width=4 by fqu_inv_bind1_aux/ qed-.
 
-lemma fqu_inv_bind1_true: ∀p,I,G1,G2,L1,L2,V1,U1,T2. ⦃G1, L1, ⓑ{p,I}V1.U1⦄ ⊐ ⦃G2, L2, T2⦄ →
+lemma fqu_inv_bind1_true: ∀p,I,G1,G2,L1,L2,V1,U1,T2. ⦃G1,L1,ⓑ{p,I}V1.U1⦄ ⬂ ⦃G2,L2,T2⦄ →
                           ∨∨ ∧∧ G1 = G2 & L1 = L2 & V1 = T2
                            | ∧∧ G1 = G2 & L1.ⓑ{I}V1 = L2 & U1 = T2
                            | ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & ⬆*[1] T2 ≘ ⓑ{p,I}V1.U1.
 #p #I #G1 #G2 #L1 #L2 #V1 #U1 #T2 #H elim (fqu_inv_bind1 … H) -H
-/3 width=1 by or3_intro0, or3_intro1, or3_intro2/
-* #_ #_ #_ #H destruct
+/3 width=1 by or3_intro0, or3_intro2/
+* #HG #HL #HU #H destruct
+/3 width=1 by and3_intro, or3_intro1/
 qed-.
 
-fact fqu_inv_flat1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
+fact fqu_inv_flat1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ →
                         ∀I,V1,U1. T1 = ⓕ{I}V1.U1 →
                         ∨∨ ∧∧ G1 = G2 & L1 = L2 & V1 = T2
                          | ∧∧ G1 = G2 & L1 = L2 & U1 = T2
@@ -151,14 +152,14 @@ fact fqu_inv_flat1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L
 #b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2
 [ #I #G #L #T #J #V0 #U0 #H destruct
 | #I #G #L #V #T #J #V0 #U0 #H destruct /3 width=1 by and3_intro, or3_intro0/
-| #p #I #G #L #V #T #J #V0 #U0 #H destruct
+| #p #I #G #L #V #T #_ #J #V0 #U0 #H destruct
 | #p #I #G #L #V #T #_ #J #V0 #U0 #H destruct
 | #I #G #L #V #T #J #V0 #U0 #H destruct /3 width=1 by and3_intro, or3_intro1/
 | #I #G #L #T #U #HTU #J #V0 #U0 #H destruct /3 width=2 by or3_intro2, ex3_intro/
 ]
 qed-.
 
-lemma fqu_inv_flat1: ∀b,I,G1,G2,L1,L2,V1,U1,T2. ⦃G1, L1, ⓕ{I}V1.U1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
+lemma fqu_inv_flat1: ∀b,I,G1,G2,L1,L2,V1,U1,T2. ⦃G1,L1,ⓕ{I}V1.U1⦄ ⬂[b] ⦃G2,L2,T2⦄ →
                      ∨∨ ∧∧ G1 = G2 & L1 = L2 & V1 = T2
                       | ∧∧ G1 = G2 & L1 = L2 & U1 = T2
                       | ∃∃J. G1 = G2 & L1 = L2.ⓘ{J} & ⬆*[1] T2 ≘ ⓕ{I}V1.U1.
@@ -166,31 +167,31 @@ lemma fqu_inv_flat1: ∀b,I,G1,G2,L1,L2,V1,U1,T2. ⦃G1, L1, ⓕ{I}V1.U1⦄ ⊐[
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma fqu_inv_atom1: ∀b,I,G1,G2,L2,T2. ⦃G1, ⋆, ⓪{I}⦄ ⊐[b] ⦃G2, L2, T2⦄ → ⊥.
+lemma fqu_inv_atom1: ∀b,I,G1,G2,L2,T2. ⦃G1,⋆,⓪{I}⦄ ⬂[b] ⦃G2,L2,T2⦄ → ⊥.
 #b * #x #G1 #G2 #L2 #T2 #H
 [ elim (fqu_inv_sort1 … H) | elim (fqu_inv_lref1 … H) * | elim (fqu_inv_gref1 … H) ] -H
 #I [2: #V |3: #i ] #_ #H destruct
 qed-.
 
-lemma fqu_inv_sort1_bind: ∀b,I,G1,G2,K,L2,T2,s. ⦃G1, K.ⓘ{I}, ⋆s⦄ ⊐[b] ⦃G2, L2, T2⦄ →
+lemma fqu_inv_sort1_bind: ∀b,I,G1,G2,K,L2,T2,s. ⦃G1,K.ⓘ{I},⋆s⦄ ⬂[b] ⦃G2,L2,T2⦄ →
                           ∧∧ G1 = G2 & L2 = K & T2 = ⋆s.
 #b #I #G1 #G2 #K #L2 #T2 #s #H elim (fqu_inv_sort1 … H) -H
 #Z #X #H1 #H2 destruct /2 width=1 by and3_intro/
 qed-.
 
-lemma fqu_inv_zero1_pair: ∀b,I,G1,G2,K,L2,V,T2. ⦃G1, K.ⓑ{I}V, #0⦄ ⊐[b] ⦃G2, L2, T2⦄ →
+lemma fqu_inv_zero1_pair: ∀b,I,G1,G2,K,L2,V,T2. ⦃G1,K.ⓑ{I}V,#0⦄ ⬂[b] ⦃G2,L2,T2⦄ →
                           ∧∧ G1 = G2 & L2 = K & T2 = V.
 #b #I #G1 #G2 #K #L2 #V #T2 #H elim (fqu_inv_lref1 … H) -H *
 #Z #X #H1 #H2 #H3 #H4 destruct /2 width=1 by and3_intro/
 qed-.
 
-lemma fqu_inv_lref1_bind: ∀b,I,G1,G2,K,L2,T2,i. ⦃G1, K.ⓘ{I}, #(↑i)⦄ ⊐[b] ⦃G2, L2, T2⦄ →
+lemma fqu_inv_lref1_bind: ∀b,I,G1,G2,K,L2,T2,i. ⦃G1,K.ⓘ{I},#(↑i)⦄ ⬂[b] ⦃G2,L2,T2⦄ →
                           ∧∧ G1 = G2 & L2 = K & T2 = #i.
 #b #I #G1 #G2 #K #L2 #T2 #i #H elim (fqu_inv_lref1 … H) -H *
 #Z #X #H1 #H2 #H3 #H4 destruct /2 width=1 by and3_intro/
 qed-.
 
-lemma fqu_inv_gref1_bind: ∀b,I,G1,G2,K,L2,T2,l. ⦃G1, K.ⓘ{I}, §l⦄ ⊐[b] ⦃G2, L2, T2⦄ →
+lemma fqu_inv_gref1_bind: ∀b,I,G1,G2,K,L2,T2,l. ⦃G1,K.ⓘ{I},§l⦄ ⬂[b] ⦃G2,L2,T2⦄ →
                           ∧∧ G1 = G2 & L2 = K & T2 = §l.
 #b #I #G1 #G2 #K #L2 #T2 #l #H elim (fqu_inv_gref1 … H) -H
 #Z #H1 #H2 #H3 destruct /2 width=1 by and3_intro/
index 2cfea06b829563ea76ab3c14b36590cad04fb62c..e9d8fcbfc7e34232b96d09eca65b4a18efc331d4 100644 (file)
@@ -19,13 +19,13 @@ include "static_2/s_transition/fqu.ma".
 
 (* Forward lemmas with length for local environments ************************)
 
-fact fqu_fwd_length_lref1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
+fact fqu_fwd_length_lref1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ →
                                ∀i. T1 = #i → |L2| < |L1|.
 #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 // [2,3: #p]
-#I #G #L #V #T [2: #_ ] #j #H destruct
+#I #G #L #V #T [1,2: #_ ] #j #H destruct
 qed-.
 
-lemma fqu_fwd_length_lref1: ∀b,G1,G2,L1,L2,T2,i. ⦃G1, L1, #i⦄ ⊐[b] ⦃G2, L2, T2⦄ →
+lemma fqu_fwd_length_lref1: ∀b,G1,G2,L1,L2,T2,i. ⦃G1,L1,#i⦄ ⬂[b] ⦃G2,L2,T2⦄ →
                             |L2| < |L1|.
 /2 width=8 by fqu_fwd_length_lref1_aux/
 qed-.
index 7deebbc611f41623f750873b0c30876408cdd0fc..fa341e42574f7dd833fe55181e3622d5c8c2baae 100644 (file)
@@ -17,11 +17,11 @@ include "static_2/s_transition/fqu_length.ma".
 
 (* SUPCLOSURE ***************************************************************)
 
-(* Inversion lemmas with context-free degree-based equivalence for terms ****)
+(* Inversion lemmas with context-free sort-irrelevant equivalence for terms *)
 
-fact fqu_inv_tdeq_aux: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
-                       G1 = G2 → |L1| = |L2| → T1 ≛[h, o] T2 → ⊥.
-#h #o #b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2
+fact fqu_inv_tdeq_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
 [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)
 ]
@@ -29,8 +29,8 @@ fact fqu_inv_tdeq_aux: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2
 qed-.
 
 (* Basic_2A1: uses: fqu_inv_eq *)
-lemma fqu_inv_tdeq: ∀h,o,b,G,L1,L2,T1,T2. ⦃G, L1, T1⦄ ⊐[b] ⦃G, L2, T2⦄ →
-                    |L1| = |L2| → T1 ≛[h, o] T2 → ⊥.
-#h #o #b #G #L1 #L2 #T1 #T2 #H
+lemma fqu_inv_tdeq: ∀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_tdeq_aux … H) // (**) (* full auto fails *)
 qed-. 
index 365f5c2dbc64d6539eefc44b906c37598356441f..3b9964b46ce54263e3fcf1f84b371a1e845771ed 100644 (file)
@@ -20,8 +20,8 @@ include "static_2/s_transition/fqu.ma".
 
 (* Forward lemmas with weight for closures **********************************)
 
-lemma fqu_fwd_fw: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
-                  ♯{G2, L2, T2} < ♯{G1, L1, T1}.
+lemma fqu_fwd_fw: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ →
+                  ♯{G2,L2,T2} < ♯{G1,L1,T1}.
 #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 //
 #I #I1 #I2 #G #L #HI12 normalize in ⊢ (?%%); -I1
 <(lifts_fwd_tw … HI12) /3 width=1 by monotonic_lt_plus_r, monotonic_lt_plus_l/
@@ -30,7 +30,7 @@ qed-.
 (* Advanced eliminators *****************************************************)
 
 lemma fqu_wf_ind: ∀b. ∀Q:relation3 …. (
-                     ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → Q G2 L2 T2) →
+                     ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ → Q G2 L2 T2) →
                                 Q G1 L1 T1
                              ) → ∀G1,L1,T1. Q G1 L1 T1.
 #b #Q #HQ @(f3_ind … fw) #x #IHx #G1 #L1 #T1 #H destruct /4 width=2 by fqu_fwd_fw/
index fc36281aa816da8f53e0a2378614793d351c3d95..d7736ab2013177b4cf901392a7e59e8fb36e67ef 100644 (file)
@@ -37,7 +37,7 @@ interpretation
 lemma fquq_refl: ∀b. tri_reflexive … (fquq b).
 // qed.
 
-lemma fqu_fquq: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄.
+lemma fqu_fquq: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂[b] ⦃G2,L2,T2⦄ → ⦃G1,L1,T1⦄ ⬂⸮[b] ⦃G2,L2,T2⦄.
 /2 width=1 by or_introl/ qed.
 
 (* Basic_2A1: removed theorems 8:
index 08a70b7c3daf37629f4108e9f7195f7ede46919e..3985a6c9ebb43f3df2dd709d8424078244a1be48 100644 (file)
@@ -19,7 +19,7 @@ include "static_2/s_transition/fquq.ma".
 
 (* Forward lemmas with length for local environments ************************)
 
-lemma fquq_fwd_length_lref1: ∀b,G1,G2,L1,L2,T2,i. ⦃G1, L1, #i⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ →
+lemma fquq_fwd_length_lref1: ∀b,G1,G2,L1,L2,T2,i. ⦃G1,L1,#i⦄ ⬂⸮[b] ⦃G2,L2,T2⦄ →
                              |L2| ≤ |L1|.
 #b #G1 #G2 #L1 #L2 #T2 #i #H elim H -H [2: * ]
 /3 width=6 by fqu_fwd_length_lref1, lt_to_le/
index 8a8ef78a7718b233a790303a18f977940a3fed85..3aab7facead4414bcb8c8c633d392b787cfd9ce3 100644 (file)
@@ -19,8 +19,8 @@ include "static_2/s_transition/fquq.ma".
 
 (* Forward lemmas with weight for closures **********************************)
 
-lemma fquq_fwd_fw: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ →
-                   ♯{G2, L2, T2} ≤ ♯{G1, L1, T1}.
+lemma fquq_fwd_fw: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂⸮[b] ⦃G2,L2,T2⦄ →
+                   ♯{G2,L2,T2} ≤ ♯{G1,L1,T1}.
 #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -H [2: * ]
 /3 width=2 by fqu_fwd_fw, lt_to_le/
 qed-.
index b7e9ca046cdf55052a7eb343a3fff47efb779ae2..d204bdc21a729689a9def69e6cf0bed133f60300 100644 (file)
@@ -37,7 +37,7 @@ interpretation "atomic arity assignment (term)"
 
 (* Basic inversion lemmas ***************************************************)
 
-fact aaa_inv_sort_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀s. T = ⋆s → A = ⓪.
+fact aaa_inv_sort_aux: ∀G,L,T,A. ⦃G,L⦄ ⊢ T ⁝ A → ∀s. T = ⋆s → A = ⓪.
 #G #L #T #A * -G -L -T -A //
 [ #I #G #L #V #B #_ #s #H destruct
 | #I #G #L #A #i #_ #s #H destruct
@@ -48,11 +48,11 @@ fact aaa_inv_sort_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀s. T = ⋆s →
 ]
 qed-.
 
-lemma aaa_inv_sort: ∀G,L,A,s. ⦃G, L⦄ ⊢ ⋆s ⁝ A → A = ⓪.
+lemma aaa_inv_sort: ∀G,L,A,s. ⦃G,L⦄ ⊢ ⋆s ⁝ A → A = ⓪.
 /2 width=6 by aaa_inv_sort_aux/ qed-.
 
-fact aaa_inv_zero_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → T = #0 →
-                       ∃∃I,K,V. L = K.ⓑ{I}V & ⦃G, K⦄ ⊢ V ⁝ A.
+fact aaa_inv_zero_aux: ∀G,L,T,A. ⦃G,L⦄ ⊢ T ⁝ A → T = #0 →
+                       ∃∃I,K,V. L = K.ⓑ{I}V & ⦃G,K⦄ ⊢ V ⁝ A.
 #G #L #T #A * -G -L -T -A /2 width=5 by ex2_3_intro/
 [ #G #L #s #H destruct
 | #I #G #L #A #i #_ #H destruct
@@ -63,12 +63,12 @@ fact aaa_inv_zero_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → T = #0 →
 ]
 qed-.
 
-lemma aaa_inv_zero: ∀G,L,A. ⦃G, L⦄ ⊢ #0 ⁝ A →
-                    ∃∃I,K,V. L = K.ⓑ{I}V & ⦃G, K⦄ ⊢ V ⁝ A.
+lemma aaa_inv_zero: ∀G,L,A. ⦃G,L⦄ ⊢ #0 ⁝ A →
+                    ∃∃I,K,V. L = K.ⓑ{I}V & ⦃G,K⦄ ⊢ V ⁝ A.
 /2 width=3 by aaa_inv_zero_aux/ qed-.
 
-fact aaa_inv_lref_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀i. T = #(↑i) →
-                       ∃∃I,K. L = K.ⓘ{I} & ⦃G, K⦄ ⊢ #i ⁝ A.
+fact aaa_inv_lref_aux: ∀G,L,T,A. ⦃G,L⦄ ⊢ T ⁝ A → ∀i. T = #(↑i) →
+                       ∃∃I,K. L = K.ⓘ{I} & ⦃G,K⦄ ⊢ #i ⁝ A.
 #G #L #T #A * -G -L -T -A
 [ #G #L #s #j #H destruct
 | #I #G #L #V #B #_ #j #H destruct
@@ -80,11 +80,11 @@ fact aaa_inv_lref_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀i. T = #(↑i)
 ]
 qed-.
 
-lemma aaa_inv_lref: ∀G,L,A,i. ⦃G, L⦄ ⊢ #↑i ⁝ A →
-                    ∃∃I,K. L = K.ⓘ{I} & ⦃G, K⦄ ⊢ #i ⁝ A.
+lemma aaa_inv_lref: ∀G,L,A,i. ⦃G,L⦄ ⊢ #↑i ⁝ A →
+                    ∃∃I,K. L = K.ⓘ{I} & ⦃G,K⦄ ⊢ #i ⁝ A.
 /2 width=3 by aaa_inv_lref_aux/ qed-.
 
-fact aaa_inv_gref_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀l. T = §l → ⊥.
+fact aaa_inv_gref_aux: ∀G,L,T,A. ⦃G,L⦄ ⊢ T ⁝ A → ∀l. T = §l → ⊥.
 #G #L #T #A * -G -L -T -A
 [ #G #L #s #k #H destruct
 | #I #G #L #V #B #_ #k #H destruct
@@ -96,11 +96,11 @@ fact aaa_inv_gref_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀l. T = §l →
 ]
 qed-.
 
-lemma aaa_inv_gref: ∀G,L,A,l. ⦃G, L⦄ ⊢ §l ⁝ A → ⊥.
+lemma aaa_inv_gref: ∀G,L,A,l. ⦃G,L⦄ ⊢ §l ⁝ A → ⊥.
 /2 width=7 by aaa_inv_gref_aux/ qed-.
 
-fact aaa_inv_abbr_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀p,W,U. T = ⓓ{p}W.U →
-                       ∃∃B. ⦃G, L⦄ ⊢ W ⁝ B & ⦃G, L.ⓓW⦄ ⊢ U ⁝ A.
+fact aaa_inv_abbr_aux: ∀G,L,T,A. ⦃G,L⦄ ⊢ T ⁝ A → ∀p,W,U. T = ⓓ{p}W.U →
+                       ∃∃B. ⦃G,L⦄ ⊢ W ⁝ B & ⦃G,L.ⓓW⦄ ⊢ U ⁝ A.
 #G #L #T #A * -G -L -T -A
 [ #G #L #s #q #W #U #H destruct
 | #I #G #L #V #B #_ #q #W #U #H destruct
@@ -112,12 +112,12 @@ fact aaa_inv_abbr_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀p,W,U. T = ⓓ{
 ]
 qed-.
 
-lemma aaa_inv_abbr: ∀p,G,L,V,T,A. ⦃G, L⦄ ⊢ ⓓ{p}V.T ⁝ A →
-                    ∃∃B. ⦃G, L⦄ ⊢ V ⁝ B & ⦃G, L.ⓓV⦄ ⊢ T ⁝ A.
+lemma aaa_inv_abbr: ∀p,G,L,V,T,A. ⦃G,L⦄ ⊢ ⓓ{p}V.T ⁝ A →
+                    ∃∃B. ⦃G,L⦄ ⊢ V ⁝ B & ⦃G,L.ⓓV⦄ ⊢ T ⁝ A.
 /2 width=4 by aaa_inv_abbr_aux/ qed-.
 
-fact aaa_inv_abst_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀p,W,U. T = ⓛ{p}W.U →
-                       ∃∃B1,B2. ⦃G, L⦄ ⊢ W ⁝ B1 & ⦃G, L.ⓛW⦄ ⊢ U ⁝ B2 & A = ②B1.B2.
+fact aaa_inv_abst_aux: ∀G,L,T,A. ⦃G,L⦄ ⊢ T ⁝ A → ∀p,W,U. T = ⓛ{p}W.U →
+                       ∃∃B1,B2. ⦃G,L⦄ ⊢ W ⁝ B1 & ⦃G,L.ⓛW⦄ ⊢ U ⁝ B2 & A = ②B1.B2.
 #G #L #T #A * -G -L -T -A
 [ #G #L #s #q #W #U #H destruct
 | #I #G #L #V #B #_ #q #W #U #H destruct
@@ -129,12 +129,12 @@ fact aaa_inv_abst_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀p,W,U. T = ⓛ{
 ]
 qed-.
 
-lemma aaa_inv_abst: ∀p,G,L,W,T,A. ⦃G, L⦄ ⊢ ⓛ{p}W.T ⁝ A →
-                    ∃∃B1,B2. ⦃G, L⦄ ⊢ W ⁝ B1 & ⦃G, L.ⓛW⦄ ⊢ T ⁝ B2 & A = ②B1.B2.
+lemma aaa_inv_abst: ∀p,G,L,W,T,A. ⦃G,L⦄ ⊢ ⓛ{p}W.T ⁝ A →
+                    ∃∃B1,B2. ⦃G,L⦄ ⊢ W ⁝ B1 & ⦃G,L.ⓛW⦄ ⊢ T ⁝ B2 & A = ②B1.B2.
 /2 width=4 by aaa_inv_abst_aux/ qed-.
 
-fact aaa_inv_appl_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀W,U. T = ⓐW.U →
-                       ∃∃B. ⦃G, L⦄ ⊢ W ⁝ B & ⦃G, L⦄ ⊢ U ⁝ ②B.A.
+fact aaa_inv_appl_aux: ∀G,L,T,A. ⦃G,L⦄ ⊢ T ⁝ A → ∀W,U. T = ⓐW.U →
+                       ∃∃B. ⦃G,L⦄ ⊢ W ⁝ B & ⦃G,L⦄ ⊢ U ⁝ ②B.A.
 #G #L #T #A * -G -L -T -A
 [ #G #L #s #W #U #H destruct
 | #I #G #L #V #B #_ #W #U #H destruct
@@ -146,12 +146,12 @@ fact aaa_inv_appl_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀W,U. T = ⓐW.U
 ]
 qed-.
 
-lemma aaa_inv_appl: ∀G,L,V,T,A. ⦃G, L⦄ ⊢ ⓐV.T ⁝ A →
-                    ∃∃B. ⦃G, L⦄ ⊢ V ⁝ B & ⦃G, L⦄ ⊢ T ⁝ ②B.A.
+lemma aaa_inv_appl: ∀G,L,V,T,A. ⦃G,L⦄ ⊢ ⓐV.T ⁝ A →
+                    ∃∃B. ⦃G,L⦄ ⊢ V ⁝ B & ⦃G,L⦄ ⊢ T ⁝ ②B.A.
 /2 width=3 by aaa_inv_appl_aux/ qed-.
 
-fact aaa_inv_cast_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀W,U. T = ⓝW.U →
-                       ⦃G, L⦄ ⊢ W ⁝ A ∧ ⦃G, L⦄ ⊢ U ⁝ A.
+fact aaa_inv_cast_aux: ∀G,L,T,A. ⦃G,L⦄ ⊢ T ⁝ A → ∀W,U. T = ⓝW.U →
+                       ⦃G,L⦄ ⊢ W ⁝ A ∧ ⦃G,L⦄ ⊢ U ⁝ A.
 #G #L #T #A * -G -L -T -A
 [ #G #L #s #W #U #H destruct
 | #I #G #L #V #B #_ #W #U #H destruct
@@ -163,6 +163,6 @@ fact aaa_inv_cast_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀W,U. T = ⓝW.U
 ]
 qed-.
 
-lemma aaa_inv_cast: ∀G,L,W,T,A. ⦃G, L⦄ ⊢ ⓝW.T ⁝ A →
-                    ⦃G, L⦄ ⊢ W ⁝ A ∧ ⦃G, L⦄ ⊢ T ⁝ A.
+lemma aaa_inv_cast: ∀G,L,W,T,A. ⦃G,L⦄ ⊢ ⓝW.T ⁝ A →
+                    ⦃G,L⦄ ⊢ W ⁝ A ∧ ⦃G,L⦄ ⊢ T ⁝ A.
 /2 width=3 by aaa_inv_cast_aux/ qed-.
index 15b4fe4e1d538af46c888fef18ea3755cf5b2936..968112846023fbdcca88e05c57f5911a48e82a60 100644 (file)
@@ -18,7 +18,7 @@ include "static_2/static/aaa.ma".
 
 (* Main inversion lemmas ****************************************************)
 
-theorem aaa_mono: ∀G,L,T,A1. ⦃G, L⦄ ⊢ T ⁝ A1 → ∀A2. ⦃G, L⦄ ⊢ T ⁝ A2 → A1 = A2.
+theorem aaa_mono: ∀G,L,T,A1. ⦃G,L⦄ ⊢ T ⁝ A1 → ∀A2. ⦃G,L⦄ ⊢ T ⁝ A2 → A1 = A2.
 #G #L #T #A1 #H elim H -G -L -T -A1
 [ #G #L #s #A2 #H >(aaa_inv_sort … H) -H //
 | #I1 #G #L #V1 #B #_ #IH #A2 #H
@@ -36,3 +36,22 @@ theorem aaa_mono: ∀G,L,T,A1. ⦃G, L⦄ ⊢ T ⁝ A1 → ∀A2. ⦃G, L⦄ ⊢
   elim (aaa_inv_cast … H) -H /2 width=1 by/
 ]
 qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma aaa_aaa_inv_appl (G) (L) (V) (T) (B) (X):
+      ∀A. ⦃G,L⦄ ⊢ ⓐV.T ⁝ A → ⦃G,L⦄ ⊢ V ⁝ B → ⦃G,L⦄⊢ T ⁝ X → ②B.A = X.
+#G #L #V #T #B #X #A #H #H1V #H1T
+elim (aaa_inv_appl … H) -H #B0 #H2V #H2T
+lapply (aaa_mono … H2V … H1V) -V #H destruct
+lapply (aaa_mono … H2T … H1T) -G -L -T //
+qed-.
+
+lemma aaa_aaa_inv_cast (G) (L) (U) (T) (B) (A):
+      ∀X. ⦃G,L⦄ ⊢ ⓝU.T ⁝ X → ⦃G,L⦄ ⊢ U ⁝ B → ⦃G,L⦄⊢ T ⁝ A → ∧∧ B = X & A = X.
+#G #L #U #T #B #A #X #H #H1U #H1T
+elim (aaa_inv_cast … H) -H #H2U #H2T
+lapply (aaa_mono … H1U … H2U) -U #HB
+lapply (aaa_mono … H1T … H2T) -G -L -T #HA
+/2 width=1 by conj/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/static_2/static/aaa_dec.ma b/matita/matita/contribs/lambdadelta/static_2/static/aaa_dec.ma
new file mode 100644 (file)
index 0000000..0456573
--- /dev/null
@@ -0,0 +1,80 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/static/aaa_drops.ma".
+include "static_2/static/aaa_aaa.ma".
+
+(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
+
+(* Main properties **********************************************************)
+
+theorem aaa_dec (G) (L) (T): Decidable (∃A. ⦃G,L⦄ ⊢ T ⁝ A).
+#G #L #T @(fqup_wf_ind_eq (Ⓣ) … G L T) -G -L -T
+#G0 #L0 #T0 #IH #G #L * * [||| #p * | * ]
+[ #s #HG #HL #HT destruct -IH
+  /3 width=2 by aaa_sort, ex_intro, or_introl/
+| #i #HG #HL #HT destruct
+  elim (drops_F_uni L i) [| * * #I [| #V ] #K ] #HLK
+  [1,2: -IH
+    @or_intror * #A #H
+    elim (aaa_inv_lref_drops … H) -H #J #Y #X #HLY #_ -G -A
+    lapply (drops_mono … HLY … HLK) -L -i #H destruct
+  | elim (IH G K V) -IH [3: /2 width=2 by fqup_lref/ ]
+    [ * /4 width=6 by aaa_lref_drops, ex_intro, or_introl/
+    | #H0 @or_intror * #A #H
+      lapply (aaa_pair_inv_lref … H … HLK) -I -L -i
+      /3 width=2 by ex_intro/
+    ]
+  ]
+| #l #HG #HL #HT destruct -IH
+  @or_intror * #A #H
+  @(aaa_inv_gref … H)
+| #V #T #HG #HL #HT destruct
+  elim (IH G L V) [ * #B #HB | #HnB | // ]
+  [ elim (IH G (L.ⓓV) T) [ * #A #HA | #HnA | // ] ] -IH
+  [ /4 width=2 by aaa_abbr, ex_intro, or_introl/ ]
+  @or_intror * #A #H
+  elim (aaa_inv_abbr … H) -H #B0 #HB0 #HA0
+  /3 width=2 by ex_intro/
+| #W #T #HG #HL #HT destruct
+  elim (IH G L W) [ * #B #HB | #HnB | // ]
+  [ elim (IH G (L.ⓛW) T) [ * #A #HA | #HnA | // ] ] -IH
+  [ /4 width=2 by aaa_abst, ex_intro, or_introl/ ]
+  @or_intror * #A #H
+  elim (aaa_inv_abst … H) -H #B0 #A0 #HB0 #HA0 #H destruct
+  /3 width=2 by ex_intro/
+| #V #T #HG #HL #HT destruct
+  elim (IH G L V) [ * #B #HB | #HnB | // ]
+  [ elim (IH G L T) [ * #X #HX | #HnX | // ] ] -IH
+  [ elim (is_apear_dec B X) [ * #A #H destruct | #HnX ]
+    [ /4 width=4 by aaa_appl, ex_intro, or_introl/ ]
+  ]
+  @or_intror * #A #H
+  [ lapply (aaa_aaa_inv_appl … H HB HX) -G -L -V -T
+  |*: elim (aaa_inv_appl … H) -H #B0 #HB0 #HA0
+  ]
+  /3 width=2 by ex_intro/
+| #U #T #HG #HL #HT destruct
+  elim (IH G L U) [ * #B #HB | #HnB | // ]
+  [ elim (IH G L T) [ * #A #HA | #HnA | // ] ] -IH
+  [ elim (eq_aarity_dec B A) [ #H destruct | #HnA ]
+    [ /4 width=3 by aaa_cast, ex_intro, or_introl/ ]
+  ]
+  @or_intror * #X #H
+  [ elim (aaa_aaa_inv_cast … H HB HA) -G -L -U -T
+  |*: elim (aaa_inv_cast … H) -H #HU #HT
+  ]
+  /3 width=2 by ex_intro/
+]
+qed-.
index 1cc311ddf48e2261c8203e2feb9a64cbb692c9a3..b04f0c05f296b6511eca2601095aa9c0ea026112 100644 (file)
@@ -22,7 +22,7 @@ include "static_2/static/aaa.ma".
 (* Advanced properties ******************************************************)
 
 (* Basic_2A1: was: aaa_lref *)
-lemma aaa_lref_drops: ∀I,G,K,V,B,i,L. ⬇*[i] L ≘ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ⁝ B → ⦃G, L⦄ ⊢ #i ⁝ B.
+lemma aaa_lref_drops: ∀I,G,K,V,B,i,L. ⬇*[i] L ≘ K.ⓑ{I}V → ⦃G,K⦄ ⊢ V ⁝ B → ⦃G,L⦄ ⊢ #i ⁝ B.
 #I #G #K #V #B #i elim i -i
 [ #L #H lapply (drops_fwd_isid … H ?) -H //
   #H destruct /2 width=1 by aaa_zero/
@@ -34,8 +34,8 @@ qed.
 (* Advanced inversion lemmas ************************************************)
 
 (* Basic_2A1: was: aaa_inv_lref *)
-lemma aaa_inv_lref_drops: ∀G,A,i,L. ⦃G, L⦄ ⊢ #i ⁝ A →
-                          ∃∃I,K,V. ⬇*[i] L ≘ K.ⓑ{I}V & ⦃G, K⦄ ⊢ V ⁝ A.
+lemma aaa_inv_lref_drops: ∀G,A,i,L. ⦃G,L⦄ ⊢ #i ⁝ A →
+                          ∃∃I,K,V. ⬇*[i] L ≘ K.ⓑ{I}V & ⦃G,K⦄ ⊢ V ⁝ A.
 #G #A #i elim i -i
 [ #L #H elim (aaa_inv_zero … H) -H /3 width=5 by drops_refl, ex2_3_intro/
 | #i #IH #L #H elim (aaa_inv_lref … H) -H
@@ -43,12 +43,19 @@ lemma aaa_inv_lref_drops: ∀G,A,i,L. ⦃G, L⦄ ⊢ #i ⁝ A →
 ]
 qed-.
 
+lemma aaa_pair_inv_lref (G) (L) (i):
+      ∀A. ⦃G,L⦄ ⊢ #i ⁝ A → ∀I,K,V. ⬇*[i] L ≘ K.ⓑ{I}V → ⦃G,K⦄ ⊢ V ⁝ A.
+#G #L #i #A #H #I #K #V #HLK
+elim (aaa_inv_lref_drops … H) -H #J #Y #X #HLY #HX
+lapply (drops_mono … HLY … HLK) -L -i #H destruct //
+qed-.
+
 (* Properties with generic slicing for local environments *******************)
 
 (* Basic_2A1: includes: aaa_lift *)
 (* Note: it should use drops_split_trans_pair2 *)
-lemma aaa_lifts: ∀G,L1,T1,A. ⦃G, L1⦄ ⊢ T1 ⁝ A → ∀b,f,L2. ⬇*[b, f] L2 ≘ L1 →
-                 ∀T2. ⬆*[f] T1 ≘ T2 → ⦃G, L2⦄ ⊢ T2 ⁝ A.
+lemma aaa_lifts: ∀G,L1,T1,A. ⦃G,L1⦄ ⊢ T1 ⁝ A → ∀b,f,L2. ⬇*[b,f] L2 ≘ L1 →
+                 ∀T2. ⬆*[f] T1 ≘ T2 → ⦃G,L2⦄ ⊢ T2 ⁝ A.
 @(fqup_wf_ind_eq (Ⓣ)) #G0 #L0 #T0 #IH #G #L1 * *
 [ #s #HG #HL #HT #A #H #b #f #L2 #HL21 #X #HX -b -IH
   lapply (aaa_inv_sort … H) -H #H destruct
@@ -86,8 +93,8 @@ qed-.
 (* Inversion lemmas with generic slicing for local environments *************)
 
 (* Basic_2A1: includes: aaa_inv_lift *)
-lemma aaa_inv_lifts: ∀G,L2,T2,A. ⦃G, L2⦄ ⊢ T2 ⁝ A → ∀b,f,L1. ⬇*[b, f] L2 ≘ L1 →
-                     ∀T1. ⬆*[f] T1 ≘ T2 → ⦃G, L1⦄ ⊢ T1 ⁝ A.
+lemma aaa_inv_lifts: ∀G,L2,T2,A. ⦃G,L2⦄ ⊢ T2 ⁝ A → ∀b,f,L1. ⬇*[b,f] L2 ≘ L1 →
+                     ∀T1. ⬆*[f] T1 ≘ T2 → ⦃G,L1⦄ ⊢ T1 ⁝ A.
 @(fqup_wf_ind_eq (Ⓣ)) #G0 #L0 #T0 #IH #G #L2 * *
 [ #s #HG #HL #HT #A #H #b #f #L1 #HL21 #X #HX -b -IH
   lapply (aaa_inv_sort … H) -H #H destruct
index 4572fda32512d3c5b9e766200b9ced045d3fef00..d002095bb9b307470a8748841e068e1f464d8832 100644 (file)
@@ -17,9 +17,9 @@ include "static_2/static/aaa_rdeq.ma".
 
 (* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
 
-(* Properties with degree-based equivalence on referred entries *************)
+(* Properties with sort-irrelevant equivalence on referred entries **********)
 
-lemma aaa_fdeq_conf: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ → 
-                     ∀A. ⦃G1, L1⦄ ⊢ T1 ⁝ A → ⦃G2, L2⦄ ⊢ T2 ⁝ A.
-#h #o #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
-/2 width=7 by aaa_tdeq_conf_rdeq/ qed-.
+lemma aaa_fdeq_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_tdeq_conf_rdeq/ qed-.
index f02455f9fa55434f02601f2e632da84c9cdb6179..4ba7d8c56eec86d048aaf56f17da8b5502c1e378 100644 (file)
@@ -19,8 +19,8 @@ include "static_2/static/aaa_drops.ma".
 
 (* Properties on supclosure *************************************************)
 
-lemma aaa_fqu_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ →
-                    ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2.
+lemma aaa_fqu_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂ ⦃G2,L2,T2⦄ →
+                    ∀A1. ⦃G1,L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2,L2⦄ ⊢ T2 ⁝ A2.
 #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
 [ #I #G #L #T #A #H elim (aaa_inv_zero … H) -H
   #J #K #V #H #HA destruct /2 width=2 by ex_intro/
@@ -30,7 +30,7 @@ lemma aaa_fqu_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄
   | elim (aaa_inv_appl … H)
   | elim (aaa_inv_cast … H)
   ] -H /2 width=2 by ex_intro/
-| #p * #G #L #V #T #X #H
+| #p * #G #L #V #T #_ #X #H
   [ elim (aaa_inv_abbr … H)
   | elim (aaa_inv_abst … H)
   ] -H /2 width=2 by ex_intro/
@@ -43,21 +43,21 @@ lemma aaa_fqu_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄
 ]
 qed-.
 
-lemma aaa_fquq_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ →
-                     ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2.
+lemma aaa_fquq_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂⸮ ⦃G2,L2,T2⦄ →
+                     ∀A1. ⦃G1,L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2,L2⦄ ⊢ T2 ⁝ A2.
 #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -H /2 width=6 by aaa_fqu_conf/
 * #H1 #H2 #H3 destruct /2 width=2 by ex_intro/
 qed-.
 
-lemma aaa_fqup_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ →
-                     ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2.
+lemma aaa_fqup_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂+ ⦃G2,L2,T2⦄ →
+                     ∀A1. ⦃G1,L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2,L2⦄ ⊢ T2 ⁝ A2.
 #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2
 [2: #G #G2 #L #L2 #T #T2 #_ #H2 #IH1 #A #HA elim (IH1 … HA) -IH1 -A ]
 /2 width=6 by aaa_fqu_conf/
 qed-.
 
-lemma aaa_fqus_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ →
-                     ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2.
+lemma aaa_fqus_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ⬂* ⦃G2,L2,T2⦄ →
+                     ∀A1. ⦃G1,L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2,L2⦄ ⊢ T2 ⁝ A2.
 #G1 #G2 #L1 #L2 #T1 #T2 #H elim(fqus_inv_fqup … H) -H /2 width=6 by aaa_fqup_conf/
 * #H1 #H2 #H3 destruct /2 width=2 by ex_intro/
 qed-.
index 23760c8bd3d829e0565a748dfdfc88dbcc175456..c08a024874c22c577ab0294d2ae979e9ebf515d6 100644 (file)
@@ -17,11 +17,11 @@ include "static_2/static/aaa.ma".
 
 (* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
 
-(* Properties with degree-based equivalence on referred entries *************)
+(* Properties with sort-irrelevant equivalence on referred entries **********)
 
-lemma aaa_tdeq_conf_rdeq: ∀h,o,G,L1,T1,A. ⦃G, L1⦄ ⊢ T1 ⁝ A → ∀T2. T1 ≛[h, o] T2 →
-                          ∀L2. L1 ≛[h, o, T1] L2 → ⦃G, L2⦄ ⊢ T2 ⁝ A.
-#h #o #G #L1 #T1 #A #H elim H -G -L1 -T1 -A
+lemma aaa_tdeq_conf_rdeq: ∀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 (tdeq_inv_sort1 … H1) -H1 //
 | #I #G #L1 #V1 #B #_ #IH #X #H1 >(tdeq_inv_lref1 … H1) -H1
   #Y #H2 elim (rdeq_inv_zero_pair_sn … H2) -H2
index 25427895c36e96517fba7bb5cbe95fc02a290e5d..1c5b47ba158f459a73fc6b89657e3c32a710f661 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
-include "static_2/notation/relations/stareqsn_8.ma".
+include "static_2/notation/relations/stareqsn_6.ma".
 include "static_2/syntax/genv.ma".
 include "static_2/static/rdeq.ma".
 
-(* DEGREE-BASED EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES ****************)
+(* SORT-IRRELEVANT EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *************)
 
-inductive fdeq (h) (o) (G) (L1) (T1): relation3 genv lenv term ≝
-| fdeq_intro_sn: ∀L2,T2. L1 ≛[h, o, T1] L2 → T1 ≛[h, o] T2 →
-                 fdeq h o G L1 T1 G L2 T2
+inductive fdeq (G) (L1) (T1): relation3 genv lenv term ≝
+| fdeq_intro_sn: ∀L2,T2. L1 ≛[T1] L2 → T1 ≛ T2 →
+                 fdeq G L1 T1 G L2 T2
 .
 
 interpretation
-   "degree-based equivalence on referred entries (closure)"
-   'StarEqSn h o G1 L1 T1 G2 L2 T2 = (fdeq h o G1 L1 T1 G2 L2 T2).
+   "sort-irrelevant equivalence on referred entries (closure)"
+   'StarEqSn G1 L1 T1 G2 L2 T2 = (fdeq G1 L1 T1 G2 L2 T2).
 
 (* Basic_properties *********************************************************)
 
-lemma fdeq_intro_dx (h) (o) (G): ∀L1,L2,T2. L1 ≛[h, o, T2] L2 →
-                                 ∀T1. T1 ≛[h, o] T2 → ⦃G, L1, T1⦄ ≛[h, o] ⦃G, L2, T2⦄.
+lemma fdeq_intro_dx (G): ∀L1,L2,T2. L1 ≛[T2] L2 →
+                         ∀T1. T1 ≛ T2 → ⦃G,L1,T1⦄ ≛ ⦃G,L2,T2⦄.
 /3 width=3 by fdeq_intro_sn, tdeq_rdeq_div/ qed.
 
 (* Basic inversion lemmas ***************************************************)
 
-lemma fdeq_inv_gen_sn: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ →
-                       ∧∧ G1 = G2 & L1 ≛[h, o, T1] L2 & T1 ≛[h, o] T2.
-#h #o #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 /2 width=1 by and3_intro/
+lemma fdeq_inv_gen_sn: ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ≛ ⦃G2,L2,T2⦄ →
+                       ∧∧ G1 = G2 & L1 ≛[T1] L2 & T1 ≛ T2.
+#G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 /2 width=1 by and3_intro/
 qed-.
 
-lemma fdeq_inv_gen_dx: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ →
-                       ∧∧ G1 = G2 & L1 ≛[h, o, T2] L2 & T1 ≛[h, o] T2.
-#h #o #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
+lemma fdeq_inv_gen_dx: ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ≛ ⦃G2,L2,T2⦄ →
+                       ∧∧ G1 = G2 & L1 ≛[T2] L2 & T1 ≛ T2.
+#G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
 /3 width=3 by tdeq_rdeq_conf, and3_intro/
 qed-.
 
index 729185985421384618ad585387df1fdae958183d..1edc17d50d5f4065d16e7cb050bf8c5c3c0b9ad2 100644 (file)
 include "static_2/static/rdeq_rdeq.ma".
 include "static_2/static/fdeq.ma".
 
-(* DEGREE-BASED EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES ****************)
+(* SORT-IRRELEVANT EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *************)
 
 (* Advanced properties ******************************************************)
 
-lemma fdeq_sym: ∀h,o. tri_symmetric … (fdeq h o).
-#h #o #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -L1 -T1
+lemma fdeq_sym: tri_symmetric … fdeq.
+#G1 #G2 #L1 #L2 #T1 #T2 * -G1 -L1 -T1
 /3 width=1 by fdeq_intro_dx, rdeq_sym, tdeq_sym/
 qed-.
 
 (* Main properties **********************************************************)
 
-theorem fdeq_trans: ∀h,o. tri_transitive … (fdeq h o).
-#h #o #G1 #G #L1 #L #T1 #T * -G -L -T
+theorem fdeq_trans: tri_transitive … fdeq.
+#G1 #G #L1 #L #T1 #T * -G -L -T
 #L #T #HL1 #HT1 #G2 #L2 #T2 * -G2 -L2 -T2
 /4 width=5 by fdeq_intro_sn, rdeq_trans, tdeq_rdeq_div, tdeq_trans/
 qed-.
 
-theorem fdeq_canc_sn: ∀h,o,G,G1,G2,L,L1,L2,T,T1,T2.
-                      â¦\83G, L, Tâ¦\84 â\89\9b[h, o] â¦\83G1, L1, T1â¦\84â\86\92 â¦\83G, L, Tâ¦\84 â\89\9b[h, o] â¦\83G2, L2, T2â¦\84 â\86\92 â¦\83G1, L1, T1â¦\84 â\89\9b[h, o] â¦\83G2, L2, T2⦄.
+theorem fdeq_canc_sn: ∀G,G1,L,L1,T,T1. ⦃G,L,T⦄ ≛ ⦃G1,L1,T1⦄→
+                      â\88\80G2,L2,T2. â¦\83G,L,Tâ¦\84 â\89\9b â¦\83G2,L2,T2â¦\84 â\86\92 â¦\83G1,L1,T1â¦\84 â\89\9b â¦\83G2,L2,T2⦄.
 /3 width=5 by fdeq_trans, fdeq_sym/ qed-.
 
-theorem fdeq_canc_dx: ∀h,o,G1,G2,G,L1,L2,L,T1,T2,T.
-                      â¦\83G1, L1, T1â¦\84 â\89\9b[h, o] â¦\83G, L, Tâ¦\84 â\86\92 â¦\83G2, L2, T2â¦\84 â\89\9b[h, o] â¦\83G, L, Tâ¦\84 â\86\92 â¦\83G1, L1, T1â¦\84 â\89\9b[h, o] â¦\83G2, L2, T2⦄.
+theorem fdeq_canc_dx: ∀G1,G,L1,L,T1,T. ⦃G1,L1,T1⦄ ≛ ⦃G,L,T⦄ →
+                      â\88\80G2,L2,T2. â¦\83G2,L2,T2â¦\84 â\89\9b â¦\83G,L,Tâ¦\84 â\86\92 â¦\83G1,L1,T1â¦\84 â\89\9b â¦\83G2,L2,T2⦄.
 /3 width=5 by fdeq_trans, fdeq_sym/ qed-.
 
 (* Main inversion lemmas with degree-based equivalence on terms *************)
 
-theorem fdeq_tdneq_repl_dx: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ →
-                            ∀U1,U2. ⦃G1, L1, U1⦄ ≛[h, o] ⦃G2, L2, U2⦄ →
-                            (T2 ≛[h, o] U2 → ⊥) → (T1 ≛[h, o] U1 → ⊥).
-#h #o #G1 #G2 #L1 #L2 #T1 #T2 #HT #U1 #U2 #HU #HnTU2 #HTU1
+theorem fdeq_tdneq_repl_dx: ∀G1,G2,L1,L2,T1,T2. ⦃G1,L1,T1⦄ ≛ ⦃G2,L2,T2⦄ →
+                            ∀U1,U2. ⦃G1,L1,U1⦄ ≛ ⦃G2,L2,U2⦄ →
+                            (T2 ≛ U2 → ⊥) → (T1 ≛ U1 → ⊥).
+#G1 #G2 #L1 #L2 #T1 #T2 #HT #U1 #U2 #HU #HnTU2 #HTU1
 elim (fdeq_inv_gen_sn … HT) -HT #_ #_ #HT
 elim (fdeq_inv_gen_sn … HU) -HU #_ #_ #HU
 /3 width=5 by tdeq_repl/
index 6a4f49e575d07607213e03a52a470af36a5b0e45..333a0f787a15b625095153b57f9535bdd813be94 100644 (file)
 include "static_2/static/rdeq_fqup.ma".
 include "static_2/static/fdeq.ma".
 
-(* DEGREE-BASED EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES ****************)
+(* SORT-IRRELEVANT EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *************)
 
-(* Properties with degree-based equivalence for terms ***********************)
+(* Properties with sort-irrelevant equivalence for terms ********************)
 
-lemma tdeq_fdeq: ∀h,o,T1,T2. T1 ≛[h, o] T2 →
-                 ∀G,L. ⦃G, L, T1⦄ ≛[h, o] ⦃G, L, T2⦄.
+lemma tdeq_fdeq: ∀T1,T2. T1 ≛ T2 →
+                 ∀G,L. ⦃G,L,T1⦄ ≛ ⦃G,L,T2⦄.
 /2 width=1 by fdeq_intro_sn/ qed.
 
 (* Advanced properties ******************************************************)
 
-lemma fdeq_refl: ∀h,o. tri_reflexive … (fdeq h o).
+lemma fdeq_refl: tri_reflexive … fdeq.
 /2 width=1 by fdeq_intro_sn/ qed.
index 4274cd40fc1ebc6d5d7f2d1e3479380f9fb534bf..ce0dda0d051658cd62af6194761e0409b23b0e06 100644 (file)
 include "static_2/static/rdeq_fqus.ma".
 include "static_2/static/fdeq.ma".
 
-(* DEGREE-BASED EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES ****************)
+(* SORT-IRRELEVANT EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *************)
 
 (* Properties with star-iterated structural successor for closures **********)
 
-lemma fdeq_fqus_trans: ∀h,o,b,G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≛[h, o] ⦃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⦄ ≛[h, o] ⦃G2, L2, T2⦄.
-#h #o #b #G1 #G #L1 #L #T1 #T #H1 #G2 #L2 #T2 #H2
+lemma fdeq_fqus_trans: ∀b,G1,G,L1,L,T1,T. ⦃G1,L1,T1⦄ ≛ ⦃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⦄ ≛ ⦃G2,L2,T2⦄.
+#b #G1 #G #L1 #L #T1 #T #H1 #G2 #L2 #T2 #H2
 elim(fdeq_inv_gen_dx … H1) -H1 #HG #HL1 #HT1 destruct
 elim (rdeq_fqus_trans … H2 … HL1) -L #L #T0 #H2 #HT02 #HL2
 elim (tdeq_fqus_trans … H2 … HT1) -T #L0 #T #H2 #HT0 #HL0
index 0c0d9c3bcc065255c8ab57982cd3d6186ffa67f9..5dbf18b5e4b8041ab795e56223ec53493f38c4d4 100644 (file)
 include "static_2/static/rdeq_req.ma".
 include "static_2/static/fdeq.ma".
 
-(* DEGREE-BASED EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES ****************)
+(* SORT-IRRELEVANT EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *************)
 
 (* Properties with syntactic equivalence on referred entries ****************)
 
-lemma req_rdeq_trans: ∀h,o,L1,L,T1. L1 ≡[T1] L →
-                      ∀G1,G2,L2,T2. ⦃G1, L, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≛[h, o] ⦃G2, L2, T2⦄.
-#h #o #L1 #L #T1 #HL1 #G1 #G2 #L2 #T2 #H
+lemma req_rdeq_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 (fdeq_inv_gen_sn … H) -H #H #HL2 #T12 destruct
 /3 width=3 by fdeq_intro_sn, req_rdeq_trans/
 qed-.
index 054003f831a0538deb8b716e7e22b3de61ae5321..a312c25256552dbf99cd59ef32a61603f7a5cded 100644 (file)
@@ -13,7 +13,7 @@
 (**************************************************************************)
 
 include "ground_2/relocation/rtmap_sor.ma".
-include "static_2/notation/relations/freestar_3.ma".
+include "static_2/notation/relations/freeplus_3.ma".
 include "static_2/syntax/lenv.ma".
 
 (* CONTEXT-SENSITIVE FREE VARIABLES *****************************************)
@@ -35,11 +35,11 @@ inductive frees: relation3 lenv term rtmap ≝
 
 interpretation
    "context-sensitive free variables (term)"
-   'FreeStar L T f = (frees L T f).
+   'FreePlus L T f = (frees L T f).
 
 (* Basic inversion lemmas ***************************************************)
 
-fact frees_inv_sort_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀x. X = ⋆x → 𝐈⦃f⦄.
+fact frees_inv_sort_aux: ∀f,L,X. L ⊢ 𝐅+⦃X⦄ ≘ f → ∀x. X = ⋆x → 𝐈⦃f⦄.
 #L #X #f #H elim H -f -L -X //
 [ #f #i #_ #x #H destruct
 | #f #_ #L #V #_ #_ #x #H destruct
@@ -50,11 +50,12 @@ fact frees_inv_sort_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀x. X = ⋆x 
 ]
 qed-.
 
-lemma frees_inv_sort: ∀f,L,s. L ⊢ 𝐅*⦃⋆s⦄ ≘ f → 𝐈⦃f⦄.
+lemma frees_inv_sort: ∀f,L,s. L ⊢ 𝐅+⦃⋆s⦄ ≘ f → 𝐈⦃f⦄.
 /2 width=5 by frees_inv_sort_aux/ qed-.
 
-fact frees_inv_atom_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀i. L = ⋆ → X = #i →
-                         ∃∃g. 𝐈⦃g⦄ & f = ⫯*[i]↑g.
+fact frees_inv_atom_aux:
+     ∀f,L,X. L ⊢ 𝐅+⦃X⦄ ≘ f → ∀i. L = ⋆ → X = #i →
+     ∃∃g. 𝐈⦃g⦄ & f = ⫯*[i]↑g.
 #f #L #X #H elim H -f -L -X
 [ #f #L #s #_ #j #_ #H destruct
 | #f #i #Hf #j #_ #H destruct /2 width=3 by ex2_intro/
@@ -67,11 +68,12 @@ fact frees_inv_atom_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀i. L = ⋆ 
 ]
 qed-.
 
-lemma frees_inv_atom: ∀f,i. ⋆ ⊢ 𝐅*⦃#i⦄ ≘ f → ∃∃g. 𝐈⦃g⦄ & f = ⫯*[i]↑g.
+lemma frees_inv_atom: ∀f,i. ⋆ ⊢ 𝐅+⦃#i⦄ ≘ f → ∃∃g. 𝐈⦃g⦄ & f = ⫯*[i]↑g.
 /2 width=5 by frees_inv_atom_aux/ qed-.
 
-fact frees_inv_pair_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀I,K,V. L = K.ⓑ{I}V → X = #0 →
-                         ∃∃g. K ⊢ 𝐅*⦃V⦄ ≘ g & f = ↑g.
+fact frees_inv_pair_aux:
+     ∀f,L,X. L ⊢ 𝐅+⦃X⦄ ≘ f → ∀I,K,V. L = K.ⓑ{I}V → X = #0 →
+     ∃∃g. K ⊢ 𝐅+⦃V⦄ ≘ g & f = ↑g.
 #f #L #X * -f -L -X
 [ #f #L #s #_ #Z #Y #X #_ #H destruct
 | #f #i #_ #Z #Y #X #H destruct
@@ -84,11 +86,12 @@ fact frees_inv_pair_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀I,K,V. L = K.
 ]
 qed-.
 
-lemma frees_inv_pair: ∀f,I,K,V. K.ⓑ{I}V ⊢ 𝐅*⦃#0⦄ ≘ f → ∃∃g. K ⊢ 𝐅*⦃V⦄ ≘ g & f = ↑g.
+lemma frees_inv_pair: ∀f,I,K,V. K.ⓑ{I}V ⊢ 𝐅+⦃#0⦄ ≘ f → ∃∃g. K ⊢ 𝐅+⦃V⦄ ≘ g & f = ↑g.
 /2 width=6 by frees_inv_pair_aux/ qed-.
 
-fact frees_inv_unit_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀I,K. L = K.ⓤ{I} → X = #0 →
-                         ∃∃g. 𝐈⦃g⦄ & f = ↑g.
+fact frees_inv_unit_aux:
+     ∀f,L,X. L ⊢ 𝐅+⦃X⦄ ≘ f → ∀I,K. L = K.ⓤ{I} → X = #0 →
+     ∃∃g. 𝐈⦃g⦄ & f = ↑g.
 #f #L #X * -f -L -X
 [ #f #L #s #_ #Z #Y #_ #H destruct
 | #f #i #_ #Z #Y #H destruct
@@ -101,11 +104,12 @@ fact frees_inv_unit_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀I,K. L = K.
 ]
 qed-.
 
-lemma frees_inv_unit: ∀f,I,K. K.ⓤ{I} ⊢ 𝐅*⦃#0⦄ ≘ f → ∃∃g. 𝐈⦃g⦄ & f = ↑g.
+lemma frees_inv_unit: ∀f,I,K. K.ⓤ{I} ⊢ 𝐅+⦃#0⦄ ≘ f → ∃∃g. 𝐈⦃g⦄ & f = ↑g.
 /2 width=7 by frees_inv_unit_aux/ qed-.
 
-fact frees_inv_lref_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀I,K,j. L = K.ⓘ{I} → X = #(↑j) →
-                         ∃∃g. K ⊢ 𝐅*⦃#j⦄ ≘ g & f = ⫯g.
+fact frees_inv_lref_aux:
+     ∀f,L,X. L ⊢ 𝐅+⦃X⦄ ≘ f → ∀I,K,j. L = K.ⓘ{I} → X = #(↑j) →
+     ∃∃g. K ⊢ 𝐅+⦃#j⦄ ≘ g & f = ⫯g.
 #f #L #X * -f -L -X
 [ #f #L #s #_ #Z #Y #j #_ #H destruct
 | #f #i #_ #Z #Y #j #H destruct
@@ -118,11 +122,12 @@ fact frees_inv_lref_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀I,K,j. L = K.
 ]
 qed-.
 
-lemma frees_inv_lref: ∀f,I,K,i. K.ⓘ{I} ⊢ 𝐅*⦃#(↑i)⦄ ≘ f →
-                      ∃∃g. K ⊢ 𝐅*⦃#i⦄ ≘ g & f = ⫯g.
+lemma frees_inv_lref:
+      ∀f,I,K,i. K.ⓘ{I} ⊢ 𝐅+⦃#(↑i)⦄ ≘ f →
+      ∃∃g. K ⊢ 𝐅+⦃#i⦄ ≘ g & f = ⫯g.
 /2 width=6 by frees_inv_lref_aux/ qed-.
 
-fact frees_inv_gref_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀x. X = §x → 𝐈⦃f⦄.
+fact frees_inv_gref_aux: ∀f,L,X. L ⊢ 𝐅+⦃X⦄ ≘ f → ∀x. X = §x → 𝐈⦃f⦄.
 #f #L #X #H elim H -f -L -X //
 [ #f #i #_ #x #H destruct
 | #f #_ #L #V #_ #_ #x #H destruct
@@ -133,11 +138,12 @@ fact frees_inv_gref_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀x. X = §x 
 ]
 qed-.
 
-lemma frees_inv_gref: ∀f,L,l. L ⊢ 𝐅*⦃§l⦄ ≘ f → 𝐈⦃f⦄.
+lemma frees_inv_gref: ∀f,L,l. L ⊢ 𝐅+⦃§l⦄ ≘ f → 𝐈⦃f⦄.
 /2 width=5 by frees_inv_gref_aux/ qed-.
 
-fact frees_inv_bind_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀p,I,V,T. X = ⓑ{p,I}V.T →
-                         ∃∃f1,f2. L ⊢ 𝐅*⦃V⦄ ≘ f1 & L.ⓑ{I}V ⊢ 𝐅*⦃T⦄ ≘ f2 & f1 ⋓ ⫱f2 ≘ f.
+fact frees_inv_bind_aux:
+     ∀f,L,X. L ⊢ 𝐅+⦃X⦄ ≘ f → ∀p,I,V,T. X = ⓑ{p,I}V.T →
+     ∃∃f1,f2. L ⊢ 𝐅+⦃V⦄ ≘ f1 & L.ⓑ{I}V ⊢ 𝐅+⦃T⦄ ≘ f2 & f1 ⋓ ⫱f2 ≘ f.
 #f #L #X * -f -L -X
 [ #f #L #s #_ #q #J #W #U #H destruct
 | #f #i #_ #q #J #W #U #H destruct
@@ -150,12 +156,13 @@ fact frees_inv_bind_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀p,I,V,T. X =
 ]
 qed-.
 
-lemma frees_inv_bind: ∀f,p,I,L,V,T. L ⊢ 𝐅*⦃ⓑ{p,I}V.T⦄ ≘ f →
-                      ∃∃f1,f2. L ⊢ 𝐅*⦃V⦄ ≘ f1 & L.ⓑ{I}V ⊢ 𝐅*⦃T⦄ ≘ f2 & f1 ⋓ ⫱f2 ≘ f.
+lemma frees_inv_bind:
+      ∀f,p,I,L,V,T. L ⊢ 𝐅+⦃ⓑ{p,I}V.T⦄ ≘ f →
+      ∃∃f1,f2. L ⊢ 𝐅+⦃V⦄ ≘ f1 & L.ⓑ{I}V ⊢ 𝐅+⦃T⦄ ≘ f2 & f1 ⋓ ⫱f2 ≘ f.
 /2 width=4 by frees_inv_bind_aux/ qed-.
 
-fact frees_inv_flat_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀I,V,T. X = ⓕ{I}V.T →
-                         ∃∃f1,f2. L ⊢ 𝐅*⦃V⦄ ≘ f1 & L ⊢ 𝐅*⦃T⦄ ≘ f2 & f1 ⋓ f2 ≘ f.
+fact frees_inv_flat_aux: ∀f,L,X. L ⊢ 𝐅+⦃X⦄ ≘ f → ∀I,V,T. X = ⓕ{I}V.T →
+                         ∃∃f1,f2. L ⊢ 𝐅+⦃V⦄ ≘ f1 & L ⊢ 𝐅+⦃T⦄ ≘ f2 & f1 ⋓ f2 ≘ f.
 #f #L #X * -f -L -X
 [ #f #L #s #_ #J #W #U #H destruct
 | #f #i #_ #J #W #U #H destruct
@@ -168,13 +175,14 @@ fact frees_inv_flat_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀I,V,T. X = 
 ]
 qed-.
 
-lemma frees_inv_flat: ∀f,I,L,V,T. L ⊢ 𝐅*⦃ⓕ{I}V.T⦄ ≘ f →
-                      ∃∃f1,f2. L ⊢ 𝐅*⦃V⦄ ≘ f1 & L ⊢ 𝐅*⦃T⦄ ≘ f2 & f1 ⋓ f2 ≘ f.
+lemma frees_inv_flat:
+      ∀f,I,L,V,T. L ⊢ 𝐅+⦃ⓕ{I}V.T⦄ ≘ f →
+      ∃∃f1,f2. L ⊢ 𝐅+⦃V⦄ ≘ f1 & L ⊢ 𝐅+⦃T⦄ ≘ f2 & f1 ⋓ f2 ≘ f.
 /2 width=4 by frees_inv_flat_aux/ qed-.
 
 (* Basic properties ********************************************************)
 
-lemma frees_eq_repl_back: ∀L,T. eq_repl_back … (λf. L ⊢ 𝐅*⦃T⦄ ≘ f).
+lemma frees_eq_repl_back: ∀L,T. eq_repl_back … (λf. L ⊢ 𝐅+⦃T⦄ ≘ f).
 #L #T #f1 #H elim H -f1 -L -T
 [ /3 width=3 by frees_sort, isid_eq_repl_back/
 | #f1 #i #Hf1 #g2 #H
@@ -195,11 +203,11 @@ lemma frees_eq_repl_back: ∀L,T. eq_repl_back … (λf. L ⊢ 𝐅*⦃T⦄ ≘
 ]
 qed-.
 
-lemma frees_eq_repl_fwd: ∀L,T. eq_repl_fwd … (λf. L ⊢ 𝐅*⦃T⦄ ≘ f).
+lemma frees_eq_repl_fwd: ∀L,T. eq_repl_fwd … (λf. L ⊢ 𝐅+⦃T⦄ ≘ f).
 #L #T @eq_repl_sym /2 width=3 by frees_eq_repl_back/
 qed-.
 
-lemma frees_lref_push: ∀f,i. ⋆ ⊢ 𝐅*⦃#i⦄ ≘ f → ⋆ ⊢ 𝐅*⦃#↑i⦄ ≘ ⫯f.
+lemma frees_lref_push: ∀f,i. ⋆ ⊢ 𝐅+⦃#i⦄ ≘ f → ⋆ ⊢ 𝐅+⦃#↑i⦄ ≘ ⫯f.
 #f #i #H
 elim (frees_inv_atom … H) -H #g #Hg #H destruct
 /2 width=1 by frees_atom/
@@ -207,7 +215,7 @@ qed.
 
 (* Forward lemmas with test for finite colength *****************************)
 
-lemma frees_fwd_isfin: ∀f,L,T. L ⊢ 𝐅*⦃T⦄ ≘ f → 𝐅⦃f⦄.
+lemma frees_fwd_isfin: ∀f,L,T. L ⊢ 𝐅+⦃T⦄ ≘ f → 𝐅⦃f⦄.
 #f #L #T #H elim H -f -L -T
 /4 width=5 by sor_isfin, isfin_isid, isfin_tl, isfin_pushs, isfin_push, isfin_next/
 qed-.
index ce8d3480824fa6d7940439df86d12ede35205b87..42523bb395637591e9c0e89d191d2384241f50fe 100644 (file)
@@ -19,7 +19,7 @@ include "static_2/static/frees.ma".
 
 (* Properties with append for local environments ****************************)
 
-lemma frees_append_void: ∀f,K,T. K ⊢ 𝐅*⦃T⦄ ≘ f → ⓧ.K ⊢ 𝐅*⦃T⦄ ≘ f.
+lemma frees_append_void: ∀f,K,T. K ⊢ 𝐅+⦃T⦄ ≘ f → ⓧ.K ⊢ 𝐅+⦃T⦄ ≘ f.
 #f #K #T #H elim H -f -K -T
 [ /2 width=1 by frees_sort/
 | #f * /3 width=1 by frees_atom, frees_unit, frees_lref/
@@ -34,8 +34,9 @@ qed.
 
 (* Inversion lemmas with append for local environments **********************)
 
-fact frees_inv_append_void_aux: ∀f,L,T. L ⊢ 𝐅*⦃T⦄ ≘ f →
-                                ∀K. L = ⓧ.K → K ⊢ 𝐅*⦃T⦄ ≘ f.
+fact frees_inv_append_void_aux:
+     ∀f,L,T. L ⊢ 𝐅+⦃T⦄ ≘ f →
+     ∀K. L = ⓧ.K → K ⊢ 𝐅+⦃T⦄ ≘ f.
 #f #L #T #H elim H -f -L -T
 [ /2 width=1 by frees_sort/
 | #f #i #_ #K #H 
@@ -55,5 +56,5 @@ fact frees_inv_append_void_aux: ∀f,L,T. L ⊢ 𝐅*⦃T⦄ ≘ f →
 ]
 qed-.
 
-lemma frees_inv_append_void: ∀f,K,T. ⓧ.K  ⊢ 𝐅*⦃T⦄ ≘ f → K ⊢ 𝐅*⦃T⦄ ≘ f.
+lemma frees_inv_append_void: ∀f,K,T. ⓧ.K  ⊢ 𝐅+⦃T⦄ ≘ f → K ⊢ 𝐅+⦃T⦄ ≘ f.
 /2 width=3 by frees_inv_append_void_aux/ qed-.
index 3c64660863240b8654d66b9f8aa03e58b7815299..d936eda8129ec6a1f5a4458a27af71560157493f 100644 (file)
@@ -20,8 +20,9 @@ include "static_2/static/frees_fqup.ma".
 
 (* Advanced properties ******************************************************)
 
-lemma frees_atom_drops: ∀b,L,i. ⬇*[b, 𝐔❴i❵] L ≘ ⋆ →
-                        ∀f. 𝐈⦃f⦄ → L ⊢ 𝐅*⦃#i⦄ ≘ ⫯*[i]↑f.
+lemma frees_atom_drops: 
+      ∀b,L,i. ⬇*[b,𝐔❴i❵] L ≘ ⋆ →
+      ∀f. 𝐈⦃f⦄ → L ⊢ 𝐅+⦃#i⦄ ≘ ⫯*[i]↑f.
 #b #L elim L -L /2 width=1 by frees_atom/
 #L #I #IH *
 [ #H lapply (drops_fwd_isid … H ?) -H // #H destruct
@@ -29,16 +30,18 @@ lemma frees_atom_drops: ∀b,L,i. ⬇*[b, 𝐔❴i❵] L ≘ ⋆ →
 ]
 qed.
 
-lemma frees_pair_drops: ∀f,K,V. K ⊢ 𝐅*⦃V⦄ ≘ f → 
-                        ∀i,I,L. ⬇*[i] L ≘ K.ⓑ{I}V → L ⊢ 𝐅*⦃#i⦄ ≘ ⫯*[i] ↑f.
+lemma frees_pair_drops:
+      ∀f,K,V. K ⊢ 𝐅+⦃V⦄ ≘ f → 
+      ∀i,I,L. ⬇*[i] L ≘ K.ⓑ{I}V → L ⊢ 𝐅+⦃#i⦄ ≘ ⫯*[i] ↑f.
 #f #K #V #Hf #i elim i -i
 [ #I #L #H lapply (drops_fwd_isid … H ?) -H /2 width=1 by frees_pair/
 | #i #IH #I #L #H elim (drops_inv_succ … H) -H /3 width=2 by frees_lref/
 ]
 qed.
 
-lemma frees_unit_drops: ∀f.  𝐈⦃f⦄ → ∀I,K,i,L. ⬇*[i] L ≘ K.ⓤ{I} →
-                       L ⊢ 𝐅*⦃#i⦄ ≘ ⫯*[i] ↑f.
+lemma frees_unit_drops:
+      ∀f.  𝐈⦃f⦄ → ∀I,K,i,L. ⬇*[i] L ≘ K.ⓤ{I} →
+      L ⊢ 𝐅+⦃#i⦄ ≘ ⫯*[i] ↑f.
 #f #Hf #I #K #i elim i -i
 [ #L #H lapply (drops_fwd_isid … H ?) -H /2 width=1 by frees_unit/
 | #i #IH #Y #H elim (drops_inv_succ … H) -H
@@ -46,16 +49,18 @@ lemma frees_unit_drops: ∀f.  𝐈⦃f⦄ → ∀I,K,i,L. ⬇*[i] L ≘ K.ⓤ{I
 ]
 qed.
 (*
-lemma frees_sort_pushs: ∀f,K,s. K ⊢ 𝐅*⦃⋆s⦄ ≘ f →
-                        ∀i,L. ⬇*[i] L ≘ K → L ⊢ 𝐅*⦃⋆s⦄ ≘ ⫯*[i] f.
+lemma frees_sort_pushs:
+      ∀f,K,s. K ⊢ 𝐅+⦃⋆s⦄ ≘ f →
+      ∀i,L. ⬇*[i] L ≘ K → L ⊢ 𝐅+⦃⋆s⦄ ≘ ⫯*[i] f.
 #f #K #s #Hf #i elim i -i
 [ #L #H lapply (drops_fwd_isid … H ?) -H //
 | #i #IH #L #H elim (drops_inv_succ … H) -H /3 width=1 by frees_sort/
 ]
 qed.
 *)
-lemma frees_lref_pushs: ∀f,K,j. K ⊢ 𝐅*⦃#j⦄ ≘ f →
-                        ∀i,L. ⬇*[i] L ≘ K → L ⊢ 𝐅*⦃#(i+j)⦄ ≘ ⫯*[i] f.
+lemma frees_lref_pushs:
+      ∀f,K,j. K ⊢ 𝐅+⦃#j⦄ ≘ f →
+      ∀i,L. ⬇*[i] L ≘ K → L ⊢ 𝐅+⦃#(i+j)⦄ ≘ ⫯*[i] f.
 #f #K #j #Hf #i elim i -i
 [ #L #H lapply (drops_fwd_isid … H ?) -H //
 | #i #IH #L #H elim (drops_inv_succ … H) -H
@@ -63,8 +68,9 @@ lemma frees_lref_pushs: ∀f,K,j. K ⊢ 𝐅*⦃#j⦄ ≘ f →
 ]
 qed.
 (*
-lemma frees_gref_pushs: ∀f,K,l. K ⊢ 𝐅*⦃§l⦄ ≘ f →
-                        ∀i,L. ⬇*[i] L ≘ K → L ⊢ 𝐅*⦃§l⦄ ≘ ⫯*[i] f.
+lemma frees_gref_pushs:
+      ∀f,K,l. K ⊢ 𝐅+⦃§l⦄ ≘ f →
+      ∀i,L. ⬇*[i] L ≘ K → L ⊢ 𝐅+⦃§l⦄ ≘ ⫯*[i] f.
 #f #K #l #Hf #i elim i -i
 [ #L #H lapply (drops_fwd_isid … H ?) -H //
 | #i #IH #L #H elim (drops_inv_succ … H) -H /3 width=1 by frees_gref/
@@ -73,11 +79,11 @@ qed.
 *)
 (* Advanced inversion lemmas ************************************************)
 
-lemma frees_inv_lref_drops: ∀L,i,f. L ⊢ 𝐅*⦃#i⦄ ≘ f →
-                            ∨∨ ∃∃g. ⬇*[Ⓕ, 𝐔❴i❵] L ≘ ⋆ & 𝐈⦃g⦄ & f = ⫯*[i] ↑g
-                             | ∃∃g,I,K,V. K ⊢ 𝐅*⦃V⦄ ≘ g &
-                                          ⬇*[i] L ≘ K.ⓑ{I}V & f = ⫯*[i] ↑g
-                             | ∃∃g,I,K. ⬇*[i] L ≘ K.ⓤ{I} & 𝐈⦃g⦄ & f = ⫯*[i] ↑g.
+lemma frees_inv_lref_drops:
+      ∀L,i,f. L ⊢ 𝐅+⦃#i⦄ ≘ f →
+      ∨∨ ∃∃g. ⬇*[Ⓕ,𝐔❴i❵] L ≘ ⋆ & 𝐈⦃g⦄ & f = ⫯*[i] ↑g
+       | ∃∃g,I,K,V. K ⊢ 𝐅+⦃V⦄ ≘ g & ⬇*[i] L ≘ K.ⓑ{I}V & f = ⫯*[i] ↑g
+       | ∃∃g,I,K. ⬇*[i] L ≘ K.ⓤ{I} & 𝐈⦃g⦄ & f = ⫯*[i] ↑g.
 #L elim L -L
 [ #i #g | #L #I #IH * [ #g cases I -I [ #I | #I #V ] -IH | #i #g ] ] #H
 [ elim (frees_inv_atom … H) -H #f #Hf #H destruct
@@ -97,9 +103,10 @@ qed-.
 
 (* Properties with generic slicing for local environments *******************)
 
-lemma frees_lifts: ∀b,f1,K,T. K ⊢ 𝐅*⦃T⦄ ≘ f1 →
-                   ∀f,L. ⬇*[b, f] L ≘ K → ∀U. ⬆*[f] T ≘ U →
-                   ∀f2. f ~⊚ f1 ≘ f2 → L ⊢ 𝐅*⦃U⦄ ≘ f2.
+lemma frees_lifts:
+      ∀b,f1,K,T. K ⊢ 𝐅+⦃T⦄ ≘ f1 →
+      ∀f,L. ⬇*[b,f] L ≘ K → ∀U. ⬆*[f] T ≘ U →
+      ∀f2. f ~⊚ f1 ≘ f2 → L ⊢ 𝐅+⦃U⦄ ≘ f2.
 #b #f1 #K #T #H lapply (frees_fwd_isfin … H) elim H -f1 -K -T
 [ #f1 #K #s #Hf1 #_ #f #L #HLK #U #H2 #f2 #H3
   lapply (coafter_isid_inv_dx … H3 … Hf1) -f1 #Hf2
@@ -154,48 +161,54 @@ lemma frees_lifts: ∀b,f1,K,T. K ⊢ 𝐅*⦃T⦄ ≘ f1 →
 ]
 qed-.
 
-lemma frees_lifts_SO: ∀b,L,K. ⬇*[b, 𝐔❴1❵] L ≘ K → ∀T,U. ⬆*[1] T ≘ U →
-                      ∀f. K ⊢ 𝐅*⦃T⦄ ≘ f → L ⊢ 𝐅*⦃U⦄ ≘ ⫯f.
+lemma frees_lifts_SO:
+      ∀b,L,K. ⬇*[b,𝐔❴1❵] L ≘ K → ∀T,U. ⬆*[1] T ≘ U →
+      ∀f. K ⊢ 𝐅+⦃T⦄ ≘ f → L ⊢ 𝐅+⦃U⦄ ≘ ⫯f.
 #b #L #K #HLK #T #U #HTU #f #Hf
 @(frees_lifts b … Hf … HTU) //  (**) (* auto fails *)
 qed.
 
 (* Forward lemmas with generic slicing for local environments ***************)
 
-lemma frees_fwd_coafter: ∀b,f2,L,U. L ⊢ 𝐅*⦃U⦄ ≘ f2 →
-                         ∀f,K. ⬇*[b, f] L ≘ K → ∀T. ⬆*[f] T ≘ U →
-                         ∀f1. K ⊢ 𝐅*⦃T⦄ ≘ f1 → f ~⊚ f1 ≘ f2.
+lemma frees_fwd_coafter:
+      ∀b,f2,L,U. L ⊢ 𝐅+⦃U⦄ ≘ f2 →
+      ∀f,K. ⬇*[b,f] L ≘ K → ∀T. ⬆*[f] T ≘ U →
+      ∀f1. K ⊢ 𝐅+⦃T⦄ ≘ f1 → f ~⊚ f1 ≘ f2.
 /4 width=11 by frees_lifts, frees_mono, coafter_eq_repl_back0/ qed-.
 
 (* Inversion lemmas with generic slicing for local environments *************)
 
-lemma frees_inv_lifts_ex: ∀b,f2,L,U. L ⊢ 𝐅*⦃U⦄ ≘ f2 →
-                          ∀f,K. ⬇*[b, f] L ≘ K → ∀T. ⬆*[f] T ≘ U →
-                          ∃∃f1. f ~⊚ f1 ≘ f2 & K ⊢ 𝐅*⦃T⦄ ≘ f1.
+lemma frees_inv_lifts_ex:
+      ∀b,f2,L,U. L ⊢ 𝐅+⦃U⦄ ≘ f2 →
+      ∀f,K. ⬇*[b,f] L ≘ K → ∀T. ⬆*[f] T ≘ U →
+      ∃∃f1. f ~⊚ f1 ≘ f2 & K ⊢ 𝐅+⦃T⦄ ≘ f1.
 #b #f2 #L #U #Hf2 #f #K #HLK #T elim (frees_total K T)
 /3 width=9 by frees_fwd_coafter, ex2_intro/
 qed-.
 
-lemma frees_inv_lifts_SO: ∀b,f,L,U. L ⊢ 𝐅*⦃U⦄ ≘ f →
-                          ∀K. ⬇*[b, 𝐔❴1❵] L ≘ K → ∀T. ⬆*[1] T ≘ U →
-                          K ⊢ 𝐅*⦃T⦄ ≘ ⫱f.
+lemma frees_inv_lifts_SO:
+      ∀b,f,L,U. L ⊢ 𝐅+⦃U⦄ ≘ f →
+      ∀K. ⬇*[b,𝐔❴1❵] L ≘ K → ∀T. ⬆*[1] T ≘ U →
+      K ⊢ 𝐅+⦃T⦄ ≘ ⫱f.
 #b #f #L #U #H #K #HLK #T #HTU elim(frees_inv_lifts_ex … H … HLK … HTU) -b -L -U
 #f1 #Hf #Hf1 elim (coafter_inv_nxx … Hf) -Hf
 /3 width=5 by frees_eq_repl_back, coafter_isid_inv_sn/
 qed-.
 
-lemma frees_inv_lifts: ∀b,f2,L,U. L ⊢ 𝐅*⦃U⦄ ≘ f2 →
-                       ∀f,K. ⬇*[b, f] L ≘ K → ∀T. ⬆*[f] T ≘ U →
-                       ∀f1. f ~⊚ f1 ≘ f2 → K ⊢ 𝐅*⦃T⦄ ≘ f1.
+lemma frees_inv_lifts:
+      ∀b,f2,L,U. L ⊢ 𝐅+⦃U⦄ ≘ f2 →
+      ∀f,K. ⬇*[b,f] L ≘ K → ∀T. ⬆*[f] T ≘ U →
+      ∀f1. f ~⊚ f1 ≘ f2 → K ⊢ 𝐅+⦃T⦄ ≘ f1.
 #b #f2 #L #U #H #f #K #HLK #T #HTU #f1 #Hf2 elim (frees_inv_lifts_ex … H … HLK … HTU) -b -L -U
 /3 width=7 by frees_eq_repl_back, coafter_inj/
 qed-.
 
 (* Note: this is used by rex_conf and might be modified *)
-lemma frees_inv_drops_next: ∀f1,L1,T1. L1 ⊢ 𝐅*⦃T1⦄ ≘ f1 →
-                            ∀I2,L2,V2,n. ⬇*[n] L1 ≘ L2.ⓑ{I2}V2 →
-                            ∀g1. ↑g1 = ⫱*[n] f1 →
-                            ∃∃g2. L2 ⊢ 𝐅*⦃V2⦄ ≘ g2 & g2 ⊆ g1.
+lemma frees_inv_drops_next:
+      ∀f1,L1,T1. L1 ⊢ 𝐅+⦃T1⦄ ≘ f1 →
+      ∀I2,L2,V2,n. ⬇*[n] L1 ≘ L2.ⓑ{I2}V2 →
+      ∀g1. ↑g1 = ⫱*[n] f1 →
+      ∃∃g2. L2 ⊢ 𝐅+⦃V2⦄ ≘ g2 & g2 ⊆ g1.
 #f1 #L1 #T1 #H elim H -f1 -L1 -T1
 [ #f1 #L1 #s #Hf1 #I2 #L2 #V2 #n #_ #g1 #H1 -I2 -L1 -s
   lapply (isid_tls n … Hf1) -Hf1 <H1 -f1 #Hf1
index abaf4ff15945e715dcbe7d2c48e23b758488048f..feb74eb263f4fc3d49639e1d98d91c8c9b114005 100644 (file)
@@ -20,7 +20,7 @@ include "static_2/static/lsubf_lsubr.ma".
 (* Advanced properties ******************************************************)
 
 (* Note: this replaces lemma 1400 concluding the "big tree" theorem *)
-lemma frees_total: ∀L,T. ∃f. L ⊢ 𝐅*⦃T⦄ ≘ f.
+lemma frees_total: ∀L,T. ∃f. L ⊢ 𝐅+⦃T⦄ ≘ f.
 #L #T @(fqup_wf_ind_eq (Ⓣ) … (⋆) L T) -L -T
 #G0 #L0 #T0 #IH #G #L * *
 [ /3 width=2 by frees_sort, ex_intro/
@@ -51,8 +51,9 @@ qed-.
 
 (* Advanced main properties *************************************************)
 
-theorem frees_bind_void: ∀f1,L,V. L ⊢ 𝐅*⦃V⦄ ≘ f1 → ∀f2,T. L.ⓧ ⊢ 𝐅*⦃T⦄ ≘ f2 →
-                         ∀f. f1 ⋓ ⫱f2 ≘ f → ∀p,I. L ⊢ 𝐅*⦃ⓑ{p,I}V.T⦄ ≘ f.
+theorem frees_bind_void:
+        ∀f1,L,V. L ⊢ 𝐅+⦃V⦄ ≘ f1 → ∀f2,T. L.ⓧ ⊢ 𝐅+⦃T⦄ ≘ f2 →
+        ∀f. f1 ⋓ ⫱f2 ≘ f → ∀p,I. L ⊢ 𝐅+⦃ⓑ{p,I}V.T⦄ ≘ f.
 #f1 #L #V #Hf1 #f2 #T #Hf2 #f #Hf #p #I
 elim (frees_total (L.ⓑ{I}V) T) #f0 #Hf0
 lapply (lsubr_lsubf … Hf2 … Hf0) -Hf2 /2 width=5 by lsubr_unit/ #H02
@@ -78,8 +79,9 @@ qed-.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma frees_inv_bind_void: ∀f,p,I,L,V,T. L ⊢ 𝐅*⦃ⓑ{p,I}V.T⦄ ≘ f →
-                           ∃∃f1,f2. L ⊢ 𝐅*⦃V⦄ ≘ f1 & L.ⓧ ⊢ 𝐅*⦃T⦄ ≘ f2 & f1 ⋓ ⫱f2 ≘ f.
+lemma frees_inv_bind_void:
+      ∀f,p,I,L,V,T. L ⊢ 𝐅+⦃ⓑ{p,I}V.T⦄ ≘ f →
+      ∃∃f1,f2. L ⊢ 𝐅+⦃V⦄ ≘ f1 & L.ⓧ ⊢ 𝐅+⦃T⦄ ≘ f2 & f1 ⋓ ⫱f2 ≘ f.
 #f #p #I #L #V #T #H
 elim (frees_inv_bind … H) -H #f1 #f2 #Hf1 #Hf2 #Hf
 elim (frees_total (L.ⓧ) T) #f0 #Hf0
@@ -100,31 +102,31 @@ elim (pn_split f0) * #g0 #H destruct
 ]
 qed-.
 
-lemma frees_ind_void: ∀Q:relation3 ….
-                      (
-                         ∀f,L,s. 𝐈⦃f⦄ →  Q L (⋆s) f
-                      ) → (
-                         ∀f,i. 𝐈⦃f⦄ →  Q (⋆) (#i) (⫯*[i]↑f)
-                      ) → (
-                         ∀f,I,L,V.
-                         L ⊢ 𝐅*⦃V⦄ ≘ f →  Q L V f→ Q (L.ⓑ{I}V) (#O) (↑f) 
-                      ) → (
-                         ∀f,I,L. 𝐈⦃f⦄ →  Q (L.ⓤ{I}) (#O) (↑f)
-                      ) → (
-                         ∀f,I,L,i.
-                         L ⊢ 𝐅*⦃#i⦄ ≘ f →  Q L (#i) f → Q (L.ⓘ{I}) (#(↑i)) (⫯f)
-                      ) → (
-                         ∀f,L,l. 𝐈⦃f⦄ →  Q L (§l) f
-                      ) → (
-                         ∀f1,f2,f,p,I,L,V,T.
-                         L ⊢ 𝐅*⦃V⦄ ≘ f1 → L.ⓧ ⊢𝐅*⦃T⦄≘ f2 → f1 ⋓ ⫱f2 ≘ f →
-                         Q L V f1 → Q (L.ⓧ) T f2 → Q L (ⓑ{p,I}V.T) f
-                      ) → (
-                         ∀f1,f2,f,I,L,V,T.
-                         L ⊢ 𝐅*⦃V⦄ ≘ f1 → L ⊢𝐅*⦃T⦄ ≘ f2 → f1 ⋓ f2 ≘ f →
-                         Q L V f1 → Q L T f2 → Q L (ⓕ{I}V.T) f
-                      ) →
-                      ∀L,T,f. L ⊢ 𝐅*⦃T⦄ ≘ f →  Q L T f.
+lemma frees_ind_void (Q:relation3 …):
+      (
+        ∀f,L,s. 𝐈⦃f⦄ →  Q L (⋆s) f
+      ) → (
+        ∀f,i. 𝐈⦃f⦄ →  Q (⋆) (#i) (⫯*[i]↑f)
+      ) → (
+        ∀f,I,L,V.
+        L ⊢ 𝐅+⦃V⦄ ≘ f →  Q L V f→ Q (L.ⓑ{I}V) (#O) (↑f) 
+      ) → (
+        ∀f,I,L. 𝐈⦃f⦄ →  Q (L.ⓤ{I}) (#O) (↑f)
+      ) → (
+        ∀f,I,L,i.
+        L ⊢ 𝐅+⦃#i⦄ ≘ f →  Q L (#i) f → Q (L.ⓘ{I}) (#(↑i)) (⫯f)
+      ) → (
+        ∀f,L,l. 𝐈⦃f⦄ →  Q L (§l) f
+      ) → (
+        ∀f1,f2,f,p,I,L,V,T.
+        L ⊢ 𝐅+⦃V⦄ ≘ f1 → L.ⓧ ⊢𝐅+⦃T⦄≘ f2 → f1 ⋓ ⫱f2 ≘ f →
+        Q L V f1 → Q (L.ⓧ) T f2 → Q L (ⓑ{p,I}V.T) f
+      ) → (
+        ∀f1,f2,f,I,L,V,T.
+        L ⊢ 𝐅+⦃V⦄ ≘ f1 → L ⊢𝐅+⦃T⦄ ≘ f2 → f1 ⋓ f2 ≘ f →
+        Q L V f1 → Q L T f2 → Q L (ⓕ{I}V.T) f
+      ) →
+      ∀L,T,f. L ⊢ 𝐅+⦃T⦄ ≘ f →  Q L T f.
 #Q #IH1 #IH2 #IH3 #IH4 #IH5 #IH6 #IH7 #IH8 #L #T
 @(fqup_wf_ind_eq (Ⓕ) … (⋆) L T) -L -T #G0 #L0 #T0 #IH #G #L * *
 [ #s #HG #HL #HT #f #H destruct -IH
index c612ce7c7284918f5f30bf1f519e1c0ea11d8875..d694ca4554f251d2cd55ad587a790e916ad15f53 100644 (file)
@@ -18,7 +18,7 @@ include "static_2/static/frees.ma".
 
 (* Main inversion lemmas ****************************************************)
 
-theorem frees_mono: ∀f1,L,T. L ⊢ 𝐅*⦃T⦄ ≘ f1 → ∀f2. L ⊢ 𝐅*⦃T⦄ ≘ f2 → f1 ≡ f2.
+theorem frees_mono: ∀f1,L,T. L ⊢ 𝐅+⦃T⦄ ≘ f1 → ∀f2. L ⊢ 𝐅+⦃T⦄ ≘ f2 → f1 ≡ f2.
 #f1 #L #T #H elim H -f1 -L -T
 [ /3 width=3 by frees_inv_sort, isid_inv_eq_repl/
 | #f1 #i #Hf1 #g2 #H
index bfafabbdbb0edfcefae8808a3b750f3ceb567374..8fe83413ac5f3dac716226ec25f1bf917788e44e 100644 (file)
@@ -20,8 +20,8 @@ include "static_2/static/frees.ma".
 (* FREE VARIABLES INCLUSION FOR RESTRICTED CLOSURES *************************)
 
 definition fsle: bi_relation lenv term ≝ λL1,T1,L2,T2.
-                 ∃∃n1,n2,f1,f2. L1 ⊢ 𝐅*⦃T1⦄ ≘ f1 & L2 ⊢ 𝐅*⦃T2⦄ ≘ f2 &
-                                L1 ≋ⓧ*[n1, n2] L2 & ⫱*[n1]f1 ⊆ ⫱*[n2]f2.
+                 ∃∃n1,n2,f1,f2. L1 ⊢ 𝐅+⦃T1⦄ ≘ f1 & L2 ⊢ 𝐅+⦃T2⦄ ≘ f2 &
+                                L1 ≋ⓧ*[n1,n2] L2 & ⫱*[n1]f1 ⊆ ⫱*[n2]f2.
 
 interpretation "free variables inclusion (restricted closure)"
    'SubSetEq L1 T1 L2 T2 = (fsle L1 T1 L2 T2).
@@ -31,8 +31,8 @@ interpretation "free variables inclusion (term)"
 
 (* Basic properties *********************************************************)
 
-lemma fsle_sort: ∀L,s1,s2. ⦃L, ⋆s1⦄ ⊆ ⦃L, ⋆s2⦄.
+lemma fsle_sort: ∀L,s1,s2. ⦃L,⋆s1⦄ ⊆ ⦃L,⋆s2⦄.
 /3 width=8 by frees_sort, sle_refl, ex4_4_intro/ qed.
 
-lemma fsle_gref: ∀L,l1,l2. ⦃L, §l1⦄ ⊆ ⦃L, §l2⦄.
+lemma fsle_gref: ∀L,l1,l2. ⦃L,§l1⦄ ⊆ ⦃L,§l2⦄.
 /3 width=8 by frees_gref, sle_refl, ex4_4_intro/ qed.
index 542d8b10e584eac58b886d0e32093de480ccaada..1eee580943ec894f6ed939f3fd6839f9a24ff23f 100644 (file)
@@ -20,7 +20,7 @@ include "static_2/static/fsle_length.ma".
 (* Advanced properties ******************************************************)
 
 lemma fsle_lifts_sn: ∀T1,U1. ⬆*[1] T1 ≘ U1 → ∀L1,L2. |L2| ≤ |L1| →
-                     ∀T2. ⦃L1, T1⦄ ⊆ ⦃L2, T2⦄ → ⦃L1.ⓧ, U1⦄ ⊆ ⦃L2, T2⦄.
+                     ∀T2. ⦃L1,T1⦄ ⊆ ⦃L2,T2⦄ → ⦃L1.ⓧ,U1⦄ ⊆ ⦃L2,T2⦄.
 #T1 #U1 #HTU1 #L1 #L2 #H1L #T2
 * #n #m #f #g #Hf #Hg #H2L #Hfg
 lapply (lveq_length_fwd_dx … H2L ?) // -H1L #H destruct
@@ -40,8 +40,8 @@ lapply (frees_lifts_SO (Ⓣ) (L2.ⓧ) … HTU2 … Hg)
 @(ex4_4_intro … Hf Hg) /2 width=4 by lveq_void_dx/ (**) (* explict constructor *)
 qed-.
 
-lemma fsle_lifts_SO_sn: ∀K1,K2. |K1| = |K2| → ∀V1,V2. ⦃K1, V1⦄ ⊆ ⦃K2, V2⦄ →
-                        ∀W1. ⬆*[1] V1 ≘ W1 → ∀I1,I2. ⦃K1.ⓘ{I1}, W1⦄ ⊆ ⦃K2.ⓑ{I2}V2, #O⦄.
+lemma fsle_lifts_SO_sn: ∀K1,K2. |K1| = |K2| → ∀V1,V2. ⦃K1,V1⦄ ⊆ ⦃K2,V2⦄ →
+                        ∀W1. ⬆*[1] V1 ≘ W1 → ∀I1,I2. ⦃K1.ⓘ{I1},W1⦄ ⊆ ⦃K2.ⓑ{I2}V2,#O⦄.
 #K1 #K2 #HK #V1 #V2
 * #n1 #n2 #f1 #f2 #Hf1 #Hf2 #HK12 #Hf12
 #W1 #HVW1 #I1 #I2
@@ -49,9 +49,9 @@ elim (lveq_inj_length … HK12) // -HK #H1 #H2 destruct
 /5 width=12 by frees_lifts_SO, frees_pair, drops_refl, drops_drop, lveq_bind, sle_weak, ex4_4_intro/
 qed.
 
-lemma fsle_lifts_SO: ∀K1,K2. |K1| = |K2| → ∀T1,T2. ⦃K1, T1⦄ ⊆ ⦃K2, T2⦄ →
+lemma fsle_lifts_SO: ∀K1,K2. |K1| = |K2| → ∀T1,T2. ⦃K1,T1⦄ ⊆ ⦃K2,T2⦄ →
                      ∀U1,U2. ⬆*[1] T1 ≘ U1 → ⬆*[1] T2 ≘ U2 →
-                     ∀I1,I2.  ⦃K1.ⓘ{I1}, U1⦄ ⊆ ⦃K2.ⓘ{I2}, U2⦄.
+                     ∀I1,I2.  ⦃K1.ⓘ{I1},U1⦄ ⊆ ⦃K2.ⓘ{I2},U2⦄.
 #K1 #K2 #HK #T1 #T2
 * #n1 #n2 #f1 #f2 #Hf1 #Hf2 #HK12 #Hf12
 #U1 #U2 #HTU1 #HTU2 #I1 #I2
@@ -62,8 +62,8 @@ qed.
 (* Advanced inversion lemmas ************************************************)
 
 lemma fsle_inv_lifts_sn: ∀T1,U1. ⬆*[1] T1 ≘ U1 →
-                         ∀I1,I2,L1,L2,V1,V2,U2. ⦃L1.ⓑ{I1}V1,U1⦄ ⊆ ⦃L2.ⓑ{I2}V2, U2⦄ →
-                         ∀p. ⦃L1, T1⦄ ⊆ ⦃L2, ⓑ{p,I2}V2.U2⦄.
+                         ∀I1,I2,L1,L2,V1,V2,U2. ⦃L1.ⓑ{I1}V1,U1⦄ ⊆ ⦃L2.ⓑ{I2}V2,U2⦄ →
+                         ∀p. ⦃L1,T1⦄ ⊆ ⦃L2,ⓑ{p,I2}V2.U2⦄.
 #T1 #U1 #HTU1 #I1 #I2 #L1 #L2 #V1 #V2 #U2
 * #n #m #f2 #g2 #Hf2 #Hg2 #HL #Hfg2 #p
 elim (lveq_inv_pair_pair … HL) -HL #HL #H1 #H2 destruct
index 8056bf243d8c7ccd96b450500c29da98239b228c..04162cc187ec15f653124e1d99597ac2c9e727cf 100644 (file)
@@ -26,8 +26,8 @@ elim (frees_total L T) #f #Hf
 qed.
 
 lemma fsle_shift: ∀L1,L2. |L1| = |L2| →
-                  ∀I,T1,T2,V.  ⦃L1.ⓧ, T1⦄ ⊆ ⦃L2.ⓑ{I}V, T2⦄ →
-                  ∀p. ⦃L1.ⓧ, T1⦄ ⊆ ⦃L2, ⓑ{p,I}V.T2⦄.
+                  ∀I,T1,T2,V.  ⦃L1.ⓧ,T1⦄ ⊆ ⦃L2.ⓑ{I}V,T2⦄ →
+                  ∀p. ⦃L1.ⓧ,T1⦄ ⊆ ⦃L2,ⓑ{p,I}V.T2⦄.
 #L1 #L2 #H1L #I #T1 #T2 #V
 * #n #m #f2 #g2 #Hf2 #Hg2 #H2L #Hfg2 #p
 elim (lveq_inj_length … H2L) // -H1L #H1 #H2 destruct
@@ -38,8 +38,8 @@ lapply (sor_inv_sle_dx … Hg) #H0g
 /4 width=10 by frees_bind, lveq_void_sn, sle_tl, sle_trans, ex4_4_intro/
 qed.
 
-lemma fsle_bind_dx_sn: ∀L1,L2,V1,V2. ⦃L1, V1⦄ ⊆ ⦃L2, V2⦄ →
-                       ∀p,I,T2. ⦃L1, V1⦄ ⊆ ⦃L2, ⓑ{p,I}V2.T2⦄.
+lemma fsle_bind_dx_sn: ∀L1,L2,V1,V2. ⦃L1,V1⦄ ⊆ ⦃L2,V2⦄ →
+                       ∀p,I,T2. ⦃L1,V1⦄ ⊆ ⦃L2,ⓑ{p,I}V2.T2⦄.
 #L1 #L2 #V1 #V2 * #n1 #m1 #f1 #g1 #Hf1 #Hg1 #HL12 #Hfg1 #p #I #T2
 elim (frees_total (L2.ⓧ) T2) #g2 #Hg2
 elim (sor_isfin_ex g1 (⫱g2)) /3 width=3 by frees_fwd_isfin, isfin_tl/ #g #Hg #_
@@ -47,8 +47,8 @@ elim (sor_isfin_ex g1 (⫱g2)) /3 width=3 by frees_fwd_isfin, isfin_tl/ #g #Hg #
 /4 width=5 by frees_bind_void, sor_inv_sle_sn, sor_tls, sle_trans/
 qed.
 
-lemma fsle_bind_dx_dx: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊆ ⦃L2.ⓧ, T2⦄ → |L1| ≤ |L2| →
-                       ∀p,I,V2. ⦃L1, T1⦄ ⊆ ⦃L2, ⓑ{p,I}V2.T2⦄.
+lemma fsle_bind_dx_dx: ∀L1,L2,T1,T2. ⦃L1,T1⦄ ⊆ ⦃L2.ⓧ,T2⦄ → |L1| ≤ |L2| →
+                       ∀p,I,V2. ⦃L1,T1⦄ ⊆ ⦃L2,ⓑ{p,I}V2.T2⦄.
 #L1 #L2 #T1 #T2 * #n1 #x1 #f2 #g2 #Hf2 #Hg2 #H #Hfg2 #HL12 #p #I #V2
 elim (lveq_inv_void_dx_length … H HL12) -H -HL12 #m1 #HL12 #H1 #H2 destruct
 <tls_xn in Hfg2; #Hfg2
@@ -58,8 +58,8 @@ elim (sor_isfin_ex g1 (⫱g2)) /3 width=3 by frees_fwd_isfin, isfin_tl/ #g #Hg #
 /4 width=5 by frees_bind_void, sor_inv_sle_dx, sor_tls, sle_trans/
 qed.
 
-lemma fsle_flat_dx_sn: ∀L1,L2,V1,V2. ⦃L1, V1⦄ ⊆ ⦃L2, V2⦄ →
-                       ∀I,T2. ⦃L1, V1⦄ ⊆ ⦃L2, ⓕ{I}V2.T2⦄.
+lemma fsle_flat_dx_sn: ∀L1,L2,V1,V2. ⦃L1,V1⦄ ⊆ ⦃L2,V2⦄ →
+                       ∀I,T2. ⦃L1,V1⦄ ⊆ ⦃L2,ⓕ{I}V2.T2⦄.
 #L1 #L2 #V1 #V2 * #n1 #m1 #f1 #g1 #Hf1 #Hg1 #HL12 #Hfg1 #I #T2
 elim (frees_total L2 T2) #g2 #Hg2
 elim (sor_isfin_ex g1 g2) /2 width=3 by frees_fwd_isfin/ #g #Hg #_
@@ -67,8 +67,8 @@ elim (sor_isfin_ex g1 g2) /2 width=3 by frees_fwd_isfin/ #g #Hg #_
 /4 width=5 by frees_flat, sor_inv_sle_sn, sor_tls, sle_trans/
 qed.
 
-lemma fsle_flat_dx_dx: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊆ ⦃L2, T2⦄ →
-                       ∀I,V2. ⦃L1, T1⦄ ⊆ ⦃L2, ⓕ{I}V2.T2⦄.
+lemma fsle_flat_dx_dx: ∀L1,L2,T1,T2. ⦃L1,T1⦄ ⊆ ⦃L2,T2⦄ →
+                       ∀I,V2. ⦃L1,T1⦄ ⊆ ⦃L2,ⓕ{I}V2.T2⦄.
 #L1 #L2 #T1 #T2 * #n1 #m1 #f2 #g2 #Hf2 #Hg2 #HL12 #Hfg2 #I #V2
 elim (frees_total L2 V2) #g1 #Hg1
 elim (sor_isfin_ex g1 g2) /2 width=3 by frees_fwd_isfin/ #g #Hg #_
@@ -78,8 +78,8 @@ qed.
 
 (* Advanced forward lemmas ***************************************************)
 
-lemma fsle_fwd_pair_sn: ∀I1,I2,L1,L2,V1,V2,T1,T2. ⦃L1.ⓑ{I1}V1, T1⦄ ⊆ ⦃L2.ⓑ{I2}V2, T2⦄ →
-                        ⦃L1.ⓧ, T1⦄ ⊆ ⦃L2.ⓑ{I2}V2, T2⦄.
+lemma fsle_fwd_pair_sn: ∀I1,I2,L1,L2,V1,V2,T1,T2. ⦃L1.ⓑ{I1}V1,T1⦄ ⊆ ⦃L2.ⓑ{I2}V2,T2⦄ →
+                        ⦃L1.ⓧ,T1⦄ ⊆ ⦃L2.ⓑ{I2}V2,T2⦄.
 #I1 #I2 #L1 #L2 #V1 #V2 #T1 #T2 *
 #n1 #n2 #f1 #f2 #Hf1 #Hf2 #HL12 #Hf12
 elim (lveq_inv_pair_pair … HL12) -HL12 #HL12 #H1 #H2 destruct
index d8c0c3adcc5c8e5b455b90640fcd1aa30706007d..588182317cdf7db2a2614bd0b2d76aac30b45061 100644 (file)
@@ -19,10 +19,10 @@ include "static_2/static/fsle_fqup.ma".
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma fsle_frees_trans: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊆ ⦃L2, T2⦄ →
-                        ∀f2. L2 ⊢ 𝐅*⦃T2⦄ ≘ f2 →
-                        ∃∃n1,n2,f1. L1 ⊢ 𝐅*⦃T1⦄ ≘ f1 &
-                                    L1 ≋ⓧ*[n1, n2] L2 & ⫱*[n1]f1 ⊆ ⫱*[n2]f2.
+lemma fsle_frees_trans: 
+      ∀L1,L2,T1,T2. ⦃L1,T1⦄ ⊆ ⦃L2,T2⦄ →
+      ∀f2. L2 ⊢ 𝐅+⦃T2⦄ ≘ f2 →
+      ∃∃n1,n2,f1. L1 ⊢ 𝐅+⦃T1⦄ ≘ f1 & L1 ≋ⓧ*[n1,n2] L2 & ⫱*[n1]f1 ⊆ ⫱*[n2]f2.
 #L1 #L2 #T1 #T2 * #n1 #n2 #f1 #g2 #Hf1 #Hg2 #HL #Hn #f2 #Hf2
 lapply (frees_mono … Hg2 … Hf2) -Hg2 -Hf2 #Hgf2
 lapply (tls_eq_repl n2 … Hgf2) -Hgf2 #Hgf2
@@ -30,19 +30,21 @@ lapply (sle_eq_repl_back2 … Hn … Hgf2) -g2
 /2 width=6 by ex3_3_intro/
 qed-.
 
-lemma fsle_frees_trans_eq: ∀L1,L2. |L1| = |L2| →
-                           ∀T1,T2. ⦃L1, T1⦄ ⊆ ⦃L2, T2⦄ → ∀f2. L2 ⊢ 𝐅*⦃T2⦄ ≘ f2 →
-                           ∃∃f1. L1 ⊢ 𝐅*⦃T1⦄ ≘ f1 & f1 ⊆ f2.
+lemma fsle_frees_trans_eq:
+      ∀L1,L2. |L1| = |L2| →
+      ∀T1,T2. ⦃L1,T1⦄ ⊆ ⦃L2,T2⦄ → ∀f2. L2 ⊢ 𝐅+⦃T2⦄ ≘ f2 →
+      ∃∃f1. L1 ⊢ 𝐅+⦃T1⦄ ≘ f1 & f1 ⊆ f2.
 #L1 #L2 #H1L #T1 #T2 #H2L #f2 #Hf2
 elim (fsle_frees_trans … H2L … Hf2) -T2 #n1 #n2 #f1 #Hf1 #H2L #Hf12
 elim (lveq_inj_length … H2L) // -L2 #H1 #H2 destruct
 /2 width=3 by ex2_intro/
 qed-.
 
-lemma fsle_inv_frees_eq: ∀L1,L2. |L1| = |L2| →
-                         ∀T1,T2. ⦃L1, T1⦄ ⊆ ⦃L2, T2⦄ →
-                         ∀f1. L1 ⊢ 𝐅*⦃T1⦄ ≘ f1 → ∀f2. L2 ⊢ 𝐅*⦃T2⦄ ≘ f2 →
-                         f1 ⊆ f2.
+lemma fsle_inv_frees_eq:
+      ∀L1,L2. |L1| = |L2| →
+      ∀T1,T2. ⦃L1,T1⦄ ⊆ ⦃L2,T2⦄ →
+      ∀f1. L1 ⊢ 𝐅+⦃T1⦄ ≘ f1 → ∀f2. L2 ⊢ 𝐅+⦃T2⦄ ≘ f2 →
+      f1 ⊆ f2.
 #L1 #L2 #H1L #T1 #T2 #H2L #f1 #Hf1 #f2 #Hf2
 elim (fsle_frees_trans_eq … H2L … Hf2) // -L2 -T2
 /3 width=6 by frees_mono, sle_eq_repl_back1/
@@ -50,8 +52,9 @@ qed-.
 
 (* Main properties **********************************************************)
 
-theorem fsle_trans_sn: ∀L1,L2,T1,T. ⦃L1, T1⦄ ⊆ ⦃L2, T⦄ →
-                       ∀T2. ⦃L2, T⦄ ⊆ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⊆ ⦃L2, T2⦄.
+theorem fsle_trans_sn:
+        ∀L1,L2,T1,T. ⦃L1,T1⦄ ⊆ ⦃L2,T⦄ →
+        ∀T2. ⦃L2,T⦄ ⊆ ⦃L2,T2⦄ → ⦃L1,T1⦄ ⊆ ⦃L2,T2⦄.
 #L1 #L2 #T1 #T
 * #m1 #m0 #g1 #g0 #Hg1 #Hg0 #Hm #Hg
 #T2
@@ -62,8 +65,9 @@ lapply (sle_eq_repl_back1 … Hf … Hfg0) -f0
 /4 width=10 by sle_tls, sle_trans, ex4_4_intro/
 qed-.
 
-theorem fsle_trans_dx: ∀L1,T1,T. ⦃L1, T1⦄ ⊆ ⦃L1, T⦄ →
-                       ∀L2,T2. ⦃L1, T⦄ ⊆ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⊆ ⦃L2, T2⦄.
+theorem fsle_trans_dx:
+        ∀L1,T1,T. ⦃L1,T1⦄ ⊆ ⦃L1,T⦄ →
+        ∀L2,T2. ⦃L1,T⦄ ⊆ ⦃L2,T2⦄ → ⦃L1,T1⦄ ⊆ ⦃L2,T2⦄.
 #L1 #T1 #T
 * #m1 #m0 #g1 #g0 #Hg1 #Hg0 #Hm #Hg
 #L2 #T2
@@ -74,8 +78,9 @@ lapply (sle_eq_repl_back2 … Hg … Hgf0) -g0
 /4 width=10 by sle_tls, sle_trans, ex4_4_intro/
 qed-.
 
-theorem fsle_trans_rc: ∀L1,L,T1,T. |L1| = |L| → ⦃L1, T1⦄ ⊆ ⦃L, T⦄ →
-                       ∀L2,T2. |L| = |L2| → ⦃L, T⦄ ⊆ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⊆ ⦃L2, T2⦄.
+theorem fsle_trans_rc:
+        ∀L1,L,T1,T. |L1| = |L| → ⦃L1,T1⦄ ⊆ ⦃L,T⦄ →
+        ∀L2,T2. |L| = |L2| → ⦃L,T⦄ ⊆ ⦃L2,T2⦄ → ⦃L1,T1⦄ ⊆ ⦃L2,T2⦄.
 #L1 #L #T1 #T #HL1
 * #m1 #m0 #g1 #g0 #Hg1 #Hg0 #Hm #Hg
 #L2 #T2 #HL2
@@ -87,9 +92,10 @@ lapply (sle_eq_repl_back2 … Hg … Hgf0) -g0
 /3 width=10 by lveq_length_eq, sle_trans, ex4_4_intro/
 qed-.
 
-theorem fsle_bind_sn_ge: ∀L1,L2. |L2| ≤ |L1| →
-                         ∀V1,T1,T. ⦃L1, V1⦄ ⊆ ⦃L2, T⦄ → ⦃L1.ⓧ, T1⦄ ⊆ ⦃L2, T⦄ →
-                         ∀p,I. ⦃L1, ⓑ{p,I}V1.T1⦄ ⊆ ⦃L2, T⦄.
+theorem fsle_bind_sn_ge:
+        ∀L1,L2. |L2| ≤ |L1| →
+        ∀V1,T1,T. ⦃L1,V1⦄ ⊆ ⦃L2,T⦄ → ⦃L1.ⓧ,T1⦄ ⊆ ⦃L2,T⦄ →
+        ∀p,I. ⦃L1,ⓑ{p,I}V1.T1⦄ ⊆ ⦃L2,T⦄.
 #L1 #L2 #HL #V1 #T1 #T * #n1 #x #f1 #g #Hf1 #Hg #H1n1 #H2n1 #H #p #I
 elim (fsle_frees_trans … H … Hg) -H #n2 #n #f2 #Hf2 #H1n2 #H2n2
 elim (lveq_inj_void_sn_ge … H1n1 … H1n2) -H1n2 // #H1 #H2 #H3 destruct
@@ -98,8 +104,9 @@ elim (sor_isfin_ex f1 (⫱f2)) /3 width=3 by frees_fwd_isfin, isfin_tl/ #f #Hf #
 /4 width=12 by frees_bind_void, sor_inv_sle, sor_tls, ex4_4_intro/
 qed.
 
-theorem fsle_flat_sn: ∀L1,L2,V1,T1,T. ⦃L1, V1⦄ ⊆ ⦃L2, T⦄ → ⦃L1, T1⦄ ⊆ ⦃L2, T⦄ →
-                      ∀I. ⦃L1, ⓕ{I}V1.T1⦄ ⊆ ⦃L2, T⦄.
+theorem fsle_flat_sn:
+        ∀L1,L2,V1,T1,T. ⦃L1,V1⦄ ⊆ ⦃L2,T⦄ → ⦃L1,T1⦄ ⊆ ⦃L2,T⦄ →
+        ∀I. ⦃L1,ⓕ{I}V1.T1⦄ ⊆ ⦃L2,T⦄.
 #L1 #L2 #V1 #T1 #T * #n1 #x #f1 #g #Hf1 #Hg #H1n1 #H2n1 #H #I
 elim (fsle_frees_trans … H … Hg) -H #n2 #n #f2 #Hf2 #H1n2 #H2n2
 elim (lveq_inj … H1n1 … H1n2) -H1n2 #H1 #H2 destruct
@@ -107,9 +114,10 @@ elim (sor_isfin_ex f1 f2) /2 width=3 by frees_fwd_isfin/ #f #Hf #_
 /4 width=12 by frees_flat, sor_inv_sle, sor_tls, ex4_4_intro/
 qed.
 
-theorem fsle_bind_eq: ∀L1,L2. |L1| = |L2| → ∀V1,V2. ⦃L1, V1⦄ ⊆ ⦃L2, V2⦄ →
-                      ∀I2,T1,T2. ⦃L1.ⓧ, T1⦄ ⊆ ⦃L2.ⓑ{I2}V2, T2⦄ →
-                      ∀p,I1. ⦃L1, ⓑ{p,I1}V1.T1⦄ ⊆ ⦃L2, ⓑ{p,I2}V2.T2⦄.
+theorem fsle_bind_eq:
+        ∀L1,L2. |L1| = |L2| → ∀V1,V2. ⦃L1,V1⦄ ⊆ ⦃L2,V2⦄ →
+        ∀I2,T1,T2. ⦃L1.ⓧ,T1⦄ ⊆ ⦃L2.ⓑ{I2}V2,T2⦄ →
+        ∀p,I1. ⦃L1,ⓑ{p,I1}V1.T1⦄ ⊆ ⦃L2,ⓑ{p,I2}V2.T2⦄.
 #L1 #L2 #HL #V1 #V2
 * #n1 #m1 #f1 #g1 #Hf1 #Hg1 #H1L #Hfg1 #I2 #T1 #T2
 * #n2 #m2 #f2 #g2 #Hf2 #Hg2 #H2L #Hfg2 #p #I1
@@ -120,9 +128,10 @@ elim (sor_isfin_ex g1 (⫱g2)) /3 width=3 by frees_fwd_isfin, isfin_tl/ #g #Hg #
 /4 width=15 by frees_bind_void, frees_bind, monotonic_sle_sor, sle_tl, ex4_4_intro/
 qed.
 
-theorem fsle_bind: ∀L1,L2,V1,V2. ⦃L1, V1⦄ ⊆ ⦃L2, V2⦄ →
-                   ∀I1,I2,T1,T2. ⦃L1.ⓑ{I1}V1, T1⦄ ⊆ ⦃L2.ⓑ{I2}V2, T2⦄ →
-                   ∀p. ⦃L1, ⓑ{p,I1}V1.T1⦄ ⊆ ⦃L2, ⓑ{p,I2}V2.T2⦄.
+theorem fsle_bind:
+        ∀L1,L2,V1,V2. ⦃L1,V1⦄ ⊆ ⦃L2,V2⦄ →
+        ∀I1,I2,T1,T2. ⦃L1.ⓑ{I1}V1,T1⦄ ⊆ ⦃L2.ⓑ{I2}V2,T2⦄ →
+        ∀p. ⦃L1,ⓑ{p,I1}V1.T1⦄ ⊆ ⦃L2,ⓑ{p,I2}V2.T2⦄.
 #L1 #L2 #V1 #V2
 * #n1 #m1 #f1 #g1 #Hf1 #Hg1 #H1L #Hfg1 #I1 #I2 #T1 #T2
 * #n2 #m2 #f2 #g2 #Hf2 #Hg2 #H2L #Hfg2 #p
@@ -133,7 +142,8 @@ elim (sor_isfin_ex g1 (⫱g2)) /3 width=3 by frees_fwd_isfin, isfin_tl/ #g #Hg #
 /4 width=15 by frees_bind, monotonic_sle_sor, sle_tl, ex4_4_intro/
 qed.
 
-theorem fsle_flat: ∀L1,L2,V1,V2. ⦃L1, V1⦄ ⊆ ⦃L2, V2⦄ →
-                   ∀T1,T2. ⦃L1, T1⦄ ⊆ ⦃L2, T2⦄ →
-                   ∀I1,I2. ⦃L1, ⓕ{I1}V1.T1⦄ ⊆ ⦃L2, ⓕ{I2}V2.T2⦄.
+theorem fsle_flat:
+        ∀L1,L2,V1,V2. ⦃L1,V1⦄ ⊆ ⦃L2,V2⦄ →
+        ∀T1,T2. ⦃L1,T1⦄ ⊆ ⦃L2,T2⦄ →
+        ∀I1,I2. ⦃L1,ⓕ{I1}V1.T1⦄ ⊆ ⦃L2,ⓕ{I2}V2.T2⦄.
 /3 width=1 by fsle_flat_sn, fsle_flat_dx_dx, fsle_flat_dx_sn/ qed-.
index a811b35be8c477af21fc9b4637a8539db08a93f7..2bf6a6b0b78f799dad42815af67f56d0b143cb25 100644 (file)
@@ -19,14 +19,14 @@ include "static_2/static/fsle.ma".
 
 (* Properties with length for local environments ****************************)
 
-lemma fsle_sort_bi: ∀L1,L2,s1,s2. |L1| = |L2| → ⦃L1, ⋆s1⦄ ⊆ ⦃L2, ⋆s2⦄.
+lemma fsle_sort_bi: ∀L1,L2,s1,s2. |L1| = |L2| → ⦃L1,⋆s1⦄ ⊆ ⦃L2,⋆s2⦄.
 /3 width=8 by lveq_length_eq, frees_sort, sle_refl, ex4_4_intro/ qed.
 
-lemma fsle_gref_bi: ∀L1,L2,l1,l2. |L1| = |L2| → ⦃L1, §l1⦄ ⊆ ⦃L2, §l2⦄.
+lemma fsle_gref_bi: ∀L1,L2,l1,l2. |L1| = |L2| → ⦃L1,§l1⦄ ⊆ ⦃L2,§l2⦄.
 /3 width=8 by lveq_length_eq, frees_gref, sle_refl, ex4_4_intro/ qed.
 
-lemma fsle_pair_bi: ∀K1,K2. |K1| = |K2| → ∀V1,V2. ⦃K1, V1⦄ ⊆ ⦃K2, V2⦄ →
-                    ∀I1,I2. ⦃K1.ⓑ{I1}V1, #O⦄ ⊆ ⦃K2.ⓑ{I2}V2, #O⦄.
+lemma fsle_pair_bi: ∀K1,K2. |K1| = |K2| → ∀V1,V2. ⦃K1,V1⦄ ⊆ ⦃K2,V2⦄ →
+                    ∀I1,I2. ⦃K1.ⓑ{I1}V1,#O⦄ ⊆ ⦃K2.ⓑ{I2}V2,#O⦄.
 #K1 #K2 #HK #V1 #V2
 * #n1 #n2 #f1 #f2 #Hf1 #Hf2 #HK12 #Hf12
 #I1 #I2
@@ -35,6 +35,6 @@ elim (lveq_inj_length … HK12) // -HK #H1 #H2 destruct
 qed.
 
 lemma fsle_unit_bi: ∀K1,K2. |K1| = |K2| →
-                    ∀I1,I2. ⦃K1.ⓤ{I1}, #O⦄ ⊆ ⦃K2.ⓤ{I2}, #O⦄.
+                    ∀I1,I2. ⦃K1.ⓤ{I1},#O⦄ ⊆ ⦃K2.ⓤ{I2},#O⦄.
 /3 width=8 by frees_unit, lveq_length_eq, sle_refl, ex4_4_intro/
 qed.
index 569152d1e934e8267f798a00ff67ecabfb881f05..73cfc105e404452b8210cf743695939b6f875ac4 100644 (file)
@@ -17,21 +17,18 @@ include "static_2/relocation/drops_vector.ma".
 
 (* GENERIC COMPUTATION PROPERTIES *******************************************)
 
-definition nf ≝ λRR:relation4 genv lenv term term. λRS:relation term.
-                λG,L,T. NF … (RR G L) RS T.
+definition nf (RR:relation4 genv lenv term term) (RS:relation term) ≝
+              λG,L,T. NF … (RR G L) RS T.
 
 definition candidate: Type[0] ≝ relation3 genv lenv term.
 
-definition CP0 ≝ λRR:relation4 genv lenv term term. λRS:relation term.
-                 ∀G. d_liftable1 (nf RR RS G).
+definition CP0 (RR) (RS) ≝ ∀G. d_liftable1 (nf RR RS G).
 
-definition CP1 ≝ λRR:relation4 genv lenv term term. λRS:relation term.
-                 ∀G,L. ∃s. NF … (RR G L) RS (⋆s).
+definition CP1 (RR) (RS) ≝ ∀G,L,s. nf RR RS G L (⋆s).
 
-definition CP2 ≝ λRP:candidate. ∀G. d_liftable1 (RP G).
+definition CP2 (RP:candidate) ≝ ∀G. d_liftable1 (RP G).
 
-definition CP3 ≝ λRP:candidate.
-                 ∀G,L,T,s. RP G L (ⓐ⋆s.T) → RP G L T.
+definition CP3 (RP:candidate) ≝ ∀G,L,T,s. RP G L (ⓐ⋆s.T) → RP G L T.
 
 (* requirements for generic computation properties *)
 (* Basic_1: includes: nf2_lift1 *)
index d6424d236b77e3f6332c0562ca2b25410621c7c7..7fa84f9fbc09280f229c6f30b09d8992d8336930 100644 (file)
@@ -22,16 +22,16 @@ include "static_2/static/lsubc_drops.ma".
 (* Basic_1: was: sc3_arity_csubc *)
 theorem acr_aaa_csubc_lifts: ∀RR,RS,RP.
                              gcp RR RS RP → gcr RR RS RP RP →
-                             ∀G,L1,T,A. ⦃G, L1⦄ ⊢ T ⁝ A → ∀b,f,L0. ⬇*[b, f] L0 ≘ L1 →
+                             ∀G,L1,T,A. ⦃G,L1⦄ ⊢ T ⁝ A → ∀b,f,L0. ⬇*[b,f] L0 ≘ L1 →
                              ∀T0. ⬆*[f] T ≘ T0 → ∀L2. G ⊢ L2 ⫃[RP] L0 →
-                             ⦃G, L2, T0⦄ ϵ[RP] 〚A〛.
+                             ⦃G,L2,T0⦄ ϵ[RP] 〚A〛.
 #RR #RS #RP #H1RP #H2RP #G #L1 #T @(fqup_wf_ind_eq (Ⓣ) … G L1 T) -G -L1 -T
 #Z #Y #X #IH #G #L1 * [ * | * [ #p ] * ]
 [ #s #HG #HL #HT #A #HA #b #f #L0 #HL01 #X0 #H0 #L2 #HL20 destruct -IH
   lapply (aaa_inv_sort … HA) -HA #H destruct
   >(lifts_inv_sort1 … H0) -H0
   lapply (acr_gcr … H1RP H2RP (⓪)) #HAtom
-  lapply (s4 … HAtom G L2 (Ⓔ)) /2 width=1 by/
+  lapply (s2 … HAtom G L2 (Ⓔ)) /3 width=7 by cp1, simple_atom/
 | #i #HG #HL #HT #A #HA #b #f #L0 #HL01 #X0 #H0 #L2 #HL20 destruct
   elim (aaa_inv_lref_drops … HA) -HA #I #K1 #V1 #HLK1 #HKV1
   elim (lifts_inv_lref1 … H0) -H0 #j #Hf #H destruct
@@ -91,11 +91,11 @@ qed.
 
 (* Basic_1: was: sc3_arity *)
 lemma acr_aaa: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP →
-               ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ⦃G, L, T⦄ ϵ[RP] 〚A〛.
+               ∀G,L,T,A. ⦃G,L⦄ ⊢ T ⁝ A → ⦃G,L,T⦄ ϵ[RP] 〚A〛.
 /3 width=9 by drops_refl, lifts_refl, acr_aaa_csubc_lifts/ qed.
 
 lemma gcr_aaa: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP →
-               ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → RP G L T.
+               ∀G,L,T,A. ⦃G,L⦄ ⊢ T ⁝ A → RP G L T.
 #RR #RS #RP #H1RP #H2RP #G #L #T #A #HT
 lapply (acr_gcr … H1RP H2RP A) #HA
 @(s1 … HA) /2 width=4 by acr_aaa/
index 5a5d9ee22a1859c7392fae0424ec56cd99f790a6..d13387c3f743120c850910b296d0f984b1dc380d 100644 (file)
@@ -28,16 +28,13 @@ definition S1 ≝ λRP,C:candidate.
 (* Note: this is Tait's iii, or Girard's CR4 *)
 definition S2 ≝ λRR:relation4 genv lenv term term. λRS:relation term. λRP,C:candidate.
                 ∀G,L,Vs. all … (RP G L) Vs →
-                ∀T. 𝐒⦃T⦄ → NF … (RR G L) RS T → C G L (ⒶVs.T).
+                ∀T. 𝐒⦃T⦄ → nf RR RS G L T → C G L (ⒶVs.T).
 
 (* Note: this generalizes Tait's ii *)
 definition S3 ≝ λC:candidate.
                 ∀a,G,L,Vs,V,T,W.
                 C G L (ⒶVs.ⓓ{a}ⓝW.V.T) → C G L (ⒶVs.ⓐV.ⓛ{a}W.T).
 
-definition S4 ≝ λRP,C:candidate.
-                ∀G,L,Vs. all … (RP G L) Vs → ∀s. C G L (ⒶVs.⋆s).
-
 definition S5 ≝ λC:candidate. ∀I,G,L,K,Vs,V1,V2,i.
                 C G L (ⒶVs.V2) → ⬆*[↑i] V1 ≘ V2 →
                 ⬇*[i] L ≘ K.ⓑ{I}V1 → C G L (ⒶVs.#i).
@@ -54,7 +51,6 @@ record gcr (RR:relation4 genv lenv term term) (RS:relation term) (RP,C:candidate
 { s1: S1 RP C;
   s2: S2 RR RS RP C;
   s3: S3 C;
-  s4: S4 RP C;
   s5: S5 C;
   s6: S6 RP C;
   s7: S7 C
@@ -63,7 +59,7 @@ record gcr (RR:relation4 genv lenv term term) (RS:relation term) (RP,C:candidate
 (* the functional construction for candidates *)
 definition cfun: candidate → candidate → candidate ≝
                  λC1,C2,G,K,T. ∀f,L,W,U.
-                 ⬇*[Ⓕ, f] L ≘ K → ⬆*[f] T ≘ U → C1 G L W → C2 G L (ⓐW.U).
+                 ⬇*[Ⓕ,f] L ≘ K → ⬆*[f] T ≘ U → C1 G L W → C2 G L (ⓐW.U).
 
 (* the reducibility candidate associated to an atomic arity *)
 rec definition acr (RP:candidate) (A:aarity) on A: candidate ≝
@@ -99,12 +95,14 @@ qed-.
 (* Basic_1: was:
    sc3_sn3 sc3_abst sc3_appl sc3_abbr sc3_bind sc3_cast
 *)
+(* Note: one sort must exist *)
 lemma acr_gcr: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP →
                ∀A. gcr RR RS RP (acr RP A).
 #RR #RS #RP #H1RP #H2RP #A elim A -A //
 #B #A #IHB #IHA @mk_gcr
 [ #G #L #T #H
-  elim (cp1 … H1RP G L) #s #HK
+  letin s ≝ 0 (* one sort must exist *)
+  lapply (cp1 … H1RP G L s) #HK
   lapply (s2 … IHB G L (Ⓔ) … HK) // #HB
   lapply (H (𝐈𝐝) L (⋆s) T ? ? ?) -H
   /3 width=6 by s1, cp3, drops_refl, lifts_refl/
@@ -117,11 +115,6 @@ lemma acr_gcr: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP →
   elim (lifts_inv_flat1 … H0) -H0 #U0 #X #HU0 #HX #H destruct
   elim (lifts_inv_bind1 … HX) -HX #W0 #T0 #HW0 #HT0 #H destruct
   @(s3 … IHA … (V0⨮V0s)) /5 width=6 by lifts_applv, lifts_flat, lifts_bind/
-| #G #L #Vs #HVs #s #f #L0 #V0 #X #HL0 #H #HB
-  elim (lifts_inv_applv1 … H) -H #V0s #X0 #HV0s #H0 #H destruct
-  >(lifts_inv_sort1 … H0) -X0
-  lapply (s1 … IHB … HB) #HV0
-  @(s4 … IHA … (V0⨮V0s)) /3 width=7 by gcp2_all, conj/
 | #I #G #L #K #Vs #V1 #V2 #i #HA #HV12 #HLK #f #L0 #V0 #X #HL0 #H #HB
   elim (lifts_inv_applv1 … H) -H #V0s #X0 #HV0s #H0 #H destruct
   elim (lifts_inv_lref1 … H0) -H0 #j #Hf #H destruct
@@ -155,11 +148,11 @@ lemma acr_gcr: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP →
 qed.
 
 lemma acr_abst: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP →
-                ∀p,G,L,W,T,A,B. ⦃G, L, W⦄ ϵ[RP] 〚B〛 → (
-                   ∀b,f,L0,V0,W0,T0. ⬇*[b, f] L0 ≘ L → ⬆*[f] W ≘ W0 → ⬆*[⫯f] T ≘ T0 →
-                                   ⦃G, L0, V0⦄ ϵ[RP] 〚B〛 → ⦃G, L0, W0⦄ ϵ[RP] 〚B〛 → ⦃G, L0.ⓓⓝW0.V0, T0⦄ ϵ[RP] 〚A〛
+                ∀p,G,L,W,T,A,B. ⦃G,L,W⦄ ϵ[RP] 〚B〛 → (
+                   ∀b,f,L0,V0,W0,T0. ⬇*[b,f] L0 ≘ L → ⬆*[f] W ≘ W0 → ⬆*[⫯f] T ≘ T0 →
+                                   ⦃G,L0,V0⦄ ϵ[RP] 〚B〛 → ⦃G,L0,W0⦄ ϵ[RP] 〚B〛 → ⦃G,L0.ⓓⓝW0.V0,T0⦄ ϵ[RP] 〚A〛
                 ) →
-                ⦃G, L, ⓛ{p}W.T⦄ ϵ[RP] 〚②B.A〛.
+                ⦃G,L,ⓛ{p}W.T⦄ ϵ[RP] 〚②B.A〛.
 #RR #RS #RP #H1RP #H2RP #p #G #L #W #T #A #B #HW #HA #f #L0 #V0 #X #HL0 #H #HB
 lapply (acr_gcr … H1RP H2RP A) #HCA
 lapply (acr_gcr … H1RP H2RP B) #HCB
index 7277086ac1e83e55dd083d8a64462f6abb9efc47..9f8404cd0cf4e11e91d1a299b93d7714293fa4e8 100644 (file)
@@ -20,7 +20,7 @@ include "static_2/static/aaa.ma".
 inductive lsuba (G:genv): relation lenv ≝
 | lsuba_atom: lsuba G (⋆) (⋆)
 | lsuba_bind: ∀I,L1,L2. lsuba G L1 L2 → lsuba G (L1.ⓘ{I}) (L2.ⓘ{I})
-| lsuba_beta: ∀L1,L2,W,V,A. ⦃G, L1⦄ ⊢ ⓝW.V ⁝ A → ⦃G, L2⦄ ⊢ W ⁝ A →
+| lsuba_beta: ∀L1,L2,W,V,A. ⦃G,L1⦄ ⊢ ⓝW.V ⁝ A → ⦃G,L2⦄ ⊢ W ⁝ A →
               lsuba G L1 L2 → lsuba G (L1.ⓓⓝW.V) (L2.ⓛW)
 .
 
@@ -43,7 +43,7 @@ lemma lsuba_inv_atom1: ∀G,L2. G ⊢ ⋆ ⫃⁝ L2 → L2 = ⋆.
 
 fact lsuba_inv_bind1_aux: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → ∀I,K1. L1 = K1.ⓘ{I} →
                           (∃∃K2. G ⊢ K1 ⫃⁝ K2 & L2 = K2.ⓘ{I}) ∨
-                          ∃∃K2,W,V,A. ⦃G, K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G, K2⦄ ⊢ W ⁝ A &
+                          ∃∃K2,W,V,A. ⦃G,K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G,K2⦄ ⊢ W ⁝ A &
                                       G ⊢ K1 ⫃⁝ K2 & I = BPair Abbr (ⓝW.V) & L2 = K2.ⓛW.
 #G #L1 #L2 * -L1 -L2
 [ #J #K1 #H destruct
@@ -54,7 +54,7 @@ qed-.
 
 lemma lsuba_inv_bind1: ∀I,G,K1,L2. G ⊢ K1.ⓘ{I} ⫃⁝ L2 →
                        (∃∃K2. G ⊢ K1 ⫃⁝ K2 & L2 = K2.ⓘ{I}) ∨
-                       ∃∃K2,W,V,A. ⦃G, K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G, K2⦄ ⊢ W ⁝ A & G ⊢ K1 ⫃⁝ K2 &
+                       ∃∃K2,W,V,A. ⦃G,K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G,K2⦄ ⊢ W ⁝ A & G ⊢ K1 ⫃⁝ K2 &
                                    I = BPair Abbr (ⓝW.V) & L2 = K2.ⓛW.
 /2 width=3 by lsuba_inv_bind1_aux/ qed-.
 
@@ -71,7 +71,7 @@ lemma lsubc_inv_atom2: ∀G,L1. G ⊢ L1 ⫃⁝ ⋆ → L1 = ⋆.
 
 fact lsuba_inv_bind2_aux: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → ∀I,K2. L2 = K2.ⓘ{I} →
                           (∃∃K1. G ⊢ K1 ⫃⁝ K2 & L1 = K1.ⓘ{I}) ∨
-                          ∃∃K1,V,W, A. ⦃G, K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G, K2⦄ ⊢ W ⁝ A &
+                          ∃∃K1,V,W,A. ⦃G,K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G,K2⦄ ⊢ W ⁝ A &
                                        G ⊢ K1 ⫃⁝ K2 & I = BPair Abst W & L1 = K1.ⓓⓝW.V.
 #G #L1 #L2 * -L1 -L2
 [ #J #K2 #H destruct
@@ -82,7 +82,7 @@ qed-.
 
 lemma lsuba_inv_bind2: ∀I,G,L1,K2. G ⊢ L1 ⫃⁝ K2.ⓘ{I} →
                        (∃∃K1. G ⊢ K1 ⫃⁝ K2 & L1 = K1.ⓘ{I}) ∨
-                       ∃∃K1,V,W,A. ⦃G, K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G, K2⦄ ⊢ W ⁝ A & G ⊢ K1 ⫃⁝ K2 &
+                       ∃∃K1,V,W,A. ⦃G,K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G,K2⦄ ⊢ W ⁝ A & G ⊢ K1 ⫃⁝ K2 &
                                    I = BPair Abst W & L1 = K1.ⓓⓝW.V.
 /2 width=3 by lsuba_inv_bind2_aux/ qed-.
 
index d03aecd11d011b47c5f979775eb482fd6fb91619..9a42e6bf9ce2a7e66be829a791acf8e875c97e29 100644 (file)
@@ -19,8 +19,8 @@ include "static_2/static/lsuba.ma".
 
 (* Properties with atomic arity assignment **********************************)
 
-lemma lsuba_aaa_conf: ∀G,L1,V,A. ⦃G, L1⦄ ⊢ V ⁝ A →
-                      ∀L2. G ⊢ L1 ⫃⁝ L2 → ⦃G, L2⦄ ⊢ V ⁝ A.
+lemma lsuba_aaa_conf: ∀G,L1,V,A. ⦃G,L1⦄ ⊢ V ⁝ A →
+                      ∀L2. G ⊢ L1 ⫃⁝ L2 → ⦃G,L2⦄ ⊢ V ⁝ A.
 #G #L1 #V #A #H elim H -G -L1 -V -A
 [ //
 | #I #G #L1 #V #A #HA #IH #L2 #H
@@ -36,8 +36,8 @@ lemma lsuba_aaa_conf: ∀G,L1,V,A. ⦃G, L1⦄ ⊢ V ⁝ A →
 ]
 qed-.
 
-lemma lsuba_aaa_trans: ∀G,L2,V,A. ⦃G, L2⦄ ⊢ V ⁝ A →
-                       ∀L1. G ⊢ L1 ⫃⁝ L2 → ⦃G, L1⦄ ⊢ V ⁝ A.
+lemma lsuba_aaa_trans: ∀G,L2,V,A. ⦃G,L2⦄ ⊢ V ⁝ A →
+                       ∀L1. G ⊢ L1 ⫃⁝ L2 → ⦃G,L1⦄ ⊢ V ⁝ A.
 #G #L2 #V #A #H elim H -G -L2 -V -A
 [ //
 | #I #G #L2 #V #A #HA #IH #L1 #H
index bfec752e7b06ed526e1ec413c9428e58f37b5c61..86d3a1bb90ecb2273ca3a32eb60723d71392ea74 100644 (file)
@@ -22,8 +22,8 @@ include "static_2/static/lsuba.ma".
 (* Note: the premise 𝐔⦃f⦄ cannot be removed *)
 (* Basic_2A1: includes: lsuba_drop_O1_conf *)
 lemma lsuba_drops_conf_isuni: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → 
-                              ∀b,f,K1. 𝐔⦃f⦄ → ⬇*[b, f] L1 ≘ K1 →
-                              ∃∃K2. G ⊢ K1 ⫃⁝ K2 & ⬇*[b, f] L2 ≘ K2.
+                              ∀b,f,K1. 𝐔⦃f⦄ → ⬇*[b,f] L1 ≘ K1 →
+                              ∃∃K2. G ⊢ K1 ⫃⁝ K2 & ⬇*[b,f] L2 ≘ K2.
 #G #L1 #L2 #H elim H -L1 -L2
 [ /2 width=3 by ex2_intro/
 | #I #L1 #L2 #HL12 #IH #b #f #K1 #Hf #H
@@ -46,8 +46,8 @@ qed-.
 (* Note: the premise 𝐔⦃f⦄ cannot be removed *)
 (* Basic_2A1: includes: lsuba_drop_O1_trans *)
 lemma lsuba_drops_trans_isuni: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 →
-                               ∀b,f,K2. 𝐔⦃f⦄ → ⬇*[b, f] L2 ≘ K2 →
-                               ∃∃K1. G ⊢ K1 ⫃⁝ K2 & ⬇*[b, f] L1 ≘ K1.
+                               ∀b,f,K2. 𝐔⦃f⦄ → ⬇*[b,f] L2 ≘ K2 →
+                               ∃∃K1. G ⊢ K1 ⫃⁝ K2 & ⬇*[b,f] L1 ≘ K1.
 #G #L1 #L2 #H elim H -L1 -L2
 [ /2 width=3 by ex2_intro/
 | #I #L1 #L2 #HL12 #IH #b #f #K2 #Hf #H
index d7d1c565a4a93e8ca3568c4b2c67d60ca9a4e339..3e1637e7a919bfd2c43e9360d2267e6113bf15a3 100644 (file)
@@ -21,7 +21,7 @@ include "static_2/static/gcp_cr.ma".
 inductive lsubc (RP) (G): relation lenv ≝
 | lsubc_atom: lsubc RP G (⋆) (⋆)
 | lsubc_bind: ∀I,L1,L2. lsubc RP G L1 L2 → lsubc RP G (L1.ⓘ{I}) (L2.ⓘ{I})
-| lsubc_beta: ∀L1,L2,V,W,A. ⦃G, L1, V⦄ ϵ[RP] 〚A〛 → ⦃G, L1, W⦄ ϵ[RP] 〚A〛 → ⦃G, L2⦄ ⊢ W ⁝ A →
+| lsubc_beta: ∀L1,L2,V,W,A. ⦃G,L1,V⦄ ϵ[RP] 〚A〛 → ⦃G,L1,W⦄ ϵ[RP] 〚A〛 → ⦃G,L2⦄ ⊢ W ⁝ A →
               lsubc RP G L1 L2 → lsubc RP G (L1. ⓓⓝW.V) (L2.ⓛW)
 .
 
@@ -45,7 +45,7 @@ lemma lsubc_inv_atom1: ∀RP,G,L2. G ⊢ ⋆ ⫃[RP] L2 → L2 = ⋆.
 
 fact lsubc_inv_bind1_aux: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → ∀I,K1. L1 = K1.ⓘ{I} →
                           (∃∃K2. G ⊢ K1 ⫃[RP] K2 & L2 = K2.ⓘ{I}) ∨
-                          ∃∃K2,V,W,A. ⦃G, K1, V⦄ ϵ[RP] 〚A〛 & ⦃G, K1, W⦄ ϵ[RP] 〚A〛 & ⦃G, K2⦄ ⊢ W ⁝ A &
+                          ∃∃K2,V,W,A. ⦃G,K1,V⦄ ϵ[RP] 〚A〛 & ⦃G,K1,W⦄ ϵ[RP] 〚A〛 & ⦃G,K2⦄ ⊢ W ⁝ A &
                                       G ⊢ K1 ⫃[RP] K2 &
                                       L2 = K2. ⓛW & I = BPair Abbr (ⓝW.V).
 #RP #G #L1 #L2 * -L1 -L2
@@ -59,7 +59,7 @@ qed-.
 (* Basic_1: was: csubc_gen_head_r *)
 lemma lsubc_inv_bind1: ∀RP,I,G,K1,L2. G ⊢ K1.ⓘ{I} ⫃[RP] L2 →
                        (∃∃K2. G ⊢ K1 ⫃[RP] K2 & L2 = K2.ⓘ{I}) ∨
-                       ∃∃K2,V,W,A. ⦃G, K1, V⦄ ϵ[RP] 〚A〛 & ⦃G, K1, W⦄ ϵ[RP] 〚A〛 & ⦃G, K2⦄ ⊢ W ⁝ A &
+                       ∃∃K2,V,W,A. ⦃G,K1,V⦄ ϵ[RP] 〚A〛 & ⦃G,K1,W⦄ ϵ[RP] 〚A〛 & ⦃G,K2⦄ ⊢ W ⁝ A &
                                    G ⊢ K1 ⫃[RP] K2 &
                                    L2 = K2.ⓛW & I = BPair Abbr (ⓝW.V).
 /2 width=3 by lsubc_inv_bind1_aux/ qed-.
@@ -78,7 +78,7 @@ lemma lsubc_inv_atom2: ∀RP,G,L1. G ⊢ L1 ⫃[RP] ⋆ → L1 = ⋆.
 
 fact lsubc_inv_bind2_aux: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → ∀I,K2. L2 = K2.ⓘ{I} →
                           (∃∃K1. G ⊢ K1 ⫃[RP] K2 & L1 = K1. ⓘ{I}) ∨
-                          ∃∃K1,V,W,A. ⦃G, K1, V⦄ ϵ[RP] 〚A〛 & ⦃G, K1, W⦄ ϵ[RP] 〚A〛 & ⦃G, K2⦄ ⊢ W ⁝ A &
+                          ∃∃K1,V,W,A. ⦃G,K1,V⦄ ϵ[RP] 〚A〛 & ⦃G,K1,W⦄ ϵ[RP] 〚A〛 & ⦃G,K2⦄ ⊢ W ⁝ A &
                                       G ⊢ K1 ⫃[RP] K2 &
                                       L1 = K1.ⓓⓝW.V & I = BPair Abst W.
 #RP #G #L1 #L2 * -L1 -L2
@@ -92,7 +92,7 @@ qed-.
 (* Basic_1: was just: csubc_gen_head_l *)
 lemma lsubc_inv_bind2: ∀RP,I,G,L1,K2. G ⊢ L1 ⫃[RP] K2.ⓘ{I} →
                        (∃∃K1. G ⊢ K1 ⫃[RP] K2 & L1 = K1.ⓘ{I}) ∨
-                       ∃∃K1,V,W,A. ⦃G, K1, V⦄ ϵ[RP] 〚A〛 & ⦃G, K1, W⦄ ϵ[RP] 〚A〛 & ⦃G, K2⦄ ⊢ W ⁝ A &
+                       ∃∃K1,V,W,A. ⦃G,K1,V⦄ ϵ[RP] 〚A〛 & ⦃G,K1,W⦄ ϵ[RP] 〚A〛 & ⦃G,K2⦄ ⊢ W ⁝ A &
                                    G ⊢ K1 ⫃[RP] K2 &
                                    L1 = K1.ⓓⓝW.V & I = BPair Abst W.
 /2 width=3 by lsubc_inv_bind2_aux/ qed-.
index 9fe4888bf5b70a26425a791dfbbd217fec035783..c4f58651397cd9acc90245215b8491075c1df066 100644 (file)
@@ -23,8 +23,8 @@ include "static_2/static/lsubc.ma".
 (* Basic_1: includes: csubc_drop_conf_O *)
 (* Basic_2A1: includes: lsubc_drop_O1_trans *)
 lemma lsubc_drops_trans_isuni: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 →
-                               ∀b,f,K2. 𝐔⦃f⦄ → ⬇*[b, f] L2 ≘ K2 →
-                               ∃∃K1. ⬇*[b, f] L1 ≘ K1 & G ⊢ K1 ⫃[RP] K2.
+                               ∀b,f,K2. 𝐔⦃f⦄ → ⬇*[b,f] L2 ≘ K2 →
+                               ∃∃K1. ⬇*[b,f] L1 ≘ K1 & G ⊢ K1 ⫃[RP] K2.
 #RP #G #L1 #L2 #H elim H -L1 -L2
 [ /2 width=3 by ex2_intro/
 | #I #L1 #L2 #HL12 #IH #b #f #K2 #Hf #H
@@ -48,8 +48,8 @@ qed-.
 (* Basic_1: includes: csubc_drop_conf_rev *)
 (* Basic_2A1: includes: drop_lsubc_trans *)
 lemma drops_lsubc_trans: ∀RR,RS,RP. gcp RR RS RP →
-                         ∀b,f,G,L1,K1. ⬇*[b, f] L1 ≘ K1 → ∀K2. G ⊢ K1 ⫃[RP] K2 →
-                         ∃∃L2. G ⊢ L1 ⫃[RP] L2 & ⬇*[b, f] L2 ≘ K2.
+                         ∀b,f,G,L1,K1. ⬇*[b,f] L1 ≘ K1 → ∀K2. G ⊢ K1 ⫃[RP] K2 →
+                         ∃∃L2. G ⊢ L1 ⫃[RP] L2 & ⬇*[b,f] L2 ≘ K2.
 #RR #RS #RP #HR #b #f #G #L1 #K1 #H elim H -f -L1 -K1
 [ #f #Hf #Y #H lapply (lsubc_inv_atom1 … H) -H
   #H destruct /4 width=3 by lsubc_atom, drops_atom, ex2_intro/
index 3c69f7f520afa8740ae6df95d36b91cfd6926932..e2ac985dc19f77c1e57615eb95eb1e71acbfe4c0 100644 (file)
@@ -24,9 +24,9 @@ inductive lsubf: relation4 lenv rtmap lenv rtmap ≝
               lsubf (L1.ⓘ{I1}) (⫯f1) (L2.ⓘ{I2}) (⫯f2)
 | lsubf_bind: ∀f1,f2,I,L1,L2. lsubf L1 f1 L2 f2 →
               lsubf (L1.ⓘ{I}) (↑f1) (L2.ⓘ{I}) (↑f2)
-| lsubf_beta: ∀f,f0,f1,f2,L1,L2,W,V. L1 ⊢ 𝐅*⦃V⦄ ≘ f → f0 ⋓ f ≘ f1 →
+| lsubf_beta: ∀f,f0,f1,f2,L1,L2,W,V. L1 ⊢ 𝐅+⦃V⦄ ≘ f → f0 ⋓ f ≘ f1 →
               lsubf L1 f0 L2 f2 → lsubf (L1.ⓓⓝW.V) (↑f1) (L2.ⓛW) (↑f2)
-| lsubf_unit: ∀f,f0,f1,f2,I1,I2,L1,L2,V. L1 ⊢ 𝐅*⦃V⦄ ≘ f → f0 ⋓ f ≘ f1 →
+| lsubf_unit: ∀f,f0,f1,f2,I1,I2,L1,L2,V. L1 ⊢ 𝐅+⦃V⦄ ≘ f → f0 ⋓ f ≘ f1 →
               lsubf L1 f0 L2 f2 → lsubf (L1.ⓑ{I1}V) (↑f1) (L2.ⓤ{I2}) (↑f2)
 .
 
@@ -36,8 +36,9 @@ interpretation
 
 (* Basic inversion lemmas ***************************************************)
 
-fact lsubf_inv_atom1_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → L1 = ⋆ →
-                          f1 ≡ f2 ∧ L2 = ⋆.
+fact lsubf_inv_atom1_aux:
+     ∀f1,f2,L1,L2. ⦃L1,f1⦄ ⫃𝐅+ ⦃L2,f2⦄ → L1 = ⋆ →
+     ∧∧ f1 ≡ f2 & L2 = ⋆.
 #f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2
 [ /2 width=1 by conj/
 | #f1 #f2 #I1 #I2 #L1 #L2 #_ #H destruct
@@ -47,12 +48,13 @@ fact lsubf_inv_atom1_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
 ]
 qed-.
 
-lemma lsubf_inv_atom1: ∀f1,f2,L2. ⦃⋆, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → f1 ≡ f2 ∧ L2 = ⋆.
+lemma lsubf_inv_atom1: ∀f1,f2,L2. ⦃⋆,f1⦄ ⫃𝐅+ ⦃L2,f2⦄ → ∧∧ f1 ≡ f2 & L2 = ⋆.
 /2 width=3 by lsubf_inv_atom1_aux/ qed-.
 
-fact lsubf_inv_push1_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
-                          ∀g1,I1,K1. f1 = ⫯g1 → L1 = K1.ⓘ{I1} →
-                          ∃∃g2,I2,K2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ⫯g2 & L2 = K2.ⓘ{I2}.
+fact lsubf_inv_push1_aux:
+     ∀f1,f2,L1,L2. ⦃L1,f1⦄ ⫃𝐅+ ⦃L2,f2⦄ →
+     ∀g1,I1,K1. f1 = ⫯g1 → L1 = K1.ⓘ{I1} →
+     ∃∃g2,I2,K2. ⦃K1,g1⦄ ⫃𝐅+ ⦃K2,g2⦄ & f2 = ⫯g2 & L2 = K2.ⓘ{I2}.
 #f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2
 [ #f1 #f2 #_ #g1 #J1 #K1 #_ #H destruct
 | #f1 #f2 #I1 #I2 #L1 #L2 #H12 #g1 #J1 #K1 #H1 #H2 destruct
@@ -63,19 +65,20 @@ fact lsubf_inv_push1_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
 ]
 qed-.
 
-lemma lsubf_inv_push1: ∀g1,f2,I1,K1,L2. ⦃K1.ⓘ{I1}, ⫯g1⦄ ⫃𝐅* ⦃L2, f2⦄ →
-                       ∃∃g2,I2,K2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ⫯g2 & L2 = K2.ⓘ{I2}.
+lemma lsubf_inv_push1:
+      ∀g1,f2,I1,K1,L2. ⦃K1.ⓘ{I1},⫯g1⦄ ⫃𝐅+ ⦃L2,f2⦄ →
+      ∃∃g2,I2,K2. ⦃K1,g1⦄ ⫃𝐅+ ⦃K2,g2⦄ & f2 = ⫯g2 & L2 = K2.ⓘ{I2}.
 /2 width=6 by lsubf_inv_push1_aux/ qed-.
 
-fact lsubf_inv_pair1_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
-                          ∀g1,I,K1,X. f1 = ↑g1 → L1 = K1.ⓑ{I}X →
-                          ∨∨ ∃∃g2,K2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ↑g2 & L2 = K2.ⓑ{I}X
-                           | ∃∃g,g0,g2,K2,W,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & 
-                                               K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2 &
-                                               I = Abbr & X = ⓝW.V & L2 = K2.ⓛW
-                           | ∃∃g,g0,g2,J,K2. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & 
-                                             K1 ⊢ 𝐅*⦃X⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2 &
-                                             L2 = K2.ⓤ{J}.
+fact lsubf_inv_pair1_aux:
+     ∀f1,f2,L1,L2. ⦃L1,f1⦄ ⫃𝐅+ ⦃L2,f2⦄ →
+     ∀g1,I,K1,X. f1 = ↑g1 → L1 = K1.ⓑ{I}X →
+     ∨∨ ∃∃g2,K2. ⦃K1,g1⦄ ⫃𝐅+ ⦃K2,g2⦄ & f2 = ↑g2 & L2 = K2.ⓑ{I}X
+      | ∃∃g,g0,g2,K2,W,V. ⦃K1,g0⦄ ⫃𝐅+ ⦃K2,g2⦄ & 
+          K1 ⊢ 𝐅+⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2 &
+          I = Abbr & X = ⓝW.V & L2 = K2.ⓛW
+      | ∃∃g,g0,g2,J,K2. ⦃K1,g0⦄ ⫃𝐅+ ⦃K2,g2⦄ & 
+          K1 ⊢ 𝐅+⦃X⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2 & L2 = K2.ⓤ{J}.
 #f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2
 [ #f1 #f2 #_ #g1 #J #K1 #X #_ #H destruct
 | #f1 #f2 #I1 #I2 #L1 #L2 #H12 #g1 #J #K1 #X #H elim (discr_push_next … H)
@@ -88,19 +91,20 @@ fact lsubf_inv_pair1_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
 ]
 qed-.
 
-lemma lsubf_inv_pair1: ∀g1,f2,I,K1,L2,X. ⦃K1.ⓑ{I}X, ↑g1⦄ ⫃𝐅* ⦃L2, f2⦄ →
-                       ∨∨ ∃∃g2,K2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ↑g2 & L2 = K2.ⓑ{I}X
-                        | ∃∃g,g0,g2,K2,W,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & 
-                                            K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2 &
-                                            I = Abbr & X = ⓝW.V & L2 = K2.ⓛW
-                        | ∃∃g,g0,g2,J,K2. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & 
-                                          K1 ⊢ 𝐅*⦃X⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2 &
-                                          L2 = K2.ⓤ{J}.
+lemma lsubf_inv_pair1:
+      ∀g1,f2,I,K1,L2,X. ⦃K1.ⓑ{I}X,↑g1⦄ ⫃𝐅+ ⦃L2,f2⦄ →
+      ∨∨ ∃∃g2,K2. ⦃K1,g1⦄ ⫃𝐅+ ⦃K2,g2⦄ & f2 = ↑g2 & L2 = K2.ⓑ{I}X
+       | ∃∃g,g0,g2,K2,W,V. ⦃K1,g0⦄ ⫃𝐅+ ⦃K2,g2⦄ & 
+           K1 ⊢ 𝐅+⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2 &
+           I = Abbr & X = ⓝW.V & L2 = K2.ⓛW
+       | ∃∃g,g0,g2,J,K2. ⦃K1,g0⦄ ⫃𝐅+ ⦃K2,g2⦄ & 
+           K1 ⊢ 𝐅+⦃X⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2 & L2 = K2.ⓤ{J}.
 /2 width=5 by lsubf_inv_pair1_aux/ qed-.
 
-fact lsubf_inv_unit1_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
-                          ∀g1,I,K1. f1 = ↑g1 → L1 = K1.ⓤ{I} →
-                          ∃∃g2,K2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ↑g2 & L2 = K2.ⓤ{I}.
+fact lsubf_inv_unit1_aux:
+     ∀f1,f2,L1,L2. ⦃L1,f1⦄ ⫃𝐅+ ⦃L2,f2⦄ →
+     ∀g1,I,K1. f1 = ↑g1 → L1 = K1.ⓤ{I} →
+     ∃∃g2,K2. ⦃K1,g1⦄ ⫃𝐅+ ⦃K2,g2⦄ & f2 = ↑g2 & L2 = K2.ⓤ{I}.
 #f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2
 [ #f1 #f2 #_ #g1 #J #K1 #_ #H destruct
 | #f1 #f2 #I1 #I2 #L1 #L2 #H12 #g1 #J #K1 #H elim (discr_push_next … H)
@@ -111,12 +115,14 @@ fact lsubf_inv_unit1_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
 ]
 qed-.
 
-lemma lsubf_inv_unit1: ∀g1,f2,I,K1,L2. ⦃K1.ⓤ{I}, ↑g1⦄ ⫃𝐅* ⦃L2, f2⦄ →
-                       ∃∃g2,K2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ↑g2 & L2 = K2.ⓤ{I}.
+lemma lsubf_inv_unit1:
+      ∀g1,f2,I,K1,L2. ⦃K1.ⓤ{I},↑g1⦄ ⫃𝐅+ ⦃L2,f2⦄ →
+      ∃∃g2,K2. ⦃K1,g1⦄ ⫃𝐅+ ⦃K2,g2⦄ & f2 = ↑g2 & L2 = K2.ⓤ{I}.
 /2 width=5 by lsubf_inv_unit1_aux/ qed-.
 
-fact lsubf_inv_atom2_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → L2 = ⋆ →
-                          f1 ≡ f2 ∧ L1 = ⋆.
+fact lsubf_inv_atom2_aux:
+     ∀f1,f2,L1,L2. ⦃L1,f1⦄ ⫃𝐅+ ⦃L2,f2⦄ → L2 = ⋆ →
+     ∧∧ f1 ≡ f2 & L1 = ⋆.
 #f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2
 [ /2 width=1 by conj/
 | #f1 #f2 #I1 #I2 #L1 #L2 #_ #H destruct
@@ -126,12 +132,13 @@ fact lsubf_inv_atom2_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
 ]
 qed-.
 
-lemma lsubf_inv_atom2: ∀f1,f2,L1. ⦃L1, f1⦄ ⫃𝐅* ⦃⋆, f2⦄ → f1 ≡ f2 ∧ L1 = ⋆.
+lemma lsubf_inv_atom2: ∀f1,f2,L1. ⦃L1,f1⦄ ⫃𝐅+ ⦃⋆,f2⦄ → ∧∧f1 ≡ f2 & L1 = ⋆.
 /2 width=3 by lsubf_inv_atom2_aux/ qed-.
 
-fact lsubf_inv_push2_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
-                          ∀g2,I2,K2. f2 = ⫯g2 → L2 = K2.ⓘ{I2} →
-                          ∃∃g1,I1,K1. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f1 = ⫯g1 & L1 = K1.ⓘ{I1}.
+fact lsubf_inv_push2_aux:
+     ∀f1,f2,L1,L2. ⦃L1,f1⦄ ⫃𝐅+ ⦃L2,f2⦄ →
+     ∀g2,I2,K2. f2 = ⫯g2 → L2 = K2.ⓘ{I2} →
+     ∃∃g1,I1,K1. ⦃K1,g1⦄ ⫃𝐅+ ⦃K2,g2⦄ & f1 = ⫯g1 & L1 = K1.ⓘ{I1}.
 #f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2
 [ #f1 #f2 #_ #g2 #J2 #K2 #_ #H destruct
 | #f1 #f2 #I1 #I2 #L1 #L2 #H12 #g2 #J2 #K2 #H1 #H2 destruct
@@ -142,16 +149,18 @@ fact lsubf_inv_push2_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
 ]
 qed-.
 
-lemma lsubf_inv_push2: ∀f1,g2,I2,L1,K2. ⦃L1, f1⦄ ⫃𝐅* ⦃K2.ⓘ{I2}, ⫯g2⦄ →
-                       ∃∃g1,I1,K1. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f1 = ⫯g1 & L1 = K1.ⓘ{I1}.
+lemma lsubf_inv_push2:
+      ∀f1,g2,I2,L1,K2. ⦃L1,f1⦄ ⫃𝐅+ ⦃K2.ⓘ{I2},⫯g2⦄ →
+      ∃∃g1,I1,K1. ⦃K1,g1⦄ ⫃𝐅+ ⦃K2,g2⦄ & f1 = ⫯g1 & L1 = K1.ⓘ{I1}.
 /2 width=6 by lsubf_inv_push2_aux/ qed-.
 
-fact lsubf_inv_pair2_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
-                          ∀g2,I,K2,W. f2 = ↑g2 → L2 = K2.ⓑ{I}W →
-                          ∨∨ ∃∃g1,K1. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f1 = ↑g1 & L1 = K1.ⓑ{I}W
-                           | ∃∃g,g0,g1,K1,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ &
-                                             K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f1 = ↑g1 &
-                                             I = Abst & L1 = K1.ⓓⓝW.V.
+fact lsubf_inv_pair2_aux:
+     ∀f1,f2,L1,L2. ⦃L1,f1⦄ ⫃𝐅+ ⦃L2,f2⦄ →
+     ∀g2,I,K2,W. f2 = ↑g2 → L2 = K2.ⓑ{I}W →
+     ∨∨ ∃∃g1,K1. ⦃K1,g1⦄ ⫃𝐅+ ⦃K2,g2⦄ & f1 = ↑g1 & L1 = K1.ⓑ{I}W
+      | ∃∃g,g0,g1,K1,V. ⦃K1,g0⦄ ⫃𝐅+ ⦃K2,g2⦄ &
+          K1 ⊢ 𝐅+⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f1 = ↑g1 &
+          I = Abst & L1 = K1.ⓓⓝW.V.
 #f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2
 [ #f1 #f2 #_ #g2 #J #K2 #X #_ #H destruct
 | #f1 #f2 #I1 #I2 #L1 #L2 #H12 #g2 #J #K2 #X #H elim (discr_push_next … H)
@@ -163,19 +172,20 @@ fact lsubf_inv_pair2_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
 ]
 qed-.
 
-lemma lsubf_inv_pair2: ∀f1,g2,I,L1,K2,W. ⦃L1, f1⦄ ⫃𝐅* ⦃K2.ⓑ{I}W, ↑g2⦄ →
-                       ∨∨ ∃∃g1,K1. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f1 = ↑g1 & L1 = K1.ⓑ{I}W
-                        | ∃∃g,g0,g1,K1,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ &
-                                          K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f1 = ↑g1 &
-                                          I = Abst & L1 = K1.ⓓⓝW.V.
+lemma lsubf_inv_pair2:
+      ∀f1,g2,I,L1,K2,W. ⦃L1,f1⦄ ⫃𝐅+ ⦃K2.ⓑ{I}W,↑g2⦄ →
+      ∨∨ ∃∃g1,K1. ⦃K1,g1⦄ ⫃𝐅+ ⦃K2,g2⦄ & f1 = ↑g1 & L1 = K1.ⓑ{I}W
+       | ∃∃g,g0,g1,K1,V. ⦃K1,g0⦄ ⫃𝐅+ ⦃K2,g2⦄ &
+           K1 ⊢ 𝐅+⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f1 = ↑g1 &
+           I = Abst & L1 = K1.ⓓⓝW.V.
 /2 width=5 by lsubf_inv_pair2_aux/ qed-.
 
-fact lsubf_inv_unit2_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
-                          ∀g2,I,K2. f2 = ↑g2 → L2 = K2.ⓤ{I} →
-                          ∨∨ ∃∃g1,K1. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f1 = ↑g1 & L1 = K1.ⓤ{I}
-                           | ∃∃g,g0,g1,J,K1,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & 
-                                               K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f1 = ↑g1 &
-                                               L1 = K1.ⓑ{J}V.
+fact lsubf_inv_unit2_aux:
+     ∀f1,f2,L1,L2. ⦃L1,f1⦄ ⫃𝐅+ ⦃L2,f2⦄ →
+     ∀g2,I,K2. f2 = ↑g2 → L2 = K2.ⓤ{I} →
+     ∨∨ ∃∃g1,K1. ⦃K1,g1⦄ ⫃𝐅+ ⦃K2,g2⦄ & f1 = ↑g1 & L1 = K1.ⓤ{I}
+      | ∃∃g,g0,g1,J,K1,V. ⦃K1,g0⦄ ⫃𝐅+ ⦃K2,g2⦄ & 
+          K1 ⊢ 𝐅+⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f1 = ↑g1 & L1 = K1.ⓑ{J}V.
 #f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2
 [ #f1 #f2 #_ #g2 #J #K2 #_ #H destruct
 | #f1 #f2 #I1 #I2 #L1 #L2 #H12 #g2 #J #K2 #H elim (discr_push_next … H)
@@ -187,27 +197,29 @@ fact lsubf_inv_unit2_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
 ]
 qed-.
 
-lemma lsubf_inv_unit2: ∀f1,g2,I,L1,K2. ⦃L1, f1⦄ ⫃𝐅* ⦃K2.ⓤ{I}, ↑g2⦄ →
-                       ∨∨ ∃∃g1,K1. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f1 = ↑g1 & L1 = K1.ⓤ{I}
-                        | ∃∃g,g0,g1,J,K1,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & 
-                                            K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f1 = ↑g1 &
-                                            L1 = K1.ⓑ{J}V.
+lemma lsubf_inv_unit2:
+      ∀f1,g2,I,L1,K2. ⦃L1,f1⦄ ⫃𝐅+ ⦃K2.ⓤ{I},↑g2⦄ →
+      ∨∨ ∃∃g1,K1. ⦃K1,g1⦄ ⫃𝐅+ ⦃K2,g2⦄ & f1 = ↑g1 & L1 = K1.ⓤ{I}
+       | ∃∃g,g0,g1,J,K1,V. ⦃K1,g0⦄ ⫃𝐅+ ⦃K2,g2⦄ & 
+           K1 ⊢ 𝐅+⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f1 = ↑g1 & L1 = K1.ⓑ{J}V.
 /2 width=5 by lsubf_inv_unit2_aux/ qed-.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma lsubf_inv_atom: ∀f1,f2. ⦃⋆, f1⦄ ⫃𝐅* ⦃⋆, f2⦄ → f1 ≡ f2.
+lemma lsubf_inv_atom: ∀f1,f2. ⦃⋆,f1⦄ ⫃𝐅+ ⦃⋆,f2⦄ → f1 ≡ f2.
 #f1 #f2 #H elim (lsubf_inv_atom1 … H) -H //
 qed-.
 
-lemma lsubf_inv_push_sn: ∀g1,f2,I1,I2,K1,K2. ⦃K1.ⓘ{I1}, ⫯g1⦄ ⫃𝐅* ⦃K2.ⓘ{I2}, f2⦄ →
-                         ∃∃g2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ⫯g2.
+lemma lsubf_inv_push_sn:
+      ∀g1,f2,I1,I2,K1,K2. ⦃K1.ⓘ{I1},⫯g1⦄ ⫃𝐅+ ⦃K2.ⓘ{I2},f2⦄ →
+      ∃∃g2. ⦃K1,g1⦄ ⫃𝐅+ ⦃K2,g2⦄ & f2 = ⫯g2.
 #g1 #f2 #I #K1 #K2 #X #H elim (lsubf_inv_push1 … H) -H
 #g2 #I #Y #H0 #H2 #H destruct /2 width=3 by ex2_intro/
 qed-.
 
-lemma lsubf_inv_bind_sn: ∀g1,f2,I,K1,K2. ⦃K1.ⓘ{I}, ↑g1⦄ ⫃𝐅* ⦃K2.ⓘ{I}, f2⦄ →
-                         ∃∃g2. ⦃K1, g1⦄ ⫃𝐅* ⦃K2, g2⦄ & f2 = ↑g2.
+lemma lsubf_inv_bind_sn:
+      ∀g1,f2,I,K1,K2. ⦃K1.ⓘ{I},↑g1⦄ ⫃𝐅+ ⦃K2.ⓘ{I},f2⦄ →
+      ∃∃g2. ⦃K1,g1⦄ ⫃𝐅+ ⦃K2,g2⦄ & f2 = ↑g2.
 #g1 #f2 * #I [2: #X ] #K1 #K2 #H
 [ elim (lsubf_inv_pair1 … H) -H *
   [ #z2 #Y2 #H2 #H #H0 destruct /2 width=3 by ex2_intro/
@@ -219,8 +231,9 @@ lemma lsubf_inv_bind_sn: ∀g1,f2,I,K1,K2. ⦃K1.ⓘ{I}, ↑g1⦄ ⫃𝐅* ⦃K2
 ]
 qed-.
 
-lemma lsubf_inv_beta_sn: ∀g1,f2,K1,K2,V,W. ⦃K1.ⓓⓝW.V, ↑g1⦄ ⫃𝐅* ⦃K2.ⓛW, f2⦄ →
-                         ∃∃g,g0,g2. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2.
+lemma lsubf_inv_beta_sn:
+      ∀g1,f2,K1,K2,V,W. ⦃K1.ⓓⓝW.V,↑g1⦄ ⫃𝐅+ ⦃K2.ⓛW,f2⦄ →
+      ∃∃g,g0,g2. ⦃K1,g0⦄ ⫃𝐅+ ⦃K2,g2⦄ & K1 ⊢ 𝐅+⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2.
 #g1 #f2 #K1 #K2 #V #W #H elim (lsubf_inv_pair1 … H) -H *
 [ #z2 #Y2 #_ #_ #H destruct
 | #z #z0 #z2 #Y2 #X0 #X #H02 #Hz #Hg1 #H #_ #H0 #H1 destruct
@@ -229,8 +242,9 @@ lemma lsubf_inv_beta_sn: ∀g1,f2,K1,K2,V,W. ⦃K1.ⓓⓝW.V, ↑g1⦄ ⫃𝐅*
 ]
 qed-.
 
-lemma lsubf_inv_unit_sn: ∀g1,f2,I,J,K1,K2,V. ⦃K1.ⓑ{I}V, ↑g1⦄ ⫃𝐅* ⦃K2.ⓤ{J}, f2⦄ →
-                         ∃∃g,g0,g2. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ & K1 ⊢ 𝐅*⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2.
+lemma lsubf_inv_unit_sn:
+      ∀g1,f2,I,J,K1,K2,V. ⦃K1.ⓑ{I}V,↑g1⦄ ⫃𝐅+ ⦃K2.ⓤ{J},f2⦄ →
+      ∃∃g,g0,g2. ⦃K1,g0⦄ ⫃𝐅+ ⦃K2,g2⦄ & K1 ⊢ 𝐅+⦃V⦄ ≘ g & g0 ⋓ g ≘ g1 & f2 = ↑g2.
 #g1 #f2 #I #J #K1 #K2 #V #H elim (lsubf_inv_pair1 … H) -H *
 [ #z2 #Y2 #_ #_ #H destruct
 | #z #z0 #z2 #Y2 #X0 #X #_ #_ #_ #_ #_ #_ #H destruct
@@ -239,7 +253,7 @@ lemma lsubf_inv_unit_sn: ∀g1,f2,I,J,K1,K2,V. ⦃K1.ⓑ{I}V, ↑g1⦄ ⫃𝐅*
 ]
 qed-.
 
-lemma lsubf_inv_refl: ∀L,f1,f2. ⦃L,f1⦄ ⫃𝐅* ⦃L,f2⦄ → f1 ≡ f2.
+lemma lsubf_inv_refl: ∀L,f1,f2. ⦃L,f1⦄ ⫃𝐅+ ⦃L,f2⦄ → f1 ≡ f2.
 #L elim L -L /2 width=1 by lsubf_inv_atom/
 #L #I #IH #f1 #f2 #H12
 elim (pn_split f1) * #g1 #H destruct
@@ -249,15 +263,15 @@ qed-.
 
 (* Basic forward lemmas *****************************************************)
 
-lemma lsubf_fwd_bind_tl: ∀f1,f2,I,L1,L2.
-                         ⦃L1.ⓘ{I}, f1⦄ ⫃𝐅* ⦃L2.ⓘ{I}, f2⦄ → ⦃L1, ⫱f1⦄ ⫃𝐅* ⦃L2, ⫱f2⦄.
+lemma lsubf_fwd_bind_tl:
+      ∀f1,f2,I,L1,L2. ⦃L1.ⓘ{I},f1⦄ ⫃𝐅+ ⦃L2.ⓘ{I},f2⦄ → ⦃L1,⫱f1⦄ ⫃𝐅+ ⦃L2,⫱f2⦄.
 #f1 #f2 #I #L1 #L2 #H
 elim (pn_split f1) * #g1 #H0 destruct
 [ elim (lsubf_inv_push_sn … H) | elim (lsubf_inv_bind_sn … H) ] -H
 #g2 #H12 #H destruct //
 qed-.
 
-lemma lsubf_fwd_isid_dx: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → 𝐈⦃f2⦄ → 𝐈⦃f1⦄.
+lemma lsubf_fwd_isid_dx: ∀f1,f2,L1,L2. ⦃L1,f1⦄ ⫃𝐅+ ⦃L2,f2⦄ → 𝐈⦃f2⦄ → 𝐈⦃f1⦄.
 #f1 #f2 #L1 #L2 #H elim H -f1 -f2 -L1 -L2
 [ /2 width=3 by isid_eq_repl_fwd/
 | /4 width=3 by isid_inv_push, isid_push/
@@ -267,7 +281,7 @@ lemma lsubf_fwd_isid_dx: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
 ]
 qed-.
 
-lemma lsubf_fwd_isid_sn: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → 𝐈⦃f1⦄ → 𝐈⦃f2⦄.
+lemma lsubf_fwd_isid_sn: ∀f1,f2,L1,L2. ⦃L1,f1⦄ ⫃𝐅+ ⦃L2,f2⦄ → 𝐈⦃f1⦄ → 𝐈⦃f2⦄.
 #f1 #f2 #L1 #L2 #H elim H -f1 -f2 -L1 -L2
 [ /2 width=3 by isid_eq_repl_back/
 | /4 width=3 by isid_inv_push, isid_push/
@@ -277,22 +291,22 @@ lemma lsubf_fwd_isid_sn: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
 ]
 qed-.
 
-lemma lsubf_fwd_sle: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → f2 ⊆ f1.
+lemma lsubf_fwd_sle: ∀f1,f2,L1,L2. ⦃L1,f1⦄ ⫃𝐅+ ⦃L2,f2⦄ → f2 ⊆ f1.
 #f1 #f2 #L1 #L2 #H elim H -f1 -f2 -L1 -L2
 /3 width=5 by sor_inv_sle_sn_trans, sle_next, sle_push, sle_refl_eq, eq_sym/
 qed-.
 
 (* Basic properties *********************************************************)
 
-axiom lsubf_eq_repl_back1: ∀f2,L1,L2. eq_repl_back … (λf1. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄).
+axiom lsubf_eq_repl_back1: ∀f2,L1,L2. eq_repl_back … (λf1. ⦃L1,f1⦄ ⫃𝐅+ ⦃L2,f2⦄).
 
-lemma lsubf_eq_repl_fwd1: ∀f2,L1,L2. eq_repl_fwd … (λf1. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄).
+lemma lsubf_eq_repl_fwd1: ∀f2,L1,L2. eq_repl_fwd … (λf1. ⦃L1,f1⦄ ⫃𝐅+ ⦃L2,f2⦄).
 #f2 #L1 #L2 @eq_repl_sym /2 width=3 by lsubf_eq_repl_back1/
 qed-.
 
-axiom lsubf_eq_repl_back2: ∀f1,L1,L2. eq_repl_back … (λf2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄).
+axiom lsubf_eq_repl_back2: ∀f1,L1,L2. eq_repl_back … (λf2. ⦃L1,f1⦄ ⫃𝐅+ ⦃L2,f2⦄).
 
-lemma lsubf_eq_repl_fwd2: ∀f1,L1,L2. eq_repl_fwd … (λf2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄).
+lemma lsubf_eq_repl_fwd2: ∀f1,L1,L2. eq_repl_fwd … (λf2. ⦃L1,f1⦄ ⫃𝐅+ ⦃L2,f2⦄).
 #f1 #L1 #L2 @eq_repl_sym /2 width=3 by lsubf_eq_repl_back2/
 qed-.
 
@@ -302,19 +316,21 @@ lemma lsubf_refl: bi_reflexive … lsubf.
 /2 width=1 by lsubf_push, lsubf_bind/
 qed.
 
-lemma lsubf_refl_eq: ∀f1,f2,L. f1 ≡ f2 → ⦃L, f1⦄ ⫃𝐅* ⦃L, f2⦄.
+lemma lsubf_refl_eq: ∀f1,f2,L. f1 ≡ f2 → ⦃L,f1⦄ ⫃𝐅+ ⦃L,f2⦄.
 /2 width=3 by lsubf_eq_repl_back2/ qed.
 
-lemma lsubf_bind_tl_dx: ∀g1,f2,I,L1,L2. ⦃L1, g1⦄ ⫃𝐅* ⦃L2, ⫱f2⦄ →
-                        ∃∃f1. ⦃L1.ⓘ{I}, f1⦄ ⫃𝐅* ⦃L2.ⓘ{I}, f2⦄ & g1 = ⫱f1.
+lemma lsubf_bind_tl_dx:
+      ∀g1,f2,I,L1,L2. ⦃L1,g1⦄ ⫃𝐅+ ⦃L2,⫱f2⦄ →
+      ∃∃f1. ⦃L1.ⓘ{I},f1⦄ ⫃𝐅+ ⦃L2.ⓘ{I},f2⦄ & g1 = ⫱f1.
 #g1 #f2 #I #L1 #L2 #H
 elim (pn_split f2) * #g2 #H2 destruct
 @ex2_intro [1,2,4,5: /2 width=2 by lsubf_push, lsubf_bind/ ] // (**) (* constructor needed *)
 qed-.
 
-lemma lsubf_beta_tl_dx: ∀f,f0,g1,L1,V. L1 ⊢ 𝐅*⦃V⦄ ≘ f → f0 ⋓ f ≘ g1 →
-                        ∀f2,L2,W. ⦃L1, f0⦄ ⫃𝐅* ⦃L2, ⫱f2⦄ →
-                        ∃∃f1. ⦃L1.ⓓⓝW.V, f1⦄ ⫃𝐅* ⦃L2.ⓛW, f2⦄ & ⫱f1 ⊆ g1.
+lemma lsubf_beta_tl_dx:
+      ∀f,f0,g1,L1,V. L1 ⊢ 𝐅+⦃V⦄ ≘ f → f0 ⋓ f ≘ g1 →
+      ∀f2,L2,W. ⦃L1,f0⦄ ⫃𝐅+ ⦃L2,⫱f2⦄ →
+      ∃∃f1. ⦃L1.ⓓⓝW.V,f1⦄ ⫃𝐅+ ⦃L2.ⓛW,f2⦄ & ⫱f1 ⊆ g1.
 #f #f0 #g1 #L1 #V #Hf #Hg1 #f2
 elim (pn_split f2) * #x2 #H2 #L2 #W #HL12 destruct
 [ /3 width=4 by lsubf_push, sor_inv_sle_sn, ex2_intro/
@@ -323,9 +339,10 @@ elim (pn_split f2) * #x2 #H2 #L2 #W #HL12 destruct
 qed-.
 
 (* Note: this might be moved *)
-lemma lsubf_inv_sor_dx: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
-                        ∀f2l,f2r. f2l⋓f2r ≘ f2 →
-                        ∃∃f1l,f1r. ⦃L1, f1l⦄ ⫃𝐅* ⦃L2, f2l⦄ & ⦃L1, f1r⦄ ⫃𝐅* ⦃L2, f2r⦄ & f1l⋓f1r ≘ f1.
+lemma lsubf_inv_sor_dx:
+      ∀f1,f2,L1,L2. ⦃L1,f1⦄ ⫃𝐅+ ⦃L2,f2⦄ →
+      ∀f2l,f2r. f2l⋓f2r ≘ f2 →
+      ∃∃f1l,f1r. ⦃L1,f1l⦄ ⫃𝐅+ ⦃L2,f2l⦄ & ⦃L1,f1r⦄ ⫃𝐅+ ⦃L2,f2r⦄ & f1l⋓f1r ≘ f1.
 #f1 #f2 #L1 #L2 #H elim H -f1 -f2 -L1 -L2
 [ /3 width=7 by sor_eq_repl_fwd3, ex3_2_intro/
 | #g1 #g2 #I1 #I2 #L1 #L2 #_ #IH #f2l #f2r #H
index 7a39036b54c50d6aedd9b809cc404996e26c8d20..963893a24aef7195bd4b776d563423921d3578b7 100644 (file)
@@ -18,8 +18,9 @@ include "static_2/static/lsubf.ma".
 
 (* Properties with context-sensitive free variables *************************)
 
-lemma lsubf_frees_trans: ∀f2,L2,T. L2 ⊢ 𝐅*⦃T⦄ ≘ f2 →
-                         ∀f1,L1. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → L1 ⊢ 𝐅*⦃T⦄ ≘ f1.
+lemma lsubf_frees_trans:
+      ∀f2,L2,T. L2 ⊢ 𝐅+⦃T⦄ ≘ f2 →
+      ∀f1,L1. ⦃L1,f1⦄ ⫃𝐅+ ⦃L2,f2⦄ → L1 ⊢ 𝐅+⦃T⦄ ≘ f1.
 #f2 #L2 #T #H elim H -f2 -L2 -T
 [ /3 width=5 by lsubf_fwd_isid_dx, frees_sort/
 | #f2 #i #Hf2 #g1 #Y1 #H
index 79f33abdad8f77bf507ef12a273621fc3494d3c9..63173fbf7f0feaa436d7991a30de304928b1e61c 100644 (file)
@@ -19,9 +19,10 @@ include "static_2/static/lsubf.ma".
 
 (* Main properties **********************************************************)
 
-theorem lsubf_sor: ∀K,L,g1,f1. ⦃K, g1⦄ ⫃𝐅* ⦃L, f1⦄ →
-                   ∀g2,f2. ⦃K, g2⦄ ⫃𝐅* ⦃L, f2⦄ →
-                   ∀g. g1 ⋓ g2 ≘ g → ∀f. f1 ⋓ f2 ≘ f → ⦃K, g⦄ ⫃𝐅* ⦃L, f⦄.
+theorem lsubf_sor:
+        ∀K,L,g1,f1. ⦃K,g1⦄ ⫃𝐅+ ⦃L,f1⦄ →
+        ∀g2,f2. ⦃K,g2⦄ ⫃𝐅+ ⦃L,f2⦄ →
+        ∀g. g1 ⋓ g2 ≘ g → ∀f. f1 ⋓ f2 ≘ f → ⦃K,g⦄ ⫃𝐅+ ⦃L,f⦄.
 #K elim K -K
 [ #L #g1 #f1 #H1 #g2 #f2 #H2 #g #Hg #f #Hf
   elim (lsubf_inv_atom1 … H1) -H1 #H1 #H destruct
index a021ca5a4ac0af24c8252c302944310af7d535c8..88d2ad9ba4f2ce542d15ce0d2a4f1acae487c134 100644 (file)
@@ -19,8 +19,8 @@ include "static_2/static/lsubf_lsubf.ma".
 
 (* Forward lemmas with restricted refinement for local environments *********)
 
-lemma lsubf_fwd_lsubr_isdiv: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
-                             𝛀⦃f1⦄ → 𝛀⦃f2⦄ → L1 ⫃ L2.
+lemma lsubf_fwd_lsubr_isdiv: 
+      ∀f1,f2,L1,L2. ⦃L1,f1⦄ ⫃𝐅+ ⦃L2,f2⦄ → 𝛀⦃f1⦄ → 𝛀⦃f2⦄ → L1 ⫃ L2.
 #f1 #f2 #L1 #L2 #H elim H -f1 -f2 -L1 -L2
 /4 width=3 by lsubr_bind, isdiv_inv_next/
 [ #f1 #f2 #I1 #I2 #L1 #L2 #_ #_ #H
@@ -32,8 +32,8 @@ qed-.
 
 (* Properties with restricted refinement for local environments *************)
 
-lemma lsubr_lsubf_isid: ∀L1,L2. L1 ⫃ L2 →
-                        ∀f1,f2. 𝐈⦃f1⦄ → 𝐈⦃f2⦄ → ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄.
+lemma lsubr_lsubf_isid:
+      ∀L1,L2. L1 ⫃ L2 → ∀f1,f2. 𝐈⦃f1⦄ → 𝐈⦃f2⦄ → ⦃L1,f1⦄ ⫃𝐅+ ⦃L2,f2⦄.
 #L1 #L2 #H elim H -L1 -L2
 [ /3 width=1 by lsubf_atom, isid_inv_eq_repl/
 | #I #L1 #L2 | #L1 #L2 #V #W | #I1 #I2 #L1 #L2 #V
@@ -44,8 +44,9 @@ elim (isid_inv_gen … Hf2) -Hf2 #g2 #Hg2 #H destruct
 /3 width=1 by lsubf_push/
 qed.
 
-lemma lsubr_lsubf: ∀f2,L2,T. L2 ⊢ 𝐅*⦃T⦄ ≘ f2 → ∀L1. L1 ⫃ L2 →
-                   ∀f1. L1 ⊢ 𝐅*⦃T⦄ ≘ f1 → ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄.
+lemma lsubr_lsubf:
+      ∀f2,L2,T. L2 ⊢ 𝐅+⦃T⦄ ≘ f2 → ∀L1. L1 ⫃ L2 →
+      ∀f1. L1 ⊢ 𝐅+⦃T⦄ ≘ f1 → ⦃L1,f1⦄ ⫃𝐅+ ⦃L2,f2⦄.
 #f2 #L2 #T #H elim H -f2 -L2 -T
 [ #f2 #L2 #s #Hf2 #L1 #HL12 #f1 #Hf1
   lapply (frees_inv_sort … Hf1) -Hf1 /2 width=1 by lsubr_lsubf_isid/
index 5ec8a33f166bf985471b14745a52a0fefd36a72c..5ff763dcbe66125b8476a457ce297d4c059cac00 100644 (file)
@@ -49,12 +49,11 @@ qed-.
 lemma lsubr_inv_atom1: ∀L2. ⋆ ⫃ L2 → L2 = ⋆.
 /2 width=3 by lsubr_inv_atom1_aux/ qed-.
 
-fact lsubr_inv_bind1_aux: ∀L1,L2. L1 ⫃ L2 → ∀I,K1. L1 = K1.ⓘ{I} →
-                          ∨∨ ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓘ{I}
-                           | ∃∃K2,V,W. K1 ⫃ K2 & L2 = K2.ⓛW &
-                                       I = BPair Abbr (ⓝW.V)
-                           | ∃∃J1,J2,K2,V. K1 ⫃ K2 & L2 = K2.ⓤ{J2} &
-                                           I = BPair J1 V.
+fact lsubr_inv_bind1_aux:
+     ∀L1,L2. L1 ⫃ L2 → ∀I,K1. L1 = K1.ⓘ{I} →
+     ∨∨ ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓘ{I}
+      | ∃∃K2,V,W. K1 ⫃ K2 & L2 = K2.ⓛW & I = BPair Abbr (ⓝW.V)
+      | ∃∃J1,J2,K2,V. K1 ⫃ K2 & L2 = K2.ⓤ{J2} & I = BPair J1 V.
 #L1 #L2 * -L1 -L2
 [ #J #K1 #H destruct
 | #I #L1 #L2 #HL12 #J #K1 #H destruct /3 width=3 by or3_intro0, ex2_intro/
@@ -64,12 +63,11 @@ fact lsubr_inv_bind1_aux: ∀L1,L2. L1 ⫃ L2 → ∀I,K1. L1 = K1.ⓘ{I} →
 qed-.
 
 (* Basic_2A1: uses: lsubr_inv_pair1 *)
-lemma lsubr_inv_bind1: ∀I,K1,L2. K1.ⓘ{I} ⫃ L2 →
-                       ∨∨ ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓘ{I}
-                        | ∃∃K2,V,W. K1 ⫃ K2 & L2 = K2.ⓛW &
-                                    I = BPair Abbr (ⓝW.V)
-                        | ∃∃J1,J2,K2,V. K1 ⫃ K2 & L2 = K2.ⓤ{J2} &
-                                        I = BPair J1 V.
+lemma lsubr_inv_bind1:
+      ∀I,K1,L2. K1.ⓘ{I} ⫃ L2 →
+      ∨∨ ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓘ{I}
+       | ∃∃K2,V,W. K1 ⫃ K2 & L2 = K2.ⓛW & I = BPair Abbr (ⓝW.V)
+       | ∃∃J1,J2,K2,V. K1 ⫃ K2 & L2 = K2.ⓤ{J2} & I = BPair J1 V.
 /2 width=3 by lsubr_inv_bind1_aux/ qed-.
 
 fact lsubr_inv_atom2_aux: ∀L1,L2. L1 ⫃ L2 → L2 = ⋆ → L1 = ⋆.
@@ -83,10 +81,11 @@ qed-.
 lemma lsubr_inv_atom2: ∀L1. L1 ⫃ ⋆ → L1 = ⋆.
 /2 width=3 by lsubr_inv_atom2_aux/ qed-.
 
-fact lsubr_inv_bind2_aux: ∀L1,L2. L1 ⫃ L2 → ∀I,K2. L2 = K2.ⓘ{I} →
-                          ∨∨ ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓘ{I}
-                           | ∃∃K1,W,V. K1 ⫃ K2 & L1 = K1.ⓓⓝW.V & I = BPair Abst W
-                           | ∃∃J1,J2,K1,V. K1 ⫃ K2 & L1 = K1.ⓑ{J1}V & I = BUnit J2.
+fact lsubr_inv_bind2_aux:
+     ∀L1,L2. L1 ⫃ L2 → ∀I,K2. L2 = K2.ⓘ{I} →
+     ∨∨ ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓘ{I}
+      | ∃∃K1,W,V. K1 ⫃ K2 & L1 = K1.ⓓⓝW.V & I = BPair Abst W
+      | ∃∃J1,J2,K1,V. K1 ⫃ K2 & L1 = K1.ⓑ{J1}V & I = BUnit J2.
 #L1 #L2 * -L1 -L2
 [ #J #K2 #H destruct
 | #I #L1 #L2 #HL12 #J #K2 #H destruct /3 width=3 by ex2_intro, or3_intro0/
@@ -95,82 +94,91 @@ fact lsubr_inv_bind2_aux: ∀L1,L2. L1 ⫃ L2 → ∀I,K2. L2 = K2.ⓘ{I} →
 ]
 qed-.
 
-lemma lsubr_inv_bind2: ∀I,L1,K2. L1 ⫃ K2.ⓘ{I} →
-                       ∨∨ ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓘ{I}
-                        | ∃∃K1,W,V. K1 ⫃ K2 & L1 = K1.ⓓⓝW.V & I = BPair Abst W
-                        | ∃∃J1,J2,K1,V. K1 ⫃ K2 & L1 = K1.ⓑ{J1}V & I = BUnit J2.
+lemma lsubr_inv_bind2:
+      ∀I,L1,K2. L1 ⫃ K2.ⓘ{I} →
+      ∨∨ ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓘ{I}
+       | ∃∃K1,W,V. K1 ⫃ K2 & L1 = K1.ⓓⓝW.V & I = BPair Abst W
+       | ∃∃J1,J2,K1,V. K1 ⫃ K2 & L1 = K1.ⓑ{J1}V & I = BUnit J2.
 /2 width=3 by lsubr_inv_bind2_aux/ qed-.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma lsubr_inv_abst1: ∀K1,L2,W. K1.ⓛW ⫃ L2 →
-                       ∨∨ ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓛW
-                        | ∃∃I2,K2. K1 ⫃ K2 & L2 = K2.ⓤ{I2}.
+lemma lsubr_inv_abst1:
+      ∀K1,L2,W. K1.ⓛW ⫃ L2 →
+      ∨∨ ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓛW
+       | ∃∃I2,K2. K1 ⫃ K2 & L2 = K2.ⓤ{I2}.
 #K1 #L2 #W #H elim (lsubr_inv_bind1 … H) -H *
 /3 width=4 by ex2_2_intro, ex2_intro, or_introl, or_intror/ 
 #K2 #V2 #W2 #_ #_ #H destruct
 qed-.
 
-lemma lsubr_inv_unit1: ∀I,K1,L2. K1.ⓤ{I} ⫃ L2 →
-                       ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓤ{I}.
+lemma lsubr_inv_unit1:
+      ∀I,K1,L2. K1.ⓤ{I} ⫃ L2 →
+      ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓤ{I}.
 #I #K1 #L2 #H elim (lsubr_inv_bind1 … H) -H *
 [ #K2 #HK12 #H destruct /2 width=3 by ex2_intro/
 | #K2 #V #W #_ #_ #H destruct
-| #I1 #I2 #K2 #V #_ #_ #H destruct
+| #J1 #J2 #K2 #V #_ #_ #H destruct
 ]
 qed-.
 
-lemma lsubr_inv_pair2: ∀I,L1,K2,W. L1 ⫃ K2.ⓑ{I}W →
-                       ∨∨ ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓑ{I}W
-                        | ∃∃K1,V. K1 ⫃ K2 & L1 = K1.ⓓⓝW.V & I = Abst.
+lemma lsubr_inv_pair2:
+      ∀I,L1,K2,W. L1 ⫃ K2.ⓑ{I}W →
+      ∨∨ ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓑ{I}W
+       | ∃∃K1,V. K1 ⫃ K2 & L1 = K1.ⓓⓝW.V & I = Abst.
 #I #L1 #K2 #W #H elim (lsubr_inv_bind2 … H) -H *
 [ /3 width=3 by ex2_intro, or_introl/
-| #K2 #X #V #HK12 #H1 #H2 destruct /3 width=4 by ex3_2_intro, or_intror/
-| #I1 #I1 #K2 #V #_ #_ #H destruct   
+| #K1 #X #V #HK12 #H1 #H2 destruct /3 width=4 by ex3_2_intro, or_intror/
+| #J1 #J1 #K1 #V #_ #_ #H destruct   
 ]
 qed-.
 
-lemma lsubr_inv_abbr2: ∀L1,K2,V. L1 ⫃ K2.ⓓV →
-                       ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓓV.
+lemma lsubr_inv_abbr2:
+      ∀L1,K2,V. L1 ⫃ K2.ⓓV →
+      ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓓV.
 #L1 #K2 #V #H elim (lsubr_inv_pair2 … H) -H *
 [ /2 width=3 by ex2_intro/
 | #K1 #X #_ #_ #H destruct
 ]
 qed-.
 
-lemma lsubr_inv_abst2: ∀L1,K2,W. L1 ⫃ K2.ⓛW →
-                       ∨∨ ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓛW
-                        | ∃∃K1,V. K1 ⫃ K2 & L1 = K1.ⓓⓝW.V.
+lemma lsubr_inv_abst2:
+      ∀L1,K2,W. L1 ⫃ K2.ⓛW →
+      ∨∨ ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓛW
+       | ∃∃K1,V. K1 ⫃ K2 & L1 = K1.ⓓⓝW.V.
 #L1 #K2 #W #H elim (lsubr_inv_pair2 … H) -H *
 /3 width=4 by ex2_2_intro, ex2_intro, or_introl, or_intror/
 qed-.
 
-lemma lsubr_inv_unit2: ∀I,L1,K2. L1 ⫃ K2.ⓤ{I} →
-                       ∨∨ ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓤ{I}
-                        | ∃∃J,K1,V. K1 ⫃ K2 & L1 = K1.ⓑ{J}V.
+lemma lsubr_inv_unit2:
+      ∀I,L1,K2. L1 ⫃ K2.ⓤ{I} →
+      ∨∨ ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓤ{I}
+       | ∃∃J,K1,V. K1 ⫃ K2 & L1 = K1.ⓑ{J}V.
 #I #L1 #K2 #H elim (lsubr_inv_bind2 … H) -H *
 [ /3 width=3 by ex2_intro, or_introl/
 | #K1 #W #V #_ #_ #H destruct
-| #I1 #I2 #K1 #V #HK12 #H1 #H2 destruct /3 width=5 by ex2_3_intro, or_intror/
+| #J1 #J2 #K1 #V #HK12 #H1 #H2 destruct /3 width=5 by ex2_3_intro, or_intror/
 ]
 qed-.
 
 (* Basic forward lemmas *****************************************************)
 
-lemma lsubr_fwd_bind1: ∀I1,K1,L2. K1.ⓘ{I1} ⫃ L2 →
-                       ∃∃I2,K2. K1 ⫃ K2 & L2 = K2.ⓘ{I2}.
+lemma lsubr_fwd_bind1:
+      ∀I1,K1,L2. K1.ⓘ{I1} ⫃ L2 →
+      ∃∃I2,K2. K1 ⫃ K2 & L2 = K2.ⓘ{I2}.
 #I1 #K1 #L2 #H elim (lsubr_inv_bind1 … H) -H *
 [ #K2 #HK12 #H destruct /3 width=4 by ex2_2_intro/
 | #K2 #W1 #V1 #HK12 #H1 #H2 destruct /3 width=4 by ex2_2_intro/
-| #I1 #I2 #K2 #V1 #HK12 #H1 #H2 destruct /3 width=4 by ex2_2_intro/
+| #J1 #J2 #K2 #V1 #HK12 #H1 #H2 destruct /3 width=4 by ex2_2_intro/
 ]
 qed-.
 
-lemma lsubr_fwd_bind2: ∀I2,L1,K2. L1 ⫃ K2.ⓘ{I2} →
-                       ∃∃I1,K1. K1 ⫃ K2 & L1 = K1.ⓘ{I1}.
+lemma lsubr_fwd_bind2:
+      ∀I2,L1,K2. L1 ⫃ K2.ⓘ{I2} →
+      ∃∃I1,K1. K1 ⫃ K2 & L1 = K1.ⓘ{I1}.
 #I2 #L1 #K2 #H elim (lsubr_inv_bind2 … H) -H *
 [ #K1 #HK12 #H destruct /3 width=4 by ex2_2_intro/
 | #K1 #W1 #V1 #HK12 #H1 #H2 destruct /3 width=4 by ex2_2_intro/
-| #I1 #I2 #K1 #V1 #HK12 #H1 #H2 destruct /3 width=4 by ex2_2_intro/
+| #J1 #J2 #K1 #V1 #HK12 #H1 #H2 destruct /3 width=4 by ex2_2_intro/
 ]
 qed-.
index 9257f34dc3e132c51bfaa12a188f15157b7e9984..ac9e9e41f564d62cae1a92266a0291fac36a192e 100644 (file)
@@ -20,11 +20,12 @@ include "static_2/static/lsubr.ma".
 (* Forward lemmas with generic slicing for local environments ***************)
 
 (* Basic_2A1: includes: lsubr_fwd_drop2_pair *)
-lemma lsubr_fwd_drops2_bind: ∀L1,L2. L1 ⫃ L2 → 
-                             ∀b,f,I,K2. 𝐔⦃f⦄ → ⬇*[b, f] L2 ≘ K2.ⓘ{I} →
-                             ∨∨ ∃∃K1. K1 ⫃ K2 & ⬇*[b, f] L1 ≘ K1.ⓘ{I}
-                              | ∃∃K1,W,V. K1 ⫃ K2 & ⬇*[b, f] L1 ≘ K1.ⓓⓝW.V & I = BPair Abst W
-                              | ∃∃J1,J2,K1,V. K1 ⫃ K2 & ⬇*[b, f] L1 ≘ K1.ⓑ{J1}V & I = BUnit J2.
+lemma lsubr_fwd_drops2_bind:
+      ∀L1,L2. L1 ⫃ L2 → 
+      ∀b,f,I,K2. 𝐔⦃f⦄ → ⬇*[b,f] L2 ≘ K2.ⓘ{I} →
+      ∨∨ ∃∃K1. K1 ⫃ K2 & ⬇*[b,f] L1 ≘ K1.ⓘ{I}
+       | ∃∃K1,W,V. K1 ⫃ K2 & ⬇*[b,f] L1 ≘ K1.ⓓⓝW.V & I = BPair Abst W
+       | ∃∃J1,J2,K1,V. K1 ⫃ K2 & ⬇*[b,f] L1 ≘ K1.ⓑ{J1}V & I = BUnit J2.
 #L1 #L2 #H elim H -L1 -L2
 [ #b #f #I #K2 #_ #H
   elim (drops_inv_atom1 … H) -H #H destruct
@@ -41,9 +42,10 @@ elim (drops_inv_bind1_isuni … Hf H) -Hf -H *
 qed-.
 
 (* Basic_2A1: includes: lsubr_fwd_drop2_abbr *)
-lemma lsubr_fwd_drops2_abbr: ∀L1,L2. L1 ⫃ L2 →
-                             ∀b,f,K2,V.  𝐔⦃f⦄ → ⬇*[b, f] L2 ≘ K2.ⓓV →
-                             ∃∃K1. K1 ⫃ K2 & ⬇*[b, f] L1 ≘ K1.ⓓV.
+lemma lsubr_fwd_drops2_abbr:
+      ∀L1,L2. L1 ⫃ L2 →
+      ∀b,f,K2,V. 𝐔⦃f⦄ → ⬇*[b,f] L2 ≘ K2.ⓓV →
+      ∃∃K1. K1 ⫃ K2 & ⬇*[b,f] L1 ≘ K1.ⓓV.
 #L1 #L2 #HL12 #b #f #K2 #V #Hf #HLK2
 elim (lsubr_fwd_drops2_bind … HL12 … Hf HLK2) -L2 -Hf // *
 [ #K1 #W #V #_ #_ #H destruct
index 3bf83b81ebbaa24ac43ceb607e30a2862673ebc3..2aba1cf65eb79b5fc97aae082875349614cac1f6 100644 (file)
@@ -21,12 +21,12 @@ include "static_2/static/lsubr.ma".
 theorem lsubr_trans: Transitive … lsubr.
 #L1 #L #H elim H -L1 -L //
 [ #I #L1 #L #_ #IH #X #H elim (lsubr_inv_bind1 … H) -H *
-  [ #L2 #HL2 #H | #L2 #V #W #HL2 #H1 #H2 | #I1 #I2 #L2 #V #Hl2 #H1 #H2 ]
+  [ #L2 #HL2 #H | #L2 #V #W #HL2 #H1 #H2 | #I1 #I2 #L2 #V #HL2 #H1 #H2 ]
   destruct /3 width=1 by lsubr_bind, lsubr_beta, lsubr_unit/
 | #L1 #L #V #W #_ #IH #X #H elim (lsubr_inv_abst1 … H) -H *
   [ #L2 #HL2 #H | #I #L2 #HL2 #H ]
   destruct /3 width=1 by lsubr_beta, lsubr_unit/
 | #I1 #I2 #L1 #L #V #_ #IH #X #H elim (lsubr_inv_unit1 … H) -H
-  /4 width=1 by lsubr_unit/
+  #L2 #HL2 #H destruct /4 width=1 by lsubr_unit/
 ]
 qed-.
index f2de0dfe67933071afcafeacf99ab266cb4cb126..2e155d1ee3680677e3591429dba64fe49610c166 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
-include "static_2/notation/relations/stareqsn_5.ma".
+include "static_2/notation/relations/stareqsn_3.ma".
 include "static_2/syntax/tdeq_ext.ma".
 include "static_2/static/rex.ma".
 
-(* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******)
+(* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***)
 
-definition rdeq (h) (o): relation3 term lenv lenv ≝
-                         rex (cdeq h o).
+definition rdeq: relation3 term lenv lenv ≝
+                 rex cdeq.
 
 interpretation
-   "degree-based equivalence on referred entries (local environment)"
-   'StarEqSn h o T L1 L2 = (rdeq h o T L1 L2).
+   "sort-irrelevant equivalence on referred entries (local environment)"
+   'StarEqSn T L1 L2 = (rdeq T L1 L2).
 
 interpretation
-   "degree-based ranged equivalence (local environment)"
-   'StarEqSn h o f L1 L2 = (sex (cdeq_ext h o) cfull f L1 L2).
+   "sort-irrelevant ranged equivalence (local environment)"
+   'StarEqSn f L1 L2 = (sex cdeq_ext cfull f L1 L2).
 
 (* Basic properties ***********************************************************)
 
-lemma frees_tdeq_conf_rdeq (h) (o): ∀f,L1,T1. L1 ⊢ 𝐅*⦃T1⦄ ≘ f → ∀T2. T1 ≛[h, o] T2 →
-                                    ∀L2. L1 ≛[h, o, f] L2 → L2 ⊢ 𝐅*⦃T2⦄ ≘ f.
-#h #o #f #L1 #T1 #H elim H -f -L1 -T1
+lemma frees_tdeq_conf_rdeq: ∀f,L1,T1. L1 ⊢ 𝐅+⦃T1⦄ ≘ f → ∀T2. T1 ≛ T2 →
+                            ∀L2. L1 ≛[f] L2 → L2 ⊢ 𝐅+⦃T2⦄ ≘ f.
+#f #L1 #T1 #H elim H -f -L1 -T1
 [ #f #L1 #s1 #Hf #X #H1 #L2 #_
-  elim (tdeq_inv_sort1 … H1) -H1 #s2 #d #_ #_ #H destruct
+  elim (tdeq_inv_sort1 … H1) -H1 #s2 #H destruct
   /2 width=3 by frees_sort/
 | #f #i #Hf #X #H1
   >(tdeq_inv_lref1 … H1) -X #Y #H2
@@ -65,130 +65,130 @@ lemma frees_tdeq_conf_rdeq (h) (o): ∀f,L1,T1. L1 ⊢ 𝐅*⦃T1⦄ ≘ f → 
 ]
 qed-.
 
-lemma frees_tdeq_conf (h) (o): ∀f,L,T1. L ⊢ 𝐅*⦃T1⦄ ≘ f →
-                               ∀T2. T1 ≛[h, o] T2 → L ⊢ 𝐅*⦃T2⦄ ≘ f.
+lemma frees_tdeq_conf: ∀f,L,T1. L ⊢ 𝐅+⦃T1⦄ ≘ f →
+                       ∀T2. T1 ≛ T2 → L ⊢ 𝐅+⦃T2⦄ ≘ f.
 /4 width=7 by frees_tdeq_conf_rdeq, sex_refl, ext2_refl/ qed-.
 
-lemma frees_rdeq_conf (h) (o): ∀f,L1,T. L1 ⊢ 𝐅*⦃T⦄ ≘ f →
-                               ∀L2. L1 ≛[h, o, f] L2 → L2 ⊢ 𝐅*⦃T⦄ ≘ f.
+lemma frees_rdeq_conf: ∀f,L1,T. L1 ⊢ 𝐅+⦃T⦄ ≘ f →
+                       ∀L2. L1 ≛[f] L2 → L2 ⊢ 𝐅+⦃T⦄ ≘ f.
 /2 width=7 by frees_tdeq_conf_rdeq, tdeq_refl/ qed-.
 
-lemma tdeq_rex_conf (R) (h) (o): s_r_confluent1 … (cdeq h o) (rex R).
-#R #h #o #L1 #T1 #T2 #HT12 #L2 *
+lemma tdeq_rex_conf (R): s_r_confluent1 … cdeq (rex R).
+#R #L1 #T1 #T2 #HT12 #L2 *
 /3 width=5 by frees_tdeq_conf, ex2_intro/
 qed-.
 
-lemma tdeq_rex_div (R) (h) (o): ∀T1,T2. T1 ≛[h, o] T2 →
-                                ∀L1,L2. L1 ⪤[R, T2] L2 → L1 ⪤[R, T1] L2.
+lemma tdeq_rex_div (R): ∀T1,T2. T1 ≛ T2 →
+                        ∀L1,L2. L1 ⪤[R,T2] L2 → L1 ⪤[R,T1] L2.
 /3 width=5 by tdeq_rex_conf, tdeq_sym/ qed-.
 
-lemma tdeq_rdeq_conf (h) (o): s_r_confluent1 … (cdeq h o) (rdeq h o).
+lemma tdeq_rdeq_conf: s_r_confluent1 … cdeq rdeq.
 /2 width=5 by tdeq_rex_conf/ qed-.
 
-lemma tdeq_rdeq_div (h) (o): ∀T1,T2. T1 ≛[h, o] T2 →
-                             ∀L1,L2. L1 ≛[h, o, T2] L2 → L1 ≛[h, o, T1] L2.
+lemma tdeq_rdeq_div: ∀T1,T2. T1 ≛ T2 →
+                     ∀L1,L2. L1 ≛[T2] L2 → L1 ≛[T1] L2.
 /2 width=5 by tdeq_rex_div/ qed-.
 
-lemma rdeq_atom (h) (o): ∀I. ⋆ ≛[h, o, ⓪{I}] ⋆.
+lemma rdeq_atom: ∀I. ⋆ ≛[⓪{I}] ⋆.
 /2 width=1 by rex_atom/ qed.
 
-lemma rdeq_sort (h) (o): ∀I1,I2,L1,L2,s.
-                         L1 ≛[h, o, ⋆s] L2 → L1.ⓘ{I1} ≛[h, o, ⋆s] L2.ⓘ{I2}.
+lemma rdeq_sort: ∀I1,I2,L1,L2,s.
+                 L1 ≛[⋆s] L2 → L1.ⓘ{I1} ≛[⋆s] L2.ⓘ{I2}.
 /2 width=1 by rex_sort/ qed.
 
-lemma rdeq_pair (h) (o): ∀I,L1,L2,V1,V2. L1 ≛[h, o, V1] L2 → V1 ≛[h, o] V2 →
-                         L1.ⓑ{I}V1 ≛[h, o, #0] L2.ⓑ{I}V2.
+lemma rdeq_pair: ∀I,L1,L2,V1,V2.
+                 L1 ≛[V1] L2 → V1 ≛ V2 → L1.ⓑ{I}V1 ≛[#0] L2.ⓑ{I}V2.
 /2 width=1 by rex_pair/ qed.
 (*
-lemma rdeq_unit (h) (o): ∀f,I,L1,L2. 𝐈⦃f⦄ → L1 ⪤[cdeq_ext h o, cfull, f] L2 →
-                         L1.ⓤ{I} ≛[h, o, #0] L2.ⓤ{I}.
+lemma rdeq_unit: ∀f,I,L1,L2. 𝐈⦃f⦄ → L1 ⪤[cdeq_ext,cfull,f] L2 →
+                 L1.ⓤ{I} ≛[#0] L2.ⓤ{I}.
 /2 width=3 by rex_unit/ qed.
 *)
-lemma rdeq_lref (h) (o): ∀I1,I2,L1,L2,i.
-                         L1 ≛[h, o, #i] L2 → L1.ⓘ{I1} ≛[h, o, #↑i] L2.ⓘ{I2}.
+lemma rdeq_lref: ∀I1,I2,L1,L2,i.
+                 L1 ≛[#i] L2 → L1.ⓘ{I1} ≛[#↑i] L2.ⓘ{I2}.
 /2 width=1 by rex_lref/ qed.
 
-lemma rdeq_gref (h) (o): ∀I1,I2,L1,L2,l.
-                         L1 ≛[h, o, §l] L2 → L1.ⓘ{I1} ≛[h, o, §l] L2.ⓘ{I2}.
+lemma rdeq_gref: ∀I1,I2,L1,L2,l.
+                 L1 ≛[§l] L2 → L1.ⓘ{I1} ≛[§l] L2.ⓘ{I2}.
 /2 width=1 by rex_gref/ qed.
 
-lemma rdeq_bind_repl_dx (h) (o): ∀I,I1,L1,L2.∀T:term.
-                                 L1.ⓘ{I} ≛[h, o, T] L2.ⓘ{I1} →
-                                 ∀I2. I ≛[h, o] I2 →
-                                 L1.ⓘ{I} ≛[h, o, T] L2.ⓘ{I2}.
+lemma rdeq_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-.
 
 (* Basic inversion lemmas ***************************************************)
 
-lemma rdeq_inv_atom_sn (h) (o): ∀Y2. ∀T:term. ⋆ ≛[h, o, T] Y2 → Y2 = ⋆.
+lemma rdeq_inv_atom_sn: ∀Y2. ∀T:term. ⋆ ≛[T] Y2 → Y2 = ⋆.
 /2 width=3 by rex_inv_atom_sn/ qed-.
 
-lemma rdeq_inv_atom_dx (h) (o): ∀Y1. ∀T:term. Y1 ≛[h, o, T] ⋆ → Y1 = ⋆.
+lemma rdeq_inv_atom_dx: ∀Y1. ∀T:term. Y1 ≛[T] ⋆ → Y1 = ⋆.
 /2 width=3 by rex_inv_atom_dx/ qed-.
 (*
-lemma rdeq_inv_zero (h) (o): ∀Y1,Y2. Y1 ≛[h, o, #0] Y2 →
-                             ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆
-                              | ∃∃I,L1,L2,V1,V2. L1 ≛[h, o, V1] L2 & V1 ≛[h, o] V2 &
-                                                 Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2
-                              | ∃∃f,I,L1,L2. 𝐈⦃f⦄ & L1 ⪤[cdeq_ext h o, cfull, f] L2 &
-                                             Y1 = L1.ⓤ{I} & Y2 = L2.ⓤ{I}.
-#h #o #Y1 #Y2 #H elim (rex_inv_zero … H) -H *
+lemma rdeq_inv_zero: ∀Y1,Y2. Y1 ≛[#0] Y2 →
+                     ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆
+                      | ∃∃I,L1,L2,V1,V2. L1 ≛[V1] L2 & V1 ≛ V2 &
+                                         Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2
+                      | ∃∃f,I,L1,L2. 𝐈⦃f⦄ & L1 ⪤[cdeq_ext h o,cfull,f] L2 &
+                                         Y1 = L1.ⓤ{I} & Y2 = L2.ⓤ{I}.
+#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 rdeq_inv_lref (h) (o): ∀Y1,Y2,i. Y1 ≛[h, o, #↑i] Y2 →
-                             ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆
-                              | ∃∃I1,I2,L1,L2. L1 ≛[h, o, #i] L2 &
-                                               Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
+lemma rdeq_inv_lref: ∀Y1,Y2,i. Y1 ≛[#↑i] Y2 →
+                     ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆
+                      | ∃∃I1,I2,L1,L2. L1 ≛[#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 rdeq_inv_bind (h) (o): ∀p,I,L1,L2,V,T. L1 ≛[h, o, ⓑ{p,I}V.T] L2 →
-                             ∧∧ L1 ≛[h, o, V] L2 & L1.ⓑ{I}V ≛[h, o, T] L2.ⓑ{I}V.
+lemma rdeq_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-.
 
 (* Basic_2A1: uses: lleq_inv_flat *)
-lemma rdeq_inv_flat (h) (o): ∀I,L1,L2,V,T. L1 ≛[h, o, ⓕ{I}V.T] L2 →
-                             ∧∧ L1 ≛[h, o, V] L2 & L1 ≛[h, o, T] L2.
+lemma rdeq_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 rdeq_inv_zero_pair_sn (h) (o): ∀I,Y2,L1,V1. L1.ⓑ{I}V1 ≛[h, o, #0] Y2 →
-                                     ∃∃L2,V2. L1 ≛[h, o, V1] L2 & V1 ≛[h, o] V2 & Y2 = L2.ⓑ{I}V2.
+lemma rdeq_inv_zero_pair_sn: ∀I,Y2,L1,V1. L1.ⓑ{I}V1 ≛[#0] Y2 →
+                             ∃∃L2,V2. L1 ≛[V1] L2 & V1 ≛ V2 & Y2 = L2.ⓑ{I}V2.
 /2 width=1 by rex_inv_zero_pair_sn/ qed-.
 
-lemma rdeq_inv_zero_pair_dx (h) (o): ∀I,Y1,L2,V2. Y1 ≛[h, o, #0] L2.ⓑ{I}V2 →
-                                      ∃∃L1,V1. L1 ≛[h, o, V1] L2 & V1 ≛[h, o] V2 & Y1 = L1.ⓑ{I}V1.
+lemma rdeq_inv_zero_pair_dx: ∀I,Y1,L2,V2. Y1 ≛[#0] L2.ⓑ{I}V2 →
+                             ∃∃L1,V1. L1 ≛[V1] L2 & V1 ≛ V2 & Y1 = L1.ⓑ{I}V1.
 /2 width=1 by rex_inv_zero_pair_dx/ qed-.
 
-lemma rdeq_inv_lref_bind_sn (h) (o): ∀I1,Y2,L1,i. L1.ⓘ{I1} ≛[h, o, #↑i] Y2 →
-                                     ∃∃I2,L2. L1 ≛[h, o, #i] L2 & Y2 = L2.ⓘ{I2}.
+lemma rdeq_inv_lref_bind_sn: ∀I1,Y2,L1,i. L1.ⓘ{I1} ≛[#↑i] Y2 →
+                             ∃∃I2,L2. L1 ≛[#i] L2 & Y2 = L2.ⓘ{I2}.
 /2 width=2 by rex_inv_lref_bind_sn/ qed-.
 
-lemma rdeq_inv_lref_bind_dx (h) (o): ∀I2,Y1,L2,i. Y1 ≛[h, o, #↑i] L2.ⓘ{I2} →
-                                     ∃∃I1,L1. L1 ≛[h, o, #i] L2 & Y1 = L1.ⓘ{I1}.
+lemma rdeq_inv_lref_bind_dx: ∀I2,Y1,L2,i. Y1 ≛[#↑i] L2.ⓘ{I2} →
+                             ∃∃I1,L1. L1 ≛[#i] L2 & Y1 = L1.ⓘ{I1}.
 /2 width=2 by rex_inv_lref_bind_dx/ qed-.
 
 (* Basic forward lemmas *****************************************************)
 
-lemma rdeq_fwd_zero_pair (h) (o): ∀I,K1,K2,V1,V2.
-                                  K1.ⓑ{I}V1 ≛[h, o, #0] K2.ⓑ{I}V2 → K1 ≛[h, o, V1] K2.
+lemma rdeq_fwd_zero_pair: ∀I,K1,K2,V1,V2.
+                          K1.ⓑ{I}V1 ≛[#0] K2.ⓑ{I}V2 → K1 ≛[V1] K2.
 /2 width=3 by rex_fwd_zero_pair/ qed-.
 
 (* Basic_2A1: uses: lleq_fwd_bind_sn lleq_fwd_flat_sn *)
-lemma rdeq_fwd_pair_sn (h) (o): ∀I,L1,L2,V,T. L1 ≛[h, o, ②{I}V.T] L2 → L1 ≛[h, o, V] L2.
+lemma rdeq_fwd_pair_sn: ∀I,L1,L2,V,T. L1 ≛[②{I}V.T] L2 → L1 ≛[V] L2.
 /2 width=3 by rex_fwd_pair_sn/ qed-.
 
 (* Basic_2A1: uses: lleq_fwd_bind_dx lleq_fwd_bind_O_dx *)
-lemma rdeq_fwd_bind_dx (h) (o): ∀p,I,L1,L2,V,T.
-                                L1 ≛[h, o, ⓑ{p,I}V.T] L2 → L1.ⓑ{I}V ≛[h, o, T] L2.ⓑ{I}V.
+lemma rdeq_fwd_bind_dx: ∀p,I,L1,L2,V,T.
+                        L1 ≛[ⓑ{p,I}V.T] L2 → L1.ⓑ{I}V ≛[T] L2.ⓑ{I}V.
 /2 width=2 by rex_fwd_bind_dx/ qed-.
 
 (* Basic_2A1: uses: lleq_fwd_flat_dx *)
-lemma rdeq_fwd_flat_dx (h) (o): ∀I,L1,L2,V,T. L1 ≛[h, o, ⓕ{I}V.T] L2 → L1 ≛[h, o, T] L2.
+lemma rdeq_fwd_flat_dx: ∀I,L1,L2,V,T. L1 ≛[ⓕ{I}V.T] L2 → L1 ≛[T] L2.
 /2 width=3 by rex_fwd_flat_dx/ qed-.
 
-lemma rdeq_fwd_dx (h) (o): ∀I2,L1,K2. ∀T:term. L1 ≛[h, o, T] K2.ⓘ{I2} →
-                           ∃∃I1,K1. L1 = K1.ⓘ{I1}.
+lemma rdeq_fwd_dx: ∀I2,L1,K2. ∀T:term. L1 ≛[T] K2.ⓘ{I2} →
+                   ∃∃I1,K1. L1 = K1.ⓘ{I1}.
 /2 width=5 by rex_fwd_dx/ qed-.
index 825ed84d94b644a26ba529e6551beae43943a821..6246d21a2d954289a29a2336b66ce87fdfb3a305 100644 (file)
@@ -16,37 +16,37 @@ include "static_2/relocation/lifts_tdeq.ma".
 include "static_2/static/rex_drops.ma".
 include "static_2/static/rdeq.ma".
 
-(* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******)
+(* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***)
 
 (* Properties with generic slicing for local environments *******************)
 
-lemma rdeq_lifts_sn: ∀h,o. f_dedropable_sn (cdeq h o).
+lemma rdeq_lifts_sn: f_dedropable_sn cdeq.
 /3 width=5 by rex_liftable_dedropable_sn, tdeq_lifts_sn/ qed-.
 
 (* Inversion lemmas with generic slicing for local environments *************)
 
-lemma rdeq_inv_lifts_sn: ∀h,o. f_dropable_sn (cdeq h o).
+lemma rdeq_inv_lifts_sn: f_dropable_sn cdeq.
 /2 width=5 by rex_dropable_sn/ qed-.
 
-lemma rdeq_inv_lifts_dx: ∀h,o. f_dropable_dx (cdeq h o).
+lemma rdeq_inv_lifts_dx: f_dropable_dx cdeq.
 /2 width=5 by rex_dropable_dx/ qed-.
 
-lemma rdeq_inv_lifts_bi: ∀h,o,L1,L2,U. L1 ≛[h, o, U] L2 → ∀b,f. 𝐔⦃f⦄ →
-                         ∀K1,K2. ⬇*[b, f] L1 ≘ K1 → ⬇*[b, f] L2 ≘ K2 →
-                         ∀T. ⬆*[f] T ≘ U → K1 ≛[h, o, T] K2.
+lemma rdeq_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-.
 
-lemma rdeq_inv_lref_pair_sn: ∀h,o,L1,L2,i. L1 ≛[h, o, #i] L2 → ∀I,K1,V1. ⬇*[i] L1 ≘ K1.ⓑ{I}V1 →
-                             ∃∃K2,V2. ⬇*[i] L2 ≘ K2.ⓑ{I}V2 & K1 ≛[h, o, V1] K2 & V1 ≛[h, o] V2.
+lemma rdeq_inv_lref_pair_sn: ∀L1,L2,i. L1 ≛[#i] L2 → ∀I,K1,V1. ⬇*[i] L1 ≘ K1.ⓑ{I}V1 →
+                             ∃∃K2,V2. ⬇*[i] L2 ≘ K2.ⓑ{I}V2 & K1 ≛[V1] K2 & V1 ≛ V2.
 /2 width=3 by rex_inv_lref_pair_sn/ qed-.
 
-lemma rdeq_inv_lref_pair_dx: ∀h,o,L1,L2,i. L1 ≛[h, o, #i] L2 → ∀I,K2,V2. ⬇*[i] L2 ≘ K2.ⓑ{I}V2 →
-                             ∃∃K1,V1. ⬇*[i] L1 ≘ K1.ⓑ{I}V1 & K1 ≛[h, o, V1] K2 & V1 ≛[h, o] V2.
+lemma rdeq_inv_lref_pair_dx: ∀L1,L2,i. L1 ≛[#i] L2 → ∀I,K2,V2. ⬇*[i] L2 ≘ K2.ⓑ{I}V2 →
+                             ∃∃K1,V1. ⬇*[i] L1 ≘ K1.ⓑ{I}V1 & K1 ≛[V1] K2 & V1 ≛ V2.
 /2 width=3 by rex_inv_lref_pair_dx/ qed-.
 
-lemma rdeq_inv_lref_pair_bi (h) (o) (L1) (L2) (i):
-                            L1 ≛[h,o,#i] L2 →
+lemma rdeq_inv_lref_pair_bi (L1) (L2) (i):
+                            L1 ≛[#i] L2 →
                             ∀I1,K1,V1. ⬇*[i] L1 ≘ K1.ⓑ{I1}V1 →
                             ∀I2,K2,V2. ⬇*[i] L2 ≘ K2.ⓑ{I2}V2 →
-                            ∧∧ K1 ≛[h,o,V1] K2 & V1 ≛[h,o] V2 & I1 = I2.
+                            ∧∧ K1 ≛[V1] K2 & V1 ≛ V2 & I1 = I2.
 /2 width=6 by rex_inv_lref_pair_bi/ qed-.
index e1a7afb3ae864aec6efded95620f090e19c03249..904bb601bdaa075656965fa91731d540d7588378 100644 (file)
 include "static_2/static/rex_fqup.ma".
 include "static_2/static/rdeq.ma".
 
-(* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******)
+(* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***)
 
 (* Advanced properties ******************************************************)
 
-lemma rdeq_refl: ∀h,o,T. reflexive … (rdeq h o T).
+lemma rdeq_refl: ∀T. reflexive … (rdeq T).
 /2 width=1 by rex_refl/ qed.
 
-lemma rdeq_pair_refl: ∀h,o,V1,V2. V1 ≛[h, o] V2 →
-                      ∀I,L. ∀T:term. L.ⓑ{I}V1 ≛[h, o, T] L.ⓑ{I}V2.
+lemma rdeq_pair_refl: ∀V1,V2. V1 ≛ V2 →
+                      ∀I,L. ∀T:term. L.ⓑ{I}V1 ≛[T] L.ⓑ{I}V2.
 /2 width=1 by rex_pair_refl/ qed.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma rdeq_inv_bind_void: ∀h,o,p,I,L1,L2,V,T. L1 ≛[h, o, ⓑ{p,I}V.T] L2 →
-                          L1 ≛[h, o, V] L2 ∧ L1.ⓧ ≛[h, o, T] L2.ⓧ.
+lemma rdeq_inv_bind_void: ∀p,I,L1,L2,V,T. L1 ≛[ⓑ{p,I}V.T] L2 →
+                          L1 ≛[V] L2 ∧ L1.ⓧ ≛[T] L2.ⓧ.
 /2 width=3 by rex_inv_bind_void/ qed-.
 
 (* Advanced forward lemmas **************************************************)
 
-lemma rdeq_fwd_bind_dx_void: ∀h,o,p,I,L1,L2,V,T.
-                             L1 ≛[h, o, ⓑ{p,I}V.T] L2 → L1.ⓧ ≛[h, o, T] L2.ⓧ.
+lemma rdeq_fwd_bind_dx_void: ∀p,I,L1,L2,V,T.
+                             L1 ≛[ⓑ{p,I}V.T] L2 → L1.ⓧ ≛[T] L2.ⓧ.
 /2 width=4 by rex_fwd_bind_dx_void/ qed-.
index 3ebf19118d8c89efb3d5be4aae88ff438fd89001..d698643907a3f39eec559c3283dbbbfdbc278947 100644 (file)
@@ -17,20 +17,20 @@ include "static_2/static/rdeq_drops.ma".
 include "static_2/static/rdeq_fqup.ma".
 include "static_2/static/rdeq_rdeq.ma".
 
-(* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******)
+(* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***)
 
 (* Properties with extended structural successor for closures ***************)
 
-lemma fqu_tdeq_conf: ∀h,o,b,G1,G2,L1,L2,U1,T1. ⦃G1, L1, U1⦄ ⊐[b] ⦃G2, L2, T1⦄ →
-                     ∀U2. U1 ≛[h, o] U2 →
-                     ∃∃L,T2. ⦃G1, L1, U2⦄ ⊐[b] ⦃G2, L, T2⦄ & L2 ≛[h, o, T1] L & T1 ≛[h, o] T2.
-#h #o #b #G1 #G2 #L1 #L2 #U1 #T1 #H elim H -G1 -G2 -L1 -L2 -U1 -T1
+lemma fqu_tdeq_conf: ∀b,G1,G2,L1,L2,U1,T1. ⦃G1,L1,U1⦄ ⬂[b] ⦃G2,L2,T1⦄ →
+                     ∀U2. U1 ≛ U2 →
+                     ∃∃L,T2. ⦃G1,L1,U2⦄ ⬂[b] ⦃G2,L,T2⦄ & L2 ≛[T1] L & T1 ≛ T2.
+#b #G1 #G2 #L1 #L2 #U1 #T1 #H elim H -G1 -G2 -L1 -L2 -U1 -T1
 [ #I #G #L #W #X #H >(tdeq_inv_lref1 … H) -X
   /2 width=5 by fqu_lref_O, ex3_2_intro/
 | #I #G #L #W1 #U1 #X #H
   elim (tdeq_inv_pair1 … H) -H #W2 #U2 #HW12 #_ #H destruct
   /2 width=5 by fqu_pair_sn, ex3_2_intro/
-| #p #I #G #L #W1 #U1 #X #H
+| #p #I #G #L #W1 #U1 #Hb #X #H
   elim (tdeq_inv_pair1 … H) -H #W2 #U2 #HW12 #HU12 #H destruct
   /3 width=5 by rdeq_pair_refl, fqu_bind_dx, ex3_2_intro/
 | #p #I #G #L #W1 #U1 #Hb #X #H
@@ -45,19 +45,19 @@ lemma fqu_tdeq_conf: ∀h,o,b,G1,G2,L1,L2,U1,T1. ⦃G1, L1, U1⦄ ⊐[b] ⦃G2,
 ]
 qed-.
 
-lemma tdeq_fqu_trans: ∀h,o,b,G1,G2,L1,L2,U1,T1. ⦃G1, L1, U1⦄ ⊐[b] ⦃G2, L2, T1⦄ →
-                      ∀U2. U2 ≛[h, o] U1 →
-                      ∃∃L,T2. ⦃G1, L1, U2⦄ ⊐[b] ⦃G2, L, T2⦄ & T2 ≛[h, o] T1 & L ≛[h, o, T1] L2.
-#h #o #b #G1 #G2 #L1 #L2 #U1 #T1 #H12 #U2 #HU21
-elim (fqu_tdeq_conf … o … H12 U2) -H12
+lemma tdeq_fqu_trans: ∀b,G1,G2,L1,L2,U1,T1. ⦃G1,L1,U1⦄ ⬂[b] ⦃G2,L2,T1⦄ →
+                      ∀U2. U2 ≛ U1 →
+                      ∃∃L,T2. ⦃G1,L1,U2⦄ ⬂[b] ⦃G2,L,T2⦄ & T2 ≛ T1 & L ≛[T1] L2.
+#b #G1 #G2 #L1 #L2 #U1 #T1 #H12 #U2 #HU21
+elim (fqu_tdeq_conf … H12 U2) -H12
 /3 width=5 by rdeq_sym, tdeq_sym, ex3_2_intro/
 qed-.
 
 (* Basic_2A1: uses: lleq_fqu_trans *)
-lemma rdeq_fqu_trans: ∀h,o,b,G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐[b] ⦃G2, K2, U⦄ →
-                      ∀L1. L1 ≛[h, o, T] L2 →
-                      ∃∃K1,U0. ⦃G1, L1, T⦄ ⊐[b] ⦃G2, K1, U0⦄ & U0 ≛[h, o] U & K1 ≛[h, o, U] K2.
-#h #o #b #G1 #G2 #L2 #K2 #T #U #H elim H -G1 -G2 -L2 -K2 -T -U
+lemma rdeq_fqu_trans: ∀b,G1,G2,L2,K2,T,U. ⦃G1,L2,T⦄ ⬂[b] ⦃G2,K2,U⦄ →
+                      ∀L1. L1 ≛[T] L2 →
+                      ∃∃K1,U0. ⦃G1,L1,T⦄ ⬂[b] ⦃G2,K1,U0⦄ & U0 ≛ U & K1 ≛[U] K2.
+#b #G1 #G2 #L2 #K2 #T #U #H elim H -G1 -G2 -L2 -K2 -T -U
 [ #I #G #L2 #V2 #L1 #H elim (rdeq_inv_zero_pair_dx … H) -H
   #K1 #V1 #HV1 #HV12 #H destruct
   /3 width=7 by tdeq_rdeq_conf, fqu_lref_O, ex3_2_intro/
@@ -66,8 +66,8 @@ lemma rdeq_fqu_trans: ∀h,o,b,G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐[b] ⦃G2, K2
   | elim (rdeq_inv_flat … H)
   ] -H
   /2 width=5 by fqu_pair_sn, ex3_2_intro/
-| #p #I #G #L2 #V #T #L1 #H elim (rdeq_inv_bind … H) -H
-  /2 width=5 by fqu_bind_dx, ex3_2_intro/
+| #p #I #G #L2 #V #T #Hb #L1 #H elim (rdeq_inv_bind … H) -H
+  /3 width=5 by fqu_bind_dx, ex3_2_intro/
 | #p #I #G #L2 #V #T #Hb #L1 #H elim (rdeq_inv_bind_void … H) -H
   /3 width=5 by fqu_clear, ex3_2_intro/
 | #I #G #L2 #V #T #L1 #H elim (rdeq_inv_flat … H) -H
@@ -80,10 +80,10 @@ qed-.
 
 (* Properties with optional structural successor for closures ***************)
 
-lemma tdeq_fquq_trans: ∀h,o,b,G1,G2,L1,L2,U1,T1. ⦃G1, L1, U1⦄ ⊐⸮[b] ⦃G2, L2, T1⦄ →
-                       ∀U2. U2 ≛[h, o] U1 →
-                       ∃∃L,T2. ⦃G1, L1, U2⦄ ⊐⸮[b] ⦃G2, L, T2⦄ & T2 ≛[h, o] T1 & L ≛[h, o, T1] L2.
-#h #o #b #G1 #G2 #L1 #L2 #U1 #T1 #H elim H -H
+lemma tdeq_fquq_trans: ∀b,G1,G2,L1,L2,U1,T1. ⦃G1,L1,U1⦄ ⬂⸮[b] ⦃G2,L2,T1⦄ →
+                       ∀U2. U2 ≛ U1 →
+                       ∃∃L,T2. ⦃G1,L1,U2⦄ ⬂⸮[b] ⦃G2,L,T2⦄ & T2 ≛ T1 & L ≛[T1] L2.
+#b #G1 #G2 #L1 #L2 #U1 #T1 #H elim H -H
 [ #H #U2 #HU21 elim (tdeq_fqu_trans … H … HU21) -U1
   /3 width=5 by fqu_fquq, ex3_2_intro/
 | * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/
@@ -91,10 +91,10 @@ lemma tdeq_fquq_trans: ∀h,o,b,G1,G2,L1,L2,U1,T1. ⦃G1, L1, U1⦄ ⊐⸮[b] 
 qed-.
 
 (* Basic_2A1: was just: lleq_fquq_trans *)
-lemma rdeq_fquq_trans: ∀h,o,b,G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐⸮[b] ⦃G2, K2, U⦄ →
-                       ∀L1. L1 ≛[h, o, T] L2 →
-                       ∃∃K1,U0. ⦃G1, L1, T⦄ ⊐⸮[b] ⦃G2, K1, U0⦄ & U0 ≛[h, o] U & K1 ≛[h, o, U] K2.
-#h #o #b #G1 #G2 #L2 #K2 #T #U #H elim H -H
+lemma rdeq_fquq_trans: ∀b,G1,G2,L2,K2,T,U. ⦃G1,L2,T⦄ ⬂⸮[b] ⦃G2,K2,U⦄ →
+                       ∀L1. L1 ≛[T] L2 →
+                       ∃∃K1,U0. ⦃G1,L1,T⦄ ⬂⸮[b] ⦃G2,K1,U0⦄ & U0 ≛ U & K1 ≛[U] K2.
+#b #G1 #G2 #L2 #K2 #T #U #H elim H -H
 [ #H #L1 #HL12 elim (rdeq_fqu_trans … H … HL12) -L2 /3 width=5 by fqu_fquq, ex3_2_intro/
 | * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/
 ]
@@ -103,10 +103,10 @@ qed-.
 (* Properties with plus-iterated structural successor for closures **********)
 
 (* Basic_2A1: was just: lleq_fqup_trans *)
-lemma rdeq_fqup_trans: ∀h,o,b,G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐+[b] ⦃G2, K2, U⦄ →
-                       ∀L1. L1 ≛[h, o, T] L2 →
-                       ∃∃K1,U0. ⦃G1, L1, T⦄ ⊐+[b] ⦃G2, K1, U0⦄ & U0 ≛[h, o] U & K1 ≛[h, o, U] K2.
-#h #o #b #G1 #G2 #L2 #K2 #T #U #H @(fqup_ind … H) -G2 -K2 -U
+lemma rdeq_fqup_trans: ∀b,G1,G2,L2,K2,T,U. ⦃G1,L2,T⦄ ⬂+[b] ⦃G2,K2,U⦄ →
+                       ∀L1. L1 ≛[T] L2 →
+                       ∃∃K1,U0. ⦃G1,L1,T⦄ ⬂+[b] ⦃G2,K1,U0⦄ & U0 ≛ U & K1 ≛[U] K2.
+#b #G1 #G2 #L2 #K2 #T #U #H @(fqup_ind … H) -G2 -K2 -U
 [ #G2 #K2 #U #HTU #L1 #HL12 elim (rdeq_fqu_trans … HTU … HL12) -L2
   /3 width=5 by fqu_fqup, ex3_2_intro/
 | #G #G2 #K #K2 #U #U2 #_ #HU2 #IHTU #L1 #HL12
@@ -118,10 +118,10 @@ lemma rdeq_fqup_trans: ∀h,o,b,G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐+[b] ⦃G2,
 ]
 qed-.
 
-lemma tdeq_fqup_trans: ∀h,o,b,G1,G2,L1,L2,U1,T1. ⦃G1, L1, U1⦄ ⊐+[b] ⦃G2, L2, T1⦄ →
-                       ∀U2. U2 ≛[h, o] U1 →
-                       ∃∃L,T2. ⦃G1, L1, U2⦄ ⊐+[b] ⦃G2, L, T2⦄ & T2 ≛[h, o] T1 & L ≛[h, o, T1] L2.
-#h #o #b #G1 #G2 #L1 #L2 #U1 #T1 #H @(fqup_ind_dx … H) -G1 -L1 -U1
+lemma tdeq_fqup_trans: ∀b,G1,G2,L1,L2,U1,T1. ⦃G1,L1,U1⦄ ⬂+[b] ⦃G2,L2,T1⦄ →
+                       ∀U2. U2 ≛ U1 →
+                       ∃∃L,T2. ⦃G1,L1,U2⦄ ⬂+[b] ⦃G2,L,T2⦄ & T2 ≛ T1 & L ≛[T1] L2.
+#b #G1 #G2 #L1 #L2 #U1 #T1 #H @(fqup_ind_dx … H) -G1 -L1 -U1
 [ #G1 #L1 #U1 #H #U2 #HU21 elim (tdeq_fqu_trans … H … HU21) -U1
   /3 width=5 by fqu_fqup, ex3_2_intro/
 | #G1 #G #L1 #L #U1 #U #H #_ #IH #U2 #HU21
@@ -136,20 +136,20 @@ qed-.
 
 (* Properties with star-iterated structural successor for closures **********)
 
-lemma tdeq_fqus_trans: ∀h,o,b,G1,G2,L1,L2,U1,T1. ⦃G1, L1, U1⦄ ⊐*[b] ⦃G2, L2, T1⦄ →
-                       ∀U2. U2 ≛[h, o] U1 →
-                       ∃∃L,T2. ⦃G1, L1, U2⦄ ⊐*[b] ⦃G2, L, T2⦄ & T2 ≛[h, o] T1 & L ≛[h, o, T1] L2.
-#h #o #b #G1 #G2 #L1 #L2 #U1 #T1 #H #U2 #HU21 elim(fqus_inv_fqup … H) -H
+lemma tdeq_fqus_trans: ∀b,G1,G2,L1,L2,U1,T1. ⦃G1,L1,U1⦄ ⬂*[b] ⦃G2,L2,T1⦄ →
+                       ∀U2. U2 ≛ U1 →
+                       ∃∃L,T2. ⦃G1,L1,U2⦄ ⬂*[b] ⦃G2,L,T2⦄ & T2 ≛ T1 & L ≛[T1] L2.
+#b #G1 #G2 #L1 #L2 #U1 #T1 #H #U2 #HU21 elim(fqus_inv_fqup … H) -H
 [ #H elim (tdeq_fqup_trans … H … HU21) -U1 /3 width=5 by fqup_fqus, ex3_2_intro/
 | * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/
 ]
 qed-.
 
 (* Basic_2A1: was just: lleq_fqus_trans *)
-lemma rdeq_fqus_trans: ∀h,o,b,G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐*[b] ⦃G2, K2, U⦄ →
-                       ∀L1. L1 ≛[h, o, T] L2 →
-                       ∃∃K1,U0. ⦃G1, L1, T⦄ ⊐*[b] ⦃G2, K1, U0⦄ & U0 ≛[h, o] U & K1 ≛[h, o, U] K2.
-#h #o #b #G1 #G2 #L2 #K2 #T #U #H #L1 #HL12 elim(fqus_inv_fqup … H) -H
+lemma rdeq_fqus_trans: ∀b,G1,G2,L2,K2,T,U. ⦃G1,L2,T⦄ ⬂*[b] ⦃G2,K2,U⦄ →
+                       ∀L1. L1 ≛[T] L2 →
+                       ∃∃K1,U0. ⦃G1,L1,T⦄ ⬂*[b] ⦃G2,K1,U0⦄ & U0 ≛ U & K1 ≛[U] K2.
+#b #G1 #G2 #L2 #K2 #T #U #H #L1 #HL12 elim(fqus_inv_fqup … H) -H
 [ #H elim (rdeq_fqup_trans … H … HL12) -L2 /3 width=5 by fqup_fqus, ex3_2_intro/
 | * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/
 ]
index e0f3bb23611d72e8f78f25c438ce2100700a1f5c..967c4c0e64abbc5eda2b564e9954fe0c9e0b0faa 100644 (file)
@@ -17,13 +17,13 @@ include "static_2/static/rex_length.ma".
 include "static_2/static/rex_fsle.ma".
 include "static_2/static/rdeq.ma".
 
-(* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******)
+(* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***)
 
 (* Advanved properties with free variables inclusion ************************)
 
-lemma rdeq_fsge_comp (h) (o): rex_fsge_compatible (cdeq h o).
-#h #o #L1 #L2 #T * #f1 #Hf1 #HL12
-lapply (frees_rdeq_conf h o … Hf1 … HL12)
+lemma rdeq_fsge_comp: rex_fsge_compatible cdeq.
+#L1 #L2 #T * #f1 #Hf1 #HL12
+lapply (frees_rdeq_conf … Hf1 … HL12)
 lapply (sex_fwd_length … HL12)
 /3 width=8 by lveq_length_eq, ex4_4_intro/ (**) (* full auto fails *)
 qed-.
@@ -31,25 +31,25 @@ qed-.
 (* Properties with length for local environments ****************************)
 
 (* Basic_2A1: uses: lleq_sort *)
-lemma rdeq_sort_length (h) (o): ∀L1,L2. |L1| = |L2| → ∀s. L1 ≛[h, o, ⋆s] L2.
+lemma rdeq_sort_length: ∀L1,L2. |L1| = |L2| → ∀s. L1 ≛[⋆s] L2.
 /2 width=1 by rex_sort_length/ qed.
 
 (* Basic_2A1: uses: lleq_gref *)
-lemma rdeq_gref_length (h) (o): ∀L1,L2. |L1| = |L2| → ∀l. L1 ≛[h, o, §l] L2.
+lemma rdeq_gref_length: ∀L1,L2. |L1| = |L2| → ∀l. L1 ≛[§l] L2.
 /2 width=1 by rex_gref_length/ qed.
 
-lemma rdeq_unit_length (h) (o): ∀L1,L2. |L1| = |L2| →
-                                ∀I. L1.ⓤ{I} ≛[h, o, #0] L2.ⓤ{I}.
+lemma rdeq_unit_length: ∀L1,L2. |L1| = |L2| →
+                        ∀I. L1.ⓤ{I} ≛[#0] L2.ⓤ{I}.
 /2 width=1 by rex_unit_length/ qed.
 
 (* Basic_2A1: uses: lleq_lift_le lleq_lift_ge *)
-lemma rdeq_lifts_bi (h) (o): ∀L1,L2. |L1| = |L2| → ∀K1,K2,T. K1 ≛[h, o, T] K2 →
-                             ∀b,f. ⬇*[b, f] L1 ≘ K1 → ⬇*[b, f] L2 ≘ K2 →
-                             ∀U. ⬆*[f] T ≘ U → L1 ≛[h, o, U] L2.
+lemma rdeq_lifts_bi: ∀L1,L2. |L1| = |L2| → ∀K1,K2,T. K1 ≛[T] K2 →
+                     ∀b,f. ⬇*[b,f] L1 ≘ K1 → ⬇*[b,f] L2 ≘ K2 →
+                     ∀U. ⬆*[f] T ≘ U → L1 ≛[U] L2.
 /3 width=9 by rex_lifts_bi, tdeq_lifts_sn/ qed-.
 
 (* Forward lemmas with length for local environments ************************)
 
 (* Basic_2A1: lleq_fwd_length *)
-lemma rdeq_fwd_length (h) (o): ∀L1,L2. ∀T:term. L1 ≛[h, o, T] L2 → |L1| = |L2|.
+lemma rdeq_fwd_length: ∀L1,L2. ∀T:term. L1 ≛[T] L2 → |L1| = |L2|.
 /2 width=3 by rex_fwd_length/ qed-.
index 316438d662241b1c5a9325fa866db8ff9ff78d34..30069162df6bb1575ab1056b90558ec858b7eb37 100644 (file)
@@ -16,85 +16,84 @@ include "static_2/syntax/ext2_ext2.ma".
 include "static_2/syntax/tdeq_tdeq.ma".
 include "static_2/static/rdeq_length.ma".
 
-(* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******)
+(* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***)
 
 (* Advanced properties ******************************************************)
 
 (* Basic_2A1: uses: lleq_sym *)
-lemma rdeq_sym: ∀h,o,T. symmetric … (rdeq h o T).
+lemma rdeq_sym: ∀T. symmetric … (rdeq T).
 /3 width=3 by rdeq_fsge_comp, rex_sym, tdeq_sym/ qed-.
 
 (* Basic_2A1: uses: lleq_dec *)
-lemma rdeq_dec: ∀h,o,L1,L2. ∀T:term. Decidable (L1 ≛[h, o, T] L2).
+lemma rdeq_dec: ∀L1,L2. ∀T:term. Decidable (L1 ≛[T] L2).
 /3 width=1 by rex_dec, tdeq_dec/ qed-.
 
 (* Main properties **********************************************************)
 
 (* Basic_2A1: uses: lleq_bind lleq_bind_O *) 
-theorem rdeq_bind: ∀h,o,p,I,L1,L2,V1,V2,T.
-                   L1 ≛[h, o, V1] L2 → L1.ⓑ{I}V1 ≛[h, o, T] L2.ⓑ{I}V2 →
-                   L1 ≛[h, o, ⓑ{p,I}V1.T] L2.
+theorem rdeq_bind: ∀p,I,L1,L2,V1,V2,T.
+                   L1 ≛[V1] L2 → L1.ⓑ{I}V1 ≛[T] L2.ⓑ{I}V2 →
+                   L1 ≛[ⓑ{p,I}V1.T] L2.
 /2 width=2 by rex_bind/ qed.
 
 (* Basic_2A1: uses: lleq_flat *)
-theorem rdeq_flat: ∀h,o,I,L1,L2,V,T. L1 ≛[h, o, V] L2 → L1 ≛[h, o, T] L2 →
-                   L1 ≛[h, o, ⓕ{I}V.T] L2.
+theorem rdeq_flat: ∀I,L1,L2,V,T.
+                   L1 ≛[V] L2 → L1 ≛[T] L2 → L1 ≛[ⓕ{I}V.T] L2.
 /2 width=1 by rex_flat/ qed.
 
-theorem rdeq_bind_void: ∀h,o,p,I,L1,L2,V,T.
-                        L1 ≛[h, o, V] L2 → L1.ⓧ ≛[h, o, T] L2.ⓧ →
-                        L1 ≛[h, o, ⓑ{p,I}V.T] L2.
+theorem rdeq_bind_void: ∀p,I,L1,L2,V,T.
+                        L1 ≛[V] L2 → L1.ⓧ ≛[T] L2.ⓧ → L1 ≛[ⓑ{p,I}V.T] L2.
 /2 width=1 by rex_bind_void/ qed.
 
 (* Basic_2A1: uses: lleq_trans *)
-theorem rdeq_trans: ∀h,o,T. Transitive … (rdeq h o T).
-#h #o #T #L1 #L * #f1 #Hf1 #HL1 #L2 * #f2 #Hf2 #HL2
+theorem rdeq_trans: ∀T. Transitive … (rdeq T).
+#T #L1 #L * #f1 #Hf1 #HL1 #L2 * #f2 #Hf2 #HL2
 lapply (frees_tdeq_conf_rdeq … Hf1 T … HL1) // #H0
 lapply (frees_mono … Hf2 … H0) -Hf2 -H0
 /5 width=7 by sex_trans, sex_eq_repl_back, tdeq_trans, ext2_trans, ex2_intro/
 qed-.
 
 (* Basic_2A1: uses: lleq_canc_sn *)
-theorem rdeq_canc_sn: ∀h,o,T. left_cancellable … (rdeq h o T).
+theorem rdeq_canc_sn: ∀T. left_cancellable … (rdeq T).
 /3 width=3 by rdeq_trans, rdeq_sym/ qed-.
 
 (* Basic_2A1: uses: lleq_canc_dx *)
-theorem rdeq_canc_dx: ∀h,o,T. right_cancellable … (rdeq h o T).
+theorem rdeq_canc_dx: ∀T. right_cancellable … (rdeq T).
 /3 width=3 by rdeq_trans, rdeq_sym/ qed-.
 
-theorem rdeq_repl: ∀h,o,L1,L2. ∀T:term. L1 ≛[h, o, T] L2 →
-                   ∀K1. L1 ≛[h, o, T] K1 → ∀K2. L2 ≛[h, o, T] K2 → K1 ≛[h, o, T] K2.
+theorem rdeq_repl: ∀L1,L2. ∀T:term. L1 ≛[T] L2 →
+                   ∀K1. L1 ≛[T] K1 → ∀K2. L2 ≛[T] K2 → K1 ≛[T] K2.
 /3 width=3 by rdeq_canc_sn, rdeq_trans/ qed-.
 
 (* Negated properties *******************************************************)
 
 (* Note: auto works with /4 width=8/ so rdeq_canc_sn is preferred **********) 
 (* Basic_2A1: uses: lleq_nlleq_trans *)
-lemma rdeq_rdneq_trans: ∀h,o.∀T:term.∀L1,L. L1 ≛[h, o, T] L →
-                        ∀L2. (L ≛[h, o, T] L2 → ⊥) → (L1 ≛[h, o, T] L2 → ⊥).
+lemma rdeq_rdneq_trans: ∀T:term.∀L1,L. L1 ≛[T] L →
+                        ∀L2. (L ≛[T] L2 → ⊥) → (L1 ≛[T] L2 → ⊥).
 /3 width=3 by rdeq_canc_sn/ qed-.
 
 (* Basic_2A1: uses: nlleq_lleq_div *)
-lemma rdneq_rdeq_div: ∀h,o.∀T:term.∀L2,L. L2 ≛[h, o, T] L →
-                      ∀L1. (L1 ≛[h, o, T] L → ⊥) → (L1 ≛[h, o, T] L2 → ⊥).
+lemma rdneq_rdeq_div: ∀T:term.∀L2,L. L2 ≛[T] L →
+                      ∀L1. (L1 ≛[T] L → ⊥) → (L1 ≛[T] L2 → ⊥).
 /3 width=3 by rdeq_trans/ qed-.
 
-theorem rdneq_rdeq_canc_dx: ∀h,o,L1,L. ∀T:term. (L1 ≛[h, o, T] L → ⊥) →
-                            ∀L2. L2 ≛[h, o, T] L → L1 ≛[h, o, T] L2 → ⊥.
+theorem rdneq_rdeq_canc_dx: ∀L1,L. ∀T:term. (L1 ≛[T] L → ⊥) →
+                            ∀L2. L2 ≛[T] L → L1 ≛[T] L2 → ⊥.
 /3 width=3 by rdeq_trans/ qed-.
 
 (* Negated inversion lemmas *************************************************)
 
 (* Basic_2A1: uses: nlleq_inv_bind nlleq_inv_bind_O *)
-lemma rdneq_inv_bind: ∀h,o,p,I,L1,L2,V,T. (L1 ≛[h, o, ⓑ{p,I}V.T] L2 → ⊥) →
-                      (L1 ≛[h, o, V] L2 → ⊥) ∨ (L1.ⓑ{I}V ≛[h, o, T] L2.ⓑ{I}V → ⊥).
+lemma rdneq_inv_bind: ∀p,I,L1,L2,V,T. (L1 ≛[ⓑ{p,I}V.T] L2 → ⊥) →
+                      (L1 ≛[V] L2 → ⊥) ∨ (L1.ⓑ{I}V ≛[T] L2.ⓑ{I}V → ⊥).
 /3 width=2 by rnex_inv_bind, tdeq_dec/ qed-.
 
 (* Basic_2A1: uses: nlleq_inv_flat *)
-lemma rdneq_inv_flat: ∀h,o,I,L1,L2,V,T. (L1 ≛[h, o, ⓕ{I}V.T] L2 → ⊥) →
-                      (L1 ≛[h, o, V] L2 → ⊥) ∨ (L1 ≛[h, o, T] L2 → ⊥).
+lemma rdneq_inv_flat: ∀I,L1,L2,V,T. (L1 ≛[ⓕ{I}V.T] L2 → ⊥) →
+                      (L1 ≛[V] L2 → ⊥) ∨ (L1 ≛[T] L2 → ⊥).
 /3 width=2 by rnex_inv_flat, tdeq_dec/ qed-.
 
-lemma rdneq_inv_bind_void: ∀h,o,p,I,L1,L2,V,T. (L1 ≛[h, o, ⓑ{p,I}V.T] L2 → ⊥) →
-                           (L1 ≛[h, o, V] L2 → ⊥) ∨ (L1.ⓧ ≛[h, o, T] L2.ⓧ → ⊥).
+lemma rdneq_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, tdeq_dec/ qed-.
index ab3ebca9886a9233688001da30f8f48f11750404..5ef8bef9b99598b1fbf6535804815eaeb393225a 100644 (file)
 include "static_2/static/req_fsle.ma".
 include "static_2/static/rdeq.ma".
 
-(* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******)
+(* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***)
 
 (* Properties with syntactic equivalence on referred entries ****************)
 
-lemma req_rdeq: ∀h,o,L1,L2. ∀T:term. L1 ≡[T] L2 → L1 ≛[h, o, T] L2.
+lemma req_rdeq: ∀L1,L2. ∀T:term. L1 ≡[T] L2 → L1 ≛[T] L2.
 /2 width=3 by rex_co/ qed.
 
-lemma req_rdeq_trans: ∀h,o,L1,L. ∀T:term. L1 ≡[T] L →
-                      ∀L2. L ≛[h, o, T] L2 → L1 ≛[h, o, T] L2.
+lemma req_rdeq_trans: ∀L1,L. ∀T:term. L1 ≡[T] L →
+                      ∀L2. L ≛[T] L2 → L1 ≛[T] L2.
 /2 width=3 by req_rex_trans/ qed-.
index 13965b92d796f8f83a13d62dc4c62976babe9cc9..acfb6c4e8a4e9ea879edfee076d6d06225823844 100644 (file)
@@ -69,15 +69,15 @@ lemma req_inv_lref_bind_dx: ∀I2,K2,L1,i. L1 ≡[#↑i] K2.ⓘ{I2} →
 (* 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.
+                   ∀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.
+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
index 0eae38683e849dccd1b7b4f17c61e072f43a55bd..76f25cd40ee8ee92b8fa7d0bfdd959a66f12e2f7 100644 (file)
@@ -21,6 +21,6 @@ include "static_2/static/req.ma".
 
 (* 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 →
+                        ∀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-.
index d91c9905b96a5167d42a8cac456828325a07c232..efafbb90369a8f4f1ee1d426c165d163eb50da2e 100644 (file)
@@ -29,5 +29,5 @@ qed.
 (* Forward lemmas with free variables inclusion for restricted closures *****)
 
 lemma req_rex_trans: ∀R. req_transitive R →
-                     ∀L1,L,T. L1 ≡[T] L → ∀L2. L ⪤[R, T] L2 → L1 ⪤[R, T] L2.
+                     ∀L1,L,T. L1 ≡[T] L → ∀L2. L ⪤[R,T] L2 → L1 ⪤[R,T] L2.
 /4 width=16 by req_fsle_comp, rex_trans_fsle, rex_trans_next/ qed-.
index 515e24bef730445b73a2579592925d7808501a60..07ad9fe0587b434e67a5198c9ea22a2de3a7810b 100644 (file)
@@ -21,7 +21,7 @@ include "static_2/static/frees.ma".
 (* GENERIC EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ****)
 
 definition rex (R) (T): relation lenv ≝
-               λL1,L2. ∃∃f. L1 ⊢ 𝐅*⦃T⦄ ≘ f & L1 ⪤[cext2 R, cfull, f] L2.
+               λL1,L2. ∃∃f. L1 ⊢ 𝐅+⦃T⦄ ≘ f & L1 ⪤[cext2 R,cfull,f] L2.
 
 interpretation "generic extension on referred entries (local environment)"
    'Relation R T L1 L2 = (rex R T L1 L2).
@@ -30,33 +30,33 @@ definition R_confluent2_rex: relation4 (relation3 lenv term term)
                                        (relation3 lenv term term) … ≝
                              λR1,R2,RP1,RP2.
                              ∀L0,T0,T1. R1 L0 T0 T1 → ∀T2. R2 L0 T0 T2 →
-                             ∀L1. L0 ⪤[RP1, T0] L1 → ∀L2. L0 ⪤[RP2, T0] L2 →
+                             ∀L1. L0 ⪤[RP1,T0] L1 → ∀L2. L0 ⪤[RP2,T0] L2 →
                              ∃∃T. R2 L1 T1 T & R1 L2 T2 T.
 
 definition rex_confluent: relation … ≝
                           λR1,R2. 
-                          ∀K1,K,V1. K1 ⪤[R1, V1] K → ∀V. R1 K1 V1 V →
-                          ∀K2. K ⪤[R2, V] K2 → K ⪤[R2, V1] K2.
+                          ∀K1,K,V1. K1 ⪤[R1,V1] K → ∀V. R1 K1 V1 V →
+                          ∀K2. K ⪤[R2,V] K2 → K ⪤[R2,V1] K2.
 
 definition rex_transitive: relation3 ? (relation3 ?? term) … ≝
                            λR1,R2,R3.
-                           ∀K1,K,V1. K1 ⪤[R1, V1] K →
+                           ∀K1,K,V1. K1 ⪤[R1,V1] K →
                            ∀V. R1 K1 V1 V → ∀V2. R2 K V V2 → R3 K1 V1 V2.
 
 (* Basic inversion lemmas ***************************************************)
 
-lemma rex_inv_atom_sn (R): ∀Y2,T. ⋆ ⪤[R, T] Y2 → Y2 = ⋆.
+lemma rex_inv_atom_sn (R): ∀Y2,T. ⋆ ⪤[R,T] Y2 → Y2 = ⋆.
 #R #Y2 #T * /2 width=4 by sex_inv_atom1/
 qed-.
 
-lemma rex_inv_atom_dx (R): ∀Y1,T. Y1 ⪤[R, T] ⋆ → Y1 = ⋆.
+lemma rex_inv_atom_dx (R): ∀Y1,T. Y1 ⪤[R,T] ⋆ → Y1 = ⋆.
 #R #I #Y1 * /2 width=4 by sex_inv_atom2/
 qed-.
 
-lemma rex_inv_sort (R): ∀Y1,Y2,s. Y1 ⪤[R, ⋆s] Y2 →
-                        ∨∨ Y1 = ⋆ ∧ Y2 = ⋆
-                         | ∃∃I1,I2,L1,L2. L1 ⪤[R, ⋆s] L2 &
-                                          Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
+lemma rex_inv_sort (R):
+      ∀Y1,Y2,s. Y1 ⪤[R,⋆s] Y2 →
+      ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆
+       | ∃∃I1,I2,L1,L2. L1 ⪤[R,⋆s] L2 & Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
 #R * [ | #Y1 #I1 ] #Y2 #s * #f #H1 #H2
 [ lapply (sex_inv_atom1 … H2) -H2 /3 width=1 by or_introl, conj/
 | lapply (frees_inv_sort … H1) -H1 #Hf
@@ -66,12 +66,13 @@ lemma rex_inv_sort (R): ∀Y1,Y2,s. Y1 ⪤[R, ⋆s] Y2 →
 ]
 qed-.
 
-lemma rex_inv_zero (R): ∀Y1,Y2. Y1 ⪤[R, #0] Y2 →
-                        ∨∨ Y1 = ⋆ ∧ Y2 = ⋆
-                         | ∃∃I,L1,L2,V1,V2. L1 ⪤[R, V1] L2 & R L1 V1 V2 &
-                                            Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2
-                         | ∃∃f,I,L1,L2. 𝐈⦃f⦄ & L1 ⪤[cext2 R, cfull, f] L2 &
-                                        Y1 = L1.ⓤ{I} & Y2 = L2.ⓤ{I}.
+lemma rex_inv_zero (R):
+      ∀Y1,Y2. Y1 ⪤[R,#0] Y2 →
+      ∨∨ Y1 = ⋆ ∧ Y2 = ⋆
+       | ∃∃I,L1,L2,V1,V2. L1 ⪤[R,V1] L2 & R L1 V1 V2 &
+           Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2
+       | ∃∃f,I,L1,L2. 𝐈⦃f⦄ & L1 ⪤[cext2 R,cfull,f] L2 &
+           Y1 = L1.ⓤ{I} & Y2 = L2.ⓤ{I}.
 #R * [ | #Y1 * #I1 [ | #X ] ] #Y2 * #f #H1 #H2
 [ lapply (sex_inv_atom1 … H2) -H2 /3 width=1 by or3_intro0, conj/
 | elim (frees_inv_unit … H1) -H1 #g #HX #H destruct
@@ -84,10 +85,10 @@ lemma rex_inv_zero (R): ∀Y1,Y2. Y1 ⪤[R, #0] Y2 →
 ]
 qed-.
 
-lemma rex_inv_lref (R): ∀Y1,Y2,i. Y1 ⪤[R, #↑i] Y2 →
-                        ∨∨ Y1 = ⋆ ∧ Y2 = ⋆
-                         | ∃∃I1,I2,L1,L2. L1 ⪤[R, #i] L2 &
-                                          Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
+lemma rex_inv_lref (R):
+      ∀Y1,Y2,i. Y1 ⪤[R,#↑i] Y2 →
+      ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆
+       | ∃∃I1,I2,L1,L2. L1 ⪤[R,#i] L2 & Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
 #R * [ | #Y1 #I1 ] #Y2 #i * #f #H1 #H2
 [ lapply (sex_inv_atom1 … H2) -H2 /3 width=1 by or_introl, conj/
 | elim (frees_inv_lref … H1) -H1 #g #Hg #H destruct
@@ -96,10 +97,10 @@ lemma rex_inv_lref (R): ∀Y1,Y2,i. Y1 ⪤[R, #↑i] Y2 →
 ]
 qed-.
 
-lemma rex_inv_gref (R): ∀Y1,Y2,l. Y1 ⪤[R, §l] Y2 →
-                        ∨∨ Y1 = ⋆ ∧ Y2 = ⋆
-                         | ∃∃I1,I2,L1,L2. L1 ⪤[R, §l] L2 &
-                                          Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
+lemma rex_inv_gref (R):
+      ∀Y1,Y2,l. Y1 ⪤[R,§l] Y2 →
+      ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆
+       | ∃∃I1,I2,L1,L2. L1 ⪤[R,§l] L2 & Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
 #R * [ | #Y1 #I1 ] #Y2 #l * #f #H1 #H2
 [ lapply (sex_inv_atom1 … H2) -H2 /3 width=1 by or_introl, conj/
 | lapply (frees_inv_gref … H1) -H1 #Hf
@@ -110,40 +111,44 @@ lemma rex_inv_gref (R): ∀Y1,Y2,l. Y1 ⪤[R, §l] Y2 →
 qed-.
 
 (* Basic_2A1: uses: llpx_sn_inv_bind llpx_sn_inv_bind_O *)
-lemma rex_inv_bind (R): ∀p,I,L1,L2,V1,V2,T. L1 ⪤[R, ⓑ{p,I}V1.T] L2 → R L1 V1 V2 →
-                        ∧∧ L1 ⪤[R, V1] L2 & L1.ⓑ{I}V1 ⪤[R, T] L2.ⓑ{I}V2.
+lemma rex_inv_bind (R):
+      ∀p,I,L1,L2,V1,V2,T. L1 ⪤[R,ⓑ{p,I}V1.T] L2 → R L1 V1 V2 →
+      ∧∧ L1 ⪤[R,V1] L2 & L1.ⓑ{I}V1 ⪤[R,T] L2.ⓑ{I}V2.
 #R #p #I #L1 #L2 #V1 #V2 #T * #f #Hf #HL #HV elim (frees_inv_bind … Hf) -Hf
 /6 width=6 by sle_sex_trans, sex_inv_tl, ext2_pair, sor_inv_sle_dx, sor_inv_sle_sn, ex2_intro, conj/
 qed-.
 
 (* Basic_2A1: uses: llpx_sn_inv_flat *)
-lemma rex_inv_flat (R): ∀I,L1,L2,V,T. L1 ⪤[R, ⓕ{I}V.T] L2 →
-                        ∧∧ L1 ⪤[R, V] L2 & L1 ⪤[R, T] L2.
+lemma rex_inv_flat (R):
+      ∀I,L1,L2,V,T. L1 ⪤[R,ⓕ{I}V.T] L2 →
+      ∧∧ L1 ⪤[R,V] L2 & L1 ⪤[R,T] L2.
 #R #I #L1 #L2 #V #T * #f #Hf #HL elim (frees_inv_flat … Hf) -Hf
 /5 width=6 by sle_sex_trans, sor_inv_sle_dx, sor_inv_sle_sn, ex2_intro, conj/
 qed-.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma rex_inv_sort_bind_sn (R): ∀I1,K1,L2,s. K1.ⓘ{I1} ⪤[R, ⋆s] L2 →
-                                ∃∃I2,K2. K1 ⪤[R, ⋆s] K2 & L2 = K2.ⓘ{I2}.
+lemma rex_inv_sort_bind_sn (R):
+      ∀I1,K1,L2,s. K1.ⓘ{I1} ⪤[R,⋆s] L2 →
+      ∃∃I2,K2. K1 ⪤[R,⋆s] K2 & L2 = K2.ⓘ{I2}.
 #R #I1 #K1 #L2 #s #H elim (rex_inv_sort … H) -H *
 [ #H destruct
 | #Z1 #I2 #Y1 #K2 #Hs #H1 #H2 destruct /2 width=4 by ex2_2_intro/
 ]
 qed-.
 
-lemma rex_inv_sort_bind_dx (R): ∀I2,K2,L1,s. L1 ⪤[R, ⋆s] K2.ⓘ{I2} →
-                                ∃∃I1,K1. K1 ⪤[R, ⋆s] K2 & L1 = K1.ⓘ{I1}.
+lemma rex_inv_sort_bind_dx (R):
+      ∀I2,K2,L1,s. L1 ⪤[R,⋆s] K2.ⓘ{I2} →
+      ∃∃I1,K1. K1 ⪤[R,⋆s] K2 & L1 = K1.ⓘ{I1}.
 #R #I2 #K2 #L1 #s #H elim (rex_inv_sort … H) -H *
 [ #_ #H destruct
 | #I1 #Z2 #K1 #Y2 #Hs #H1 #H2 destruct /2 width=4 by ex2_2_intro/
 ]
 qed-.
 
-lemma rex_inv_zero_pair_sn (R): ∀I,L2,K1,V1. K1.ⓑ{I}V1 ⪤[R, #0] L2 →
-                                ∃∃K2,V2. K1 ⪤[R, V1] K2 & R K1 V1 V2 &
-                                         L2 = K2.ⓑ{I}V2.
+lemma rex_inv_zero_pair_sn (R):
+      ∀I,L2,K1,V1. K1.ⓑ{I}V1 ⪤[R,#0] L2 →
+      ∃∃K2,V2. K1 ⪤[R,V1] K2 & R K1 V1 V2 & L2 = K2.ⓑ{I}V2.
 #R #I #L2 #K1 #V1 #H elim (rex_inv_zero … H) -H *
 [ #H destruct
 | #Z #Y1 #K2 #X1 #V2 #HK12 #HV12 #H1 #H2 destruct
@@ -152,9 +157,9 @@ lemma rex_inv_zero_pair_sn (R): ∀I,L2,K1,V1. K1.ⓑ{I}V1 ⪤[R, #0] L2 →
 ]
 qed-.
 
-lemma rex_inv_zero_pair_dx (R): ∀I,L1,K2,V2. L1 ⪤[R, #0] K2.ⓑ{I}V2 →
-                                ∃∃K1,V1. K1 ⪤[R, V1] K2 & R K1 V1 V2 &
-                                         L1 = K1.ⓑ{I}V1.
+lemma rex_inv_zero_pair_dx (R):
+      ∀I,L1,K2,V2. L1 ⪤[R,#0] K2.ⓑ{I}V2 →
+      ∃∃K1,V1. K1 ⪤[R,V1] K2 & R K1 V1 V2 & L1 = K1.ⓑ{I}V1.
 #R #I #L1 #K2 #V2 #H elim (rex_inv_zero … H) -H *
 [ #_ #H destruct
 | #Z #K1 #Y2 #V1 #X2 #HK12 #HV12 #H1 #H2 destruct
@@ -163,9 +168,9 @@ lemma rex_inv_zero_pair_dx (R): ∀I,L1,K2,V2. L1 ⪤[R, #0] K2.ⓑ{I}V2 →
 ]
 qed-.
 
-lemma rex_inv_zero_unit_sn (R): ∀I,K1,L2. K1.ⓤ{I} ⪤[R, #0] L2 →
-                                ∃∃f,K2. 𝐈⦃f⦄ & K1 ⪤[cext2 R, cfull, f] K2 &
-                                        L2 = K2.ⓤ{I}.
+lemma rex_inv_zero_unit_sn (R):
+      ∀I,K1,L2. K1.ⓤ{I} ⪤[R,#0] L2 →
+      ∃∃f,K2. 𝐈⦃f⦄ & K1 ⪤[cext2 R,cfull,f] K2 & L2 = K2.ⓤ{I}.
 #R #I #K1 #L2 #H elim (rex_inv_zero … H) -H *
 [ #H destruct
 | #Z #Y1 #Y2 #X1 #X2 #_ #_ #H destruct
@@ -173,9 +178,9 @@ lemma rex_inv_zero_unit_sn (R): ∀I,K1,L2. K1.ⓤ{I} ⪤[R, #0] L2 →
 ]
 qed-.
 
-lemma rex_inv_zero_unit_dx (R): ∀I,L1,K2. L1 ⪤[R, #0] K2.ⓤ{I} →
-                                ∃∃f,K1. 𝐈⦃f⦄ & K1 ⪤[cext2 R, cfull, f] K2 &
-                                        L1 = K1.ⓤ{I}.
+lemma rex_inv_zero_unit_dx (R):
+      ∀I,L1,K2. L1 ⪤[R,#0] K2.ⓤ{I} →
+      ∃∃f,K1. 𝐈⦃f⦄ & K1 ⪤[cext2 R,cfull,f] K2 & L1 = K1.ⓤ{I}.
 #R #I #L1 #K2 #H elim (rex_inv_zero … H) -H *
 [ #_ #H destruct
 | #Z #Y1 #Y2 #X1 #X2 #_ #_ #_ #H destruct
@@ -183,32 +188,36 @@ lemma rex_inv_zero_unit_dx (R): ∀I,L1,K2. L1 ⪤[R, #0] K2.ⓤ{I} →
 ]
 qed-.
 
-lemma rex_inv_lref_bind_sn (R): ∀I1,K1,L2,i. K1.ⓘ{I1} ⪤[R, #↑i] L2 →
-                                ∃∃I2,K2. K1 ⪤[R, #i] K2 & L2 = K2.ⓘ{I2}.
+lemma rex_inv_lref_bind_sn (R):
+      ∀I1,K1,L2,i. K1.ⓘ{I1} ⪤[R,#↑i] L2 →
+      ∃∃I2,K2. K1 ⪤[R,#i] K2 & L2 = K2.ⓘ{I2}.
 #R #I1 #K1 #L2 #i #H elim (rex_inv_lref … H) -H *
 [ #H destruct
 | #Z1 #I2 #Y1 #K2 #Hi #H1 #H2 destruct /2 width=4 by ex2_2_intro/
 ]
 qed-.
 
-lemma rex_inv_lref_bind_dx (R): ∀I2,K2,L1,i. L1 ⪤[R, #↑i] K2.ⓘ{I2} →
-                                ∃∃I1,K1. K1 ⪤[R, #i] K2 & L1 = K1.ⓘ{I1}.
+lemma rex_inv_lref_bind_dx (R):
+      ∀I2,K2,L1,i. L1 ⪤[R,#↑i] K2.ⓘ{I2} →
+      ∃∃I1,K1. K1 ⪤[R,#i] K2 & L1 = K1.ⓘ{I1}.
 #R #I2 #K2 #L1 #i #H elim (rex_inv_lref … H) -H *
 [ #_ #H destruct
 | #I1 #Z2 #K1 #Y2 #Hi #H1 #H2 destruct /2 width=4 by ex2_2_intro/
 ]
 qed-.
 
-lemma rex_inv_gref_bind_sn (R): ∀I1,K1,L2,l. K1.ⓘ{I1} ⪤[R, §l] L2 →
-                                ∃∃I2,K2. K1 ⪤[R, §l] K2 & L2 = K2.ⓘ{I2}.
+lemma rex_inv_gref_bind_sn (R):
+      ∀I1,K1,L2,l. K1.ⓘ{I1} ⪤[R,§l] L2 →
+      ∃∃I2,K2. K1 ⪤[R,§l] K2 & L2 = K2.ⓘ{I2}.
 #R #I1 #K1 #L2 #l #H elim (rex_inv_gref … H) -H *
 [ #H destruct
 | #Z1 #I2 #Y1 #K2 #Hl #H1 #H2 destruct /2 width=4 by ex2_2_intro/
 ]
 qed-.
 
-lemma rex_inv_gref_bind_dx (R): ∀I2,K2,L1,l. L1 ⪤[R, §l] K2.ⓘ{I2} →
-                                ∃∃I1,K1. K1 ⪤[R, §l] K2 & L1 = K1.ⓘ{I1}.
+lemma rex_inv_gref_bind_dx (R):
+      ∀I2,K2,L1,l. L1 ⪤[R,§l] K2.ⓘ{I2} →
+      ∃∃I1,K1. K1 ⪤[R,§l] K2 & L1 = K1.ⓘ{I1}.
 #R #I2 #K2 #L1 #l #H elim (rex_inv_gref … H) -H *
 [ #_ #H destruct
 | #I1 #Z2 #K1 #Y2 #Hl #H1 #H2 destruct /2 width=4 by ex2_2_intro/
@@ -217,32 +226,34 @@ qed-.
 
 (* Basic forward lemmas *****************************************************)
 
-lemma rex_fwd_zero_pair (R): ∀I,K1,K2,V1,V2.
-                             K1.ⓑ{I}V1 ⪤[R, #0] K2.ⓑ{I}V2 → K1 ⪤[R, V1] K2.
+lemma rex_fwd_zero_pair (R):
+      ∀I,K1,K2,V1,V2. K1.ⓑ{I}V1 ⪤[R,#0] K2.ⓑ{I}V2 → K1 ⪤[R,V1] K2.
 #R #I #K1 #K2 #V1 #V2 #H
 elim (rex_inv_zero_pair_sn … H) -H #Y #X #HK12 #_ #H destruct //
 qed-.
 
 (* Basic_2A1: uses: llpx_sn_fwd_pair_sn llpx_sn_fwd_bind_sn llpx_sn_fwd_flat_sn *)
-lemma rex_fwd_pair_sn (R): ∀I,L1,L2,V,T. L1 ⪤[R, ②{I}V.T] L2 → L1 ⪤[R, V] L2.
+lemma rex_fwd_pair_sn (R): ∀I,L1,L2,V,T. L1 ⪤[R,②{I}V.T] L2 → L1 ⪤[R,V] L2.
 #R * [ #p ] #I #L1 #L2 #V #T * #f #Hf #HL
 [ elim (frees_inv_bind … Hf) | elim (frees_inv_flat … Hf) ] -Hf
 /4 width=6 by sle_sex_trans, sor_inv_sle_sn, ex2_intro/
 qed-.
 
 (* Basic_2A1: uses: llpx_sn_fwd_bind_dx llpx_sn_fwd_bind_O_dx *)
-lemma rex_fwd_bind_dx (R): ∀p,I,L1,L2,V1,V2,T. L1 ⪤[R, ⓑ{p,I}V1.T] L2 →
-                           R L1 V1 V2 → L1.ⓑ{I}V1 ⪤[R, T] L2.ⓑ{I}V2.
+lemma rex_fwd_bind_dx (R):
+      ∀p,I,L1,L2,V1,V2,T. L1 ⪤[R,ⓑ{p,I}V1.T] L2 →
+      R L1 V1 V2 → L1.ⓑ{I}V1 ⪤[R,T] L2.ⓑ{I}V2.
 #R #p #I #L1 #L2 #V1 #V2 #T #H #HV elim (rex_inv_bind … H HV) -H -HV //
 qed-.
 
 (* Basic_2A1: uses: llpx_sn_fwd_flat_dx *)
-lemma rex_fwd_flat_dx (R): ∀I,L1,L2,V,T. L1 ⪤[R, ⓕ{I}V.T] L2 → L1 ⪤[R, T] L2.
+lemma rex_fwd_flat_dx (R): ∀I,L1,L2,V,T. L1 ⪤[R,ⓕ{I}V.T] L2 → L1 ⪤[R,T] L2.
 #R #I #L1 #L2 #V #T #H elim (rex_inv_flat … H) -H //
 qed-.
 
-lemma rex_fwd_dx (R): ∀I2,L1,K2,T. L1 ⪤[R, T] K2.ⓘ{I2} →
-                      ∃∃I1,K1. L1 = K1.ⓘ{I1}.
+lemma rex_fwd_dx (R):
+      ∀I2,L1,K2,T. L1 ⪤[R,T] K2.ⓘ{I2} →
+      ∃∃I1,K1. L1 = K1.ⓘ{I1}.
 #R #I2 #L1 #K2 #T * #f elim (pn_split f) * #g #Hg #_ #Hf destruct
 [ elim (sex_inv_push2 … Hf) | elim (sex_inv_next2 … Hf) ] -Hf #I1 #K1 #_ #_ #H destruct
 /2 width=3 by ex1_2_intro/
@@ -250,63 +261,66 @@ qed-.
 
 (* Basic properties *********************************************************)
 
-lemma rex_atom (R): ∀I. ⋆ ⪤[R, ⓪{I}] ⋆.
+lemma rex_atom (R): ∀I. ⋆ ⪤[R,⓪{I}] ⋆.
 #R * /3 width=3 by frees_sort, frees_atom, frees_gref, sex_atom, ex2_intro/
 qed.
 
-lemma rex_sort (R): ∀I1,I2,L1,L2,s.
-                    L1 ⪤[R, ⋆s] L2 → L1.ⓘ{I1} ⪤[R, ⋆s] L2.ⓘ{I2}.
+lemma rex_sort (R):
+      ∀I1,I2,L1,L2,s. L1 ⪤[R,⋆s] L2 → L1.ⓘ{I1} ⪤[R,⋆s] L2.ⓘ{I2}.
 #R #I1 #I2 #L1 #L2 #s * #f #Hf #H12
 lapply (frees_inv_sort … Hf) -Hf
 /4 width=3 by frees_sort, sex_push, isid_push, ex2_intro/
 qed.
 
-lemma rex_pair (R): ∀I,L1,L2,V1,V2. L1 ⪤[R, V1] L2 →
-                    R L1 V1 V2 → L1.ⓑ{I}V1 ⪤[R, #0] L2.ⓑ{I}V2.
+lemma rex_pair (R):
+      ∀I,L1,L2,V1,V2. L1 ⪤[R,V1] L2 →
+      R L1 V1 V2 → L1.ⓑ{I}V1 ⪤[R,#0] L2.ⓑ{I}V2.
 #R #I1 #I2 #L1 #L2 #V1 *
 /4 width=3 by ext2_pair, frees_pair, sex_next, ex2_intro/
 qed.
 
-lemma rex_unit (R): ∀f,I,L1,L2. 𝐈⦃f⦄ → L1 ⪤[cext2 R, cfull, f] L2 →
-                    L1.ⓤ{I} ⪤[R, #0] L2.ⓤ{I}.
+lemma rex_unit (R):
+      ∀f,I,L1,L2. 𝐈⦃f⦄ → L1 ⪤[cext2 R,cfull,f] L2 →
+      L1.ⓤ{I} ⪤[R,#0] L2.ⓤ{I}.
 /4 width=3 by frees_unit, sex_next, ext2_unit, ex2_intro/ qed.
 
-lemma rex_lref (R): ∀I1,I2,L1,L2,i.
-                    L1 ⪤[R, #i] L2 → L1.ⓘ{I1} ⪤[R, #↑i] L2.ⓘ{I2}.
+lemma rex_lref (R):
+      ∀I1,I2,L1,L2,i. L1 ⪤[R,#i] L2 → L1.ⓘ{I1} ⪤[R,#↑i] L2.ⓘ{I2}.
 #R #I1 #I2 #L1 #L2 #i * /3 width=3 by sex_push, frees_lref, ex2_intro/
 qed.
 
-lemma rex_gref (R): ∀I1,I2,L1,L2,l.
-                    L1 ⪤[R, §l] L2 → L1.ⓘ{I1} ⪤[R, §l] L2.ⓘ{I2}.
+lemma rex_gref (R):
+      ∀I1,I2,L1,L2,l. L1 ⪤[R,§l] L2 → L1.ⓘ{I1} ⪤[R,§l] L2.ⓘ{I2}.
 #R #I1 #I2 #L1 #L2 #l * #f #Hf #H12
 lapply (frees_inv_gref … Hf) -Hf
 /4 width=3 by frees_gref, sex_push, isid_push, ex2_intro/
 qed.
 
-lemma rex_bind_repl_dx (R): ∀I,I1,L1,L2,T.
-                            L1.ⓘ{I} ⪤[R, T] L2.ⓘ{I1} →
-                            ∀I2. cext2 R L1 I I2 →
-                            L1.ⓘ{I} ⪤[R, T] L2.ⓘ{I2}.
+lemma rex_bind_repl_dx (R):
+      ∀I,I1,L1,L2,T. L1.ⓘ{I} ⪤[R,T] L2.ⓘ{I1} →
+      ∀I2. cext2 R L1 I I2 → L1.ⓘ{I} ⪤[R,T] L2.ⓘ{I2}.
 #R #I #I1 #L1 #L2 #T * #f #Hf #HL12 #I2 #HR
 /3 width=5 by sex_pair_repl, ex2_intro/
 qed-.
 
 (* Basic_2A1: uses: llpx_sn_co *)
-lemma rex_co (R1) (R2): (∀L,T1,T2. R1 L T1 T2 → R2 L T1 T2) →
-                        ∀L1,L2,T. L1 ⪤[R1, T] L2 → L1 ⪤[R2, T] L2.
+lemma rex_co (R1) (R2):
+      (∀L,T1,T2. R1 L T1 T2 → R2 L T1 T2) →
+      ∀L1,L2,T. L1 ⪤[R1,T] L2 → L1 ⪤[R2,T] L2.
 #R1 #R2 #HR #L1 #L2 #T * /5 width=7 by sex_co, cext2_co, ex2_intro/
 qed-.
 
-lemma rex_isid (R1) (R2): ∀L1,L2,T1,T2.
-                          (∀f. L1 ⊢ 𝐅*⦃T1⦄ ≘ f → 𝐈⦃f⦄) →
-                          (∀f. 𝐈⦃f⦄ → L1 ⊢ 𝐅*⦃T2⦄ ≘ f) →
-                          L1 ⪤[R1, T1] L2 → L1 ⪤[R2, T2] L2.
+lemma rex_isid (R1) (R2):
+      ∀L1,L2,T1,T2.
+      (∀f. L1 ⊢ 𝐅+⦃T1⦄ ≘ f → 𝐈⦃f⦄) →
+      (∀f. 𝐈⦃f⦄ → L1 ⊢ 𝐅+⦃T2⦄ ≘ f) →
+      L1 ⪤[R1,T1] L2 → L1 ⪤[R2,T2] L2.
 #R1 #R2 #L1 #L2 #T1 #T2 #H1 #H2 *
 /4 width=7 by sex_co_isid, ex2_intro/
 qed-.
 
 lemma rex_unit_sn (R1) (R2): 
-                  ∀I,K1,L2. K1.ⓤ{I} ⪤[R1, #0] L2 → K1.ⓤ{I} ⪤[R2, #0] L2.
+      ∀I,K1,L2. K1.ⓤ{I} ⪤[R1,#0] L2 → K1.ⓤ{I} ⪤[R2,#0] L2.
 #R1 #R2 #I #K1 #L2 #H
 elim (rex_inv_zero_unit_sn … H) -H #f #K2 #Hf #HK12 #H destruct
 /3 width=7 by rex_unit, sex_co_isid/
index 60e335d57caf2dde6e773d068f689010b81e3efd..f3421b04c8770b3b9b57b1fb6e2ad4fd465d79f2 100644 (file)
@@ -20,29 +20,30 @@ include "static_2/static/rex.ma".
 (* GENERIC EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ****)
 
 definition f_dedropable_sn: predicate (relation3 lenv term term) ≝
-                            λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 →
-                            ∀K2,T. K1 ⪤[R, T] K2 → ∀U. ⬆*[f] T ≘ U →
-                            ∃∃L2. L1 ⪤[R, U] L2 & ⬇*[b, f] L2 ≘ K2 & L1 ≡[f] L2.
+                            λR. ∀b,f,L1,K1. ⬇*[b,f] L1 ≘ K1 →
+                            ∀K2,T. K1 ⪤[R,T] K2 → ∀U. ⬆*[f] T ≘ U →
+                            ∃∃L2. L1 ⪤[R,U] L2 & ⬇*[b,f] L2 ≘ K2 & L1 ≡[f] L2.
 
 definition f_dropable_sn: predicate (relation3 lenv term term) ≝
-                          λR. ∀b,f,L1,K1. ⬇*[b, f] L1 ≘ K1 → 𝐔⦃f⦄ →
-                          ∀L2,U. L1 ⪤[R, U] L2 → ∀T. ⬆*[f] T ≘ U →
-                          ∃∃K2. K1 ⪤[R, T] K2 & ⬇*[b, f] L2 ≘ K2.
+                          λR. ∀b,f,L1,K1. ⬇*[b,f] L1 ≘ K1 → 𝐔⦃f⦄ →
+                          ∀L2,U. L1 ⪤[R,U] L2 → ∀T. ⬆*[f] T ≘ U →
+                          ∃∃K2. K1 ⪤[R,T] K2 & ⬇*[b,f] L2 ≘ K2.
 
 definition f_dropable_dx: predicate (relation3 lenv term term) ≝
-                          λR. ∀L1,L2,U. L1 ⪤[R, U] L2 →
-                          ∀b,f,K2. ⬇*[b, f] L2 ≘ K2 → 𝐔⦃f⦄ → ∀T. ⬆*[f] T ≘ U →
-                          ∃∃K1. ⬇*[b, f] L1 ≘ K1 & K1 ⪤[R, T] K2.
+                          λR. ∀L1,L2,U. L1 ⪤[R,U] L2 →
+                          ∀b,f,K2. ⬇*[b,f] L2 ≘ K2 → 𝐔⦃f⦄ → ∀T. ⬆*[f] T ≘ U →
+                          ∃∃K1. ⬇*[b,f] L1 ≘ K1 & K1 ⪤[R,T] K2.
 
 definition f_transitive_next: relation3 … ≝ λR1,R2,R3.
-                              ∀f,L,T. L ⊢ 𝐅*⦃T⦄ ≘ f →
+                              ∀f,L,T. L ⊢ 𝐅+⦃T⦄ ≘ f →
                               ∀g,I,K,n. ⬇*[n] L ≘ K.ⓘ{I} → ↑g = ⫱*[n] f →
                               sex_transitive (cext2 R1) (cext2 R2) (cext2 R3) (cext2 R1) cfull g K I.
 
 (* Properties with generic slicing for local environments *******************)
 
-lemma rex_liftable_dedropable_sn: ∀R. (∀L. reflexive ? (R L)) →
-                                  d_liftable2_sn … lifts R → f_dedropable_sn R.
+lemma rex_liftable_dedropable_sn (R):
+      (∀L. reflexive ? (R L)) →
+      d_liftable2_sn … lifts R → f_dedropable_sn R.
 #R #H1R #H2R #b #f #L1 #K1 #HLK1 #K2 #T * #f1 #Hf1 #HK12 #U #HTU
 elim (frees_total L1 U) #f2 #Hf2
 lapply (frees_fwd_coafter … Hf2 … HLK1 … HTU … Hf1) -HTU #Hf
@@ -50,7 +51,8 @@ elim (sex_liftable_co_dedropable_sn … HLK1 … HK12 … Hf) -f1 -K1
 /3 width=6 by cext2_d_liftable2_sn, cfull_lift_sn, ext2_refl, ex3_intro, ex2_intro/
 qed-.
 
-lemma rex_trans_next: ∀R1,R2,R3. rex_transitive R1 R2 R3 → f_transitive_next R1 R2 R3.
+lemma rex_trans_next (R1) (R2) (R3):
+      rex_transitive R1 R2 R3 → f_transitive_next R1 R2 R3.
 #R1 #R2 #R3 #HR #f #L1 #T #Hf #g #I1 #K1 #n #HLK #Hgf #I #H
 generalize in match HLK; -HLK elim H -I1 -I
 [ #I #_ #L2 #_ #I2 #H
@@ -67,7 +69,7 @@ qed.
 
 (* Basic_2A1: uses: llpx_sn_inv_lift_le llpx_sn_inv_lift_be llpx_sn_inv_lift_ge *)
 (* Basic_2A1: was: llpx_sn_drop_conf_O *)
-lemma rex_dropable_sn: ∀R. f_dropable_sn R.
+lemma rex_dropable_sn (R): f_dropable_sn R.
 #R #b #f #L1 #K1 #HLK1 #H1f #L2 #U * #f2 #Hf2 #HL12 #T #HTU
 elim (frees_total K1 T) #f1 #Hf1
 lapply (frees_fwd_coafter … Hf2 … HLK1 … HTU … Hf1) -HTU #H2f
@@ -77,7 +79,7 @@ qed-.
 
 (* Basic_2A1: was: llpx_sn_drop_trans_O *)
 (* Note: the proof might be simplified *)
-lemma rex_dropable_dx: ∀R. f_dropable_dx R.
+lemma rex_dropable_dx (R): f_dropable_dx R.
 #R #L1 #L2 #U * #f2 #Hf2 #HL12 #b #f #K2 #HLK2 #H1f #T #HTU
 elim (drops_isuni_ex … H1f L1) #K1 #HLK1
 elim (frees_total K1 T) #f1 #Hf1
@@ -87,48 +89,53 @@ elim (sex_co_dropable_dx … HL12 … HLK2 … H2f) -L2
 qed-.
 
 (* Basic_2A1: uses: llpx_sn_inv_lift_O *)
-lemma rex_inv_lifts_bi: ∀R,L1,L2,U. L1 ⪤[R, U] L2 → ∀b,f. 𝐔⦃f⦄ → 
-                        ∀K1,K2. ⬇*[b, f] L1 ≘ K1 → ⬇*[b, f] L2 ≘ K2 →
-                        ∀T. ⬆*[f] T ≘ U → K1 ⪤[R, T] K2.
+lemma rex_inv_lifts_bi (R):
+      ∀L1,L2,U. L1 ⪤[R,U] L2 → ∀b,f. 𝐔⦃f⦄ → 
+      ∀K1,K2. ⬇*[b,f] L1 ≘ K1 → ⬇*[b,f] L2 ≘ K2 →
+      ∀T. ⬆*[f] T ≘ U → K1 ⪤[R,T] K2.
 #R #L1 #L2 #U #HL12 #b #f #Hf #K1 #K2 #HLK1 #HLK2 #T #HTU
 elim (rex_dropable_sn … HLK1 … HL12 … HTU) -L1 -U // #Y #HK12 #HY
 lapply (drops_mono … HY … HLK2) -b -f -L2 #H destruct //
 qed-.
 
-lemma rex_inv_lref_pair_sn: ∀R,L1,L2,i. L1 ⪤[R, #i] L2 → ∀I,K1,V1. ⬇*[i] L1 ≘ K1.ⓑ{I}V1 →
-                            ∃∃K2,V2. ⬇*[i] L2 ≘ K2.ⓑ{I}V2 & K1 ⪤[R, V1] K2 & R K1 V1 V2.
+lemma rex_inv_lref_pair_sn (R):
+      ∀L1,L2,i. L1 ⪤[R,#i] L2 → ∀I,K1,V1. ⬇*[i] L1 ≘ K1.ⓑ{I}V1 →
+      ∃∃K2,V2. ⬇*[i] L2 ≘ K2.ⓑ{I}V2 & K1 ⪤[R,V1] K2 & R K1 V1 V2.
 #R #L1 #L2 #i #HL12 #I #K1 #V1 #HLK1 elim (rex_dropable_sn … HLK1 … HL12 (#0)) -HLK1 -HL12 //
 #Y #HY #HLK2 elim (rex_inv_zero_pair_sn … HY) -HY
 #K2 #V2 #HK12 #HV12 #H destruct /2 width=5 by ex3_2_intro/
 qed-.
 
-lemma rex_inv_lref_pair_dx: ∀R,L1,L2,i. L1 ⪤[R, #i] L2 → ∀I,K2,V2. ⬇*[i] L2 ≘ K2.ⓑ{I}V2 →
-                            ∃∃K1,V1. ⬇*[i] L1 ≘ K1.ⓑ{I}V1 & K1 ⪤[R, V1] K2 & R K1 V1 V2.
+lemma rex_inv_lref_pair_dx (R):
+      ∀L1,L2,i. L1 ⪤[R,#i] L2 → ∀I,K2,V2. ⬇*[i] L2 ≘ K2.ⓑ{I}V2 →
+      ∃∃K1,V1. ⬇*[i] L1 ≘ K1.ⓑ{I}V1 & K1 ⪤[R,V1] K2 & R K1 V1 V2.
 #R #L1 #L2 #i #HL12 #I #K2 #V2 #HLK2 elim (rex_dropable_dx … HL12 … HLK2 … (#0)) -HLK2 -HL12 //
 #Y #HLK1 #HY elim (rex_inv_zero_pair_dx … HY) -HY
 #K1 #V1 #HK12 #HV12 #H destruct /2 width=5 by ex3_2_intro/
 qed-.
 
 lemma rex_inv_lref_pair_bi (R) (L1) (L2) (i):
-                           L1 ⪤[R, #i] L2 →
-                           ∀I1,K1,V1. ⬇*[i] L1 ≘ K1.ⓑ{I1}V1 →
-                           ∀I2,K2,V2. ⬇*[i] L2 ≘ K2.ⓑ{I2}V2 →
-                           ∧∧ K1 ⪤[R, V1] K2 & R K1 V1 V2 & I1 = I2.
+      L1 ⪤[R,#i] L2 →
+      ∀I1,K1,V1. ⬇*[i] L1 ≘ K1.ⓑ{I1}V1 →
+      ∀I2,K2,V2. ⬇*[i] L2 ≘ K2.ⓑ{I2}V2 →
+      ∧∧ K1 ⪤[R,V1] K2 & R K1 V1 V2 & I1 = I2.
 #R #L1 #L2 #i #H12 #I1 #K1 #V1 #H1 #I2 #K2 #V2 #H2
 elim (rex_inv_lref_pair_sn … H12 … H1) -L1 #Y2 #X2 #HLY2 #HK12 #HV12
 lapply (drops_mono … HLY2 … H2) -HLY2 -H2 #H destruct
 /2 width=1 by and3_intro/
 qed-.
 
-lemma rex_inv_lref_unit_sn: ∀R,L1,L2,i. L1 ⪤[R, #i] L2 → ∀I,K1. ⬇*[i] L1 ≘ K1.ⓤ{I} →
-                            ∃∃f,K2. ⬇*[i] L2 ≘ K2.ⓤ{I} & K1 ⪤[cext2 R, cfull, f] K2 & 𝐈⦃f⦄.
+lemma rex_inv_lref_unit_sn (R):
+      ∀L1,L2,i. L1 ⪤[R,#i] L2 → ∀I,K1. ⬇*[i] L1 ≘ K1.ⓤ{I} →
+      ∃∃f,K2. ⬇*[i] L2 ≘ K2.ⓤ{I} & K1 ⪤[cext2 R,cfull,f] K2 & 𝐈⦃f⦄.
 #R #L1 #L2 #i #HL12 #I #K1 #HLK1 elim (rex_dropable_sn … HLK1 … HL12 (#0)) -HLK1 -HL12 //
 #Y #HY #HLK2 elim (rex_inv_zero_unit_sn … HY) -HY
 #f #K2 #Hf #HK12 #H destruct /2 width=5 by ex3_2_intro/
 qed-.
 
-lemma rex_inv_lref_unit_dx: ∀R,L1,L2,i. L1 ⪤[R, #i] L2 → ∀I,K2. ⬇*[i] L2 ≘ K2.ⓤ{I} →
-                            ∃∃f,K1. ⬇*[i] L1 ≘ K1.ⓤ{I} & K1 ⪤[cext2 R, cfull, f] K2 & 𝐈⦃f⦄.
+lemma rex_inv_lref_unit_dx (R):
+      ∀L1,L2,i. L1 ⪤[R,#i] L2 → ∀I,K2. ⬇*[i] L2 ≘ K2.ⓤ{I} →
+      ∃∃f,K1. ⬇*[i] L1 ≘ K1.ⓤ{I} & K1 ⪤[cext2 R,cfull,f] K2 & 𝐈⦃f⦄.
 #R #L1 #L2 #i #HL12 #I #K2 #HLK2 elim (rex_dropable_dx … HL12 … HLK2 … (#0)) -HLK2 -HL12 //
 #Y #HLK1 #HY elim (rex_inv_zero_unit_dx … HY) -HY
 #f #K2 #Hf #HK12 #H destruct /2 width=5 by ex3_2_intro/
index c45914f342da409b743a97582a826393401a98b2..601e8b28dcbc6dffc1d5e1946cb43a028d323e70 100644 (file)
@@ -20,13 +20,14 @@ include "static_2/static/rex.ma".
 (* Advanced properties ******************************************************)
 
 (* Basic_2A1: uses: llpx_sn_refl *)
-lemma rex_refl: ∀R. (∀L. reflexive … (R L)) → ∀L,T. L ⪤[R, T] L.
+lemma rex_refl (R): (∀L. reflexive … (R L)) → ∀L,T. L ⪤[R,T] L.
 #R #HR #L #T elim (frees_total L T)
 /4 width=3 by sex_refl, ext2_refl, ex2_intro/
 qed.
 
-lemma rex_pair_refl: ∀R. (∀L. reflexive … (R L)) →
-                     ∀L,V1,V2. R L V1 V2 → ∀I,T. L.ⓑ{I}V1 ⪤[R, T] L.ⓑ{I}V2.
+lemma rex_pair_refl (R):
+      (∀L. reflexive … (R L)) →
+      ∀L,V1,V2. R L V1 V2 → ∀I,T. L.ⓑ{I}V1 ⪤[R,T] L.ⓑ{I}V2.
 #R #HR #L #V1 #V2 #HV12 #I #T
 elim (frees_total (L.ⓑ{I}V1) T) #f #Hf
 elim (pn_split f) * #g #H destruct
@@ -35,15 +36,15 @@ qed.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma rex_inv_bind_void: ∀R,p,I,L1,L2,V,T. L1 ⪤[R, ⓑ{p,I}V.T] L2 →
-                         L1 ⪤[R, V] L2 ∧ L1.ⓧ ⪤[R, T] L2.ⓧ.
+lemma rex_inv_bind_void (R):
+      ∀p,I,L1,L2,V,T. L1 ⪤[R,ⓑ{p,I}V.T] L2 → L1 ⪤[R,V] L2 ∧ L1.ⓧ ⪤[R,T] L2.ⓧ.
 #R #p #I #L1 #L2 #V #T * #f #Hf #HL elim (frees_inv_bind_void … Hf) -Hf
 /6 width=6 by sle_sex_trans, sex_inv_tl, sor_inv_sle_dx, sor_inv_sle_sn, ex2_intro, conj/
 qed-.
 
 (* Advanced forward lemmas **************************************************)
 
-lemma rex_fwd_bind_dx_void: ∀R,p,I,L1,L2,V,T. L1 ⪤[R, ⓑ{p,I}V.T] L2 →
-                            L1.ⓧ ⪤[R, T] L2.ⓧ.
+lemma rex_fwd_bind_dx_void (R):
+      ∀p,I,L1,L2,V,T. L1 ⪤[R,ⓑ{p,I}V.T] L2 → L1.ⓧ ⪤[R,T] L2.ⓧ.
 #R #p #I #L1 #L2 #V #T #H elim (rex_inv_bind_void … H) -H //
 qed-.
index 24f68014d5fb0ec1df6ee1a102e429953c175902..7974bb900c8a1233f1139bd1cfd2a4e8f5a083c2 100644 (file)
@@ -20,20 +20,21 @@ include "static_2/static/rex_rex.ma".
 (* GENERIC EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ****)
 
 definition R_fsge_compatible: predicate (relation3 …) ≝ λRN.
-                              ∀L,T1,T2. RN L T1 T2 → ⦃L, T2⦄ ⊆ ⦃L, T1⦄.
+                              ∀L,T1,T2. RN L T1 T2 → ⦃L,T2⦄ ⊆ ⦃L,T1⦄.
 
 definition rex_fsge_compatible: predicate (relation3 …) ≝ λRN.
-                                ∀L1,L2,T. L1 ⪤[RN, T] L2 → ⦃L2, T⦄ ⊆ ⦃L1, T⦄.
+                                ∀L1,L2,T. L1 ⪤[RN,T] L2 → ⦃L2,T⦄ ⊆ ⦃L1,T⦄.
 
 definition rex_fsle_compatible: predicate (relation3 …) ≝ λRN.
-                                ∀L1,L2,T. L1 ⪤[RN, T] L2 → ⦃L1, T⦄ ⊆ ⦃L2, T⦄.
+                                ∀L1,L2,T. L1 ⪤[RN,T] L2 → ⦃L1,T⦄ ⊆ ⦃L2,T⦄.
 
 (* Basic inversions with free variables inclusion for restricted closures ***)
 
-lemma frees_sex_conf: ∀R. rex_fsge_compatible R →
-                      ∀L1,T,f1. L1 ⊢ 𝐅*⦃T⦄ ≘ f1 →
-                      ∀L2. L1 ⪤[cext2 R, cfull, f1] L2 →
-                      ∃∃f2. L2 ⊢ 𝐅*⦃T⦄ ≘ f2 & f2 ⊆ f1.
+lemma frees_sex_conf (R):
+      rex_fsge_compatible R →
+      ∀L1,T,f1. L1 ⊢ 𝐅+⦃T⦄ ≘ f1 →
+      ∀L2. L1 ⪤[cext2 R,cfull,f1] L2 →
+      ∃∃f2. L2 ⊢ 𝐅+⦃T⦄ ≘ f2 & f2 ⊆ f1.
 #R #HR #L1 #T #f1 #Hf1 #L2 #H1L
 lapply (HR L1 L2 T ?) /2 width=3 by ex2_intro/ #H2L
 @(fsle_frees_trans_eq … H2L … Hf1) /3 width=4 by sex_fwd_length, sym_eq/
@@ -41,27 +42,30 @@ qed-.
 
 (* Properties with free variables inclusion for restricted closures *********)
 
-(* Note: we just need lveq_inv_refl: ∀L,n1,n2. L ≋ⓧ*[n1, n2] L → ∧∧ 0 = n1 & 0 = n2 *)
-lemma fsge_rex_trans: ∀R,L1,T1,T2. ⦃L1, T1⦄ ⊆ ⦃L1, T2⦄ →
-                      ∀L2. L1 ⪤[R, T2] L2 → L1 ⪤[R, T1] L2.
+(* Note: we just need lveq_inv_refl: ∀L, n1, n2. L ≋ⓧ*[n1, n2] L → ∧∧ 0 = n1 & 0 = n2 *)
+lemma fsge_rex_trans (R):
+      ∀L1,T1,T2. ⦃L1,T1⦄ ⊆ ⦃L1,T2⦄ →
+      ∀L2. L1 ⪤[R,T2] L2 → L1 ⪤[R,T1] L2.
 #R #L1 #T1 #T2 * #n1 #n2 #f1 #f2 #Hf1 #Hf2 #Hn #Hf #L2 #HL12
 elim (lveq_inj_length … Hn ?) // #H1 #H2 destruct
 /4 width=5 by rex_inv_frees, sle_sex_trans, ex2_intro/
 qed-.
 
-lemma rex_sym: ∀R. rex_fsge_compatible R →
-               (∀L1,L2,T1,T2. R L1 T1 T2 → R L2 T2 T1) →
-               ∀T. symmetric … (rex R T).
+lemma rex_sym (R):
+      rex_fsge_compatible R →
+      (∀L1,L2,T1,T2. R L1 T1 T2 → R L2 T2 T1) →
+      ∀T. symmetric … (rex R T).
 #R #H1R #H2R #T #L1 #L2
 * #f1 #Hf1 #HL12
 elim (frees_sex_conf … Hf1 … HL12) -Hf1 //
 /5 width=5 by sle_sex_trans, sex_sym, cext2_sym, ex2_intro/
 qed-.
 
-lemma rex_pair_sn_split: ∀R1,R2. (∀L. reflexive … (R1 L)) → (∀L. reflexive … (R2 L)) →
-                         rex_fsge_compatible R1 →
-                         ∀L1,L2,V. L1 ⪤[R1, V] L2 → ∀I,T.
-                         ∃∃L. L1 ⪤[R1, ②{I}V.T] L & L ⪤[R2, V] L2.
+lemma rex_pair_sn_split (R1) (R2):
+      (∀L. reflexive … (R1 L)) → (∀L. reflexive … (R2 L)) →
+      rex_fsge_compatible R1 →
+      ∀L1,L2,V. L1 ⪤[R1,V] L2 → ∀I,T.
+      ∃∃L. L1 ⪤[R1,②{I}V.T] L & L ⪤[R2,V] L2.
 #R1 #R2 #HR1 #HR2 #HR #L1 #L2 #V * #f #Hf #HL12 * [ #p ] #I #T
 [ elim (frees_total L1 (ⓑ{p,I}V.T)) #g #Hg
   elim (frees_inv_bind … Hg) #y1 #y2 #H #_ #Hy
@@ -77,10 +81,11 @@ elim (frees_sex_conf … Hf … H) -Hf -H
 /4 width=7 by sle_sex_trans, ex2_intro/
 qed-.
 
-lemma rex_flat_dx_split: ∀R1,R2. (∀L. reflexive … (R1 L)) → (∀L. reflexive … (R2 L)) →
-                         rex_fsge_compatible R1 →
-                         ∀L1,L2,T. L1 ⪤[R1, T] L2 → ∀I,V.
-                         ∃∃L. L1 ⪤[R1, ⓕ{I}V.T] L & L ⪤[R2, T] L2.
+lemma rex_flat_dx_split (R1) (R2):
+      (∀L. reflexive … (R1 L)) → (∀L. reflexive … (R2 L)) →
+      rex_fsge_compatible R1 →
+      ∀L1,L2,T. L1 ⪤[R1,T] L2 → ∀I,V.
+      ∃∃L. L1 ⪤[R1,ⓕ{I}V.T] L & L ⪤[R2,T] L2.
 #R1 #R2 #HR1 #HR2 #HR #L1 #L2 #T * #f #Hf #HL12 #I #V
 elim (frees_total L1 (ⓕ{I}V.T)) #g #Hg
 elim (frees_inv_flat … Hg) #y1 #y2 #_ #H #Hy
@@ -93,10 +98,11 @@ elim (frees_sex_conf … Hf … H) -Hf -H
 /4 width=7 by sle_sex_trans, ex2_intro/
 qed-.
 
-lemma rex_bind_dx_split: ∀R1,R2. (∀L. reflexive … (R1 L)) → (∀L. reflexive … (R2 L)) →
-                         rex_fsge_compatible R1 →
-                         ∀I,L1,L2,V1,T. L1.ⓑ{I}V1 ⪤[R1, T] L2 → ∀p.
-                         ∃∃L,V. L1 ⪤[R1, ⓑ{p,I}V1.T] L & L.ⓑ{I}V ⪤[R2, T] L2 & R1 L1 V1 V.
+lemma rex_bind_dx_split (R1) (R2):
+      (∀L. reflexive … (R1 L)) → (∀L. reflexive … (R2 L)) →
+      rex_fsge_compatible R1 →
+      ∀I,L1,L2,V1,T. L1.ⓑ{I}V1 ⪤[R1,T] L2 → ∀p.
+      ∃∃L,V. L1 ⪤[R1,ⓑ{p,I}V1.T] L & L.ⓑ{I}V ⪤[R2,T] L2 & R1 L1 V1 V.
 #R1 #R2 #HR1 #HR2 #HR #I #L1 #L2 #V1 #T * #f #Hf #HL12 #p
 elim (frees_total L1 (ⓑ{p,I}V1.T)) #g #Hg
 elim (frees_inv_bind … Hg) #y1 #y2 #_ #H #Hy
@@ -113,10 +119,11 @@ elim (frees_sex_conf … Hf … H0) -Hf -H0
 /4 width=7 by sle_sex_trans, ex3_2_intro, ex2_intro/
 qed-.
 
-lemma rex_bind_dx_split_void: ∀R1,R2. (∀L. reflexive … (R1 L)) → (∀L. reflexive … (R2 L)) →
-                              rex_fsge_compatible R1 →
-                              ∀L1,L2,T. L1.ⓧ ⪤[R1, T] L2 → ∀p,I,V.
-                              ∃∃L. L1 ⪤[R1, ⓑ{p,I}V.T] L & L.ⓧ ⪤[R2, T] L2.
+lemma rex_bind_dx_split_void (R1) (R2):
+      (∀L. reflexive … (R1 L)) → (∀L. reflexive … (R2 L)) →
+      rex_fsge_compatible R1 →
+      ∀L1,L2,T. L1.ⓧ ⪤[R1,T] L2 → ∀p,I,V.
+      ∃∃L. L1 ⪤[R1,ⓑ{p,I}V.T] L & L.ⓧ ⪤[R2,T] L2.
 #R1 #R2 #HR1 #HR2 #HR #L1 #L2 #T * #f #Hf #HL12 #p #I #V
 elim (frees_total L1 (ⓑ{p,I}V.T)) #g #Hg
 elim (frees_inv_bind_void … Hg) #y1 #y2 #_ #H #Hy
@@ -135,11 +142,10 @@ qed-.
 
 (* Main properties with free variables inclusion for restricted closures ****)
 
-theorem rex_conf: ∀R1,R2.
-                  rex_fsge_compatible R1 →
-                  rex_fsge_compatible R2 →
-                  R_confluent2_rex R1 R2 R1 R2 →
-                  ∀T. confluent2 … (rex R1 T) (rex R2 T).
+theorem rex_conf (R1) (R2):
+        rex_fsge_compatible R1 → rex_fsge_compatible R2 →
+        R_confluent2_rex R1 R2 R1 R2 →
+        ∀T. confluent2 … (rex R1 T) (rex R2 T).
 #R1 #R2 #HR1 #HR2 #HR12 #T #L0 #L1 * #f1 #Hf1 #HL01 #L2 * #f #Hf #HL02
 lapply (frees_mono … Hf1 … Hf) -Hf1 #Hf12
 lapply (sex_eq_repl_back … HL01 … Hf12) -f1 #HL01
@@ -164,10 +170,9 @@ elim (sex_conf … HL01 … HL02) /2 width=3 by ex2_intro/ [ | -HL01 -HL02 ]
 ]
 qed-.
 
-theorem rex_trans_fsle: ∀R1,R2,R3.
-                        rex_fsle_compatible R1 → f_transitive_next R1 R2 R3 →
-                        ∀L1,L,T. L1 ⪤[R1, T] L →
-                        ∀L2. L ⪤[R2, T] L2 → L1 ⪤[R3, T] L2.
+theorem rex_trans_fsle (R1) (R2) (R3):
+        rex_fsle_compatible R1 → f_transitive_next R1 R2 R3 →
+        ∀L1,L,T. L1 ⪤[R1,T] L → ∀L2. L ⪤[R2,T] L2 → L1 ⪤[R3,T] L2.
 #R1 #R2 #R3 #H1R #H2R #L1 #L #T #H
 lapply (H1R … H) -H1R #H0
 cases H -H #f1 #Hf1 #HL1 #L2 * #f2 #Hf2 #HL2
index e279e159dde31a749769f80080ce36fd57cb2e25..0fa17450bb2ba1348fef64ae14f8b5d5687a82ac 100644 (file)
@@ -20,14 +20,14 @@ include "static_2/static/rex_drops.ma".
 (* Forward lemmas with length for local environments ************************)
 
 (* Basic_2A1: uses: llpx_sn_fwd_length *)
-lemma rex_fwd_length (R): ∀L1,L2,T. L1 ⪤[R, T] L2 → |L1| = |L2|.
+lemma rex_fwd_length (R): ∀L1,L2,T. L1 ⪤[R,T] L2 → |L1| = |L2|.
 #R #L1 #L2 #T * /2 width=4 by sex_fwd_length/
 qed-.
 
 (* Properties with length for local environments ****************************)
 
 (* Basic_2A1: uses: llpx_sn_sort *)
-lemma rex_sort_length (R): ∀L1,L2. |L1| = |L2| → ∀s. L1 ⪤[R, ⋆s] L2.
+lemma rex_sort_length (R): ∀L1,L2. |L1| = |L2| → ∀s. L1 ⪤[R,⋆s] L2.
 #R #L1 elim L1 -L1
 [ #Y #H #s >(length_inv_zero_sn … H) -H //
 | #K1 #I1 #IH #Y #H #s
@@ -37,7 +37,7 @@ lemma rex_sort_length (R): ∀L1,L2. |L1| = |L2| → ∀s. L1 ⪤[R, ⋆s] L2.
 qed.
 
 (* Basic_2A1: uses: llpx_sn_gref *)
-lemma rex_gref_length (R): ∀L1,L2. |L1| = |L2| → ∀l. L1 ⪤[R, §l] L2.
+lemma rex_gref_length (R): ∀L1,L2. |L1| = |L2| → ∀l. L1 ⪤[R,§l] L2.
 #R #L1 elim L1 -L1
 [ #Y #H #s >(length_inv_zero_sn … H) -H //
 | #K1 #I1 #IH #Y #H #s
@@ -46,14 +46,15 @@ lemma rex_gref_length (R): ∀L1,L2. |L1| = |L2| → ∀l. L1 ⪤[R, §l] L2.
 ]
 qed.
 
-lemma rex_unit_length (R): ∀L1,L2. |L1| = |L2| → ∀I. L1.ⓤ{I} ⪤[R, #0] L2.ⓤ{I}.
+lemma rex_unit_length (R): ∀L1,L2. |L1| = |L2| → ∀I. L1.ⓤ{I} ⪤[R,#0] L2.ⓤ{I}.
 /3 width=3 by rex_unit, sex_length_isid/ qed.
 
 (* Basic_2A1: uses: llpx_sn_lift_le llpx_sn_lift_ge *)
-lemma rex_lifts_bi (R): d_liftable2_sn … lifts R →
-                        ∀L1,L2. |L1| = |L2| → ∀K1,K2,T. K1 ⪤[R, T] K2 →
-                        ∀b,f. ⬇*[b, f] L1 ≘ K1 → ⬇*[b, f] L2 ≘ K2 →
-                        ∀U. ⬆*[f] T ≘ U → L1 ⪤[R, U] L2.
+lemma rex_lifts_bi (R):
+      d_liftable2_sn … lifts R →
+      ∀L1,L2. |L1| = |L2| → ∀K1,K2,T. K1 ⪤[R,T] K2 →
+      ∀b,f. ⬇*[b,f] L1 ≘ K1 → ⬇*[b,f] L2 ≘ K2 →
+      ∀U. ⬆*[f] T ≘ U → L1 ⪤[R,U] L2.
 #R #HR #L1 #L2 #HL12 #K1 #K2 #T * #f1 #Hf1 #HK12 #b #f #HLK1 #HLK2 #U #HTU
 elim (frees_total L1 U) #f2 #Hf2
 lapply (frees_fwd_coafter … Hf2 … HLK1 … HTU … Hf1) -HTU #Hf
@@ -62,11 +63,12 @@ qed-.
 
 (* Inversion lemmas with length for local environment ***********************)
 
-lemma rex_inv_zero_length (R): ∀Y1,Y2. Y1 ⪤[R, #0] Y2 →
-                               ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆
-                                | ∃∃I,L1,L2,V1,V2. L1 ⪤[R, V1] L2 & R L1 V1 V2 &
-                                                   Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2
-                                | ∃∃I,L1,L2. |L1| = |L2| & Y1 = L1.ⓤ{I} & Y2 = L2.ⓤ{I}.
+lemma rex_inv_zero_length (R):
+      ∀Y1,Y2. Y1 ⪤[R,#0] Y2 →
+      ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆
+       | ∃∃I,L1,L2,V1,V2. L1 ⪤[R,V1] L2 & R L1 V1 V2 &
+           Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2
+       | ∃∃I,L1,L2. |L1| = |L2| & Y1 = L1.ⓤ{I} & Y2 = L2.ⓤ{I}.
 #R #Y1 #Y2 #H elim (rex_inv_zero … H) -H *
 /4 width=9 by sex_fwd_length, ex4_5_intro, ex3_3_intro, or3_intro2, or3_intro1, or3_intro0, conj/
 qed-.
index ffaebbc2ee55e7b2400db1ad8597122df0a7a601..dd074c1c4014d02ac83238b370507274630d2f87 100644 (file)
@@ -20,7 +20,8 @@ include "static_2/static/req.ma".
 
 (* Properties with generic extension of a context-sensitive relation ********)
 
-lemma rex_lex: ∀R,L1,L2. L1 ⪤[R] L2 → ∀T. L1 ⪤[R, T] L2.
+lemma rex_lex (R):
+      ∀L1,L2. L1 ⪤[R] L2 → ∀T. L1 ⪤[R,T] L2.
 #R #L1 #L2 * #f #Hf #HL12 #T
 elim (frees_total L1 T) #g #Hg
 /4 width=5 by sex_sdj, sdj_isid_sn, ex2_intro/
@@ -28,10 +29,10 @@ qed.
 
 (* Inversion lemmas with generic extension of a context sensitive relation **)
 
-lemma rex_inv_lex_req: ∀R. c_reflexive … R →
-                       rex_fsge_compatible R →
-                       ∀L1,L2,T. L1 ⪤[R, T] L2 →
-                       ∃∃L. L1 ⪤[R] L & L ≡[T] L2.
+lemma rex_inv_lex_req (R):
+      c_reflexive … R → rex_fsge_compatible R →
+      ∀L1,L2,T. L1 ⪤[R,T] L2 →
+      ∃∃L. L1 ⪤[R] L & L ≡[T] L2.
 #R #H1R #H2R #L1 #L2 #T * #f1 #Hf1 #HL
 elim (sex_sdj_split … ceq_ext … HL 𝐈𝐝 ?) -HL
 [ #L0 #HL10 #HL02 |*: /2 width=1 by ext2_refl, sdj_isid_dx/ ] -H1R
index 08a4f192c506eff0510d5b1b69a670e69442c1f2..10d2b917818dfc203f18690de3a75206fd1a4a17 100644 (file)
@@ -20,16 +20,18 @@ include "static_2/static/rex.ma".
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma rex_inv_frees: ∀R,L1,L2,T. L1 ⪤[R, T] L2 →
-                     ∀f. L1 ⊢ 𝐅*⦃T⦄ ≘ f → L1 ⪤[cext2 R, cfull, f] L2.
+lemma rex_inv_frees (R):
+      ∀L1,L2,T. L1 ⪤[R,T] L2 →
+      ∀f. L1 ⊢ 𝐅+⦃T⦄ ≘ f → L1 ⪤[cext2 R,cfull,f] L2.
 #R #L1 #L2 #T * /3 width=6 by frees_mono, sex_eq_repl_back/
 qed-.
 
 (* Advanced properties ******************************************************)
 
 (* Basic_2A1: uses: llpx_sn_dec *)
-lemma rex_dec: ∀R. (∀L,T1,T2. Decidable (R L T1 T2)) →
-               ∀L1,L2,T. Decidable (L1 ⪤[R, T] L2).
+lemma rex_dec (R):
+      (∀L,T1,T2. Decidable (R L T1 T2)) →
+      ∀L1,L2,T. Decidable (L1 ⪤[R,T] L2).
 #R #HR #L1 #L2 #T
 elim (frees_total L1 T) #f #Hf
 elim (sex_dec (cext2 R) cfull … L1 L2 f)
@@ -39,25 +41,23 @@ qed-.
 (* Main properties **********************************************************)
 
 (* Basic_2A1: uses: llpx_sn_bind llpx_sn_bind_O *)
-theorem rex_bind: ∀R,p,I,L1,L2,V1,V2,T.
-                  L1 ⪤[R, V1] L2 → L1.ⓑ{I}V1 ⪤[R, T] L2.ⓑ{I}V2 →
-                  L1 ⪤[R, ⓑ{p,I}V1.T] L2.
+theorem rex_bind (R) (p) (I):
+        ∀L1,L2,V1,V2,T. L1 ⪤[R,V1] L2 → L1.ⓑ{I}V1 ⪤[R,T] L2.ⓑ{I}V2 →
+        L1 ⪤[R,ⓑ{p,I}V1.T] L2.
 #R #p #I #L1 #L2 #V1 #V2 #T * #f1 #HV #Hf1 * #f2 #HT #Hf2
 lapply (sex_fwd_bind … Hf2) -Hf2 #Hf2 elim (sor_isfin_ex f1 (⫱f2))
 /3 width=7 by frees_fwd_isfin, frees_bind, sex_join, isfin_tl, ex2_intro/
 qed.
 
 (* Basic_2A1: llpx_sn_flat *)
-theorem rex_flat: ∀R,I,L1,L2,V,T.
-                  L1 ⪤[R, V] L2 → L1 ⪤[R, T] L2 →
-                  L1 ⪤[R, ⓕ{I}V.T] L2.
+theorem rex_flat (R) (I):
+        ∀L1,L2,V,T. L1 ⪤[R,V] L2 → L1 ⪤[R,T] L2 → L1 ⪤[R,ⓕ{I}V.T] L2.
 #R #I #L1 #L2 #V #T * #f1 #HV #Hf1 * #f2 #HT #Hf2 elim (sor_isfin_ex f1 f2)
 /3 width=7 by frees_fwd_isfin, frees_flat, sex_join, ex2_intro/
 qed.
 
-theorem rex_bind_void: ∀R,p,I,L1,L2,V,T.
-                       L1 ⪤[R, V] L2 → L1.ⓧ ⪤[R, T] L2.ⓧ →
-                       L1 ⪤[R, ⓑ{p,I}V.T] L2.
+theorem rex_bind_void (R) (p) (I):
+        ∀L1,L2,V,T. L1 ⪤[R,V] L2 → L1.ⓧ ⪤[R,T] L2.ⓧ → L1 ⪤[R,ⓑ{p,I}V.T] L2.
 #R #p #I #L1 #L2 #V #T * #f1 #HV #Hf1 * #f2 #HT #Hf2
 lapply (sex_fwd_bind … Hf2) -Hf2 #Hf2 elim (sor_isfin_ex f1 (⫱f2))
 /3 width=7 by frees_fwd_isfin, frees_bind_void, sex_join, isfin_tl, ex2_intro/
@@ -66,24 +66,27 @@ qed.
 (* Negated inversion lemmas *************************************************)
 
 (* Basic_2A1: uses: nllpx_sn_inv_bind nllpx_sn_inv_bind_O *)
-lemma rnex_inv_bind: ∀R. (∀L,T1,T2. Decidable (R L T1 T2)) →
-                     ∀p,I,L1,L2,V,T. (L1 ⪤[R, ⓑ{p,I}V.T] L2 → ⊥) →
-                     (L1 ⪤[R, V] L2 → ⊥) ∨ (L1.ⓑ{I}V ⪤[R, T] L2.ⓑ{I}V → ⊥).
+lemma rnex_inv_bind (R):
+      (∀L,T1,T2. Decidable (R L T1 T2)) →
+      ∀p,I,L1,L2,V,T. (L1 ⪤[R,ⓑ{p,I}V.T] L2 → ⊥) →
+      ∨∨ (L1 ⪤[R,V] L2 → ⊥) | (L1.ⓑ{I}V ⪤[R,T] L2.ⓑ{I}V → ⊥).
 #R #HR #p #I #L1 #L2 #V #T #H elim (rex_dec … HR L1 L2 V)
 /4 width=2 by rex_bind, or_intror, or_introl/
 qed-.
 
 (* Basic_2A1: uses: nllpx_sn_inv_flat *)
-lemma rnex_inv_flat: ∀R. (∀L,T1,T2. Decidable (R L T1 T2)) →
-                     ∀I,L1,L2,V,T. (L1 ⪤[R, ⓕ{I}V.T] L2 → ⊥) →
-                     (L1 ⪤[R, V] L2 → ⊥) ∨ (L1 ⪤[R, T] L2 → ⊥).
+lemma rnex_inv_flat (R):
+      (∀L,T1,T2. Decidable (R L T1 T2)) →
+      ∀I,L1,L2,V,T. (L1 ⪤[R,ⓕ{I}V.T] L2 → ⊥) →
+      ∨∨ (L1 ⪤[R,V] L2 → ⊥) | (L1 ⪤[R,T] L2 → ⊥).
 #R #HR #I #L1 #L2 #V #T #H elim (rex_dec … HR L1 L2 V)
 /4 width=1 by rex_flat, or_intror, or_introl/
 qed-.
 
-lemma rnex_inv_bind_void: ∀R. (∀L,T1,T2. Decidable (R L T1 T2)) →
-                          ∀p,I,L1,L2,V,T. (L1 ⪤[R, ⓑ{p,I}V.T] L2 → ⊥) →
-                          (L1 ⪤[R, V] L2 → ⊥) ∨ (L1.ⓧ ⪤[R, T] L2.ⓧ → ⊥).
+lemma rnex_inv_bind_void (R):
+      (∀L,T1,T2. Decidable (R L T1 T2)) →
+      ∀p,I,L1,L2,V,T. (L1 ⪤[R,ⓑ{p,I}V.T] L2 → ⊥) →
+      ∨∨ (L1 ⪤[R,V] L2 → ⊥) | (L1.ⓧ ⪤[R,T] L2.ⓧ → ⊥).
 #R #HR #p #I #L1 #L2 #V #T #H elim (rex_dec … HR L1 L2 V)
 /4 width=2 by rex_bind_void, or_intror, or_introl/
 qed-.
index 89199fabb3ea2b76f06b12b60fe976afeabb4409..db382096447ab7046a07a5e963bb64ab3cd9127c 100644 (file)
@@ -72,3 +72,11 @@ lemma eq_aarity_dec: ∀A1,A2:aarity. Decidable (A1 = A2).
   ]
 ]
 qed-.
+
+lemma is_apear_dec (B) (X): Decidable (∃A. ②B.A = X).
+#B * [| #X #A ]
+[| elim (eq_aarity_dec X B) #HX ]
+[| /3 width=2 by ex_intro, or_introl/ ]
+@or_intror * #A #H destruct
+/2 width=1 by/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/ac.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/ac.ma
new file mode 100644 (file)
index 0000000..aef4c44
--- /dev/null
@@ -0,0 +1,69 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "ground_2/lib/arith.ma".
+include "static_2/notation/functions/one_0.ma".
+include "static_2/notation/functions/two_0.ma".
+include "static_2/notation/functions/omega_0.ma".
+
+(* APPLICABILITY CONDITION **************************************************)
+
+(* applicability condition specification *)
+record ac: Type[0] ≝ {
+(* applicability domain *)
+   ad: predicate nat
+}.
+
+(* applicability condition postulates *)
+record ac_props (a): Prop ≝ {
+   ac_dec: ∀m. Decidable (∃∃n. ad a n & m ≤ n)
+}.
+
+(* Notable specifications ***************************************************)
+
+definition apply_top: predicate nat ≝ λn. ⊤.
+
+definition ac_top: ac ≝ mk_ac apply_top.
+
+interpretation "any number (applicability domain)"
+  'Omega = (ac_top).
+
+lemma ac_top_props: ac_props ac_top ≝ mk_ac_props ….
+/3 width=3 by or_introl, ex2_intro/
+qed.
+
+definition ac_eq (k): ac ≝ mk_ac (eq … k).
+
+interpretation "one (applicability domain)"
+  'Two = (ac_eq (S O)).
+
+interpretation "zero (applicability domain)"
+  'One = (ac_eq O).
+
+lemma ac_eq_props (k): ac_props (ac_eq k) ≝ mk_ac_props ….
+#m elim (le_dec m k) #Hm
+[ /3 width=3 by or_introl, ex2_intro/
+| @or_intror * #n #Hn #Hmn destruct /2 width=1 by/
+]
+qed.
+
+definition ac_le (k): ac ≝ mk_ac (λn. n ≤ k).
+
+lemma ac_le_props (k): ac_props (ac_le k) ≝ mk_ac_props ….
+#m elim (le_dec m k) #Hm
+[ /3 width=3 by or_introl, ex2_intro/
+| @or_intror * #n #Hn #Hmn
+  /3 width=3 by transitive_le/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/acle.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/acle.ma
new file mode 100644 (file)
index 0000000..30a0253
--- /dev/null
@@ -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/syntax/ac.ma".
+
+(* APPLICABILITY CONDITION PREORDER *****************************************)
+
+definition acle: relation ac ≝
+           λa1,a2. ∀m. ad a1 m → ∃∃n. ad a2 n & m ≤ n.
+
+interpretation "preorder (applicability domain)"
+  'subseteq a1 a2 = (acle a1 a2).
+
+(* Basic properties *********************************************************)
+
+lemma acle_refl: reflexive … acle.
+/2 width=3 by ex2_intro/ qed.
+
+lemma acle_omega (a): a ⊆ 𝛚.
+/2 width=1 by acle_refl/
+qed.
+
+lemma acle_one (a): ∀n. ad a n → 𝟏 ⊆ a.
+#a #n #Ha #m #Hm destruct
+/2 width=3 by ex2_intro/
+qed.
+
+lemma acle_eq_monotonic_le (k1) (k2):
+      k1 ≤ k2 → (ac_eq k1) ⊆ (ac_eq k2).
+#k1 #k2 #Hk #m #Hm destruct
+/2 width=3 by ex2_intro/
+qed.
+
+lemma acle_le_monotonic_le (k1) (k2):
+      k1 ≤ k2 → (ac_le k1) ⊆ (ac_le k2).
+#k1 #k2 #Hk #m #Hm
+/3 width=3 by acle_refl, transitive_le/
+qed.
+
+lemma acle_eq_le (k): (ac_eq k) ⊆ (ac_le k).
+#k #m #Hm destruct
+/2 width=1 by acle_refl, le_n/
+qed.
+
+lemma acle_le_eq (k): (ac_le k) ⊆ (ac_eq k).
+#k #m #Hm /2 width=3 by ex2_intro/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/acle_acle.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/acle_acle.ma
new file mode 100644 (file)
index 0000000..9b89989
--- /dev/null
@@ -0,0 +1,26 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/acle.ma".
+
+(* APPLICABILITY CONDITION PREORDER *****************************************)
+
+(* Main properties **********************************************************)
+
+theorem acle_trans: Transitive … acle.
+#a1 #a #Ha1 #a2 #Ha2 #m1 #Hm1
+elim (Ha1 … Hm1) -Ha1 -Hm1 #m #Ha #Hm1
+elim (Ha2 … Ha) -Ha2 -Ha #m2 #Ha2 #Hm2
+/3 width=5 by transitive_le, ex2_intro/
+qed-.
index 31c3f7adc28ee03ce44cae6fbab1da9c5f05e2a7..bc5b92945c39031294e86652526d6d4c3595a50d 100644 (file)
@@ -24,27 +24,27 @@ interpretation "weight (restricted closure)" 'Weight L T = (rfw L T).
 (* Basic properties *********************************************************)
 
 (* Basic_1: was: flt_shift *)
-lemma rfw_shift: ∀p,I,K,V,T. ♯{K.ⓑ{I}V, T} < ♯{K, ⓑ{p,I}V.T}.
+lemma rfw_shift: ∀p,I,K,V,T. ♯{K.ⓑ{I}V,T} < ♯{K,ⓑ{p,I}V.T}.
 normalize /2 width=1 by monotonic_le_plus_r/
 qed.
 
-lemma rfw_clear: ∀p,I1,I2,K,V,T. ♯{K.ⓤ{I1}, T} < ♯{K, ⓑ{p,I2}V.T}.
+lemma rfw_clear: ∀p,I1,I2,K,V,T. ♯{K.ⓤ{I1},T} < ♯{K,ⓑ{p,I2}V.T}.
 normalize /4 width=1 by monotonic_le_plus_r, le_S_S/
 qed.
 
-lemma rfw_tpair_sn: ∀I,L,V,T. ♯{L, V} < ♯{L, ②{I}V.T}.
+lemma rfw_tpair_sn: ∀I,L,V,T. ♯{L,V} < ♯{L,②{I}V.T}.
 normalize in ⊢ (?→?→?→?→?%%); //
 qed.
 
-lemma rfw_tpair_dx: ∀I,L,V,T. ♯{L, T} < ♯{L, ②{I}V.T}.
+lemma rfw_tpair_dx: ∀I,L,V,T. ♯{L,T} < ♯{L,②{I}V.T}.
 normalize in ⊢ (?→?→?→?→?%%); //
 qed.
 
-lemma rfw_lpair_sn: ∀I,L,V,T. ♯{L, V} < ♯{L.ⓑ{I}V, T}.
+lemma rfw_lpair_sn: ∀I,L,V,T. ♯{L,V} < ♯{L.ⓑ{I}V,T}.
 normalize /3 width=1 by monotonic_lt_plus_l, monotonic_le_plus_r/
 qed.
 
-lemma rfw_lpair_dx: ∀I,L,V,T. ♯{L, T} < ♯{L.ⓑ{I}V, T}.
+lemma rfw_lpair_dx: ∀I,L,V,T. ♯{L,T} < ♯{L.ⓑ{I}V,T}.
 normalize /3 width=1 by monotonic_lt_plus_l, monotonic_le_plus_r/
 qed.
 
index a51094adc6c475b0c7b877f28ca3b7c0818e9e5f..af52e35b1540b8d4833632246530b43382113492 100644 (file)
@@ -26,23 +26,23 @@ interpretation "weight (closure)" 'Weight G L T = (fw G L T).
 (* Basic properties *********************************************************)
 
 (* Basic_1: was: flt_shift *)
-lemma fw_shift: ∀p,I,G,K,V,T. ♯{G, K.ⓑ{I}V, T} < ♯{G, K, ⓑ{p,I}V.T}.
+lemma fw_shift: ∀p,I,G,K,V,T. ♯{G,K.ⓑ{I}V,T} < ♯{G,K,ⓑ{p,I}V.T}.
 normalize /2 width=1 by monotonic_le_plus_r/
 qed.
 
-lemma fw_clear: ∀p,I1,I2,G,K,V,T. ♯{G, K.ⓤ{I1}, T} < ♯{G, K, ⓑ{p,I2}V.T}.
+lemma fw_clear: ∀p,I1,I2,G,K,V,T. ♯{G,K.ⓤ{I1},T} < ♯{G,K,ⓑ{p,I2}V.T}.
 normalize /4 width=1 by monotonic_le_plus_r, le_S_S/
 qed.
 
-lemma fw_tpair_sn: ∀I,G,L,V,T. ♯{G, L, V} < ♯{G, L, ②{I}V.T}.
+lemma fw_tpair_sn: ∀I,G,L,V,T. ♯{G,L,V} < ♯{G,L,②{I}V.T}.
 normalize in ⊢ (?→?→?→?→?→?%%); //
 qed.
 
-lemma fw_tpair_dx: ∀I,G,L,V,T. ♯{G, L, T} < ♯{G, L, ②{I}V.T}.
+lemma fw_tpair_dx: ∀I,G,L,V,T. ♯{G,L,T} < ♯{G,L,②{I}V.T}.
 normalize in ⊢ (?→?→?→?→?→?%%); //
 qed.
 
-lemma fw_lpair_sn: ∀I,G,L,V,T. ♯{G, L, V} < ♯{G, L.ⓑ{I}V, T}.
+lemma fw_lpair_sn: ∀I,G,L,V,T. ♯{G,L,V} < ♯{G,L.ⓑ{I}V,T}.
 normalize /3 width=1 by monotonic_lt_plus_l, monotonic_le_plus_r/
 qed.
 
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/item_sd.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/item_sd.ma
deleted file mode 100644 (file)
index 8a9ae71..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM 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/item_sh.ma".
-
-(* SORT DEGREE **************************************************************)
-
-(* sort degree specification *)
-record sd (h:sh): Type[0] ≝ {
-   deg      : relation nat;                            (* degree of the sort *)
-   deg_total: ∀s. ∃d. deg s d;                         (* functional relation axioms *)
-   deg_mono : ∀s,d1,d2. deg s d1 → deg s d2 → d1 = d2;
-   deg_next : ∀s,d. deg s d → deg (next h s) (↓d)      (* compatibility condition *)
-}.
-
-(* Notable specifications ***************************************************)
-
-definition deg_O: relation nat ≝ λs,d. d = 0.
-
-definition sd_O: ∀h. sd h ≝ λh. mk_sd h deg_O ….
-/2 width=2 by le_n_O_to_eq, le_n, ex_intro/ defined.
-
-(* Basic_2A1: includes: deg_SO_pos *)
-inductive deg_SO (h:sh) (s:nat) (s0:nat): predicate nat ≝
-| deg_SO_succ : ∀n. (next h)^n s0 = s → deg_SO h s s0 (↑n)
-| deg_SO_zero: ((∃n. (next h)^n s0 = s) → ⊥) → deg_SO h s s0 0
-.
-
-fact deg_SO_inv_succ_aux: ∀h,s,s0,n0. deg_SO h s s0 n0 → ∀n. n0 = ↑n →
-                          (next h)^n s0 = s.
-#h #s #s0 #n0 * -n0
-[ #n #Hn #x #H destruct //
-| #_ #x #H destruct
-]
-qed-.
-
-(* Basic_2A1: was: deg_SO_inv_pos *)
-lemma deg_SO_inv_succ: ∀h,s,s0,n. deg_SO h s s0 (↑n) → (next h)^n s0 = s.
-/2 width=3 by deg_SO_inv_succ_aux/ qed-.
-
-lemma deg_SO_refl: ∀h,s. deg_SO h s s 1.
-#h #s @(deg_SO_succ … 0 ?) //
-qed.
-
-lemma deg_SO_gt: ∀h,s1,s2. s1 < s2 → deg_SO h s1 s2 0.
-#h #s1 #s2 #HK12 @deg_SO_zero * #n elim n -n normalize
-[ #H destruct
-  elim (lt_refl_false … HK12)
-| #n #_ #H
-  lapply (next_lt h ((next h)^n s2)) >H -H #H
-  lapply (transitive_lt … H HK12) -s1 #H1
-  lapply (nexts_le h s2 n) #H2
-  lapply (le_to_lt_to_lt … H2 H1) -h -n #H
-  elim (lt_refl_false … H)
-]
-qed.
-
-definition sd_SO: ∀h. nat → sd h ≝ λh,s. mk_sd h (deg_SO h s) ….
-[ #s0
-  lapply (nexts_dec h s0 s) *
-  [ * /3 width=2 by deg_SO_succ, ex_intro/ | /4 width=2 by deg_SO_zero, ex_intro/ ]
-| #K0 #d1 #d2 * [ #n1 ] #H1 * [1,3: #n2 ] #H2 //
-  [ < H2 in H1; -H2 #H
-    lapply (nexts_inj … H) -H #H destruct //
-  | elim H1 /2 width=2 by ex_intro/
-  | elim H2 /2 width=2 by ex_intro/
-  ]
-| #s0 #n *
-  [ #d #H destruct elim d -d normalize
-    /2 width=1 by deg_SO_gt, deg_SO_succ, next_lt/
-  | #H1 @deg_SO_zero * #d #H2 destruct
-    @H1 -H1 @(ex_intro … (↑d)) /2 width=1 by sym_eq/ (**) (* explicit constructor *)
-  ]
-]
-defined.
-
-rec definition sd_d (h:sh) (s:nat) (d:nat) on d : sd h ≝
-   match d with
-   [ O   ⇒ sd_O h
-   | S d ⇒ match d with
-           [ O ⇒ sd_SO h s
-           | _ ⇒ sd_d h (next h s) d
-           ]
-   ].
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma deg_inv_pred: ∀h,o,s,d. deg h o (next h s) (↑d) → deg h o s (↑↑d).
-#h #o #s #d #H1
-elim (deg_total h o s) #n #H0
-lapply (deg_next … H0) #H2
-lapply (deg_mono … H1 H2) -H1 -H2 #H >H >S_pred /2 width=2 by ltn_to_ltO/
-qed-.
-
-lemma deg_inv_prec: ∀h,o,s,n,d. deg h o ((next h)^n s) (↑d) → deg h o s (↑(d+n)).
-#h #o #s #n elim n -n normalize /3 width=1 by deg_inv_pred/
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma deg_iter: ∀h,o,s,d,n. deg h o s d → deg h o ((next h)^n s) (d-n).
-#h #o #s #d #n elim n -n normalize /3 width=1 by deg_next/
-qed.
-
-lemma deg_next_SO: ∀h,o,s,d. deg h o s (↑d) → deg h o (next h s) d.
-/2 width=1 by deg_next/ qed-.
-
-lemma sd_d_SS: ∀h,s,d. sd_d h s (↑↑d) = sd_d h (next h s) (↑d).
-// qed.
-
-lemma sd_d_correct: ∀h,d,s. deg h (sd_d h s d) s d.
-#h #d elim d -d // #d elim d -d /3 width=1 by deg_inv_pred/
-qed.
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/item_sh.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/item_sh.ma
deleted file mode 100644 (file)
index 9e0b03f..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "ground_2/lib/arith.ma".
-
-(* SORT HIERARCHY ***********************************************************)
-
-(* sort hierarchy specification *)
-record sh: Type[0] ≝ {
-   next   : nat → nat;     (* next sort in the hierarchy *)
-   next_lt: ∀s. s < next s (* strict monotonicity condition *)
-}.
-
-definition sh_N: sh ≝ mk_sh S ….
-// defined.
-
-(* Basic properties *********************************************************)
-
-lemma nexts_le: ∀h,s,n. s ≤ (next h)^n s.
-#h #s #n elim n -n // normalize #n #IH
-lapply (next_lt h ((next h)^n s)) #H
-lapply (le_to_lt_to_lt … IH H) -IH -H /2 width=2 by lt_to_le/
-qed.
-
-lemma nexts_lt: ∀h,s,n. s < (next h)^(↑n) s.
-#h #s #n normalize
-lapply (nexts_le h s n) #H
-@(le_to_lt_to_lt … H) //
-qed.
-
-axiom nexts_dec: ∀h,s1,s2. Decidable (∃n. (next h)^n s1 = s2).
-
-axiom nexts_inj: ∀h,s,n1,n2. (next h)^n1 s = (next h)^n2 s → n1 = n2.
index 855978783c87ffefc69f70fc69d6fe0de0e39d8b..e6d2fcbfc37a30a8714ffa23f1451faf90f02da6 100644 (file)
@@ -32,7 +32,7 @@ interpretation "equivalence up to exclusion binders (local environment)"
 
 (* Basic properties *********************************************************)
 
-lemma lveq_refl: ∀L. L ≋ⓧ*[0, 0] L.
+lemma lveq_refl: ∀L. L ≋ⓧ*[0,0] L.
 #L elim L -L /2 width=1 by lveq_atom, lveq_bind/
 qed.
 
@@ -43,10 +43,10 @@ qed-.
 
 (* Basic inversion lemmas ***************************************************)
 
-fact lveq_inv_zero_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
+fact lveq_inv_zero_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1,n2] L2 →
                         0 = n1 → 0 = n2 →
                         ∨∨ ∧∧ ⋆ = L1 & ⋆ = L2
-                            | ∃∃I1,I2,K1,K2. K1 ≋ⓧ*[0, 0] K2 & K1.ⓘ{I1} = L1 & K2.ⓘ{I2} = L2.
+                            | ∃∃I1,I2,K1,K2. K1 ≋ⓧ*[0,0] K2 & K1.ⓘ{I1} = L1 & K2.ⓘ{I2} = L2.
 #L1 #L2 #n1 #n2 * -L1 -L2 -n1 -n2
 [1: /3 width=1 by or_introl, conj/
 |2: /3 width=7 by ex3_4_intro, or_intror/
@@ -54,14 +54,14 @@ fact lveq_inv_zero_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
 ]
 qed-.
 
-lemma lveq_inv_zero: ∀L1,L2. L1 ≋ⓧ*[0, 0] L2 →
+lemma lveq_inv_zero: ∀L1,L2. L1 ≋ⓧ*[0,0] L2 →
                      ∨∨ ∧∧ ⋆ = L1 & ⋆ = L2
-                      | ∃∃I1,I2,K1,K2. K1 ≋ⓧ*[0, 0] K2 & K1.ⓘ{I1} = L1 & K2.ⓘ{I2} = L2.
+                      | ∃∃I1,I2,K1,K2. K1 ≋ⓧ*[0,0] K2 & K1.ⓘ{I1} = L1 & K2.ⓘ{I2} = L2.
 /2 width=5 by lveq_inv_zero_aux/ qed-.
 
-fact lveq_inv_succ_sn_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
+fact lveq_inv_succ_sn_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1,n2] L2 →
                            ∀m1. ↑m1 = n1 →
-                           ∃∃K1. K1 ≋ⓧ*[m1, 0] L2 & K1.ⓧ = L1 & 0 = n2.
+                           ∃∃K1. K1 ≋ⓧ*[m1,0] L2 & K1.ⓧ = L1 & 0 = n2.
 #L1 #L2 #n1 #n2 * -L1 -L2 -n1 -n2
 [1: #m #H destruct
 |2: #I1 #I2 #K1 #K2 #_ #m #H destruct
@@ -69,18 +69,18 @@ fact lveq_inv_succ_sn_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
 ]
 qed-.
 
-lemma lveq_inv_succ_sn: ∀L1,K2,n1,n2. L1 ≋ⓧ*[↑n1, n2] K2 →
-                        ∃∃K1. K1 ≋ⓧ*[n1, 0] K2 & K1.ⓧ = L1 & 0 = n2.
+lemma lveq_inv_succ_sn: ∀L1,K2,n1,n2. L1 ≋ⓧ*[↑n1,n2] K2 →
+                        ∃∃K1. K1 ≋ⓧ*[n1,0] K2 & K1.ⓧ = L1 & 0 = n2.
 /2 width=3 by lveq_inv_succ_sn_aux/ qed-.
 
-lemma lveq_inv_succ_dx: ∀K1,L2,n1,n2. K1 ≋ⓧ*[n1, ↑n2] L2 →
-                        ∃∃K2. K1 ≋ⓧ*[0, n2] K2 & K2.ⓧ = L2 & 0 = n1.
+lemma lveq_inv_succ_dx: ∀K1,L2,n1,n2. K1 ≋ⓧ*[n1,↑n2] L2 →
+                        ∃∃K2. K1 ≋ⓧ*[0,n2] K2 & K2.ⓧ = L2 & 0 = n1.
 #K1 #L2 #n1 #n2 #H
 lapply (lveq_sym … H) -H #H
 elim (lveq_inv_succ_sn … H) -H /3 width=3 by lveq_sym, ex3_intro/
 qed-.
 
-fact lveq_inv_succ_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
+fact lveq_inv_succ_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1,n2] L2 →
                         ∀m1,m2. ↑m1 = n1 → ↑m2 = n2 → ⊥.
 #L1 #L2 #n1 #n2 * -L1 -L2 -n1 -n2
 [1: #m1 #m2 #H1 #H2 destruct
@@ -89,17 +89,17 @@ fact lveq_inv_succ_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
 ]
 qed-.
 
-lemma lveq_inv_succ: ∀L1,L2,n1,n2. L1 ≋ⓧ*[↑n1, ↑n2] L2 → ⊥.
+lemma lveq_inv_succ: ∀L1,L2,n1,n2. L1 ≋ⓧ*[↑n1,↑n2] L2 → ⊥.
 /2 width=9 by lveq_inv_succ_aux/ qed-.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma lveq_inv_bind: ∀I1,I2,K1,K2. K1.ⓘ{I1} ≋ⓧ*[0, 0] K2.ⓘ{I2} → K1 ≋ⓧ*[0, 0] K2.
+lemma lveq_inv_bind: ∀I1,I2,K1,K2. K1.ⓘ{I1} ≋ⓧ*[0,0] K2.ⓘ{I2} → K1 ≋ⓧ*[0,0] K2.
 #I1 #I2 #K1 #K2 #H
 elim (lveq_inv_zero … H) -H * [| #Z1 #Z2 #Y1 #Y2 #HY ] #H1 #H2 destruct //
 qed-.
   
-lemma lveq_inv_atom_atom: ∀n1,n2. ⋆ ≋ⓧ*[n1, n2] ⋆ → ∧∧ 0 = n1 & 0 = n2.
+lemma lveq_inv_atom_atom: ∀n1,n2. ⋆ ≋ⓧ*[n1,n2] ⋆ → ∧∧ 0 = n1 & 0 = n2.
 * [2: #n1 ] * [2,4: #n2 ] #H
 [ elim (lveq_inv_succ … H)
 | elim (lveq_inv_succ_dx … H) -H #Y #_ #H1 #H2 destruct
@@ -108,8 +108,8 @@ lemma lveq_inv_atom_atom: ∀n1,n2. ⋆ ≋ⓧ*[n1, n2] ⋆ → ∧∧ 0 = n1 &
 ]
 qed-.
 
-lemma lveq_inv_bind_atom: ∀I1,K1,n1,n2. K1.ⓘ{I1} ≋ⓧ*[n1, n2] ⋆ →
-                          ∃∃m1. K1 ≋ⓧ*[m1, 0] ⋆ & BUnit Void = I1 & ↑m1 = n1 & 0 = n2.
+lemma lveq_inv_bind_atom: ∀I1,K1,n1,n2. K1.ⓘ{I1} ≋ⓧ*[n1,n2] ⋆ →
+                          ∃∃m1. K1 ≋ⓧ*[m1,0] ⋆ & BUnit Void = I1 & ↑m1 = n1 & 0 = n2.
 #I1 #K1 * [2: #n1 ] * [2,4: #n2 ] #H
 [ elim (lveq_inv_succ … H)
 | elim (lveq_inv_succ_dx … H) -H #Y #_ #H1 #H2 destruct
@@ -121,16 +121,16 @@ lemma lveq_inv_bind_atom: ∀I1,K1,n1,n2. K1.ⓘ{I1} ≋ⓧ*[n1, n2] ⋆ →
 ]
 qed-.
 
-lemma lveq_inv_atom_bind: ∀I2,K2,n1,n2. ⋆ ≋ⓧ*[n1, n2] K2.ⓘ{I2} →
-                          ∃∃m2. ⋆ ≋ⓧ*[0, m2] K2 & BUnit Void = I2 & 0 = n1 & ↑m2 = n2.
+lemma lveq_inv_atom_bind: ∀I2,K2,n1,n2. ⋆ ≋ⓧ*[n1,n2] K2.ⓘ{I2} →
+                          ∃∃m2. ⋆ ≋ⓧ*[0,m2] K2 & BUnit Void = I2 & 0 = n1 & ↑m2 = n2.
 #I2 #K2 #n1 #n2 #H
 lapply (lveq_sym … H) -H #H
 elim (lveq_inv_bind_atom … H) -H
 /3 width=3 by lveq_sym, ex4_intro/
 qed-.
 
-lemma lveq_inv_pair_pair: ∀I1,I2,K1,K2,V1,V2,n1,n2. K1.ⓑ{I1}V1 ≋ⓧ*[n1, n2] K2.ⓑ{I2}V2 →
-                          ∧∧ K1 ≋ⓧ*[0, 0] K2 & 0 = n1 & 0 = n2.
+lemma lveq_inv_pair_pair: ∀I1,I2,K1,K2,V1,V2,n1,n2. K1.ⓑ{I1}V1 ≋ⓧ*[n1,n2] K2.ⓑ{I2}V2 →
+                          ∧∧ K1 ≋ⓧ*[0,0] K2 & 0 = n1 & 0 = n2.
 #I1 #I2 #K1 #K2 #V1 #V2 * [2: #n1 ] * [2,4: #n2 ] #H
 [ elim (lveq_inv_succ … H)
 | elim (lveq_inv_succ_dx … H) -H #Y #_ #H1 #H2 destruct
@@ -142,14 +142,14 @@ lemma lveq_inv_pair_pair: ∀I1,I2,K1,K2,V1,V2,n1,n2. K1.ⓑ{I1}V1 ≋ⓧ*[n1, n
 ]
 qed-.
 
-lemma lveq_inv_void_succ_sn: ∀L1,L2,n1,n2. L1.ⓧ ≋ⓧ*[↑n1, n2] L2 →
-                             ∧∧ L1 ≋ ⓧ*[n1, 0] L2 & 0 = n2.
+lemma lveq_inv_void_succ_sn: ∀L1,L2,n1,n2. L1.ⓧ ≋ⓧ*[↑n1,n2] L2 →
+                             ∧∧ L1 ≋ ⓧ*[n1,0] L2 & 0 = n2.
 #L1 #L2 #n1 #n2 #H
 elim (lveq_inv_succ_sn … H) -H #Y #HY #H1 #H2 destruct /2 width=1 by conj/
 qed-.
 
-lemma lveq_inv_void_succ_dx: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, ↑n2] L2.ⓧ →
-                             ∧∧ L1 ≋ ⓧ*[0, n2] L2 & 0 = n1.
+lemma lveq_inv_void_succ_dx: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1,↑n2] L2.ⓧ →
+                             ∧∧ L1 ≋ ⓧ*[0,n2] L2 & 0 = n1.
 #L1 #L2 #n1 #n2 #H
 lapply (lveq_sym … H) -H #H
 elim (lveq_inv_void_succ_sn … H) -H
@@ -158,19 +158,19 @@ qed-.
 
 (* Advanced forward lemmas **************************************************)
 
-lemma lveq_fwd_gen: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
+lemma lveq_fwd_gen: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1,n2] L2 →
                     ∨∨ 0 = n1 | 0 = n2.
 #L1 #L2 * [2: #n1 ] * [2,4: #n2 ] #H
 [ elim (lveq_inv_succ … H) ]
 /2 width=1 by or_introl, or_intror/
 qed-.
 
-lemma lveq_fwd_pair_sn: ∀I1,K1,L2,V1,n1,n2. K1.ⓑ{I1}V1 ≋ⓧ*[n1, n2] L2 → 0 = n1.
+lemma lveq_fwd_pair_sn: ∀I1,K1,L2,V1,n1,n2. K1.ⓑ{I1}V1 ≋ⓧ*[n1,n2] L2 → 0 = n1.
 #I1 #K1 #L2 #V1 * [2: #n1 ] // * [2: #n2 ] #H
 [ elim (lveq_inv_succ … H)
 | elim (lveq_inv_succ_sn … H) -H #Y #_ #H1 #H2 destruct
 ]
 qed-.
 
-lemma lveq_fwd_pair_dx: ∀I2,L1,K2,V2,n1,n2. L1 ≋ⓧ*[n1, n2] K2.ⓑ{I2}V2 → 0 = n2.
+lemma lveq_fwd_pair_dx: ∀I2,L1,K2,V2,n1,n2. L1 ≋ⓧ*[n1,n2] K2.ⓑ{I2}V2 → 0 = n2.
 /3 width=6 by lveq_fwd_pair_sn, lveq_sym/ qed-.
index 104d2b8b988d4c0e5d30b3974fc930c669b52a94..8ae0a99bec6b6407d8b6ff454012111427c3ed63 100644 (file)
@@ -19,7 +19,7 @@ include "static_2/syntax/lveq.ma".
 
 (* Properties with length for local environments ****************************)
 
-lemma lveq_length_eq: ∀L1,L2. |L1| = |L2| → L1 ≋ⓧ*[0, 0] L2.
+lemma lveq_length_eq: ∀L1,L2. |L1| = |L2| → L1 ≋ⓧ*[0,0] L2.
 #L1 elim L1 -L1
 [ #Y2 #H >(length_inv_zero_sn … H) -Y2 /2 width=3 by lveq_atom, ex_intro/
 | #K1 #I1 #IH #Y2 #H
@@ -30,69 +30,69 @@ qed.
 
 (* Forward lemmas with length for local environments ************************)
 
-lemma lveq_fwd_length_le_sn: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → n1 ≤ |L1|.
+lemma lveq_fwd_length_le_sn: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1,n2] L2 → n1 ≤ |L1|.
 #L1 #L2 #n1 #n2 #H elim H -L1 -L2 -n1 -n2 normalize
 /2 width=1 by le_S_S/
 qed-.
 
-lemma lveq_fwd_length_le_dx: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → n2 ≤ |L2|.
+lemma lveq_fwd_length_le_dx: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1,n2] L2 → n2 ≤ |L2|.
 #L1 #L2 #n1 #n2 #H elim H -L1 -L2 -n1 -n2 normalize
 /2 width=1 by le_S_S/
 qed-.
 
-lemma lveq_fwd_length: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
+lemma lveq_fwd_length: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1,n2] L2 →
                        ∧∧ |L1|-|L2| = n1 & |L2|-|L1| = n2.
 #L1 #L2 #n1 #n2 #H elim H -L1 -L2 -n1 -n2 /2 width=1 by conj/
 #K1 #K2 #n #_ * #H1 #H2 >length_bind /3 width=1 by minus_Sn_m, conj/
 qed-.
 
-lemma lveq_length_fwd_sn: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → |L1| ≤ |L2| → 0 = n1.
+lemma lveq_length_fwd_sn: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1,n2] L2 → |L1| ≤ |L2| → 0 = n1.
 #L1 #L2 #n1 #n2 #H #HL
 elim (lveq_fwd_length … H) -H
 >(eq_minus_O … HL) //
 qed-.
 
-lemma lveq_length_fwd_dx: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → |L2| ≤ |L1| → 0 = n2.
+lemma lveq_length_fwd_dx: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1,n2] L2 → |L2| ≤ |L1| → 0 = n2.
 #L1 #L2 #n1 #n2 #H #HL
 elim (lveq_fwd_length … H) -H
 >(eq_minus_O … HL) //
 qed-.
 
-lemma lveq_inj_length: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
+lemma lveq_inj_length: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1,n2] L2 →
                        |L1| = |L2| → ∧∧ 0 = n1 & 0 = n2.
 #L1 #L2 #n1 #n2 #H #HL
 elim (lveq_fwd_length … H) -H
 >HL -HL /2 width=1 by conj/ 
 qed-.
 
-lemma lveq_fwd_length_plus: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
+lemma lveq_fwd_length_plus: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1,n2] L2 →
                             |L1| + n2 = |L2| + n1.
 #L1 #L2 #n1 #n2 #H elim H -L1 -L2 -n1 -n2 normalize
 /2 width=2 by injective_plus_r/
 qed-.
 
-lemma lveq_fwd_length_eq: ∀L1,L2. L1 ≋ⓧ*[0, 0] L2 → |L1| = |L2|.
+lemma lveq_fwd_length_eq: ∀L1,L2. L1 ≋ⓧ*[0,0] L2 → |L1| = |L2|.
 /3 width=2 by lveq_fwd_length_plus, injective_plus_l/ qed-.
 
-lemma lveq_fwd_length_minus: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
+lemma lveq_fwd_length_minus: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1,n2] L2 →
                              |L1| - n1 = |L2| - n2.
 /3 width=3 by lveq_fwd_length_plus, lveq_fwd_length_le_dx, lveq_fwd_length_le_sn, plus_to_minus_2/ qed-.
 
 lemma lveq_fwd_abst_bind_length_le: ∀I1,I2,L1,L2,V1,n1,n2.
-                                    L1.ⓑ{I1}V1 ≋ⓧ*[n1, n2] L2.ⓘ{I2} → |L1| ≤ |L2|.
+                                    L1.ⓑ{I1}V1 ≋ⓧ*[n1,n2] L2.ⓘ{I2} → |L1| ≤ |L2|.
 #I1 #I2 #L1 #L2 #V1 #n1 #n2 #HL
 lapply (lveq_fwd_pair_sn … HL) #H destruct
 elim (lveq_fwd_length … HL) -HL >length_bind >length_bind //
 qed-.
 
 lemma lveq_fwd_bind_abst_length_le: ∀I1,I2,L1,L2,V2,n1,n2.
-                                    L1.ⓘ{I1} ≋ⓧ*[n1, n2] L2.ⓑ{I2}V2 → |L2| ≤ |L1|.
+                                    L1.ⓘ{I1} ≋ⓧ*[n1,n2] L2.ⓑ{I2}V2 → |L2| ≤ |L1|.
 /3 width=6 by lveq_fwd_abst_bind_length_le, lveq_sym/ qed-.
 
 (* Inversion lemmas with length for local environments **********************)
 
-lemma lveq_inv_void_dx_length: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2.ⓧ → |L1| ≤ |L2| →
-                               ∃∃m2. L1 ≋ ⓧ*[n1, m2] L2 & 0 = n1 & ↑m2 = n2.
+lemma lveq_inv_void_dx_length: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1,n2] L2.ⓧ → |L1| ≤ |L2| →
+                               ∃∃m2. L1 ≋ ⓧ*[n1,m2] L2 & 0 = n1 & ↑m2 = n2.
 #L1 #L2 #n1 #n2 #H #HL12
 lapply (lveq_fwd_length_plus … H) normalize >plus_n_Sm #H0
 lapply (plus2_inv_le_sn … H0 HL12) -H0 -HL12 #H0
@@ -100,8 +100,8 @@ elim (le_inv_S1 … H0) -H0 #m2 #_ #H0 destruct
 elim (lveq_inv_void_succ_dx … H) -H /2 width=3 by ex3_intro/
 qed-.
 
-lemma lveq_inv_void_sn_length: ∀L1,L2,n1,n2. L1.ⓧ ≋ⓧ*[n1, n2] L2 → |L2| ≤ |L1| →
-                               ∃∃m1. L1 ≋ ⓧ*[m1, n2] L2 & ↑m1 = n1 & 0 = n2.
+lemma lveq_inv_void_sn_length: ∀L1,L2,n1,n2. L1.ⓧ ≋ⓧ*[n1,n2] L2 → |L2| ≤ |L1| →
+                               ∃∃m1. L1 ≋ ⓧ*[m1,n2] L2 & ↑m1 = n1 & 0 = n2.
 #L1 #L2 #n1 #n2 #H #HL
 lapply (lveq_sym … H) -H #H
 elim (lveq_inv_void_dx_length … H HL) -H -HL
index 8ac40a55f43b23f89d44ae1dc35381a7358507bd..c0c8cf1abfba2c9b32f208839e8351ccb7bcb663 100644 (file)
@@ -18,16 +18,16 @@ include "static_2/syntax/lveq_length.ma".
 
 (* Main inversion lemmas ****************************************************)
 
-theorem lveq_inv_bind: ∀K1,K2. K1 ≋ⓧ*[0, 0] K2 →
-                       ∀I1,I2,m1,m2. K1.ⓘ{I1} ≋ⓧ*[m1, m2] K2.ⓘ{I2} →
+theorem lveq_inv_bind: ∀K1,K2. K1 ≋ⓧ*[0,0] K2 →
+                       ∀I1,I2,m1,m2. K1.ⓘ{I1} ≋ⓧ*[m1,m2] K2.ⓘ{I2} →
                        ∧∧ 0 = m1 & 0 = m2.
 #K1 #K2 #HK #I1 #I2 #m1 #m2 #H
 lapply (lveq_fwd_length_eq … HK) -HK #HK
 elim (lveq_inj_length … H) -H normalize /3 width=1 by conj, eq_f/
 qed-.
 
-theorem lveq_inj: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
-                  ∀m1,m2. L1 ≋ⓧ*[m1, m2] L2 →
+theorem lveq_inj: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1,n2] L2 →
+                  ∀m1,m2. L1 ≋ⓧ*[m1,m2] L2 →
                   ∧∧ n1 = m1 & n2 = m2.
 #L1 #L2 #n1 #n2 #Hn #m1 #m2 #Hm
 elim (lveq_fwd_length … Hn) -Hn #H1 #H2 destruct
@@ -36,8 +36,8 @@ elim (lveq_fwd_length … Hm) -Hm #H1 #H2 destruct
 qed-.
 
 theorem lveq_inj_void_sn_ge: ∀K1,K2. |K2| ≤ |K1| →
-                             ∀n1,n2. K1 ≋ⓧ*[n1, n2] K2 →
-                             ∀m1,m2. K1.ⓧ ≋ⓧ*[m1, m2] K2 →
+                             ∀n1,n2. K1 ≋ⓧ*[n1,n2] K2 →
+                             ∀m1,m2. K1.ⓧ ≋ⓧ*[m1,m2] K2 →
                              ∧∧ ↑n1 = m1 & 0 = m2 & 0 = n2.
 #L1 #L2 #HL #n1 #n2 #Hn #m1 #m2 #Hm
 elim (lveq_fwd_length … Hn) -Hn #H1 #H2 destruct
@@ -47,7 +47,7 @@ elim (lveq_fwd_length … Hm) -Hm #H1 #H2 destruct
 qed-.
 
 theorem lveq_inj_void_dx_le: ∀K1,K2. |K1| ≤ |K2| →
-                             ∀n1,n2. K1 ≋ⓧ*[n1, n2] K2 →
-                             ∀m1,m2. K1 ≋ⓧ*[m1, m2] K2.ⓧ →
+                             ∀n1,n2. K1 ≋ⓧ*[n1,n2] K2 →
+                             ∀m1,m2. K1 ≋ⓧ*[m1,m2] K2.ⓧ →
                              ∧∧ ↑n2 = m2 & 0 = m1 & 0 = n1.
 /3 width=5 by lveq_inj_void_sn_ge, lveq_sym/ qed-. (* auto: 2x lveq_sym *)
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/sd.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/sd.ma
new file mode 100644 (file)
index 0000000..533a79e
--- /dev/null
@@ -0,0 +1,68 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/sh.ma".
+
+(* SORT DEGREE **************************************************************)
+
+(* sort degree specification *)
+record sd: Type[0] ≝ {
+(* degree of the sort *)
+   deg: relation nat
+}.
+
+(* sort degree postulates *)
+record sd_props (h) (o): Prop ≝ {
+(* functional relation axioms *)
+   deg_total: ∀s. ∃d. deg o s d;
+   deg_mono : ∀s,d1,d2. deg o s d1 → deg o s d2 → d1 = d2;
+(* compatibility condition *)
+   deg_next : ∀s,d. deg o s d → deg o (⫯[h]s) (↓d)
+}.
+
+(* Notable specifications ***************************************************)
+
+definition deg_O: relation nat ≝ λs,d. d = 0.
+
+definition sd_O: sd ≝ mk_sd deg_O.
+
+lemma sd_O_props (h): sd_props h sd_O ≝ mk_sd_props ….
+/2 width=2 by le_n_O_to_eq, le_n, ex_intro/ qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma deg_inv_pred (h) (o): sd_props h o →
+      ∀s,d. deg o (⫯[h]s) (↑d) → deg o s (↑↑d).
+#h #o #Ho #s #d #H1
+elim (deg_total … Ho s) #d0 #H0
+lapply (deg_next … Ho … H0) #H2
+lapply (deg_mono … Ho … H1 H2) -H1 -H2 #H >H >S_pred
+/2 width=2 by ltn_to_ltO/
+qed-.
+
+lemma deg_inv_prec (h) (o): sd_props h o →
+      ∀s,n,d. deg o ((next h)^n s) (↑d) → deg o s (↑(d+n)).
+#h #o #H0 #s #n elim n -n normalize /3 width=3 by deg_inv_pred/
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma deg_iter (h) (o): sd_props h o →
+      ∀s,d,n. deg o s d → deg o ((next h)^n s) (d-n).
+#h #o #Ho #s #d #n elim n -n normalize /3 width=1 by deg_next/
+qed.
+
+lemma deg_next_SO (h) (o): sd_props h o →
+      ∀s,d. deg o s (↑d) → deg o (next h s) d.
+/2 width=1 by deg_next/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/sd_d.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/sd_d.ma
new file mode 100644 (file)
index 0000000..56c80d6
--- /dev/null
@@ -0,0 +1,99 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "ground_2/pull/pull_2.ma".
+include "static_2/syntax/sh_props.ma".
+include "static_2/syntax/sd.ma".
+
+(* SORT DEGREE **************************************************************)
+
+(* Basic_2A1: includes: deg_SO_pos *)
+inductive deg_SO (h) (s) (s0): predicate nat ≝
+| deg_SO_succ : ∀n. (next h)^n s0 = s → deg_SO h s s0 (↑n)
+| deg_SO_zero: (∀n. (next h)^n s0 = s → ⊥) → deg_SO h s s0 0
+.
+
+fact deg_SO_inv_succ_aux (h) (s) (s0):
+     ∀n0. deg_SO h s s0 n0 → ∀n. n0 = ↑n → (next h)^n s0 = s.
+#h #s #s0 #n0 * -n0
+[ #n #Hn #x #H destruct //
+| #_ #x #H destruct
+]
+qed-.
+
+(* Basic_2A1: was: deg_SO_inv_pos *)
+lemma deg_SO_inv_succ (h) (s) (s0):
+      ∀n. deg_SO h s s0 (↑n) → (next h)^n s0 = s.
+/2 width=3 by deg_SO_inv_succ_aux/ qed-.
+
+lemma deg_SO_refl (h) (s): deg_SO h s s 1.
+#h #s @(deg_SO_succ … 0 ?) //
+qed.
+
+definition sd_SO (h) (s): sd ≝ mk_sd (deg_SO h s).
+
+lemma sd_SO_props (h) (s): sh_decidable h → sh_acyclic h →
+      sd_props h (sd_SO h s).
+#h #s #Hhd #Hha
+@mk_sd_props
+[ #s0
+  elim (nexts_dec … Hhd s0 s) -Hhd
+  [ * /3 width=2 by deg_SO_succ, ex_intro/
+  | /5 width=2 by deg_SO_zero, ex_intro/
+  ]
+| #s0 #d1 #d2 * [ #n1 ] #H1 * [1,3: #n2 ] #H2
+  [ < H2 in H1; -H2 #H
+    lapply (nexts_inj … Hha … H) -H #H destruct //
+  | elim H1 /2 width=2 by ex_intro/
+  | elim H2 /2 width=2 by ex_intro/
+  | //
+  ]
+| #s0 #d *
+  [ #n #H destruct cases n -n normalize
+    [ @deg_SO_zero #n >iter_n_Sm #H
+      lapply (nexts_inj … Hha … (↑n) 0 H) -H #H destruct
+    | #n @deg_SO_succ >iter_n_Sm //
+    ]
+  | #H0 @deg_SO_zero #n >iter_n_Sm #H destruct
+    /2 width=2 by/
+  ]
+]
+qed.
+
+rec definition sd_d (h:?) (s:?) (d:?) on d: sd ≝
+   match d with
+   [ O   ⇒ sd_O
+   | S d ⇒ match d with
+           [ O ⇒ sd_SO h s
+           | _ ⇒ sd_d h (next h s) d
+           ]
+   ].
+
+lemma sd_d_props (h) (s) (d): sh_decidable h → sh_acyclic h →
+      sd_props h (sd_d h s d).
+#h @pull_2 * [ // ]
+#d elim d -d /2 width=1 by sd_SO_props/
+qed.
+
+(* Properties with sd_d *****************************************************)
+
+lemma sd_d_SS (h):
+      ∀s,d. sd_d h s (↑↑d) = sd_d h (⫯[h]s) (↑d).
+// qed.
+
+lemma sd_d_correct (h): sh_decidable h → sh_acyclic h →
+      ∀s,d. deg (sd_d h s d) s d.
+#h #Hhd #Hha @pull_2 #d elim d -d [ // ]
+#d elim d -d /3 width=3 by deg_inv_pred, sd_d_props/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/sd_lt.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/sd_lt.ma
new file mode 100644 (file)
index 0000000..238d1a2
--- /dev/null
@@ -0,0 +1,32 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/sh_lt.ma".
+include "static_2/syntax/sd_d.ma".
+
+(* SORT DEGREE **************************************************************)
+
+(* Properties with sh_lt ****************************************************)
+
+lemma deg_SO_gt (h): sh_lt h →
+      ∀s1,s2. s1 < s2 → deg_SO h s1 s2 0.
+#h #Hh #s1 #s2 #Hs12 @deg_SO_zero * normalize
+[ #H destruct
+  elim (lt_refl_false … Hs12)
+| #n #H
+  lapply (next_lt … Hh ((next h)^n s2)) >H -H #H
+  lapply (transitive_lt … H Hs12) -s1 #H1
+  /3 width=5 by lt_le_false, nexts_le/ (* full auto too slow *)
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/sh.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/sh.ma
new file mode 100644 (file)
index 0000000..bb7aacd
--- /dev/null
@@ -0,0 +1,26 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "ground_2/lib/arith.ma".
+include "static_2/notation/functions/upspoon_2.ma".
+
+(* SORT HIERARCHY ***********************************************************)
+
+(* sort hierarchy specification *)
+record sh: Type[0] ≝ {
+  next: nat → nat (* next sort in the hierarchy *)
+}.
+
+interpretation "next sort (sort hierarchy)"
+   'UpSpoon h s = (next h s).
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/sh_lt.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/sh_lt.ma
new file mode 100644 (file)
index 0000000..4944364
--- /dev/null
@@ -0,0 +1,41 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/sh_props.ma".
+
+(* SORT HIERARCHY ***********************************************************)
+
+(* strict monotonicity condition *)
+record sh_lt (h): Prop ≝
+{
+  next_lt: ∀s. s < ⫯[h]s
+}.
+
+(* Basic properties *********************************************************)
+
+lemma nexts_le (h): sh_lt h → ∀s,n. s ≤ (next h)^n s.
+#h #Hh #s #n elim n -n [ // ] normalize #n #IH
+lapply (next_lt … Hh ((next h)^n s)) #H
+lapply (le_to_lt_to_lt … IH H) -IH -H /2 width=2 by lt_to_le/
+qed.
+
+lemma nexts_lt (h): sh_lt h → ∀s,n. s < (next h)^(↑n) s.
+#h #Hh #s #n normalize
+lapply (nexts_le … Hh s n) #H
+@(le_to_lt_to_lt … H) /2 width=1 by next_lt/
+qed.
+
+axiom sh_lt_dec (h): sh_lt h → sh_decidable h.
+
+axiom sh_lt_acyclic (h): sh_lt h → sh_acyclic h.
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/sh_props.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/sh_props.ma
new file mode 100644 (file)
index 0000000..4302026
--- /dev/null
@@ -0,0 +1,29 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/sh.ma".
+
+(* SORT HIERARCHY ***********************************************************)
+
+(* acyclicity condition *)
+record sh_acyclic (h): Prop ≝
+{
+  nexts_inj: ∀s,n1,n2. (next h)^n1 s = (next h)^n2 s → n1 = n2
+}.
+
+(* decidability condition *)
+record sh_decidable (h): Prop ≝
+{
+  nexts_dec: ∀s1,s2. Decidable (∃n. (next h)^n s1 = s2)
+}.
index 828e2ad0fbdb4b985f86efe6a5b1699368753217..60c1e4d13750ced7ac2d026d2b350cf89e4b762f 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
-include "static_2/notation/relations/stareq_4.ma".
-include "static_2/syntax/item_sd.ma".
+include "static_2/notation/relations/stareq_2.ma".
 include "static_2/syntax/term.ma".
 
-(* DEGREE-BASED EQUIVALENCE ON TERMS ****************************************)
+(* SORT-IRRELEVANT EQUIVALENCE ON TERMS *************************************)
 
-inductive tdeq (h) (o): relation term ≝
-| tdeq_sort: ∀s1,s2,d. deg h o s1 d → deg h o s2 d → tdeq h o (⋆s1) (⋆s2)
-| tdeq_lref: ∀i. tdeq h o (#i) (#i)
-| tdeq_gref: ∀l. tdeq h o (§l) (§l)
-| tdeq_pair: ∀I,V1,V2,T1,T2. tdeq h o V1 V2 → tdeq h o T1 T2 → tdeq h o (②{I}V1.T1) (②{I}V2.T2)
+inductive tdeq: relation term ≝
+| tdeq_sort: ∀s1,s2. tdeq (⋆s1) (⋆s2)
+| tdeq_lref: ∀i. tdeq (#i) (#i)
+| tdeq_gref: ∀l. tdeq (§l) (§l)
+| tdeq_pair: ∀I,V1,V2,T1,T2. tdeq V1 V2 → tdeq T1 T2 → tdeq (②{I}V1.T1) (②{I}V2.T2)
 .
 
 interpretation
-   "context-free degree-based equivalence (term)"
-   'StarEq h o T1 T2 = (tdeq h o T1 T2).
+   "context-free sort-irrelevant equivalence (term)"
+   'StarEq T1 T2 = (tdeq T1 T2).
 
 (* Basic properties *********************************************************)
 
-lemma tdeq_refl: ∀h,o. reflexive … (tdeq h o).
-#h #o #T elim T -T /2 width=1 by tdeq_pair/
+lemma tdeq_refl: reflexive … tdeq.
+#T elim T -T /2 width=1 by tdeq_pair/
 * /2 width=1 by tdeq_lref, tdeq_gref/
-#s elim (deg_total h o s) /2 width=3 by tdeq_sort/
 qed.
 
-lemma tdeq_sym: ∀h,o. symmetric … (tdeq h o).
-#h #o #T1 #T2 #H elim H -T1 -T2
+lemma tdeq_sym: symmetric … tdeq.
+#T1 #T2 #H elim H -T1 -T2
 /2 width=3 by tdeq_sort, tdeq_lref, tdeq_gref, tdeq_pair/
 qed-.
 
 (* Basic inversion lemmas ***************************************************)
 
-fact tdeq_inv_sort1_aux: ∀h,o,X,Y. X ≛[h, o] Y → ∀s1. X = ⋆s1 →
-                         ∃∃s2,d. deg h o s1 d & deg h o s2 d & Y = ⋆s2.
-#h #o #X #Y * -X -Y
-[ #s1 #s2 #d #Hs1 #Hs2 #s #H destruct /2 width=5 by ex3_2_intro/
+fact tdeq_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 tdeq_inv_sort1: ∀h,o,Y,s1. ⋆s1 ≛[h, o] Y →
-                      ∃∃s2,d. deg h o s1 d & deg h o s2 d & Y = ⋆s2.
-/2 width=3 by tdeq_inv_sort1_aux/ qed-.
+lemma tdeq_inv_sort1: ∀Y,s1. ⋆s1 ≛ Y →
+                      ∃s2. Y = ⋆s2.
+/2 width=4 by tdeq_inv_sort1_aux/ qed-.
 
-fact tdeq_inv_lref1_aux: ∀h,o,X,Y. X ≛[h, o] Y → ∀i. X = #i → Y = #i.
-#h #o #X #Y * -X -Y //
-[ #s1 #s2 #d #_ #_ #j #H destruct
+fact tdeq_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 tdeq_inv_lref1: ∀h,o,Y,i. #i ≛[h, o] Y → Y = #i.
+lemma tdeq_inv_lref1: ∀Y,i. #i ≛ Y → Y = #i.
 /2 width=5 by tdeq_inv_lref1_aux/ qed-.
 
-fact tdeq_inv_gref1_aux: ∀h,o,X,Y. X ≛[h, o] Y → ∀l. X = §l → Y = §l.
-#h #o #X #Y * -X -Y //
-[ #s1 #s2 #d #_ #_ #k #H destruct
+fact tdeq_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 tdeq_inv_gref1: ∀h,o,Y,l. §l ≛[h, o] Y → Y = §l.
+lemma tdeq_inv_gref1: ∀Y,l. §l ≛ Y → Y = §l.
 /2 width=5 by tdeq_inv_gref1_aux/ qed-.
 
-fact tdeq_inv_pair1_aux: ∀h,o,X,Y. X ≛[h, o] Y → ∀I,V1,T1. X = ②{I}V1.T1 →
-                         ∃∃V2,T2. V1 ≛[h, o] V2 & T1 ≛[h, o] T2 & Y = ②{I}V2.T2.
-#h #o #X #Y * -X -Y
-[ #s1 #s2 #d #_ #_ #J #W1 #U1 #H destruct
+fact tdeq_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/
 ]
 qed-.
 
-lemma tdeq_inv_pair1: ∀h,o,I,V1,T1,Y. ②{I}V1.T1 ≛[h, o] Y →
-                      ∃∃V2,T2. V1 ≛[h, o] V2 & T1 ≛[h, o] T2 & Y = ②{I}V2.T2.
+lemma tdeq_inv_pair1: ∀I,V1,T1,Y. ②{I}V1.T1 ≛ Y →
+                      ∃∃V2,T2. V1 ≛ V2 & T1 ≛ T2 & Y = ②{I}V2.T2.
 /2 width=3 by tdeq_inv_pair1_aux/ qed-.
 
-lemma tdeq_inv_pair2: ∀h,o,I,X1,V2,T2. X1 ≛[h, o] ②{I}V2.T2 →
-                      ∃∃V1,T1. V1 ≛[h, o] V2 & T1 ≛[h, o] T2 & X1 = ②{I}V1.T1.
-#h #o #I #X1 #V2 #T2 #H
-elim (tdeq_inv_pair1 h o I V2 T2 X1)
+lemma tdeq_inv_sort2: ∀X1,s2. X1 ≛ ⋆s2 →
+                      ∃s1. X1 = ⋆s1.
+#X1 #s2 #H
+elim (tdeq_inv_sort1 X1 s2)
+/2 width=2 by tdeq_sym, ex_intro/
+qed-.
+
+lemma tdeq_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 (tdeq_inv_pair1 I V2 T2 X1)
 [ #V1 #T1 #HV #HT #H destruct ]
 /3 width=5 by tdeq_sym, ex3_2_intro/
 qed-.
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma tdeq_inv_sort1_deg: ∀h,o,Y,s1. ⋆s1 ≛[h, o] Y → ∀d. deg h o s1 d →
-                          ∃∃s2. deg h o s2 d & Y = ⋆s2.
-#h #o #Y #s1 #H #d #Hs1 elim (tdeq_inv_sort1 … H) -H
-#s2 #x #Hx <(deg_mono h o … Hx … Hs1) -s1 -d /2 width=3 by ex2_intro/
-qed-.
-
-lemma tdeq_inv_sort_deg: ∀h,o,s1,s2. ⋆s1 ≛[h, o] ⋆s2 →
-                         ∀d1,d2. deg h o s1 d1 → deg h o s2 d2 →
-                         d1 = d2.
-#h #o #s1 #y #H #d1 #d2 #Hs1 #Hy
-elim (tdeq_inv_sort1_deg … H … Hs1) -s1 #s2 #Hs2 #H destruct
-<(deg_mono h o … Hy … Hs2) -s2 -d1 //
-qed-.
-
-lemma tdeq_inv_pair: ∀h,o,I1,I2,V1,V2,T1,T2. ②{I1}V1.T1 ≛[h, o] ②{I2}V2.T2 →
-                     ∧∧ I1 = I2 & V1 ≛[h, o] V2 & T1 ≛[h, o] T2.
-#h #o #I1 #I2 #V1 #V2 #T1 #T2 #H elim (tdeq_inv_pair1 … H) -H
+lemma tdeq_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 (tdeq_inv_pair1 … H) -H
 #V0 #T0 #HV #HT #H destruct /2 width=1 by and3_intro/
 qed-.
 
-lemma tdeq_inv_pair_xy_x: ∀h,o,I,V,T. ②{I}V.T ≛[h, o] V → ⊥.
-#h #o #I #V elim V -V
+lemma tdeq_inv_pair_xy_x: ∀I,V,T. ②{I}V.T ≛ V → ⊥.
+#I #V elim V -V
 [ #J #T #H elim (tdeq_inv_pair1 … H) -H #X #Y #_ #_ #H destruct
 | #J #X #Y #IHX #_ #T #H elim (tdeq_inv_pair … H) -H #H #HY #_ destruct /2 width=2 by/
 ]
 qed-.
 
-lemma tdeq_inv_pair_xy_y: ∀h,o,I,T,V. ②{I}V.T ≛[h, o] T → ⊥.
-#h #o #I #T elim T -T
+lemma tdeq_inv_pair_xy_y: ∀I,T,V. ②{I}V.T ≛ T → ⊥.
+#I #T elim T -T
 [ #J #V #H elim (tdeq_inv_pair1 … H) -H #X #Y #_ #_ #H destruct
 | #J #X #Y #_ #IHY #V #H elim (tdeq_inv_pair … H) -H #H #_ #HY destruct /2 width=2 by/
 ]
@@ -138,23 +129,19 @@ qed-.
 
 (* Basic forward lemmas *****************************************************)
 
-lemma tdeq_fwd_atom1: ∀h,o,I,Y. ⓪{I} ≛[h, o] Y → ∃J. Y = ⓪{J}.
-#h #o * #x #Y #H [ elim (tdeq_inv_sort1 … H) -H ]
+lemma tdeq_fwd_atom1: ∀I,Y. ⓪{I} ≛ Y → ∃J. Y = ⓪{J}.
+* #x #Y #H [ elim (tdeq_inv_sort1 … H) -H ]
 /3 width=4 by tdeq_inv_gref1, tdeq_inv_lref1, ex_intro/
 qed-.
 
 (* Advanced properties ******************************************************)
 
-lemma tdeq_dec: ∀h,o,T1,T2. Decidable (T1 ≛[h, o] T2).
-#h #o #T1 elim T1 -T1 [ * #s1 | #I1 #V1 #T1 #IHV #IHT ] * [1,3,5,7: * #s2 |*: #I2 #V2 #T2 ]
-[ elim (deg_total h o s1) #d1 #H1
-  elim (deg_total h o s2) #d2 #H2
-  elim (eq_nat_dec d1 d2) #Hd12 destruct /3 width=3 by tdeq_sort, or_introl/
-  @or_intror #H
-  lapply (tdeq_inv_sort_deg … H … H1 H2) -H -H1 -H2 /2 width=1 by/
+lemma tdeq_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 tdeq_sort, or_introl/
 |2,3,13:
   @or_intror #H
-  elim (tdeq_inv_sort1 … H) -H #x1 #x2 #_ #_ #H destruct
+  elim (tdeq_inv_sort1 … H) -H #x #H destruct
 |4,6,14:
   @or_intror #H
   lapply (tdeq_inv_lref1 … H) -H #H destruct
@@ -185,13 +172,13 @@ qed-.
 
 (* Negated inversion lemmas *************************************************)
 
-lemma tdneq_inv_pair: ∀h,o,I1,I2,V1,V2,T1,T2.
-                      (②{I1}V1.T1 ≛[h, o] ②{I2}V2.T2 → ⊥) → 
+lemma tdneq_inv_pair: ∀I1,I2,V1,V2,T1,T2.
+                      (②{I1}V1.T1 ≛ ②{I2}V2.T2 → ⊥) → 
                       ∨∨ I1 = I2 → ⊥
-                      |  (V1 ≛[h, o] V2 → ⊥)
-                      |  (T1 ≛[h, o] T2 → ⊥).
-#h #o #I1 #I2 #V1 #V2 #T1 #T2 #H12
+                      |  (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 (tdeq_dec h o V1 V2) /3 width=1 by or3_intro1/
-elim (tdeq_dec h o T1 T2) /4 width=1 by tdeq_pair, or3_intro2/
+elim (tdeq_dec V1 V2) /3 width=1 by or3_intro1/
+elim (tdeq_dec T1 T2) /4 width=1 by tdeq_pair, or3_intro2/
 qed-.
index f13292089072cddf525a5372cac1d7b2abdd4764..09f7c5a7617f5a2988e5a798e6c4cd89509b34ef 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
-include "static_2/notation/relations/stareq_5.ma".
+include "static_2/notation/relations/stareq_3.ma".
 include "static_2/syntax/cext2.ma".
 include "static_2/syntax/tdeq.ma".
 
-(* EXTENDED DEGREE-BASED EQUIVALENCE ****************************************)
+(* EXTENDED SORT-IRRELEVANT EQUIVALENCE *************************************)
 
-definition tdeq_ext: ∀h. sd h → relation bind ≝
-                     λh,o. ext2 (tdeq h o).
+definition tdeq_ext: relation bind ≝
+                     ext2 tdeq.
 
-definition cdeq: ∀h. sd h → relation3 lenv term term ≝
-                 λh,o,L. tdeq h o.
+definition cdeq: relation3 lenv term term ≝
+                 λL. tdeq.
 
-definition cdeq_ext: ∀h. sd h → relation3 lenv bind bind ≝
-                     λh,o. cext2 (cdeq h o).
+definition cdeq_ext: relation3 lenv bind bind ≝
+                     cext2 cdeq.
 
 interpretation
-   "context-free degree-based equivalence (binder)"
-   'StarEq h o I1 I2 = (tdeq_ext h o I1 I2).
+   "context-free sort-irrelevant equivalence (binder)"
+   'StarEq I1 I2 = (tdeq_ext I1 I2).
 
 interpretation
-   "context-dependent degree-based equivalence (term)"
-   'StarEq h o L T1 T2 = (cdeq h o L T1 T2).
+   "context-dependent sort-irrelevant equivalence (term)"
+   'StarEq L T1 T2 = (cdeq L T1 T2).
 
 interpretation
-   "context-dependent degree-based equivalence (binder)"
-   'StarEq h o L I1 I2 = (cdeq_ext h o L I1 I2).
+   "context-dependent sort-irrelevant equivalence (binder)"
+   'StarEq L I1 I2 = (cdeq_ext L I1 I2).
index a8bbec3fd14e17d42c3d15258b65b971f6abf252..3ed01ec19c7ab9321d8648edb8a997ef50101ca4 100644 (file)
 
 include "static_2/syntax/tdeq.ma".
 
-(* DEGREE-BASED EQUIVALENCE ON TERMS ****************************************)
+(* SORT-IRRELEVANT EQUIVALENCE ON TERMS *************************************)
 
 (* Main properties **********************************************************)
 
-theorem tdeq_trans: ∀h,o. Transitive … (tdeq h o).
-#h #o #T1 #T #H elim H -T1 -T
-[ #s1 #s #d #Hs1 #Hs #X #H
-  elim (tdeq_inv_sort1_deg … H … Hs) -s /2 width=3 by tdeq_sort/
+theorem tdeq_trans: Transitive … tdeq.
+#T1 #T #H elim H -T1 -T
+[ #s1 #s #X #H
+  elim (tdeq_inv_sort1 … H) -s /2 width=1 by tdeq_sort/
 | #i1 #i #H <(tdeq_inv_lref1 … H) -H //
 | #l1 #l #H <(tdeq_inv_gref1 … H) -H //
 | #I #V1 #V #T1 #T #_ #_ #IHV #IHT #X #H
@@ -29,22 +29,20 @@ theorem tdeq_trans: ∀h,o. Transitive … (tdeq h o).
 ]
 qed-.
 
-theorem tdeq_canc_sn: ∀h,o. left_cancellable … (tdeq h o).
+theorem tdeq_canc_sn: left_cancellable … tdeq.
 /3 width=3 by tdeq_trans, tdeq_sym/ qed-.
 
-theorem tdeq_canc_dx: ∀h,o. right_cancellable … (tdeq h o).
+theorem tdeq_canc_dx: right_cancellable … tdeq.
 /3 width=3 by tdeq_trans, tdeq_sym/ qed-.
 
-theorem tdeq_repl: ∀h,o,T1,T2. T1 ≛[h, o] T2 →
-                   ∀U1. T1 ≛[h, o] U1 → ∀U2. T2 ≛[h, o] U2 → U1 ≛[h, o] U2.
+theorem tdeq_repl: ∀T1,T2. T1 ≛ T2 →
+                   ∀U1. T1 ≛ U1 → ∀U2. T2 ≛ U2 → U1 ≛ U2.
 /3 width=3 by tdeq_canc_sn, tdeq_trans/ qed-.
 
 (* Negated main properies ***************************************************)
 
-theorem tdeq_tdneq_trans: ∀h,o,T1,T. T1 ≛[h, o] T → ∀T2. (T ≛[h, o] T2 → ⊥) →
-                          T1 ≛[h, o] T2 → ⊥.
+theorem tdeq_tdneq_trans: ∀T1,T. T1 ≛ T → ∀T2. (T ≛ T2 → ⊥) → T1 ≛ T2 → ⊥.
 /3 width=3 by tdeq_canc_sn/ qed-.
 
-theorem tdneq_tdeq_canc_dx: ∀h,o,T1,T. (T1 ≛[h, o] T → ⊥) → ∀T2. T2 ≛[h, o] T →
-                            T1 ≛[h, o] T2 → ⊥.
+theorem tdneq_tdeq_canc_dx: ∀T1,T. (T1 ≛ T → ⊥) → ∀T2. T2 ≛ T → T1 ≛ T2 → ⊥.
 /3 width=3 by tdeq_trans/ qed-.
index 93cce0ffc42f2a142fddbf8217b4d215b68aa690..b0fc86df39784d2b617d14228c26adc45628c734 100644 (file)
@@ -92,6 +92,13 @@ interpretation "native type annotation (term)"
 
 (* Basic properties *********************************************************)
 
+lemma abst_dec (X): ∨∨ ∃∃p,W,T. X = ⓛ{p}W.T
+                     | (∀p,W,T. X = ⓛ{p}W.T → ⊥).
+* [ #I | * [ #p * | #I ] #V #T ]
+[3: /3 width=4 by ex1_3_intro, or_introl/ ]
+@or_intror #q #W #U #H destruct
+qed-.
+
 (* Basic_1: was: term_dec *)
 lemma eq_term_dec: ∀T1,T2:term. Decidable (T1 = T2).
 #T1 elim T1 -T1 #I1 [| #V1 #T1 #IHV1 #IHT1 ] * #I2 [2,4: #V2 #T2 ]
index 4bef6764dcdbb5675777f4628b198881b26afae2..a32b352688a1863982fca23f4848448ac68e04c2 100644 (file)
@@ -12,6 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
+include "ground_2/xoa/ex_1_4.ma".
 include "static_2/notation/relations/simple_1.ma".
 include "static_2/syntax/term.ma".
 
@@ -40,3 +41,11 @@ lemma simple_inv_pair: ∀I,V,T. 𝐒⦃②{I}V.T⦄ → ∃J. I = Flat2 J.
 * /2 width=2 by ex_intro/
 #p #I #V #T #H elim (simple_inv_bind … H)
 qed-.
+
+(* Basic properties *********************************************************)
+
+lemma simple_dec_ex (X): ∨∨ 𝐒⦃X⦄ | ∃∃p,I,T,U. X = ⓑ{p,I}T.U.
+* [ /2 width=1 by simple_atom, or_introl/ ]
+* [| /2 width=1 by simple_flat, or_introl/ ]
+/3 width=5 by ex1_4_intro, or_intror/
+qed-.
index c8d4c974dca82b8436857609d58c565016cf2984..6948a54a8fea6e935b259cb3296570a0bacbda9c 100644 (file)
@@ -31,6 +31,10 @@ lemma tw_pos: ∀T. 1 ≤ ♯{T}.
 #T elim T -T //
 qed.
 
+lemma tw_le_pair_dx (I): ∀V,T. ♯{T} < ♯{②{I}V.T}.
+#I #V #T /2 width=1 by le_S_S/
+qed.
+
 (* Basic_1: removed theorems 11:
             wadd_le wadd_lt wadd_O weight_le weight_eq weight_add_O
             weight_add_S tlt_trans tlt_head_sx tlt_head_dx tlt_wf_ind
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/theq.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/theq.ma
deleted file mode 100644 (file)
index 37c4af7..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM 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/topiso_4.ma".
-include "static_2/syntax/item_sd.ma".
-include "static_2/syntax/term.ma".
-
-(* HEAD EQUIVALENCE FOR TERMS ***********************************************)
-
-(* Basic_2A1: includes: tsts_atom tsts_pair *)
-inductive theq (h) (o): relation term ≝
-| theq_sort: ∀s1,s2,d. deg h o s1 d → deg h o s2 d → theq h o (⋆s1) (⋆s2)
-| theq_lref: ∀i. theq h o (#i) (#i)
-| theq_gref: ∀l. theq h o (§l) (§l)
-| theq_pair: ∀I,V1,V2,T1,T2. theq h o (②{I}V1.T1) (②{I}V2.T2)
-.
-
-interpretation "head equivalence (term)" 'TopIso h o T1 T2 = (theq h o T1 T2).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact theq_inv_sort1_aux: ∀h,o,X,Y. X ⩳[h, o] Y → ∀s1. X = ⋆s1 →
-                         ∃∃s2,d. deg h o s1 d & deg h o s2 d & Y = ⋆s2.
-#h #o #X #Y * -X -Y
-[ #s1 #s2 #d #Hs1 #Hs2 #s #H destruct /2 width=5 by ex3_2_intro/
-| #i #s #H destruct
-| #l #s #H destruct
-| #I #V1 #V2 #T1 #T2 #s #H destruct
-]
-qed-.
-
-(* Basic_1: was just: iso_gen_sort *)
-lemma theq_inv_sort1: ∀h,o,Y,s1. ⋆s1 ⩳[h, o] Y →
-                      ∃∃s2,d. deg h o s1 d & deg h o s2 d & Y = ⋆s2.
-/2 width=3 by theq_inv_sort1_aux/ qed-.
-
-fact theq_inv_lref1_aux: ∀h,o,X,Y. X ⩳[h, o] Y → ∀i. X = #i → Y = #i.
-#h #o #X #Y * -X -Y //
-[ #s1 #s2 #d #_ #_ #j #H destruct
-| #I #V1 #V2 #T1 #T2 #j #H destruct
-]
-qed-.
-
-(* Basic_1: was: iso_gen_lref *)
-lemma theq_inv_lref1: ∀h,o,Y,i. #i ⩳[h, o] Y → Y = #i.
-/2 width=5 by theq_inv_lref1_aux/ qed-.
-
-fact theq_inv_gref1_aux: ∀h,o,X,Y. X ⩳[h, o] Y → ∀l. X = §l → Y = §l.
-#h #o #X #Y * -X -Y //
-[ #s1 #s2 #d #_ #_ #k #H destruct
-| #I #V1 #V2 #T1 #T2 #k #H destruct
-]
-qed-.
-
-lemma theq_inv_gref1: ∀h,o,Y,l. §l ⩳[h, o] Y → Y = §l.
-/2 width=5 by theq_inv_gref1_aux/ qed-.
-
-fact theq_inv_pair1_aux: ∀h,o,T1,T2. T1 ⩳[h, o] T2 →
-                         ∀J,W1,U1. T1 = ②{J}W1.U1 →
-                         ∃∃W2,U2. T2 = ②{J}W2.U2.
-#h #o #T1 #T2 * -T1 -T2
-[ #s1 #s2 #d #_ #_ #J #W1 #U1 #H destruct
-| #i #J #W1 #U1 #H destruct
-| #l #J #W1 #U1 #H destruct
-| #I #V1 #V2 #T1 #T2 #J #W1 #U1 #H destruct /2 width=3 by ex1_2_intro/
-]
-qed-.
-
-(* Basic_1: was: iso_gen_head *)
-(* Basic_2A1: was: tsts_inv_pair1 *)
-lemma theq_inv_pair1: ∀h,o,J,W1,U1,T2. ②{J}W1.U1 ⩳[h, o] T2 →
-                      ∃∃W2,U2. T2 = ②{J}W2. U2.
-/2 width=7 by theq_inv_pair1_aux/ qed-.
-
-fact theq_inv_pair2_aux: ∀h,o,T1,T2. T1 ⩳[h, o] T2 →
-                         ∀J,W2,U2. T2 = ②{J}W2.U2 →
-                         ∃∃W1,U1. T1 = ②{J}W1.U1.
-#h #o #T1 #T2 * -T1 -T2
-[ #s1 #s2 #d #_ #_ #J #W2 #U2 #H destruct
-| #i #J #W2 #U2 #H destruct
-| #l #J #W2 #U2 #H destruct
-| #I #V1 #V2 #T1 #T2 #J #W2 #U2 #H destruct /2 width=3 by ex1_2_intro/
-]
-qed-.
-
-(* Basic_2A1: was: tsts_inv_pair2 *)
-lemma theq_inv_pair2: ∀h,o,J,T1,W2,U2. T1 ⩳[h, o] ②{J}W2.U2 →
-                      ∃∃W1,U1. T1 = ②{J}W1.U1.
-/2 width=7 by theq_inv_pair2_aux/ qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma theq_inv_sort1_deg: ∀h,o,Y,s1. ⋆s1 ⩳[h, o] Y → ∀d. deg h o s1 d →
-                          ∃∃s2. deg h o s2 d & Y = ⋆s2.
-#h #o #Y #s1 #H #d #Hs1 elim (theq_inv_sort1 … H) -H
-#s2 #x #Hx <(deg_mono h o … Hx … Hs1) -s1 -d /2 width=3 by ex2_intro/
-qed-.
-
-lemma theq_inv_sort_deg: ∀h,o,s1,s2. ⋆s1 ⩳[h, o] ⋆s2 →
-                         ∀d1,d2. deg h o s1 d1 → deg h o s2 d2 →
-                         d1 = d2.
-#h #o #s1 #y #H #d1 #d2 #Hs1 #Hy
-elim (theq_inv_sort1_deg … H … Hs1) -s1 #s2 #Hs2 #H destruct
-<(deg_mono h o … Hy … Hs2) -s2 -d1 //
-qed-.
-
-lemma theq_inv_pair: ∀h,o,I1,I2,V1,V2,T1,T2. ②{I1}V1.T1 ⩳[h, o] ②{I2}V2.T2 →
-                     I1 = I2.
-#h #o #I1 #I2 #V1 #V2 #T1 #T2 #H elim (theq_inv_pair1 … H) -H
-#V0 #T0 #H destruct //
-qed-.
-
-(* Basic properties *********************************************************)
-
-(* Basic_1: was: iso_refl *)
-(* Basic_2A1: was: tsts_refl *)
-lemma theq_refl: ∀h,o. reflexive … (theq h o).
-#h #o * //
-* /2 width=1 by theq_lref, theq_gref/
-#s elim (deg_total h o s) /2 width=3 by theq_sort/
-qed.
-
-(* Basic_2A1: was: tsts_sym *)
-lemma theq_sym: ∀h,o. symmetric … (theq h o).
-#h #o #T1 #T2 * -T1 -T2 /2 width=3 by theq_sort/
-qed-.
-
-(* Basic_2A1: was: tsts_dec *)
-lemma theq_dec: ∀h,o,T1,T2. Decidable (T1 ⩳[h, o] T2).
-#h #o * [ * #s1 | #I1 #V1 #T1 ] * [1,3,5,7: * #s2 |*: #I2 #V2 #T2 ]
-[ elim (deg_total h o s1) #d1 #H1
-  elim (deg_total h o s2) #d2 #H2
-  elim (eq_nat_dec d1 d2) #Hd12 destruct /3 width=3 by theq_sort, or_introl/
-  @or_intror #H
-  lapply (theq_inv_sort_deg … H … H1 H2) -H -H1 -H2 /2 width=1 by/
-|2,3,13:
-  @or_intror #H
-  elim (theq_inv_sort1 … H) -H #x1 #x2 #_ #_ #H destruct
-|4,6,14:
-  @or_intror #H
-  lapply (theq_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 (theq_inv_lref1 … H) -H #H destruct /2 width=1 by/
-|7,8,15:
-  @or_intror #H
-  lapply (theq_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 (theq_inv_gref1 … H) -H #H destruct /2 width=1 by/
-|10,11,12:
-  @or_intror #H
-  elim (theq_inv_pair1 … H) -H #X1 #X2 #H destruct
-|16:
-  elim (eq_item2_dec I1 I2) #HI12 destruct
-  [ /3 width=1 by theq_pair, or_introl/ ]
-  @or_intror #H
-  lapply (theq_inv_pair … H) -H /2 width=1 by/
-]
-qed-.
-
-(* Basic_2A1: removed theorems 2:
-              tsts_inv_atom1 tsts_inv_atom2
-*)
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/theq_simple.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/theq_simple.ma
deleted file mode 100644 (file)
index 9ad5ed5..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "static_2/syntax/term_simple.ma".
-include "static_2/syntax/theq.ma".
-
-(* HEAD EQUIVALENCE FOR TERMS ***********************************************)
-
-(* Properies with simple (neutral) terms ************************************)
-
-(* Basic_2A1: was: simple_tsts_repl_dx *)
-lemma simple_theq_repl_dx: ∀h,o,T1,T2. T1 ⩳[h, o] T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄.
-#h #o #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_theq_repl_sn: ∀h,o,T1,T2. T1 ⩳[h, o] T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄.
-/3 width=5 by simple_theq_repl_dx, theq_sym/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/theq_simple_vector.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/theq_simple_vector.ma
deleted file mode 100644 (file)
index f7212ee..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "static_2/syntax/term_vector.ma".
-include "static_2/syntax/theq_simple.ma".
-
-(* HEAD EQUIVALENCE FOR TERMS ***********************************************)
-
-(* Advanced inversion lemmas with simple (neutral) terms ********************)
-
-(* Basic_1: was only: iso_flats_lref_bind_false iso_flats_flat_bind_false *)
-(* Basic_2A1: was: tsts_inv_bind_applv_simple *)
-lemma theq_inv_applv_bind_simple: ∀h,o,p,I,Vs,V2,T1,T2. ⒶVs.T1 ⩳[h, o] ⓑ{p,I}V2.T2 →
-                                  𝐒⦃T1⦄ → ⊥.
-#h #o #p #I #Vs #V2 #T1 #T2 #H elim (theq_inv_pair2 … H) -H
-#V0 #T0 elim Vs -Vs normalize
-[ #H destruct #H /2 width=5 by simple_inv_bind/
-| #V #Vs #_ #H destruct
-]
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/theq_tdeq.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/theq_tdeq.ma
deleted file mode 100644 (file)
index 99447db..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "static_2/syntax/tdeq.ma".
-include "static_2/syntax/theq.ma".
-
-(* HEAD EQUIVALENCE FOR TERMS ***********************************************)
-
-(* Properties with degree-based equivalence for terms ***********************)
-
-lemma tdeq_theq: ∀h,o,T1,T2. T1 ≛[h, o] T2 → T1 ⩳[h, o] T2.
-#h #o #T1 #T2 * -T1 -T2 /2 width=3 by theq_sort, theq_pair/
-qed.
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/theq_theq.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/theq_theq.ma
deleted file mode 100644 (file)
index e9e586d..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "static_2/syntax/theq.ma".
-
-(* HEAD EQUIVALENCE FOR TERMS ***********************************************)
-
-(* Main properties **********************************************************)
-
-(* Basic_1: was: iso_trans *)
-(* Basic_2A1: was: tsts_trans *)
-theorem theq_trans: ∀h,o. Transitive … (theq h o).
-#h #o #T1 #T * -T1 -T
-[ #s1 #s #d #Hs1 #Hs #X #H
-  elim (theq_inv_sort1_deg … H … Hs) -s /2 width=3 by theq_sort/
-| #i1 #i #H <(theq_inv_lref1 … H) -H //
-| #l1 #l #H <(theq_inv_gref1 … H) -H //
-| #I #V1 #V #T1 #T #X #H
-  elim (theq_inv_pair1 … H) -H #V2 #T2 #H destruct //
-]
-qed-.
-
-(* Basic_2A1: was: tsts_canc_sn *)
-theorem theq_canc_sn: ∀h,o. left_cancellable … (theq h o).
-/3 width=3 by theq_trans, theq_sym/ qed-.
-
-(* Basic_2A1: was: tsts_canc_dx *)
-theorem theq_canc_dx: ∀h,o. right_cancellable … (theq h o).
-/3 width=3 by theq_trans, theq_sym/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/toeq.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/toeq.ma
new file mode 100644 (file)
index 0000000..7206a1d
--- /dev/null
@@ -0,0 +1,159 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM 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/topiso_2.ma".
+include "static_2/syntax/term.ma".
+
+(* SORT-IRRELEVANT OUTER EQUIVALENCE FOR TERMS ******************************)
+
+(* Basic_2A1: includes: tsts_atom tsts_pair *)
+inductive toeq: relation term ≝
+| toeq_sort: ∀s1,s2. toeq (⋆s1) (⋆s2)
+| toeq_lref: ∀i. toeq (#i) (#i)
+| toeq_gref: ∀l. toeq (§l) (§l)
+| toeq_pair: ∀I,V1,V2,T1,T2. toeq (②{I}V1.T1) (②{I}V2.T2)
+.
+
+interpretation
+  "sort-irrelevant outer equivalence (term)"
+  'TopIso T1 T2 = (toeq T1 T2).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact toeq_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-.
+
+(* Basic_1: was just: iso_gen_sort *)
+lemma toeq_inv_sort1: ∀Y,s1. ⋆s1 ⩳ Y →
+                      ∃s2. Y = ⋆s2.
+/2 width=4 by toeq_inv_sort1_aux/ qed-.
+
+fact toeq_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-.
+
+(* Basic_1: was: iso_gen_lref *)
+lemma toeq_inv_lref1: ∀Y,i. #i ⩳ Y → Y = #i.
+/2 width=5 by toeq_inv_lref1_aux/ qed-.
+
+fact toeq_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 toeq_inv_gref1: ∀Y,l. §l ⩳ Y → Y = §l.
+/2 width=5 by toeq_inv_gref1_aux/ qed-.
+
+fact toeq_inv_pair1_aux: ∀T1,T2. T1 ⩳ T2 →
+                         ∀J,W1,U1. T1 = ②{J}W1.U1 →
+                         ∃∃W2,U2. T2 = ②{J}W2.U2.
+#T1 #T2 * -T1 -T2
+[ #s1 #s2 #J #W1 #U1 #H destruct
+| #i #J #W1 #U1 #H destruct
+| #l #J #W1 #U1 #H destruct
+| #I #V1 #V2 #T1 #T2 #J #W1 #U1 #H destruct /2 width=3 by ex1_2_intro/
+]
+qed-.
+
+(* Basic_1: was: iso_gen_head *)
+(* Basic_2A1: was: tsts_inv_pair1 *)
+lemma toeq_inv_pair1: ∀J,W1,U1,T2. ②{J}W1.U1 ⩳ T2 →
+                      ∃∃W2,U2. T2 = ②{J}W2. U2.
+/2 width=7 by toeq_inv_pair1_aux/ qed-.
+
+fact toeq_inv_pair2_aux: ∀T1,T2. T1 ⩳ T2 →
+                         ∀J,W2,U2. T2 = ②{J}W2.U2 →
+                         ∃∃W1,U1. T1 = ②{J}W1.U1.
+#T1 #T2 * -T1 -T2
+[ #s1 #s2 #J #W2 #U2 #H destruct
+| #i #J #W2 #U2 #H destruct
+| #l #J #W2 #U2 #H destruct
+| #I #V1 #V2 #T1 #T2 #J #W2 #U2 #H destruct /2 width=3 by ex1_2_intro/
+]
+qed-.
+
+(* Basic_2A1: was: tsts_inv_pair2 *)
+lemma toeq_inv_pair2: ∀J,T1,W2,U2. T1 ⩳ ②{J}W2.U2 →
+                      ∃∃W1,U1. T1 = ②{J}W1.U1.
+/2 width=7 by toeq_inv_pair2_aux/ qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma toeq_inv_pair: ∀I1,I2,V1,V2,T1,T2. ②{I1}V1.T1 ⩳ ②{I2}V2.T2 →
+                     I1 = I2.
+#I1 #I2 #V1 #V2 #T1 #T2 #H elim (toeq_inv_pair1 … H) -H
+#V0 #T0 #H destruct //
+qed-.
+
+(* Basic properties *********************************************************)
+
+(* Basic_1: was: iso_refl *)
+(* Basic_2A1: was: tsts_refl *)
+lemma toeq_refl: reflexive … toeq.
+* //
+* /2 width=1 by toeq_lref, toeq_gref/
+qed.
+
+(* Basic_2A1: was: tsts_sym *)
+lemma toeq_sym: symmetric … toeq.
+#T1 #T2 * -T1 -T2 /2 width=3 by toeq_sort/
+qed-.
+
+(* Basic_2A1: was: tsts_dec *)
+lemma toeq_dec: ∀T1,T2. Decidable (T1 ⩳ T2).
+* [ * #s1 | #I1 #V1 #T1 ] * [1,3,5,7: * #s2 |*: #I2 #V2 #T2 ]
+[ /3 width=1 by toeq_sort, or_introl/
+|2,3,13:
+  @or_intror #H
+  elim (toeq_inv_sort1 … H) -H #x #H destruct
+|4,6,14:
+  @or_intror #H
+  lapply (toeq_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 (toeq_inv_lref1 … H) -H #H destruct /2 width=1 by/
+|7,8,15:
+  @or_intror #H
+  lapply (toeq_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 (toeq_inv_gref1 … H) -H #H destruct /2 width=1 by/
+|10,11,12:
+  @or_intror #H
+  elim (toeq_inv_pair1 … H) -H #X1 #X2 #H destruct
+|16:
+  elim (eq_item2_dec I1 I2) #HI12 destruct
+  [ /3 width=1 by toeq_pair, or_introl/ ]
+  @or_intror #H
+  lapply (toeq_inv_pair … H) -H /2 width=1 by/
+]
+qed-.
+
+(* Basic_2A1: removed theorems 2:
+              tsts_inv_atom1 tsts_inv_atom2
+*)
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/toeq_simple.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/toeq_simple.ma
new file mode 100644 (file)
index 0000000..00d9694
--- /dev/null
@@ -0,0 +1,31 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/term_simple.ma".
+include "static_2/syntax/toeq.ma".
+
+(* SORT-IRRELEVANT OUTER EQUIVALENCE FOR TERMS ******************************)
+
+(* Properies with simple (neutral) terms ************************************)
+
+(* Basic_2A1: was: simple_tsts_repl_dx *)
+lemma simple_toeq_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_toeq_repl_sn: ∀T1,T2. T1 ⩳ T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄.
+/3 width=3 by simple_toeq_repl_dx, toeq_sym/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/toeq_simple_vector.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/toeq_simple_vector.ma
new file mode 100644 (file)
index 0000000..92e28c8
--- /dev/null
@@ -0,0 +1,31 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/term_vector.ma".
+include "static_2/syntax/toeq_simple.ma".
+
+(* SORT-IRRELEVANT OUTER EQUIVALENCE FOR TERMS ******************************)
+
+(* Advanced inversion lemmas with simple (neutral) terms ********************)
+
+(* Basic_1: was only: iso_flats_lref_bind_false iso_flats_flat_bind_false *)
+(* Basic_2A1: was: tsts_inv_bind_applv_simple *)
+lemma toeq_inv_applv_bind_simple (p) (I):
+      ∀Vs,V2,T1,T2. ⒶVs.T1 ⩳ ⓑ{p,I}V2.T2 → 𝐒⦃T1⦄ → ⊥.
+#p #I #Vs #V2 #T1 #T2 #H elim (toeq_inv_pair2 … H) -H
+#V0 #T0 elim Vs -Vs normalize
+[ #H destruct #H /2 width=5 by simple_inv_bind/
+| #V #Vs #_ #H destruct
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/toeq_tdeq.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/toeq_tdeq.ma
new file mode 100644 (file)
index 0000000..73be8f6
--- /dev/null
@@ -0,0 +1,24 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/tdeq.ma".
+include "static_2/syntax/toeq.ma".
+
+(* SORT-IRRELEVANT OUTER EQUIVALENCE FOR TERMS ******************************)
+
+(* Properties with sort-irrelevant equivalence for terms ********************)
+
+lemma tdeq_toeq: ∀T1,T2. T1 ≛ T2 → T1 ⩳ T2.
+#T1 #T2 * -T1 -T2 /2 width=1 by toeq_sort, toeq_pair/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/toeq_toeq.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/toeq_toeq.ma
new file mode 100644 (file)
index 0000000..9b7af0a
--- /dev/null
@@ -0,0 +1,40 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/toeq.ma".
+
+(* SORT-IRRELEVANT OUTER EQUIVALENCE FOR TERMS ******************************)
+
+(* Main properties **********************************************************)
+
+(* Basic_1: was: iso_trans *)
+(* Basic_2A1: was: tsts_trans *)
+theorem toeq_trans: Transitive … toeq.
+#T1 #T * -T1 -T
+[ #s1 #s #X #H
+  elim (toeq_inv_sort1 … H) -s /2 width=1 by toeq_sort/
+| #i1 #i #H <(toeq_inv_lref1 … H) -H //
+| #l1 #l #H <(toeq_inv_gref1 … H) -H //
+| #I #V1 #V #T1 #T #X #H
+  elim (toeq_inv_pair1 … H) -H #V2 #T2 #H destruct //
+]
+qed-.
+
+(* Basic_2A1: was: tsts_canc_sn *)
+theorem toeq_canc_sn: left_cancellable … toeq.
+/3 width=3 by toeq_trans, toeq_sym/ qed-.
+
+(* Basic_2A1: was: tsts_canc_dx *)
+theorem toeq_canc_dx: right_cancellable … toeq.
+/3 width=3 by toeq_trans, toeq_sym/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/tweq.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/tweq.ma
new file mode 100644 (file)
index 0000000..91234b9
--- /dev/null
@@ -0,0 +1,284 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/notation/relations/approxeq_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)
+.
+
+interpretation
+   "context-free tail sort-irrelevant equivalence (term)"
+   'ApproxEq T1 T2 = (tweq 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 tweq_abbr_neg: ∀V1,V2,T1,T2. -ⓓV1.T1 ≅ -ⓓV2.T2.
+#V1 #V2 #T1 #T2
+@tweq_abbr #H destruct
+qed.
+
+lemma tweq_refl: reflexive … tweq.
+#T elim T -T * [||| #p * | * ]
+/2 width=1 by tweq_sort, tweq_lref, tweq_gref, tweq_abbr, tweq_abst, tweq_appl, tweq_cast/
+qed.
+
+lemma tweq_sym: symmetric … tweq.
+#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/
+qed-.
+
+(* Left basic inversion lemmas **********************************************)
+
+fact tweq_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
+|4  : #p #V1 #V2 #T1 #T2 #_ #s #H destruct
+|5  : #p #V1 #V2 #T1 #T2 #s #H destruct
+|6  : #V1 #V2 #T1 #T2 #_ #s #H destruct
+|7  : #V1 #V2 #T1 #T2 #_ #_ #s #H destruct
+]
+qed-.
+
+lemma tweq_inv_sort_sn:
+      ∀Y,s1. ⋆s1 ≅ Y → ∃s2. Y = ⋆s2.
+/2 width=4 by tweq_inv_sort_sn_aux/ qed-.
+
+fact tweq_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: //
+|4  : #p #V1 #V2 #T1 #T2 #_ #j #H destruct
+|5  : #p #V1 #V2 #T1 #T2 #j #H destruct
+|6  : #V1 #V2 #T1 #T2 #_ #j #H destruct
+|7  : #V1 #V2 #T1 #T2 #_ #_ #j #H destruct
+]
+qed-.
+
+lemma tweq_inv_lref_sn: ∀Y,i. #i ≅ Y → Y = #i.
+/2 width=5 by tweq_inv_lref_sn_aux/ qed-.
+
+fact tweq_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: //
+|4  : #p #V1 #V2 #T1 #T2 #_ #k #H destruct
+|5  : #p #V1 #V2 #T1 #T2 #k #H destruct
+|6  : #V1 #V2 #T1 #T2 #_ #k #H destruct
+|7  : #V1 #V2 #T1 #T2 #_ #_ #j #H destruct
+]
+qed-.
+
+lemma tweq_inv_gref_sn:
+      ∀Y,l. §l ≅ Y → Y = §l.
+/2 width=5 by tweq_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.
+#X #Y * -X -Y
+[1  : #s1 #s2 #q #W1 #U1 #H destruct
+|2,3: #i #q #W1 #U1 #H destruct
+|4  : #p #V1 #V2 #T1 #T2 #HT #q #W1 #U1 #H destruct /3 width=4 by ex2_2_intro/
+|5  : #p #V1 #V2 #T1 #T2 #q #W1 #U1 #H destruct
+|6  : #V1 #V2 #T1 #T2 #_ #q #W1 #U1 #H destruct
+|7  : #V1 #V2 #T1 #T2 #_ #_ #q #W1 #U1 #H destruct
+]
+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-.
+
+fact tweq_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
+|2,3: #i #q #W1 #U1 #H destruct
+|4  : #p #V1 #V2 #T1 #T2 #_ #q #W1 #U1 #H destruct
+|5  : #p #V1 #V2 #T1 #T2 #q #W1 #U1 #H destruct /2 width=3 by ex1_2_intro/
+|6  : #V1 #V2 #T1 #T2 #_ #q #W1 #U1 #H destruct
+|7  : #V1 #V2 #T1 #T2 #_ #_ #q #W1 #U1 #H destruct
+]
+qed-.
+
+lemma tweq_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-.
+
+fact tweq_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
+|4  : #p #V1 #V2 #T1 #T2 #HT #W1 #U1 #H destruct
+|5  : #p #V1 #V2 #T1 #T2 #W1 #U1 #H destruct
+|6  : #V1 #V2 #T1 #T2 #HT #W1 #U1 #H destruct /2 width=4 by ex2_2_intro/
+|7  : #V1 #V2 #T1 #T2 #_ #_ #W1 #U1 #H destruct
+]
+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-.
+
+fact tweq_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
+|4  : #p #V1 #V2 #T1 #T2 #_ #W1 #U1 #H destruct
+|5  : #p #V1 #V2 #T1 #T2 #W1 #U1 #H destruct
+|6  : #V1 #V2 #T1 #T2 #_ #W1 #U1 #H destruct
+|7  : #V1 #V2 #T1 #T2 #HV #HT #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/
+]
+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-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma tweq_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
+/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.
+#V1 #V2 #Y #H
+elim (tweq_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.
+#V1 #V2 #T1 #T2 #H
+elim (tweq_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.
+#V1 #V2 #T1 #T2 #H
+elim (tweq_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.
+#V1 #V2 #T1 #T2 #H
+elim (tweq_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 → ⊥.
+@(f_ind … tw) #n #IH #T #Hn #V #H destruct
+elim (tweq_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.
+* [ #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
+] /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.
+#I1 #I2 #V1 #V2 #T1 #T2 #H
+elim (tweq_fwd_pair_sn … H) -H #W2 #U2 #H destruct //
+qed-.
+
+(* Advanced properties ******************************************************)
+
+lemma tweq_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/
+|2,3,13:
+  @or_intror #H
+  elim (tweq_inv_sort_sn … H) -H #x #H destruct
+|4,6,14:
+  @or_intror #H
+  lapply (tweq_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/
+|7,8,15:
+  @or_intror #H
+  lapply (tweq_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/
+|10,11,12:
+  @or_intror #H
+  elim (tweq_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 tweq_abbr_neg, or_introl/
+    | /3 width=1 by tweq_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/
+      ]
+    | elim (IHV V2) -IHV #HV12
+      elim (IHT T2) -IHT #HT12
+      [1: /3 width=1 by tweq_cast, or_introl/
+      |*: @or_intror #H
+          elim (tweq_inv_cast_bi … H) -H #HV12 #HT12
+          /2 width=1 by/
+      ]
+    ]
+  | /4 width=5 by tweq_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/tweq_simple.ma
new file mode 100644 (file)
index 0000000..4077d05
--- /dev/null
@@ -0,0 +1,29 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/term_simple.ma".
+include "static_2/syntax/tweq.ma".
+
+(* SORT-IRRELEVANT WHD EQUIVALENCE ON TERMS *********************************)
+
+(* Properties with simple terms *********************************************)
+
+lemma tweq_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)
+|*  : /1 width=1 by simple_atom, simple_flat/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/tweq_tdeq.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/tweq_tdeq.ma
new file mode 100644 (file)
index 0000000..fb8d7e7
--- /dev/null
@@ -0,0 +1,32 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/tdeq.ma".
+include "static_2/syntax/tweq.ma".
+
+(* SORT-IRRELEVANT WHD EQUIVALENCE ON TERMS *********************************)
+
+(* Properties with sort-irrelevant equivalence for terms ********************)
+
+lemma tdeq_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/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/tweq_tweq.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/tweq_tweq.ma
new file mode 100644 (file)
index 0000000..afa33cc
--- /dev/null
@@ -0,0 +1,51 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "static_2/syntax/tweq.ma".
+
+(* SORT-IRRELEVANT WHD EQUIVALENCE ON TERMS *********************************)
+
+(* Main properties **********************************************************)
+
+theorem tweq_trans: Transitive … tweq.
+#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/
+| #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/
+| #p #V1 #V #T1 #T #X #H
+  elim (tweq_inv_abst_sn … H) -H #V2 #T2 #H destruct
+  /2 width=1 by tweq_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/
+| #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/
+]
+qed-.
+
+theorem tweq_canc_sn: left_cancellable … tweq.
+/3 width=3 by tweq_trans, tweq_sym/ qed-.
+
+theorem tweq_canc_dx: right_cancellable … tweq.
+/3 width=3 by tweq_trans, tweq_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-.
index 4dcb17989792c92c27f91ceed6ccd0f3bc47d2c5..0a962c3f8fcf23467454048328fdfab173e1d1bb 100644 (file)
@@ -27,12 +27,12 @@ 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_rdeq" + "aaa_fdeq" + "aaa_aaa" * ]
+             [ [ "for terms" ] "aaa" + "( ⦃?,?⦄ ⊢ ? ⁝ ? )" "aaa_drops" + "aaa_fqus" + "aaa_rdeq" + "aaa_fdeq" + "aaa_aaa" + "aaa_dec" * ]
           }
         ]
         [ { "degree-based equivalence" * } {
-             [ [ "for closures on referred entries" ] "fdeq" + "( ⦃?,?,?⦄ ≛[?,?] ⦃?,?,?⦄ )" "fdeq_fqup" + "fdeq_fqus" + "fdeq_req" + "fdeq_fdeq" * ]
-             [ [ "for lenvs on referred entries" ] "rdeq" + "( ? ≛[?,?,?] ? )" "rdeq_length" + "rdeq_drops" + "rdeq_fqup" + "rdeq_fqus" + "rdeq_req" + "rdeq_rdeq" * ]
+             [ [ "for closures on referred entries" ] "fdeq" + "( ⦃?,?,?⦄ ≛ ⦃?,?,?⦄ )" "fdeq_fqup" + "fdeq_fqus" + "fdeq_req" + "fdeq_fdeq" * ]
+             [ [ "for lenvs on referred entries" ] "rdeq" + "( ? ≛[?] ? )" "rdeq_length" + "rdeq_drops" + "rdeq_fqup" + "rdeq_fqus" + "rdeq_req" + "rdeq_rdeq" * ]
           }
         ]
         [ { "syntactic equivalence" * } {
@@ -45,8 +45,8 @@ table {
         ]
         [ { "context-sensitive free variables" * } {
              [ [ "inclusion for restricted closures" ] "fsle" + "( ⦃?,?⦄ ⊆ ⦃?,?⦄ )" "fsle_length" + "fsle_drops" + "fsle_fqup" + "fsle_fsle" * ]
-             [ [ "restricted refinement for lenvs" ] "lsubf" + "( ⦃?,?⦄ ⫃𝐅* ⦃?,?⦄ )" "lsubf_lsubr" + "lsubf_frees" + "lsubf_lsubf" * ]
-             [ [ "for terms" ] "frees" + "( ? ⊢ 𝐅*⦃?⦄ ≘ ? )" "frees_append" + "frees_drops" + "frees_fqup" + "frees_frees" * ]
+             [ [ "restricted refinement for lenvs" ] "lsubf" + "( ⦃?,?⦄ ⫃𝐅+ ⦃?,?⦄ )" "lsubf_lsubr" + "lsubf_frees" + "lsubf_lsubf" * ]
+             [ [ "for terms" ] "frees" + "( ? ⊢ 𝐅+⦃?⦄ ≘ ? )" "frees_append" + "frees_drops" + "frees_fqup" + "frees_frees" * ]
           }
         ]
         [ { "local environments" * } {
@@ -58,8 +58,8 @@ table {
    class "grass"
    [ { "s-computation" * } {
         [ { "iterated structural successor" * } {
-             [ [ "for closures" ] "fqus" + "( â¦\83?,?,?â¦\84 â\8a\90*[?] â¦\83?,?,?â¦\84 )" + "( â¦\83?,?,?â¦\84 â\8a\90* ⦃?,?,?⦄ )" "fqus_weight" + "fqus_drops" + "fqus_fqup" + "fqus_fqus" * ]
-             [ [ "proper for closures" ] "fqup" + "( â¦\83?,?,?â¦\84 â\8a\90+[?] â¦\83?,?,?â¦\84 )" + "( â¦\83?,?,?â¦\84 â\8a\90+ ⦃?,?,?⦄ )" "fqup_weight" + "fqup_drops" + "fqup_fqup" * ]
+             [ [ "for closures" ] "fqus" + "( â¦\83?,?,?â¦\84 â¬\82*[?] â¦\83?,?,?â¦\84 )" + "( â¦\83?,?,?â¦\84 â¬\82* ⦃?,?,?⦄ )" "fqus_weight" + "fqus_drops" + "fqus_fqup" + "fqus_fqus" * ]
+             [ [ "proper for closures" ] "fqup" + "( â¦\83?,?,?â¦\84 â¬\82+[?] â¦\83?,?,?â¦\84 )" + "( â¦\83?,?,?â¦\84 â¬\82+ ⦃?,?,?⦄ )" "fqup_weight" + "fqup_drops" + "fqup_fqup" * ]
           }
         ]
      }
@@ -67,22 +67,26 @@ table {
    class "yellow"
    [ { "s-transition" * } {
         [ { "structural successor" * } {
-             [ [ "for closures" ] "fquq" + "( â¦\83?,?,?â¦\84 â\8a\90⸮[?] â¦\83?,?,?â¦\84 )" + "( â¦\83?,?,?â¦\84 â\8a\90⸮ ⦃?,?,?⦄ )" "fquq_length" + "fquq_weight" * ]
-             [ [ "proper for closures" ] "fqu" + "( â¦\83?,?,?â¦\84 â\8a\90[?] â¦\83?,?,?â¦\84 )" + "( â¦\83?,?,?â¦\84 â\8a\90 ⦃?,?,?⦄ )" "fqu_length" + "fqu_weight" + "fqu_tdeq" * ]
+             [ [ "for closures" ] "fquq" + "( â¦\83?,?,?â¦\84 â¬\82⸮[?] â¦\83?,?,?â¦\84 )" + "( â¦\83?,?,?â¦\84 â¬\82⸮ ⦃?,?,?⦄ )" "fquq_length" + "fquq_weight" * ]
+             [ [ "proper for closures" ] "fqu" + "( â¦\83?,?,?â¦\84 â¬\82[?] â¦\83?,?,?â¦\84 )" + "( â¦\83?,?,?â¦\84 â¬\82 ⦃?,?,?⦄ )" "fqu_length" + "fqu_weight" + "fqu_tdeq" * ]
           }
         ]
      }
    ]
    class "orange"
    [ { "relocation" * } {
-        [ { "generic slicing" * } {
+        [ { "generic and uniform slicing" * } {
              [ [ "for lenvs" ] "drops" + "( ⬇*[?,?] ? ≘ ? )" + "( ⬇*[?] ? ≘ ? )" "drops_ctc" + "drops_ltc" + "drops_weight" + "drops_length" + "drops_cext2" + "drops_sex" + "drops_lex" + "drops_seq" + "drops_drops" + "drops_vector" * ]
           }
         ]
-        [ { "generic relocation" * } {
+        [ { "basic relocation" * } {
+             [ [ "for terms" ] "lifts_basic" + "( ⬆[?,?] ? ≘ ? )" * ]
+          }
+        ]
+        [ { "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_tdeq" + "lifts_lifts" * ]
+             [ [ "for terms" ] "lifts" + "( ⬆*[?] ? ≘ ? )" "lifts_simple" + "lifts_weight" + "lifts_tdeq" + "lifts_tweq" + "lifts_toeq" + "lifts_lifts" * ]
           }
         ]
         [ { "syntactic equivalence" * } {
@@ -98,6 +102,11 @@ table {
    ]
    class "red"
    [ { "syntax" * } {
+        [ { "applicability condition" * } {
+             [ [ "preorder" ] "acle" + "( ? ⊆ ? )"  "acle_acle" * ]
+             [ [ "properties" ] "ac" + "( 𝟏 )" + "( 𝟐 )" + "( 𝛚 )" * ]
+          }
+        ]   
         [ { "equivalence up to exclusion binders" * } {
              [ [ "for lenvs" ] "lveq" + "( ? ≋ⓧ*[?,?] ? )" "lveq_length" + "lveq_lveq" * ]
           }
@@ -107,13 +116,17 @@ table {
              [ [ "for lenvs" ] "append" + "( ? + ? )" "append_length" * ]
           }
         ]
-        [ { "head equivalence" * } {
-             [ [ "for terms" ] "theq" + "( ? ⩳[?,?] ? )" "theq_simple" + "theq_tdeq" + "theq_theq" + "theq_simple_vector" * ]
+        [ { "sort-irrelevant outer equivalence" * } {
+             [ [ "for terms" ] "toeq" + "( ? ⩳ ? )" "toeq_simple" + "toeq_tdeq" + "toeq_toeq" + "toeq_simple_vector" * ]
           }
         ]
-        [ { "degree-based equivalence" * } {
-             [ [ "" ] "tdeq_ext" + "( ? ≛[?,?] ? )" + "( ? ⊢ ? ≛[?,?] ? )" * ]
-             [ [ "" ] "tdeq" + "( ? ≛[?,?] ? )" "tdeq_tdeq" * ]
+        [ { "sort-irrelevant whd equivalence" * } {
+             [ [ "for terms" ] "tweq" + "( ? ≅ ? )" "tweq_simple" + "tweq_tdeq" + "tweq_tueq" * ]
+          }
+        ]
+        [ { "sort-irrelevant equivalence" * } {
+             [ [ "" ] "tdeq_ext" + "( ? ≛ ? )" + "( ? ⊢ ? ≛ ? )" * ]
+             [ [ "" ] "tdeq" + "( ? ≛ ? )" "tdeq_tdeq" * ]
           }
         ]
         [ { "closures" * } {
@@ -148,11 +161,14 @@ table {
           }
         ]
         [ { "items" * } {
-             [ [ "" ] "item_sd" * ]
-             [ [ "" ] "item_sh" * ]
              [ [ "" ] "item" * ]
           }
         ]
+        [ { "sorts" * } {
+             [ [ "degree" ] "sd" "sd_d" + "sd_lt" * ]
+             [ [ "hierarchy" ] "sh" + "( ⫯[?]? )" "sh_props" + "sh_lt" * ]
+          }
+        ]
         [ { "atomic arities" * } {
              [ [ "" ] "aarity" * ]
           }
index 3185e857c28876d86e5f0857e62c8ed4a486382b..1f9cd6951a4a2f7996624e2e51b91bd531eb9829 100644 (file)
@@ -1,13 +1,20 @@
+0.99.4 - 26/12/2018 - beta version for the 1.x series
+       * ported to lablgkt3, ulex-camlp5 1.2, ocaml 4.07
+       * bug fix: aliases were no longer added automatically to the script
+
 0.99.3 - 06/05/2016 - beta version for the 1.x series
-        * cyclic sort hierarchies are now allowed through the "cyclic" keyword
-        * new syntax for let rec/corec with flavor specifier
-        * optional parameters added to the syntax of definitions
-        * new attribute "Implied" put beside "Generated" and "Provided";
-          it denotes an object provided not as defined by the user, but as generated by another ITP
-        * the command "defined" is added as a presentational alternative to "qed" for definitions
-        * improved standard library and contributions
-        * improved binaries using matita components
-        * source code updated for the latest version of OCaml and related tools
+       * cyclic sort hierarchies are now allowed through the "cyclic" keyword
+       * new syntax for let rec/corec with flavor specifier
+       * optional parameters added to the syntax of definitions
+       * new attribute "Implied" put beside "Generated" and "Provided";
+         it denotes an object provided not as defined by the user, but as
+         generated by another ITP
+       * the command "defined" is added as a presentational alternative to
+         "qed" for definitions
+       * improved standard library and contributions
+       * improved binaries using matita components
+       * source code updated for the latest version of OCaml and related
+         tools
        * several bug fixes
 
 0.99.1 - 17/11/2011 - alpha version for the 1.x series
index ab817e2940394c19a197810fecd79d6d825711f9..7a30256e3798a54d1f5266a91b225a184cb70d65 100644 (file)
@@ -74,17 +74,22 @@ class graphviz_impl ?packing () =
     method load_graph_from_file ?(gviz_cmd = "dot") fname =
       let tmp_png = tempfile () in
       let rc = Sys.command (mk_gviz_cmd gviz_cmd png_flags fname tmp_png) in
-      if rc <> 0 then
+      if rc <> 0 || (Unix.stat tmp_png).Unix.st_size = 0 then begin
         eprintf
           ("Graphviz command failed (exit code: %d) on the following graph:\n"
            ^^ "%s\n%!")
           rc (HExtlib.input_file fname);
-      image#set_file tmp_png;
-      HExtlib.safe_remove tmp_png;
-      let tmp_map = tempfile () in
-      ignore (Sys.command (mk_gviz_cmd gviz_cmd map_flags fname tmp_map));
-      self#load_map tmp_map;
-      HExtlib.safe_remove tmp_map
+        (* CSC: it would be better to show something explaining that the
+           graph is empty *)
+        image#clear ()
+      end else begin
+       image#set_file tmp_png;
+       HExtlib.safe_remove tmp_png;
+       let tmp_map = tempfile () in
+       ignore (Sys.command (mk_gviz_cmd gviz_cmd map_flags fname tmp_map));
+       self#load_map tmp_map;
+       HExtlib.safe_remove tmp_map
+      end
 
     method private load_map fname =
       let areas = ref [] in
index a0ad502b942165237493cac0375c010cb08a4dd0..4d1e355a304d695725cbfe62530607f886fcd2b7 100644 (file)
@@ -272,9 +272,6 @@ for @{ 'notmem $a $b }.
 notation "hvbox(a break ≬ b)" non associative with precedence 45
 for @{ 'overlaps $a $b }. (* \between *)
 
-notation "hvbox(a break ⊆ b)" non associative with precedence 45
-for @{ 'subseteq $a $b }. (* \subseteq *)
-
 notation "hvbox(a break ∩ b)" left associative with precedence 60
 for @{ 'intersects $a $b }. (* \cap *)
 
@@ -283,12 +280,6 @@ for @{ 'union $a $b }. (* \cup *)
 
 (* other notations **********************************************************)
 
-notation "hvbox(a break \approx b)" non associative with precedence 45 
-  for @{ 'napart $a $b}.
-        
-notation "hvbox(a break # b)" non associative with precedence 45 
-  for @{ 'apart $a $b}.
-
 notation < "term 76 a \sup term 90 b" non associative with precedence 75 for @{ 'exp $a $b}.
 notation > "a \sup term 90 b" non associative with precedence 75 for @{ 'exp $a $b}.
 notation > "a ^ term 90 b"  non associative with precedence 75 for @{ 'exp $a $b}.
diff --git a/matita/matita/lib/basics/core_notation/apart_2.ma b/matita/matita/lib/basics/core_notation/apart_2.ma
new file mode 100644 (file)
index 0000000..04c81ec
--- /dev/null
@@ -0,0 +1,15 @@
+(*
+    ||M||  This file is part of HELM, an Hypertextual, Electronic        
+    ||A||  Library of Mathematics, developed at the Computer Science     
+    ||T||  Department of the University of Bologna, Italy.                     
+    ||I||                                                                 
+    ||T||  
+    ||A||  This file is distributed under the terms of the 
+    \   /  GNU General Public License Version 2        
+     \ /      
+      V_______________________________________________________________ *)
+
+(* Core notation *******************************************************)
+
+notation "hvbox(a break # b)" non associative with precedence 45 
+  for @{ 'apart $a $b}.
diff --git a/matita/matita/lib/basics/core_notation/napart_2.ma b/matita/matita/lib/basics/core_notation/napart_2.ma
new file mode 100644 (file)
index 0000000..a381787
--- /dev/null
@@ -0,0 +1,15 @@
+(*
+    ||M||  This file is part of HELM, an Hypertextual, Electronic        
+    ||A||  Library of Mathematics, developed at the Computer Science     
+    ||T||  Department of the University of Bologna, Italy.                     
+    ||I||                                                                 
+    ||T||  
+    ||A||  This file is distributed under the terms of the 
+    \   /  GNU General Public License Version 2        
+     \ /      
+      V_______________________________________________________________ *)
+
+(* Core notation *******************************************************)
+
+notation "hvbox(a break \approx b)" non associative with precedence 45 
+  for @{ 'napart $a $b}.
diff --git a/matita/matita/lib/basics/core_notation/subseteq_2.ma b/matita/matita/lib/basics/core_notation/subseteq_2.ma
new file mode 100644 (file)
index 0000000..bbfe6f5
--- /dev/null
@@ -0,0 +1,15 @@
+(*
+    ||M||  This file is part of HELM, an Hypertextual, Electronic        
+    ||A||  Library of Mathematics, developed at the Computer Science     
+    ||T||  Department of the University of Bologna, Italy.                     
+    ||I||                                                                 
+    ||T||  
+    ||A||  This file is distributed under the terms of the 
+    \   /  GNU General Public License Version 2        
+     \ /      
+      V_______________________________________________________________ *)
+
+(* Core notation *******************************************************)
+
+notation "hvbox(a break ⊆ b)" non associative with precedence 45
+for @{ 'subseteq $a $b }. (* \subseteq *)
diff --git a/matita/matita/lib/basics/deqlist.ma b/matita/matita/lib/basics/deqlist.ma
new file mode 100644 (file)
index 0000000..c559448
--- /dev/null
@@ -0,0 +1,63 @@
+(*
+    ||M||  This file is part of HELM, an Hypertextual, Electronic        
+    ||A||  Library of Mathematics, developed at the Computer Science     
+    ||T||  Department of the University of Bologna, Italy.                     
+    ||I||                                                                 
+    ||T||  
+    ||A||  
+    \   /  This file is distributed under the terms of the       
+     \ /   GNU General Public License Version 2   
+      V_______________________________________________________________ *)
+
+include "basics/deqsets.ma".
+include "basics/lists/listb.ma".
+
+(*
+
+record DeqSet : Type[1] ≝ { 
+   carr :> Type[0];
+   eqb: carr → carr → bool;
+   eqb_true: ∀x,y. (eqb x y = true) ↔ (x = y)
+}. *)
+    
+
+(* list *)
+
+let rec eq_list (A:DeqSet) (l1,l2:list A) on l1 ≝
+  match l1 with 
+  [ nil ⇒ match l2 with [nil ⇒ true | _ ⇒ false]
+  | cons a1 tl1 ⇒ 
+      match l2 with [nil ⇒ false | cons a2 tl2 ⇒ a1 ==a2 ∧ eq_list A tl1 tl2]].
+
+lemma eq_list_true: ∀A:DeqSet.∀l1,l2:list A.
+  eq_list A l1 l2 = true ↔ l1 = l2.
+#A #l1 elim l1
+  [* [% // |#a #tl % normalize #H destruct ]
+  |#a1 #tl1 #Hind *  
+    [normalize % #H destruct
+    |#a2 #tl2 normalize %
+      [cases (true_or_false (a1==a2)) #Heq >Heq normalize 
+        [#Htl >(\P Heq) >(proj1 … (Hind tl2) Htl) // | #H destruct ]
+      |#H destruct >(\b (refl … )) >(proj2 … (Hind tl2) (refl …)) //
+      ]
+    ]
+  ]
+qed.
+
+definition DeqList ≝ λA:DeqSet.
+  mk_DeqSet (list A) (eq_list A) (eq_list_true A).
+  
+unification hint  0 ≔ C; 
+    T ≟ carr C,
+    X ≟ DeqList C
+(* ---------------------------------------- *) ⊢ 
+    list T ≡ carr X.
+
+alias id "eqb" = "cic:/matita/basics/deqsets/eqb#fix:0:0:3".
+alias symbol "hint_decl" (instance 1) = "hint_decl_Type0".
+unification hint  0 ≔ T,a1,a2; 
+    X ≟ DeqList T
+(* ---------------------------------------- *) ⊢ 
+    eq_list T a1 a2 ≡ eqb X a1 a2.
+
+
index df8d0a87c66ae6783735f95a0c1b4791cd3f76f0..24a5e16ce55a900d168a73965698f9ea576393b4 100644 (file)
@@ -9,7 +9,7 @@
      \ /   GNU General Public License Version 2   
       V_______________________________________________________________ *)
 
-include "basics/lists/listb.ma".
+include "basics/deqlist.ma".
 
 (****** DeqSet: a set with a decidable equality ******)
 
@@ -270,3 +270,184 @@ f a = b → memb ? 〈a,b〉 (graph_enum A B f) = true.
 #A #B #f #a #b #eqf @memb_filter_l [@(\b eqf)]
 @enum_prod_complete //
 qed.
+
+(* FinFun *)
+   
+definition enum_fun_raw: ∀A,B:DeqSet.list A → list B → list (list (DeqProd A B)) ≝
+  λA,B,lA,lB.foldr A (list (list (DeqProd A B))) 
+   (λa.compose ??? (λb. cons ? 〈a,b〉) lB) [[]] lA.
+   
+lemma enum_fun_raw_cons: ∀A,B,a,lA,lB. 
+  enum_fun_raw A B (a::lA) lB = 
+    compose ??? (λb. cons ? 〈a,b〉) lB (enum_fun_raw A B lA lB).
+//
+qed.  
+
+definition is_functional ≝ λA,B:DeqSet.λlA:list A.λl: list (DeqProd A B).
+  map ?? (fst A B) l = lA.
+
+definition carr_fun ≝ λA,B:FinSet.
+  DeqSig (DeqList (DeqProd A B)) (is_functional A B (enum A)).
+
+definition carr_fun_l ≝ λA,B:DeqSet.λl.
+  DeqSig (DeqList (DeqProd A B)) (is_functional A B l).
+
+lemma compose_spec1 : ∀A,B,C:DeqSet.∀f:A→B→C.∀a:A.∀b:B.∀lA:list A.∀lB:list B.  
+  a ∈ lA = true → b ∈ lB = true → ((f a b) ∈ (compose A B C f lA lB)) = true.
+#A #B #C #f #a #b #lA elim lA
+  [normalize #lB #H destruct
+  |#a1 #tl #Hind #lB #Ha #Hb cases (orb_true_l ?? Ha) #Hcase
+    [>(\P Hcase) normalize @memb_append_l1 @memb_map //
+    |@memb_append_l2 @Hind //
+    ]
+  ]
+qed.
+
+lemma compose_cons: ∀A,B,C.∀f:A→B→C.∀l1,l2,a.
+  compose A B C f (a::l1) l2 =
+    (map ?? (f a) l2)@(compose A B C f l1 l2). 
+// qed.
+
+lemma compose_spec2 : ∀A,B,C:DeqSet.∀f:A→B→C.∀c:C.∀lA:list A.∀lB:list B.  
+  c ∈ (compose A B C f lA lB) = true → 
+    ∃a,b.a ∈ lA = true ∧ b ∈ lB = true ∧ c = f a b.
+#A #B #C #f #c #lA elim lA
+  [normalize #lB #H destruct
+  |#a1 #tl #Hind #lB >compose_cons #Hc cases (memb_append … Hc) #Hcase
+    [lapply(memb_map_to_exists … Hcase) * #b * #Hb #Hf
+     %{a1} %{b} /3/
+    |lapply(Hind ? Hcase) * #a2 * #b * * #Ha #Hb #Hf %{a2} %{b} % // % //
+     @orb_true_r2 //
+    ]
+  ]
+qed.
+
+definition compose2 ≝ 
+  λA,B:DeqSet.λa:A.λl. compose B (carr_fun_l A B l) (carr_fun_l A B (a::l)) 
+   (λb,tl. mk_Sig ?? (〈a,b〉::(pi1 … tl)) ?).
+normalize @eq_f @(pi2 … tl) 
+qed.
+
+let rec Dfoldr (A:Type[0]) (B:list A → Type[0]) 
+ (f:∀a:A.∀l.B l → B (a::l)) (b:B [ ]) (l:list A) on l : B l ≝  
+ match l with [ nil ⇒ b | cons a l ⇒ f a l (Dfoldr A B f b l)].
+
+definition empty_graph: ∀A,B:DeqSet. carr_fun_l A B []. 
+#A #B %{[]} // qed.
+
+definition enum_fun: ∀A,B:DeqSet.∀lA:list A.list B → list (carr_fun_l A B lA) ≝
+  λA,B,lA,lB.Dfoldr A (λl.list (carr_fun_l A B l)) 
+   (λa,l.compose2 ?? a l lB) [empty_graph A B] lA.
+
+lemma mem_enum_fun: ∀A,B:DeqSet.∀lA,lB.∀x:carr_fun_l A B lA. 
+  pi1 … x ∈ map ?? (pi1 … ) (enum_fun A B lA lB) = true → 
+  x ∈ enum_fun A B lA lB = true .
+#A #B #lA #lB #x @(memb_map_inj  
+  (DeqSig (DeqList (DeqProd A B))
+   (λx0:DeqList (DeqProd A B).is_functional A B lA x0))
+  (DeqList (DeqProd A B)) (pi1 …))
+* #l1 #H1 * #l2 #H2 #Heq lapply H1 lapply H2 >Heq // 
+qed.
+  
+lemma enum_fun_cons: ∀A,B,a,lA,lB. 
+  enum_fun A B (a::lA) lB = 
+    compose ??? (λb,tl. mk_Sig ?? (〈a,b〉::(pi1 … tl)) ?) lB (enum_fun A B lA lB).
+//
+qed.
+
+lemma map_map: ∀A,B,C.∀f:A→B.∀g:B→C.∀l.
+  map ?? g (map ?? f l) =  map ?? (g ∘ f) l.
+#A #B #C #f #g #l elim l [//]
+#a #tl #Hind normalize @eq_f @Hind
+qed.
+
+lemma map_compose: ∀A,B,C,D.∀f:A→B→C.∀g:C→D.∀l1,l2.
+  map ?? g (compose A B C f l1 l2) = compose A B D (λa,b. g (f a b)) l1 l2.
+#A #B #C #D #f #g #l1 elim l1 [//]
+#a #tl #Hind #l2 >compose_cons >compose_cons <map_append @eq_f2
+  [@map_map |@Hind]
+qed.
+   
+definition enum_fun_graphs: ∀A,B,lA,lB.
+  map ?? (pi1 … ) (enum_fun A B lA lB) = enum_fun_raw A B lA lB.
+#A #B #lA elim lA [normalize //]
+#a #tl #Hind #lB >(enum_fun_cons A B a tl lB) >enum_fun_raw_cons >map_compose 
+cut (∀lB2. compose B (Σx:DeqList (DeqProd A B).is_functional A B tl x)
+  (DeqList (DeqProd A B))
+  (λa0:B
+   .λb:Σx:DeqList (DeqProd A B).is_functional A B tl x
+    .〈a,a0〉
+     ::pi1 (list (A×B)) (λx:DeqList (DeqProd A B).is_functional A B tl x) b) lB
+  (enum_fun A B tl lB2)
+  =compose B (list (A×B)) (list (A×B)) (λb:B.cons (A×B) 〈a,b〉) lB
+   (enum_fun_raw A B tl lB2))
+  [#lB2 elim lB
+    [normalize //
+    |#b #tlb #Hindb >compose_cons in ⊢ (???%); >compose_cons 
+     @eq_f2 [<Hind >map_map // |@Hindb]]] 
+#Hcut @Hcut
+qed.    
+
+lemma uniqueb_compose: ∀A,B,C:DeqSet.∀f,l1,l2. 
+  (∀a1,a2,b1,b2. f a1 b1 = f a2 b2 → a1 = a2 ∧ b1 = b2) →
+  uniqueb ? l1 = true → uniqueb ? l2 = true → 
+    uniqueb ? (compose A B C f l1 l2) = true.
+#A #B #C #f #l1 #l2 #Hinj elim l1 //
+#a #tl #Hind #HuA #HuB >compose_cons @uniqueb_append
+  [@(unique_map_inj … HuB) #b1 #b2 #Hb1b2 @(proj2 … (Hinj … Hb1b2))
+  |@Hind // @(andb_true_r … HuA)
+  |#c #Hc lapply(memb_map_to_exists … Hc) * #b * #Hb2 #Hfab % #Hc
+   lapply(compose_spec2 … Hc) * #a1 * #b1 * * #Ha1 #Hb1 <Hfab #H
+   @(absurd (a=a1)) 
+    [@(proj1 … (Hinj … H))
+    |% #eqa @(absurd … Ha1) % <eqa #H lapply(andb_true_l … HuA) >H 
+     normalize #H1 destruct (H1) 
+    ]
+  ]
+qed.
+
+lemma enum_fun_unique: ∀A,B:DeqSet.∀lA,lB.
+    uniqueb ? lA = true → uniqueb ? lB = true →
+    uniqueb ? (enum_fun A B lA lB) = true.
+#A #B #lA elim lA
+  [#lB #_ #ulB //
+  |#a #tlA #Hind #lB #uA #uB lapply (enum_fun_cons A B a tlA lB) #H >H
+   @(uniqueb_compose B (carr_fun_l A B tlA) (carr_fun_l A B (a::tlA))) 
+    [#b1 #b2 * #l1 #funl1 * #l2 #funl2 #H1 destruct (H1) /2/
+    |//
+    |@(Hind … uB) @(andb_true_r … uA)
+    ]
+  ]
+qed.
+
+lemma enum_fun_complete: ∀A,B:FinSet.∀l1,l2. 
+  (∀x:A. memb A x l1 = true) →
+  (∀x:B. memb B x l2 = true) →
+    ∀x:carr_fun_l A B l1. memb ? x (enum_fun A B l1 l2) = true.
+#A #B #l1 #l2 #H1 #H2 * #g #H @mem_enum_fun >enum_fun_graphs 
+lapply H -H lapply g -g elim l1  
+  [* // #p #tlg normalize #H destruct (H)
+  |#a #tl #Hind #g cases g
+    [normalize in ⊢ (%→?); #H destruct (H)
+    |* #a1 #b #tl1 normalize in ⊢ (%→?); #H
+     cut (is_functional A B tl tl1) [destruct (H) //] #Hfun 
+     >(cons_injective_l ????? H)
+     >(enum_fun_raw_cons … ) @(compose_spec1 … (λb. cons ? 〈a,b〉))
+      [@H2 |@Hind @Hfun]
+    ]
+  ]
+qed.
+    
+definition FinFun ≝ 
+λA,B:FinSet.mk_FinSet (carr_fun A B)
+  (enum_fun A B (enum A) (enum B)) 
+  (enum_fun_unique A B … (enum_unique A) (enum_unique B))
+  (enum_fun_complete A B … (enum_complete A) (enum_complete B)).
+
+(*
+unification hint  0 ≔ C1,C2; 
+    T1 ≟ FinSetcarr C1,
+    T2 ≟ FinSetcarr C2,
+    X ≟ FinProd C1 C2
+(* ---------------------------------------- *) ⊢ 
+    T1×T2 ≡ FinSetcarr X. *)
\ No newline at end of file
index 24b2c9a9e32b688c05c712cd824a390ba2f65a76..3133682dbc372fc1e2bdb4b9fe1c76393f070b89 100644 (file)
@@ -11,6 +11,7 @@
 
 include "basics/logic.ma".
 include "basics/core_notation/compose_2.ma".
+include "basics/core_notation/subseteq_2.ma".
 
 (********** predicates *********)
 
index 2f570c18feb503e1da38186bf9455a8c0b9e1018..8e40b666bfdee2eb318478d2899a3bece809619f 100644 (file)
@@ -11,6 +11,7 @@
 
 include "basics/logic.ma".
 include "basics/core_notation/singl_1.ma".
+include "basics/core_notation/subseteq_2.ma".
 
 (**** a subset of A is just an object of type A→Prop ****)
 
diff --git a/matita/matita/lib/binding/db.ma b/matita/matita/lib/binding/db.ma
deleted file mode 100644 (file)
index 534874f..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basics/lists/list.ma".
-
-axiom alpha : Type[0].
-notation "𝔸" non associative with precedence 90 for @{'alphabet}.
-interpretation "set of names" 'alphabet = alpha.
-
-inductive tp : Type[0] ≝ 
-| top : tp
-| arr : tp → tp → tp.
-inductive tm : Type[0] ≝ 
-| var : nat → tm
-| par :  𝔸 → tm
-| abs : tp → tm → tm
-| app : tm → tm → tm.
-
-let rec Nth T n (l:list T) on n ≝ 
-  match l with 
-  [ nil ⇒ None ?
-  | cons hd tl ⇒ match n with
-    [ O ⇒ Some ? hd
-    | S n0 ⇒ Nth T n0 tl ] ].
-
-inductive judg : list tp → tm → tp → Prop ≝ 
-| t_var : ∀g,n,t.Nth ? n g = Some ? t → judg g (var n) t
-| t_app : ∀g,m,n,t,u.judg g m (arr t u) → judg g n t → judg g (app m n) u
-| t_abs : ∀g,t,m,u.judg (t::g) m u → judg g (abs t m) (arr t u).
-
-definition Env := list (𝔸 × tp).
-
-axiom vclose_env : Env → list tp.
-axiom vclose_tm : Env → tm → tm.
-axiom Lam : 𝔸 → tp → tm → tm.
-definition Judg ≝ λG,M,T.judg (vclose_env G) (vclose_tm G M) T.
-definition dom ≝ λG:Env.map ?? (fst ??) G.
-
-definition sctx ≝ 𝔸 × tm.
-axiom swap_tm : 𝔸 → 𝔸 → tm → tm.
-definition sctx_app : sctx → 𝔸 → tm ≝ λM0,Y.let 〈X,M〉 ≝ M0 in swap_tm X Y M.
-
-axiom in_list : ∀A:Type[0].A → list A → Prop.
-interpretation "list membership" 'mem x l = (in_list ? x l).
-interpretation "list non-membership" 'notmem x l = (Not (in_list ? x l)).
-
-axiom in_Env : 𝔸 × tp → Env → Prop.
-notation "X ◃ G" non associative with precedence 45 for @{'lefttriangle $X $G}.
-interpretation "Env membership" 'lefttriangle x l = (in_Env x l).
-
-let rec FV M ≝ match M with 
-  [ par X ⇒ [X]
-  | app M1 M2 ⇒ FV M1@FV M2
-  | abs T M0 ⇒ FV M0
-  | _ ⇒ [ ] ].
-
-(* axiom Lookup : 𝔸 → Env → option tp. *)
-
-(* forma alto livello del judgment
-   t_abs* : ∀G,T,X,M,U.
-            (∀Y ∉ supp(M).Judg (〈Y,T〉::G) (M[Y]) U) → 
-            Judg G (Lam X T (M[X])) (arr T U) *)
-
-(* prima dimostrare, poi perfezionare gli assiomi, poi dimostrarli *)
-
-axiom Judg_ind : ∀P:Env → tm → tp → Prop.
-  (∀X,G,T.〈X,T〉 ◃ G → P G (par X) T) → 
-  (∀G,M,N,T,U.
-    Judg G M (arr T U) → Judg G N T → 
-    P G M (arr T U) → P G N T → P G (app M N) U) → 
-  (∀G,T1,T2,X,M1.
-    (∀Y.Y ∉ (FV (Lam X T1 (sctx_app M1 X))) → Judg (〈Y,T1〉::G) (sctx_app M1 Y) T2) →
-    (∀Y.Y ∉ (FV (Lam X T1 (sctx_app M1 X))) → P (〈Y,T1〉::G) (sctx_app M1 Y) T2) → 
-    P G (Lam X T1 (sctx_app M1 X)) (arr T1 T2)) → 
-  ∀G,M,T.Judg G M T → P G M T.
-
-axiom t_par : ∀X,G,T.〈X,T〉 ◃ G → Judg G (par X) T.
-axiom t_app2 : ∀G,M,N,T,U.Judg G M (arr T U) → Judg G N T → Judg G (app M N) U.
-axiom t_Lam : ∀G,X,M,T,U.Judg (〈X,T〉::G) M U → Judg G (Lam X T M) (arr T U).
-
-definition subenv ≝ λG1,G2.∀x.x ◃ G1 → x ◃ G2.
-interpretation "subenv" 'subseteq G1 G2 = (subenv G1 G2).
-
-axiom daemon : ∀P:Prop.P.
-
-theorem weakening : ∀G1,G2,M,T.G1 ⊆ G2 → Judg G1 M T → Judg G2 M T.
-#G1 #G2 #M #T #Hsub #HJ lapply Hsub lapply G2 -G2 change with (∀G2.?)
-@(Judg_ind … HJ)
-[ #X #G #T0 #Hin #G2 #Hsub @t_par @Hsub //
-| #G #M0 #N #T0 #U #HM0 #HN #IH1 #IH2 #G2 #Hsub @t_app2
-  [| @IH1 // | @IH2 // ]
-| #G #T1 #T2 #X #M1 #HM1 #IH #G2 #Hsub @t_Lam @IH 
-  [ (* trivial property of Lam *) @daemon 
-  | (* trivial property of subenv *) @daemon ]
-]
-qed.
-
-(* Serve un tipo Tm per i termini localmente chiusi e i suoi principi di induzione e
-   ricorsione *)
\ No newline at end of file
diff --git a/matita/matita/lib/binding/fp.ma b/matita/matita/lib/binding/fp.ma
deleted file mode 100644 (file)
index 14ba2f7..0000000
+++ /dev/null
@@ -1,296 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "binding/names.ma".
-
-(* permutations *)
-definition finite_perm : ∀X:Nset.(X → X) → Prop ≝ 
- λX,f.injective X X f ∧ surjective X X f ∧ ∃l.∀x.x ∉ l → f x = x.
-
-(* maps a permutation to a list of parameters *)
-definition Pi_list : ∀X:Nset.(X → X) → list X → list X ≝ 
- λX,p,xl.map ?? (λx.p x) xl.
-
-interpretation "permutation of X list" 'middot p x = (Pi_list p x).
-
-definition swap : ∀N:Nset.N → N → N → N ≝
-  λN,u,v,x.match (x == u) with
-    [true ⇒ v
-    |false ⇒ match (x == v) with
-       [true ⇒ u
-       |false ⇒ x]].
-       
-axiom swap_right : ∀N,x,y.swap N x y y = x.
-(*
-#N x y;nnormalize;nrewrite > (p_eqb3 ? y y …);//;
-nlapply (refl ? (y ≟ x));ncases (y ≟ x) in ⊢ (???% → %);nnormalize;//;
-#H1;napply p_eqb1;//;
-nqed.
-*)
-
-axiom swap_left : ∀N,x,y.swap N x y x = y.
-(*
-#N x y;nnormalize;nrewrite > (p_eqb3 ? x x …);//;
-nqed.
-*)
-
-axiom swap_other : ∀N,x,y,z.x ≠ z → y ≠ z → swap N x y z = z.
-(*
-#N x y z H1 H2;nnormalize;nrewrite > (p_eqb4 …);
-##[nrewrite > (p_eqb4 …);//;@;ncases H2;/2/;
-##|@;ncases H1;/2/
-##]
-nqed.
-*)
-
-axiom swap_inv : ∀N,x,y,z.swap N x y (swap N x y z) = z.
-(*
-#N x y z;nlapply (refl ? (x ≟ z));ncases (x ≟ z) in ⊢ (???% → ?);#H1
-##[nrewrite > (p_eqb1 … H1);nrewrite > (swap_left …);//;
-##|nlapply (refl ? (y ≟ z));ncases (y ≟ z) in ⊢ (???% → ?);#H2
-   ##[nrewrite > (p_eqb1 … H2);nrewrite > (swap_right …);//;
-   ##|nrewrite > (swap_other …) in ⊢ (??(????%)?);/2/;
-      nrewrite > (swap_other …);/2/;
-   ##]
-##]
-nqed.
-*)
-
-axiom swap_fp : ∀N,x1,x2.finite_perm ? (swap N x1 x2).
-(*
-#N x1 x2;@
-##[@
-   ##[nwhd;#xa xb;nnormalize;nlapply (refl ? (xa ≟ x1));
-      ncases (xa ≟ x1) in ⊢ (???% → %);#H1
-      ##[nrewrite > (p_eqb1 … H1);nlapply (refl ? (xb ≟ x1));
-         ncases (xb ≟ x1) in ⊢ (???% → %);#H2
-         ##[nrewrite > (p_eqb1 … H2);//
-         ##|nlapply (refl ? (xb ≟ x2));
-            ncases (xb ≟ x2) in ⊢ (???% → %);#H3
-            ##[nnormalize;#H4;nrewrite > H4 in H3;
-               #H3;nrewrite > H3 in H2;#H2;ndestruct (H2)
-            ##|nnormalize;#H4;nrewrite > H4 in H3;
-               nrewrite > (p_eqb3 …);//;#H5;ndestruct (H5)
-            ##]
-         ##]
-      ##|nlapply (refl ? (xa ≟ x2));
-         ncases (xa ≟ x2) in ⊢ (???% → %);#H2
-         ##[nrewrite > (p_eqb1 … H2);nlapply (refl ? (xb ≟ x1));
-            ncases (xb ≟ x1) in ⊢ (???% → %);#H3
-            ##[nnormalize;#H4;nrewrite > H4 in H3;
-               #H3;nrewrite > (p_eqb1 … H3);@
-            ##|nnormalize;nlapply (refl ? (xb ≟ x2));
-               ncases (xb ≟ x2) in ⊢ (???% → %);#H4
-               ##[nrewrite > (p_eqb1 … H4);//
-               ##|nnormalize;#H5;nrewrite > H5 in H3;
-                  nrewrite > (p_eqb3 …);//;#H6;ndestruct (H6);
-               ##]
-            ##]
-         ##|nnormalize;nlapply (refl ? (xb ≟ x1));
-            ncases (xb ≟ x1) in ⊢ (???% → %);#H3
-            ##[nnormalize;#H4;nrewrite > H4 in H2;nrewrite > (p_eqb3 …);//;
-               #H5;ndestruct (H5)
-            ##|nlapply (refl ? (xb ≟ x2));
-               ncases (xb ≟ x2) in ⊢ (???% → %);#H4
-               ##[nnormalize;#H5;nrewrite > H5 in H1;nrewrite > (p_eqb3 …);//;
-                  #H6;ndestruct (H6)
-               ##|nnormalize;//
-               ##]
-            ##]
-         ##]
-      ##]
-   ##|nwhd;#z;nnormalize;nlapply (refl ? (z ≟ x1));
-      ncases (z ≟ x1) in ⊢ (???% → %);#H1
-      ##[nlapply (refl ? (z ≟ x2));
-         ncases (z ≟ x2) in ⊢ (???% → %);#H2
-         ##[@ z;nrewrite > H1;nrewrite > H2;napply p_eqb1;//
-         ##|@ x2;nrewrite > (p_eqb4 …);
-            ##[nrewrite > (p_eqb3 …);//;
-               nnormalize;napply p_eqb1;//
-            ##|nrewrite < (p_eqb1 … H1);@;#H3;nrewrite > H3 in H2;
-               nrewrite > (p_eqb3 …);//;#H2;ndestruct (H2)
-            ##]
-         ##]
-      ##|nlapply (refl ? (z ≟ x2));
-         ncases (z ≟ x2) in ⊢ (???% → %);#H2
-         ##[@ x1;nrewrite > (p_eqb3 …);//;
-            napply p_eqb1;nnormalize;//
-         ##|@ z;nrewrite > H1;nrewrite > H2;@;
-         ##]
-      ##]
-   ##]
-##|@ [x1;x2];#x0 H1;nrewrite > (swap_other …)
-   ##[@
-   ##|@;#H2;nrewrite > H2 in H1;*;#H3;napply H3;/2/;
-   ##|@;#H2;nrewrite > H2 in H1;*;#H3;napply H3;//;
-   ##]
-##]
-nqed.
-*)
-
-axiom inj_swap : ∀N,u,v.injective ?? (swap N u v).
-(*
-#N u v;ncases (swap_fp N u v);*;#H1 H2 H3;//;
-nqed.
-*)
-
-axiom surj_swap : ∀N,u,v.surjective ?? (swap N u v).
-(*
-#N u v;ncases (swap_fp N u v);*;#H1 H2 H3;//;
-nqed.
-*)
-
-axiom finite_swap : ∀N,u,v.∃l.∀x.x ∉ l → swap N u v x = x.
-(*
-#N u v;ncases (swap_fp N u v);*;#H1 H2 H3;//;
-nqed.
-*)
-
-(* swaps two lists of parameters 
-definition Pi_swap_list : ∀xl,xl':list X.X → X ≝ 
- λxl,xl',x.foldr2 ??? (λu,v,r.swap ? u v r) x xl xl'.
-
-nlemma fp_swap_list : 
-  ∀xl,xl'.finite_perm ? (Pi_swap_list xl xl').
-#xl xl';@
-##[@;
-   ##[ngeneralize in match xl';nelim xl
-      ##[nnormalize;//;
-      ##|#x0 xl0;#IH xl'';nelim xl''
-         ##[nnormalize;//
-         ##|#x1 xl1 IH1 y0 y1;nchange in ⊢ (??%% → ?) with (swap ????);
-            #H1;nlapply (inj_swap … H1);#H2;
-            nlapply (IH … H2);//
-         ##]
-      ##]
-   ##|ngeneralize in match xl';nelim xl
-      ##[nnormalize;#_;#z;@z;@
-      ##|#x' xl0 IH xl'';nelim xl''
-         ##[nnormalize;#z;@z;@
-         ##|#x1 xl1 IH1 z;
-            nchange in ⊢ (??(λ_.???%)) with (swap ????);
-            ncases (surj_swap X x' x1 z);#x2 H1;
-            ncases (IH xl1 x2);#x3 H2;@ x3;
-            nrewrite < H2;napply H1
-         ##]
-      ##]
-   ##]
-##|ngeneralize in match xl';nelim xl
-   ##[#;@ [];#;@
-   ##|#x0 xl0 IH xl'';ncases xl''
-      ##[@ [];#;@
-      ##|#x1 xl1;ncases (IH xl1);#xl2 H1;
-         ncases (finite_swap X x0 x1);#xl3 H2;
-         @ (xl2@xl3);#x2 H3;
-         nchange in ⊢ (??%?) with (swap ????);
-         nrewrite > (H1 …);
-         ##[nrewrite > (H2 …);//;@;#H4;ncases H3;#H5;napply H5;
-            napply in_list_to_in_list_append_r;//
-         ##|@;#H4;ncases H3;#H5;napply H5;
-            napply in_list_to_in_list_append_l;//
-         ##]
-      ##]
-   ##]
-##]
-nqed.
-
-(* the 'reverse' swap of lists of parameters 
-   composing Pi_swap_list and Pi_swap_list_r yields the identity function
-   (see the Pi_swap_list_inv lemma) *)
-ndefinition Pi_swap_list_r : ∀xl,xl':list X. Pi ≝ 
- λxl,xl',x.foldl2 ??? (λr,u,v.swap ? u v r ) x xl xl'.
-
-nlemma fp_swap_list_r : 
-  ∀xl,xl'.finite_perm ? (Pi_swap_list_r xl xl').
-#xl xl';@
-##[@;
-   ##[ngeneralize in match xl';nelim xl
-      ##[nnormalize;//;
-      ##|#x0 xl0;#IH xl'';nelim xl''
-         ##[nnormalize;//
-         ##|#x1 xl1 IH1 y0 y1;nwhd in ⊢ (??%% → ?);
-            #H1;nlapply (IH … H1);#H2;
-            napply (inj_swap … H2);
-         ##]
-      ##]
-   ##|ngeneralize in match xl';nelim xl
-      ##[nnormalize;#_;#z;@z;@
-      ##|#x' xl0 IH xl'';nelim xl''
-         ##[nnormalize;#z;@z;@
-         ##|#x1 xl1 IH1 z;nwhd in ⊢ (??(λ_.???%));
-            ncases (IH xl1 z);#x2 H1;
-            ncases (surj_swap X x' x1 x2);#x3 H2;
-            @ x3;nrewrite < H2;napply H1;
-         ##]
-      ##]
-   ##]
-##|ngeneralize in match xl';nelim xl
-   ##[#;@ [];#;@
-   ##|#x0 xl0 IH xl'';ncases xl''
-      ##[@ [];#;@
-      ##|#x1 xl1;
-         ncases (IH xl1);#xl2 H1;
-         ncases (finite_swap X x0 x1);#xl3 H2;
-         @ (xl2@xl3);#x2 H3;nwhd in ⊢ (??%?);
-         nrewrite > (H2 …);
-         ##[nrewrite > (H1 …);//;@;#H4;ncases H3;#H5;napply H5;
-            napply in_list_to_in_list_append_l;//
-         ##|@;#H4;ncases H3;#H5;napply H5;
-            napply in_list_to_in_list_append_r;//
-         ##]
-      ##]
-   ##]
-##]
-nqed.
-
-nlemma Pi_swap_list_inv :
- ∀xl1,xl2,x.
- Pi_swap_list xl1 xl2 (Pi_swap_list_r xl1 xl2 x) = x.
-#xl;nelim xl
-##[#;@
-##|#x1 xl1 IH xl';ncases xl'
-   ##[#;@
-   ##|#x2 xl2;#x;
-      nchange in ⊢ (??%?) with 
-        (swap ??? (Pi_swap_list ?? 
-                  (Pi_swap_list_r ?? (swap ????))));
-      nrewrite > (IH xl2 ?);napply swap_inv;
-   ##]
-##]
-nqed.
-
-nlemma Pi_swap_list_fresh :
-  ∀x,xl1,xl2.x ∉ xl1 → x ∉ xl2 → Pi_swap_list xl1 xl2 x = x.
-#x xl1;nelim xl1
-##[#;@
-##|#x3 xl3 IH xl2' H1;ncases xl2'
-   ##[#;@
-   ##|#x4 xl4 H2;ncut (x ∉ xl3 ∧ x ∉ xl4);
-      ##[@
-         ##[@;#H3;ncases H1;#H4;napply H4;/2/;
-         ##|@;#H3;ncases H2;#H4;napply H4;/2/
-         ##]
-      ##] *; #H1' H2';
-      nchange in ⊢ (??%?) with (swap ????);
-      nrewrite > (swap_other …)
-      ##[napply IH;//;
-      ##|nchange in ⊢ (?(???%)) with (Pi_swap_list ???);
-         nrewrite > (IH …);//;@;#H3;ncases H2;#H4;napply H4;//;
-      ##|nchange in ⊢ (?(???%)) with (Pi_swap_list ???);
-         nrewrite > (IH …);//;@;#H3;ncases H1;#H4;napply H4;//
-      ##]
-   ##]
-##]
-nqed.
-*)
\ No newline at end of file
diff --git a/matita/matita/lib/binding/ln.ma b/matita/matita/lib/binding/ln.ma
deleted file mode 100644 (file)
index ca7f574..0000000
+++ /dev/null
@@ -1,716 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basics/lists/list.ma".
-include "basics/deqsets.ma".
-include "binding/names.ma".
-include "binding/fp.ma".
-
-axiom alpha : Nset.
-notation "𝔸" non associative with precedence 90 for @{'alphabet}.
-interpretation "set of names" 'alphabet = alpha.
-
-inductive tp : Type[0] ≝ 
-| top : tp
-| arr : tp → tp → tp.
-inductive pretm : Type[0] ≝ 
-| var : nat → pretm
-| par :  𝔸 → pretm
-| abs : tp → pretm → pretm
-| app : pretm → pretm → pretm.
-
-let rec Nth T n (l:list T) on n ≝ 
-  match l with 
-  [ nil ⇒ None ?
-  | cons hd tl ⇒ match n with
-    [ O ⇒ Some ? hd
-    | S n0 ⇒ Nth T n0 tl ] ].
-
-let rec vclose_tm_aux u x k ≝ match u with
-  [ var n ⇒ if (leb k n) then var (S n) else u
-  | par x0 ⇒ if (x0 == x) then (var k) else u
-  | app v1 v2 ⇒ app (vclose_tm_aux v1 x k) (vclose_tm_aux v2 x k)
-  | abs s v ⇒ abs s (vclose_tm_aux v x (S k)) ].
-definition vclose_tm ≝ λu,x.vclose_tm_aux u x O.  
-
-definition vopen_var ≝ λn,x,k.match eqb n k with
- [ true ⇒ par x
- | false ⇒ match leb n k with
-   [ true ⇒ var n
-   | false ⇒ var (pred n) ] ].
-
-let rec vopen_tm_aux u x k ≝ match u with
-  [ var n ⇒ vopen_var n x k
-  | par x0 ⇒ u
-  | app v1 v2 ⇒ app (vopen_tm_aux v1 x k) (vopen_tm_aux v2 x k)
-  | abs s v ⇒ abs s (vopen_tm_aux v x (S k)) ].
-definition vopen_tm ≝ λu,x.vopen_tm_aux u x O.
-
-let rec FV u ≝ match u with 
-  [ par x ⇒ [x]
-  | app v1 v2 ⇒ FV v1@FV v2
-  | abs s v ⇒ FV v
-  | _ ⇒ [ ] ].  
-
-definition lam ≝ λx,s,u.abs s (vclose_tm u x).
-
-let rec Pi_map_tm p u on u ≝ match u with
-[ par x ⇒ par (p x)
-| var _ ⇒ u
-| app v1 v2 ⇒ app (Pi_map_tm p v1) (Pi_map_tm p v2)
-| abs s v ⇒ abs s (Pi_map_tm p v) ].
-
-interpretation "permutation of tm" 'middot p x = (Pi_map_tm p x).
-
-notation "hvbox(u⌈x⌉)"
-  with precedence 45
-  for @{ 'open $u $x }.
-
-(*
-notation "hvbox(u⌈x⌉)"
-  with precedence 45
-  for @{ 'open $u $x }.
-notation "❴ u ❵ x" non associative with precedence 90 for @{ 'open $u $x }.
-*)
-interpretation "ln term variable open" 'open u x = (vopen_tm u x).
-notation < "hvbox(ν x break . u)"
- with precedence 20
-for @{'nu $x $u }.
-notation > "ν list1 x sep , . term 19 u" with precedence 20
-  for ${ fold right @{$u} rec acc @{'nu $x $acc)} }.
-interpretation "ln term variable close" 'nu x u = (vclose_tm u x).
-
-let rec tm_height u ≝ match u with
-[ app v1 v2 ⇒ S (max (tm_height v1) (tm_height v2))
-| abs s v ⇒ S (tm_height v) 
-| _ ⇒ O ].
-
-theorem le_n_O_rect_Type0 : ∀n:nat. n ≤ O → ∀P: nat →Type[0]. P O → P n.
-#n (cases n) // #a #abs cases (?:False) /2/ qed. 
-
-theorem nat_rect_Type0_1 : ∀n:nat.∀P:nat → Type[0]. 
-(∀m.(∀p. p < m → P p) → P m) → P n.
-#n #P #H 
-cut (∀q:nat. q ≤ n → P q) /2/
-(elim n) 
- [#q #HleO (* applica male *) 
-    @(le_n_O_rect_Type0 ? HleO)
-    @H #p #ltpO cases (?:False) /2/ (* 3 *)
- |#p #Hind #q #HleS 
-    @H #a #lta @Hind @le_S_S_to_le /2/
- ]
-qed.
-
-lemma leb_false_to_lt : ∀n,m. leb n m = false → m < n.
-#n elim n
-[ #m normalize #H destruct(H)
-| #n0 #IH * // #m normalize #H @le_S_S @IH // ]
-qed.
-
-lemma nominal_eta_aux : ∀x,u.x ∉ FV u → ∀k.vclose_tm_aux (vopen_tm_aux u x k) x k = u.
-#x #u elim u
-[ #n #_ #k normalize cases (decidable_eq_nat n k) #Hnk
-  [ >Hnk >eqb_n_n normalize >(\b ?) //
-  | >(not_eq_to_eqb_false … Hnk) normalize cases (true_or_false (leb n k)) #Hleb
-    [ >Hleb normalize >(?:leb k n = false) //
-      @lt_to_leb_false @not_eq_to_le_to_lt /2/
-    | >Hleb normalize >(?:leb k (pred n) = true) normalize
-      [ cases (leb_false_to_lt … Hleb) //
-      | @le_to_leb_true cases (leb_false_to_lt … Hleb) normalize /2/ ] ] ]
-| #y normalize #Hy >(\bf ?) // @(not_to_not … Hy) //
-| #s #v #IH normalize #Hv #k >IH // @Hv
-| #v1 #v2 #IH1 #IH2 normalize #Hv1v2 #k 
-  >IH1 [ >IH2 // | @(not_to_not … Hv1v2) @in_list_to_in_list_append_l ]
-  @(not_to_not … Hv1v2) @in_list_to_in_list_append_r ]
-qed.
-
-corollary nominal_eta : ∀x,u.x ∉ FV u → (νx.u⌈x⌉) = u.
-#x #u #Hu @nominal_eta_aux //
-qed.
-
-lemma eq_height_vopen_aux : ∀v,x,k.tm_height (vopen_tm_aux v x k) = tm_height v.
-#v #x elim v
-[ #n #k normalize cases (eqb n k) // cases (leb n k) //
-| #u #k %
-| #s #u #IH #k normalize >IH %
-| #u1 #u2 #IH1 #IH2 #k normalize >IH1 >IH2 % ]
-qed.
-
-corollary eq_height_vopen : ∀v,x.tm_height (v⌈x⌉) = tm_height v.
-#v #x @eq_height_vopen_aux
-qed.
-
-theorem pretm_ind_plus_aux : 
- ∀P:pretm → Type[0].
-   (∀x:𝔸.P (par x)) → 
-   (∀n:ℕ.P (var n)) → 
-   (∀v1,v2. P v1 → P v2 → P (app v1 v2)) → 
-   ∀C:list 𝔸.
-   (∀x,s,v.x ∉ FV v → x ∉ C → P (v⌈x⌉) → P (lam x s (v⌈x⌉))) →
- ∀n,u.tm_height u ≤ n → P u.
-#P #Hpar #Hvar #Happ #C #Hlam #n change with ((λn.?) n); @(nat_rect_Type0_1 n ??)
-#m cases m
-[ #_ * /2/
-  [ normalize #s #v #Hfalse cases (?:False) cases (not_le_Sn_O (tm_height v)) /2/
-  | #v1 #v2 whd in ⊢ (?%?→?); #Hfalse cases (?:False) cases (not_le_Sn_O (max ??))
-    [ #H @H @Hfalse|*:skip] ] ]
--m #m #IH * /2/
-[ #s #v whd in ⊢ (?%?→?); #Hv
-  lapply (p_fresh … (C@FV v)) letin y ≝ (N_fresh … (C@FV v)) #Hy
-  >(?:abs s v = lam y s (v⌈y⌉))
-  [| whd in ⊢ (???%); >nominal_eta // @(not_to_not … Hy) @in_list_to_in_list_append_r ] 
-  @Hlam
-  [ @(not_to_not … Hy) @in_list_to_in_list_append_r
-  | @(not_to_not … Hy) @in_list_to_in_list_append_l ]
-  @IH [| @Hv | >eq_height_vopen % ]
-| #v1 #v2 whd in ⊢ (?%?→?); #Hv @Happ
-  [ @IH [| @Hv | @le_max_1 ] | @IH [| @Hv | @le_max_2 ] ] ]
-qed.
-
-corollary pretm_ind_plus :
- ∀P:pretm → Type[0].
-   (∀x:𝔸.P (par x)) → 
-   (∀n:ℕ.P (var n)) → 
-   (∀v1,v2. P v1 → P v2 → P (app v1 v2)) → 
-   ∀C:list 𝔸.
-   (∀x,s,v.x ∉ FV v → x ∉ C → P (v⌈x⌉) → P (lam x s (v⌈x⌉))) →
- ∀u.P u.
-#P #Hpar #Hvar #Happ #C #Hlam #u @pretm_ind_plus_aux /2/
-qed.
-
-(* maps a permutation to a list of terms *)
-definition Pi_map_list : (𝔸 → 𝔸) → list 𝔸 → list 𝔸 ≝ map 𝔸 𝔸 .
-
-(* interpretation "permutation of name list" 'middot p x = (Pi_map_list p x).*)
-
-(*
-inductive tm : pretm → Prop ≝ 
-| tm_par : ∀x:𝔸.tm (par x)
-| tm_app : ∀u,v.tm u → tm v → tm (app u v)
-| tm_lam : ∀x,s,u.tm u → tm (lam x s u).
-
-inductive ctx_aux : nat → pretm → Prop ≝ 
-| ctx_var : ∀n,k.n < k → ctx_aux k (var n)
-| ctx_par : ∀x,k.ctx_aux k (par x)
-| ctx_app : ∀u,v,k.ctx_aux k u → ctx_aux k v → ctx_aux k (app u v)
-(* è sostituibile da ctx_lam ? *)
-| ctx_abs : ∀s,u.ctx_aux (S k) u → ctx_aux k (abs s u).
-*)
-
-inductive tm_or_ctx (k:nat) : pretm → Type[0] ≝ 
-| toc_var : ∀n.n < k → tm_or_ctx k (var n)
-| toc_par : ∀x.tm_or_ctx k (par x)
-| toc_app : ∀u,v.tm_or_ctx k u → tm_or_ctx k v → tm_or_ctx k (app u v)
-| toc_lam : ∀x,s,u.tm_or_ctx k u → tm_or_ctx k (lam x s u).
-
-definition tm ≝ λt.tm_or_ctx O t.
-definition ctx ≝ λt.tm_or_ctx 1 t.
-
-definition check_tm ≝ λu,k.
-  pretm_ind_plus ?
-  (λ_.true)
-  (λn.leb (S n) k)
-  (λv1,v2,rv1,rv2.rv1 ∧ rv2)
-  [] (λx,s,v,px,pC,rv.rv)
-  u.
-
-axiom pretm_ind_plus_app : ∀P,u,v,C,H1,H2,H3,H4.
-  pretm_ind_plus P H1 H2 H3 C H4 (app u v) = 
-    H3 u v (pretm_ind_plus P H1 H2 H3 C H4 u) (pretm_ind_plus P H1 H2 H3 C H4 v).
-
-axiom pretm_ind_plus_lam : ∀P,x,s,u,C,px,pC,H1,H2,H3,H4.
-  pretm_ind_plus P H1 H2 H3 C H4 (lam x s (u⌈x⌉)) = 
-    H4 x s u px pC (pretm_ind_plus P H1 H2 H3 C H4 (u⌈x⌉)).
-
-record TM : Type[0] ≝ {
-  pretm_of_TM :> pretm;
-  tm_of_TM : check_tm pretm_of_TM O = true
-}.
-
-record CTX : Type[0] ≝ {
-  pretm_of_CTX :> pretm;
-  ctx_of_CTX : check_tm pretm_of_CTX 1 = true
-}.
-
-inductive tm2 : pretm → Type[0] ≝ 
-| tm_par : ∀x.tm2 (par x)
-| tm_app : ∀u,v.tm2 u → tm2 v → tm2 (app u v)
-| tm_lam : ∀x,s,u.x ∉ FV u → (∀y.y ∉ FV u → tm2 (u⌈y⌉)) → tm2 (lam x s (u⌈x⌉)).
-
-(*
-inductive tm' : pretm → Prop ≝ 
-| tm_par : ∀x.tm' (par x)
-| tm_app : ∀u,v.tm' u → tm' v → tm' (app u v)
-| tm_lam : ∀x,s,u,C.x ∉ FV u → x ∉ C → (∀y.y ∉ FV u → tm' (❴u❵y)) → tm' (lam x s (❴u❵x)).
-*)
-
-lemma pi_vclose_tm : 
-  ∀z1,z2,x,u.swap 𝔸 z1 z2·(νx.u) = (ν swap ? z1 z2 x.swap 𝔸 z1 z2 · u).
-#z1 #z2 #x #u
-change with (vclose_tm_aux ???) in match (vclose_tm ??);
-change with (vclose_tm_aux ???) in ⊢ (???%); lapply O elim u normalize //
-[ #n #k cases (leb k n) normalize %
-| #x0 #k cases (true_or_false (x0==z1)) #H1 >H1 normalize
-  [ cases (true_or_false (x0==x)) #H2 >H2 normalize
-    [ <(\P H2) >H1 normalize >(\b (refl ? z2)) %
-    | >H1 normalize cases (true_or_false (x==z1)) #H3 >H3 normalize
-      [ >(\P H3) in H2; >H1 #Hfalse destruct (Hfalse)
-      | cases (true_or_false (x==z2)) #H4 >H4 normalize
-        [ cases (true_or_false (z2==z1)) #H5 >H5 normalize //
-          >(\P H5) in H4; >H3 #Hfalse destruct (Hfalse)
-        | >(\bf ?) // @sym_not_eq @(\Pf H4) ]
-      ]
-    ]
-  | cases (true_or_false (x0==x)) #H2 >H2 normalize
-    [ <(\P H2) >H1 normalize >(\b (refl ??)) %
-    | >H1 normalize cases (true_or_false (x==z1)) #H3 >H3 normalize
-      [ cases (true_or_false (x0==z2)) #H4 >H4 normalize 
-        [ cases (true_or_false (z1==z2)) #H5 >H5 normalize //
-          <(\P H5) in H4; <(\P H3) >H2 #Hfalse destruct (Hfalse)
-        | >H4 % ]
-      | cases (true_or_false (x0==z2)) #H4 >H4 normalize
-        [ cases (true_or_false (x==z2)) #H5 >H5 normalize 
-          [ <(\P H5) in H4; >H2 #Hfalse destruct (Hfalse)
-          | >(\bf ?) // @sym_not_eq @(\Pf H3) ]
-        | cases (true_or_false (x==z2)) #H5 >H5 normalize
-          [ >H1 %
-          | >H2 % ]
-        ]
-      ]
-    ]
-  ]
-]
-qed.
-
-lemma pi_vopen_tm : 
-  ∀z1,z2,x,u.swap 𝔸 z1 z2·(u⌈x⌉) = (swap 𝔸 z1 z2 · u⌈swap 𝔸 z1 z2 x⌉).
-#z1 #z2 #x #u
-change with (vopen_tm_aux ???) in match (vopen_tm ??);
-change with (vopen_tm_aux ???) in ⊢ (???%); lapply O elim u normalize //
-#n #k cases (true_or_false (eqb n k)) #H1 >H1 normalize //
-cases (true_or_false (leb n k)) #H2 >H2 normalize //
-qed.
-
-lemma pi_lam : 
-  ∀z1,z2,x,s,u.swap 𝔸 z1 z2 · lam x s u = lam (swap 𝔸 z1 z2 x) s (swap 𝔸 z1 z2 · u).
-#z1 #z2 #x #s #u whd in ⊢ (???%); <(pi_vclose_tm …) %
-qed.
-
-lemma eqv_FV : ∀z1,z2,u.FV (swap 𝔸 z1 z2 · u) = Pi_map_list (swap 𝔸 z1 z2) (FV u).
-#z1 #z2 #u elim u //
-[ #s #v normalize //
-| #v1 #v2 normalize /2/ ]
-qed.
-
-lemma swap_inv_tm : ∀z1,z2,u.swap 𝔸 z1 z2 · (swap 𝔸 z1 z2 · u) = u.
-#z1 #z2 #u elim u [1,3,4:normalize //]
-#x whd in ⊢ (??%?); >swap_inv %
-qed.
-
-lemma eqv_in_list : ∀x,l,z1,z2.x ∈ l → swap 𝔸 z1 z2 x ∈ Pi_map_list (swap 𝔸 z1 z2) l.
-#x #l #z1 #z2 #Hin elim Hin
-[ #x0 #l0 %
-| #x1 #x2 #l0 #Hin #IH %2 @IH ]
-qed.
-
-lemma eqv_tm2 : ∀u.tm2 u → ∀z1,z2.tm2 ((swap ? z1 z2)·u).
-#u #Hu #z1 #z2 letin p ≝ (swap ? z1 z2) elim Hu /2/
-#x #s #v #Hx #Hv #IH >pi_lam >pi_vopen_tm %3
-[ @(not_to_not … Hx) -Hx #Hx
-  <(swap_inv ? z1 z2 x) <(swap_inv_tm z1 z2 v) >eqv_FV @eqv_in_list //
-| #y #Hy <(swap_inv ? z1 z2 y)
-  <pi_vopen_tm @IH @(not_to_not … Hy) -Hy #Hy <(swap_inv ? z1 z2 y)
-  >eqv_FV @eqv_in_list //
-]
-qed.
-
-lemma vclose_vopen_aux : ∀x,u,k.vopen_tm_aux (vclose_tm_aux u x k) x k = u.
-#x #u elim u normalize //
-[ #n #k cases (true_or_false (leb k n)) #H >H whd in ⊢ (??%?);
-  [ cases (true_or_false (eqb (S n) k)) #H1 >H1
-    [ <(eqb_true_to_eq … H1) in H; #H lapply (leb_true_to_le … H) -H #H
-      cases (le_to_not_lt … H) -H #H cases (H ?) %
-    | whd in ⊢ (??%?); >lt_to_leb_false // @le_S_S /2/ ]
-  | cases (true_or_false (eqb n k)) #H1 >H1 normalize
-    [ >(eqb_true_to_eq … H1) in H; #H lapply (leb_false_to_not_le … H) -H
-      * #H cases (H ?) %
-    | >le_to_leb_true // @not_lt_to_le % #H2 >le_to_leb_true in H;
-      [ #H destruct (H) | /2/ ]
-    ]
-  ]
-| #x0 #k cases (true_or_false (x0==x)) #H1 >H1 normalize // >(\P H1) >eqb_n_n % ]
-qed.      
-
-lemma vclose_vopen : ∀x,u.((νx.u)⌈x⌉) = u. #x #u @vclose_vopen_aux
-qed.
-
-(*
-theorem tm_to_tm : ∀t.tm' t → tm t.
-#t #H elim H
-*)
-
-lemma in_list_singleton : ∀T.∀t1,t2:T.t1 ∈ [t2] → t1 = t2.
-#T #t1 #t2 #H @(in_list_inv_ind ??? H) /2/
-qed.
-
-lemma fresh_vclose_tm_aux : ∀u,x,k.x ∉ FV (vclose_tm_aux u x k).
-#u #x elim u //
-[ #n #k normalize cases (leb k n) normalize //
-| #x0 #k normalize cases (true_or_false (x0==x)) #H >H normalize //
-  lapply (\Pf H) @not_to_not #Hin >(in_list_singleton ??? Hin) %
-| #v1 #v2 #IH1 #IH2 #k normalize % #Hin cases (in_list_append_to_or_in_list ???? Hin) /2/ ]
-qed.
-
-lemma fresh_vclose_tm : ∀u,x.x ∉ FV (νx.u). //
-qed.
-
-lemma check_tm_true_to_toc : ∀u,k.check_tm u k = true → tm_or_ctx k u.
-#u @(pretm_ind_plus ???? [ ] ? u)
-[ #x #k #_ %2
-| #n #k change with (leb (S n) k) in ⊢ (??%?→?); #H % @leb_true_to_le //
-| #v1 #v2 #rv1 #rv2 #k change with (pretm_ind_plus ???????) in ⊢ (??%?→?);
-  >pretm_ind_plus_app #H cases (andb_true ?? H) -H #Hv1 #Hv2 %3
-  [ @rv1 @Hv1 | @rv2 @Hv2 ]
-| #x #s #v #Hx #_ #rv #k change with (pretm_ind_plus ???????) in ⊢ (??%?→?); 
-  >pretm_ind_plus_lam // #Hv %4 @rv @Hv ]
-qed.
-
-lemma toc_to_check_tm_true : ∀u,k.tm_or_ctx k u → check_tm u k = true.
-#u #k #Hu elim Hu //
-[ #n #Hn change with (leb (S n) k) in ⊢ (??%?); @le_to_leb_true @Hn
-| #v1 #v2 #Hv1 #Hv2 #IH1 #IH2 change with (pretm_ind_plus ???????) in ⊢ (??%?);
-  >pretm_ind_plus_app change with (check_tm v1 k ∧ check_tm v2 k) in ⊢ (??%?); /2/
-| #x #s #v #Hv #IH <(vclose_vopen x v) change with (pretm_ind_plus ???????) in ⊢ (??%?);
-  >pretm_ind_plus_lam [| // | @fresh_vclose_tm ] >(vclose_vopen x v) @IH ]
-qed.
-
-lemma fresh_swap_tm : ∀z1,z2,u.z1 ∉ FV u → z2 ∉ FV u → swap 𝔸 z1 z2 · u = u.
-#z1 #z2 #u elim u
-[2: normalize in ⊢ (?→%→%→?); #x #Hz1 #Hz2 whd in ⊢ (??%?); >swap_other //
-  [ @(not_to_not … Hz2) | @(not_to_not … Hz1) ] //
-|1: //
-| #s #v #IH normalize #Hz1 #Hz2 >IH // [@Hz2|@Hz1]
-| #v1 #v2 #IH1 #IH2 normalize #Hz1 #Hz2
-  >IH1 [| @(not_to_not … Hz2) @in_list_to_in_list_append_l | @(not_to_not … Hz1) @in_list_to_in_list_append_l ]
-  >IH2 // [@(not_to_not … Hz2) @in_list_to_in_list_append_r | @(not_to_not … Hz1) @in_list_to_in_list_append_r ]
-]
-qed.
-
-theorem tm_to_tm2 : ∀u.tm u → tm2 u.
-#t #Ht elim Ht
-[ #n #Hn cases (not_le_Sn_O n) #Hfalse cases (Hfalse Hn)
-| @tm_par
-| #u #v #Hu #Hv @tm_app
-| #x #s #u #Hu #IHu <(vclose_vopen x u) @tm_lam
-  [ @fresh_vclose_tm
-  | #y #Hy <(fresh_swap_tm x y (νx.u)) /2/ @fresh_vclose_tm ]
-]
-qed.
-
-theorem tm2_to_tm : ∀u.tm2 u → tm u.
-#u #pu elim pu /2/ #x #s #v #Hx #Hv #IH %4 @IH //
-qed.
-
-(* define PAR APP LAM *)
-definition PAR ≝ λx.mk_TM (par x) ?. // qed.
-definition APP ≝ λu,v:TM.mk_TM (app u v) ?.
-change with (pretm_ind_plus ???????) in match (check_tm ??); >pretm_ind_plus_app
-change with (check_tm ??) in match (pretm_ind_plus ???????); change with (check_tm ??) in match (pretm_ind_plus ???????) in ⊢ (??(??%)?);
-@andb_elim >(tm_of_TM u) >(tm_of_TM v) % qed.
-definition LAM ≝ λx,s.λu:TM.mk_TM (lam x s u) ?.
-change with (pretm_ind_plus ???????) in match (check_tm ??); <(vclose_vopen x u)
->pretm_ind_plus_lam [| // | @fresh_vclose_tm ]
-change with (check_tm ??) in match (pretm_ind_plus ???????); >vclose_vopen
-@(tm_of_TM u) qed.
-
-axiom vopen_tm_down : ∀u,x,k.tm_or_ctx (S k) u → tm_or_ctx k (u⌈x⌉).
-(* needs true_plus_false
-
-#u #x #k #Hu elim Hu
-[ #n #Hn normalize cases (true_or_false (eqb n O)) #H >H [%2]
-  normalize >(?: leb n O = false) [|cases n in H; // >eqb_n_n #H destruct (H) ]
-  normalize lapply Hn cases n in H; normalize [ #Hfalse destruct (Hfalse) ]
-  #n0 #_ #Hn0 % @le_S_S_to_le //
-| #x0 %2
-| #v1 #v2 #Hv1 #Hv2 #IH1 #IH2 %3 //
-| #x0 #s #v #Hv #IH normalize @daemon
-]
-qed.
-*)
-
-definition vopen_TM ≝ λu:CTX.λx.mk_TM (u⌈x⌉) ?.
-@toc_to_check_tm_true @vopen_tm_down @check_tm_true_to_toc @ctx_of_CTX qed.
-
-axiom vclose_tm_up : ∀u,x,k.tm_or_ctx k u → tm_or_ctx (S k) (νx.u).
-
-definition vclose_TM ≝ λu:TM.λx.mk_CTX (νx.u) ?. 
-@toc_to_check_tm_true @vclose_tm_up @check_tm_true_to_toc @tm_of_TM qed.
-
-interpretation "ln wf term variable open" 'open u x = (vopen_TM u x).
-interpretation "ln wf term variable close" 'nu x u = (vclose_TM u x).
-
-theorem tm_alpha : ∀x,y,s,u.x ∉ FV u → y ∉ FV u → lam x s (u⌈x⌉) = lam y s (u⌈y⌉).
-#x #y #s #u #Hx #Hy whd in ⊢ (??%%); @eq_f >nominal_eta // >nominal_eta //
-qed.
-
-lemma TM_to_tm2 : ∀u:TM.tm2 u.
-#u @tm_to_tm2 @check_tm_true_to_toc @tm_of_TM qed.
-
-theorem TM_ind_plus_weak : 
- ∀P:pretm → Type[0].
-   (∀x:𝔸.P (PAR x)) → 
-   (∀v1,v2:TM.P v1 → P v2 → P (APP v1 v2)) → 
-   ∀C:list 𝔸.
-   (∀x,s.∀v:CTX.x ∉ FV v → x ∉ C → 
-     (∀y.y ∉ FV v → P (v⌈y⌉)) → P (LAM x s (v⌈x⌉))) →
- ∀u:TM.P u.
-#P #Hpar #Happ #C #Hlam #u elim (TM_to_tm2 u) //
-[ #v1 #v2 #pv1 #pv2 #IH1 #IH2 @(Happ (mk_TM …) (mk_TM …) IH1 IH2)
-  @toc_to_check_tm_true @tm2_to_tm //
-| #x #s #v #Hx #pv #IH
-  lapply (p_fresh … (C@FV v)) letin x0 ≝ (N_fresh … (C@FV v)) #Hx0
-  >(?:lam x s (v⌈x⌉) = lam x0 s (v⌈x0⌉))
-  [|@tm_alpha // @(not_to_not … Hx0) @in_list_to_in_list_append_r ]
-  @(Hlam x0 s (mk_CTX v ?) ??)
-  [ <(nominal_eta … Hx) @toc_to_check_tm_true @vclose_tm_up @tm2_to_tm @pv //
-  | @(not_to_not … Hx0) @in_list_to_in_list_append_r
-  | @(not_to_not … Hx0) @in_list_to_in_list_append_l
-  | @IH ]
-]
-qed.
-
-lemma eq_mk_TM : ∀u,v.u = v → ∀pu,pv.mk_TM u pu = mk_TM v pv.
-#u #v #Heq >Heq #pu #pv %
-qed.
-
-lemma eq_P : ∀T:Type[0].∀t1,t2:T.t1 = t2 → ∀P:T → Type[0].P t1 → P t2. // qed.
-
-theorem TM_ind_plus :
- ∀P:TM → Type[0].
-   (∀x:𝔸.P (PAR x)) → 
-   (∀v1,v2:TM.P v1 → P v2 → P (APP v1 v2)) → 
-   ∀C:list 𝔸.
-   (∀x,s.∀v:CTX.x ∉ FV v → x ∉ C → 
-     (∀y.y ∉ FV v → P (v⌈y⌉)) → P (LAM x s (v⌈x⌉))) →
- ∀u:TM.P u.
-#P #Hpar #Happ #C #Hlam * #u #pu
->(?:mk_TM u pu = 
-    mk_TM u (toc_to_check_tm_true … (tm2_to_tm … (tm_to_tm2 … (check_tm_true_to_toc … pu))))) [|%]
-elim (tm_to_tm2 u ?) //
-[ #v1 #v2 #pv1 #pv2 #IH1 #IH2 @(Happ (mk_TM …) (mk_TM …) IH1 IH2)
-| #x #s #v #Hx #pv #IH
-  lapply (p_fresh … (C@FV v)) letin x0 ≝ (N_fresh … (C@FV v)) #Hx0
-  lapply (Hlam x0 s (mk_CTX v ?) ???) 
-  [2: @(not_to_not … Hx0) -Hx0 #Hx0 @in_list_to_in_list_append_l @Hx0
-  |4: @toc_to_check_tm_true <(nominal_eta x v) // @vclose_tm_up @tm2_to_tm @pv // 
-  | #y #Hy whd in match (vopen_TM ??);
-    >(?:mk_TM (v⌈y⌉) ? = mk_TM (v⌈y⌉) (toc_to_check_tm_true (v⌈y⌉) O (tm2_to_tm (v⌈y⌉) (pv y Hy))))
-    [@IH|%]
-  | @(not_to_not … Hx0) -Hx0 #Hx0 @in_list_to_in_list_append_r @Hx0 
-  | @eq_P @eq_mk_TM whd in match (vopen_TM ??); @tm_alpha // @(not_to_not … Hx0) @in_list_to_in_list_append_r ]
-]
-qed.
-
-notation 
-"hvbox('nominal' u 'return' out 'with' 
-       [ 'xpar' ident x ⇒ f1 
-       | 'xapp' ident v1 ident v2 ident recv1 ident recv2 ⇒ f2 
-       | 'xlam' ❨ident y # C❩ ident s ident w ident py1 ident py2 ident recw ⇒ f3 ])"
-with precedence 48 
-for @{ TM_ind_plus $out (λ${ident x}:?.$f1)
-       (λ${ident v1}:?.λ${ident v2}:?.λ${ident recv1}:?.λ${ident recv2}:?.$f2)
-       $C (λ${ident y}:?.λ${ident s}:?.λ${ident w}:?.λ${ident py1}:?.λ${ident py2}:?.λ${ident recw}:?.$f3)
-       $u }.
-       
-(* include "basics/jmeq.ma".*)
-
-definition subst ≝ (λu:TM.λx,v.
-  nominal u return (λ_.TM) with 
-  [ xpar x0 ⇒ match x == x0 with [ true ⇒ v | false ⇒ PAR x0 ]  (* u instead of PAR x0 does not work, u stays the same at every rec call! *)
-  | xapp v1 v2 recv1 recv2 ⇒ APP recv1 recv2
-  | xlam ❨y # x::FV v❩ s w py1 py2 recw ⇒ LAM y s (recw y py1) ]).
-  
-lemma subst_def : ∀u,x,v.subst u x v =
-  nominal u return (λ_.TM) with 
-  [ xpar x0 ⇒ match x == x0 with [ true ⇒ v | false ⇒ PAR x0 ]
-  | xapp v1 v2 recv1 recv2 ⇒ APP recv1 recv2
-  | xlam ❨y # x::FV v❩ s w py1 py2 recw ⇒ LAM y s (recw y py1) ]. //
-qed.
-
-axiom TM_ind_plus_LAM : 
-  ∀x,s,u,out,f1,f2,C,f3,Hx1,Hx2.
-  TM_ind_plus out f1 f2 C f3 (LAM x s (u⌈x⌉)) = 
-  f3 x s u Hx1 Hx2 (λy,Hy.TM_ind_plus ? f1 f2 C f3 ?).
-  
-axiom TM_ind_plus_APP : 
-  ∀u1,u2,out,f1,f2,C,f3.
-  TM_ind_plus out f1 f2 C f3 (APP u1 u2) = 
-  f2 u1 u2 (TM_ind_plus out f1 f2 C f3 ?) (TM_ind_plus out f1 f2 C f3 ?).
-  
-lemma eq_mk_CTX : ∀u,v.u = v → ∀pu,pv.mk_CTX u pu = mk_CTX v pv.
-#u #v #Heq >Heq #pu #pv %
-qed.
-
-lemma vclose_vopen_TM : ∀x.∀u:TM.((νx.u)⌈x⌉) = u.
-#x * #u #pu @eq_mk_TM @vclose_vopen qed.
-
-lemma nominal_eta_CTX : ∀x.∀u:CTX.x ∉ FV u → (νx.(u⌈x⌉)) = u.
-#x * #u #pu #Hx @eq_mk_CTX @nominal_eta // qed. 
-
-theorem TM_alpha : ∀x,y,s.∀u:CTX.x ∉ FV u → y ∉ FV u → LAM x s (u⌈x⌉) = LAM y s (u⌈y⌉).
-#x #y #s #u #Hx #Hy @eq_mk_TM @tm_alpha // qed.
-
-axiom in_vopen_CTX : ∀x,y.∀v:CTX.x ∈ FV (v⌈y⌉) → x = y ∨ x ∈ FV v.
-
-theorem subst_fresh : ∀u,v:TM.∀x.x ∉ FV u → subst u x v = u.
-#u #v #x @(TM_ind_plus … (x::FV v) … u)
-[ #x0 normalize in ⊢ (%→?); #Hx normalize in ⊢ (??%?);
-  >(\bf ?) [| @(not_to_not … Hx) #Heq >Heq % ] %
-| #u1 #u2 #IH1 #IH2 normalize in ⊢ (%→?); #Hx
-  >subst_def >TM_ind_plus_APP @eq_mk_TM @eq_f2 @eq_f
-  [ <subst_def @IH1 @(not_to_not … Hx) @in_list_to_in_list_append_l
-  | <subst_def @IH2 @(not_to_not … Hx) @in_list_to_in_list_append_r ]
-| #x0 #s #v0 #Hx0 #HC #IH #Hx >subst_def >TM_ind_plus_LAM [|@HC|@Hx0]
-  @eq_f <subst_def @IH // @(not_to_not … Hx) -Hx #Hx
-  change with (FV (νx0.(v0⌈x0⌉))) in ⊢ (???%); >nominal_eta_CTX //
-  cases (in_vopen_CTX … Hx) // #Heq >Heq in HC; * #HC @False_ind @HC %
-]
-qed.
-
-example subst_LAM_same : ∀x,s,u,v. subst (LAM x s u) x v = LAM x s u.
-#x #s #u #v >subst_def <(vclose_vopen_TM x u)
-lapply (p_fresh … (FV (νx.u)@x::FV v)) letin x0 ≝ (N_fresh … (FV (νx.u)@x::FV v)) #Hx0
->(TM_alpha x x0)
-[| @(not_to_not … Hx0) -Hx0 #Hx0 @in_list_to_in_list_append_l @Hx0 | @fresh_vclose_tm ]
->TM_ind_plus_LAM [| @(not_to_not … Hx0) -Hx0 #Hx0 @in_list_to_in_list_append_r @Hx0 | @(not_to_not … Hx0) -Hx0 #Hx0 @in_list_to_in_list_append_l @Hx0 ]
-@eq_f change with (subst ((νx.u)⌈x0⌉) x v) in ⊢ (??%?); @subst_fresh
-@(not_to_not … Hx0) #Hx0' cases (in_vopen_CTX … Hx0') 
-[ #Heq >Heq @in_list_to_in_list_append_r %
-| #Hfalse @False_ind cases (fresh_vclose_tm u x) #H @H @Hfalse ]
-qed.
-
-(*
-notation > "Λ ident x. ident T [ident x] ↦ P"
-  with precedence 48 for @{'foo (λ${ident x}.λ${ident T}.$P)}.
-
-notation < "Λ ident x. ident T [ident x] ↦ P"
-  with precedence 48 for @{'foo (λ${ident x}:$Q.λ${ident T}:$R.$P)}.
-*)
-
-(*
-notation 
-"hvbox('nominal' u 'with' 
-       [ 'xpar' ident x ⇒ f1 
-       | 'xapp' ident v1 ident v2  ⇒ f2
-       | 'xlam' ident x # C s w ⇒ f3 ])"
-with precedence 48 
-for @{ tm2_ind_plus ? (λ${ident x}:$Tx.$f1) 
- (λ${ident v1}:$Tv1.λ${ident v2}:$Tv2.λ${ident pv1}:$Tpv1.λ${ident pv2}:$Tpv2.λ${ident recv1}:$Trv1.λ${ident recv2}:$Trv2.$f2)
- $C (λ${ident x}:$Tx.λ${ident s}:$Ts.λ${ident w}:$Tw.λ${ident py1}:$Tpy1.λ${ident py2}:$Tpy2.λ${ident pw}:$Tpw.λ${ident recw}:$Trw.$f3) $u (tm_to_tm2 ??) }.
-*)
-
-(*
-notation 
-"hvbox('nominal' u 'with' 
-       [ 'xpar' ident x ^ f1 
-       | 'xapp' ident v1 ident v2 ^ f2 ])"
-(*       | 'xlam' ident x # C s w ^ f3 ]) *)
-with precedence 48 
-for @{ tm2_ind_plus ? (λ${ident x}:$Tx.$f1) 
- (λ${ident v1}:$Tv1.λ${ident v2}:$Tv2.λ${ident pv1}:$Tpv1.λ${ident pv2}:$Tpv2.λ${ident recv1}:$Trv1.λ${ident recv2}:$Trv2.$f2)
- $C (λ${ident x}:$Tx.λ${ident s}:$Ts.λ${ident w}:$Tw.λ${ident py1}:$Tpy1.λ${ident py2}:$Tpy2.λ${ident pw}:$Tpw.λ${ident recw}:$Trw.$f3) $u (tm_to_tm2 ??) }.
-*)
-notation 
-"hvbox('nominal' u 'with' 
-       [ 'xpar' ident x ^ f1 
-       | 'xapp' ident v1 ident v2 ^ f2 ])"
-with precedence 48 
-for @{ tm2_ind_plus ? (λ${ident x}:?.$f1) 
- (λ${ident v1}:$Tv1.λ${ident v2}:$Tv2.λ${ident pv1}:$Tpv1.λ${ident pv2}:$Tpv2.λ${ident recv1}:$Trv1.λ${ident recv2}:$Trv2.$f2)
- $C (λ${ident x}:?.λ${ident s}:$Ts.λ${ident w}:$Tw.λ${ident py1}:$Tpy1.λ${ident py2}:$Tpy2.λ${ident pw}:$Tpw.λ${ident recw}:$Trw.$f3) $u (tm_to_tm2 ??) }.
-
-axiom in_Env : 𝔸 × tp → Env → Prop.
-notation "X ◃ G" non associative with precedence 45 for @{'lefttriangle $X $G}.
-interpretation "Env membership" 'lefttriangle x l = (in_Env x l).
-
-
-
-inductive judg : list tp → tm → tp → Prop ≝ 
-| t_var : ∀g,n,t.Nth ? n g = Some ? t → judg g (var n) t
-| t_app : ∀g,m,n,t,u.judg g m (arr t u) → judg g n t → judg g (app m n) u
-| t_abs : ∀g,t,m,u.judg (t::g) m u → judg g (abs t m) (arr t u).
-
-definition Env := list (𝔸 × tp).
-
-axiom vclose_env : Env → list tp.
-axiom vclose_tm : Env → tm → tm.
-axiom Lam : 𝔸 → tp → tm → tm.
-definition Judg ≝ λG,M,T.judg (vclose_env G) (vclose_tm G M) T.
-definition dom ≝ λG:Env.map ?? (fst ??) G.
-
-definition sctx ≝ 𝔸 × tm.
-axiom swap_tm : 𝔸 → 𝔸 → tm → tm.
-definition sctx_app : sctx → 𝔸 → tm ≝ λM0,Y.let 〈X,M〉 ≝ M0 in swap_tm X Y M.
-
-axiom in_list : ∀A:Type[0].A → list A → Prop.
-interpretation "list membership" 'mem x l = (in_list ? x l).
-interpretation "list non-membership" 'notmem x l = (Not (in_list ? x l)).
-
-axiom in_Env : 𝔸 × tp → Env → Prop.
-notation "X ◃ G" non associative with precedence 45 for @{'lefttriangle $X $G}.
-interpretation "Env membership" 'lefttriangle x l = (in_Env x l).
-
-(* axiom Lookup : 𝔸 → Env → option tp. *)
-
-(* forma alto livello del judgment
-   t_abs* : ∀G,T,X,M,U.
-            (∀Y ∉ supp(M).Judg (〈Y,T〉::G) (M[Y]) U) → 
-            Judg G (Lam X T (M[X])) (arr T U) *)
-
-(* prima dimostrare, poi perfezionare gli assiomi, poi dimostrarli *)
-
-axiom Judg_ind : ∀P:Env → tm → tp → Prop.
-  (∀X,G,T.〈X,T〉 ◃ G → P G (par X) T) → 
-  (∀G,M,N,T,U.
-    Judg G M (arr T U) → Judg G N T → 
-    P G M (arr T U) → P G N T → P G (app M N) U) → 
-  (∀G,T1,T2,X,M1.
-    (∀Y.Y ∉ (FV (Lam X T1 (sctx_app M1 X))) → Judg (〈Y,T1〉::G) (sctx_app M1 Y) T2) →
-    (∀Y.Y ∉ (FV (Lam X T1 (sctx_app M1 X))) → P (〈Y,T1〉::G) (sctx_app M1 Y) T2) → 
-    P G (Lam X T1 (sctx_app M1 X)) (arr T1 T2)) → 
-  ∀G,M,T.Judg G M T → P G M T.
-
-axiom t_par : ∀X,G,T.〈X,T〉 ◃ G → Judg G (par X) T.
-axiom t_app2 : ∀G,M,N,T,U.Judg G M (arr T U) → Judg G N T → Judg G (app M N) U.
-axiom t_Lam : ∀G,X,M,T,U.Judg (〈X,T〉::G) M U → Judg G (Lam X T M) (arr T U).
-
-definition subenv ≝ λG1,G2.∀x.x ◃ G1 → x ◃ G2.
-interpretation "subenv" 'subseteq G1 G2 = (subenv G1 G2).
-
-axiom daemon : ∀P:Prop.P.
-
-theorem weakening : ∀G1,G2,M,T.G1 ⊆ G2 → Judg G1 M T → Judg G2 M T.
-#G1 #G2 #M #T #Hsub #HJ lapply Hsub lapply G2 -G2 change with (∀G2.?)
-@(Judg_ind … HJ)
-[ #X #G #T0 #Hin #G2 #Hsub @t_par @Hsub //
-| #G #M0 #N #T0 #U #HM0 #HN #IH1 #IH2 #G2 #Hsub @t_app2
-  [| @IH1 // | @IH2 // ]
-| #G #T1 #T2 #X #M1 #HM1 #IH #G2 #Hsub @t_Lam @IH 
-  [ (* trivial property of Lam *) @daemon 
-  | (* trivial property of subenv *) @daemon ]
-]
-qed.
-
-(* Serve un tipo Tm per i termini localmente chiusi e i suoi principi di induzione e
-   ricorsione *)
\ No newline at end of file
diff --git a/matita/matita/lib/binding/ln_concrete.ma b/matita/matita/lib/binding/ln_concrete.ma
deleted file mode 100644 (file)
index bdafdb1..0000000
+++ /dev/null
@@ -1,683 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basics/lists/list.ma".
-include "basics/deqsets.ma".
-include "binding/names.ma".
-include "binding/fp.ma".
-
-definition alpha : Nset ≝ X. check alpha
-notation "𝔸" non associative with precedence 90 for @{'alphabet}.
-interpretation "set of names" 'alphabet = alpha.
-
-inductive tp : Type[0] ≝ 
-| top : tp
-| arr : tp → tp → tp.
-inductive pretm : Type[0] ≝ 
-| var : nat → pretm
-| par :  𝔸 → pretm
-| abs : tp → pretm → pretm
-| app : pretm → pretm → pretm.
-
-let rec Nth T n (l:list T) on n ≝ 
-  match l with 
-  [ nil ⇒ None ?
-  | cons hd tl ⇒ match n with
-    [ O ⇒ Some ? hd
-    | S n0 ⇒ Nth T n0 tl ] ].
-
-let rec vclose_tm_aux u x k ≝ match u with
-  [ var n ⇒ if (leb k n) then var (S n) else u
-  | par x0 ⇒ if (x0 == x) then (var k) else u
-  | app v1 v2 ⇒ app (vclose_tm_aux v1 x k) (vclose_tm_aux v2 x k)
-  | abs s v ⇒ abs s (vclose_tm_aux v x (S k)) ].
-definition vclose_tm ≝ λu,x.vclose_tm_aux u x O.  
-
-definition vopen_var ≝ λn,x,k.match eqb n k with
- [ true ⇒ par x
- | false ⇒ match leb n k with
-   [ true ⇒ var n
-   | false ⇒ var (pred n) ] ].
-
-let rec vopen_tm_aux u x k ≝ match u with
-  [ var n ⇒ vopen_var n x k
-  | par x0 ⇒ u
-  | app v1 v2 ⇒ app (vopen_tm_aux v1 x k) (vopen_tm_aux v2 x k)
-  | abs s v ⇒ abs s (vopen_tm_aux v x (S k)) ].
-definition vopen_tm ≝ λu,x.vopen_tm_aux u x O.
-
-let rec FV u ≝ match u with 
-  [ par x ⇒ [x]
-  | app v1 v2 ⇒ FV v1@FV v2
-  | abs s v ⇒ FV v
-  | _ ⇒ [ ] ].  
-
-definition lam ≝ λx,s,u.abs s (vclose_tm u x).
-
-let rec Pi_map_tm p u on u ≝ match u with
-[ par x ⇒ par (p x)
-| var _ ⇒ u
-| app v1 v2 ⇒ app (Pi_map_tm p v1) (Pi_map_tm p v2)
-| abs s v ⇒ abs s (Pi_map_tm p v) ].
-
-interpretation "permutation of tm" 'middot p x = (Pi_map_tm p x).
-
-notation "hvbox(u⌈x⌉)"
-  with precedence 45
-  for @{ 'open $u $x }.
-
-(*
-notation "hvbox(u⌈x⌉)"
-  with precedence 45
-  for @{ 'open $u $x }.
-notation "❴ u ❵ x" non associative with precedence 90 for @{ 'open $u $x }.
-*)
-interpretation "ln term variable open" 'open u x = (vopen_tm u x).
-notation < "hvbox(ν x break . u)"
- with precedence 20
-for @{'nu $x $u }.
-notation > "ν list1 x sep , . term 19 u" with precedence 20
-  for ${ fold right @{$u} rec acc @{'nu $x $acc)} }.
-interpretation "ln term variable close" 'nu x u = (vclose_tm u x).
-
-let rec tm_height u ≝ match u with
-[ app v1 v2 ⇒ S (max (tm_height v1) (tm_height v2))
-| abs s v ⇒ S (tm_height v) 
-| _ ⇒ O ].
-
-theorem le_n_O_rect_Type0 : ∀n:nat. n ≤ O → ∀P: nat →Type[0]. P O → P n.
-#n (cases n) // #a #abs cases (?:False) /2/ qed. 
-
-theorem nat_rect_Type0_1 : ∀n:nat.∀P:nat → Type[0]. 
-(∀m.(∀p. p < m → P p) → P m) → P n.
-#n #P #H 
-cut (∀q:nat. q ≤ n → P q) /2/
-(elim n) 
- [#q #HleO (* applica male *) 
-    @(le_n_O_rect_Type0 ? HleO)
-    @H #p #ltpO cases (?:False) /2/ (* 3 *)
- |#p #Hind #q #HleS 
-    @H #a #lta @Hind @le_S_S_to_le /2/
- ]
-qed.
-
-lemma leb_false_to_lt : ∀n,m. leb n m = false → m < n.
-#n elim n
-[ #m normalize #H destruct(H)
-| #n0 #IH * // #m normalize #H @le_S_S @IH // ]
-qed.
-
-lemma nominal_eta_aux : ∀x,u.x ∉ FV u → ∀k.vclose_tm_aux (vopen_tm_aux u x k) x k = u.
-#x #u elim u
-[ #n #_ #k normalize cases (decidable_eq_nat n k) #Hnk
-  [ >Hnk >eqb_n_n whd in ⊢ (??%?); >(\b ?) //
-  | >(not_eq_to_eqb_false … Hnk) normalize cases (true_or_false (leb n k)) #Hleb
-    [ >Hleb normalize >(?:leb k n = false) //
-      @lt_to_leb_false @not_eq_to_le_to_lt /2/
-    | >Hleb normalize >(?:leb k (pred n) = true) normalize
-      [ cases (leb_false_to_lt … Hleb) //
-      | @le_to_leb_true cases (leb_false_to_lt … Hleb) normalize /2/ ] ] ]
-| #y normalize in ⊢ (%→?→?); #Hy whd in ⊢ (?→??%?); >(\bf ?) // @(not_to_not … Hy) //
-| #s #v #IH normalize #Hv #k >IH // @Hv
-| #v1 #v2 #IH1 #IH2 normalize #Hv1v2 #k 
-  >IH1 [ >IH2 // | @(not_to_not … Hv1v2) @in_list_to_in_list_append_l ]
-  @(not_to_not … Hv1v2) @in_list_to_in_list_append_r ]
-qed.
-
-corollary nominal_eta : ∀x,u.x ∉ FV u → (νx.u⌈x⌉) = u.
-#x #u #Hu @nominal_eta_aux //
-qed.
-
-lemma eq_height_vopen_aux : ∀v,x,k.tm_height (vopen_tm_aux v x k) = tm_height v.
-#v #x elim v
-[ #n #k normalize cases (eqb n k) // cases (leb n k) //
-| #u #k %
-| #s #u #IH #k normalize >IH %
-| #u1 #u2 #IH1 #IH2 #k normalize >IH1 >IH2 % ]
-qed.
-
-corollary eq_height_vopen : ∀v,x.tm_height (v⌈x⌉) = tm_height v.
-#v #x @eq_height_vopen_aux
-qed.
-
-theorem pretm_ind_plus_aux : 
- ∀P:pretm → Type[0].
-   (∀x:𝔸.P (par x)) → 
-   (∀n:ℕ.P (var n)) → 
-   (∀v1,v2. P v1 → P v2 → P (app v1 v2)) → 
-   ∀C:list 𝔸.
-   (∀x,s,v.x ∉ FV v → x ∉ C → P (v⌈x⌉) → P (lam x s (v⌈x⌉))) →
- ∀n,u.tm_height u ≤ n → P u.
-#P #Hpar #Hvar #Happ #C #Hlam #n change with ((λn.?) n); @(nat_rect_Type0_1 n ??)
-#m cases m
-[ #_ * /2/
-  [ normalize #s #v #Hfalse cases (?:False) cases (not_le_Sn_O (tm_height v)) /2/
-  | #v1 #v2 whd in ⊢ (?%?→?); #Hfalse cases (?:False) cases (not_le_Sn_O (S (max ??))) /2/ ] ]
--m #m #IH * /2/
-[ #s #v whd in ⊢ (?%?→?); #Hv
-  lapply (p_fresh … (C@FV v)) letin y ≝ (N_fresh … (C@FV v)) #Hy
-  >(?:abs s v = lam y s (v⌈y⌉))
-  [| whd in ⊢ (???%); >nominal_eta // @(not_to_not … Hy) @in_list_to_in_list_append_r ] 
-  @Hlam
-  [ @(not_to_not … Hy) @in_list_to_in_list_append_r
-  | @(not_to_not … Hy) @in_list_to_in_list_append_l ]
-  @IH [| @Hv | >eq_height_vopen % ]
-| #v1 #v2 whd in ⊢ (?%?→?); #Hv @Happ
-  [ @IH [| @Hv | // ] | @IH [| @Hv | // ] ] ]
-qed.
-
-corollary pretm_ind_plus :
- ∀P:pretm → Type[0].
-   (∀x:𝔸.P (par x)) → 
-   (∀n:ℕ.P (var n)) → 
-   (∀v1,v2. P v1 → P v2 → P (app v1 v2)) → 
-   ∀C:list 𝔸.
-   (∀x,s,v.x ∉ FV v → x ∉ C → P (v⌈x⌉) → P (lam x s (v⌈x⌉))) →
- ∀u.P u.
-#P #Hpar #Hvar #Happ #C #Hlam #u @pretm_ind_plus_aux /2/
-qed.
-
-(* maps a permutation to a list of terms *)
-definition Pi_map_list : (𝔸 → 𝔸) → list 𝔸 → list 𝔸 ≝ map 𝔸 𝔸 .
-
-(* interpretation "permutation of name list" 'middot p x = (Pi_map_list p x).*)
-
-(*
-inductive tm : pretm → Prop ≝ 
-| tm_par : ∀x:𝔸.tm (par x)
-| tm_app : ∀u,v.tm u → tm v → tm (app u v)
-| tm_lam : ∀x,s,u.tm u → tm (lam x s u).
-
-inductive ctx_aux : nat → pretm → Prop ≝ 
-| ctx_var : ∀n,k.n < k → ctx_aux k (var n)
-| ctx_par : ∀x,k.ctx_aux k (par x)
-| ctx_app : ∀u,v,k.ctx_aux k u → ctx_aux k v → ctx_aux k (app u v)
-(* è sostituibile da ctx_lam ? *)
-| ctx_abs : ∀s,u.ctx_aux (S k) u → ctx_aux k (abs s u).
-*)
-
-inductive tm_or_ctx (k:nat) : pretm → Type[0] ≝ 
-| toc_var : ∀n.n < k → tm_or_ctx k (var n)
-| toc_par : ∀x.tm_or_ctx k (par x)
-| toc_app : ∀u,v.tm_or_ctx k u → tm_or_ctx k v → tm_or_ctx k (app u v)
-| toc_lam : ∀x,s,u.tm_or_ctx k u → tm_or_ctx k (lam x s u).
-
-definition tm ≝ λt.tm_or_ctx O t.
-definition ctx ≝ λt.tm_or_ctx 1 t.
-
-record TM : Type[0] ≝ {
-  pretm_of_TM :> pretm;
-  tm_of_TM : tm pretm_of_TM
-}.
-
-record CTX : Type[0] ≝ {
-  pretm_of_CTX :> pretm;
-  ctx_of_CTX : ctx pretm_of_CTX
-}.
-
-inductive tm2 : pretm → Type[0] ≝ 
-| tm_par : ∀x.tm2 (par x)
-| tm_app : ∀u,v.tm2 u → tm2 v → tm2 (app u v)
-| tm_lam : ∀x,s,u.x ∉ FV u → (∀y.y ∉ FV u → tm2 (u⌈y⌉)) → tm2 (lam x s (u⌈x⌉)).
-
-(*
-inductive tm' : pretm → Prop ≝ 
-| tm_par : ∀x.tm' (par x)
-| tm_app : ∀u,v.tm' u → tm' v → tm' (app u v)
-| tm_lam : ∀x,s,u,C.x ∉ FV u → x ∉ C → (∀y.y ∉ FV u → tm' (❴u❵y)) → tm' (lam x s (❴u❵x)).
-*)
-
-axiom swap_inj : ∀N.∀z1,z2,x,y.swap N z1 z2 x = swap N z1 z2 y → x = y.
-
-lemma pi_vclose_tm : 
-  ∀z1,z2,x,u.swap 𝔸 z1 z2·(νx.u) = (ν swap ? z1 z2 x.swap 𝔸 z1 z2 · u).
-#z1 #z2 #x #u
-change with (vclose_tm_aux ???) in match (vclose_tm ??);
-change with (vclose_tm_aux ???) in ⊢ (???%); lapply O elim u
-[3:whd in ⊢ (?→?→(?→ ??%%)→?→??%%); //
-|4:whd in ⊢ (?→?→(?→??%%)→(?→??%%)→?→??%%); //
-| #n #k whd in ⊢ (??(??%)%); cases (leb k n) normalize %
-| #x0 #k cases (true_or_false (x0==z1)) #H1 >H1 whd in ⊢ (??%%);
-  [ cases (true_or_false (x0==x)) #H2 >H2 whd in ⊢ (??(??%)%);
-    [ <(\P H2) >H1 whd in ⊢ (??(??%)%); >(\b ?) // >(\b ?) //
-    | >H2 whd in match (swap ????); >H1
-      whd in match (if false then var k else ?);
-      whd in match (if true then z2 else ?); >(\bf ?)
-      [ >(\P H1) >swap_left %
-      | <(swap_inv ? z1 z2 z2) in ⊢ (?(??%?)); % #H3
-        lapply (swap_inj … H3) >swap_right #H4 <H4 in H2; >H1 #H destruct (H) ]
-    ]
-  | >(?:(swap ? z1 z2 x0 == swap ? z1 z2 x) = (x0 == x))
-    [| cases (true_or_false (x0==x)) #H2 >H2
-      [ >(\P H2) @(\b ?) %
-      | @(\bf ?) % #H >(swap_inj … H) in H2; >(\b ?) // #H0 destruct (H0) ] ]
-    cases (true_or_false (x0==x)) #H2 >H2 whd in ⊢ (??(??%)%); 
-    [ <(\P H2) >H1 >(\b (refl ??)) %
-    | >H1 >H2 % ]
-    ]
-  ]
-qed.
-
-lemma pi_vopen_tm : 
-  ∀z1,z2,x,u.swap 𝔸 z1 z2·(u⌈x⌉) = (swap 𝔸 z1 z2 · u⌈swap 𝔸 z1 z2 x⌉).
-#z1 #z2 #x #u
-change with (vopen_tm_aux ???) in match (vopen_tm ??);
-change with (vopen_tm_aux ???) in ⊢ (???%); lapply O elim u //
-[2: #s #v whd in ⊢ ((?→??%%)→?→??%%); //
-|3: #v1 #v2 whd in ⊢ ((?→??%%)→(?→??%%)→?→??%%); /2/ ]
-#n #k whd in ⊢ (??(??%)%); cases (true_or_false (eqb n k)) #H1 >H1 //
-cases (true_or_false (leb n k)) #H2 >H2 normalize //
-qed.
-
-lemma pi_lam : 
-  ∀z1,z2,x,s,u.swap 𝔸 z1 z2 · lam x s u = lam (swap 𝔸 z1 z2 x) s (swap 𝔸 z1 z2 · u).
-#z1 #z2 #x #s #u whd in ⊢ (???%); <(pi_vclose_tm …) %
-qed.
-
-lemma eqv_FV : ∀z1,z2,u.FV (swap 𝔸 z1 z2 · u) = Pi_map_list (swap 𝔸 z1 z2) (FV u).
-#z1 #z2 #u elim u //
-[ #s #v #H @H
-| #v1 #v2 whd in ⊢ (??%%→??%%→??%%); #H1 #H2 >H1 >H2
-  whd in ⊢ (???(????%)); /2/ ]
-qed.
-
-lemma swap_inv_tm : ∀z1,z2,u.swap 𝔸 z1 z2 · (swap 𝔸 z1 z2 · u) = u.
-#z1 #z2 #u elim u 
-[1: #n %
-|3: #s #v whd in ⊢ (?→??%%); //
-|4: #v1 #v2 #Hv1 #Hv2 whd in ⊢ (??%%); // ]
-#x whd in ⊢ (??%?); >swap_inv %
-qed.
-
-lemma eqv_in_list : ∀x,l,z1,z2.x ∈ l → swap 𝔸 z1 z2 x ∈ Pi_map_list (swap 𝔸 z1 z2) l.
-#x #l #z1 #z2 #Hin elim Hin
-[ #x0 #l0 %
-| #x1 #x2 #l0 #Hin #IH %2 @IH ]
-qed.
-
-lemma eqv_tm2 : ∀u.tm2 u → ∀z1,z2.tm2 ((swap ? z1 z2)·u).
-#u #Hu #z1 #z2 letin p ≝ (swap ? z1 z2) elim Hu /2/
-#x #s #v #Hx #Hv #IH >pi_lam >pi_vopen_tm %3
-[ @(not_to_not … Hx) -Hx #Hx
-  <(swap_inv ? z1 z2 x) <(swap_inv_tm z1 z2 v) >eqv_FV @eqv_in_list //
-| #y #Hy <(swap_inv ? z1 z2 y)
-  <pi_vopen_tm @IH @(not_to_not … Hy) -Hy #Hy <(swap_inv ? z1 z2 y)
-  >eqv_FV @eqv_in_list //
-]
-qed.
-
-lemma vclose_vopen_aux : ∀x,u,k.vopen_tm_aux (vclose_tm_aux u x k) x k = u.
-#x #u elim u [1,3,4:normalize //]
-[ #n #k cases (true_or_false (leb k n)) #H >H whd in ⊢ (??%?);
-  [ cases (true_or_false (eqb (S n) k)) #H1 >H1
-    [ <(eqb_true_to_eq … H1) in H; #H lapply (leb_true_to_le … H) -H #H
-      cases (le_to_not_lt … H) -H #H cases (H ?) %
-    | whd in ⊢ (??%?); >lt_to_leb_false // @le_S_S /2/ ]
-  | cases (true_or_false (eqb n k)) #H1 >H1 normalize
-    [ >(eqb_true_to_eq … H1) in H; #H lapply (leb_false_to_not_le … H) -H
-      * #H cases (H ?) %
-    | >le_to_leb_true // @not_lt_to_le % #H2 >le_to_leb_true in H;
-      [ #H destruct (H) | /2/ ]
-    ]
-  ]
-| #x0 #k whd in ⊢ (??(?%??)?); cases (true_or_false (x0==x)) 
-  #H1 >H1 normalize // >(\P H1) >eqb_n_n % ]
-qed.      
-
-lemma vclose_vopen : ∀x,u.((νx.u)⌈x⌉) = u. #x #u @vclose_vopen_aux
-qed.
-
-(*
-theorem tm_to_tm : ∀t.tm' t → tm t.
-#t #H elim H
-*)
-
-lemma in_list_singleton : ∀T.∀t1,t2:T.t1 ∈ [t2] → t1 = t2.
-#T #t1 #t2 #H @(in_list_inv_ind ??? H) /2/
-qed.
-
-lemma fresh_vclose_tm_aux : ∀u,x,k.x ∉ FV (vclose_tm_aux u x k).
-#u #x elim u //
-[ #n #k normalize cases (leb k n) normalize //
-| #x0 #k whd in ⊢ (?(???(?%))); cases (true_or_false (x0==x)) #H >H normalize //
-  lapply (\Pf H) @not_to_not #Hin >(in_list_singleton ??? Hin) %
-| #v1 #v2 #IH1 #IH2 #k normalize % #Hin cases (in_list_append_to_or_in_list ???? Hin) -Hin #Hin
-  [ cases (IH1 k) -IH1 #IH1 @IH1 @Hin | cases (IH2 k) -IH2 #IH2 @IH2 @Hin ]
-qed.
-
-lemma fresh_vclose_tm : ∀u,x.x ∉ FV (νx.u). //
-qed.
-
-lemma fresh_swap_tm : ∀z1,z2,u.z1 ∉ FV u → z2 ∉ FV u → swap 𝔸 z1 z2 · u = u.
-#z1 #z2 #u elim u
-[2: normalize in ⊢ (?→%→%→?); #x #Hz1 #Hz2 whd in ⊢ (??%?); >swap_other //
-  [ @(not_to_not … Hz2) | @(not_to_not … Hz1) ] //
-|1: //
-| #s #v #IH normalize #Hz1 #Hz2 >IH // [@Hz2|@Hz1]
-| #v1 #v2 #IH1 #IH2 normalize #Hz1 #Hz2
-  >IH1 [| @(not_to_not … Hz2) @in_list_to_in_list_append_l | @(not_to_not … Hz1) @in_list_to_in_list_append_l ]
-  >IH2 // [@(not_to_not … Hz2) @in_list_to_in_list_append_r | @(not_to_not … Hz1) @in_list_to_in_list_append_r ]
-]
-qed.
-
-theorem tm_to_tm2 : ∀u.tm u → tm2 u.
-#t #Ht elim Ht
-[ #n #Hn cases (not_le_Sn_O n) #Hfalse cases (Hfalse Hn)
-| @tm_par
-| #u #v #Hu #Hv @tm_app
-| #x #s #u #Hu #IHu <(vclose_vopen x u) @tm_lam
-  [ @fresh_vclose_tm
-  | #y #Hy <(fresh_swap_tm x y (νx.u)) /2/ @fresh_vclose_tm ]
-]
-qed.
-
-theorem tm2_to_tm : ∀u.tm2 u → tm u.
-#u #pu elim pu /2/ #x #s #v #Hx #Hv #IH %4 @IH //
-qed.
-
-definition PAR ≝ λx.mk_TM (par x) ?. // qed.
-definition APP ≝ λu,v:TM.mk_TM (app u v) ?./2/ qed.
-definition LAM ≝ λx,s.λu:TM.mk_TM (lam x s u) ?./2/ qed.
-
-axiom vopen_tm_down : ∀u,x,k.tm_or_ctx (S k) u → tm_or_ctx k (u⌈x⌉).
-(* needs true_plus_false
-
-#u #x #k #Hu elim Hu
-[ #n #Hn normalize cases (true_or_false (eqb n O)) #H >H [%2]
-  normalize >(?: leb n O = false) [|cases n in H; // >eqb_n_n #H destruct (H) ]
-  normalize lapply Hn cases n in H; normalize [ #Hfalse destruct (Hfalse) ]
-  #n0 #_ #Hn0 % @le_S_S_to_le //
-| #x0 %2
-| #v1 #v2 #Hv1 #Hv2 #IH1 #IH2 %3 //
-| #x0 #s #v #Hv #IH normalize @daemon
-]
-qed.
-*)
-
-definition vopen_TM ≝ λu:CTX.λx.mk_TM (u⌈x⌉) (vopen_tm_down …). @ctx_of_CTX qed.
-
-axiom vclose_tm_up : ∀u,x,k.tm_or_ctx k u → tm_or_ctx (S k) (νx.u).
-
-definition vclose_TM ≝ λu:TM.λx.mk_CTX (νx.u) (vclose_tm_up …). @tm_of_TM qed.
-
-interpretation "ln wf term variable open" 'open u x = (vopen_TM u x).
-interpretation "ln wf term variable close" 'nu x u = (vclose_TM u x).
-
-theorem tm_alpha : ∀x,y,s,u.x ∉ FV u → y ∉ FV u → lam x s (u⌈x⌉) = lam y s (u⌈y⌉).
-#x #y #s #u #Hx #Hy whd in ⊢ (??%%); @eq_f >nominal_eta // >nominal_eta //
-qed.
-
-theorem TM_ind_plus : 
-(* non si può dare il principio in modo dipendente (almeno utilizzando tm2)
-   la "prova" purtroppo è in Type e non si può garantire che sia esattamente
-   quella che ci aspetteremmo
- *)
- ∀P:pretm → Type[0].
-   (∀x:𝔸.P (PAR x)) → 
-   (∀v1,v2:TM.P v1 → P v2 → P (APP v1 v2)) → 
-   ∀C:list 𝔸.
-   (∀x,s.∀v:CTX.x ∉ FV v → x ∉ C → 
-     (∀y.y ∉ FV v → P (v⌈y⌉)) → P (LAM x s (v⌈x⌉))) →
- ∀u:TM.P u.
-#P #Hpar #Happ #C #Hlam * #u #pu elim (tm_to_tm2 u pu) //
-[ #v1 #v2 #pv1 #pv2 #IH1 #IH2 @(Happ (mk_TM …) (mk_TM …)) /2/
-| #x #s #v #Hx #pv #IH
-  lapply (p_fresh … (C@FV v)) letin x0 ≝ (N_fresh … (C@FV v)) #Hx0
-  >(?:lam x s (v⌈x⌉) = lam x0 s (v⌈x0⌉))
-  [|@tm_alpha // @(not_to_not … Hx0) @in_list_to_in_list_append_r ]
-  @(Hlam x0 s (mk_CTX v ?) ??)
-  [ <(nominal_eta … Hx) @vclose_tm_up @tm2_to_tm @pv //
-  | @(not_to_not … Hx0) @in_list_to_in_list_append_r
-  | @(not_to_not … Hx0) @in_list_to_in_list_append_l
-  | @IH ]
-]
-qed.
-
-notation 
-"hvbox('nominal' u 'return' out 'with' 
-       [ 'xpar' ident x ⇒ f1 
-       | 'xapp' ident v1 ident v2 ident recv1 ident recv2 ⇒ f2 
-       | 'xlam' ❨ident y # C❩ ident s ident w ident py1 ident py2 ident recw ⇒ f3 ])"
-with precedence 48 
-for @{ TM_ind_plus $out (λ${ident x}:?.$f1)
-       (λ${ident v1}:?.λ${ident v2}:?.λ${ident recv1}:?.λ${ident recv2}:?.$f2)
-       $C (λ${ident y}:?.λ${ident s}:?.λ${ident w}:?.λ${ident py1}:?.λ${ident py2}:?.λ${ident recw}:?.$f3)
-       $u }.
-       
-(* include "basics/jmeq.ma".*)
-
-definition subst ≝ (λu:TM.λx,v.
-  nominal u return (λ_.TM) with 
-  [ xpar x0 ⇒ match x == x0 with [ true ⇒ v | false ⇒ u ]
-  | xapp v1 v2 recv1 recv2 ⇒ APP recv1 recv2
-  | xlam ❨y # x::FV v❩ s w py1 py2 recw ⇒ LAM y s (recw y py1) ]).
-
-lemma fasfd : ∀s,v. pretm_of_TM (subst (LAM O s (PAR 1)) O v) = pretm_of_TM (LAM O s (PAR 1)).
-#s #v normalize in ⊢ (??%?);
-
-
-theorem tm2_ind_plus : 
-(* non si può dare il principio in modo dipendente (almeno utilizzando tm2) *)
- ∀P:pretm → Type[0].
-   (∀x:𝔸.P (par x)) → 
-   (∀v1,v2.tm2 v1 → tm2 v2 → P v1 → P v2 → P (app v1 v2)) → 
-   ∀C:list 𝔸.
-   (∀x,s,v.x ∉ FV v → x ∉ C → (∀y.y ∉ FV v → tm2 (v⌈y⌉)) → 
-     (∀y.y ∉ FV v → P (v⌈y⌉)) → P (lam x s (v⌈x⌉))) →
- ∀u.tm2 u → P u.
-#P #Hpar #Happ #C #Hlam #u #pu elim pu /2/
-#x #s #v #px #pv #IH 
-lapply (p_fresh … (C@FV v)) letin y ≝ (N_fresh … (C@FV v)) #Hy
->(?:lam x s (v⌈x⌉) = lam y s (v⌈y⌉)) [| @tm_alpha // @(not_to_not … Hy) @in_list_to_in_list_append_r ]
-@Hlam /2/ lapply Hy -Hy @not_to_not #Hy
-[ @in_list_to_in_list_append_r @Hy | @in_list_to_in_list_append_l @Hy ]
-qed.
-
-definition check_tm ≝ 
-  λu.pretm_ind_plus ? (λ_.true) (λ_.false) 
-    (λv1,v2,r1,r2.r1 ∧ r2) [ ] (λx,s,v,pv1,pv2,rv.rv) u.
-
-(*
-lemma check_tm_complete : ∀u.tm u → check_tm u = true.
-#u #pu @(tm2_ind_plus … [ ] … (tm_to_tm2 ? pu)) //
-[ #v1 #v2 #pv1 #pv2 #IH1 #IH2
-| #x #s #v #Hx1 #Hx2 #Hv #IH
-*)
-
-notation 
-"hvbox('nominal' u 'return' out 'with' 
-       [ 'xpar' ident x ⇒ f1 
-       | 'xapp' ident v1 ident v2 ident pv1 ident pv2 ident recv1 ident recv2 ⇒ f2 
-       | 'xlam' ❨ident y # C❩ ident s ident w ident py1 ident py2 ident pw ident recw ⇒ f3 ])"
-with precedence 48 
-for @{ tm2_ind_plus $out (λ${ident x}:?.$f1)
-       (λ${ident v1}:?.λ${ident v2}:?.λ${ident pv1}:?.λ${ident pv2}:?.λ${ident recv1}:?.λ${ident recv2}:?.$f2)
-       $C (λ${ident y}:?.λ${ident s}:?.λ${ident w}:?.λ${ident py1}:?.λ${ident py2}:?.λ${ident pw}:?.λ${ident recw}:?.$f3)
-       ? (tm_to_tm2 ? $u) }.
-(* notation 
-"hvbox('nominal' u 'with' 
-       [ 'xlam' ident x # C ident s ident w ⇒ f3 ])"
-with precedence 48 
-for @{ tm2_ind_plus ???
- $C (λ${ident x}:?.λ${ident s}:?.λ${ident w}:?.λ${ident py1}:?.λ${ident py2}:?.
-     λ${ident pw}:?.λ${ident recw}:?.$f3) $u (tm_to_tm2 ??) }.
-*)
-
-
-definition subst ≝ (λu.λpu:tm u.λx,v.
-  nominal pu return (λ_.pretm) with 
-  [ xpar x0 ⇒ match x == x0 with [ true ⇒ v | false ⇒ u ]
-  | xapp v1 v2 pv1 pv2 recv1 recv2 ⇒ app recv1 recv2
-  | xlam ❨y # x::FV v❩ s w py1 py2 pw recw ⇒ lam y s (recw y py1) ]).
-  
-lemma fasfd : ∀x,s,u,p1,v. subst (lam x s u) p1 x v = lam x s u.
-#x #s #u #p1 #v
-
-
-definition subst ≝ λu.λpu:tm u.λx,y.
-  tm2_ind_plus ?
-  (* par x0 *)              (λx0.match x == x0 with [ true ⇒ v | false ⇒ u ])
-  (* app v1 v2 *)           (λv1,v2,pv1,pv2,recv1,recv2.app recv1 recv2)
-  (* lam y#(x::FV v) s w *) (x::FV v) (λy,s,w,py1,py2,pw,recw.lam y s (recw y py1)) 
-  u (tm_to_tm2 … pu).
-check subst
-definition subst ≝ λu.λpu:tm u.λx,v.
-  nominal u with 
-  [ xlam y # (x::FV v) s w ^ ? ].
-
-(*
-notation > "Λ ident x. ident T [ident x] ↦ P"
-  with precedence 48 for @{'foo (λ${ident x}.λ${ident T}.$P)}.
-
-notation < "Λ ident x. ident T [ident x] ↦ P"
-  with precedence 48 for @{'foo (λ${ident x}:$Q.λ${ident T}:$R.$P)}.
-*)
-
-(*
-notation 
-"hvbox('nominal' u 'with' 
-       [ 'xpar' ident x ⇒ f1 
-       | 'xapp' ident v1 ident v2  ⇒ f2
-       | 'xlam' ident x # C s w ⇒ f3 ])"
-with precedence 48 
-for @{ tm2_ind_plus ? (λ${ident x}:$Tx.$f1) 
- (λ${ident v1}:$Tv1.λ${ident v2}:$Tv2.λ${ident pv1}:$Tpv1.λ${ident pv2}:$Tpv2.λ${ident recv1}:$Trv1.λ${ident recv2}:$Trv2.$f2)
- $C (λ${ident x}:$Tx.λ${ident s}:$Ts.λ${ident w}:$Tw.λ${ident py1}:$Tpy1.λ${ident py2}:$Tpy2.λ${ident pw}:$Tpw.λ${ident recw}:$Trw.$f3) $u (tm_to_tm2 ??) }.
-*)
-
-(*
-notation 
-"hvbox('nominal' u 'with' 
-       [ 'xpar' ident x ^ f1 
-       | 'xapp' ident v1 ident v2 ^ f2 ])"
-(*       | 'xlam' ident x # C s w ^ f3 ]) *)
-with precedence 48 
-for @{ tm2_ind_plus ? (λ${ident x}:$Tx.$f1) 
- (λ${ident v1}:$Tv1.λ${ident v2}:$Tv2.λ${ident pv1}:$Tpv1.λ${ident pv2}:$Tpv2.λ${ident recv1}:$Trv1.λ${ident recv2}:$Trv2.$f2)
- $C (λ${ident x}:$Tx.λ${ident s}:$Ts.λ${ident w}:$Tw.λ${ident py1}:$Tpy1.λ${ident py2}:$Tpy2.λ${ident pw}:$Tpw.λ${ident recw}:$Trw.$f3) $u (tm_to_tm2 ??) }.
-*)
-notation 
-"hvbox('nominal' u 'with' 
-       [ 'xpar' ident x ^ f1 
-       | 'xapp' ident v1 ident v2 ^ f2 ])"
-with precedence 48 
-for @{ tm2_ind_plus ? (λ${ident x}:?.$f1) 
- (λ${ident v1}:$Tv1.λ${ident v2}:$Tv2.λ${ident pv1}:$Tpv1.λ${ident pv2}:$Tpv2.λ${ident recv1}:$Trv1.λ${ident recv2}:$Trv2.$f2)
- $C (λ${ident x}:?.λ${ident s}:$Ts.λ${ident w}:$Tw.λ${ident py1}:$Tpy1.λ${ident py2}:$Tpy2.λ${ident pw}:$Tpw.λ${ident recw}:$Trw.$f3) $u (tm_to_tm2 ??) }.
-
-
-definition subst ≝ λu.λpu:tm u.λx,v.
-  nominal u with 
-  [ xpar x0 ^ match x == x0 with [ true ⇒ v | false ⇒ u ]
-  | xapp v1 v2 ^ ? ].
-  | xlam y # (x::FV v) s w ^ ? ].
-  
-  
-  (* par x0 *)              (λx0.match x == x0 with [ true ⇒ v | false ⇒ u ])
-  (* app v1 v2 *)           (λv1,v2,pv1,pv2,recv1,recv2.app recv1 recv2)
-  (* lam y#(x::FV v) s w *) (x::FV v) (λy,s,w,py1,py2,pw,recw.lam y s (recw y py1)) 
-  u (tm_to_tm2 … pu).
-*)
-definition subst ≝ λu.λpu:tm u.λx,v.
-  tm2_ind_plus ?
-  (* par x0 *)              (λx0.match x == x0 with [ true ⇒ v | false ⇒ u ])
-  (* app v1 v2 *)           (λv1,v2,pv1,pv2,recv1,recv2.app recv1 recv2)
-  (* lam y#(x::FV v) s w *) (x::FV v) (λy,s,w,py1,py2,pw,recw.lam y s (recw y py1)) 
-  u (tm_to_tm2 … pu).
-
-check subst
-
-axiom in_Env : 𝔸 × tp → Env → Prop.
-notation "X ◃ G" non associative with precedence 45 for @{'lefttriangle $X $G}.
-interpretation "Env membership" 'lefttriangle x l = (in_Env x l).
-
-
-
-inductive judg : list tp → tm → tp → Prop ≝ 
-| t_var : ∀g,n,t.Nth ? n g = Some ? t → judg g (var n) t
-| t_app : ∀g,m,n,t,u.judg g m (arr t u) → judg g n t → judg g (app m n) u
-| t_abs : ∀g,t,m,u.judg (t::g) m u → judg g (abs t m) (arr t u).
-
-definition Env := list (𝔸 × tp).
-
-axiom vclose_env : Env → list tp.
-axiom vclose_tm : Env → tm → tm.
-axiom Lam : 𝔸 → tp → tm → tm.
-definition Judg ≝ λG,M,T.judg (vclose_env G) (vclose_tm G M) T.
-definition dom ≝ λG:Env.map ?? (fst ??) G.
-
-definition sctx ≝ 𝔸 × tm.
-axiom swap_tm : 𝔸 → 𝔸 → tm → tm.
-definition sctx_app : sctx → 𝔸 → tm ≝ λM0,Y.let 〈X,M〉 ≝ M0 in swap_tm X Y M.
-
-axiom in_list : ∀A:Type[0].A → list A → Prop.
-interpretation "list membership" 'mem x l = (in_list ? x l).
-interpretation "list non-membership" 'notmem x l = (Not (in_list ? x l)).
-
-axiom in_Env : 𝔸 × tp → Env → Prop.
-notation "X ◃ G" non associative with precedence 45 for @{'lefttriangle $X $G}.
-interpretation "Env membership" 'lefttriangle x l = (in_Env x l).
-
-let rec FV M ≝ match M with 
-  [ par X ⇒ [X]
-  | app M1 M2 ⇒ FV M1@FV M2
-  | abs T M0 ⇒ FV M0
-  | _ ⇒ [ ] ].
-
-(* axiom Lookup : 𝔸 → Env → option tp. *)
-
-(* forma alto livello del judgment
-   t_abs* : ∀G,T,X,M,U.
-            (∀Y ∉ supp(M).Judg (〈Y,T〉::G) (M[Y]) U) → 
-            Judg G (Lam X T (M[X])) (arr T U) *)
-
-(* prima dimostrare, poi perfezionare gli assiomi, poi dimostrarli *)
-
-axiom Judg_ind : ∀P:Env → tm → tp → Prop.
-  (∀X,G,T.〈X,T〉 ◃ G → P G (par X) T) → 
-  (∀G,M,N,T,U.
-    Judg G M (arr T U) → Judg G N T → 
-    P G M (arr T U) → P G N T → P G (app M N) U) → 
-  (∀G,T1,T2,X,M1.
-    (∀Y.Y ∉ (FV (Lam X T1 (sctx_app M1 X))) → Judg (〈Y,T1〉::G) (sctx_app M1 Y) T2) →
-    (∀Y.Y ∉ (FV (Lam X T1 (sctx_app M1 X))) → P (〈Y,T1〉::G) (sctx_app M1 Y) T2) → 
-    P G (Lam X T1 (sctx_app M1 X)) (arr T1 T2)) → 
-  ∀G,M,T.Judg G M T → P G M T.
-
-axiom t_par : ∀X,G,T.〈X,T〉 ◃ G → Judg G (par X) T.
-axiom t_app2 : ∀G,M,N,T,U.Judg G M (arr T U) → Judg G N T → Judg G (app M N) U.
-axiom t_Lam : ∀G,X,M,T,U.Judg (〈X,T〉::G) M U → Judg G (Lam X T M) (arr T U).
-
-definition subenv ≝ λG1,G2.∀x.x ◃ G1 → x ◃ G2.
-interpretation "subenv" 'subseteq G1 G2 = (subenv G1 G2).
-
-axiom daemon : ∀P:Prop.P.
-
-theorem weakening : ∀G1,G2,M,T.G1 ⊆ G2 → Judg G1 M T → Judg G2 M T.
-#G1 #G2 #M #T #Hsub #HJ lapply Hsub lapply G2 -G2 change with (∀G2.?)
-@(Judg_ind … HJ)
-[ #X #G #T0 #Hin #G2 #Hsub @t_par @Hsub //
-| #G #M0 #N #T0 #U #HM0 #HN #IH1 #IH2 #G2 #Hsub @t_app2
-  [| @IH1 // | @IH2 // ]
-| #G #T1 #T2 #X #M1 #HM1 #IH #G2 #Hsub @t_Lam @IH 
-  [ (* trivial property of Lam *) @daemon 
-  | (* trivial property of subenv *) @daemon ]
-]
-qed.
-
-(* Serve un tipo Tm per i termini localmente chiusi e i suoi principi di induzione e
-   ricorsione *)
\ No newline at end of file
diff --git a/matita/matita/lib/binding/names.ma b/matita/matita/lib/binding/names.ma
deleted file mode 100644 (file)
index bc5f07d..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||M||                                                             *)
-(*      ||A||       A project by Andrea Asperti                           *)
-(*      ||T||                                                             *)
-(*      ||I||       Developers:                                           *)
-(*      ||T||         The HELM team.                                      *)
-(*      ||A||         http://helm.cs.unibo.it                             *)
-(*      \   /                                                             *)
-(*       \ /        This file is distributed under the terms of the       *)
-(*        v         GNU General Public License Version 2                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basics/logic.ma".
-include "basics/lists/in.ma".
-include "basics/types.ma".
-
-(*interpretation "list membership" 'mem x l = (in_list ? x l).*)
-
-record Nset : Type[1] ≝
-{
-  (* carrier is specified as a coercion: when an object X of type Nset is
-     given, but something of type Type is expected, Matita will insert a
-     hidden coercion: the user sees "X", but really means "carrier X"     *)
-  carrier :> DeqSet;
-  N_fresh : list carrier → carrier;
-  p_fresh : ∀l.N_fresh l ∉ l
-}.
-
-definition maxlist ≝
- λl.foldr ?? (λx,acc.max x acc) 0 l.
-
-definition natfresh ≝ λl.S (maxlist l).
-
-lemma le_max_1 : ∀x,y.x ≤ max x y. /2/
-qed.
-
-lemma le_max_2 : ∀x,y.y ≤ max x y. /2/
-qed.
-
-lemma le_maxlist : ∀l,x.x ∈ l → x ≤ maxlist l.
-#l elim l
-[#x #Hx @False_ind cases (not_in_list_nil ? x) #H1 /2/
-|#y #tl #IH #x #H1 change with (max ??) in ⊢ (??%);
- cases (in_list_cons_case ???? H1);#H2;
- [ >H2 @le_max_1
- | whd in ⊢ (??%); lapply (refl ? (leb y (maxlist tl)));
-   cases (leb y (maxlist tl)) in ⊢ (???% → %);#H3
-   [ @IH //
-   | lapply (IH ? H2) #H4
-     lapply (leb_false_to_not_le … H3) #H5
-     lapply (not_le_to_lt … H5) #H6
-     @(transitive_le … H4)
-     @(transitive_le … H6) %2 %
-   ]
- ]
-]
-qed.
-
-(* prove freshness for nat *)
-lemma lt_l_natfresh_l : ∀l,x.x ∈ l → x < natfresh l.
-#l #x #H1 @le_S_S /2/
-qed.
-
-(*naxiom p_Xfresh : ∀l.∀x:Xcarr.x ∈ l → x ≠ ntm (Xfresh l) ∧ x ≠ ntp (Xfresh l).*)
-lemma p_natfresh : ∀l.natfresh l ∉ l.
-#l % #H1 lapply (lt_l_natfresh_l … H1) #H2
-cases (lt_to_not_eq … H2) #H3 @H3 %
-qed.
-
-include "basics/finset.ma".
-
-definition X : Nset ≝ mk_Nset DeqNat ….
-[ @natfresh
-| @p_natfresh
-]
-qed.
\ No newline at end of file
index 6da43596dafbc1360684b11cccf84006d731c6f5..018bed89725ee69d61a92ba11c5c29663b6f8f2c 100644 (file)
@@ -1,7 +1,10 @@
+FAILING FILES 2018-12-17
+
 matitac.opt binding/fp.ma
 matitac.opt binding/ln_concrete.ma
 matitac.opt binding/ln.ma
 matitac.opt binding/names.ma
+matitac.opt extraction.ma
 matitac.opt finite_lambda/confluence.ma
 matitac.opt finite_lambda/reduction.ma
 matitac.opt finite_lambda/terms_and_types.ma
index 87cfd11dce28096d66b5f439ec5641300468cdeb..439160a7d0bc0b6315b76216a541325939f95923 100644 (file)
@@ -13,6 +13,7 @@
 (**************************************************************************)
 
 include "pts_dummy/rc_hsat.ma".
+include "basics/core_notation/napart_2.ma".
 (*
 (* THE EVALUATION *************************************************************)
 
index 7b7ce54d983447cdbaf9cb3941acb4215ca3e7ea..c11eca57a8703489c1a23661b8f40261511443f4 100644 (file)
@@ -13,6 +13,7 @@
 (**************************************************************************)
 
 include "pts_dummy/rc_hsat.ma".
+include "basics/core_notation/napart_2.ma".
 (*
 (* THE EVALUATION *************************************************************)
 
diff --git a/matita/matita/lib/reverse_complexity/almost.ma b/matita/matita/lib/reverse_complexity/almost.ma
new file mode 100644 (file)
index 0000000..75578d0
--- /dev/null
@@ -0,0 +1,24 @@
+include "reverse_complexity/speedup.ma".
+
+definition aes : (nat → nat) → (nat → nat) → Prop ≝ λf,g.
+  ∃n.∀m. n ≤ m → f m = g m.
+
+lemma CF_almost: ∀f,g,s. CF s g → aes g f → CF s f.
+#f #g #s #CFg * #n lapply CFg -CFg lapply g -g
+elim n 
+  [#g #CFg #H @(ext_CF … g) [#m @H // |//]
+  |#i #Hind #g #CFg #H
+   @(Hind (λx. if eqb i x then f i else g x))
+    [@CF_if 
+      [@(O_to_CF … MSC) [@le_to_O @(MSC_in … CFg)] @CF_eqb //
+      |@(O_to_CF … MSC) [@le_to_O @(MSC_in … CFg)] @CF_const
+      |@CFg
+      ]
+    |#m #leim cases (le_to_or_lt_eq … leim)
+      [#ltim lapply (lt_to_not_eq … ltim) #noteqim 
+       >(not_eq_to_eqb_false … noteqim) @H @ltim
+      |#eqim >eqim >eqb_n_n //
+      ]
+    ]
+  ]
+qed.
\ No newline at end of file
diff --git a/matita/matita/lib/reverse_complexity/basics.ma b/matita/matita/lib/reverse_complexity/basics.ma
new file mode 100644 (file)
index 0000000..de383d1
--- /dev/null
@@ -0,0 +1,106 @@
+include "basics/types.ma".
+include "arithmetics/nat.ma".
+
+(********************************** pairing ***********************************)
+axiom pair: nat → nat → nat.
+axiom fst : nat → nat.
+axiom snd : nat → nat.
+
+interpretation "abstract pair" 'pair f g = (pair f g). 
+
+axiom fst_pair: ∀a,b. fst 〈a,b〉 = a.
+axiom snd_pair: ∀a,b. snd 〈a,b〉 = b.
+axiom surj_pair: ∀x. ∃a,b. x = 〈a,b〉. 
+
+axiom le_fst : ∀p. fst p ≤ p.
+axiom le_snd : ∀p. snd p ≤ p.
+axiom le_pair: ∀a,a1,b,b1. a ≤ a1 → b ≤ b1 → 〈a,b〉 ≤ 〈a1,b1〉.
+
+lemma expand_pair: ∀x. x = 〈fst x, snd x〉. 
+#x lapply (surj_pair x) * #a * #b #Hx >Hx >fst_pair >snd_pair //
+qed.
+
+(************************************* U **************************************)
+axiom U: nat → nat →nat → option nat. 
+
+axiom monotonic_U: ∀i,x,n,m,y.n ≤m →
+  U i x n = Some ? y → U i x m = Some ? y.
+  
+lemma unique_U: ∀i,x,n,m,yn,ym.
+  U i x n = Some ? yn → U i x m = Some ? ym → yn = ym.
+#i #x #n #m #yn #ym #Hn #Hm cases (decidable_le n m)
+  [#lenm lapply (monotonic_U … lenm Hn) >Hm #HS destruct (HS) //
+  |#ltmn lapply (monotonic_U … n … Hm) [@lt_to_le @not_le_to_lt //]
+   >Hn #HS destruct (HS) //
+  ]
+qed.
+
+definition code_for ≝ λf,i.∀x.
+  ∃n.∀m. n ≤ m → U i x m = f x.
+
+definition terminate ≝ λi,x,r. ∃y. U i x r = Some ? y. 
+
+notation "{i ⊙ x} ↓ r" with precedence 60 for @{terminate $i $x $r}. 
+
+lemma terminate_dec: ∀i,x,n. {i ⊙ x} ↓ n ∨ ¬ {i ⊙ x} ↓ n.
+#i #x #n normalize cases (U i x n)
+  [%2 % * #y #H destruct|#y %1 %{y} //]
+qed.
+  
+lemma monotonic_terminate: ∀i,x,n,m.
+  n ≤ m → {i ⊙ x} ↓ n → {i ⊙ x} ↓ m.
+#i #x #n #m #lenm * #z #H %{z} @(monotonic_U … H) //
+qed.
+
+definition termb ≝ λi,x,t. 
+  match U i x t with [None ⇒ false |Some y ⇒ true].
+
+lemma termb_true_to_term: ∀i,x,t. termb i x t = true → {i ⊙ x} ↓ t.
+#i #x #t normalize cases (U i x t) normalize [#H destruct | #y #_ %{y} //]
+qed.    
+
+lemma term_to_termb_true: ∀i,x,t. {i ⊙ x} ↓ t → termb i x t = true.
+#i #x #t * #y #H normalize >H // 
+qed.    
+
+definition out ≝ λi,x,r. 
+  match U i x r with [ None ⇒ 0 | Some z ⇒ z]. 
+
+definition bool_to_nat: bool → nat ≝ 
+  λb. match b with [true ⇒ 1 | false ⇒ 0]. 
+  
+coercion bool_to_nat. 
+
+definition pU : nat → nat → nat → nat ≝ λi,x,r.〈termb i x r,out i x r〉.
+
+lemma pU_vs_U_Some : ∀i,x,r,y. pU i x r = 〈1,y〉 ↔ U i x r = Some ? y.
+#i #x #r #y % normalize
+  [cases (U i x r) normalize 
+    [#H cut (0=1) [lapply (eq_f … fst … H) >fst_pair >fst_pair #H @H] 
+     #H1 destruct
+    |#a #H cut (a=y) [lapply (eq_f … snd … H) >snd_pair >snd_pair #H1 @H1] 
+     #H1 //
+    ]
+  |#H >H //]
+qed.
+  
+lemma pU_vs_U_None : ∀i,x,r. pU i x r = 〈0,0〉 ↔ U i x r = None ?.
+#i #x #r % normalize
+  [cases (U i x r) normalize //
+   #a #H cut (1=0) [lapply (eq_f … fst … H) >fst_pair >fst_pair #H1 @H1] 
+   #H1 destruct
+  |#H >H //]
+qed.
+
+lemma fst_pU: ∀i,x,r. fst (pU i x r) = termb i x r.
+#i #x #r normalize cases (U i x r) normalize >fst_pair //
+qed.
+
+lemma snd_pU: ∀i,x,r. snd (pU i x r) = out i x r.
+#i #x #r normalize cases (U i x r) normalize >snd_pair //
+qed.
+
+
+definition total ≝ λf.λx:nat. Some nat (f x).
+
+
diff --git a/matita/matita/lib/reverse_complexity/bigops_compl.ma b/matita/matita/lib/reverse_complexity/bigops_compl.ma
new file mode 100644 (file)
index 0000000..032174a
--- /dev/null
@@ -0,0 +1,607 @@
+include "reverse_complexity/complexity.ma".
+include "reverse_complexity/sigma_diseq.ma".
+
+include alias "reverse_complexity/basics.ma".
+
+lemma bigop_prim_rec: ∀a,b,c,p,f,x.
+  bigop (b x-a x) (λi:ℕ.p 〈i+a x,x〉) ? (c 〈a x,x〉) plus (λi:ℕ.f 〈i+a x,x〉) = 
+    prim_rec c 
+    (λi.if p 〈fst i +fst (snd (snd i)),snd (snd (snd i))〉 
+        then plus (f 〈fst i +fst (snd (snd i)),snd (snd (snd i))〉) (fst (snd i)) 
+        else fst (snd i)) (b x-a x) 〈a x ,x〉.
+#a #b #c #p #f #x normalize elim (b x-a x) 
+  [normalize //
+  |#i #Hind >prim_rec_S
+   >fst_pair >snd_pair >snd_pair >fst_pair >snd_pair >fst_pair
+   cases (true_or_false (p 〈i+a x,x〉)) #Hcase >Hcase
+    [<Hind >bigop_Strue // |<Hind >bigop_Sfalse // ]
+  ]
+qed.
+
+lemma bigop_prim_rec_dec: ∀a,b,c,p,f,x.
+  bigop (b x-a x) (λi:ℕ.p 〈b x -i,x〉) ? (c 〈b x,x〉) plus (λi:ℕ.f 〈b x-i,x〉) = 
+    prim_rec c 
+    (λi.if p 〈fst (snd (snd i)) - fst i,snd (snd (snd i))〉 
+        then plus (f 〈fst (snd (snd i)) - fst i,snd (snd (snd i))〉) (fst (snd i)) 
+        else fst (snd i)) (b x-a x) 〈b x ,x〉.
+#a #b #c #p #f #x normalize elim (b x-a x) 
+  [normalize //
+  |#i #Hind >prim_rec_S
+   >fst_pair >snd_pair >snd_pair >fst_pair >snd_pair >fst_pair
+   cases (true_or_false (p 〈b x - i,x〉)) #Hcase >Hcase
+    [<Hind >bigop_Strue // |<Hind >bigop_Sfalse // ]
+  ]
+qed.
+
+lemma bigop_prim_rec_dec1: ∀a,b,c,p,f,x.
+  bigop (S(b x)-a x) (λi:ℕ.p 〈b x - i,x〉) ? (c 〈b x,x〉) plus (λi:ℕ.f 〈b x- i,x〉) = 
+    prim_rec c 
+    (λi.if p 〈fst (snd (snd i)) - (fst i),snd (snd (snd i))〉 
+        then plus (f 〈fst (snd (snd i)) - (fst i),snd (snd (snd i))〉) (fst (snd i)) 
+        else fst (snd i)) (S(b x)-a x) 〈b x,x〉.
+#a #b #c #p #f #x elim (S(b x)-a x) 
+  [normalize //
+  |#i #Hind >prim_rec_S
+   >fst_pair >snd_pair >snd_pair >fst_pair >snd_pair >fst_pair
+   cases (true_or_false (p 〈b x - i,x〉)) #Hcase >Hcase
+    [<Hind >bigop_Strue // |<Hind >bigop_Sfalse // ]
+  ]
+qed.
+
+lemma sum_prim_rec1: ∀a,b,p,f,x.
+  ∑_{i ∈[a x,b x[ | p 〈i,x〉 }(f 〈i,x〉) = 
+    prim_rec (λi.0) 
+    (λi.if p 〈fst i +fst (snd (snd i)),snd (snd (snd i))〉 
+        then f 〈fst i +fst (snd (snd i)),snd (snd (snd i))〉 + fst (snd i) 
+        else fst (snd i)) (b x-a x) 〈a x ,x〉.
+#a #b #p #f #x elim (b x-a x) 
+  [normalize //
+  |#i #Hind >prim_rec_S
+   >fst_pair >snd_pair >snd_pair >fst_pair >snd_pair >fst_pair
+   cases (true_or_false (p 〈i+a x,x〉)) #Hcase >Hcase
+    [<Hind >bigop_Strue // |<Hind >bigop_Sfalse // ]
+  ]
+qed. 
+
+lemma bigop_plus_c: ∀k,p,f,c.
+  c k + bigop k (λi.p i) ? 0 plus (λi.f i) = 
+    bigop k (λi.p i) ? (c k) plus (λi.f i).
+#k #p #f elim k [normalize //]
+#i #Hind #c cases (true_or_false (p i)) #Hcase
+[>bigop_Strue // >bigop_Strue // <associative_plus >(commutative_plus ? (f i))
+ >associative_plus @eq_f @Hind
+|>bigop_Sfalse // >bigop_Sfalse // 
+]
+qed.
+
+
+(*********************************** maximum **********************************) 
+
+lemma max_gen: ∀a,b,p,f,x. a ≤b → 
+  max_{i ∈[a,b[ | p 〈i,x〉 }(f 〈i,x〉) = max_{i < b | leb a i ∧ p 〈i,x〉 }(f 〈i,x〉).
+#a #b #p #f #x @(bigop_I_gen ????? MaxA) 
+qed.
+
+lemma max_prim_rec_base: ∀a,b,p,f,x. a ≤b → 
+  max_{i < b| p 〈i,x〉 }(f 〈i,x〉) = 
+    prim_rec (λi.0) 
+    (λi.if p 〈fst i,x〉 then max (f 〈fst i,snd (snd i)〉) (fst (snd i)) else fst (snd i)) b x.
+#a #b #p #f #x #leab >max_gen // elim b 
+  [normalize //
+  |#i #Hind >prim_rec_S >fst_pair >snd_pair >snd_pair >fst_pair
+   cases (true_or_false (p 〈i,x〉)) #Hcase >Hcase
+    [<Hind >bigop_Strue // |<Hind >bigop_Sfalse // ]
+  ]
+qed.
+
+lemma max_prim_rec: ∀a,b,p,f,x. a ≤b → 
+  max_{i ∈[a,b[ | p 〈i,x〉 }(f 〈i,x〉) = 
+    prim_rec (λi.0) 
+    (λi.if leb a (fst i) ∧ p 〈fst i,x〉 then max (f 〈fst i,snd (snd i)〉) (fst (snd i)) else fst (snd i)) b x.
+#a #b #p #f #x #leab >max_gen // elim b 
+  [normalize //
+  |#i #Hind >prim_rec_S >fst_pair >snd_pair >snd_pair >fst_pair
+   cases (true_or_false (leb a i ∧ p 〈i,x〉)) #Hcase >Hcase
+    [<Hind >bigop_Strue // |<Hind >bigop_Sfalse // ]
+  ]
+qed.
+
+lemma max_prim_rec1: ∀a,b,p,f,x.
+  max_{i ∈[a x,b x[ | p 〈i,x〉 }(f 〈i,x〉) = 
+    prim_rec (λi.0) 
+    (λi.if p 〈fst i +fst (snd (snd i)),snd (snd (snd i))〉 
+        then max (f 〈fst i +fst (snd (snd i)),snd (snd (snd i))〉) (fst (snd i)) 
+        else fst (snd i)) (b x-a x) 〈a x ,x〉.
+#a #b #p #f #x elim (b x-a x) 
+  [normalize //
+  |#i #Hind >prim_rec_S
+   >fst_pair >snd_pair >snd_pair >fst_pair >snd_pair >fst_pair
+   cases (true_or_false (p 〈i+a x,x〉)) #Hcase >Hcase
+    [<Hind >bigop_Strue // |<Hind >bigop_Sfalse // ]
+  ]
+qed.
+
+(* the argument is 〈b-a,〈a,x〉〉 *)
+
+definition max_unary_pr ≝ λp,f.unary_pr (λx.0) 
+    (λi. 
+      let k ≝ fst i in
+      let r ≝ fst (snd i) in
+      let a ≝ fst (snd (snd i)) in
+      let x ≝ snd (snd (snd i)) in
+      if p 〈k + a,x〉 then max (f 〈k+a,x〉) r else r).
+
+lemma max_unary_pr1: ∀a,b,p,f,x.
+  max_{i ∈[a x,b x[ | p 〈i,x〉 }(f 〈i,x〉) = 
+    ((max_unary_pr p f) ∘ (λx.〈b x - a x,〈a x,x〉〉)) x.
+#a #b #p #f #x normalize >fst_pair >snd_pair @max_prim_rec1
+qed.
+      
+definition aux_compl ≝ λhp,hf.λi.
+  let k ≝ fst i in 
+  let r ≝ fst (snd i) in 
+  let a ≝ fst (snd (snd i)) in 
+  let x ≝ snd (snd (snd i)) in 
+  hp 〈k+a,x〉 + hf 〈k+a,x〉 + (* was MSC r*) MSC i .
+  
+definition aux_compl1 ≝ λhp,hf.λi.
+  let k ≝ fst i in 
+  let r ≝ fst (snd i) in 
+  let a ≝ fst (snd (snd i)) in 
+  let x ≝ snd (snd (snd i)) in 
+  hp 〈k+a,x〉 + hf 〈k+a,x〉 + MSC r.
+
+lemma aux_compl1_def: ∀k,r,m,hp,hf. 
+  aux_compl1 hp hf 〈k,〈r,m〉〉 = 
+  let a ≝ fst m in 
+  let x ≝ snd m in 
+  hp 〈k+a,x〉 + hf 〈k+a,x〉 + MSC r.
+#k #r #m #hp #hf normalize >fst_pair >snd_pair >snd_pair >fst_pair //
+qed.
+
+lemma aux_compl1_def1: ∀k,r,a,x,hp,hf. 
+  aux_compl1 hp hf 〈k,〈r,〈a,x〉〉〉 = hp 〈k+a,x〉 + hf 〈k+a,x〉 + MSC r.
+#k #r #a #x #hp #hf normalize >fst_pair >snd_pair >snd_pair >fst_pair 
+>fst_pair >snd_pair //
+qed.
+
+axiom Oaux_compl: ∀hp,hf. O (aux_compl1 hp hf) (aux_compl hp hf).
+
+lemma MSC_max: ∀f,h,x. CF h f → MSC (max_{i < x}(f i)) ≤ max_{i < x}(h i).
+#f #h #x #hf elim x // #i #Hind >bigop_Strue [|//] >bigop_Strue [|//]
+whd in match (max ??); 
+cases (true_or_false (leb (f i) (bigop i (λi0:ℕ.true) ? 0 max(λi0:ℕ.f i0))))
+#Hcase >Hcase 
+  [@(transitive_le … Hind) @le_maxr //
+  |@(transitive_le … (MSC_out … hf i)) @le_maxl //
+  ]
+qed.
+  
+lemma CF_max: ∀a,b.∀p:nat →bool.∀f,ha,hb,hp,hf,s.
+  CF ha a → CF hb b → CF hp p → CF hf f → 
+  O s (λx.ha x + hb x + 
+       (∑_{i ∈[a x ,b x[ }
+         (hp 〈i,x〉 + hf 〈i,x〉 + max_{i ∈ [a x, b x [ }(hf 〈i,x〉)))) →
+  CF s (λx.max_{i ∈[a x,b x[ | p 〈i,x〉 }(f 〈i,x〉)).
+#a #b #p #f #ha #hb #hp #hf #s #CFa #CFb #CFp #CFf #HO 
+@ext_CF1 [|#x @max_unary_pr1]
+@(CF_comp ??? (λx.ha x + hb x))
+  [|@CF_comp_pair
+    [@CF_minus [@(O_to_CF … CFb) @O_plus_r // |@(O_to_CF … CFa) @O_plus_l //]
+    |@CF_comp_pair 
+      [@(O_to_CF … CFa) @O_plus_l // 
+      | @(O_to_CF … CF_id) @O_plus_r @le_to_O @(MSC_in … CFb)
+      ]
+    ]
+  |@(CF_prim_rec … MSC … (aux_compl1 hp hf))
+     [@CF_const
+     |@(O_to_CF … (Oaux_compl … ))
+      @CF_if 
+       [@(CF_comp p … MSC … CFp) 
+         [@CF_comp_pair 
+           [@CF_plus [@CF_fst| @CF_comp_fst @CF_comp_snd @CF_snd]
+           |@CF_comp_snd @CF_comp_snd @CF_snd]
+         |@le_to_O #x normalize >commutative_plus >associative_plus @le_plus //
+         ]
+       |@CF_max1 
+         [@(CF_comp f … MSC … CFf) 
+           [@CF_comp_pair 
+             [@CF_plus [@CF_fst| @CF_comp_fst @CF_comp_snd @CF_snd]
+             |@CF_comp_snd @CF_comp_snd @CF_snd]
+           |@le_to_O #x normalize >commutative_plus // 
+           ]
+         |@CF_comp_fst @(monotonic_CF … CF_snd) normalize //
+         ]
+       |@CF_comp_fst @(monotonic_CF … CF_snd) normalize //
+       ]  
+     |@O_refl
+     ]
+  |@(O_trans … HO) -HO
+   @(O_trans ? (λx:ℕ
+   .ha x+hb x
+    +bigop (b x-a x) (λi:ℕ.true) ? (MSC 〈a x,x〉) plus
+     (λi:ℕ
+      .(λi0:ℕ
+        .hp 〈i0,x〉+hf 〈i0,x〉
+         +bigop (b x-a x) (λi1:ℕ.true) ? 0 max
+          (λi1:ℕ.(λi2:ℕ.hf 〈i2,x〉) (i1+a x))) (i+a x))))
+    [
+   @le_to_O #n @le_plus // whd in match (unary_pr ???);
+   >fst_pair >snd_pair >bigop_prim_rec elim (b n - a n)
+    [normalize //
+    |#x #Hind >prim_rec_S >fst_pair >snd_pair >fst_pair >snd_pair >aux_compl1_def1
+     >prim_rec_S >fst_pair >snd_pair >fst_pair >snd_pair >fst_pair 
+     >snd_pair normalize in ⊢ (??%); >commutative_plus @le_plus
+      [-Hind @le_plus // normalize >fst_pair >snd_pair 
+       @(transitive_le ? (bigop x (λi1:ℕ.true) ? 0 (λn0:ℕ.λm:ℕ.if leb n0 m then m else n0 )
+         (λi1:ℕ.hf 〈i1+a n,n〉)))
+        [elim x [normalize @MSC_le]
+         #x0 #Hind >prim_rec_S >fst_pair >snd_pair >snd_pair >snd_pair
+         >fst_pair >fst_pair cases (p 〈x0+a n,n〉) normalize
+          [cases (true_or_false (leb (f 〈x0+a n,n〉)
+            (prim_rec (λx00:ℕ.O)
+             (λi:ℕ
+            .if p 〈fst i+fst (snd (snd i)),snd (snd (snd i))〉 
+             then if leb (f 〈fst i+fst (snd (snd i)),snd (snd (snd i))〉)
+                           (fst (snd i)) 
+                      then fst (snd i) 
+                      else f 〈fst i+fst (snd (snd i)),snd (snd (snd i))〉  
+             else fst (snd i) ) x0 〈a n,n〉))) #Hcase >Hcase normalize
+           [@(transitive_le … Hind) -Hind @(le_maxr … (le_n …))
+           |@(transitive_le … (MSC_out … CFf …)) @(le_maxl … (le_n …))
+           ]
+         |@(transitive_le … Hind) -Hind @(le_maxr … (le_n …))
+         ]
+       |@(le_maxr … (le_n …))
+       ]
+     |@(transitive_le … Hind) -Hind 
+      generalize in match (bigop x (λi:ℕ.true) ? 0 max
+              (λi1:ℕ.(λi2:ℕ.hf 〈i2,n〉) (i1+a n))); #c
+      generalize in match (hf 〈x+a n,n〉); #c1
+      elim x [//] #x0 #Hind 
+      >prim_rec_S >prim_rec_S normalize >fst_pair >fst_pair >snd_pair 
+      >snd_pair >snd_pair >snd_pair >snd_pair >snd_pair >fst_pair >fst_pair 
+      >fst_pair @le_plus 
+       [@le_plus // cases (true_or_false (leb c1 c)) #Hcase 
+        >Hcase normalize // @lt_to_le @not_le_to_lt @(leb_false_to_not_le ?? Hcase)
+       |@Hind
+       ]
+     ]
+   ]
+ |@O_plus [@O_plus_l //] @le_to_O #x 
+  <bigop_plus_c @le_plus // @(transitive_le … (MSC_pair …)) @le_plus 
+   [@MSC_out @CFa | @MSC_out @(O_to_CF MSC … (CF_const x)) @le_to_O @(MSC_in … CFb)]
+ ]
+qed.
+
+axiom daemon : ∀P:Prop.P.
+axiom O_extl: ∀s1,s2,f. (∀x.s1 x = s2 x) → O s1 f → O s2 f.
+
+lemma CF_max2: ∀a,b.∀p:nat →bool.∀f,ha,hb,hp,hf,s.
+  CF ha a → CF hb b → CF hp p → CF hf f → 
+  O s (λx.ha x + hb x + 
+       (b x - a x)*max_{i ∈ [a x, b x [ }(hp 〈i,x〉 + hf 〈i,x〉)) →
+  CF s (λx.max_{i ∈[a x,b x[ | p 〈i,x〉 }(f 〈i,x〉)).
+#a #b #p #f #ha #hb #hp #hf #s #CFa #CFb #CFp #CFf #Os
+@(O_to_CF … Os (CF_max … CFa CFb CFp CFf ?)) @O_plus 
+  [@O_plus_l @O_refl
+  |@O_plus_r @O_ext2 [|| #x @(bigop_op  … plusAC)]
+   @O_plus
+    [@le_to_O normalize #x @sigma_to_Max 
+    |@le_to_O #x @transitive_le [|@sigma_const] @le_times //  
+     @Max_le #i #lti #_ @(transitive_le ???? (le_MaxI … ))
+      [@le_plus_n | // | @lt_minus_to_plus_r // | //]
+    ]
+  ]
+qed.
+
+(*
+lemma CF_max_monotonic: ∀a,b.∀p:nat →bool.∀f,ha,hb,hp,hf,s.
+  CF ha a → CF hb b → CF hp p → CF hf f → 
+  O s (λx.ha x + hb x + 
+       (b x - a x)*max_{i ∈ [a x, b x [ }(hp 〈i,x〉 + hf 〈i,x〉)) →
+  CF s (λx.max_{i ∈[a x,b x[ | p 〈i,x〉 }(f 〈i,x〉)).
+#a #b #p #f #ha #hb #hp #hf #s #CFa #CFb #CFp #CFf #Os
+@(O_to_CF … Os (CF_max … CFa CFb CFp CFf ?)) @O_plus 
+  [@O_plus_l @O_refl
+  |@O_plus_r @O_ext2 [|| #x @(bigop_op  … plusAC)]
+   @O_plus
+    [@le_to_O normalize #x @sigma_to_Max 
+    |@le_to_O #x @transitive_le [|@sigma_const] @le_times //  
+     @Max_le #i #lti #_ @(transitive_le ???? (le_MaxI … ))
+      [@le_plus_n | // | @lt_minus_to_plus_r // | //]
+    ]
+  ]
+qed.
+*)
+
+(* old
+axiom CF_max: ∀a,b.∀p:nat →bool.∀f,ha,hb,hp,hf,s.
+  CF ha a → CF hb b → CF hp p → CF hf f → 
+  O s (λx.ha x + hb x + ∑_{i ∈[a x ,b x[ }(hp 〈i,x〉 + hf 〈i,x〉)) →
+  CF s (λx.max_{i ∈[a x,b x[ | p 〈i,x〉 }(f 〈i,x〉)). *)
+  
+(******************************** minimization ********************************) 
+
+let rec my_minim a f x k on k ≝
+  match k with
+  [O ⇒ a
+  |S p ⇒ if eqb (my_minim a f x p) (a+p) 
+         then if f 〈a+p,x〉 then a+p else S(a+p)
+         else (my_minim a f x p) ].
+         
+lemma my_minim_S : ∀a,f,x,k. 
+  my_minim a f x (S k) = 
+    if eqb (my_minim a f x k) (a+k) 
+    then if f 〈a+k,x〉 then a+k else S(a+k)
+    else (my_minim a f x k) .
+// qed.
+  
+lemma my_minim_fa : ∀a,f,x,k. f〈a,x〉 = true → my_minim a f x k = a.
+#a #f #x #k #H elim k // #i #Hind normalize >Hind
+cases (true_or_false (eqb a (a+i))) #Hcase >Hcase normalize //
+<(eqb_true_to_eq … Hcase) >H //
+qed.
+
+lemma my_minim_nfa : ∀a,f,x,k. f〈a,x〉 = false → 
+my_minim a f x (S k) = my_minim (S a) f x k.
+#a #f #x #k #H elim k  
+  [normalize <plus_n_O >H >eq_to_eqb_true // 
+  |#i #Hind >my_minim_S >Hind >my_minim_S <plus_n_Sm //
+  ]
+qed.
+
+lemma my_min_eq : ∀a,f,x,k.
+  min k a (λi.f 〈i,x〉) = my_minim a f x k.
+#a #f #x #k lapply a -a elim k // #i #Hind #a normalize in ⊢ (??%?);
+cases (true_or_false (f 〈a,x〉)) #Hcase >Hcase 
+  [>(my_minim_fa … Hcase) // | >Hind @sym_eq @(my_minim_nfa … Hcase) ]
+qed.
+
+(* cambiare qui: togliere S *)
+
+
+definition minim_unary_pr ≝ λf.unary_pr (λx.S(fst x))
+    (λi. 
+      let k ≝ fst i in
+      let r ≝ fst (snd i) in
+      let b ≝ fst (snd (snd i)) in
+      let x ≝ snd (snd (snd i)) in
+      if f 〈b-k,x〉 then b-k else r).
+      
+definition compl_minim_unary ≝ λhf:nat → nat.λi. 
+      let k ≝ fst i in
+      let b ≝ fst (snd (snd i)) in
+      let x ≝ snd (snd (snd i)) in
+      hf 〈b-k,x〉 + MSC 〈k,〈S b,x〉〉.
+
+definition compl_minim_unary_aux ≝ λhf,i. 
+      let k ≝ fst i in
+      let r ≝ fst (snd i) in
+      let b ≝ fst (snd (snd i)) in
+      let x ≝ snd (snd (snd i)) in
+      hf 〈b-k,x〉 + MSC i.
+
+lemma compl_minim_unary_aux_def : ∀hf,k,r,b,x.
+  compl_minim_unary_aux hf 〈k,〈r,〈b,x〉〉〉 = hf 〈b-k,x〉 + MSC 〈k,〈r,〈b,x〉〉〉.
+#hf #k #r #b #x normalize >snd_pair >snd_pair >snd_pair >fst_pair >fst_pair //
+qed.
+
+lemma compl_minim_unary_def : ∀hf,k,r,b,x.
+  compl_minim_unary hf 〈k,〈r,〈b,x〉〉〉 = hf 〈b-k,x〉 + MSC 〈k,〈S b,x〉〉.
+#hf #k #r #b #x normalize >snd_pair >snd_pair >snd_pair >fst_pair >fst_pair //
+qed.
+
+lemma compl_minim_unary_aux_def2 : ∀hf,k,r,x.
+  compl_minim_unary_aux hf 〈k,〈r,x〉〉 = hf 〈fst x-k,snd x〉 + MSC 〈k,〈r,x〉〉.
+#hf #k #r #x normalize >snd_pair >snd_pair >fst_pair //
+qed.
+
+lemma compl_minim_unary_def2 : ∀hf,k,r,x.
+  compl_minim_unary hf 〈k,〈r,x〉〉 = hf 〈fst x-k,snd x〉 + MSC 〈k,〈S(fst x),snd x〉〉.
+#hf #k #r #x normalize >snd_pair >snd_pair >fst_pair //
+qed.
+
+lemma min_aux: ∀a,f,x,k. min (S k) (a x) (λi:ℕ.f 〈i,x〉) =
+  ((minim_unary_pr f) ∘ (λx.〈S k,〈a x + k,x〉〉)) x.
+#a #f #x #k whd in ⊢ (???%); >fst_pair >snd_pair
+lapply a -a (* @max_prim_rec1 *)
+elim k
+  [normalize #a >fst_pair >snd_pair >fst_pair >snd_pair >snd_pair >fst_pair 
+   <plus_n_O <minus_n_O >fst_pair //
+  |#i #Hind #a normalize in ⊢ (??%?); >prim_rec_S >fst_pair >snd_pair
+   >fst_pair >snd_pair >snd_pair >fst_pair <plus_n_Sm <(Hind (λx.S (a x)))
+   whd in ⊢ (???%); >minus_S_S <(minus_plus_m_m (a x) i) //
+qed.
+
+lemma minim_unary_pr1: ∀a,b,f,x.
+  μ_{i ∈[a x,b x]}(f 〈i,x〉) = 
+    if leb (a x) (b x) then ((minim_unary_pr f) ∘ (λx.〈S (b x) - a x,〈b x,x〉〉)) x
+    else (a x).
+#a #b #f #x cases (true_or_false (leb (a x) (b x))) #Hcase >Hcase
+  [cut (b x = a x + (b x - a x))
+    [>commutative_plus <plus_minus_m_m // @leb_true_to_le // ]
+   #Hcut whd in ⊢ (???%); >minus_Sn_m [|@leb_true_to_le //]
+   >min_aux whd in ⊢ (??%?); <Hcut //
+  |>eq_minus_O // @not_le_to_lt @leb_false_to_not_le //
+  ]
+qed.
+
+axiom sum_inv: ∀a,b,f.∑_{i ∈ [a,S b[ }(f i) = ∑_{i ∈ [a,S b[ }(f (a + b - i)).
+
+(*
+#a #b #f @(bigop_iso … plusAC) whd %{(λi.b - a - i)} %{(λi.b - a -i)} %
+  [%[#i #lti #_ normalize @eq_f >commutative_plus <plus_minus_associative 
+    [2: @le_minus_to_plus_r //
+     [// @eq_f @@sym_eq @plus_to_minus 
+    |#i #Hi #_ % [% [@le_S_S 
+*)
+
+example sum_inv_check : ∑_{i ∈ [3,6[ }(i*i) = ∑_{i ∈ [3,6[ }((8-i)*(8-i)).
+normalize // qed.
+
+(* rovesciamo la somma *)
+
+lemma CF_mu: ∀a,b.∀f:nat →bool.∀sa,sb,sf,s.
+  CF sa a → CF sb b → CF sf f → 
+  O s (λx.sa x + sb x + ∑_{i ∈[a x ,S(b x)[ }(sf 〈i,x〉 + MSC 〈b x - i,〈S(b x),x〉〉)) →
+  CF s (λx.μ_{i ∈[a x,b x] }(f 〈i,x〉)).
+#a #b #f #ha #hb #hf #s #CFa #CFb #CFf #HO 
+@ext_CF1 [|#x @minim_unary_pr1]
+@CF_if 
+  [@CF_le @(O_to_CF … HO) 
+    [@(O_to_CF … CFa) @O_plus_l @O_plus_l  @O_refl
+    |@(O_to_CF … CFb) @O_plus_l @O_plus_r @O_refl
+    ]
+  |@(CF_comp ??? (λx.ha x + hb x))
+    [|@CF_comp_pair
+      [@CF_minus [@CF_compS @(O_to_CF … CFb) @O_plus_r // |@(O_to_CF … CFa) @O_plus_l //]
+      |@CF_comp_pair 
+        [@(O_to_CF … CFb) @O_plus_r //
+        |@(O_to_CF … CF_id) @O_plus_r @le_to_O @(MSC_in … CFb)
+        ]
+      ]
+    |@(CF_prim_rec_gen … MSC … (compl_minim_unary_aux hf))
+      [@((λx:ℕ.fst (snd x)
+          +compl_minim_unary hf
+          〈fst x,
+          〈unary_pr fst
+            (λi:ℕ
+             .(let (k:ℕ) ≝fst i in 
+               let (r:ℕ) ≝fst (snd i) in 
+               let (b:ℕ) ≝fst (snd (snd i)) in 
+               let (x:ℕ) ≝snd (snd (snd i)) in if f 〈b-S k,x〉 then b-S k else r ))
+          〈fst x,snd (snd x)〉,
+          snd (snd x)〉〉))
+      |@CF_compS @CF_fst
+      |@CF_if 
+        [@(CF_comp f … MSC … CFf) 
+          [@CF_comp_pair 
+            [@CF_minus [@CF_comp_fst @CF_comp_snd @CF_snd|@CF_fst]
+            |@CF_comp_snd @CF_comp_snd @CF_snd]
+          |@le_to_O #x normalize >commutative_plus //
+          ]
+        |@(O_to_CF … MSC)
+          [@le_to_O #x normalize //
+          |@CF_minus
+            [@CF_comp_fst @CF_comp_snd @CF_snd |@CF_fst]
+          ]
+        |@CF_comp_fst @(monotonic_CF … CF_snd) normalize //
+        ]
+      |@O_plus    
+        [@O_plus_l @O_refl 
+        |@O_plus_r @O_ext2 [||#x >compl_minim_unary_aux_def2 @refl]
+         @O_trans [||@le_to_O #x >compl_minim_unary_def2 @le_n]
+         @O_plus [@O_plus_l //] 
+         @O_plus_r 
+         @O_trans [|@le_to_O #x @MSC_pair] @O_plus 
+           [@le_to_O #x @monotonic_MSC @(transitive_le ???? (le_fst …)) 
+            >fst_pair @le_n]
+         @O_trans [|@le_to_O #x @MSC_pair] @O_plus
+           [@le_to_O #x @monotonic_MSC @(transitive_le ???? (le_snd …))
+            >snd_pair @(transitive_le ???? (le_fst …)) >fst_pair 
+            normalize >snd_pair >fst_pair lapply (surj_pair x)
+            * #x1 * #x2 #Hx >Hx >fst_pair >snd_pair elim x1 //
+            #i #Hind >prim_rec_S >fst_pair >snd_pair >snd_pair >fst_pair
+            cases (f ?) [@le_S // | //]]
+         @le_to_O #x @monotonic_MSC @(transitive_le ???? (le_snd …)) >snd_pair
+         >(expand_pair (snd (snd x))) in ⊢ (?%?); @le_pair //
+        ]
+      ] 
+    |cut (O s (λx.ha x + hb x + 
+            ∑_{i ∈[a x ,S(b x)[ }(hf 〈a x+b x-i,x〉 + MSC 〈b x -(a x+b x-i),〈S(b x),x〉〉)))
+      [@(O_ext2 … HO) #x @eq_f @sum_inv] -HO #HO
+     @(O_trans … HO) -HO
+     @(O_trans ? (λx:ℕ.ha x+hb x
+       +bigop (S(b x)-a x) (λi:ℕ.true) ? 
+        (MSC 〈b x,x〉) plus (λi:ℕ.(λj.hf j + MSC 〈b x - fst j,〈S(b (snd j)),snd j〉〉) 〈b x- i,x〉)))
+      [@le_to_O #n @le_plus // whd in match (unary_pr ???); 
+       >fst_pair >snd_pair >(bigop_prim_rec_dec1 a b ? (λi.true)) 
+        (* it is crucial to recall that the index is bound by S(b x) *)
+        cut (S (b n) - a n ≤ S (b n)) [//]
+        elim (S(b n) - a n)
+        [normalize //  
+        |#x #Hind #lex >prim_rec_S >fst_pair >snd_pair >fst_pair >snd_pair 
+         >compl_minim_unary_def >prim_rec_S >fst_pair >snd_pair >fst_pair 
+         >snd_pair >fst_pair >snd_pair >fst_pair whd in ⊢ (??%); >commutative_plus 
+         @le_plus [2:@Hind @le_S @le_S_S_to_le @lex] -Hind >snd_pair 
+         >minus_minus_associative // @le_S_S_to_le // 
+        ]
+      |@O_plus [@O_plus_l //] @O_ext2 [||#x @bigop_plus_c] 
+       @O_plus 
+        [@O_plus_l @O_trans [|@le_to_O #x @MSC_pair]
+         @O_plus 
+           [@O_plus_r @le_to_O @(MSC_out … CFb)
+           |@O_plus_r @le_to_O @(MSC_in … CFb)
+           ]
+        |@O_plus_r @(O_ext2 … (O_refl …)) #x @same_bigop
+          [//|#i #H #_ @eq_f2 [@eq_f @eq_f2 //|>fst_pair @eq_f @eq_f2  //]   
+        ]
+      ]
+    ]
+  ] 
+  |@(O_to_CF … CFa) @(O_trans … HO) @O_plus_l @O_plus_l @O_refl
+  ]
+  
+qed.
+
+lemma CF_mu2: ∀a,b.∀f:nat →bool.∀sa,sb,sf,s.
+  CF sa a → CF sb b → CF sf f → 
+  O s (λx.sa x + sb x + ∑_{i ∈[a x ,S(b x)[ }(sf 〈i,x〉 + MSC〈S(b x),x〉)) →
+  CF s (λx.μ_{i ∈[a x,b x] }(f 〈i,x〉)).
+#a #b #f #sa #sb #sf #s #CFa #CFb #CFf #HO
+@(O_to_CF … HO (CF_mu … CFa CFb CFf ?)) @O_plus [@O_plus_l @O_refl] 
+@O_plus_r @O_ext2 [|| #x @(bigop_op  … plusAC)]
+@O_plus [@le_to_O #x @le_sigma //] 
+@(O_trans ? (λx.∑_{i ∈[a x ,S(b x)[ }(MSC(b x -i)+MSC 〈S(b x),x〉))) 
+  [@le_to_O #x @le_sigma //]
+@O_ext2 [|| #x @(bigop_op  … plusAC)] @O_plus  
+  [@le_to_O #x @le_sigma // #i #lti #_ @(transitive_le … (MSC 〈S (b x),x〉)) //
+   @monotonic_MSC @(transitive_le … (S(b x))) // @le_S //
+  |@le_to_O #x @le_sigma //
+  ]
+qed.
+
+(* uses MSC_S *)
+
+lemma CF_mu3: ∀a,b.∀f:nat →bool.∀sa,sb,sf,s. (∀x.sf x > 0) →
+  CF sa a → CF sb b → CF sf f → 
+  O s (λx.sa x + sb x + ∑_{i ∈[a x ,S(b x)[ }(sf 〈i,x〉 + MSC〈b x,x〉)) →
+  CF s (λx.μ_{i ∈[a x,b x] }(f 〈i,x〉)).
+#a #b #f #sa #sb #sf #s #sfpos #CFa #CFb #CFf #HO
+@(O_to_CF … HO (CF_mu2 … CFa CFb CFf ?)) @O_plus [@O_plus_l @O_refl] 
+@O_plus_r @O_ext2 [|| #x @(bigop_op  … plusAC)]
+@O_plus [@le_to_O #x @le_sigma //] 
+@le_to_O #x @le_sigma // #x #lti #_ >MSC_pair_eq >MSC_pair_eq <associative_plus
+@le_plus // @(transitive_le … (MSC_sublinear … )) /2 by monotonic_lt_plus_l/
+qed.
+
+lemma CF_mu4: ∀a,b.∀f:nat →bool.∀sa,sb,sf,s. (∀x.sf x > 0) →
+  CF sa a → CF sb b → CF sf f → 
+  O s (λx.sa x + sb x + (S(b x) - a x)*Max_{i ∈[a x ,S(b x)[ }(sf 〈i,x〉)) →
+  CF s (λx.μ_{i ∈[a x,b x] }(f 〈i,x〉)).
+#a #b #f #sa #sb #sf #s #sfpos #CFa #CFb #CFf #HO
+@(O_to_CF … HO (CF_mu3 … sfpos CFa CFb CFf ?)) @O_plus [@O_plus_l @O_refl] 
+@O_ext2 [|| #x @(bigop_op  … plusAC)] @O_plus_r @O_plus
+  [@le_to_O #x @sigma_to_Max
+  |lapply (MSC_in …  CFf) #Hle
+   %{1} %{0} #n #_ @(transitive_le … (sigma_const …)) 
+   >(commutative_times 1) <times_n_1 
+   cases (decidable_le (S (b n)) (a n)) #H
+    [>(eq_minus_O … H) //
+    |lapply (le_S_S_to_le … (not_le_to_lt … H)) -H #H
+     @le_times // @(transitive_le … (Hle … ))
+     cut (b n = b n - a n + a n) [<plus_minus_m_m // ]
+     #Hcut >Hcut in ⊢ (?%?); @(le_Max (λi.sf 〈i+a n,n〉)) /2/
+    ]
+  ]
+qed.
+
+(*
+axiom CF_mu: ∀a,b.∀f:nat →bool.∀sa,sb,sf,s.
+  CF sa a → CF sb b → CF sf f → 
+  O s (λx.sa x + sb x + ∑_{i ∈[a x ,S(b x)[ }(sf 〈i,x〉)) →
+  CF s (λx.μ_{i ∈[a x,b x] }(f 〈i,x〉)). *)
+  
+
+  
\ No newline at end of file
diff --git a/matita/matita/lib/reverse_complexity/complexity.ma b/matita/matita/lib/reverse_complexity/complexity.ma
new file mode 100644 (file)
index 0000000..ae7bace
--- /dev/null
@@ -0,0 +1,290 @@
+include "reverse_complexity/basics.ma".
+include "reverse_complexity/big_O.ma". 
+
+(********************************* complexity *********************************)
+
+(* We assume operations have a minimal structural complexity MSC. 
+For instance, for time complexity, MSC is equal to the size of input.
+For space complexity, MSC is typically 0, since we only measure the space 
+required in addition to dimension of the input. *)
+
+axiom MSC : nat → nat.
+axiom MSC_sublinear : ∀n. MSC (S n) ≤ S (MSC n). 
+(* axiom MSC_S: O MSC (λx.MSC (S x)) . *)
+axiom MSC_le: ∀n. MSC n ≤ n.
+
+axiom monotonic_MSC: monotonic ? le MSC.
+axiom MSC_pair_eq: ∀a,b. MSC 〈a,b〉 = MSC a + MSC b.
+
+
+lemma MSC_pair: ∀a,b. MSC 〈a,b〉 ≤ MSC a + MSC b. // qed.
+
+(* C s i means i is running in O(s) *)
+definition C ≝ λs,i.∃c.∃a.∀x.a ≤ x → ∃y. 
+  U i x (c*(s x)) = Some ? y.
+
+(* C f s means f ∈ O(s) where MSC ∈O(s) *)
+definition CF ≝ λs,f.∃i.code_for (total f) i ∧ C s i.
+
+axiom MSC_in: ∀f,h. CF h f → ∀x. MSC x ≤ h x.
+axiom MSC_out: ∀f,h. CF h f → ∀x. MSC (f x) ≤ h x.
+
+lemma ext_CF : ∀f,g,s. (∀n. f n = g n) → CF s f → CF s g.
+#f #g #s #Hext * #i * #Hcode #HC %{i} %
+  [#x cases (Hcode x) #a #H %{a} whd in match (total ??); <Hext @H | //] 
+qed.
+
+lemma ext_CF1 : ∀f,g,s. (∀n. f n = g n) → CF s g → CF s f.
+#f #g #s #Hext * #i * #Hcode #HC %{i} %
+  [#x cases (Hcode x) #a #H %{a} whd in match (total ??); >Hext @H | //] 
+qed.
+
+lemma monotonic_CF: ∀s1,s2,f.(∀x. s1 x ≤  s2 x) → CF s1 f → CF s2 f.
+#s1 #s2 #f #H * #i * #Hcode #Hs1 
+%{i} % [//] cases Hs1 #c * #a -Hs1 #Hs1 %{c} %{a} #n #lean 
+cases(Hs1 n lean) #y #Hy %{y} @(monotonic_U …Hy) @le_times // 
+qed.
+
+lemma O_to_CF: ∀s1,s2,f.O s2 s1 → CF s1 f → CF s2 f.
+#s1 #s2 #f #H * #i * #Hcode #Hs1 
+%{i} % [//] cases Hs1 #c * #a -Hs1 #Hs1 
+cases H #c1 * #a1 #Ha1 %{(c*c1)} %{(a+a1)} #n #lean 
+cases(Hs1 n ?) [2:@(transitive_le … lean) //] #y #Hy %{y} @(monotonic_U …Hy)
+>associative_times @le_times // @Ha1 @(transitive_le … lean) //
+qed.
+
+lemma timesc_CF: ∀s,f,c.CF (λx.c*s x) f → CF s f.
+#s #f #c @O_to_CF @O_times_c 
+qed.
+
+(********************************* composition ********************************)
+axiom CF_comp: ∀f,g,sf,sg,sh. CF sg g → CF sf f → 
+  O sh (λx. sg x + sf (g x)) → CF sh (f ∘ g).
+  
+lemma CF_comp_ext: ∀f,g,h,sh,sf,sg. CF sg g → CF sf f → 
+  (∀x.f(g x) = h x) → O sh (λx. sg x + sf (g x)) → CF sh h.
+#f #g #h #sh #sf #sg #Hg #Hf #Heq #H @(ext_CF (f ∘ g))
+  [#n normalize @Heq | @(CF_comp … H) //]
+qed.
+
+(************************************* smn ************************************)
+axiom smn: ∀f,s. CF s f → ∀x. CF (λy.s 〈x,y〉) (λy.f 〈x,y〉).
+
+(****************************** constructibility ******************************)
+definition constructible ≝ λs. CF s s.
+
+lemma constr_comp : ∀s1,s2. constructible s1 → constructible s2 →
+  (∀x. x ≤ s2 x) → constructible (s2 ∘ s1).
+#s1 #s2 #Hs1 #Hs2 #Hle @(CF_comp … Hs1 Hs2) @O_plus @le_to_O #x [@Hle | //] 
+qed.
+
+lemma ext_constr: ∀s1,s2. (∀x.s1 x = s2 x) → 
+  constructible s1 → constructible s2.
+#s1 #s2 #Hext #Hs1 @(ext_CF … Hext) @(monotonic_CF … Hs1)  #x >Hext //
+qed.
+
+
+(***************************** primitive recursion ****************************)
+
+(* no arguments *)
+
+let rec prim_rec0 (k:nat) (h:nat →nat) n on n ≝ 
+  match n with 
+  [ O ⇒ k
+  | S a ⇒ h 〈a, prim_rec0 k h a〉].
+  
+lemma prim_rec0_S: ∀k,h,n.
+  prim_rec0 k h (S n) = h 〈n, prim_rec0 k h n〉.
+// qed.
+
+let rec prim_rec0_compl (k,sk:nat) (h,sh:nat →nat) n on n ≝ 
+  match n with 
+  [ O ⇒ sk
+  | S a ⇒ prim_rec0_compl k sk h sh a + sh (prim_rec0 k h a)].
+
+axiom CF_prim_rec0_gen: ∀k,h,sk,sh,sh1,sf. CF sh h →
+  O sh1 (λx.snd x + sh 〈fst x,prim_rec0 k h (fst x)〉) → 
+  O sf (prim_rec0 sk sh1) →
+   CF sf (prim_rec0 k h).
+
+lemma CF_prim_rec0: ∀k,h,sk,sh,sf. CF sh h → 
+  O sf (prim_rec0 sk (λx. snd x + sh 〈fst x,prim_rec0 k h (fst x)〉))
+   → CF sf (prim_rec0 k h).
+#k #h #sk #sh #sf #Hh #HO @(CF_prim_rec0_gen … Hh … HO) @O_refl
+qed.
+
+(* with arguments. m is a vector of arguments *)
+let rec prim_rec (k,h:nat →nat) n m on n ≝ 
+  match n with 
+  [ O ⇒ k m
+  | S a ⇒ h 〈a,〈prim_rec k h a m, m〉〉].
+  
+lemma prim_rec_S: ∀k,h,n,m.
+  prim_rec k h (S n) m = h 〈n,〈prim_rec k h n m, m〉〉.
+// qed.
+
+lemma prim_rec_le: ∀k1,k2,h1,h2. (∀x.k1 x ≤ k2 x) → 
+(∀x,y.x ≤y → h1 x ≤ h2 y) →
+  ∀x,m. prim_rec k1 h1 x m ≤ prim_rec k2 h2 x m.
+#k1 #k2 #h1 #h2 #lek #leh #x #m elim x //
+#n #Hind normalize @leh @le_pair // @le_pair //
+qed.
+definition unary_pr ≝ λk,h,x. prim_rec k h (fst x) (snd x).
+
+lemma prim_rec_unary: ∀k,h,a,b. 
+  prim_rec k h a b = unary_pr k h 〈a,b〉.
+#k #h #a #b normalize >fst_pair >snd_pair //
+qed.
+  
+let rec prim_rec_compl (k,h,sk,sh:nat →nat) n m on n ≝ 
+  match n with 
+  [ O ⇒ sk m
+  | S a ⇒ prim_rec_compl k h sk sh a m + sh 〈a,〈prim_rec k h a m,m〉〉].
+
+axiom CF_prim_rec_gen: ∀k,h,sk,sh,sh1. CF sk k → CF sh h →  
+  O sh1 (λx. fst (snd x) + 
+             sh 〈fst x,〈unary_pr k h 〈fst x,snd (snd x)〉,snd (snd x)〉〉) → 
+   CF (unary_pr sk sh1) (unary_pr k h).
+
+lemma CF_prim_rec: ∀k,h,sk,sh,sf. CF sk k → CF sh h → 
+  O sf (unary_pr sk 
+        (λx. fst (snd x) + 
+             sh 〈fst x,〈unary_pr k h 〈fst x,snd (snd x)〉,snd (snd x)〉〉)) 
+   → CF sf (unary_pr k h).
+#k #h #sk #sh #sf #Hk #Hh #Osf @(O_to_CF … Osf) @(CF_prim_rec_gen … Hk Hh) 
+@O_refl
+qed.
+
+lemma constr_prim_rec: ∀s1,s2. constructible s1 → constructible s2 →
+  (∀n,r,m. 2 * r ≤ s2 〈n,〈r,m〉〉) → constructible (unary_pr s1 s2).
+#s1 #s2 #Hs1 #Hs2 #Hincr @(CF_prim_rec … Hs1 Hs2) whd %{2} %{0} 
+#x #_ lapply (surj_pair x) * #a * #b #eqx >eqx whd in match (unary_pr ???); 
+>fst_pair >snd_pair
+whd in match (unary_pr ???); >fst_pair >snd_pair elim a
+  [normalize //
+  |#n #Hind >prim_rec_S >fst_pair >snd_pair >fst_pair >snd_pair
+   >prim_rec_S @transitive_le [| @(monotonic_le_plus_l … Hind)]
+   @transitive_le [| @(monotonic_le_plus_l … (Hincr n ? b))] 
+   whd in match (unary_pr ???); >fst_pair >snd_pair //
+  ]
+qed.
+
+(**************************** primitive operations*****************************)
+
+definition id ≝ λx:nat.x.
+
+axiom CF_id: CF MSC id.
+axiom CF_const: ∀k.CF MSC (λx.k).
+axiom CF_comp_fst: ∀h,f. CF h f → CF h (fst ∘ f).
+axiom CF_comp_snd: ∀h,f. CF h f → CF h (snd ∘ f). 
+axiom CF_comp_pair: ∀h,f,g. CF h f → CF h g → CF h (λx. 〈f x,g x〉). 
+
+lemma CF_fst: CF MSC fst.
+@(ext_CF (fst ∘ id)) [#n //] @(CF_comp_fst … CF_id)
+qed.
+
+lemma CF_snd: CF MSC snd.
+@(ext_CF (snd ∘ id)) [#n //] @(CF_comp_snd … CF_id)
+qed. 
+
+(**************************** arithmetic operations ***************************)
+
+axiom CF_compS: ∀h,f. CF h f → CF h (S ∘ f).
+axiom CF_le: ∀h,f,g. CF h f → CF h g → CF h (λx. leb (f x) (g x)). 
+axiom CF_eqb: ∀h,f,g. CF h f → CF h g → CF h (λx.eqb (f x) (g x)).
+axiom CF_max1: ∀h,f,g. CF h f → CF h g → CF h (λx. max (f x) (g x)). 
+axiom CF_plus: ∀h,f,g. CF h f → CF h g → CF h (λx. f x + g x). 
+axiom CF_minus: ∀h,f,g. CF h f → CF h g → CF h (λx. f x - g x). 
+
+(******************************** if then else ********************************)
+
+lemma if_prim_rec: ∀b:nat → bool. ∀f,g:nat → nat.∀x:nat.
+  if b x then f x else g x = prim_rec g (f ∘ snd ∘ snd) (b x) x.
+#b #f #g #x cases (b x) normalize // 
+qed.
+  
+lemma CF_if: ∀b:nat → bool. ∀f,g,s. CF s b → CF s f → CF s g → 
+  CF s (λx. if b x then f x else g x).
+#b #f #g #s #CFb #CFf #CFg @(ext_CF (λx.unary_pr g (f ∘ snd ∘ snd) 〈b x,x〉))
+  [#n @sym_eq normalize >fst_pair >snd_pair @if_prim_rec
+  |@(CF_comp ??? s)
+    [|@CF_comp_pair // @(O_to_CF … CF_id) @le_to_O @MSC_in // 
+    |@(CF_prim_rec_gen ??? (λx.MSC x + s(snd (snd x))) … CFg) [3:@O_refl|] 
+     @(CF_comp … (λx.MSC x + s(snd x)) … CF_snd)
+      [@(CF_comp … s … CF_snd CFf) @O_refl 
+      |@O_plus 
+        [@O_plus_l @O_refl
+        |@O_plus 
+          [@O_plus_l @le_to_O #x @monotonic_MSC //
+          |@O_plus_r @O_refl
+          ]
+        ]
+      ]
+    |%{6} %{0} #n #_ normalize in ⊢ (??%); <plus_n_O cases (b n) normalize 
+      >snd_pair >fst_pair normalize 
+      [@le_plus [//] >fst_pair >fst_pair >snd_pair >fst_pair 
+       @le_plus [//] >snd_pair >snd_pair >snd_pair >snd_pair 
+       <associative_plus <associative_plus @le_plus [|//] 
+       @(transitive_le … (MSC_pair …)) >associative_plus @le_plus
+        [@(transitive_le ???? (MSC_in … CFf n)) @monotonic_MSC //
+        |@(transitive_le … (MSC_pair …)) @le_plus [|@(MSC_in … CFf)]
+         normalize @MSC_out @CFg
+        ]
+      |@le_plus // 
+      ]
+    ]
+  ]
+qed.
+
+(********************************* simulation *********************************)
+
+definition pU_unary ≝ λp. pU (fst p) (fst (snd p)) (snd (snd p)).
+
+axiom sU : nat → nat.
+axiom CF_U : CF sU pU_unary. 
+
+axiom monotonic_sU: ∀i1,i2,x1,x2,s1,s2. i1 ≤ i2 → x1 ≤ x2 → s1 ≤ s2 →
+  sU 〈i1,〈x1,s1〉〉 ≤ sU 〈i2,〈x2,s2〉〉.
+
+lemma monotonic_sU_aux : ∀x1,x2. fst x1 ≤ fst x2 → fst (snd x1) ≤ fst (snd x2) →
+snd (snd x1) ≤ snd (snd x2) → sU x1 ≤ sU x2.
+#x1 #x2 cases (surj_pair x1) #a1 * #y #eqx1 >eqx1 -eqx1 cases (surj_pair y) 
+#b1 * #c1 #eqy >eqy -eqy
+cases (surj_pair x2) #a2 * #y2 #eqx2 >eqx2 -eqx2 cases (surj_pair y2) 
+#b2 * #c2 #eqy2 >eqy2 -eqy2 >fst_pair >snd_pair >fst_pair >snd_pair 
+>fst_pair >snd_pair >fst_pair >snd_pair @monotonic_sU
+qed.
+   
+axiom sU_pos: ∀x. 0 < sU x.
+
+axiom sU_le: ∀i,x,s. s ≤ sU 〈i,〈x,s〉〉.
+
+lemma sU_le_i: ∀i,x,s. MSC i ≤ sU 〈i,〈x,s〉〉.
+#i #x #s @(transitive_le ???? (MSC_in … CF_U 〈i,〈x,s〉〉)) @monotonic_MSC //
+qed.
+
+lemma sU_le_x: ∀i,x,s. MSC x ≤ sU 〈i,〈x,s〉〉.
+#i #x #s @(transitive_le ???? (MSC_in … CF_U 〈i,〈x,s〉〉)) @monotonic_MSC 
+@(transitive_le … 〈x,s〉) //
+qed.
+
+
+
+
+definition termb_unary ≝ λx:ℕ.termb (fst x) (fst (snd x)) (snd (snd x)).
+definition out_unary ≝ λx:ℕ.out (fst x) (fst (snd x)) (snd (snd x)).
+
+lemma CF_termb: CF sU termb_unary. 
+@(ext_CF (fst ∘ pU_unary)) [2: @CF_comp_fst @CF_U]
+#n whd in ⊢ (??%?); whd in  ⊢ (??(?%)?); >fst_pair % 
+qed.
+
+lemma CF_out: CF sU out_unary. 
+@(ext_CF (snd ∘ pU_unary)) [2: @CF_comp_snd @CF_U]
+#n whd in ⊢ (??%?); whd in  ⊢ (??(?%)?); >snd_pair % 
+qed.
+
index a621b55a52a936946b137ec6fb5b45b225dd2267..d833a5164e2949d119e1ffeb2d4b471b4fbaf6f6 100644 (file)
@@ -1,10 +1,9 @@
 
 include "arithmetics/nat.ma".
-include "arithmetics/log.ma".
-(* include "arithmetics/ord.ma". *)
+include "arithmetics/log.ma". 
 include "arithmetics/bigops.ma".
 include "arithmetics/bounded_quantifiers.ma".
-include "arithmetics/pidgeon_hole.ma".
+include "arithmetics/pidgeon_hole.ma". 
 include "basics/sets.ma".
 include "basics/types.ma".
 
@@ -46,6 +45,8 @@ lemma Max0r : ∀n. max n 0 = n.
 #n >commutative_max //
 qed.
 
+alias id "max" = "cic:/matita/arithmetics/nat/max#def:2".
+alias id "mk_Aop" = "cic:/matita/arithmetics/bigops/Aop#con:0:1:2".
 definition MaxA ≝ 
   mk_Aop nat 0 max Max0 Max0r (λa,b,c.sym_eq … (Max_assoc a b c)). 
 
@@ -116,21 +117,12 @@ lemma O_absorbr: ∀f,g,s. O s f → O f g → O s (f+g).
 #f #g #s #Osf #Ofg @(O_plus … Osf) @(O_trans … Osf) //
 qed.
 
-(* 
-lemma O_ff: ∀f,s. O s f → O s (f+f).
-#f #s #Osf /2/ 
-qed. *)
-
 lemma O_ext2: ∀f,g,s. O s f → (∀x.f x = g x) → O s g.
 #f #g #s * #c * #a #Osf #eqfg %{c} %{a} #n #lean <eqfg @Osf //
 qed.    
 
-
 definition not_O ≝ λf,g.∀c,n0.∃n. n0 ≤ n ∧ c* (f n) < g n .
 
-(* this is the only classical result *)
-axiom not_O_def: ∀f,g. ¬ O f g → not_O f g.
-
 (******************************* small O notation *****************************)
 
 (*  o f g means g ∈ o(f) *)
@@ -162,56 +154,10 @@ interpretation "abstract pair" 'pair f g = (pair f g).
 
 (************************ basic complexity notions ****************************)
 
-(* u is the deterministic configuration relation of the universal machine (one 
-   step) 
-
-axiom u: nat → option nat.
-
-let rec U c n on n ≝ 
-  match n with  
-  [ O ⇒ None ?
-  | S m ⇒ match u c with 
-    [ None ⇒ Some ? c (* halting case *)
-    | Some c1 ⇒ U c1 m
-    ]
-  ].
-lemma halt_U: ∀i,n,y. u i = None ? → U i n = Some ? y → y = i.
-#i #n #y #H cases n
-  [normalize #H1 destruct |#m normalize >H normalize #H1 destruct //]
-qed. 
-
-lemma Some_to_halt: ∀n,i,y. U i n = Some ? y → u y = None ? .
-#n elim n
-  [#i #y normalize #H destruct (H)
-  |#m #Hind #i #y normalize 
-   cut (u i = None ? ∨ ∃c. u i = Some ? c) 
-    [cases (u i) [/2/ | #c %2 /2/ ]] 
-   *[#H >H normalize #H1 destruct (H1) // |* #c #H >H normalize @Hind ]
-  ]
-qed. *)
-
 axiom U: nat → nat → nat → option nat. 
-(*
-lemma monotonici_U: ∀y,n,m,i.
-  U i m = Some ? y → U i (n+m) = Some ? y.
-#y #n #m elim m 
-  [#i normalize #H destruct 
-  |#p #Hind #i <plus_n_Sm normalize
-    cut (u i = None ? ∨ ∃c. u i = Some ? c) 
-    [cases (u i) [/2/ | #c %2 /2/ ]] 
-   *[#H1 >H1 normalize // |* #c #H >H normalize #H1 @Hind //]
-  ]
-qed. *)
 
 axiom monotonic_U: ∀i,x,n,m,y.n ≤m →
   U i x n = Some ? y → U i x m = Some ? y.
-(* #i #n #m #y #lenm #H >(plus_minus_m_m m n) // @monotonici_U //
-qed. *)
-
-(* axiom U: nat → nat → option nat. *)
-(* axiom monotonic_U: ∀i,n,m,y.n ≤m →
-   U i n = Some ? y → U i m = Some ? y. *)
   
 lemma unique_U: ∀i,x,n,m,yn,ym.
   U i x n = Some ? yn → U i x m = Some ? ym → yn = ym.
@@ -226,7 +172,7 @@ definition code_for ≝ λf,i.∀x.
   ∃n.∀m. n ≤ m → U i x m = f x.
 
 definition terminate ≝ λi,x,r. ∃y. U i x r = Some ? y.
-notation "[i,x] ↓ r" with precedence 60 for @{terminate $i $x $r}.
+notation "{i ⊙ x} ↓ r" with precedence 60 for @{terminate $i $x $r}. 
 
 definition lang ≝ λi,x.∃r,y. U i x r = Some ? y ∧ 0  < y. 
 
@@ -260,11 +206,6 @@ lemma size_f_def: ∀f,n. size_f f n =
   Max_{i < S (of_size n) | eqb (|i|) n}|(f i)|.
 // qed.
 
-(*
-definition Max_const : ∀f,p,n,a. a < n → p a →
-  ∀n. f n = g n →
-  Max_{i < n | p n}(f n) = *)
-
 lemma size_f_size : ∀f,n. size_f (f ∘ size) n = |(f n)|.
 #f #n @le_to_le_to_eq
   [@Max_le #a #lta #Ha normalize >(eqb_true_to_eq  … Ha) //
@@ -287,12 +228,9 @@ lemma size_f_fst : ∀n. size_f fst n ≤ n.
 #n @Max_le #a #lta #Ha <(eqb_true_to_eq  … Ha) //
 qed.
 
-(* definition def ≝ λf:nat → option nat.λx.∃y. f x = Some ? y.*)
-
 (* C s i means that the complexity of i is O(s) *)
 
-definition C ≝ λs,i.∃c.∃a.∀x.a ≤ |x| → ∃y. 
-  U i x (c*(s(|x|))) = Some ? y.
+definition C ≝ λs,i.∃c.∃a.∀x.a ≤ |x| → {i ⊙ x} ↓ (c*(s(|x|))).
 
 definition CF ≝ λs,f.∃i.code_for f i ∧ C s i.
 
@@ -308,6 +246,18 @@ cases HCs1 #c2 * #b #H2 %{(c2*c1)} %{(max a b)}
 %{y} @(monotonic_U …Hy) >associative_times @le_times // @H @(le_maxl … Hmax)
 qed. 
 
+(*********************** The hierachy theorem (left) **************************)
+
+theorem hierarchy_theorem_left: ∀s1,s2:nat→nat.
+   O(s1) ⊆ O(s2) → CF s1 ⊆ CF s2.
+#s1 #s2 #HO #f * #i * #Hcode * #c * #a #Hs1_i %{i} % //
+cases (sub_O_to_O … HO) -HO #c1 * #b #Hs1s2 
+%{(c*c1)} %{(max a b)} #x #lemax 
+cases (Hs1_i x ?) [2: @(le_maxl …lemax)]
+#y #Hy %{y} @(monotonic_U … Hy) >associative_times
+@le_times // @Hs1s2 @(le_maxr … lemax)
+qed.
+
 (************************** The diagonal language *****************************)
 
 (* the diagonal language used for the hierarchy theorem *)
@@ -316,7 +266,7 @@ definition diag ≝ λs,i.
   U (fst i) i (s (|i|)) = Some ? 0. 
 
 lemma equiv_diag: ∀s,i. 
-  diag s i ↔ [fst i,i] ↓ s (|i|) ∧ ¬lang (fst i) i.
+  diag s i ↔ {fst i ⊙ i} ↓ s(|i|) ∧ ¬lang (fst i) i.
 #s #i %
   [whd in ⊢ (%→?); #H % [%{0} //] % * #x * #y *
    #H1 #Hy cut (0 = y) [@(unique_U … H H1)] #eqy /2/
@@ -358,7 +308,39 @@ lemma absurd1: ∀P. iff P (¬ P) →False.
 #H3 @(absurd ?? H3) @H2 @H3 
 qed.
 
-(* axiom weak_pad : ∀a,∃a0.∀n. a0 < n → ∃b. |〈a,b〉| = n. *)
+let rec f_img (f:nat →nat) n on n ≝
+  match n with
+  [O ⇒ [ ]
+  |S m ⇒ f m::f_img f m
+  ].
+
+(* a few lemma to prove injective_to_exists. This is a general result; a nice
+example of the pidgeon hole pricniple *)
+
+lemma f_img_to_exists: 
+  ∀f.∀n,a. a ∈ f_img f n → ∃b. b < n ∧ f b = a.
+#f #n #a elim n normalize [@False_ind]
+#m #Hind *
+  [#Ha %{m} /2/ |#H cases(Hind H) #b * #Hb #Ha %{b} % // @le_S //]
+qed. 
+
+lemma length_f_img: ∀f,n. |f_img f n| = n.
+#f #n elim n // normalize //
+qed. 
+
+lemma unique_f_img: ∀f,n. injective … f → unique ? (f_img f n).
+#f #n #Hinj elim n normalize //
+#m #Hind % // % #H lapply(f_img_to_exists …H) * #b * #ltbm
+#eqbm @(absurd … ltbm) @le_to_not_lt >(Hinj… eqbm) //
+qed.
+
+lemma injective_to_exists: ∀f. injective nat nat f → 
+  ∀n.(∀i.i < n → f i < n) → ∀a. a < n → ∃b. b<n ∧ f b = a.
+#f #finj #n #H1 #a #ltan @(f_img_to_exists f n a)
+@(eq_length_to_mem_all …  (length_f_img …) (unique_f_img …finj …) …ltan)
+#x #Hx cases(f_img_to_exists … Hx) #b * #ltbn #eqx <eqx @H1 //
+qed.
+
 lemma weak_pad1 :∀n,a.∃b. n ≤ 〈a,b〉. 
 #n #a 
 cut (∀i.decidable (〈a,i〉 < n))
@@ -372,7 +354,7 @@ cut (∀i.decidable (〈a,i〉 < n))
   |#H lapply(not_forall_to_exists … Hdec H) 
    * #b * #H1 #H2 %{b} @not_lt_to_le @H2
   ]
-qed. 
+qed.
 
 lemma pad : ∀n,a. ∃b. n ≤ |〈a,b〉|.
 #n #a cases (weak_pad1 (of_size n) a) #b #Hb 
@@ -380,7 +362,7 @@ lemma pad : ∀n,a. ∃b. n ≤ |〈a,b〉|.
 qed.
 
 lemma o_to_ex: ∀s1,s2. o s1 s2 → ∀i. C s2 i →
-  ∃b.[i, 〈i,b〉] ↓ s1 (|〈i,b〉|).
+  ∃b.{i ⊙ 〈i,b〉} ↓ s1 (|〈i,b〉|).
 #s1 #s2  #H #i * #c * #x0 #H1 
 cases (H c) #n0 #H2 cases (pad (max x0 n0) i) #b #Hmax
 %{b} cases (H1 〈i,b〉 ?)
@@ -413,14 +395,9 @@ definition opt_comp ≝ λf,g:nat → option nat. λx.
   [ None ⇒ None ?
   | Some y ⇒ f y ].   
 
-(* axiom CFU: ∀h,g,s. CF s (to_Some h)  → CF s (to_Some (of_size ∘ g)) → 
-  CF (Slow s) (λx.U (h x) (g x)). *)
-  
 axiom sU2: nat → nat → nat.
 axiom sU: nat → nat → nat → nat.
 
-(* axiom CFU: CF sU (λx.U (fst x) (snd x)). *)
-
 axiom CFU_new: ∀h,g,f,s. 
   CF s (to_Some h)  → CF s (to_Some g) → CF s (to_Some f) → 
   O s (λx. sU (size_f h x) (size_f g x) (size_f f x)) → 
@@ -443,18 +420,9 @@ axiom monotonic_sU: ∀a1,a2,b1,b2,c1,c2. a1 ≤ a2 → b1 ≤ b2 → c1 ≤c2 
 
 axiom superlinear_sU: ∀i,x,r. r ≤ sU i x r.
 
+(* not used *)
 definition sU_space ≝ λi,x,r.i+x+r.
-definition sU_time ≝ λi,x,r.i+x+(i^2)*r*(log 2 r).
-
-(*
-axiom CF_comp: ∀f,g,s1, s2. CF s1 f → CF s2 g → 
-  CF (λx.s2 x + s1 (size (deopt (g x)))) (opt_comp f g).
-
-(* axiom CF_comp: ∀f,g,s1, s2. CF s1 f → CF s2 g → 
-  CF (s1 ∘ (λx. size (deopt (g x)))) (opt_comp f g). *)
-  
-axiom CF_comp_strong: ∀f,g,s1,s2. CF s1 f → CF s2 g → 
-  CF (s1 ∘ s2) (opt_comp f g). *)
+definition sU_time ≝ λi,x,r.i+x+(i^2)*r*(log 2 r). 
 
 definition IF ≝ λb,f,g:nat →option nat. λx.
   match b x with 
@@ -483,16 +451,11 @@ axiom CF_pair: ∀f,g,s. CF s (λx.Some ? (f x)) → CF s (λx.Some ? (g x)) →
 
 axiom CF_fst: ∀f,s. CF s (λx.Some ? (f x)) → CF s (λx.Some ? (fst (f x))).
 
-definition minimal ≝ λs. CF s (λn. Some ? n) ∧ ∀c. CF s (λn. Some ? c).
-
-
-(*
-axiom le_snd: ∀n. |snd n| ≤ |n|.
-axiom daemon: ∀P:Prop.P. *)
+definition sufficiently_large ≝ λs. CF s (λn. Some ? n) ∧ ∀c. CF s (λn. Some ? c).
 
 definition constructible ≝ λs. CF s (λx.Some ? (of_size (s (|x|)))).
 
-lemma diag_s: ∀s. minimal s → constructible s → 
+lemma diag_s: ∀s. sufficiently_large s → constructible s → 
   CF (λx.sU x x (s x)) (diag_cf s).
 #s * #Hs_id #Hs_c #Hs_constr 
 cut (O (λx:ℕ.sU x x (s x)) s) [%{1} %{0} #n //]
@@ -505,61 +468,4 @@ cut (O (λx:ℕ.sU x x (s x)) s) [%{1} %{0} #n //]
   |%{1} %{0} #n #_ >commutative_times <times_n_1
    @monotonic_sU // >size_f_size >size_of_size //
   ]
-qed. 
-
-(*
-lemma diag_s: ∀s. minimal s → constructible s → 
-  CF (λx.s x + sU x x (s x)) (diag_cf s).
-#s * #Hs_id #Hs_c #Hs_constr 
-@ext_CF [2: #n @sym_eq @diag_cf_def | skip]
-@IF_CF_new [2,3:@(monotonic_CF … (Hs_c ?)) @O_plus_l //]
-@CFU_new
-  [@CF_fst @(monotonic_CF … Hs_id) @O_plus_l //
-  |@(monotonic_CF … Hs_id) @O_plus_l //
-  |@(monotonic_CF … Hs_constr) @O_plus_l //
-  |@O_plus_r %{1} %{0} #n #_ >commutative_times <times_n_1
-   @monotonic_sU // >size_f_size >size_of_size //
-  ]
-qed. *)
-
-(* proof with old axioms
-lemma diag_s: ∀s. minimal s → constructible s → 
-  CF (λx.s x + sU x x (s x)) (diag_cf s).
-#s * #Hs_id #Hs_c #Hs_constr 
-@ext_CF [2: #n @sym_eq @diag_cf_def | skip]
-@(monotonic_CF ???? (IF_CF (λi:ℕ.U (pair (fst i) i) (|of_size (s (|i|))|))
-   … (λi.s i + s i + s i + (sU (size_f fst i) (size_f (λi.i) i) (size_f (λi.of_size (s (|i|))) i))) … (Hs_c 1) (Hs_c 0) … ))
-  [2: @CFU [@CF_fst // | // |@Hs_constr]
-  |@(O_ext2 (λn:ℕ.s n+sU (size_f fst n) n (s n) + (s n+s n+s n+s n))) 
-    [2: #i >size_f_size >size_of_size >size_f_id //] 
-   @O_absorbr 
-    [%{1} %{0} #n #_ >commutative_times <times_n_1 @le_plus //
-     @monotonic_sU // 
-    |@O_plus_l @(O_plus … (O_refl s)) @(O_plus … (O_refl s)) 
-     @(O_plus … (O_refl s)) //
-  ]
-qed.
-*)
-
-(*************************** The hierachy theorem *****************************)
-
-(*
-theorem hierarchy_theorem_right: ∀s1,s2:nat→nat. 
-  O s1 idN → constructible s1 →
-    not_O s2 s1 → ¬ CF s1 ⊆ CF s2.
-#s1 #s2 #Hs1 #monos1 #H % #H1 
-@(absurd … (CF s2 (diag_cf s1)))
-  [@H1 @diag_s // |@(diag1_not_s1 … H)]
-qed.
-*)
-
-theorem hierarchy_theorem_left: ∀s1,s2:nat→nat.
-   O(s1) ⊆ O(s2) → CF s1 ⊆ CF s2.
-#s1 #s2 #HO #f * #i * #Hcode * #c * #a #Hs1_i %{i} % //
-cases (sub_O_to_O … HO) -HO #c1 * #b #Hs1s2 
-%{(c*c1)} %{(max a b)} #x #lemax 
-cases (Hs1_i x ?) [2: @(le_maxl …lemax)]
-#y #Hy %{y} @(monotonic_U … Hy) >associative_times
-@le_times // @Hs1s2 @(le_maxr … lemax)
-qed.
-
+qed.
\ No newline at end of file
diff --git a/matita/matita/lib/reverse_complexity/sigma_diseq.ma b/matita/matita/lib/reverse_complexity/sigma_diseq.ma
new file mode 100644 (file)
index 0000000..4356cd2
--- /dev/null
@@ -0,0 +1,153 @@
+include "arithmetics/sigma_pi.ma".
+
+(************************* notation for minimization **************************)
+notation "μ_{ ident i < n } p" 
+  with precedence 80 for @{min $n 0 (λ${ident i}.$p)}.
+
+notation "μ_{ ident i ≤ n } p" 
+  with precedence 80 for @{min (S $n) 0 (λ${ident i}.$p)}.
+  
+notation "μ_{ ident i ∈ [a,b[ } p"
+  with precedence 80 for @{min ($b-$a) $a (λ${ident i}.$p)}.
+  
+notation "μ_{ ident i ∈ [a,b] } p"
+  with precedence 80 for @{min (S $b-$a) $a (λ${ident i}.$p)}.
+  
+(************************************ MAX *************************************)
+notation "Max_{ ident i < n | p } f"
+  with precedence 80
+for @{'bigop $n max 0 (λ${ident i}. $p) (λ${ident i}. $f)}.
+
+notation "Max_{ ident i < n } f"
+  with precedence 80
+for @{'bigop $n max 0 (λ${ident i}.true) (λ${ident i}. $f)}.
+
+notation "Max_{ ident j ∈ [a,b[ } f"
+  with precedence 80
+for @{'bigop ($b-$a) max 0 (λ${ident j}.((λ${ident j}.true) (${ident j}+$a)))
+  (λ${ident j}.((λ${ident j}.$f)(${ident j}+$a)))}.
+  
+notation "Max_{ ident j ∈ [a,b[ | p } f"
+  with precedence 80
+for @{'bigop ($b-$a) max 0 (λ${ident j}.((λ${ident j}.$p) (${ident j}+$a)))
+  (λ${ident j}.((λ${ident j}.$f)(${ident j}+$a)))}.
+
+lemma Max_assoc: ∀a,b,c. max (max a b) c = max a (max b c).
+#a #b #c normalize cases (true_or_false (leb a b)) #leab >leab normalize
+  [cases (true_or_false (leb b c )) #lebc >lebc normalize
+    [>(le_to_leb_true a c) // @(transitive_le ? b) @leb_true_to_le //
+    |>leab //
+    ]
+  |cases (true_or_false (leb b c )) #lebc >lebc normalize //
+   >leab normalize >(not_le_to_leb_false a c) // @lt_to_not_le 
+   @(transitive_lt ? b) @not_le_to_lt @leb_false_to_not_le //
+  ]
+qed.
+
+lemma Max0 : ∀n. max 0 n = n.
+// qed.
+
+lemma Max0r : ∀n. max n 0 = n.
+#n >commutative_max //
+qed.
+
+definition MaxA ≝ 
+  mk_Aop nat 0 max Max0 Max0r (λa,b,c.sym_eq … (Max_assoc a b c)). 
+
+definition MaxAC ≝ mk_ACop nat 0 MaxA commutative_max.
+
+lemma le_Max: ∀f,p,n,a. a < n → p a = true →
+  f a ≤  Max_{i < n | p i}(f i).
+#f #p #n #a #ltan #pa 
+>(bigop_diff p ? 0 MaxAC f a n) // @(le_maxl … (le_n ?))
+qed.
+
+lemma le_MaxI: ∀f,p,n,m,a. m ≤ a → a < n → p a = true →
+  f a ≤  Max_{i ∈ [m,n[ | p i}(f i).
+#f #p #n #m #a #lema #ltan #pa 
+>(bigop_diff ? ? 0 MaxAC (λi.f (i+m)) (a-m) (n-m)) 
+  [<plus_minus_m_m // @(le_maxl … (le_n ?))
+  |<plus_minus_m_m //
+  |/2 by monotonic_lt_minus_l/
+  ]
+qed.
+
+lemma Max_le: ∀f,p,n,b. 
+  (∀a.a < n → p a = true → f a ≤ b) → Max_{i < n | p i}(f i) ≤ b.
+#f #p #n elim n #b #H // 
+#b0 #H1 cases (true_or_false (p b)) #Hb
+  [>bigop_Strue [2:@Hb] @to_max [@H1 // | @H #a #ltab #pa @H1 // @le_S //]
+  |>bigop_Sfalse [2:@Hb] @H #a #ltab #pa @H1 // @le_S //
+  ]
+qed.
+
+
+(************************* a couple of technical lemmas ***********************)
+lemma minus_to_0: ∀a,b. a ≤ b → minus a b = 0.
+#a elim a // #n #Hind * 
+  [#H @False_ind /2 by absurd/ | #b normalize #H @Hind @le_S_S_to_le /2/]
+qed.
+
+lemma sigma_const: ∀c,a,b. 
+  ∑_{i ∈ [a,b[ }c ≤  (b-a)*c.
+#c #a #b elim (b-a) // #n #Hind normalize @le_plus // 
+qed.
+
+lemma sigma_to_Max:  ∀h,a,b. 
+  ∑_{i ∈ [a,b[ }(h i) ≤  (b-a)*Max_{i ∈ [a,b[ }(h i).
+#h #a #b elim (b-a)
+  [//
+  |#n #Hind >bigop_Strue [2://] whd in ⊢ (??%);
+   @le_plus 
+    [>bigop_Strue // @(le_maxl … (le_n …)) 
+    |@(transitive_le … Hind) @le_times // >bigop_Strue //
+     @(le_maxr … (le_n …))
+    ]
+  ]
+qed.
+
+lemma sigma_bound1:  ∀h,a,b. monotonic nat le h → 
+  ∑_{i ∈ [a,b[ }(h i) ≤  (b-a)*h b.
+#h #a #b #H 
+@(transitive_le … (sigma_to_Max …)) @le_times //
+@Max_le #i #lti #_ @H @lt_to_le @lt_minus_to_plus_r //
+qed.
+
+lemma sigma_bound_decr1:  ∀h,a,b. (∀a1,a2. a1 ≤ a2 → a2 < b → h a2 ≤ h a1) → 
+  ∑_{i ∈ [a,b[ }(h i) ≤  (b-a)*h a.
+#h #a #b #H 
+@(transitive_le … (sigma_to_Max …)) @le_times //
+@Max_le #i #lti #_ @H // @lt_minus_to_plus_r //
+qed. 
+  
+lemma sigma_bound:  ∀h,a,b. monotonic nat le h → 
+  ∑_{i ∈ [a,S b[ }(h i) ≤  (S b-a)*h b.
+#h #a #b #H cases (decidable_le a b) 
+  [#leab cut (b = pred (S b - a + a)) 
+    [<plus_minus_m_m // @le_S //] #Hb >Hb in match (h b);
+   generalize in match (S b -a);
+   #n elim n 
+    [//
+    |#m #Hind >bigop_Strue [2://] @le_plus 
+      [@H @le_n |@(transitive_le … Hind) @le_times [//] @H //]
+    ]
+  |#ltba lapply (not_le_to_lt … ltba) -ltba #ltba
+   cut (S b -a = 0) [@minus_to_0 //] #Hcut >Hcut //
+  ]
+qed.
+
+lemma sigma_bound_decr:  ∀h,a,b. (∀a1,a2. a1 ≤ a2 → a2 < b → h a2 ≤ h a1) → 
+  ∑_{i ∈ [a,b[ }(h i) ≤  (b-a)*h a.
+#h #a #b #H cases (decidable_le a b) 
+  [#leab cut ((b -a) +a ≤ b) [/2 by le_minus_to_plus_r/] generalize in match (b -a);
+   #n elim n 
+    [//
+    |#m #Hind >bigop_Strue [2://] #Hm 
+     cut (m+a ≤ b) [@(transitive_le … Hm) //] #Hm1
+     @le_plus [@H // |@(transitive_le … (Hind Hm1)) //]
+    ]
+  |#ltba lapply (not_le_to_lt … ltba) -ltba #ltba
+   cut (b -a = 0) [@minus_to_0 @lt_to_le @ltba] #Hcut >Hcut //
+  ]
+qed. 
+  
\ No newline at end of file
index 9b9fecf949282e3f167c00e6ec640871f95d0904..bfd3d34b150a1e6cdc0a7dce299d1989def3239b 100644 (file)
@@ -4,6 +4,7 @@ include "arithmetics/bigops.ma".
 include "arithmetics/sigma_pi.ma".
 include "arithmetics/bounded_quantifiers.ma".
 include "reverse_complexity/big_O.ma".
+include "basics/core_notation/napart_2.ma".
 
 (************************* notation for minimization *****************************)
 notation "μ_{ ident i < n } p" 
@@ -1064,4 +1065,4 @@ lapply (speed_compl_i … Hr Hmono Hconstr (S i)) #Hg
   @Hmono @(mono_h_of2 … Hr Hmono … ltin)
  ]
 qed.
-  
\ No newline at end of file
+  
index 6a0ec4a57a82f23fc26dd4bbb8c90f1927e99b05..9812cfb08673852fa2f7736c6ead07857a9d95dc 100644 (file)
@@ -4,6 +4,7 @@ include "arithmetics/bigops.ma".
 include "arithmetics/sigma_pi.ma".
 include "arithmetics/bounded_quantifiers.ma".
 include "reverse_complexity/big_O.ma".
+include "basics/core_notation/napart_2.ma".
 
 (************************* notation for minimization *****************************)
 notation "μ_{ ident i < n } p" 
@@ -918,4 +919,4 @@ lapply (speed_compl_i … Hr Hmono Hconstr (S i)) #Hg
   @Hmono @(mono_h_of2 … Hr Hmono … ltin)
  ]
 qed.
-  
\ No newline at end of file
+  
index 6a0ec4a57a82f23fc26dd4bbb8c90f1927e99b05..9812cfb08673852fa2f7736c6ead07857a9d95dc 100644 (file)
@@ -4,6 +4,7 @@ include "arithmetics/bigops.ma".
 include "arithmetics/sigma_pi.ma".
 include "arithmetics/bounded_quantifiers.ma".
 include "reverse_complexity/big_O.ma".
+include "basics/core_notation/napart_2.ma".
 
 (************************* notation for minimization *****************************)
 notation "μ_{ ident i < n } p" 
@@ -918,4 +919,4 @@ lapply (speed_compl_i … Hr Hmono Hconstr (S i)) #Hg
   @Hmono @(mono_h_of2 … Hr Hmono … ltin)
  ]
 qed.
-  
\ No newline at end of file
+  
diff --git a/matita/matita/lib/reverse_complexity/speedup.ma b/matita/matita/lib/reverse_complexity/speedup.ma
new file mode 100644 (file)
index 0000000..12605c9
--- /dev/null
@@ -0,0 +1,760 @@
+(*
+<<<<<<< HEAD:matita/matita/broken_lib/reverse_complexity/toolkit.ma
+include "basics/types.ma".
+include "arithmetics/minimization.ma".
+include "arithmetics/bigops.ma".
+include "arithmetics/sigma_pi.ma".
+include "arithmetics/bounded_quantifiers.ma".
+include "reverse_complexity/big_O.ma".
+include "basics/core_notation/napart_2.ma".
+
+(************************* notation for minimization *****************************)
+notation "μ_{ ident i < n } p" 
+  with precedence 80 for @{min $n 0 (λ${ident i}.$p)}.
+
+notation "μ_{ ident i ≤ n } p" 
+  with precedence 80 for @{min (S $n) 0 (λ${ident i}.$p)}.
+  
+notation "μ_{ ident i ∈ [a,b[ } p"
+  with precedence 80 for @{min ($b-$a) $a (λ${ident i}.$p)}.
+  
+notation "μ_{ ident i ∈ [a,b] } p"
+  with precedence 80 for @{min (S $b-$a) $a (λ${ident i}.$p)}.
+  
+(************************************ MAX *************************************)
+notation "Max_{ ident i < n | p } f"
+  with precedence 80
+for @{'bigop $n max 0 (λ${ident i}. $p) (λ${ident i}. $f)}.
+
+notation "Max_{ ident i < n } f"
+  with precedence 80
+for @{'bigop $n max 0 (λ${ident i}.true) (λ${ident i}. $f)}.
+
+notation "Max_{ ident j ∈ [a,b[ } f"
+  with precedence 80
+for @{'bigop ($b-$a) max 0 (λ${ident j}.((λ${ident j}.true) (${ident j}+$a)))
+  (λ${ident j}.((λ${ident j}.$f)(${ident j}+$a)))}.
+  
+notation "Max_{ ident j ∈ [a,b[ | p } f"
+  with precedence 80
+for @{'bigop ($b-$a) max 0 (λ${ident j}.((λ${ident j}.$p) (${ident j}+$a)))
+  (λ${ident j}.((λ${ident j}.$f)(${ident j}+$a)))}.
+
+lemma Max_assoc: ∀a,b,c. max (max a b) c = max a (max b c).
+#a #b #c normalize cases (true_or_false (leb a b)) #leab >leab normalize
+  [cases (true_or_false (leb b c )) #lebc >lebc normalize
+    [>(le_to_leb_true a c) // @(transitive_le ? b) @leb_true_to_le //
+    |>leab //
+    ]
+  |cases (true_or_false (leb b c )) #lebc >lebc normalize //
+   >leab normalize >(not_le_to_leb_false a c) // @lt_to_not_le 
+   @(transitive_lt ? b) @not_le_to_lt @leb_false_to_not_le //
+  ]
+qed.
+
+lemma Max0 : ∀n. max 0 n = n.
+// qed.
+
+lemma Max0r : ∀n. max n 0 = n.
+#n >commutative_max //
+qed.
+
+definition MaxA ≝ 
+  mk_Aop nat 0 max Max0 Max0r (λa,b,c.sym_eq … (Max_assoc a b c)). 
+
+definition MaxAC ≝ mk_ACop nat 0 MaxA commutative_max.
+
+lemma le_Max: ∀f,p,n,a. a < n → p a = true →
+  f a ≤  Max_{i < n | p i}(f i).
+#f #p #n #a #ltan #pa 
+>(bigop_diff p ? 0 MaxAC f a n) // @(le_maxl … (le_n ?))
+qed.
+
+lemma le_MaxI: ∀f,p,n,m,a. m ≤ a → a < n → p a = true →
+  f a ≤  Max_{i ∈ [m,n[ | p i}(f i).
+#f #p #n #m #a #lema #ltan #pa 
+>(bigop_diff ? ? 0 MaxAC (λi.f (i+m)) (a-m) (n-m)) 
+  [<plus_minus_m_m // @(le_maxl … (le_n ?))
+  |<plus_minus_m_m //
+  |/2 by monotonic_lt_minus_l/
+  ]
+qed.
+
+lemma Max_le: ∀f,p,n,b. 
+  (∀a.a < n → p a = true → f a ≤ b) → Max_{i < n | p i}(f i) ≤ b.
+#f #p #n elim n #b #H // 
+#b0 #H1 cases (true_or_false (p b)) #Hb
+  [>bigop_Strue [2:@Hb] @to_max [@H1 // | @H #a #ltab #pa @H1 // @le_S //]
+  |>bigop_Sfalse [2:@Hb] @H #a #ltab #pa @H1 // @le_S //
+  ]
+qed.
+
+(********************************** pairing ***********************************)
+axiom pair: nat → nat → nat.
+axiom fst : nat → nat.
+axiom snd : nat → nat.
+
+interpretation "abstract pair" 'pair f g = (pair f g). 
+
+axiom fst_pair: ∀a,b. fst 〈a,b〉 = a.
+axiom snd_pair: ∀a,b. snd 〈a,b〉 = b.
+axiom surj_pair: ∀x. ∃a,b. x = 〈a,b〉. 
+
+axiom le_fst : ∀p. fst p ≤ p.
+axiom le_snd : ∀p. snd p ≤ p.
+axiom le_pair: ∀a,a1,b,b1. a ≤ a1 → b ≤ b1 → 〈a,b〉 ≤ 〈a1,b1〉.
+
+(************************************* U **************************************)
+axiom U: nat → nat →nat → option nat. 
+
+axiom monotonic_U: ∀i,x,n,m,y.n ≤m →
+  U i x n = Some ? y → U i x m = Some ? y.
+  
+lemma unique_U: ∀i,x,n,m,yn,ym.
+  U i x n = Some ? yn → U i x m = Some ? ym → yn = ym.
+#i #x #n #m #yn #ym #Hn #Hm cases (decidable_le n m)
+  [#lenm lapply (monotonic_U … lenm Hn) >Hm #HS destruct (HS) //
+  |#ltmn lapply (monotonic_U … n … Hm) [@lt_to_le @not_le_to_lt //]
+   >Hn #HS destruct (HS) //
+  ]
+qed.
+
+definition code_for ≝ λf,i.∀x.
+  ∃n.∀m. n ≤ m → U i x m = f x.
+
+definition terminate ≝ λi,x,r. ∃y. U i x r = Some ? y. 
+
+notation "{i ⊙ x} ↓ r" with precedence 60 for @{terminate $i $x $r}. 
+
+lemma terminate_dec: ∀i,x,n. {i ⊙ x} ↓ n ∨ ¬ {i ⊙ x} ↓ n.
+#i #x #n normalize cases (U i x n)
+  [%2 % * #y #H destruct|#y %1 %{y} //]
+qed.
+  
+lemma monotonic_terminate: ∀i,x,n,m.
+  n ≤ m → {i ⊙ x} ↓ n → {i ⊙ x} ↓ m.
+#i #x #n #m #lenm * #z #H %{z} @(monotonic_U … H) //
+qed.
+
+definition termb ≝ λi,x,t. 
+  match U i x t with [None ⇒ false |Some y ⇒ true].
+
+lemma termb_true_to_term: ∀i,x,t. termb i x t = true → {i ⊙ x} ↓ t.
+#i #x #t normalize cases (U i x t) normalize [#H destruct | #y #_ %{y} //]
+qed.    
+
+lemma term_to_termb_true: ∀i,x,t. {i ⊙ x} ↓ t → termb i x t = true.
+#i #x #t * #y #H normalize >H // 
+qed.    
+
+definition out ≝ λi,x,r. 
+  match U i x r with [ None ⇒ 0 | Some z ⇒ z]. 
+
+definition bool_to_nat: bool → nat ≝ 
+  λb. match b with [true ⇒ 1 | false ⇒ 0]. 
+
+coercion bool_to_nat. 
+
+definition pU : nat → nat → nat → nat ≝ λi,x,r.〈termb i x r,out i x r〉.
+
+lemma pU_vs_U_Some : ∀i,x,r,y. pU i x r = 〈1,y〉 ↔ U i x r = Some ? y.
+#i #x #r #y % normalize
+  [cases (U i x r) normalize 
+    [#H cut (0=1) [lapply (eq_f … fst … H) >fst_pair >fst_pair #H @H] 
+     #H1 destruct
+    |#a #H cut (a=y) [lapply (eq_f … snd … H) >snd_pair >snd_pair #H1 @H1] 
+     #H1 //
+    ]
+  |#H >H //]
+qed.
+  
+lemma pU_vs_U_None : ∀i,x,r. pU i x r = 〈0,0〉 ↔ U i x r = None ?.
+#i #x #r % normalize
+  [cases (U i x r) normalize //
+   #a #H cut (1=0) [lapply (eq_f … fst … H) >fst_pair >fst_pair #H1 @H1] 
+   #H1 destruct
+  |#H >H //]
+qed.
+
+lemma fst_pU: ∀i,x,r. fst (pU i x r) = termb i x r.
+#i #x #r normalize cases (U i x r) normalize >fst_pair //
+qed.
+
+lemma snd_pU: ∀i,x,r. snd (pU i x r) = out i x r.
+#i #x #r normalize cases (U i x r) normalize >snd_pair //
+qed.
+=======
+include "reverse_complexity/bigops_compl.ma".
+>>>>>>> reverse_complexity lib restored:matita/matita/lib/reverse_complexity/speedup.ma
+*)
+
+(********************************* the speedup ********************************)
+
+definition min_input ≝ λh,i,x. μ_{y ∈ [S i,x] } (termb i y (h (S i) y)).
+
+lemma min_input_def : ∀h,i,x. 
+  min_input h i x = min (x -i) (S i) (λy.termb i y (h (S i) y)).
+// qed.
+
+lemma min_input_i: ∀h,i,x. x ≤ i → min_input h i x = S i.
+#h #i #x #lexi >min_input_def 
+cut (x - i = 0) [@sym_eq /2 by eq_minus_O/] #Hcut //
+qed. 
+
+lemma min_input_to_terminate: ∀h,i,x. 
+  min_input h i x = x → {i ⊙ x} ↓ (h (S i) x).
+#h #i #x #Hminx
+cases (decidable_le (S i) x) #Hix
+  [cases (true_or_false (termb i x (h (S i) x))) #Hcase
+    [@termb_true_to_term //
+    |<Hminx in Hcase; #H lapply (fmin_false (λx.termb i x (h (S i) x)) (x-i) (S i) H)
+     >min_input_def in Hminx; #Hminx >Hminx in ⊢ (%→?); 
+     <plus_n_Sm <plus_minus_m_m [2: @lt_to_le //]
+     #Habs @False_ind /2/
+    ]
+  |@False_ind >min_input_i in Hminx; 
+    [#eqix >eqix in Hix; * /2/ | @le_S_S_to_le @not_le_to_lt //]
+  ]
+qed.
+
+lemma min_input_to_lt: ∀h,i,x. 
+  min_input h i x = x → i < x.
+#h #i #x #Hminx cases (decidable_le (S i) x) // 
+#ltxi @False_ind >min_input_i in Hminx; 
+  [#eqix >eqix in ltxi; * /2/ | @le_S_S_to_le @not_le_to_lt //]
+qed.
+
+lemma le_to_min_input: ∀h,i,x,x1. x ≤ x1 →
+  min_input h i x = x → min_input h i x1 = x.
+#h #i #x #x1 #lex #Hminx @(min_exists … (le_S_S … lex)) 
+  [@(fmin_true … (sym_eq … Hminx)) //
+  |@(min_input_to_lt … Hminx)
+  |#j #H1 <Hminx @lt_min_to_false //
+  |@plus_minus_m_m @le_S_S @(transitive_le … lex) @lt_to_le 
+   @(min_input_to_lt … Hminx)
+  ]
+qed.
+  
+definition g ≝ λh,u,x. 
+  S (max_{i ∈[u,x[ | eqb (min_input h i x) x} (out i x (h (S i) x))).
+  
+lemma g_def : ∀h,u,x. g h u x =
+  S (max_{i ∈[u,x[ | eqb (min_input h i x) x} (out i x (h (S i) x))).
+// qed.
+
+lemma le_u_to_g_1 : ∀h,u,x. x ≤ u → g h u x = 1.
+#h #u #x #lexu >g_def cut (x-u = 0) [/2 by minus_le_minus_minus_comm/]
+#eq0 >eq0 normalize // qed.
+
+lemma g_lt : ∀h,i,x. min_input h i x = x →
+  out i x (h (S i) x) < g h 0 x.
+#h #i #x #H @le_S_S @(le_MaxI … i) /2 by min_input_to_lt/  
+qed.
+
+lemma max_neq0 : ∀a,b. max a b ≠ 0 → a ≠ 0 ∨ b ≠ 0.
+#a #b whd in match (max a b); cases (true_or_false (leb a b)) #Hcase >Hcase
+  [#H %2 @H | #H %1 @H]  
+qed.
+
+definition almost_equal ≝ λf,g:nat → nat. ¬ ∀nu.∃x. nu < x ∧ f x ≠ g x.
+interpretation "almost equal" 'napart f g = (almost_equal f g). 
+
+lemma eventually_cancelled: ∀h,u.¬∀nu.∃x. nu < x ∧
+  max_{i ∈ [0,u[ | eqb (min_input h i x) x} (out i x (h (S i) x)) ≠ 0.
+#h #u elim u
+  [normalize % #H cases (H u) #x * #_ * #H1 @H1 //
+  |#u0 @not_to_not #Hind #nu cases (Hind nu) #x * #ltx
+   cases (true_or_false (eqb (min_input h (u0+O) x) x)) #Hcase 
+    [>bigop_Strue [2:@Hcase] #Hmax cases (max_neq0 … Hmax) -Hmax
+      [2: #H %{x} % // <minus_n_O @H]
+     #Hneq0 (* if x is not enough we retry with nu=x *)
+     cases (Hind x) #x1 * #ltx1 
+     >bigop_Sfalse 
+      [#H %{x1} % [@transitive_lt //| <minus_n_O @H]
+      |@not_eq_to_eqb_false >(le_to_min_input … (eqb_true_to_eq … Hcase))
+        [@lt_to_not_eq @ltx1 | @lt_to_le @ltx1]
+      ]  
+    |>bigop_Sfalse [2:@Hcase] #H %{x} % // <minus_n_O @H
+    ]
+  ]
+qed.
+
+lemma condition_1: ∀h,u.g h 0 ≈ g h u.
+#h #u @(not_to_not … (eventually_cancelled h u))
+#H #nu cases (H (max u nu)) #x * #ltx #Hdiff 
+%{x} % [@(le_to_lt_to_lt … ltx) @(le_maxr … (le_n …))] @(not_to_not … Hdiff) 
+#H @(eq_f ?? S) >(bigop_sumI 0 u x (λi:ℕ.eqb (min_input h i x) x) nat  0 MaxA) 
+  [>H // |@lt_to_le @(le_to_lt_to_lt …ltx) /2 by le_maxr/ |//]
+qed.
+
+(******************************** Condition 2 *********************************)
+  
+lemma exists_to_exists_min: ∀h,i. (∃x. i < x ∧ {i ⊙ x} ↓ h (S i) x) → ∃y. min_input h i y = y.
+#h #i * #x * #ltix #Hx %{(min_input h i x)} @min_spec_to_min @found //
+  [@(f_min_true (λy:ℕ.termb i y (h (S i) y))) %{x} % [% // | @term_to_termb_true //]
+  |#y #leiy #lty @(lt_min_to_false ????? lty) //
+  ]
+qed.
+
+lemma condition_2: ∀h,i. code_for (total (g h 0)) i → ¬∃x. i<x ∧ {i ⊙ x} ↓ h (S i) x.
+#h #i whd in ⊢(%→?); #H % #H1 cases (exists_to_exists_min … H1) #y #Hminy
+lapply (g_lt … Hminy)
+lapply (min_input_to_terminate … Hminy) * #r #termy
+cases (H y) -H #ny #Hy 
+cut (r = g h 0 y) [@(unique_U … ny … termy) @Hy //] #Hr
+whd in match (out ???); >termy >Hr  
+#H @(absurd ? H) @le_to_not_lt @le_n
+qed.
+
+(**************************** complexity of g *********************************)
+
+definition unary_g ≝ λh.λux. g h (fst ux) (snd ux).
+definition auxg ≝ 
+  λh,ux. max_{i ∈[fst ux,snd ux[ | eqb (min_input h i (snd ux)) (snd ux)} 
+    (out i (snd ux) (h (S i) (snd ux))).
+
+lemma compl_g1 : ∀h,s. CF s (auxg h) → CF s (unary_g h).
+#h #s #H1 @(CF_compS ? (auxg h) H1) 
+qed.
+
+definition aux1g ≝ 
+  λh,ux. max_{i ∈[fst ux,snd ux[ | (λp. eqb (min_input h (fst p) (snd (snd p))) (snd (snd p))) 〈i,ux〉} 
+    ((λp.out (fst p) (snd (snd p)) (h (S (fst p)) (snd (snd p)))) 〈i,ux〉).
+
+lemma eq_aux : ∀h,x.aux1g h x = auxg h x.
+#h #x @same_bigop
+  [#n #_ >fst_pair >snd_pair // |#n #_ #_ >fst_pair >snd_pair //]
+qed.
+
+lemma compl_g2 : ∀h,s1,s2,s. 
+  CF s1
+    (λp:ℕ.eqb (min_input h (fst p) (snd (snd p))) (snd (snd p))) →
+  CF s2
+    (λp:ℕ.out (fst p) (snd (snd p)) (h (S (fst p)) (snd (snd p)))) →
+  O s (λx.MSC x + (snd x - fst x)*Max_{i ∈[fst x ,snd x[ }(s1 〈i,x〉+s2 〈i,x〉)) → 
+  CF s (auxg h).
+#h #s1 #s2 #s #Hs1 #Hs2 #HO @(ext_CF (aux1g h)) 
+  [#n whd in ⊢ (??%%); @eq_aux]
+@(CF_max2 … CF_fst CF_snd Hs1 Hs2 …) @(O_trans … HO) 
+@O_plus [@O_plus @O_plus_l // | @O_plus_r //]
+qed.  
+
+lemma compl_g3 : ∀h,s.
+  CF s (λp:ℕ.min_input h (fst p) (snd (snd p))) →
+  CF s (λp:ℕ.eqb (min_input h (fst p) (snd (snd p))) (snd (snd p))).
+#h #s #H @(CF_eqb … H) @(CF_comp … CF_snd CF_snd) @(O_trans … (le_to_O … (MSC_in … H)))
+@O_plus // %{1} %{0} #n #_ >commutative_times <times_n_1 @monotonic_MSC //
+qed.
+
+definition min_input_aux ≝ λh,p.
+  μ_{y ∈ [S (fst p),snd (snd p)] } 
+    ((λx.termb (fst (snd x)) (fst x) (h (S (fst (snd x))) (fst x))) 〈y,p〉). 
+    
+lemma min_input_eq : ∀h,p. 
+    min_input_aux h p  =
+    min_input h (fst p) (snd (snd p)).
+#h #p >min_input_def whd in ⊢ (??%?); >minus_S_S @min_f_g #i #_ #_ 
+whd in ⊢ (??%%); >fst_pair >snd_pair //
+qed.
+
+definition termb_aux ≝ λh.
+  termb_unary ∘ λp.〈fst (snd p),〈fst p,h (S (fst (snd p))) (fst p)〉〉.
+
+lemma compl_g4 : ∀h,s1,s. (∀x. 0 < s1 x) →  
+  (CF s1 
+    (λp.termb (fst (snd p)) (fst p) (h (S (fst (snd p))) (fst p)))) →
+   (O s (λx.MSC x + ((snd(snd x) - (fst x)))*Max_{i ∈[S(fst x) ,S(snd (snd x))[ }(s1 〈i,x〉))) →
+  CF s (λp:ℕ.min_input h (fst p) (snd (snd p))).
+#h #s1 #s #pos_s1 #Hs1 #HO @(ext_CF (min_input_aux h))
+ [#n whd in ⊢ (??%%); @min_input_eq]
+@(CF_mu4 … MSC MSC … pos_s1 … Hs1) 
+  [@CF_compS @CF_fst 
+  |@CF_comp_snd @CF_snd
+  |@(O_trans … HO) @O_plus [@O_plus @O_plus_l // | @O_plus_r //]
+qed.
+
+(* ??? *)
+
+lemma coroll: ∀s1:nat→nat. (∀n. monotonic ℕ le (λa:ℕ.s1 〈a,n〉)) → 
+O (λx.(snd (snd x)-fst x)*(s1 〈snd (snd x),x〉)) 
+  (λx.∑_{i ∈[S(fst x) ,S(snd (snd x))[ }(s1 〈i,x〉)).
+#s1 #Hs1 %{1} %{0} #n #_ >commutative_times <times_n_1 
+@(transitive_le … (sigma_bound …)) [@Hs1|>minus_S_S //]
+qed.
+
+lemma coroll2: ∀s1:nat→nat. (∀n,a,b. a ≤ b → b < snd n → s1 〈b,n〉 ≤ s1 〈a,n〉) → 
+O (λx.(snd x - fst x)*s1 〈fst x,x〉) (λx.∑_{i ∈[fst x,snd x[ }(s1 〈i,x〉)).
+#s1 #Hs1 %{1} %{0} #n #_ >commutative_times <times_n_1 
+@(transitive_le … (sigma_bound_decr …)) [2://] @Hs1 
+qed.
+
+lemma coroll3: ∀s1:nat→nat. (∀n,a,b. a ≤ b → b < snd n → s1 〈b,n〉 ≤ s1 〈a,n〉) → 
+O (λx.(snd x - fst x)*s1 〈fst x,x〉) 
+  (λx.(snd x - fst x)*Max_{i ∈[fst x,snd x[ }(s1 〈i,x〉)).
+#s1 #Hs1 @le_to_O #i @le_times // @Max_le #a #lta #_ @Hs1 // 
+@lt_minus_to_plus_r //
+qed.
+
+(**************************** end of technical lemmas *************************)
+
+lemma compl_g5 : ∀h,s1.
+  (∀n. 0 < s1 n) → 
+  (∀n. monotonic ℕ le (λa:ℕ.s1 〈a,n〉)) →
+  (CF s1 
+    (λp.termb (fst (snd p)) (fst p) (h (S (fst (snd p))) (fst p)))) →
+  CF (λx.MSC x + (snd (snd x)-fst x)*s1 〈snd (snd x),x〉) 
+    (λp:ℕ.min_input h (fst p) (snd (snd p))).
+#h #s1 #Hpos #Hmono #Hs1 @(compl_g4 … Hpos Hs1) @O_plus 
+[@O_plus_l // |@O_plus_r @le_to_O #n @le_times //
+@Max_le #i #lti #_ @Hmono @le_S_S_to_le @lt_minus_to_plus_r @lti
+qed.
+
+lemma compl_g6: ∀h.
+  constructible (λx. h (fst x) (snd x)) →
+  (CF (λx. sU 〈max (fst (snd x)) (snd (snd x)),〈fst x,h (S (fst (snd x))) (fst x)〉〉) 
+    (λp.termb (fst (snd p)) (fst p) (h (S (fst (snd p))) (fst p)))).
+#h #hconstr @(ext_CF (termb_aux h))
+  [#n normalize >fst_pair >snd_pair >fst_pair >snd_pair // ]
+@(CF_comp … (λx.MSC x + h (S (fst (snd x))) (fst x)) … CF_termb) 
+  [@CF_comp_pair
+    [@CF_comp_fst @(monotonic_CF … CF_snd) #x //
+    |@CF_comp_pair
+      [@(monotonic_CF … CF_fst) #x //
+      |@(ext_CF ((λx.h (fst x) (snd x))∘(λx.〈S (fst (snd x)),fst x〉)))
+        [#n normalize >fst_pair >snd_pair %]
+       @(CF_comp … MSC …hconstr)
+        [@CF_comp_pair [@CF_compS @CF_comp_fst // |//]
+        |@O_plus @le_to_O [//|#n >fst_pair >snd_pair //]
+        ]
+      ]
+    ]
+  |@O_plus
+    [@O_plus
+      [@(O_trans … (λx.MSC (fst x) + MSC (max (fst (snd x)) (snd (snd x))))) 
+        [%{2} %{0} #x #_ cases (surj_pair x) #a * #b #eqx >eqx
+         >fst_pair >snd_pair @(transitive_le … (MSC_pair …)) 
+         >distributive_times_plus @le_plus [//]
+         cases (surj_pair b) #c * #d #eqb >eqb
+         >fst_pair >snd_pair @(transitive_le … (MSC_pair …)) 
+         whd in ⊢ (??%); @le_plus 
+          [@monotonic_MSC @(le_maxl … (le_n …)) 
+          |>commutative_times <times_n_1 @monotonic_MSC @(le_maxr … (le_n …))  
+          ]
+        |@O_plus [@le_to_O #x @sU_le_x |@le_to_O #x @sU_le_i]
+        ]     
+      |@le_to_O #n @sU_le
+      ] 
+    |@le_to_O #x @monotonic_sU // @(le_maxl … (le_n …)) ]
+  ]
+qed.
+
+definition big : nat →nat ≝ λx. 
+  let m ≝ max (fst x) (snd x) in 〈m,m〉.
+
+lemma big_def : ∀a,b. big 〈a,b〉 = 〈max a b,max a b〉.
+#a #b normalize >fst_pair >snd_pair // qed.
+
+lemma le_big : ∀x. x ≤ big x. 
+#x cases (surj_pair x) #a * #b #eqx >eqx @le_pair >fst_pair >snd_pair 
+[@(le_maxl … (le_n …)) | @(le_maxr … (le_n …))]
+qed.
+
+definition faux2 ≝ λh.
+  (λx.MSC x + (snd (snd x)-fst x)*
+    (λx.sU 〈max (fst(snd x)) (snd(snd x)),〈fst x,h (S (fst (snd x))) (fst x)〉〉) 〈snd (snd x),x〉).
+lemma compl_g7: ∀h. 
+  constructible (λx. h (fst x) (snd x)) →
+  (∀n. monotonic ? le (h n)) → 
+  CF (λx.MSC x + (snd (snd x)-fst x)*sU 〈max (fst x) (snd x),〈snd (snd x),h (S (fst x)) (snd (snd x))〉〉)
+    (λp:ℕ.min_input h (fst p) (snd (snd p))).
+#h #hcostr #hmono @(monotonic_CF … (faux2 h))
+  [#n normalize >fst_pair >snd_pair //]
+@compl_g5 [#n @sU_pos | 3:@(compl_g6 h hcostr)] #n #x #y #lexy >fst_pair >snd_pair 
+>fst_pair >snd_pair @monotonic_sU // @hmono @lexy
+qed.
+
+lemma compl_g71: ∀h. 
+  constructible (λx. h (fst x) (snd x)) →
+  (∀n. monotonic ? le (h n)) → 
+  CF (λx.MSC (big x) + (snd (snd x)-fst x)*sU 〈max (fst x) (snd x),〈snd (snd x),h (S (fst x)) (snd (snd x))〉〉)
+    (λp:ℕ.min_input h (fst p) (snd (snd p))).
+#h #hcostr #hmono @(monotonic_CF … (compl_g7 h hcostr hmono)) #x
+@le_plus [@monotonic_MSC //]
+cases (decidable_le (fst x) (snd(snd x))) 
+  [#Hle @le_times // @monotonic_sU  
+  |#Hlt >(minus_to_0 … (lt_to_le … )) [// | @not_le_to_lt @Hlt]
+  ]
+qed.
+
+definition out_aux ≝ λh.
+  out_unary ∘ λp.〈fst p,〈snd(snd p),h (S (fst p)) (snd (snd p))〉〉.
+
+lemma compl_g8: ∀h.
+  constructible (λx. h (fst x) (snd x)) →
+  (CF (λx. sU 〈max (fst x) (snd x),〈snd(snd x),h (S (fst x)) (snd(snd x))〉〉) 
+    (λp.out (fst p) (snd (snd p)) (h (S (fst p)) (snd (snd p))))).
+#h #hconstr @(ext_CF (out_aux h))
+  [#n normalize >fst_pair >snd_pair >fst_pair >snd_pair // ]
+@(CF_comp … (λx.h (S (fst x)) (snd(snd x)) + MSC x) … CF_out) 
+  [@CF_comp_pair
+    [@(monotonic_CF … CF_fst) #x //
+    |@CF_comp_pair
+      [@CF_comp_snd @(monotonic_CF … CF_snd) #x //
+      |@(ext_CF ((λx.h (fst x) (snd x))∘(λx.〈S (fst x),snd(snd x)〉)))
+        [#n normalize >fst_pair >snd_pair %]
+       @(CF_comp … MSC …hconstr)
+        [@CF_comp_pair [@CF_compS // | @CF_comp_snd // ]
+        |@O_plus @le_to_O [//|#n >fst_pair >snd_pair //]
+        ]
+      ]
+    ]
+  |@O_plus 
+    [@O_plus 
+      [@le_to_O #n @sU_le 
+      |@(O_trans … (λx.MSC (max (fst x) (snd x))))
+        [%{2} %{0} #x #_ cases (surj_pair x) #a * #b #eqx >eqx
+         >fst_pair >snd_pair @(transitive_le … (MSC_pair …)) 
+         whd in ⊢ (??%); @le_plus 
+          [@monotonic_MSC @(le_maxl … (le_n …)) 
+          |>commutative_times <times_n_1 @monotonic_MSC @(le_maxr … (le_n …))  
+          ]
+        |@le_to_O #x @(transitive_le ???? (sU_le_i … )) //
+        ]
+      ]
+    |@le_to_O #x @monotonic_sU [@(le_maxl … (le_n …))|//|//]
+  ]
+qed.
+
+lemma compl_g9 : ∀h. 
+  constructible (λx. h (fst x) (snd x)) →
+  (∀n. monotonic ? le (h n)) → 
+  (∀n,a,b. a ≤ b → b ≤ n → h b n ≤ h a n) →
+  CF (λx. (S (snd x-fst x))*MSC 〈x,x〉 + 
+      (snd x-fst x)*(S(snd x-fst x))*sU 〈x,〈snd x,h (S (fst x)) (snd x)〉〉)
+   (auxg h).
+#h #hconstr #hmono #hantimono 
+@(compl_g2 h ??? (compl_g3 … (compl_g71 h hconstr hmono)) (compl_g8 h hconstr))
+@O_plus 
+  [@O_plus_l @le_to_O #x >(times_n_1 (MSC x)) >commutative_times @le_times
+    [// | @monotonic_MSC // ]]
+@(O_trans … (coroll3 ??))
+  [#n #a #b #leab #ltb >fst_pair >fst_pair >snd_pair >snd_pair
+   cut (b ≤ n) [@(transitive_le … (le_snd …)) @lt_to_le //] #lebn
+   cut (max a n = n) 
+    [normalize >le_to_leb_true [//|@(transitive_le … leab lebn)]] #maxa
+   cut (max b n = n) [normalize >le_to_leb_true //] #maxb
+   @le_plus
+    [@le_plus [>big_def >big_def >maxa >maxb //]
+     @le_times 
+      [/2 by monotonic_le_minus_r/ 
+      |@monotonic_sU // @hantimono [@le_S_S // |@ltb] 
+      ]
+    |@monotonic_sU // @hantimono [@le_S_S // |@ltb]
+    ] 
+  |@le_to_O #n >fst_pair >snd_pair
+   cut (max (fst n) n = n) [normalize >le_to_leb_true //] #Hmax >Hmax
+   >associative_plus >distributive_times_plus
+   @le_plus [@le_times [@le_S // |>big_def >Hmax //] |//] 
+  ]
+qed.
+
+definition c ≝ λx.(S (snd x-fst x))*MSC 〈x,x〉.
+
+definition sg ≝ λh,x.
+  let a ≝ fst x in
+  let b ≝ snd x in 
+  c x + (b-a)*(S(b-a))*sU 〈x,〈snd x,h (S a) b〉〉.
+
+lemma sg_def1 : ∀h,a,b. 
+  sg h 〈a,b〉 = c 〈a,b〉 +  
+   (b-a)*(S(b-a))*sU 〈〈a,b〉,〈b,h (S a) b〉〉.
+#h #a #b whd in ⊢ (??%?); >fst_pair >snd_pair // 
+qed. 
+
+lemma sg_def : ∀h,a,b. 
+  sg h 〈a,b〉 = 
+   S (b-a)*MSC 〈〈a,b〉,〈a,b〉〉 + (b-a)*(S(b-a))*sU 〈〈a,b〉,〈b,h (S a) b〉〉.
+#h #a #b normalize >fst_pair >snd_pair // 
+qed. 
+
+lemma compl_g11 : ∀h.
+  constructible (λx. h (fst x) (snd x)) →
+  (∀n. monotonic ? le (h n)) → 
+  (∀n,a,b. a ≤ b → b ≤ n → h b n ≤ h a n) →
+  CF (sg h) (unary_g h).
+#h #hconstr #Hm #Ham @compl_g1 @(compl_g9 h hconstr Hm Ham)
+qed. 
+
+(**************************** closing the argument ****************************)
+
+let rec h_of_aux (r:nat →nat) (c,d,b:nat) on d : nat ≝ 
+  match d with 
+  [ O ⇒ c 
+  | S d1 ⇒ (S d)*(MSC 〈〈b-d,b〉,〈b-d,b〉〉) +
+     d*(S d)*sU 〈〈b-d,b〉,〈b,r (h_of_aux r c d1 b)〉〉].
+
+lemma h_of_aux_O: ∀r,c,b.
+  h_of_aux r c O b  = c.
+// qed.
+
+lemma h_of_aux_S : ∀r,c,d,b. 
+  h_of_aux r c (S d) b = 
+    (S (S d))*(MSC 〈〈b-(S d),b〉,〈b-(S d),b〉〉) + 
+      (S d)*(S (S d))*sU 〈〈b-(S d),b〉,〈b,r(h_of_aux r c d b)〉〉.
+// qed.
+
+definition h_of ≝ λr,p. 
+  let m ≝ max (fst p) (snd p) in 
+  h_of_aux r (MSC 〈〈m,m〉,〈m,m〉〉) (snd p - fst p) (snd p).
+
+lemma h_of_O: ∀r,a,b. b ≤ a → 
+  h_of r 〈a,b〉 = let m ≝ max a b in MSC 〈〈m,m〉,〈m,m〉〉.
+#r #a #b #Hle normalize >fst_pair >snd_pair >(minus_to_0 … Hle) //
+qed.
+
+lemma h_of_def: ∀r,a,b.h_of r 〈a,b〉 = 
+  let m ≝ max a b in 
+  h_of_aux r (MSC 〈〈m,m〉,〈m,m〉〉) (b - a) b.
+#r #a #b normalize >fst_pair >snd_pair //
+qed.
+  
+lemma mono_h_of_aux: ∀r.(∀x. x ≤ r x) → monotonic ? le r →
+  ∀d,d1,c,c1,b,b1.c ≤ c1 → d ≤ d1 → b ≤ b1 → 
+  h_of_aux r c d b ≤ h_of_aux r c1 d1 b1.
+#r #Hr #monor #d #d1 lapply d -d elim d1 
+  [#d #c #c1 #b #b1 #Hc #Hd @(le_n_O_elim ? Hd) #leb 
+   >h_of_aux_O >h_of_aux_O  //
+  |#m #Hind #d #c #c1 #b #b1 #lec #led #leb cases (le_to_or_lt_eq … led)
+    [#ltd @(transitive_le … (Hind … lec ? leb)) [@le_S_S_to_le @ltd]
+     >h_of_aux_S @(transitive_le ???? (le_plus_n …))
+     >(times_n_1 (h_of_aux r c1 m b1)) in ⊢ (?%?); 
+     >commutative_times @le_times [//|@(transitive_le … (Hr ?)) @sU_le]
+    |#Hd >Hd >h_of_aux_S >h_of_aux_S 
+     cut (b-S m ≤ b1 - S m) [/2 by monotonic_le_minus_l/] #Hb1
+     @le_plus [@le_times //] 
+      [@monotonic_MSC @le_pair @le_pair //
+      |@le_times [//] @monotonic_sU 
+        [@le_pair // |// |@monor @Hind //]
+      ]
+    ]
+  ]
+qed.
+
+lemma mono_h_of2: ∀r.(∀x. x ≤ r x) → monotonic ? le r →
+  ∀i,b,b1. b ≤ b1 → h_of r 〈i,b〉 ≤ h_of r 〈i,b1〉.
+#r #Hr #Hmono #i #a #b #leab >h_of_def >h_of_def
+cut (max i a ≤ max i b)
+  [@to_max 
+    [@(le_maxl … (le_n …))|@(transitive_le … leab) @(le_maxr … (le_n …))]]
+#Hmax @(mono_h_of_aux r Hr Hmono) 
+  [@monotonic_MSC @le_pair @le_pair @Hmax |/2 by monotonic_le_minus_l/ |@leab]
+qed.
+
+axiom h_of_constr : ∀r:nat →nat. 
+  (∀x. x ≤ r x) → monotonic ? le r → constructible r →
+  constructible (h_of r).
+
+lemma speed_compl: ∀r:nat →nat. 
+  (∀x. x ≤ r x) → monotonic ? le r → constructible r →
+  CF (h_of r) (unary_g (λi,x. r(h_of r 〈i,x〉))).
+#r #Hr #Hmono #Hconstr @(monotonic_CF … (compl_g11 …)) 
+  [#x cases (surj_pair x) #a * #b #eqx >eqx 
+   >sg_def cases (decidable_le b a)
+    [#leba >(minus_to_0 … leba) normalize in ⊢ (?%?);
+     <plus_n_O <plus_n_O >h_of_def 
+     cut (max a b = a) 
+      [normalize cases (le_to_or_lt_eq … leba)
+        [#ltba >(lt_to_leb_false … ltba) % 
+        |#eqba <eqba >(le_to_leb_true … (le_n ?)) % ]]
+     #Hmax >Hmax normalize >(minus_to_0 … leba) normalize
+     @monotonic_MSC @le_pair @le_pair //
+    |#ltab >h_of_def >h_of_def
+     cut (max a b = b) 
+      [normalize >(le_to_leb_true … ) [%] @lt_to_le @not_le_to_lt @ltab]
+     #Hmax >Hmax 
+     cut (max (S a) b = b) 
+      [whd in ⊢ (??%?);  >(le_to_leb_true … ) [%] @not_le_to_lt @ltab]
+     #Hmax1 >Hmax1
+     cut (∃d.b - a = S d) 
+       [%{(pred(b-a))} >S_pred [//] @lt_plus_to_minus_r @not_le_to_lt @ltab] 
+     * #d #eqd >eqd  
+     cut (b-S a = d) [//] #eqd1 >eqd1 >h_of_aux_S >eqd1 
+     cut (b - S d = a) 
+       [@plus_to_minus >commutative_plus @minus_to_plus 
+         [@lt_to_le @not_le_to_lt // | //]] #eqd2 >eqd2
+     normalize //
+    ]
+  |#n #a #b #leab #lebn >h_of_def >h_of_def
+   cut (max a n = n) 
+    [normalize >le_to_leb_true [%|@(transitive_le … leab lebn)]] #Hmaxa
+   cut (max b n = n) 
+    [normalize >(le_to_leb_true … lebn) %] #Hmaxb 
+   >Hmaxa >Hmaxb @Hmono @(mono_h_of_aux r … Hr Hmono) // /2 by monotonic_le_minus_r/
+  |#n #a #b #leab @Hmono @(mono_h_of2 … Hr Hmono … leab)
+  |@(constr_comp … Hconstr Hr) @(ext_constr (h_of r))
+    [#x cases (surj_pair x) #a * #b #eqx >eqx >fst_pair >snd_pair //]  
+   @(h_of_constr r Hr Hmono Hconstr)
+  ]
+qed.
+
+lemma speed_compl_i: ∀r:nat →nat. 
+  (∀x. x ≤ r x) → monotonic ? le r → constructible r →
+  ∀i. CF (λx.h_of r 〈i,x〉) (λx.g (λi,x. r(h_of r 〈i,x〉)) i x).
+#r #Hr #Hmono #Hconstr #i 
+@(ext_CF (λx.unary_g (λi,x. r(h_of r 〈i,x〉)) 〈i,x〉))
+  [#n whd in ⊢ (??%%); @eq_f @sym_eq >fst_pair >snd_pair %]
+@smn @(ext_CF … (speed_compl r Hr Hmono Hconstr)) #n //
+qed.
+
+(**************************** the speedup theorem *****************************)
+theorem pseudo_speedup: 
+  ∀r:nat →nat. (∀x. x ≤ r x) → monotonic ? le r → constructible r →
+  ∃f.∀sf. CF sf f → ∃g,sg. f ≈ g ∧ CF sg g ∧ O sf (r ∘ sg).
+(* ∃m,a.∀n. a≤n → r(sg a) < m * sf n. *)
+#r #Hr #Hmono #Hconstr
+(* f is (g (λi,x. r(h_of r 〈i,x〉)) 0) *) 
+%{(g (λi,x. r(h_of r 〈i,x〉)) 0)} #sf * #i *
+#Hcodei #HCi 
+(* g is (g (λi,x. r(h_of r 〈i,x〉)) (S i)) *)
+%{(g (λi,x. r(h_of r 〈i,x〉)) (S i))}
+(* sg is (λx.h_of r 〈i,x〉) *)
+%{(λx. h_of r 〈S i,x〉)}
+lapply (speed_compl_i … Hr Hmono Hconstr (S i)) #Hg
+%[%[@condition_1 |@Hg]
+ |cases Hg #H1 * #j * #Hcodej #HCj
+  lapply (condition_2 … Hcodei) #Hcond2 (* @not_to_not *)
+  cases HCi #m * #a #Ha %{m} %{(max (S i) a)} #n #ltin @lt_to_le @not_le_to_lt 
+  @(not_to_not … Hcond2) -Hcond2 #Hlesf %{n} % 
+  [@(transitive_le … ltin) @(le_maxl … (le_n …))]
+  cases (Ha n ?) [2: @(transitive_le … ltin) @(le_maxr … (le_n …))] 
+  #y #Uy %{y} @(monotonic_U … Uy) @(transitive_le … Hlesf) //
+ ]
+qed.
+
+theorem pseudo_speedup': 
+  ∀r:nat →nat. (∀x. x ≤ r x) → monotonic ? le r → constructible r →
+  ∃f.∀sf. CF sf f → ∃g,sg. f ≈ g ∧ CF sg g ∧ 
+  (* ¬ O (r ∘ sg) sf. *)
+  ∃m,a.∀n. a≤n → r(sg a) < m * sf n. 
+#r #Hr #Hmono #Hconstr 
+(* f is (g (λi,x. r(h_of r 〈i,x〉)) 0) *) 
+%{(g (λi,x. r(h_of r 〈i,x〉)) 0)} #sf * #i *
+#Hcodei #HCi 
+(* g is (g (λi,x. r(h_of r 〈i,x〉)) (S i)) *)
+%{(g (λi,x. r(h_of r 〈i,x〉)) (S i))}
+(* sg is (λx.h_of r 〈S i,x〉) *)
+%{(λx. h_of r 〈S i,x〉)}
+lapply (speed_compl_i … Hr Hmono Hconstr (S i)) #Hg
+%[%[@condition_1 |@Hg]
+ |cases Hg #H1 * #j * #Hcodej #HCj
+  lapply (condition_2 … Hcodei) #Hcond2 (* @not_to_not *)
+  cases HCi #m * #a #Ha
+  %{m} %{(max (S i) a)} #n #ltin @not_le_to_lt @(not_to_not … Hcond2) -Hcond2 
+  #Hlesf %{n} % [@(transitive_le … ltin) @(le_maxl … (le_n …))]
+  cases (Ha n ?) [2: @(transitive_le … ltin) @(le_maxr … (le_n …))] 
+  #y #Uy %{y} @(monotonic_U … Uy) @(transitive_le … Hlesf)
+  @Hmono @(mono_h_of2 … Hr Hmono … ltin)
+ ]
+qed.
+  
index 11f988c79dc29135397bd4931c3dc862ad861f53..16f079f48579ef00dc4458e9f5dea9369354397c 100644 (file)
@@ -5,7 +5,7 @@ include "arithmetics/sigma_pi.ma".
 include "arithmetics/bounded_quantifiers.ma".
 include "reverse_complexity/big_O.ma".
 
-(************************* notation for minimization *****************************)
+(************************* notation for minimization **************************)
 notation "μ_{ ident i < n } p" 
   with precedence 80 for @{min $n 0 (λ${ident i}.$p)}.
 
@@ -101,6 +101,10 @@ axiom le_fst : ∀p. fst p ≤ p.
 axiom le_snd : ∀p. snd p ≤ p.
 axiom le_pair: ∀a,a1,b,b1. a ≤ a1 → b ≤ b1 → 〈a,b〉 ≤ 〈a1,b1〉.
 
+lemma expand_pair: ∀x. x = 〈fst x, snd x〉. 
+#x lapply (surj_pair x) * #a * #b #Hx >Hx >fst_pair >snd_pair //
+qed.
+
 (************************************* U **************************************)
 axiom U: nat → nat →nat → option nat. 
 
@@ -149,7 +153,7 @@ definition out ≝ λi,x,r.
 
 definition bool_to_nat: bool → nat ≝ 
   λb. match b with [true ⇒ 1 | false ⇒ 0]. 
-
+  
 coercion bool_to_nat. 
 
 definition pU : nat → nat → nat → nat ≝ λi,x,r.〈termb i x r,out i x r〉.
@@ -181,124 +185,8 @@ lemma snd_pU: ∀i,x,r. snd (pU i x r) = out i x r.
 #i #x #r normalize cases (U i x r) normalize >snd_pair //
 qed.
 
-(********************************* the speedup ********************************)
-
-definition min_input ≝ λh,i,x. μ_{y ∈ [S i,x] } (termb i y (h (S i) y)).
-
-lemma min_input_def : ∀h,i,x. 
-  min_input h i x = min (x -i) (S i) (λy.termb i y (h (S i) y)).
-// qed.
-
-lemma min_input_i: ∀h,i,x. x ≤ i → min_input h i x = S i.
-#h #i #x #lexi >min_input_def 
-cut (x - i = 0) [@sym_eq /2 by eq_minus_O/] #Hcut //
-qed. 
 
-lemma min_input_to_terminate: ∀h,i,x. 
-  min_input h i x = x → {i ⊙ x} ↓ (h (S i) x).
-#h #i #x #Hminx
-cases (decidable_le (S i) x) #Hix
-  [cases (true_or_false (termb i x (h (S i) x))) #Hcase
-    [@termb_true_to_term //
-    |<Hminx in Hcase; #H lapply (fmin_false (λx.termb i x (h (S i) x)) (x-i) (S i) H)
-     >min_input_def in Hminx; #Hminx >Hminx in ⊢ (%→?); 
-     <plus_n_Sm <plus_minus_m_m [2: @lt_to_le //]
-     #Habs @False_ind /2/
-    ]
-  |@False_ind >min_input_i in Hminx; 
-    [#eqix >eqix in Hix; * /2/ | @le_S_S_to_le @not_le_to_lt //]
-  ]
-qed.
-
-lemma min_input_to_lt: ∀h,i,x. 
-  min_input h i x = x → i < x.
-#h #i #x #Hminx cases (decidable_le (S i) x) // 
-#ltxi @False_ind >min_input_i in Hminx; 
-  [#eqix >eqix in ltxi; * /2/ | @le_S_S_to_le @not_le_to_lt //]
-qed.
-
-lemma le_to_min_input: ∀h,i,x,x1. x ≤ x1 →
-  min_input h i x = x → min_input h i x1 = x.
-#h #i #x #x1 #lex #Hminx @(min_exists … (le_S_S … lex)) 
-  [@(fmin_true … (sym_eq … Hminx)) //
-  |@(min_input_to_lt … Hminx)
-  |#j #H1 <Hminx @lt_min_to_false //
-  |@plus_minus_m_m @le_S_S @(transitive_le … lex) @lt_to_le 
-   @(min_input_to_lt … Hminx)
-  ]
-qed.
-  
-definition g ≝ λh,u,x. 
-  S (max_{i ∈[u,x[ | eqb (min_input h i x) x} (out i x (h (S i) x))).
-  
-lemma g_def : ∀h,u,x. g h u x =
-  S (max_{i ∈[u,x[ | eqb (min_input h i x) x} (out i x (h (S i) x))).
-// qed.
-
-lemma le_u_to_g_1 : ∀h,u,x. x ≤ u → g h u x = 1.
-#h #u #x #lexu >g_def cut (x-u = 0) [/2 by minus_le_minus_minus_comm/]
-#eq0 >eq0 normalize // qed.
-
-lemma g_lt : ∀h,i,x. min_input h i x = x →
-  out i x (h (S i) x) < g h 0 x.
-#h #i #x #H @le_S_S @(le_MaxI … i) /2 by min_input_to_lt/  
-qed.
-
-lemma max_neq0 : ∀a,b. max a b ≠ 0 → a ≠ 0 ∨ b ≠ 0.
-#a #b whd in match (max a b); cases (true_or_false (leb a b)) #Hcase >Hcase
-  [#H %2 @H | #H %1 @H]  
-qed.
-
-definition almost_equal ≝ λf,g:nat → nat. ¬ ∀nu.∃x. nu < x ∧ f x ≠ g x.
-interpretation "almost equal" 'napart f g = (almost_equal f g). 
-
-lemma eventually_cancelled: ∀h,u.¬∀nu.∃x. nu < x ∧
-  max_{i ∈ [0,u[ | eqb (min_input h i x) x} (out i x (h (S i) x)) ≠ 0.
-#h #u elim u
-  [normalize % #H cases (H u) #x * #_ * #H1 @H1 //
-  |#u0 @not_to_not #Hind #nu cases (Hind nu) #x * #ltx
-   cases (true_or_false (eqb (min_input h (u0+O) x) x)) #Hcase 
-    [>bigop_Strue [2:@Hcase] #Hmax cases (max_neq0 … Hmax) -Hmax
-      [2: #H %{x} % // <minus_n_O @H]
-     #Hneq0 (* if x is not enough we retry with nu=x *)
-     cases (Hind x) #x1 * #ltx1 
-     >bigop_Sfalse 
-      [#H %{x1} % [@transitive_lt //| <minus_n_O @H]
-      |@not_eq_to_eqb_false >(le_to_min_input … (eqb_true_to_eq … Hcase))
-        [@lt_to_not_eq @ltx1 | @lt_to_le @ltx1]
-      ]  
-    |>bigop_Sfalse [2:@Hcase] #H %{x} % // <minus_n_O @H
-    ]
-  ]
-qed.
-
-lemma condition_1: ∀h,u.g h 0 ≈ g h u.
-#h #u @(not_to_not … (eventually_cancelled h u))
-#H #nu cases (H (max u nu)) #x * #ltx #Hdiff 
-%{x} % [@(le_to_lt_to_lt … ltx) @(le_maxr … (le_n …))] @(not_to_not … Hdiff) 
-#H @(eq_f ?? S) >(bigop_sumI 0 u x (λi:ℕ.eqb (min_input h i x) x) nat  0 MaxA) 
-  [>H // |@lt_to_le @(le_to_lt_to_lt …ltx) /2 by le_maxr/ |//]
-qed.
-
-(******************************** Condition 2 *********************************)
 definition total ≝ λf.λx:nat. Some nat (f x).
-  
-lemma exists_to_exists_min: ∀h,i. (∃x. i < x ∧ {i ⊙ x} ↓ h (S i) x) → ∃y. min_input h i y = y.
-#h #i * #x * #ltix #Hx %{(min_input h i x)} @min_spec_to_min @found //
-  [@(f_min_true (λy:ℕ.termb i y (h (S i) y))) %{x} % [% // | @term_to_termb_true //]
-  |#y #leiy #lty @(lt_min_to_false ????? lty) //
-  ]
-qed.
-
-lemma condition_2: ∀h,i. code_for (total (g h 0)) i → ¬∃x. i<x ∧ {i ⊙ x} ↓ h (S i) x.
-#h #i whd in ⊢(%→?); #H % #H1 cases (exists_to_exists_min … H1) #y #Hminy
-lapply (g_lt … Hminy)
-lapply (min_input_to_terminate … Hminy) * #r #termy
-cases (H y) -H #ny #Hy 
-cut (r = g h 0 y) [@(unique_U … ny … termy) @Hy //] #Hr
-whd in match (out ???); >termy >Hr  
-#H @(absurd ? H) @le_to_not_lt @le_n
-qed.
 
 
 (********************************* complexity *********************************)
@@ -326,6 +214,11 @@ lemma ext_CF : ∀f,g,s. (∀n. f n = g n) → CF s f → CF s g.
   [#x cases (Hcode x) #a #H %{a} whd in match (total ??); <Hext @H | //] 
 qed.
 
+lemma ext_CF1 : ∀f,g,s. (∀n. f n = g n) → CF s g → CF s f.
+#f #g #s #Hext * #HO  * #i * #Hcode #HC % // %{i} %
+  [#x cases (Hcode x) #a #H %{a} whd in match (total ??); >Hext @H | //] 
+qed.
+
 lemma monotonic_CF: ∀s1,s2,f.(∀x. s1 x ≤  s2 x) → CF s1 f → CF s2 f.
 #s1 #s2 #f #H * #HO * #i * #Hcode #Hs1 % 
   [cases HO #c * #a -HO #HO %{c} %{a} #n #lean @(transitive_le … (HO n lean))
@@ -361,6 +254,34 @@ qed.
 
 (* primitve recursion *)
 
+(* no arguments *)
+
+let rec prim_rec0 (k:nat) (h:nat →nat) n on n ≝ 
+  match n with 
+  [ O ⇒ k
+  | S a ⇒ h 〈a, prim_rec0 k h a〉].
+  
+lemma prim_rec0_S: ∀k,h,n.
+  prim_rec0 k h (S n) = h 〈n, prim_rec0 k h n〉.
+// qed.
+
+let rec prim_rec0_compl (k,sk:nat) (h,sh:nat →nat) n on n ≝ 
+  match n with 
+  [ O ⇒ sk
+  | S a ⇒ prim_rec0_compl k sk h sh a + sh (prim_rec0 k h a)].
+
+axiom CF_prim_rec0_gen: ∀k,h,sk,sh,sh1,sf. CF sh h →
+  O sh1 (λx.snd x + sh 〈fst x,prim_rec0 k h (fst x)〉) → 
+  O sf (prim_rec0 sk sh1) →
+   CF sf (prim_rec0 k h).
+
+lemma CF_prim_rec0: ∀k,h,sk,sh,sf. CF sh h → 
+  O sf (prim_rec0 sk (λx. snd x + sh 〈fst x,prim_rec0 k h (fst x)〉))
+   → CF sf (prim_rec0 k h).
+#k #h #sk #sh #sf #Hh #HO @(CF_prim_rec0_gen … Hh … HO) @O_refl
+qed.
+
+(* with argument(s) m *)
 let rec prim_rec (k,h:nat →nat) n m on n ≝ 
   match n with 
   [ O ⇒ k m
@@ -370,28 +291,42 @@ lemma prim_rec_S: ∀k,h,n,m.
   prim_rec k h (S n) m = h 〈n,〈prim_rec k h n m, m〉〉.
 // qed.
 
+lemma prim_rec_le: ∀k1,k2,h1,h2. (∀x.k1 x ≤ k2 x) → 
+(∀x,y.x ≤y → h1 x ≤ h2 y) →
+  ∀x,m. prim_rec k1 h1 x m ≤ prim_rec k2 h2 x m.
+#k1 #k2 #h1 #h2 #lek #leh #x #m elim x //
+#n #Hind normalize @leh @le_pair // @le_pair //
+qed.
 definition unary_pr ≝ λk,h,x. prim_rec k h (fst x) (snd x).
 
+lemma prim_rec_unary: ∀k,h,a,b. 
+  prim_rec k h a b = unary_pr k h 〈a,b〉.
+#k #h #a #b normalize >fst_pair >snd_pair //
+qed.
+  
+
 let rec prim_rec_compl (k,h,sk,sh:nat →nat) n m on n ≝ 
   match n with 
   [ O ⇒ sk m
   | S a ⇒ prim_rec_compl k h sk sh a m + sh (prim_rec k h a m)].
-  
-axiom CF_prim_rec: ∀k,h,sk,sh,sf. CF sk k → CF sh h → 
-  O sf (unary_pr sk (λx. fst (snd x) + sh 〈fst x,〈unary_pr k h 〈fst x,snd (snd x)〉,snd (snd x)〉〉)) 
-   → CF sf (unary_pr k h).
 
-(* falso ????
-lemma prim_rec_O: ∀k1,h1,k2,h2. O k1 k2 → O h1 h2 → 
-  O (unary_pr k1 h1) (unary_pr k2 h2).
-#k1 #h1 #k2 #h2 #HO1 #HO2 whd *)
+axiom CF_prim_rec_gen: ∀k,h,sk,sh,sh1. CF sk k → CF sh h →  
+  O sh1 (λx. fst (snd x) + sh 〈fst x,〈unary_pr k h 〈fst x,snd (snd x)〉,snd (snd x)〉〉) → 
+   CF (unary_pr sk sh1) (unary_pr k h).
 
+lemma CF_prim_rec: ∀k,h,sk,sh,sf. CF sk k → CF sh h → 
+  O sf (unary_pr sk (λx. fst (snd x) + sh 〈fst x,〈unary_pr k h 〈fst x,snd (snd x)〉,snd (snd x)〉〉)) 
+   → CF sf (unary_pr k h).
+#k #h #sk #sh #sf #Hk #Hh #Osf @(O_to_CF … Osf) @(CF_prim_rec_gen … Hk Hh) @O_refl
+qed.
   
 (**************************** primitive operations*****************************)
 
 definition id ≝ λx:nat.x.
 
 axiom CF_id: CF MSC id.
+axiom CF_const: ∀k.CF MSC (λx.k).
 axiom CF_compS: ∀h,f. CF h f → CF h (S ∘ f).
 axiom CF_comp_fst: ∀h,f. CF h f → CF h (fst ∘ f).
 axiom CF_comp_snd: ∀h,f. CF h f → CF h (snd ∘ f). 
@@ -403,7 +338,7 @@ qed.
 
 lemma CF_snd: CF MSC snd.
 @(ext_CF (snd ∘ id)) [#n //] @(CF_comp_snd … CF_id)
-qed.
+qed. 
 
 (************************************** eqb ***********************************)
   
@@ -412,17 +347,771 @@ axiom CF_eqb: ∀h,f,g.
 
 (*********************************** maximum **********************************) 
 
+alias symbol "pair" (instance 13) = "abstract pair".
+alias symbol "pair" (instance 12) = "abstract pair".
+alias symbol "and" (instance 11) = "boolean and".
+alias symbol "plus" (instance 8) = "natural plus".
+alias symbol "pair" (instance 7) = "abstract pair".
+alias symbol "plus" (instance 6) = "natural plus".
+alias symbol "pair" (instance 5) = "abstract pair".
+alias id "max" = "cic:/matita/arithmetics/nat/max#def:2".
+alias symbol "minus" (instance 3) = "natural minus".
+lemma max_gen: ∀a,b,p,f,x. a ≤b → 
+  max_{i ∈[a,b[ | p 〈i,x〉 }(f 〈i,x〉) = max_{i < b | leb a i ∧ p 〈i,x〉 }(f 〈i,x〉).
+#a #b #p #f #x @(bigop_I_gen ????? MaxA) 
+qed.
+
+lemma max_prim_rec_base: ∀a,b,p,f,x. a ≤b → 
+  max_{i < b| p 〈i,x〉 }(f 〈i,x〉) = 
+    prim_rec (λi.0) 
+    (λi.if p 〈fst i,x〉 then max (f 〈fst i,snd (snd i)〉) (fst (snd i)) else fst (snd i)) b x.
+#a #b #p #f #x #leab >max_gen // elim b 
+  [normalize //
+  |#i #Hind >prim_rec_S >fst_pair >snd_pair >snd_pair >fst_pair
+   cases (true_or_false (p 〈i,x〉)) #Hcase >Hcase
+    [<Hind >bigop_Strue // |<Hind >bigop_Sfalse // ]
+  ]
+qed.
+
+lemma max_prim_rec: ∀a,b,p,f,x. a ≤b → 
+  max_{i ∈[a,b[ | p 〈i,x〉 }(f 〈i,x〉) = 
+    prim_rec (λi.0) 
+    (λi.if leb a (fst i) ∧ p 〈fst i,x〉 then max (f 〈fst i,snd (snd i)〉) (fst (snd i)) else fst (snd i)) b x.
+#a #b #p #f #x #leab >max_gen // elim b 
+  [normalize //
+  |#i #Hind >prim_rec_S >fst_pair >snd_pair >snd_pair >fst_pair
+   cases (true_or_false (leb a i ∧ p 〈i,x〉)) #Hcase >Hcase
+    [<Hind >bigop_Strue // |<Hind >bigop_Sfalse // ]
+  ]
+qed.
+
+(* FG: aliases added by matita compiled with OCaml 4.0.5, bah ??? *)
+alias symbol "pair" (instance 15) = "abstract pair".
+alias symbol "minus" (instance 14) = "natural minus".
+alias symbol "plus" (instance 11) = "natural plus".
+alias symbol "pair" (instance 10) = "abstract pair".
+alias symbol "plus" (instance 13) = "natural plus".
+alias symbol "pair" (instance 12) = "abstract pair".
+alias symbol "plus" (instance 8) = "natural plus".
+alias symbol "pair" (instance 7) = "abstract pair".
+alias symbol "plus" (instance 6) = "natural plus".
+alias symbol "pair" (instance 5) = "abstract pair".
+alias id "max" = "cic:/matita/arithmetics/nat/max#def:2".
+alias symbol "minus" (instance 3) = "natural minus".
+lemma max_prim_rec1: ∀a,b,p,f,x.
+  max_{i ∈[a x,b x[ | p 〈i,x〉 }(f 〈i,x〉) = 
+    prim_rec (λi.0) 
+    (λi.if p 〈fst i +fst (snd (snd i)),snd (snd (snd i))〉 
+        then max (f 〈fst i +fst (snd (snd i)),snd (snd (snd i))〉) (fst (snd i)) 
+        else fst (snd i)) (b x-a x) 〈a x ,x〉.
+#a #b #p #f #x elim (b x-a x) 
+  [normalize //
+  |#i #Hind >prim_rec_S
+   >fst_pair >snd_pair >snd_pair >fst_pair >snd_pair >fst_pair
+   cases (true_or_false (p 〈i+a x,x〉)) #Hcase >Hcase
+    [<Hind >bigop_Strue // |<Hind >bigop_Sfalse // ]
+  ]
+qed.
+
+lemma sum_prim_rec1: ∀a,b,p,f,x.
+  ∑_{i ∈[a x,b x[ | p 〈i,x〉 }(f 〈i,x〉) = 
+    prim_rec (λi.0) 
+    (λi.if p 〈fst i +fst (snd (snd i)),snd (snd (snd i))〉 
+        then plus (f 〈fst i +fst (snd (snd i)),snd (snd (snd i))〉) (fst (snd i)) 
+        else fst (snd i)) (b x-a x) 〈a x ,x〉.
+#a #b #p #f #x elim (b x-a x) 
+  [normalize //
+  |#i #Hind >prim_rec_S
+   >fst_pair >snd_pair >snd_pair >fst_pair >snd_pair >fst_pair
+   cases (true_or_false (p 〈i+a x,x〉)) #Hcase >Hcase
+    [<Hind >bigop_Strue // |<Hind >bigop_Sfalse // ]
+  ]
+qed.
+
+(* FG: aliases added by matita compiled with OCaml 4.0.5, bah ??? *)
+alias symbol "pair" (instance 15) = "abstract pair".
+alias symbol "minus" (instance 14) = "natural minus".
+alias symbol "plus" (instance 11) = "natural plus".
+alias symbol "pair" (instance 10) = "abstract pair".
+alias symbol "plus" (instance 13) = "natural plus".
+alias symbol "pair" (instance 12) = "abstract pair".
+alias symbol "plus" (instance 8) = "natural plus".
+alias symbol "pair" (instance 7) = "abstract pair".
+alias symbol "pair" (instance 6) = "abstract pair".
+alias symbol "plus" (instance 4) = "natural plus".
+alias symbol "pair" (instance 3) = "abstract pair".
+alias symbol "minus" (instance 2) = "natural minus".
+lemma bigop_prim_rec: ∀a,b,c,p,f,x.
+  bigop (b x-a x) (λi:ℕ.p 〈i+a x,x〉) ? (c 〈a x,x〉) plus (λi:ℕ.f 〈i+a x,x〉) = 
+    prim_rec c 
+    (λi.if p 〈fst i +fst (snd (snd i)),snd (snd (snd i))〉 
+        then plus (f 〈fst i +fst (snd (snd i)),snd (snd (snd i))〉) (fst (snd i)) 
+        else fst (snd i)) (b x-a x) 〈a x ,x〉.
+#a #b #c #p #f #x normalize elim (b x-a x) 
+  [normalize //
+  |#i #Hind >prim_rec_S
+   >fst_pair >snd_pair >snd_pair >fst_pair >snd_pair >fst_pair
+   cases (true_or_false (p 〈i+a x,x〉)) #Hcase >Hcase
+    [<Hind >bigop_Strue // |<Hind >bigop_Sfalse // ]
+  ]
+qed.
+
+(* FG: aliases added by matita compiled with OCaml 4.0.5, bah ??? *)
+alias symbol "pair" (instance 15) = "abstract pair".
+alias symbol "minus" (instance 14) = "natural minus".
+alias symbol "minus" (instance 11) = "natural minus".
+alias symbol "pair" (instance 10) = "abstract pair".
+alias symbol "minus" (instance 13) = "natural minus".
+alias symbol "pair" (instance 12) = "abstract pair".
+alias symbol "minus" (instance 8) = "natural minus".
+alias symbol "pair" (instance 7) = "abstract pair".
+alias symbol "pair" (instance 6) = "abstract pair".
+alias symbol "minus" (instance 4) = "natural minus".
+alias symbol "pair" (instance 3) = "abstract pair".
+alias symbol "minus" (instance 2) = "natural minus".
+lemma bigop_prim_rec_dec: ∀a,b,c,p,f,x.
+  bigop (b x-a x) (λi:ℕ.p 〈b x -i,x〉) ? (c 〈b x,x〉) plus (λi:ℕ.f 〈b x-i,x〉) = 
+    prim_rec c 
+    (λi.if p 〈fst (snd (snd i)) - fst i,snd (snd (snd i))〉 
+        then plus (f 〈fst (snd (snd i)) - fst i,snd (snd (snd i))〉) (fst (snd i)) 
+        else fst (snd i)) (b x-a x) 〈b x ,x〉.
+#a #b #c #p #f #x normalize elim (b x-a x) 
+  [normalize //
+  |#i #Hind >prim_rec_S
+   >fst_pair >snd_pair >snd_pair >fst_pair >snd_pair >fst_pair
+   cases (true_or_false (p 〈b x - i,x〉)) #Hcase >Hcase
+    [<Hind >bigop_Strue // |<Hind >bigop_Sfalse // ]
+  ]
+qed.
+
+lemma bigop_prim_rec_dec1: ∀a,b,c,p,f,x.
+  bigop (S(b x)-a x) (λi:ℕ.p 〈b x - i,x〉) ? (c 〈b x,x〉) plus (λi:ℕ.f 〈b x- i,x〉) = 
+    prim_rec c 
+    (λi.if p 〈fst (snd (snd i)) - (fst i),snd (snd (snd i))〉 
+        then plus (f 〈fst (snd (snd i)) - (fst i),snd (snd (snd i))〉) (fst (snd i)) 
+        else fst (snd i)) (S(b x)-a x) 〈b x,x〉.
+#a #b #c #p #f #x elim (S(b x)-a x) 
+  [normalize //
+  |#i #Hind >prim_rec_S
+   >fst_pair >snd_pair >snd_pair >fst_pair >snd_pair >fst_pair
+   cases (true_or_false (p 〈b x - i,x〉)) #Hcase >Hcase
+    [<Hind >bigop_Strue // |<Hind >bigop_Sfalse // ]
+  ]
+qed.
+
+(*
+lemma bigop_aux_1: ∀k,c,f.
+  bigop (S k) (λi:ℕ.true) ? c plus (λi:ℕ.f i) = 
+    f 0 + bigop k (λi:ℕ.true) ? c plus (λi:ℕ.f (S i)).
+#k #c #f elim k [normalize //] #i #Hind >bigop_Strue //
+
+lemma bigop_prim_rec_dec: ∀a,b,c,f,x.
+  bigop (b x-a x) (λi:ℕ.true) ? (c 〈b x,x〉) plus (λi:ℕ.f 〈i+a x,x〉) = 
+    prim_rec c 
+    (λi. plus (f 〈fst (snd (snd i)) - fst i,snd (snd (snd i))〉) (fst (snd i))) 
+    (b x-a x) 〈b x ,x〉.
+#a #b #c #f #x normalize elim (b x-a x) 
+  [normalize //
+  |#i #Hind >prim_rec_S
+   >fst_pair >snd_pair >snd_pair >fst_pair >snd_pair >fst_pair
+   <Hind >bigop_Strue // |<Hind >bigop_Sfalse // ]
+  ]
+qed. *)
+
+lemma bigop_plus_c: ∀k,p,f,c.
+  c k + bigop k (λi.p i) ? 0 plus (λi.f i) = 
+    bigop k (λi.p i) ? (c k) plus (λi.f i).
+#k #p #f elim k [normalize //]
+#i #Hind #c cases (true_or_false (p i)) #Hcase
+[>bigop_Strue // >bigop_Strue // <associative_plus >(commutative_plus ? (f i))
+ >associative_plus @eq_f @Hind
+|>bigop_Sfalse // >bigop_Sfalse // 
+]
+qed.
+
+(* the argument is 〈b-a,〈a,x〉〉 *)
+
+(* FG: aliases added by matita compiled with OCaml 4.0.5, bah ??? *)
+alias symbol "plus" (instance 3) = "natural plus".
+alias symbol "pair" (instance 2) = "abstract pair".
+alias id "max" = "cic:/matita/arithmetics/nat/max#def:2".
+alias symbol "plus" (instance 5) = "natural plus".
+alias symbol "pair" (instance 4) = "abstract pair".
+definition max_unary_pr ≝ λp,f.unary_pr (λx.0) 
+    (λi. 
+      let k ≝ fst i in
+      let r ≝ fst (snd i) in
+      let a ≝ fst (snd (snd i)) in
+      let x ≝ snd (snd (snd i)) in
+      if p 〈k + a,x〉 then max (f 〈k+a,x〉) r else r).
+
+lemma max_unary_pr1: ∀a,b,p,f,x.
+  max_{i ∈[a x,b x[ | p 〈i,x〉 }(f 〈i,x〉) = 
+    ((max_unary_pr p f) ∘ (λx.〈b x - a x,〈a x,x〉〉)) x.
+#a #b #p #f #x normalize >fst_pair >snd_pair @max_prim_rec1
+qed.
+
+(*
+lemma max_unary_pr: ∀a,b,p,f,x.
+  max_{i ∈[a,b[ | p 〈i,x〉 }(f 〈i,x〉) = 
+    prim_rec (λi.0) 
+    (λi.if p 〈fst i +a,x〉 then max (f 〈fst i +a ,snd (snd i)〉) (fst (snd i)) else fst (snd i)) (b-a) x.
+*)
+
+(*
+definition unary_compl ≝ λp,f,hf.
+  unary_pr MSC
+   (λx:ℕ
+    .fst (snd x)
+     +hf
+      〈fst x,
+      〈unary_pr (λx0:ℕ.O)
+       (λi:ℕ
+        .(let (k:ℕ) ≝fst i in 
+          let (r:ℕ) ≝fst (snd i) in 
+          let (a:ℕ) ≝fst (snd (snd i)) in 
+          let (x:ℕ) ≝snd (snd (snd i)) in 
+          if p 〈k+a,x〉 then max (f 〈k+a,x〉) r else r )) 〈fst x,snd (snd x)〉,
+      snd (snd x)〉〉). *)
+
+(* FG: aliases added by matita compiled with OCaml 4.0.5, bah ??? *)   
+alias symbol "plus" (instance 6) = "natural plus".
+alias symbol "pair" (instance 5) = "abstract pair".
+alias symbol "plus" (instance 4) = "natural plus".
+alias symbol "pair" (instance 3) = "abstract pair".
+alias symbol "plus" (instance 2) = "natural plus".
+alias symbol "plus" (instance 1) = "natural plus".
+definition aux_compl ≝ λhp,hf.λi.
+  let k ≝ fst i in 
+  let r ≝ fst (snd i) in 
+  let a ≝ fst (snd (snd i)) in 
+  let x ≝ snd (snd (snd i)) in 
+  hp 〈k+a,x〉 + hf 〈k+a,x〉 + (* was MSC r*) MSC i .
+  
+definition aux_compl1 ≝ λhp,hf.λi.
+  let k ≝ fst i in 
+  let r ≝ fst (snd i) in 
+  let a ≝ fst (snd (snd i)) in 
+  let x ≝ snd (snd (snd i)) in 
+  hp 〈k+a,x〉 + hf 〈k+a,x〉 + MSC r.
+
+lemma aux_compl1_def: ∀k,r,m,hp,hf. 
+  aux_compl1 hp hf 〈k,〈r,m〉〉 = 
+  let a ≝ fst m in 
+  let x ≝ snd m in 
+  hp 〈k+a,x〉 + hf 〈k+a,x〉 + MSC r.
+#k #r #m #hp #hf normalize >fst_pair >snd_pair >snd_pair >fst_pair //
+qed.
+
+lemma aux_compl1_def1: ∀k,r,a,x,hp,hf. 
+  aux_compl1 hp hf 〈k,〈r,〈a,x〉〉〉 = hp 〈k+a,x〉 + hf 〈k+a,x〉 + MSC r.
+#k #r #a #x #hp #hf normalize >fst_pair >snd_pair >snd_pair >fst_pair 
+>fst_pair >snd_pair //
+qed.
+
+  
+axiom Oaux_compl: ∀hp,hf. O (aux_compl1 hp hf) (aux_compl hp hf).
+  
+(* 
+definition IF ≝ λb,f,g:nat →option nat. λx.
+  match b x with 
+  [None ⇒ None ?
+  |Some n ⇒ if (eqb n 0) then f x else g x].
+*)
+
+axiom CF_if: ∀b:nat → bool. ∀f,g,s. CF s b → CF s f → CF s g → 
+  CF s (λx. if b x then f x else g x).
+
+(*
+lemma IF_CF: ∀b,f,g,sb,sf,sg. CF sb b → CF sf f → CF sg g → 
+  CF (λn. sb n + sf n + sg n) (IF b f g).
+#b #f #g #sb #sf #sg #Hb #Hf #Hg @IF_CF_new
+  [@(monotonic_CF … Hb) @O_plus_l @O_plus_l //
+  |@(monotonic_CF … Hf) @O_plus_l @O_plus_r //
+  |@(monotonic_CF … Hg) @O_plus_r //
+  ]
+qed.
+*)
+
+axiom CF_le: ∀h,f,g. CF h f → CF h g → CF h (λx. leb (f x) (g x)). 
+axiom CF_max1: ∀h,f,g. CF h f → CF h g → CF h (λx. max (f x) (g x)). 
+axiom CF_plus: ∀h,f,g. CF h f → CF h g → CF h (λx. f x + g x). 
+axiom CF_minus: ∀h,f,g. CF h f → CF h g → CF h (λx. f x - g x). 
+
+axiom MSC_prop: ∀f,h. CF h f → ∀x. MSC (f x) ≤ h x.
+
+lemma MSC_max: ∀f,h,x. CF h f → MSC (max_{i < x}(f i)) ≤ max_{i < x}(h i).
+#f #h #x #hf elim x // #i #Hind >bigop_Strue [|//] >bigop_Strue [|//]
+whd in match (max ??); 
+cases (true_or_false (leb (f i) (bigop i (λi0:ℕ.true) ? 0 max(λi0:ℕ.f i0))))
+#Hcase >Hcase 
+  [@(transitive_le … Hind) @le_maxr //
+  |@(transitive_le … (MSC_prop … hf i)) @le_maxl //
+  ]
+qed.
+  
+lemma CF_max: ∀a,b.∀p:nat →bool.∀f,ha,hb,hp,hf,s.
+  CF ha a → CF hb b → CF hp p → CF hf f → 
+  O s (λx.ha x + hb x + 
+       (∑_{i ∈[a x ,b x[ }
+         (hp 〈i,x〉 + hf 〈i,x〉 + max_{i ∈ [a x, b x [ }(hf 〈i,x〉)))) →
+  CF s (λx.max_{i ∈[a x,b x[ | p 〈i,x〉 }(f 〈i,x〉)).
+#a #b #p #f #ha #hb #hp #hf #s #CFa #CFb #CFp #CFf #HO 
+@ext_CF1 [|#x @max_unary_pr1]
+@(CF_comp ??? (λx.ha x + hb x))
+  [|@CF_comp_pair
+    [@CF_minus [@(O_to_CF … CFb) @O_plus_r // |@(O_to_CF … CFa) @O_plus_l //]
+    |@CF_comp_pair 
+      [@(O_to_CF … CFa) @O_plus_l // 
+      | @(O_to_CF … CF_id) @O_plus_r @(proj1 … CFb)
+      ]
+    ]
+  |@(CF_prim_rec … MSC … (aux_compl1 hp hf))
+     [@CF_const
+     |@(O_to_CF … (Oaux_compl … ))
+      @CF_if 
+       [@(CF_comp p … MSC … CFp) 
+         [@CF_comp_pair 
+           [@CF_plus [@CF_fst| @CF_comp_fst @CF_comp_snd @CF_snd]
+           |@CF_comp_snd @CF_comp_snd @CF_snd]
+         |@le_to_O #x normalize >commutative_plus >associative_plus @le_plus //
+         ]
+       |@CF_max1 
+         [@(CF_comp f … MSC … CFf) 
+           [@CF_comp_pair 
+             [@CF_plus [@CF_fst| @CF_comp_fst @CF_comp_snd @CF_snd]
+             |@CF_comp_snd @CF_comp_snd @CF_snd]
+           |@le_to_O #x normalize >commutative_plus // 
+           ]
+         |@CF_comp_fst @(monotonic_CF … CF_snd) normalize //
+         ]
+       |@CF_comp_fst @(monotonic_CF … CF_snd) normalize //
+       ]  
+     |@O_refl
+     ]
+  |@(O_trans … HO) -HO
+   @(O_trans ? (λx:ℕ
+   .ha x+hb x
+    +bigop (b x-a x) (λi:ℕ.true) ? (MSC 〈a x,x〉) plus
+     (λi:ℕ
+      .(λi0:ℕ
+        .hp 〈i0,x〉+hf 〈i0,x〉
+         +bigop (b x-a x) (λi1:ℕ.true) ? 0 max
+          (λi1:ℕ.(λi2:ℕ.hf 〈i2,x〉) (i1+a x))) (i+a x))))
+    [
+   @le_to_O #n @le_plus // whd in match (unary_pr ???);
+   >fst_pair >snd_pair >bigop_prim_rec elim (b n - a n)
+    [normalize //
+    |#x #Hind >prim_rec_S >fst_pair >snd_pair >fst_pair >snd_pair >aux_compl1_def1
+     >prim_rec_S >fst_pair >snd_pair >fst_pair >snd_pair >fst_pair 
+     >snd_pair normalize in ⊢ (??%); >commutative_plus @le_plus
+      [-Hind @le_plus // normalize >fst_pair >snd_pair 
+       @(transitive_le ? (bigop x (λi1:ℕ.true) ? 0 (λn0:ℕ.λm:ℕ.if leb n0 m then m else n0 )
+         (λi1:ℕ.hf 〈i1+a n,n〉)))
+        [elim x [normalize @MSC_le]
+         #x0 #Hind >prim_rec_S >fst_pair >snd_pair >snd_pair >snd_pair
+         >fst_pair >fst_pair cases (p 〈x0+a n,n〉) normalize
+          [cases (true_or_false (leb (f 〈x0+a n,n〉)
+            (prim_rec (λx00:ℕ.O)
+             (λi:ℕ
+            .if p 〈fst i+fst (snd (snd i)),snd (snd (snd i))〉 
+             then if leb (f 〈fst i+fst (snd (snd i)),snd (snd (snd i))〉)
+                           (fst (snd i)) 
+                      then fst (snd i) 
+                      else f 〈fst i+fst (snd (snd i)),snd (snd (snd i))〉  
+             else fst (snd i) ) x0 〈a n,n〉))) #Hcase >Hcase normalize
+           [@(transitive_le … Hind) -Hind @(le_maxr … (le_n …))
+           |@(transitive_le … (MSC_prop … CFf …)) @(le_maxl … (le_n …))
+           ]
+         |@(transitive_le … Hind) -Hind @(le_maxr … (le_n …))
+         ]
+       |@(le_maxr … (le_n …))
+       ]
+     |@(transitive_le … Hind) -Hind 
+      generalize in match (bigop x (λi:ℕ.true) ? 0 max
+              (λi1:ℕ.(λi2:ℕ.hf 〈i2,n〉) (i1+a n))); #c
+      generalize in match (hf 〈x+a n,n〉); #c1
+      elim x [//] #x0 #Hind 
+      >prim_rec_S >prim_rec_S normalize >fst_pair >fst_pair >snd_pair 
+      >snd_pair >snd_pair >snd_pair >snd_pair >snd_pair >fst_pair >fst_pair 
+      >fst_pair @le_plus 
+       [@le_plus // cases (true_or_false (leb c1 c)) #Hcase 
+        >Hcase normalize // @lt_to_le @not_le_to_lt @(leb_false_to_not_le ?? Hcase)
+       |@Hind
+       ]
+     ]
+   ]
+ |@O_plus [@O_plus_l //] @le_to_O #x 
+  <bigop_plus_c @le_plus // @(transitive_le … (MSC_pair …)) @le_plus 
+   [@MSC_prop @CFa | @MSC_prop @(O_to_CF MSC … (CF_const x)) @(proj1 … CFb)]
+ ]
+qed.
+       
+(* old
 axiom CF_max: ∀a,b.∀p:nat →bool.∀f,ha,hb,hp,hf,s.
   CF ha a → CF hb b → CF hp p → CF hf f → 
   O s (λx.ha x + hb x + ∑_{i ∈[a x ,b x[ }(hp 〈i,x〉 + hf 〈i,x〉)) →
-  CF s (λx.max_{i ∈[a x,b x[ | p 〈i,x〉 }(f 〈i,x〉)). 
-
+  CF s (λx.max_{i ∈[a x,b x[ | p 〈i,x〉 }(f 〈i,x〉)). *)
+  
 (******************************** minimization ********************************) 
 
-axiom CF_mu: ∀a,b.∀f:nat →bool.∀sa,sb,sf,s.
+alias symbol "plus" (instance 2) = "natural plus".
+alias symbol "plus" (instance 5) = "natural plus".
+alias symbol "plus" (instance 1) = "natural plus".
+alias symbol "plus" (instance 4) = "natural plus".
+alias symbol "pair" (instance 3) = "abstract pair".
+alias id "O" = "cic:/matita/arithmetics/nat/nat#con:0:1:0".
+let rec my_minim a f x k on k ≝
+  match k with
+  [O ⇒ a
+  |S p ⇒ if eqb (my_minim a f x p) (a+p) 
+         then if f 〈a+p,x〉 then a+p else S(a+p)
+         else (my_minim a f x p) ].
+         
+lemma my_minim_S : ∀a,f,x,k. 
+  my_minim a f x (S k) = 
+    if eqb (my_minim a f x k) (a+k) 
+    then if f 〈a+k,x〉 then a+k else S(a+k)
+    else (my_minim a f x k) .
+// qed.
+  
+lemma my_minim_fa : ∀a,f,x,k. f〈a,x〉 = true → my_minim a f x k = a.
+#a #f #x #k #H elim k // #i #Hind normalize >Hind
+cases (true_or_false (eqb a (a+i))) #Hcase >Hcase normalize //
+<(eqb_true_to_eq … Hcase) >H //
+qed.
+
+lemma my_minim_nfa : ∀a,f,x,k. f〈a,x〉 = false → 
+my_minim a f x (S k) = my_minim (S a) f x k.
+#a #f #x #k #H elim k  
+  [normalize <plus_n_O >H >eq_to_eqb_true // 
+  |#i #Hind >my_minim_S >Hind >my_minim_S <plus_n_Sm //
+  ]
+qed.
+
+lemma my_min_eq : ∀a,f,x,k.
+  min k a (λi.f 〈i,x〉) = my_minim a f x k.
+#a #f #x #k lapply a -a elim k // #i #Hind #a normalize in ⊢ (??%?);
+cases (true_or_false (f 〈a,x〉)) #Hcase >Hcase 
+  [>(my_minim_fa … Hcase) // | >Hind @sym_eq @(my_minim_nfa … Hcase) ]
+qed.
+
+(* cambiare qui: togliere S *)
+
+(* FG: aliases added by matita compiled with OCaml 4.0.5, bah ??? *)
+alias symbol "minus" (instance 1) = "natural minus".
+alias symbol "minus" (instance 3) = "natural minus".
+alias symbol "pair" (instance 2) = "abstract pair".
+definition minim_unary_pr ≝ λf.unary_pr (λx.S(fst x))
+    (λi. 
+      let k ≝ fst i in
+      let r ≝ fst (snd i) in
+      let b ≝ fst (snd (snd i)) in
+      let x ≝ snd (snd (snd i)) in
+      if f 〈b-k,x〉 then b-k else r).
+      
+definition compl_minim_unary ≝ λhf:nat → nat.λi. 
+      let k ≝ fst i in
+      let b ≝ fst (snd (snd i)) in
+      let x ≝ snd (snd (snd i)) in
+      hf 〈b-k,x〉 + MSC 〈k,〈S b,x〉〉.
+
+definition compl_minim_unary_aux ≝ λhf,i. 
+      let k ≝ fst i in
+      let r ≝ fst (snd i) in
+      let b ≝ fst (snd (snd i)) in
+      let x ≝ snd (snd (snd i)) in
+      hf 〈b-k,x〉 + MSC i.
+
+lemma compl_minim_unary_aux_def : ∀hf,k,r,b,x.
+  compl_minim_unary_aux hf 〈k,〈r,〈b,x〉〉〉 = hf 〈b-k,x〉 + MSC 〈k,〈r,〈b,x〉〉〉.
+#hf #k #r #b #x normalize >snd_pair >snd_pair >snd_pair >fst_pair >fst_pair //
+qed.
+
+lemma compl_minim_unary_def : ∀hf,k,r,b,x.
+  compl_minim_unary hf 〈k,〈r,〈b,x〉〉〉 = hf 〈b-k,x〉 + MSC 〈k,〈S b,x〉〉.
+#hf #k #r #b #x normalize >snd_pair >snd_pair >snd_pair >fst_pair >fst_pair //
+qed.
+
+lemma compl_minim_unary_aux_def2 : ∀hf,k,r,x.
+  compl_minim_unary_aux hf 〈k,〈r,x〉〉 = hf 〈fst x-k,snd x〉 + MSC 〈k,〈r,x〉〉.
+#hf #k #r #x normalize >snd_pair >snd_pair >fst_pair //
+qed.
+
+lemma compl_minim_unary_def2 : ∀hf,k,r,x.
+  compl_minim_unary hf 〈k,〈r,x〉〉 = hf 〈fst x-k,snd x〉 + MSC 〈k,〈S(fst x),snd x〉〉.
+#hf #k #r #x normalize >snd_pair >snd_pair >fst_pair //
+qed.
+
+lemma min_aux: ∀a,f,x,k. min (S k) (a x) (λi:ℕ.f 〈i,x〉) =
+  ((minim_unary_pr f) ∘ (λx.〈S k,〈a x + k,x〉〉)) x.
+#a #f #x #k whd in ⊢ (???%); >fst_pair >snd_pair
+lapply a -a (* @max_prim_rec1 *)
+elim k
+  [normalize #a >fst_pair >snd_pair >fst_pair >snd_pair >snd_pair >fst_pair 
+   <plus_n_O <minus_n_O >fst_pair //
+  |#i #Hind #a normalize in ⊢ (??%?); >prim_rec_S >fst_pair >snd_pair
+   >fst_pair >snd_pair >snd_pair >fst_pair <plus_n_Sm <(Hind (λx.S (a x)))
+   whd in ⊢ (???%); >minus_S_S <(minus_plus_m_m (a x) i) //
+qed.
+
+lemma minim_unary_pr1: ∀a,b,f,x.
+  μ_{i ∈[a x,b x]}(f 〈i,x〉) = 
+    if leb (a x) (b x) then ((minim_unary_pr f) ∘ (λx.〈S (b x) - a x,〈b x,x〉〉)) x
+    else (a x).
+#a #b #f #x cases (true_or_false (leb (a x) (b x))) #Hcase >Hcase
+  [cut (b x = a x + (b x - a x))
+    [>commutative_plus <plus_minus_m_m // @leb_true_to_le // ]
+   #Hcut whd in ⊢ (???%); >minus_Sn_m [|@leb_true_to_le //]
+   >min_aux whd in ⊢ (??%?); <Hcut //
+  |>eq_minus_O // @not_le_to_lt @leb_false_to_not_le //
+  ]
+qed.
+
+axiom sum_inv: ∀a,b,f.∑_{i ∈ [a,S b[ }(f i) = ∑_{i ∈ [a,S b[ }(f (a + b - i)).
+
+(*
+#a #b #f @(bigop_iso … plusAC) whd %{(λi.b - a - i)} %{(λi.b - a -i)} %
+  [%[#i #lti #_ normalize @eq_f >commutative_plus <plus_minus_associative 
+    [2: @le_minus_to_plus_r //
+     [// @eq_f @@sym_eq @plus_to_minus 
+    |#i #Hi #_ % [% [@le_S_S 
+*)
+
+example sum_inv_check : ∑_{i ∈ [3,6[ }(i*i) = ∑_{i ∈ [3,6[ }((8-i)*(8-i)).
+normalize // qed.
+
+(* provo rovesciando la somma *)
+
+axiom daemon: ∀P:Prop.P.
+
+lemma CF_mu: ∀a,b.∀f:nat →bool.∀sa,sb,sf,s.
+  CF sa a → CF sb b → CF sf f → 
+  O s (λx.sa x + sb x + ∑_{i ∈[a x ,S(b x)[ }(sf 〈i,x〉 + MSC 〈b x - i,〈S(b x),x〉〉)) →
+  CF s (λx.μ_{i ∈[a x,b x] }(f 〈i,x〉)).
+#a #b #f #ha #hb #hf #s #CFa #CFb #CFf #HO 
+@ext_CF1 [|#x @minim_unary_pr1]
+@CF_if 
+  [@CF_le @(O_to_CF … HO) 
+    [@(O_to_CF … CFa) @O_plus_l @O_plus_l  @O_refl
+    |@(O_to_CF … CFb) @O_plus_l @O_plus_r @O_refl
+    ]
+  |@(CF_comp ??? (λx.ha x + hb x))
+    [|@CF_comp_pair
+      [@CF_minus [@CF_compS @(O_to_CF … CFb) @O_plus_r // |@(O_to_CF … CFa) @O_plus_l //]
+      |@CF_comp_pair 
+        [@(O_to_CF … CFb) @O_plus_r //
+        |@(O_to_CF … CF_id) @O_plus_r @(proj1 … CFb)
+        ]
+      ]
+    |@(CF_prim_rec_gen … MSC … (compl_minim_unary_aux hf))
+      [@((λx:ℕ.fst (snd x)
+          +compl_minim_unary hf
+          〈fst x,
+          〈unary_pr fst
+            (λi:ℕ
+             .(let (k:ℕ) ≝fst i in 
+               let (r:ℕ) ≝fst (snd i) in 
+               let (b:ℕ) ≝fst (snd (snd i)) in 
+               let (x:ℕ) ≝snd (snd (snd i)) in if f 〈b-S k,x〉 then b-S k else r ))
+          〈fst x,snd (snd x)〉,
+          snd (snd x)〉〉))
+      |@CF_compS @CF_fst
+      |@CF_if 
+        [@(CF_comp f … MSC … CFf) 
+          [@CF_comp_pair 
+            [@CF_minus [@CF_comp_fst @CF_comp_snd @CF_snd|@CF_fst]
+            |@CF_comp_snd @CF_comp_snd @CF_snd]
+          |@le_to_O #x normalize >commutative_plus //
+          ]
+        |@(O_to_CF … MSC)
+          [@le_to_O #x normalize //
+          |@CF_minus
+            [@CF_comp_fst @CF_comp_snd @CF_snd |@CF_fst]
+          ]
+        |@CF_comp_fst @(monotonic_CF … CF_snd) normalize //
+        ]
+      |@O_plus    
+        [@O_plus_l @O_refl 
+        |@O_plus_r @O_ext2 [||#x >compl_minim_unary_aux_def2 @refl]
+         @O_trans [||@le_to_O #x >compl_minim_unary_def2 @le_n]
+         @O_plus [@O_plus_l //] 
+         @O_plus_r 
+         @O_trans [|@le_to_O #x @MSC_pair] @O_plus 
+           [@le_to_O #x @monotonic_MSC @(transitive_le ???? (le_fst …)) 
+            >fst_pair @le_n]
+         @O_trans [|@le_to_O #x @MSC_pair] @O_plus
+           [@le_to_O #x @monotonic_MSC @(transitive_le ???? (le_snd …))
+            >snd_pair @(transitive_le ???? (le_fst …)) >fst_pair 
+            normalize >snd_pair >fst_pair lapply (surj_pair x)
+            * #x1 * #x2 #Hx >Hx >fst_pair >snd_pair elim x1 //
+            #i #Hind >prim_rec_S >fst_pair >snd_pair >snd_pair >fst_pair
+            cases (f ?) [@le_S // | //]]
+         @le_to_O #x @monotonic_MSC @(transitive_le ???? (le_snd …)) >snd_pair
+         >(expand_pair (snd (snd x))) in ⊢ (?%?); @le_pair //
+        ]
+      ] 
+    |cut (O s (λx.ha x + hb x + 
+            ∑_{i ∈[a x ,S(b x)[ }(hf 〈a x+b x-i,x〉 + MSC 〈b x -(a x+b x-i),〈S(b x),x〉〉)))
+      [@(O_ext2 … HO) #x @eq_f @sum_inv] -HO #HO
+     @(O_trans … HO) -HO
+     @(O_trans ? (λx:ℕ.ha x+hb x
+       +bigop (S(b x)-a x) (λi:ℕ.true) ? 
+        (MSC 〈b x,x〉) plus (λi:ℕ.(λj.hf j + MSC 〈b x - fst j,〈S(b (snd j)),snd j〉〉) 〈b x- i,x〉)))
+      [@le_to_O #n @le_plus // whd in match (unary_pr ???); 
+       >fst_pair >snd_pair >(bigop_prim_rec_dec1 a b ? (λi.true)) 
+        (* it is crucial to recall that the index is bound by S(b x) *)
+        cut (S (b n) - a n ≤ S (b n)) [//]
+        elim (S(b n) - a n)
+        [normalize //  
+        |#x #Hind #lex >prim_rec_S >fst_pair >snd_pair >fst_pair >snd_pair 
+         >compl_minim_unary_def >prim_rec_S >fst_pair >snd_pair >fst_pair 
+         >snd_pair >fst_pair >snd_pair >fst_pair whd in ⊢ (??%); >commutative_plus 
+         @le_plus [2:@Hind @le_S @le_S_S_to_le @lex] -Hind >snd_pair 
+         >minus_minus_associative // @le_S_S_to_le // 
+        ]
+      |@O_plus [@O_plus_l //] @O_ext2 [||#x @bigop_plus_c] 
+       @O_plus 
+        [@O_plus_l @O_trans [|@le_to_O #x @MSC_pair]
+         @O_plus [@O_plus_r @le_to_O @(MSC_prop … CFb)|@O_plus_r @(proj1 … CFb)]
+        |@O_plus_r @(O_ext2 … (O_refl …)) #x @same_bigop
+          [//|#i #H #_ @eq_f2 [@eq_f @eq_f2 //|>fst_pair @eq_f @eq_f2  //]   
+        ]
+      ]
+    ]
+  ] 
+  |@(O_to_CF … CFa) @(O_trans … HO) @O_plus_l @O_plus_l @O_refl
+  ]
+qed.
+
+(*
+lemma CF_mu: ∀a,b.∀f:nat →bool.∀sa,sb,sf,s.
   CF sa a → CF sb b → CF sf f → 
   O s (λx.sa x + sb x + ∑_{i ∈[a x ,S(b x)[ }(sf 〈i,x〉)) →
   CF s (λx.μ_{i ∈[a x,b x] }(f 〈i,x〉)).
+#a #b #f #ha #hb #hf #s #CFa #CFb #CFf #HO 
+@ext_CF1 [|#x @minim_unary_pr1]
+@(CF_comp ??? (λx.ha x + hb x))
+  [|@CF_comp_pair
+    [@CF_minus [@CF_compS @(O_to_CF … CFb) @O_plus_r // |@(O_to_CF … CFa) @O_plus_l //]
+    |@CF_comp_pair 
+      [@CF_max1 [@(O_to_CF … CFa) @O_plus_l // | @CF_compS @(O_to_CF … CFb) @O_plus_r //]
+      | @(O_to_CF … CF_id) @O_plus_r @(proj1 … CFb)
+      ]
+    ]
+  |@(CF_prim_rec … MSC … (compl_minim_unary_aux hf))
+    [@CF_fst
+    |@CF_if 
+      [@(CF_comp f … MSC … CFf) 
+        [@CF_comp_pair 
+          [@CF_minus [@CF_comp_fst @CF_comp_snd @CF_snd|@CF_compS @CF_fst]
+          |@CF_comp_snd @CF_comp_snd @CF_snd]
+        |@le_to_O #x normalize >commutative_plus //
+        ]
+      |@(O_to_CF … MSC)
+        [@le_to_O #x normalize //
+        |@CF_minus
+          [@CF_comp_fst @CF_comp_snd @CF_snd |@CF_compS @CF_fst]
+        ]
+      |@CF_comp_fst @(monotonic_CF … CF_snd) normalize //
+      ]
+    |@O_refl
+    ]
+  |@(O_trans … HO) -HO
+   @(O_trans ? (λx:ℕ
+   .ha x+hb x
+    +bigop (S(b x)-a x) (λi:ℕ.true) ? (MSC 〈a x,x〉) plus (λi:ℕ.hf 〈i+a x,x〉)))
+  [@le_to_O #n @le_plus // whd in match (unary_pr ???); 
+   >fst_pair >snd_pair >(bigop_prim_rec ? (λn.S(b n)) ? (λi.true)) elim (S(b n) - a n)
+    [normalize @monotonic_MSC @le_pair
+    |#x #Hind >prim_rec_S >fst_pair >snd_pair >fst_pair >snd_pair >compl_minim_unary_def
+     >prim_rec_S >fst_pair >snd_pair >fst_pair >snd_pair >fst_pair 
+     >snd_pair normalize in ⊢ (??%); >commutative_plus @le_plus
+      [-Hind @le_plus // normalize >fst_pair >snd_pair 
+       @(transitive_le ? (bigop x (λi1:ℕ.true) ? 0 (λn0:ℕ.λm:ℕ.if leb n0 m then m else n0 )
+         (λi1:ℕ.hf 〈i1+a n,n〉)))
+        [elim x [normalize @MSC_le]
+         #x0 #Hind >prim_rec_S >fst_pair >snd_pair >snd_pair >snd_pair
+         >fst_pair >fst_pair cases (p 〈x0+a n,n〉) normalize
+          [cases (true_or_false (leb (f 〈x0+a n,n〉)
+            (prim_rec (λx00:ℕ.O)
+             (λi:ℕ
+            .if p 〈fst i+fst (snd (snd i)),snd (snd (snd i))〉 
+             then if leb (f 〈fst i+fst (snd (snd i)),snd (snd (snd i))〉)
+                           (fst (snd i)) 
+                      then fst (snd i) 
+                      else f 〈fst i+fst (snd (snd i)),snd (snd (snd i))〉  
+             else fst (snd i) ) x0 〈a n,n〉))) #Hcase >Hcase normalize
+           [@(transitive_le … Hind) -Hind @(le_maxr … (le_n …))
+           |@(transitive_le … (MSC_prop … CFf …)) @(le_maxl … (le_n …))
+           ]
+         |@(transitive_le … Hind) -Hind @(le_maxr … (le_n …))
+         ]
+       |@(le_maxr … (le_n …))
+       ]
+  
+  
+   @(O_trans ? (λx:ℕ
+   .ha x+hb x
+    +bigop (b x-a x) (λi:ℕ.true) ? (MSC 〈a x,x〉) plus
+     (λi:ℕ
+      .(λi0:ℕ
+        .hp 〈i0,x〉+hf 〈i0,x〉
+         +bigop (b x-a x) (λi1:ℕ.true) ? 0 max
+          (λi1:ℕ.(λi2:ℕ.hf 〈i2,x〉) (i1+a x))) (i+a x))))
+    [
+   @le_to_O #n @le_plus // whd in match (unary_pr ???);
+   >fst_pair >snd_pair >bigop_prim_rec elim (b n - a n)
+    [normalize //
+    |#x #Hind >prim_rec_S >fst_pair >snd_pair >fst_pair >snd_pair >aux_compl1_def1
+     >prim_rec_S >fst_pair >snd_pair >fst_pair >snd_pair >fst_pair 
+     >snd_pair normalize in ⊢ (??%); >commutative_plus @le_plus
+      [-Hind @le_plus // normalize >fst_pair >snd_pair 
+       @(transitive_le ? (bigop x (λi1:ℕ.true) ? 0 (λn0:ℕ.λm:ℕ.if leb n0 m then m else n0 )
+         (λi1:ℕ.hf 〈i1+a n,n〉)))
+        [elim x [normalize @MSC_le]
+         #x0 #Hind >prim_rec_S >fst_pair >snd_pair >snd_pair >snd_pair
+         >fst_pair >fst_pair cases (p 〈x0+a n,n〉) normalize
+          [cases (true_or_false (leb (f 〈x0+a n,n〉)
+            (prim_rec (λx00:ℕ.O)
+             (λi:ℕ
+            .if p 〈fst i+fst (snd (snd i)),snd (snd (snd i))〉 
+             then if leb (f 〈fst i+fst (snd (snd i)),snd (snd (snd i))〉)
+                           (fst (snd i)) 
+                      then fst (snd i) 
+                      else f 〈fst i+fst (snd (snd i)),snd (snd (snd i))〉  
+             else fst (snd i) ) x0 〈a n,n〉))) #Hcase >Hcase normalize
+           [@(transitive_le … Hind) -Hind @(le_maxr … (le_n …))
+           |@(transitive_le … (MSC_prop … CFf …)) @(le_maxl … (le_n …))
+           ]
+         |@(transitive_le … Hind) -Hind @(le_maxr … (le_n …))
+         ]
+       |@(le_maxr … (le_n …))
+       ]
+     |@(transitive_le … Hind) -Hind 
+      generalize in match (bigop x (λi:ℕ.true) ? 0 max
+              (λi1:ℕ.(λi2:ℕ.hf 〈i2,n〉) (i1+a n))); #c
+      generalize in match (hf 〈x+a n,n〉); #c1
+      elim x [//] #x0 #Hind 
+      >prim_rec_S >prim_rec_S normalize >fst_pair >fst_pair >snd_pair 
+      >snd_pair >snd_pair >snd_pair >snd_pair >snd_pair >fst_pair >fst_pair 
+      >fst_pair @le_plus 
+       [@le_plus // cases (true_or_false (leb c1 c)) #Hcase 
+        >Hcase normalize // @lt_to_le @not_le_to_lt @(leb_false_to_not_le ?? Hcase)
+       |@Hind
+       ]
+     ]
+   ]
+ |@O_plus [@O_plus_l //] @le_to_O #x 
+  <bigop_plus_c @le_plus // @(transitive_le … (MSC_pair …)) @le_plus 
+   [@MSC_prop @CFa | @MSC_prop @(O_to_CF MSC … (CF_const x)) @(proj1 … CFb)]
+ ]
+qed.
+
+axiom CF_mu: ∀a,b.∀f:nat →bool.∀sa,sb,sf,s.
+  CF sa a → CF sb b → CF sf f → 
+  O s (λx.sa x + sb x + ∑_{i ∈[a x ,S(b x)[ }(sf 〈i,x〉)) →
+  CF s (λx.μ_{i ∈[a x,b x] }(f 〈i,x〉)).*)
   
 (************************************* smn ************************************)
 axiom smn: ∀f,s. CF s f → ∀x. CF (λy.s 〈x,y〉) (λy.f 〈x,y〉).
@@ -495,7 +1184,7 @@ qed.
 
 (******************** complexity of g ********************)
 
-definition unary_g ≝ λh.λux. g h (fst ux) (snd ux).
+(*definition unary_g ≝ λh.λux. g h (fst ux) (snd ux).
 definition auxg ≝ 
   λh,ux. max_{i ∈[fst ux,snd ux[ | eqb (min_input h i (snd ux)) (snd ux)} 
     (out i (snd ux) (h (S i) (snd ux))).
@@ -558,7 +1247,7 @@ lemma compl_g4 : ∀h,s1,s.
   [@CF_compS @CF_fst 
   |@CF_comp_snd @CF_snd
   |@(O_trans … HO) @O_plus [@O_plus @O_plus_l // | @O_plus_r //]
-qed.
+qed.*)
 
 (************************* a couple of technical lemmas ***********************)
 lemma minus_to_0: ∀a,b. a ≤ b → minus a b = 0.
@@ -612,7 +1301,7 @@ qed.
 
 (**************************** end of technical lemmas *************************)
 
-lemma compl_g5 : ∀h,s1.(∀n. monotonic ℕ le (λa:ℕ.s1 〈a,n〉)) →
+(*lemma compl_g5 : ∀h,s1.(∀n. monotonic ℕ le (λa:ℕ.s1 〈a,n〉)) →
   (CF s1 
     (λp.termb (fst (snd p)) (fst p) (h (S (fst (snd p))) (fst p)))) →
   CF (λx.MSC x + (snd (snd x)-fst x)*s1 〈snd (snd x),x〉) 
@@ -658,7 +1347,7 @@ lemma compl_g6: ∀h.
       ] 
     |@le_to_O #x @monotonic_sU // @(le_maxl … (le_n …)) ]
   ]
-qed.
+qed. *)
 
 definition big : nat →nat ≝ λx. 
   let m ≝ max (fst x) (snd x) in 〈m,m〉.
@@ -675,7 +1364,7 @@ definition faux2 ≝ λh.
   (λx.MSC x + (snd (snd x)-fst x)*
     (λx.sU 〈max (fst(snd x)) (snd(snd x)),〈fst x,h (S (fst (snd x))) (fst x)〉〉) 〈snd (snd x),x〉).
  
-lemma compl_g7: ∀h. 
+(*lemma compl_g7: ∀h. 
   constructible (λx. h (fst x) (snd x)) →
   (∀n. monotonic ? le (h n)) → 
   CF (λx.MSC x + (snd (snd x)-fst x)*sU 〈max (fst x) (snd x),〈snd (snd x),h (S (fst x)) (snd (snd x))〉〉)
@@ -697,7 +1386,7 @@ cases (decidable_le (fst x) (snd(snd x)))
   [#Hle @le_times // @monotonic_sU  
   |#Hlt >(minus_to_0 … (lt_to_le … )) [// | @not_le_to_lt @Hlt]
   ]
-qed.
+qed.*)
 
 definition out_aux ≝ λh.
   out_unary ∘ λp.〈fst p,〈snd(snd p),h (S (fst p)) (snd (snd p))〉〉.
@@ -738,7 +1427,7 @@ lemma compl_g8: ∀h.
   ]
 qed.
 
-lemma compl_g9 : ∀h. 
+(*lemma compl_g9 : ∀h. 
   constructible (λx. h (fst x) (snd x)) →
   (∀n. monotonic ? le (h n)) → 
   (∀n,a,b. a ≤ b → b ≤ n → h b n ≤ h a n) →
@@ -769,7 +1458,7 @@ lemma compl_g9 : ∀h.
    >associative_plus >distributive_times_plus
    @le_plus [@le_times [@le_S // |>big_def >Hmax //] |//] 
   ]
-qed.
+qed.*)
 
 definition sg ≝ λh,x.
   (S (snd x-fst x))*MSC 〈x,x〉 + (snd x-fst x)*(S(snd x-fst x))*sU 〈x,〈snd x,h (S (fst x)) (snd x)〉〉.
@@ -780,13 +1469,13 @@ lemma sg_def : ∀h,a,b.
 #h #a #b whd in ⊢ (??%?); >fst_pair >snd_pair // 
 qed. 
 
-lemma compl_g11 : ∀h.
+(*lemma compl_g11 : ∀h.
   constructible (λx. h (fst x) (snd x)) →
   (∀n. monotonic ? le (h n)) → 
   (∀n,a,b. a ≤ b → b ≤ n → h b n ≤ h a n) →
   CF (sg h) (unary_g h).
 #h #hconstr #Hm #Ham @compl_g1 @(compl_g9 h hconstr Hm Ham)
-qed. 
+qed.*)
 
 (**************************** closing the argument ****************************)
 
@@ -819,6 +1508,7 @@ lemma h_of_aux_prim_rec : ∀r,c,n,b. h_of_aux r c n b =
   ]
 qed.
 
+(*
 lemma h_of_aux_constr : 
 ∀r,c. constructible (λx.h_of_aux r c (fst x) (snd x)).
 #r #c 
@@ -829,7 +1519,7 @@ lemma h_of_aux_constr :
        (S d)*(MSC 〈〈b-d,b〉,〈b-d,b〉〉) +
         d*(S d)*sU 〈〈b-d,b〉,〈b,r (fst (snd x))〉〉)))
   [#n @sym_eq whd in match (unary_pr ???); @h_of_aux_prim_rec
-  |@constr_prim_rec
+  |@constr_prim_rec*)
 
 definition h_of ≝ λr,p. 
   let m ≝ max (fst p) (snd p) in 
@@ -882,7 +1572,7 @@ axiom h_of_constr : ∀r:nat →nat.
   (∀x. x ≤ r x) → monotonic ? le r → constructible r →
   constructible (h_of r).
 
-lemma speed_compl: ∀r:nat →nat. 
+(*lemma speed_compl: ∀r:nat →nat. 
   (∀x. x ≤ r x) → monotonic ? le r → constructible r →
   CF (h_of r) (unary_g (λi,x. r(h_of r 〈i,x〉))).
 #r #Hr #Hmono #Hconstr @(monotonic_CF … (compl_g11 …)) 
@@ -932,10 +1622,10 @@ lemma speed_compl_i: ∀r:nat →nat.
 @(ext_CF (λx.unary_g (λi,x. r(h_of r 〈i,x〉)) 〈i,x〉))
   [#n whd in ⊢ (??%%); @eq_f @sym_eq >fst_pair >snd_pair %]
 @smn @(ext_CF … (speed_compl r Hr Hmono Hconstr)) #n //
-qed.
+qed.*)
 
 (**************************** the speedup theorem *****************************)
-theorem pseudo_speedup: 
+(*theorem pseudo_speedup: 
   ∀r:nat →nat. (∀x. x ≤ r x) → monotonic ? le r → constructible r →
   ∃f.∀sf. CF sf f → ∃g,sg. f ≈ g ∧ CF sg g ∧ O sf (r ∘ sg).
 (* ∃m,a.∀n. a≤n → r(sg a) < m * sf n. *)
@@ -983,5 +1673,5 @@ lapply (speed_compl_i … Hr Hmono Hconstr (S i)) #Hg
   #y #Uy %{y} @(monotonic_U … Uy) @(transitive_le … Hlesf)
   @Hmono @(mono_h_of2 … Hr Hmono … ltin)
  ]
-qed.
+qed.*)
   
\ No newline at end of file
diff --git a/matita/matita/lib/turing/multi_to_mono/multi_to_mono.ma b/matita/matita/lib/turing/multi_to_mono/multi_to_mono.ma
deleted file mode 100644 (file)
index 0e9bce5..0000000
+++ /dev/null
@@ -1,397 +0,0 @@
-include "turing/auxiliary_machines1.ma".
-include "turing/multi_to_mono/shift_trace_machines.ma".
-
-(******************************************************************************)
-(* mtiL: complete move L for tape i. We reaching the left border of trace i,  *)
-(* add a blank if there is no more tape, then move the i-trace and finally    *)
-(* come back to the head position.                                            *)
-(******************************************************************************)
-
-(* we say that a tape is regular if for any trace after the first blank we
-  only have other blanks *)
-  
-definition all_blanks_in ≝ λsig,l.
-  ∀x. mem ? x l → x = blank sig.  
-definition regular_i  ≝ λsig,n.λl:list (multi_sig sig n).λi.
-  all_blanks_in ? (after_blank ? (trace sig n i l)).
-
-definition regular_trace ≝ λsig,n,a.λls,rs:list (multi_sig sig n).λi.
-  Or (And (regular_i sig n (a::ls) i) (regular_i sig n rs i))
-     (And (regular_i sig n ls i) (regular_i sig n (a::rs) i)).
-         
-axiom regular_tail: ∀sig,n,l,i.
-  regular_i sig n l i → regular_i sig n (tail ? l) i.
-  
-axiom regular_extend: ∀sig,n,l,i.
-   regular_i sig n l i → regular_i sig n (l@[all_blank sig n]) i.
-
-axiom all_blank_after_blank: ∀sig,n,l1,b,l2,i. 
-  nth i ? (vec … b) (blank ?) = blank ? → 
-  regular_i sig n (l1@b::l2) i → all_blanks_in ? (trace sig n i l2).
-   
-lemma regular_trace_extl:  ∀sig,n,a,ls,rs,i.
-  regular_trace sig n a ls rs i → 
-    regular_trace sig n a (ls@[all_blank sig n]) rs i.
-#sig #n #a #ls #rs #i *
-  [* #H1 #H2 % % // @(regular_extend … H1)
-  |* #H1 #H2 %2 % // @(regular_extend … H1)
-  ]
-qed.
-
-lemma regular_cons_hd_rs: ∀sig,n.∀a:multi_sig sig n.∀ls,rs1,rs2,i.
-  regular_trace sig n a ls (rs1@rs2) i → 
-    regular_trace sig n a ls (rs1@((hd ? rs2 (all_blank …))::(tail ? rs2))) i.
-#sig #n #a #ls #rs1 #rs2 #i cases rs2 [2: #b #tl #H @H] 
-*[* #H1 >append_nil #H2 %1 % 
-   [@H1 | whd in match (hd ???); @(regular_extend … rs1) //]
- |* #H1 >append_nil #H2 %2 % 
-   [@H1 | whd in match (hd ???); @(regular_extend … (a::rs1)) //]
- ]
-qed.
-
-lemma eq_trace_to_regular : ∀sig,n.∀a1,a2:multi_sig sig n.∀ls1,ls2,rs1,rs2,i.
-   nth i ? (vec … a1) (blank ?) = nth i ? (vec … a2) (blank ?) →
-   trace sig n i ls1 = trace sig n i ls2 → 
-   trace sig n i rs1 = trace sig n i rs2 →
-   regular_trace sig n a1 ls1 rs1 i → 
-     regular_trace sig n a2 ls2 rs2 i.
-#sig #n #a1 #a2 #ls1 #ls2 #rs1 #rs2 #i #H1 #H2 #H3 #H4
-whd in match (regular_trace ??????); whd in match (regular_i ????);
-whd in match (regular_i ?? rs2 ?); whd in match (regular_i ?? ls2 ?);
-whd in match (regular_i ?? (a2::rs2) ?); whd in match (trace ????);
-<trace_def whd in match (trace ??? (a2::rs2)); <trace_def 
-<H1 <H2 <H3 @H4
-qed.
-
-(******************************* move_to_blank_L ******************************)
-(* we compose machines together to reduce the number of output cases, and 
-   improve semantics *)
-   
-definition move_to_blank_L ≝ λsig,n,i.
-  (move_until ? L (no_blank sig n i)) · extend ? (all_blank sig n).
-
-(*
-definition R_move_to_blank_L ≝ λsig,n,i,t1,t2.
-(current ? t1 = None ? → 
-  t2 = midtape (multi_sig sig n) (left ? t1) (all_blank …) (right ? t1)) ∧
-∀ls,a,rs.t1 = midtape ? ls a rs → 
-  ((no_blank sig n i a = false) ∧ t2 = t1) ∨
-  (∃b,ls1,ls2.
-    (no_blank sig n i b = false) ∧ 
-    (∀j.j ≤n → to_blank_i ?? j (ls1@b::ls2) = to_blank_i ?? j ls) ∧
-    t2 = midtape ? ls2 b ((reverse ? (a::ls1))@rs)). 
-*)
-
-definition R_move_to_blank_L ≝ λsig,n,i,t1,t2.
-(current ? t1 = None ? → 
-  t2 = midtape (multi_sig sig n) (left ? t1) (all_blank …) (right ? t1)) ∧
-∀ls,a,rs.
-  t1 = midtape (multi_sig sig n) ls a rs → 
-  regular_i sig n (a::ls) i →
-  (∀j. j ≠ i → regular_trace … a ls rs j) →
-  (∃b,ls1,ls2.
-    (regular_i sig n (ls1@b::ls2) i) ∧ 
-    (∀j. j ≠ i → regular_trace … 
-      (hd ? (ls1@b::ls2) (all_blank …)) (tail ? (ls1@b::ls2)) rs j) ∧ 
-    (no_blank sig n i b = false) ∧ 
-    (hd (multi_sig sig n) (ls1@[b]) (all_blank …) = a) ∧ (* not implied by the next fact *)
-    (∀j.j ≤n → to_blank_i ?? j (ls1@b::ls2) = to_blank_i ?? j (a::ls)) ∧
-    t2 = midtape ? ls2 b ((reverse ? ls1)@rs)).
-
-theorem sem_move_to_blank_L: ∀sig,n,i. 
-  move_to_blank_L sig n i  ⊨ R_move_to_blank_L sig n i.
-#sig #n #i 
-@(sem_seq_app ?????? 
-  (ssem_move_until_L ? (no_blank sig n i)) (sem_extend ? (all_blank sig n)))
-#tin #tout * #t1 * * #Ht1a #Ht1b * #Ht2a #Ht2b %
-  [#Hcur >(Ht1a Hcur) in Ht2a; /2 by /
-  |#ls #a #rs #Htin #Hreg #Hreg2 -Ht1a cases (Ht1b … Htin)
-    [* #Hnb #Ht1 -Ht1b -Ht2a >Ht1 in Ht2b; >Htin #H 
-     %{a} %{[ ]} %{ls} 
-     %[%[%[%[%[@Hreg|@Hreg2]|@Hnb]|//]|//]|@H normalize % #H1 destruct (H1)]
-    |* 
-    [(* we find the blank *)
-     * #ls1 * #b * #ls2 * * * #H1 #H2 #H3 #Ht1
-     >Ht1 in Ht2b; #Hout -Ht1b
-     %{b} %{(a::ls1)} %{ls2} 
-     %[%[%[%[%[>H1 in Hreg; #H @H 
-              |#j #jneqi whd in match (hd ???); whd in match (tail ??);
-               <H1 @(Hreg2 j jneqi)]|@H2] |//]|>H1 //]
-      |@Hout normalize % normalize #H destruct (H)
-      ]
-    |* #b * #lss * * #H1 #H2 #Ht1 -Ht1b >Ht1 in Ht2a; 
-     whd in match (left ??); whd in match (right ??); #Hout
-     %{(all_blank …)} %{(lss@[b])} %{[]}
-     %[%[%[%[%[<H2 @regular_extend // 
-              |<H2 #j #jneqi whd in match (hd ???); whd in match (tail ??); 
-               @regular_trace_extl @Hreg2 //]
-            |whd in match (no_blank ????); >blank_all_blank //]
-          |<H2 //]
-        |#j #lejn <H2 @sym_eq @to_blank_i_ext]
-      |>reverse_append >reverse_single @Hout normalize // 
-      ]
-    ]
-  ]
-qed.
-
-(******************************************************************************)
-   
-definition shift_i_L ≝ λsig,n,i.
-   ncombf_r (multi_sig …) (shift_i sig n i) (all_blank sig n) ·
-   mti sig n i · 
-   extend ? (all_blank sig n).
-   
-definition R_shift_i_L ≝ λsig,n,i,t1,t2.
-    (∀a,ls,rs. 
-      t1 = midtape ? ls a rs  → 
-      ((∃rs1,b,rs2,a1,rss.
-        rs = rs1@b::rs2 ∧ 
-        nth i ? (vec … b) (blank ?) = (blank ?) ∧
-        (∀x. mem ? x rs1 → nth i ? (vec … x) (blank ?) ≠ (blank ?)) ∧
-        shift_l sig n i (a::rs1) (a1::rss) ∧
-        t2 = midtape (multi_sig sig n) ((reverse ? (a1::rss))@ls) b rs2) ∨
-      (∃b,rss. 
-        (∀x. mem ? x rs → nth i ? (vec … x) (blank ?) ≠ (blank ?)) ∧
-        shift_l sig n i (a::rs) (rss@[b]) ∧
-        t2 = midtape (multi_sig sig n) 
-          ((reverse ? (rss@[b]))@ls) (all_blank sig n) [ ]))).
-
-definition R_shift_i_L_new ≝ λsig,n,i,t1,t2.
-  (∀a,ls,rs. 
-   t1 = midtape ? ls a rs  → 
-   ∃rs1,b,rs2,rss.
-      b = hd ? rs2 (all_blank sig n) ∧
-      nth i ? (vec … b) (blank ?) = (blank ?) ∧
-      rs = rs1@rs2 ∧ 
-      (∀x. mem ? x rs1 → nth i ? (vec … x) (blank ?) ≠ (blank ?)) ∧
-      shift_l sig n i (a::rs1) rss ∧
-      t2 = midtape (multi_sig sig n) ((reverse ? rss)@ls) b (tail ? rs2)). 
-          
-theorem sem_shift_i_L: ∀sig,n,i. shift_i_L sig n i  ⊨ R_shift_i_L sig n i.
-#sig #n #i 
-@(sem_seq_app ?????? 
-  (sem_ncombf_r (multi_sig sig n) (shift_i sig n i)(all_blank sig n))
-   (sem_seq ????? (ssem_mti sig n i) 
-    (sem_extend ? (all_blank sig n))))
-#tin #tout * #t1 * * #Ht1a #Ht1b * #t2 * * #Ht2a #Ht2b * #Htout1 #Htout2
-#a #ls #rs cases rs
-  [#Htin %2 %{(shift_i sig n i a (all_blank sig n))} %{[ ]} 
-   %[%[#x @False_ind | @daemon]
-    |lapply (Ht1a … Htin) -Ht1a -Ht1b #Ht1 
-     lapply (Ht2a … Ht1) -Ht2a -Ht2b #Ht2 >Ht2 in Htout1; 
-     >Ht1 whd in match (left ??); whd in match (right ??); #Htout @Htout // 
-    ]
-  |#a1 #rs1 #Htin 
-   lapply (Ht1b … Htin) -Ht1a -Ht1b #Ht1 
-   lapply (Ht2b … Ht1) -Ht2a -Ht2b *
-    [(* a1 is blank *) * #H1 #H2 %1
-     %{[ ]} %{a1} %{rs1} %{(shift_i sig n i a a1)} %{[ ]}
-     %[%[%[%[// |//] |#x @False_ind] | @daemon]
-      |>Htout2 [>H2 >reverse_single @Ht1 |>H2 >Ht1 normalize % #H destruct (H)]
-      ]
-    |*
-    [* #rs10 * #b * #rs2 * #rss * * * * #H1 #H2 #H3 #H4
-     #Ht2 %1 
-     %{(a1::rs10)} %{b} %{rs2} %{(shift_i sig n i a a1)} %{rss}
-     %[%[%[%[>H1 //|//] |@H3] |@daemon ]
-      |>reverse_cons >associative_append 
-       >H2 in Htout2; #Htout >Htout [@Ht2| >Ht2 normalize % #H destruct (H)]  
-      ]
-    |* #b * #rss * * #H1 #H2 
-     #Ht2 %2
-     %{(shift_i sig n i b (all_blank sig n))} %{(shift_i sig n i a a1::rss)}
-     %[%[@H1 |@daemon ]
-      |>Ht2 in Htout1; #Htout >Htout //
-       whd in match (left ??); whd in match (right ??);
-       >reverse_append >reverse_single >associative_append  >reverse_cons
-       >associative_append // 
-       ]
-     ]
-   ]
- ]
-qed.
-theorem sem_shift_i_L_new: ∀sig,n,i. 
-  shift_i_L sig n i  ⊨ R_shift_i_L_new sig n i.
-#sig #n #i 
-@(Realize_to_Realize … (sem_shift_i_L sig n i))
-#t1 #t2 #H #a #ls #rs #Ht1 lapply (H a ls rs Ht1) *
-  [* #rs1 * #b * #rs2 * #a1 * #rss * * * * #H1 #H2 #H3 #H4 #Ht2
-   %{rs1} %{b} %{(b::rs2)} %{(a1::rss)} 
-   %[%[%[%[%[//|@H2]|@H1]|@H3]|@H4] | whd in match (tail ??); @Ht2]
-  |* #b * #rss * * #H1 #H2 #Ht2
-   %{rs} %{(all_blank sig n)} %{[]} %{(rss@[b])} 
-   %[%[%[%[%[//|@blank_all_blank]|//]|@H1]|@H2] | whd in match (tail ??); @Ht2]
-  ]
-qed.
-   
-
-(*******************************************************************************
-The following machine implements a full move of for a trace: we reach the left 
-border, shift the i-th trace and come back to the head position. *)  
-
-(* this exclude the possibility that traces do not overlap: the head must 
-remain inside all traces *)
-
-definition mtiL ≝ λsig,n,i.
-   move_to_blank_L sig n i · 
-   shift_i_L sig n i ·
-   move_until ? L (no_head sig n). 
-   
-definition Rmtil ≝ λsig,n,i,t1,t2.
-  ∀ls,a,rs. 
-   t1 = midtape (multi_sig sig n) ls a rs → 
-   nth n ? (vec … a) (blank ?) = head ? →  
-   (∀i.regular_trace sig n a ls rs i) → 
-   (* next: we cannot be on rightof on trace i *)
-   (nth i ? (vec … a) (blank ?) = (blank ?) 
-     → nth i ? (vec … (hd ? rs (all_blank …))) (blank ?) ≠ (blank ?)) →
-   no_head_in … ls →   
-   no_head_in … rs  → 
-   (∃ls1,a1,rs1.
-     t2 = midtape (multi_sig …) ls1 a1 rs1 ∧
-     (∀i.regular_trace … a1 ls1 rs1 i) ∧
-     (∀j. j ≤ n → j ≠ i → to_blank_i ? n j (a1::ls1) = to_blank_i ? n j (a::ls)) ∧
-     (∀j. j ≤ n → j ≠ i → to_blank_i ? n j rs1 = to_blank_i ? n j rs) ∧
-     (to_blank_i ? n i ls1 = to_blank_i ? n i (a::ls)) ∧
-     (to_blank_i ? n i (a1::rs1)) = to_blank_i ? n i rs).
-
-theorem sem_Rmtil: ∀sig,n,i. i < n → mtiL sig n i  ⊨ Rmtil sig n i.
-#sig #n #i #lt_in
-@(sem_seq_app ?????? 
-  (sem_move_to_blank_L … )
-   (sem_seq ????? (sem_shift_i_L_new …)
-    (ssem_move_until_L ? (no_head sig n))))
-#tin #tout * #t1 * * #_ #Ht1 * #t2 * #Ht2 * #_ #Htout
-(* we start looking into Rmitl *)
-#ls #a #rs #Htin (* tin is a midtape *)
-#Hhead #Hreg #no_rightof #Hnohead_ls #Hnohead_rs 
-cut (regular_i sig n (a::ls) i)
-  [cases (Hreg i) * // 
-   cases (true_or_false (nth i ? (vec … a) (blank ?) == (blank ?))) #Htest
-    [#_ @daemon (* absurd, since hd rs non e' blank *)
-    |#H #_ @daemon]] #Hreg1
-lapply (Ht1 … Htin Hreg1 ?) [#j #_ @Hreg] -Ht1 -Htin
-* #b * #ls1 * #ls2 * * * * * #reg_ls1_i #reg_ls1_j #Hno_blankb #Hhead #Hls1 #Ht1
-lapply (Ht2 … Ht1) -Ht2 -Ht1 
-* #rs1 * #b0 * #rs2 * #rss * * * * * #Hb0 #Hb0blank #Hrs1 #Hrs1b #Hrss #Ht2
-(* we need to recover the position of the head of the emulated machine
-   that is the head of ls1. This is somewhere inside rs1 *) 
-cut (∃rs11. rs1 = (reverse ? ls1)@rs11)
-  [cut (ls1 = [ ] ∨ ∃aa,tlls1. ls1 = aa::tlls1)
-    [cases ls1 [%1 // | #aa #tlls1 %2 %{aa} %{tlls1} //]] *
-      [#H1ls1 %{rs1} >H1ls1 //
-      |* #aa * #tlls1 #H1ls1 >H1ls1 in Hrs1; 
-       cut (aa = a) [>H1ls1 in Hls1; #H @(to_blank_hd … H)] #eqaa >eqaa  
-       #Hrs1_aux cases (compare_append … (sym_eq … Hrs1_aux)) #l *
-        [* #H1 #H2 %{l} @H1
-        |(* this is absurd : if l is empty, the case is as before.
-           if l is not empty then it must start with a blank, since it is the
-           first character in rs2. But in this case we would have a blank 
-           inside ls1=a::tls1 that is absurd *)
-          @daemon
-        ]]]   
-   * #rs11 #H1
-cut (rs = rs11@rs2)
-  [@(injective_append_l … (reverse … ls1)) >Hrs1 <associative_append <H1 //] #H2
-lapply (Htout … Ht2) -Htout -Ht2 *
-  [(* the current character on trace i holds the head-mark.
-      The case is absurd, since b0 is the head of rs2, that is a sublist of rs, 
-      and the head-mark is not in rs *)
-   * #H3 @False_ind @(absurd (nth n ? (vec … b0) (blank sig) = head ?)) 
-     [@(\P ?) @injective_notb @H3 ]
-   @Hnohead_rs >H2 >trace_append @mem_append_l2 
-   lapply Hb0 cases rs2 
-    [whd in match (hd ???); #H >H in H3; whd in match (no_head ???); 
-     >all_blank_n normalize -H #H destruct (H); @False_ind
-    |#c #r #H4 %1 >H4 //
-    ]
-  |* 
-  [(* we reach the head position *)
-   (* cut (trace sig n j (a1::ls20)=trace sig n j (ls1@b::ls2)) *)
-   * #ls10 * #a1 * #ls20 * * * #Hls20 #Ha1 #Hnh #Htout
-   cut (∀j.j ≠ i →
-      trace sig n j (reverse (multi_sig sig n) rs1@b::ls2) = 
-      trace sig n j (ls10@a1::ls20))
-    [#j #ineqj >append_cons <reverse_cons >trace_def <map_append <reverse_map
-     lapply (trace_shift_neq …lt_in ? (sym_not_eq … ineqj) … Hrss) [//] #Htr
-     <(trace_def …  (b::rs1)) <Htr >reverse_map >map_append @eq_f @Hls20 ] 
-   #Htracej
-   cut (trace sig n i (reverse (multi_sig sig n) (rs1@[b0])@ls2) = 
-        trace sig n i (ls10@a1::ls20))
-    [>trace_def <map_append <reverse_map <map_append <(trace_def … [b0]) 
-     cut (trace sig n i [b0] = [blank ?]) [@daemon] #Hcut >Hcut
-     lapply (trace_shift … lt_in … Hrss) [//] whd in match (tail ??); #Htr <Htr
-     >reverse_map >map_append <trace_def <Hls20 % 
-    ] 
-   #Htracei
-   cut (∀j. j ≠ i →
-      (trace sig n j (reverse (multi_sig sig n) rs11) = trace sig n j ls10) ∧ 
-      (trace sig n j (ls1@b::ls2) = trace sig n j (a1::ls20)))
-   [@daemon (* si fa 
-     #j #ineqj @(first_P_to_eq ? (λx. x ≠ head ?))
-      [lapply (Htracej … ineqj) >trace_def in ⊢ (%→?); <map_append 
-       >trace_def in ⊢ (%→?); <map_append #H @H  
-      | *) ] #H2
-  cut ((trace sig n i (b0::reverse ? rs11) = trace sig n i (ls10@[a1])) ∧ 
-      (trace sig n i (ls1@ls2) = trace sig n i ls20))
-   [>H1 in Htracei; >reverse_append >reverse_single >reverse_append 
-     >reverse_reverse >associative_append >associative_append
-     @daemon
-    ] #H3    
-  cut (∀j. j ≠ i → 
-    trace sig n j (reverse (multi_sig sig n) ls10@rs2) = trace sig n j rs)
-    [#j #jneqi @(injective_append_l … (trace sig n j (reverse ? ls1)))
-     >map_append >map_append >Hrs1 >H1 >associative_append 
-     <map_append <map_append in ⊢ (???%); @eq_f 
-     <map_append <map_append @eq_f2 // @sym_eq 
-     <(reverse_reverse … rs11) <reverse_map <reverse_map in ⊢ (???%);
-     @eq_f @(proj1 … (H2 j jneqi))] #Hrs_j
-   %{ls20} %{a1} %{(reverse ? (b0::ls10)@tail (multi_sig sig n) rs2)}
-   %[%[%[%[%[@Htout
-    |#j cases (decidable_eq_nat j i)
-      [#eqji >eqji (* by cases wether a1 is blank *)
-       @daemon
-      |#jneqi lapply (reg_ls1_j … jneqi) #H4 
-       >reverse_cons >associative_append >Hb0 @regular_cons_hd_rs
-       @(eq_trace_to_regular … H4)
-        [<hd_trace >(proj2 … (H2 … jneqi)) >hd_trace %
-        |<tail_trace >(proj2 … (H2 … jneqi)) >tail_trace %
-        |@sym_eq @Hrs_j //
-        ]
-      ]]
-    |#j #lejn #jneqi <(Hls1 … lejn) 
-     >to_blank_i_def >to_blank_i_def @eq_f @sym_eq @(proj2 … (H2 j jneqi))]
-    |#j #lejn #jneqi >reverse_cons >associative_append >Hb0
-     <to_blank_hd_cons >to_blank_i_def >to_blank_i_def @eq_f @Hrs_j //]
-    |<(Hls1 i) [2:@lt_to_le //] 
-     lapply (all_blank_after_blank … reg_ls1_i) 
-       [@(\P ?) @daemon] #allb_ls2
-     whd in match (to_blank_i ????); <(proj2 … H3)
-     @daemon ]
-    |>reverse_cons >associative_append  
-     cut (to_blank_i sig n i rs = to_blank_i sig n i (rs11@[b0])) [@daemon] 
-     #Hcut >Hcut >(to_blank_i_chop  … b0 (a1::reverse …ls10)) [2: @Hb0blank]
-     >to_blank_i_def >to_blank_i_def @eq_f 
-     >trace_def >trace_def @injective_reverse >reverse_map >reverse_cons
-     >reverse_reverse >reverse_map >reverse_append >reverse_single @sym_eq
-     @(proj1 … H3)
-    ]
-  |(*we do not find the head: this is absurd *)
-   * #b1 * #lss * * #H2 @False_ind 
-   cut (∀x0. mem ? x0 (trace sig n n (b0::reverse ? rss@ls2)) → x0 ≠ head ?)
-     [@daemon] -H2 #H2
-   lapply (trace_shift_neq sig n i n … lt_in … Hrss)
-     [@lt_to_not_eq @lt_in | // ] 
-   #H3 @(absurd 
-        (nth n ? (vec … (hd ? (ls1@[b]) (all_blank sig n))) (blank ?) = head ?))
-     [>Hhead //
-     |@H2 >trace_def %2 <map_append @mem_append_l1 <reverse_map <trace_def 
-      >H3 >H1 >trace_def >reverse_map >reverse_cons >reverse_append 
-      >reverse_reverse >associative_append <map_append @mem_append_l2
-      cases ls1 [%1 % |#x #ll %1 %]
-     ]
-   ]
- ]
-qed.
diff --git a/matita/matita/matita.glade b/matita/matita/matita.glade
deleted file mode 100644 (file)
index 85c9f28..0000000
+++ /dev/null
@@ -1,2798 +0,0 @@
-<?xml version="1.0"?>
-<glade-interface>
-  <!-- interface-requires gtk+ 2.16 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkWindow" id="BrowserWin">
-    <property name="width_request">500</property>
-    <property name="height_request">480</property>
-    <property name="visible">True</property>
-    <property name="title" translatable="yes">Cic browser</property>
-    <property name="window_position">center-on-parent</property>
-    <property name="default_width">500</property>
-    <property name="default_height">480</property>
-    <property name="destroy_with_parent">True</property>
-    <child>
-      <widget class="GtkEventBox" id="BrowserWinEventBox">
-        <property name="visible">True</property>
-        <child>
-          <widget class="GtkVBox" id="BrowserVBox">
-            <property name="visible">True</property>
-            <property name="orientation">vertical</property>
-            <child>
-              <widget class="GtkMenuBar" id="menubar2">
-                <property name="visible">True</property>
-                <child>
-                  <widget class="GtkMenuItem" id="BrowserFileMenu">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">_File</property>
-                    <property name="use_underline">True</property>
-                    <child>
-                      <widget class="GtkMenu" id="BrowserFileMenu_menu">
-                        <child>
-                          <widget class="GtkImageMenuItem" id="BrowserNewMenuItem">
-                            <property name="label">gtk-new</property>
-                            <property name="visible">True</property>
-                            <property name="use_underline">True</property>
-                            <property name="use_stock">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkMenuItem" id="BrowserUrlMenuItem">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Open _Location ...</property>
-                            <property name="use_underline">True</property>
-                            <accelerator key="L" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
-                            <property name="visible">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkImageMenuItem" id="BrowserCloseMenuItem">
-                            <property name="label">gtk-close</property>
-                            <property name="visible">True</property>
-                            <property name="use_underline">True</property>
-                            <property name="use_stock">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkMenuItem" id="BrowserEditMenu">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">_Edit</property>
-                    <property name="use_underline">True</property>
-                    <child>
-                      <widget class="GtkMenu" id="BrowserEditMenu_menu">
-                        <child>
-                          <widget class="GtkImageMenuItem" id="BrowserCopyMenuItem">
-                            <property name="label">gtk-copy</property>
-                            <property name="visible">True</property>
-                            <property name="use_underline">True</property>
-                            <property name="use_stock">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkFrame" id="frame2">
-                <property name="visible">True</property>
-                <property name="label_xalign">0</property>
-                <property name="label_yalign">0</property>
-                <property name="shadow_type">none</property>
-                <child>
-                  <widget class="GtkHBox" id="BrowserHBox">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkButton" id="BrowserNewButton">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="relief">none</property>
-                        <child>
-                          <widget class="GtkImage" id="image303">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-new</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkButton" id="BrowserBackButton">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="relief">none</property>
-                        <child>
-                          <widget class="GtkImage" id="image304">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-go-back</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkButton" id="BrowserForwardButton">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="relief">none</property>
-                        <child>
-                          <widget class="GtkImage" id="image305">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-go-forward</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkButton" id="BrowserRefreshButton">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="can_default">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip" translatable="yes">refresh</property>
-                        <property name="relief">none</property>
-                        <child>
-                          <widget class="GtkImage" id="image229">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-refresh</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkButton" id="BrowserHomeButton">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="can_default">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip" translatable="yes">home</property>
-                        <property name="relief">none</property>
-                        <child>
-                          <widget class="GtkImage" id="image190">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-home</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">4</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkImage" id="image301">
-                        <property name="visible">True</property>
-                        <property name="stock">gtk-jump-to</property>
-                        <property name="icon-size">2</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="padding">3</property>
-                        <property name="position">5</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkHBox" id="UriHBox">
-                        <property name="visible">True</property>
-                        <child>
-                          <widget class="GtkEntry" id="browserUri">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="has_focus">True</property>
-                            <property name="invisible_char">&#x25CF;</property>
-                          </widget>
-                          <packing>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">6</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkNotebook" id="mathOrListNotebook">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <child>
-                  <widget class="GtkScrolledWindow" id="ScrolledBrowser">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="hscrollbar_policy">automatic</property>
-                    <property name="vscrollbar_policy">automatic</property>
-                    <child>
-                      <placeholder/>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="mathLabel">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">MathView</property>
-                  </widget>
-                  <packing>
-                    <property name="tab_fill">False</property>
-                    <property name="type">tab</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkScrolledWindow" id="scrolledwindow9">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="hscrollbar_policy">automatic</property>
-                    <property name="vscrollbar_policy">automatic</property>
-                    <property name="shadow_type">in</property>
-                    <child>
-                      <widget class="GtkTreeView" id="whelpResultTreeview">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="headers_visible">False</property>
-                      </widget>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="WhelpResult">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">WhelpResult</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                    <property name="tab_fill">False</property>
-                    <property name="type">tab</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkScrolledWindow" id="scrolledwindow11">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="hscrollbar_policy">automatic</property>
-                    <property name="vscrollbar_policy">automatic</property>
-                    <child>
-                      <widget class="GtkViewport" id="viewport2">
-                        <property name="visible">True</property>
-                        <property name="shadow_type">none</property>
-                        <child>
-                          <widget class="GtkImage" id="BrowserImage">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-missing-image</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="EasterEggLabel">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">WhelpEasterEgg</property>
-                  </widget>
-                  <packing>
-                    <property name="position">2</property>
-                    <property name="tab_fill">False</property>
-                    <property name="type">tab</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkScrolledWindow" id="GraphScrolledWin">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="hscrollbar_policy">automatic</property>
-                    <property name="vscrollbar_policy">automatic</property>
-                    <child>
-                      <placeholder/>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">3</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label26">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Graph</property>
-                  </widget>
-                  <packing>
-                    <property name="position">3</property>
-                    <property name="tab_fill">False</property>
-                    <property name="type">tab</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkVBox" id="vbox20">
-                    <property name="visible">True</property>
-                    <property name="orientation">vertical</property>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwinContent">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="border_width">3</property>
-                        <property name="hscrollbar_policy">automatic</property>
-                        <property name="vscrollbar_policy">automatic</property>
-                        <property name="shadow_type">in</property>
-                        <child>
-                          <placeholder/>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkHBox" id="hbox35">
-                        <property name="visible">True</property>
-                        <property name="border_width">4</property>
-                        <property name="spacing">4</property>
-                        <child>
-                          <widget class="GtkVBox" id="vbox22">
-                            <property name="visible">True</property>
-                            <property name="orientation">vertical</property>
-                            <child>
-                              <placeholder/>
-                            </child>
-                            <child>
-                              <placeholder/>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="entrySearch">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="has_focus">True</property>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkButton" id="buttonSearch">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <child>
-                              <widget class="GtkAlignment" id="alignment21">
-                                <property name="visible">True</property>
-                                <property name="xscale">0</property>
-                                <property name="yscale">0</property>
-                                <child>
-                                  <widget class="GtkHBox" id="hbox36">
-                                    <property name="visible">True</property>
-                                    <property name="spacing">2</property>
-                                    <child>
-                                      <widget class="GtkImage" id="image1068">
-                                        <property name="visible">True</property>
-                                        <property name="stock">gtk-find</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkLabel" id="label32">
-                                        <property name="visible">True</property>
-                                        <property name="label" translatable="yes">Search</property>
-                                        <property name="use_underline">True</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                </child>
-                              </widget>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">4</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="SearchText">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">SearchText</property>
-                  </widget>
-                  <packing>
-                    <property name="position">4</property>
-                    <property name="tab_fill">False</property>
-                    <property name="type">tab</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">3</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkDialog" id="ConfirmationDialog">
-    <property name="title" translatable="yes">DUMMY</property>
-    <property name="resizable">False</property>
-    <property name="modal">True</property>
-    <property name="window_position">center</property>
-    <property name="type_hint">dialog</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox1">
-        <property name="visible">True</property>
-        <property name="orientation">vertical</property>
-        <child>
-          <widget class="GtkLabel" id="ConfirmationDialogLabel">
-            <property name="visible">True</property>
-            <property name="label" translatable="yes">DUMMY</property>
-            <property name="justify">center</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <widget class="GtkButton" id="ConfirmationDialogCancelButton">
-                <property name="label">gtk-cancel</property>
-                <property name="response_id">-6</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="ConfirmationDialogOkButton">
-                <property name="label">gtk-ok</property>
-                <property name="response_id">-5</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkDialog" id="EmptyDialog">
-    <property name="visible">True</property>
-    <property name="title" translatable="yes">DUMMY</property>
-    <property name="type_hint">dialog</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="EmptyDialogVBox">
-        <property name="visible">True</property>
-        <property name="orientation">vertical</property>
-        <child>
-          <widget class="GtkLabel" id="EmptyDialogLabel">
-            <property name="visible">True</property>
-            <property name="label" translatable="yes">DUMMY</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area5">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <widget class="GtkButton" id="EmptyDialogCancelButton">
-                <property name="label">gtk-cancel</property>
-                <property name="response_id">-6</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="EmptyDialogOkButton">
-                <property name="label">gtk-ok</property>
-                <property name="response_id">-5</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkFileSelection" id="FileSelectionWin">
-    <property name="border_width">10</property>
-    <property name="title" translatable="yes">Select File</property>
-    <property name="modal">True</property>
-    <property name="window_position">center</property>
-    <property name="type_hint">dialog</property>
-    <child internal-child="cancel_button">
-      <widget class="GtkButton" id="fileSelCancelButton">
-        <property name="visible">True</property>
-        <property name="can_focus">True</property>
-        <property name="can_default">True</property>
-        <property name="receives_default">False</property>
-      </widget>
-    </child>
-    <child internal-child="ok_button">
-      <widget class="GtkButton" id="fileSelOkButton">
-        <property name="visible">True</property>
-        <property name="can_focus">True</property>
-        <property name="can_default">True</property>
-        <property name="receives_default">False</property>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkWindow" id="MainWin">
-    <property name="title" translatable="yes">Matita</property>
-    <child>
-      <widget class="GtkEventBox" id="MainWinEventBox">
-        <property name="visible">True</property>
-        <child>
-          <widget class="GtkVBox" id="vbox8">
-            <property name="visible">True</property>
-            <property name="orientation">vertical</property>
-            <child>
-              <widget class="GtkHandleBox" id="menuBarHandleBox">
-                <property name="visible">True</property>
-                <child>
-                  <widget class="GtkMenuBar" id="menubar1">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkMenuItem" id="fileMenu">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">_File</property>
-                        <property name="use_underline">True</property>
-                        <child>
-                          <widget class="GtkMenu" id="fileMenu_menu">
-                            <child>
-                              <widget class="GtkImageMenuItem" id="newMenuItem">
-                                <property name="label">gtk-new</property>
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                                <accelerator key="n" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="openMenuItem">
-                                <property name="label">gtk-open</property>
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                                <accelerator key="o" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="saveMenuItem">
-                                <property name="label">gtk-save</property>
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                                <accelerator key="s" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="saveAsMenuItem">
-                                <property name="label">gtk-save-as</property>
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                                <accelerator key="s" signal="activate" modifiers="GDK_SHIFT_MASK | GDK_CONTROL_MASK"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkSeparatorMenuItem" id="separator2">
-                                <property name="visible">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="closeMenuItem">
-                                <property name="label">gtk-close</property>
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                                <accelerator key="w" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="quitMenuItem">
-                                <property name="label">gtk-quit</property>
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                                <accelerator key="q" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkMenuItem" id="editMenu">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">_Edit</property>
-                        <property name="use_underline">True</property>
-                        <child>
-                          <widget class="GtkMenu" id="editMenu_menu">
-                            <child>
-                              <widget class="GtkImageMenuItem" id="undoMenuItem">
-                                <property name="label">gtk-undo</property>
-                                <property name="visible">True</property>
-                                <property name="sensitive">False</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                                <accelerator key="z" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="redoMenuItem">
-                                <property name="label">gtk-redo</property>
-                                <property name="visible">True</property>
-                                <property name="sensitive">False</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                                <accelerator key="z" signal="activate" modifiers="GDK_SHIFT_MASK | GDK_CONTROL_MASK"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkSeparatorMenuItem" id="separator3">
-                                <property name="visible">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="cutMenuItem">
-                                <property name="label">gtk-cut</property>
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                                <accelerator key="x" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="copyMenuItem">
-                                <property name="label">gtk-copy</property>
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                                <accelerator key="c" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="pasteMenuItem">
-                                <property name="label">gtk-paste</property>
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                                <accelerator key="v" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="pastePatternMenuItem">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Paste as pattern</property>
-                                <property name="use_underline">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkCheckMenuItem" id="unicodeAsTexMenuItem">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Paste Unicode as TeX</property>
-                                <property name="use_underline">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkCheckMenuItem" id="menuitemAutoAltL">
-                                <property name="visible">True</property>
-                                <property name="tooltip" translatable="yes">Automatically expands TeX macros to their corresponding UTF-8 symbol</property>
-                                <property name="label" translatable="yes">Auto-expand TeX Macros</property>
-                                <property name="use_underline">True</property>
-                                <property name="active">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="deleteMenuItem">
-                                <property name="label">gtk-delete</property>
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkSeparatorMenuItem" id="separator4">
-                                <property name="visible">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="selectAllMenuItem">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Select _All</property>
-                                <property name="use_underline">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkSeparatorMenuItem" id="separator7">
-                                <property name="visible">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="findReplMenuItem">
-                                <property name="label">gtk-find-and-replace</property>
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                                <accelerator key="f" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkSeparatorMenuItem" id="separator8">
-                                <property name="visible">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="LigatureButton">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Next ligature</property>
-                                <property name="use_underline">True</property>
-                                <accelerator key="l" signal="activate" modifiers="GDK_MOD1_MASK"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="externalEditorMenuItem">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Edit with e_xternal editor</property>
-                                <property name="use_underline">True</property>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkMenuItem" id="scriptMenu">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">_Script</property>
-                        <property name="use_underline">True</property>
-                        <child>
-                          <widget class="GtkMenu" id="scriptMenu_menu">
-                            <child>
-                              <widget class="GtkImageMenuItem" id="scriptAdvanceMenuItem">
-                                <property name="label">gtk-go-down</property>
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                                <accelerator key="Page_Down" signal="activate" modifiers="GDK_CONTROL_MASK | GDK_MOD1_MASK"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="scriptRetractMenuItem">
-                                <property name="label">gtk-go-up</property>
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                                <accelerator key="Page_Up" signal="activate" modifiers="GDK_CONTROL_MASK | GDK_MOD1_MASK"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkSeparatorMenuItem" id="separator9">
-                                <property name="visible">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="scriptBottomMenuItem">
-                                <property name="label">gtk-goto-bottom</property>
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                                <accelerator key="End" signal="activate" modifiers="GDK_CONTROL_MASK | GDK_MOD1_MASK"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="scriptTopMenuItem">
-                                <property name="label">gtk-goto-top</property>
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                                <accelerator key="Home" signal="activate" modifiers="GDK_CONTROL_MASK | GDK_MOD1_MASK"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkSeparatorMenuItem" id="separator10">
-                                <property name="visible">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="scriptJumpMenuItem">
-                                <property name="label">gtk-jump-to</property>
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                                <accelerator key="period" signal="activate" modifiers="GDK_CONTROL_MASK | GDK_MOD1_MASK"/>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkMenuItem" id="viewMenu">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">_View</property>
-                        <property name="use_underline">True</property>
-                        <child>
-                          <widget class="GtkMenu" id="viewMenu_menu">
-                            <child>
-                              <widget class="GtkMenuItem" id="newCicBrowserMenuItem">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">New CIC _browser</property>
-                                <property name="use_underline">True</property>
-                                <accelerator key="F3" signal="activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkSeparatorMenuItem" id="separator5">
-                                <property name="visible">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkCheckMenuItem" id="fullscreenMenuItem">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">_Fullscreen</property>
-                                <property name="use_underline">True</property>
-                                <accelerator key="F11" signal="activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkCheckMenuItem" id="menuitemPalette">
-                                <property name="visible">True</property>
-                                <property name="tooltip" translatable="yes">Shows a palette with natural deduction rules</property>
-                                <property name="label" translatable="yes">Natural deduction palette</property>
-                                <property name="use_underline">True</property>
-                                <accelerator key="F2" signal="activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkSeparatorMenuItem" id="separator1">
-                                <property name="visible">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="increaseFontSizeMenuItem">
-                                <property name="label">gtk-zoom-in</property>
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                                <accelerator key="plus" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="decreaseFontSizeMenuItem">
-                                <property name="label">gtk-zoom-out</property>
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                                <accelerator key="minus" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="normalFontSizeMenuItem">
-                                <property name="label">gtk-zoom-100</property>
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                                <accelerator key="equal" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkSeparatorMenuItem" id="separator12">
-                                <property name="visible">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkCheckMenuItem" id="ppNotationMenuItem">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Pretty print notation</property>
-                                <property name="use_underline">True</property>
-                                <property name="active">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkCheckMenuItem" id="hideCoercionsMenuItem">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Hide coercions</property>
-                                <property name="use_underline">True</property>
-                                <property name="active">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkSeparatorMenuItem" id="separator13">
-                                <property name="visible">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="showCoercionsGraphMenuItem">
-                                <property name="visible">True</property>
-                                <property name="tooltip" translatable="yes">Displays the graph of coercions</property>
-                                <property name="label" translatable="yes">Coercions Graph</property>
-                                <property name="use_underline">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="showHintsDbMenuItem">
-                                <property name="visible">True</property>
-                                <property name="tooltip" translatable="yes">Displays the database of hints</property>
-                                <property name="label" translatable="yes">Hints database</property>
-                                <property name="use_underline">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="showTermGrammarMenuItem">
-                                <property name="visible">True</property>
-                                <property name="tooltip" translatable="yes">Displays the terms grammar as extended by the user</property>
-                                <property name="label" translatable="yes">Terms grammar</property>
-                                <property name="use_underline">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="showUnicodeTable">
-                                <property name="visible">True</property>
-                                <property name="tooltip" translatable="yes">Show the conversion table from TeX like sequences to UTF-8</property>
-                                <property name="label" translatable="yes">TeX/UTF-8 table</property>
-                                <property name="use_underline">True</property>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkMenuItem" id="debugMenu">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">_Debug</property>
-                        <property name="use_underline">True</property>
-                        <child>
-                          <widget class="GtkMenu" id="debugMenu_menu">
-                            <child>
-                              <widget class="GtkSeparatorMenuItem" id="separator6">
-                                <property name="visible">True</property>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkMenuItem" id="helpMenu">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">_Help</property>
-                        <property name="use_underline">True</property>
-                        <child>
-                          <widget class="GtkMenu" id="helpMenu_menu">
-                            <child>
-                              <widget class="GtkImageMenuItem" id="contentsMenuItem">
-                                <property name="label">gtk-help</property>
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                                <accelerator key="F1" signal="activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="aboutMenuItem">
-                                <property name="label">gtk-about</property>
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                                <property name="use_stock">True</property>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox99">
-                <property name="visible">True</property>
-                <child>
-                  <widget class="GtkHPaned" id="hpaneScriptSequent">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <child>
-                      <widget class="GtkHBox" id="hbox18">
-                        <property name="visible">True</property>
-                        <property name="spacing">2</property>
-                        <child>
-                          <widget class="GtkHandleBox" id="TacticsButtonsHandlebox">
-                            <property name="visible">True</property>
-                            <property name="handle_position">top</property>
-                            <child>
-                              <widget class="GtkVBox" id="vboxTacticsPalette">
-                                <property name="visible">True</property>
-                                <property name="orientation">vertical</property>
-                                <child>
-                                  <widget class="GtkExpander" id="expander1">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <child>
-                                      <widget class="GtkVBox" id="vbox1">
-                                        <property name="visible">True</property>
-                                        <property name="orientation">vertical</property>
-                                        <child>
-                                          <widget class="GtkButton" id="butImpl_intro">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <child>
-                                              <widget class="GtkLabel" id="label8">
-                                                <property name="visible">True</property>
-                                                <property name="label" translatable="yes">Implication (&#x21D2;&lt;sub&gt;i&lt;/sub&gt;)</property>
-                                                <property name="use_markup">True</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">0</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="butAnd_intro">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <child>
-                                              <widget class="GtkLabel" id="label7">
-                                                <property name="visible">True</property>
-                                                <property name="label" translatable="yes">Conjunction (&#x2227;&lt;sub&gt;i&lt;/sub&gt;)</property>
-                                                <property name="use_markup">True</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">1</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="butOr_intro_left">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <child>
-                                              <widget class="GtkLabel" id="label9">
-                                                <property name="visible">True</property>
-                                                <property name="label" translatable="yes">Disjunction left (&#x2228;&lt;sub&gt;i-l&lt;/sub&gt;)</property>
-                                                <property name="use_markup">True</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">2</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="butOr_intro_right">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <child>
-                                              <widget class="GtkLabel" id="label10">
-                                                <property name="visible">True</property>
-                                                <property name="label" translatable="yes">Disjunction right (&#x2228;&lt;sub&gt;i-r&lt;/sub&gt;)</property>
-                                                <property name="use_markup">True</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">3</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="butNot_intro">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <child>
-                                              <widget class="GtkLabel" id="label11">
-                                                <property name="visible">True</property>
-                                                <property name="label" translatable="yes">Negation (&#xAC;&lt;sub&gt;i&lt;/sub&gt;)</property>
-                                                <property name="use_markup">True</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">4</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="butTop_intro">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <child>
-                                              <widget class="GtkLabel" id="label12">
-                                                <property name="visible">True</property>
-                                                <property name="label" translatable="yes">Top (&#x22A4;&lt;sub&gt;i&lt;/sub&gt;)</property>
-                                                <property name="use_markup">True</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">5</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="butForall_intro">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <child>
-                                              <widget class="GtkLabel" id="label20">
-                                                <property name="visible">True</property>
-                                                <property name="label" translatable="yes">Universal (&#x2200;&lt;sub&gt;i&lt;/sub&gt;)</property>
-                                                <property name="use_markup">True</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">6</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="butExists_intro">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <child>
-                                              <widget class="GtkLabel" id="label21">
-                                                <property name="visible">True</property>
-                                                <property name="label" translatable="yes">Existential (&#x2203;&lt;sub&gt;i&lt;/sub&gt;)</property>
-                                                <property name="use_markup">True</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">7</property>
-                                          </packing>
-                                        </child>
-                                      </widget>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkLabel" id="label4">
-                                        <property name="visible">True</property>
-                                        <property name="label" translatable="yes">Introduction rules</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="type">label_item</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkExpander" id="expander2">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <child>
-                                      <widget class="GtkVBox" id="vbox3">
-                                        <property name="visible">True</property>
-                                        <property name="orientation">vertical</property>
-                                        <child>
-                                          <widget class="GtkButton" id="butImpl_elim">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <child>
-                                              <widget class="GtkLabel" id="label22">
-                                                <property name="visible">True</property>
-                                                <property name="label" translatable="yes">Implication (&#x21D2;&lt;sub&gt;e&lt;/sub&gt;)</property>
-                                                <property name="use_markup">True</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">0</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="butAnd_elim_left">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <child>
-                                              <widget class="GtkLabel" id="label23">
-                                                <property name="visible">True</property>
-                                                <property name="label" translatable="yes">Conjunction left (&#x2227;&lt;sub&gt;e-l&lt;/sub&gt;)</property>
-                                                <property name="use_markup">True</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">1</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="butAnd_elim_right">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <child>
-                                              <widget class="GtkLabel" id="label24">
-                                                <property name="visible">True</property>
-                                                <property name="label" translatable="yes">Conjunction right (&#x2227;&lt;sub&gt;e-r&lt;/sub&gt;)</property>
-                                                <property name="use_markup">True</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">2</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="butOr_elim">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <child>
-                                              <widget class="GtkLabel" id="label27">
-                                                <property name="visible">True</property>
-                                                <property name="label" translatable="yes">Disjunction (&#x2228;&lt;sub&gt;e&lt;/sub&gt;)</property>
-                                                <property name="use_markup">True</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">3</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="butNot_elim">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <child>
-                                              <widget class="GtkLabel" id="label31">
-                                                <property name="visible">True</property>
-                                                <property name="label" translatable="yes">Negation (&#xAC;&lt;sub&gt;e&lt;/sub&gt;)</property>
-                                                <property name="use_markup">True</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">4</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="butBot_elim">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <child>
-                                              <widget class="GtkLabel" id="label33">
-                                                <property name="visible">True</property>
-                                                <property name="label" translatable="yes">Bottom (&#x22A5;&lt;sub&gt;e&lt;/sub&gt;)</property>
-                                                <property name="use_markup">True</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">5</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="butForall_elim">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <child>
-                                              <widget class="GtkLabel" id="label34">
-                                                <property name="visible">True</property>
-                                                <property name="label" translatable="yes">Universal (&#x2200;&lt;sub&gt;e&lt;/sub&gt;)</property>
-                                                <property name="use_markup">True</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">6</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="butExists_elim">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <child>
-                                              <widget class="GtkLabel" id="label35">
-                                                <property name="visible">True</property>
-                                                <property name="label" translatable="yes">Existential (&#x2203;&lt;sub&gt;e&lt;/sub&gt;)</property>
-                                                <property name="use_markup">True</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">7</property>
-                                          </packing>
-                                        </child>
-                                      </widget>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkLabel" id="label5">
-                                        <property name="visible">True</property>
-                                        <property name="label" translatable="yes">Elimination rules</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="type">label_item</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkExpander" id="expander3">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <child>
-                                      <widget class="GtkVBox" id="vbox4">
-                                        <property name="visible">True</property>
-                                        <property name="orientation">vertical</property>
-                                        <child>
-                                          <widget class="GtkButton" id="butRAA">
-                                            <property name="label" translatable="yes">Reduction to Absurdity (RAA)</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">0</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="butUseLemma">
-                                            <property name="label" translatable="yes">Use lemma (lem)</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">1</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="butDischarge">
-                                            <property name="label" translatable="yes">Discharge (discharge)</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">2</property>
-                                          </packing>
-                                        </child>
-                                      </widget>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkLabel" id="label6">
-                                        <property name="visible">True</property>
-                                        <property name="label" translatable="yes">Misc rules</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="type">label_item</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="position">2</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkVBox" id="vboxScript">
-                            <property name="width_request">400</property>
-                            <property name="visible">True</property>
-                            <property name="orientation">vertical</property>
-                            <child>
-                              <widget class="GtkHBox" id="hbox28">
-                                <property name="visible">True</property>
-                                <child>
-                                  <widget class="GtkToolbar" id="buttonsToolbar">
-                                    <property name="visible">True</property>
-                                    <property name="toolbar_style">both</property>
-                                    <child>
-                                      <widget class="GtkToolItem" id="toolitem41">
-                                        <property name="visible">True</property>
-                                        <child>
-                                          <widget class="GtkButton" id="scriptTopButton">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">False</property>
-                                            <property name="tooltip" translatable="yes">Restart</property>
-                                            <property name="relief">none</property>
-                                            <child>
-                                              <widget class="GtkImage" id="image920">
-                                                <property name="visible">True</property>
-                                                <property name="stock">gtk-goto-top</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                        </child>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkToolItem" id="toolitem42">
-                                        <property name="visible">True</property>
-                                        <child>
-                                          <widget class="GtkButton" id="scriptRetractButton">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">False</property>
-                                            <property name="tooltip" translatable="yes">Retract 1 phrase</property>
-                                            <property name="relief">none</property>
-                                            <child>
-                                              <widget class="GtkImage" id="image921">
-                                                <property name="visible">True</property>
-                                                <property name="stock">gtk-go-up</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                        </child>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkToolItem" id="toolitem43">
-                                        <property name="visible">True</property>
-                                        <child>
-                                          <widget class="GtkButton" id="scriptJumpButton">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">False</property>
-                                            <property name="tooltip" translatable="yes">Execute until point</property>
-                                            <property name="relief">none</property>
-                                            <child>
-                                              <widget class="GtkImage" id="image922">
-                                                <property name="visible">True</property>
-                                                <property name="stock">gtk-jump-to</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                        </child>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkToolItem" id="toolitem44">
-                                        <property name="visible">True</property>
-                                        <child>
-                                          <widget class="GtkButton" id="scriptAdvanceButton">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">False</property>
-                                            <property name="tooltip" translatable="yes">Execute 1 phrase</property>
-                                            <property name="relief">none</property>
-                                            <child>
-                                              <widget class="GtkImage" id="image923">
-                                                <property name="visible">True</property>
-                                                <property name="stock">gtk-go-down</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                        </child>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkToolItem" id="toolitem45">
-                                        <property name="visible">True</property>
-                                        <child>
-                                          <widget class="GtkButton" id="scriptBottomButton">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">False</property>
-                                            <property name="tooltip" translatable="yes">Execute all</property>
-                                            <property name="relief">none</property>
-                                            <child>
-                                              <widget class="GtkImage" id="image924">
-                                                <property name="visible">True</property>
-                                                <property name="stock">gtk-goto-bottom</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                        </child>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkToolbar" id="toolbar2">
-                                    <property name="visible">True</property>
-                                    <property name="orientation">vertical</property>
-                                    <property name="toolbar_style">both</property>
-                                    <child>
-                                      <widget class="GtkToolItem" id="toolitem46">
-                                        <property name="visible">True</property>
-                                        <child>
-                                          <widget class="GtkButton" id="scriptAbortButton">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">False</property>
-                                            <property name="relief">none</property>
-                                            <child>
-                                              <widget class="GtkImage" id="image927">
-                                                <property name="visible">True</property>
-                                                <property name="stock">gtk-stop</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
-                                        </child>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkNotebook" id="scriptNotebook">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="scrollable">True</property>
-                                <child>
-                                  <placeholder/>
-                                </child>
-                                <child>
-                                  <placeholder/>
-                                  <packing>
-                                    <property name="type">tab</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <placeholder/>
-                                </child>
-                                <child>
-                                  <placeholder/>
-                                  <packing>
-                                    <property name="type">tab</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="resize">False</property>
-                        <property name="shrink">True</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkVPaned" id="vpaned1">
-                        <property name="width_request">250</property>
-                        <property name="height_request">500</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="position">380</property>
-                        <child>
-                          <widget class="GtkNotebook" id="sequentsNotebook">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="scrollable">True</property>
-                          </widget>
-                          <packing>
-                            <property name="resize">False</property>
-                            <property name="shrink">True</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkHBox" id="hbox9">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkScrolledWindow" id="logScrolledWin">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="hscrollbar_policy">never</property>
-                                <property name="shadow_type">in</property>
-                                <child>
-                                  <widget class="GtkTextView" id="logTextView">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="editable">False</property>
-                                    <property name="wrap_mode">char</property>
-                                    <property name="cursor_visible">False</property>
-                                  </widget>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="resize">True</property>
-                            <property name="shrink">True</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="resize">True</property>
-                        <property name="shrink">True</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox10">
-                <property name="visible">True</property>
-                <child>
-                  <widget class="GtkStatusbar" id="StatusBar">
-                    <property name="visible">True</property>
-                    <property name="has_resize_grip">False</property>
-                  </widget>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkNotebook" id="HintNotebook">
-                    <property name="visible">True</property>
-                    <property name="show_tabs">False</property>
-                    <child>
-                      <widget class="GtkImage" id="HintLowImage">
-                        <property name="visible">True</property>
-                        <property name="stock">gtk-missing-image</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label14">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">label14</property>
-                      </widget>
-                      <packing>
-                        <property name="tab_fill">False</property>
-                        <property name="type">tab</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkImage" id="HintMediumImage">
-                        <property name="visible">True</property>
-                        <property name="stock">gtk-missing-image</property>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label15">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">label15</property>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                        <property name="tab_fill">False</property>
-                        <property name="type">tab</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkImage" id="HintHighImage">
-                        <property name="visible">True</property>
-                        <property name="stock">gtk-missing-image</property>
-                      </widget>
-                      <packing>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label16">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">label16</property>
-                      </widget>
-                      <packing>
-                        <property name="position">2</property>
-                        <property name="tab_fill">False</property>
-                        <property name="type">tab</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkDialog" id="TextDialog">
-    <property name="title" translatable="yes">DUMMY</property>
-    <property name="type_hint">dialog</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="vbox5">
-        <property name="visible">True</property>
-        <property name="orientation">vertical</property>
-        <child>
-          <widget class="GtkLabel" id="TextDialogLabel">
-            <property name="visible">True</property>
-            <property name="label" translatable="yes">DUMMY</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkScrolledWindow" id="scrolledwindow2">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="hscrollbar_policy">automatic</property>
-            <property name="vscrollbar_policy">automatic</property>
-            <property name="shadow_type">in</property>
-            <child>
-              <widget class="GtkTextView" id="TextDialogTextView">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">3</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <widget class="GtkButton" id="TextDialogCancelButton">
-                <property name="label">gtk-cancel</property>
-                <property name="response_id">-6</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="TextDialogOkButton">
-                <property name="label">gtk-ok</property>
-                <property name="response_id">-5</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkDialog" id="UriChoiceDialog">
-    <property name="height_request">280</property>
-    <property name="title" translatable="yes">Uri choice</property>
-    <property name="modal">True</property>
-    <property name="window_position">center</property>
-    <property name="type_hint">dialog</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox3">
-        <property name="visible">True</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">4</property>
-        <child>
-          <widget class="GtkVBox" id="vbox2">
-            <property name="visible">True</property>
-            <property name="orientation">vertical</property>
-            <property name="spacing">3</property>
-            <child>
-              <widget class="GtkLabel" id="UriChoiceLabel">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">some informative message here ...</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkScrolledWindow" id="scrolledwindow1">
-                <property name="width_request">400</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="hscrollbar_policy">automatic</property>
-                <property name="vscrollbar_policy">automatic</property>
-                <child>
-                  <widget class="GtkTreeView" id="UriChoiceTreeView">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="headers_visible">False</property>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="uriEntryHBox">
-                <property name="visible">True</property>
-                <child>
-                  <widget class="GtkLabel" id="label2">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">URI: </property>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkEntry" id="entry1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area3">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <widget class="GtkButton" id="UriChoiceAbortButton">
-                <property name="label">gtk-cancel</property>
-                <property name="response_id">-6</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="UriChoiceSelectedButton">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment2">
-                    <property name="visible">True</property>
-                    <property name="xscale">0</property>
-                    <property name="yscale">0</property>
-                    <child>
-                      <widget class="GtkHBox" id="hbox3">
-                        <property name="visible">True</property>
-                        <property name="spacing">2</property>
-                        <child>
-                          <widget class="GtkImage" id="image19">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-index</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label3">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Try _Selected</property>
-                            <property name="use_underline">True</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="UriChoiceConstantsButton">
-                <property name="label" translatable="yes">Try Constants</property>
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="copyButton">
-                <property name="label">gtk-copy</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="uriChoiceAutoButton">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment5">
-                    <property name="visible">True</property>
-                    <property name="xscale">0</property>
-                    <property name="yscale">0</property>
-                    <child>
-                      <widget class="GtkHBox" id="hbox16">
-                        <property name="visible">True</property>
-                        <property name="spacing">2</property>
-                        <child>
-                          <widget class="GtkImage" id="image302">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-ok</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="okLabel">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">bla bla bla</property>
-                            <property name="use_underline">True</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">4</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="uriChoiceForwardButton">
-                <property name="label">gtk-go-forward</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">5</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkWindow" id="FindReplWin">
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">Find &amp; Replace</property>
-    <property name="resizable">False</property>
-    <property name="window_position">mouse</property>
-    <property name="type_hint">dialog</property>
-    <child>
-      <widget class="GtkTable" id="table1">
-        <property name="visible">True</property>
-        <property name="n_rows">3</property>
-        <property name="n_columns">2</property>
-        <property name="row_spacing">5</property>
-        <child>
-          <widget class="GtkLabel" id="label17">
-            <property name="visible">True</property>
-            <property name="xalign">0</property>
-            <property name="label" translatable="yes">Find:</property>
-          </widget>
-          <packing>
-            <property name="x_options"></property>
-            <property name="y_options"></property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkLabel" id="label18">
-            <property name="visible">True</property>
-            <property name="xalign">0</property>
-            <property name="label" translatable="yes">Replace with: </property>
-          </widget>
-          <packing>
-            <property name="top_attach">1</property>
-            <property name="bottom_attach">2</property>
-            <property name="x_options"></property>
-            <property name="y_options"></property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkEntry" id="findEntry">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="has_focus">True</property>
-            <property name="can_default">True</property>
-            <property name="has_default">True</property>
-          </widget>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="right_attach">2</property>
-            <property name="y_options"></property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkEntry" id="replaceEntry">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-          </widget>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="right_attach">2</property>
-            <property name="top_attach">1</property>
-            <property name="bottom_attach">2</property>
-            <property name="y_options"></property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkHBox" id="hbox19">
-            <property name="visible">True</property>
-            <property name="spacing">5</property>
-            <child>
-              <widget class="GtkVBox" id="vbox9">
-                <property name="visible">True</property>
-                <property name="orientation">vertical</property>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="findButton">
-                <property name="label">gtk-find</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="findReplButton">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment13">
-                    <property name="visible">True</property>
-                    <property name="xscale">0</property>
-                    <property name="yscale">0</property>
-                    <child>
-                      <widget class="GtkHBox" id="hbox20">
-                        <property name="visible">True</property>
-                        <property name="spacing">2</property>
-                        <child>
-                          <widget class="GtkImage" id="image357">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-find-and-replace</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label19">
-                            <property name="visible">True</property>
-                            <property name="label">_Replace</property>
-                            <property name="use_underline">True</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="cancelButton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="right_attach">2</property>
-            <property name="top_attach">2</property>
-            <property name="bottom_attach">3</property>
-            <property name="y_padding">5</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkDialog" id="DisambiguationErrors">
-    <property name="width_request">450</property>
-    <property name="height_request">400</property>
-    <property name="title" translatable="yes">title</property>
-    <property name="modal">True</property>
-    <property name="type_hint">dialog</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="vbox14">
-        <property name="visible">True</property>
-        <property name="orientation">vertical</property>
-        <child>
-          <widget class="GtkVBox" id="vbox15">
-            <property name="visible">True</property>
-            <property name="orientation">vertical</property>
-            <child>
-              <widget class="GtkLabel" id="disambiguationErrorsLabel">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">some informative message here ...</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkScrolledWindow" id="scrolledwindow12">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="hscrollbar_policy">automatic</property>
-                <property name="vscrollbar_policy">automatic</property>
-                <property name="shadow_type">in</property>
-                <child>
-                  <widget class="GtkTreeView" id="treeview">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="headers_visible">False</property>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="hbuttonbox2">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <widget class="GtkButton" id="button6">
-                <property name="label">gtk-help</property>
-                <property name="response_id">-11</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="disambiguationErrorsMoreErrors">
-                <property name="response_id">-6</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment18">
-                    <property name="visible">True</property>
-                    <property name="xscale">0</property>
-                    <property name="yscale">0</property>
-                    <child>
-                      <widget class="GtkHBox" id="hbox29">
-                        <property name="visible">True</property>
-                        <property name="spacing">2</property>
-                        <child>
-                          <widget class="GtkImage" id="image926">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-zoom-in</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label28">
-                            <property name="visible">True</property>
-                            <property name="label">More</property>
-                            <property name="use_underline">True</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="disambiguationErrorsCancelButton">
-                <property name="label">gtk-cancel</property>
-                <property name="response_id">-6</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="disambiguationErrorsOkButton">
-                <property name="label">gtk-ok</property>
-                <property name="response_id">-5</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkWindow" id="AutoWin">
-    <property name="width_request">600</property>
-    <property name="height_request">400</property>
-    <property name="visible">True</property>
-    <property name="title" translatable="yes">Auto</property>
-    <property name="type_hint">dialog</property>
-    <property name="gravity">south-east</property>
-    <child>
-      <widget class="GtkVBox" id="vbox17">
-        <property name="visible">True</property>
-        <property name="orientation">vertical</property>
-        <child>
-          <widget class="GtkHBox" id="hbox30">
-            <property name="visible">True</property>
-            <property name="spacing">2</property>
-            <child>
-              <widget class="GtkScrolledWindow" id="scrolledwindowAREA">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="vscrollbar_policy">automatic</property>
-                <property name="shadow_type">in</property>
-                <child>
-                  <widget class="GtkViewport" id="viewportAREA">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkTable" id="table">
-                        <property name="visible">True</property>
-                        <property name="n_rows">3</property>
-                        <property name="n_columns">3</property>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkVBox" id="vbox18">
-                <property name="visible">True</property>
-                <property name="orientation">vertical</property>
-                <child>
-                  <widget class="GtkButton" id="buttonUP">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment19">
-                        <property name="visible">True</property>
-                        <property name="xscale">0</property>
-                        <property name="yscale">0</property>
-                        <child>
-                          <widget class="GtkHBox" id="hbox31">
-                            <property name="visible">True</property>
-                            <property name="spacing">2</property>
-                            <child>
-                              <widget class="GtkImage" id="image1066">
-                                <property name="visible">True</property>
-                                <property name="stock">gtk-go-up</property>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label30">
-                                <property name="visible">True</property>
-                                <property name="use_underline">True</property>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkButton" id="buttonDOWN">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <child>
-                      <widget class="GtkImage" id="image1065">
-                        <property name="visible">True</property>
-                        <property name="stock">gtk-go-down</property>
-                      </widget>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkHSeparator" id="hseparator3">
-            <property name="visible">True</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="padding">3</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkHBox" id="hbox32">
-            <property name="visible">True</property>
-            <child>
-              <widget class="GtkLabel" id="labelLAST">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Last:</property>
-              </widget>
-              <packing>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkHButtonBox" id="hbuttonbox3">
-                <property name="visible">True</property>
-                <property name="border_width">4</property>
-                <property name="spacing">4</property>
-                <property name="layout_style">end</property>
-                <child>
-                  <widget class="GtkButton" id="buttonPAUSE">
-                    <property name="label">gtk-media-pause</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="can_default">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="use_stock">True</property>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkButton" id="buttonPLAY">
-                    <property name="label">gtk-media-play</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="can_default">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="use_stock">True</property>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkButton" id="buttonNEXT">
-                    <property name="label">gtk-media-next</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="can_default">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="use_stock">True</property>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkButton" id="buttonCLOSE">
-                    <property name="label">gtk-close</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="can_default">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="use_stock">True</property>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">3</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
index 2bbe852258964583083586f056beaca3abe0b723..2731a5ac727d9a209ded7ba84d4d055a88d709e4 100644 (file)
 
 (* $Id$ *)
 
-open Printf
-
-open MatitaGtkMisc
-open GrafiteTypes
-
 (** {2 Initialization} *)
 
 let _ = 
diff --git a/matita/matita/matita.ui b/matita/matita/matita.ui
new file mode 100644 (file)
index 0000000..adc7216
--- /dev/null
@@ -0,0 +1,2625 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
+<interface>
+  <requires lib="gtk+" version="3.20"/>
+  <object class="GtkWindow" id="AutoWin">
+    <property name="width_request">600</property>
+    <property name="height_request">400</property>
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="title" translatable="yes">Auto</property>
+    <property name="type_hint">dialog</property>
+    <property name="gravity">south-east</property>
+    <child>
+      <object class="GtkBox" id="vbox17">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkBox" id="hbox30">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindowAREA">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkViewport" id="viewportAREA">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkGrid" id="table">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="vbox18">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <object class="GtkButton" id="buttonUP">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment19">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xscale">0</property>
+                        <property name="yscale">0</property>
+                        <child>
+                          <object class="GtkBox" id="hbox31">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="spacing">2</property>
+                            <child>
+                              <object class="GtkImage" id="image1066">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="stock">gtk-go-up</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label30">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="use_underline">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="buttonDOWN">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <child>
+                      <object class="GtkImage" id="image1065">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-go-down</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkSeparator" id="hseparator3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="padding">3</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="hbox32">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkLabel" id="labelLAST">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Last:</property>
+                <property name="xalign">0</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButtonBox" id="hbuttonbox3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">4</property>
+                <property name="spacing">4</property>
+                <property name="layout_style">end</property>
+                <child>
+                  <object class="GtkButton" id="buttonPAUSE">
+                    <property name="label">gtk-media-pause</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="can_default">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_stock">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="buttonPLAY">
+                    <property name="label">gtk-media-play</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="can_default">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_stock">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="buttonNEXT">
+                    <property name="label">gtk-media-next</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="can_default">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_stock">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="buttonCLOSE">
+                    <property name="label">gtk-close</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="can_default">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_stock">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkWindow" id="BrowserWin">
+    <property name="width_request">500</property>
+    <property name="height_request">480</property>
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="title" translatable="yes">Cic browser</property>
+    <property name="window_position">center-on-parent</property>
+    <property name="default_width">500</property>
+    <property name="default_height">480</property>
+    <property name="destroy_with_parent">True</property>
+    <child>
+      <object class="GtkEventBox" id="BrowserWinEventBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkBox" id="BrowserVBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
+            <child>
+              <object class="GtkMenuBar" id="menubar2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkMenuItem" id="BrowserFileMenu">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">_File</property>
+                    <property name="use_underline">True</property>
+                    <child type="submenu">
+                      <object class="GtkMenu" id="BrowserFileMenu_menu">
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkMenuItem" id="BrowserNewMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">_New</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="BrowserUrlMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Open _Location ...</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="L" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkSeparatorMenuItem" id="separatormenuitem1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="BrowserCloseMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">_Quit</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkMenuItem" id="BrowserEditMenu">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">_Edit</property>
+                    <property name="use_underline">True</property>
+                    <child type="submenu">
+                      <object class="GtkMenu" id="BrowserEditMenu_menu">
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkMenuItem" id="BrowserCopyMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">_Copy</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label_xalign">0</property>
+                <property name="label_yalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkBox" id="BrowserHBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkButton" id="BrowserNewButton">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="relief">none</property>
+                        <child>
+                          <object class="GtkImage" id="image303">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="stock">gtk-new</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="BrowserBackButton">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="relief">none</property>
+                        <child>
+                          <object class="GtkImage" id="image304">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="stock">gtk-go-back</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="BrowserForwardButton">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="relief">none</property>
+                        <child>
+                          <object class="GtkImage" id="image305">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="stock">gtk-go-forward</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="BrowserRefreshButton">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="can_default">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">refresh</property>
+                        <property name="relief">none</property>
+                        <child>
+                          <object class="GtkImage" id="image229">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="stock">gtk-refresh</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="BrowserHomeButton">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="can_default">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">home</property>
+                        <property name="relief">none</property>
+                        <child>
+                          <object class="GtkImage" id="image190">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="stock">gtk-home</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">4</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkImage" id="image301">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-jump-to</property>
+                        <property name="icon_size">2</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="padding">3</property>
+                        <property name="position">5</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkBox" id="UriHBox">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkEntry" id="browserUri">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="has_focus">True</property>
+                            <property name="invisible_char">●</property>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">6</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkNotebook" id="mathOrListNotebook">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <child>
+                  <object class="GtkScrolledWindow" id="ScrolledBrowser">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                  </object>
+                </child>
+                <child type="tab">
+                  <object class="GtkLabel" id="mathLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">MathView</property>
+                  </object>
+                  <packing>
+                    <property name="tab_fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow9">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="shadow_type">in</property>
+                    <child>
+                      <object class="GtkTreeView" id="whelpResultTreeview">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="headers_visible">False</property>
+                        <child internal-child="selection">
+                          <object class="GtkTreeSelection"/>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child type="tab">
+                  <object class="GtkLabel" id="WhelpResult">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">WhelpResult</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                    <property name="tab_fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow11">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <child>
+                      <object class="GtkViewport" id="viewport2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="shadow_type">none</property>
+                        <child>
+                          <object class="GtkImage" id="BrowserImage">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="stock">gtk-missing-image</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child type="tab">
+                  <object class="GtkLabel" id="EasterEggLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">WhelpEasterEgg</property>
+                  </object>
+                  <packing>
+                    <property name="position">2</property>
+                    <property name="tab_fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkScrolledWindow" id="GraphScrolledWin">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                  </object>
+                  <packing>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+                <child type="tab">
+                  <object class="GtkLabel" id="label26">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Graph</property>
+                  </object>
+                  <packing>
+                    <property name="position">3</property>
+                    <property name="tab_fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkBox" id="vbox20">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolledwinContent">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="border_width">3</property>
+                        <property name="shadow_type">in</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkBox" id="hbox35">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="border_width">4</property>
+                        <property name="spacing">4</property>
+                        <child>
+                          <object class="GtkBox" id="vbox22">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="orientation">vertical</property>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkEntry" id="entrySearch">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="has_focus">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="buttonSearch">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <child>
+                              <object class="GtkAlignment" id="alignment21">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xscale">0</property>
+                                <property name="yscale">0</property>
+                                <child>
+                                  <object class="GtkBox" id="hbox36">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="spacing">2</property>
+                                    <child>
+                                      <object class="GtkImage" id="image1068">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="stock">gtk-find</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" id="label32">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">Search</property>
+                                        <property name="use_underline">True</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">4</property>
+                  </packing>
+                </child>
+                <child type="tab">
+                  <object class="GtkLabel" id="SearchText">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">SearchText</property>
+                  </object>
+                  <packing>
+                    <property name="position">4</property>
+                    <property name="tab_fill">False</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkDialog" id="DisambiguationErrors">
+    <property name="width_request">450</property>
+    <property name="height_request">400</property>
+    <property name="can_focus">False</property>
+    <property name="title" translatable="yes">title</property>
+    <property name="modal">True</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="vbox14">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">spread</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="vbox15">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
+            <child>
+              <object class="GtkLabel" id="disambiguationErrorsLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">some informative message here ...</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow12">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="vexpand">True</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="treeview">
+                    <property name="height_request">717</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="headers_visible">False</property>
+                    <child internal-child="selection">
+                      <object class="GtkTreeSelection"/>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkWindow" id="FindReplWin">
+    <property name="can_focus">False</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Find &amp; Replace</property>
+    <property name="resizable">False</property>
+    <property name="window_position">mouse</property>
+    <property name="type_hint">dialog</property>
+    <child>
+      <object class="GtkGrid" id="table1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="row_spacing">9</property>
+        <child>
+          <object class="GtkLabel" id="label17">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Find:</property>
+            <property name="xalign">0</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label18">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Replace with: </property>
+            <property name="xalign">0</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="findEntry">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="can_default">True</property>
+            <property name="has_default">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="replaceEntry">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="hbox19">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">5</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <object class="GtkButton" id="findButton">
+                <property name="label">gtk-find</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="findReplButton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment13">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xscale">0</property>
+                    <property name="yscale">0</property>
+                    <child>
+                      <object class="GtkBox" id="hbox20">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">2</property>
+                        <child>
+                          <object class="GtkImage" id="image357">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="stock">gtk-find-and-replace</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label19">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">_Replace</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelButton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">2</property>
+            <property name="width">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkWindow" id="MainWin">
+    <property name="can_focus">False</property>
+    <property name="title" translatable="yes">Matita</property>
+    <child>
+      <object class="GtkEventBox" id="MainWinEventBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkBox" id="vbox8">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
+            <child>
+              <object class="GtkMenuBar" id="menubar1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkMenuItem" id="fileMenu">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">_File</property>
+                    <property name="use_underline">True</property>
+                    <child type="submenu">
+                      <object class="GtkMenu" id="fileMenu_menu">
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkMenuItem" id="newMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">_New</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="n" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="openMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">_Open...</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="o" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="saveMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">_Save</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="s" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="saveAsMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">_Save as...</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="s" signal="activate" modifiers="GDK_SHIFT_MASK | GDK_CONTROL_MASK"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkSeparatorMenuItem" id="separator2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="closeMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">_Close</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="w" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="quitMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">_Quit</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="q" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkMenuItem" id="editMenu">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">_Edit</property>
+                    <property name="use_underline">True</property>
+                    <child type="submenu">
+                      <object class="GtkMenu" id="editMenu_menu">
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkMenuItem" id="undoMenuItem">
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">_Undo</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="z" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="redoMenuItem">
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">_Redo</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="z" signal="activate" modifiers="GDK_SHIFT_MASK | GDK_CONTROL_MASK"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkSeparatorMenuItem" id="separator3">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="cutMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">Cut</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="x" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="copyMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">Copy</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="c" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="pasteMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">Paste</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="v" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="pastePatternMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Paste as pattern</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkCheckMenuItem" id="unicodeAsTexMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Paste Unicode as TeX</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkCheckMenuItem" id="menuitemAutoAltL">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Auto-expand TeX Macros</property>
+                            <property name="use_underline">True</property>
+                            <property name="active">True</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="deleteMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">Delete</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkSeparatorMenuItem" id="separator4">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="selectAllMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Select _All</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkSeparatorMenuItem" id="separator7">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="findReplMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">Find and replace...</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="f" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkSeparatorMenuItem" id="separator8">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="LigatureButton">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Next ligature</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="l" signal="activate" modifiers="GDK_MOD1_MASK"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="externalEditorMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Edit with e_xternal editor</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkMenuItem" id="scriptMenu">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">_Script</property>
+                    <property name="use_underline">True</property>
+                    <child type="submenu">
+                      <object class="GtkMenu" id="scriptMenu_menu">
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkMenuItem" id="scriptAdvanceMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">Execute 1 phrase</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="Page_Down" signal="activate" modifiers="GDK_CONTROL_MASK | GDK_MOD1_MASK"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="scriptRetractMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">Retract 1 phrase</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="Page_Up" signal="activate" modifiers="GDK_CONTROL_MASK | GDK_MOD1_MASK"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkSeparatorMenuItem" id="separator9">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="scriptBottomMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">Execute all</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="End" signal="activate" modifiers="GDK_CONTROL_MASK | GDK_MOD1_MASK"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="scriptTopMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">Retract all</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="Home" signal="activate" modifiers="GDK_CONTROL_MASK | GDK_MOD1_MASK"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkSeparatorMenuItem" id="separator10">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="scriptJumpMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">Execute until cursor</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="period" signal="activate" modifiers="GDK_CONTROL_MASK | GDK_MOD1_MASK"/>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkMenuItem" id="viewMenu">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">_View</property>
+                    <property name="use_underline">True</property>
+                    <child type="submenu">
+                      <object class="GtkMenu" id="viewMenu_menu">
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkMenuItem" id="newCicBrowserMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">New CIC _browser</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="F3" signal="activate"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkSeparatorMenuItem" id="separator5">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkCheckMenuItem" id="fullscreenMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">_Fullscreen</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="F11" signal="activate"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkCheckMenuItem" id="menuitemPalette">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Natural deduction palette</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="F2" signal="activate"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkSeparatorMenuItem" id="separator1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="increaseFontSizeMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">Zoom in</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="plus" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="decreaseFontSizeMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">Zoom out</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="minus" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="normalFontSizeMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">Normal size</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="equal" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkSeparatorMenuItem" id="separator12">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkCheckMenuItem" id="ppNotationMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Pretty print notation</property>
+                            <property name="use_underline">True</property>
+                            <property name="active">True</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkCheckMenuItem" id="hideCoercionsMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Hide coercions</property>
+                            <property name="use_underline">True</property>
+                            <property name="active">True</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkSeparatorMenuItem" id="separator13">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="showCoercionsGraphMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Coercions Graph</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="showHintsDbMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Hints database</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="showTermGrammarMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Terms grammar</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="showUnicodeTable">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">TeX/UTF-8 table</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkMenuItem" id="debugMenu">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">_Debug</property>
+                    <property name="use_underline">True</property>
+                    <child type="submenu">
+                      <object class="GtkMenu" id="debugMenu_menu">
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkSeparatorMenuItem" id="separator6">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkMenuItem" id="helpMenu">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">_Help</property>
+                    <property name="use_underline">True</property>
+                    <child type="submenu">
+                      <object class="GtkMenu" id="helpMenu_menu">
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkMenuItem" id="contentsMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">Contents</property>
+                            <property name="use_underline">True</property>
+                            <accelerator key="F1" signal="activate"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="aboutMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label">About</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="hbox99">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkPaned" id="hpaneScriptSequent">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <child>
+                      <object class="GtkBox" id="hbox18">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">2</property>
+                        <child>
+                          <object class="GtkBox" id="TacticsButtonsHandlebox">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <child>
+                              <object class="GtkBox" id="vboxTacticsPalette">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="orientation">vertical</property>
+                                <child>
+                                  <object class="GtkExpander" id="expander1">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <child>
+                                      <object class="GtkBox" id="vbox1">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="orientation">vertical</property>
+                                        <child>
+                                          <object class="GtkButton" id="butImpl_intro">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <child>
+                                              <object class="GtkLabel" id="label8">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label" translatable="yes">Implication (⇒&lt;sub&gt;i&lt;/sub&gt;)</property>
+                                                <property name="use_markup">True</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="butAnd_intro">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <child>
+                                              <object class="GtkLabel" id="label7">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label" translatable="yes">Conjunction (∧&lt;sub&gt;i&lt;/sub&gt;)</property>
+                                                <property name="use_markup">True</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="butOr_intro_left">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <child>
+                                              <object class="GtkLabel" id="label9">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label" translatable="yes">Disjunction left (∨&lt;sub&gt;i-l&lt;/sub&gt;)</property>
+                                                <property name="use_markup">True</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">2</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="butOr_intro_right">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <child>
+                                              <object class="GtkLabel" id="label10">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label" translatable="yes">Disjunction right (∨&lt;sub&gt;i-r&lt;/sub&gt;)</property>
+                                                <property name="use_markup">True</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">3</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="butNot_intro">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <child>
+                                              <object class="GtkLabel" id="label11">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label" translatable="yes">Negation (¬&lt;sub&gt;i&lt;/sub&gt;)</property>
+                                                <property name="use_markup">True</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">4</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="butTop_intro">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <child>
+                                              <object class="GtkLabel" id="label12">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label" translatable="yes">Top (⊤&lt;sub&gt;i&lt;/sub&gt;)</property>
+                                                <property name="use_markup">True</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">5</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="butForall_intro">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <child>
+                                              <object class="GtkLabel" id="label20">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label" translatable="yes">Universal (∀&lt;sub&gt;i&lt;/sub&gt;)</property>
+                                                <property name="use_markup">True</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">6</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="butExists_intro">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <child>
+                                              <object class="GtkLabel" id="label21">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label" translatable="yes">Existential (∃&lt;sub&gt;i&lt;/sub&gt;)</property>
+                                                <property name="use_markup">True</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">7</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                    </child>
+                                    <child type="label">
+                                      <object class="GtkLabel" id="label4">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">Introduction rules</property>
+                                      </object>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkExpander" id="expander2">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <child>
+                                      <object class="GtkBox" id="vbox3">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="orientation">vertical</property>
+                                        <child>
+                                          <object class="GtkButton" id="butImpl_elim">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <child>
+                                              <object class="GtkLabel" id="label22">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label" translatable="yes">Implication (⇒&lt;sub&gt;e&lt;/sub&gt;)</property>
+                                                <property name="use_markup">True</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="butAnd_elim_left">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <child>
+                                              <object class="GtkLabel" id="label23">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label" translatable="yes">Conjunction left (∧&lt;sub&gt;e-l&lt;/sub&gt;)</property>
+                                                <property name="use_markup">True</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="butAnd_elim_right">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <child>
+                                              <object class="GtkLabel" id="label24">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label" translatable="yes">Conjunction right (∧&lt;sub&gt;e-r&lt;/sub&gt;)</property>
+                                                <property name="use_markup">True</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">2</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="butOr_elim">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <child>
+                                              <object class="GtkLabel" id="label27">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label" translatable="yes">Disjunction (∨&lt;sub&gt;e&lt;/sub&gt;)</property>
+                                                <property name="use_markup">True</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">3</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="butNot_elim">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <child>
+                                              <object class="GtkLabel" id="label31">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label" translatable="yes">Negation (¬&lt;sub&gt;e&lt;/sub&gt;)</property>
+                                                <property name="use_markup">True</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">4</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="butBot_elim">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <child>
+                                              <object class="GtkLabel" id="label33">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label" translatable="yes">Bottom (⊥&lt;sub&gt;e&lt;/sub&gt;)</property>
+                                                <property name="use_markup">True</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">5</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="butForall_elim">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <child>
+                                              <object class="GtkLabel" id="label34">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label" translatable="yes">Universal (∀&lt;sub&gt;e&lt;/sub&gt;)</property>
+                                                <property name="use_markup">True</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">6</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="butExists_elim">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <child>
+                                              <object class="GtkLabel" id="label35">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label" translatable="yes">Existential (∃&lt;sub&gt;e&lt;/sub&gt;)</property>
+                                                <property name="use_markup">True</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">7</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                    </child>
+                                    <child type="label">
+                                      <object class="GtkLabel" id="label5">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">Elimination rules</property>
+                                      </object>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkExpander" id="expander3">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <child>
+                                      <object class="GtkBox" id="vbox4">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="orientation">vertical</property>
+                                        <child>
+                                          <object class="GtkButton" id="butRAA">
+                                            <property name="label" translatable="yes">Reduction to Absurdity (RAA)</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="butUseLemma">
+                                            <property name="label" translatable="yes">Use lemma (lem)</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="butDischarge">
+                                            <property name="label" translatable="yes">Discharge (discharge)</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">2</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                    </child>
+                                    <child type="label">
+                                      <object class="GtkLabel" id="label6">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">Misc rules</property>
+                                      </object>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">True</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkBox" id="vboxScript">
+                            <property name="width_request">400</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="orientation">vertical</property>
+                            <child>
+                              <object class="GtkBox" id="hbox28">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <object class="GtkToolbar" id="buttonsToolbar">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="toolbar_style">both</property>
+                                    <child>
+                                      <object class="GtkToolItem" id="toolitem41">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <child>
+                                          <object class="GtkButton" id="scriptTopButton">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">False</property>
+                                            <property name="tooltip_text" translatable="yes">Retract all</property>
+                                            <property name="relief">none</property>
+                                            <child>
+                                              <object class="GtkImage" id="image920">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="stock">gtk-goto-top</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="homogeneous">False</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkToolItem" id="toolitem42">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <child>
+                                          <object class="GtkButton" id="scriptRetractButton">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">False</property>
+                                            <property name="tooltip_text" translatable="yes">Retract 1 phrase</property>
+                                            <property name="relief">none</property>
+                                            <child>
+                                              <object class="GtkImage" id="image921">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="stock">gtk-go-up</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="homogeneous">False</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkToolItem" id="toolitem43">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <child>
+                                          <object class="GtkButton" id="scriptJumpButton">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">False</property>
+                                            <property name="tooltip_text" translatable="yes">Execute until cursor</property>
+                                            <property name="relief">none</property>
+                                            <child>
+                                              <object class="GtkImage" id="image922">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="stock">gtk-jump-to</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="homogeneous">False</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkToolItem" id="toolitem44">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <child>
+                                          <object class="GtkButton" id="scriptAdvanceButton">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">False</property>
+                                            <property name="tooltip_text" translatable="yes">Execute 1 phrase</property>
+                                            <property name="relief">none</property>
+                                            <child>
+                                              <object class="GtkImage" id="image923">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="stock">gtk-go-down</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="homogeneous">False</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkToolItem" id="toolitem45">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <child>
+                                          <object class="GtkButton" id="scriptBottomButton">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">False</property>
+                                            <property name="tooltip_text" translatable="yes">Execute all</property>
+                                            <property name="relief">none</property>
+                                            <child>
+                                              <object class="GtkImage" id="image924">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="stock">gtk-goto-bottom</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="homogeneous">False</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkToolbar" id="toolbar2">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="orientation">vertical</property>
+                                    <property name="toolbar_style">both</property>
+                                    <child>
+                                      <object class="GtkToolItem" id="toolitem46">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <child>
+                                          <object class="GtkButton" id="scriptAbortButton">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">False</property>
+                                            <property name="relief">none</property>
+                                            <child>
+                                              <object class="GtkImage" id="image927">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="stock">gtk-stop</property>
+                                              </object>
+                                            </child>
+                                          </object>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="homogeneous">False</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkNotebook" id="scriptNotebook">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="scrollable">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="resize">False</property>
+                        <property name="shrink">True</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkPaned" id="vpaned1">
+                        <property name="width_request">250</property>
+                        <property name="height_request">500</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="orientation">vertical</property>
+                        <property name="position">380</property>
+                        <child>
+                          <object class="GtkNotebook" id="sequentsNotebook">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="scrollable">True</property>
+                          </object>
+                          <packing>
+                            <property name="resize">False</property>
+                            <property name="shrink">True</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkBox" id="hbox9">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <child>
+                              <object class="GtkScrolledWindow" id="logScrolledWin">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="hscrollbar_policy">never</property>
+                                <property name="shadow_type">in</property>
+                                <child>
+                                  <object class="GtkTextView" id="logTextView">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="editable">False</property>
+                                    <property name="wrap_mode">char</property>
+                                    <property name="cursor_visible">False</property>
+                                  </object>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="resize">True</property>
+                            <property name="shrink">True</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="resize">True</property>
+                        <property name="shrink">True</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="hbox10">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkStatusbar" id="StatusBar">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkNotebook" id="HintNotebook">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="show_tabs">False</property>
+                    <child>
+                      <object class="GtkImage" id="HintLowImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-missing-image</property>
+                      </object>
+                    </child>
+                    <child type="tab">
+                      <object class="GtkLabel" id="label14">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">label14</property>
+                      </object>
+                      <packing>
+                        <property name="tab_fill">False</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkImage" id="HintMediumImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-missing-image</property>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child type="tab">
+                      <object class="GtkLabel" id="label15">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">label15</property>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                        <property name="tab_fill">False</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkImage" id="HintHighImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-missing-image</property>
+                      </object>
+                      <packing>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child type="tab">
+                      <object class="GtkLabel" id="label16">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">label16</property>
+                      </object>
+                      <packing>
+                        <property name="position">2</property>
+                        <property name="tab_fill">False</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkDialog" id="UriChoiceDialog">
+    <property name="height_request">280</property>
+    <property name="can_focus">False</property>
+    <property name="title" translatable="yes">Uri choice</property>
+    <property name="modal">True</property>
+    <property name="window_position">center</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox3">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">4</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="UriChoiceAbortButton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="UriChoiceSelectedButton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xscale">0</property>
+                    <property name="yscale">0</property>
+                    <child>
+                      <object class="GtkBox" id="hbox3">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">2</property>
+                        <child>
+                          <object class="GtkImage" id="image19">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="stock">gtk-index</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label3">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Try _Selected</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="UriChoiceConstantsButton">
+                <property name="label" translatable="yes">Try Constants</property>
+                <property name="visible">True</property>
+                <property name="sensitive">False</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="copyButton">
+                <property name="label">gtk-copy</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="uriChoiceAutoButton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment5">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xscale">0</property>
+                    <property name="yscale">0</property>
+                    <child>
+                      <object class="GtkBox" id="hbox16">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">2</property>
+                        <child>
+                          <object class="GtkImage" id="image302">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="stock">gtk-ok</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="okLabel">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">bla bla bla</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="uriChoiceForwardButton">
+                <property name="label">gtk-go-forward</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">5</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="vbox2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">3</property>
+            <child>
+              <object class="GtkLabel" id="UriChoiceLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">some informative message here ...</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow1">
+                <property name="width_request">400</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="vexpand">True</property>
+                <child>
+                  <object class="GtkTreeView" id="UriChoiceTreeView">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="headers_visible">False</property>
+                    <child internal-child="selection">
+                      <object class="GtkTreeSelection"/>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="uriEntryHBox">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="vexpand">True</property>
+                <child>
+                  <object class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">URI: </property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="entry1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="-6">UriChoiceAbortButton</action-widget>
+    </action-widgets>
+  </object>
+</interface>
index cfd8c107a49e57784eddd46e6c1ce600cf5e32ca..fea7161c157fbe7a015383d1a2a35252b40434a4 100644 (file)
@@ -26,7 +26,6 @@
 (* $Id$ *)
 
 module G = GrafiteAst
-open GrafiteTypes
 open Printf
 
 class status baseuri =
@@ -51,7 +50,7 @@ let first_line = ref true ;;
 let cases_or_induction_context stack =
     match stack with
      [] -> false
-    | (g,t,k,tag,p)::tl -> try
+    | (_g,_t,_k,_tag,p)::_tl -> try
                             let s = List.assoc "context" p in
                             s = "cases" || s = "induction"
                            with
@@ -61,10 +60,10 @@ let cases_or_induction_context stack =
 let has_focused_goal stack =
     match stack with
      [] -> false
-    | (g,t,k,tag,p)::tl -> (List.length g) > 0
+    | (g,_t,_k,_tag,_p)::_tl -> (List.length g) > 0
 ;;
 
-let get_indentation status statement =
+let get_indentation status _statement =
   let base_ind =
     match status#stack with
       [] -> 0
@@ -105,7 +104,7 @@ let write_ast_to_file status fname statement =
                 | G.NObj (_,obj,_) ->
                         (
                         match obj with
-                            Theorem _ -> "\n" ^ GrafiteAstPp.pp_statement status statement
+                            NotationPt.Theorem _ -> "\n" ^ GrafiteAstPp.pp_statement status statement
                                    ~map_unicode_to_tex:(Helm_registry.get_bool "matita.paste_unicode_as_tex")
                         |   _ -> ""
                         )
@@ -252,17 +251,17 @@ let baseuri_of_script ~include_paths fname =
 
 (* given a path to a ma file inside the include_paths, returns the
    new include_paths associated to that file *)
-let read_include_paths ~include_paths file =
-  try
-    let root, _buri, _fname, _tgt =
-      Librarian.baseuri_of_script ~include_paths:[] file in
-    let includes =
-      try
-        Str.split (Str.regexp " ")
-          (List.assoc "include_paths" (Librarian.load_root_file (root^"/root")))
-      with Not_found -> []
-    in
-    let rc = root :: includes in
+let read_include_paths ~include_paths:_ file =
+ try 
+   let root, _buri, _fname, _tgt = 
+     Librarian.baseuri_of_script ~include_paths:[] file in 
+   let includes =
+    try
+     Str.split (Str.regexp " ") 
+      (List.assoc "include_paths" (Librarian.load_root_file (root^"/root")))
+    with Not_found -> []
+   in
+   let rc = root :: includes in
     List.iter (HLog.debug) rc; rc
   with Librarian.NoRootFor _ | Librarian.FileNotFound _ ->
     []
index 5117b091f9687eef053fe9181bf3476e023e112a..b0a5c7f12cbf91acb1e251c76d039cf564cf9309 100644 (file)
@@ -124,7 +124,7 @@ let rec to_string exn =
   | GrafiteTypes.Command_error msg -> None, "Error: " ^ msg
   | CicNotationParser.Parse_error err ->
       None, sprintf "Parse error: %s" err
-  | Unix.Unix_error (code, api, param) ->
+  | Unix.Unix_error (code, api, _param) ->
       let err = Unix.error_message code in
       None, "Unix Error (" ^ api ^ "): " ^ err
   | HMarshal.Corrupt_file fname -> None, sprintf "file '%s' is corrupt" fname
index aaf297da2bfd7fa4f9e282a02dc2cb77c04c04b3..1f3caa9c738c9fc7d415a9682bed3bd326ef3364 100644 (file)
@@ -25,7 +25,6 @@
 
 (* $Id$ *)
 
-exception PopupClosed
 open Printf
 
 let wrap_callback0 f = fun _ -> try f () with Not_found -> assert false
@@ -99,7 +98,7 @@ class multiStringListModel ~cols (tree_view: GTree.view) =
       (fun renderer -> GTree.view_column ~renderer ())
       renderers
   in
-  object (self)
+  object
     val text_columns = text_columns
     
     initializer
@@ -174,7 +173,7 @@ class taggedStringListModel ~(tags:(string * GdkPixbuf.pixbuf) list)
   let lookup_pixbuf tag =
     try List.assoc tag tags with Not_found -> assert false
   in
-  object (self)
+  object
     initializer
       tree_view#set_model (Some (list_store :> GTree.model));
       ignore (tree_view#append_column tag_vcolumn);
@@ -228,7 +227,7 @@ class recordModel (tree_view:GTree.view) =
         ])
   in
   let toggle_vcol = GTree.view_column ~renderer:toggle_rend () in
-  object (self)
+  object
     initializer
       tree_view#set_model (Some (list_store :> GTree.model));
       ignore (tree_view#append_column text_vcol);
@@ -247,46 +246,38 @@ class recordModel (tree_view:GTree.view) =
 class type gui =
   object
     method newUriDialog:          unit -> MatitaGeneratedGui.uriChoiceDialog
-    method newConfirmationDialog: unit -> MatitaGeneratedGui.confirmationDialog
-    method newEmptyDialog:        unit -> MatitaGeneratedGui.emptyDialog
   end
 
 let popup_message 
-  ~title ~message ~buttons ~callback
+  ~title ~message ~buttons
   ?(message_type=`QUESTION) ?parent ?(use_markup=true)
-  ?(destroy_with_parent=true) ?(allow_grow=false) ?(allow_shrink=false)
-  ?icon ?(modal=true) ?(resizable=false) ?screen ?type_hint
-  ?(position=`CENTER_ON_PARENT) ?wm_name ?wm_class ?border_width ?width 
+  ?(destroy_with_parent=true) ?icon ?(modal=true) ?(resizable=false)
+  ?screen ?type_hint
+  ?(position=`CENTER_ON_PARENT) ?wmclass ?border_width ?width 
   ?height ?(show=true) ()
 =
   let m = 
     GWindow.message_dialog 
       ~message ~use_markup ~message_type ~buttons ?parent ~destroy_with_parent 
-      ~title ~allow_grow ~allow_shrink ?icon ~modal ~resizable ?screen 
-      ?type_hint ~position ?wm_name ?wm_class ?border_width ?width ?height 
+      ~title ?icon ~modal ~resizable ?screen 
+      ?type_hint ~position ?wmclass ?border_width ?width ?height 
       ~show () 
   in 
-  ignore(m#connect#response 
-    ~callback:(fun a ->  GMain.Main.quit ();callback a));
-  ignore(m#connect#close 
-    ~callback:(fun _ -> GMain.Main.quit ();raise PopupClosed));
-  GtkThread.main ();
+  ignore(m#run ()) ;
   m#destroy () 
 
 let popup_message_lowlevel
-  ~title ~message ?(no_separator=true) ~callback ~message_type ~buttons
-  ?parent  ?(destroy_with_parent=true) ?(allow_grow=false) ?(allow_shrink=false)
-  ?icon ?(modal=true) ?(resizable=false) ?screen ?type_hint
-  ?(position=`CENTER_ON_PARENT) ?wm_name ?wm_class ?border_width ?width 
-  ?height ?(show=true) ()
+  ~title ~message ?no_separator:(_=true) ~message_type ~buttons
+  ?parent  ?(destroy_with_parent=true)
+  ?icon ?modal:(_=true) ?(resizable=false) ?screen ?type_hint
+  ?(position=`CENTER_ON_PARENT) ?wmclass ?border_width ?width 
+  ?height ()
 =
   let m = 
     GWindow.dialog 
-      ~no_separator 
-      ?parent ~destroy_with_parent 
-      ~title ~allow_grow ~allow_shrink ?icon ~modal ~resizable ?screen 
-      ?type_hint ~position ?wm_name ?wm_class ?border_width ?width ?height 
-      ~show:false () 
+      ?parent ~destroy_with_parent
+      ~title ?icon ~resizable ?screen
+      ?type_hint ~position ?wmclass ?border_width ?width ?height () 
   in
   let stock = 
     match message_type with
@@ -304,88 +295,23 @@ let popup_message_lowlevel
   m#vbox#pack ~from:`START 
     ~padding:20 ~expand:true ~fill:true (hbox:>GObj.widget);
   List.iter (fun (x, y) -> 
-    m#add_button_stock x y;
-    if y = `CANCEL then 
-      m#set_default_response y
+    m#add_button_stock x y
   ) buttons;
-  ignore(m#connect#response 
-    ~callback:(fun a ->  GMain.Main.quit ();callback a));
-  ignore(m#connect#close 
-    ~callback:(fun _ -> GMain.Main.quit ();callback `POPUPCLOSED));
-  if show = true then 
-      m#show ();
-  GtkThread.main ();
-  m#destroy () 
+  let res = m#run () in
+  m#destroy () ;
+  res
 
 
 let ask_confirmation ~title ~message ?parent () =
-  let rc = ref `YES in
-  let callback = 
-    function 
-    | `YES -> rc := `YES
-    | `NO -> rc := `NO
-    | `CANCEL -> rc := `CANCEL
-    | `DELETE_EVENT -> rc := `CANCEL
-    | `POPUPCLOSED -> rc := `CANCEL
-  in
-  let buttons = [`YES,`YES ; `NO,`NO ; `CANCEL,`CANCEL] in
-    popup_message_lowlevel 
-      ~title ~message ~message_type:`WARNING ~callback ~buttons ?parent ();
-    !rc
+ GtkThread.sync (fun _ ->
+  let buttons = [`YES,`YES ; `NO,`NO ; `CANCEL,`DELETE_EVENT] in
+   popup_message_lowlevel 
+     ~title ~message ~message_type:`WARNING ~buttons ?parent ()
+ ) ()
 
 let report_error ~title ~message ?parent () =
-  let callback _ = () in
-  let buttons = GWindow.Buttons.ok in
-  try 
-    popup_message 
-      ~title ~message ~message_type:`ERROR ~callback ~buttons ?parent ()
-  with
-  | PopupClosed -> ()
-
-
-let ask_text ~(gui:#gui) ?(title = "") ?(message = "") ?(multiline = false)
-  ?default ()
-=
-  let dialog = gui#newEmptyDialog () in
-  dialog#emptyDialog#set_title title;
-  dialog#emptyDialogLabel#set_label message;
-  let result = ref None in
-  let return r =
-    result := r;
-    dialog#emptyDialog#destroy ();
-    GMain.Main.quit ()
-  in
-  ignore (dialog#emptyDialog#event#connect#delete (fun _ -> true));
-  if multiline then begin (* multiline input required: use a TextView widget *)
-    let win =
-      GBin.scrolled_window ~width:400 ~height:150 ~hpolicy:`NEVER
-        ~vpolicy:`ALWAYS ~packing:dialog#emptyDialogVBox#add ()
-    in
-    let view = GText.view ~wrap_mode:`CHAR ~packing:win#add () in
-    let buffer = view#buffer in
-    (match default with
-    | None -> ()
-    | Some text ->
-        buffer#set_text text;
-        buffer#select_range buffer#start_iter buffer#end_iter);
-    view#misc#grab_focus ();
-    connect_button dialog#emptyDialogOkButton (fun _ ->
-      return (Some (buffer#get_text ())))
-  end else begin (* monoline input required: use a TextEntry widget *)
-    let entry = GEdit.entry ~packing:dialog#emptyDialogVBox#add () in
-    (match default with
-    | None -> ()
-    | Some text ->
-        entry#set_text text;
-        entry#select_region ~start:0 ~stop:max_int);
-    entry#misc#grab_focus ();
-    connect_button dialog#emptyDialogOkButton (fun _ ->
-      return (Some entry#text))
-  end;
-  connect_button dialog#emptyDialogCancelButton (fun _ ->return None);
-  dialog#emptyDialog#show ();
-  GtkThread.main ();
-  (match !result with None -> raise MatitaTypes.Cancel | Some r -> r)
+ let buttons = GWindow.Buttons.ok in
+ popup_message ~title ~message ~message_type:`ERROR ~buttons ?parent ()
 
 let utf8_parsed_text s floc = 
   let start, stop = HExtlib.loc_of_floc floc in
@@ -415,7 +341,7 @@ let escape_pango_markup text =
 
 let matita_lang =
  let source_language_manager =
-  GSourceView2.source_language_manager ~default:true in
+  GSourceView3.source_language_manager ~default:true in
  source_language_manager#set_search_path
   (BuildTimeConf.runtime_base_dir ::
     source_language_manager#search_path);
index 05a724136617abd9bb94986a5475682bb5eab688..04a531216780997863f7bad05f0d26dc3dab826c 100644 (file)
@@ -111,8 +111,6 @@ class taggedStringListModel:
 class type gui =
   object  (* minimal gui object requirements *)
     method newUriDialog:          unit -> MatitaGeneratedGui.uriChoiceDialog
-    method newConfirmationDialog: unit -> MatitaGeneratedGui.confirmationDialog
-    method newEmptyDialog:        unit -> MatitaGeneratedGui.emptyDialog
   end
 
   (** {3 Dialogs}
@@ -124,17 +122,7 @@ class type gui =
 val ask_confirmation:
   title:string -> message:string -> 
   ?parent:#GWindow.window_skel ->
-  unit ->
-    [`YES | `NO | `CANCEL]
-
-  (** @param multiline (default: false) if true a TextView widget will be used
-  * for prompting the user otherwise a TextEntry widget will be
-  * @return the string given by the user *)
-val ask_text:
-  gui:#gui ->
-  ?title:string -> ?message:string ->
-  ?multiline:bool -> ?default:string -> unit ->
-    string
+  unit -> [`YES | `NO | `DELETE_EVENT ]
 
 val report_error:
   title:string -> message:string -> 
@@ -151,4 +139,4 @@ val utf8_string_length: string -> int
 
 val escape_pango_markup: string -> string
 
-val matita_lang: GSourceView2.source_language
+val matita_lang: GSourceView3.source_language
index ce3dcc6fedace3ab6ab6209f40923af970717609..5b7352d743f9cbaf4ade7b39b3af0cd85fb3cbe7 100644 (file)
@@ -31,8 +31,6 @@ open MatitaGeneratedGui
 open MatitaGtkMisc
 open MatitaMisc
 
-exception Found of int
-
 let all_disambiguation_passes = ref false
 
 (* this is a shit and should be changed :-{ *)
@@ -41,7 +39,7 @@ let interactive_uri_choice
   ?(msg = "") ?(nonvars_button = false) ?(hide_uri_entry=false) 
   ?(hide_try=false) ?(ok_label="_Auto") ?(ok_action:[`SELECT|`AUTO] = `AUTO) 
   ?copy_cb ()
-  ~id uris
+  ~id:_ uris
 =
   if (selection_mode <> `SINGLE) &&
     (Helm_registry.get_opt_default Helm_registry.get_bool ~default:true "matita.auto_disambiguation")
@@ -97,6 +95,8 @@ let interactive_uri_choice
       | uris -> return (Some (List.map NReference.reference_of_string uris)));
     connect_button dialog#uriChoiceAbortButton (fun _ -> return None);
     dialog#uriChoiceDialog#show ();
+    (* CSC: old Gtk2 code. Use #run instead. Look for similar code handling
+       other dialogs *)
     GtkThread.main ();
     (match !choices with 
     | None -> raise MatitaTypes.Cancel
@@ -178,7 +178,7 @@ class interpErrorModel =
               (let loc_row = tree_store#append () in
                 begin
                  match lll with
-                    [passes,envs_and_diffs,_,_] ->
+                    [passes,_envs_and_diffs,_,_] ->
                       tree_store#set ~row:loc_row ~column:id_col
                        ("Error location " ^ string_of_int (!idx1+1) ^
                         ", error message " ^ string_of_int (!idx1+1) ^ ".1" ^
@@ -255,7 +255,7 @@ class interpErrorModel =
 exception UseLibrary;;
 
 let interactive_error_interp ~all_passes
-  (source_buffer:GSourceView2.source_buffer) notify_exn offset errorll filename
+  (source_buffer:GSourceView3.source_buffer) notify_exn offset errorll filename
 = 
   (* hook to save a script for each disambiguation error *)
   if false then
@@ -318,9 +318,12 @@ let interactive_error_interp ~all_passes
           (MultiPassDisambiguator.DisambiguationError
             (offset,[[env,diff,lazy (loffset,Lazy.force msg),significant]]));
     | _::_ ->
+      GtkThread.sync (fun _ ->
        let dialog = new disambiguationErrors () in
-       if all_passes then
-        dialog#disambiguationErrorsMoreErrors#misc#set_sensitive false;
+       dialog#toplevel#add_button "Fix this interpretation" `OK;
+       dialog#toplevel#add_button "Close" `DELETE_EVENT;
+       if not all_passes then
+        dialog#toplevel#add_button "More errors" `HELP; (* HELP means MORE *)
        let model = new interpErrorModel dialog#treeview choices in
        dialog#disambiguationErrors#set_title "Disambiguation error";
        dialog#disambiguationErrorsLabel#set_label
@@ -352,64 +355,56 @@ let interactive_error_interp ~all_passes
             (MultiPassDisambiguator.DisambiguationError
               (offset,[[env,diff,lazy(loffset,Lazy.force msg),significant]]))
            ));
-       let return _ =
-         dialog#disambiguationErrors#destroy ();
-         GMain.Main.quit ()
+   (match GtkThread.sync dialog#toplevel#run () with
+    | `OK ->
+       let tree_path =
+        match fst (dialog#treeview#get_cursor ()) with
+           None -> assert false
+        | Some tp -> tp in
+       let idx1,idx2,idx3 = model#get_interp_no tree_path in
+       let diff =
+        match idx2,idx3 with
+           Some idx2, Some idx3 ->
+            let _,lll = List.nth choices idx1 in
+            let _,envs_and_diffs,_,_ = List.nth lll idx2 in
+            let _,_,diff = List.nth envs_and_diffs idx3 in
+             diff
+         | _,_ -> assert false
        in
-       let fail _ = return () in
-       ignore(dialog#disambiguationErrors#event#connect#delete (fun _ -> true));
-       connect_button dialog#disambiguationErrorsOkButton
-        (fun _ ->
-          let tree_path =
-           match fst (dialog#treeview#get_cursor ()) with
-              None -> assert false
-           | Some tp -> tp in
-          let idx1,idx2,idx3 = model#get_interp_no tree_path in
-          let diff =
-           match idx2,idx3 with
-              Some idx2, Some idx3 ->
-               let _,lll = List.nth choices idx1 in
-               let _,envs_and_diffs,_,_ = List.nth lll idx2 in
-               let _,_,diff = List.nth envs_and_diffs idx3 in
-                diff
-            | _,_ -> assert false
-          in
-           let newtxt =
-            String.concat "\n"
-             ("" ::
-               List.map
-                (fun k,desc -> 
-                  let alias =
-                   match k with
-                   | DisambiguateTypes.Id id ->
-                       GrafiteAst.Ident_alias (id, desc)
-                   | DisambiguateTypes.Symbol (symb, i)-> 
-                       GrafiteAst.Symbol_alias (symb, i, desc)
-                   | DisambiguateTypes.Num i ->
-                       GrafiteAst.Number_alias (i, desc)
-                  in
-                   GrafiteAstPp.pp_alias alias)
-                diff) ^ "\n"
-           in
-            source_buffer#insert
-             ~iter:
-               (source_buffer#get_iter_at_mark
-                (`NAME "beginning_of_statement")) newtxt ;
-            return ()
-        );
-       connect_button dialog#disambiguationErrorsMoreErrors
-        (fun _ -> return () ; raise UseLibrary);
-       connect_button dialog#disambiguationErrorsCancelButton fail;
-       dialog#disambiguationErrors#show ();
-       GtkThread.main ()
-
+        let newtxt =
+         String.concat "\n"
+          ("" ::
+            List.map
+             (fun k,desc -> 
+               let alias =
+                match k with
+                | DisambiguateTypes.Id id ->
+                    GrafiteAst.Ident_alias (id, desc)
+                | DisambiguateTypes.Symbol (symb, i)-> 
+                    GrafiteAst.Symbol_alias (symb, i, desc)
+                | DisambiguateTypes.Num i ->
+                    GrafiteAst.Number_alias (i, desc)
+               in
+                GrafiteAstPp.pp_alias alias)
+             diff) ^ "\n"
+        in
+         source_buffer#insert
+          ~iter:
+            (source_buffer#get_iter_at_mark
+             (`NAME "beginning_of_statement")) newtxt
+    | `HELP (* HELP MEANS MORE *) ->
+        dialog#toplevel#destroy () ;
+        raise UseLibrary
+    | `DELETE_EVENT -> ()
+    | _ -> assert false) ;
+   dialog#toplevel#destroy ()
+  ) ()
 
 class gui () =
     (* creation order _is_ relevant for windows placement *)
   let main = new mainWin () in
   let sequents_viewer =
    MatitaMathView.sequentsViewer_instance main#sequentsNotebook in
-  let fileSel = new fileSelectionWin () in
   let findRepl = new findReplWin () in
   let keyBindingBoxes = (* event boxes which should receive global key events *)
     [ main#mainWinEventBox ]
@@ -462,6 +457,7 @@ class gui () =
         ~website:"http://matita.cs.unibo.it"
         ()
       in
+      ignore(about_dialog#event#connect#delete (fun _ -> true));
       ignore(about_dialog#connect#response (fun _ ->about_dialog#misc#hide ()));
       connect_menu_item main#contentsMenuItem (fun () ->
         if 0 = Sys.command "which gnome-help" then
@@ -517,16 +513,10 @@ class gui () =
         ~callback:(fun _ -> hide_find_Repl ();true));
       connect_menu_item main#undoMenuItem
        (fun () -> (MatitaScript.current ())#safe_undo);
-(*CSC: XXX
-      ignore(source_view#source_buffer#connect#can_undo
-        ~callback:main#undoMenuItem#misc#set_sensitive);
-*) main#undoMenuItem#misc#set_sensitive true;
+      main#undoMenuItem#misc#set_sensitive false;
       connect_menu_item main#redoMenuItem
        (fun () -> (MatitaScript.current ())#safe_redo);
-(*CSC: XXX
-      ignore(source_view#source_buffer#connect#can_redo
-        ~callback:main#redoMenuItem#misc#set_sensitive);
-*) main#redoMenuItem#misc#set_sensitive true;
+      main#redoMenuItem#misc#set_sensitive false;
       connect_menu_item main#editMenu (fun () ->
         main#copyMenuItem#misc#set_sensitive
          (MatitaScript.current ())#canCopy;
@@ -573,7 +563,7 @@ class gui () =
         GtkThread.sync (fun () -> ()) ()
       in
       let worker_thread = ref None in
-      let notify_exn (source_view : GSourceView2.source_view) exn =
+      let notify_exn (source_view : GSourceView3.source_view) exn =
        let floc, msg = MatitaExcPp.to_string exn in
         begin
          match floc with
@@ -672,32 +662,6 @@ class gui () =
          with
           exc -> script#source_view#misc#grab_focus (); raise exc in
       
-        (* file selection win *)
-      ignore (fileSel#fileSelectionWin#event#connect#delete (fun _ -> true));
-      ignore (fileSel#fileSelectionWin#connect#response (fun event ->
-        let return r =
-          chosen_file <- r;
-          fileSel#fileSelectionWin#misc#hide ();
-          GMain.Main.quit ()
-        in
-        match event with
-        | `OK ->
-            let fname = fileSel#fileSelectionWin#filename in
-            if Sys.file_exists fname then
-              begin
-                if HExtlib.is_regular fname && not (_only_directory) then 
-                  return (Some fname) 
-                else if _only_directory && HExtlib.is_dir fname then 
-                  return (Some fname)
-              end
-            else
-              begin
-                if _ok_not_exists then 
-                  return (Some fname)
-              end
-        | `CANCEL -> return None
-        | `HELP -> ()
-        | `DELETE_EVENT -> return None));
         (* menus *)
       List.iter (fun w -> w#misc#set_sensitive false) [ main#saveMenuItem ];
         (* console *)
@@ -881,6 +845,10 @@ class gui () =
         current_page <- page;
         let script = MatitaScript.at_page page in
         script#activate;
+        main#undoMenuItem#misc#set_sensitive
+         script#source_view#source_buffer#can_undo ;
+        main#redoMenuItem#misc#set_sensitive
+         script#source_view#source_buffer#can_redo ;
         main#saveMenuItem#misc#set_sensitive script#has_name))
 
     method private externalEditor () =
@@ -967,7 +935,7 @@ class gui () =
              save_moo script#status;
              true
         | `NO -> true
-        | `CANCEL -> false
+        | `DELETE_EVENT -> false
       else 
        (save_moo script#status; true)
 
@@ -1047,11 +1015,10 @@ class gui () =
       console#message ("'"^file^"' loaded.");
       self#_enableSaveTo file
 
-    method private _enableSaveTo file =
+    method private _enableSaveTo _file =
       self#main#saveMenuItem#misc#set_sensitive true
         
     method private console = console
-    method private fileSel = fileSel
     method private findRepl = findRepl
     method main = main
 
@@ -1066,20 +1033,46 @@ class gui () =
         (fun _ -> callback ();true));
       self#addKeyBinding GdkKeysyms._q callback
 
+    method private chooseFileOrDir ok_not_exists only_directory =
+      let fileSel = GWindow.file_chooser_dialog
+       ~action:`OPEN
+       ~title:"Select file"
+       ~modal:true
+       ~type_hint:`DIALOG
+       ~position:`CENTER
+       () in
+     fileSel#add_select_button_stock `OPEN `OK;
+     fileSel#add_button_stock `CANCEL `CANCEL;
+     ignore (fileSel#set_current_folder(Sys.getcwd ())) ;
+     let res =
+      let rec aux () =
+       match fileSel#run () with
+        | `OK ->
+             (match fileSel#filename with
+                None -> aux ()
+              | Some fname ->
+                 if Sys.file_exists fname then
+                   begin
+                     if HExtlib.is_regular fname && not (only_directory) then 
+                       Some fname
+                     else if only_directory && HExtlib.is_dir fname then 
+                       Some fname
+                     else
+                      aux ()
+                   end
+                 else if ok_not_exists then Some fname else aux ())
+        | `CANCEL -> None
+        | `DELETE_EVENT -> None in
+      aux () in
+     fileSel#destroy () ;
+     res
+
     method private chooseFile ?(ok_not_exists = false) () =
-      _ok_not_exists <- ok_not_exists;
-      _only_directory <- false;
-      fileSel#fileSelectionWin#show ();
-      GtkThread.main ();
-      chosen_file
+      self#chooseFileOrDir ok_not_exists false
 
     method private chooseDir ?(ok_not_exists = false) () =
-      _ok_not_exists <- ok_not_exists;
-      _only_directory <- true;
-      fileSel#fileSelectionWin#show ();
-      GtkThread.main ();
       (* we should check that this is a directory *)
-      chosen_file
+      self#chooseFileOrDir ok_not_exists true
   
   end
 
@@ -1144,8 +1137,9 @@ class interpModel =
 
 
 let interactive_string_choice 
-  text prefix_len ?(title = "") ?(msg = "") () ~id locs uris 
+  text prefix_len ?(title = "") ?msg:(_ = "") () ~id:_ locs uris 
 = 
+ GtkThread.sync (fun _ ->
  let dialog = new uriChoiceDialog () in
  dialog#uriEntryHBox#misc#hide ();
  dialog#uriChoiceSelectedButton#misc#hide ();
@@ -1154,7 +1148,7 @@ let interactive_string_choice
  dialog#uriChoiceTreeView#selection#set_mode
    (`SINGLE :> Gtk.Tags.selection_mode);
  let model = new stringListModel dialog#uriChoiceTreeView in
- let choices = ref None in
+ let choices = ref [] in
  dialog#uriChoiceDialog#set_title title; 
  let hack_len = MatitaGtkMisc.utf8_string_length text in
  let rec colorize acc_len = function
@@ -1189,22 +1183,19 @@ let interactive_string_choice
   in
   dialog#uriChoiceLabel#set_label txt;
   List.iter model#easy_append uris;
-  let return v =
-    choices := v;
-    dialog#uriChoiceDialog#destroy ();
-    GMain.Main.quit ()
-  in
-  ignore (dialog#uriChoiceDialog#event#connect#delete (fun _ -> true));
   connect_button dialog#uriChoiceForwardButton (fun _ ->
     match model#easy_selection () with
     | [] -> ()
-    | uris -> return (Some uris));
-  connect_button dialog#uriChoiceAbortButton (fun _ -> return None);
+    | uris -> choices := uris; dialog#toplevel#response `OK);
+  connect_button dialog#uriChoiceAbortButton (fun _ -> dialog#toplevel#response `DELETE_EVENT);
   dialog#uriChoiceDialog#show ();
-  GtkThread.main ();
-  (match !choices with 
-  | None -> raise MatitaTypes.Cancel
-  | Some uris -> uris)
+  let res =
+   match dialog#toplevel#run () with 
+    | `DELETE_EVENT -> dialog#toplevel#destroy() ; raise MatitaTypes.Cancel
+    | `OK -> !choices
+    | _ -> assert false in
+  dialog#toplevel#destroy () ;
+  res) ()
 
 let interactive_interp_choice () text prefix_len choices =
 (*List.iter (fun l -> prerr_endline "==="; List.iter (fun (_,id,dsc) -> prerr_endline (id ^ " = " ^ dsc)) l) choices;*)
@@ -1271,10 +1262,8 @@ let interactive_interp_choice () text prefix_len choices =
 let _ =
   (* disambiguator callbacks *)
   Disambiguate.set_choose_uris_callback
-   (fun ~selection_mode ?ok ?(enable_button_for_non_vars=false) ~title ~msg ->
+   (fun ~selection_mode ?ok ?enable_button_for_non_vars:(_=false) ~title ~msg ->
      interactive_uri_choice ~selection_mode ?ok_label:ok ~title ~msg ());
   Disambiguate.set_choose_interp_callback (interactive_interp_choice ());
   (* gtk initialization *)
-  GtkMain.Rc.add_default_file BuildTimeConf.gtkrc_file; (* loads gtk rc *)
-  ignore (GMain.Main.init ())
-
+  GtkMain.Rc.add_default_file BuildTimeConf.gtkrc_file (* loads gtk rc *)
diff --git a/matita/matita/matitaGuiInit.ml b/matita/matita/matitaGuiInit.ml
new file mode 100644 (file)
index 0000000..be9d65a
--- /dev/null
@@ -0,0 +1 @@
+ignore (GMain.Main.init ())
index ea9683e188bd6232c3e2996806541fed68a2d56a..271a7b19ab45c664f61aac4c805b435d81415044 100644 (file)
@@ -27,9 +27,7 @@
 
 open Printf
 
-open GrafiteTypes
 open MatitaGtkMisc
-open MatitaGuiTypes
 open CicMathView
 
 module Stack = Continuationals.Stack
@@ -91,7 +89,7 @@ class sequentsViewer ~(notebook:GPack.notebook) ~(cicMathView:cicMathView) () =
           GtkSignal.disconnect notebook#as_widget id;
           switch_page_callback <- None
       | None -> ());
-      for i = 0 to pages do notebook#remove_page 0 done; 
+      for _i = 0 to pages do notebook#remove_page 0 done; 
       notebook#set_show_tabs true;
       pages <- 0;
       page2goal <- [];
@@ -112,12 +110,8 @@ class sequentsViewer ~(notebook:GPack.notebook) ~(cicMathView:cicMathView) () =
           scrolledWin <- Some w;
           (match cicMathView#misc#parent with
             | None -> ()
-            | Some parent ->
-               let parent =
-                match cicMathView#misc#parent with
-                   None -> assert false
-                 | Some p -> GContainer.cast_container p
-               in
+            | Some p ->
+               let parent = GContainer.cast_container p in
                 parent#remove cicMathView#coerce);
           w#add cicMathView#coerce
         in
@@ -128,8 +122,8 @@ class sequentsViewer ~(notebook:GPack.notebook) ~(cicMathView:cicMathView) () =
         let stack_goals = Stack.open_goals status#stack in
         let proof_goals = List.map fst metasenv in
         if
-          HExtlib.list_uniq (List.sort Pervasives.compare stack_goals)
-          <> List.sort Pervasives.compare proof_goals
+          HExtlib.list_uniq (List.sort compare stack_goals)
+          <> List.sort compare proof_goals
         then begin
           prerr_endline ("STACK GOALS = " ^ String.concat " " (List.map string_of_int stack_goals));
           prerr_endline ("PROOF GOALS = " ^ String.concat " " (List.map string_of_int proof_goals));
@@ -158,7 +152,7 @@ class sequentsViewer ~(notebook:GPack.notebook) ~(cicMathView:cicMathView) () =
       in
       let add_switch _ _ (_, sw) = add_tab (render_switch sw) sw in
       Stack.iter  (** populate notebook with tabs *)
-        ~env:(fun depth tag (pos, sw) ->
+        ~env:(fun depth _tag (pos, sw) ->
           let markup =
             match depth, pos with
             | 0, 0 -> `Current (render_switch sw)
@@ -180,12 +174,12 @@ class sequentsViewer ~(notebook:GPack.notebook) ~(cicMathView:cicMathView) () =
     method private render_page:
      'status. #ApplyTransformation.status as 'status -> page:int ->
        goal_switch:Stack.switch -> unit
-     = fun status ~page ~goal_switch ->
+     = fun status ~page:_ ~goal_switch ->
       (match goal_switch with
       | Stack.Open goal ->
          let menv,subst = _metasenv in
           cicMathView#nload_sequent status menv subst goal
-      | Stack.Closed goal ->
+      | Stack.Closed _goal ->
           let root = Lazy.force closed_goal_mathml in
           cicMathView#load_root ~root);
       (try
@@ -242,12 +236,12 @@ class cicBrowser_impl ~(history:MatitaTypes.mathViewer_entry MatitaMisc.history)
   let dir_RE = Pcre.regexp "^cic:((/([^/]+/)*[^/]+(/)?)|/|)$" in
   let is_uri txt = Pcre.pmatch ~rex:uri_RE txt in
   let is_dir txt = Pcre.pmatch ~rex:dir_RE txt in
-  let gui = MatitaMisc.get_gui () in
+  let _gui = MatitaMisc.get_gui () in
   let win = new MatitaGeneratedGui.browserWin () in
   let _ = win#browserUri#misc#grab_focus () in
   let gviz = LablGraphviz.graphviz ~packing:win#graphScrolledWin#add () in
   let searchText = 
-    GSourceView2.source_view ~auto_indent:false ~editable:false ()
+    GSourceView3.source_view ~auto_indent:false ~editable:false ()
   in
   let _ =
      win#scrolledwinContent#add (searchText :> GObj.widget);
@@ -326,10 +320,14 @@ class cicBrowser_impl ~(history:MatitaTypes.mathViewer_entry MatitaMisc.history)
       close_out oc;
       if tred then
         gviz#load_graph_from_file 
-          ~gviz_cmd:"dot -Txdot | tred |gvpack -gv | dot" filename
+          (* gvpack can no longer read the output of -Txdot :-( *)
+          (*~gviz_cmd:"dot -Txdot | tred |gvpack -gv | dot" filename*)
+          ~gviz_cmd:"dot -Txdot | tred | dot" filename
       else
         gviz#load_graph_from_file 
-          ~gviz_cmd:"dot -Txdot | gvpack -gv | dot" filename;
+          (* gvpack can no longer read the output of -Txdot :-( *)
+          (*~gviz_cmd:"dot -Txdot | gvpack -gv | dot" filename;*)
+          ~gviz_cmd:"dot -Txdot | dot" filename;
       HExtlib.safe_remove filename
   in
   object (self)
@@ -475,7 +473,7 @@ class cicBrowser_impl ~(history:MatitaTypes.mathViewer_entry MatitaMisc.history)
       self#_showMath;
       mathView#load_root (Lazy.force empty_mathml)
 
-    method private _loadCheck term =
+    method private _loadCheck _term =
       failwith "not implemented _loadCheck";
 (*       self#_showMath *)
 
@@ -486,8 +484,8 @@ class cicBrowser_impl ~(history:MatitaTypes.mathViewer_entry MatitaMisc.history)
     method private redraw_gviz ?center_on () =
       if Sys.command "which dot" = 0 then
        let tmpfile, oc = Filename.open_temp_file "matita" ".dot" in
-       let fmt = Format.formatter_of_out_channel oc in
-       (* MATITA 1.0 MetadataDeps.DepGraph.render fmt gviz_graph;*)
+       (* MATITA 1.0 let fmt = Format.formatter_of_out_channel oc in
+       MetadataDeps.DepGraph.render fmt gviz_graph;*)
        close_out oc;
        gviz#load_graph_from_file ~gviz_cmd:"tred | dot" tmpfile;
        (match center_on with
@@ -500,7 +498,7 @@ class cicBrowser_impl ~(history:MatitaTypes.mathViewer_entry MatitaMisc.history)
          "the graph of dependencies amoung objects. Please install it.")
         ~parent:win#toplevel ()
 
-    method private dependencies direction uri () =
+    method private dependencies _direction _uri () =
       assert false (* MATITA 1.0
       let dbd = LibraryDb.instance () in
       let graph =
@@ -575,7 +573,7 @@ class cicBrowser_impl ~(history:MatitaTypes.mathViewer_entry MatitaMisc.history)
       let content = Http_getter.ls ~local:false dir in
       let l =
         List.fast_sort
-          Pervasives.compare
+          compare
           (List.map
             (function 
               | Http_getter_types.Ls_section s -> "dir", s
@@ -724,7 +722,7 @@ let find_selection_owner () =
     | mv :: tl ->
         (match mv#get_selections with
         | [] -> aux tl
-        | sel :: _ -> mv)
+        | _sel :: _ -> mv)
   in
   aux (get_math_views ())
 
index fe6fd35579cfa838a5f098fbd4b1fbc7a605a797..53d1d1f67ec2440c2c3ce45df0958ab52b9edfd3 100644 (file)
@@ -38,8 +38,8 @@ let strip_suffix ~suffix s =
 let absolute_path file =
   if file.[0] = '/' then file else Unix.getcwd () ^ "/" ^ file
   
-let is_proof_script fname = true  (** TODO Zack *)
-let is_proof_object fname = true  (** TODO Zack *)
+let is_proof_script _fname = true  (** TODO Zack *)
+let is_proof_object _fname = true  (** TODO Zack *)
 
 let append_phrase_sep s =
   if not (Pcre.pmatch ~pat:(sprintf "%s$" BuildTimeConf.phrase_sep) s) then
@@ -77,8 +77,8 @@ class shell_history size =
   let size = size + 1 in
   let decr x = let x' = x - 1 in if x' < 0 then size + x' else x' in
   let incr x = (x + 1) mod size in
-  object (self)
-    val data = Array.create size ""
+  object
+    val data = Array.make size ""
 
     inherit basic_history (0, -1 , -1)
     
@@ -106,7 +106,7 @@ class shell_history size =
 class ['a] browser_history ?memento size init =
   object (self)
     initializer match memento with Some m -> self#load m | _ -> ()
-    val data = Array.create size init
+    val data = Array.make size init
 
     inherit basic_history (0, 0, 0)
     
@@ -149,8 +149,8 @@ let list_tl_at ?(equality=(==)) e l =
   let rec aux =
     function
     | [] -> raise Not_found
-    | hd :: tl as l when equality hd e -> l
-    | hd :: tl -> aux tl
+    | hd :: _ as l when equality hd e -> l
+    | _ :: tl -> aux tl
   in
   aux l
 
index de78194f0254f0592642d8b90ad40c3ccd183fde..c39e1de40a5ec9d9d7856718f196787ba9a4c1b3 100644 (file)
@@ -26,7 +26,6 @@
 (* $Id$ *)
 
 open Printf
-open GrafiteTypes
 
 module TA = GrafiteAst
 
@@ -84,7 +83,7 @@ let eval_with_engine include_paths status skipped_txt nonskipped_txt st
       (fun (acc, to_prepend) (status,alias) ->
        match alias with
        | None -> (status,to_prepend ^ nonskipped_txt)::acc,""
-       | Some (k,value) ->
+       | Some (_k,value) ->
             let newtxt = GrafiteAstPp.pp_alias value in
             (status,to_prepend ^ newtxt ^ "\n")::acc, "")
       ([],skipped_txt) enriched_history_fragment
@@ -94,7 +93,7 @@ let eval_with_engine include_paths status skipped_txt nonskipped_txt st
 
 let pp_eager_statement_ast = GrafiteAstPp.pp_statement 
 
-let eval_nmacro include_paths (buffer : GText.buffer) status unparsed_text parsed_text script mac =
+let eval_nmacro _include_paths (_buffer : GText.buffer) status _unparsed_text parsed_text script mac =
   let parsed_text_length = String.length parsed_text in
   match mac with
   | TA.Screenshot (_,name) -> 
@@ -206,12 +205,12 @@ and eval_statement include_paths (buffer : GText.buffer) status script
   in 
   match st with
   | GrafiteAst.Executable (loc, ex) ->
-     let _, nonskipped, skipped, parsed_text_length = text_of_loc loc in
+     let _, nonskipped, skipped, _parsed_text_length = text_of_loc loc in
       eval_executable include_paths buffer status unparsed_text
        skipped nonskipped script ex loc
   | GrafiteAst.Comment (loc, GrafiteAst.Code (_, ex))
     when Helm_registry.get_bool "matita.execcomments" ->
-     let _, nonskipped, skipped, parsed_text_length = text_of_loc loc in
+     let _, nonskipped, skipped, _parsed_text_length = text_of_loc loc in
       eval_executable include_paths buffer status unparsed_text
        skipped nonskipped script ex loc
   | GrafiteAst.Comment (loc, _) -> 
@@ -251,7 +250,7 @@ let fresh_script_id =
  *)
 class script ~(parent:GBin.scrolled_window) ~tab_label () =
 let source_view =
-  GSourceView2.source_view
+  GSourceView3.source_view
     ~auto_indent:true
     ~insert_spaces_instead_of_tabs:true ~tab_width:2
     ~right_margin_position:80 ~show_right_margin:true
@@ -260,12 +259,18 @@ let source_view =
     () in
 let buffer = source_view#buffer in
 let source_buffer = source_view#source_buffer in
+let _ =
+ source_buffer#connect#notify_can_undo
+  ~callback:(MatitaMisc.get_gui ())#main#undoMenuItem#misc#set_sensitive in
+let _ =
+ source_buffer#connect#notify_can_redo
+  ~callback:(MatitaMisc.get_gui ())#main#redoMenuItem#misc#set_sensitive in
 let similarsymbols_tag_name = "similarsymbolos" in
 let similarsymbols_tag = `NAME similarsymbols_tag_name in
 let initial_statuses current baseuri =
  let status = new MatitaEngine.status baseuri in
  (match current with
-     Some current -> NCicLibrary.time_travel status;
+     Some _current -> NCicLibrary.time_travel status;
 (*
       (* MATITA 1.0: there is a known bug in invalidation; temporary fix here *)
       NCicEnvironment.invalidate () *)
@@ -347,7 +352,7 @@ object (self)
           false
         ));
     ignore(source_view#event#connect#button_release
-      ~callback:(fun button -> clean_locked := false; false));
+      ~callback:(fun _button -> clean_locked := false; false));
     ignore(source_view#buffer#connect#after#apply_tag
      ~callback:(
        fun tag ~start:_ ~stop:_ ->
@@ -369,23 +374,21 @@ object (self)
        let menuItems = menu#children in
        let undoMenuItem, redoMenuItem =
         match menuItems with
-           [undo;redo;sep1;cut;copy;paste;delete;sep2;
-            selectall;sep3;inputmethod;insertunicodecharacter] ->
+           [undo;redo;_sep1;cut;copy;paste;delete;_sep2;
+            _selectall;_sep3;_inputmethod;_insertunicodecharacter] ->
               List.iter menu#remove [ copy; cut; delete; paste ];
               undo,redo
          | _ -> assert false in
        let add_menu_item =
          let i = ref 2 in (* last occupied position *)
-         fun ?label ?stock () ->
+         fun ~label ->
            incr i;
-           GMenu.image_menu_item ?label ?stock ~packing:(menu#insert ~pos:!i)
-            ()
-       in
-       let copy = add_menu_item ~stock:`COPY () in
-       let cut = add_menu_item ~stock:`CUT () in
-       let delete = add_menu_item ~stock:`DELETE () in
-       let paste = add_menu_item ~stock:`PASTE () in
-       let paste_pattern = add_menu_item ~label:"Paste as pattern" () in
+           GMenu.menu_item ~label ~packing:(menu#insert ~pos:!i) () in
+       let copy = add_menu_item ~label:"Copy" in
+       let cut = add_menu_item ~label:"Cut" in
+       let delete = add_menu_item ~label:"Delete" in
+       let paste = add_menu_item ~label:"Paste" in
+       let paste_pattern = add_menu_item ~label:"Paste as pattern" in
        copy#misc#set_sensitive self#canCopy;
        cut#misc#set_sensitive self#canCut;
        delete#misc#set_sensitive self#canDelete;
@@ -397,24 +400,22 @@ object (self)
        MatitaGtkMisc.connect_menu_item paste self#paste;
        MatitaGtkMisc.connect_menu_item paste_pattern self#pastePattern;
        let new_undoMenuItem =
-        GMenu.image_menu_item
-         ~image:(GMisc.image ~stock:`UNDO ())
+        GMenu.menu_item
          ~use_mnemonic:true
          ~label:"_Undo"
          ~packing:(menu#insert ~pos:0) () in
        new_undoMenuItem#misc#set_sensitive
-        (undoMenuItem#misc#get_flag `SENSITIVE);
+        undoMenuItem#misc#sensitive;
        menu#remove (undoMenuItem :> GMenu.menu_item);
        MatitaGtkMisc.connect_menu_item new_undoMenuItem
         (fun () -> self#safe_undo);
        let new_redoMenuItem =
-        GMenu.image_menu_item
-         ~image:(GMisc.image ~stock:`REDO ())
+        GMenu.menu_item
          ~use_mnemonic:true
          ~label:"_Redo"
          ~packing:(menu#insert ~pos:1) () in
        new_redoMenuItem#misc#set_sensitive
-        (redoMenuItem#misc#get_flag `SENSITIVE);
+        redoMenuItem#misc#sensitive;
         menu#remove (redoMenuItem :> GMenu.menu_item);
         MatitaGtkMisc.connect_menu_item new_redoMenuItem
          (fun () -> self#safe_redo)));
index 9958170d9c400eb663309947ac2df5f95a8b6fd9..ca4b2f86dcdb4dafdb27f3175ffde5217153e980 100644 (file)
@@ -91,7 +91,7 @@ object
   (** misc *)
   method clean_dirty_lock: unit
   method set_star: bool -> unit
-  method source_view: GSourceView2.source_view
+  method source_view: GSourceView3.source_view
   method has_parent: GObj.widget -> bool
   
   (* debug *)
index a772ae94695933f7a27fd20ae50783936074ec6b..092c79c986e103e7c4b92fcb7bdc159e471a7b95 100644 (file)
@@ -25,9 +25,6 @@
 
 (* $Id$ *)
 
-open Printf
-open GrafiteTypes
-
   (** user hit the cancel button *)
 exception Cancel
 
index 9efd9a61b908171086989a4ad2ae3a15214f34cd..09bcabd573932f74ae77e20f153343f2564ac66b 100644 (file)
@@ -1513,11 +1513,11 @@ let predefined_classes = [
  ["+"; "⨭"; "⨮"; "⨁"; "⊕"; "⊞"; ];
  ["-"; "÷"; "⊢"; "⊩"; "⧟"; "⊟"; ];
  ["="; "≝"; "≡"; "≘"; "≗"; "≐"; "≑"; "≛"; "≚"; "≙"; "⌆"; "⧦"; "⊜"; "≋"; "⩳"; "≅"; "⩬"; "≂"; "≃"; "≈"; ];  
- ["→"; "↦"; "⇝"; "⤞"; "⇾"; "⤍"; "⤏"; "⤳"; ] ;
- ["⇒"; "⤇"; "➾"; "⇨"; "➡"; "⬈"; "➤"; "➸"; "⇉"; "⥰"; ] ;
+ ["â\86\92"; "⥲"; "â\86¦"; "â\87\9d"; "â¤\9e"; "â\87¾"; "â¤\8d"; "â¤\8f"; "⤳"; ] ;
+ ["â\87\92"; "â¤\87"; "â\9e¾"; "â\87¨"; "â¬\80"; "â\9e¡"; "â¬\88"; "â\9e¤"; "â\9e¸"; "â\87\89"; "⥰"; ] ;
  ["^"; "↑"; "⇡"; ] ;
  ["⇑"; "⇧"; "⬆"; ] ; 
- ["⇓"; "⇩"; "⬇"; "⬊"; "➷"; ] ;
+ ["â\87\93"; "â\87©"; "â¬\82"; "â¬\87"; "â¬\8a"; "â\9e·"; ] ;
  ["⇕"; "⇳"; "⬍"; "↕"; ];
  ["↔"; "⇔"; "⬄"; "⬌"; ] ; 
  ["≤"; "≲"; "≼"; "≰"; "≴"; "⋠"; "⊆"; "⫃"; "⊑"; ] ;
@@ -1586,16 +1586,16 @@ let predefined_classes = [
  ["Y"; "ϒ"; "𝕐"; "𝐘"; "𝚼"; "Ⓨ"; ] ;
  ["z"; "ζ"; "𝕫"; "𝐳"; "𝛇"; "ⓩ"; ] ;
  ["Z"; "ℨ"; "ℤ"; "𝐙"; "Ⓩ"; ] ;
- ["0"; "𝟘"; "⓪"; ] ;
- ["1"; "𝟙"; "①"; "⓵"; ] ;
- ["2"; "𝟚"; "②"; "⓶"; ] ;
- ["3"; "𝟛"; "③"; "⓷"; ] ;
- ["4"; "𝟜"; "④"; "⓸"; ] ;
- ["5"; "𝟝"; "⑤"; "⓹"; ] ;
- ["6"; "𝟞"; "⑥"; "⓺"; ] ;
- ["7"; "𝟟"; "⑦"; "⓻"; ] ;
- ["8"; "𝟠"; "⑧"; "⓼"; "∞"; ] ;
- ["9"; "𝟡"; "⑨"; "⓽"; ] ;
+ ["0"; "𝟘"; "⓪"; "𝟎"; ] ;
+ ["1"; "𝟙"; "①"; "⓵"; "𝟏"; ] ;
+ ["2"; "𝟚"; "②"; "⓶"; "𝟐"; ] ;
+ ["3"; "𝟛"; "③"; "⓷"; "𝟑"; ] ;
+ ["4"; "𝟜"; "④"; "⓸"; "𝟒"; ] ;
+ ["5"; "𝟝"; "⑤"; "⓹"; "𝟓"; ] ;
+ ["6"; "𝟞"; "⑥"; "⓺"; "𝟔"; ] ;
+ ["7"; "𝟟"; "⑦"; "⓻"; "𝟕"; ] ;
+ ["8"; "𝟠"; "⑧"; "⓼"; "𝟖"; "∞"; ] ;
+ ["9"; "𝟡"; "⑨"; "⓽"; "𝟗"; ] ;
  ]
 ;;
 
index 229e780c28d8513951d1745e62595a7af7c642bb..a174ffa21dbf62595c5a07ea95090e3e13fdf92f 100644 (file)
@@ -59,7 +59,7 @@ let similar_symbols symbol =
 let get_all_eqclass () =
   let rc = ref [] in
   Hashtbl.iter 
-    (fun k v ->
+    (fun _k v ->
       if not (List.mem v !rc) then
         rc := v :: !rc)
     classes;