helm/www/lambdadelta/xslt/static_2_sum.xsl
helm/www/lambdadelta/xslt/basic_2A_src.xsl
helm/www/lambdadelta/xslt/basic_2A_sum.xsl
-helm/www/lambdadelta/xslt/ground_2_src.xsl
-helm/www/lambdadelta/xslt/ground_2_sum.xsl
+helm/www/lambdadelta/xslt/ground_src.xsl
+helm/www/lambdadelta/xslt/ground_sum.xsl
helm/www/lambdadelta/xslt/basic_1_blk.xsl
helm/www/lambdadelta/xslt/basic_1_src.xsl
helm/www/lambdadelta/xslt/basic_1_sum.xsl
@@("html/changes" "specification log")
* ]
[ @@("html/specification#v2" "version 2")
- "(" ^ @@("html/ground_2" "background") + "-" +
+ "(" ^ @@("html/ground" "background") + "-" +
@@("html/static_2" "syntax") + "-" +
@@("html/basic_2" "core") + "-" +
@@("html/apps_2" "applications") ^ ")"
subsequent improvements occur until the specification is completed or superseded,
while major changes and additions are announced and reported on paper.
<notice class="delta" text="Delta:"/>
- after its conclusion, the specification is modified just for maintenance.
+ after its conclusion, the specification is modified just for maintenance.
</body>
<table name="versions"/>
<notice class="alpha" text="Notice on displayed numerical acounts:"/>
nodes are counted according to the "intrinsic complexity measure"
[F. Guidi: "Procedural Representation of CIC Proof Terms"
- Journal of Automated Reasoning 44(1-2), Springer (February 2010), pp. 53-78].
+ Journal of Automated Reasoning 44(1-2), Springer (February 2010), pp. 53-78].
</topitem>
<topitem name="notice2">
<notice class="alpha" text="Notice on displayed logical structures:"/>
<rlink to="html/documentation.html#ldJ2a">Documentation (J2a)</rlink>.
<list><item>
<notice class="gamma" text="2020-02-27."/>
- repackaged without λδ-ground-2.
+ repackaged without λδ-ground_2.
</item><item>
<notice class="gamma" text="2019-11-19."/>
released [Git revision: 2019-11-19 20:45:15].
</item></list>
</body>
+ <body>
+ The scriprs depend on the package
+ <rlink to="html/specification.html#source2g">lambdadelta_ground</rlink>.
+ </body>
<body>
Informational pages on the parts of the specification:
- <rlink to="html/ground_2.html">Background</rlink>,
<rlink to="html/static_2.html">Syntax</rlink>,
<rlink to="html/basic_2.html">Core</rlink>,
<rlink to="html/apps_2.html">Applications</rlink>.
<rlink to="html/documentation.html#ldR2c">Documentation (R2c)</rlink>.
<list><item>
<notice class="delta" text="2020-02-27."/>
- repackaged on the basis of λδ-ground-2.
+ repackaged on the basis of λδ-ground_2.
</item><item>
<notice class="delta" text="2019-11-20."/>
repackaged (was lambdadelta_2A1).
released [Git revision: 2014-10-28 17:46:26].
</item></list>
</body>
+ <body>
+ The scriprs depend on the package
+ <rlink to="html/specification.html#source2g">lambdadelta_ground</rlink>.
+ </body>
<body>
Informational pages on the parts of the specification:
<rlink to="html/basic_2A.html">Core</rlink>.
<topitem name="source2g">
<body>
- <rlink to="download/lambdadelta_ground.tar.bz2">lambdadelta_ground for Matita 0.99.4</rlink>
+ <rlink to="download/lambdadelta_ground.tar.bz2">lambdadelta_ground for Matita 0.99.2</rlink>
(revised <notice class="gamma" text="2020-02"/>).
Source scripts.
<list><item>
</body>
</topitem>
-
<!-- VERSION 1 =========================================================== -->
<subsection name="v1"><img logo="ld1"/>λδ version 1 (superseded)</subsection>
<notice class="delta" text="2015-01-15."/>
17 new lemmas and former lemma "eq_nat_dec" renamed as "nat_dec_neg".
</item></list>
- </body>
+ </body>
<body>
Informational pages on the parts of the specification:
<rlink to="html/ground_1.html">Background</rlink>,
<topitem name="static1A">
<rlink to="static/matita/lambdadelta/">lambdadelta_1A for Matita 0.5</rlink>
(revised <notice class="delta" text="2019-11"/>).
- Static HTML pages generated by the <link to="http://helm.cs.unibo.it/">HELM</link> rendering engine.
+ Static HTML pages generated by the <link to="http://helm.cs.unibo.it/">HELM</link> rendering engine.
<list><item>
<rlink to="static/matita/lambdadelta/basic_1/pr3/pr3/pr3_confluence.con.html">
Confluence of reduction</rlink>
]
[ "\"A\"" @("http://matita.cs.unibo.it/" "Matita 0.99.2")
"April 2011" "June 2014" "October 2014" "August 2015"
- @@("html/documentation#ldV2a" "V2a") + " " + @@("html/documentation#ldR2c" "R2c") *
+ @@("html/documentation#ldV2a" "V2a") + "\ " + @@("html/documentation#ldR2c" "R2c") *
]
}
]
+ [ "Ground" "\"ground\""
+ [ "" @("http://matita.cs.unibo.it/" "Matita 0.99.2")
+ "August 2011" "March 2016" "February 2020" ""
+ "" *
+ ]
+ ]
[ "Abandoned" ""
[ "" @("http://coq.inria.fr/" "Coq 7.3.1")
"March 2008" "" "" "February 2011"
[ @@("html/specification#v1" "Version 1") "\"basic_1\""
[ "\"A\"" @("http://coq.inria.fr/" "Coq 7.3.1")
"May 2004" "December 2005" "November 2006" "May 2008"
- @@("html/documentation#ldV1a" "V1a") + " " + @@("html/documentation#ldJ1a" "J1a") *
+ @@("html/documentation#ldV1a" "V1a") + "\ " + @@("html/documentation#ldJ1a" "J1a") *
]
]
}
XOA_DIR := ../../../components/binaries/xoa
XOA := xoa.native
-XOA_CONF := ground_2/xoa.conf.xml
+XOA_CONF := ground/xoa.conf.xml
XOA_OPTS := ../../matita.conf.xml $(XOA_CONF)
DEP_INPUT := .depend
pack-ground pack-2a pack-2b \
home up-home \
-PACKAGES := ground_2 basic_2A static_2 basic_2 apps_2 alpha_1
+PACKAGES := ground basic_2A static_2 basic_2 apps_2 alpha_1
LDWS := $(shell find -name "*.ldw.xml")
TBLS := $(shell find -name "*.tbl")
pack-ground: PKG = lambdadelta_ground
-pack-ground: DIRS = ground_2
+pack-ground: DIRS = ground
pack-ground: PMAS = $(shell find $(DIRS) -name *.ma)
* Developed since : 2014 July 25
*)
-include "ground_2/lib/bool.ma".
-include "ground_2/lib/arith.ma".
+include "ground/lib/bool.ma".
+include "ground/lib/arith.ma".
(* ITEMS ********************************************************************)
(* *)
(**************************************************************************)
-include "ground_2/notation/functions/uparrowstar_2.ma".
+include "ground/notation/functions/uparrowstar_2.ma".
include "apps_2/notation/functional/uparrow_2.ma".
include "static_2/relocation/lifts.ma".
(* *)
(**************************************************************************)
-include "ground_2/relocation/nstream_basic.ma".
+include "ground/relocation/nstream_basic.ma".
include "apps_2/functional/flifts.ma".
include "apps_2/notation/functional/uparrow_3.ma".
(* *)
(**************************************************************************)
-include "ground_2/lib/functions.ma".
-include "ground_2/lib/exteq.ma".
+include "ground/lib/functions.ma".
+include "ground/lib/exteq.ma".
include "apps_2/functional/flifts_flifts_basic.ma".
include "apps_2/functional/mf_vlift.ma".
(* *)
(**************************************************************************)
-include "ground_2/lib/functions.ma".
-include "ground_2/lib/exteq.ma".
+include "ground/lib/functions.ma".
+include "ground/lib/exteq.ma".
include "apps_2/functional/flifts_flifts_basic.ma".
include "apps_2/functional/mf_vpush.ma".
(* *)
(**************************************************************************)
-include "ground_2/notation/relations/ringeq_3.ma".
+include "ground/notation/relations/ringeq_3.ma".
include "apps_2/notation/models/at_3.ma".
include "apps_2/notation/models/oplus_4.ma".
include "apps_2/notation/models/wbrackets_4.ma".
(* *)
(**************************************************************************)
-include "ground_2/lib/functions.ma".
+include "ground/lib/functions.ma".
include "apps_2/notation/models/upspoon_4.ma".
include "apps_2/models/model.ma".
(* *)
(**************************************************************************)
-include "ground_2/lib/exteq.ma".
+include "ground/lib/exteq.ma".
include "apps_2/models/model_vpush.ma".
include "apps_2/models/tm.ma".
(* *)
(**************************************************************************)
-include "ground_2/relocation/rtmap_basic.ma".
+include "ground/relocation/rtmap_basic.ma".
include "static_2/relocation/lifts.ma".
include "apps_2/models/veq.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_2_3.ma".
+include "ground/xoa/ex_2_3.ma".
include "static_2/syntax/ac.ma".
include "basic_2/notation/relations/exclaim_5.ma".
include "basic_2/rt_computation/cpms.ma".
(* *)
(**************************************************************************)
-include "ground_2/lib/arith_2b.ma".
+include "ground/lib/arith_2b.ma".
include "basic_2/rt_transition/lpr_lpr.ma".
include "basic_2/rt_computation/cpms_lsubr.ma".
include "basic_2/rt_computation/cpms_cpms.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_5_1.ma".
-include "ground_2/xoa/ex_8_5.ma".
-include "ground_2/xoa/ex_9_3.ma".
+include "ground/xoa/ex_5_1.ma".
+include "ground/xoa/ex_8_5.ma".
+include "ground/xoa/ex_9_3.ma".
include "basic_2/rt_transition/cpm_teqx.ma".
include "basic_2/rt_computation/fpbg_fqup.ma".
include "basic_2/dynamic/cnv_fsb.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_4_1_props.ma".
+include "ground/xoa/ex_4_1_props.ma".
include "basic_2/dynamic/cnv_cpm_teqx.ma".
(* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
(* *)
(**************************************************************************)
-include "ground_2/lib/arith_2b.ma".
+include "ground/lib/arith_2b.ma".
include "basic_2/rt_computation/cprs_cprs.ma".
include "basic_2/dynamic/cnv_drops.ma".
include "basic_2/dynamic/cnv_preserve_sub.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_5_3.ma".
+include "ground/xoa/ex_5_3.ma".
include "basic_2/rt_equivalence/cpcs_cpcs.ma".
include "basic_2/dynamic/cnv_preserve_cpcs.ma".
include "basic_2/dynamic/nta.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_7_5.ma".
+include "ground/xoa/ex_7_5.ma".
include "basic_2/rt_equivalence/cpcs_cprs.ma".
include "basic_2/dynamic/cnv_preserve.ma".
include "basic_2/i_dynamic/ntas.ma".
(* *)
(**************************************************************************)
-include "ground_2/lib/ltc.ma".
+include "ground/lib/ltc.ma".
include "basic_2/notation/relations/predstar_6.ma".
include "basic_2/rt_transition/cpm.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_3_5.ma".
-include "ground_2/xoa/ex_5_7.ma".
+include "ground/xoa/ex_3_5.ma".
+include "ground/xoa/ex_5_7.ma".
include "basic_2/rt_transition/cpm_lsubr.ma".
include "basic_2/rt_computation/cpms_drops.ma".
include "basic_2/rt_computation/cprs.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_4_5.ma".
+include "ground/xoa/ex_4_5.ma".
include "basic_2/rt_computation/cpms_cpms.ma".
include "basic_2/rt_computation/cprs_cpr.ma".
(* *)
(**************************************************************************)
-include "ground_2/lib/ltc_ctc.ma".
+include "ground/lib/ltc_ctc.ma".
include "basic_2/rt_computation/cpms.ma".
(* CONTEXT-SENSITIVE PARALLEL R-COMPUTATION FOR TERMS ***********************)
(* *)
(**************************************************************************)
-include "ground_2/lib/ltc.ma".
+include "ground/lib/ltc.ma".
include "basic_2/notation/relations/ptystar_6.ma".
include "basic_2/rt_transition/cpt.ma".
(* *)
(**************************************************************************)
-include "ground_2/lib/star.ma".
+include "ground/lib/star.ma".
include "basic_2/notation/relations/predtystar_5.ma".
include "basic_2/rt_transition/cpx.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_4_5.ma".
+include "ground/xoa/ex_4_5.ma".
include "basic_2/rt_transition/cpx_lsubr.ma".
include "basic_2/rt_computation/cpxs.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_2_3.ma".
+include "ground/xoa/ex_2_3.ma".
include "basic_2/notation/relations/predsubtystarproper_7.ma".
include "basic_2/rt_transition/fpb.ma".
include "basic_2/rt_computation/fpbs.ma".
(* *)
(**************************************************************************)
-include "ground_2/lib/star.ma".
+include "ground/lib/star.ma".
include "basic_2/notation/relations/predsubtystar_7.ma".
include "basic_2/rt_transition/fpbq.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_4_3.ma".
+include "ground/xoa/ex_4_3.ma".
include "basic_2/notation/relations/topredtysnstrong_4.ma".
include "basic_2/rt_computation/rsx.ma".
(* *)
(**************************************************************************)
-include "ground_2/lib/star.ma".
+include "ground/lib/star.ma".
include "basic_2/notation/relations/pconvstar_5.ma".
include "basic_2/rt_conversion/cpc.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_3_3.ma".
-include "ground_2/xoa/ex_4_2.ma".
-include "ground_2/xoa/ex_4_4.ma".
-include "ground_2/xoa/ex_5_2.ma".
-include "ground_2/xoa/ex_6_9.ma".
-include "ground_2/xoa/ex_7_10.ma".
-include "ground_2/xoa/or_5.ma".
-include "ground_2/steps/rtc_shift.ma".
-include "ground_2/steps/rtc_plus.ma".
-include "ground_2/steps/rtc_max.ma".
+include "ground/xoa/ex_3_3.ma".
+include "ground/xoa/ex_4_2.ma".
+include "ground/xoa/ex_4_4.ma".
+include "ground/xoa/ex_5_2.ma".
+include "ground/xoa/ex_6_9.ma".
+include "ground/xoa/ex_7_10.ma".
+include "ground/xoa/or_5.ma".
+include "ground/steps/rtc_shift.ma".
+include "ground/steps/rtc_plus.ma".
+include "ground/steps/rtc_max.ma".
include "basic_2/notation/relations/predty_7.ma".
include "static_2/syntax/sh.ma".
include "static_2/syntax/lenv.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_5_5.ma".
+include "ground/xoa/ex_5_5.ma".
include "static_2/relocation/drops_drops.ma".
include "static_2/s_computation/fqup_weight.ma".
include "static_2/s_computation/fqup_drops.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_4_1.ma".
-include "ground_2/xoa/ex_4_3.ma".
-include "ground_2/xoa/ex_5_6.ma".
-include "ground_2/xoa/ex_6_7.ma".
-include "ground_2/steps/rtc_max_shift.ma".
-include "ground_2/steps/rtc_isrt_plus.ma".
-include "ground_2/steps/rtc_isrt_max_shift.ma".
+include "ground/xoa/ex_4_1.ma".
+include "ground/xoa/ex_4_3.ma".
+include "ground/xoa/ex_5_6.ma".
+include "ground/xoa/ex_6_7.ma".
+include "ground/steps/rtc_max_shift.ma".
+include "ground/steps/rtc_isrt_plus.ma".
+include "ground/steps/rtc_isrt_max_shift.ma".
include "basic_2/notation/relations/pred_6.ma".
include "basic_2/rt_transition/cpg.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_6_6.ma".
-include "ground_2/xoa/ex_7_7.ma".
-include "ground_2/xoa/or_4.ma".
-include "ground_2/insert_eq/insert_eq_0.ma".
+include "ground/xoa/ex_6_6.ma".
+include "ground/xoa/ex_7_7.ma".
+include "ground/xoa/or_4.ma".
+include "ground/insert_eq/insert_eq_0.ma".
include "basic_2/rt_transition/cpm.ma".
(* CONTEXT-SENSITIVE PARALLEL R-TRANSITION FOR TERMS ************************)
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_4_3.ma".
-include "ground_2/steps/rtc_ist_shift.ma".
-include "ground_2/steps/rtc_ist_plus.ma".
-include "ground_2/steps/rtc_ist_max.ma".
+include "ground/xoa/ex_4_3.ma".
+include "ground/steps/rtc_ist_shift.ma".
+include "ground/steps/rtc_ist_plus.ma".
+include "ground/steps/rtc_ist_max.ma".
include "basic_2/notation/relations/pty_6.ma".
include "basic_2/rt_transition/cpg.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_3_4.ma".
-include "ground_2/xoa/ex_4_1.ma".
-include "ground_2/xoa/ex_5_6.ma".
-include "ground_2/xoa/ex_6_6.ma".
-include "ground_2/xoa/ex_6_7.ma".
-include "ground_2/xoa/ex_7_7.ma".
-include "ground_2/xoa/or_4.ma".
+include "ground/xoa/ex_3_4.ma".
+include "ground/xoa/ex_4_1.ma".
+include "ground/xoa/ex_5_6.ma".
+include "ground/xoa/ex_6_6.ma".
+include "ground/xoa/ex_6_7.ma".
+include "ground/xoa/ex_7_7.ma".
+include "ground/xoa/or_4.ma".
include "basic_2/notation/relations/predty_5.ma".
include "basic_2/rt_transition/cpg.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_4_5.ma".
+include "ground/xoa/ex_4_5.ma".
include "basic_2/rt_transition/cpg_drops.ma".
include "basic_2/rt_transition/cpx.ma".
<table name="basic_2_sum"/>
<news class="gamma" date="2020-02-27.">
- λδ-2B is repackaged without λδ-ground-2.
+ λδ-2B is repackaged without λδ-ground_2.
</news>
<news class="gamma" date="2019-11-19.">
λδ-2B is released.
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_4_5.ma".
+include "ground/xoa/ex_4_5.ma".
include "basic_2A/reduction/lpr_lpr.ma".
include "basic_2A/computation/cprs_lift.ma".
(* *)
(**************************************************************************)
-include "ground_2/ynat/ynat_minus_sn.ma".
+include "ground/ynat/ynat_minus_sn.ma".
include "basic_2A/notation/relations/cosn_5.ma".
include "basic_2A/computation/lsx.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_6_3.ma".
-include "ground_2/xoa/ex_7_4.ma".
+include "ground/xoa/ex_6_3.ma".
+include "ground/xoa/ex_7_4.ma".
include "basic_2A/notation/relations/lrsubeqc_4.ma".
include "basic_2A/static/lsubr.ma".
include "basic_2A/static/aaa.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_4_2.ma".
+include "ground/xoa/ex_4_2.ma".
include "basic_2A/notation/relations/dpredstar_7.ma".
include "basic_2A/static/da.ma".
include "basic_2A/computation/cprs.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_7_3.ma".
-include "ground_2/xoa/ex_8_4.ma".
+include "ground/xoa/ex_7_3.ma".
+include "ground/xoa/ex_8_4.ma".
include "basic_2A/notation/relations/lrsubeqv_5.ma".
include "basic_2A/dynamic/shnv.ma".
* Initial invocation: - Patience on me to gain peace and perfection! -
*)
-include "ground_2/lib/star.ma".
+include "ground/lib/star.ma".
include "basic_2A/notation/constructors/item0_0.ma".
include "basic_2A/notation/constructors/snitem2_2.ma".
(* *)
(**************************************************************************)
-include "ground_2/lib/bool.ma".
-include "ground_2/lib/arith.ma".
+include "ground/lib/bool.ma".
+include "ground/lib/arith.ma".
(* ITEMS ********************************************************************)
(* *)
(**************************************************************************)
-include "ground_2/notation/functions/append_2.ma".
+include "ground/notation/functions/append_2.ma".
include "basic_2A/notation/functions/snbind2_3.ma".
include "basic_2A/notation/functions/snabbr_2.ma".
include "basic_2A/notation/functions/snabst_2.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_2_3.ma".
+include "ground/xoa/ex_2_3.ma".
include "basic_2A/grammar/lenv.ma".
(* LENGTH OF A LOCAL ENVIRONMENT ********************************************)
(* *)
(**************************************************************************)
-include "ground_2/ynat/ynat_lt.ma".
+include "ground/ynat/ynat_lt.ma".
include "basic_2A/notation/relations/midiso_4.ma".
include "basic_2A/grammar/lenv_length.ma".
(* *)
(**************************************************************************)
-include "ground_2/ynat/ynat_plus.ma".
+include "ground/ynat/ynat_plus.ma".
include "basic_2A/grammar/lreq.ma".
(* EQUIVALENCE FOR LOCAL ENVIRONMENTS ***************************************)
(* *)
(**************************************************************************)
-include "ground_2/lib/list.ma".
+include "ground/lib/list.ma".
include "basic_2A/notation/functions/snapplvector_2.ma".
include "basic_2A/grammar/term_simple.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_1_2.ma".
+include "ground/xoa/ex_1_2.ma".
include "basic_2A/notation/relations/topiso_2.ma".
include "basic_2A/grammar/term_simple.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_4_3.ma".
-include "ground_2/relocation/mr2_minus.ma".
+include "ground/xoa/ex_4_3.ma".
+include "ground/relocation/mr2_minus.ma".
include "basic_2A/notation/relations/rdropstar_3.ma".
include "basic_2A/notation/relations/rdropstar_4.ma".
include "basic_2A/substitution/drop.ma".
(* *)
(**************************************************************************)
-include "ground_2/relocation/mr2_append.ma".
+include "ground/relocation/mr2_append.ma".
include "basic_2A/multiple/drops_drop.ma".
(* ITERATED LOCAL ENVIRONMENT SLICING ***************************************)
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_4_3.ma".
-include "ground_2/xoa/ex_5_4.ma".
-include "ground_2/ynat/ynat_plus.ma".
+include "ground/xoa/ex_4_3.ma".
+include "ground/xoa/ex_5_4.ma".
+include "ground/ynat/ynat_plus.ma".
include "basic_2A/notation/relations/freestar_4.ma".
include "basic_2A/substitution/lift_neg.ma".
include "basic_2A/substitution/drop.ma".
(* *)
(**************************************************************************)
-include "ground_2/lib/arith_2a.ma".
-include "ground_2/ynat/ynat_minus_sn.ma".
+include "ground/lib/arith_2a.ma".
+include "ground/ynat/ynat_minus_sn.ma".
include "basic_2A/substitution/drop_drop.ma".
include "basic_2A/multiple/frees.ma".
(* *)
(**************************************************************************)
-include "ground_2/relocation/mr2_at.ma".
-include "ground_2/relocation/mr2_plus.ma".
+include "ground/relocation/mr2_at.ma".
+include "ground/relocation/mr2_plus.ma".
include "basic_2A/notation/relations/rliftstar_3.ma".
include "basic_2A/substitution/lift.ma".
(* *)
(**************************************************************************)
-include "ground_2/relocation/mr2_minus.ma".
+include "ground/relocation/mr2_minus.ma".
include "basic_2A/substitution/lift_lift.ma".
include "basic_2A/multiple/lifts.ma".
(* *)
(**************************************************************************)
-include "ground_2/relocation/mr2_append.ma".
+include "ground/relocation/mr2_append.ma".
include "basic_2A/multiple/lifts_lift.ma".
(* GENERIC RELOCATION *******************************************************)
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_4_4.ma".
+include "ground/xoa/ex_4_4.ma".
include "basic_2A/notation/relations/lazyeq_4.ma".
include "basic_2A/multiple/llpx_sn.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/and_4.ma".
+include "ground/xoa/and_4.ma".
include "basic_2A/notation/relations/lazyor_5.ma".
include "basic_2A/multiple/frees.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_5_5.ma".
-include "ground_2/ynat/ynat_plus.ma".
+include "ground/xoa/ex_5_5.ma".
+include "ground/ynat/ynat_plus.ma".
include "basic_2A/substitution/drop.ma".
(* LAZY SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS ****)
(* *)
(**************************************************************************)
-include "ground_2/xoa/and_4.ma".
+include "ground/xoa/and_4.ma".
include "basic_2A/substitution/lift_neg.ma".
include "basic_2A/substitution/drop_drop.ma".
include "basic_2A/multiple/llpx_sn.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_4_2.ma".
+include "ground/xoa/ex_4_2.ma".
include "basic_2A/substitution/drop_drop.ma".
include "basic_2A/multiple/llpx_sn_lreq.ma".
(* *)
(**************************************************************************)
-include "ground_2/lib/arith_2a.ma".
+include "ground/lib/arith_2a.ma".
include "basic_2A/substitution/lpx_sn_drop.ma".
include "basic_2A/multiple/llpx_sn.ma".
(* *)
(**************************************************************************)
-include "ground_2/lib/arith_2a.ma".
+include "ground/lib/arith_2a.ma".
include "basic_2A/substitution/drop_lreq.ma".
include "basic_2A/multiple/llpx_sn.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/and_4.ma".
+include "ground/xoa/and_4.ma".
include "basic_2A/notation/relations/prednotreducible_3.ma".
include "basic_2A/reduction/crr.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_4_1.ma".
-include "ground_2/xoa/ex_5_6.ma".
-include "ground_2/xoa/ex_6_6.ma".
-include "ground_2/xoa/ex_6_7.ma".
-include "ground_2/xoa/ex_7_7.ma".
-include "ground_2/xoa/or_4.ma".
+include "ground/xoa/ex_4_1.ma".
+include "ground/xoa/ex_5_6.ma".
+include "ground/xoa/ex_6_6.ma".
+include "ground/xoa/ex_6_7.ma".
+include "ground/xoa/ex_7_7.ma".
+include "ground/xoa/or_4.ma".
include "basic_2A/notation/relations/pred_4.ma".
include "basic_2A/static/lsubr.ma".
include "basic_2A/unfold/lstas.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_3_4.ma".
-include "ground_2/xoa/ex_4_5.ma".
-include "ground_2/xoa/or_5.ma".
+include "ground/xoa/ex_3_4.ma".
+include "ground/xoa/ex_4_5.ma".
+include "ground/xoa/or_5.ma".
include "basic_2A/notation/relations/pred_6.ma".
include "basic_2A/static/sd.ma".
include "basic_2A/reduction/cpr.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_5_3.ma".
-include "ground_2/xoa/ex_6_4.ma".
+include "ground/xoa/ex_5_3.ma".
+include "ground/xoa/ex_6_4.ma".
include "basic_2A/notation/relations/lrsubeqa_3.ma".
include "basic_2A/static/lsubr.ma".
include "basic_2A/static/aaa.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_5_3.ma".
-include "ground_2/xoa/ex_6_4.ma".
+include "ground/xoa/ex_5_3.ma".
+include "ground/xoa/ex_6_4.ma".
include "basic_2A/notation/relations/lrsubeqd_5.ma".
include "basic_2A/static/lsubr.ma".
include "basic_2A/static/da.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_4_3.ma".
+include "ground/xoa/ex_4_3.ma".
include "basic_2A/static/lsubr.ma".
(* RESTRICTED LOCAL ENVIRONMENT REFINEMENT **********************************)
(* *)
(**************************************************************************)
-include "ground_2/lib/arith_2a.ma".
+include "ground/lib/arith_2a.ma".
(* SORT HIERARCHY ***********************************************************)
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_1_2.ma".
-include "ground_2/xoa/ex_1_3.ma".
-include "ground_2/xoa/ex_3_3.ma".
-include "ground_2/lib/star.ma".
-include "ground_2/lib/lstar_2a.ma".
+include "ground/xoa/ex_1_2.ma".
+include "ground/xoa/ex_1_3.ma".
+include "ground/xoa/ex_3_3.ma".
+include "ground/lib/star.ma".
+include "ground/lib/lstar_2a.ma".
include "basic_2A/notation/relations/rdrop_5.ma".
include "basic_2A/notation/relations/rdrop_4.ma".
include "basic_2A/notation/relations/rdrop_3.ma".
(* *)
(**************************************************************************)
-include "ground_2/lib/arith_2a.ma".
+include "ground/lib/arith_2a.ma".
include "basic_2A/grammar/lenv_append.ma".
include "basic_2A/substitution/drop.ma".
(* *)
(**************************************************************************)
-include "ground_2/ynat/ynat_minus_sn.ma".
+include "ground/ynat/ynat_minus_sn.ma".
include "basic_2A/grammar/lreq_lreq.ma".
include "basic_2A/substitution/drop.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_3_2.ma".
+include "ground/xoa/ex_3_2.ma".
include "basic_2A/notation/relations/rlift_4.ma".
include "basic_2A/grammar/term_weight.ma".
include "basic_2A/grammar/term_simple.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_3_2.ma".
+include "ground/xoa/ex_3_2.ma".
include "basic_2A/grammar/lenv_length.ma".
(* SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS *********)
(* *)
(**************************************************************************)
-include "ground_2/lib/star.ma".
+include "ground/lib/star.ma".
include "basic_2A/substitution/lpx_sn.ma".
(* SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS *********)
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_4_3.ma".
-include "ground_2/xoa/ex_4_4.ma".
+include "ground/xoa/ex_4_3.ma".
+include "ground/xoa/ex_4_4.ma".
include "basic_2A/notation/relations/statictypestar_6.ma".
include "basic_2A/grammar/genv.ma".
include "basic_2A/substitution/drop.ma".
<table name="basic_2A_sum"/>
<news class="delta" date="2020-02-27.">
- λδ-2A is repackaged on the basis of λδ-ground-2.
+ λδ-2A is repackaged without λδ-ground_2.
</news>
<news class="delta" date="2019-11-20.">
λδ-2A is repackaged (was λδ-2A1).
| QT { "" }
| "\\\\" { "\\" ^ str lexbuf }
| "\\\"" { "\"" ^ str lexbuf }
+ | "\\ " { "\xC2\xA0" ^ str lexbuf }
| _ as c { S.make 1 c ^ str lexbuf }
and block = parse
| "*)" { () }
-../../matitac.opt ground_2
+../../matitac.opt ground
+../../matitac.opt basic_2A
../../matitac.opt static_2
../../matitac.opt basic_2
../../matitac.opt apps_2
--- /dev/null
+
+lemma zero_or_gt: ∀n. n = 0 ∨ 0 < n.
+#n elim (lt_or_eq_or_gt 0 n) /2/
+#H elim (lt_zero_false … H)
+qed.
+
+lemma pippo: ∀x,y,z. x < z → y < z - x → x + y < z.
+/3 width=2/
+
+lemma arith_b1x: ∀e,x1,x2,y. y ≤ x2 → x2 ≤ x1 →
+ e + (x1 - y) - (x2 - y) = e + (x1 - x2).
+#e #x1 #x2 #y #H1 #H2
+<(arith_b1 … H1) >le_plus_minus // /2 width=1/
+qed-.
+
+lemma arith1: ∀x,y,z,w. z < y → x + (y + w) - z = x + y - z + w.
+#x #y #z #w #H <le_plus_minus_comm // /3 width=1 by lt_to_le, le_plus_a/
+qed-.
+
+lemma lt_dec: ∀n2,n1. Decidable (n1 < n2).
+#n2 elim n2 -n2
+[ /4 width=3 by or_intror, absurd, nmk/
+| #n2 #IHn2 * /2 width=1 by or_introl/
+ #n1 elim (IHn2 n1) -IHn2
+ /4 width=1 by le_S_S, monotonic_pred, or_intror, or_introl/
+]
+qed-.
+
+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-.
--- /dev/null
+let rec append A (l1: list A) l2 on l1 ≝
+ match l1 with
+ [ nil ⇒ l2
+ | cons hd tl ⇒ hd :: append A tl l2
+ ].
+
+interpretation "append (list)" 'Append l1 l2 = (append ? l1 l2).
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground_2/notation/functions/oplus_4.ma".
+include "ground_2/lib/list2.ma".
+
+(* LISTS OF PAIRS ***********************************************************)
+
+rec definition append2 A1 A2 (l1,l2:list2 A1 A2) on l1 ≝ match l1 with
+[ nil2 ⇒ l2
+| cons2 a1 a2 tl ⇒ {a1, a2} ⨮ append2 A1 A2 tl l2
+].
+
+interpretation "append (list of pairs)"
+ 'OPlus A1 A2 l1 l2 = (append2 A1 A2 l1 l2).
--- /dev/null
+lemma eq_repl4: ∀A,B,C,D.∀R:relation4 A B C D.
+∀x1,x2:A.∀y1,y2:B. ∀z1,z2:C. ∀w1,w2:D. x1=x2 → y1=y2 → z1=z2 → w1=w2 → R x2 y2 z2 w2 → R x1 y1 z1 w1.
+// qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation < "hvbox( l1 ⊕ break l2 )"
+ left associative with precedence 60
+ for @{ 'OPlus $A $B $l1 $l2 }.
+
+notation > "hvbox( l1 ⊕ break l2 )"
+ left associative with precedence 60
+ for @{ 'OPlus ? ? $l1 $l2 }.
+(*
+(**) fix pair notation
+notation > "hvbox( l1 ⊕{ break term 46 A, break term 46 A } break term 61 l2 )"
+ non associative with precedence 60
+ for @{ 'OPlus $A $B $l1 $l2 }.
+*)
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basics/relations.ma".
+
+(* ADDITIONAL PROPERTIES OF RELATIONS ***************************************)
+
+lemma replace2: ∀A,B:Type[0]. ∀R:relation2 A B. ∀x1,y1,x2,y2.
+ R x1 x2 → y1 = x1 → y2 = x2 → R y1 y2.
+// qed-.
--- /dev/null
+lemma TC_case_sn: ∀A,R. reflexive A R →
+ ∀a1,a2. TC … R a1 a2 → ∃∃a. R a1 a & TC … R a a2.
+#A #R #HR #a1 #a2 #H @(TC_ind_dx … a1 H) -a1
+[ /3 width=3 by inj, ex2_intro/
+| #a1 #a0 #Ha10 #Ha02 #_ /2 width=3 by ex2_intro/ (**) (* auto fails withput #_ *)
+]
+qed-.
+
+lemma TC_case_dx: ∀A,R. reflexive A R →
+ ∀a1,a2. TC … R a1 a2 → ∃∃a. TC … R a1 a & R a a2.
+#A #R #HR #a1 #a2 #H @(TC_ind … a2 H) -a2
+[ /3 width=3 by inj, ex2_intro/
+| #a0 #a2 #Ha10 #Ha02 #_ /2 width=3 by ex2_intro/ (**) (* auto fails withput #_ *)
+]
+qed-.
+
+definition s_r_trans: ∀A,B. relation2 (A→relation B) (relation A) ≝ λA,B,R1,R2.
+ ∀L2,T1,T2. R1 L2 T1 T2 → ∀L1. R2 L1 L2 → LTC … R1 L1 T1 T2.
+
+definition s_rs_trans: ∀A,B. relation2 (A→relation B) (relation A) ≝ λA,B,R1,R2.
+ ∀L2,T1,T2. LTC … R1 L2 T1 T2 → ∀L1. R2 L1 L2 → LTC … R1 L1 T1 T2.
+
+lemma s_r_trans_TC1: ∀A,B,R,S. s_r_trans A B R S → s_rs_trans A B R S.
+#A #B #R #S #HRS #L2 #T1 #T2 #H elim H -T2 [ /3 width=3/ ]
+#T #T2 #_ #HT2 #IHT1 #L1 #HL12
+lapply (HRS … HT2 … HL12) -HRS -HT2 /3 width=3/
+qed-.
+
+lemma s_r_trans_TC2: ∀A,B,R,S. s_rs_trans A B R S → s_r_trans A B R (TC … S).
+#A #B #R #S #HRS #L2 #T1 #T2 #HT12 #L1 #H @(TC_ind_dx … L1 H) -L1 /2 width=3/ /3 width=3/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( ∁ term 70 t )"
+ non associative with precedence 70
+ for @{ 'Complement $t }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox ( ∥ term 19 C ∥ )"
+ with precedence 70
+ for @{ 'Norm $C }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground_2/relocation/rtmap_tl.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+inductive le (f1): predicate rtmap ≝
+| le_eq: ∀f2. f1 ≗ f2 → le f1 f2
+| le_tl: ∀f2,g2. le f1 f2 → ↓g2 = f2 → le f1 g2
+.
+
+interpretation "less or equal to (rtmap)" 'leq x y = (le x y).
+
+(* Basic properties *********************************************************)
+
+lemma le_refl: reflexive … le.
+/2 width=1 by eq_refl, le_eq/ qed.
+
+lemma le_eq_repl_back_dx: ∀f1. eq_repl_back (λf2. f1 ≤ f2).
+#f #f1 #Hf1 elim Hf1 -f1
+/4 width=3 by le_tl, le_eq, tl_eq_repl, eq_trans/
+qed-.
+
+lemma le_eq_repl_fwd_dx: ∀f1. eq_repl_fwd (λf2. f1 ≤ f2).
+#f1 @eq_repl_sym /2 width=3 by le_eq_repl_back_dx/
+qed-.
+
+lemma le_eq_repl_back_sn: ∀f2. eq_repl_back (λf1. f1 ≤ f2).
+#f #f1 #Hf1 elim Hf1 -f
+/4 width=3 by le_tl, le_eq, tl_eq_repl, eq_canc_sn/
+qed-.
+
+lemma le_eq_repl_fwd_sn: ∀f2. eq_repl_fwd (λf1. f1 ≤ f2).
+#f2 @eq_repl_sym /2 width=3 by le_eq_repl_back_sn/
+qed-.
+
+lemma le_tl_comp: ∀f1,f2. f1 ≤ f2 → ∀g1,g2. ↓f1 = g1 → ↓f2 = g2 → g1 ≤ g2.
+#f1 #f2 #H elim H -f2
+/3 width=3 by le_tl, le_eq, tl_eq_repl/
+qed.
+
+(* Main properties **********************************************************)
+
+theorem le_trans: Transitive … le.
+#f1 #f #H elim H -f
+/4 width=5 by le_tl_comp, le_eq_repl_fwd_sn, le_tl/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground_2/notation/functions/norm_1.ma".
+include "ground_2/lib/bool.ma".
+include "ground_2/lib/list.ma".
+
+(* RELOCATION TRACE *********************************************************)
+
+definition trace: Type[0] ≝ list bool.
+
+let rec colength (cs:trace) on cs ≝ match cs with
+[ nil ⇒ 0
+| cons b tl ⇒ match b with [ true ⇒ ⫯(colength tl) | false ⇒ colength tl ]
+].
+
+interpretation "colength (trace)"
+ 'Norm cs = (colength cs).
+
+(* basic properties *********************************************************)
+
+lemma colength_empty: ∥◊∥ = 0.
+// qed.
+
+lemma colength_true: ∀cs. ∥Ⓣ@cs∥ = ⫯∥cs∥.
+// qed.
+
+lemma colength_false: ∀cs. ∥Ⓕ@cs∥ = ∥cs∥.
+// qed.
+
+lemma colength_cons: ∀cs1,cs2. ∥cs1∥ = ∥cs2∥ →
+ ∀b. ∥b@cs1∥ = ∥b@cs2∥.
+#cs1 #cs2 #H * /2 width=1 by/
+qed.
+
+lemma colength_le: ∀cs. ∥cs∥ ≤ |cs|.
+#cs elim cs -cs //
+* /2 width=1 by le_S_S, le_S/
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground_2/notation/relations/rafter_3.ma".
+include "ground_2/relocation/trace_at.ma".
+
+(* RELOCATION TRACE *********************************************************)
+
+inductive after: relation3 trace trace trace ≝
+ | after_empty: after (◊) (◊) (◊)
+ | after_true : ∀cs1,cs2,cs. after cs1 cs2 cs →
+ ∀b. after (Ⓣ @ cs1) (b @ cs2) (b @ cs)
+ | after_false: ∀cs1,cs2,cs. after cs1 cs2 cs →
+ after (Ⓕ @ cs1) cs2 (Ⓕ @ cs).
+
+interpretation "composition (trace)"
+ 'RAfter cs1 cs2 cs = (after cs1 cs2 cs).
+
+(* Basic properties *********************************************************)
+
+lemma after_length: ∀cs1,cs2. ∥cs1∥ = |cs2| →
+ ∃∃cs. cs1 ⊚ cs2 ≡ cs & |cs| = |cs1| & ∥cs∥ = ∥cs2∥.
+#cs1 elim cs1 -cs1
+[ #cs2 #H >(length_inv_zero_sn … H) -cs2 /2 width=4 by after_empty, ex3_intro/
+| * #cs1 #IH #cs2 #Hcs
+ [ elim (length_inv_succ_sn … Hcs) -Hcs
+ #tl #b #Hcs #H destruct
+ ]
+ elim (IH … Hcs) -IH -Hcs
+ #cs #Hcs #H1 #H2 [ @(ex3_intro … (b@cs)) | @(ex3_intro … (Ⓕ@cs)) ] /2 width=1 by after_true, after_false, colength_cons/
+]
+qed-.
+
+(* Basic inversion lemmas ***************************************************)
+
+fact after_inv_empty1_aux: ∀cs1,cs2,cs. cs1 ⊚ cs2 ≡ cs → cs1 = ◊ →
+ cs2 = ◊ ∧ cs = ◊.
+#cs1 #cs2 #cs * -cs1 -cs2 -cs
+[ /2 width=1 by conj/
+| #cs1 #cs2 #cs #_ #b #H destruct
+| #cs1 #cs2 #cs #_ #H destruct
+]
+qed-.
+
+lemma after_inv_empty1: ∀cs2,cs. ◊ ⊚ cs2 ≡ cs → cs2 = ◊ ∧ cs = ◊.
+/2 width=3 by after_inv_empty1_aux/ qed-.
+
+fact after_inv_true1_aux: ∀cs1,cs2,cs. cs1 ⊚ cs2 ≡ cs → ∀tl1. cs1 = Ⓣ @ tl1 →
+ ∃∃tl2,tl,b. cs2 = b @ tl2 & cs = b @ tl & tl1 ⊚ tl2 ≡ tl.
+#cs1 #cs2 #cs * -cs1 -cs2 -cs
+[ #tl1 #H destruct
+| #cs1 #cs2 #cs #H12 #b #tl1 #H destruct
+ /2 width=6 by ex3_3_intro/
+| #cs1 #cs2 #cs #_ #tl1 #H destruct
+]
+qed-.
+
+lemma after_inv_true1: ∀tl1,cs2,cs. (Ⓣ @ tl1) ⊚ cs2 ≡ cs →
+ ∃∃tl2,tl,b. cs2 = b @ tl2 & cs = b @ tl & tl1 ⊚ tl2 ≡ tl.
+/2 width=3 by after_inv_true1_aux/ qed-.
+
+fact after_inv_false1_aux: ∀cs1,cs2,cs. cs1 ⊚ cs2 ≡ cs → ∀tl1. cs1 = Ⓕ @ tl1 →
+ ∃∃tl. cs = Ⓕ @ tl & tl1 ⊚ cs2 ≡ tl.
+#cs1 #cs2 #cs * -cs1 -cs2 -cs
+[ #tl1 #H destruct
+| #cs1 #cs2 #cs #_ #b #tl1 #H destruct
+| #cs1 #cs2 #cs #H12 #tl1 #H destruct
+ /2 width=3 by ex2_intro/
+]
+qed-.
+
+lemma after_inv_false1: ∀tl1,cs2,cs. (Ⓕ @ tl1) ⊚ cs2 ≡ cs →
+ ∃∃tl. cs = Ⓕ @ tl & tl1 ⊚ cs2 ≡ tl.
+/2 width=3 by after_inv_false1_aux/ qed-.
+
+fact after_inv_empty3_aux: ∀cs1,cs2,cs. cs1 ⊚ cs2 ≡ cs → cs = ◊ →
+ cs1 = ◊ ∧ cs2 = ◊.
+#cs1 #cs2 #cs * -cs1 -cs2 -cs
+[ /2 width=1 by conj/
+| #cs1 #cs2 #cs #_ #b #H destruct
+| #cs1 #cs2 #cs #_ #H destruct
+]
+qed-.
+
+lemma after_inv_empty3: ∀cs1,cs2. cs1 ⊚ cs2 ≡ ◊ → cs1 = ◊ ∧ cs2 = ◊.
+/2 width=3 by after_inv_empty3_aux/ qed-.
+
+fact after_inv_inh3_aux: ∀cs1,cs2,cs. cs1 ⊚ cs2 ≡ cs → ∀tl,b. cs = b @ tl →
+ (∃∃tl1,tl2. cs1 = Ⓣ @ tl1 & cs2 = b @ tl2 & tl1 ⊚ tl2 ≡ tl) ∨
+ ∃∃tl1. cs1 = Ⓕ @ tl1 & b = Ⓕ & tl1 ⊚ cs2 ≡ tl.
+#cs1 #cs2 #cs * -cs1 -cs2 -cs
+[ #tl #b #H destruct
+| #cs1 #cs2 #cs #H12 #b0 #tl #b #H destruct
+ /3 width=5 by ex3_2_intro, or_introl/
+| #cs1 #cs2 #cs #H12 #tl #b #H destruct
+ /3 width=3 by ex3_intro, or_intror/
+]
+qed-.
+
+lemma after_inv_inh3: ∀cs1,cs2,tl,b. cs1 ⊚ cs2 ≡ b @ tl →
+ (∃∃tl1,tl2. cs1 = Ⓣ @ tl1 & cs2 = b @ tl2 & tl1 ⊚ tl2 ≡ tl) ∨
+ ∃∃tl1. cs1 = Ⓕ @ tl1 & b = Ⓕ & tl1 ⊚ cs2 ≡ tl.
+/2 width=3 by after_inv_inh3_aux/ qed-.
+
+lemma after_inv_true3: ∀cs1,cs2,tl. cs1 ⊚ cs2 ≡ Ⓣ @ tl →
+ ∃∃tl1,tl2. cs1 = Ⓣ @ tl1 & cs2 = Ⓣ @ tl2 & tl1 ⊚ tl2 ≡ tl.
+#cs1 #cs2 #tl #H elim (after_inv_inh3 … H) -H // *
+#tl1 #_ #H destruct
+qed-.
+
+lemma after_inv_false3: ∀cs1,cs2,tl. cs1 ⊚ cs2 ≡ Ⓕ @ tl →
+ (∃∃tl1,tl2. cs1 = Ⓣ @ tl1 & cs2 = Ⓕ @ tl2 & tl1 ⊚ tl2 ≡ tl) ∨
+ ∃∃tl1. cs1 = Ⓕ @ tl1 & tl1 ⊚ cs2 ≡ tl.
+#cs1 #cs2 #tl #H elim (after_inv_inh3 … H) -H /2 width=1 by or_introl/ * /3 width=3 by ex2_intro, or_intror/
+qed-.
+
+lemma after_inv_length: ∀cs1,cs2,cs. cs1 ⊚ cs2 ≡ cs →
+ ∧∧ ∥cs1∥ = |cs2| & |cs| = |cs1| & ∥cs∥ = ∥cs2∥.
+#cs1 #cs2 #cs #H elim H -cs1 -cs2 -cs /2 width=1 by and3_intro/
+#cs1 #cs2 #cs #_ [ * ] * /2 width=1 by and3_intro/
+qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma after_at_fwd: ∀cs1,cs2,cs. cs2 ⊚ cs1 ≡ cs → ∀i1,i. @⦃i1, cs⦄ ≡ i →
+ ∃∃i2. @⦃i1, cs1⦄ ≡ i2 & @⦃i2, cs2⦄ ≡ i.
+#cs1 #cs2 #cs #H elim H -cs1 -cs2 -cs
+[ #i1 #i #H elim (at_inv_empty … H) -H
+ #H1 #H2 destruct /2 width=3 by at_empty, ex2_intro/
+| #cs1 #cs2 #cs #_ * #IH #i1 #i #H
+ [ elim (at_inv_true … H) -H *
+ [ -IH #H1 #H2 destruct /2 width=3 by at_zero, ex2_intro/
+ | #j1 #j #H1 #H2 #Hj1 destruct
+ elim (IH … Hj1) -IH -Hj1 /3 width=3 by at_succ, ex2_intro/
+ ]
+ | elim (at_inv_false … H) -H
+ #j #H #Hj destruct
+ elim (IH … Hj) -IH -Hj /3 width=3 by at_succ, at_false, ex2_intro/
+ ]
+| #cs1 #cs2 #cs #_ #IH #i1 #i #H elim (at_inv_false … H) -H
+ #j #H #Hj destruct
+ elim (IH … Hj) -IH -Hj /3 width=3 by at_false, ex2_intro/
+]
+qed-.
+
+lemma after_at1_fwd: ∀cs1,cs2,cs. cs2 ⊚ cs1 ≡ cs → ∀i1,i2. @⦃i1, cs1⦄ ≡ i2 →
+ ∃∃i. @⦃i2, cs2⦄ ≡ i & @⦃i1, cs⦄ ≡ i.
+#cs1 #cs2 #cs #H elim H -cs1 -cs2 -cs
+[ #i1 #i2 #H elim (at_inv_empty … H) -H
+ #H1 #H2 destruct /2 width=3 by at_empty, ex2_intro/
+| #cs1 #cs2 #cs #_ * #IH #i1 #i2 #H
+ [ elim (at_inv_true … H) -H *
+ [ -IH #H1 #H2 destruct /2 width=3 by at_zero, ex2_intro/
+ | #j1 #j2 #H1 #H2 #Hj12 destruct
+ elim (IH … Hj12) -IH -Hj12 /3 width=3 by at_succ, ex2_intro/
+ ]
+ | elim (at_inv_false … H) -H
+ #j2 #H #Hj2 destruct
+ elim (IH … Hj2) -IH -Hj2 /3 width=3 by at_succ, at_false, ex2_intro/
+ ]
+| #cs1 #cs2 #cs #_ #IH #i1 #i2 #H elim (IH … H) -IH -H
+ /3 width=3 by at_false, ex2_intro/
+]
+qed-.
+
+lemma after_fwd_at: ∀cs1,cs2,cs. cs2 ⊚ cs1 ≡ cs →
+ ∀i1,i2,i. @⦃i1, cs1⦄ ≡ i2 → @⦃i2, cs2⦄ ≡ i → @⦃i1, cs⦄ ≡ i.
+#cs1 #cs2 #cs #Hcs #i1 #i2 #i #Hi1 #Hi2 elim (after_at1_fwd … Hcs … Hi1) -cs1
+#j #H #Hj >(at_mono … Hi2 … H) -i2 //
+qed-.
+
+lemma after_fwd_at1: ∀cs1,cs2,cs. cs2 ⊚ cs1 ≡ cs →
+ ∀i1,i2,i. @⦃i1, cs⦄ ≡ i → @⦃i2, cs2⦄ ≡ i → @⦃i1, cs1⦄ ≡ i2.
+#cs1 #cs2 #cs #Hcs #i1 #i2 #i #Hi1 #Hi2 elim (after_at_fwd … Hcs … Hi1) -cs
+#j1 #Hij1 #H >(at_inj … Hi2 … H) -i //
+qed-.
+
+lemma after_fwd_at2: ∀cs1,cs2,cs. cs2 ⊚ cs1 ≡ cs →
+ ∀i1,i2,i. @⦃i1, cs⦄ ≡ i → @⦃i1, cs1⦄ ≡ i2 → @⦃i2, cs2⦄ ≡ i.
+#cs1 #cs2 #cs #H elim H -cs1 -cs2 -cs
+[ #i1 #i2 #i #Hi #Hi1 elim (at_inv_empty … Hi1) -Hi1 //
+| #cs1 #cs2 #cs #_ * #IH #i1 #i2 #i #Hi #Hi1
+ [ elim (at_inv_true … Hi1) -Hi1 *
+ [ -IH #H1 #H2 destruct >(at_inv_true_zero_sn … Hi) -i //
+ | #j1 #j2 #H1 #H2 #Hj12 destruct elim (at_inv_true_succ_sn … Hi) -Hi
+ #j #H #Hj1 destruct /3 width=3 by at_succ/
+ ]
+ | elim (at_inv_false … Hi1) -Hi1
+ #j2 #H #Hj2 destruct elim (at_inv_false … Hi) -Hi
+ #j #H #Hj destruct /3 width=3 by at_succ/
+ ]
+| #cs1 #cs2 #cs #_ #IH #i1 #i2 #i #Hi #Hi2 elim (at_inv_false … Hi) -Hi
+ #j #H #Hj destruct /3 width=3 by at_false/
+]
+qed-.
+
+(* Main properties **********************************************************)
+
+theorem after_trans1: ∀cs1,cs2,cs0. cs1 ⊚ cs2 ≡ cs0 →
+ ∀cs3, cs4. cs0 ⊚ cs3 ≡ cs4 →
+ ∃∃cs. cs2 ⊚ cs3 ≡ cs & cs1 ⊚ cs ≡ cs4.
+#cs1 #cs2 #cs0 #H elim H -cs1 -cs2 -cs0
+[ #cs3 #cs4 #H elim (after_inv_empty1 … H) -H
+ #H1 #H2 destruct /2 width=3 by ex2_intro, after_empty/
+| #cs1 #cs2 #cs0 #_ * #IH #cs3 #cs4 #H
+ [ elim (after_inv_true1 … H) -H
+ #tl3 #tl4 #b #H1 #H2 #Htl destruct
+ elim (IH … Htl) -cs0
+ /3 width=3 by ex2_intro, after_true/
+ | elim (after_inv_false1 … H) -H
+ #tl4 #H #Htl destruct
+ elim (IH … Htl) -cs0
+ /3 width=3 by ex2_intro, after_true, after_false/
+ ]
+| #cs1 #cs2 #cs0 #_ #IH #cs3 #cs4 #H
+ elim (after_inv_false1 … H) -H
+ #tl4 #H #Htl destruct
+ elim (IH … Htl) -cs0
+ /3 width=3 by ex2_intro, after_false/
+]
+qed-.
+
+theorem after_trans2: ∀cs1,cs0,cs4. cs1 ⊚ cs0 ≡ cs4 →
+ ∀cs2, cs3. cs2 ⊚ cs3 ≡ cs0 →
+ ∃∃cs. cs1 ⊚ cs2 ≡ cs & cs ⊚ cs3 ≡ cs4.
+#cs1 #cs0 #cs4 #H elim H -cs1 -cs0 -cs4
+[ #cs2 #cs3 #H elim (after_inv_empty3 … H) -H
+ #H1 #H2 destruct /2 width=3 by ex2_intro, after_empty/
+| #cs1 #cs0 #cs4 #_ #b #IH #cs2 #cs3 #H elim (after_inv_inh3 … H) -H *
+ [ #tl2 #tl3 #H1 #H2 #Htl destruct
+ elim (IH … Htl) -cs0
+ /3 width=3 by ex2_intro, after_true/
+ | #tl2 #H1 #H2 #Htl destruct
+ elim (IH … Htl) -cs0
+ /3 width=3 by ex2_intro, after_true, after_false/
+ ]
+| #cs1 #cs0 #cs4 #_ #IH #cs2 #cs3 #H elim (IH … H) -cs0
+ /3 width=3 by ex2_intro, after_false/
+]
+qed-.
+
+theorem after_mono: ∀cs1,cs2,x. cs1 ⊚ cs2 ≡ x → ∀y. cs1 ⊚ cs2 ≡ y → x = y.
+#cs1 #cs2 #x #H elim H -cs1 -cs2 -x
+[ #y #H elim (after_inv_empty1 … H) -H //
+| #cs1 #cs #x #_ #b #IH #y #H elim (after_inv_true1 … H) -H
+ #tl #tly #b0 #H1 #H2 #Htl destruct >(IH … Htl) -tl -cs1 -x //
+| #cs1 #cs2 #x #_ #IH #y #H elim (after_inv_false1 … H) -H
+ #tly #H #Htl destruct >(IH … Htl) -cs1 -cs2 -x //
+]
+qed-.
+
+theorem after_inj: ∀cs1,x,cs. cs1 ⊚ x ≡ cs → ∀y. cs1 ⊚ y ≡ cs → x = y.
+#cs1 #x #cs #H elim H -cs1 -x -cs
+[ #y #H elim (after_inv_empty1 … H) -H //
+| #cs1 #x #cs #_ #b #IH #y #H elim (after_inv_true1 … H) -H
+ #tly #tl #b0 #H1 #H2 #Htl destruct >(IH … Htl) -tl -cs1 -x //
+| #cs1 #x #cs #_ #IH #y #H elim (after_inv_false1 … H) -H
+ #tl #H #Htl destruct >(IH … Htl) -tl -cs1 -x //
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground_2/notation/relations/rat_3.ma".
+include "ground_2/relocation/trace.ma".
+
+(* RELOCATION TRACE *********************************************************)
+
+inductive at: trace → relation nat ≝
+ | at_empty: at (◊) 0 0
+ | at_zero : ∀cs. at (Ⓣ @ cs) 0 0
+ | at_succ : ∀cs,i1,i2. at cs i1 i2 → at (Ⓣ @ cs) (⫯i1) (⫯i2)
+ | at_false: ∀cs,i1,i2. at cs i1 i2 → at (Ⓕ @ cs) i1 (⫯i2).
+
+interpretation "relocation (trace)"
+ 'RAt i1 cs i2 = (at cs i1 i2).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact at_inv_empty_aux: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → cs = ◊ → i1 = 0 ∧ i2 = 0.
+#cs #i1 #i2 * -cs -i1 -i2 /2 width=1 by conj/
+#cs #i1 #i2 #_ #H destruct
+qed-.
+
+lemma at_inv_empty: ∀i1,i2. @⦃i1, ◊⦄ ≡ i2 → i1 = 0 ∧ i2 = 0.
+/2 width=5 by at_inv_empty_aux/ qed-.
+
+lemma at_inv_empty_zero_sn: ∀i. @⦃0, ◊⦄ ≡ i → i = 0.
+#i #H elim (at_inv_empty … H) -H //
+qed-.
+
+lemma at_inv_empty_zero_dx: ∀i. @⦃i, ◊⦄ ≡ 0 → i = 0.
+#i #H elim (at_inv_empty … H) -H //
+qed-.
+
+lemma at_inv_empty_succ_sn: ∀i1,i2. @⦃⫯i1, ◊⦄ ≡ i2 → ⊥.
+#i1 #i2 #H elim (at_inv_empty … H) -H #H1 #H2 destruct
+qed-.
+
+lemma at_inv_empty_succ_dx: ∀i1,i2. @⦃i1, ◊⦄ ≡ ⫯i2 → ⊥.
+#i1 #i2 #H elim (at_inv_empty … H) -H #H1 #H2 destruct
+qed-.
+
+fact at_inv_true_aux: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → ∀tl. cs = Ⓣ @ tl →
+ (i1 = 0 ∧ i2 = 0) ∨
+ ∃∃j1,j2. i1 = ⫯j1 & i2 = ⫯j2 & @⦃j1, tl⦄ ≡ j2.
+#cs #i1 #i2 * -cs -i1 -i2
+[2,3,4: #cs [2,3: #i1 #i2 #Hij ] ] #tl #H destruct
+/3 width=5 by ex3_2_intro, or_introl, or_intror, conj/
+qed-.
+
+lemma at_inv_true: ∀cs,i1,i2. @⦃i1, Ⓣ @ cs⦄ ≡ i2 →
+ (i1 = 0 ∧ i2 = 0) ∨
+ ∃∃j1,j2. i1 = ⫯j1 & i2 = ⫯j2 & @⦃j1, cs⦄ ≡ j2.
+/2 width=3 by at_inv_true_aux/ qed-.
+
+lemma at_inv_true_zero_sn: ∀cs,i. @⦃0, Ⓣ @ cs⦄ ≡ i → i = 0.
+#cs #i #H elim (at_inv_true … H) -H * //
+#j1 #j2 #H destruct
+qed-.
+
+lemma at_inv_true_zero_dx: ∀cs,i. @⦃i, Ⓣ @ cs⦄ ≡ 0 → i = 0.
+#cs #i #H elim (at_inv_true … H) -H * //
+#j1 #j2 #_ #H destruct
+qed-.
+
+lemma at_inv_true_succ_sn: ∀cs,i1,i2. @⦃⫯i1, Ⓣ @ cs⦄ ≡ i2 →
+ ∃∃j2. i2 = ⫯j2 & @⦃i1, cs⦄ ≡ j2.
+#cs #i1 #i2 #H elim (at_inv_true … H) -H *
+[ #H destruct
+| #j1 #j2 #H1 #H2 destruct /2 width=3 by ex2_intro/
+]
+qed-.
+
+lemma at_inv_true_succ_dx: ∀cs,i1,i2. @⦃i1, Ⓣ @ cs⦄ ≡ ⫯i2 →
+ ∃∃j1. i1 = ⫯j1 & @⦃j1, cs⦄ ≡ i2.
+#cs #i1 #i2 #H elim (at_inv_true … H) -H *
+[ #_ #H destruct
+| #j1 #j2 #H1 #H2 destruct /2 width=3 by ex2_intro/
+]
+qed-.
+
+lemma at_inv_true_succ: ∀cs,i1,i2. @⦃⫯i1, Ⓣ @ cs⦄ ≡ ⫯i2 →
+ @⦃i1, cs⦄ ≡ i2.
+#cs #i1 #i2 #H elim (at_inv_true … H) -H *
+[ #H destruct
+| #j1 #j2 #H1 #H2 destruct //
+]
+qed-.
+
+lemma at_inv_true_O_S: ∀cs,i. @⦃0, Ⓣ @ cs⦄ ≡ ⫯i → ⊥.
+#cs #i #H elim (at_inv_true … H) -H *
+[ #_ #H destruct
+| #j1 #j2 #H destruct
+]
+qed-.
+
+lemma at_inv_true_S_O: ∀cs,i. @⦃⫯i, Ⓣ @ cs⦄ ≡ 0 → ⊥.
+#cs #i #H elim (at_inv_true … H) -H *
+[ #H destruct
+| #j1 #j2 #_ #H destruct
+]
+qed-.
+
+fact at_inv_false_aux: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → ∀tl. cs = Ⓕ @ tl →
+ ∃∃j2. i2 = ⫯j2 & @⦃i1, tl⦄ ≡ j2.
+#cs #i1 #i2 * -cs -i1 -i2
+[2,3,4: #cs [2,3: #i1 #i2 #Hij ] ] #tl #H destruct
+/2 width=3 by ex2_intro/
+qed-.
+
+lemma at_inv_false: ∀cs,i1,i2. @⦃i1, Ⓕ @ cs⦄ ≡ i2 →
+ ∃∃j2. i2 = ⫯j2 & @⦃i1, cs⦄ ≡ j2.
+/2 width=3 by at_inv_false_aux/ qed-.
+
+lemma at_inv_false_S: ∀cs,i1,i2. @⦃i1, Ⓕ @ cs⦄ ≡ ⫯i2 → @⦃i1, cs⦄ ≡ i2.
+#cs #i1 #i2 #H elim (at_inv_false … H) -H
+#j2 #H destruct //
+qed-.
+
+lemma at_inv_false_O: ∀cs,i. @⦃i, Ⓕ @ cs⦄ ≡ 0 → ⊥.
+#cs #i #H elim (at_inv_false … H) -H
+#j2 #H destruct
+qed-.
+
+lemma at_inv_le: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → i1 ≤ ∥cs∥ ∧ i2 ≤ |cs|.
+#cs #i1 #i2 #H elim H -cs -i1 -i2 /2 width=1 by conj/
+#cs #i1 #i2 #_ * /3 width=1 by le_S_S, conj/
+qed-.
+
+lemma at_inv_gt1: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → ∥cs∥ < i1 → ⊥.
+#cs #i1 #i2 #H elim (at_inv_le … H) -H /2 width=4 by lt_le_false/
+qed-.
+
+lemma at_inv_gt2: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → |cs| < i2 → ⊥.
+#cs #i1 #i2 #H elim (at_inv_le … H) -H /2 width=4 by lt_le_false/
+qed-.
+
+(* Basic properties *********************************************************)
+
+(* Note: lemma 250 *)
+lemma at_le: ∀cs,i1. i1 ≤ ∥cs∥ →
+ ∃∃i2. @⦃i1, cs⦄ ≡ i2 & i2 ≤ |cs|.
+#cs elim cs -cs
+[ #i1 #H <(le_n_O_to_eq … H) -i1 /2 width=3 by at_empty, ex2_intro/
+| * #cs #IH
+ [ * /2 width=3 by at_zero, ex2_intro/
+ #i1 #H lapply (le_S_S_to_le … H) -H
+ #H elim (IH … H) -IH -H /3 width=3 by at_succ, le_S_S, ex2_intro/
+ | #i1 #H elim (IH … H) -IH -H /3 width=3 by at_false, le_S_S, ex2_intro/
+ ]
+]
+qed-.
+
+lemma at_top: ∀cs. @⦃∥cs∥, cs⦄ ≡ |cs|.
+#cs elim cs -cs // * /2 width=1 by at_succ, at_false/
+qed.
+
+lemma at_monotonic: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → ∀j1. j1 < i1 →
+ ∃∃j2. @⦃j1, cs⦄ ≡ j2 & j2 < i2.
+#cs #i1 #i2 #H elim H -cs -i1 -i2
+[ #j1 #H elim (lt_zero_false … H)
+| #cs #j1 #H elim (lt_zero_false … H)
+| #cs #i1 #i2 #Hij #IH * /2 width=3 by ex2_intro, at_zero/
+ #j1 #H lapply (lt_S_S_to_lt … H) -H
+ #H elim (IH … H) -i1
+ #j2 #Hj12 #H /3 width=3 by le_S_S, ex2_intro, at_succ/
+| #cs #i1 #i2 #_ #IH #j1 #H elim (IH … H) -i1
+ /3 width=3 by le_S_S, ex2_intro, at_false/
+]
+qed-.
+
+lemma at_dec: ∀cs,i1,i2. Decidable (@⦃i1, cs⦄ ≡ i2).
+#cs elim cs -cs [ | * #cs #IH ]
+[ * [2: #i1 ] * [2,4: #i2 ]
+ [4: /2 width=1 by at_empty, or_introl/
+ |*: @or_intror #H elim (at_inv_empty … H) #H1 #H2 destruct
+ ]
+| * [2: #i1 ] * [2,4: #i2 ]
+ [ elim (IH i1 i2) -IH
+ /4 width=1 by at_inv_true_succ, at_succ, or_introl, or_intror/
+ | -IH /3 width=3 by at_inv_true_O_S, or_intror/
+ | -IH /3 width=3 by at_inv_true_S_O, or_intror/
+ | -IH /2 width=1 by or_introl, at_zero/
+ ]
+| #i1 * [2: #i2 ]
+ [ elim (IH i1 i2) -IH
+ /4 width=1 by at_inv_false_S, at_false, or_introl, or_intror/
+ | -IH /3 width=3 by at_inv_false_O, or_intror/
+ ]
+]
+qed-.
+
+lemma is_at_dec: ∀cs,i2. Decidable (∃i1. @⦃i1, cs⦄ ≡ i2).
+#cs elim cs -cs
+[ * /3 width=2 by ex_intro, or_introl/
+ #i2 @or_intror * /2 width=3 by at_inv_empty_succ_dx/
+| * #cs #IH * [2,4: #i2 ]
+ [ elim (IH i2) -IH
+ [ * /4 width=2 by at_succ, ex_intro, or_introl/
+ | #H @or_intror * #x #Hx
+ elim (at_inv_true_succ_dx … Hx) -Hx
+ /3 width=2 by ex_intro/
+ ]
+ | elim (IH i2) -IH
+ [ * /4 width=2 by at_false, ex_intro, or_introl/
+ | #H @or_intror * /4 width=2 by at_inv_false_S, ex_intro/
+ ]
+ | /3 width=2 by at_zero, ex_intro, or_introl/
+ | @or_intror * /2 width=3 by at_inv_false_O/
+ ]
+]
+qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma at_increasing: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → i1 ≤ i2.
+#cs #i1 elim i1 -i1 //
+#j1 #IHi #i2 #H elim (at_monotonic … H j1) -H
+/3 width=3 by le_to_lt_to_lt/
+qed-.
+
+lemma at_increasing_strict: ∀cs,i1,i2. @⦃i1, Ⓕ @ cs⦄ ≡ i2 →
+ i1 < i2 ∧ @⦃i1, cs⦄ ≡ ⫰i2.
+#cs #i1 #i2 #H elim (at_inv_false … H) -H
+#j2 #H #Hj2 destruct /4 width=2 by conj, at_increasing, le_S_S/
+qed-.
+
+(* Main properties **********************************************************)
+
+theorem at_mono: ∀cs,i,i1. @⦃i, cs⦄ ≡ i1 → ∀i2. @⦃i, cs⦄ ≡ i2 → i1 = i2.
+#cs #i #i1 #H elim H -cs -i -i1
+[2,3,4: #cs [2,3: #i #i1 #_ #IH ] ] #i2 #H
+[ elim (at_inv_true_succ_sn … H) -H
+ #j2 #H destruct #H >(IH … H) -cs -i -i1 //
+| elim (at_inv_false … H) -H
+ #j2 #H destruct #H >(IH … H) -cs -i -i1 //
+| /2 width=2 by at_inv_true_zero_sn/
+| /2 width=1 by at_inv_empty_zero_sn/
+]
+qed-.
+
+theorem at_inj: ∀cs,i1,i. @⦃i1, cs⦄ ≡ i → ∀i2. @⦃i2, cs⦄ ≡ i → i1 = i2.
+#cs #i1 #i #H elim H -cs -i1 -i
+[2,3,4: #cs [ |2,3: #i1 #i #_ #IH ] ] #i2 #H
+[ /2 width=2 by at_inv_true_zero_dx/
+| elim (at_inv_true_succ_dx … H) -H
+ #j2 #H destruct #H >(IH … H) -cs -i1 -i //
+| elim (at_inv_false … H) -H
+ #j #H destruct #H >(IH … H) -cs -i1 -j //
+| /2 width=1 by at_inv_empty_zero_dx/
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground_2/notation/relations/isidentity_1.ma".
+include "ground_2/relocation/trace_after.ma".
+include "ground_2/relocation/trace_sle.ma".
+
+(* RELOCATION TRACE *********************************************************)
+
+definition isid: predicate trace ≝ λcs. ∥cs∥ = |cs|.
+
+interpretation "test for identity (trace)"
+ 'IsIdentity cs = (isid cs).
+
+definition t_reflexive: ∀S:Type[0]. predicate (trace → relation S) ≝
+ λS,R. ∀a. ∃∃t. 𝐈⦃t⦄ & R t a a.
+
+(* Basic properties *********************************************************)
+
+lemma isid_empty: 𝐈⦃◊⦄.
+// qed.
+
+lemma isid_true: ∀cs. 𝐈⦃cs⦄ → 𝐈⦃Ⓣ @ cs⦄.
+// qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma isid_inv_true: ∀cs. 𝐈⦃Ⓣ @ cs⦄ → 𝐈⦃cs⦄.
+/2 width=1 by injective_S/ qed-.
+
+lemma isid_inv_false: ∀cs. 𝐈⦃Ⓕ @ cs⦄ → ⊥.
+/3 width=4 by colength_le, lt_le_false/ qed-.
+
+lemma isid_inv_cons: ∀cs,b. 𝐈⦃b @ cs⦄ → 𝐈⦃cs⦄ ∧ b = Ⓣ.
+#cs * #H /3 width=1 by isid_inv_true, conj/
+elim (isid_inv_false … H)
+qed-.
+
+(* Properties on application ************************************************)
+
+lemma isid_at: ∀cs. (∀i1,i2. @⦃i1, cs⦄ ≡ i2 → i1 = i2) → 𝐈⦃cs⦄.
+#cs elim cs -cs // * /2 width=1 by/
+qed.
+
+(* Inversion lemmas on application ******************************************)
+
+lemma isid_inv_at: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → 𝐈⦃cs⦄ → i1 = i2.
+#cs #i1 #i2 #H elim H -cs -i1 -i2 /4 width=1 by isid_inv_true, eq_f/
+#cs #i1 #i2 #_ #IH #H elim (isid_inv_false … H)
+qed-.
+
+(* Properties on composition ************************************************)
+
+lemma isid_after_sn: ∀cs2. ∃∃cs1. 𝐈⦃cs1⦄ & cs1 ⊚ cs2 ≡ cs2.
+#cs2 elim cs2 -cs2 /2 width=3 by after_empty, ex2_intro/
+#b #cs2 * /3 width=3 by isid_true, after_true, ex2_intro/
+qed-.
+
+lemma isid_after_dx: ∀cs1. ∃∃cs2. 𝐈⦃cs2⦄ & cs1 ⊚ cs2 ≡ cs1.
+#cs1 elim cs1 -cs1 /2 width=3 by after_empty, ex2_intro/
+* #cs1 * /3 width=3 by isid_true, after_true, after_false, ex2_intro/
+qed-.
+
+lemma after_isid_sn: ∀cs1,cs2. cs1 ⊚ cs2 ≡ cs2 → 𝐈⦃cs1⦄ .
+#cs1 #cs2 #H elim (after_inv_length … H) -H //
+qed.
+
+lemma after_isid_dx: ∀cs1,cs2. cs1 ⊚ cs2 ≡ cs1 → 𝐈⦃cs2⦄ .
+#cs1 #cs2 #H elim (after_inv_length … H) -H //
+qed.
+
+(* Inversion lemmas on composition ******************************************)
+
+lemma after_isid_inv_sn: ∀cs1,cs2,cs. cs1 ⊚ cs2 ≡ cs → 𝐈⦃cs1⦄ → cs = cs2.
+#cs1 #cs2 #cs #H elim H -cs1 -cs2 -cs //
+#cs1 #cs2 #cs #_ [ #b ] #IH #H
+[ >IH -IH // | elim (isid_inv_false … H) ]
+qed-.
+
+lemma after_isid_inv_dx: ∀cs1,cs2,cs. cs1 ⊚ cs2 ≡ cs → 𝐈⦃cs2⦄ → cs = cs1.
+#cs1 #cs2 #cs #H elim H -cs1 -cs2 -cs //
+#cs1 #cs2 #cs #_ [ #b ] #IH #H
+[ elim (isid_inv_cons … H) -H #H >IH -IH // | >IH -IH // ]
+qed-.
+
+lemma after_inv_isid3: ∀t1,t2,t. t1 ⊚ t2 ≡ t → 𝐈⦃t⦄ → 𝐈⦃t1⦄ ∧ 𝐈⦃t2⦄.
+#t1 #t2 #t #H elim H -t1 -t2 -t
+[ /2 width=1 by conj/
+| #t1 #t2 #t #_ #b #IHt #H elim (isid_inv_cons … H) -H
+ #Ht #H elim (IHt Ht) -t /2 width=1 by isid_true, conj/
+| #t1 #t2 #t #_ #_ #H elim (isid_inv_false … H)
+]
+qed-.
+
+(* Forward on inclusion *****************************************************)
+
+lemma sle_isid1_fwd: ∀t1,t2. t1 ⊆ t2 → 𝐈⦃t1⦄ → t1 = t2.
+#t1 #t2 #H elim H -t1 -t2 //
+[ #t1 #t2 #_ #IH #H lapply (isid_inv_true … H) -H
+ #HT1 @eq_f2 // @IH @HT1 (**) (* full auto fails *)
+| #t1 #t2 #b #_ #_ #H elim (isid_inv_false … H)
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground_2/notation/relations/isuniform_1.ma".
+include "ground_2/relocation/trace_isid.ma".
+
+(* RELOCATION TRACE *********************************************************)
+
+inductive isun: predicate trace ≝
+| isun_id : ∀t. 𝐈⦃t⦄ → isun t
+| isun_false: ∀t. isun t → isun (Ⓕ@t)
+.
+
+interpretation "test for uniformity (trace)"
+ 'IsUniform t = (isun t).
+
+(* Basic inversion lennas ***************************************************)
+
+fact isun_inv_true_aux: ∀t. 𝐔⦃t⦄ → ∀u. t = Ⓣ@u → 𝐈⦃u⦄.
+#t * -t
+[ #t #Ht #u #H destruct /2 width=1 by isid_inv_true/
+| #t #_ #u #H destruct
+]
+qed-.
+
+lemma isun_inv_true: ∀t. 𝐔⦃Ⓣ@t⦄ → 𝐈⦃t⦄.
+/2 width=3 by isun_inv_true_aux/ qed-.
+
+fact isun_inv_false_aux: ∀t. 𝐔⦃t⦄ → ∀u. t = Ⓕ@u → 𝐔⦃u⦄.
+#t * -t
+[ #t #Ht #u #H destruct elim (isid_inv_false … Ht)
+| #t #Ht #u #H destruct //
+]
+qed-.
+
+lemma isun_inv_false: ∀t. 𝐔⦃Ⓕ@t⦄ → 𝐔⦃t⦄.
+/2 width=3 by isun_inv_false_aux/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground_2/relocation/trace_at.ma".
+
+(* RELOCATION TRACE *********************************************************)
+
+inductive sle: relation trace ≝
+| sle_empty: sle (◊) (◊)
+| sle_true : ∀t1,t2. sle t1 t2 → sle (Ⓣ @ t1) (Ⓣ @ t2)
+| sle_false: ∀t1,t2,b. sle t1 t2 → sle (Ⓕ @ t1) (b @ t2)
+.
+
+interpretation
+ "inclusion (trace)"
+ 'subseteq t1 t2 = (sle t1 t2).
+
+(* Basic properties *********************************************************)
+
+(* Basic forward lemmas *****************************************************)
+
+lemma sle_fwd_length: ∀t1,t2. t1 ⊆ t2 → |t1| = |t2|.
+#t1 #t2 #H elim H -t1 -t2 //
+qed-.
+
+lemma sle_fwd_colength: ∀t1,t2. t1 ⊆ t2 → ∥t1∥ ≤ ∥t2∥.
+#t1 #t2 #H elim H -t1 -t2 /2 width=1 by le_S_S/
+#t1 #t2 * /2 width=1 by le_S/
+qed-.
+
+(* Inversion lemmas on application ******************************************)
+
+lemma sle_inv_at: ∀t1,t2. t1 ⊆ t2 →
+ ∀i,i1,i2. @⦃i, t1⦄ ≡ i1 → @⦃i, t2⦄ ≡ i2 → i2 ≤ i1.
+#t1 #t2 #H elim H -t1 -t2
+[ #i #i1 #i2 #_ #H2 elim (at_inv_empty … H2) -H2 //
+| #t1 #t2 #_ #IH #i #i1 #i2 #H0 #H2 elim (at_inv_true … H2) -H2 * //
+ #j1 #j2 #H1 #H2 #Hj destruct elim (at_inv_true_succ_sn … H0) -H0
+ /3 width=3 by le_S_S/
+| #t1 #t2 * #_ #IH #i #i1 #i2 #H0 #H2
+ [ elim (at_inv_true … H2) -H2 * //
+ #j #j2 #H1 #H2 #Hj2 destruct elim (at_inv_false … H0) -H0
+ #j1 #H #Hj1 destruct elim (at_monotonic … Hj1 j) -Hj1 //
+ #x #H1x #H2x @le_S_S /4 width=3 by lt_to_le, le_to_lt_to_lt/ (**) (* full auto too slow *)
+ | elim (at_inv_false … H2) elim (at_inv_false … H0) -H0 -H2
+ /3 width=3 by le_S_S/
+ ]
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground_2/notation/functions/complement_1.ma".
+include "ground_2/relocation/trace.ma".
+
+(* RELOCATION TRACE *********************************************************)
+
+let rec snot (t:trace) on t ≝ match t with
+[ nil ⇒ ◊
+| cons b t ⇒ (¬ b) @ snot t
+].
+
+interpretation
+ "complement (trace)"
+ 'Complement t = (snot t).
+
+(* Basic properties *********************************************************)
+
+lemma snot_empty: ∁ (◊) = ◊.
+// qed.
+
+lemma snot_inh: ∀t,b. ∁ (b@t) = (¬ b) @ ∁ t.
+// qed.
+
+lemma snot_true: ∀t. ∁ (Ⓣ @ t) = Ⓕ @ ∁ t.
+// qed.
+
+lemma snot_false: ∀t. ∁ (Ⓕ @ t) = Ⓣ @ ∁ t.
+// qed.
+
+lemma snot_length: ∀t. |∁ t| = |t|.
+#t elim t -t normalize //
+qed.
+
+lemma snot_colength: ∀t. ∥∁ t∥ = |t| - ∥t∥.
+#t elim t -t //
+* /2 width=1 by minus_Sn_m/
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground_2/notation/relations/runion_3.ma".
+include "ground_2/relocation/trace_isid.ma".
+
+(* RELOCATION TRACE *********************************************************)
+
+inductive sor: relation3 trace trace trace ≝
+ | sor_empty: sor (◊) (◊) (◊)
+ | sor_inh : ∀cs1,cs2,cs. sor cs1 cs2 cs →
+ ∀b1,b2. sor (b1 @ cs1) (b2 @ cs2) ((b1 ∨ b2) @ cs).
+
+interpretation
+ "union (trace)"
+ 'RUnion L1 L2 L = (sor L2 L1 L).
+
+(* Basic properties *********************************************************)
+
+lemma sor_length: ∀cs1,cs2. |cs1| = |cs2| →
+ ∃∃cs. cs2 ⋓ cs1 ≡ cs & |cs| = |cs1| & |cs| = |cs2|.
+#cs1 elim cs1 -cs1
+[ #cs2 #H >(length_inv_zero_sn … H) -H /2 width=4 by sor_empty, ex3_intro/
+| #b1 #cs1 #IH #x #H elim (length_inv_succ_sn … H) -H
+ #cs2 #b2 #H12 #H destruct elim (IH … H12) -IH -H12
+ #cs #H12 #H1 #H2 @(ex3_intro … ((b1 ∨ b2) @ cs)) /2 width=1 by sor_inh/ (**) (* explicit constructor *)
+]
+qed-.
+
+lemma sor_sym: ∀cs1,cs2,cs. cs1 ⋓ cs2 ≡ cs → cs2 ⋓ cs1 ≡ cs.
+#cs1 #cs2 #cs #H elim H -cs1 -cs2 -cs /2 width=1 by sor_inh/
+qed-.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma sor_inv_length: ∀cs1,cs2,cs. cs2 ⋓ cs1 ≡ cs →
+ ∧∧ |cs1| = |cs2| & |cs| = |cs1| & |cs| = |cs2|.
+#cs1 #cs2 #cs #H elim H -cs1 -cs2 -cs /2 width=1 by and3_intro/
+#cs1 #cs2 #cs #_ #b1 #b2 * /2 width=1 by and3_intro/
+qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma sor_fwd_isid_sn: ∀cs1,cs2,cs. cs1 ⋓ cs2 ≡ cs → 𝐈⦃cs1⦄ → 𝐈⦃cs⦄.
+#cs1 #cs2 #cs #H elim H -cs1 -cs2 -cs //
+#cs1 #cs2 #cs #_ #b1 #b2 #IH #H elim (isid_inv_cons … H) -H
+/3 width=1 by isid_true/
+qed-.
+
+lemma sor_fwd_isid_dx: ∀cs1,cs2,cs. cs1 ⋓ cs2 ≡ cs → 𝐈⦃cs2⦄ → 𝐈⦃cs⦄.
+/3 width=4 by sor_fwd_isid_sn, sor_sym/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( x ⊞ break term 46 y1 ⊟ break term 46 y2 ≡ break term 46 z )"
+ non associative with precedence 45
+ for @{ 'RPlusMinus $x $y1 $y2 $z }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground_2/ynat/ynat_plus.ma".
+
+(* NATURAL NUMBERS WITH INFINITY ********************************************)
+
+lemma ymax_pre_dx: ∀x,y. x ≤ y → x - y + y = y.
+#x #y * -x -y //
+#x #y #Hxy >yminus_inj >(eq_minus_O … Hxy) -Hxy //
+qed-.
+
+lemma ymax_pre_sn: ∀x,y. y ≤ x → x - y + y = x.
+#x #y * -x -y
+[ #x #y #Hxy >yminus_inj /3 width=3 by plus_minus, eq_f/
+| * //
+]
+qed-.
+
+lemma ymax_pre_i_dx: ∀y,x. y ≤ x - y + y.
+// qed.
+
+lemma ymax_pre_i_sn: ∀y,x. x ≤ x - y + y.
+* // #y * /2 width=1 by yle_inj/
+qed.
+
+lemma ymax_pre_e: ∀x,z. x ≤ z → ∀y. y ≤ z → x - y + y ≤ z.
+#x #z #Hxz #y #Hyz elim (yle_split x y)
+[ #Hxy >(ymax_pre_dx … Hxy) -x //
+| #Hyx >(ymax_pre_sn … Hyx) -y //
+]
+qed.
+
+lemma ymax_pre_dx_comm: ∀x,y. x ≤ y → y + (x - y) = y.
+/2 width=1 by ymax_pre_dx/ qed-.
+
+lemma ymax_pre_sn_comm: ∀x,y. y ≤ x → y + (x - y) = x.
+/2 width=1 by ymax_pre_sn/ qed-.
+
+lemma ymax_pre_i_dx_comm: ∀y,x. y ≤ y + (x - y).
+// qed.
+
+lemma ymax_pre_i_sn_comm: ∀y,x. x ≤ y + (x - y).
+/2 width=1 by ymax_pre_i_sn/ qed.
+
+lemma ymax_pre_e_comm: ∀x,z. x ≤ z → ∀y. y ≤ z → y + (x - y) ≤ z.
+/2 width=1 by ymax_pre_e/ qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground_2/ynat/ynat_plus.ma".
+
+(* NATURAL NUMBERS WITH INFINITY ********************************************)
+
+fact ymin_pre_dx_aux: ∀x,y. y ≤ x → x - (x - y) ≤ y.
+#x #y * -x -y
+[ #x #y #Hxy >yminus_inj
+ /3 width=4 by yle_inj, monotonic_le_minus_l/
+| * //
+]
+qed-.
+
+lemma ymin_pre_sn: ∀x,y. x ≤ y → x - (x - y) = x.
+#x #y * -x -y //
+#x #y #Hxy >yminus_inj >(eq_minus_O … Hxy) -Hxy //
+qed-.
+
+lemma ymin_pre_i_dx: ∀x,y. x - (x - y) ≤ y.
+#x #y elim (yle_split x y) /2 width=1 by ymin_pre_dx_aux/
+#Hxy >(ymin_pre_sn … Hxy) //
+qed.
+
+lemma ymin_pre_i_sn: ∀x,y. x - (x - y) ≤ x.
+// qed.
+
+lemma ymin_pre_dx: ∀x,y. y ≤ yinj x → yinj x - (yinj x - y) = y.
+#x #y #H elim (yle_inv_inj2 … H) -H
+#z #Hzx #H destruct >yminus_inj
+/3 width=4 by minus_le_minus_minus_comm, eq_f/
+qed-.
+
+lemma ymin_pre_e: ∀z,x. z ≤ yinj x → ∀y. z ≤ y →
+ z ≤ yinj x - (yinj x - y).
+#z #x #Hzx #y #Hzy elim (yle_split x y)
+[ #H >(ymin_pre_sn … H) -y //
+| #H >(ymin_pre_dx … H) -x //
+]
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground_2/ynat/ynat_lt.ma".
+
+(* NATURAL NUMBERS WITH INFINITY ********************************************)
+
+(* subtraction *)
+definition yminus: ynat → ynat → ynat ≝ λx,y. match y with
+[ yinj n ⇒ ypred^n x
+| Y ⇒ yinj 0
+].
+
+interpretation "ynat minus" 'minus x y = (yminus x y).
+
+lemma yminus_O2: ∀m:ynat. m - 0 = m.
+// qed.
+
+lemma yminus_S2: ∀m:ynat. ∀n:nat. m - S n = ⫰(m - n).
+// qed.
+
+lemma yminus_Y2: ∀m. m - (∞) = 0.
+// qed.
+
+(* Basic properties *********************************************************)
+
+lemma yminus_inj: ∀m,n. yinj m - yinj n = yinj (m - n).
+#m #n elim n -n //
+#n #IH >yminus_S2 >IH -IH >eq_minus_S_pred //
+qed.
+
+lemma yminus_Y_inj: ∀n. ∞ - yinj n = ∞.
+#n elim n -n //
+qed.
+
+lemma yminus_O1: ∀x:ynat. 0 - x = 0.
+* // qed.
+
+lemma yminus_refl: ∀x:ynat. x - x = 0.
+* // qed.
+
+lemma yminus_minus_comm: ∀y,z,x. x - y - z = x - z - y.
+* #y [ * #z [ * // ] ] >yminus_O1 //
+qed.
+
+(* Properties on predecessor ************************************************)
+
+lemma yminus_SO2: ∀m. m - 1 = ⫰m.
+* //
+qed.
+
+lemma yminus_pred1: ∀x,y. ⫰x - y = ⫰(x-y).
+#x * // #y elim y -y //
+qed.
+
+lemma yminus_pred: ∀n,m. 0 < m → 0 < n → ⫰m - ⫰n = m - n.
+* // #n *
+[ #m #Hm #Hn >yminus_inj >yminus_inj
+ /4 width=1 by ylt_inv_inj, minus_pred_pred, eq_f/
+| >yminus_Y_inj //
+]
+qed-.
+
+(* Properties on successor **************************************************)
+
+lemma yminus_succ: ∀n,m. ⫯m - ⫯n = m - n.
+* // qed.
+
+lemma yminus_succ1_inj: ∀n:nat. ∀m:ynat. n ≤ m → ⫯m - n = ⫯(m - n).
+#n *
+[ #m #Hmn >yminus_inj >yminus_inj
+ /4 width=1 by yle_inv_inj, plus_minus, eq_f/
+| >yminus_Y_inj //
+]
+qed-.
+
+lemma yminus_succ2: ∀y,x. x - ⫯y = ⫰(x-y).
+* //
+qed.
+
+(* Properties on order ******************************************************)
+
+lemma yle_minus_sn: ∀n,m. m - n ≤ m.
+* // #n * /2 width=1 by yle_inj/
+qed.
+
+lemma yle_to_minus: ∀m:ynat. ∀n:ynat. m ≤ n → m - n = 0.
+#m #n * -m -n /3 width=3 by eq_minus_O, eq_f/
+qed-.
+
+lemma yminus_to_le: ∀n:ynat. ∀m:ynat. m - n = 0 → m ≤ n.
+* // #n *
+[ #m >yminus_inj #H lapply (yinj_inj … H) -H (**) (* destruct lemma needed *)
+ /2 width=1 by yle_inj/
+| >yminus_Y_inj #H destruct
+]
+qed.
+
+lemma monotonic_yle_minus_dx: ∀x,y. x ≤ y → ∀z. x - z ≤ y - z.
+#x #y #Hxy * //
+#z elim z -z /3 width=1 by yle_pred/
+qed.
+
+(* Properties on strict order ***********************************************)
+
+lemma ylt_to_minus: ∀x,y:ynat. x < y → 0 < y - x.
+#x #y #H elim H -x -y /3 width=1 by ylt_inj, lt_plus_to_minus_r/
+qed.
+
+lemma yminus_to_lt: ∀x,y:ynat. 0 < y - x → x < y.
+* [2: #y #H elim (ylt_yle_false … H) // ]
+#m * /4 width=1 by ylt_inv_inj, ylt_inj, lt_minus_to_plus_r/
+qed-.
+
+lemma monotonic_ylt_minus_dx: ∀x,y:ynat. x < y → ∀z:nat. z ≤ x → x - z < y - z.
+#x #y * -x -y
+/4 width=1 by ylt_inj, yle_inv_inj, monotonic_lt_minus_l/
+qed.
+
+(* Properties on minus ******************************************************)
+
+lemma yplus_minus_inj: ∀m:ynat. ∀n:nat. m + n - n = m.
+#m #n elim n -n //
+#n #IHn >(yplus_succ2 m n) >(yminus_succ … n) //
+qed.
+
+lemma yplus_minus: ∀m,n. m + n - n ≤ m.
+#m * //
+qed.
+
+lemma yminus_plus2: ∀z,y,x:ynat. x - (y + z) = x - y - z.
+* // #z * [2: >yplus_Y1 >yminus_O1 // ] #y *
+[ #x >yplus_inj >yminus_inj >yminus_inj >yminus_inj /2 width=1 by eq_f/
+| >yplus_inj >yminus_Y_inj //
+]
+qed.
+
+(* Forward lemmas on minus **************************************************)
+
+lemma yle_plus1_to_minus_inj2: ∀x,z:ynat. ∀y:nat. x + y ≤ z → x ≤ z - y.
+#x #z #y #H lapply (monotonic_yle_minus_dx … H y) -H //
+qed-.
+
+lemma yle_plus1_to_minus_inj1: ∀x,z:ynat. ∀y:nat. y + x ≤ z → x ≤ z - y.
+/2 width=1 by yle_plus1_to_minus_inj2/ qed-.
+
+lemma yle_plus2_to_minus_inj2: ∀x,y:ynat. ∀z:nat. x ≤ y + z → x - z ≤ y.
+/2 width=1 by monotonic_yle_minus_dx/ qed-.
+
+lemma yle_plus2_to_minus_inj1: ∀x,y:ynat. ∀z:nat. x ≤ z + y → x - z ≤ y.
+/2 width=1 by yle_plus2_to_minus_inj2/ qed-.
+
+lemma yplus_minus_assoc_inj: ∀x:nat. ∀y,z:ynat. x ≤ y → z + (y - x) = z + y - x.
+#x *
+[ #y * // #z >yminus_inj >yplus_inj >yplus_inj
+ /4 width=1 by yle_inv_inj, plus_minus, eq_f/
+| >yminus_Y_inj //
+]
+qed-.
+
+lemma yplus_minus_assoc_comm_inj: ∀x:nat. ∀y,z:ynat. x ≤ y → z - (y - x) = z + x - y.
+#x *
+[ #y *
+ [ #z >yminus_inj >yminus_inj >yplus_inj >yminus_inj
+ /4 width=1 by yle_inv_inj, minus_le_minus_minus_comm, eq_f/
+ | >yminus_inj >yminus_Y_inj //
+ ]
+| >yminus_Y_inj //
+]
+qed-.
+
+lemma yplus_minus_comm_inj: ∀y:nat. ∀x,z:ynat. y ≤ x → x + z - y = x - y + z.
+#y * // #x * //
+#z #Hxy >yplus_inj >yminus_inj <plus_minus
+/2 width=1 by yle_inv_inj/
+qed-.
+
+lemma ylt_plus1_to_minus_inj2: ∀x,z:ynat. ∀y:nat. x + y < z → x < z - y.
+#x #z #y #H lapply (monotonic_ylt_minus_dx … H y ?) -H //
+qed-.
+
+lemma ylt_plus1_to_minus_inj1: ∀x,z:ynat. ∀y:nat. y + x < z → x < z - y.
+/2 width=1 by ylt_plus1_to_minus_inj2/ qed-.
+
+lemma ylt_plus2_to_minus_inj2: ∀x,y:ynat. ∀z:nat. z ≤ x → x < y + z → x - z < y.
+/2 width=1 by monotonic_ylt_minus_dx/ qed-.
+
+lemma ylt_plus2_to_minus_inj1: ∀x,y:ynat. ∀z:nat. z ≤ x → x < z + y → x - z < y.
+/2 width=1 by ylt_plus2_to_minus_inj2/ qed-.
+
+lemma yplus_inv_minus: ∀x1,y1. y1 ≤ yinj x1 →
+ ∀x2,y2. yinj x1 + x2 = yinj y2 + y1 →
+ yinj x1 - y1 = yinj y2 - x2 ∧ x2 ≤ yinj y2.
+#x1 #y1 #Hyx1 #x2 #y2 #H0
+lapply (yle_fwd_plus_ge_inj … x2 y2 Hyx1 ?) // #Hxy2
+elim (yle_inv_inj2 … Hyx1) -Hyx1 #m #Hyx1 #H destruct
+elim (yle_inv_inj2 … Hxy2) #n #H1 #H destruct
+>yplus_inj in H0; >yplus_inj >yminus_inj >yminus_inj #H0
+@conj // lapply (yinj_inj … H0) -H0 /3 width=1 by arith_b1, eq_f/
+qed-.
+
+(* Inversion lemmas on minus ************************************************)
+
+lemma yle_inv_plus_inj2: ∀x,z:ynat. ∀y:nat. x + y ≤ z → x ≤ z - y ∧ y ≤ z.
+/3 width=3 by yle_plus1_to_minus_inj2, yle_trans, conj/ qed-.
+
+lemma yle_inv_plus_inj1: ∀x,z:ynat. ∀y:nat. y + x ≤ z → x ≤ z - y ∧ y ≤ z.
+/2 width=1 by yle_inv_plus_inj2/ qed-.
+
+lemma yle_inv_plus_inj_dx: ∀x,y:ynat. ∀z:nat. x + y ≤ z →
+ ∃∃m,n. x = yinj m & y = yinj n & x ≤ z - y & y ≤ z.
+#x #y #z #Hz elim (yle_inv_inj2 … Hz)
+#z0 #_ #H elim (yplus_inv_inj … H) -H
+#m #n #H1 #H2 #H3 destruct
+elim (yle_inv_plus_inj2 … Hz) -Hz /2 width=2 by ex4_2_intro/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground_2/ynat/ynat_plus.ma".
+
+(* NATURAL NUMBERS WITH INFINITY ********************************************)
+
+(* right subtraction *)
+definition yminus_dx: nat → ynat → nat ≝ λx,y. match y with
+[ yinj n ⇒ x-n
+| Y ⇒ 0
+].
+
+interpretation "ynat right minus" 'minus x y = (yminus_dx x y).
+
+lemma yminus_dx_inj (m) (n): m - yinj n = m - n.
+// qed.
+
+lemma yminus_dx_Y2: ∀m. m - (∞) = 0.
+// qed.
+
+lemma yminus_dx_succ_bi (n:ynat) (m): ↑m - ↑n = m - n.
+* // qed.
+
+lemma yminus_dx_S2: ∀n:ynat. ∀m. m - ↑n = ↓(m - n).
+* // qed.
+
+lemma yplus_minus_dx (x) (y): x ≤ yinj y → yinj y = x + yinj (y-x).
+* [ #x #y #H >yplus_inj /4 width=1 by yle_inv_inj, minus_to_plus, eq_f/ ]
+#y #H lapply (yle_inv_Y1 … H) -H #H destruct
+qed-.
+
+(*
+
+
+(* Basic properties *********************************************************)
+
+lemma yminus_inj: ∀m,n. yinj m - yinj n = yinj (m - n).
+#m #n elim n -n //
+#n #IH >yminus_S2 >IH -IH >eq_minus_S_pred //
+qed.
+
+lemma yminus_Y_inj: ∀n. ∞ - yinj n = ∞.
+#n elim n -n //
+qed.
+
+lemma yminus_O1: ∀x:ynat. 0 - x = 0.
+* // qed.
+
+lemma yminus_refl: ∀x:ynat. x - x = 0.
+* // qed.
+
+lemma yminus_minus_comm: ∀y,z,x. x - y - z = x - z - y.
+* #y [ * #z [ * // ] ] >yminus_O1 //
+qed.
+
+(* Properties on predecessor ************************************************)
+
+lemma yminus_SO2: ∀m. m - 1 = ⫰m.
+* //
+qed.
+
+lemma yminus_pred1: ∀x,y. ⫰x - y = ⫰(x-y).
+#x * // #y elim y -y //
+qed.
+
+lemma yminus_pred: ∀n,m. 0 < m → 0 < n → ⫰m - ⫰n = m - n.
+* // #n *
+[ #m #Hm #Hn >yminus_inj >yminus_inj
+ /4 width=1 by ylt_inv_inj, minus_pred_pred, eq_f/
+| >yminus_Y_inj //
+]
+qed-.
+
+(* Properties on successor **************************************************)
+
+lemma yminus_succ1_inj: ∀n:nat. ∀m:ynat. n ≤ m → ⫯m - n = ⫯(m - n).
+#n *
+[ #m #Hmn >yminus_inj >yminus_inj
+ /4 width=1 by yle_inv_inj, plus_minus, eq_f/
+| >yminus_Y_inj //
+]
+qed-.
+
+lemma yminus_succ2: ∀y,x. x - ⫯y = ⫰(x-y).
+* //
+qed.
+
+(* Properties on order ******************************************************)
+
+lemma yle_minus_sn: ∀n,m. m - n ≤ m.
+* // #n * /2 width=1 by yle_inj/
+qed.
+
+lemma yle_to_minus: ∀m:ynat. ∀n:ynat. m ≤ n → m - n = 0.
+#m #n * -m -n /3 width=3 by eq_minus_O, eq_f/
+qed-.
+
+lemma yminus_to_le: ∀n:ynat. ∀m:ynat. m - n = 0 → m ≤ n.
+* // #n *
+[ #m >yminus_inj #H lapply (yinj_inj … H) -H (**) (* destruct lemma needed *)
+ /2 width=1 by yle_inj/
+| >yminus_Y_inj #H destruct
+]
+qed.
+
+lemma monotonic_yle_minus_dx: ∀x,y. x ≤ y → ∀z. x - z ≤ y - z.
+#x #y #Hxy * //
+#z elim z -z /3 width=1 by yle_pred/
+qed.
+
+(* Properties on strict order ***********************************************)
+
+lemma ylt_to_minus: ∀x,y:ynat. x < y → 0 < y - x.
+#x #y #H elim H -x -y /3 width=1 by ylt_inj, lt_plus_to_minus_r/
+qed.
+
+lemma yminus_to_lt: ∀x,y:ynat. 0 < y - x → x < y.
+* [2: #y #H elim (ylt_yle_false … H) // ]
+#m * /4 width=1 by ylt_inv_inj, ylt_inj, lt_minus_to_plus_r/
+qed-.
+
+lemma monotonic_ylt_minus_dx: ∀x,y:ynat. x < y → ∀z:nat. z ≤ x → x - z < y - z.
+#x #y * -x -y
+/4 width=1 by ylt_inj, yle_inv_inj, monotonic_lt_minus_l/
+qed.
+
+(* Properties on minus ******************************************************)
+
+lemma yplus_minus_inj: ∀m:ynat. ∀n:nat. m + n - n = m.
+#m #n elim n -n //
+#n #IHn >(yplus_succ2 m n) >(yminus_succ … n) //
+qed.
+
+lemma yplus_minus: ∀m,n. m + n - n ≤ m.
+#m * //
+qed.
+
+lemma yminus_plus2: ∀z,y,x:ynat. x - (y + z) = x - y - z.
+* // #z * [2: >yplus_Y1 >yminus_O1 // ] #y *
+[ #x >yplus_inj >yminus_inj >yminus_inj >yminus_inj /2 width=1 by eq_f/
+| >yplus_inj >yminus_Y_inj //
+]
+qed.
+
+(* Forward lemmas on minus **************************************************)
+
+lemma yle_plus1_to_minus_inj2: ∀x,z:ynat. ∀y:nat. x + y ≤ z → x ≤ z - y.
+#x #z #y #H lapply (monotonic_yle_minus_dx … H y) -H //
+qed-.
+
+lemma yle_plus1_to_minus_inj1: ∀x,z:ynat. ∀y:nat. y + x ≤ z → x ≤ z - y.
+/2 width=1 by yle_plus1_to_minus_inj2/ qed-.
+
+lemma yle_plus2_to_minus_inj2: ∀x,y:ynat. ∀z:nat. x ≤ y + z → x - z ≤ y.
+/2 width=1 by monotonic_yle_minus_dx/ qed-.
+
+lemma yle_plus2_to_minus_inj1: ∀x,y:ynat. ∀z:nat. x ≤ z + y → x - z ≤ y.
+/2 width=1 by yle_plus2_to_minus_inj2/ qed-.
+
+lemma yplus_minus_assoc_inj: ∀x:nat. ∀y,z:ynat. x ≤ y → z + (y - x) = z + y - x.
+#x *
+[ #y * // #z >yminus_inj >yplus_inj >yplus_inj
+ /4 width=1 by yle_inv_inj, plus_minus, eq_f/
+| >yminus_Y_inj //
+]
+qed-.
+
+lemma yplus_minus_assoc_comm_inj: ∀x:nat. ∀y,z:ynat. x ≤ y → z - (y - x) = z + x - y.
+#x *
+[ #y *
+ [ #z >yminus_inj >yminus_inj >yplus_inj >yminus_inj
+ /4 width=1 by yle_inv_inj, minus_le_minus_minus_comm, eq_f/
+ | >yminus_inj >yminus_Y_inj //
+ ]
+| >yminus_Y_inj //
+]
+qed-.
+
+lemma yplus_minus_comm_inj: ∀y:nat. ∀x,z:ynat. y ≤ x → x + z - y = x - y + z.
+#y * // #x * //
+#z #Hxy >yplus_inj >yminus_inj <plus_minus
+/2 width=1 by yle_inv_inj/
+qed-.
+
+lemma ylt_plus1_to_minus_inj2: ∀x,z:ynat. ∀y:nat. x + y < z → x < z - y.
+#x #z #y #H lapply (monotonic_ylt_minus_dx … H y ?) -H //
+qed-.
+
+lemma ylt_plus1_to_minus_inj1: ∀x,z:ynat. ∀y:nat. y + x < z → x < z - y.
+/2 width=1 by ylt_plus1_to_minus_inj2/ qed-.
+
+lemma ylt_plus2_to_minus_inj2: ∀x,y:ynat. ∀z:nat. z ≤ x → x < y + z → x - z < y.
+/2 width=1 by monotonic_ylt_minus_dx/ qed-.
+
+lemma ylt_plus2_to_minus_inj1: ∀x,y:ynat. ∀z:nat. z ≤ x → x < z + y → x - z < y.
+/2 width=1 by ylt_plus2_to_minus_inj2/ qed-.
+
+lemma yplus_inv_minus: ∀x1,y1. y1 ≤ yinj x1 →
+ ∀x2,y2. yinj x1 + x2 = yinj y2 + y1 →
+ yinj x1 - y1 = yinj y2 - x2 ∧ x2 ≤ yinj y2.
+#x1 #y1 #Hyx1 #x2 #y2 #H0
+lapply (yle_fwd_plus_ge_inj … x2 y2 Hyx1 ?) // #Hxy2
+elim (yle_inv_inj2 … Hyx1) -Hyx1 #m #Hyx1 #H destruct
+elim (yle_inv_inj2 … Hxy2) #n #H1 #H destruct
+>yplus_inj in H0; >yplus_inj >yminus_inj >yminus_inj #H0
+@conj // lapply (yinj_inj … H0) -H0 /3 width=1 by arith_b1, eq_f/
+qed-.
+
+(* Inversion lemmas on minus ************************************************)
+
+lemma yle_inv_plus_inj2: ∀x,z:ynat. ∀y:nat. x + y ≤ z → x ≤ z - y ∧ y ≤ z.
+/3 width=3 by yle_plus1_to_minus_inj2, yle_trans, conj/ qed-.
+
+lemma yle_inv_plus_inj1: ∀x,z:ynat. ∀y:nat. y + x ≤ z → x ≤ z - y ∧ y ≤ z.
+/2 width=1 by yle_inv_plus_inj2/ qed-.
+
+lemma yle_inv_plus_inj_dx: ∀x,y:ynat. ∀z:nat. x + y ≤ z →
+ ∃∃m,n. x = yinj m & y = yinj n & x ≤ z - y & y ≤ z.
+#x #y #z #Hz elim (yle_inv_inj2 … Hz)
+#z0 #_ #H elim (yplus_inv_inj … H) -H
+#m #n #H1 #H2 #H3 destruct
+elim (yle_inv_plus_inj2 … Hz) -Hz /2 width=2 by ex4_2_intro/
+qed-.
+*)
--- /dev/null
+
+lemma pippo: ∀x,y. x + y ≤ x → x = ∞ ∨ y = 0.
+/3 width=1 by discr_yplus_xy_x, yle_antisym/ qed-.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground_2/notation/relations/rplusminus_4.ma".
+include "ground_2/ynat/ynat_plus.ma".
+
+(* NATURAL NUMBERS WITH INFINITY ********************************************)
+
+(* algebraic x + y1 - y2 = z *)
+inductive yrpm (x:ynat) (y1:ynat) (y2:ynat): predicate ynat ≝
+| yrpm_ge: y2 ≤ y1 → yrpm x y1 y2 (x + (y1 - y2))
+| yrpm_lt: y1 < y2 → yrpm x y1 y2 (x - (y2 - y1))
+.
+
+interpretation "ynat 'algebraic plus-minus' (relational)"
+ 'RPlusMinus x y1 y2 z = (yrpm x y1 y2 z).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma ypm_inv_ge: ∀x,y1,y2,z. x ⊞ y1 ⊟ y2 ≡ z →
+ y2 ≤ y1 → z = x + (y1 - y2).
+#x #y1 #y2 #z * -z //
+#Hy12 #H elim (ylt_yle_false … H) -H //
+qed-.
+
+lemma ypm_inv_lt: ∀x,y1,y2,z. x ⊞ y1 ⊟ y2 ≡ z →
+ y1 < y2 → z = x - (y2 - y1).
+#x #y1 #y2 #z * -z //
+#Hy21 #H elim (ylt_yle_false … H) -H //
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma ypm_inv_le: ∀x,y1,y2,z. x ⊞ y1 ⊟ y2 ≡ z →
+ y1 ≤ y2 → z = x - (y2 - y1).
+#x #y1 #y2 #z #H #Hy12 elim (yle_split_eq … Hy12) -Hy12 #Hy12
+[ /2 width=1 by ypm_inv_lt/
+| >(ypm_inv_ge … H) -H // destruct >yminus_refl //
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "arithmetics/nat.ma".
+
+(* INFINITARY NATURAL NUMBERS ***********************************************)
+
+(* the type of infinitary natural numbers *)
+coinductive ynat: Type[0] ≝
+| YO: ynat
+| YS: ynat → ynat
+.
+
+interpretation "ynat successor" 'Successor m = (YS m).
+
+(* the coercion of nat to ynat *)
+let rec ynat_of_nat n ≝ match n with
+[ O ⇒ YO
+| S m ⇒ YS (ynat_of_nat m)
+].
+
+coercion ynat_of_nat.
+
+(* the infinity *)
+let corec Y : ynat ≝ ⫯Y.
+
+interpretation "ynat infinity" 'Infinity = Y.
+
+(* destructing identity on ynat *)
+definition yid: ynat → ynat ≝ λm. match m with
+[ YO ⇒ 0
+| YS n ⇒ ⫯n
+].
+
+(* Properties ***************************************************************)
+
+fact yid_rew: ∀n. yid n = n.
+* // qed-.
+
+lemma Y_rew: ⫯∞ = ∞.
+<(yid_rew ∞) in ⊢ (???%); //
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground_2/notation.ma".
+include "ground_2/xoa_props.ma".
+include "ground_2/ynat/ynat.ma".
+
+(* INFINITARY NATURAL NUMBERS ***********************************************)
+
+(* "is_zero" predicate *)
+definition yzero: predicate ynat ≝ λx. match x with
+[ YO ⇒ ⊤
+| YS _ ⇒ ⊥
+].
+
+(* Inversion lemmas *********************************************************)
+
+lemma discr_YS_YO: ∀n. ⫯n = 0 → ⊥.
+#n #H change with (yzero (⫯n))
+>H -H //
+qed-.
+
+lemma discr_YO_YS: ∀n. ynat_of_nat 0 = ⫯n → ⊥. (**) (* explicit coercion *)
+/2 width=2 by discr_YS_YO/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground_2/star.ma".
+include "ground_2/ynat/ynat_iszero.ma".
+include "ground_2/ynat/ynat_pred.ma".
+
+(* INFINITARY NATURAL NUMBERS ***********************************************)
+
+(* order relation *)
+coinductive yle: relation ynat ≝
+| yle_O: ∀n. yle 0 n
+| yle_S: ∀m,n. yle m n → yle (⫯m) (⫯n)
+.
+
+interpretation "natural 'less or equal to'" 'leq x y = (yle x y).
+
+(* Inversion lemmas *********************************************************)
+
+fact yle_inv_O2_aux: ∀m,x. m ≤ x → x = 0 → m = 0.
+#m #x * -m -x //
+#m #x #_ #H elim (discr_YS_YO … H) (**) (* destructing lemma needed *)
+qed-.
+
+lemma yle_inv_O2: ∀m. m ≤ 0 → m = 0.
+/2 width =3 by yle_inv_O2_aux/ qed-.
+
+fact yle_inv_S1_aux: ∀x,y. x ≤ y → ∀m. x = ⫯m → ∃∃n. m ≤ n & y = ⫯n.
+#x #y * -x -y
+[ #y #m #H elim (discr_YO_YS … H) (**) (* destructing lemma needed *)
+| #x #y #Hxy #m #H destruct /2 width=3 by ex2_intro/
+]
+qed-.
+
+lemma yle_inv_S1: ∀m,y. ⫯m ≤ y → ∃∃n. m ≤ n & y = ⫯n.
+/2 width=3 by yle_inv_S1_aux/ qed-.
+
+lemma yle_inv_S: ∀m,n. ⫯m ≤ ⫯n → m ≤ n.
+#m #n #H elim (yle_inv_S1 … H) -H
+#x #Hx #H destruct //
+qed-.
+
+(* Properties ***************************************************************)
+
+let corec yle_refl: reflexive … yle ≝ ?.
+* [ @yle_O | #x @yle_S // ]
+qed.
+
+let corec yle_Y: ∀m. m ≤ ∞ ≝ ?.
+* [ @yle_O | #m <Y_rew @yle_S // ]
+qed.
+
+let corec yle_S_dx: ∀m,n. m ≤ n → m ≤ ⫯n ≝ ?.
+#m #n * -m -n [ #n @yle_O | #m #n #H @yle_S /2 width=1 by/ ]
+qed.
+
+lemma yle_refl_S_dx: ∀x. x ≤ ⫯x.
+/2 width=1 by yle_refl, yle_S_dx/ qed.
+
+lemma yle_pred_sn: ∀m,n. m ≤ n → ⫰m ≤ n ≝ ?.
+* // #m #n #H elim (yle_inv_S1 … H) -H
+#x #Hm #H destruct /2 width=1 by yle_S_dx/
+qed.
+
+lemma yle_refl_pred_sn: ∀x. ⫰x ≤ x.
+/2 width=1 by yle_refl, yle_pred_sn/ qed.
+
+let corec yle_trans: Transitive … yle ≝ ?.
+#x #y * -x -y [ #x #z #_ @yle_O ]
+#x #y #Hxy #z #H elim (yle_inv_S1 … H) -H
+#n #Hyz #H destruct
+@yle_S @(yle_trans … Hxy … Hyz) (**) (* cofix not guarded by constructors *)
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground_2/ynat/ynat.ma".
+
+(* INFINITARY NATURAL NUMBERS ***********************************************)
+
+(* the predecessor on ynat *)
+definition ypred: ynat → ynat ≝ λm. match m with
+[ YO ⇒ 0
+| YS n ⇒ n
+].
+
+notation "hvbox( ⫰ term 55 T )"
+ non associative with precedence 55
+ for @{ 'Predecessor $T }.
+
+interpretation "ynat predecessor" 'Predecessor m = (ypred m).
+
+(* Properties ***************************************************************)
+
+lemma ypred_S: ∀m. ⫰⫯m = m.
+// qed.
+
+(* Inversion lemmas *********************************************************)
+
+lemma YS_inj: ∀m,n. ⫯m = ⫯n → m = n.
+#m #n #H <(ypred_S m) <(ypred_S n) //
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basics/relations.ma".
+
+(* GENERATED LIBRARY ********************************************************)
+
+lemma insert_eq_0: ∀A,a. ∀Q1,Q2:predicate A. (∀a0. Q1 a0 → a = a0 → Q2 a0) → Q1 a → Q2 a.
+/2 width=1 by/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "arithmetics/nat.ma".
+include "ground/xoa/ex_3_1.ma".
+include "ground/xoa/or_3.ma".
+include "ground/notation/functions/uparrow_1.ma".
+include "ground/notation/functions/downarrow_1.ma".
+include "ground/pull/pull_2.ma".
+include "ground/lib/relations.ma".
+
+(* ARITHMETICAL PROPERTIES **************************************************)
+
+interpretation "nat successor" 'UpArrow m = (S m).
+
+interpretation "nat predecessor" 'DownArrow m = (pred m).
+
+interpretation "nat min" 'and x y = (min x y).
+
+interpretation "nat max" 'or x y = (max x y).
+
+(* Iota equations ***********************************************************)
+
+lemma pred_O: pred 0 = 0.
+normalize // qed.
+
+lemma pred_S: ∀m. pred (S m) = m.
+// qed.
+
+lemma plus_S1: ∀x,y. ↑(x+y) = (↑x) + y.
+// qed.
+
+lemma max_O1: ∀n. n = (0 ∨ n).
+// qed.
+
+lemma max_O2: ∀n. n = (n ∨ 0).
+// qed.
+
+lemma max_SS: ∀n1,n2. ↑(n1∨n2) = (↑n1 ∨ ↑n2).
+#n1 #n2 elim (decidable_le n1 n2) #H normalize
+[ >(le_to_leb_true … H) | >(not_le_to_leb_false … H) ] -H //
+qed.
+
+(* Equalities ***************************************************************)
+
+lemma plus_SO_sn (n): 1 + n = ↑n.
+// qed-.
+
+lemma plus_SO_dx (n): n + 1 = ↑n.
+// qed.
+
+lemma minus_SO_dx (n): n-1 = ↓n.
+// qed.
+
+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
+@plus_to_minus >plus_minus_associative //
+qed-.
+
+(* Note: uses minus_minus_comm, minus_plus_m_m, commutative_plus, plus_minus *)
+lemma plus_minus_minus_be: ∀x,y,z. y ≤ z → z ≤ x → (x - z) + (z - y) = x - y.
+#x #z #y #Hzy #Hyx >plus_minus // >commutative_plus >plus_minus //
+qed-.
+
+lemma lt_succ_pred: ∀m,n. n < m → m = ↑↓m.
+#m #n #Hm >S_pred /2 width=2 by ltn_to_ltO/
+qed-.
+
+fact plus_minus_minus_be_aux: ∀i,x,y,z. y ≤ z → z ≤ x → i = z - y → x - z + i = x - y.
+/2 width=1 by plus_minus_minus_be/ qed-.
+
+lemma le_plus_minus: ∀m,n,p. p ≤ n → m + n - p = m + (n - p).
+/2 by plus_minus/ qed-.
+
+lemma le_plus_minus_comm: ∀n,m,p. p ≤ m → m + n - p = m - p + n.
+/2 by plus_minus/ qed-.
+
+lemma minus_minus_comm3: ∀n,x,y,z. n-x-y-z = n-y-z-x.
+// qed.
+
+lemma idempotent_max: ∀n:nat. n = (n ∨ n).
+#n normalize >le_to_leb_true //
+qed.
+
+lemma associative_max: associative … max.
+#x #y #z normalize
+@(leb_elim x y) normalize #Hxy
+@(leb_elim y z) normalize #Hyz //
+[1,2: >le_to_leb_true /2 width=3 by transitive_le/
+| >not_le_to_leb_false /4 width=3 by lt_to_not_le, not_le_to_lt, transitive_lt/
+ >not_le_to_leb_false //
+]
+qed.
+
+(* Properties ***************************************************************)
+
+lemma eq_nat_dec: ∀n1,n2:nat. Decidable (n1 = n2).
+#n1 elim n1 -n1 [| #n1 #IHn1 ] * [2,4: #n2 ]
+[1,4: @or_intror #H destruct
+| elim (IHn1 n2) -IHn1 /3 width=1 by or_intror, or_introl/
+| /2 width=1 by or_introl/
+]
+qed-.
+
+lemma lt_or_eq_or_gt: ∀m,n. ∨∨ m < n | n = m | n < m.
+#m #n elim (lt_or_ge m n) /2 width=1 by or3_intro0/
+#H elim H -m /2 width=1 by or3_intro1/
+#m #Hm * /3 width=1 by not_le_to_lt, le_S_S, or3_intro2/
+qed-.
+
+lemma monotonic_le_minus_l2: ∀x1,x2,y,z. x1 ≤ x2 → x1 - y - z ≤ x2 - y - z.
+/3 width=1 by monotonic_le_minus_l/ qed.
+
+lemma minus_le_trans_sn: ∀x1,x2. x1 ≤ x2 → ∀x. x1-x ≤ x2.
+/2 width=3 by transitive_le/ qed.
+
+lemma le_plus_to_minus_l: ∀a,b,c. a + b ≤ c → b ≤ c-a.
+/2 width=1 by le_plus_to_minus_r/
+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)
+@le_S_S_to_le >S_pred /2 width=3 by transitive_lt/
+qed.
+
+lemma lt_S_S: ∀x,y. x < y → ↑x < ↑y.
+/2 width=1 by le_S_S/ qed.
+
+lemma lt_S: ∀n,m. n < m → n < ↑m.
+/2 width=1 by le_S/ qed.
+
+lemma monotonic_lt_minus_r:
+∀p,q,n. q < n -> q < p → n-p < n-q.
+#p #q #n #Hn #H
+lapply (monotonic_le_minus_r … n H) -H #H
+@(le_to_lt_to_lt … H) -H
+/2 width=1 by lt_plus_to_minus/
+qed.
+
+lemma max_S1_le_S: ∀n1,n2,n. (n1 ∨ n2) ≤ n → (↑n1 ∨ n2) ≤ ↑n.
+/4 width=2 by to_max, le_maxr, le_S_S, le_S/ qed-.
+
+lemma max_S2_le_S: ∀n1,n2,n. (n1 ∨ n2) ≤ n → (n1 ∨ ↑n2) ≤ ↑n.
+/2 width=1 by max_S1_le_S/ qed-.
+
+(* Inversion & forward lemmas ***********************************************)
+
+lemma lt_refl_false: ∀n. n < n → ⊥.
+#n #H elim (lt_to_not_eq … H) -H /2 width=1 by/
+qed-.
+
+lemma lt_zero_false: ∀n. n < 0 → ⊥.
+#n #H elim (lt_to_not_le … H) -H /2 width=1 by/
+qed-.
+
+lemma 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-.
+
+lemma le_plus_xSy_O_false: ∀x,y. x + S y ≤ 0 → ⊥.
+#x #y #H lapply (le_n_O_to_eq … H) -H <plus_n_Sm #H destruct
+qed-.
+
+lemma le_plus_xySz_x_false: ∀y,z,x. x + y + S z ≤ x → ⊥.
+#y #z #x elim x -x /3 width=1 by le_S_S_to_le/
+#H elim (le_plus_xSy_O_false … H)
+qed-.
+
+lemma plus_xySz_x_false: ∀z,x,y. x + y + S z = x → ⊥.
+/2 width=4 by le_plus_xySz_x_false/ qed-.
+
+lemma plus_xSy_x_false: ∀y,x. x + S y = x → ⊥.
+/2 width=4 by plus_xySz_x_false/ qed-.
+
+lemma pred_inv_fix_sn: ∀x. ↓x = x → 0 = x.
+* // #x <pred_Sn #H
+elim (succ_inv_refl_sn x) //
+qed-.
+
+lemma discr_plus_xy_y: ∀x,y. x + y = y → x = 0.
+// qed-.
+
+lemma discr_plus_x_xy: ∀x,y. x = x + y → y = 0.
+/2 width=2 by le_plus_minus_comm/ qed-.
+
+lemma plus2_le_sn_sn: ∀m1,m2,n1,n2. m1 + n1 = m2 + n2 → m1 ≤ m2 → n2 ≤ n1.
+#m1 #m2 #n1 #n2 #H #Hm
+lapply (monotonic_le_plus_l n1 … Hm) -Hm >H -H
+/2 width=2 by le_plus_to_le/
+qed-.
+
+lemma plus2_le_sn_dx: ∀m1,m2,n1,n2. m1 + n1 = n2 + m2 → m1 ≤ m2 → n2 ≤ n1.
+/2 width=4 by plus2_le_sn_sn/ qed-.
+
+lemma plus2_le_dx_sn: ∀m1,m2,n1,n2. n1 + m1 = m2 + n2 → m1 ≤ m2 → n2 ≤ n1.
+/2 width=4 by plus2_le_sn_sn/ qed-.
+
+lemma plus2_le_dx_dx: ∀m1,m2,n1,n2. n1 + m1 = n2 + m2 → m1 ≤ m2 → n2 ≤ n1.
+/2 width=4 by plus2_le_sn_sn/ qed-.
+
+lemma lt_S_S_to_lt: ∀x,y. ↑x < ↑y → x < y.
+/2 width=1 by le_S_S_to_le/ qed-.
+
+(* Note this should go in nat.ma *)
+lemma discr_x_minus_xy: ∀x,y. x = x - y → x = 0 ∨ y = 0.
+#x @(nat_ind_plus … x) -x /2 width=1 by or_introl/
+#x #_ #y @(nat_ind_plus … y) -y /2 width=1 by or_intror/
+#y #_ >minus_plus_plus_l
+#H lapply (discr_plus_xy_minus_xz … H) -H
+#H destruct
+qed-.
+
+lemma lt_inv_O1: ∀n. 0 < n → ∃m. ↑m = n.
+* /2 width=2 by ex_intro/
+#H cases (lt_le_false … H) -H //
+qed-.
+
+lemma lt_inv_S1: ∀m,n. ↑m < n → ∃∃p. m < p & ↑p = n.
+#m * /3 width=3 by lt_S_S_to_lt, ex2_intro/
+#H cases (lt_le_false … H) -H //
+qed-.
+
+lemma lt_inv_gen: ∀y,x. x < y → ∃∃z. x ≤ z & ↑z = y.
+* /3 width=3 by le_S_S_to_le, ex2_intro/
+#x #H elim (lt_le_false … H) -H //
+qed-.
+
+lemma plus_inv_O3: ∀x,y. x + y = 0 → x = 0 ∧ y = 0.
+/2 width=1 by plus_le_0/ qed-.
+
+lemma plus_inv_S3_sn: ∀x1,x2,x3. x1+x2 = ↑x3 →
+ ∨∨ ∧∧ x1 = 0 & x2 = ↑x3
+ | ∃∃y1. x1 = ↑y1 & y1 + x2 = x3.
+* /3 width=1 by or_introl, conj/
+#x1 #x2 #x3 <plus_S1 #H destruct
+/3 width=3 by ex2_intro, or_intror/
+qed-.
+
+lemma plus_inv_S3_dx: ∀x2,x1,x3. x1+x2 = ↑x3 →
+ ∨∨ ∧∧ x2 = 0 & x1 = ↑x3
+ | ∃∃y2. x2 = ↑y2 & x1 + y2 = x3.
+* /3 width=1 by or_introl, conj/
+#x2 #x1 #x3 <plus_n_Sm #H destruct
+/3 width=3 by ex2_intro, or_intror/
+qed-.
+
+lemma max_inv_O3: ∀x,y. (x ∨ y) = 0 → 0 = x ∧ 0 = y.
+/4 width=2 by le_maxr, le_maxl, le_n_O_to_eq, conj/
+qed-.
+
+lemma zero_eq_plus: ∀x,y. 0 = x + y → 0 = x ∧ 0 = y.
+* /2 width=1 by conj/ #x #y normalize #H destruct
+qed-.
+
+lemma nat_split: ∀x. x = 0 ∨ ∃y. ↑y = x.
+* /3 width=2 by ex_intro, or_introl, or_intror/
+qed-.
+
+lemma lt_elim: ∀R:relation nat.
+ (∀n2. R O (↑n2)) →
+ (∀n1,n2. R n1 n2 → R (↑n1) (↑n2)) →
+ ∀n2,n1. n1 < n2 → R n1 n2.
+#R #IH1 #IH2 #n2 elim n2 -n2
+[ #n1 #H elim (lt_le_false … H) -H //
+| #n2 #IH * /4 width=1 by lt_S_S_to_lt/
+]
+qed-.
+
+lemma le_elim: ∀R:relation nat.
+ (∀n2. R O (n2)) →
+ (∀n1,n2. R n1 n2 → R (↑n1) (↑n2)) →
+ ∀n1,n2. n1 ≤ n2 → R n1 n2.
+#R #IH1 #IH2 #n1 #n2 @(nat_elim2 … n1 n2) -n1 -n2
+/4 width=1 by monotonic_pred/ -IH1 -IH2
+#n1 #H elim (lt_le_false … H) -H //
+qed-.
+
+lemma nat_elim_le_sn (Q:relation …):
+ (∀m1,m2. (∀m. m < m2-m1 → Q (m2-m) m2) → m1 ≤ m2 → Q m1 m2) →
+ ∀n1,n2. n1 ≤ n2 → Q n1 n2.
+#Q #IH #n1 #n2 #Hn
+<(minus_minus_m_m … Hn) -Hn
+lapply (minus_le n2 n1)
+let d ≝ (n2-n1)
+@(nat_elim1 … d) -d -n1 #d
+@pull_2 #Hd
+<(minus_minus_m_m … Hd) in ⊢ (%→?); -Hd
+let n1 ≝ (n2-d) #IHd
+@IH -IH [| // ] #m #Hn
+/4 width=3 by lt_to_le, lt_to_le_to_lt/
+qed-.
+
+(* Iterators ****************************************************************)
+
+(* Note: see also: lib/arithemetics/bigops.ma *)
+rec definition iter (n:nat) (B:Type[0]) (op: B → B) (nil: B) ≝
+ match n with
+ [ O ⇒ nil
+ | S k ⇒ op (iter k B op nil)
+ ].
+
+interpretation "iterated function" 'exp op n = (iter n ? op).
+
+lemma iter_O: ∀B:Type[0]. ∀f:B→B.∀b. f^0 b = b.
+// qed.
+
+lemma iter_S: ∀B:Type[0]. ∀f:B→B.∀b,l. f^(S l) b = f (f^l b).
+// qed.
+
+lemma iter_n_Sm: ∀B:Type[0]. ∀f:B→B. ∀b,l. f^l (f b) = f (f^l b).
+#B #f #b #l elim l -l normalize //
+qed.
+
+lemma iter_plus: ∀B:Type[0]. ∀f:B→B. ∀b,l1,l2. f^(l1+l2) b = f^l1 (f^l2 b).
+#B #f #b #l1 elim l1 -l1 normalize //
+qed.
+
+(* Trichotomy operator ******************************************************)
+
+(* Note: this is "if eqb n1 n2 then a2 else if leb n1 n2 then a1 else a3" *)
+rec definition tri (A:Type[0]) n1 n2 a1 a2 a3 on n1 : A ≝
+ match n1 with
+ [ O ⇒ match n2 with [ O ⇒ a2 | S n2 ⇒ a1 ]
+ | S n1 ⇒ match n2 with [ O ⇒ a3 | S n2 ⇒ tri A n1 n2 a1 a2 a3 ]
+ ].
+
+lemma tri_lt: ∀A,a1,a2,a3,n2,n1. n1 < n2 → tri A n1 n2 a1 a2 a3 = a1.
+#A #a1 #a2 #a3 #n2 elim n2 -n2
+[ #n1 #H elim (lt_zero_false … H)
+| #n2 #IH #n1 elim n1 -n1 /3 width=1 by monotonic_lt_pred/
+]
+qed.
+
+lemma tri_eq: ∀A,a1,a2,a3,n. tri A n n a1 a2 a3 = a2.
+#A #a1 #a2 #a3 #n elim n -n normalize //
+qed.
+
+lemma tri_gt: ∀A,a1,a2,a3,n1,n2. n2 < n1 → tri A n1 n2 a1 a2 a3 = a3.
+#A #a1 #a2 #a3 #n1 elim n1 -n1
+[ #n2 #H elim (lt_zero_false … H)
+| #n1 #IH #n2 elim n2 -n2 /3 width=1 by monotonic_lt_pred/
+]
+qed.
+
+(* 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-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/lib/arith.ma".
+
+(* ARITHMETICAL PROPERTIES FOR λδ-2B ****************************************)
+
+(* Equalities ***************************************************************)
+
+lemma plus_n_2: ∀n. n + 2 = n + 1 + 1.
+// qed.
+
+lemma arith_b1: ∀a,b,c1. c1 ≤ b → a - c1 - (b - c1) = a - b.
+#a #b #c1 #H >minus_minus_comm >minus_le_minus_minus_comm //
+qed-.
+
+lemma arith_b2: ∀a,b,c1,c2. c1 + c2 ≤ b → a - c1 - c2 - (b - c1 - c2) = a - b.
+#a #b #c1 #c2 #H >minus_plus >minus_plus >minus_plus /2 width=1 by arith_b1/
+qed-.
+
+lemma arith_c1x: ∀x,a,b,c1. x + c1 + a - (b + c1) = x + a - b.
+/3 by monotonic_le_minus_l, le_to_le_to_eq, le_n/ qed.
+
+lemma arith_h1: ∀a1,a2,b,c1. c1 ≤ a1 → c1 ≤ b →
+ a1 - c1 + a2 - (b - c1) = a1 + a2 - b.
+#a1 #a2 #b #c1 #H1 #H2 >plus_minus /2 width=1 by arith_b2/
+qed-.
+
+lemma arith_i: ∀x,y,z. y < x → x+z-y-1 = x-y-1+z.
+/2 width=1 by plus_minus/ qed-.
+
+(* Properties ***************************************************************)
+
+fact le_repl_sn_conf_aux: ∀x,y,z:nat. x ≤ z → x = y → y ≤ z.
+// qed-.
+
+fact le_repl_sn_trans_aux: ∀x,y,z:nat. x ≤ z → y = x → y ≤ z.
+// qed-.
+
+lemma arith_j: ∀x,y,z. x-y-1 ≤ x-(y-z)-1.
+/3 width=1 by monotonic_le_minus_l, monotonic_le_minus_r/ qed.
+
+lemma arith_k_sn: ∀z,x,y,n. z < x → x+n ≤ y → x-z-1+n ≤ y-z-1.
+#z #x #y #n #Hzx #Hxny
+>plus_minus [2: /2 width=1 by monotonic_le_minus_r/ ]
+>plus_minus [2: /2 width=1 by lt_to_le/ ]
+/2 width=1 by monotonic_le_minus_l2/
+qed.
+
+lemma arith_k_dx: ∀z,x,y,n. z < x → y ≤ x+n → y-z-1 ≤ x-z-1+n.
+#z #x #y #n #Hzx #Hyxn
+>plus_minus [2: /2 width=1 by monotonic_le_minus_r/ ]
+>plus_minus [2: /2 width=1 by lt_to_le/ ]
+/2 width=1 by monotonic_le_minus_l2/
+qed.
+
+(* Inversion & forward lemmas ***********************************************)
+
+lemma lt_plus_SO_to_le: ∀x,y. x < y + 1 → x ≤ y.
+/2 width=1 by monotonic_pred/ qed-.
+
+(* Iterators ****************************************************************)
+
+lemma iter_SO: ∀B:Type[0]. ∀f:B→B. ∀b,l. f^(l+1) b = f (f^l b).
+#B #f #b #l >commutative_plus //
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/lib/arith.ma".
+
+(* ARITHMETICAL PROPERTIES FOR λδ-2B ****************************************)
+
+lemma arith_l4 (m11) (m12) (m21) (m22):
+ m21+m22-(m11+m12) = m21-m11-m12+(m22-(m11-m21)-(m12-(m21-m11))).
+#m11 #m12 #m21 #m22 >minus_plus
+elim (le_or_ge (m11+m12) m21) #Hm1121
+[ lapply (transitive_le m11 ??? Hm1121) // #Hm121
+ lapply (le_plus_to_minus_l … Hm1121) #Hm12211
+ <plus_minus // @eq_f2 // >(eq_minus_O m11 ?) // >(eq_minus_O m12 ?) //
+| >(eq_minus_O m21 ?) // <plus_O_n <minus_plus <commutative_plus
+ elim (le_or_ge m11 m21) #Hm121
+ [ lapply (le_plus_to_minus_comm … Hm1121) #Hm2112
+ >(eq_minus_O m11 ?) // <plus_minus_associative // <minus_le_minus_minus_comm //
+ | >(eq_minus_O m21 ?) // <minus_le_minus_minus_comm //
+ ]
+]
+qed.
+
+lemma arith_l3 (m) (n1) (n2): n1+n2-m = n1-m+(n2-(m-n1)).
+// qed.
+
+lemma arith_l2 (n1) (n2): ↑n2-n1 = 1-n1+(n2-(n1-1)).
+#n1 #n2 <arith_l3 //
+qed.
+
+lemma arith_l1: ∀x. 1 = 1-x+(x-(x-1)).
+#x <arith_l2 //
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basics/bool.ma".
+include "ground/lib/relations.ma".
+include "ground/notation/functions/no_0.ma".
+include "ground/notation/functions/yes_0.ma".
+
+(* BOOLEAN PROPERTIES *******************************************************)
+
+interpretation "boolean false" 'no = false.
+
+interpretation "boolean true" 'yes = true.
+
+(* Basic properties *********************************************************)
+
+lemma commutative_orb: commutative … orb.
+* * // qed.
+
+lemma orb_true_dx: ∀b. (b ∨ Ⓣ) = Ⓣ.
+* // qed.
+
+lemma orb_true_sn: ∀b. (Ⓣ ∨ b) = Ⓣ.
+// qed.
+
+lemma commutative_andb: commutative … andb.
+* * // qed.
+
+lemma andb_false_dx: ∀b. (b ∧ Ⓕ) = Ⓕ.
+* // qed.
+
+lemma andb_false_sn: ∀b. (Ⓕ ∧ b) = Ⓕ.
+// qed.
+
+lemma eq_bool_dec: ∀b1,b2:bool. Decidable (b1 = b2).
+* * /2 width=1 by or_introl/
+@or_intror #H destruct
+qed-.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma orb_inv_false_dx: ∀b1,b2:bool. (b1 ∨ b2) = Ⓕ → b1 = Ⓕ ∧ b2 = Ⓕ.
+* normalize /2 width=1 by conj/ #b2 #H destruct
+qed-.
+
+lemma andb_inv_true_dx: ∀b1,b2:bool. (b1 ∧ b2) = Ⓣ → b1 = Ⓣ ∧ b2 = Ⓣ.
+* normalize /2 width=1 by conj/ #b2 #H destruct
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/relations/doteq_4.ma".
+include "ground/lib/relations.ma".
+
+(* EXTENSIONAL EQUIVALENCE **************************************************)
+
+definition exteq (A,B:Type[0]): relation (A → B) ≝
+ λf1,f2. ∀a. f1 a = f2 a.
+
+interpretation "extensional equivalence"
+ 'DotEq A B f1 f2 = (exteq A B f1 f2).
+
+(* Basic_properties *********************************************************)
+
+lemma exteq_refl (A) (B): reflexive … (exteq A B).
+// qed.
+
+lemma exteq_repl (A) (B): replace_2 … (exteq A B) (exteq A B) (exteq A B).
+// qed-.
+
+lemma exteq_sym (A) (B): symmetric … (exteq A B).
+/2 width=1 by exteq_repl/ qed-.
+
+lemma exteq_trans (A) (B): Transitive … (exteq A B).
+/2 width=1 by exteq_repl/ qed-.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/lib/relations.ma".
+
+(* FUNCTIONS ****************************************************************)
+
+definition left_identity (A) (f): predicate A ≝ λi. ∀a:A. a = f i a.
+
+definition right_identity (A) (f): predicate A ≝ λi. ∀a:A. a = f a i.
+
+definition compatible_2 (A) (B):
+ relation3 … (relation A) (relation B) ≝
+ λf,Sa,Sb.
+ ∀a1,a2. Sa a1 a2 → Sb (f a1) (f a2).
+
+definition compatible_3 (A) (B) (C):
+ relation4 … (relation A) (relation B) (relation C) ≝
+ λf,Sa,Sb,Sc.
+ ∀a1,a2. Sa a1 a2 → ∀b1,b2. Sb b1 b2 → Sc (f a1 b1) (f a2 b2).
+
+definition annulment_2 (A) (f): predicate A ≝
+ λi:A. ∀a1,a2. i = f a1 a2 → ∧∧ i = a1 & i = a2.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/functions/circledE_1.ma".
+include "ground/notation/functions/oplusright_3.ma".
+include "ground/lib/relations.ma".
+
+(* LISTS ********************************************************************)
+
+inductive list (A:Type[0]) : Type[0] :=
+ | nil : list A
+ | cons: A → list A → list A.
+
+interpretation "nil (list)" 'CircledE A = (nil A).
+
+interpretation "cons (list)" 'OPlusRight A hd tl = (cons A hd tl).
+
+rec definition all A (R:predicate A) (l:list A) on l ≝
+ match l with
+ [ nil ⇒ ⊤
+ | cons hd tl ⇒ ∧∧ R hd & all A R tl
+ ].
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/relations/ringeq_3.ma".
+include "ground/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-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/lib/arith.ma".
+include "ground/lib/list.ma".
+
+(* LENGTH OF A LIST *********************************************************)
+
+rec definition length A (l:list A) on l ≝ match l with
+[ nil ⇒ 0
+| cons _ l ⇒ ↑(length A l)
+].
+
+interpretation "length (list)"
+ 'card l = (length ? l).
+
+(* Basic properties *********************************************************)
+
+lemma length_nil (A:Type[0]): |nil A| = 0.
+// qed.
+
+lemma length_cons (A:Type[0]) (l:list A) (a:A): |a⨮l| = ↑|l|.
+// qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma length_inv_zero_dx (A:Type[0]) (l:list A): |l| = 0 → l = Ⓔ.
+#A * // #a #l >length_cons #H destruct
+qed-.
+
+lemma length_inv_zero_sn (A:Type[0]) (l:list A): 0 = |l| → l = Ⓔ.
+/2 width=1 by length_inv_zero_dx/ qed-.
+
+lemma length_inv_succ_dx (A:Type[0]) (l:list A) (x): |l| = ↑x →
+ ∃∃tl,a. x = |tl| & l = a ⨮ tl.
+#A *
+[ #x >length_nil #H destruct
+| #a #l #x >length_cons #H destruct /2 width=4 by ex2_2_intro/
+]
+qed-.
+
+lemma length_inv_succ_sn (A:Type[0]) (l:list A) (x): ↑x = |l| →
+ ∃∃tl,a. x = |tl| & l = a ⨮ tl.
+/2 width=1 by length_inv_succ_dx/ qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basics/logic.ma".
+include "ground/notation/xoa/false_0.ma".
+include "ground/notation/xoa/true_0.ma".
+include "ground/notation/xoa/or_2.ma".
+include "ground/notation/xoa/and_2.ma".
+
+interpretation "logical false" 'false = False.
+
+interpretation "logical true" 'true = True.
+
+(* Logical properties missing in the basic library **************************)
+
+lemma commutative_and: ∀A,B. A ∧ B → B ∧ A.
+#A #B * /2 width=1 by conj/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "arithmetics/lstar.ma".
+
+(* PROPERTIES OF NAT-LABELED REFLEXIVE AND TRANSITIVE CLOSURE ***************)
+
+definition llstar: ∀A:Type[0]. ∀B. (A→relation B) → nat → (A→relation B) ≝
+ λA,B,R,l,a. lstar … (R a) l.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/insert_eq/insert_eq_0.ma".
+include "ground/lib/functions.ma".
+
+(* LABELLED TRANSITIVE CLOSURE **********************************************)
+
+inductive ltc (A:Type[0]) (f) (B) (R:relation3 A B B): relation3 A B B ≝
+| ltc_rc : ∀a,b1,b2. R a b1 b2 → ltc … a b1 b2
+| ltc_trans: ∀a1,a2,b1,b,b2. ltc … a1 b1 b → ltc … a2 b b2 → ltc … (f a1 a2) b1 b2
+.
+
+(* Basic properties *********************************************************)
+
+lemma ltc_sn (A) (f) (B) (R): ∀a1,b1,b. R a1 b1 b →
+ ∀a2,b2. ltc A f B R a2 b b2 → ltc … f … R (f a1 a2) b1 b2.
+/3 width=3 by ltc_rc, ltc_trans/ qed.
+
+lemma ltc_dx (A) (f) (B) (R): ∀a1,b1,b. ltc A f B R a1 b1 b →
+ ∀a2,b2. R a2 b b2 → ltc … f … R (f a1 a2) b1 b2.
+/3 width=3 by ltc_rc, ltc_trans/ qed.
+
+(* Basic eliminators ********************************************************)
+
+lemma ltc_ind_sn (A) (f) (B) (R) (Q:relation2 A B) (b2): associative … f →
+ (∀a,b1. R a b1 b2 → Q a b1) →
+ (∀a1,a2,b1,b. R a1 b1 b → ltc … f … R a2 b b2 → Q a2 b → Q (f a1 a2) b1) →
+ ∀a,b1. ltc … f … R a b1 b2 → Q a b1.
+#A #f #B #R #Q #b2 #Hf #IH1 #IH2 #a #b1 @(insert_eq_0 … b2)
+#b0 #H elim H -a -b1 -b0 /2 width=2 by/
+#a1 #a2 #b1 #b #b0 #H #Hb2 #_
+generalize in match Hb2; generalize in match a2; -Hb2 -a2
+elim H -a1 -b1 -b /4 width=4 by ltc_trans/
+qed-.
+
+lemma ltc_ind_dx (A) (f) (B) (R) (Q:A→predicate B) (b1): associative … f →
+ (∀a,b2. R a b1 b2 → Q a b2) →
+ (∀a1,a2,b,b2. ltc … f … R a1 b1 b → Q a1 b → R a2 b b2 → Q (f a1 a2) b2) →
+ ∀a,b2. ltc … f … R a b1 b2 → Q a b2.
+#A #f #B #R #Q #b1 #Hf #IH1 #IH2 #a #b2 @(insert_eq_0 … b1)
+#b0 #H elim H -a -b0 -b2 /2 width=2 by/
+#a1 #a2 #b0 #b #b2 #Hb0 #H #IHb0 #_
+generalize in match IHb0; generalize in match Hb0; generalize in match a1; -IHb0 -Hb0 -a1
+elim H -a2 -b -b2 /4 width=4 by ltc_trans/
+qed-.
+
+(* Advanced elimiators with reflexivity *************************************)
+
+lemma ltc_ind_sn_refl (A) (i) (f) (B) (R) (Q:relation2 A B) (b2):
+ associative … f → right_identity … f i → reflexive B (R i) →
+ Q i b2 →
+ (∀a1,a2,b1,b. R a1 b1 b → ltc … f … R a2 b b2 → Q a2 b → Q (f a1 a2) b1) →
+ ∀a,b1. ltc … f … R a b1 b2 → Q a b1.
+#A #i #f #B #R #Q #b2 #H1f #H2f #HR #IH1 #IH2 #a #b1 #H
+@(ltc_ind_sn … R … H1f … IH2 … H) -a -b1 -H1f #a #b1 #Hb12
+>(H2f a) -H2f /3 width=4 by ltc_rc/
+qed-.
+
+lemma ltc_ind_dx_refl (A) (i) (f) (B) (R) (Q:A→predicate B) (b1):
+ associative … f → left_identity … f i → reflexive B (R i) →
+ Q i b1 →
+ (∀a1,a2,b,b2. ltc … f … R a1 b1 b → Q a1 b → R a2 b b2 → Q (f a1 a2) b2) →
+ ∀a,b2. ltc … f … R a b1 b2 → Q a b2.
+#A #i #f #B #R #Q #b1 #H1f #H2f #HR #IH1 #IH2 #a #b2 #H
+@(ltc_ind_dx … R … H1f … IH2 … H) -a -b2 -H1f #a #b2 #Hb12
+>(H2f a) -H2f /3 width=4 by ltc_rc/
+qed-.
+
+(* Properties with lsub *****************************************************)
+
+lemma ltc_lsub_trans: ∀A,f. associative … f →
+ ∀B,C,R,S. (∀n. lsub_trans B C (λL. R L n) S) →
+ ∀n. lsub_trans B C (λL. ltc A f … (R L) n) S.
+#A #f #Hf #B #C #R #S #HRS #n #L2 #T1 #T2 #H
+@(ltc_ind_dx … Hf ???? H) -n -T2
+/3 width=5 by ltc_dx, ltc_rc/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/lib/star.ma".
+include "ground/lib/ltc.ma".
+
+(* LABELLED TRANSITIVE CLOSURE **********************************************)
+
+alias symbol "subseteq" = "relation inclusion".
+
+(* Properties with contextual transitive closure ****************************)
+
+lemma ltc_CTC (C) (A) (i) (f) (B) (R:relation4 C A B B):
+ left_identity … f i →
+ ∀c. CTC … (λc. R c i) c ⊆ ltc … f … (R c) i.
+#C #A #i #f #B #R #Hf #c #b1 #b2 #H elim H -b2 /2 width=1 by ltc_rc/
+#b #b2 #_ #Hb2 #IH >(Hf i) -Hf /2 width=3 by ltc_dx/
+qed.
+
+(* Inversion lemmas with contextual transitive closure **********************)
+
+lemma ltc_inv_CTC (C) (A) (i) (f) (B) (R:relation4 C A B B):
+ associative … f → annulment_2 … f i →
+ ∀c. ltc … f … (R c) i ⊆ CTC … (λc. R c i) c.
+#C #A #i #f #B #R #H1f #H2f #c #b1 #b2
+@(insert_eq_0 … i) #a #H
+@(ltc_ind_dx A f B … H) -a -b2 /2 width=1 by inj/ -H1f
+#a1 #a2 #b #b2 #_ #IH #Hb2 #H <H
+elim (H2f … H) -H2f -H #H1 #H2 destruct
+/3 width=3 by step/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basics/relations.ma".
+include "ground/xoa/and_3.ma".
+include "ground/xoa/ex_2_2.ma".
+include "ground/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.
+
+(* Inclusion ****************************************************************)
+
+definition subR2 (S1) (S2): relation (relation2 S1 S2) ≝
+ λR1,R2. (∀a1,a2. R1 a1 a2 → R2 a1 a2).
+
+interpretation "2-relation inclusion"
+ 'subseteq R1 R2 = (subR2 ?? R1 R2).
+
+definition subR3 (S1) (S2) (S3): relation (relation3 S1 S2 S3) ≝
+ λR1,R2. (∀a1,a2,a3. R1 a1 a2 a3 → R2 a1 a2 a3).
+
+interpretation "3-relation inclusion"
+ 'subseteq R1 R2 = (subR3 ??? R1 R2).
+
+(* 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 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 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.
+
+definition Decidable: Prop → Prop ≝ λR. R ∨ (R → ⊥).
+
+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 ≝
+ ∀a0,a1. R a0 a1 → ∀a2. R a0 a2 → 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) (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) ≝
+ λR1,R2.
+ ∀a0. pw_confluent2 A R1 R2 a0.
+
+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 ≝
+ ∀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) ≝
+ λ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) ≝
+ λ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) ≝
+ λR. ∀b1. R b1 → ∀b2. R b2 → b1 = b2.
+
+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 ≝
+ λ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.
+#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 ≝
+ λ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.
+#A #R #S #a2 #Ha2
+@SN_sn_intro #a1 #HRa12 #HSa12
+elim HSa12 -HSa12 /2 width=1 by/
+qed.
+
+(* Relations on unboxed triples *********************************************)
+
+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).
+/3 width=1 by and3_intro, or_intror/ qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basics/star1.ma".
+include "ground/lib/relations.ma".
+
+(* TRANSITIVE CLOSURE *******************************************************)
+
+definition CTC: ∀A:Type[0]. ∀B. (A→relation B) → (A→relation B) ≝
+ λA,B,R,a. TC … (R a).
+
+definition s_r_transitive: ∀A,B. relation2 (A→relation B) (B→relation A) ≝ λA,B,R1,R2.
+ ∀L2,T1,T2. R1 L2 T1 T2 → ∀L1. R2 T1 L1 L2 → CTC … R1 L1 T1 T2.
+
+definition s_rs_transitive: ∀A,B. relation2 (A→relation B) (B→relation A) ≝ λA,B,R1,R2.
+ ∀L2,T1,T2. CTC … R1 L2 T1 T2 → ∀L1. R2 T1 L1 L2 → CTC … R1 L1 T1 T2.
+
+lemma TC_strip1: ∀A,R1,R2. confluent2 A R1 R2 →
+ ∀a0,a1. TC … R1 a0 a1 → ∀a2. R2 a0 a2 →
+ ∃∃a. R2 a1 a & TC … R1 a2 a.
+#A #R1 #R2 #HR12 #a0 #a1 #H elim H -a1
+[ #a1 #Ha01 #a2 #Ha02
+ elim (HR12 … Ha01 … Ha02) -HR12 -a0 /3 width=3 by inj, ex2_intro/
+| #a #a1 #_ #Ha1 #IHa0 #a2 #Ha02
+ elim (IHa0 … Ha02) -a0 #a0 #Ha0 #Ha20
+ elim (HR12 … Ha1 … Ha0) -HR12 -a /4 width=5 by step, ex2_intro/
+]
+qed.
+
+lemma TC_strip2: ∀A,R1,R2. confluent2 A R1 R2 →
+ ∀a0,a2. TC … R2 a0 a2 → ∀a1. R1 a0 a1 →
+ ∃∃a. TC … R2 a1 a & R1 a2 a.
+#A #R1 #R2 #HR12 #a0 #a2 #H elim H -a2
+[ #a2 #Ha02 #a1 #Ha01
+ elim (HR12 … Ha01 … Ha02) -HR12 -a0 /3 width=3 by inj, ex2_intro/
+| #a #a2 #_ #Ha2 #IHa0 #a1 #Ha01
+ elim (IHa0 … Ha01) -a0 #a0 #Ha10 #Ha0
+ elim (HR12 … Ha0 … Ha2) -HR12 -a /4 width=3 by step, ex2_intro/
+]
+qed.
+
+lemma TC_confluent2: ∀A,R1,R2.
+ confluent2 A R1 R2 → confluent2 A (TC … R1) (TC … R2).
+#A #R1 #R2 #HR12 #a0 #a1 #H elim H -a1
+[ #a1 #Ha01 #a2 #Ha02
+ elim (TC_strip2 … HR12 … Ha02 … Ha01) -HR12 -a0 /3 width=3 by inj, ex2_intro/
+| #a #a1 #_ #Ha1 #IHa0 #a2 #Ha02
+ elim (IHa0 … Ha02) -a0 #a0 #Ha0 #Ha20
+ elim (TC_strip2 … HR12 … Ha0 … Ha1) -HR12 -a /4 width=5 by step, ex2_intro/
+]
+qed.
+
+lemma TC_strap1: ∀A,R1,R2. transitive2 A R1 R2 →
+ ∀a1,a0. TC … R1 a1 a0 → ∀a2. R2 a0 a2 →
+ ∃∃a. R2 a1 a & TC … R1 a a2.
+#A #R1 #R2 #HR12 #a1 #a0 #H elim H -a0
+[ #a0 #Ha10 #a2 #Ha02
+ elim (HR12 … Ha10 … Ha02) -HR12 -a0 /3 width=3 by inj, ex2_intro/
+| #a #a0 #_ #Ha0 #IHa #a2 #Ha02
+ elim (HR12 … Ha0 … Ha02) -HR12 -a0 #a0 #Ha0 #Ha02
+ elim (IHa … Ha0) -a /4 width=5 by step, ex2_intro/
+]
+qed.
+
+lemma TC_strap2: ∀A,R1,R2. transitive2 A R1 R2 →
+ ∀a0,a2. TC … R2 a0 a2 → ∀a1. R1 a1 a0 →
+ ∃∃a. TC … R2 a1 a & R1 a a2.
+#A #R1 #R2 #HR12 #a0 #a2 #H elim H -a2
+[ #a2 #Ha02 #a1 #Ha10
+ elim (HR12 … Ha10 … Ha02) -HR12 -a0 /3 width=3 by inj, ex2_intro/
+| #a #a2 #_ #Ha02 #IHa #a1 #Ha10
+ elim (IHa … Ha10) -a0 #a0 #Ha10 #Ha0
+ elim (HR12 … Ha0 … Ha02) -HR12 -a /4 width=3 by step, ex2_intro/
+]
+qed.
+
+lemma TC_transitive2: ∀A,R1,R2.
+ transitive2 A R1 R2 → transitive2 A (TC … R1) (TC … R2).
+#A #R1 #R2 #HR12 #a1 #a0 #H elim H -a0
+[ #a0 #Ha10 #a2 #Ha02
+ elim (TC_strap2 … HR12 … Ha02 … Ha10) -HR12 -a0 /3 width=3 by inj, ex2_intro/
+| #a #a0 #_ #Ha0 #IHa #a2 #Ha02
+ elim (TC_strap2 … HR12 … Ha02 … Ha0) -HR12 -a0 #a0 #Ha0 #Ha02
+ elim (IHa … Ha0) -a /4 width=5 by step, ex2_intro/
+]
+qed.
+
+lemma CTC_lsub_trans: ∀A,B,R,S. lsub_trans A B R S → lsub_trans A B (CTC … R) S.
+#A #B #R #S #HRS #L2 #T1 #T2 #H elim H -T2 /3 width=3 by inj/
+#T #T2 #_ #HT2 #IHT1 #L1 #HL12
+lapply (HRS … HT2 … HL12) -HRS -HT2 /3 width=3 by step/
+qed-.
+
+lemma s_r_conf1_CTC1: ∀A,B,S,R. s_r_confluent1 A B S R → s_r_confluent1 A B (CTC … S) R.
+#A #B #S #R #HSR #L1 #T1 #T2 #H @(TC_ind_dx … T1 H) -T1 /3 width=3 by/
+qed-.
+
+lemma s_r_trans_CTC1: ∀A,B,S,R. s_r_confluent1 A B S R →
+ s_r_transitive A B S R → s_rs_transitive A B S R.
+#A #B #S #R #H1SR #H2SR #L2 #T1 #T2 #H @(TC_ind_dx … T1 H) -T1 /2 width=3 by/
+#T1 #T #HT1 #_ #IHT2 #L1 #HL12 lapply (H2SR … HT1 … HL12) -H2SR -HT1
+/4 width=5 by s_r_conf1_CTC1, trans_TC/
+qed-.
+
+lemma s_r_trans_CTC2: ∀A,B,S,R. s_rs_transitive A B S R → s_r_transitive A B S (CTC … R).
+#A #B #S #R #HSR #L2 #T1 #T2 #HT12 #L1 #H @(TC_ind_dx … L1 H) -L1 /3 width=3 by inj/
+qed-.
+
+lemma s_r_to_s_rs_trans: ∀A,B,S,R. s_r_transitive A B (CTC … S) R →
+ s_rs_transitive A B S R.
+#A #B #S #R #HSR #L2 #T1 #T2 #HL2 #L1 #HT1
+elim (TC_idem … (S L1) … T1 T2)
+#_ #H @H @HSR //
+qed-.
+
+lemma s_rs_to_s_r_trans: ∀A,B,S,R. s_rs_transitive A B S R →
+ s_r_transitive A B (CTC … S) R.
+#A #B #S #R #HSR #L2 #T1 #T2 #HL2 #L1 #HT1
+elim (TC_idem … (S L1) … T1 T2)
+#H #_ @H @HSR //
+qed-.
+
+lemma s_rs_trans_TC1: ∀A,B,S,R. s_rs_transitive A B S R →
+ s_rs_transitive A B (CTC … S) R.
+#A #B #S #R #HSR #L2 #T1 #T2 #HL2 #L1 #HT1
+elim (TC_idem … (S L1) … T1 T2)
+elim (TC_idem … (S L2) … T1 T2)
+#_ #H1 #H2 #_ @H2 @HSR /3 width=3 by/
+qed-.
+
+(* Normal form and strong normalization *************************************)
+
+lemma SN_to_NF: ∀A,R,S. NF_dec A R S →
+ ∀a1. SN A R S a1 →
+ ∃∃a2. star … R a1 a2 & NF A R S a2.
+#A #R #S #HRS #a1 #H elim H -a1
+#a1 #_ #IHa1 elim (HRS a1) -HRS /2 width=3 by srefl, ex2_intro/
+* #a0 #Ha10 #Ha01 elim (IHa1 … Ha10 Ha01) -IHa1 -Ha01 /3 width=3 by star_compl, ex2_intro/
+qed-.
+
+(* Relations on unboxed pairs ***********************************************)
+
+lemma bi_TC_strip: ∀A,B,R. bi_confluent A B R →
+ ∀a0,a1,b0,b1. R a0 b0 a1 b1 → ∀a2,b2. bi_TC … R a0 b0 a2 b2 →
+ ∃∃a,b. bi_TC … R a1 b1 a b & R a2 b2 a b.
+#A #B #R #HR #a0 #a1 #b0 #b1 #H01 #a2 #b2 #H elim H -a2 -b2
+[ #a2 #b2 #H02
+ elim (HR … H01 … H02) -HR -a0 -b0 /3 width=4 by ex2_2_intro, bi_inj/
+| #a2 #b2 #a3 #b3 #_ #H23 * #a #b #H1 #H2
+ elim (HR … H23 … H2) -HR -a0 -b0 -a2 -b2 /3 width=4 by ex2_2_intro, bi_step/
+]
+qed.
+
+lemma bi_TC_confluent: ∀A,B,R. bi_confluent A B R →
+ bi_confluent A B (bi_TC … R).
+#A #B #R #HR #a0 #a1 #b0 #b1 #H elim H -a1 -b1
+[ #a1 #b1 #H01 #a2 #b2 #H02
+ elim (bi_TC_strip … HR … H01 … H02) -a0 -b0 /3 width=4 by ex2_2_intro, bi_inj/
+| #a1 #b1 #a3 #b3 #_ #H13 #IH #a2 #b2 #H02
+ elim (IH … H02) -a0 -b0 #a0 #b0 #H10 #H20
+ elim (bi_TC_strip … HR … H13 … H10) -a1 -b1 /3 width=7 by ex2_2_intro, bi_step/
+]
+qed.
+
+lemma bi_TC_decomp_r: ∀A,B. ∀R:bi_relation A B.
+ ∀a1,a2,b1,b2. bi_TC … R a1 b1 a2 b2 →
+ R a1 b1 a2 b2 ∨
+ ∃∃a,b. bi_TC … R a1 b1 a b & R a b a2 b2.
+#A #B #R #a1 #a2 #b1 #b2 * -a2 -b2 /2 width=1/ /3 width=4 by ex2_2_intro, or_intror/
+qed-.
+
+lemma bi_TC_decomp_l: ∀A,B. ∀R:bi_relation A B.
+ ∀a1,a2,b1,b2. bi_TC … R a1 b1 a2 b2 →
+ R a1 b1 a2 b2 ∨
+ ∃∃a,b. R a1 b1 a b & bi_TC … R a b a2 b2.
+#A #B #R #a1 #a2 #b1 #b2 #H @(bi_TC_ind_dx … a1 b1 H) -a1 -b1
+[ /2 width=1 by or_introl/
+| #a1 #a #b1 #b #Hab1 #Hab2 #_ /3 width=4 by ex2_2_intro, or_intror/ (**) (* auto fails without #_ *)
+]
+qed-.
+
+(* Relations on unboxed triples *********************************************)
+
+definition tri_star: ∀A,B,C,R. tri_relation A B C ≝
+ λA,B,C,R. tri_RC A B C (tri_TC … R).
+
+lemma tri_star_tri_reflexive: ∀A,B,C,R. tri_reflexive A B C (tri_star … R).
+/2 width=1 by/ qed.
+
+lemma tri_TC_to_tri_star: ∀A,B,C,R,a1,b1,c1,a2,b2,c2.
+ tri_TC A B C R a1 b1 c1 a2 b2 c2 →
+ tri_star A B C R a1 b1 c1 a2 b2 c2.
+/2 width=1 by or_introl/ qed.
+
+lemma tri_R_to_tri_star: ∀A,B,C,R,a1,b1,c1,a2,b2,c2.
+ R a1 b1 c1 a2 b2 c2 → tri_star A B C R a1 b1 c1 a2 b2 c2.
+/3 width=1 by tri_TC_to_tri_star, tri_inj/ qed.
+
+lemma tri_star_strap1: ∀A,B,C,R,a1,a,a2,b1,b,b2,c1,c,c2.
+ tri_star A B C R a1 b1 c1 a b c →
+ R a b c a2 b2 c2 → tri_star A B C R a1 b1 c1 a2 b2 c2.
+#A #B #C #R #a1 #a #a2 #b1 #b #b2 #c1 #c #c2 *
+[ /3 width=5 by tri_TC_to_tri_star, tri_step/
+| * #H1 #H2 #H3 destruct /2 width=1 by tri_R_to_tri_star/
+]
+qed.
+
+lemma tri_star_strap2: ∀A,B,C,R,a1,a,a2,b1,b,b2,c1,c,c2. R a1 b1 c1 a b c →
+ tri_star A B C R a b c a2 b2 c2 →
+ tri_star A B C R a1 b1 c1 a2 b2 c2.
+#A #B #C #R #a1 #a #a2 #b1 #b #b2 #c1 #c #c2 #H *
+[ /3 width=5 by tri_TC_to_tri_star, tri_TC_strap/
+| * #H1 #H2 #H3 destruct /2 width=1 by tri_R_to_tri_star/
+]
+qed.
+
+lemma tri_star_to_tri_TC_to_tri_TC: ∀A,B,C,R,a1,a,a2,b1,b,b2,c1,c,c2.
+ tri_star A B C R a1 b1 c1 a b c →
+ tri_TC A B C R a b c a2 b2 c2 →
+ tri_TC A B C R a1 b1 c1 a2 b2 c2.
+#A #B #C #R #a1 #a #a2 #b1 #b #b2 #c1 #c #c2 *
+[ /2 width=5 by tri_TC_transitive/
+| * #H1 #H2 #H3 destruct /2 width=1 by/
+]
+qed.
+
+lemma tri_TC_to_tri_star_to_tri_TC: ∀A,B,C,R,a1,a,a2,b1,b,b2,c1,c,c2.
+ tri_TC A B C R a1 b1 c1 a b c →
+ tri_star A B C R a b c a2 b2 c2 →
+ tri_TC A B C R a1 b1 c1 a2 b2 c2.
+#A #B #C #R #a1 #a #a2 #b1 #b #b2 #c1 #c #c2 #H *
+[ /2 width=5 by tri_TC_transitive/
+| * #H1 #H2 #H3 destruct /2 width=1 by/
+]
+qed.
+
+lemma tri_tansitive_tri_star: ∀A,B,C,R. tri_transitive A B C (tri_star … R).
+#A #B #C #R #a1 #a #b1 #b #c1 #c #H #a2 #b2 #c2 *
+[ /3 width=5 by tri_star_to_tri_TC_to_tri_TC, tri_TC_to_tri_star/
+| * #H1 #H2 #H3 destruct /2 width=1 by/
+]
+qed.
+
+lemma tri_star_ind: ∀A,B,C,R,a1,b1,c1. ∀P:relation3 A B C. P a1 b1 c1 →
+ (∀a,a2,b,b2,c,c2. tri_star … R a1 b1 c1 a b c → R a b c a2 b2 c2 → P a b c → P a2 b2 c2) →
+ ∀a2,b2,c2. tri_star … R a1 b1 c1 a2 b2 c2 → P a2 b2 c2.
+#A #B #C #R #a1 #b1 #c1 #P #H #IH #a2 #b2 #c2 *
+[ #H12 elim H12 -a2 -b2 -c2 /3 width=6 by tri_TC_to_tri_star/
+| * #H1 #H2 #H3 destruct //
+]
+qed-.
+
+lemma tri_star_ind_dx: ∀A,B,C,R,a2,b2,c2. ∀P:relation3 A B C. P a2 b2 c2 →
+ (∀a1,a,b1,b,c1,c. R a1 b1 c1 a b c → tri_star … R a b c a2 b2 c2 → P a b c → P a1 b1 c1) →
+ ∀a1,b1,c1. tri_star … R a1 b1 c1 a2 b2 c2 → P a1 b1 c1.
+#A #B #C #R #a2 #b2 #c2 #P #H #IH #a1 #b1 #c1 *
+[ #H12 @(tri_TC_ind_dx … a1 b1 c1 H12) -a1 -b1 -c1 /3 width=6 by tri_TC_to_tri_star/
+| * #H1 #H2 #H3 destruct //
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/functions/oplusright_3.ma".
+include "ground/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.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/relations/ringeq_3.ma".
+include "ground/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-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/functions/downspoon_2.ma".
+include "ground/lib/stream_eq.ma".
+include "ground/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.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/functions/downspoonstar_3.ma".
+include "ground/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.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( l1 @@ break l2 )"
+ right associative with precedence 47
+ for @{ 'Append $l1 $l2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( f @❨ break term 46 a ❩ )"
+ non associative with precedence 60
+ for @{ 'Apply $f $a }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( 𝐁❨ term 46 l, break term 46 h ❩ )"
+ non associative with precedence 90
+ for @{ 'Basic $l $h }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation < "hvbox( Ⓔ )"
+ non associative with precedence 55
+ for @{ 'CircledE $S }.
+
+notation > "hvbox( Ⓔ )"
+ non associative with precedence 55
+ for @{ 'CircledE ? }.
+
+notation > "hvbox( Ⓔ{ term 46 C } )"
+ non associative with precedence 55
+ for @{ 'CircledE $S }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( f2 ~∘ break f1 )"
+ right associative with precedence 60
+ for @{ 'CoCompose $f2 $f1 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "◊"
+ non associative with precedence 55
+ for @{ 'Diamond }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( ↓ term 70 T )"
+ non associative with precedence 70
+ for @{ 'DownArrow $T }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation < "hvbox( ⫰ term 46 a )"
+ non associative with precedence 46
+ for @{ 'DownSpoon $S $a }.
+
+notation > "hvbox( ⫰ term 46 a )"
+ non associative with precedence 46
+ for @{ 'DownSpoon ? $a }.
+
+notation > "hvbox( ⫰{ term 46 S } break term 46 a )"
+ non associative with precedence 46
+ for @{ 'DownSpoon $S $a }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation < "hvbox( ⫰*[ break term 46 n ] break term 46 a )"
+ non associative with precedence 46
+ for @{ 'DownSpoonStar $S $n $a }.
+
+notation > "hvbox( ⫰*[ break term 46 n ] break term 46 a )"
+ non associative with precedence 46
+ for @{ 'DownSpoonStar ? $n $a }.
+
+notation > "hvbox( ⫰*{ term 46 S }[ break term 46 n ] break term 46 a )"
+ non associative with precedence 46
+ for @{ 'DownSpoonStar $S $n $a }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( ⫱ term 46 T )"
+ non associative with precedence 46
+ for @{ 'DropPred $T }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( ⫱ *[ term 46 n ] break term 46 T )"
+ non associative with precedence 46
+ for @{ 'DropPreds $n $T }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( 𝐈𝐝 )"
+ non associative with precedence 90
+ for @{ 'Identity }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "∞"
+ non associative with precedence 55
+ for @{ 'Infinity }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "Ⓕ"
+ non associative with precedence 55
+ for @{'no}.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "𝟙𝟘"
+ non associative with precedence 55
+ for @{ 'OneZero }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation < "hvbox( hd ⨮ break tl )"
+ right associative with precedence 47
+ for @{ 'OPlusRight $S $hd $tl }.
+
+notation > "hvbox( hd ⨮ break tl )"
+ right associative with precedence 47
+ for @{ 'OPlusRight ? $hd $tl }.
+
+notation > "hvbox( hd ⨮{ break term 46 S } break term 46 tl )"
+ non associative with precedence 47
+ for @{ 'OPlusRight $S $hd $tl }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( ❨ term 46 hd1, break term 46 hd2 ❩; break term 46 tl )"
+ non associative with precedence 47
+ for @{ 'Semicolon $hd1 $hd2 $tl }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox ( 〈 term 46 x1, break term 46 x2 , break term 46 x3, break term 46 x4 〉 )"
+ non associative with precedence 55
+ for @{ 'Tuple $x1 $x2 $x3 $x4 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( 𝐔 ❨ break term 46 a ❩ )"
+ non associative with precedence 90
+ for @{ 'Uniform $a }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( ↑ term 70 T )"
+ non associative with precedence 70
+ for @{ 'UpArrow $T }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( ↑*[ term 46 n ] break term 70 T )"
+ non associative with precedence 70
+ for @{ 'UpArrowStar $n $T }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( ↕* term 46 T )"
+ non associative with precedence 46
+ for @{ 'UpDownArrowStar $T }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( ⫯ term 46 T )"
+ non associative with precedence 46
+ for @{ 'UpSpoon $T }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( ⫯*[ term 46 n ] break term 46 T )"
+ non associative with precedence 46
+ for @{ 'UpSpoonStar $n $T }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "Ⓣ"
+ non associative with precedence 55
+ for @{'yes}.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "𝟘𝟙"
+ non associative with precedence 55
+ for @{ 'ZeroOne }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "𝟘𝟘"
+ non associative with precedence 55
+ for @{ 'ZeroZero }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation < "hvbox( f1 ≐ break term 46 f2 )"
+ non associative with precedence 45
+ for @{ 'DotEq $A $B $f1 $f2 }.
+
+notation > "hvbox( f1 ≐ break term 46 f2 )"
+ non associative with precedence 45
+ for @{ 'DotEq ? ? $f1 $f2 }.
+
+notation > "hvbox( f1 ≐{ break term 46 A, break term 46 B } break term 46 f2 )"
+ non associative with precedence 45
+ for @{ 'DotEq $A $B $f1 $f2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( f1 ≡ break term 46 f2 )"
+ non associative with precedence 45
+ for @{ 'IdEq $f1 $f2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( 𝛀❪ term 46 f ❫ )"
+ non associative with precedence 45
+ for @{ 'IsDivergent $f }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( 𝐅❪ term 46 f ❫ )"
+ non associative with precedence 45
+ for @{ 'IsFinite $f }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( 𝐈❪ term 46 f ❫ )"
+ non associative with precedence 45
+ for @{ 'IsIdentity $f }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( 𝐑𝐓❪ term 46 n, break term 46 c ❫ )"
+ non associative with precedence 45
+ for @{ 'IsRedType $n $c }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( 𝐓❪ term 46 f ❫ )"
+ non associative with precedence 45
+ for @{ 'IsTotal $f }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( 𝐓❪ term 46 n, break term 46 c ❫ )"
+ non associative with precedence 45
+ for @{ 'IsType $n $c }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( 𝐔❪ term 46 f ❫ )"
+ non associative with precedence 45
+ for @{ 'IsUniform $f }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( f1 ∥ break term 46 f2 )"
+ non associative with precedence 45
+ for @{ 'Parallel $f1 $f2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( f1 ⊚ break term 46 f2 ≘ break term 46 f )"
+ non associative with precedence 45
+ for @{ 'RAfter $f1 $f2 $f }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( @❪ term 46 T1 , break term 46 f ❫ ≘ break term 46 T2 )"
+ non associative with precedence 45
+ for @{ 'RAt $T1 $f $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( f1 ~⊚ break term 46 f2 ≘ break term 46 f )"
+ non associative with precedence 45
+ for @{ 'RCoAfter $f1 $f2 $f }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( 𝐂❪ term 46 f ❫ ≘ break term 46 n )"
+ non associative with precedence 45
+ for @{ 'RCoLength $f $n }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation < "hvbox( v1 ≗ break term 46 v2 )"
+ non associative with precedence 45
+ for @{ 'RingEq $M $v1 $v2 }.
+
+notation > "hvbox( v1 ≗ break term 46 v2 )"
+ non associative with precedence 45
+ for @{ 'RingEq ? $v1 $v2 }.
+
+notation > "hvbox( v1 ≗{ break term 46 M } break term 46 v2 )"
+ non associative with precedence 45
+ for @{ 'RingEq $M $v1 $v2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( L1 ⋒ break term 46 L2 ≘ break term 46 L )"
+ non associative with precedence 45
+ for @{ 'RIntersection $L1 $L2 $L }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( T1 ▭ break term 46 T2 ≘ break term 46 T )"
+ non associative with precedence 45
+ for @{ 'RMinus $T1 $T2 $T }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( L1 ⋓ break term 46 L2 ≘ break term 46 L )"
+ non associative with precedence 45
+ for @{ 'RUnion $L1 $L2 $L }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation > "hvbox(∧∧ term 34 P0 break & term 34 P1)"
+ non associative with precedence 35
+ for @{ 'and $P0 $P1 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple conjunction connective (3) *)
+
+notation "hvbox(∧∧ term 34 P0 break & term 34 P1 break & term 34 P2)"
+ non associative with precedence 35
+ for @{ 'And $P0 $P1 $P2 }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple conjunction connective (4) *)
+
+notation "hvbox(∧∧ term 34 P0 break & term 34 P1 break & term 34 P2 break & term 34 P3)"
+ non associative with precedence 35
+ for @{ 'And $P0 $P1 $P2 $P3 }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (1, 2) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0)"
+ non associative with precedence 20
+ for @{ 'Ex2 (λ${ident x0}.λ${ident x1}.$P0) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0)"
+ non associative with precedence 20
+ for @{ 'Ex2 (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (1, 3) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0)"
+ non associative with precedence 20
+ for @{ 'Ex3 (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0)"
+ non associative with precedence 20
+ for @{ 'Ex3 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* 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) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (2, 2) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1)"
+ non associative with precedence 20
+ for @{ 'Ex2 (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1)"
+ non associative with precedence 20
+ for @{ 'Ex2 (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (2, 3) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1)"
+ non associative with precedence 20
+ for @{ 'Ex3 (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1)"
+ non associative with precedence 20
+ for @{ 'Ex3 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (3, 1) *)
+
+notation > "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.$P0) (λ${ident x0}.$P1) (λ${ident x0}.$P2) }.
+
+notation < "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.$P0) (λ${ident x0}:$T0.$P1) (λ${ident x0}:$T0.$P2) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (3, 2) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
+ non associative with precedence 20
+ for @{ 'Ex2 (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) (λ${ident x0}.λ${ident x1}.$P2) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
+ non associative with precedence 20
+ for @{ 'Ex2 (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P2) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (3, 3) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
+ non associative with precedence 20
+ for @{ 'Ex3 (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
+ non associative with precedence 20
+ for @{ 'Ex3 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (3, 4) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
+ non associative with precedence 20
+ for @{ 'Ex4 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
+ non associative with precedence 20
+ for @{ 'Ex4 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (3, 5) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
+ non associative with precedence 20
+ for @{ 'Ex5 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
+ non associative with precedence 20
+ for @{ 'Ex5 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (4, 1) *)
+
+notation > "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.$P0) (λ${ident x0}.$P1) (λ${ident x0}.$P2) (λ${ident x0}.$P3) }.
+
+notation < "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.$P0) (λ${ident x0}:$T0.$P1) (λ${ident x0}:$T0.$P2) (λ${ident x0}:$T0.$P3) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (4, 2) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
+ non associative with precedence 20
+ for @{ 'Ex2 (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) (λ${ident x0}.λ${ident x1}.$P2) (λ${ident x0}.λ${ident x1}.$P3) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
+ non associative with precedence 20
+ for @{ 'Ex2 (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P3) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (4, 3) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
+ non associative with precedence 20
+ for @{ 'Ex3 (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
+ non associative with precedence 20
+ for @{ 'Ex3 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (4, 4) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
+ non associative with precedence 20
+ for @{ 'Ex4 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
+ non associative with precedence 20
+ for @{ 'Ex4 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (4, 5) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
+ non associative with precedence 20
+ for @{ 'Ex5 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
+ non associative with precedence 20
+ for @{ 'Ex5 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (5, 1) *)
+
+notation > "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}.$P0) (λ${ident x0}.$P1) (λ${ident x0}.$P2) (λ${ident x0}.$P3) (λ${ident x0}.$P4) }.
+
+notation < "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex (λ${ident x0}:$T0.$P0) (λ${ident x0}:$T0.$P1) (λ${ident x0}:$T0.$P2) (λ${ident x0}:$T0.$P3) (λ${ident x0}:$T0.$P4) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (5, 2) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex2 (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) (λ${ident x0}.λ${ident x1}.$P2) (λ${ident x0}.λ${ident x1}.$P3) (λ${ident x0}.λ${ident x1}.$P4) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex2 (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P4) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (5, 3) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex3 (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P4) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex3 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P4) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (5, 4) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex4 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P4) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex4 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P4) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (5, 5) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex5 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P4) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex5 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P4) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (5, 6) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex6 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P4) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex6 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P4) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (5, 7) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex7 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P4) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
+ non associative with precedence 20
+ for @{ 'Ex7 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P4) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (6, 3) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex3 (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P5) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex3 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P5) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (6, 4) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex4 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P5) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex4 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P5) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (6, 5) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex5 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P5) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex5 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P5) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (6, 6) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex6 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P5) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex6 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P5) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (6, 7) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex7 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P5) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex7 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P5) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (6, 8) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 , ident x7 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex8 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.$P5) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 , ident x7 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex8 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.$P5) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (6, 9) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 , ident x7 , ident x8 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex9 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.$P5) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 , ident x7 , ident x8 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
+ non associative with precedence 20
+ for @{ 'Ex9 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.$P5) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (7, 10) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 , ident x7 , ident x8 , ident x9 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
+ non associative with precedence 20
+ for @{ 'Ex10 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.λ${ident x9}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.λ${ident x9}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.λ${ident x9}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.λ${ident x9}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.λ${ident x9}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.λ${ident x9}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.λ${ident x9}.$P6) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 , ident x7 , ident x8 , ident x9 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
+ non associative with precedence 20
+ for @{ 'Ex10 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.λ${ident x9}:$T9.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.λ${ident x9}:$T9.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.λ${ident x9}:$T9.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.λ${ident x9}:$T9.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.λ${ident x9}:$T9.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.λ${ident x9}:$T9.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.λ${ident x9}:$T9.$P6) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (7, 3) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
+ non associative with precedence 20
+ for @{ 'Ex3 (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P6) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
+ non associative with precedence 20
+ for @{ 'Ex3 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P6) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (7, 4) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
+ non associative with precedence 20
+ for @{ 'Ex4 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P6) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
+ non associative with precedence 20
+ for @{ 'Ex4 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P6) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (7, 5) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
+ non associative with precedence 20
+ for @{ 'Ex5 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P6) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
+ non associative with precedence 20
+ for @{ 'Ex5 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P6) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (7, 6) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
+ non associative with precedence 20
+ for @{ 'Ex6 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P6) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
+ non associative with precedence 20
+ for @{ 'Ex6 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P6) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (7, 7) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
+ non associative with precedence 20
+ for @{ 'Ex7 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P6) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
+ non associative with precedence 20
+ for @{ 'Ex7 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P6) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (8, 4) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6 break & term 19 P7)"
+ non associative with precedence 20
+ for @{ 'Ex4 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P6) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P7) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6 break & term 19 P7)"
+ non associative with precedence 20
+ for @{ 'Ex4 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P6) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P7) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (8, 5) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6 break & term 19 P7)"
+ non associative with precedence 20
+ for @{ 'Ex5 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P6) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P7) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6 break & term 19 P7)"
+ non associative with precedence 20
+ for @{ 'Ex5 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P6) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P7) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple existental quantifier (9, 3) *)
+
+notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6 break & term 19 P7 break & term 19 P8)"
+ non associative with precedence 20
+ for @{ 'Ex3 (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P6) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P7) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P8) }.
+
+notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6 break & term 19 P7 break & term 19 P8)"
+ non associative with precedence 20
+ for @{ 'Ex3 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P6) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P7) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P8) }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "⊥"
+ non associative with precedence 19
+ for @{'false}.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation > "hvbox(∨∨ term 29 P0 break | term 29 P1)"
+ non associative with precedence 30
+ for @{ 'or $P0 $P1 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple disjunction connective (3) *)
+
+notation "hvbox(∨∨ term 29 P0 break | term 29 P1 break | term 29 P2)"
+ non associative with precedence 30
+ for @{ 'Or $P0 $P1 $P2 }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple disjunction connective (4) *)
+
+notation "hvbox(∨∨ term 29 P0 break | term 29 P1 break | term 29 P2 break | term 29 P3)"
+ non associative with precedence 30
+ for @{ 'Or $P0 $P1 $P2 $P3 }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+(* multiple disjunction connective (5) *)
+
+notation "hvbox(∨∨ term 29 P0 break | term 29 P1 break | term 29 P2 break | term 29 P3 break | term 29 P4)"
+ non associative with precedence 30
+ for @{ 'Or $P0 $P1 $P2 $P3 $P4 }.
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "⊤"
+ non associative with precedence 19
+ for @{'true}.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basics/pts.ma".
+
+(* GENERATED LIBRARY ********************************************************)
+
+lemma pull_2 (A1:Type[0])
+ (A2:Type[0])
+ (A:A1→A2→Type[0]):
+ (∀x2,x1. A x1 x2) →
+ (∀x1,x2. A x1 x2).
+/2 width=1 by/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basics/pts.ma".
+
+(* GENERATED LIBRARY ********************************************************)
+
+lemma pull_4 (A1:Type[0])
+ (A2:A1→Type[0])
+ (A3:∀x1.A2 x1→Type[0])
+ (A4:Type[0])
+ (A:∀x1:A1.∀x2:A2 x1.A3 x1 x2 → A4 → Type[0]):
+ (∀x4,x1,x2,x3. A x1 x2 x3 x4) →
+ (∀x1,x2,x3,x4. A x1 x2 x3 x4).
+/2 width=1 by/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/functions/diamond_0.ma".
+include "ground/notation/functions/semicolon_3.ma".
+include "ground/lib/arith.ma".
+
+(* MULTIPLE RELOCATION WITH PAIRS *******************************************)
+
+inductive mr2: Type[0] :=
+ | nil2 : mr2
+ | cons2: nat → nat → mr2 → mr2.
+
+interpretation "nil (multiple relocation with pairs)"
+ 'Diamond = (nil2).
+
+interpretation "cons (multiple relocation with pairs)"
+ 'Semicolon hd1 hd2 tl = (cons2 hd1 hd2 tl).
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/functions/append_2.ma".
+include "ground/relocation/mr2.ma".
+
+(* MULTIPLE RELOCATION WITH PAIRS *******************************************)
+
+let rec mr2_append cs1 cs2 on cs1 ≝
+ match cs1 with
+ [ nil2 ⇒ cs2
+ | cons2 l m cs1 ⇒ ❨l, m❩; mr2_append cs1 cs2
+ ].
+
+interpretation "append (multiple relocation with pairs)"
+ 'Append cs1 cs2 = (mr2_append cs1 cs2).
+
+(* Basic properties *********************************************************)
+
+lemma mr2_append_nil (cs2): cs2 = ◊ @@ cs2.
+// qed.
+
+lemma mr2_append_cons (l) (m) (cs1) (cs2):
+ ❨l, m❩; (cs1 @@ cs2) = (❨l, m❩; cs1) @@ cs2.
+// qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/relations/rat_3.ma".
+include "ground/relocation/mr2.ma".
+
+(* MULTIPLE RELOCATION WITH PAIRS *******************************************)
+
+inductive at: mr2 → relation nat ≝
+| at_nil: ∀i. at (◊) i i
+| at_lt : ∀cs,l,m,i1,i2. i1 < l →
+ at cs i1 i2 → at (❨l, m❩;cs) i1 i2
+| at_ge : ∀cs,l,m,i1,i2. l ≤ i1 →
+ at cs (i1 + m) i2 → at (❨l, m❩;cs) i1 i2
+.
+
+interpretation "application (multiple relocation with pairs)"
+ 'RAt i1 cs i2 = (at cs i1 i2).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact at_inv_nil_aux: ∀cs,i1,i2. @❪i1, cs❫ ≘ i2 → cs = ◊ → i1 = i2.
+#cs #i1 #i2 * -cs -i1 -i2
+[ //
+| #cs #l #m #i1 #i2 #_ #_ #H destruct
+| #cs #l #m #i1 #i2 #_ #_ #H destruct
+]
+qed-.
+
+lemma at_inv_nil: ∀i1,i2. @❪i1, ◊❫ ≘ i2 → i1 = i2.
+/2 width=3 by at_inv_nil_aux/ qed-.
+
+fact at_inv_cons_aux: ∀cs,i1,i2. @❪i1, cs❫ ≘ i2 →
+ ∀l,m,cs0. cs = ❨l, m❩;cs0 →
+ i1 < l ∧ @❪i1, cs0❫ ≘ i2 ∨
+ l ≤ i1 ∧ @❪i1 + m, cs0❫ ≘ i2.
+#cs #i1 #i2 * -cs -i1 -i2
+[ #i #l #m #cs #H destruct
+| #cs1 #l1 #m1 #i1 #i2 #Hil1 #Hi12 #l2 #m2 #cs2 #H destruct /3 width=1 by or_introl, conj/
+| #cs1 #l1 #m1 #i1 #i2 #Hli1 #Hi12 #l2 #m2 #cs2 #H destruct /3 width=1 by or_intror, conj/
+]
+qed-.
+
+lemma at_inv_cons: ∀cs,l,m,i1,i2. @❪i1, ❨l, m❩;cs❫ ≘ i2 →
+ i1 < l ∧ @❪i1, cs❫ ≘ i2 ∨
+ l ≤ i1 ∧ @❪i1 + m, cs❫ ≘ i2.
+/2 width=3 by at_inv_cons_aux/ qed-.
+
+lemma at_inv_cons_lt: ∀cs,l,m,i1,i2. @❪i1, ❨l, m❩;cs❫ ≘ i2 →
+ i1 < l → @❪i1, cs❫ ≘ i2.
+#cs #l #m #i1 #m2 #H
+elim (at_inv_cons … H) -H * // #Hli1 #_ #Hi1l
+elim (lt_le_false … Hi1l Hli1)
+qed-.
+
+lemma at_inv_cons_ge: ∀cs,l,m,i1,i2. @❪i1, ❨l, m❩;cs❫ ≘ i2 →
+ l ≤ i1 → @❪i1 + m, cs❫ ≘ i2.
+#cs #l #m #i1 #m2 #H
+elim (at_inv_cons … H) -H * // #Hi1l #_ #Hli1
+elim (lt_le_false … Hi1l Hli1)
+qed-.
+
+(* Main properties **********************************************************)
+
+theorem at_mono: ∀cs,i,i1. @❪i, cs❫ ≘ i1 → ∀i2. @❪i, cs❫ ≘ i2 → i1 = i2.
+#cs #i #i1 #H elim H -cs -i -i1
+[ #i #x #H <(at_inv_nil … H) -x //
+| #cs #l #m #i #i1 #Hil #_ #IHi1 #x #H
+ lapply (at_inv_cons_lt … H Hil) -H -Hil /2 width=1 by/
+| #cs #l #m #i #i1 #Hli #_ #IHi1 #x #H
+ lapply (at_inv_cons_ge … H Hli) -H -Hli /2 width=1 by/
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/relations/rminus_3.ma".
+include "ground/relocation/mr2.ma".
+
+(* MULTIPLE RELOCATION WITH PAIRS *******************************************)
+
+inductive minuss: nat → relation mr2 ≝
+| minuss_nil: ∀i. minuss i (◊) (◊)
+| minuss_lt : ∀cs1,cs2,l,m,i. i < l → minuss i cs1 cs2 →
+ minuss i (❨l, m❩;cs1) (❨l - i, m❩;cs2)
+| minuss_ge : ∀cs1,cs2,l,m,i. l ≤ i → minuss (m + i) cs1 cs2 →
+ minuss i (❨l, m❩;cs1) cs2
+.
+
+interpretation "minus (multiple relocation with pairs)"
+ 'RMinus cs1 i cs2 = (minuss i cs1 cs2).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact minuss_inv_nil1_aux: ∀cs1,cs2,i. cs1 ▭ i ≘ cs2 → cs1 = ◊ → cs2 = ◊.
+#cs1 #cs2 #i * -cs1 -cs2 -i
+[ //
+| #cs1 #cs2 #l #m #i #_ #_ #H destruct
+| #cs1 #cs2 #l #m #i #_ #_ #H destruct
+]
+qed-.
+
+lemma minuss_inv_nil1: ∀cs2,i. ◊ ▭ i ≘ cs2 → cs2 = ◊.
+/2 width=4 by minuss_inv_nil1_aux/ qed-.
+
+fact minuss_inv_cons1_aux: ∀cs1,cs2,i. cs1 ▭ i ≘ cs2 →
+ ∀l,m,cs. cs1 = ❨l, m❩;cs →
+ l ≤ i ∧ cs ▭ m + i ≘ cs2 ∨
+ ∃∃cs0. i < l & cs ▭ i ≘ cs0 &
+ cs2 = ❨l - i, m❩;cs0.
+#cs1 #cs2 #i * -cs1 -cs2 -i
+[ #i #l #m #cs #H destruct
+| #cs1 #cs #l1 #m1 #i1 #Hil1 #Hcs #l2 #m2 #cs2 #H destruct /3 width=3 by ex3_intro, or_intror/
+| #cs1 #cs #l1 #m1 #i1 #Hli1 #Hcs #l2 #m2 #cs2 #H destruct /3 width=1 by or_introl, conj/
+]
+qed-.
+
+lemma minuss_inv_cons1: ∀cs1,cs2,l,m,i. ❨l, m❩;cs1 ▭ i ≘ cs2 →
+ l ≤ i ∧ cs1 ▭ m + i ≘ cs2 ∨
+ ∃∃cs. i < l & cs1 ▭ i ≘ cs &
+ cs2 = ❨l - i, m❩;cs.
+/2 width=3 by minuss_inv_cons1_aux/ qed-.
+
+lemma minuss_inv_cons1_ge: ∀cs1,cs2,l,m,i. ❨l, m❩;cs1 ▭ i ≘ cs2 →
+ l ≤ i → cs1 ▭ m + i ≘ cs2.
+#cs1 #cs2 #l #m #i #H
+elim (minuss_inv_cons1 … H) -H * // #cs #Hil #_ #_ #Hli
+elim (lt_le_false … Hil Hli)
+qed-.
+
+lemma minuss_inv_cons1_lt: ∀cs1,cs2,l,m,i. ❨l, m❩;cs1 ▭ i ≘ cs2 →
+ i < l →
+ ∃∃cs. cs1 ▭ i ≘ cs & cs2 = ❨l - i, m❩;cs.
+#cs1 #cs2 #l #m #i #H elim (minuss_inv_cons1 … H) -H * /2 width=3 by ex2_intro/
+#Hli #_ #Hil elim (lt_le_false … Hil Hli)
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/relocation/mr2.ma".
+
+(* MULTIPLE RELOCATION WITH PAIRS *******************************************)
+
+rec definition pluss (cs:mr2) (i:nat) on cs ≝ match cs with
+[ nil2 ⇒ ◊
+| cons2 l m cs ⇒ ❨l + i,m❩;pluss cs i
+].
+
+interpretation "plus (multiple relocation with pairs)"
+ 'plus x y = (pluss x y).
+
+(* Basic properties *********************************************************)
+
+lemma pluss_SO2: ∀l,m,cs. (❨l,m❩;cs) + 1 = ❨↑l,m❩;cs + 1.
+normalize // qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma pluss_inv_nil2: ∀i,cs. cs + i = ◊ → cs = ◊.
+#i * // normalize
+#l #m #cs #H destruct
+qed.
+
+lemma pluss_inv_cons2: ∀i,l,m,cs2,cs. cs + i = ❨l,m❩;cs2 →
+ ∃∃cs1. cs1 + i = cs2 & cs = ❨l - i,m❩;cs1.
+#i #l #m #cs2 *
+[ normalize #H destruct
+| #l1 #m1 #cs1 whd in ⊢ (??%?→?); #H destruct
+ <minus_plus_m_m /2 width=3 by ex2_intro/
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/functions/upspoon_1.ma".
+include "ground/lib/stream_tls.ma".
+
+(* RELOCATION N-STREAM ******************************************************)
+
+definition rtmap: Type[0] ≝ stream nat.
+
+definition push: rtmap → rtmap ≝ λf. 0⨮f.
+
+interpretation "push (nstream)" 'UpSpoon f = (push f).
+
+definition next: rtmap → rtmap.
+* #n #f @(↑n⨮f)
+defined.
+
+interpretation "next (nstream)" 'UpArrow f = (next f).
+
+(* Basic properties *********************************************************)
+
+lemma push_rew: ∀f. 0⨮f = ⫯f.
+// qed.
+
+lemma next_rew: ∀f,n. (↑n)⨮f = ↑(n⨮f).
+// qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma injective_push: injective ? ? push.
+#f1 #f2 normalize #H destruct //
+qed-.
+
+lemma discr_push_next: ∀f1,f2. ⫯f1 = ↑f2 → ⊥.
+#f1 * #n2 #f2 normalize #H destruct
+qed-.
+
+lemma discr_next_push: ∀f1,f2. ↑f1 = ⫯f2 → ⊥.
+* #n1 #f1 #f2 normalize #H destruct
+qed-.
+
+lemma injective_next: injective ? ? next.
+* #n1 #f1 * #n2 #f2 normalize #H destruct //
+qed-.
+
+lemma push_inv_seq_sn: ∀f,g,n. n⨮g = ⫯f → 0 = n ∧ g = f.
+#f #g #n <push_rew #H destruct /2 width=1 by conj/
+qed-.
+
+lemma push_inv_seq_dx: ∀f,g,n. ⫯f = n⨮g → 0 = n ∧ g = f.
+#f #g #n <push_rew #H destruct /2 width=1 by conj/
+qed-.
+
+lemma next_inv_seq_sn: ∀f,g,n. n⨮g = ↑f → ∃∃m. m⨮g = f & ↑m = n.
+* #m #f #g #n <next_rew #H destruct /2 width=3 by ex2_intro/
+qed-.
+
+lemma next_inv_seq_dx: ∀f,g,n. ↑f = n⨮g → ∃∃m. m⨮g = f & ↑m = n.
+* #m #f #g #n <next_rew #H destruct /2 width=3 by ex2_intro/
+qed-.
+
+lemma case_prop: ∀R:predicate rtmap.
+ (∀f. R (⫯f)) → (∀f. R (↑f)) → ∀f. R f.
+#R #H1 #H2 * * //
+qed-.
+
+lemma case_type0: ∀R:rtmap→Type[0].
+ (∀f. R (⫯f)) → (∀f. R (↑f)) → ∀f. R f.
+#R #H1 #H2 * * //
+qed-.
+
+lemma iota_push: ∀R,a,b,f. a f = case_type0 R a b (⫯f).
+// qed.
+
+lemma iota_next: ∀R,a,b,f. b f = case_type0 R a b (↑f).
+#R #a #b * //
+qed.
+
+(* Specific properties ******************************************************)
+
+lemma tl_push: ∀f. f = ⫰⫯f.
+// qed.
+
+lemma tl_next: ∀f. ⫰f = ⫰↑f.
+* // qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/relocation/nstream_istot.ma".
+include "ground/relocation/rtmap_after.ma".
+
+(* RELOCATION N-STREAM ******************************************************)
+
+corec definition compose: rtmap → rtmap → rtmap.
+#f2 * #n1 #f1 @(seq … (f2@❨n1❩)) @(compose ? f1) -compose -f1
+@(⫰*[↑n1] f2)
+defined.
+
+interpretation "functional composition (nstream)"
+ 'compose f2 f1 = (compose f2 f1).
+
+(* Basic properies on compose ***********************************************)
+
+lemma compose_rew: ∀f2,f1,n1. f2@❨n1❩⨮(⫰*[↑n1]f2)∘f1 = f2∘(n1⨮f1).
+#f2 #f1 #n1 <(stream_rew … (f2∘(n1⨮f1))) normalize //
+qed.
+
+lemma compose_next: ∀f2,f1,f. f2∘f1 = f → (↑f2)∘f1 = ↑f.
+#f2 * #n1 #f1 #f <compose_rew <compose_rew
+* -f <tls_S1 /2 width=1 by eq_f2/
+qed.
+
+(* Basic inversion lemmas on compose ****************************************)
+
+lemma compose_inv_rew: ∀f2,f1,f,n1,n. f2∘(n1⨮f1) = n⨮f →
+ f2@❨n1❩ = n ∧ (⫰*[↑n1]f2)∘f1 = f.
+#f2 #f1 #f #n1 #n <(stream_rew … (f2∘(n1⨮f1))) normalize
+#H destruct /2 width=1 by conj/
+qed-.
+
+lemma compose_inv_O2: ∀f2,f1,f,n2,n. (n2⨮f2)∘(⫯f1) = n⨮f →
+ n2 = n ∧ f2∘f1 = f.
+#f2 #f1 #f #n2 #n <compose_rew
+#H destruct /2 width=1 by conj/
+qed-.
+
+lemma compose_inv_S2: ∀f2,f1,f,n2,n1,n. (n2⨮f2)∘(↑n1⨮f1) = n⨮f →
+ ↑(n2+f2@❨n1❩) = n ∧ f2∘(n1⨮f1) = f2@❨n1❩⨮f.
+#f2 #f1 #f #n2 #n1 #n <compose_rew
+#H destruct <tls_S1 /2 width=1 by conj/
+qed-.
+
+lemma compose_inv_S1: ∀f2,f1,f,n1,n. (↑f2)∘(n1⨮f1) = n⨮f →
+ ↑(f2@❨n1❩) = n ∧ f2∘(n1⨮f1) = f2@❨n1❩⨮f.
+#f2 #f1 #f #n1 #n <compose_rew
+#H destruct <tls_S1 /2 width=1 by conj/
+qed-.
+
+(* Specific properties on after *********************************************)
+
+lemma after_O2: ∀f2,f1,f. f2 ⊚ f1 ≘ f →
+ ∀n. n⨮f2 ⊚ ⫯f1 ≘ n⨮f.
+#f2 #f1 #f #Hf #n elim n -n /2 width=7 by after_refl, after_next/
+qed.
+
+lemma after_S2: ∀f2,f1,f,n1,n. f2 ⊚ n1⨮f1 ≘ n⨮f →
+ ∀n2. n2⨮f2 ⊚ ↑n1⨮f1 ≘ ↑(n2+n)⨮f.
+#f2 #f1 #f #n1 #n #Hf #n2 elim n2 -n2 /2 width=7 by after_next, after_push/
+qed.
+
+lemma after_apply: ∀n1,f2,f1,f. (⫰*[↑n1] f2) ⊚ f1 ≘ f → f2 ⊚ n1⨮f1 ≘ f2@❨n1❩⨮f.
+#n1 elim n1 -n1
+[ * /2 width=1 by after_O2/
+| #n1 #IH * /3 width=1 by after_S2/
+]
+qed-.
+
+corec lemma after_total_aux: ∀f2,f1,f. f2 ∘ f1 = f → f2 ⊚ f1 ≘ f.
+* #n2 #f2 * #n1 #f1 * #n #f cases n2 -n2
+[ cases n1 -n1
+ [ #H cases (compose_inv_O2 … H) -H /3 width=7 by after_refl, eq_f2/
+ | #n1 #H cases (compose_inv_S2 … H) -H * -n /3 width=7 by after_push/
+ ]
+| #n2 >next_rew #H cases (compose_inv_S1 … H) -H * -n /3 width=5 by after_next/
+]
+qed-.
+
+theorem after_total: ∀f1,f2. f2 ⊚ f1 ≘ f2 ∘ f1.
+/2 width=1 by after_total_aux/ qed.
+
+(* Specific inversion lemmas on after ***************************************)
+
+lemma after_inv_xpx: ∀f2,g2,f,n2,n. n2⨮f2 ⊚ g2 ≘ n⨮f → ∀f1. ⫯f1 = g2 →
+ f2 ⊚ f1 ≘ f ∧ n2 = n.
+#f2 #g2 #f #n2 elim n2 -n2
+[ #n #Hf #f1 #H2 elim (after_inv_ppx … Hf … H2) -g2 [2,3: // ]
+ #g #Hf #H elim (push_inv_seq_dx … H) -H destruct /2 width=1 by conj/
+| #n2 #IH #n #Hf #f1 #H2 elim (after_inv_nxx … Hf) -Hf [2,3: // ]
+ #g1 #Hg #H1 elim (next_inv_seq_dx … H1) -H1
+ #x #Hx #H destruct elim (IH … Hg) [2,3: // ] -IH -Hg
+ #H destruct /2 width=1 by conj/
+]
+qed-.
+
+lemma after_inv_xnx: ∀f2,g2,f,n2,n. n2⨮f2 ⊚ g2 ≘ n⨮f → ∀f1. ↑f1 = g2 →
+ ∃∃m. f2 ⊚ f1 ≘ m⨮f & ↑(n2+m) = n.
+#f2 #g2 #f #n2 elim n2 -n2
+[ #n #Hf #f1 #H2 elim (after_inv_pnx … Hf … H2) -g2 [2,3: // ]
+ #g #Hf #H elim (next_inv_seq_dx … H) -H
+ #x #Hx #Hg destruct /2 width=3 by ex2_intro/
+| #n2 #IH #n #Hf #f1 #H2 elim (after_inv_nxx … Hf) -Hf [2,3: // ]
+ #g #Hg #H elim (next_inv_seq_dx … H) -H
+ #x #Hx #H destruct elim (IH … Hg) -IH -Hg [2,3: // ]
+ #m #Hf #Hm destruct /2 width=3 by ex2_intro/
+]
+qed-.
+
+lemma after_inv_const: ∀f2,f1,f,n1,n. n⨮f2 ⊚ n1⨮f1 ≘ n⨮f → f2 ⊚ f1 ≘ f ∧ 0 = n1.
+#f2 #f1 #f #n1 #n elim n -n
+[ #H elim (after_inv_pxp … H) -H [ |*: // ]
+ #g2 #Hf #H elim (push_inv_seq_dx … H) -H /2 width=1 by conj/
+| #n #IH #H lapply (after_inv_nxn … H ????) -H /2 width=5 by/
+]
+qed-.
+
+lemma after_inv_total: ∀f2,f1,f. f2 ⊚ f1 ≘ f → f2 ∘ f1 ≡ f.
+/2 width=4 by after_mono/ qed-.
+
+(* Specific forward lemmas on after *****************************************)
+
+lemma after_fwd_hd: ∀f2,f1,f,n1,n. f2 ⊚ n1⨮f1 ≘ n⨮f → f2@❨n1❩ = n.
+#f2 #f1 #f #n1 #n #H lapply (after_fwd_at ? n1 0 … H) -H [1,2,3: // ]
+/3 width=2 by at_inv_O1, sym_eq/
+qed-.
+
+lemma after_fwd_tls: ∀f,f1,n1,f2,n2,n. n2⨮f2 ⊚ n1⨮f1 ≘ n⨮f →
+ (⫰*[n1]f2) ⊚ f1 ≘ f.
+#f #f1 #n1 elim n1 -n1
+[ #f2 #n2 #n #H elim (after_inv_xpx … H) -H //
+| #n1 #IH * #m1 #f2 #n2 #n #H elim (after_inv_xnx … H) -H [2,3: // ]
+ #m #Hm #H destruct /2 width=3 by/
+]
+qed-.
+
+lemma after_inv_apply: ∀f2,f1,f,n2,n1,n. n2⨮f2 ⊚ n1⨮f1 ≘ n⨮f →
+ (n2⨮f2)@❨n1❩ = n ∧ (⫰*[n1]f2) ⊚ f1 ≘ f.
+/3 width=3 by after_fwd_tls, after_fwd_hd, conj/ qed-.
+
+(* Properties on apply ******************************************************)
+
+lemma compose_apply (f2) (f1) (i): f2@❨f1@❨i❩❩ = (f2∘f1)@❨i❩.
+/4 width=6 by after_fwd_at, at_inv_total, sym_eq/ qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/relocation/rtmap_basic.ma".
+include "ground/relocation/nstream_after.ma".
+
+(* RELOCATION N-STREAM ******************************************************)
+
+(* Specific properties on basic relocation **********************************)
+
+lemma apply_basic_lt: ∀m,n,i. i < m → 𝐁❨m,n❩@❨i❩ = i.
+/3 width=1 by at_inv_total, at_basic_lt/ qed-.
+
+lemma apply_basic_ge: ∀m,n,i. m ≤ i → 𝐁❨m,n❩@❨i❩ = n+i.
+/3 width=1 by at_inv_total, at_basic_ge/ qed-.
+
+(* Specific main properties on basic relocation *****************************)
+
+theorem basic_swap: ∀d1,d2. d2 ≤ d1 →
+ ∀h1,h2. 𝐁❨d2,h2❩∘𝐁❨d1,h1❩ ≡ 𝐁❨h2+d1,h1❩∘𝐁❨d2,h2❩.
+#d1 #d2 #Hd21 #h1 #h2
+@nstream_inv_eq
+@nstream_eq_inv_ext #i
+<compose_apply <compose_apply
+elim (lt_or_ge i d2) #Hd2
+[ lapply (lt_to_le_to_lt … Hd2 Hd21) -Hd21 #Hd1
+ >(apply_basic_lt … Hd1) >(apply_basic_lt … Hd2) >apply_basic_lt
+ /2 width=1 by le_plus_a/
+| elim (lt_or_ge i d1) -Hd21 #Hd1
+ [ >(apply_basic_lt … Hd1) >(apply_basic_ge … Hd2) >apply_basic_lt
+ /2 width=1 by monotonic_lt_plus_r/
+ | >(apply_basic_ge … Hd1) >(apply_basic_ge … Hd2)
+ >apply_basic_ge [2: /2 width=1 by le_plus_a/ ]
+ >apply_basic_ge /2 width=1 by monotonic_le_plus_r/
+ ]
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/functions/cocompose_2.ma".
+include "ground/relocation/rtmap_coafter.ma".
+
+(* RELOCATION N-STREAM ******************************************************)
+
+rec definition fun0 (n1:nat) on n1: rtmap → nat.
+* * [ | #n2 #f2 @0 ]
+#f2 cases n1 -n1 [ @0 ]
+#n1 @(↑(fun0 n1 f2))
+defined.
+
+rec definition fun2 (n1:nat) on n1: rtmap → rtmap.
+* * [ | #n2 #f2 @(n2⨮f2) ]
+#f2 cases n1 -n1 [ @f2 ]
+#n1 @(fun2 n1 f2)
+defined.
+
+rec definition fun1 (n1:nat) (f1:rtmap) on n1: rtmap → rtmap.
+* * [ | #n2 #f2 @(n1⨮f1) ]
+#f2 cases n1 -n1 [ @f1 ]
+#n1 @(fun1 n1 f1 f2)
+defined.
+
+corec definition cocompose: rtmap → rtmap → rtmap.
+#f2 * #n1 #f1 @(seq … (fun0 n1 f2)) @(cocompose (fun2 n1 f2) (fun1 n1 f1 f2))
+defined.
+
+interpretation "functional co-composition (nstream)"
+ 'CoCompose f1 f2 = (cocompose f1 f2).
+
+(* Basic properties on funs *************************************************)
+
+(* Note: we need theese since matita blocks recursive δ when ι is blocked *)
+lemma fun0_xn: ∀f2,n1. 0 = fun0 n1 (↑f2).
+* #n2 #f2 * //
+qed.
+
+lemma fun2_xn: ∀f2,n1. f2 = fun2 n1 (↑f2).
+* #n2 #f2 * //
+qed.
+
+lemma fun1_xxn: ∀f2,f1,n1. fun1 n1 f1 (↑f2) = n1⨮f1.
+* #n2 #f2 #f1 * //
+qed.
+
+(* Basic properies on cocompose *********************************************)
+
+lemma cocompose_rew: ∀f2,f1,n1. (fun0 n1 f2)⨮(fun2 n1 f2)~∘(fun1 n1 f1 f2) = f2 ~∘ (n1⨮f1).
+#f2 #f1 #n1 <(stream_rew … (f2~∘(n1⨮f1))) normalize //
+qed.
+
+(* Basic inversion lemmas on compose ****************************************)
+
+lemma cocompose_inv_ppx: ∀f2,f1,f,x. (⫯f2) ~∘ (⫯f1) = x⨮f →
+ 0 = x ∧ f2 ~∘ f1 = f.
+#f2 #f1 #f #x
+<cocompose_rew #H destruct
+normalize /2 width=1 by conj/
+qed-.
+
+lemma cocompose_inv_pnx: ∀f2,f1,f,n1,x. (⫯f2) ~∘ (↑n1⨮f1) = x⨮f →
+ ∃∃n. ↑n = x & f2 ~∘ (n1⨮f1) = n⨮f.
+#f2 #f1 #f #n1 #x
+<cocompose_rew #H destruct
+@(ex2_intro … (fun0 n1 f2)) // <cocompose_rew
+/3 width=1 by eq_f2/
+qed-.
+
+lemma cocompose_inv_nxx: ∀f2,f1,f,n1,x. (↑f2) ~∘ (n1⨮f1) = x⨮f →
+ 0 = x ∧ f2 ~∘ (n1⨮f1) = f.
+#f2 #f1 #f #n1 #x
+<cocompose_rew #H destruct
+/2 width=1 by conj/
+qed-.
+
+(* Specific properties on coafter *******************************************)
+
+corec lemma coafter_total_aux: ∀f2,f1,f. f2 ~∘ f1 = f → f2 ~⊚ f1 ≘ f.
+* #n2 #f2 * #n1 #f1 * #n #f cases n2 -n2
+[ cases n1 -n1
+ [ #H cases (cocompose_inv_ppx … H) -H /3 width=7 by coafter_refl, eq_f2/
+ | #n1 #H cases (cocompose_inv_pnx … H) -H /3 width=7 by coafter_push/
+ ]
+| #n2 >next_rew #H cases (cocompose_inv_nxx … H) -H /3 width=5 by coafter_next/
+]
+qed-.
+
+theorem coafter_total: ∀f2,f1. f2 ~⊚ f1 ≘ f2 ~∘ f1.
+/2 width=1 by coafter_total_aux/ qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.tcs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/relocation/rtmap_eq.ma".
+
+(* RELOCATION N-STREAM ******************************************************)
+
+(* Specific properties ******************************************************)
+
+fact eq_inv_seq_aux: ∀f1,f2,n1,n2. n1⨮f1 ≡ n2⨮f2 → n1 = n2 ∧ f1 ≡ f2.
+#f1 #f2 #n1 #n2 @(nat_elim2 … n1 n2) -n1 -n2
+[ #n2 #H elim (eq_inv_px … H) -H [2,3: // ]
+ #g1 #H1 #H elim (push_inv_seq_dx … H) -H /2 width=1 by conj/
+| #n1 #H elim (eq_inv_np … H) -H //
+| #n1 #n2 #IH #H lapply (eq_inv_nn … H ????) -H [1,2,3,4: // ]
+ #H elim (IH H) -IH -H /2 width=1 by conj/
+]
+qed-.
+
+lemma eq_inv_seq: ∀g1,g2. g1 ≡ g2 → ∀f1,f2,n1,n2. n1⨮f1 = g1 → n2⨮f2 = g2 →
+ n1 = n2 ∧ f1 ≡ f2.
+/2 width=1 by eq_inv_seq_aux/ qed-.
+
+corec lemma nstream_eq: ∀f1,f2. f1 ≡ f2 → f1 ≗ f2.
+* #n1 #f1 * #n2 #f2 #Hf cases (eq_inv_gen … Hf) -Hf *
+#g1 #g2 #Hg #H1 #H2
+[ cases (push_inv_seq_dx … H1) -H1 * -n1 #H1
+ cases (push_inv_seq_dx … H2) -H2 * -n2 #H2
+ @eq_seq /2 width=1 by/
+| cases (next_inv_seq_dx … H1) -H1 #m1 #H1 * -n1
+ cases (next_inv_seq_dx … H2) -H2 #m2 #H2 * -n2
+ cases (eq_inv_seq … Hg … H1 H2) -g1 -g2 #Hm #Hf
+ @eq_seq /2 width=1 by/
+]
+qed-.
+
+corec lemma nstream_inv_eq: ∀f1,f2. f1 ≗ f2 → f1 ≡ f2.
+* #n1 #f1 * #n2 #f2 #H cases (eq_stream_inv_seq ??? H) -H [2,3,4,5,6,7: // ]
+#Hf * -n2 cases n1 -n1 /3 width=5 by eq_push/
+#n @eq_next /3 width=5 by eq_seq/
+qed.
+
+lemma eq_seq_id: ∀f1,f2. f1 ≡ f2 → ∀n. n⨮f1 ≡ n⨮f2.
+/4 width=1 by nstream_inv_eq, nstream_eq, eq_seq/ qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/functions/identity_0.ma".
+include "ground/relocation/rtmap_eq.ma".
+
+(* RELOCATION N-STREAM ******************************************************)
+
+corec definition id: rtmap ≝ ⫯id.
+
+interpretation "identity (nstream)"
+ 'Identity = (id).
+
+(* Basic properties *********************************************************)
+
+lemma id_rew: ⫯𝐈𝐝 = 𝐈𝐝.
+<(stream_rew … (𝐈𝐝)) in ⊢ (???%); normalize //
+qed.
+
+lemma id_eq_rew: ⫯𝐈𝐝 ≡ 𝐈𝐝.
+cases id_rew in ⊢ (??%); //
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/functions/identity_0.ma".
+include "ground/relocation/rtmap_isid.ma".
+
+(* RELOCATION N-STREAM ******************************************************)
+
+(* Specific inversion lemmas ************************************************)
+
+lemma isid_inv_seq: ∀f,n. 𝐈❪n⨮f❫ → 𝐈❪f❫ ∧ 0 = n.
+#f #n #H elim (isid_inv_gen … H) -H
+#g #Hg #H elim (push_inv_seq_dx … H) -H /2 width=1 by conj/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.tcs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/functions/apply_2.ma".
+include "ground/relocation/nstream_eq.ma".
+include "ground/relocation/rtmap_istot.ma".
+
+(* RELOCATION N-STREAM ******************************************************)
+
+rec definition apply (i: nat) on i: rtmap → nat ≝ ?.
+* #n #f cases i -i
+[ @n
+| #i lapply (apply i f) -apply -i -f
+ #i @(↑(n+i))
+]
+defined.
+
+interpretation "functional application (nstream)"
+ 'Apply f i = (apply i f).
+
+(* Specific properties on at ************************************************)
+
+lemma at_O1: ∀i2,f. @❪0, i2⨮f❫ ≘ i2.
+#i2 elim i2 -i2 /2 width=5 by at_refl, at_next/
+qed.
+
+lemma at_S1: ∀n,f,i1,i2. @❪i1, f❫ ≘ i2 → @❪↑i1, n⨮f❫ ≘ ↑(n+i2).
+#n elim n -n /3 width=7 by at_push, at_next/
+qed.
+
+lemma at_total: ∀i1,f. @❪i1, f❫ ≘ f@❨i1❩.
+#i1 elim i1 -i1
+[ * // | #i #IH * /3 width=1 by at_S1/ ]
+qed.
+
+lemma at_istot: ∀f. 𝐓❪f❫.
+/2 width=2 by ex_intro/ qed.
+
+lemma at_plus2: ∀f,i1,i,n,m. @❪i1, n⨮f❫ ≘ i → @❪i1, (m+n)⨮f❫ ≘ m+i.
+#f #i1 #i #n #m #H elim m -m //
+#m <plus_S1 /2 width=5 by at_next/ (**) (* full auto fails *)
+qed.
+
+(* Specific inversion lemmas on at ******************************************)
+
+lemma at_inv_O1: ∀f,n,i2. @❪0, n⨮f❫ ≘ i2 → n = i2.
+#f #n elim n -n /2 width=6 by at_inv_ppx/
+#n #IH #i2 #H elim (at_inv_xnx … H) -H [2,3: // ]
+#j2 #Hj * -i2 /3 width=1 by eq_f/
+qed-.
+
+lemma at_inv_S1: ∀f,n,j1,i2. @❪↑j1, n⨮f❫ ≘ i2 →
+ ∃∃j2. @❪j1, f❫ ≘ j2 & ↑(n+j2) = i2.
+#f #n elim n -n /2 width=5 by at_inv_npx/
+#n #IH #j1 #i2 #H elim (at_inv_xnx … H) -H [2,3: // ]
+#j2 #Hj * -i2 elim (IH … Hj) -IH -Hj
+#i2 #Hi * -j2 /2 width=3 by ex2_intro/
+qed-.
+
+lemma at_inv_total: ∀f,i1,i2. @❪i1, f❫ ≘ i2 → f@❨i1❩ = i2.
+/2 width=6 by at_mono/ qed-.
+
+(* Spercific forward lemmas on at *******************************************)
+
+lemma at_increasing_plus: ∀f,n,i1,i2. @❪i1, n⨮f❫ ≘ i2 → i1 + n ≤ i2.
+#f #n *
+[ #i2 #H <(at_inv_O1 … H) -i2 //
+| #i1 #i2 #H elim (at_inv_S1 … H) -H
+ #j1 #Ht * -i2 /4 width=2 by at_increasing, monotonic_le_plus_r, le_S_S/
+]
+qed-.
+
+lemma at_fwd_id: ∀f,n,i. @❪i, n⨮f❫ ≘ i → 0 = n.
+#f #n #i #H elim (at_fwd_id_ex … H) -H
+#g #H elim (push_inv_seq_dx … H) -H //
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma apply_O1: ∀n,f. (n⨮f)@❨0❩ = n.
+// qed.
+
+lemma apply_S1: ∀n,f,i. (n⨮f)@❨↑i❩ = ↑(n+f@❨i❩).
+// qed.
+
+lemma apply_eq_repl (i): eq_repl … (λf1,f2. f1@❨i❩ = f2@❨i❩).
+#i elim i -i [2: #i #IH ] * #n1 #f1 * #n2 #f2 #H
+elim (eq_inv_seq_aux … H) -H normalize //
+#Hn #Hf /4 width=1 by eq_f2, eq_f/
+qed.
+
+lemma apply_S2: ∀f,i. (↑f)@❨i❩ = ↑(f@❨i❩).
+* #n #f * //
+qed.
+
+(* Main inversion lemmas ****************************************************)
+
+theorem apply_inj: ∀f,i1,i2,j. f@❨i1❩ = j → f@❨i2❩ = j → i1 = i2.
+/2 width=4 by at_inj/ qed-.
+
+corec theorem nstream_eq_inv_ext: ∀f1,f2. (∀i. f1@❨i❩ = f2@❨i❩) → f1 ≗ f2.
+* #n1 #f1 * #n2 #f2 #Hf @eq_seq
+[ @(Hf 0)
+| @nstream_eq_inv_ext -nstream_eq_inv_ext #i
+ lapply (Hf 0) >apply_O1 >apply_O1 #H destruct
+ lapply (Hf (↑i)) >apply_S1 >apply_S1 #H
+ /3 width=2 by injective_plus_r, injective_S/
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/relocation/rtmap_sor.ma".
+
+(* RELOCATION N-STREAM ******************************************************)
+
+axiom union: rtmap → rtmap → rtmap.
+
+interpretation "union (nstream)"
+ 'union f1 f2 = (union f1 f2).
+
+(* Specific properties on sor ***********************************************)
+
+axiom sor_total: ∀f1,f2. f1 ⋓ f2 ≘ f1 ∪ f2.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/relocation/nstream.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+lemma pn_split: ∀f. (∃g. ⫯g = f) ∨ (∃g. ↑g = f).
+@case_prop /3 width=2 by or_introl, or_intror, ex_intro/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/relations/rafter_3.ma".
+include "ground/relocation/rtmap_istot.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+coinductive after: relation3 rtmap rtmap rtmap ≝
+| after_refl: ∀f1,f2,f,g1,g2,g.
+ after f1 f2 f → ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → after g1 g2 g
+| after_push: ∀f1,f2,f,g1,g2,g.
+ after f1 f2 f → ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → after g1 g2 g
+| after_next: ∀f1,f2,f,g1,g.
+ after f1 f2 f → ↑f1 = g1 → ↑f = g → after g1 f2 g
+.
+
+interpretation "relational composition (rtmap)"
+ 'RAfter f1 f2 f = (after f1 f2 f).
+
+definition H_after_inj: predicate rtmap ≝
+ λf1. 𝐓❪f1❫ →
+ ∀f,f21,f22. f1 ⊚ f21 ≘ f → f1 ⊚ f22 ≘ f → f21 ≡ f22.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma after_inv_ppx: ∀g1,g2,g. g1 ⊚ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 →
+ ∃∃f. f1 ⊚ f2 ≘ f & ⫯f = g.
+#g1 #g2 #g * -g1 -g2 -g #f1 #f2 #f #g1
+[ #g2 #g #Hf #H1 #H2 #H #x1 #x2 #Hx1 #Hx2 destruct
+ >(injective_push … Hx1) >(injective_push … Hx2) -x2 -x1
+ /2 width=3 by ex2_intro/
+| #g2 #g #_ #_ #H2 #_ #x1 #x2 #_ #Hx2 destruct
+ elim (discr_push_next … Hx2)
+| #g #_ #H1 #_ #x1 #x2 #Hx1 #_ destruct
+ elim (discr_push_next … Hx1)
+]
+qed-.
+
+lemma after_inv_pnx: ∀g1,g2,g. g1 ⊚ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 →
+ ∃∃f. f1 ⊚ f2 ≘ f & ↑f = g.
+#g1 #g2 #g * -g1 -g2 -g #f1 #f2 #f #g1
+[ #g2 #g #_ #_ #H2 #_ #x1 #x2 #_ #Hx2 destruct
+ elim (discr_next_push … Hx2)
+| #g2 #g #Hf #H1 #H2 #H3 #x1 #x2 #Hx1 #Hx2 destruct
+ >(injective_push … Hx1) >(injective_next … Hx2) -x2 -x1
+ /2 width=3 by ex2_intro/
+| #g #_ #H1 #_ #x1 #x2 #Hx1 #_ destruct
+ elim (discr_push_next … Hx1)
+]
+qed-.
+
+lemma after_inv_nxx: ∀g1,f2,g. g1 ⊚ f2 ≘ g → ∀f1. ↑f1 = g1 →
+ ∃∃f. f1 ⊚ f2 ≘ f & ↑f = g.
+#g1 #f2 #g * -g1 -f2 -g #f1 #f2 #f #g1
+[ #g2 #g #_ #H1 #_ #_ #x1 #Hx1 destruct
+ elim (discr_next_push … Hx1)
+| #g2 #g #_ #H1 #_ #_ #x1 #Hx1 destruct
+ elim (discr_next_push … Hx1)
+| #g #Hf #H1 #H #x1 #Hx1 destruct
+ >(injective_next … Hx1) -x1
+ /2 width=3 by ex2_intro/
+]
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma after_inv_ppp: ∀g1,g2,g. g1 ⊚ g2 ≘ g →
+ ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → f1 ⊚ f2 ≘ f.
+#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H elim (after_inv_ppx … Hg … H1 H2) -g1 -g2
+#x #Hf #Hx destruct <(injective_push … Hx) -f //
+qed-.
+
+lemma after_inv_ppn: ∀g1,g2,g. g1 ⊚ g2 ≘ g →
+ ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ↑f = g → ⊥.
+#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H elim (after_inv_ppx … Hg … H1 H2) -g1 -g2
+#x #Hf #Hx destruct elim (discr_push_next … Hx)
+qed-.
+
+lemma after_inv_pnn: ∀g1,g2,g. g1 ⊚ g2 ≘ g →
+ ∀f1,f2,f. ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → f1 ⊚ f2 ≘ f.
+#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H elim (after_inv_pnx … Hg … H1 H2) -g1 -g2
+#x #Hf #Hx destruct <(injective_next … Hx) -f //
+qed-.
+
+lemma after_inv_pnp: ∀g1,g2,g. g1 ⊚ g2 ≘ g →
+ ∀f1,f2,f. ⫯f1 = g1 → ↑f2 = g2 → ⫯f = g → ⊥.
+#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H elim (after_inv_pnx … Hg … H1 H2) -g1 -g2
+#x #Hf #Hx destruct elim (discr_next_push … Hx)
+qed-.
+
+lemma after_inv_nxn: ∀g1,f2,g. g1 ⊚ f2 ≘ g →
+ ∀f1,f. ↑f1 = g1 → ↑f = g → f1 ⊚ f2 ≘ f.
+#g1 #f2 #g #Hg #f1 #f #H1 #H elim (after_inv_nxx … Hg … H1) -g1
+#x #Hf #Hx destruct <(injective_next … Hx) -f //
+qed-.
+
+lemma after_inv_nxp: ∀g1,f2,g. g1 ⊚ f2 ≘ g →
+ ∀f1,f. ↑f1 = g1 → ⫯f = g → ⊥.
+#g1 #f2 #g #Hg #f1 #f #H1 #H elim (after_inv_nxx … Hg … H1) -g1
+#x #Hf #Hx destruct elim (discr_next_push … Hx)
+qed-.
+
+lemma after_inv_pxp: ∀g1,g2,g. g1 ⊚ g2 ≘ g →
+ ∀f1,f. ⫯f1 = g1 → ⫯f = g →
+ ∃∃f2. f1 ⊚ f2 ≘ f & ⫯f2 = g2.
+#g1 * * [2: #m2] #g2 #g #Hg #f1 #f #H1 #H
+[ elim (after_inv_pnp … Hg … H1 … H) -g1 -g -f1 -f //
+| lapply (after_inv_ppp … Hg … H1 … H) -g1 -g /2 width=3 by ex2_intro/
+]
+qed-.
+
+lemma after_inv_pxn: ∀g1,g2,g. g1 ⊚ g2 ≘ g →
+ ∀f1,f. ⫯f1 = g1 → ↑f = g →
+ ∃∃f2. f1 ⊚ f2 ≘ f & ↑f2 = g2.
+#g1 * * [2: #m2] #g2 #g #Hg #f1 #f #H1 #H
+[ lapply (after_inv_pnn … Hg … H1 … H) -g1 -g /2 width=3 by ex2_intro/
+| elim (after_inv_ppn … Hg … H1 … H) -g1 -g -f1 -f //
+]
+qed-.
+
+lemma after_inv_xxp: ∀g1,g2,g. g1 ⊚ g2 ≘ g → ∀f. ⫯f = g →
+ ∃∃f1,f2. f1 ⊚ f2 ≘ f & ⫯f1 = g1 & ⫯f2 = g2.
+* * [2: #m1 ] #g1 #g2 #g #Hg #f #H
+[ elim (after_inv_nxp … Hg … H) -g2 -g -f //
+| elim (after_inv_pxp … Hg … H) -g /2 width=5 by ex3_2_intro/
+]
+qed-.
+
+lemma after_inv_xxn: ∀g1,g2,g. g1 ⊚ g2 ≘ g → ∀f. ↑f = g →
+ (∃∃f1,f2. f1 ⊚ f2 ≘ f & ⫯f1 = g1 & ↑f2 = g2) ∨
+ ∃∃f1. f1 ⊚ g2 ≘ f & ↑f1 = g1.
+* * [2: #m1 ] #g1 #g2 #g #Hg #f #H
+[ /4 width=5 by after_inv_nxn, or_intror, ex2_intro/
+| elim (after_inv_pxn … Hg … H) -g
+ /3 width=5 by or_introl, ex3_2_intro/
+]
+qed-.
+
+lemma after_inv_pxx: ∀g1,g2,g. g1 ⊚ g2 ≘ g → ∀f1. ⫯f1 = g1 →
+ (∃∃f2,f. f1 ⊚ f2 ≘ f & ⫯f2 = g2 & ⫯f = g) ∨
+ (∃∃f2,f. f1 ⊚ f2 ≘ f & ↑f2 = g2 & ↑f = g).
+#g1 * * [2: #m2 ] #g2 #g #Hg #f1 #H
+[ elim (after_inv_pnx … Hg … H) -g1
+ /3 width=5 by or_intror, ex3_2_intro/
+| elim (after_inv_ppx … Hg … H) -g1
+ /3 width=5 by or_introl, ex3_2_intro/
+]
+qed-.
+
+(* Basic properties *********************************************************)
+
+corec lemma after_eq_repl_back2: ∀f1,f. eq_repl_back (λf2. f2 ⊚ f1 ≘ f).
+#f1 #f #f2 * -f2 -f1 -f
+#f21 #f1 #f #g21 [1,2: #g1 ] #g #Hf #H21 [1,2: #H1 ] #H #g22 #H0
+[ cases (eq_inv_px … H0 … H21) -g21 /3 width=7 by after_refl/
+| cases (eq_inv_px … H0 … H21) -g21 /3 width=7 by after_push/
+| cases (eq_inv_nx … H0 … H21) -g21 /3 width=5 by after_next/
+]
+qed-.
+
+lemma after_eq_repl_fwd2: ∀f1,f. eq_repl_fwd (λf2. f2 ⊚ f1 ≘ f).
+#f1 #f @eq_repl_sym /2 width=3 by after_eq_repl_back2/
+qed-.
+
+corec lemma after_eq_repl_back1: ∀f2,f. eq_repl_back (λf1. f2 ⊚ f1 ≘ f).
+#f2 #f #f1 * -f2 -f1 -f
+#f2 #f11 #f #g2 [1,2: #g11 ] #g #Hf #H2 [1,2: #H11 ] #H #g2 #H0
+[ cases (eq_inv_px … H0 … H11) -g11 /3 width=7 by after_refl/
+| cases (eq_inv_nx … H0 … H11) -g11 /3 width=7 by after_push/
+| @(after_next … H2 H) /2 width=5 by/
+]
+qed-.
+
+lemma after_eq_repl_fwd1: ∀f2,f. eq_repl_fwd (λf1. f2 ⊚ f1 ≘ f).
+#f2 #f @eq_repl_sym /2 width=3 by after_eq_repl_back1/
+qed-.
+
+corec lemma after_eq_repl_back0: ∀f1,f2. eq_repl_back (λf. f2 ⊚ f1 ≘ f).
+#f2 #f1 #f * -f2 -f1 -f
+#f2 #f1 #f01 #g2 [1,2: #g1 ] #g01 #Hf01 #H2 [1,2: #H1 ] #H01 #g02 #H0
+[ cases (eq_inv_px … H0 … H01) -g01 /3 width=7 by after_refl/
+| cases (eq_inv_nx … H0 … H01) -g01 /3 width=7 by after_push/
+| cases (eq_inv_nx … H0 … H01) -g01 /3 width=5 by after_next/
+]
+qed-.
+
+lemma after_eq_repl_fwd0: ∀f2,f1. eq_repl_fwd (λf. f2 ⊚ f1 ≘ f).
+#f2 #f1 @eq_repl_sym /2 width=3 by after_eq_repl_back0/
+qed-.
+
+(* Main properties **********************************************************)
+
+corec theorem after_trans1: ∀f0,f3,f4. f0 ⊚ f3 ≘ f4 →
+ ∀f1,f2. f1 ⊚ f2 ≘ f0 →
+ ∀f. f2 ⊚ f3 ≘ f → f1 ⊚ f ≘ f4.
+#f0 #f3 #f4 * -f0 -f3 -f4 #f0 #f3 #f4 #g0 [1,2: #g3 ] #g4
+[ #Hf4 #H0 #H3 #H4 #g1 #g2 #Hg0 #g #Hg
+ cases (after_inv_xxp … Hg0 … H0) -g0
+ #f1 #f2 #Hf0 #H1 #H2
+ cases (after_inv_ppx … Hg … H2 H3) -g2 -g3
+ #f #Hf #H /3 width=7 by after_refl/
+| #Hf4 #H0 #H3 #H4 #g1 #g2 #Hg0 #g #Hg
+ cases (after_inv_xxp … Hg0 … H0) -g0
+ #f1 #f2 #Hf0 #H1 #H2
+ cases (after_inv_pnx … Hg … H2 H3) -g2 -g3
+ #f #Hf #H /3 width=7 by after_push/
+| #Hf4 #H0 #H4 #g1 #g2 #Hg0 #g #Hg
+ cases (after_inv_xxn … Hg0 … H0) -g0 *
+ [ #f1 #f2 #Hf0 #H1 #H2
+ cases (after_inv_nxx … Hg … H2) -g2
+ #f #Hf #H /3 width=7 by after_push/
+ | #f1 #Hf0 #H1 /3 width=6 by after_next/
+ ]
+]
+qed-.
+
+corec theorem after_trans2: ∀f1,f0,f4. f1 ⊚ f0 ≘ f4 →
+ ∀f2, f3. f2 ⊚ f3 ≘ f0 →
+ ∀f. f1 ⊚ f2 ≘ f → f ⊚ f3 ≘ f4.
+#f1 #f0 #f4 * -f1 -f0 -f4 #f1 #f0 #f4 #g1 [1,2: #g0 ] #g4
+[ #Hf4 #H1 #H0 #H4 #g2 #g3 #Hg0 #g #Hg
+ cases (after_inv_xxp … Hg0 … H0) -g0
+ #f2 #f3 #Hf0 #H2 #H3
+ cases (after_inv_ppx … Hg … H1 H2) -g1 -g2
+ #f #Hf #H /3 width=7 by after_refl/
+| #Hf4 #H1 #H0 #H4 #g2 #g3 #Hg0 #g #Hg
+ cases (after_inv_xxn … Hg0 … H0) -g0 *
+ [ #f2 #f3 #Hf0 #H2 #H3
+ cases (after_inv_ppx … Hg … H1 H2) -g1 -g2
+ #f #Hf #H /3 width=7 by after_push/
+ | #f2 #Hf0 #H2
+ cases (after_inv_pnx … Hg … H1 H2) -g1 -g2
+ #f #Hf #H /3 width=6 by after_next/
+ ]
+| #Hf4 #H1 #H4 #f2 #f3 #Hf0 #g #Hg
+ cases (after_inv_nxx … Hg … H1) -g1
+ #f #Hg #H /3 width=6 by after_next/
+]
+qed-.
+
+(* Main inversion lemmas ****************************************************)
+
+corec theorem after_mono: ∀f1,f2,x,y. f1 ⊚ f2 ≘ x → f1 ⊚ f2 ≘ y → x ≡ y.
+#f1 #f2 #x #y * -f1 -f2 -x
+#f1 #f2 #x #g1 [1,2: #g2 ] #g #Hx #H1 [1,2: #H2 ] #H0x #Hy
+[ cases (after_inv_ppx … Hy … H1 H2) -g1 -g2 /3 width=8 by eq_push/
+| cases (after_inv_pnx … Hy … H1 H2) -g1 -g2 /3 width=8 by eq_next/
+| cases (after_inv_nxx … Hy … H1) -g1 /3 width=8 by eq_next/
+]
+qed-.
+
+lemma after_mono_eq: ∀f1,f2,f. f1 ⊚ f2 ≘ f → ∀g1,g2,g. g1 ⊚ g2 ≘ g →
+ f1 ≡ g1 → f2 ≡ g2 → f ≡ g.
+/4 width=4 by after_mono, after_eq_repl_back1, after_eq_repl_back2/ qed-.
+
+(* Properties on tls ********************************************************)
+
+lemma after_tls: ∀n,f1,f2,f. @❪0, f1❫ ≘ n →
+ f1 ⊚ f2 ≘ f → ⫱*[n]f1 ⊚ f2 ≘ ⫱*[n]f.
+#n elim n -n //
+#n #IH #f1 #f2 #f #Hf1 #Hf
+cases (at_inv_pxn … Hf1) -Hf1 [ |*: // ] #g1 #Hg1 #H1
+cases (after_inv_nxx … Hf … H1) -Hf #g #Hg #H0 destruct
+<tls_xn <tls_xn /2 width=1 by/
+qed.
+
+(* Properties on isid *******************************************************)
+
+corec lemma after_isid_sn: ∀f1. 𝐈❪f1❫ → ∀f2. f1 ⊚ f2 ≘ f2.
+#f1 * -f1 #f1 #g1 #Hf1 #H1 #f2 cases (pn_split f2) * #g2 #H2
+/3 width=7 by after_push, after_refl/
+qed.
+
+corec lemma after_isid_dx: ∀f2. 𝐈❪f2❫ → ∀f1. f1 ⊚ f2 ≘ f1.
+#f2 * -f2 #f2 #g2 #Hf2 #H2 #f1 cases (pn_split f1) * #g1 #H1
+[ /3 width=7 by after_refl/
+| @(after_next … H1 H1) /3 width=3 by isid_push/
+]
+qed.
+
+(* Inversion lemmas on isid *************************************************)
+
+lemma after_isid_inv_sn: ∀f1,f2,f. f1 ⊚ f2 ≘ f → 𝐈❪f1❫ → f2 ≡ f.
+/3 width=6 by after_isid_sn, after_mono/ qed-.
+
+lemma after_isid_inv_dx: ∀f1,f2,f. f1 ⊚ f2 ≘ f → 𝐈❪f2❫ → f1 ≡ f.
+/3 width=6 by after_isid_dx, after_mono/ qed-.
+
+corec lemma after_fwd_isid1: ∀f1,f2,f. f1 ⊚ f2 ≘ f → 𝐈❪f❫ → 𝐈❪f1❫.
+#f1 #f2 #f * -f1 -f2 -f
+#f1 #f2 #f #g1 [1,2: #g2 ] #g #Hf #H1 [1,2: #H2 ] #H0 #H
+[ /4 width=6 by isid_inv_push, isid_push/ ]
+cases (isid_inv_next … H … H0)
+qed-.
+
+corec lemma after_fwd_isid2: ∀f1,f2,f. f1 ⊚ f2 ≘ f → 𝐈❪f❫ → 𝐈❪f2❫.
+#f1 #f2 #f * -f1 -f2 -f
+#f1 #f2 #f #g1 [1,2: #g2 ] #g #Hf #H1 [1,2: #H2 ] #H0 #H
+[ /4 width=6 by isid_inv_push, isid_push/ ]
+cases (isid_inv_next … H … H0)
+qed-.
+
+lemma after_inv_isid3: ∀f1,f2,f. f1 ⊚ f2 ≘ f → 𝐈❪f❫ → 𝐈❪f1❫ ∧ 𝐈❪f2❫.
+/3 width=4 by after_fwd_isid2, after_fwd_isid1, conj/ qed-.
+
+(* Properties on isuni ******************************************************)
+
+lemma after_isid_isuni: ∀f1,f2. 𝐈❪f2❫ → 𝐔❪f1❫ → f1 ⊚ ↑f2 ≘ ↑f1.
+#f1 #f2 #Hf2 #H elim H -H
+/5 width=7 by after_isid_dx, after_eq_repl_back2, after_next, after_push, eq_push_inv_isid/
+qed.
+
+lemma after_uni_next2: ∀f2. 𝐔❪f2❫ → ∀f1,f. ↑f2 ⊚ f1 ≘ f → f2 ⊚ ↑f1 ≘ f.
+#f2 #H elim H -f2
+[ #f2 #Hf2 #f1 #f #Hf
+ elim (after_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H0 destruct
+ /4 width=7 by after_isid_inv_sn, after_isid_sn, after_eq_repl_back0, eq_next/
+| #f2 #_ #g2 #H2 #IH #f1 #f #Hf
+ elim (after_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H0 destruct
+ /3 width=5 by after_next/
+]
+qed.
+
+(* Properties on uni ********************************************************)
+
+lemma after_uni: ∀n1,n2. 𝐔❨n1❩ ⊚ 𝐔❨n2❩ ≘ 𝐔❨n1+n2❩.
+@nat_elim2 [3: #n #m <plus_n_Sm ] (**) (* full auto fails *)
+/4 width=5 by after_uni_next2, after_isid_dx, after_isid_sn, after_next/
+qed.
+
+(* Forward lemmas on at *****************************************************)
+
+lemma after_at_fwd: ∀i,i1,f. @❪i1, f❫ ≘ i → ∀f2,f1. f2 ⊚ f1 ≘ f →
+ ∃∃i2. @❪i1, f1❫ ≘ i2 & @❪i2, f2❫ ≘ i.
+#i elim i -i [2: #i #IH ] #i1 #f #Hf #f2 #f1 #Hf21
+[ elim (at_inv_xxn … Hf) -Hf [1,3:* |*: // ]
+ [1: #g #j1 #Hg #H0 #H |2,4: #g #Hg #H ]
+| elim (at_inv_xxp … Hf) -Hf //
+ #g #H1 #H
+]
+[2: elim (after_inv_xxn … Hf21 … H) -f *
+ [ #g2 #g1 #Hg21 #H2 #H1 | #g2 #Hg21 #H2 ]
+|*: elim (after_inv_xxp … Hf21 … H) -f
+ #g2 #g1 #Hg21 #H2 #H1
+]
+[4: -Hg21 |*: elim (IH … Hg … Hg21) -g -IH ]
+/3 width=9 by at_refl, at_push, at_next, ex2_intro/
+qed-.
+
+lemma after_fwd_at: ∀i,i2,i1,f1,f2. @❪i1, f1❫ ≘ i2 → @❪i2, f2❫ ≘ i →
+ ∀f. f2 ⊚ f1 ≘ f → @❪i1, f❫ ≘ i.
+#i elim i -i [2: #i #IH ] #i2 #i1 #f1 #f2 #Hf1 #Hf2 #f #Hf
+[ elim (at_inv_xxn … Hf2) -Hf2 [1,3: * |*: // ]
+ #g2 [ #j2 ] #Hg2 [ #H22 ] #H20
+ [ elim (at_inv_xxn … Hf1 … H22) -i2 *
+ #g1 [ #j1 ] #Hg1 [ #H11 ] #H10
+ [ elim (after_inv_ppx … Hf … H20 H10) -f1 -f2 /3 width=7 by at_push/
+ | elim (after_inv_pnx … Hf … H20 H10) -f1 -f2 /3 width=6 by at_next/
+ ]
+ | elim (after_inv_nxx … Hf … H20) -f2 /3 width=7 by at_next/
+ ]
+| elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H22 #H20
+ elim (at_inv_xxp … Hf1 … H22) -i2 #g1 #H11 #H10
+ elim (after_inv_ppx … Hf … H20 H10) -f1 -f2 /2 width=2 by at_refl/
+]
+qed-.
+
+lemma after_fwd_at2: ∀f,i1,i. @❪i1, f❫ ≘ i → ∀f1,i2. @❪i1, f1❫ ≘ i2 →
+ ∀f2. f2 ⊚ f1 ≘ f → @❪i2, f2❫ ≘ i.
+#f #i1 #i #Hf #f1 #i2 #Hf1 #f2 #H elim (after_at_fwd … Hf … H) -f
+#j1 #H #Hf2 <(at_mono … Hf1 … H) -i1 -i2 //
+qed-.
+
+lemma after_fwd_at1: ∀i,i2,i1,f,f2. @❪i1, f❫ ≘ i → @❪i2, f2❫ ≘ i →
+ ∀f1. f2 ⊚ f1 ≘ f → @❪i1, f1❫ ≘ i2.
+#i elim i -i [2: #i #IH ] #i2 #i1 #f #f2 #Hf #Hf2 #f1 #Hf1
+[ elim (at_inv_xxn … Hf) -Hf [1,3: * |*: // ]
+ #g [ #j1 ] #Hg [ #H01 ] #H00
+ elim (at_inv_xxn … Hf2) -Hf2 [1,3,5,7: * |*: // ]
+ #g2 [1,3: #j2 ] #Hg2 [1,2: #H22 ] #H20
+ [ elim (after_inv_pxp … Hf1 … H20 H00) -f2 -f /3 width=7 by at_push/
+ | elim (after_inv_pxn … Hf1 … H20 H00) -f2 -f /3 width=5 by at_next/
+ | elim (after_inv_nxp … Hf1 … H20 H00)
+ | /4 width=9 by after_inv_nxn, at_next/
+ ]
+| elim (at_inv_xxp … Hf) -Hf // #g #H01 #H00
+ elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H21 #H20
+ elim (after_inv_pxp … Hf1 … H20 H00) -f2 -f /3 width=2 by at_refl/
+]
+qed-.
+
+(* Properties with at *******************************************************)
+
+lemma after_uni_dx: ∀i2,i1,f2. @❪i1, f2❫ ≘ i2 →
+ ∀f. f2 ⊚ 𝐔❨i1❩ ≘ f → 𝐔❨i2❩ ⊚ ⫱*[i2] f2 ≘ f.
+#i2 elim i2 -i2
+[ #i1 #f2 #Hf2 #f #Hf
+ elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H1 #H2 destruct
+ lapply (after_isid_inv_dx … Hf ?) -Hf
+ /3 width=3 by after_isid_sn, after_eq_repl_back0/
+| #i2 #IH #i1 #f2 #Hf2 #f #Hf
+ elim (at_inv_xxn … Hf2) -Hf2 [1,3: * |*: // ]
+ [ #g2 #j1 #Hg2 #H1 #H2 destruct
+ elim (after_inv_pnx … Hf) -Hf [ |*: // ] #g #Hg #H destruct
+ <tls_xn /3 width=5 by after_next/
+ | #g2 #Hg2 #H2 destruct
+ elim (after_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H destruct
+ <tls_xn /3 width=5 by after_next/
+ ]
+]
+qed.
+
+lemma after_uni_sn: ∀i2,i1,f2. @❪i1, f2❫ ≘ i2 →
+ ∀f. 𝐔❨i2❩ ⊚ ⫱*[i2] f2 ≘ f → f2 ⊚ 𝐔❨i1❩ ≘ f.
+#i2 elim i2 -i2
+[ #i1 #f2 #Hf2 #f #Hf
+ elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H1 #H2 destruct
+ lapply (after_isid_inv_sn … Hf ?) -Hf
+ /3 width=3 by after_isid_dx, after_eq_repl_back0/
+| #i2 #IH #i1 #f2 #Hf2 #f #Hf
+ elim (after_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H destruct
+ elim (at_inv_xxn … Hf2) -Hf2 [1,3: * |*: // ]
+ [ #g2 #j1 #Hg2 #H1 #H2 destruct /3 width=7 by after_push/
+ | #g2 #Hg2 #H2 destruct /3 width=5 by after_next/
+ ]
+]
+qed-.
+
+lemma after_uni_succ_dx: ∀i2,i1,f2. @❪i1, f2❫ ≘ i2 →
+ ∀f. f2 ⊚ 𝐔❨↑i1❩ ≘ f → 𝐔❨↑i2❩ ⊚ ⫱*[↑i2] f2 ≘ f.
+#i2 elim i2 -i2
+[ #i1 #f2 #Hf2 #f #Hf
+ elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H1 #H2 destruct
+ elim (after_inv_pnx … Hf) -Hf [ |*: // ] #g #Hg #H
+ lapply (after_isid_inv_dx … Hg ?) -Hg
+ /4 width=5 by after_isid_sn, after_eq_repl_back0, after_next/
+| #i2 #IH #i1 #f2 #Hf2 #f #Hf
+ elim (at_inv_xxn … Hf2) -Hf2 [1,3: * |*: // ]
+ [ #g2 #j1 #Hg2 #H1 #H2 destruct
+ elim (after_inv_pnx … Hf) -Hf [ |*: // ] #g #Hg #H destruct
+ <tls_xn /3 width=5 by after_next/
+ | #g2 #Hg2 #H2 destruct
+ elim (after_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H destruct
+ <tls_xn /3 width=5 by after_next/
+ ]
+]
+qed.
+
+lemma after_uni_succ_sn: ∀i2,i1,f2. @❪i1, f2❫ ≘ i2 →
+ ∀f. 𝐔❨↑i2❩ ⊚ ⫱*[↑i2] f2 ≘ f → f2 ⊚ 𝐔❨↑i1❩ ≘ f.
+#i2 elim i2 -i2
+[ #i1 #f2 #Hf2 #f #Hf
+ elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H1 #H2 destruct
+ elim (after_inv_nxx … Hf) -Hf [ |*: // ] #g #Hg #H destruct
+ lapply (after_isid_inv_sn … Hg ?) -Hg
+ /4 width=7 by after_isid_dx, after_eq_repl_back0, after_push/
+| #i2 #IH #i1 #f2 #Hf2 #f #Hf
+ elim (after_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H destruct
+ elim (at_inv_xxn … Hf2) -Hf2 [1,3: * |*: // ]
+ [ #g2 #j1 #Hg2 #H1 #H2 destruct <tls_xn in Hg; /3 width=7 by after_push/
+ | #g2 #Hg2 #H2 destruct <tls_xn in Hg; /3 width=5 by after_next/
+ ]
+]
+qed-.
+
+lemma after_uni_one_dx: ∀f2,f. ⫯f2 ⊚ 𝐔❨↑O❩ ≘ f → 𝐔❨↑O❩ ⊚ f2 ≘ f.
+#f2 #f #H @(after_uni_succ_dx … (⫯f2)) /2 width=3 by at_refl/
+qed.
+
+lemma after_uni_one_sn: ∀f1,f. 𝐔❨↑O❩ ⊚ f1 ≘ f → ⫯f1 ⊚ 𝐔❨↑O❩ ≘ f.
+/3 width=3 by after_uni_succ_sn, at_refl/ qed-.
+
+(* Forward lemmas on istot **************************************************)
+
+lemma after_istot_fwd: ∀f2,f1,f. f2 ⊚ f1 ≘ f → 𝐓❪f2❫ → 𝐓❪f1❫ → 𝐓❪f❫.
+#f2 #f1 #f #Hf #Hf2 #Hf1 #i1 elim (Hf1 i1) -Hf1
+#i2 #Hf1 elim (Hf2 i2) -Hf2
+/3 width=7 by after_fwd_at, ex_intro/
+qed-.
+
+lemma after_fwd_istot_dx: ∀f2,f1,f. f2 ⊚ f1 ≘ f → 𝐓❪f❫ → 𝐓❪f1❫.
+#f2 #f1 #f #H #Hf #i1 elim (Hf i1) -Hf
+#i2 #Hf elim (after_at_fwd … Hf … H) -f /2 width=2 by ex_intro/
+qed-.
+
+lemma after_fwd_istot_sn: ∀f2,f1,f. f2 ⊚ f1 ≘ f → 𝐓❪f❫ → 𝐓❪f2❫.
+#f2 #f1 #f #H #Hf #i1 elim (Hf i1) -Hf
+#i #Hf elim (after_at_fwd … Hf … H) -f
+#i2 #Hf1 #Hf2 lapply (at_increasing … Hf1) -f1
+#Hi12 elim (at_le_ex … Hf2 … Hi12) -i2 /2 width=2 by ex_intro/
+qed-.
+
+lemma after_inv_istot: ∀f2,f1,f. f2 ⊚ f1 ≘ f → 𝐓❪f❫ → 𝐓❪f2❫ ∧ 𝐓❪f1❫.
+/3 width=4 by after_fwd_istot_sn, after_fwd_istot_dx, conj/ qed-.
+
+lemma after_at1_fwd: ∀f1,i1,i2. @❪i1, f1❫ ≘ i2 → ∀f2. 𝐓❪f2❫ → ∀f. f2 ⊚ f1 ≘ f →
+ ∃∃i. @❪i2, f2❫ ≘ i & @❪i1, f❫ ≘ i.
+#f1 #i1 #i2 #Hf1 #f2 #Hf2 #f #Hf elim (Hf2 i2) -Hf2
+/3 width=8 by after_fwd_at, ex2_intro/
+qed-.
+
+lemma after_fwd_isid_sn: ∀f2,f1,f. 𝐓❪f❫ → f2 ⊚ f1 ≘ f → f1 ≡ f → 𝐈❪f2❫.
+#f2 #f1 #f #H #Hf elim (after_inv_istot … Hf H) -H
+#Hf2 #Hf1 #H @isid_at_total // -Hf2
+#i2 #i #Hf2 elim (Hf1 i2) -Hf1
+#i0 #Hf1 lapply (at_increasing … Hf1)
+#Hi20 lapply (after_fwd_at2 … i0 … Hf1 … Hf) -Hf
+/3 width=7 by at_eq_repl_back, at_mono, at_id_le/
+qed-.
+
+lemma after_fwd_isid_dx: ∀f2,f1,f. 𝐓❪f❫ → f2 ⊚ f1 ≘ f → f2 ≡ f → 𝐈❪f1❫.
+#f2 #f1 #f #H #Hf elim (after_inv_istot … Hf H) -H
+#Hf2 #Hf1 #H2 @isid_at_total // -Hf1
+#i1 #i2 #Hi12 elim (after_at1_fwd … Hi12 … Hf) -f1
+/3 width=8 by at_inj, at_eq_repl_back/
+qed-.
+
+corec fact after_inj_O_aux: ∀f1. @❪0, f1❫ ≘ 0 → H_after_inj f1.
+#f1 #H1f1 #H2f1 #f #f21 #f22 #H1f #H2f
+cases (at_inv_pxp … H1f1) -H1f1 [ |*: // ] #g1 #H1
+lapply (istot_inv_push … H2f1 … H1) -H2f1 #H2g1
+cases (H2g1 0) #n #Hn
+cases (after_inv_pxx … H1f … H1) -H1f * #g21 #g #H1g #H21 #H
+[ cases (after_inv_pxp … H2f … H1 H) -f1 -f #g22 #H2g #H22
+ @(eq_push … H21 H22) -f21 -f22
+| cases (after_inv_pxn … H2f … H1 H) -f1 -f #g22 #H2g #H22
+ @(eq_next … H21 H22) -f21 -f22
+]
+@(after_inj_O_aux (⫱*[n]g1) … (⫱*[n]g)) -after_inj_O_aux
+/2 width=1 by after_tls, istot_tls, at_pxx_tls/
+qed-.
+
+fact after_inj_aux: (∀f1. @❪0, f1❫ ≘ 0 → H_after_inj f1) →
+ ∀i2,f1. @❪0, f1❫ ≘ i2 → H_after_inj f1.
+#H0 #i2 elim i2 -i2 /2 width=1 by/ -H0
+#i2 #IH #f1 #H1f1 #H2f1 #f #f21 #f22 #H1f #H2f
+elim (at_inv_pxn … H1f1) -H1f1 [ |*: // ] #g1 #H1g1 #H1
+elim (after_inv_nxx … H1f … H1) -H1f #g #H1g #H
+lapply (after_inv_nxn … H2f … H1 H) -f #H2g
+/3 width=6 by istot_inv_next/
+qed-.
+
+theorem after_inj: ∀f1. H_after_inj f1.
+#f1 #H cases (H 0) /3 width=7 by after_inj_aux, after_inj_O_aux/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.tcs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/relations/rat_3.ma".
+include "ground/relocation/rtmap_uni.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+coinductive at: rtmap → relation nat ≝
+| at_refl: ∀f,g,j1,j2. ⫯f = g → 0 = j1 → 0 = j2 → at g j1 j2
+| at_push: ∀f,i1,i2. at f i1 i2 → ∀g,j1,j2. ⫯f = g → ↑i1 = j1 → ↑i2 = j2 → at g j1 j2
+| at_next: ∀f,i1,i2. at f i1 i2 → ∀g,j2. ↑f = g → ↑i2 = j2 → at g i1 j2
+.
+
+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.
+
+(* Basic inversion lemmas ***************************************************)
+
+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.
+#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/
+| #f #i1 #i2 #_ #g #j2 * #_ #x #x1 #_ #H elim (discr_push_next … H)
+]
+qed-.
+
+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)
+| #f #i1 #i2 #Hi #g #j2 * * #x #H >(injective_next … H) -g /2 width=3 by ex2_intro/
+]
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+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 →
+ ∀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.
+#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 →
+ ∀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.
+#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.
+#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.
+#f elim (pn_split … f) *
+#g #H #i1 #i2 #Hf #j2 #H1 #H2
+[ elim (at_inv_ppn … Hf … H1 H H2)
+| /3 width=5 by at_inv_xnn, ex2_intro/
+]
+qed-.
+
+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
+[ elim (at_inv_npp … Hf … H1 H H2)
+| elim (at_inv_xnp … Hf … H H2)
+]
+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.
+#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 →
+ (0 = i1 ∧ 0 = 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.
+#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.
+#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 →
+ ∃∃g. 0 = i1 & ⫯g = f.
+#f elim (pn_split f) *
+#g #H #i1 #i2 #Hf #H2
+[ /3 width=6 by at_inv_xpp, ex2_intro/
+| elim (at_inv_xnp … Hf … H H2)
+]
+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.
+#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/
+| lapply (at_inv_xnn … Hf … H H2) -i2 /3 width=3 by or_intror, ex2_intro/
+]
+qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+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 * //
+ #i1 #f #Hf elim (at_inv_nxn … Hf) -Hf [1,4: * |*: // ]
+ /3 width=2 by le_S_S, le_S/
+]
+qed-.
+
+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.
+#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
+#H elim (lt_le_false … H) -H //
+qed-.
+
+(* Basic properties *********************************************************)
+
+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/
+| #f1 #i1 #i2 #Hf1 #g1 #j2 #H #H2 #f2 #H12 cases (eq_inv_nx … H12 … H) -g1 /3 width=5 by at_next/
+]
+qed-.
+
+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.
+#j2 elim j2 -j2 [2: #j2 #IH ] #i2 #f #Hf
+[ elim (at_inv_xxn … Hf) -Hf [1,3: * |*: // ]
+ #g [ #x2 ] #Hg [ #H2 ] #H0
+ [ * /3 width=3 by at_refl, ex2_intro/
+ #i1 #Hi12 destruct lapply (le_S_S_to_le … Hi12) -Hi12
+ #Hi12 elim (IH … Hg … Hi12) -x2 -IH
+ /3 width=7 by at_push, ex2_intro, le_S_S/
+ | #i1 #Hi12 elim (IH … Hg … Hi12) -IH -i2
+ /3 width=5 by at_next, ex2_intro, le_S_S/
+ ]
+| elim (at_inv_xxp … Hf) -Hf //
+ #g * -i2 #H2 #i1 #Hi12 <(le_n_O_to_eq … Hi12)
+ /3 width=3 by at_refl, ex2_intro/
+]
+qed-.
+
+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 →
+ i1 < i2 → j1 < j2.
+#j2 elim j2 -j2
+[ #i2 #f #H2f elim (at_inv_xxp … H2f) -H2f //
+ #g #H21 #_ #j1 #i1 #_ #Hi elim (lt_le_false … Hi) -Hi //
+| #j2 #IH #i2 #f #H2f * //
+ #j1 #i1 #H1f #Hi elim (lt_inv_gen … Hi)
+ #x2 #_ #H21 elim (at_inv_nxn … H2f … H21) -H2f [1,3: * |*: // ]
+ #g #H2g #H
+ [ elim (at_inv_xpn … H1f … H) -f
+ /4 width=8 by lt_S_S_to_lt, lt_S_S/
+ | /4 width=8 by at_inv_xnn, lt_S_S/
+ ]
+]
+qed-.
+
+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 //
+ #g * -i1 #H #j2 #i2 #H2f #Hj elim (lt_inv_O1 … Hj) -Hj
+ #x2 #H22 elim (at_inv_xpn … H2f … H H22) -f //
+| #j1 #IH *
+ [ #f #H1f elim (at_inv_pxn … H1f) -H1f [ |*: // ]
+ #g #H1g #H #j2 #i2 #H2f #Hj elim (lt_inv_S1 … Hj) -Hj
+ /3 width=7 by at_inv_xnn/
+ | #i1 #f #H1f #j2 #i2 #H2f #Hj elim (lt_inv_S1 … Hj) -Hj
+ #y2 #Hj #H22 elim (at_inv_nxn … H1f) -H1f [1,4: * |*: // ]
+ #g #Hg #H
+ [ elim (at_inv_xpn … H2f … H H22) -f -H22
+ /3 width=7 by lt_S_S/
+ | /3 width=7 by at_inv_xnn/
+ ]
+ ]
+]
+qed-.
+
+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.
+#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-.
+
+theorem at_div_comm: ∀f2,g2,f1,g1.
+ H_at_div f2 g2 f1 g1 → H_at_div g2 f2 g1 f1.
+#f2 #g2 #f1 #g1 #IH #jg #jf #j #Hg #Hf
+elim (IH … Hf Hg) -IH -j /2 width=3 by ex2_intro/
+qed-.
+
+theorem at_div_pp: ∀f2,g2,f1,g1.
+ H_at_div f2 g2 f1 g1 → H_at_div (⫯f2) (⫯g2) (⫯f1) (⫯g1).
+#f2 #g2 #f1 #g1 #IH #jf #jg #j #Hf #Hg
+elim (at_inv_xpx … Hf) -Hf [1,2: * |*: // ]
+[ #H1 #H2 destruct -IH
+ lapply (at_inv_xpp … Hg ???) -Hg [4: |*: // ] #H destruct
+ /3 width=3 by at_refl, ex2_intro/
+| #xf #i #Hf2 #H1 #H2 destruct
+ lapply (at_inv_xpn … Hg ????) -Hg [5: * |*: // ] #xg #Hg2 #H destruct
+ elim (IH … Hf2 Hg2) -IH -i /3 width=9 by at_push, ex2_intro/
+]
+qed-.
+
+theorem at_div_nn: ∀f2,g2,f1,g1.
+ H_at_div f2 g2 f1 g1 → H_at_div (↑f2) (↑g2) (f1) (g1).
+#f2 #g2 #f1 #g1 #IH #jf #jg #j #Hf #Hg
+elim (at_inv_xnx … Hf) -Hf [ |*: // ] #i #Hf2 #H destruct
+lapply (at_inv_xnn … Hg ????) -Hg [5: |*: // ] #Hg2
+elim (IH … Hf2 Hg2) -IH -i /2 width=3 by ex2_intro/
+qed-.
+
+theorem at_div_np: ∀f2,g2,f1,g1.
+ H_at_div f2 g2 f1 g1 → H_at_div (↑f2) (⫯g2) (f1) (↑g1).
+#f2 #g2 #f1 #g1 #IH #jf #jg #j #Hf #Hg
+elim (at_inv_xnx … Hf) -Hf [ |*: // ] #i #Hf2 #H destruct
+lapply (at_inv_xpn … Hg ????) -Hg [5: * |*: // ] #xg #Hg2 #H destruct
+elim (IH … Hf2 Hg2) -IH -i /3 width=7 by at_next, ex2_intro/
+qed-.
+
+theorem at_div_pn: ∀f2,g2,f1,g1.
+ H_at_div f2 g2 f1 g1 → H_at_div (⫯f2) (↑g2) (↑f1) (g1).
+/4 width=6 by at_div_np, at_div_comm/ qed-.
+
+(* Properties on tls ********************************************************)
+
+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.
+#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
+ elim (IH … H) -IH -H #i1 #Hf
+ elim (pn_split f) * #g #Hg destruct /3 width=8 by at_push, at_next, ex_intro/
+]
+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.
+#n elim n -n
+[ #g #i1 #j2 #Hg #H
+ elim (at_inv_pxp … H) -H [ |*: // ] #f #H0
+ elim (at_inv_npx … Hg … H0) -Hg [ |*: // ] #x2 #Hf #H2 destruct
+ /2 width=3 by ex2_intro/
+| #n #IH #g #i1 #j2 #Hg #H
+ elim (at_inv_pxn … H) -H [ |*: // ] #f #Hf2 #H0
+ elim (at_inv_xnx … Hg … H0) -Hg #x2 #Hf1 #H2 destruct
+ elim (IH … Hf1 Hf2) -IH -Hf1 -Hf2 #i2 #Hf #H2 destruct
+ /2 width=3 by ex2_intro/
+]
+qed-.
+
+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/
+| #i2 #IH #i1 #f #Hf
+ elim (at_inv_xxn … Hf) -Hf [1,3: * |*: // ]
+ [ #g #j1 #Hg #H1 #H2 | #g #Hg #Ho ] destruct
+ <tls_xn /2 width=2 by/
+]
+qed-.
+
+(* Advanced inversion lemmas on isid ****************************************)
+
+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.
+/3 width=6 by isid_inv_at, at_mono/ qed-.
+
+(* Advanced properties on isid **********************************************)
+
+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/
+qed-.
+
+(* Advanced properties on id ************************************************)
+
+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.
+/2 width=1 by isid_inv_at/ qed.
+
+(* Advanced forward lemmas on id ********************************************)
+
+lemma at_id_fwd: ∀i1,i2. @❪i1,𝐈𝐝❫ ≘ i2 → i1 = i2.
+/2 width=4 by at_mono/ qed.
+
+(* Main properties on id ****************************************************)
+
+theorem at_div_id_dx: ∀f. H_at_div f 𝐈𝐝 𝐈𝐝 f.
+#f #jf #j0 #j #Hf #H0
+lapply (at_id_fwd … H0) -H0 #H destruct
+/2 width=3 by ex2_intro/
+qed-.
+
+theorem at_div_id_sn: ∀f. H_at_div 𝐈𝐝 f f 𝐈𝐝.
+/3 width=6 by at_div_id_dx, at_div_comm/ qed-.
+
+(* Properties with uniform relocations **************************************)
+
+lemma at_uni: ∀n,i. @❪i,𝐔❨n❩❫ ≘ n+i.
+#n elim n -n /2 width=5 by at_next/
+qed.
+
+(* Inversion lemmas with uniform relocations ********************************)
+
+lemma at_inv_uni: ∀n,i,j. @❪i,𝐔❨n❩❫ ≘ j → j = n+i.
+/2 width=4 by at_mono/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/functions/basic_2.ma".
+include "ground/relocation/rtmap_at.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+definition basic: nat → nat → rtmap ≝ λm,n. ⫯*[m] 𝐔❨n❩.
+
+interpretation "basic relocation (rtmap)"
+ 'Basic m n = (basic m n).
+
+(* Prioerties with application **********************************************)
+
+lemma at_basic_lt: ∀m,n,i. i < m → @❪i, 𝐁❨m,n❩❫ ≘ i.
+#m elim m -m [ #n #i #H elim (lt_zero_false … H) ]
+#m #IH #n * [ /2 width=2 by refl, at_refl/ ]
+#i #H lapply (lt_S_S_to_lt … H) -H /3 width=7 by refl, at_push/
+qed.
+
+lemma at_basic_ge: ∀m,n,i. m ≤ i → @❪i, 𝐁❨m,n❩❫ ≘ n+i.
+#m elim m -m //
+#m #IH #n #j #H
+elim (le_inv_S1 … H) -H #i #Hmi #H destruct
+/3 width=7 by refl, at_push/
+qed.
+
+(* Inversion lemmas with application ****************************************)
+
+lemma at_basic_inv_lt: ∀m,n,i,j. i < m → @❪i, 𝐁❨m,n❩❫ ≘ j → i = j.
+/3 width=4 by at_basic_lt, at_mono/ qed-.
+
+lemma at_basic_inv_ge: ∀m,n,i,j. m ≤ i → @❪i, 𝐁❨m,n❩❫ ≘ j → n+i = j.
+/3 width=4 by at_basic_ge, at_mono/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/relocation/rtmap_after.ma".
+include "ground/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.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/relations/rcoafter_3.ma".
+include "ground/relocation/rtmap_sor.ma".
+include "ground/relocation/rtmap_after.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+coinductive coafter: relation3 rtmap rtmap rtmap ≝
+| coafter_refl: ∀f1,f2,f,g1,g2,g. coafter f1 f2 f →
+ ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → coafter g1 g2 g
+| coafter_push: ∀f1,f2,f,g1,g2,g. coafter f1 f2 f →
+ ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → coafter g1 g2 g
+| coafter_next: ∀f1,f2,f,g1,g. coafter f1 f2 f →
+ ↑f1 = g1 → ⫯f = g → coafter g1 f2 g
+.
+
+interpretation "relational co-composition (rtmap)"
+ 'RCoAfter f1 f2 f = (coafter f1 f2 f).
+
+definition H_coafter_inj: predicate rtmap ≝
+ λf1. 𝐓❪f1❫ →
+ ∀f,f21,f22. f1 ~⊚ f21 ≘ f → f1 ~⊚ f22 ≘ f → f21 ≡ f22.
+
+definition H_coafter_fwd_isid2: predicate rtmap ≝
+ λf1. ∀f2,f. f1 ~⊚ f2 ≘ f → 𝐓❪f1❫ → 𝐈❪f❫ → 𝐈❪f2❫.
+
+definition H_coafter_isfin2_fwd: predicate rtmap ≝
+ λf1. ∀f2. 𝐅❪f2❫ → 𝐓❪f1❫ → ∀f. f1 ~⊚ f2 ≘ f → 𝐅❪f❫.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma coafter_inv_ppx: ∀g1,g2,g. g1 ~⊚ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 →
+ ∃∃f. f1 ~⊚ f2 ≘ f & ⫯f = g.
+#g1 #g2 #g * -g1 -g2 -g #f1 #f2 #f #g1
+[ #g2 #g #Hf #H1 #H2 #H #x1 #x2 #Hx1 #Hx2 destruct
+ >(injective_push … Hx1) >(injective_push … Hx2) -x2 -x1
+ /2 width=3 by ex2_intro/
+| #g2 #g #_ #_ #H2 #_ #x1 #x2 #_ #Hx2 destruct
+ elim (discr_push_next … Hx2)
+| #g #_ #H1 #_ #x1 #x2 #Hx1 #_ destruct
+ elim (discr_push_next … Hx1)
+]
+qed-.
+
+lemma coafter_inv_pnx: ∀g1,g2,g. g1 ~⊚ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 →
+ ∃∃f. f1 ~⊚ f2 ≘ f & ↑f = g.
+#g1 #g2 #g * -g1 -g2 -g #f1 #f2 #f #g1
+[ #g2 #g #_ #_ #H2 #_ #x1 #x2 #_ #Hx2 destruct
+ elim (discr_next_push … Hx2)
+| #g2 #g #Hf #H1 #H2 #H3 #x1 #x2 #Hx1 #Hx2 destruct
+ >(injective_push … Hx1) >(injective_next … Hx2) -x2 -x1
+ /2 width=3 by ex2_intro/
+| #g #_ #H1 #_ #x1 #x2 #Hx1 #_ destruct
+ elim (discr_push_next … Hx1)
+]
+qed-.
+
+lemma coafter_inv_nxx: ∀g1,f2,g. g1 ~⊚ f2 ≘ g → ∀f1. ↑f1 = g1 →
+ ∃∃f. f1 ~⊚ f2 ≘ f & ⫯f = g.
+#g1 #f2 #g * -g1 -f2 -g #f1 #f2 #f #g1
+[ #g2 #g #_ #H1 #_ #_ #x1 #Hx1 destruct
+ elim (discr_next_push … Hx1)
+| #g2 #g #_ #H1 #_ #_ #x1 #Hx1 destruct
+ elim (discr_next_push … Hx1)
+| #g #Hf #H1 #H #x1 #Hx1 destruct
+ >(injective_next … Hx1) -x1
+ /2 width=3 by ex2_intro/
+]
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma coafter_inv_ppp: ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
+ ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → f1 ~⊚ f2 ≘ f.
+#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H
+elim (coafter_inv_ppx … Hg … H1 H2) -g1 -g2 #x #Hf #Hx destruct
+<(injective_push … Hx) -f //
+qed-.
+
+lemma coafter_inv_ppn: ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
+ ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ↑f = g → ⊥.
+#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H
+elim (coafter_inv_ppx … Hg … H1 H2) -g1 -g2 #x #Hf #Hx destruct
+elim (discr_push_next … Hx)
+qed-.
+
+lemma coafter_inv_pnn: ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
+ ∀f1,f2,f. ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → f1 ~⊚ f2 ≘ f.
+#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H
+elim (coafter_inv_pnx … Hg … H1 H2) -g1 -g2 #x #Hf #Hx destruct
+<(injective_next … Hx) -f //
+qed-.
+
+lemma coafter_inv_pnp: ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
+ ∀f1,f2,f. ⫯f1 = g1 → ↑f2 = g2 → ⫯f = g → ⊥.
+#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H
+elim (coafter_inv_pnx … Hg … H1 H2) -g1 -g2 #x #Hf #Hx destruct
+elim (discr_next_push … Hx)
+qed-.
+
+lemma coafter_inv_nxp: ∀g1,f2,g. g1 ~⊚ f2 ≘ g →
+ ∀f1,f. ↑f1 = g1 → ⫯f = g → f1 ~⊚ f2 ≘ f.
+#g1 #f2 #g #Hg #f1 #f #H1 #H
+elim (coafter_inv_nxx … Hg … H1) -g1 #x #Hf #Hx destruct
+<(injective_push … Hx) -f //
+qed-.
+
+lemma coafter_inv_nxn: ∀g1,f2,g. g1 ~⊚ f2 ≘ g →
+ ∀f1,f. ↑f1 = g1 → ↑f = g → ⊥.
+#g1 #f2 #g #Hg #f1 #f #H1 #H
+elim (coafter_inv_nxx … Hg … H1) -g1 #x #Hf #Hx destruct
+elim (discr_push_next … Hx)
+qed-.
+
+lemma coafter_inv_pxp: ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
+ ∀f1,f. ⫯f1 = g1 → ⫯f = g →
+ ∃∃f2. f1 ~⊚ f2 ≘ f & ⫯f2 = g2.
+#g1 #g2 #g #Hg #f1 #f #H1 #H elim (pn_split g2) * #f2 #H2
+[ lapply (coafter_inv_ppp … Hg … H1 H2 H) -g1 -g /2 width=3 by ex2_intro/
+| elim (coafter_inv_pnp … Hg … H1 H2 H)
+]
+qed-.
+
+lemma coafter_inv_pxn: ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
+ ∀f1,f. ⫯f1 = g1 → ↑f = g →
+ ∃∃f2. f1 ~⊚ f2 ≘ f & ↑f2 = g2.
+#g1 #g2 #g #Hg #f1 #f #H1 #H elim (pn_split g2) * #f2 #H2
+[ elim (coafter_inv_ppn … Hg … H1 H2 H)
+| lapply (coafter_inv_pnn … Hg … H1 … H) -g1 -g /2 width=3 by ex2_intro/
+]
+qed-.
+
+lemma coafter_inv_xxn: ∀g1,g2,g. g1 ~⊚ g2 ≘ g → ∀f. ↑f = g →
+ ∃∃f1,f2. f1 ~⊚ f2 ≘ f & ⫯f1 = g1 & ↑f2 = g2.
+#g1 #g2 #g #Hg #f #H elim (pn_split g1) * #f1 #H1
+[ elim (coafter_inv_pxn … Hg … H1 H) -g /2 width=5 by ex3_2_intro/
+| elim (coafter_inv_nxn … Hg … H1 H)
+]
+qed-.
+
+lemma coafter_inv_xnn: ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
+ ∀f2,f. ↑f2 = g2 → ↑f = g →
+ ∃∃f1. f1 ~⊚ f2 ≘ f & ⫯f1 = g1.
+#g1 #g2 #g #Hg #f2 #f #H2 destruct #H
+elim (coafter_inv_xxn … Hg … H) -g
+#z1 #z2 #Hf #H1 #H2 destruct /2 width=3 by ex2_intro/
+qed-.
+
+lemma coafter_inv_xxp: ∀g1,g2,g. g1 ~⊚ g2 ≘ g → ∀f. ⫯f = g →
+ (∃∃f1,f2. f1 ~⊚ f2 ≘ f & ⫯f1 = g1 & ⫯f2 = g2) ∨
+ ∃∃f1. f1 ~⊚ g2 ≘ f & ↑f1 = g1.
+#g1 #g2 #g #Hg #f #H elim (pn_split g1) * #f1 #H1
+[ elim (coafter_inv_pxp … Hg … H1 H) -g
+ /3 width=5 by or_introl, ex3_2_intro/
+| /4 width=5 by coafter_inv_nxp, or_intror, ex2_intro/
+]
+qed-.
+
+lemma coafter_inv_pxx: ∀g1,g2,g. g1 ~⊚ g2 ≘ g → ∀f1. ⫯f1 = g1 →
+ (∃∃f2,f. f1 ~⊚ f2 ≘ f & ⫯f2 = g2 & ⫯f = g) ∨
+ (∃∃f2,f. f1 ~⊚ f2 ≘ f & ↑f2 = g2 & ↑f = g).
+#g1 #g2 #g #Hg #f1 #H1 elim (pn_split g2) * #f2 #H2
+[ elim (coafter_inv_ppx … Hg … H1 H2) -g1
+ /3 width=5 by or_introl, ex3_2_intro/
+| elim (coafter_inv_pnx … Hg … H1 H2) -g1
+ /3 width=5 by or_intror, ex3_2_intro/
+]
+qed-.
+
+(* Basic properties *********************************************************)
+
+corec lemma coafter_eq_repl_back2: ∀f1,f. eq_repl_back (λf2. f2 ~⊚ f1 ≘ f).
+#f1 #f #f2 * -f2 -f1 -f
+#f21 #f1 #f #g21 [1,2: #g1 ] #g #Hf #H21 [1,2: #H1 ] #H #g22 #H0
+[ cases (eq_inv_px … H0 … H21) -g21 /3 width=7 by coafter_refl/
+| cases (eq_inv_px … H0 … H21) -g21 /3 width=7 by coafter_push/
+| cases (eq_inv_nx … H0 … H21) -g21 /3 width=5 by coafter_next/
+]
+qed-.
+
+lemma coafter_eq_repl_fwd2: ∀f1,f. eq_repl_fwd (λf2. f2 ~⊚ f1 ≘ f).
+#f1 #f @eq_repl_sym /2 width=3 by coafter_eq_repl_back2/
+qed-.
+
+corec lemma coafter_eq_repl_back1: ∀f2,f. eq_repl_back (λf1. f2 ~⊚ f1 ≘ f).
+#f2 #f #f1 * -f2 -f1 -f
+#f2 #f11 #f #g2 [1,2: #g11 ] #g #Hf #H2 [1,2: #H11 ] #H #g2 #H0
+[ cases (eq_inv_px … H0 … H11) -g11 /3 width=7 by coafter_refl/
+| cases (eq_inv_nx … H0 … H11) -g11 /3 width=7 by coafter_push/
+| @(coafter_next … H2 H) /2 width=5 by/
+]
+qed-.
+
+lemma coafter_eq_repl_fwd1: ∀f2,f. eq_repl_fwd (λf1. f2 ~⊚ f1 ≘ f).
+#f2 #f @eq_repl_sym /2 width=3 by coafter_eq_repl_back1/
+qed-.
+
+corec lemma coafter_eq_repl_back0: ∀f1,f2. eq_repl_back (λf. f2 ~⊚ f1 ≘ f).
+#f2 #f1 #f * -f2 -f1 -f
+#f2 #f1 #f01 #g2 [1,2: #g1 ] #g01 #Hf01 #H2 [1,2: #H1 ] #H01 #g02 #H0
+[ cases (eq_inv_px … H0 … H01) -g01 /3 width=7 by coafter_refl/
+| cases (eq_inv_nx … H0 … H01) -g01 /3 width=7 by coafter_push/
+| cases (eq_inv_px … H0 … H01) -g01 /3 width=5 by coafter_next/
+]
+qed-.
+
+lemma coafter_eq_repl_fwd0: ∀f2,f1. eq_repl_fwd (λf. f2 ~⊚ f1 ≘ f).
+#f2 #f1 @eq_repl_sym /2 width=3 by coafter_eq_repl_back0/
+qed-.
+
+(* Main inversion lemmas ****************************************************)
+
+corec theorem coafter_mono: ∀f1,f2,x,y. f1 ~⊚ f2 ≘ x → f1 ~⊚ f2 ≘ y → x ≡ y.
+#f1 #f2 #x #y * -f1 -f2 -x
+#f1 #f2 #x #g1 [1,2: #g2 ] #g #Hx #H1 [1,2: #H2 ] #H0x #Hy
+[ cases (coafter_inv_ppx … Hy … H1 H2) -g1 -g2 /3 width=8 by eq_push/
+| cases (coafter_inv_pnx … Hy … H1 H2) -g1 -g2 /3 width=8 by eq_next/
+| cases (coafter_inv_nxx … Hy … H1) -g1 /3 width=8 by eq_push/
+]
+qed-.
+
+lemma coafter_mono_eq: ∀f1,f2,f. f1 ~⊚ f2 ≘ f → ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
+ f1 ≡ g1 → f2 ≡ g2 → f ≡ g.
+/4 width=4 by coafter_mono, coafter_eq_repl_back1, coafter_eq_repl_back2/ qed-.
+
+(* Forward lemmas with pushs ************************************************)
+
+lemma coafter_fwd_pushs: ∀j,i,g2,f1,g. g2 ~⊚ ⫯*[i]f1 ≘ g → @❪i, g2❫ ≘ j →
+ ∃f. ⫯*[j] f = g.
+#j elim j -j
+[ #i #g2 #f1 #g #Hg #H
+ elim (at_inv_xxp … H) -H [|*: // ] #f2 #H1 #H2 destruct
+ /2 width=2 by ex_intro/
+| #j #IH * [| #i ] #g2 #f1 #g #Hg #H
+ [ elim (at_inv_pxn … H) -H [|*: // ] #f2 #Hij #H destruct
+ elim (coafter_inv_nxx … Hg) -Hg [|*: // ] #f #Hf #H destruct
+ elim (IH … Hf Hij) -f1 -f2 -IH /2 width=2 by ex_intro/
+ | elim (at_inv_nxn … H) -H [1,4: * |*: // ] #f2 #Hij #H destruct
+ [ elim (coafter_inv_ppx … Hg) -Hg [|*: // ] #f #Hf #H destruct
+ elim (IH … Hf Hij) -f1 -f2 -i /2 width=2 by ex_intro/
+ | elim (coafter_inv_nxx … Hg) -Hg [|*: // ] #f #Hf #H destruct
+ elim (IH … Hf Hij) -f1 -f2 -i /2 width=2 by ex_intro/
+ ]
+ ]
+]
+qed-.
+
+(* Inversion lemmas with tail ***********************************************)
+
+lemma coafter_inv_tl1: ∀g2,g1,g. g2 ~⊚ ⫱g1 ≘ g →
+ ∃∃f. ⫯g2 ~⊚ g1 ≘ f & ⫱f = g.
+#g2 #g1 #g elim (pn_split g1) * #f1 #H1 #H destruct
+[ /3 width=7 by coafter_refl, ex2_intro/
+| @(ex2_intro … (↑g)) /2 width=7 by coafter_push/ (**) (* full auto fails *)
+]
+qed-.
+
+lemma coafter_inv_tl0: ∀g2,g1,g. g2 ~⊚ g1 ≘ ⫱g →
+ ∃∃f1. ⫯g2 ~⊚ f1 ≘ g & ⫱f1 = g1.
+#g2 #g1 #g elim (pn_split g) * #f #H0 #H destruct
+[ /3 width=7 by coafter_refl, ex2_intro/
+| @(ex2_intro … (↑g1)) /2 width=7 by coafter_push/ (**) (* full auto fails *)
+]
+qed-.
+
+(* Properties with iterated tail ********************************************)
+
+lemma coafter_tls: ∀j,i,f1,f2,f. @❪i, f1❫ ≘ j →
+ f1 ~⊚ f2 ≘ f → ⫱*[j]f1 ~⊚ ⫱*[i]f2 ≘ ⫱*[j]f.
+#j elim j -j [ #i | #j #IH * [| #i ] ] #f1 #f2 #f #Hf1 #Hf
+[ elim (at_inv_xxp … Hf1) -Hf1 [ |*: // ] #g1 #Hg1 #H1 destruct //
+| elim (at_inv_pxn … Hf1) -Hf1 [ |*: // ] #g1 #Hg1 #H1
+ elim (coafter_inv_nxx … Hf … H1) -Hf #g #Hg #H0 destruct
+ lapply (IH … Hg1 Hg) -IH -Hg1 -Hg //
+| elim (at_inv_nxn … Hf1) -Hf1 [1,4: * |*: // ] #g1 #Hg1 #H1
+ [ elim (coafter_inv_pxx … Hf … H1) -Hf * #g2 #g #Hg #H2 #H0 destruct
+ lapply (IH … Hg1 Hg) -IH -Hg1 -Hg #H //
+ | elim (coafter_inv_nxx … Hf … H1) -Hf #g #Hg #H0 destruct
+ lapply (IH … Hg1 Hg) -IH -Hg1 -Hg #H //
+ ]
+]
+qed.
+
+lemma coafter_tls_O: ∀n,f1,f2,f. @❪0, f1❫ ≘ n →
+ f1 ~⊚ f2 ≘ f → ⫱*[n]f1 ~⊚ f2 ≘ ⫱*[n]f.
+/2 width=1 by coafter_tls/ qed.
+
+lemma coafter_tls_succ: ∀g2,g1,g. g2 ~⊚ g1 ≘ g →
+ ∀n. @❪0, g2❫ ≘ n → ⫱*[↑n]g2 ~⊚ ⫱g1 ≘ ⫱*[↑n]g.
+#g2 #g1 #g #Hg #n #Hg2
+lapply (coafter_tls … Hg2 … Hg) -Hg #Hg
+lapply (at_pxx_tls … Hg2) -Hg2 #H
+elim (at_inv_pxp … H) -H [ |*: // ] #f2 #H2
+elim (coafter_inv_pxx … Hg … H2) -Hg * #f1 #f #Hf #H1 #H0 destruct
+<tls_S <tls_S <H2 <H0 -g2 -g -n //
+qed.
+
+lemma coafter_fwd_xpx_pushs: ∀g2,f1,g,i,j. @❪i, g2❫ ≘ j → g2 ~⊚ ⫯*[↑i]f1 ≘ g →
+ ∃∃f. ⫱*[↑j]g2 ~⊚ f1 ≘ f & ⫯*[↑j]f = g.
+#g2 #g1 #g #i #j #Hg2 <pushs_xn #Hg
+elim (coafter_fwd_pushs … Hg Hg2) #f #H0 destruct
+lapply (coafter_tls … Hg2 Hg) -Hg <tls_pushs <tls_pushs #Hf
+lapply (at_inv_tls … Hg2) -Hg2 #H
+lapply (coafter_eq_repl_fwd2 … Hf … H) -H -Hf #Hf
+elim (coafter_inv_ppx … Hf) [|*: // ] -Hf #g #Hg #H destruct
+/2 width=3 by ex2_intro/
+qed-.
+
+lemma coafter_fwd_xnx_pushs: ∀g2,f1,g,i,j. @❪i, g2❫ ≘ j → g2 ~⊚ ⫯*[i]↑f1 ≘ g →
+ ∃∃f. ⫱*[↑j]g2 ~⊚ f1 ≘ f & ⫯*[j] ↑f = g.
+#g2 #g1 #g #i #j #Hg2 #Hg
+elim (coafter_fwd_pushs … Hg Hg2) #f #H0 destruct
+lapply (coafter_tls … Hg2 Hg) -Hg <tls_pushs <tls_pushs #Hf
+lapply (at_inv_tls … Hg2) -Hg2 #H
+lapply (coafter_eq_repl_fwd2 … Hf … H) -H -Hf #Hf
+elim (coafter_inv_pnx … Hf) [|*: // ] -Hf #g #Hg #H destruct
+/2 width=3 by ex2_intro/
+qed-.
+
+(* Properties with test for identity ****************************************)
+
+corec lemma coafter_isid_sn: ∀f1. 𝐈❪f1❫ → ∀f2. f1 ~⊚ f2 ≘ f2.
+#f1 * -f1 #f1 #g1 #Hf1 #H1 #f2 cases (pn_split f2) * #g2 #H2
+/3 width=7 by coafter_push, coafter_refl/
+qed.
+
+corec lemma coafter_isid_dx: ∀f2,f. 𝐈❪f2❫ → 𝐈❪f❫ → ∀f1. f1 ~⊚ f2 ≘ f.
+#f2 #f * -f2 #f2 #g2 #Hf2 #H2 * -f #f #g #Hf #H #f1 cases (pn_split f1) * #g1 #H1
+[ /3 width=7 by coafter_refl/
+| @(coafter_next … H1 … H) /3 width=3 by isid_push/
+]
+qed.
+
+(* Inversion lemmas with test for identity **********************************)
+
+lemma coafter_isid_inv_sn: ∀f1,f2,f. f1 ~⊚ f2 ≘ f → 𝐈❪f1❫ → f2 ≡ f.
+/3 width=6 by coafter_isid_sn, coafter_mono/ qed-.
+
+lemma coafter_isid_inv_dx: ∀f1,f2,f. f1 ~⊚ f2 ≘ f → 𝐈❪f2❫ → 𝐈❪f❫.
+/4 width=4 by eq_id_isid, coafter_isid_dx, coafter_mono/ qed-.
+
+(* Properties with test for uniform relocations *****************************)
+
+lemma coafter_isuni_isid: ∀f2. 𝐈❪f2❫ → ∀f1. 𝐔❪f1❫ → f1 ~⊚ f2 ≘ f2.
+#f #Hf #g #H elim H -g
+/3 width=5 by coafter_isid_sn, coafter_eq_repl_back0, coafter_next, eq_push_inv_isid/
+qed.
+
+
+(*
+lemma coafter_isid_isuni: ∀f1,f2. 𝐈❪f2❫ → 𝐔❪f1❫ → f1 ~⊚ ↑f2 ≘ ↑f1.
+#f1 #f2 #Hf2 #H elim H -H
+/5 width=7 by coafter_isid_dx, coafter_eq_repl_back2, coafter_next, coafter_push, eq_push_inv_isid/
+qed.
+
+lemma coafter_uni_next2: ∀f2. 𝐔❪f2❫ → ∀f1,f. ↑f2 ~⊚ f1 ≘ f → f2 ~⊚ ↑f1 ≘ f.
+#f2 #H elim H -f2
+[ #f2 #Hf2 #f1 #f #Hf
+ elim (coafter_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H0 destruct
+ /4 width=7 by coafter_isid_inv_sn, coafter_isid_sn, coafter_eq_repl_back0, eq_next/
+| #f2 #_ #g2 #H2 #IH #f1 #f #Hf
+ elim (coafter_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H0 destruct
+ /3 width=5 by coafter_next/
+]
+qed.
+*)
+
+(* Properties with uniform relocations **************************************)
+
+lemma coafter_uni_sn: ∀i,f. 𝐔❨i❩ ~⊚ f ≘ ⫯*[i] f.
+#i elim i -i /2 width=5 by coafter_isid_sn, coafter_next/
+qed.
+
+(*
+lemma coafter_uni: ∀n1,n2. 𝐔❨n1❩ ~⊚ 𝐔❨n2❩ ≘ 𝐔❨n1+n2❩.
+@nat_elim2
+/4 width=5 by coafter_uni_next2, coafter_isid_sn, coafter_isid_dx, coafter_next/
+qed.
+
+(* Forward lemmas on at *****************************************************)
+
+lemma coafter_at_fwd: ∀i,i1,f. @❪i1, f❫ ≘ i → ∀f2,f1. f2 ~⊚ f1 ≘ f →
+ ∃∃i2. @❪i1, f1❫ ≘ i2 & @❪i2, f2❫ ≘ i.
+#i elim i -i [2: #i #IH ] #i1 #f #Hf #f2 #f1 #Hf21
+[ elim (at_inv_xxn … Hf) -Hf [1,3:* |*: // ]
+ [1: #g #j1 #Hg #H0 #H |2,4: #g #Hg #H ]
+| elim (at_inv_xxp … Hf) -Hf //
+ #g #H1 #H
+]
+[2: elim (coafter_inv_xxn … Hf21 … H) -f *
+ [ #g2 #g1 #Hg21 #H2 #H1 | #g2 #Hg21 #H2 ]
+|*: elim (coafter_inv_xxp … Hf21 … H) -f
+ #g2 #g1 #Hg21 #H2 #H1
+]
+[4: -Hg21 |*: elim (IH … Hg … Hg21) -g -IH ]
+/3 width=9 by at_refl, at_push, at_next, ex2_intro/
+qed-.
+
+lemma coafter_fwd_at: ∀i,i2,i1,f1,f2. @❪i1, f1❫ ≘ i2 → @❪i2, f2❫ ≘ i →
+ ∀f. f2 ~⊚ f1 ≘ f → @❪i1, f❫ ≘ i.
+#i elim i -i [2: #i #IH ] #i2 #i1 #f1 #f2 #Hf1 #Hf2 #f #Hf
+[ elim (at_inv_xxn … Hf2) -Hf2 [1,3: * |*: // ]
+ #g2 [ #j2 ] #Hg2 [ #H22 ] #H20
+ [ elim (at_inv_xxn … Hf1 … H22) -i2 *
+ #g1 [ #j1 ] #Hg1 [ #H11 ] #H10
+ [ elim (coafter_inv_ppx … Hf … H20 H10) -f1 -f2 /3 width=7 by at_push/
+ | elim (coafter_inv_pnx … Hf … H20 H10) -f1 -f2 /3 width=6 by at_next/
+ ]
+ | elim (coafter_inv_nxx … Hf … H20) -f2 /3 width=7 by at_next/
+ ]
+| elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H22 #H20
+ elim (at_inv_xxp … Hf1 … H22) -i2 #g1 #H11 #H10
+ elim (coafter_inv_ppx … Hf … H20 H10) -f1 -f2 /2 width=2 by at_refl/
+]
+qed-.
+
+lemma coafter_fwd_at2: ∀f,i1,i. @❪i1, f❫ ≘ i → ∀f1,i2. @❪i1, f1❫ ≘ i2 →
+ ∀f2. f2 ~⊚ f1 ≘ f → @❪i2, f2❫ ≘ i.
+#f #i1 #i #Hf #f1 #i2 #Hf1 #f2 #H elim (coafter_at_fwd … Hf … H) -f
+#j1 #H #Hf2 <(at_mono … Hf1 … H) -i1 -i2 //
+qed-.
+
+lemma coafter_fwd_at1: ∀i,i2,i1,f,f2. @❪i1, f❫ ≘ i → @❪i2, f2❫ ≘ i →
+ ∀f1. f2 ~⊚ f1 ≘ f → @❪i1, f1❫ ≘ i2.
+#i elim i -i [2: #i #IH ] #i2 #i1 #f #f2 #Hf #Hf2 #f1 #Hf1
+[ elim (at_inv_xxn … Hf) -Hf [1,3: * |*: // ]
+ #g [ #j1 ] #Hg [ #H01 ] #H00
+ elim (at_inv_xxn … Hf2) -Hf2 [1,3,5,7: * |*: // ]
+ #g2 [1,3: #j2 ] #Hg2 [1,2: #H22 ] #H20
+ [ elim (coafter_inv_pxp … Hf1 … H20 H00) -f2 -f /3 width=7 by at_push/
+ | elim (coafter_inv_pxn … Hf1 … H20 H00) -f2 -f /3 width=5 by at_next/
+ | elim (coafter_inv_nxp … Hf1 … H20 H00)
+ | /4 width=9 by coafter_inv_nxn, at_next/
+ ]
+| elim (at_inv_xxp … Hf) -Hf // #g #H01 #H00
+ elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H21 #H20
+ elim (coafter_inv_pxp … Hf1 … H20 H00) -f2 -f /3 width=2 by at_refl/
+]
+qed-.
+
+(* Properties with at *******************************************************)
+
+lemma coafter_uni_dx: ∀i2,i1,f2. @❪i1, f2❫ ≘ i2 →
+ ∀f. f2 ~⊚ 𝐔❨i1❩ ≘ f → 𝐔❨i2❩ ~⊚ ⫱*[i2] f2 ≘ f.
+#i2 elim i2 -i2
+[ #i1 #f2 #Hf2 #f #Hf
+ elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H1 #H2 destruct
+ lapply (coafter_isid_inv_dx … Hf ?) -Hf
+ /3 width=3 by coafter_isid_sn, coafter_eq_repl_back0/
+| #i2 #IH #i1 #f2 #Hf2 #f #Hf
+ elim (at_inv_xxn … Hf2) -Hf2 [1,3: * |*: // ]
+ [ #g2 #j1 #Hg2 #H1 #H2 destruct
+ elim (coafter_inv_pnx … Hf) -Hf [ |*: // ] #g #Hg #H destruct
+ /3 width=5 by coafter_next/
+ | #g2 #Hg2 #H2 destruct
+ elim (coafter_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H destruct
+ /3 width=5 by coafter_next/
+ ]
+]
+qed.
+
+lemma coafter_uni_sn: ∀i2,i1,f2. @❪i1, f2❫ ≘ i2 →
+ ∀f. 𝐔❨i2❩ ~⊚ ⫱*[i2] f2 ≘ f → f2 ~⊚ 𝐔❨i1❩ ≘ f.
+#i2 elim i2 -i2
+[ #i1 #f2 #Hf2 #f #Hf
+ elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H1 #H2 destruct
+ lapply (coafter_isid_inv_sn … Hf ?) -Hf
+ /3 width=3 by coafter_isid_dx, coafter_eq_repl_back0/
+| #i2 #IH #i1 #f2 #Hf2 #f #Hf
+ elim (coafter_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H destruct
+ elim (at_inv_xxn … Hf2) -Hf2 [1,3: * |*: // ]
+ [ #g2 #j1 #Hg2 #H1 #H2 destruct /3 width=7 by coafter_push/
+ | #g2 #Hg2 #H2 destruct /3 width=5 by coafter_next/
+ ]
+]
+qed-.
+
+lemma coafter_uni_succ_dx: ∀i2,i1,f2. @❪i1, f2❫ ≘ i2 →
+ ∀f. f2 ~⊚ 𝐔❨↑i1❩ ≘ f → 𝐔❨↑i2❩ ~⊚ ⫱*[↑i2] f2 ≘ f.
+#i2 elim i2 -i2
+[ #i1 #f2 #Hf2 #f #Hf
+ elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H1 #H2 destruct
+ elim (coafter_inv_pnx … Hf) -Hf [ |*: // ] #g #Hg #H
+ lapply (coafter_isid_inv_dx … Hg ?) -Hg
+ /4 width=5 by coafter_isid_sn, coafter_eq_repl_back0, coafter_next/
+| #i2 #IH #i1 #f2 #Hf2 #f #Hf
+ elim (at_inv_xxn … Hf2) -Hf2 [1,3: * |*: // ]
+ [ #g2 #j1 #Hg2 #H1 #H2 destruct
+ elim (coafter_inv_pnx … Hf) -Hf [ |*: // ] #g #Hg #H destruct
+ /3 width=5 by coafter_next/
+ | #g2 #Hg2 #H2 destruct
+ elim (coafter_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H destruct
+ /3 width=5 by coafter_next/
+ ]
+]
+qed.
+
+lemma coafter_uni_succ_sn: ∀i2,i1,f2. @❪i1, f2❫ ≘ i2 →
+ ∀f. 𝐔❨↑i2❩ ~⊚ ⫱*[↑i2] f2 ≘ f → f2 ~⊚ 𝐔❨↑i1❩ ≘ f.
+#i2 elim i2 -i2
+[ #i1 #f2 #Hf2 #f #Hf
+ elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H1 #H2 destruct
+ elim (coafter_inv_nxx … Hf) -Hf [ |*: // ] #g #Hg #H destruct
+ lapply (coafter_isid_inv_sn … Hg ?) -Hg
+ /4 width=7 by coafter_isid_dx, coafter_eq_repl_back0, coafter_push/
+| #i2 #IH #i1 #f2 #Hf2 #f #Hf
+ elim (coafter_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H destruct
+ elim (at_inv_xxn … Hf2) -Hf2 [1,3: * |*: // ]
+ [ #g2 #j1 #Hg2 #H1 #H2 destruct <tls_xn in Hg; /3 width=7 by coafter_push/
+ | #g2 #Hg2 #H2 destruct <tls_xn in Hg; /3 width=5 by coafter_next/
+ ]
+]
+qed-.
+
+lemma coafter_uni_one_dx: ∀f2,f. ⫯f2 ~⊚ 𝐔❨↑O❩ ≘ f → 𝐔❨↑O❩ ~⊚ f2 ≘ f.
+#f2 #f #H @(coafter_uni_succ_dx … (⫯f2)) /2 width=3 by at_refl/
+qed.
+
+lemma coafter_uni_one_sn: ∀f1,f. 𝐔❨↑O❩ ~⊚ f1 ≘ f → ⫯f1 ~⊚ 𝐔❨↑O❩ ≘ f.
+/3 width=3 by coafter_uni_succ_sn, at_refl/ qed-.
+*)
+(* Forward lemmas with istot ************************************************)
+(*
+lemma coafter_istot_fwd: ∀f2,f1,f. f2 ~⊚ f1 ≘ f → 𝐓❪f2❫ → 𝐓❪f1❫ → 𝐓❪f❫.
+#f2 #f1 #f #Hf #Hf2 #Hf1 #i1 elim (Hf1 i1) -Hf1
+#i2 #Hf1 elim (Hf2 i2) -Hf2
+/3 width=7 by coafter_fwd_at, ex_intro/
+qed-.
+
+lemma coafter_fwd_istot_dx: ∀f2,f1,f. f2 ~⊚ f1 ≘ f → 𝐓❪f❫ → 𝐓❪f1❫.
+#f2 #f1 #f #H #Hf #i1 elim (Hf i1) -Hf
+#i2 #Hf elim (coafter_at_fwd … Hf … H) -f /2 width=2 by ex_intro/
+qed-.
+
+lemma coafter_fwd_istot_sn: ∀f2,f1,f. f2 ~⊚ f1 ≘ f → 𝐓❪f❫ → 𝐓❪f2❫.
+#f2 #f1 #f #H #Hf #i1 elim (Hf i1) -Hf
+#i #Hf elim (coafter_at_fwd … Hf … H) -f
+#i2 #Hf1 #Hf2 lapply (at_increasing … Hf1) -f1
+#Hi12 elim (at_le_ex … Hf2 … Hi12) -i2 /2 width=2 by ex_intro/
+qed-.
+
+lemma coafter_inv_istot: ∀f2,f1,f. f2 ~⊚ f1 ≘ f → 𝐓❪f❫ → 𝐓❪f2❫ ∧ 𝐓❪f1❫.
+/3 width=4 by coafter_fwd_istot_sn, coafter_fwd_istot_dx, conj/ qed-.
+
+lemma coafter_at1_fwd: ∀f1,i1,i2. @❪i1, f1❫ ≘ i2 → ∀f2. 𝐓❪f2❫ → ∀f. f2 ~⊚ f1 ≘ f →
+ ∃∃i. @❪i2, f2❫ ≘ i & @❪i1, f❫ ≘ i.
+#f1 #i1 #i2 #Hf1 #f2 #Hf2 #f #Hf elim (Hf2 i2) -Hf2
+/3 width=8 by coafter_fwd_at, ex2_intro/
+qed-.
+
+lemma coafter_fwd_isid_sn: ∀f2,f1,f. 𝐓❪f❫ → f2 ~⊚ f1 ≘ f → f1 ≡ f → 𝐈❪f2❫.
+#f2 #f1 #f #H #Hf elim (coafter_inv_istot … Hf H) -H
+#Hf2 #Hf1 #H @isid_at_total // -Hf2
+#i2 #i #Hf2 elim (Hf1 i2) -Hf1
+#i0 #Hf1 lapply (at_increasing … Hf1)
+#Hi20 lapply (coafter_fwd_at2 … i0 … Hf1 … Hf) -Hf
+/3 width=7 by at_eq_repl_back, at_mono, at_id_le/
+qed-.
+
+lemma coafter_fwd_isid_dx: ∀f2,f1,f. 𝐓❪f❫ → f2 ~⊚ f1 ≘ f → f2 ≡ f → 𝐈❪f1❫.
+#f2 #f1 #f #H #Hf elim (coafter_inv_istot … Hf H) -H
+#Hf2 #Hf1 #H2 @isid_at_total // -Hf1
+#i1 #i2 #Hi12 elim (coafter_at1_fwd … Hi12 … Hf) -f1
+/3 width=8 by at_inj, at_eq_repl_back/
+qed-.
+*)
+corec fact coafter_inj_O_aux: ∀f1. @❪0, f1❫ ≘ 0 → H_coafter_inj f1.
+#f1 #H1f1 #H2f1 #f #f21 #f22 #H1f #H2f
+cases (at_inv_pxp … H1f1) -H1f1 [ |*: // ] #g1 #H1
+lapply (istot_inv_push … H2f1 … H1) -H2f1 #H2g1
+cases (H2g1 0) #n #Hn
+cases (coafter_inv_pxx … H1f … H1) -H1f * #g21 #g #H1g #H21 #H
+[ cases (coafter_inv_pxp … H2f … H1 H) -f1 -f #g22 #H2g #H22
+ @(eq_push … H21 H22) -f21 -f22
+| cases (coafter_inv_pxn … H2f … H1 H) -f1 -f #g22 #H2g #H22
+ @(eq_next … H21 H22) -f21 -f22
+]
+@(coafter_inj_O_aux (⫱*[n]g1) … (⫱*[n]g)) -coafter_inj_O_aux
+/2 width=1 by coafter_tls, istot_tls, at_pxx_tls/
+qed-.
+
+fact coafter_inj_aux: (∀f1. @❪0, f1❫ ≘ 0 → H_coafter_inj f1) →
+ ∀i2,f1. @❪0, f1❫ ≘ i2 → H_coafter_inj f1.
+#H0 #i2 elim i2 -i2 /2 width=1 by/ -H0
+#i2 #IH #f1 #H1f1 #H2f1 #f #f21 #f22 #H1f #H2f
+elim (at_inv_pxn … H1f1) -H1f1 [ |*: // ] #g1 #H1g1 #H1
+elim (coafter_inv_nxx … H1f … H1) -H1f #g #H1g #H
+lapply (coafter_inv_nxp … H2f … H1 H) -f #H2g
+/3 width=6 by istot_inv_next/
+qed-.
+
+theorem coafter_inj: ∀f1. H_coafter_inj f1.
+#f1 #H cases (H 0) /3 width=7 by coafter_inj_aux, coafter_inj_O_aux/
+qed-.
+
+corec fact coafter_fwd_isid2_O_aux: ∀f1. @❪0, f1❫ ≘ 0 →
+ H_coafter_fwd_isid2 f1.
+#f1 #H1f1 #f2 #f #H #H2f1 #Hf
+cases (at_inv_pxp … H1f1) -H1f1 [ |*: // ] #g1 #H1
+lapply (istot_inv_push … H2f1 … H1) -H2f1 #H2g1
+cases (H2g1 0) #n #Hn
+cases (coafter_inv_pxx … H … H1) -H * #g2 #g #H #H2 #H0
+[ lapply (isid_inv_push … Hf … H0) -Hf #Hg
+ @(isid_push … H2) -H2
+ /3 width=7 by coafter_tls_O, at_pxx_tls, istot_tls, isid_tls/
+| cases (isid_inv_next … Hf … H0)
+]
+qed-.
+
+fact coafter_fwd_isid2_aux: (∀f1. @❪0, f1❫ ≘ 0 → H_coafter_fwd_isid2 f1) →
+ ∀i2,f1. @❪0, f1❫ ≘ i2 → H_coafter_fwd_isid2 f1.
+#H0 #i2 elim i2 -i2 /2 width=1 by/ -H0
+#i2 #IH #f1 #H1f1 #f2 #f #H #H2f1 #Hf
+elim (at_inv_pxn … H1f1) -H1f1 [ |*: // ] #g1 #Hg1 #H1
+elim (coafter_inv_nxx … H … H1) -H #g #Hg #H0
+@(IH … Hg1 … Hg) /2 width=3 by istot_inv_next, isid_inv_push/ (**) (* full auto fails *)
+qed-.
+
+lemma coafter_fwd_isid2: ∀f1. H_coafter_fwd_isid2 f1.
+#f1 #f2 #f #Hf #H cases (H 0)
+/3 width=7 by coafter_fwd_isid2_aux, coafter_fwd_isid2_O_aux/
+qed-.
+
+fact coafter_isfin2_fwd_O_aux: ∀f1. @❪0, f1❫ ≘ 0 →
+ H_coafter_isfin2_fwd f1.
+#f1 #Hf1 #f2 #H
+generalize in match Hf1; generalize in match f1; -f1
+@(isfin_ind … H) -f2
+[ /3 width=4 by coafter_isid_inv_dx, isfin_isid/ ]
+#f2 #_ #IH #f1 #H #Hf1 #f #Hf
+elim (at_inv_pxp … H) -H [ |*: // ] #g1 #H1
+lapply (istot_inv_push … Hf1 … H1) -Hf1 #Hg1
+elim (Hg1 0) #n #Hn
+[ elim (coafter_inv_ppx … Hf) | elim (coafter_inv_pnx … Hf)
+] -Hf [1,6: |*: // ] #g #Hg #H0 destruct
+/5 width=6 by isfin_next, isfin_push, isfin_inv_tls, istot_tls, at_pxx_tls, coafter_tls_O/
+qed-.
+
+fact coafter_isfin2_fwd_aux: (∀f1. @❪0, f1❫ ≘ 0 → H_coafter_isfin2_fwd f1) →
+ ∀i2,f1. @❪0, f1❫ ≘ i2 → H_coafter_isfin2_fwd f1.
+#H0 #i2 elim i2 -i2 /2 width=1 by/ -H0
+#i2 #IH #f1 #H1f1 #f2 #Hf2 #H2f1 #f #Hf
+elim (at_inv_pxn … H1f1) -H1f1 [ |*: // ] #g1 #Hg1 #H1
+elim (coafter_inv_nxx … Hf … H1) -Hf #g #Hg #H0
+lapply (IH … Hg1 … Hg) -i2 -Hg
+/2 width=4 by istot_inv_next, isfin_push/ (**) (* full auto fails *)
+qed-.
+
+lemma coafter_isfin2_fwd: ∀f1. H_coafter_isfin2_fwd f1.
+#f1 #f2 #Hf2 #Hf1 cases (Hf1 0)
+/3 width=7 by coafter_isfin2_fwd_aux, coafter_isfin2_fwd_O_aux/
+qed-.
+
+lemma coafter_inv_sor: ∀f. 𝐅❪f❫ → ∀f2. 𝐓❪f2❫ → ∀f1. f2 ~⊚ f1 ≘ f → ∀fa,fb. fa ⋓ fb ≘ f →
+ ∃∃f1a,f1b. f2 ~⊚ f1a ≘ fa & f2 ~⊚ f1b ≘ fb & f1a ⋓ f1b ≘ f1.
+@isfin_ind
+[ #f #Hf #f2 #Hf2 #f1 #H1f #fa #fb #H2f
+ elim (sor_inv_isid3 … H2f) -H2f //
+ lapply (coafter_fwd_isid2 … H1f ??) -H1f //
+ /3 width=5 by ex3_2_intro, coafter_isid_dx, sor_isid/
+| #f #_ #IH #f2 #Hf2 #f1 #H1 #fa #fb #H2
+ elim (sor_inv_xxp … H2) -H2 [ |*: // ] #ga #gb #H2f
+ elim (coafter_inv_xxp … H1) -H1 [1,3: * |*: // ] #g2 [ #g1 ] #H1f #Hgf2
+ [ lapply (istot_inv_push … Hf2 … Hgf2) | lapply (istot_inv_next … Hf2 … Hgf2) ] -Hf2 #Hg2
+ elim (IH … Hg2 … H1f … H2f) -f -Hg2
+ /3 width=11 by sor_pp, ex3_2_intro, coafter_refl, coafter_next/
+| #f #_ #IH #f2 #Hf2 #f1 #H1 #fa #fb #H2
+ elim (coafter_inv_xxn … H1) -H1 [ |*: // ] #g2 #g1 #H1f #Hgf2
+ lapply (istot_inv_push … Hf2 … Hgf2) -Hf2 #Hg2
+ elim (sor_inv_xxn … H2) -H2 [1,3,4: * |*: // ] #ga #gb #H2f
+ elim (IH … Hg2 … H1f … H2f) -f -Hg2
+ /3 width=11 by sor_np, sor_pn, sor_nn, ex3_2_intro, coafter_refl, coafter_push/
+]
+qed-.
+
+(* Properties with istot ****************************************************)
+
+lemma coafter_sor: ∀f. 𝐅❪f❫ → ∀f2. 𝐓❪f2❫ → ∀f1. f2 ~⊚ f1 ≘ f → ∀f1a,f1b. f1a ⋓ f1b ≘ f1 →
+ ∃∃fa,fb. f2 ~⊚ f1a ≘ fa & f2 ~⊚ f1b ≘ fb & fa ⋓ fb ≘ f.
+@isfin_ind
+[ #f #Hf #f2 #Hf2 #f1 #Hf #f1a #f1b #Hf1
+ lapply (coafter_fwd_isid2 … Hf ??) -Hf // #H2f1
+ elim (sor_inv_isid3 … Hf1) -Hf1 //
+ /3 width=5 by coafter_isid_dx, sor_idem, ex3_2_intro/
+| #f #_ #IH #f2 #Hf2 #f1 #H1 #f1a #f1b #H2
+ elim (coafter_inv_xxp … H1) -H1 [1,3: * |*: // ]
+ [ #g2 #g1 #Hf #Hgf2 #Hgf1
+ elim (sor_inv_xxp … H2) -H2 [ |*: // ] #ga #gb #Hg1
+ lapply (istot_inv_push … Hf2 … Hgf2) -Hf2 #Hg2
+ elim (IH … Hf … Hg1) // -f1 -g1 -IH -Hg2
+ /3 width=11 by coafter_refl, sor_pp, ex3_2_intro/
+ | #g2 #Hf #Hgf2
+ lapply (istot_inv_next … Hf2 … Hgf2) -Hf2 #Hg2
+ elim (IH … Hf … H2) // -f1 -IH -Hg2
+ /3 width=11 by coafter_next, sor_pp, ex3_2_intro/
+ ]
+| #f #_ #IH #f2 #Hf2 #f1 #H1 #f1a #f1b #H2
+ elim (coafter_inv_xxn … H1) -H1 [ |*: // ] #g2 #g1 #Hf #Hgf2 #Hgf1
+ lapply (istot_inv_push … Hf2 … Hgf2) -Hf2 #Hg2
+ elim (sor_inv_xxn … H2) -H2 [1,3,4: * |*: // ] #ga #gb #Hg1
+ elim (IH … Hf … Hg1) // -f1 -g1 -IH -Hg2
+ /3 width=11 by coafter_refl, coafter_push, sor_np, sor_pn, sor_nn, ex3_2_intro/
+]
+qed-.
+
+(* Properties with after ****************************************************)
+(*
+corec theorem coafter_trans1: ∀f0,f3,f4. f0 ~⊚ f3 ≘ f4 →
+ ∀f1,f2. f1 ~⊚ f2 ≘ f0 →
+ ∀f. f2 ~⊚ f3 ≘ f → f1 ~⊚ f ≘ f4.
+#f0 #f3 #f4 * -f0 -f3 -f4 #f0 #f3 #f4 #g0 [1,2: #g3 ] #g4
+[ #Hf4 #H0 #H3 #H4 #g1 #g2 #Hg0 #g #Hg
+ cases (coafter_inv_xxp … Hg0 … H0) -g0
+ #f1 #f2 #Hf0 #H1 #H2
+ cases (coafter_inv_ppx … Hg … H2 H3) -g2 -g3
+ #f #Hf #H /3 width=7 by coafter_refl/
+| #Hf4 #H0 #H3 #H4 #g1 #g2 #Hg0 #g #Hg
+ cases (coafter_inv_xxp … Hg0 … H0) -g0
+ #f1 #f2 #Hf0 #H1 #H2
+ cases (coafter_inv_pnx … Hg … H2 H3) -g2 -g3
+ #f #Hf #H /3 width=7 by coafter_push/
+| #Hf4 #H0 #H4 #g1 #g2 #Hg0 #g #Hg
+ cases (coafter_inv_xxn … Hg0 … H0) -g0 *
+ [ #f1 #f2 #Hf0 #H1 #H2
+ cases (coafter_inv_nxx … Hg … H2) -g2
+ #f #Hf #H /3 width=7 by coafter_push/
+ | #f1 #Hf0 #H1 /3 width=6 by coafter_next/
+ ]
+]
+qed-.
+
+corec theorem coafter_trans2: ∀f1,f0,f4. f1 ~⊚ f0 ≘ f4 →
+ ∀f2, f3. f2 ~⊚ f3 ≘ f0 →
+ ∀f. f1 ~⊚ f2 ≘ f → f ~⊚ f3 ≘ f4.
+#f1 #f0 #f4 * -f1 -f0 -f4 #f1 #f0 #f4 #g1 [1,2: #g0 ] #g4
+[ #Hf4 #H1 #H0 #H4 #g2 #g3 #Hg0 #g #Hg
+ cases (coafter_inv_xxp … Hg0 … H0) -g0
+ #f2 #f3 #Hf0 #H2 #H3
+ cases (coafter_inv_ppx … Hg … H1 H2) -g1 -g2
+ #f #Hf #H /3 width=7 by coafter_refl/
+| #Hf4 #H1 #H0 #H4 #g2 #g3 #Hg0 #g #Hg
+ cases (coafter_inv_xxn … Hg0 … H0) -g0 *
+ [ #f2 #f3 #Hf0 #H2 #H3
+ cases (coafter_inv_ppx … Hg … H1 H2) -g1 -g2
+ #f #Hf #H /3 width=7 by coafter_push/
+ | #f2 #Hf0 #H2
+ cases (coafter_inv_pnx … Hg … H1 H2) -g1 -g2
+ #f #Hf #H /3 width=6 by coafter_next/
+ ]
+| #Hf4 #H1 #H4 #f2 #f3 #Hf0 #g #Hg
+ cases (coafter_inv_nxx … Hg … H1) -g1
+ #f #Hg #H /3 width=6 by coafter_next/
+]
+qed-.
+*)
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/xoa/ex_3_2.ma".
+include "ground/notation/relations/ideq_2.ma".
+include "ground/relocation/rtmap.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+coinductive eq: relation rtmap ≝
+| eq_push: ∀f1,f2,g1,g2. eq f1 f2 → ⫯f1 = g1 → ⫯f2 = g2 → eq g1 g2
+| eq_next: ∀f1,f2,g1,g2. eq f1 f2 → ↑f1 = g1 → ↑f2 = g2 → eq g1 g2
+.
+
+interpretation "extensional equivalence (rtmap)"
+ 'IdEq f1 f2 = (eq f1 f2).
+
+definition eq_repl (R:relation …) ≝
+ ∀f1,f2. f1 ≡ f2 → R f1 f2.
+
+definition eq_repl_back (R:predicate …) ≝
+ ∀f1. R f1 → ∀f2. f1 ≡ f2 → R f2.
+
+definition eq_repl_fwd (R:predicate …) ≝
+ ∀f1. R f1 → ∀f2. f2 ≡ f1 → R f2.
+
+(* Basic properties *********************************************************)
+
+corec lemma eq_refl: reflexive … eq.
+#f cases (pn_split f) *
+#g #Hg [ @(eq_push … Hg Hg) | @(eq_next … Hg Hg) ] -Hg //
+qed.
+
+corec lemma eq_sym: symmetric … eq.
+#f1 #f2 * -f1 -f2
+#f1 #f2 #g1 #g2 #Hf #H1 #H2
+[ @(eq_push … H2 H1) | @(eq_next … H2 H1) ] -g2 -g1 /2 width=1 by/
+qed-.
+
+lemma eq_repl_sym: ∀R. eq_repl_back R → eq_repl_fwd R.
+/3 width=3 by eq_sym/ qed-.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma eq_inv_px: ∀g1,g2. g1 ≡ g2 → ∀f1. ⫯f1 = g1 →
+ ∃∃f2. f1 ≡ f2 & ⫯f2 = g2.
+#g1 #g2 * -g1 -g2
+#f1 #f2 #g1 #g2 #Hf * * -g1 -g2
+#x1 #H
+[ lapply (injective_push … H) -H /2 width=3 by ex2_intro/
+| elim (discr_push_next … H)
+]
+qed-.
+
+lemma eq_inv_nx: ∀g1,g2. g1 ≡ g2 → ∀f1. ↑f1 = g1 →
+ ∃∃f2. f1 ≡ f2 & ↑f2 = g2.
+#g1 #g2 * -g1 -g2
+#f1 #f2 #g1 #g2 #Hf * * -g1 -g2
+#x1 #H
+[ elim (discr_next_push … H)
+| lapply (injective_next … H) -H /2 width=3 by ex2_intro/
+]
+qed-.
+
+lemma eq_inv_xp: ∀g1,g2. g1 ≡ g2 → ∀f2. ⫯f2 = g2 →
+ ∃∃f1. f1 ≡ f2 & ⫯f1 = g1.
+#g1 #g2 * -g1 -g2
+#f1 #f2 #g1 #g2 #Hf * * -g1 -g2
+#x2 #H
+[ lapply (injective_push … H) -H /2 width=3 by ex2_intro/
+| elim (discr_push_next … H)
+]
+qed-.
+
+lemma eq_inv_xn: ∀g1,g2. g1 ≡ g2 → ∀f2. ↑f2 = g2 →
+ ∃∃f1. f1 ≡ f2 & ↑f1 = g1.
+#g1 #g2 * -g1 -g2
+#f1 #f2 #g1 #g2 #Hf * * -g1 -g2
+#x2 #H
+[ elim (discr_next_push … H)
+| lapply (injective_next … H) -H /2 width=3 by ex2_intro/
+]
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma eq_inv_pp: ∀g1,g2. g1 ≡ g2 → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 → f1 ≡ f2.
+#g1 #g2 #H #f1 #f2 #H1 elim (eq_inv_px … H … H1) -g1
+#x2 #Hx2 * -g2
+#H lapply (injective_push … H) -H //
+qed-.
+
+lemma eq_inv_nn: ∀g1,g2. g1 ≡ g2 → ∀f1,f2. ↑f1 = g1 → ↑f2 = g2 → f1 ≡ f2.
+#g1 #g2 #H #f1 #f2 #H1 elim (eq_inv_nx … H … H1) -g1
+#x2 #Hx2 * -g2
+#H lapply (injective_next … H) -H //
+qed-.
+
+lemma eq_inv_pn: ∀g1,g2. g1 ≡ g2 → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 → ⊥.
+#g1 #g2 #H #f1 #f2 #H1 elim (eq_inv_px … H … H1) -g1
+#x2 #Hx2 * -g2
+#H elim (discr_next_push … H)
+qed-.
+
+lemma eq_inv_np: ∀g1,g2. g1 ≡ g2 → ∀f1,f2. ↑f1 = g1 → ⫯f2 = g2 → ⊥.
+#g1 #g2 #H #f1 #f2 #H1 elim (eq_inv_nx … H … H1) -g1
+#x2 #Hx2 * -g2
+#H elim (discr_push_next … H)
+qed-.
+
+lemma eq_inv_gen: ∀f1,f2. f1 ≡ f2 →
+ (∃∃g1,g2. g1 ≡ g2 & ⫯g1 = f1 & ⫯g2 = f2) ∨
+ ∃∃g1,g2. g1 ≡ g2 & ↑g1 = f1 & ↑g2 = f2.
+#f1 elim (pn_split f1) * #g1 #H1 #f2 #Hf
+[ elim (eq_inv_px … Hf … H1) -Hf /3 width=5 by or_introl, ex3_2_intro/
+| elim (eq_inv_nx … Hf … H1) -Hf /3 width=5 by or_intror, ex3_2_intro/
+]
+qed-.
+
+(* Main properties **********************************************************)
+
+corec theorem eq_trans: Transitive … eq.
+#f1 #f * -f1 -f
+#f1 #f #g1 #g #Hf1 #H1 #H #f2 #Hf2
+[ cases (eq_inv_px … Hf2 … H) | cases (eq_inv_nx … Hf2 … H) ] -g
+/3 width=5 by eq_push, eq_next/
+qed-.
+
+theorem eq_canc_sn: ∀f2. eq_repl_back (λf. f ≡ f2).
+/3 width=3 by eq_trans, eq_sym/ qed-.
+
+theorem eq_canc_dx: ∀f1. eq_repl_fwd (λf. f1 ≡ f).
+/3 width=3 by eq_trans, eq_sym/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/relations/rcolength_2.ma".
+include "ground/relocation/rtmap_isid.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+inductive fcla: relation2 rtmap nat ≝
+| fcla_isid: ∀f. 𝐈❪f❫ → fcla f 0
+| fcla_push: ∀f,n. fcla f n → fcla (⫯f) n
+| fcla_next: ∀f,n. fcla f n → fcla (↑f) (↑n)
+.
+
+interpretation "finite colength assignment (rtmap)"
+ 'RCoLength f n = (fcla f n).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma fcla_inv_px: ∀g,m. 𝐂❪g❫ ≘ m → ∀f. ⫯f = g → 𝐂❪f❫ ≘ m.
+#g #m * -g -m /3 width=3 by fcla_isid, isid_inv_push/
+#g #m #_ #f #H elim (discr_push_next … H)
+qed-.
+
+lemma fcla_inv_nx: ∀g,m. 𝐂❪g❫ ≘ m → ∀f. ↑f = g →
+ ∃∃n. 𝐂❪f❫ ≘ n & ↑n = m.
+#g #m * -g -m /2 width=3 by ex2_intro/
+[ #g #Hg #f #H elim (isid_inv_next … H) -H //
+| #g #m #_ #f #H elim (discr_next_push … H)
+]
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma cla_inv_nn: ∀g,m. 𝐂❪g❫ ≘ m → ∀f,n. ↑f = g → ↑n = m → 𝐂❪f❫ ≘ n.
+#g #m #H #f #n #H1 #H2 elim (fcla_inv_nx … H … H1) -g
+#x #Hf #H destruct //
+qed-.
+
+lemma cla_inv_np: ∀g,m. 𝐂❪g❫ ≘ m → ∀f. ↑f = g → 0 = m → ⊥.
+#g #m #H #f #H1 elim (fcla_inv_nx … H … H1) -g
+#x #_ #H1 #H2 destruct
+qed-.
+
+lemma fcla_inv_xp: ∀g,m. 𝐂❪g❫ ≘ m → 0 = m → 𝐈❪g❫.
+#g #m #H elim H -g -m /3 width=3 by isid_push/
+#g #m #_ #_ #H destruct
+qed-.
+
+lemma fcla_inv_isid: ∀f,n. 𝐂❪f❫ ≘ n → 𝐈❪f❫ → 0 = n.
+#f #n #H elim H -f -n /3 width=3 by isid_inv_push/
+#f #n #_ #_ #H elim (isid_inv_next … H) -H //
+qed-.
+
+(* Main forward lemmas ******************************************************)
+
+theorem fcla_mono: ∀f,n1. 𝐂❪f❫ ≘ n1 → ∀n2. 𝐂❪f❫ ≘ n2 → n1 = n2.
+#f #n #H elim H -f -n
+[ /2 width=3 by fcla_inv_isid/
+| /3 width=3 by fcla_inv_px/
+| #f #n1 #_ #IH #n2 #H elim (fcla_inv_nx … H) -H [2,3 : // ]
+ #g #Hf #H destruct /3 width=1 by eq_f/
+]
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma fcla_eq_repl_back: ∀n. eq_repl_back … (λf. 𝐂❪f❫ ≘ n).
+#n #f1 #H elim H -f1 -n /3 width=3 by fcla_isid, isid_eq_repl_back/
+#f1 #n #_ #IH #g2 #H [ elim (eq_inv_px … H) | elim (eq_inv_nx … H) ] -H
+/3 width=3 by fcla_push, fcla_next/
+qed-.
+
+lemma fcla_eq_repl_fwd: ∀n. eq_repl_fwd … (λf. 𝐂❪f❫ ≘ n).
+#n @eq_repl_sym /2 width=3 by fcla_eq_repl_back/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/relocation/nstream_id.ma".
+include "ground/relocation/rtmap_isid.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+(* Basic properties *********************************************************)
+
+lemma id_isid: 𝐈❪𝐈𝐝❫.
+/3 width=5 by eq_push_isid/ qed.
+
+(* Alternative definition of isid *******************************************)
+
+lemma eq_id_isid: ∀f. 𝐈𝐝 ≡ f → 𝐈❪f❫.
+/2 width=3 by isid_eq_repl_back/ qed.
+
+lemma eq_id_inv_isid: ∀f. 𝐈❪f❫ → 𝐈𝐝 ≡ f.
+/2 width=1 by isid_inv_eq_repl/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/relations/isdivergent_1.ma".
+include "ground/relocation/rtmap_nexts.ma".
+include "ground/relocation/rtmap_tls.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+coinductive isdiv: predicate rtmap ≝
+| isdiv_next: ∀f,g. isdiv f → ↑f = g → isdiv g
+.
+
+interpretation "test for divergence (rtmap)"
+ 'IsDivergent f = (isdiv f).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma isdiv_inv_gen: ∀g. 𝛀❪g❫ → ∃∃f. 𝛀❪f❫ & ↑f = g.
+#g * -g
+#f #g #Hf * /2 width=3 by ex2_intro/
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma isdiv_inv_next: ∀g. 𝛀❪g❫ → ∀f. ↑f = g → 𝛀❪f❫.
+#g #H elim (isdiv_inv_gen … H) -H
+#f #Hf * -g #g #H >(injective_next … H) -H //
+qed-.
+
+lemma isdiv_inv_push: ∀g. 𝛀❪g❫ → ∀f. ⫯f = g → ⊥.
+#g #H elim (isdiv_inv_gen … H) -H
+#f #Hf * -g #g #H elim (discr_push_next … H)
+qed-.
+
+(* Main inversion lemmas ****************************************************)
+
+corec theorem isdiv_inv_eq_repl: ∀f1,f2. 𝛀❪f1❫ → 𝛀❪f2❫ → f1 ≡ f2.
+#f1 #f2 #H1 #H2
+cases (isdiv_inv_gen … H1) -H1
+cases (isdiv_inv_gen … H2) -H2
+/3 width=5 by eq_next/
+qed-.
+
+(* Basic properties *********************************************************)
+
+corec lemma isdiv_eq_repl_back: eq_repl_back … isdiv.
+#f1 #H cases (isdiv_inv_gen … H) -H
+#g1 #Hg1 #H1 #f2 #Hf cases (eq_inv_nx … Hf … H1) -f1
+/3 width=3 by isdiv_next/
+qed-.
+
+lemma isdiv_eq_repl_fwd: eq_repl_fwd … isdiv.
+/3 width=3 by isdiv_eq_repl_back, eq_repl_sym/ qed-.
+
+(* Alternative definition ***************************************************)
+
+corec lemma eq_next_isdiv: ∀f. ↑f ≡ f → 𝛀❪f❫.
+#f #H cases (eq_inv_nx … H) -H /4 width=3 by isdiv_next, eq_trans/
+qed.
+
+corec lemma eq_next_inv_isdiv: ∀f. 𝛀❪f❫ → ↑f ≡ f.
+#f * -f
+#f #g #Hf #Hg @(eq_next … Hg) [2: @eq_next_inv_isdiv // | skip ]
+@eq_f //
+qed-.
+
+(* Properties with iterated next ********************************************)
+
+lemma isdiv_nexts: ∀n,f. 𝛀❪f❫ → 𝛀❪↑*[n]f❫.
+#n elim n -n /3 width=3 by isdiv_next/
+qed.
+
+(* Inversion lemmas with iterated next **************************************)
+
+lemma isdiv_inv_nexts: ∀n,g. 𝛀❪↑*[n]g❫ → 𝛀❪g❫.
+#n elim n -n /3 width=3 by isdiv_inv_next/
+qed.
+
+(* Properties with tail *****************************************************)
+
+lemma isdiv_tl: ∀f. 𝛀❪f❫ → 𝛀❪⫱f❫.
+#f cases (pn_split f) * #g * -f #H
+[ elim (isdiv_inv_push … H) -H //
+| /2 width=3 by isdiv_inv_next/
+]
+qed.
+
+(* Properties with iterated tail ********************************************)
+
+lemma isdiv_tls: ∀n,g. 𝛀❪g❫ → 𝛀❪⫱*[n]g❫.
+#n elim n -n /3 width=1 by isdiv_tl/
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/relations/isfinite_1.ma".
+include "ground/relocation/rtmap_fcla.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+definition isfin: predicate rtmap ≝
+ λf. ∃n. 𝐂❪f❫ ≘ n.
+
+interpretation "test for finite colength (rtmap)"
+ 'IsFinite f = (isfin f).
+
+(* Basic eliminators ********************************************************)
+
+lemma isfin_ind (R:predicate rtmap): (∀f. 𝐈❪f❫ → R f) →
+ (∀f. 𝐅❪f❫ → R f → R (⫯f)) →
+ (∀f. 𝐅❪f❫ → R f → R (↑f)) →
+ ∀f. 𝐅❪f❫ → R f.
+#R #IH1 #IH2 #IH3 #f #H elim H -H
+#n #H elim H -f -n /3 width=2 by ex_intro/
+qed-.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma isfin_inv_push: ∀g. 𝐅❪g❫ → ∀f. ⫯f = g → 𝐅❪f❫.
+#g * /3 width=4 by fcla_inv_px, ex_intro/
+qed-.
+
+lemma isfin_inv_next: ∀g. 𝐅❪g❫ → ∀f. ↑f = g → 𝐅❪f❫.
+#g * #n #H #f #H0 elim (fcla_inv_nx … H … H0) -g
+/2 width=2 by ex_intro/
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma isfin_eq_repl_back: eq_repl_back … isfin.
+#f1 * /3 width=4 by fcla_eq_repl_back, ex_intro/
+qed-.
+
+lemma isfin_eq_repl_fwd: eq_repl_fwd … isfin.
+/3 width=3 by isfin_eq_repl_back, eq_repl_sym/ qed-.
+
+lemma isfin_isid: ∀f. 𝐈❪f❫ → 𝐅❪f❫.
+/3 width=2 by fcla_isid, ex_intro/ qed.
+
+lemma isfin_push: ∀f. 𝐅❪f❫ → 𝐅❪⫯f❫.
+#f * /3 width=2 by fcla_push, ex_intro/
+qed.
+
+lemma isfin_next: ∀f. 𝐅❪f❫ → 𝐅❪↑f❫.
+#f * /3 width=2 by fcla_next, ex_intro/
+qed.
+
+(* Properties with iterated push ********************************************)
+
+lemma isfin_pushs: ∀n,f. 𝐅❪f❫ → 𝐅❪⫯*[n]f❫.
+#n elim n -n /3 width=3 by isfin_push/
+qed.
+
+(* Inversion lemmas with iterated push **************************************)
+
+lemma isfin_inv_pushs: ∀n,g. 𝐅❪⫯*[n]g❫ → 𝐅❪g❫.
+#n elim n -n /3 width=3 by isfin_inv_push/
+qed.
+
+(* Properties with tail *****************************************************)
+
+lemma isfin_tl: ∀f. 𝐅❪f❫ → 𝐅❪⫱f❫.
+#f elim (pn_split f) * #g #H #Hf destruct
+/3 width=3 by isfin_inv_push, isfin_inv_next/
+qed.
+
+(* Inversion lemmas with tail ***********************************************)
+
+lemma isfin_inv_tl: ∀f. 𝐅❪⫱f❫ → 𝐅❪f❫.
+#f elim (pn_split f) * /2 width=1 by isfin_next, isfin_push/
+qed-.
+
+(* Inversion lemmas with iterated tail **************************************)
+
+lemma isfin_inv_tls: ∀n,f. 𝐅❪⫱*[n]f❫ → 𝐅❪f❫.
+#n elim n -n /3 width=1 by isfin_inv_tl/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/relations/isidentity_1.ma".
+include "ground/relocation/rtmap_tls.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+coinductive isid: predicate rtmap ≝
+| isid_push: ∀f,g. isid f → ⫯f = g → isid g
+.
+
+interpretation "test for identity (rtmap)"
+ 'IsIdentity f = (isid f).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma isid_inv_gen: ∀g. 𝐈❪g❫ → ∃∃f. 𝐈❪f❫ & ⫯f = g.
+#g * -g
+#f #g #Hf * /2 width=3 by ex2_intro/
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma isid_inv_push: ∀g. 𝐈❪g❫ → ∀f. ⫯f = g → 𝐈❪f❫.
+#g #H elim (isid_inv_gen … H) -H
+#f #Hf * -g #g #H >(injective_push … H) -H //
+qed-.
+
+lemma isid_inv_next: ∀g. 𝐈❪g❫ → ∀f. ↑f = g → ⊥.
+#g #H elim (isid_inv_gen … H) -H
+#f #Hf * -g #g #H elim (discr_next_push … H)
+qed-.
+
+(* Main inversion lemmas ****************************************************)
+
+corec theorem isid_inv_eq_repl: ∀f1,f2. 𝐈❪f1❫ → 𝐈❪f2❫ → f1 ≡ f2.
+#f1 #f2 #H1 #H2
+cases (isid_inv_gen … H1) -H1
+cases (isid_inv_gen … H2) -H2
+/3 width=5 by eq_push/
+qed-.
+
+(* Basic properties *********************************************************)
+
+corec lemma isid_eq_repl_back: eq_repl_back … isid.
+#f1 #H cases (isid_inv_gen … H) -H
+#g1 #Hg1 #H1 #f2 #Hf cases (eq_inv_px … Hf … H1) -f1
+/3 width=3 by isid_push/
+qed-.
+
+lemma isid_eq_repl_fwd: eq_repl_fwd … isid.
+/3 width=3 by isid_eq_repl_back, eq_repl_sym/ qed-.
+
+(* Alternative definition ***************************************************)
+
+corec lemma eq_push_isid: ∀f. ⫯f ≡ f → 𝐈❪f❫.
+#f #H cases (eq_inv_px … H) -H /4 width=3 by isid_push, eq_trans/
+qed.
+
+corec lemma eq_push_inv_isid: ∀f. 𝐈❪f❫ → ⫯f ≡ f.
+#f * -f
+#f #g #Hf #Hg @(eq_push … Hg) [2: @eq_push_inv_isid // | skip ]
+@eq_f //
+qed-.
+
+(* Properties with iterated push ********************************************)
+
+lemma isid_pushs: ∀n,f. 𝐈❪f❫ → 𝐈❪⫯*[n]f❫.
+#n elim n -n /3 width=3 by isid_push/
+qed.
+
+(* Inversion lemmas with iterated push **************************************)
+
+lemma isid_inv_pushs: ∀n,g. 𝐈❪⫯*[n]g❫ → 𝐈❪g❫.
+#n elim n -n /3 width=3 by isid_inv_push/
+qed.
+
+(* Properties with tail *****************************************************)
+
+lemma isid_tl: ∀f. 𝐈❪f❫ → 𝐈❪⫱f❫.
+#f cases (pn_split f) * #g * -f #H
+[ /2 width=3 by isid_inv_push/
+| elim (isid_inv_next … H) -H //
+]
+qed.
+
+(* Properties with iterated tail ********************************************)
+
+lemma isid_tls: ∀n,g. 𝐈❪g❫ → 𝐈❪⫱*[n]g❫.
+#n elim n -n /3 width=1 by isid_tl/
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/relations/istotal_1.ma".
+include "ground/relocation/rtmap_at.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+definition istot: predicate rtmap ≝ λf. ∀i. ∃j. @❪i,f❫ ≘ j.
+
+interpretation "test for totality (rtmap)"
+ 'IsTotal f = (istot f).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma istot_inv_push: ∀g. 𝐓❪g❫ → ∀f. ⫯f = g → 𝐓❪f❫.
+#g #Hg #f #H #i elim (Hg (↑i)) -Hg
+#j #Hg elim (at_inv_npx … Hg … H) -Hg -H /2 width=3 by ex_intro/
+qed-.
+
+lemma istot_inv_next: ∀g. 𝐓❪g❫ → ∀f. ↑f = g → 𝐓❪f❫.
+#g #Hg #f #H #i elim (Hg i) -Hg
+#j #Hg elim (at_inv_xnx … Hg … H) -Hg -H /2 width=2 by ex_intro/
+qed-.
+
+(* Properties on tl *********************************************************)
+
+lemma istot_tl: ∀f. 𝐓❪f❫ → 𝐓❪⫱f❫.
+#f cases (pn_split f) *
+#g * -f /2 width=3 by istot_inv_next, istot_inv_push/
+qed.
+
+(* Properties on tls ********************************************************)
+
+lemma istot_tls: ∀n,f. 𝐓❪f❫ → 𝐓❪⫱*[n]f❫.
+#n elim n -n /3 width=1 by istot_tl/
+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) →
+ f1 ≡ f2.
+#f1 cases (pn_split f1) * #g1 #H1
+#f2 cases (pn_split f2) * #g2 #H2
+#Hf1 #Hf2 #Hi
+[ @(eq_push … H1 H2) @at_ext -at_ext /2 width=3 by istot_inv_push/ -Hf1 -Hf2
+ #i #i1 #i2 #Hg1 #Hg2 lapply (Hi (↑i) (↑i1) (↑i2) ??) /2 width=7 by at_push/
+| cases (Hf2 0) -Hf1 -Hf2 -at_ext
+ #j2 #Hf2 cases (at_increasing_strict … Hf2 … H2) -H2
+ lapply (Hi 0 0 j2 … Hf2) /2 width=2 by at_refl/ -Hi -Hf2 -H1
+ #H2 #H cases (lt_le_false … H) -H //
+| cases (Hf1 0) -Hf1 -Hf2 -at_ext
+ #j1 #Hf1 cases (at_increasing_strict … Hf1 … H1) -H1
+ lapply (Hi 0 j1 0 Hf1 ?) /2 width=2 by at_refl/ -Hi -Hf1 -H2
+ #H1 #H cases (lt_le_false … H) -H //
+| @(eq_next … H1 H2) @at_ext -at_ext /2 width=3 by istot_inv_next/ -Hf1 -Hf2
+ #i #i1 #i2 #Hg1 #Hg2 lapply (Hi i (↑i1) (↑i2) ??) /2 width=5 by at_next/
+]
+qed-.
+
+(* Advanced properties on at ************************************************)
+
+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/
+| /4 width=6 by at_mono, or_intror/
+]
+qed-.
+
+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/
+ #Hi2 @IH -IH #i1 #H #Hi elim (le_to_or_lt_eq … H) -H /2 width=3 by/
+ #H destruct -Ht /2 width=1 by/
+]
+qed-.
+
+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❫.
+#f #H1f #H2f @isid_at
+#i lapply (H1f i) -H1f *
+#j #Hf >(H2f … Hf) in ⊢ (???%); -H2f //
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/relations/isuniform_1.ma".
+include "ground/relocation/rtmap_isfin.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+inductive isuni: predicate rtmap ≝
+| isuni_isid: ∀f. 𝐈❪f❫ → isuni f
+| isuni_next: ∀f. isuni f → ∀g. ↑f = g → isuni g
+.
+
+interpretation "test for uniformity (rtmap)"
+ 'IsUniform f = (isuni f).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma isuni_inv_push: ∀g. 𝐔❪g❫ → ∀f. ⫯f = g → 𝐈❪f❫.
+#g * -g /2 width=3 by isid_inv_push/
+#f #_ #g #H #x #Hx destruct elim (discr_push_next … Hx)
+qed-.
+
+lemma isuni_inv_next: ∀g. 𝐔❪g❫ → ∀f. ↑f = g → 𝐔❪f❫.
+#g * -g #f #Hf
+[ #x #Hx elim (isid_inv_next … Hf … Hx)
+| #g #H #x #Hx destruct /2 width=1 by injective_push/
+]
+qed-.
+
+lemma isuni_split: ∀g. 𝐔❪g❫ → (∃∃f. 𝐈❪f❫ & ⫯f = g) ∨ (∃∃f.𝐔❪f❫ & ↑f = g).
+#g #H elim (pn_split g) * #f #Hf
+/4 width=3 by isuni_inv_next, isuni_inv_push, or_introl, or_intror, ex2_intro/
+qed-.
+
+(* basic forward lemmas *****************************************************)
+
+lemma isuni_fwd_push: ∀g. 𝐔❪g❫ → ∀f. ⫯f = g → 𝐔❪f❫.
+/3 width=3 by isuni_inv_push, isuni_isid/ qed-.
+
+(* Forward lemmas with test for finite colength *****************************)
+
+lemma isuni_fwd_isfin: ∀f. 𝐔❪f❫ → 𝐅❪f❫.
+#f #H elim H -f /3 width=1 by isfin_next, isfin_isid/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/functions/uparrowstar_2.ma".
+include "ground/relocation/rtmap_eq.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+rec definition nexts (f:rtmap) (n:nat) on n: rtmap ≝ match n with
+[ O ⇒ f | S m ⇒ ↑(nexts f m) ].
+
+interpretation "nexts (rtmap)" 'UpArrowStar n f = (nexts f n).
+
+(* Basic_inversion lemmas *****************************************************)
+
+lemma eq_inv_nexts_sn: ∀n,f1,g2. ↑*[n] f1 ≡ g2 →
+ ∃∃f2. f1 ≡ f2 & ↑*[n] f2 = g2.
+#n elim n -n /2 width=3 by ex2_intro/
+#n #IH #f1 #g2 #H elim (eq_inv_nx … H) -H [|*: // ]
+#f0 #Hf10 #H1 elim (IH … Hf10) -IH -Hf10 #f2 #Hf12 #H2 destruct
+/2 width=3 by ex2_intro/
+qed-.
+
+lemma eq_inv_nexts_dx: ∀n,f2,g1. g1 ≡ ↑*[n] f2 →
+ ∃∃f1. f1 ≡ f2 & ↑*[n] f1 = g1.
+#n elim n -n /2 width=3 by ex2_intro/
+#n #IH #f2 #g1 #H elim (eq_inv_xn … H) -H [|*: // ]
+#f0 #Hf02 #H1 elim (IH … Hf02) -IH -Hf02 #f1 #Hf12 #H2 destruct
+/2 width=3 by ex2_intro/
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma nexts_O: ∀f. f = ↑*[0] f.
+// qed.
+
+lemma nexts_S: ∀f,n. ↑↑*[n] f = ↑*[↑n] f.
+// qed.
+
+lemma nexts_eq_repl: ∀n. eq_repl (λf1,f2. ↑*[n] f1 ≡ ↑*[n] f2).
+#n elim n -n /3 width=5 by eq_next/
+qed.
+
+(* Advanced properties ******************************************************)
+
+lemma nexts_xn: ∀n,f. ↑*[n] ↑f = ↑*[↑n] f.
+#n elim n -n //
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/functions/upspoonstar_2.ma".
+include "ground/relocation/rtmap_eq.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+rec definition pushs (f:rtmap) (n:nat) on n: rtmap ≝ match n with
+[ O ⇒ f | S m ⇒ ⫯(pushs f m) ].
+
+interpretation "pushs (rtmap)" 'UpSpoonStar n f = (pushs f n).
+
+(* Basic_inversion lemmas *****************************************************)
+
+lemma eq_inv_pushs_sn: ∀n,f1,g2. ⫯*[n] f1 ≡ g2 →
+ ∃∃f2. f1 ≡ f2 & ⫯*[n] f2 = g2.
+#n elim n -n /2 width=3 by ex2_intro/
+#n #IH #f1 #g2 #H elim (eq_inv_px … H) -H [|*: // ]
+#f0 #Hf10 #H1 elim (IH … Hf10) -IH -Hf10 #f2 #Hf12 #H2 destruct
+/2 width=3 by ex2_intro/
+qed-.
+
+lemma eq_inv_pushs_dx: ∀n,f2,g1. g1 ≡ ⫯*[n] f2 →
+ ∃∃f1. f1 ≡ f2 & ⫯*[n] f1 = g1.
+#n elim n -n /2 width=3 by ex2_intro/
+#n #IH #f2 #g1 #H elim (eq_inv_xp … H) -H [|*: // ]
+#f0 #Hf02 #H1 elim (IH … Hf02) -IH -Hf02 #f1 #Hf12 #H2 destruct
+/2 width=3 by ex2_intro/
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma pushs_O: ∀f. f = ⫯*[0] f.
+// qed.
+
+lemma pushs_S: ∀f,n. ⫯⫯*[n] f = ⫯*[↑n] f.
+// qed.
+
+lemma pushs_eq_repl: ∀n. eq_repl (λf1,f2. ⫯*[n] f1 ≡ ⫯*[n] f2).
+#n elim n -n /3 width=5 by eq_push/
+qed.
+
+(* Advanced properties ******************************************************)
+
+lemma pushs_xn: ∀n,f. ⫯*[n] ⫯f = ⫯*[↑n] f.
+#n elim n -n //
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/relations/rintersection_3.ma".
+include "ground/relocation/rtmap_sle.ma".
+
+coinductive sand: relation3 rtmap rtmap rtmap ≝
+| sand_pp: ∀f1,f2,f,g1,g2,g. sand f1 f2 f → ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → sand g1 g2 g
+| sand_np: ∀f1,f2,f,g1,g2,g. sand f1 f2 f → ↑f1 = g1 → ⫯f2 = g2 → ⫯f = g → sand g1 g2 g
+| sand_pn: ∀f1,f2,f,g1,g2,g. sand f1 f2 f → ⫯f1 = g1 → ↑f2 = g2 → ⫯f = g → sand g1 g2 g
+| sand_nn: ∀f1,f2,f,g1,g2,g. sand f1 f2 f → ↑f1 = g1 → ↑f2 = g2 → ↑f = g → sand g1 g2 g
+.
+
+interpretation "intersection (rtmap)"
+ 'RIntersection f1 f2 f = (sand f1 f2 f).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma sand_inv_ppx: ∀g1,g2,g. g1 ⋒ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 →
+ ∃∃f. f1 ⋒ f2 ≘ f & ⫯f = g.
+#g1 #g2 #g * -g1 -g2 -g
+#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
+try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
+try elim (discr_push_next … Hx1) try elim (discr_next_push … Hx1)
+try (>(injective_push … Hx2) -x2) try (>(injective_next … Hx2) -x2)
+try elim (discr_push_next … Hx2) try elim (discr_next_push … Hx2)
+/2 width=3 by ex2_intro/
+qed-.
+
+lemma sand_inv_npx: ∀g1,g2,g. g1 ⋒ g2 ≘ g → ∀f1,f2. ↑f1 = g1 → ⫯f2 = g2 →
+ ∃∃f. f1 ⋒ f2 ≘ f & ⫯f = g.
+#g1 #g2 #g * -g1 -g2 -g
+#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
+try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
+try elim (discr_push_next … Hx1) try elim (discr_next_push … Hx1)
+try (>(injective_push … Hx2) -x2) try (>(injective_next … Hx2) -x2)
+try elim (discr_push_next … Hx2) try elim (discr_next_push … Hx2)
+/2 width=3 by ex2_intro/
+qed-.
+
+lemma sand_inv_pnx: ∀g1,g2,g. g1 ⋒ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 →
+ ∃∃f. f1 ⋒ f2 ≘ f & ⫯f = g.
+#g1 #g2 #g * -g1 -g2 -g
+#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
+try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
+try elim (discr_push_next … Hx1) try elim (discr_next_push … Hx1)
+try (>(injective_push … Hx2) -x2) try (>(injective_next … Hx2) -x2)
+try elim (discr_push_next … Hx2) try elim (discr_next_push … Hx2)
+/2 width=3 by ex2_intro/
+qed-.
+
+lemma sand_inv_nnx: ∀g1,g2,g. g1 ⋒ g2 ≘ g → ∀f1,f2. ↑f1 = g1 → ↑f2 = g2 →
+ ∃∃f. f1 ⋒ f2 ≘ f & ↑f = g.
+#g1 #g2 #g * -g1 -g2 -g
+#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
+try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
+try elim (discr_push_next … Hx1) try elim (discr_next_push … Hx1)
+try (>(injective_push … Hx2) -x2) try (>(injective_next … Hx2) -x2)
+try elim (discr_push_next … Hx2) try elim (discr_next_push … Hx2)
+/2 width=3 by ex2_intro/
+qed-.
+
+(* Basic properties *********************************************************)
+
+corec lemma sand_eq_repl_back1: ∀f2,f. eq_repl_back … (λf1. f1 ⋒ f2 ≘ f).
+#f2 #f #f1 * -f1 -f2 -f
+#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x #Hx
+try cases (eq_inv_px … Hx … H1) try cases (eq_inv_nx … Hx … H1) -g1
+/3 width=7 by sand_pp, sand_np, sand_pn, sand_nn/
+qed-.
+
+lemma sand_eq_repl_fwd1: ∀f2,f. eq_repl_fwd … (λf1. f1 ⋒ f2 ≘ f).
+#f2 #f @eq_repl_sym /2 width=3 by sand_eq_repl_back1/
+qed-.
+
+corec lemma sand_eq_repl_back2: ∀f1,f. eq_repl_back … (λf2. f1 ⋒ f2 ≘ f).
+#f1 #f #f2 * -f1 -f2 -f
+#f1 #f2 #f #g1 #g2 #g #Hf #H #H2 #H0 #x #Hx
+try cases (eq_inv_px … Hx … H2) try cases (eq_inv_nx … Hx … H2) -g2
+/3 width=7 by sand_pp, sand_np, sand_pn, sand_nn/
+qed-.
+
+lemma sand_eq_repl_fwd2: ∀f1,f. eq_repl_fwd … (λf2. f1 ⋒ f2 ≘ f).
+#f1 #f @eq_repl_sym /2 width=3 by sand_eq_repl_back2/
+qed-.
+
+corec lemma sand_eq_repl_back3: ∀f1,f2. eq_repl_back … (λf. f1 ⋒ f2 ≘ f).
+#f1 #f2 #f * -f1 -f2 -f
+#f1 #f2 #f #g1 #g2 #g #Hf #H #H2 #H0 #x #Hx
+try cases (eq_inv_px … Hx … H0) try cases (eq_inv_nx … Hx … H0) -g
+/3 width=7 by sand_pp, sand_np, sand_pn, sand_nn/
+qed-.
+
+lemma sand_eq_repl_fwd3: ∀f1,f2. eq_repl_fwd … (λf. f1 ⋒ f2 ≘ f).
+#f1 #f2 @eq_repl_sym /2 width=3 by sand_eq_repl_back3/
+qed-.
+
+corec lemma sand_refl: ∀f. f ⋒ f ≘ f.
+#f cases (pn_split f) * #g #H
+[ @(sand_pp … H H H) | @(sand_nn … H H H) ] -H //
+qed.
+
+corec lemma sand_sym: ∀f1,f2,f. f1 ⋒ f2 ≘ f → f2 ⋒ f1 ≘ f.
+#f1 #f2 #f * -f1 -f2 -f
+#f1 #f2 #f #g1 #g2 #g #Hf * * * -g1 -g2 -g
+[ @sand_pp | @sand_pn | @sand_np | @sand_nn ] /2 width=7 by/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.tcs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/relations/parallel_2.ma".
+include "ground/relocation/rtmap_isid.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+coinductive sdj: relation rtmap ≝
+| sdj_pp: ∀f1,f2,g1,g2. sdj f1 f2 → ⫯f1 = g1 → ⫯f2 = g2 → sdj g1 g2
+| sdj_np: ∀f1,f2,g1,g2. sdj f1 f2 → ↑f1 = g1 → ⫯f2 = g2 → sdj g1 g2
+| sdj_pn: ∀f1,f2,g1,g2. sdj f1 f2 → ⫯f1 = g1 → ↑f2 = g2 → sdj g1 g2
+.
+
+interpretation "disjointness (rtmap)"
+ 'Parallel f1 f2 = (sdj f1 f2).
+
+(* Basic properties *********************************************************)
+
+axiom sdj_eq_repl_back1: ∀f2. eq_repl_back … (λf1. f1 ∥ f2).
+
+lemma sdj_eq_repl_fwd1: ∀f2. eq_repl_fwd … (λf1. f1 ∥ f2).
+#f2 @eq_repl_sym /2 width=3 by sdj_eq_repl_back1/
+qed-.
+
+axiom sdj_eq_repl_back2: ∀f1. eq_repl_back … (λf2. f1 ∥ f2).
+
+lemma sdj_eq_repl_fwd2: ∀f1. eq_repl_fwd … (λf2. f1 ∥ f2).
+#f1 @eq_repl_sym /2 width=3 by sdj_eq_repl_back2/
+qed-.
+
+corec lemma sdj_sym: symmetric … sdj.
+#f1 #f2 * -f1 -f2
+#f1 #f2 #g1 #g2 #Hf #H1 #H2
+[ @(sdj_pp … H2 H1) | @(sdj_pn … H2 H1) | @(sdj_np … H2 H1) ] -g2 -g1
+/2 width=1 by/
+qed-.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma sdj_inv_pp: ∀g1,g2. g1 ∥ g2 → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 → f1 ∥ f2.
+#g1 #g2 * -g1 -g2
+#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct
+[ lapply (injective_push … Hx1) -Hx1
+ lapply (injective_push … Hx2) -Hx2 //
+| elim (discr_push_next … Hx1)
+| elim (discr_push_next … Hx2)
+]
+qed-.
+
+lemma sdj_inv_np: ∀g1,g2. g1 ∥ g2 → ∀f1,f2. ↑f1 = g1 → ⫯f2 = g2 → f1 ∥ f2.
+#g1 #g2 * -g1 -g2
+#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct
+[ elim (discr_next_push … Hx1)
+| lapply (injective_next … Hx1) -Hx1
+ lapply (injective_push … Hx2) -Hx2 //
+| elim (discr_push_next … Hx2)
+]
+qed-.
+
+lemma sdj_inv_pn: ∀g1,g2. g1 ∥ g2 → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 → f1 ∥ f2.
+#g1 #g2 * -g1 -g2
+#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct
+[ elim (discr_next_push … Hx2)
+| elim (discr_push_next … Hx1)
+| lapply (injective_push … Hx1) -Hx1
+ lapply (injective_next … Hx2) -Hx2 //
+]
+qed-.
+
+lemma sdj_inv_nn: ∀g1,g2. g1 ∥ g2 → ∀f1,f2. ↑f1 = g1 → ↑f2 = g2 → ⊥.
+#g1 #g2 * -g1 -g2
+#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct
+[ elim (discr_next_push … Hx1)
+| elim (discr_next_push … Hx2)
+| elim (discr_next_push … Hx1)
+]
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma sdj_inv_nx: ∀g1,g2. g1 ∥ g2 → ∀f1. ↑f1 = g1 →
+ ∃∃f2. f1 ∥ f2 & ⫯f2 = g2.
+#g1 #g2 elim (pn_split g2) * #f2 #H2 #H #f1 #H1
+[ lapply (sdj_inv_np … H … H1 H2) -H /2 width=3 by ex2_intro/
+| elim (sdj_inv_nn … H … H1 H2)
+]
+qed-.
+
+lemma sdj_inv_xn: ∀g1,g2. g1 ∥ g2 → ∀f2. ↑f2 = g2 →
+ ∃∃f1. f1 ∥ f2 & ⫯f1 = g1.
+#g1 #g2 elim (pn_split g1) * #f1 #H1 #H #f2 #H2
+[ lapply (sdj_inv_pn … H … H1 H2) -H /2 width=3 by ex2_intro/
+| elim (sdj_inv_nn … H … H1 H2)
+]
+qed-.
+
+lemma sdj_inv_xp: ∀g1,g2. g1 ∥ g2 → ∀f2. ⫯f2 = g2 →
+ ∨∨ ∃∃f1. f1 ∥ f2 & ⫯f1 = g1
+ | ∃∃f1. f1 ∥ f2 & ↑f1 = g1.
+#g1 #g2 elim (pn_split g1) * #f1 #H1 #H #f2 #H2
+[ lapply (sdj_inv_pp … H … H1 H2) | lapply (sdj_inv_np … H … H1 H2) ] -H -H2
+/3 width=3 by ex2_intro, or_introl, or_intror/
+qed-.
+
+lemma sdj_inv_px: ∀g1,g2. g1 ∥ g2 → ∀f1. ⫯f1 = g1 →
+ ∨∨ ∃∃f2. f1 ∥ f2 & ⫯f2 = g2
+ | ∃∃f2. f1 ∥ f2 & ↑f2 = g2.
+#g1 #g2 elim (pn_split g2) * #f2 #H2 #H #f1 #H1
+[ lapply (sdj_inv_pp … H … H1 H2) | lapply (sdj_inv_pn … H … H1 H2) ] -H -H1
+/3 width=3 by ex2_intro, or_introl, or_intror/
+qed-.
+
+(* Properties with isid *****************************************************)
+
+corec lemma sdj_isid_dx: ∀f2. 𝐈❪f2❫ → ∀f1. f1 ∥ f2.
+#f2 * -f2
+#f2 #g2 #Hf2 #H2 #f1 cases (pn_split f1) *
+/3 width=5 by sdj_np, sdj_pp/
+qed.
+
+corec lemma sdj_isid_sn: ∀f1. 𝐈❪f1❫ → ∀f2. f1 ∥ f2.
+#f1 * -f1
+#f1 #g1 #Hf1 #H1 #f2 cases (pn_split f2) *
+/3 width=5 by sdj_pn, sdj_pp/
+qed.
+
+(* Inversion lemmas with isid ***********************************************)
+
+corec lemma sdj_inv_refl: ∀f. f ∥ f → 𝐈❪f❫.
+#f cases (pn_split f) * #g #Hg #H
+[ lapply (sdj_inv_pp … H … Hg Hg) -H /3 width=3 by isid_push/
+| elim (sdj_inv_nn … H … Hg Hg)
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.tcs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/relocation/rtmap_isid.ma".
+include "ground/relocation/rtmap_isdiv.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+coinductive sle: relation rtmap ≝
+| sle_push: ∀f1,f2,g1,g2. sle f1 f2 → ⫯f1 = g1 → ⫯f2 = g2 → sle g1 g2
+| sle_next: ∀f1,f2,g1,g2. sle f1 f2 → ↑f1 = g1 → ↑f2 = g2 → sle g1 g2
+| sle_weak: ∀f1,f2,g1,g2. sle f1 f2 → ⫯f1 = g1 → ↑f2 = g2 → sle g1 g2
+.
+
+interpretation "inclusion (rtmap)"
+ 'subseteq f1 f2 = (sle f1 f2).
+
+(* Basic properties *********************************************************)
+
+axiom sle_eq_repl_back1: ∀f2. eq_repl_back … (λf1. f1 ⊆ f2).
+
+lemma sle_eq_repl_fwd1: ∀f2. eq_repl_fwd … (λf1. f1 ⊆ f2).
+#f2 @eq_repl_sym /2 width=3 by sle_eq_repl_back1/
+qed-.
+
+axiom sle_eq_repl_back2: ∀f1. eq_repl_back … (λf2. f1 ⊆ f2).
+
+lemma sle_eq_repl_fwd2: ∀f1. eq_repl_fwd … (λf2. f1 ⊆ f2).
+#f1 @eq_repl_sym /2 width=3 by sle_eq_repl_back2/
+qed-.
+
+corec lemma sle_refl: ∀f. f ⊆ f.
+#f cases (pn_split f) * #g #H
+[ @(sle_push … H H) | @(sle_next … H H) ] -H //
+qed.
+
+lemma sle_refl_eq: ∀f1,f2. f1 ≡ f2 → f1 ⊆ f2.
+/2 width=3 by sle_eq_repl_back2/ qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma sle_inv_xp: ∀g1,g2. g1 ⊆ g2 → ∀f2. ⫯f2 = g2 →
+ ∃∃f1. f1 ⊆ f2 & ⫯f1 = g1.
+#g1 #g2 * -g1 -g2
+#f1 #f2 #g1 #g2 #H #H1 #H2 #x2 #Hx2 destruct
+[ lapply (injective_push … Hx2) -Hx2 /2 width=3 by ex2_intro/ ]
+elim (discr_push_next … Hx2)
+qed-.
+
+lemma sle_inv_nx: ∀g1,g2. g1 ⊆ g2 → ∀f1. ↑f1 = g1 →
+ ∃∃f2. f1 ⊆ f2 & ↑f2 = g2.
+#g1 #g2 * -g1 -g2
+#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #Hx1 destruct
+[2: lapply (injective_next … Hx1) -Hx1 /2 width=3 by ex2_intro/ ]
+elim (discr_next_push … Hx1)
+qed-.
+
+lemma sle_inv_pn: ∀g1,g2. g1 ⊆ g2 → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 → f1 ⊆ f2.
+#g1 #g2 * -g1 -g2
+#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct
+[ elim (discr_next_push … Hx2)
+| elim (discr_push_next … Hx1)
+| lapply (injective_push … Hx1) -Hx1
+ lapply (injective_next … Hx2) -Hx2 //
+]
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma sle_inv_pp: ∀g1,g2. g1 ⊆ g2 → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 → f1 ⊆ f2.
+#g1 #g2 #H #f1 #f2 #H1 #H2 elim (sle_inv_xp … H … H2) -g2
+#x1 #H #Hx1 destruct lapply (injective_push … Hx1) -Hx1 //
+qed-.
+
+lemma sle_inv_nn: ∀g1,g2. g1 ⊆ g2 → ∀f1,f2. ↑f1 = g1 → ↑f2 = g2 → f1 ⊆ f2.
+#g1 #g2 #H #f1 #f2 #H1 #H2 elim (sle_inv_nx … H … H1) -g1
+#x2 #H #Hx2 destruct lapply (injective_next … Hx2) -Hx2 //
+qed-.
+
+lemma sle_inv_px: ∀g1,g2. g1 ⊆ g2 → ∀f1. ⫯f1 = g1 →
+ (∃∃f2. f1 ⊆ f2 & ⫯f2 = g2) ∨ ∃∃f2. f1 ⊆ f2 & ↑f2 = g2.
+#g1 #g2 elim (pn_split g2) * #f2 #H2 #H #f1 #H1
+[ lapply (sle_inv_pp … H … H1 H2) | lapply (sle_inv_pn … H … H1 H2) ] -H -H1
+/3 width=3 by ex2_intro, or_introl, or_intror/
+qed-.
+
+lemma sle_inv_xn: ∀g1,g2. g1 ⊆ g2 → ∀f2. ↑f2 = g2 →
+ (∃∃f1. f1 ⊆ f2 & ⫯f1 = g1) ∨ ∃∃f1. f1 ⊆ f2 & ↑f1 = g1.
+#g1 #g2 elim (pn_split g1) * #f1 #H1 #H #f2 #H2
+[ lapply (sle_inv_pn … H … H1 H2) | lapply (sle_inv_nn … H … H1 H2) ] -H -H2
+/3 width=3 by ex2_intro, or_introl, or_intror/
+qed-.
+
+(* Main properties **********************************************************)
+
+corec theorem sle_trans: Transitive … sle.
+#f1 #f * -f1 -f
+#f1 #f #g1 #g #Hf #H1 #H #g2 #H0
+[ cases (sle_inv_px … H0 … H) * |*: cases (sle_inv_nx … H0 … H) ] -g
+/3 width=5 by sle_push, sle_next, sle_weak/
+qed-.
+
+(* Properties with iteraded push ********************************************)
+
+lemma sle_pushs: ∀f1,f2. f1 ⊆ f2 → ∀i. ⫯*[i] f1 ⊆ ⫯*[i] f2.
+#f1 #f2 #Hf12 #i elim i -i /2 width=5 by sle_push/
+qed.
+
+(* Properties with tail *****************************************************)
+
+lemma sle_px_tl: ∀g1,g2. g1 ⊆ g2 → ∀f1. ⫯f1 = g1 → f1 ⊆ ⫱g2.
+#g1 #g2 #H #f1 #H1 elim (sle_inv_px … H … H1) -H -H1 * //
+qed.
+
+lemma sle_xn_tl: ∀g1,g2. g1 ⊆ g2 → ∀f2. ↑f2 = g2 → ⫱g1 ⊆ f2.
+#g1 #g2 #H #f2 #H2 elim (sle_inv_xn … H … H2) -H -H2 * //
+qed.
+
+lemma sle_tl: ∀f1,f2. f1 ⊆ f2 → ⫱f1 ⊆ ⫱f2.
+#f1 elim (pn_split f1) * #g1 #H1 #f2 #H
+[ lapply (sle_px_tl … H … H1) -H //
+| elim (sle_inv_nx … H … H1) -H //
+]
+qed.
+
+(* Inversion lemmas with tail ***********************************************)
+
+lemma sle_inv_tl_sn: ∀f1,f2. ⫱f1 ⊆ f2 → f1 ⊆ ↑f2.
+#f1 elim (pn_split f1) * #g1 #H destruct
+/2 width=5 by sle_next, sle_weak/
+qed-.
+
+lemma sle_inv_tl_dx: ∀f1,f2. f1 ⊆ ⫱f2 → ⫯f1 ⊆ f2.
+#f1 #f2 elim (pn_split f2) * #g2 #H destruct
+/2 width=5 by sle_push, sle_weak/
+qed-.
+
+(* Properties with iteraded tail ********************************************)
+
+lemma sle_tls: ∀f1,f2. f1 ⊆ f2 → ∀i. ⫱*[i] f1 ⊆ ⫱*[i] f2.
+#f1 #f2 #Hf12 #i elim i -i /2 width=5 by sle_tl/
+qed.
+
+(* Properties with isid *****************************************************)
+
+corec lemma sle_isid_sn: ∀f1. 𝐈❪f1❫ → ∀f2. f1 ⊆ f2.
+#f1 * -f1
+#f1 #g1 #Hf1 #H1 #f2 cases (pn_split f2) *
+/3 width=5 by sle_weak, sle_push/
+qed.
+
+(* Inversion lemmas with isid ***********************************************)
+
+corec lemma sle_inv_isid_dx: ∀f1,f2. f1 ⊆ f2 → 𝐈❪f2❫ → 𝐈❪f1❫.
+#f1 #f2 * -f1 -f2
+#f1 #f2 #g1 #g2 #Hf * * #H
+[2,3: elim (isid_inv_next … H) // ]
+lapply (isid_inv_push … H ??) -H
+/3 width=3 by isid_push/
+qed-.
+
+(* Properties with isdiv ****************************************************)
+
+corec lemma sle_isdiv_dx: ∀f2. 𝛀❪f2❫ → ∀f1. f1 ⊆ f2.
+#f2 * -f2
+#f2 #g2 #Hf2 #H2 #f1 cases (pn_split f1) *
+/3 width=5 by sle_weak, sle_next/
+qed.
+
+(* Inversion lemmas with isdiv **********************************************)
+
+corec lemma sle_inv_isdiv_sn: ∀f1,f2. f1 ⊆ f2 → 𝛀❪f1❫ → 𝛀❪f2❫.
+#f1 #f2 * -f1 -f2
+#f1 #f2 #g1 #g2 #Hf * * #H
+[1,3: elim (isdiv_inv_push … H) // ]
+lapply (isdiv_inv_next … H ??) -H
+/3 width=3 by isdiv_next/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/xoa/ex_4_2.ma".
+include "ground/notation/relations/runion_3.ma".
+include "ground/relocation/rtmap_isfin.ma".
+include "ground/relocation/rtmap_sle.ma".
+
+coinductive sor: relation3 rtmap rtmap rtmap ≝
+| sor_pp: ∀f1,f2,f,g1,g2,g. sor f1 f2 f → ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → sor g1 g2 g
+| sor_np: ∀f1,f2,f,g1,g2,g. sor f1 f2 f → ↑f1 = g1 → ⫯f2 = g2 → ↑f = g → sor g1 g2 g
+| sor_pn: ∀f1,f2,f,g1,g2,g. sor f1 f2 f → ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → sor g1 g2 g
+| sor_nn: ∀f1,f2,f,g1,g2,g. sor f1 f2 f → ↑f1 = g1 → ↑f2 = g2 → ↑f = g → sor g1 g2 g
+.
+
+interpretation "union (rtmap)"
+ 'RUnion f1 f2 f = (sor f1 f2 f).
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma sor_inv_ppx: ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 →
+ ∃∃f. f1 ⋓ f2 ≘ f & ⫯f = g.
+#g1 #g2 #g * -g1 -g2 -g
+#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
+try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
+try elim (discr_push_next … Hx1) try elim (discr_next_push … Hx1)
+try (>(injective_push … Hx2) -x2) try (>(injective_next … Hx2) -x2)
+try elim (discr_push_next … Hx2) try elim (discr_next_push … Hx2)
+/2 width=3 by ex2_intro/
+qed-.
+
+lemma sor_inv_npx: ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f1,f2. ↑f1 = g1 → ⫯f2 = g2 →
+ ∃∃f. f1 ⋓ f2 ≘ f & ↑f = g.
+#g1 #g2 #g * -g1 -g2 -g
+#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
+try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
+try elim (discr_push_next … Hx1) try elim (discr_next_push … Hx1)
+try (>(injective_push … Hx2) -x2) try (>(injective_next … Hx2) -x2)
+try elim (discr_push_next … Hx2) try elim (discr_next_push … Hx2)
+/2 width=3 by ex2_intro/
+qed-.
+
+lemma sor_inv_pnx: ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 →
+ ∃∃f. f1 ⋓ f2 ≘ f & ↑f = g.
+#g1 #g2 #g * -g1 -g2 -g
+#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
+try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
+try elim (discr_push_next … Hx1) try elim (discr_next_push … Hx1)
+try (>(injective_push … Hx2) -x2) try (>(injective_next … Hx2) -x2)
+try elim (discr_push_next … Hx2) try elim (discr_next_push … Hx2)
+/2 width=3 by ex2_intro/
+qed-.
+
+lemma sor_inv_nnx: ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f1,f2. ↑f1 = g1 → ↑f2 = g2 →
+ ∃∃f. f1 ⋓ f2 ≘ f & ↑f = g.
+#g1 #g2 #g * -g1 -g2 -g
+#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
+try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
+try elim (discr_push_next … Hx1) try elim (discr_next_push … Hx1)
+try (>(injective_push … Hx2) -x2) try (>(injective_next … Hx2) -x2)
+try elim (discr_push_next … Hx2) try elim (discr_next_push … Hx2)
+/2 width=3 by ex2_intro/
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma sor_inv_ppn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
+ ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ↑f = g → ⊥.
+#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0
+elim (sor_inv_ppx … H … H1 H2) -g1 -g2 #x #_ #H destruct
+/2 width=3 by discr_push_next/
+qed-.
+
+lemma sor_inv_nxp: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
+ ∀f1,f. ↑f1 = g1 → ⫯f = g → ⊥.
+#g1 #g2 #g #H #f1 #f #H1 #H0
+elim (pn_split g2) * #f2 #H2
+[ elim (sor_inv_npx … H … H1 H2)
+| elim (sor_inv_nnx … H … H1 H2)
+] -g1 -g2 #x #_ #H destruct
+/2 width=3 by discr_next_push/
+qed-.
+
+lemma sor_inv_xnp: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
+ ∀f2,f. ↑f2 = g2 → ⫯f = g → ⊥.
+#g1 #g2 #g #H #f2 #f #H2 #H0
+elim (pn_split g1) * #f1 #H1
+[ elim (sor_inv_pnx … H … H1 H2)
+| elim (sor_inv_nnx … H … H1 H2)
+] -g1 -g2 #x #_ #H destruct
+/2 width=3 by discr_next_push/
+qed-.
+
+lemma sor_inv_ppp: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
+ ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → f1 ⋓ f2 ≘ f.
+#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0
+elim (sor_inv_ppx … H … H1 H2) -g1 -g2 #x #Hx #H destruct
+<(injective_push … H) -f //
+qed-.
+
+lemma sor_inv_npn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
+ ∀f1,f2,f. ↑f1 = g1 → ⫯f2 = g2 → ↑f = g → f1 ⋓ f2 ≘ f.
+#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0
+elim (sor_inv_npx … H … H1 H2) -g1 -g2 #x #Hx #H destruct
+<(injective_next … H) -f //
+qed-.
+
+lemma sor_inv_pnn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
+ ∀f1,f2,f. ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → f1 ⋓ f2 ≘ f.
+#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0
+elim (sor_inv_pnx … H … H1 H2) -g1 -g2 #x #Hx #H destruct
+<(injective_next … H) -f //
+qed-.
+
+lemma sor_inv_nnn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
+ ∀f1,f2,f. ↑f1 = g1 → ↑f2 = g2 → ↑f = g → f1 ⋓ f2 ≘ f.
+#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0
+elim (sor_inv_nnx … H … H1 H2) -g1 -g2 #x #Hx #H destruct
+<(injective_next … H) -f //
+qed-.
+
+lemma sor_inv_pxp: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
+ ∀f1,f. ⫯f1 = g1 → ⫯f = g →
+ ∃∃f2. f1 ⋓ f2 ≘ f & ⫯f2 = g2.
+#g1 #g2 #g #H #f1 #f #H1 #H0
+elim (pn_split g2) * #f2 #H2
+[ /3 width=7 by sor_inv_ppp, ex2_intro/
+| elim (sor_inv_xnp … H … H2 H0)
+]
+qed-.
+
+lemma sor_inv_xpp: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
+ ∀f2,f. ⫯f2 = g2 → ⫯f = g →
+ ∃∃f1. f1 ⋓ f2 ≘ f & ⫯f1 = g1.
+#g1 #g2 #g #H #f2 #f #H2 #H0
+elim (pn_split g1) * #f1 #H1
+[ /3 width=7 by sor_inv_ppp, ex2_intro/
+| elim (sor_inv_nxp … H … H1 H0)
+]
+qed-.
+
+lemma sor_inv_pxn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
+ ∀f1,f. ⫯f1 = g1 → ↑f = g →
+ ∃∃f2. f1 ⋓ f2 ≘ f & ↑f2 = g2.
+#g1 #g2 #g #H #f1 #f #H1 #H0
+elim (pn_split g2) * #f2 #H2
+[ elim (sor_inv_ppn … H … H1 H2 H0)
+| /3 width=7 by sor_inv_pnn, ex2_intro/
+]
+qed-.
+
+lemma sor_inv_xpn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
+ ∀f2,f. ⫯f2 = g2 → ↑f = g →
+ ∃∃f1. f1 ⋓ f2 ≘ f & ↑f1 = g1.
+#g1 #g2 #g #H #f2 #f #H2 #H0
+elim (pn_split g1) * #f1 #H1
+[ elim (sor_inv_ppn … H … H1 H2 H0)
+| /3 width=7 by sor_inv_npn, ex2_intro/
+]
+qed-.
+
+lemma sor_inv_xxp: ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f. ⫯f = g →
+ ∃∃f1,f2. f1 ⋓ f2 ≘ f & ⫯f1 = g1 & ⫯f2 = g2.
+#g1 #g2 #g #H #f #H0
+elim (pn_split g1) * #f1 #H1
+[ elim (sor_inv_pxp … H … H1 H0) -g /2 width=5 by ex3_2_intro/
+| elim (sor_inv_nxp … H … H1 H0)
+]
+qed-.
+
+lemma sor_inv_nxn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
+ ∀f1,f. ↑f1 = g1 → ↑f = g →
+ (∃∃f2. f1 ⋓ f2 ≘ f & ⫯f2 = g2) ∨
+ ∃∃f2. f1 ⋓ f2 ≘ f & ↑f2 = g2.
+#g1 #g2 elim (pn_split g2) *
+/4 width=7 by sor_inv_npn, sor_inv_nnn, ex2_intro, or_intror, or_introl/
+qed-.
+
+lemma sor_inv_xnn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
+ ∀f2,f. ↑f2 = g2 → ↑f = g →
+ (∃∃f1. f1 ⋓ f2 ≘ f & ⫯f1 = g1) ∨
+ ∃∃f1. f1 ⋓ f2 ≘ f & ↑f1 = g1.
+#g1 elim (pn_split g1) *
+/4 width=7 by sor_inv_pnn, sor_inv_nnn, ex2_intro, or_intror, or_introl/
+qed-.
+
+lemma sor_inv_xxn: ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f. ↑f = g →
+ ∨∨ ∃∃f1,f2. f1 ⋓ f2 ≘ f & ↑f1 = g1 & ⫯f2 = g2
+ | ∃∃f1,f2. f1 ⋓ f2 ≘ f & ⫯f1 = g1 & ↑f2 = g2
+ | ∃∃f1,f2. f1 ⋓ f2 ≘ f & ↑f1 = g1 & ↑f2 = g2.
+#g1 #g2 #g #H #f #H0
+elim (pn_split g1) * #f1 #H1
+[ elim (sor_inv_pxn … H … H1 H0) -g
+ /3 width=5 by or3_intro1, ex3_2_intro/
+| elim (sor_inv_nxn … H … H1 H0) -g *
+ /3 width=5 by or3_intro0, or3_intro2, ex3_2_intro/
+]
+qed-.
+
+(* Main inversion lemmas ****************************************************)
+
+corec theorem sor_mono: ∀f1,f2,x,y. f1 ⋓ f2 ≘ x → f1 ⋓ f2 ≘ y → x ≡ y.
+#f1 #f2 #x #y * -f1 -f2 -x
+#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #H
+[ cases (sor_inv_ppx … H … H1 H2)
+| cases (sor_inv_npx … H … H1 H2)
+| cases (sor_inv_pnx … H … H1 H2)
+| cases (sor_inv_nnx … H … H1 H2)
+] -g1 -g2
+/3 width=5 by eq_push, eq_next/
+qed-.
+
+(* Basic properties *********************************************************)
+
+corec lemma sor_eq_repl_back1: ∀f2,f. eq_repl_back … (λf1. f1 ⋓ f2 ≘ f).
+#f2 #f #f1 * -f1 -f2 -f
+#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x #Hx
+try cases (eq_inv_px … Hx … H1) try cases (eq_inv_nx … Hx … H1) -g1
+/3 width=7 by sor_pp, sor_np, sor_pn, sor_nn/
+qed-.
+
+lemma sor_eq_repl_fwd1: ∀f2,f. eq_repl_fwd … (λf1. f1 ⋓ f2 ≘ f).
+#f2 #f @eq_repl_sym /2 width=3 by sor_eq_repl_back1/
+qed-.
+
+corec lemma sor_eq_repl_back2: ∀f1,f. eq_repl_back … (λf2. f1 ⋓ f2 ≘ f).
+#f1 #f #f2 * -f1 -f2 -f
+#f1 #f2 #f #g1 #g2 #g #Hf #H #H2 #H0 #x #Hx
+try cases (eq_inv_px … Hx … H2) try cases (eq_inv_nx … Hx … H2) -g2
+/3 width=7 by sor_pp, sor_np, sor_pn, sor_nn/
+qed-.
+
+lemma sor_eq_repl_fwd2: ∀f1,f. eq_repl_fwd … (λf2. f1 ⋓ f2 ≘ f).
+#f1 #f @eq_repl_sym /2 width=3 by sor_eq_repl_back2/
+qed-.
+
+corec lemma sor_eq_repl_back3: ∀f1,f2. eq_repl_back … (λf. f1 ⋓ f2 ≘ f).
+#f1 #f2 #f * -f1 -f2 -f
+#f1 #f2 #f #g1 #g2 #g #Hf #H #H2 #H0 #x #Hx
+try cases (eq_inv_px … Hx … H0) try cases (eq_inv_nx … Hx … H0) -g
+/3 width=7 by sor_pp, sor_np, sor_pn, sor_nn/
+qed-.
+
+lemma sor_eq_repl_fwd3: ∀f1,f2. eq_repl_fwd … (λf. f1 ⋓ f2 ≘ f).
+#f1 #f2 @eq_repl_sym /2 width=3 by sor_eq_repl_back3/
+qed-.
+
+corec lemma sor_idem: ∀f. f ⋓ f ≘ f.
+#f cases (pn_split f) * #g #H
+[ @(sor_pp … H H H) | @(sor_nn … H H H) ] -H //
+qed.
+
+corec lemma sor_comm: ∀f1,f2,f. f1 ⋓ f2 ≘ f → f2 ⋓ f1 ≘ f.
+#f1 #f2 #f * -f1 -f2 -f
+#f1 #f2 #f #g1 #g2 #g #Hf * * * -g1 -g2 -g
+[ @sor_pp | @sor_pn | @sor_np | @sor_nn ] /2 width=7 by/
+qed-.
+
+(* Properties with tail *****************************************************)
+
+lemma sor_tl: ∀f1,f2,f. f1 ⋓ f2 ≘ f → ⫱f1 ⋓ ⫱f2 ≘ ⫱f.
+#f1 cases (pn_split f1) * #g1 #H1
+#f2 cases (pn_split f2) * #g2 #H2
+#f #Hf
+[ cases (sor_inv_ppx … Hf … H1 H2)
+| cases (sor_inv_pnx … Hf … H1 H2)
+| cases (sor_inv_npx … Hf … H1 H2)
+| cases (sor_inv_nnx … Hf … H1 H2)
+] -Hf #g #Hg #H destruct //
+qed.
+
+lemma sor_xxn_tl: ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f. ↑f = g →
+ (∃∃f1,f2. f1 ⋓ f2 ≘ f & ↑f1 = g1 & ⫱g2 = f2) ∨
+ (∃∃f1,f2. f1 ⋓ f2 ≘ f & ⫱g1 = f1 & ↑f2 = g2).
+#g1 #g2 #g #H #f #H0 elim (sor_inv_xxn … H … H0) -H -H0 *
+/3 width=5 by ex3_2_intro, or_introl, or_intror/
+qed-.
+
+lemma sor_xnx_tl: ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f2. ↑f2 = g2 →
+ ∃∃f1,f. f1 ⋓ f2 ≘ f & ⫱g1 = f1 & ↑f = g.
+#g1 elim (pn_split g1) * #f1 #H1 #g2 #g #H #f2 #H2
+[ elim (sor_inv_pnx … H … H1 H2) | elim (sor_inv_nnx … H … H1 H2) ] -g2
+/3 width=5 by ex3_2_intro/
+qed-.
+
+lemma sor_nxx_tl: ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f1. ↑f1 = g1 →
+ ∃∃f2,f. f1 ⋓ f2 ≘ f & ⫱g2 = f2 & ↑f = g.
+#g1 #g2 elim (pn_split g2) * #f2 #H2 #g #H #f1 #H1
+[ elim (sor_inv_npx … H … H1 H2) | elim (sor_inv_nnx … H … H1 H2) ] -g1
+/3 width=5 by ex3_2_intro/
+qed-.
+
+(* Properties with iterated tail ********************************************)
+
+lemma sor_tls: ∀f1,f2,f. f1 ⋓ f2 ≘ f →
+ ∀n. ⫱*[n]f1 ⋓ ⫱*[n]f2 ≘ ⫱*[n]f.
+#f1 #f2 #f #Hf #n elim n -n /2 width=1 by sor_tl/
+qed.
+
+(* Properies with test for identity *****************************************)
+
+corec lemma sor_isid_sn: ∀f1. 𝐈❪f1❫ → ∀f2. f1 ⋓ f2 ≘ f2.
+#f1 * -f1
+#f1 #g1 #Hf1 #H1 #f2 cases (pn_split f2) *
+/3 width=7 by sor_pp, sor_pn/
+qed.
+
+corec lemma sor_isid_dx: ∀f2. 𝐈❪f2❫ → ∀f1. f1 ⋓ f2 ≘ f1.
+#f2 * -f2
+#f2 #g2 #Hf2 #H2 #f1 cases (pn_split f1) *
+/3 width=7 by sor_pp, sor_np/
+qed.
+
+lemma sor_isid: ∀f1,f2,f. 𝐈❪f1❫ → 𝐈❪f2❫ → 𝐈❪f❫ → f1 ⋓ f2 ≘ f.
+/4 width=3 by sor_eq_repl_back2, sor_eq_repl_back1, isid_inv_eq_repl/ qed.
+
+(* Inversion lemmas with tail ***********************************************)
+
+lemma sor_inv_tl_sn: ∀f1,f2,f. ⫱f1 ⋓ f2 ≘ f → f1 ⋓ ↑f2 ≘ ↑f.
+#f1 #f2 #f elim (pn_split f1) *
+#g1 #H destruct /2 width=7 by sor_pn, sor_nn/
+qed-.
+
+lemma sor_inv_tl_dx: ∀f1,f2,f. f1 ⋓ ⫱f2 ≘ f → ↑f1 ⋓ f2 ≘ ↑f.
+#f1 #f2 #f elim (pn_split f2) *
+#g2 #H destruct /2 width=7 by sor_np, sor_nn/
+qed-.
+
+(* Inversion lemmas with test for identity **********************************)
+
+lemma sor_isid_inv_sn: ∀f1,f2,f. f1 ⋓ f2 ≘ f → 𝐈❪f1❫ → f2 ≡ f.
+/3 width=4 by sor_isid_sn, sor_mono/
+qed-.
+
+lemma sor_isid_inv_dx: ∀f1,f2,f. f1 ⋓ f2 ≘ f → 𝐈❪f2❫ → f1 ≡ f.
+/3 width=4 by sor_isid_dx, sor_mono/
+qed-.
+
+corec lemma sor_fwd_isid1: ∀f1,f2,f. f1 ⋓ f2 ≘ f → 𝐈❪f❫ → 𝐈❪f1❫.
+#f1 #f2 #f * -f1 -f2 -f
+#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H #Hg
+[ /4 width=6 by isid_inv_push, isid_push/ ]
+cases (isid_inv_next … Hg … H)
+qed-.
+
+corec lemma sor_fwd_isid2: ∀f1,f2,f. f1 ⋓ f2 ≘ f → 𝐈❪f❫ → 𝐈❪f2❫.
+#f1 #f2 #f * -f1 -f2 -f
+#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H #Hg
+[ /4 width=6 by isid_inv_push, isid_push/ ]
+cases (isid_inv_next … Hg … H)
+qed-.
+
+lemma sor_inv_isid3: ∀f1,f2,f. f1 ⋓ f2 ≘ f → 𝐈❪f❫ → 𝐈❪f1❫ ∧ 𝐈❪f2❫.
+/3 width=4 by sor_fwd_isid2, sor_fwd_isid1, conj/ qed-.
+
+(* Properties with finite colength assignment *******************************)
+
+lemma sor_fcla_ex: ∀f1,n1. 𝐂❪f1❫ ≘ n1 → ∀f2,n2. 𝐂❪f2❫ ≘ n2 →
+ ∃∃f,n. f1 ⋓ f2 ≘ f & 𝐂❪f❫ ≘ n & (n1 ∨ n2) ≤ n & n ≤ n1 + n2.
+#f1 #n1 #Hf1 elim Hf1 -f1 -n1 /3 width=6 by sor_isid_sn, ex4_2_intro/
+#f1 #n1 #Hf1 #IH #f2 #n2 * -f2 -n2 /3 width=6 by fcla_push, fcla_next, ex4_2_intro, sor_isid_dx/
+#f2 #n2 #Hf2 elim (IH … Hf2) -IH -Hf2 -Hf1 [2,4: #f #n <plus_n_Sm ] (**) (* full auto fails *)
+[ /3 width=7 by fcla_next, sor_pn, max_S2_le_S, le_S_S, ex4_2_intro/
+| /4 width=7 by fcla_next, sor_nn, le_S, le_S_S, ex4_2_intro/
+| /3 width=7 by fcla_push, sor_pp, ex4_2_intro/
+| /3 width=7 by fcla_next, sor_np, max_S1_le_S, le_S_S, ex4_2_intro/
+]
+qed-.
+
+lemma sor_fcla: ∀f1,n1. 𝐂❪f1❫ ≘ n1 → ∀f2,n2. 𝐂❪f2❫ ≘ n2 → ∀f. f1 ⋓ f2 ≘ f →
+ ∃∃n. 𝐂❪f❫ ≘ n & (n1 ∨ n2) ≤ n & n ≤ n1 + n2.
+#f1 #n1 #Hf1 #f2 #n2 #Hf2 #f #Hf elim (sor_fcla_ex … Hf1 … Hf2) -Hf1 -Hf2
+/4 width=6 by sor_mono, fcla_eq_repl_back, ex3_intro/
+qed-.
+
+(* Forward lemmas with finite colength **************************************)
+
+lemma sor_fwd_fcla_sn_ex: ∀f,n. 𝐂❪f❫ ≘ n → ∀f1,f2. f1 ⋓ f2 ≘ f →
+ ∃∃n1. 𝐂❪f1❫ ≘ n1 & n1 ≤ n.
+#f #n #H elim H -f -n
+[ /4 width=4 by sor_fwd_isid1, fcla_isid, ex2_intro/
+| #f #n #_ #IH #f1 #f2 #H
+ elim (sor_inv_xxp … H) -H [ |*: // ] #g1 #g2 #Hf #H1 #H2 destruct
+ elim (IH … Hf) -f /3 width=3 by fcla_push, ex2_intro/
+| #f #n #_ #IH #f1 #f2 #H
+ elim (sor_inv_xxn … H) -H [1,3,4: * |*: // ] #g1 #g2 #Hf #H1 #H2 destruct
+ elim (IH … Hf) -f /3 width=3 by fcla_push, fcla_next, le_S_S, le_S, ex2_intro/
+]
+qed-.
+
+lemma sor_fwd_fcla_dx_ex: ∀f,n. 𝐂❪f❫ ≘ n → ∀f1,f2. f1 ⋓ f2 ≘ f →
+ ∃∃n2. 𝐂❪f2❫ ≘ n2 & n2 ≤ n.
+/3 width=4 by sor_fwd_fcla_sn_ex, sor_comm/ qed-.
+
+(* Properties with test for finite colength *********************************)
+
+lemma sor_isfin_ex: ∀f1,f2. 𝐅❪f1❫ → 𝐅❪f2❫ → ∃∃f. f1 ⋓ f2 ≘ f & 𝐅❪f❫.
+#f1 #f2 * #n1 #H1 * #n2 #H2 elim (sor_fcla_ex … H1 … H2) -H1 -H2
+/3 width=4 by ex2_intro, ex_intro/
+qed-.
+
+lemma sor_isfin: ∀f1,f2. 𝐅❪f1❫ → 𝐅❪f2❫ → ∀f. f1 ⋓ f2 ≘ f → 𝐅❪f❫.
+#f1 #f2 #Hf1 #Hf2 #f #Hf elim (sor_isfin_ex … Hf1 … Hf2) -Hf1 -Hf2
+/3 width=6 by sor_mono, isfin_eq_repl_back/
+qed-.
+
+(* Forward lemmas with test for finite colength *****************************)
+
+lemma sor_fwd_isfin_sn: ∀f. 𝐅❪f❫ → ∀f1,f2. f1 ⋓ f2 ≘ f → 𝐅❪f1❫.
+#f * #n #Hf #f1 #f2 #H
+elim (sor_fwd_fcla_sn_ex … Hf … H) -f -f2 /2 width=2 by ex_intro/
+qed-.
+
+lemma sor_fwd_isfin_dx: ∀f. 𝐅❪f❫ → ∀f1,f2. f1 ⋓ f2 ≘ f → 𝐅❪f2❫.
+#f * #n #Hf #f1 #f2 #H
+elim (sor_fwd_fcla_dx_ex … Hf … H) -f -f1 /2 width=2 by ex_intro/
+qed-.
+
+(* Inversion lemmas with test for finite colength ***************************)
+
+lemma sor_inv_isfin3: ∀f1,f2,f. f1 ⋓ f2 ≘ f → 𝐅❪f❫ → 𝐅❪f1❫ ∧ 𝐅❪f2❫.
+/3 width=4 by sor_fwd_isfin_dx, sor_fwd_isfin_sn, conj/ qed-.
+
+(* Inversion lemmas with inclusion ******************************************)
+
+corec lemma sor_inv_sle_sn: ∀f1,f2,f. f1 ⋓ f2 ≘ f → f1 ⊆ f.
+#f1 #f2 #f * -f1 -f2 -f
+#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0
+/3 width=5 by sle_push, sle_next, sle_weak/
+qed-.
+
+corec lemma sor_inv_sle_dx: ∀f1,f2,f. f1 ⋓ f2 ≘ f → f2 ⊆ f.
+#f1 #f2 #f * -f1 -f2 -f
+#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0
+/3 width=5 by sle_push, sle_next, sle_weak/
+qed-.
+
+lemma sor_inv_sle_sn_trans: ∀f1,f2,f. f1 ⋓ f2 ≘ f → ∀g. g ⊆ f1 → g ⊆ f.
+/3 width=4 by sor_inv_sle_sn, sle_trans/ qed-.
+
+lemma sor_inv_sle_dx_trans: ∀f1,f2,f. f1 ⋓ f2 ≘ f → ∀g. g ⊆ f2 → g ⊆ f.
+/3 width=4 by sor_inv_sle_dx, sle_trans/ qed-.
+
+axiom sor_inv_sle: ∀f1,f2,f. f1 ⋓ f2 ≘ f → ∀g. f1 ⊆ g → f2 ⊆ g → f ⊆ g.
+
+(* Properties with inclusion ************************************************)
+
+corec lemma sor_sle_dx: ∀f1,f2. f1 ⊆ f2 → f1 ⋓ f2 ≘ f2.
+#f1 #f2 * -f1 -f2 /3 width=7 by sor_pp, sor_nn, sor_pn/
+qed.
+
+corec lemma sor_sle_sn: ∀f1,f2. f1 ⊆ f2 → f2 ⋓ f1 ≘ f2.
+#f1 #f2 * -f1 -f2 /3 width=7 by sor_pp, sor_nn, sor_np/
+qed.
+
+(* Main properties **********************************************************)
+
+axiom monotonic_sle_sor: ∀f1,g1. f1 ⊆ g1 → ∀f2,g2. f2 ⊆ g2 →
+ ∀f. f1 ⋓ f2 ≘ f → ∀g. g1 ⋓ g2 ≘ g → f ⊆ g.
+
+axiom sor_assoc_dx: ∀f0,f3,f4. f0 ⋓ f3 ≘ f4 →
+ ∀f1,f2. f1 ⋓ f2 ≘ f0 →
+ ∀f. f2 ⋓ f3 ≘ f → f1 ⋓ f ≘ f4.
+
+axiom sor_assoc_sn: ∀f1,f0,f4. f1 ⋓ f0 ≘ f4 →
+ ∀f2, f3. f2 ⋓ f3 ≘ f0 →
+ ∀f. f1 ⋓ f2 ≘ f → f ⋓ f3 ≘ f4.
+
+lemma sor_comm_23: ∀f0,f1,f2,f3,f4,f.
+ f0⋓f4 ≘ f1 → f1⋓f2 ≘ f → f0⋓f2 ≘ f3 → f3⋓f4 ≘ f.
+/4 width=6 by sor_comm, sor_assoc_dx/ qed-.
+
+corec theorem sor_comm_23_idem: ∀f0,f1,f2. f0 ⋓ f1 ≘ f2 →
+ ∀f. f1 ⋓ f2 ≘ f → f1 ⋓ f0 ≘ f.
+#f0 #f1 #f2 * -f0 -f1 -f2
+#f0 #f1 #f2 #g0 #g1 #g2 #Hf2 #H0 #H1 #H2 #g #Hg
+[ cases (sor_inv_ppx … Hg … H1 H2)
+| cases (sor_inv_pnx … Hg … H1 H2)
+| cases (sor_inv_nnx … Hg … H1 H2)
+| cases (sor_inv_nnx … Hg … H1 H2)
+] -g2 #f #Hf #H
+/3 width=7 by sor_nn, sor_np, sor_pn, sor_pp/
+qed-.
+
+corec theorem sor_coll_dx: ∀f1,f2,f. f1 ⋓ f2 ≘ f → ∀g1,g2,g. g1 ⋓ g2 ≘ g →
+ ∀g0. g1 ⋓ g0 ≘ f1 → g2 ⋓ g0 ≘ f2 → g ⋓ g0 ≘ f.
+#f1 #f2 #f cases (pn_split f) * #x #Hx #Hf #g1 #g2 #g #Hg #g0 #Hf1 #Hf2
+[ cases (sor_inv_xxp … Hf … Hx) -Hf #x1 #x2 #Hf #Hx1 #Hx2
+ cases (sor_inv_xxp … Hf1 … Hx1) -f1 #y1 #y0 #Hf1 #Hy1 #Hy0
+ cases (sor_inv_xpp … Hf2 … Hy0 … Hx2) -f2 #y2 #Hf2 #Hy2
+ cases (sor_inv_ppx … Hg … Hy1 Hy2) -g1 -g2 #y #Hg #Hy
+ @(sor_pp … Hy Hy0 Hx) -g -g0 -f /2 width=8 by/
+| cases (pn_split g) * #y #Hy
+ [ cases (sor_inv_xxp … Hg … Hy) -Hg #y1 #y2 #Hg #Hy1 #Hy2
+ cases (sor_xxn_tl … Hf … Hx) * #x1 #x2 #_ #Hx1 #Hx2
+ [ cases (sor_inv_pxn … Hf1 … Hy1 Hx1) -g1 #y0 #Hf1 #Hy0
+ cases (sor_inv_pnx … Hf2 … Hy2 Hy0) -g2 -x2 #x2 #Hf2 #Hx2
+ | cases (sor_inv_pxn … Hf2 … Hy2 Hx2) -g2 #y0 #Hf2 #Hy0
+ cases (sor_inv_pnx … Hf1 … Hy1 Hy0) -g1 -x1 #x1 #Hf1 #Hx1
+ ]
+ lapply (sor_inv_nnn … Hf … Hx1 Hx2 Hx) -f1 -f2 #Hf
+ @(sor_pn … Hy Hy0 Hx) -g -g0 -f /2 width=8 by/
+ | lapply (sor_tl … Hf) -Hf #Hf
+ lapply (sor_tl … Hg) -Hg #Hg
+ lapply (sor_tl … Hf1) -Hf1 #Hf1
+ lapply (sor_tl … Hf2) -Hf2 #Hf2
+ cases (pn_split g0) * #y0 #Hy0
+ [ @(sor_np … Hy Hy0 Hx) /2 width=8 by/
+ | @(sor_nn … Hy Hy0 Hx) /2 width=8 by/
+ ]
+ ]
+]
+qed-.
+
+corec theorem sor_distr_dx: ∀g0,g1,g2,g. g1 ⋓ g2 ≘ g →
+ ∀f1,f2,f. g1 ⋓ g0 ≘ f1 → g2 ⋓ g0 ≘ f2 → g ⋓ g0 ≘ f →
+ f1 ⋓ f2 ≘ f.
+#g0 cases (pn_split g0) * #y0 #H0 #g1 #g2 #g
+[ * -g1 -g2 -g #y1 #y2 #y #g1 #g2 #g #Hy #Hy1 #Hy2 #Hy #f1 #f2 #f #Hf1 #Hf2 #Hf
+ [ cases (sor_inv_ppx … Hf1 … Hy1 H0) -g1
+ cases (sor_inv_ppx … Hf2 … Hy2 H0) -g2
+ cases (sor_inv_ppx … Hf … Hy H0) -g
+ | cases (sor_inv_npx … Hf1 … Hy1 H0) -g1
+ cases (sor_inv_ppx … Hf2 … Hy2 H0) -g2
+ cases (sor_inv_npx … Hf … Hy H0) -g
+ | cases (sor_inv_ppx … Hf1 … Hy1 H0) -g1
+ cases (sor_inv_npx … Hf2 … Hy2 H0) -g2
+ cases (sor_inv_npx … Hf … Hy H0) -g
+ | cases (sor_inv_npx … Hf1 … Hy1 H0) -g1
+ cases (sor_inv_npx … Hf2 … Hy2 H0) -g2
+ cases (sor_inv_npx … Hf … Hy H0) -g
+ ] -g0 #y #Hy #H #y2 #Hy2 #H2 #y1 #Hy1 #H1
+ /3 width=8 by sor_nn, sor_np, sor_pn, sor_pp/
+| #H #f1 #f2 #f #Hf1 #Hf2 #Hf
+ cases (sor_xnx_tl … Hf1 … H0) -Hf1
+ cases (sor_xnx_tl … Hf2 … H0) -Hf2
+ cases (sor_xnx_tl … Hf … H0) -Hf
+ -g0 #y #x #Hx #Hy #H #y2 #x2 #Hx2 #Hy2 #H2 #y1 #x1 #Hx1 #Hy1 #H1
+ /4 width=8 by sor_tl, sor_nn/
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/functions/droppred_1.ma".
+include "ground/relocation/rtmap_eq.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+definition tl: rtmap → rtmap.
+@case_type0 #f @f
+defined.
+
+interpretation "tail (rtmap)" 'DropPred f = (tl f).
+
+(* Basic properties *********************************************************)
+
+lemma tl_rew: ∀f. case_type0 (λ_:rtmap.rtmap) (λf:rtmap.f) (λf:rtmap.f) f = ⫱f.
+// qed.
+
+lemma tl_push_rew: ∀f. f = ⫱⫯f.
+#f <tl_rew <iota_push //
+qed.
+
+lemma tl_next_rew: ∀f. f = ⫱↑f.
+#f <tl_rew <iota_next //
+qed.
+
+lemma tl_eq_repl: eq_repl … (λf1,f2. ⫱f1 ≡ ⫱f2).
+#f1 #f2 * -f1 -f2 //
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/functions/droppreds_2.ma".
+include "ground/relocation/rtmap_pushs.ma".
+include "ground/relocation/rtmap_tl.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+rec definition tls (f:rtmap) (n:nat) on n: rtmap ≝ match n with
+[ O ⇒ f | S m ⇒ ⫱(tls f m) ].
+
+interpretation "tls (rtmap)" 'DropPreds n f = (tls f n).
+
+(* Basic properties *********************************************************)
+
+lemma tls_O: ∀f. f = ⫱*[0] f.
+// qed.
+
+lemma tls_S: ∀f,n. ⫱ ⫱*[n] f = ⫱*[↑n] f.
+// qed.
+
+lemma tls_eq_repl: ∀n. eq_repl (λf1,f2. ⫱*[n] f1 ≡ ⫱*[n] f2).
+#n elim n -n /3 width=1 by tl_eq_repl/
+qed.
+
+(* Advanced properties ******************************************************)
+
+lemma tls_xn: ∀n,f. ⫱*[n] ⫱f = ⫱*[↑n] f.
+#n elim n -n //
+qed.
+
+(* Properties with pushs ****************************************************)
+
+lemma tls_pushs: ∀n,f. f = ⫱*[n] ⫯*[n] f.
+#n elim n -n //
+#n #IH #f <tls_xn //
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/functions/uniform_1.ma".
+include "ground/relocation/rtmap_id.ma".
+include "ground/relocation/rtmap_isuni.ma".
+
+(* RELOCATION MAP ***********************************************************)
+
+rec definition uni (n:nat) on n: rtmap ≝ match n with
+[ O ⇒ 𝐈𝐝
+| S n ⇒ ↑(uni n)
+].
+
+interpretation "uniform relocation (rtmap)"
+ 'Uniform n = (uni n).
+
+(* Basic properties *********************************************************)
+
+lemma uni_zero: 𝐈𝐝 = 𝐔❨0❩.
+// qed.
+
+lemma uni_succ: ∀n. ↑𝐔❨n❩ = 𝐔❨↑n❩.
+// qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma uni_inv_push_dx: ∀f,n. 𝐔❨n❩ ≡ ⫯f → 0 = n ∧ 𝐈𝐝 ≡ f.
+#f * /3 width=5 by eq_inv_pp, conj/
+#n <uni_succ #H elim (eq_inv_np … H) -H //
+qed-.
+
+lemma uni_inv_push_sn: ∀f,n. ⫯f ≡ 𝐔❨n❩ → 0 = n ∧ 𝐈𝐝 ≡ f.
+/3 width=1 by uni_inv_push_dx, eq_sym/ qed-.
+
+lemma uni_inv_id_dx: ∀n. 𝐔❨n❩ ≡ 𝐈𝐝 → 0 = n.
+#n <id_rew #H elim (uni_inv_push_dx … H) -H //
+qed-.
+
+lemma uni_inv_id_sn: ∀n. 𝐈𝐝 ≡ 𝐔❨n❩ → 0 = n.
+/3 width=1 by uni_inv_id_dx, eq_sym/ qed-.
+
+lemma uni_inv_next_dx: ∀f,n. 𝐔❨n❩ ≡ ↑f → ∃∃m. 𝐔❨m❩ ≡ f & ↑m = n.
+#f *
+[ <uni_zero <id_rew #H elim (eq_inv_pn … H) -H //
+| #n <uni_succ /3 width=5 by eq_inv_nn, ex2_intro/
+]
+qed-.
+
+lemma uni_inv_next_sn: ∀f,n. ↑f ≡ 𝐔❨n❩ → ∃∃m. 𝐔❨m❩ ≡ f & ↑m = n.
+/3 width=1 by uni_inv_next_dx, eq_sym/ qed-.
+
+(* Properties with test for identity ****************************************)
+
+lemma uni_isid: ∀f. 𝐈❪f❫ → 𝐔❨0❩ ≡ f.
+/2 width=1 by eq_id_inv_isid/ qed-.
+
+(* Inversion lemmas with test for identity **********************************)
+
+lemma uni_inv_isid: ∀f. 𝐔❨0❩ ≡ f → 𝐈❪f❫.
+/2 width=1 by eq_id_isid/ qed-.
+
+(* Properties with finite colength assignment ***************************)
+
+lemma fcla_uni: ∀n. 𝐂❪𝐔❨n❩❫ ≘ n.
+#n elim n -n /2 width=1 by fcla_isid, fcla_next/
+qed.
+
+(* Properties with test for finite colength ***************************)
+
+lemma isfin_uni: ∀n. 𝐅❪𝐔❨n❩❫.
+/3 width=2 by ex_intro/ qed.
+
+(* Properties with test for uniformity **************************************)
+
+lemma isuni_uni: ∀n. 𝐔❪𝐔❨n❩❫.
+#n elim n -n /3 width=3 by isuni_isid, isuni_next/
+qed.
+
+lemma uni_isuni: ∀f. 𝐔❪f❫ → ∃n. 𝐔❨n❩ ≡ f.
+#f #H elim H -f /3 width=2 by uni_isid, ex_intro/
+#f #_ #g #H * /3 width=6 by eq_next, ex_intro/
+qed-.
+
+(* Inversion lemmas with test for uniformity ********************************)
+
+lemma uni_inv_isuni: ∀n,f. 𝐔❨n❩ ≡ f → 𝐔❪f❫.
+#n elim n -n /3 width=1 by uni_inv_isid, isuni_isid/
+#n #IH #x <uni_succ #H elim (eq_inv_nx … H) -H /3 width=3 by isuni_next/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/xoa/ex_1_2.ma".
+include "ground/notation/functions/tuple_4.ma".
+include "ground/notation/functions/zerozero_0.ma".
+include "ground/notation/functions/zeroone_0.ma".
+include "ground/notation/functions/onezero_0.ma".
+include "ground/lib/arith.ma".
+
+(* RT-TRANSITION COUNTER ****************************************************)
+
+record rtc: Type[0] ≝ {
+ ri: nat; (* Note: inner r-steps *)
+ rs: nat; (* Note: spine r-steps *)
+ ti: nat; (* Note: inner t-steps *)
+ ts: nat (* Note: spine t-steps *)
+}.
+
+interpretation "constructor (rtc)"
+ 'Tuple ri rs ti ts = (mk_rtc ri rs ti ts).
+
+interpretation "one structural step (rtc)"
+ 'ZeroZero = (mk_rtc O O O O).
+
+interpretation "one r-step (rtc)"
+ 'OneZero = (mk_rtc O (S O) O O).
+
+interpretation "one t-step (rtc)"
+ 'ZeroOne = (mk_rtc O O O (S O)).
+
+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〉)
+.
+
+(* Basic properties *********************************************************)
+
+lemma eq_t_refl: reflexive … eq_t.
+* // qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+fact eq_t_inv_dx_aux: ∀x,y. eq_t x y →
+ ∀ri1,rs1,ti,ts. x = 〈ri1,rs1,ti,ts〉 →
+ ∃∃ri2,rs2. y = 〈ri2,rs2,ti,ts〉.
+#x #y * -x -y
+#ri1 #ri #rs1 #rs #ti1 #ts1 #ri2 #rs2 #ti2 #ts2 #H destruct -ri2 -rs2
+/2 width=3 by ex1_2_intro/
+qed-.
+
+lemma eq_t_inv_dx: ∀ri1,rs1,ti,ts,y. eq_t (〈ri1,rs1,ti,ts〉) y →
+ ∃∃ri2,rs2. y = 〈ri2,rs2,ti,ts〉.
+/2 width=5 by eq_t_inv_dx_aux/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/relations/isredtype_2.ma".
+include "ground/steps/rtc.ma".
+
+(* RT-TRANSITION COUNTER ****************************************************)
+
+definition isrt: relation2 nat rtc ≝ λ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 isrt_00: 𝐑𝐓❪0,𝟘𝟘❫.
+/2 width=3 by ex1_2_intro/ qed.
+
+lemma isrt_10: 𝐑𝐓❪0,𝟙𝟘❫.
+/2 width=3 by ex1_2_intro/ qed.
+
+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❫.
+#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.
+#n * #ri #rs #H destruct //
+qed-.
+
+lemma isrt_inv_10: ∀n. 𝐑𝐓❪n,𝟙𝟘❫ → 0 = n.
+#n * #ri #rs #H destruct //
+qed-.
+
+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.
+#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.
+#n #c1 #c2 * #ri1 #rs1 #H1 * #ri2 #rs2 #H2 destruct //
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/xoa/ex_3_2.ma".
+include "ground/steps/rtc_max.ma".
+include "ground/steps/rtc_isrt.ma".
+
+(* RT-TRANSITION COUNTER ****************************************************)
+
+(* Properties with test for constrained rt-transition counter ***************)
+
+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❫.
+/2 width=1 by isrt_max/ qed.
+
+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❫.
+#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.
+#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❫.
+#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❫.
+#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❫.
+#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
+<(isrt_inj … H … Hc2) -Hc2
+<idempotent_max /2 width=1 by conj/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/steps/rtc_isrt_shift.ma".
+include "ground/steps/rtc_isrt_max.ma".
+
+(* RT-TRANSITION COUNTER ****************************************************)
+
+(* Inversion properties with test for constrained rt-transition counter *****)
+
+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
+/2 width=1 by conj/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/xoa/ex_3_2.ma".
+include "ground/steps/rtc_plus.ma".
+include "ground/steps/rtc_isrt.ma".
+
+(* RT-TRANSITION COUNTER ****************************************************)
+
+(* Properties with test for constrained rt-transition counter ***************)
+
+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❫.
+/2 width=1 by isrt_plus/ qed.
+
+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+𝟘𝟙❫.
+/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.
+#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❫.
+#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.
+#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
+/2 width=3 by ex2_intro/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/steps/rtc_shift.ma".
+include "ground/steps/rtc_isrt.ma".
+
+(* RT-TRANSITION COUNTER ****************************************************)
+
+(* Properties with test for costrained rt-transition counter ****************)
+
+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.
+#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❫.
+#c #H elim (isrt_inv_shift … H) -H //
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/relations/istype_2.ma".
+include "ground/steps/rtc.ma".
+
+(* T-TRANSITION COUNTER *****************************************************)
+
+definition ist: relation2 nat rtc ≝
+ λts,c. 〈0,0,0,ts〉 = c.
+
+interpretation "test for t-transition counter (rtc)"
+ 'IsType ts c = (ist ts c).
+
+(* Basic properties *********************************************************)
+
+lemma ist_00: 𝐓❪0,𝟘𝟘❫.
+// qed.
+
+lemma ist_01: 𝐓❪1,𝟘𝟙❫.
+// qed.
+
+(* Basic inversion properties ***********************************************)
+
+lemma ist_inv_00: ∀n. 𝐓❪n,𝟘𝟘❫ → 0 = n.
+#n #H destruct //
+qed-.
+
+lemma ist_inv_01: ∀n. 𝐓❪n,𝟘𝟙❫ → 1 = n.
+#n #H destruct //
+qed-.
+
+lemma ist_inv_10: ∀n. 𝐓❪n,𝟙𝟘❫ → ⊥.
+#h #H destruct
+qed-.
+
+(* Main inversion properties ************************************************)
+
+theorem ist_inj: ∀n1,n2,c. 𝐓❪n1,c❫ → 𝐓❪n2,c❫ → n1 = n2.
+#n1 #n2 #c #H1 #H2 destruct //
+qed-.
+
+theorem ist_mono: ∀n,c1,c2. 𝐓❪n,c1❫ → 𝐓❪n,c2❫ → c1 = c2.
+#n #c1 #c2 #H1 #H2 destruct //
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/xoa/ex_3_2.ma".
+include "ground/steps/rtc_max.ma".
+include "ground/steps/rtc_ist.ma".
+
+(* RT-TRANSITION COUNTER ****************************************************)
+
+(* Properties with test for t-transition counter ****************************)
+
+lemma ist_max: ∀n1,n2,c1,c2. 𝐓❪n1,c1❫ → 𝐓❪n2,c2❫ → 𝐓❪n1∨n2,c1∨c2❫.
+#n1 #n2 #c1 #c2 #H1 #H2 destruct //
+qed.
+
+lemma ist_max_O1: ∀n,c1,c2. 𝐓❪0,c1❫ → 𝐓❪n,c2❫ → 𝐓❪n,c1∨c2❫.
+/2 width=1 by ist_max/ qed.
+
+lemma ist_max_O2: ∀n,c1,c2. 𝐓❪n,c1❫ → 𝐓❪0,c2❫ → 𝐓❪n,c1∨c2❫.
+#n #c1 #c2 #H1 #H2 >(max_O2 n) /2 width=1 by ist_max/
+qed.
+
+lemma ist_max_idem1: ∀n,c1,c2. 𝐓❪n,c1❫ → 𝐓❪n,c2❫ → 𝐓❪n,c1∨c2❫.
+#n #c1 #c2 #H1 #H2 >(idempotent_max n) /2 width=1 by ist_max/
+qed.
+
+(* Inversion properties with test for t-transition counter ******************)
+
+lemma ist_inv_max:
+ ∀n,c1,c2. 𝐓❪n,c1 ∨ c2❫ →
+ ∃∃n1,n2. 𝐓❪n1,c1❫ & 𝐓❪n2,c2❫ & (n1 ∨ n2) = n.
+#n #c1 #c2 #H
+elim (max_inv_dx … H) -H #ri1 #rs1 #ti1 #ts1 #ri2 #rs2 #ti2 #ts2 #H1 #H2 #H3 #H4 #H5 #H6 destruct
+elim (max_inv_O3 … H1) -H1 #H11 #H12 destruct
+elim (max_inv_O3 … H2) -H2 #H21 #H22 destruct
+elim (max_inv_O3 … H3) -H3 #H31 #H32 destruct
+/2 width=5 by ex3_2_intro/
+qed-.
+
+lemma ist_O_inv_max: ∀c1,c2. 𝐓❪0,c1 ∨ c2❫ → ∧∧ 𝐓❪0,c1❫ & 𝐓❪0,c2❫.
+#c1 #c2 #H
+elim (ist_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 ist_inv_max_O_dx: ∀n,c1,c2. 𝐓❪n,c1 ∨ c2❫ → 𝐓❪0,c2❫ → 𝐓❪n,c1❫.
+#n #c1 #c2 #H #H2
+elim (ist_inv_max … H) -H #n1 #n2 #Hn1 #Hn2 #H destruct //
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/xoa/ex_3_2.ma".
+include "ground/steps/rtc_plus.ma".
+include "ground/steps/rtc_ist.ma".
+
+(* RT-TRANSITION COUNTER ****************************************************)
+
+(* Properties with test for t-transition counter ****************************)
+
+lemma ist_plus: ∀n1,n2,c1,c2. 𝐓❪n1,c1❫ → 𝐓❪n2,c2❫ → 𝐓❪n1+n2,c1+c2❫.
+#n1 #n2 #c1 #c2 #H1 #H2 destruct //
+qed.
+
+lemma ist_plus_O1: ∀n,c1,c2. 𝐓❪0,c1❫ → 𝐓❪n,c2❫ → 𝐓❪n,c1+c2❫.
+/2 width=1 by ist_plus/ qed.
+
+lemma ist_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 ist_plus/
+qed.
+
+lemma ist_succ: ∀n,c. 𝐓❪n,c❫ → 𝐓❪↑n,c+𝟘𝟙❫.
+/2 width=1 by ist_plus/ qed.
+
+(* Inversion properties with test for constrained rt-transition counter *****)
+
+lemma ist_inv_plus:
+ ∀n,c1,c2. 𝐓❪n,c1 + c2❫ →
+ ∃∃n1,n2. 𝐓❪n1,c1❫ & 𝐓❪n2,c2❫ & n1 + n2 = n.
+#n #c1 #c2 #H
+elim (plus_inv_dx … H) -H #ri1 #rs1 #ti1 #ts1 #ri2 #rs2 #ti2 #ts2 #H1 #H2 #H3 #H4 #H5 #H6 destruct
+elim (plus_inv_O3 … H1) -H1 #H11 #H12 destruct
+elim (plus_inv_O3 … H2) -H2 #H21 #H22 destruct
+elim (plus_inv_O3 … H3) -H3 #H31 #H32 destruct
+/3 width=5 by ex3_2_intro/
+qed-.
+
+lemma ist_inv_plus_O_dx: ∀n,c1,c2. 𝐓❪n,c1 + c2❫ → 𝐓❪0,c2❫ → 𝐓❪n,c1❫.
+#n #c1 #c2 #H #H2
+elim (ist_inv_plus … H) -H #n1 #n2 #Hn1 #Hn2 #H destruct //
+qed-.
+
+lemma ist_inv_plus_SO_dx:
+ ∀n,c1,c2. 𝐓❪n,c1 + c2❫ → 𝐓❪1,c2❫ →
+ ∃∃m. 𝐓❪m,c1❫ & n = ↑m.
+#n #c1 #c2 #H #H2 destruct
+elim (ist_inv_plus … H) -H #n1 #n2 #Hn1 #Hn2 #H destruct
+/2 width=3 by ex2_intro/
+qed-.
+
+lemma ist_inv_plus_10_dx: ∀n,c. 𝐓❪n,c+𝟙𝟘❫ → ⊥.
+#n #c #H
+elim (ist_inv_plus … H) -H #n1 #n2 #_ #H #_
+/2 width=2 by ist_inv_10/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/steps/rtc_shift.ma".
+include "ground/steps/rtc_ist.ma".
+
+(* RT-TRANSITION COUNTER ****************************************************)
+
+(* Properties with test for t-transition counter ****************************)
+
+lemma ist_zero_shift: ∀c. 𝐓❪0,c❫ → 𝐓❪0,↕*c❫.
+#c #H destruct //
+qed.
+
+(* Inversion properties with test for t-transition counter ******************)
+
+lemma ist_inv_shift: ∀n,c. 𝐓❪n,↕*c❫ → ∧∧ 𝐓❪0,c❫ & 0 = n.
+#n #c #H
+elim (shift_inv_dx … H) -H #rt0 #rs0 #ti0 #ts0 #H1 #_ #H2 #H3 #H4 destruct
+elim (max_inv_O3 … H1) -H1 #H11 #H12 destruct
+elim (max_inv_O3 … H2) -H2 #H21 #H22 destruct
+/2 width=1 by conj/
+qed-.
+
+lemma ist_inv_zero_shift: ∀c. 𝐓❪0,↕*c❫ → 𝐓❪0,c❫.
+#c #H elim (ist_inv_shift … H) -H //
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/xoa/ex_6_8.ma".
+include "ground/steps/rtc.ma".
+
+(* RT-TRANSITION COUNTER ****************************************************)
+
+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〉
+ ]
+].
+
+interpretation "maximum (rtc)"
+ 'or c1 c2 = (max c1 c2).
+
+(* Basic properties *********************************************************)
+
+lemma max_rew: ∀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.
+
+lemma max_O_dx: ∀c. c = (c ∨ 𝟘𝟘).
+* #ri #rs #ti #ts <max_rew //
+qed.
+
+lemma max_idem: ∀c. c = (c ∨ c).
+* #ri #rs #ti #ts <max_rew //
+qed.
+
+(* Basic inversion properties ***********************************************)
+
+lemma max_inv_dx: ∀ri,rs,ti,ts,c1,c2. 〈ri,rs,ti,ts〉 = (c1 ∨ c2) →
+ ∃∃ri1,rs1,ti1,ts1,ri2,rs2,ti2,ts2.
+ (ri1∨ri2) = ri & (rs1∨rs2) = rs & (ti1∨ti2) = ti & (ts1∨ts2) = ts &
+ 〈ri1,rs1,ti1,ts1〉 = c1 & 〈ri2,rs2,ti2,ts2〉 = c2.
+#ri #rs #ti #ts * #ri1 #rs1 #ti1 #ts1 * #ri2 #rs2 #ti2 #ts2
+<max_rew #H destruct /2 width=14 by ex6_8_intro/
+qed-.
+
+(* Main Properties **********************************************************)
+
+theorem max_assoc: associative … max.
+* #ri1 #rs1 #ti1 #ts1 * #ri2 #rs2 #ti2 #ts2 * #ri3 #rs3 #ti3 #ts3
+<max_rew <max_rew //
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/steps/rtc_shift.ma".
+include "ground/steps/rtc_max.ma".
+
+(* RT-TRANSITION COUNTER ****************************************************)
+
+(* Properties with max and shift ********************************************)
+
+lemma max_shift: ∀c1,c2. ((↕*c1) ∨ (↕*c2)) = ↕*(c1∨c2).
+* #ri1 #rs1 #ti1 #ts1 * #ri2 #rs2 #ti2 #ts2
+<shift_rew <shift_rew <shift_rew <max_rew //
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/xoa/ex_6_8.ma".
+include "ground/steps/rtc.ma".
+
+(* RT-TRANSITION COUNTER ****************************************************)
+
+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〉
+ ]
+].
+
+interpretation "plus (rtc)"
+ 'plus c1 c2 = (plus c1 c2).
+
+(* Basic properties *********************************************************)
+
+(**) (* 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,rs1,ti1,ts1〉) + (〈ri2,rs2,ti2,ts2〉).
+// qed.
+
+lemma plus_O_dx: ∀c. c = c + 𝟘𝟘.
+* #ri #rs #ti #ts <plus_rew //
+qed.
+
+(* Basic inversion properties ***********************************************)
+
+lemma plus_inv_dx: ∀ri,rs,ti,ts,c1,c2. 〈ri,rs,ti,ts〉 = c1 + c2 →
+ ∃∃ri1,rs1,ti1,ts1,ri2,rs2,ti2,ts2.
+ ri1+ri2 = ri & rs1+rs2 = rs & ti1+ti2 = ti & ts1+ts2 = ts &
+ 〈ri1,rs1,ti1,ts1〉 = c1 & 〈ri2,rs2,ti2,ts2〉 = c2.
+#ri #rs #ti #ts * #ri1 #rs1 #ti1 #ts1 * #ri2 #rs2 #ti2 #ts2
+<plus_rew #H destruct /2 width=14 by ex6_8_intro/
+qed-.
+
+(* Main Properties **********************************************************)
+
+theorem plus_assoc: associative … plus.
+* #ri1 #rs1 #ti1 #ts1 * #ri2 #rs2 #ti2 #ts2 * #ri3 #rs3 #ti3 #ts3
+<plus_rew //
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/xoa/ex_5_4.ma".
+include "ground/notation/functions/updownarrowstar_1.ma".
+include "ground/steps/rtc.ma".
+
+(* RT-TRANSITION COUNTER ****************************************************)
+
+definition shift (c:rtc): rtc ≝ match c with
+[ 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〉.
+normalize //
+qed.
+
+lemma shift_O: 𝟘𝟘 = ↕*𝟘𝟘.
+// qed.
+
+(* Basic inversion properties ***********************************************)
+
+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.
+#ri #rs #ti #ts * #ri0 #rs0 #ti0 #ts0 <shift_rew #H destruct
+/2 width=7 by ex5_4_intro/
+qed-.
--- /dev/null
+<?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 = "cic:/matita/lambdadelta/ground/ (background for λδ version 2)"
+>
+ <sitemap name="sitemap"/>
+
+ <section4 name="summary">Summary of the Specification</section4>
+ <body>Here is a numerical account of the specification's contents
+ and its timeline.
+ </body>
+ <table name="ground_sum"/>
+
+ <news class="gamma" date="2020 February 27.">
+ Specification is released as an independent package (was ground_2).
+ </news>
+ <news class="beta" date="2020 January 6.">
+ Centralized xoa infrastructure removed.
+ </news>
+ <news class="beta" date="2018 June 6.">
+ Decentralized xoa infrastructure.
+ </news>
+ <news class="beta" date="2016 April 18.">
+ Generic rt-transition counter (rtc).
+ </news>
+ <news class="beta" date="2016 March 4.">
+ Platform-independent multiple relocation (rtmap).
+ </news>
+ <news class="alpha" date="2016 January 20.">
+ Multiple relocation with streams of naturals.
+ </news>
+ <news class="alpha" date="2015 October 11.">
+ Multiple relocation with lists of booleans.
+ </news>
+ <news class="alpha" date="2013 November 27.">
+ Natural numbers with infinity (ynat).
+ </news>
+ <news class="alpha" date="2011 August 10.">
+ Specification starts.
+ </news>
+
+ <section4 name="structure">Logical Structure of the Specification</section4>
+ <body>This table reports the specification's components and their planes.
+ </body>
+ <table name="ground_2_src"/>
+
+ <footer/>
+</page>
--- /dev/null
+name "ground_2_src"
+
+table {
+ class "gray"
+ [ { "component" * } {
+ [ { "plane" * } {
+ [ "files" * ]
+ }
+ ]
+ }
+ ]
+ class "water"
+ [ { "generic rt-transition counter" * } {
+ [ { "" * } {
+ [ "rtc_ist ( 𝐓❪?,?❫ )" "rtc_ist_shift" "rtc_ist_plus" "rtc_ist_max" * ]
+ [ "rtc_isrc ( 𝐑𝐓❪?,?❫ )" "rtc_isrt_shift" "rtc_isrt_plus" "rtc_isrt_max" "rtc_isrt_max_shift" * ]
+ [ "rtc ( 〈?,?,?,?〉 ) ( 𝟘𝟘 ) ( 𝟙𝟘 ) ( 𝟘𝟙 )" "rtc_shift ( ↕*? )" "rtc_plus ( ? + ? )" "rtc_max ( ? ∨ ? )" "rtc_max_shift" * ]
+ }
+ ]
+ }
+ ]
+ class "green"
+ [ { "multiple relocation" * } {
+ [ { "" * } {
+ [ "rtmap" "rtmap_eq ( ? ≡ ? )" "rtmap_pushs ( ⫯*[?]? )" "rtmap_nexts ( ↑*[?]? )"
+ "rtmap_tl ( ⫱? )" "rtmap_tls ( ⫱*[?]? )" "rtmap_isid ( 𝐈❪?❫ )" "rtmap_id" "rtmap_isdiv ( 𝛀❪?❫ )"
+ "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_after"
+ * ]
+ [ "nstream ( ⫯? ) ( ↑? )" "nstream_eq" "" ""
+ "" "" "nstream_isid" "nstream_id ( 𝐈𝐝 )" ""
+ "" "" "" ""
+ "" "" "" "nstream_sor"
+ "" "nstream_istot ( ?@❨?❩ )" "nstream_after ( ? ∘ ? )" "nstream_coafter ( ? ~∘ ? )"
+ "nstream_basic" ""
+ * ]
+(*
+ [ "trace ( ∥?∥ )" "trace_at ( @❪?,?❫ ≘ ? )" "trace_after ( ? ⊚ ? ≘ ? )" "trace_isid ( 𝐈❪?❫ )" "trace_isun ( 𝐔❪?❫ )"
+ "trace_sle ( ? ⊆ ? )" "trace_sor ( ? ⋓ ? ≘ ? )" "trace_snot ( ∁ ? )" * ]
+*)
+ [ "mr2 ( ◊ ) ( ❨?,?❩;? )" "mr2_append ( ? @@? )" "mr2_at ( @❪?,?❫ ≘ ? )" "mr2_plus ( ? + ? )" "mr2_minus ( ? ▭ ? ≘ ? )" * ]
+ }
+ ]
+ }
+ ]
+ class "grass"
+ [ { "natural numbers with infinity" * } {
+ [ { "" * } {
+ [ "ynat ( ∞ )" "ynat_pred ( ↓? )" "ynat_succ ( ↑? )"
+ "ynat_le ( ? ≤ ? )" "ynat_lt ( ? < ? )"
+ "ynat_plus ( ? + ? )" "ynat_minus_sn ( ? - ? )" *
+ ]
+ }
+ ]
+ }
+ ]
+ class "yellow"
+ [ { "extensions to the library" * } {
+ [ { "" * } {
+ [ "stream ( ? ⨮{?} ? )" "stream_eq ( ? ≗{?} ? )" "stream_hdtl ( ⫰{?}? )" "stream_tls ( ⫰*{?}[?]? )" * ]
+ [ "list ( Ⓔ{?} ) ( ? ⨮{?} ? )" "list_length ( |?| )" * ]
+ [ "bool ( Ⓕ ) ( Ⓣ )" "arith ( ?^? ) ( ↑? ) ( ↓? ) ( ? ∨ ? ) ( ? ∧ ? )" "arith_2a" "arith_2b" * ]
+ [ "ltc" "ltc_ctc" * ]
+ [ "logic ( ⊥ ) ( ⊤ )" "relations ( ? ⊆ ? )" "functions" "exteq ( ? ≐{?,?} ? )" "star" "lstar_2a" * ]
+ }
+ ]
+ }
+ ]
+ class "orange"
+ [ { "generated library" * } {
+ [ { "generalization with equality" * } {
+ [ "insert_eq" * ]
+ }
+ ]
+ [ { "permutation of quantifiers" * } {
+ [ "pull" * ]
+ }
+ ]
+ [ { "logical decomposables" * } {
+ [ "xoa ( ∃∃ ) ( ∨∨ ) ( ∧∧ )" * ]
+ }
+ ]
+ }
+ ]
+ class "red"
+ [ { "" * } {
+ [ { "" * } {
+ [ * ]
+ }
+ ]
+ }
+ ]
+}
+
+class "top" { * }
+
+class "capitalize italic" { 0 }
+
+class "italic" { 1 }
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<helm_registry>
+ <section name="xoa">
+ <key name="output_dir">.</key>
+ <key name="objects">ground/xoa</key>
+ <key name="notations">ground/notation/xoa</key>
+ <key name="include">basics/pts.ma</key>
+ <key name="and">3</key>
+ <key name="and">4</key>
+ <key name="ex">1 2</key>
+ <key name="ex">1 3</key>
+ <key name="ex">1 4</key>
+ <key name="ex">2 2</key>
+ <key name="ex">2 3</key>
+ <key name="ex">3 1</key>
+ <key name="ex">3 2</key>
+ <key name="ex">3 3</key>
+ <key name="ex">3 4</key>
+ <key name="ex">3 5</key>
+ <key name="ex">4 1</key>
+ <key name="ex">4 2</key>
+ <key name="ex">4 3</key>
+ <key name="ex">4 4</key>
+ <key name="ex">4 5</key>
+ <key name="ex">5 1</key>
+ <key name="ex">5 2</key>
+ <key name="ex">5 3</key>
+ <key name="ex">5 4</key>
+ <key name="ex">5 5</key>
+ <key name="ex">5 6</key>
+ <key name="ex">5 7</key>
+ <key name="ex">6 3</key>
+ <key name="ex">6 4</key>
+ <key name="ex">6 5</key>
+ <key name="ex">6 6</key>
+ <key name="ex">6 7</key>
+ <key name="ex">6 8</key>
+ <key name="ex">6 9</key>
+ <key name="ex">7 3</key>
+ <key name="ex">7 4</key>
+ <key name="ex">7 5</key>
+ <key name="ex">7 6</key>
+ <key name="ex">7 7</key>
+ <key name="ex">7 10</key>
+ <key name="ex">8 4</key>
+ <key name="ex">8 5</key>
+ <key name="ex">9 3</key>
+ <key name="or">3</key>
+ <key name="or">4</key>
+ <key name="or">5</key>
+ </section>
+</helm_registry>
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/and_3.ma".
+
+(* multiple conjunction connective (3) *)
+
+inductive and3 (P0,P1,P2:Prop) : Prop ≝
+ | and3_intro: P0 → P1 → P2 → and3 ? ? ?
+.
+
+interpretation "multiple conjunction connective (3)" 'And P0 P1 P2 = (and3 P0 P1 P2).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/and_4.ma".
+
+(* multiple conjunction connective (4) *)
+
+inductive and4 (P0,P1,P2,P3:Prop) : Prop ≝
+ | and4_intro: P0 → P1 → P2 → P3 → and4 ? ? ? ?
+.
+
+interpretation "multiple conjunction connective (4)" 'And P0 P1 P2 P3 = (and4 P0 P1 P2 P3).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_1_2.ma".
+
+(* multiple existental quantifier (1, 2) *)
+
+inductive ex1_2 (A0,A1:Type[0]) (P0:A0→A1→Prop) : Prop ≝
+ | ex1_2_intro: ∀x0,x1. P0 x0 x1 → ex1_2 ? ? ?
+.
+
+interpretation "multiple existental quantifier (1, 2)" 'Ex2 P0 = (ex1_2 ? ? P0).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_1_3.ma".
+
+(* multiple existental quantifier (1, 3) *)
+
+inductive ex1_3 (A0,A1,A2:Type[0]) (P0:A0→A1→A2→Prop) : Prop ≝
+ | ex1_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → ex1_3 ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (1, 3)" 'Ex3 P0 = (ex1_3 ? ? ? P0).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/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).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_2_2.ma".
+
+(* multiple existental quantifier (2, 2) *)
+
+inductive ex2_2 (A0,A1:Type[0]) (P0,P1:A0→A1→Prop) : Prop ≝
+ | ex2_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → ex2_2 ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (2, 2)" 'Ex2 P0 P1 = (ex2_2 ? ? P0 P1).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_2_3.ma".
+
+(* multiple existental quantifier (2, 3) *)
+
+inductive ex2_3 (A0,A1,A2:Type[0]) (P0,P1:A0→A1→A2→Prop) : Prop ≝
+ | ex2_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → ex2_3 ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (2, 3)" 'Ex3 P0 P1 = (ex2_3 ? ? ? P0 P1).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_3_1.ma".
+
+(* multiple existental quantifier (3, 1) *)
+
+inductive ex3 (A0:Type[0]) (P0,P1,P2:A0→Prop) : Prop ≝
+ | ex3_intro: ∀x0. P0 x0 → P1 x0 → P2 x0 → ex3 ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (3, 1)" 'Ex P0 P1 P2 = (ex3 ? P0 P1 P2).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_3_2.ma".
+
+(* multiple existental quantifier (3, 2) *)
+
+inductive ex3_2 (A0,A1:Type[0]) (P0,P1,P2:A0→A1→Prop) : Prop ≝
+ | ex3_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → P2 x0 x1 → ex3_2 ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (3, 2)" 'Ex2 P0 P1 P2 = (ex3_2 ? ? P0 P1 P2).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_3_3.ma".
+
+(* multiple existental quantifier (3, 3) *)
+
+inductive ex3_3 (A0,A1,A2:Type[0]) (P0,P1,P2:A0→A1→A2→Prop) : Prop ≝
+ | ex3_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → ex3_3 ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (3, 3)" 'Ex3 P0 P1 P2 = (ex3_3 ? ? ? P0 P1 P2).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_3_4.ma".
+
+(* multiple existental quantifier (3, 4) *)
+
+inductive ex3_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2:A0→A1→A2→A3→Prop) : Prop ≝
+ | ex3_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → ex3_4 ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (3, 4)" 'Ex4 P0 P1 P2 = (ex3_4 ? ? ? ? P0 P1 P2).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_3_5.ma".
+
+(* multiple existental quantifier (3, 5) *)
+
+inductive ex3_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2:A0→A1→A2→A3→A4→Prop) : Prop ≝
+ | ex3_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → ex3_5 ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (3, 5)" 'Ex5 P0 P1 P2 = (ex3_5 ? ? ? ? ? P0 P1 P2).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_4_1.ma".
+
+(* multiple existental quantifier (4, 1) *)
+
+inductive ex4 (A0:Type[0]) (P0,P1,P2,P3:A0→Prop) : Prop ≝
+ | ex4_intro: ∀x0. P0 x0 → P1 x0 → P2 x0 → P3 x0 → ex4 ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (4, 1)" 'Ex P0 P1 P2 P3 = (ex4 ? P0 P1 P2 P3).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/xoa/ex_4_1.ma".
+
+(* 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.
+#A0 #P0 #P1 #P2 #P3 * /2 width=5 by ex4_intro/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_4_2.ma".
+
+(* multiple existental quantifier (4, 2) *)
+
+inductive ex4_2 (A0,A1:Type[0]) (P0,P1,P2,P3:A0→A1→Prop) : Prop ≝
+ | ex4_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → P2 x0 x1 → P3 x0 x1 → ex4_2 ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (4, 2)" 'Ex2 P0 P1 P2 P3 = (ex4_2 ? ? P0 P1 P2 P3).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_4_3.ma".
+
+(* multiple existental quantifier (4, 3) *)
+
+inductive ex4_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3:A0→A1→A2→Prop) : Prop ≝
+ | ex4_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → ex4_3 ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (4, 3)" 'Ex3 P0 P1 P2 P3 = (ex4_3 ? ? ? P0 P1 P2 P3).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_4_4.ma".
+
+(* multiple existental quantifier (4, 4) *)
+
+inductive ex4_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3:A0→A1→A2→A3→Prop) : Prop ≝
+ | ex4_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → ex4_4 ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (4, 4)" 'Ex4 P0 P1 P2 P3 = (ex4_4 ? ? ? ? P0 P1 P2 P3).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_4_5.ma".
+
+(* multiple existental quantifier (4, 5) *)
+
+inductive ex4_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3:A0→A1→A2→A3→A4→Prop) : Prop ≝
+ | ex4_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → ex4_5 ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (4, 5)" 'Ex5 P0 P1 P2 P3 = (ex4_5 ? ? ? ? ? P0 P1 P2 P3).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_5_1.ma".
+
+(* multiple existental quantifier (5, 1) *)
+
+inductive ex5 (A0:Type[0]) (P0,P1,P2,P3,P4:A0→Prop) : Prop ≝
+ | ex5_intro: ∀x0. P0 x0 → P1 x0 → P2 x0 → P3 x0 → P4 x0 → ex5 ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (5, 1)" 'Ex P0 P1 P2 P3 P4 = (ex5 ? P0 P1 P2 P3 P4).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_5_2.ma".
+
+(* multiple existental quantifier (5, 2) *)
+
+inductive ex5_2 (A0,A1:Type[0]) (P0,P1,P2,P3,P4:A0→A1→Prop) : Prop ≝
+ | ex5_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → P2 x0 x1 → P3 x0 x1 → P4 x0 x1 → ex5_2 ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (5, 2)" 'Ex2 P0 P1 P2 P3 P4 = (ex5_2 ? ? P0 P1 P2 P3 P4).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_5_3.ma".
+
+(* multiple existental quantifier (5, 3) *)
+
+inductive ex5_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→Prop) : Prop ≝
+ | ex5_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → P4 x0 x1 x2 → ex5_3 ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (5, 3)" 'Ex3 P0 P1 P2 P3 P4 = (ex5_3 ? ? ? P0 P1 P2 P3 P4).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_5_4.ma".
+
+(* multiple existental quantifier (5, 4) *)
+
+inductive ex5_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→A3→Prop) : Prop ≝
+ | ex5_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → P4 x0 x1 x2 x3 → ex5_4 ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (5, 4)" 'Ex4 P0 P1 P2 P3 P4 = (ex5_4 ? ? ? ? P0 P1 P2 P3 P4).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_5_5.ma".
+
+(* multiple existental quantifier (5, 5) *)
+
+inductive ex5_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→A3→A4→Prop) : Prop ≝
+ | ex5_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → P4 x0 x1 x2 x3 x4 → ex5_5 ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (5, 5)" 'Ex5 P0 P1 P2 P3 P4 = (ex5_5 ? ? ? ? ? P0 P1 P2 P3 P4).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_5_6.ma".
+
+(* multiple existental quantifier (5, 6) *)
+
+inductive ex5_6 (A0,A1,A2,A3,A4,A5:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→A3→A4→A5→Prop) : Prop ≝
+ | ex5_6_intro: ∀x0,x1,x2,x3,x4,x5. P0 x0 x1 x2 x3 x4 x5 → P1 x0 x1 x2 x3 x4 x5 → P2 x0 x1 x2 x3 x4 x5 → P3 x0 x1 x2 x3 x4 x5 → P4 x0 x1 x2 x3 x4 x5 → ex5_6 ? ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (5, 6)" 'Ex6 P0 P1 P2 P3 P4 = (ex5_6 ? ? ? ? ? ? P0 P1 P2 P3 P4).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_5_7.ma".
+
+(* multiple existental quantifier (5, 7) *)
+
+inductive ex5_7 (A0,A1,A2,A3,A4,A5,A6:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→A3→A4→A5→A6→Prop) : Prop ≝
+ | ex5_7_intro: ∀x0,x1,x2,x3,x4,x5,x6. P0 x0 x1 x2 x3 x4 x5 x6 → P1 x0 x1 x2 x3 x4 x5 x6 → P2 x0 x1 x2 x3 x4 x5 x6 → P3 x0 x1 x2 x3 x4 x5 x6 → P4 x0 x1 x2 x3 x4 x5 x6 → ex5_7 ? ? ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (5, 7)" 'Ex7 P0 P1 P2 P3 P4 = (ex5_7 ? ? ? ? ? ? ? P0 P1 P2 P3 P4).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_6_3.ma".
+
+(* multiple existental quantifier (6, 3) *)
+
+inductive ex6_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→Prop) : Prop ≝
+ | ex6_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → P4 x0 x1 x2 → P5 x0 x1 x2 → ex6_3 ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (6, 3)" 'Ex3 P0 P1 P2 P3 P4 P5 = (ex6_3 ? ? ? P0 P1 P2 P3 P4 P5).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_6_4.ma".
+
+(* multiple existental quantifier (6, 4) *)
+
+inductive ex6_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→Prop) : Prop ≝
+ | ex6_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → P4 x0 x1 x2 x3 → P5 x0 x1 x2 x3 → ex6_4 ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (6, 4)" 'Ex4 P0 P1 P2 P3 P4 P5 = (ex6_4 ? ? ? ? P0 P1 P2 P3 P4 P5).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_6_5.ma".
+
+(* multiple existental quantifier (6, 5) *)
+
+inductive ex6_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→Prop) : Prop ≝
+ | ex6_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → P4 x0 x1 x2 x3 x4 → P5 x0 x1 x2 x3 x4 → ex6_5 ? ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (6, 5)" 'Ex5 P0 P1 P2 P3 P4 P5 = (ex6_5 ? ? ? ? ? P0 P1 P2 P3 P4 P5).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_6_6.ma".
+
+(* multiple existental quantifier (6, 6) *)
+
+inductive ex6_6 (A0,A1,A2,A3,A4,A5:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→A5→Prop) : Prop ≝
+ | ex6_6_intro: ∀x0,x1,x2,x3,x4,x5. P0 x0 x1 x2 x3 x4 x5 → P1 x0 x1 x2 x3 x4 x5 → P2 x0 x1 x2 x3 x4 x5 → P3 x0 x1 x2 x3 x4 x5 → P4 x0 x1 x2 x3 x4 x5 → P5 x0 x1 x2 x3 x4 x5 → ex6_6 ? ? ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (6, 6)" 'Ex6 P0 P1 P2 P3 P4 P5 = (ex6_6 ? ? ? ? ? ? P0 P1 P2 P3 P4 P5).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_6_7.ma".
+
+(* multiple existental quantifier (6, 7) *)
+
+inductive ex6_7 (A0,A1,A2,A3,A4,A5,A6:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→A5→A6→Prop) : Prop ≝
+ | ex6_7_intro: ∀x0,x1,x2,x3,x4,x5,x6. P0 x0 x1 x2 x3 x4 x5 x6 → P1 x0 x1 x2 x3 x4 x5 x6 → P2 x0 x1 x2 x3 x4 x5 x6 → P3 x0 x1 x2 x3 x4 x5 x6 → P4 x0 x1 x2 x3 x4 x5 x6 → P5 x0 x1 x2 x3 x4 x5 x6 → ex6_7 ? ? ? ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (6, 7)" 'Ex7 P0 P1 P2 P3 P4 P5 = (ex6_7 ? ? ? ? ? ? ? P0 P1 P2 P3 P4 P5).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_6_8.ma".
+
+(* multiple existental quantifier (6, 8) *)
+
+inductive ex6_8 (A0,A1,A2,A3,A4,A5,A6,A7:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→A5→A6→A7→Prop) : Prop ≝
+ | ex6_8_intro: ∀x0,x1,x2,x3,x4,x5,x6,x7. P0 x0 x1 x2 x3 x4 x5 x6 x7 → P1 x0 x1 x2 x3 x4 x5 x6 x7 → P2 x0 x1 x2 x3 x4 x5 x6 x7 → P3 x0 x1 x2 x3 x4 x5 x6 x7 → P4 x0 x1 x2 x3 x4 x5 x6 x7 → P5 x0 x1 x2 x3 x4 x5 x6 x7 → ex6_8 ? ? ? ? ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (6, 8)" 'Ex8 P0 P1 P2 P3 P4 P5 = (ex6_8 ? ? ? ? ? ? ? ? P0 P1 P2 P3 P4 P5).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_6_9.ma".
+
+(* multiple existental quantifier (6, 9) *)
+
+inductive ex6_9 (A0,A1,A2,A3,A4,A5,A6,A7,A8:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→A5→A6→A7→A8→Prop) : Prop ≝
+ | ex6_9_intro: ∀x0,x1,x2,x3,x4,x5,x6,x7,x8. P0 x0 x1 x2 x3 x4 x5 x6 x7 x8 → P1 x0 x1 x2 x3 x4 x5 x6 x7 x8 → P2 x0 x1 x2 x3 x4 x5 x6 x7 x8 → P3 x0 x1 x2 x3 x4 x5 x6 x7 x8 → P4 x0 x1 x2 x3 x4 x5 x6 x7 x8 → P5 x0 x1 x2 x3 x4 x5 x6 x7 x8 → ex6_9 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (6, 9)" 'Ex9 P0 P1 P2 P3 P4 P5 = (ex6_9 ? ? ? ? ? ? ? ? ? P0 P1 P2 P3 P4 P5).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_7_10.ma".
+
+(* multiple existental quantifier (7, 10) *)
+
+inductive ex7_10 (A0,A1,A2,A3,A4,A5,A6,A7,A8,A9:Type[0]) (P0,P1,P2,P3,P4,P5,P6:A0→A1→A2→A3→A4→A5→A6→A7→A8→A9→Prop) : Prop ≝
+ | ex7_10_intro: ∀x0,x1,x2,x3,x4,x5,x6,x7,x8,x9. P0 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 → P1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 → P2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 → P3 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 → P4 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 → P5 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 → P6 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 → ex7_10 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (7, 10)" 'Ex10 P0 P1 P2 P3 P4 P5 P6 = (ex7_10 ? ? ? ? ? ? ? ? ? ? P0 P1 P2 P3 P4 P5 P6).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_7_3.ma".
+
+(* multiple existental quantifier (7, 3) *)
+
+inductive ex7_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3,P4,P5,P6:A0→A1→A2→Prop) : Prop ≝
+ | ex7_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → P4 x0 x1 x2 → P5 x0 x1 x2 → P6 x0 x1 x2 → ex7_3 ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (7, 3)" 'Ex3 P0 P1 P2 P3 P4 P5 P6 = (ex7_3 ? ? ? P0 P1 P2 P3 P4 P5 P6).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_7_4.ma".
+
+(* multiple existental quantifier (7, 4) *)
+
+inductive ex7_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3,P4,P5,P6:A0→A1→A2→A3→Prop) : Prop ≝
+ | ex7_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → P4 x0 x1 x2 x3 → P5 x0 x1 x2 x3 → P6 x0 x1 x2 x3 → ex7_4 ? ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (7, 4)" 'Ex4 P0 P1 P2 P3 P4 P5 P6 = (ex7_4 ? ? ? ? P0 P1 P2 P3 P4 P5 P6).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_7_5.ma".
+
+(* multiple existental quantifier (7, 5) *)
+
+inductive ex7_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3,P4,P5,P6:A0→A1→A2→A3→A4→Prop) : Prop ≝
+ | ex7_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → P4 x0 x1 x2 x3 x4 → P5 x0 x1 x2 x3 x4 → P6 x0 x1 x2 x3 x4 → ex7_5 ? ? ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (7, 5)" 'Ex5 P0 P1 P2 P3 P4 P5 P6 = (ex7_5 ? ? ? ? ? P0 P1 P2 P3 P4 P5 P6).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_7_6.ma".
+
+(* multiple existental quantifier (7, 6) *)
+
+inductive ex7_6 (A0,A1,A2,A3,A4,A5:Type[0]) (P0,P1,P2,P3,P4,P5,P6:A0→A1→A2→A3→A4→A5→Prop) : Prop ≝
+ | ex7_6_intro: ∀x0,x1,x2,x3,x4,x5. P0 x0 x1 x2 x3 x4 x5 → P1 x0 x1 x2 x3 x4 x5 → P2 x0 x1 x2 x3 x4 x5 → P3 x0 x1 x2 x3 x4 x5 → P4 x0 x1 x2 x3 x4 x5 → P5 x0 x1 x2 x3 x4 x5 → P6 x0 x1 x2 x3 x4 x5 → ex7_6 ? ? ? ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (7, 6)" 'Ex6 P0 P1 P2 P3 P4 P5 P6 = (ex7_6 ? ? ? ? ? ? P0 P1 P2 P3 P4 P5 P6).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_7_7.ma".
+
+(* multiple existental quantifier (7, 7) *)
+
+inductive ex7_7 (A0,A1,A2,A3,A4,A5,A6:Type[0]) (P0,P1,P2,P3,P4,P5,P6:A0→A1→A2→A3→A4→A5→A6→Prop) : Prop ≝
+ | ex7_7_intro: ∀x0,x1,x2,x3,x4,x5,x6. P0 x0 x1 x2 x3 x4 x5 x6 → P1 x0 x1 x2 x3 x4 x5 x6 → P2 x0 x1 x2 x3 x4 x5 x6 → P3 x0 x1 x2 x3 x4 x5 x6 → P4 x0 x1 x2 x3 x4 x5 x6 → P5 x0 x1 x2 x3 x4 x5 x6 → P6 x0 x1 x2 x3 x4 x5 x6 → ex7_7 ? ? ? ? ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (7, 7)" 'Ex7 P0 P1 P2 P3 P4 P5 P6 = (ex7_7 ? ? ? ? ? ? ? P0 P1 P2 P3 P4 P5 P6).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_8_4.ma".
+
+(* multiple existental quantifier (8, 4) *)
+
+inductive ex8_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3,P4,P5,P6,P7:A0→A1→A2→A3→Prop) : Prop ≝
+ | ex8_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → P4 x0 x1 x2 x3 → P5 x0 x1 x2 x3 → P6 x0 x1 x2 x3 → P7 x0 x1 x2 x3 → ex8_4 ? ? ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (8, 4)" 'Ex4 P0 P1 P2 P3 P4 P5 P6 P7 = (ex8_4 ? ? ? ? P0 P1 P2 P3 P4 P5 P6 P7).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_8_5.ma".
+
+(* multiple existental quantifier (8, 5) *)
+
+inductive ex8_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3,P4,P5,P6,P7:A0→A1→A2→A3→A4→Prop) : Prop ≝
+ | ex8_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → P4 x0 x1 x2 x3 x4 → P5 x0 x1 x2 x3 x4 → P6 x0 x1 x2 x3 x4 → P7 x0 x1 x2 x3 x4 → ex8_5 ? ? ? ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (8, 5)" 'Ex5 P0 P1 P2 P3 P4 P5 P6 P7 = (ex8_5 ? ? ? ? ? P0 P1 P2 P3 P4 P5 P6 P7).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/ex_9_3.ma".
+
+(* multiple existental quantifier (9, 3) *)
+
+inductive ex9_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3,P4,P5,P6,P7,P8:A0→A1→A2→Prop) : Prop ≝
+ | ex9_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → P4 x0 x1 x2 → P5 x0 x1 x2 → P6 x0 x1 x2 → P7 x0 x1 x2 → P8 x0 x1 x2 → ex9_3 ? ? ? ? ? ? ? ? ? ? ? ?
+.
+
+interpretation "multiple existental quantifier (9, 3)" 'Ex3 P0 P1 P2 P3 P4 P5 P6 P7 P8 = (ex9_3 ? ? ? P0 P1 P2 P3 P4 P5 P6 P7 P8).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/or_3.ma".
+
+(* multiple disjunction connective (3) *)
+
+inductive or3 (P0,P1,P2:Prop) : Prop ≝
+ | or3_intro0: P0 → or3 ? ? ?
+ | or3_intro1: P1 → or3 ? ? ?
+ | or3_intro2: P2 → or3 ? ? ?
+.
+
+interpretation "multiple disjunction connective (3)" 'Or P0 P1 P2 = (or3 P0 P1 P2).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/or_4.ma".
+
+(* multiple disjunction connective (4) *)
+
+inductive or4 (P0,P1,P2,P3:Prop) : Prop ≝
+ | or4_intro0: P0 → or4 ? ? ? ?
+ | or4_intro1: P1 → or4 ? ? ? ?
+ | or4_intro2: P2 → or4 ? ? ? ?
+ | or4_intro3: P3 → or4 ? ? ? ?
+.
+
+interpretation "multiple disjunction connective (4)" 'Or P0 P1 P2 P3 = (or4 P0 P1 P2 P3).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* This file was generated by xoa.native: do not edit *********************)
+
+include "basics/pts.ma".
+
+include "ground/notation/xoa/or_5.ma".
+
+(* multiple disjunction connective (5) *)
+
+inductive or5 (P0,P1,P2,P3,P4:Prop) : Prop ≝
+ | or5_intro0: P0 → or5 ? ? ? ? ?
+ | or5_intro1: P1 → or5 ? ? ? ? ?
+ | or5_intro2: P2 → or5 ? ? ? ? ?
+ | or5_intro3: P3 → or5 ? ? ? ? ?
+ | or5_intro4: P4 → or5 ? ? ? ? ?
+.
+
+interpretation "multiple disjunction connective (5)" 'Or P0 P1 P2 P3 P4 = (or5 P0 P1 P2 P3 P4).
+
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/lib/arith.ma".
+include "ground/notation/functions/infinity_0.ma".
+
+(* NATURAL NUMBERS WITH INFINITY ********************************************)
+
+(* the type of natural numbers with infinity *)
+inductive ynat: Type[0] ≝
+| yinj: nat → ynat
+| Y : ynat
+.
+
+coercion yinj.
+
+interpretation "ynat infinity" 'Infinity = Y.
+
+(* Inversion lemmas *********************************************************)
+
+lemma yinj_inj: ∀m,n. yinj m = yinj n → m = n.
+#m #n #H destruct //
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma eq_ynat_dec: ∀n1,n2:ynat. Decidable (n1 = n2).
+* [ #n1 ] * [1,3: #n2 ] /2 width=1 by or_introl/
+[2,3: @or_intror #H destruct ]
+elim (eq_nat_dec n1 n2) /4 width=1 by yinj_inj, or_intror, or_introl/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/ynat/ynat_succ.ma".
+
+(* NATURAL NUMBERS WITH INFINITY ********************************************)
+
+(* order relation *)
+inductive yle: relation ynat ≝
+| yle_inj: ∀m,n. m ≤ n → yle m n
+| yle_Y : ∀m. yle m (∞)
+.
+
+interpretation "ynat 'less or equal to'" 'leq x y = (yle x y).
+
+(* Basic inversion lemmas ***************************************************)
+
+fact yle_inv_inj2_aux: ∀x,y. x ≤ y → ∀n. y = yinj n →
+ ∃∃m. m ≤ n & x = yinj m.
+#x #y * -x -y
+[ #x #y #Hxy #n #Hy destruct /2 width=3 by ex2_intro/
+| #x #n #Hy destruct
+]
+qed-.
+
+lemma yle_inv_inj2: ∀x,n. x ≤ yinj n → ∃∃m. m ≤ n & x = yinj m.
+/2 width=3 by yle_inv_inj2_aux/ qed-.
+
+lemma yle_inv_inj: ∀m,n. yinj m ≤ yinj n → m ≤ n.
+#m #n #H elim (yle_inv_inj2 … H) -H
+#x #Hxn #H destruct //
+qed-.
+
+fact yle_inv_O2_aux: ∀m:ynat. ∀x:ynat. m ≤ x → x = 0 → m = 0.
+#m #x * -m -x
+[ #m #n #Hmn #H destruct /3 width=1 by le_n_O_to_eq, eq_f/
+| #m #H destruct
+]
+qed-.
+
+lemma yle_inv_O2: ∀m:ynat. m ≤ 0 → m = 0.
+/2 width =3 by yle_inv_O2_aux/ qed-.
+
+fact yle_inv_Y1_aux: ∀x,n. x ≤ n → x = ∞ → n = ∞.
+#x #n * -x -n //
+#x #n #_ #H destruct
+qed-.
+
+lemma yle_inv_Y1: ∀n. ∞ ≤ n → n = ∞.
+/2 width=3 by yle_inv_Y1_aux/ qed-.
+
+lemma yle_antisym: ∀y,x. x ≤ y → y ≤ x → x = y.
+#x #y #H elim H -x -y
+/4 width=1 by yle_inv_Y1, yle_inv_inj, le_to_le_to_eq, eq_f/
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma le_O1: ∀n:ynat. 0 ≤ n.
+* /2 width=1 by yle_inj/
+qed.
+
+lemma yle_refl: reflexive … yle.
+* /2 width=1 by le_n, yle_inj/
+qed.
+
+lemma yle_split: ∀x,y:ynat. x ≤ y ∨ y ≤ x.
+* /2 width=1 by or_intror/
+#x * /2 width=1 by or_introl/
+#y elim (le_or_ge x y) /3 width=1 by yle_inj, or_introl, or_intror/
+qed-.
+
+(* Inversion lemmas on successor ********************************************)
+
+fact yle_inv_succ1_aux: ∀x,y:ynat. x ≤ y → ∀m. x = ↑m → m ≤ ↓y ∧ ↑↓y = y.
+#x #y * -x -y
+[ #x #y #Hxy #m #H elim (ysucc_inv_inj_sn … H) -H
+ #n #H1 #H2 destruct elim (le_inv_S1 … Hxy) -Hxy
+ #m #Hnm #H destruct /3 width=1 by yle_inj, conj/
+| #x #y #H destruct /2 width=1 by yle_Y, conj/
+]
+qed-.
+
+lemma yle_inv_succ1: ∀m,y:ynat. ↑m ≤ y → m ≤ ↓y ∧ ↑↓y = y.
+/2 width=3 by yle_inv_succ1_aux/ qed-.
+
+lemma yle_inv_succ: ∀m,n. ↑m ≤ ↑n → m ≤ n.
+#m #n #H elim (yle_inv_succ1 … H) -H //
+qed-.
+
+lemma yle_inv_succ2: ∀x,y. x ≤ ↑y → ↓x ≤ y.
+#x #y #Hxy elim (ynat_cases x)
+[ #H destruct //
+| * #m #H destruct /2 width=1 by yle_inv_succ/
+]
+qed-.
+
+(* Properties on predecessor ************************************************)
+
+lemma yle_pred_sn: ∀m,n. m ≤ n → ↓m ≤ n.
+#m #n * -m -n /3 width=3 by transitive_le, yle_inj/
+qed.
+
+lemma yle_refl_pred_sn: ∀x. ↓x ≤ x.
+/2 width=1 by yle_refl, yle_pred_sn/ qed.
+
+lemma yle_pred: ∀m,n. m ≤ n → ↓m ≤ ↓n.
+#m #n * -m -n /3 width=1 by yle_inj, monotonic_pred/
+qed.
+
+(* Properties on successor **************************************************)
+
+lemma yle_succ: ∀m,n. m ≤ n → ↑m ≤ ↑n.
+#m #n * -m -n /3 width=1 by yle_inj, le_S_S/
+qed.
+
+lemma yle_succ_dx: ∀m,n. m ≤ n → m ≤ ↑n.
+#m #n * -m -n /3 width=1 by le_S, yle_inj/
+qed.
+
+lemma yle_refl_S_dx: ∀x. x ≤ ↑x.
+/2 width=1 by yle_succ_dx/ qed.
+
+lemma yle_refl_SP_dx: ∀x. x ≤ ↑↓x.
+* // * //
+qed.
+
+lemma yle_succ2: ∀x,y. ↓x ≤ y → x ≤ ↑y.
+#x #y #Hxy elim (ynat_cases x)
+[ #H destruct //
+| * #m #H destruct /2 width=1 by yle_succ/
+]
+qed-.
+
+(* Main properties **********************************************************)
+
+theorem yle_trans: Transitive … yle.
+#x #y * -x -y
+[ #x #y #Hxy * //
+ #z #H lapply (yle_inv_inj … H) -H
+ /3 width=3 by transitive_le, yle_inj/ (**) (* full auto too slow *)
+| #x #z #H lapply (yle_inv_Y1 … H) //
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/ynat/ynat_le.ma".
+
+(* NATURAL NUMBERS WITH INFINITY ********************************************)
+
+(* strict order relation *)
+inductive ylt: relation ynat ≝
+| ylt_inj: ∀m,n. m < n → ylt m n
+| ylt_Y : ∀m:nat. ylt m (∞)
+.
+
+interpretation "ynat 'less than'" 'lt x y = (ylt x y).
+
+(* Basic forward lemmas *****************************************************)
+
+lemma ylt_fwd_gen: ∀x,y. x < y → ∃m. x = yinj m.
+#x #y * -x -y /2 width=2 by ex_intro/
+qed-.
+
+lemma ylt_fwd_lt_O1: ∀x,y:ynat. x < y → 0 < y.
+#x #y #H elim H -x -y /3 width=2 by ylt_inj, ltn_to_ltO/
+qed-.
+
+(* Basic inversion lemmas ***************************************************)
+
+fact ylt_inv_inj2_aux: ∀x,y. x < y → ∀n. y = yinj n →
+ ∃∃m. m < n & x = yinj m.
+#x #y * -x -y
+[ #x #y #Hxy #n #Hy elim (le_inv_S1 … Hxy) -Hxy
+ #m #Hm #H destruct /3 width=3 by le_S_S, ex2_intro/
+| #x #n #Hy destruct
+]
+qed-.
+
+lemma ylt_inv_inj2: ∀x,n. x < yinj n →
+ ∃∃m. m < n & x = yinj m.
+/2 width=3 by ylt_inv_inj2_aux/ qed-.
+
+lemma ylt_inv_inj: ∀m,n. yinj m < yinj n → m < n.
+#m #n #H elim (ylt_inv_inj2 … H) -H
+#x #Hx #H destruct //
+qed-.
+
+lemma ylt_inv_Y1: ∀n. ∞ < n → ⊥.
+#n #H elim (ylt_fwd_gen … H) -H
+#y #H destruct
+qed-.
+
+lemma ylt_inv_Y2: ∀x:ynat. x < ∞ → ∃n. x = yinj n.
+* /2 width=2 by ex_intro/
+#H elim (ylt_inv_Y1 … H)
+qed-.
+
+lemma ylt_inv_O1: ∀n:ynat. 0 < n → ↑↓n = n.
+* // #n #H lapply (ylt_inv_inj … H) -H normalize
+/3 width=1 by S_pred, eq_f/
+qed-.
+
+(* Inversion lemmas on successor ********************************************)
+
+fact ylt_inv_succ1_aux: ∀x,y:ynat. x < y → ∀m. x = ↑m → m < ↓y ∧ ↑↓y = y.
+#x #y * -x -y
+[ #x #y #Hxy #m #H elim (ysucc_inv_inj_sn … H) -H
+ #n #H1 #H2 destruct elim (le_inv_S1 … Hxy) -Hxy
+ #m #Hnm #H destruct /3 width=1 by ylt_inj, conj/
+| #x #y #H elim (ysucc_inv_inj_sn … H) -H
+ #m #H #_ destruct /2 width=1 by ylt_Y, conj/
+]
+qed-.
+
+lemma ylt_inv_succ1: ∀m,y:ynat. ↑m < y → m < ↓y ∧ ↑↓y = y.
+/2 width=3 by ylt_inv_succ1_aux/ qed-.
+
+lemma ylt_inv_succ: ∀m,n. ↑m < ↑n → m < n.
+#m #n #H elim (ylt_inv_succ1 … H) -H //
+qed-.
+
+(* Forward lemmas on successor **********************************************)
+
+fact ylt_fwd_succ2_aux: ∀x,y. x < y → ∀n. y = ↑n → x ≤ n.
+#x #y * -x -y
+[ #x #y #Hxy #m #H elim (ysucc_inv_inj_sn … H) -H
+ #n #H1 #H2 destruct /3 width=1 by yle_inj, le_S_S_to_le/
+| #x #n #H lapply (ysucc_inv_Y_sn … H) -H //
+]
+qed-.
+
+lemma ylt_fwd_succ2: ∀m,n. m < ↑n → m ≤ n.
+/2 width=3 by ylt_fwd_succ2_aux/ qed-.
+
+(* inversion and forward lemmas on order ************************************)
+
+lemma ylt_fwd_le_succ1: ∀m,n. m < n → ↑m ≤ n.
+#m #n * -m -n /2 width=1 by yle_inj/
+qed-.
+
+lemma ylt_fwd_le_pred2: ∀x,y:ynat. x < y → x ≤ ↓y.
+#x #y #H elim H -x -y /3 width=1 by yle_inj, monotonic_pred/
+qed-.
+
+lemma ylt_fwd_le: ∀m:ynat. ∀n:ynat. m < n → m ≤ n.
+#m #n * -m -n /3 width=1 by lt_to_le, yle_inj/
+qed-.
+
+lemma ylt_yle_false: ∀m:ynat. ∀n:ynat. m < n → n ≤ m → ⊥.
+#m #n * -m -n
+[ #m #n #Hmn #H lapply (yle_inv_inj … H) -H
+ #H elim (lt_refl_false n) /2 width=3 by le_to_lt_to_lt/
+| #m #H lapply (yle_inv_Y1 … H) -H
+ #H destruct
+]
+qed-.
+
+lemma ylt_inv_le: ∀x,y. x < y → x < ∞ ∧ ↑x ≤ y.
+#x #y #H elim H -x -y /3 width=1 by yle_inj, conj/
+qed-.
+
+(* Basic properties *********************************************************)
+
+lemma ylt_O1: ∀x:ynat. ↑↓x = x → 0 < x.
+* // * /2 width=1 by ylt_inj/ normalize
+#H destruct
+qed.
+
+lemma yle_inv_succ_sn_lt (x:ynat) (y:ynat):
+ ↑x ≤ y → ∧∧ x ≤ ↓y & 0 < y.
+#x #y #H elim (yle_inv_succ1 … H) -H /3 width=2 by ylt_O1, conj/
+qed-.
+
+(* Properties on predecessor ************************************************)
+
+lemma ylt_pred: ∀m,n:ynat. m < n → 0 < m → ↓m < ↓n.
+#m #n * -m -n
+/4 width=1 by ylt_inv_inj, ylt_inj, monotonic_lt_pred/
+qed.
+
+(* Properties on successor **************************************************)
+
+lemma ylt_O_succ: ∀x:ynat. 0 < ↑x.
+* /2 width=1 by ylt_inj/
+qed.
+
+lemma ylt_succ: ∀m,n. m < n → ↑m < ↑n.
+#m #n #H elim H -m -n /3 width=1 by ylt_inj, le_S_S/
+qed.
+
+lemma ylt_succ_Y: ∀x. x < ∞ → ↑x < ∞.
+* /2 width=1 by/ qed.
+
+lemma yle_succ1_inj: ∀x. ∀y:ynat. ↑yinj x ≤ y → x < y.
+#x * /3 width=1 by yle_inv_inj, ylt_inj/
+qed.
+
+lemma ylt_succ2_refl: ∀x,y:ynat. x < y → x < ↑x.
+#x #y #H elim (ylt_fwd_gen … H) -y /2 width=1 by ylt_inj/
+qed.
+
+(* Properties on order ******************************************************)
+
+lemma yle_split_eq: ∀m,n:ynat. m ≤ n → m < n ∨ m = n.
+#m #n * -m -n
+[ #m #n #Hmn elim (le_to_or_lt_eq … Hmn) -Hmn
+ /3 width=1 by or_introl, ylt_inj/
+| * /2 width=1 by or_introl, ylt_Y/
+]
+qed-.
+
+lemma ylt_split: ∀m,n:ynat. m < n ∨ n ≤ m.
+#m #n elim (yle_split m n) /2 width=1 by or_intror/
+#H elim (yle_split_eq … H) -H /2 width=1 by or_introl, or_intror/
+qed-.
+
+lemma ylt_split_eq: ∀m,n:ynat. ∨∨ m < n | n = m | n < m.
+#m #n elim (ylt_split m n) /2 width=1 by or3_intro0/
+#H elim (yle_split_eq … H) -H /2 width=1 by or3_intro1, or3_intro2/
+qed-.
+
+lemma ylt_yle_trans: ∀x:ynat. ∀y:ynat. ∀z:ynat. y ≤ z → x < y → x < z.
+#x #y #z * -y -z
+[ #y #z #Hyz #H elim (ylt_inv_inj2 … H) -H
+ #m #Hm #H destruct /3 width=3 by ylt_inj, lt_to_le_to_lt/
+| #y * //
+]
+qed-.
+
+lemma yle_ylt_trans: ∀x:ynat. ∀y:ynat. ∀z:ynat. y < z → x ≤ y → x < z.
+#x #y #z * -y -z
+[ #y #z #Hyz #H elim (yle_inv_inj2 … H) -H
+ #m #Hm #H destruct /3 width=3 by ylt_inj, le_to_lt_to_lt/
+| #y #H elim (yle_inv_inj2 … H) -H //
+]
+qed-.
+
+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-.
+
+lemma yle_lt: ∀x,y. x < ∞ → ↑x ≤ y → x < y.
+#x * // #y #H elim (ylt_inv_Y2 … H) -H #n #H destruct
+/3 width=1 by ylt_inj, yle_inv_inj/
+qed-.
+
+(* Main properties **********************************************************)
+
+theorem ylt_trans: Transitive … ylt.
+#x #y * -x -y
+[ #x #y #Hxy * //
+ #z #H lapply (ylt_inv_inj … H) -H
+ /3 width=3 by transitive_lt, ylt_inj/ (**) (* full auto too slow *)
+| #x #z #H elim (ylt_yle_false … H) //
+]
+qed-.
+
+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.
+ (∀y. (∀x. x < y → R x) → R y) →
+ ∀y:nat. ∀x. x ≤ y → R x.
+#R #IH #y elim y -y
+[ #x #H >(yle_inv_O2 … H) -x
+ @IH -IH #x #H elim (ylt_yle_false … H) -H //
+| /5 width=3 by ylt_yle_trans, ylt_fwd_succ2/
+]
+qed-.
+
+fact ynat_ind_lt_aux: ∀R:predicate ynat.
+ (∀y. (∀x. x < y → R x) → R y) →
+ ∀y:nat. R y.
+/4 width=2 by ynat_ind_lt_le_aux/ qed-.
+
+lemma ynat_ind_lt: ∀R:predicate ynat.
+ (∀y. (∀x. x < y → R x) → R y) →
+ ∀y. R y.
+#R #IH * /4 width=1 by ynat_ind_lt_aux/
+@IH #x #H elim (ylt_inv_Y2 … H) -H
+#n #H destruct /4 width=1 by ynat_ind_lt_aux/
+qed-.
+
+fact ynat_f_ind_aux: ∀A. ∀f:A→ynat. ∀R:predicate A.
+ (∀x. (∀a. f a < x → R a) → ∀a. f a = x → R a) →
+ ∀x,a. f a = x → R a.
+#A #f #R #IH #x @(ynat_ind_lt … x) -x
+/3 width=3 by/
+qed-.
+
+lemma ynat_f_ind: ∀A. ∀f:A→ynat. ∀R:predicate A.
+ (∀x. (∀a. f a < x → R a) → ∀a. f a = x → R a) → ∀a. R a.
+#A #f #R #IH #a
+@(ynat_f_ind_aux … IH) -IH [2: // | skip ]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/ynat/ynat_plus.ma".
+
+(* NATURAL NUMBERS WITH INFINITY ********************************************)
+
+(* left subtraction *)
+definition yminus_sn (x) (y): ynat ≝ ypred^y x.
+
+interpretation "ynat left minus" 'minus x y = (yminus_sn x y).
+
+lemma yminus_O2: ∀m:ynat. m - 0 = m.
+// qed.
+
+lemma yminus_S2: ∀m:ynat. ∀n:nat. m - S n = ↓(m - n).
+// qed.
+
+(* Basic properties *********************************************************)
+
+lemma yminus_inj: ∀m,n. yinj m - n = yinj (m - n).
+#m #n elim n -n //
+#n #IH >yminus_S2 >IH -IH >eq_minus_S_pred //
+qed.
+
+lemma yminus_Y_inj: ∀n. ∞ - n = ∞.
+#n elim n -n //
+qed.
+
+lemma yminus_O1: ∀x:nat. yinj 0 - x = 0.
+// qed.
+
+lemma yminus_refl: ∀x:nat. yinj x - x = 0.
+// qed.
+
+lemma yminus_minus_comm: ∀x:ynat. ∀y,z. x - y - z = x - z - y.
+* // qed.
+
+(* Properties on predecessor ************************************************)
+
+lemma yminus_SO2: ∀m:ynat. m - 1 = ↓m.
+// qed.
+
+lemma yminus_pred1: ∀x,y. ↓x - y = ↓(x-y).
+#x * // #y elim y -y //
+qed.
+
+lemma yminus_pred: ∀m:ynat. ∀n. 0 < m → 0 < n → ↓m - ↓n = m - n.
+* // #m #n >yminus_inj >yminus_inj
+/4 width=1 by ylt_inv_inj, minus_pred_pred, eq_f/
+qed-.
+
+(* Properties on successor **************************************************)
+
+lemma yminus_succ: ∀m:ynat. ∀n. ↑m - ↑n = m - n.
+* // qed.
+
+lemma yminus_succ1_inj: ∀n:nat. ∀m:ynat. n ≤ m → ↑m - n = ↑(m - n).
+#n *
+[ #m #Hmn >yminus_inj >yminus_inj
+ /4 width=1 by yle_inv_inj, plus_minus, eq_f/
+| >yminus_Y_inj //
+]
+qed-.
+
+lemma yminus_succ2: ∀x:ynat. ∀y. x - ↑y = ↓(x-y).
+* //
+qed.
+
+(* Properties on order ******************************************************)
+
+lemma yle_minus_sn: ∀m:ynat. ∀n. m - n ≤ m.
+* // #n /2 width=1 by yle_inj/
+qed.
+
+lemma yle_to_minus: ∀m:ynat. ∀n:nat. m ≤ n → m - n = 0.
+*
+[ #m #n #H >yminus_inj /4 width=1 by yle_inv_inj, eq_minus_O, eq_f/
+| #n #H lapply (yle_inv_Y1 … H) -H #H destruct
+]
+qed-.
+
+lemma yminus_to_le: ∀m:ynat. ∀n. m - n = 0 → m ≤ n.
+* [2: #n >yminus_Y_inj #H destruct ]
+#m #n >yminus_inj #H
+lapply (yinj_inj … H) -H (**) (* destruct lemma needed *)
+/2 width=1 by yle_inj/
+qed.
+
+lemma monotonic_yle_minus_dx: ∀x,y. x ≤ y → ∀z. x - z ≤ y - z.
+#x #y * /3 width=1 by yle_inj, monotonic_le_minus_l2/
+qed.
+
+(* Properties on strict order ***********************************************)
+
+lemma ylt_to_minus: ∀y:ynat. ∀x. yinj x < y → 0 < y - x.
+* // #y #x #H >yminus_inj
+/4 width=1 by ylt_inj, ylt_inv_inj, lt_plus_to_minus_r/
+qed.
+
+lemma yminus_to_lt: ∀y:ynat. ∀x. 0 < y - x → x < y.
+* // #y #x >yminus_inj #H
+/4 width=1 by ylt_inv_inj, ylt_inj, lt_minus_to_plus_r/
+qed-.
+
+lemma monotonic_ylt_minus_dx: ∀x,y:ynat. x < y → ∀z:nat. z ≤ x → x - z < y - z.
+#x #y * -x -y
+/4 width=1 by ylt_inj, yle_inv_inj, monotonic_lt_minus_l/
+qed.
+
+(* Properties on minus ******************************************************)
+
+lemma yplus_minus: ∀m:ynat. ∀n:nat. m + n - n = m.
+#m #n elim n -n //
+#n #IHn >(yplus_succ2 m n) >(yminus_succ … n) //
+qed.
+
+lemma yminus_plus2: ∀x:ynat. ∀y,z. x - (y + z) = x - y - z.
+* // qed.
+
+(* Forward lemmas on minus **************************************************)
+
+lemma yle_plus1_to_minus_inj2: ∀x,z:ynat. ∀y:nat. x + y ≤ z → x ≤ z - y.
+#x #z #y #H lapply (monotonic_yle_minus_dx … H y) -H //
+qed-.
+
+lemma yle_plus1_to_minus_inj1: ∀x,z:ynat. ∀y:nat. y + x ≤ z → x ≤ z - y.
+/2 width=1 by yle_plus1_to_minus_inj2/ qed-.
+
+lemma yle_plus2_to_minus_inj2: ∀x,y:ynat. ∀z:nat. x ≤ y + z → x - z ≤ y.
+/2 width=1 by monotonic_yle_minus_dx/ qed-.
+
+lemma yle_plus2_to_minus_inj1: ∀x,y:ynat. ∀z:nat. x ≤ z + y → x - z ≤ y.
+/2 width=1 by yle_plus2_to_minus_inj2/ qed-.
+
+lemma yminus_plus (x:ynat) (y:nat): y ≤ x → x = (x-y)+y.
+* // #x #y #H >yminus_inj >yplus_inj
+/4 width=1 by yle_inv_inj, plus_minus, eq_f/
+qed-.
+
+lemma yplus_minus_assoc_inj: ∀x:nat. ∀y,z:ynat. x ≤ y → z + (y - x) = z + y - x.
+#x *
+[ #y * // #z >yminus_inj >yplus_inj >yplus_inj
+ /4 width=1 by yle_inv_inj, plus_minus, eq_f/
+| >yminus_Y_inj //
+]
+qed-.
+
+alias symbol "plus" (instance 5) = "ynat plus".
+alias symbol "minus" (instance 4) = "ynat left minus".
+alias symbol "minus" (instance 3) = "natural minus".
+alias symbol "minus" (instance 2) = "ynat left minus".
+alias symbol "leq" (instance 6) = "natural 'less or equal to'".
+lemma yplus_minus_assoc_comm_inj: ∀z:ynat. ∀x,y:nat. x ≤ y → z - (y - x) = z + x - y.
+* // #z #x #y >yminus_inj >yplus_inj >yminus_inj
+/4 width=1 by yle_inv_inj, minus_le_minus_minus_comm, eq_f/
+qed-.
+
+lemma yplus_minus_comm_inj: ∀y:nat. ∀x,z:ynat. y ≤ x → x + z - y = x - y + z.
+#y * // #x * //
+#z #Hxy >yplus_inj >yminus_inj <plus_minus
+/2 width=1 by yle_inv_inj/
+qed-.
+
+lemma ylt_plus1_to_minus_inj2: ∀x,z:ynat. ∀y:nat. x + y < z → x < z - y.
+#x #z #y #H lapply (monotonic_ylt_minus_dx … H y ?) -H //
+qed-.
+
+lemma ylt_plus1_to_minus_inj1: ∀x,z:ynat. ∀y:nat. y + x < z → x < z - y.
+/2 width=1 by ylt_plus1_to_minus_inj2/ qed-.
+
+lemma ylt_plus2_to_minus_inj2: ∀x,y:ynat. ∀z:nat. z ≤ x → x < y + z → x - z < y.
+/2 width=1 by monotonic_ylt_minus_dx/ qed-.
+
+lemma ylt_plus2_to_minus_inj1: ∀x,y:ynat. ∀z:nat. z ≤ x → x < z + y → x - z < y.
+/2 width=1 by ylt_plus2_to_minus_inj2/ qed-.
+
+lemma yplus_inv_Y1: ∀x,y. ∞ = x + y → ∨∨ ∞ = x | ∞ = y.
+* /2 width=1 by or_introl/ #x * // #y >yplus_inj #H destruct
+qed-.
+
+lemma yplus_inv_minus:
+ ∀x1,y2:ynat.∀y1,x2:nat.
+ y1 ≤ x1 → x1 + x2 = y2 + y1 → ∧∧ x1 - y1 = y2 - x2 & x2 ≤ y2.
+*
+[ #x1 * [| #y1 #x2 #_ >yplus_inj >yplus_Y1 #H destruct ]
+ #y2 #y1 #x2 #H1 >yplus_inj >yplus_inj #H2 >yminus_inj >yminus_inj
+ lapply (yle_inv_inj … H1) -H1 #Hyx1
+ lapply (yinj_inj … H2) -H2 #Hxy (**) (* destruct lemma needed *)
+ /5 width=4 by yle_inj, plus2_le_sn_sn, plus_to_minus_2, conj, eq_f2/
+| #y2 #y1 #x2 #_ >yplus_Y1 #H
+ elim (yplus_inv_Y1 … H) -H #H destruct /2 width=1 by conj/
+]
+qed-.
+
+(* Inversion lemmas on minus ************************************************)
+
+lemma yle_inv_plus_inj2: ∀x,z:ynat. ∀y:nat. x + y ≤ z → x ≤ z - y ∧ y ≤ z.
+/3 width=3 by yle_plus1_to_minus_inj2, yle_trans, conj/ qed-.
+
+lemma yle_inv_plus_inj1: ∀x,z:ynat. ∀y:nat. y + x ≤ z → x ≤ z - y ∧ y ≤ z.
+/2 width=1 by yle_inv_plus_inj2/ qed-.
+
+lemma yle_inv_plus_inj_dx: ∀z,x:ynat. ∀y:nat. x + y ≤ z →
+ ∧∧ x ≤ z - y & y ≤ z.
+* [| /2 width=1 by conj/ ]
+#z * [| #y >yplus_Y1 #H >(yle_inv_Y1 … H) -z /2 width=1 by conj/ ]
+#x #y >yplus_inj #H >yminus_inj
+/5 width=2 by yle_inv_inj, yle_inj, le_plus_to_minus_r, le_plus_b, conj/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/xoa/ex_3_2.ma".
+include "ground/ynat/ynat_lt.ma".
+
+(* NATURAL NUMBERS WITH INFINITY ********************************************)
+
+(* addition *)
+definition yplus: ynat → ynat → ynat ≝ λx,y. match y with
+[ yinj n ⇒ ysucc^n x
+| Y ⇒ Y
+].
+
+interpretation "ynat plus" 'plus x y = (yplus x y).
+
+lemma yplus_O2: ∀m:ynat. m + 0 = m.
+// qed.
+
+lemma yplus_S2: ∀m:ynat. ∀n. m + S n = ↑(m + n).
+// qed.
+
+lemma yplus_Y2: ∀m:ynat. m + (∞) = ∞.
+// qed.
+
+(* Properties on successor **************************************************)
+
+lemma yplus_succ2: ∀m,n. m + ↑n = ↑(m + n).
+#m * //
+qed.
+
+lemma yplus_succ1: ∀m,n. ↑m + n = ↑(m + n).
+#m * // #n elim n -n //
+qed.
+
+lemma yplus_succ_swap: ∀m,n. m + ↑n = ↑m + n.
+// qed.
+
+lemma yplus_SO2: ∀m:ynat. m + 1 = ↑m.
+* //
+qed.
+
+(* Basic properties *********************************************************)
+
+lemma yplus_inj: ∀n,m. yinj m + yinj n = yinj (m + n).
+#n elim n -n //
+#n #IHn #m >(yplus_succ2 ? n) >IHn -IHn
+<plus_n_Sm //
+qed.
+
+lemma yplus_Y1: ∀m. ∞ + m = ∞.
+* // #m elim m -m //
+qed.
+
+lemma yplus_comm: commutative … yplus.
+* [ #m ] * [1,3: #n ] //
+qed.
+
+lemma yplus_assoc: associative … yplus.
+#x #y * // #z cases y -y
+[ #y >yplus_inj whd in ⊢ (??%%); <iter_plus //
+| >yplus_Y1 //
+]
+qed.
+
+lemma yplus_O1: ∀n:ynat. 0 + n = n.
+#n >yplus_comm // qed.
+
+lemma yplus_comm_23: ∀x,y,z. x + z + y = x + y + z.
+#x #y #z >yplus_assoc //
+qed.
+
+lemma yplus_comm_24: ∀x1,x2,x3,x4. x1 + x4 + x3 + x2 = x1 + x2 + x3 + x4.
+#x1 #x2 #x3 #x4
+>yplus_assoc >yplus_assoc >yplus_assoc >yplus_assoc
+/2 width=1 by eq_f2/
+qed.
+
+lemma yplus_assoc_23: ∀x1,x2,x3,x4. x1 + x2 + (x3 + x4) = x1 + (x2 + x3) + x4.
+#x1 #x2 #x3 #x4 >yplus_assoc >yplus_assoc
+/2 width=1 by eq_f2/
+qed.
+
+(* Inversion lemmas on successor *********************************************)
+
+lemma yplus_inv_succ_lt_dx: ∀x,y,z:ynat. 0 < y → x + y = ↑z → x + ↓y = z.
+#x #y #z #H <(ylt_inv_O1 y) // >yplus_succ2
+/2 width=1 by ysucc_inv_inj/
+qed-.
+
+lemma yplus_inv_succ_lt_sn: ∀x,y,z:ynat. 0 < x → x + y = ↑z → ↓x + y = z.
+#x #y #z #H <(ylt_inv_O1 x) // >yplus_succ1
+/2 width=1 by ysucc_inv_inj/
+
+qed-.
+
+(* Inversion lemmas on order ************************************************)
+
+lemma yle_inv_plus_dx: ∀x,y. x ≤ y → ∃z. x + z = y.
+#x #y #H elim H -x -y /2 width=2 by ex_intro/
+#m #n #H @(ex_intro … (yinj (n-m))) (**) (* explicit constructor *)
+/3 width=1 by plus_minus, eq_f/
+qed-.
+
+lemma yle_inv_plus_sn: ∀x,y. x ≤ y → ∃z. z + x = y.
+#x #y #H elim (yle_inv_plus_dx … H) -H
+/2 width=2 by ex_intro/
+qed-.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma yplus_inv_inj: ∀z,y,x. x + y = yinj z →
+ ∃∃m,n. m + n = z & x = yinj m & y = yinj n.
+#z * [2: normalize #x #H destruct ]
+#y * [2: >yplus_Y1 #H destruct ]
+/3 width=5 by yinj_inj, ex3_2_intro/
+qed-.
+
+lemma yplus_inv_O: ∀x,y:ynat. x + y = 0 → x = 0 ∧ y = 0.
+#x #y #H elim (yplus_inv_inj … H) -H
+#m * /2 width=1 by conj/ #n <plus_n_Sm #H destruct
+qed-.
+
+lemma discr_yplus_xy_x: ∀x,y. x + y = x → x = ∞ ∨ y = 0.
+* /2 width=1 by or_introl/
+#x elim x -x /2 width=1 by or_intror/
+#x #IHx * [2: >yplus_Y2 #H destruct ]
+#y <ysucc_inj >yplus_succ1 #H
+lapply (ysucc_inv_inj … H) -H #H
+elim (IHx … H) -IHx -H /2 width=1 by or_introl, or_intror/
+qed-.
+
+lemma discr_yplus_x_xy: ∀x,y. x = x + y → x = ∞ ∨ y = 0.
+/2 width=1 by discr_yplus_xy_x/ qed-.
+
+lemma yplus_inv_monotonic_dx_inj: ∀z,x,y. x + yinj z = y + yinj z → x = y.
+#z @(nat_ind_plus … z) -z /3 width=2 by ysucc_inv_inj/
+qed-.
+
+lemma yplus_inv_monotonic_dx: ∀z,x,y. z < ∞ → x + z = y + z → x = y.
+#z #x #y #H elim (ylt_inv_Y2 … H) -H /2 width=2 by yplus_inv_monotonic_dx_inj/
+qed-.
+
+lemma yplus_inv_Y2: ∀x,y. x + y = ∞ → x = ∞ ∨ y = ∞.
+* /2 width=1 by or_introl/ #x * // #y >yplus_inj #H destruct
+qed-.
+
+lemma yplus_inv_monotonic_23: ∀z,x1,x2,y1,y2. z < ∞ →
+ x1 + z + y1 = x2 + z + y2 → x1 + y1 = x2 + y2.
+#z #x1 #x2 #y1 #y2 #Hz #H @(yplus_inv_monotonic_dx z) //
+>yplus_comm_23 >H -H //
+qed-.
+
+(* Inversion lemmas on strict_order *****************************************)
+
+lemma ylt_inv_plus_Y: ∀x,y. x + y < ∞ → x < ∞ ∧ y < ∞.
+#x #y #H elim (ylt_inv_Y2 … H) -H
+#z #H elim (yplus_inv_inj … H) -H /2 width=1 by conj/
+qed-.
+
+lemma ylt_inv_plus_sn: ∀x,y. x < y → ∃∃z. ↑z + x = y & x < ∞.
+#x #y #H elim (ylt_inv_le … H) -H
+#Hx #H elim (yle_inv_plus_sn … H) -H
+/2 width=2 by ex2_intro/
+qed-.
+
+lemma ylt_inv_plus_dx: ∀x,y. x < y → ∃∃z. x + ↑z = y & x < ∞.
+#x #y #H elim (ylt_inv_plus_sn … H) -H
+#z >yplus_comm /2 width=2 by ex2_intro/
+qed-.
+
+(* Properties on order ******************************************************)
+
+lemma yle_plus_dx2: ∀n,m. n ≤ m + n.
+* //
+#n elim n -n //
+#n #IHn #m >(yplus_succ2 ? n) @(yle_succ n) // (**) (* full auto fails *)
+qed.
+
+lemma yle_plus_dx1: ∀n,m. m ≤ m + n.
+// qed.
+
+lemma yle_plus_dx1_trans: ∀x,z. z ≤ x → ∀y. z ≤ x + y.
+/2 width=3 by yle_trans/ qed.
+
+lemma yle_plus_dx2_trans: ∀y,z. z ≤ y → ∀x. z ≤ x + y.
+/2 width=3 by yle_trans/ qed.
+
+lemma monotonic_yle_plus_dx: ∀x,y. x ≤ y → ∀z. x + z ≤ y + z.
+#x #y #Hxy * //
+#z elim z -z /3 width=1 by yle_succ/
+qed.
+
+lemma monotonic_yle_plus_sn: ∀x,y. x ≤ y → ∀z. z + x ≤ z + y.
+/2 width=1 by monotonic_yle_plus_dx/ qed.
+
+lemma monotonic_yle_plus: ∀x1,y1. x1 ≤ y1 → ∀x2,y2. x2 ≤ y2 →
+ x1 + x2 ≤ y1 + y2.
+/3 width=3 by monotonic_yle_plus_dx, monotonic_yle_plus_sn, yle_trans/ qed.
+
+lemma ylt_plus_Y: ∀x,y. x < ∞ → y < ∞ → x + y < ∞.
+#x #y #Hx elim (ylt_inv_Y2 … Hx) -Hx
+#m #Hm #Hy elim (ylt_inv_Y2 … Hy) -Hy //
+qed.
+
+(* Forward lemmas on order **************************************************)
+
+lemma yle_fwd_plus_sn2: ∀x,y,z. x + y ≤ z → y ≤ z.
+/2 width=3 by yle_trans/ qed-.
+
+lemma yle_fwd_plus_sn1: ∀x,y,z. x + y ≤ z → x ≤ z.
+/2 width=3 by yle_trans/ qed-.
+
+lemma yle_inv_monotonic_plus_dx_inj: ∀x,y:ynat.∀z:nat. x + z ≤ y + z → x ≤ y.
+#x #y #z elim z -z /3 width=1 by yle_inv_succ/
+qed-.
+
+lemma yle_inv_monotonic_plus_sn_inj: ∀x,y:ynat.∀z:nat. z + x ≤ z + y → x ≤ y.
+/2 width=2 by yle_inv_monotonic_plus_dx_inj/ qed-.
+
+lemma yle_inv_monotonic_plus_dx: ∀x,y,z. z < ∞ → x + z ≤ y + z → x ≤ y.
+#x #y #z #Hz elim (ylt_inv_Y2 … Hz) -Hz #m #H destruct
+/2 width=2 by yle_inv_monotonic_plus_sn_inj/
+qed-.
+
+lemma yle_inv_monotonic_plus_sn: ∀x,y,z. z < ∞ → z + x ≤ z + y → x ≤ y.
+/2 width=3 by yle_inv_monotonic_plus_dx/ qed-.
+
+lemma yle_fwd_plus_ge: ∀m1,m2:nat. m2 ≤ m1 → ∀n1,n2:ynat. m1 + n1 ≤ m2 + n2 → n1 ≤ n2.
+#m1 #m2 #Hm12 #n1 #n2 #H
+lapply (monotonic_yle_plus … Hm12 … H) -Hm12 -H
+/2 width=2 by yle_inv_monotonic_plus_sn_inj/
+qed-.
+
+lemma yle_fwd_plus_ge_inj: ∀m1:nat. ∀m2,n1,n2:ynat. m2 ≤ m1 → m1 + n1 ≤ m2 + n2 → n1 ≤ n2.
+#m2 #m1 #n1 #n2 #H elim (yle_inv_inj2 … H) -H
+#x #H0 #H destruct /3 width=4 by yle_fwd_plus_ge, yle_inj/
+qed-.
+
+lemma yle_fwd_plus_yge: ∀n2,m1:ynat. ∀n1,m2:nat. m2 ≤ m1 → m1 + n1 ≤ m2 + n2 → n1 ≤ n2.
+* // #n2 * /2 width=4 by yle_fwd_plus_ge_inj/
+qed-.
+
+(* Properties on strict order ***********************************************)
+
+lemma ylt_plus_dx1_trans: ∀x,z. z < x → ∀y. z < x + y.
+/2 width=3 by ylt_yle_trans/ qed.
+
+lemma ylt_plus_dx2_trans: ∀y,z. z < y → ∀x. z < x + y.
+/2 width=3 by ylt_yle_trans/ qed.
+
+lemma monotonic_ylt_plus_dx_inj: ∀x,y. x < y → ∀z:nat. x + yinj z < y + yinj z.
+#x #y #Hxy #z elim z -z /3 width=1 by ylt_succ/
+qed.
+
+lemma monotonic_ylt_plus_sn_inj: ∀x,y. x < y → ∀z:nat. yinj z + x < yinj z + y.
+/2 width=1 by monotonic_ylt_plus_dx_inj/ qed.
+
+lemma monotonic_ylt_plus_dx: ∀x,y. x < y → ∀z. z < ∞ → x + z < y + z.
+#x #y #Hxy #z #Hz elim (ylt_inv_Y2 … Hz) -Hz
+#m #H destruct /2 width=1 by monotonic_ylt_plus_dx_inj/
+qed.
+
+lemma monotonic_ylt_plus_sn: ∀x,y. x < y → ∀z. z < ∞ → z + x < z + y.
+/2 width=1 by monotonic_ylt_plus_dx/ qed.
+
+lemma monotonic_ylt_plus_inj: ∀m1,m2. m1 < m2 → ∀n1,n2. yinj n1 ≤ n2 → m1 + n1 < m2 + n2.
+/3 width=3 by monotonic_ylt_plus_sn_inj, monotonic_yle_plus_sn, ylt_yle_trans/
+qed.
+
+lemma monotonic_ylt_plus: ∀m1,m2. m1 < m2 → ∀n1. n1 < ∞ → ∀n2. n1 ≤ n2 → m1 + n1 < m2 + n2.
+#m1 #m2 #Hm12 #n1 #H elim (ylt_inv_Y2 … H) -H #m #H destruct /2 width=1 by monotonic_ylt_plus_inj/
+qed.
+
+(* Forward lemmas on strict order *******************************************)
+
+lemma ylt_inv_monotonic_plus_dx: ∀x,y,z. x + z < y + z → x < y.
+* [2: #y #z >yplus_comm #H elim (ylt_inv_Y1 … H) ]
+#x * // #y * [2: #H elim (ylt_inv_Y1 … H) ]
+/4 width=3 by ylt_inv_inj, ylt_inj, lt_plus_to_lt_l/
+qed-.
+
+lemma ylt_fwd_plus_ge: ∀m1,m2. m2 ≤ m1 → ∀n1,n2. m1 + n1 < m2 + n2 → n1 < n2.
+#m1 #m2 #Hm12 #n1 #n2 #H elim (ylt_fwd_gen … H)
+#x #H0 elim (yplus_inv_inj … H0) -H0
+#y #z #_ #H2 #H3 destruct -x
+elim (yle_inv_inj2 … Hm12)
+#x #_ #H0 destruct
+lapply (monotonic_ylt_plus … H … Hm12) -H -Hm12
+/2 width=2 by ylt_inv_monotonic_plus_dx/
+qed-.
+
+(* Properties on predeccessor ***********************************************)
+
+lemma yplus_pred1: ∀x,y:ynat. 0 < x → ↓x + y = ↓(x+y).
+#x * // #y elim y -y // #y #IH #Hx
+>yplus_S2 >yplus_S2 >IH -IH // >ylt_inv_O1
+/2 width=1 by ylt_plus_dx1_trans/
+qed-.
+
+lemma yplus_pred2: ∀x,y:ynat. 0 < y → x + ↓y = ↓(x+y).
+/2 width=1 by yplus_pred1/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/ynat/ynat.ma".
+
+(* NATURAL NUMBERS WITH INFINITY ********************************************)
+
+(* the predecessor function *)
+definition ypred: ynat → ynat ≝ λm. match m with
+[ yinj m ⇒ ↓m
+| Y ⇒ Y
+].
+
+interpretation "ynat predecessor" 'DownArrow m = (ypred m).
+
+lemma ypred_O: ↓(yinj 0) = yinj 0.
+// qed.
+
+lemma ypred_S: ∀m:nat. ↓(↑m) = yinj m.
+// qed.
+
+lemma ypred_Y: (↓∞) = ∞.
+// qed.
+
+(* Inversion lemmas *********************************************************)
+
+lemma ypred_inv_refl: ∀m:ynat. ↓m = m → m = 0 ∨ m = ∞.
+* // #m #H lapply (yinj_inj … H) -H (**) (* destruct lemma needed *)
+/4 width=1 by pred_inv_fix_sn, or_introl, eq_f/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/ynat/ynat_pred.ma".
+
+(* NATURAL NUMBERS WITH INFINITY ********************************************)
+
+(* the successor function *)
+definition ysucc: ynat → ynat ≝ λm. match m with
+[ yinj m ⇒ ↑m
+| Y ⇒ Y
+].
+
+interpretation "ynat successor" 'UpArrow m = (ysucc m).
+
+lemma ysucc_inj: ∀m:nat. ↑(yinj m) = yinj (↑m).
+// qed.
+
+lemma ysucc_Y: ↑(∞) = ∞.
+// qed.
+
+(* Properties ***************************************************************)
+
+lemma ypred_succ: ∀m. ↓↑m = m.
+* // qed.
+
+lemma ynat_cases: ∀n:ynat. n = 0 ∨ ∃m:ynat. n = ↑m.
+*
+[ * /2 width=1 by or_introl/
+ #n @or_intror @(ex_intro … n) // (**) (* explicit constructor *)
+| @or_intror @(ex_intro … (∞)) // (**) (* explicit constructor *)
+]
+qed-.
+
+lemma ysucc_iter_Y: ∀m. ysucc^m (∞) = ∞.
+#m elim m -m //
+#m #IHm whd in ⊢ (??%?); >IHm //
+qed.
+
+(* Inversion lemmas *********************************************************)
+
+lemma ysucc_inv_inj: ∀m,n. ↑m = ↑n → m = n.
+#m #n #H <(ypred_succ m) <(ypred_succ n) //
+qed-.
+
+lemma ysucc_inv_refl: ∀m. ↑m = m → m = ∞.
+* //
+#m #H lapply (yinj_inj … H) -H (**) (* destruct lemma needed *)
+#H elim (lt_refl_false m) //
+qed-.
+
+lemma ysucc_inv_inj_sn: ∀m2,n1. yinj m2 = ↑n1 →
+ ∃∃m1. n1 = yinj m1 & m2 = S m1.
+#m2 * normalize
+[ #n1 #H destruct /2 width=3 by ex2_intro/
+| #H destruct
+]
+qed-.
+
+lemma ysucc_inv_inj_dx: ∀m2,n1. ↑n1 = yinj m2 →
+ ∃∃m1. n1 = yinj m1 & m2 = S m1.
+/2 width=1 by ysucc_inv_inj_sn/ qed-.
+
+lemma ysucc_inv_Y_sn: ∀m. ∞ = ↑m → m = ∞.
+* // normalize
+#m #H destruct
+qed-.
+
+lemma ysucc_inv_Y_dx: ∀m. ↑m = ∞ → m = ∞.
+/2 width=1 by ysucc_inv_Y_sn/ qed-.
+
+lemma ysucc_inv_O_sn: ∀m. yinj 0 = ↑m → ⊥. (**) (* explicit coercion *)
+#m #H elim (ysucc_inv_inj_sn … H) -H
+#n #_ #H destruct
+qed-.
+
+lemma ysucc_inv_O_dx: ∀m:ynat. ↑m = 0 → ⊥.
+/2 width=2 by ysucc_inv_O_sn/ qed-.
+
+(* Eliminators **************************************************************)
+
+lemma ynat_ind: ∀R:predicate ynat.
+ R 0 → (∀n:nat. R n → R (↑n)) → R (∞) →
+ ∀x. R x.
+#R #H1 #H2 #H3 * // #n elim n -n /2 width=1 by/
+qed-.
+++ /dev/null
-
-lemma zero_or_gt: ∀n. n = 0 ∨ 0 < n.
-#n elim (lt_or_eq_or_gt 0 n) /2/
-#H elim (lt_zero_false … H)
-qed.
-
-lemma pippo: ∀x,y,z. x < z → y < z - x → x + y < z.
-/3 width=2/
-
-lemma arith_b1x: ∀e,x1,x2,y. y ≤ x2 → x2 ≤ x1 →
- e + (x1 - y) - (x2 - y) = e + (x1 - x2).
-#e #x1 #x2 #y #H1 #H2
-<(arith_b1 … H1) >le_plus_minus // /2 width=1/
-qed-.
-
-lemma arith1: ∀x,y,z,w. z < y → x + (y + w) - z = x + y - z + w.
-#x #y #z #w #H <le_plus_minus_comm // /3 width=1 by lt_to_le, le_plus_a/
-qed-.
-
-lemma lt_dec: ∀n2,n1. Decidable (n1 < n2).
-#n2 elim n2 -n2
-[ /4 width=3 by or_intror, absurd, nmk/
-| #n2 #IHn2 * /2 width=1 by or_introl/
- #n1 elim (IHn2 n1) -IHn2
- /4 width=1 by le_S_S, monotonic_pred, or_intror, or_introl/
-]
-qed-.
-
-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-.
+++ /dev/null
-let rec append A (l1: list A) l2 on l1 ≝
- match l1 with
- [ nil ⇒ l2
- | cons hd tl ⇒ hd :: append A tl l2
- ].
-
-interpretation "append (list)" 'Append l1 l2 = (append ? l1 l2).
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/functions/oplus_4.ma".
-include "ground_2/lib/list2.ma".
-
-(* LISTS OF PAIRS ***********************************************************)
-
-rec definition append2 A1 A2 (l1,l2:list2 A1 A2) on l1 ≝ match l1 with
-[ nil2 ⇒ l2
-| cons2 a1 a2 tl ⇒ {a1, a2} ⨮ append2 A1 A2 tl l2
-].
-
-interpretation "append (list of pairs)"
- 'OPlus A1 A2 l1 l2 = (append2 A1 A2 l1 l2).
+++ /dev/null
-lemma eq_repl4: ∀A,B,C,D.∀R:relation4 A B C D.
-∀x1,x2:A.∀y1,y2:B. ∀z1,z2:C. ∀w1,w2:D. x1=x2 → y1=y2 → z1=z2 → w1=w2 → R x2 y2 z2 w2 → R x1 y1 z1 w1.
-// qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation < "hvbox( l1 ⊕ break l2 )"
- left associative with precedence 60
- for @{ 'OPlus $A $B $l1 $l2 }.
-
-notation > "hvbox( l1 ⊕ break l2 )"
- left associative with precedence 60
- for @{ 'OPlus ? ? $l1 $l2 }.
-(*
-(**) fix pair notation
-notation > "hvbox( l1 ⊕{ break term 46 A, break term 46 A } break term 61 l2 )"
- non associative with precedence 60
- for @{ 'OPlus $A $B $l1 $l2 }.
-*)
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "basics/relations.ma".
-
-(* ADDITIONAL PROPERTIES OF RELATIONS ***************************************)
-
-lemma replace2: ∀A,B:Type[0]. ∀R:relation2 A B. ∀x1,y1,x2,y2.
- R x1 x2 → y1 = x1 → y2 = x2 → R y1 y2.
-// qed-.
+++ /dev/null
-lemma TC_case_sn: ∀A,R. reflexive A R →
- ∀a1,a2. TC … R a1 a2 → ∃∃a. R a1 a & TC … R a a2.
-#A #R #HR #a1 #a2 #H @(TC_ind_dx … a1 H) -a1
-[ /3 width=3 by inj, ex2_intro/
-| #a1 #a0 #Ha10 #Ha02 #_ /2 width=3 by ex2_intro/ (**) (* auto fails withput #_ *)
-]
-qed-.
-
-lemma TC_case_dx: ∀A,R. reflexive A R →
- ∀a1,a2. TC … R a1 a2 → ∃∃a. TC … R a1 a & R a a2.
-#A #R #HR #a1 #a2 #H @(TC_ind … a2 H) -a2
-[ /3 width=3 by inj, ex2_intro/
-| #a0 #a2 #Ha10 #Ha02 #_ /2 width=3 by ex2_intro/ (**) (* auto fails withput #_ *)
-]
-qed-.
-
-definition s_r_trans: ∀A,B. relation2 (A→relation B) (relation A) ≝ λA,B,R1,R2.
- ∀L2,T1,T2. R1 L2 T1 T2 → ∀L1. R2 L1 L2 → LTC … R1 L1 T1 T2.
-
-definition s_rs_trans: ∀A,B. relation2 (A→relation B) (relation A) ≝ λA,B,R1,R2.
- ∀L2,T1,T2. LTC … R1 L2 T1 T2 → ∀L1. R2 L1 L2 → LTC … R1 L1 T1 T2.
-
-lemma s_r_trans_TC1: ∀A,B,R,S. s_r_trans A B R S → s_rs_trans A B R S.
-#A #B #R #S #HRS #L2 #T1 #T2 #H elim H -T2 [ /3 width=3/ ]
-#T #T2 #_ #HT2 #IHT1 #L1 #HL12
-lapply (HRS … HT2 … HL12) -HRS -HT2 /3 width=3/
-qed-.
-
-lemma s_r_trans_TC2: ∀A,B,R,S. s_rs_trans A B R S → s_r_trans A B R (TC … S).
-#A #B #R #S #HRS #L2 #T1 #T2 #HT12 #L1 #H @(TC_ind_dx … L1 H) -L1 /2 width=3/ /3 width=3/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( ∁ term 70 t )"
- non associative with precedence 70
- for @{ 'Complement $t }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox ( ∥ term 19 C ∥ )"
- with precedence 70
- for @{ 'Norm $C }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/relocation/rtmap_tl.ma".
-
-(* RELOCATION MAP ***********************************************************)
-
-inductive le (f1): predicate rtmap ≝
-| le_eq: ∀f2. f1 ≗ f2 → le f1 f2
-| le_tl: ∀f2,g2. le f1 f2 → ↓g2 = f2 → le f1 g2
-.
-
-interpretation "less or equal to (rtmap)" 'leq x y = (le x y).
-
-(* Basic properties *********************************************************)
-
-lemma le_refl: reflexive … le.
-/2 width=1 by eq_refl, le_eq/ qed.
-
-lemma le_eq_repl_back_dx: ∀f1. eq_repl_back (λf2. f1 ≤ f2).
-#f #f1 #Hf1 elim Hf1 -f1
-/4 width=3 by le_tl, le_eq, tl_eq_repl, eq_trans/
-qed-.
-
-lemma le_eq_repl_fwd_dx: ∀f1. eq_repl_fwd (λf2. f1 ≤ f2).
-#f1 @eq_repl_sym /2 width=3 by le_eq_repl_back_dx/
-qed-.
-
-lemma le_eq_repl_back_sn: ∀f2. eq_repl_back (λf1. f1 ≤ f2).
-#f #f1 #Hf1 elim Hf1 -f
-/4 width=3 by le_tl, le_eq, tl_eq_repl, eq_canc_sn/
-qed-.
-
-lemma le_eq_repl_fwd_sn: ∀f2. eq_repl_fwd (λf1. f1 ≤ f2).
-#f2 @eq_repl_sym /2 width=3 by le_eq_repl_back_sn/
-qed-.
-
-lemma le_tl_comp: ∀f1,f2. f1 ≤ f2 → ∀g1,g2. ↓f1 = g1 → ↓f2 = g2 → g1 ≤ g2.
-#f1 #f2 #H elim H -f2
-/3 width=3 by le_tl, le_eq, tl_eq_repl/
-qed.
-
-(* Main properties **********************************************************)
-
-theorem le_trans: Transitive … le.
-#f1 #f #H elim H -f
-/4 width=5 by le_tl_comp, le_eq_repl_fwd_sn, le_tl/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/functions/norm_1.ma".
-include "ground_2/lib/bool.ma".
-include "ground_2/lib/list.ma".
-
-(* RELOCATION TRACE *********************************************************)
-
-definition trace: Type[0] ≝ list bool.
-
-let rec colength (cs:trace) on cs ≝ match cs with
-[ nil ⇒ 0
-| cons b tl ⇒ match b with [ true ⇒ ⫯(colength tl) | false ⇒ colength tl ]
-].
-
-interpretation "colength (trace)"
- 'Norm cs = (colength cs).
-
-(* basic properties *********************************************************)
-
-lemma colength_empty: ∥◊∥ = 0.
-// qed.
-
-lemma colength_true: ∀cs. ∥Ⓣ@cs∥ = ⫯∥cs∥.
-// qed.
-
-lemma colength_false: ∀cs. ∥Ⓕ@cs∥ = ∥cs∥.
-// qed.
-
-lemma colength_cons: ∀cs1,cs2. ∥cs1∥ = ∥cs2∥ →
- ∀b. ∥b@cs1∥ = ∥b@cs2∥.
-#cs1 #cs2 #H * /2 width=1 by/
-qed.
-
-lemma colength_le: ∀cs. ∥cs∥ ≤ |cs|.
-#cs elim cs -cs //
-* /2 width=1 by le_S_S, le_S/
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/rafter_3.ma".
-include "ground_2/relocation/trace_at.ma".
-
-(* RELOCATION TRACE *********************************************************)
-
-inductive after: relation3 trace trace trace ≝
- | after_empty: after (◊) (◊) (◊)
- | after_true : ∀cs1,cs2,cs. after cs1 cs2 cs →
- ∀b. after (Ⓣ @ cs1) (b @ cs2) (b @ cs)
- | after_false: ∀cs1,cs2,cs. after cs1 cs2 cs →
- after (Ⓕ @ cs1) cs2 (Ⓕ @ cs).
-
-interpretation "composition (trace)"
- 'RAfter cs1 cs2 cs = (after cs1 cs2 cs).
-
-(* Basic properties *********************************************************)
-
-lemma after_length: ∀cs1,cs2. ∥cs1∥ = |cs2| →
- ∃∃cs. cs1 ⊚ cs2 ≡ cs & |cs| = |cs1| & ∥cs∥ = ∥cs2∥.
-#cs1 elim cs1 -cs1
-[ #cs2 #H >(length_inv_zero_sn … H) -cs2 /2 width=4 by after_empty, ex3_intro/
-| * #cs1 #IH #cs2 #Hcs
- [ elim (length_inv_succ_sn … Hcs) -Hcs
- #tl #b #Hcs #H destruct
- ]
- elim (IH … Hcs) -IH -Hcs
- #cs #Hcs #H1 #H2 [ @(ex3_intro … (b@cs)) | @(ex3_intro … (Ⓕ@cs)) ] /2 width=1 by after_true, after_false, colength_cons/
-]
-qed-.
-
-(* Basic inversion lemmas ***************************************************)
-
-fact after_inv_empty1_aux: ∀cs1,cs2,cs. cs1 ⊚ cs2 ≡ cs → cs1 = ◊ →
- cs2 = ◊ ∧ cs = ◊.
-#cs1 #cs2 #cs * -cs1 -cs2 -cs
-[ /2 width=1 by conj/
-| #cs1 #cs2 #cs #_ #b #H destruct
-| #cs1 #cs2 #cs #_ #H destruct
-]
-qed-.
-
-lemma after_inv_empty1: ∀cs2,cs. ◊ ⊚ cs2 ≡ cs → cs2 = ◊ ∧ cs = ◊.
-/2 width=3 by after_inv_empty1_aux/ qed-.
-
-fact after_inv_true1_aux: ∀cs1,cs2,cs. cs1 ⊚ cs2 ≡ cs → ∀tl1. cs1 = Ⓣ @ tl1 →
- ∃∃tl2,tl,b. cs2 = b @ tl2 & cs = b @ tl & tl1 ⊚ tl2 ≡ tl.
-#cs1 #cs2 #cs * -cs1 -cs2 -cs
-[ #tl1 #H destruct
-| #cs1 #cs2 #cs #H12 #b #tl1 #H destruct
- /2 width=6 by ex3_3_intro/
-| #cs1 #cs2 #cs #_ #tl1 #H destruct
-]
-qed-.
-
-lemma after_inv_true1: ∀tl1,cs2,cs. (Ⓣ @ tl1) ⊚ cs2 ≡ cs →
- ∃∃tl2,tl,b. cs2 = b @ tl2 & cs = b @ tl & tl1 ⊚ tl2 ≡ tl.
-/2 width=3 by after_inv_true1_aux/ qed-.
-
-fact after_inv_false1_aux: ∀cs1,cs2,cs. cs1 ⊚ cs2 ≡ cs → ∀tl1. cs1 = Ⓕ @ tl1 →
- ∃∃tl. cs = Ⓕ @ tl & tl1 ⊚ cs2 ≡ tl.
-#cs1 #cs2 #cs * -cs1 -cs2 -cs
-[ #tl1 #H destruct
-| #cs1 #cs2 #cs #_ #b #tl1 #H destruct
-| #cs1 #cs2 #cs #H12 #tl1 #H destruct
- /2 width=3 by ex2_intro/
-]
-qed-.
-
-lemma after_inv_false1: ∀tl1,cs2,cs. (Ⓕ @ tl1) ⊚ cs2 ≡ cs →
- ∃∃tl. cs = Ⓕ @ tl & tl1 ⊚ cs2 ≡ tl.
-/2 width=3 by after_inv_false1_aux/ qed-.
-
-fact after_inv_empty3_aux: ∀cs1,cs2,cs. cs1 ⊚ cs2 ≡ cs → cs = ◊ →
- cs1 = ◊ ∧ cs2 = ◊.
-#cs1 #cs2 #cs * -cs1 -cs2 -cs
-[ /2 width=1 by conj/
-| #cs1 #cs2 #cs #_ #b #H destruct
-| #cs1 #cs2 #cs #_ #H destruct
-]
-qed-.
-
-lemma after_inv_empty3: ∀cs1,cs2. cs1 ⊚ cs2 ≡ ◊ → cs1 = ◊ ∧ cs2 = ◊.
-/2 width=3 by after_inv_empty3_aux/ qed-.
-
-fact after_inv_inh3_aux: ∀cs1,cs2,cs. cs1 ⊚ cs2 ≡ cs → ∀tl,b. cs = b @ tl →
- (∃∃tl1,tl2. cs1 = Ⓣ @ tl1 & cs2 = b @ tl2 & tl1 ⊚ tl2 ≡ tl) ∨
- ∃∃tl1. cs1 = Ⓕ @ tl1 & b = Ⓕ & tl1 ⊚ cs2 ≡ tl.
-#cs1 #cs2 #cs * -cs1 -cs2 -cs
-[ #tl #b #H destruct
-| #cs1 #cs2 #cs #H12 #b0 #tl #b #H destruct
- /3 width=5 by ex3_2_intro, or_introl/
-| #cs1 #cs2 #cs #H12 #tl #b #H destruct
- /3 width=3 by ex3_intro, or_intror/
-]
-qed-.
-
-lemma after_inv_inh3: ∀cs1,cs2,tl,b. cs1 ⊚ cs2 ≡ b @ tl →
- (∃∃tl1,tl2. cs1 = Ⓣ @ tl1 & cs2 = b @ tl2 & tl1 ⊚ tl2 ≡ tl) ∨
- ∃∃tl1. cs1 = Ⓕ @ tl1 & b = Ⓕ & tl1 ⊚ cs2 ≡ tl.
-/2 width=3 by after_inv_inh3_aux/ qed-.
-
-lemma after_inv_true3: ∀cs1,cs2,tl. cs1 ⊚ cs2 ≡ Ⓣ @ tl →
- ∃∃tl1,tl2. cs1 = Ⓣ @ tl1 & cs2 = Ⓣ @ tl2 & tl1 ⊚ tl2 ≡ tl.
-#cs1 #cs2 #tl #H elim (after_inv_inh3 … H) -H // *
-#tl1 #_ #H destruct
-qed-.
-
-lemma after_inv_false3: ∀cs1,cs2,tl. cs1 ⊚ cs2 ≡ Ⓕ @ tl →
- (∃∃tl1,tl2. cs1 = Ⓣ @ tl1 & cs2 = Ⓕ @ tl2 & tl1 ⊚ tl2 ≡ tl) ∨
- ∃∃tl1. cs1 = Ⓕ @ tl1 & tl1 ⊚ cs2 ≡ tl.
-#cs1 #cs2 #tl #H elim (after_inv_inh3 … H) -H /2 width=1 by or_introl/ * /3 width=3 by ex2_intro, or_intror/
-qed-.
-
-lemma after_inv_length: ∀cs1,cs2,cs. cs1 ⊚ cs2 ≡ cs →
- ∧∧ ∥cs1∥ = |cs2| & |cs| = |cs1| & ∥cs∥ = ∥cs2∥.
-#cs1 #cs2 #cs #H elim H -cs1 -cs2 -cs /2 width=1 by and3_intro/
-#cs1 #cs2 #cs #_ [ * ] * /2 width=1 by and3_intro/
-qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma after_at_fwd: ∀cs1,cs2,cs. cs2 ⊚ cs1 ≡ cs → ∀i1,i. @⦃i1, cs⦄ ≡ i →
- ∃∃i2. @⦃i1, cs1⦄ ≡ i2 & @⦃i2, cs2⦄ ≡ i.
-#cs1 #cs2 #cs #H elim H -cs1 -cs2 -cs
-[ #i1 #i #H elim (at_inv_empty … H) -H
- #H1 #H2 destruct /2 width=3 by at_empty, ex2_intro/
-| #cs1 #cs2 #cs #_ * #IH #i1 #i #H
- [ elim (at_inv_true … H) -H *
- [ -IH #H1 #H2 destruct /2 width=3 by at_zero, ex2_intro/
- | #j1 #j #H1 #H2 #Hj1 destruct
- elim (IH … Hj1) -IH -Hj1 /3 width=3 by at_succ, ex2_intro/
- ]
- | elim (at_inv_false … H) -H
- #j #H #Hj destruct
- elim (IH … Hj) -IH -Hj /3 width=3 by at_succ, at_false, ex2_intro/
- ]
-| #cs1 #cs2 #cs #_ #IH #i1 #i #H elim (at_inv_false … H) -H
- #j #H #Hj destruct
- elim (IH … Hj) -IH -Hj /3 width=3 by at_false, ex2_intro/
-]
-qed-.
-
-lemma after_at1_fwd: ∀cs1,cs2,cs. cs2 ⊚ cs1 ≡ cs → ∀i1,i2. @⦃i1, cs1⦄ ≡ i2 →
- ∃∃i. @⦃i2, cs2⦄ ≡ i & @⦃i1, cs⦄ ≡ i.
-#cs1 #cs2 #cs #H elim H -cs1 -cs2 -cs
-[ #i1 #i2 #H elim (at_inv_empty … H) -H
- #H1 #H2 destruct /2 width=3 by at_empty, ex2_intro/
-| #cs1 #cs2 #cs #_ * #IH #i1 #i2 #H
- [ elim (at_inv_true … H) -H *
- [ -IH #H1 #H2 destruct /2 width=3 by at_zero, ex2_intro/
- | #j1 #j2 #H1 #H2 #Hj12 destruct
- elim (IH … Hj12) -IH -Hj12 /3 width=3 by at_succ, ex2_intro/
- ]
- | elim (at_inv_false … H) -H
- #j2 #H #Hj2 destruct
- elim (IH … Hj2) -IH -Hj2 /3 width=3 by at_succ, at_false, ex2_intro/
- ]
-| #cs1 #cs2 #cs #_ #IH #i1 #i2 #H elim (IH … H) -IH -H
- /3 width=3 by at_false, ex2_intro/
-]
-qed-.
-
-lemma after_fwd_at: ∀cs1,cs2,cs. cs2 ⊚ cs1 ≡ cs →
- ∀i1,i2,i. @⦃i1, cs1⦄ ≡ i2 → @⦃i2, cs2⦄ ≡ i → @⦃i1, cs⦄ ≡ i.
-#cs1 #cs2 #cs #Hcs #i1 #i2 #i #Hi1 #Hi2 elim (after_at1_fwd … Hcs … Hi1) -cs1
-#j #H #Hj >(at_mono … Hi2 … H) -i2 //
-qed-.
-
-lemma after_fwd_at1: ∀cs1,cs2,cs. cs2 ⊚ cs1 ≡ cs →
- ∀i1,i2,i. @⦃i1, cs⦄ ≡ i → @⦃i2, cs2⦄ ≡ i → @⦃i1, cs1⦄ ≡ i2.
-#cs1 #cs2 #cs #Hcs #i1 #i2 #i #Hi1 #Hi2 elim (after_at_fwd … Hcs … Hi1) -cs
-#j1 #Hij1 #H >(at_inj … Hi2 … H) -i //
-qed-.
-
-lemma after_fwd_at2: ∀cs1,cs2,cs. cs2 ⊚ cs1 ≡ cs →
- ∀i1,i2,i. @⦃i1, cs⦄ ≡ i → @⦃i1, cs1⦄ ≡ i2 → @⦃i2, cs2⦄ ≡ i.
-#cs1 #cs2 #cs #H elim H -cs1 -cs2 -cs
-[ #i1 #i2 #i #Hi #Hi1 elim (at_inv_empty … Hi1) -Hi1 //
-| #cs1 #cs2 #cs #_ * #IH #i1 #i2 #i #Hi #Hi1
- [ elim (at_inv_true … Hi1) -Hi1 *
- [ -IH #H1 #H2 destruct >(at_inv_true_zero_sn … Hi) -i //
- | #j1 #j2 #H1 #H2 #Hj12 destruct elim (at_inv_true_succ_sn … Hi) -Hi
- #j #H #Hj1 destruct /3 width=3 by at_succ/
- ]
- | elim (at_inv_false … Hi1) -Hi1
- #j2 #H #Hj2 destruct elim (at_inv_false … Hi) -Hi
- #j #H #Hj destruct /3 width=3 by at_succ/
- ]
-| #cs1 #cs2 #cs #_ #IH #i1 #i2 #i #Hi #Hi2 elim (at_inv_false … Hi) -Hi
- #j #H #Hj destruct /3 width=3 by at_false/
-]
-qed-.
-
-(* Main properties **********************************************************)
-
-theorem after_trans1: ∀cs1,cs2,cs0. cs1 ⊚ cs2 ≡ cs0 →
- ∀cs3, cs4. cs0 ⊚ cs3 ≡ cs4 →
- ∃∃cs. cs2 ⊚ cs3 ≡ cs & cs1 ⊚ cs ≡ cs4.
-#cs1 #cs2 #cs0 #H elim H -cs1 -cs2 -cs0
-[ #cs3 #cs4 #H elim (after_inv_empty1 … H) -H
- #H1 #H2 destruct /2 width=3 by ex2_intro, after_empty/
-| #cs1 #cs2 #cs0 #_ * #IH #cs3 #cs4 #H
- [ elim (after_inv_true1 … H) -H
- #tl3 #tl4 #b #H1 #H2 #Htl destruct
- elim (IH … Htl) -cs0
- /3 width=3 by ex2_intro, after_true/
- | elim (after_inv_false1 … H) -H
- #tl4 #H #Htl destruct
- elim (IH … Htl) -cs0
- /3 width=3 by ex2_intro, after_true, after_false/
- ]
-| #cs1 #cs2 #cs0 #_ #IH #cs3 #cs4 #H
- elim (after_inv_false1 … H) -H
- #tl4 #H #Htl destruct
- elim (IH … Htl) -cs0
- /3 width=3 by ex2_intro, after_false/
-]
-qed-.
-
-theorem after_trans2: ∀cs1,cs0,cs4. cs1 ⊚ cs0 ≡ cs4 →
- ∀cs2, cs3. cs2 ⊚ cs3 ≡ cs0 →
- ∃∃cs. cs1 ⊚ cs2 ≡ cs & cs ⊚ cs3 ≡ cs4.
-#cs1 #cs0 #cs4 #H elim H -cs1 -cs0 -cs4
-[ #cs2 #cs3 #H elim (after_inv_empty3 … H) -H
- #H1 #H2 destruct /2 width=3 by ex2_intro, after_empty/
-| #cs1 #cs0 #cs4 #_ #b #IH #cs2 #cs3 #H elim (after_inv_inh3 … H) -H *
- [ #tl2 #tl3 #H1 #H2 #Htl destruct
- elim (IH … Htl) -cs0
- /3 width=3 by ex2_intro, after_true/
- | #tl2 #H1 #H2 #Htl destruct
- elim (IH … Htl) -cs0
- /3 width=3 by ex2_intro, after_true, after_false/
- ]
-| #cs1 #cs0 #cs4 #_ #IH #cs2 #cs3 #H elim (IH … H) -cs0
- /3 width=3 by ex2_intro, after_false/
-]
-qed-.
-
-theorem after_mono: ∀cs1,cs2,x. cs1 ⊚ cs2 ≡ x → ∀y. cs1 ⊚ cs2 ≡ y → x = y.
-#cs1 #cs2 #x #H elim H -cs1 -cs2 -x
-[ #y #H elim (after_inv_empty1 … H) -H //
-| #cs1 #cs #x #_ #b #IH #y #H elim (after_inv_true1 … H) -H
- #tl #tly #b0 #H1 #H2 #Htl destruct >(IH … Htl) -tl -cs1 -x //
-| #cs1 #cs2 #x #_ #IH #y #H elim (after_inv_false1 … H) -H
- #tly #H #Htl destruct >(IH … Htl) -cs1 -cs2 -x //
-]
-qed-.
-
-theorem after_inj: ∀cs1,x,cs. cs1 ⊚ x ≡ cs → ∀y. cs1 ⊚ y ≡ cs → x = y.
-#cs1 #x #cs #H elim H -cs1 -x -cs
-[ #y #H elim (after_inv_empty1 … H) -H //
-| #cs1 #x #cs #_ #b #IH #y #H elim (after_inv_true1 … H) -H
- #tly #tl #b0 #H1 #H2 #Htl destruct >(IH … Htl) -tl -cs1 -x //
-| #cs1 #x #cs #_ #IH #y #H elim (after_inv_false1 … H) -H
- #tl #H #Htl destruct >(IH … Htl) -tl -cs1 -x //
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/rat_3.ma".
-include "ground_2/relocation/trace.ma".
-
-(* RELOCATION TRACE *********************************************************)
-
-inductive at: trace → relation nat ≝
- | at_empty: at (◊) 0 0
- | at_zero : ∀cs. at (Ⓣ @ cs) 0 0
- | at_succ : ∀cs,i1,i2. at cs i1 i2 → at (Ⓣ @ cs) (⫯i1) (⫯i2)
- | at_false: ∀cs,i1,i2. at cs i1 i2 → at (Ⓕ @ cs) i1 (⫯i2).
-
-interpretation "relocation (trace)"
- 'RAt i1 cs i2 = (at cs i1 i2).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact at_inv_empty_aux: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → cs = ◊ → i1 = 0 ∧ i2 = 0.
-#cs #i1 #i2 * -cs -i1 -i2 /2 width=1 by conj/
-#cs #i1 #i2 #_ #H destruct
-qed-.
-
-lemma at_inv_empty: ∀i1,i2. @⦃i1, ◊⦄ ≡ i2 → i1 = 0 ∧ i2 = 0.
-/2 width=5 by at_inv_empty_aux/ qed-.
-
-lemma at_inv_empty_zero_sn: ∀i. @⦃0, ◊⦄ ≡ i → i = 0.
-#i #H elim (at_inv_empty … H) -H //
-qed-.
-
-lemma at_inv_empty_zero_dx: ∀i. @⦃i, ◊⦄ ≡ 0 → i = 0.
-#i #H elim (at_inv_empty … H) -H //
-qed-.
-
-lemma at_inv_empty_succ_sn: ∀i1,i2. @⦃⫯i1, ◊⦄ ≡ i2 → ⊥.
-#i1 #i2 #H elim (at_inv_empty … H) -H #H1 #H2 destruct
-qed-.
-
-lemma at_inv_empty_succ_dx: ∀i1,i2. @⦃i1, ◊⦄ ≡ ⫯i2 → ⊥.
-#i1 #i2 #H elim (at_inv_empty … H) -H #H1 #H2 destruct
-qed-.
-
-fact at_inv_true_aux: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → ∀tl. cs = Ⓣ @ tl →
- (i1 = 0 ∧ i2 = 0) ∨
- ∃∃j1,j2. i1 = ⫯j1 & i2 = ⫯j2 & @⦃j1, tl⦄ ≡ j2.
-#cs #i1 #i2 * -cs -i1 -i2
-[2,3,4: #cs [2,3: #i1 #i2 #Hij ] ] #tl #H destruct
-/3 width=5 by ex3_2_intro, or_introl, or_intror, conj/
-qed-.
-
-lemma at_inv_true: ∀cs,i1,i2. @⦃i1, Ⓣ @ cs⦄ ≡ i2 →
- (i1 = 0 ∧ i2 = 0) ∨
- ∃∃j1,j2. i1 = ⫯j1 & i2 = ⫯j2 & @⦃j1, cs⦄ ≡ j2.
-/2 width=3 by at_inv_true_aux/ qed-.
-
-lemma at_inv_true_zero_sn: ∀cs,i. @⦃0, Ⓣ @ cs⦄ ≡ i → i = 0.
-#cs #i #H elim (at_inv_true … H) -H * //
-#j1 #j2 #H destruct
-qed-.
-
-lemma at_inv_true_zero_dx: ∀cs,i. @⦃i, Ⓣ @ cs⦄ ≡ 0 → i = 0.
-#cs #i #H elim (at_inv_true … H) -H * //
-#j1 #j2 #_ #H destruct
-qed-.
-
-lemma at_inv_true_succ_sn: ∀cs,i1,i2. @⦃⫯i1, Ⓣ @ cs⦄ ≡ i2 →
- ∃∃j2. i2 = ⫯j2 & @⦃i1, cs⦄ ≡ j2.
-#cs #i1 #i2 #H elim (at_inv_true … H) -H *
-[ #H destruct
-| #j1 #j2 #H1 #H2 destruct /2 width=3 by ex2_intro/
-]
-qed-.
-
-lemma at_inv_true_succ_dx: ∀cs,i1,i2. @⦃i1, Ⓣ @ cs⦄ ≡ ⫯i2 →
- ∃∃j1. i1 = ⫯j1 & @⦃j1, cs⦄ ≡ i2.
-#cs #i1 #i2 #H elim (at_inv_true … H) -H *
-[ #_ #H destruct
-| #j1 #j2 #H1 #H2 destruct /2 width=3 by ex2_intro/
-]
-qed-.
-
-lemma at_inv_true_succ: ∀cs,i1,i2. @⦃⫯i1, Ⓣ @ cs⦄ ≡ ⫯i2 →
- @⦃i1, cs⦄ ≡ i2.
-#cs #i1 #i2 #H elim (at_inv_true … H) -H *
-[ #H destruct
-| #j1 #j2 #H1 #H2 destruct //
-]
-qed-.
-
-lemma at_inv_true_O_S: ∀cs,i. @⦃0, Ⓣ @ cs⦄ ≡ ⫯i → ⊥.
-#cs #i #H elim (at_inv_true … H) -H *
-[ #_ #H destruct
-| #j1 #j2 #H destruct
-]
-qed-.
-
-lemma at_inv_true_S_O: ∀cs,i. @⦃⫯i, Ⓣ @ cs⦄ ≡ 0 → ⊥.
-#cs #i #H elim (at_inv_true … H) -H *
-[ #H destruct
-| #j1 #j2 #_ #H destruct
-]
-qed-.
-
-fact at_inv_false_aux: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → ∀tl. cs = Ⓕ @ tl →
- ∃∃j2. i2 = ⫯j2 & @⦃i1, tl⦄ ≡ j2.
-#cs #i1 #i2 * -cs -i1 -i2
-[2,3,4: #cs [2,3: #i1 #i2 #Hij ] ] #tl #H destruct
-/2 width=3 by ex2_intro/
-qed-.
-
-lemma at_inv_false: ∀cs,i1,i2. @⦃i1, Ⓕ @ cs⦄ ≡ i2 →
- ∃∃j2. i2 = ⫯j2 & @⦃i1, cs⦄ ≡ j2.
-/2 width=3 by at_inv_false_aux/ qed-.
-
-lemma at_inv_false_S: ∀cs,i1,i2. @⦃i1, Ⓕ @ cs⦄ ≡ ⫯i2 → @⦃i1, cs⦄ ≡ i2.
-#cs #i1 #i2 #H elim (at_inv_false … H) -H
-#j2 #H destruct //
-qed-.
-
-lemma at_inv_false_O: ∀cs,i. @⦃i, Ⓕ @ cs⦄ ≡ 0 → ⊥.
-#cs #i #H elim (at_inv_false … H) -H
-#j2 #H destruct
-qed-.
-
-lemma at_inv_le: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → i1 ≤ ∥cs∥ ∧ i2 ≤ |cs|.
-#cs #i1 #i2 #H elim H -cs -i1 -i2 /2 width=1 by conj/
-#cs #i1 #i2 #_ * /3 width=1 by le_S_S, conj/
-qed-.
-
-lemma at_inv_gt1: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → ∥cs∥ < i1 → ⊥.
-#cs #i1 #i2 #H elim (at_inv_le … H) -H /2 width=4 by lt_le_false/
-qed-.
-
-lemma at_inv_gt2: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → |cs| < i2 → ⊥.
-#cs #i1 #i2 #H elim (at_inv_le … H) -H /2 width=4 by lt_le_false/
-qed-.
-
-(* Basic properties *********************************************************)
-
-(* Note: lemma 250 *)
-lemma at_le: ∀cs,i1. i1 ≤ ∥cs∥ →
- ∃∃i2. @⦃i1, cs⦄ ≡ i2 & i2 ≤ |cs|.
-#cs elim cs -cs
-[ #i1 #H <(le_n_O_to_eq … H) -i1 /2 width=3 by at_empty, ex2_intro/
-| * #cs #IH
- [ * /2 width=3 by at_zero, ex2_intro/
- #i1 #H lapply (le_S_S_to_le … H) -H
- #H elim (IH … H) -IH -H /3 width=3 by at_succ, le_S_S, ex2_intro/
- | #i1 #H elim (IH … H) -IH -H /3 width=3 by at_false, le_S_S, ex2_intro/
- ]
-]
-qed-.
-
-lemma at_top: ∀cs. @⦃∥cs∥, cs⦄ ≡ |cs|.
-#cs elim cs -cs // * /2 width=1 by at_succ, at_false/
-qed.
-
-lemma at_monotonic: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → ∀j1. j1 < i1 →
- ∃∃j2. @⦃j1, cs⦄ ≡ j2 & j2 < i2.
-#cs #i1 #i2 #H elim H -cs -i1 -i2
-[ #j1 #H elim (lt_zero_false … H)
-| #cs #j1 #H elim (lt_zero_false … H)
-| #cs #i1 #i2 #Hij #IH * /2 width=3 by ex2_intro, at_zero/
- #j1 #H lapply (lt_S_S_to_lt … H) -H
- #H elim (IH … H) -i1
- #j2 #Hj12 #H /3 width=3 by le_S_S, ex2_intro, at_succ/
-| #cs #i1 #i2 #_ #IH #j1 #H elim (IH … H) -i1
- /3 width=3 by le_S_S, ex2_intro, at_false/
-]
-qed-.
-
-lemma at_dec: ∀cs,i1,i2. Decidable (@⦃i1, cs⦄ ≡ i2).
-#cs elim cs -cs [ | * #cs #IH ]
-[ * [2: #i1 ] * [2,4: #i2 ]
- [4: /2 width=1 by at_empty, or_introl/
- |*: @or_intror #H elim (at_inv_empty … H) #H1 #H2 destruct
- ]
-| * [2: #i1 ] * [2,4: #i2 ]
- [ elim (IH i1 i2) -IH
- /4 width=1 by at_inv_true_succ, at_succ, or_introl, or_intror/
- | -IH /3 width=3 by at_inv_true_O_S, or_intror/
- | -IH /3 width=3 by at_inv_true_S_O, or_intror/
- | -IH /2 width=1 by or_introl, at_zero/
- ]
-| #i1 * [2: #i2 ]
- [ elim (IH i1 i2) -IH
- /4 width=1 by at_inv_false_S, at_false, or_introl, or_intror/
- | -IH /3 width=3 by at_inv_false_O, or_intror/
- ]
-]
-qed-.
-
-lemma is_at_dec: ∀cs,i2. Decidable (∃i1. @⦃i1, cs⦄ ≡ i2).
-#cs elim cs -cs
-[ * /3 width=2 by ex_intro, or_introl/
- #i2 @or_intror * /2 width=3 by at_inv_empty_succ_dx/
-| * #cs #IH * [2,4: #i2 ]
- [ elim (IH i2) -IH
- [ * /4 width=2 by at_succ, ex_intro, or_introl/
- | #H @or_intror * #x #Hx
- elim (at_inv_true_succ_dx … Hx) -Hx
- /3 width=2 by ex_intro/
- ]
- | elim (IH i2) -IH
- [ * /4 width=2 by at_false, ex_intro, or_introl/
- | #H @or_intror * /4 width=2 by at_inv_false_S, ex_intro/
- ]
- | /3 width=2 by at_zero, ex_intro, or_introl/
- | @or_intror * /2 width=3 by at_inv_false_O/
- ]
-]
-qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma at_increasing: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → i1 ≤ i2.
-#cs #i1 elim i1 -i1 //
-#j1 #IHi #i2 #H elim (at_monotonic … H j1) -H
-/3 width=3 by le_to_lt_to_lt/
-qed-.
-
-lemma at_increasing_strict: ∀cs,i1,i2. @⦃i1, Ⓕ @ cs⦄ ≡ i2 →
- i1 < i2 ∧ @⦃i1, cs⦄ ≡ ⫰i2.
-#cs #i1 #i2 #H elim (at_inv_false … H) -H
-#j2 #H #Hj2 destruct /4 width=2 by conj, at_increasing, le_S_S/
-qed-.
-
-(* Main properties **********************************************************)
-
-theorem at_mono: ∀cs,i,i1. @⦃i, cs⦄ ≡ i1 → ∀i2. @⦃i, cs⦄ ≡ i2 → i1 = i2.
-#cs #i #i1 #H elim H -cs -i -i1
-[2,3,4: #cs [2,3: #i #i1 #_ #IH ] ] #i2 #H
-[ elim (at_inv_true_succ_sn … H) -H
- #j2 #H destruct #H >(IH … H) -cs -i -i1 //
-| elim (at_inv_false … H) -H
- #j2 #H destruct #H >(IH … H) -cs -i -i1 //
-| /2 width=2 by at_inv_true_zero_sn/
-| /2 width=1 by at_inv_empty_zero_sn/
-]
-qed-.
-
-theorem at_inj: ∀cs,i1,i. @⦃i1, cs⦄ ≡ i → ∀i2. @⦃i2, cs⦄ ≡ i → i1 = i2.
-#cs #i1 #i #H elim H -cs -i1 -i
-[2,3,4: #cs [ |2,3: #i1 #i #_ #IH ] ] #i2 #H
-[ /2 width=2 by at_inv_true_zero_dx/
-| elim (at_inv_true_succ_dx … H) -H
- #j2 #H destruct #H >(IH … H) -cs -i1 -i //
-| elim (at_inv_false … H) -H
- #j #H destruct #H >(IH … H) -cs -i1 -j //
-| /2 width=1 by at_inv_empty_zero_dx/
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/isidentity_1.ma".
-include "ground_2/relocation/trace_after.ma".
-include "ground_2/relocation/trace_sle.ma".
-
-(* RELOCATION TRACE *********************************************************)
-
-definition isid: predicate trace ≝ λcs. ∥cs∥ = |cs|.
-
-interpretation "test for identity (trace)"
- 'IsIdentity cs = (isid cs).
-
-definition t_reflexive: ∀S:Type[0]. predicate (trace → relation S) ≝
- λS,R. ∀a. ∃∃t. 𝐈⦃t⦄ & R t a a.
-
-(* Basic properties *********************************************************)
-
-lemma isid_empty: 𝐈⦃◊⦄.
-// qed.
-
-lemma isid_true: ∀cs. 𝐈⦃cs⦄ → 𝐈⦃Ⓣ @ cs⦄.
-// qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma isid_inv_true: ∀cs. 𝐈⦃Ⓣ @ cs⦄ → 𝐈⦃cs⦄.
-/2 width=1 by injective_S/ qed-.
-
-lemma isid_inv_false: ∀cs. 𝐈⦃Ⓕ @ cs⦄ → ⊥.
-/3 width=4 by colength_le, lt_le_false/ qed-.
-
-lemma isid_inv_cons: ∀cs,b. 𝐈⦃b @ cs⦄ → 𝐈⦃cs⦄ ∧ b = Ⓣ.
-#cs * #H /3 width=1 by isid_inv_true, conj/
-elim (isid_inv_false … H)
-qed-.
-
-(* Properties on application ************************************************)
-
-lemma isid_at: ∀cs. (∀i1,i2. @⦃i1, cs⦄ ≡ i2 → i1 = i2) → 𝐈⦃cs⦄.
-#cs elim cs -cs // * /2 width=1 by/
-qed.
-
-(* Inversion lemmas on application ******************************************)
-
-lemma isid_inv_at: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → 𝐈⦃cs⦄ → i1 = i2.
-#cs #i1 #i2 #H elim H -cs -i1 -i2 /4 width=1 by isid_inv_true, eq_f/
-#cs #i1 #i2 #_ #IH #H elim (isid_inv_false … H)
-qed-.
-
-(* Properties on composition ************************************************)
-
-lemma isid_after_sn: ∀cs2. ∃∃cs1. 𝐈⦃cs1⦄ & cs1 ⊚ cs2 ≡ cs2.
-#cs2 elim cs2 -cs2 /2 width=3 by after_empty, ex2_intro/
-#b #cs2 * /3 width=3 by isid_true, after_true, ex2_intro/
-qed-.
-
-lemma isid_after_dx: ∀cs1. ∃∃cs2. 𝐈⦃cs2⦄ & cs1 ⊚ cs2 ≡ cs1.
-#cs1 elim cs1 -cs1 /2 width=3 by after_empty, ex2_intro/
-* #cs1 * /3 width=3 by isid_true, after_true, after_false, ex2_intro/
-qed-.
-
-lemma after_isid_sn: ∀cs1,cs2. cs1 ⊚ cs2 ≡ cs2 → 𝐈⦃cs1⦄ .
-#cs1 #cs2 #H elim (after_inv_length … H) -H //
-qed.
-
-lemma after_isid_dx: ∀cs1,cs2. cs1 ⊚ cs2 ≡ cs1 → 𝐈⦃cs2⦄ .
-#cs1 #cs2 #H elim (after_inv_length … H) -H //
-qed.
-
-(* Inversion lemmas on composition ******************************************)
-
-lemma after_isid_inv_sn: ∀cs1,cs2,cs. cs1 ⊚ cs2 ≡ cs → 𝐈⦃cs1⦄ → cs = cs2.
-#cs1 #cs2 #cs #H elim H -cs1 -cs2 -cs //
-#cs1 #cs2 #cs #_ [ #b ] #IH #H
-[ >IH -IH // | elim (isid_inv_false … H) ]
-qed-.
-
-lemma after_isid_inv_dx: ∀cs1,cs2,cs. cs1 ⊚ cs2 ≡ cs → 𝐈⦃cs2⦄ → cs = cs1.
-#cs1 #cs2 #cs #H elim H -cs1 -cs2 -cs //
-#cs1 #cs2 #cs #_ [ #b ] #IH #H
-[ elim (isid_inv_cons … H) -H #H >IH -IH // | >IH -IH // ]
-qed-.
-
-lemma after_inv_isid3: ∀t1,t2,t. t1 ⊚ t2 ≡ t → 𝐈⦃t⦄ → 𝐈⦃t1⦄ ∧ 𝐈⦃t2⦄.
-#t1 #t2 #t #H elim H -t1 -t2 -t
-[ /2 width=1 by conj/
-| #t1 #t2 #t #_ #b #IHt #H elim (isid_inv_cons … H) -H
- #Ht #H elim (IHt Ht) -t /2 width=1 by isid_true, conj/
-| #t1 #t2 #t #_ #_ #H elim (isid_inv_false … H)
-]
-qed-.
-
-(* Forward on inclusion *****************************************************)
-
-lemma sle_isid1_fwd: ∀t1,t2. t1 ⊆ t2 → 𝐈⦃t1⦄ → t1 = t2.
-#t1 #t2 #H elim H -t1 -t2 //
-[ #t1 #t2 #_ #IH #H lapply (isid_inv_true … H) -H
- #HT1 @eq_f2 // @IH @HT1 (**) (* full auto fails *)
-| #t1 #t2 #b #_ #_ #H elim (isid_inv_false … H)
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/isuniform_1.ma".
-include "ground_2/relocation/trace_isid.ma".
-
-(* RELOCATION TRACE *********************************************************)
-
-inductive isun: predicate trace ≝
-| isun_id : ∀t. 𝐈⦃t⦄ → isun t
-| isun_false: ∀t. isun t → isun (Ⓕ@t)
-.
-
-interpretation "test for uniformity (trace)"
- 'IsUniform t = (isun t).
-
-(* Basic inversion lennas ***************************************************)
-
-fact isun_inv_true_aux: ∀t. 𝐔⦃t⦄ → ∀u. t = Ⓣ@u → 𝐈⦃u⦄.
-#t * -t
-[ #t #Ht #u #H destruct /2 width=1 by isid_inv_true/
-| #t #_ #u #H destruct
-]
-qed-.
-
-lemma isun_inv_true: ∀t. 𝐔⦃Ⓣ@t⦄ → 𝐈⦃t⦄.
-/2 width=3 by isun_inv_true_aux/ qed-.
-
-fact isun_inv_false_aux: ∀t. 𝐔⦃t⦄ → ∀u. t = Ⓕ@u → 𝐔⦃u⦄.
-#t * -t
-[ #t #Ht #u #H destruct elim (isid_inv_false … Ht)
-| #t #Ht #u #H destruct //
-]
-qed-.
-
-lemma isun_inv_false: ∀t. 𝐔⦃Ⓕ@t⦄ → 𝐔⦃t⦄.
-/2 width=3 by isun_inv_false_aux/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/relocation/trace_at.ma".
-
-(* RELOCATION TRACE *********************************************************)
-
-inductive sle: relation trace ≝
-| sle_empty: sle (◊) (◊)
-| sle_true : ∀t1,t2. sle t1 t2 → sle (Ⓣ @ t1) (Ⓣ @ t2)
-| sle_false: ∀t1,t2,b. sle t1 t2 → sle (Ⓕ @ t1) (b @ t2)
-.
-
-interpretation
- "inclusion (trace)"
- 'subseteq t1 t2 = (sle t1 t2).
-
-(* Basic properties *********************************************************)
-
-(* Basic forward lemmas *****************************************************)
-
-lemma sle_fwd_length: ∀t1,t2. t1 ⊆ t2 → |t1| = |t2|.
-#t1 #t2 #H elim H -t1 -t2 //
-qed-.
-
-lemma sle_fwd_colength: ∀t1,t2. t1 ⊆ t2 → ∥t1∥ ≤ ∥t2∥.
-#t1 #t2 #H elim H -t1 -t2 /2 width=1 by le_S_S/
-#t1 #t2 * /2 width=1 by le_S/
-qed-.
-
-(* Inversion lemmas on application ******************************************)
-
-lemma sle_inv_at: ∀t1,t2. t1 ⊆ t2 →
- ∀i,i1,i2. @⦃i, t1⦄ ≡ i1 → @⦃i, t2⦄ ≡ i2 → i2 ≤ i1.
-#t1 #t2 #H elim H -t1 -t2
-[ #i #i1 #i2 #_ #H2 elim (at_inv_empty … H2) -H2 //
-| #t1 #t2 #_ #IH #i #i1 #i2 #H0 #H2 elim (at_inv_true … H2) -H2 * //
- #j1 #j2 #H1 #H2 #Hj destruct elim (at_inv_true_succ_sn … H0) -H0
- /3 width=3 by le_S_S/
-| #t1 #t2 * #_ #IH #i #i1 #i2 #H0 #H2
- [ elim (at_inv_true … H2) -H2 * //
- #j #j2 #H1 #H2 #Hj2 destruct elim (at_inv_false … H0) -H0
- #j1 #H #Hj1 destruct elim (at_monotonic … Hj1 j) -Hj1 //
- #x #H1x #H2x @le_S_S /4 width=3 by lt_to_le, le_to_lt_to_lt/ (**) (* full auto too slow *)
- | elim (at_inv_false … H2) elim (at_inv_false … H0) -H0 -H2
- /3 width=3 by le_S_S/
- ]
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/functions/complement_1.ma".
-include "ground_2/relocation/trace.ma".
-
-(* RELOCATION TRACE *********************************************************)
-
-let rec snot (t:trace) on t ≝ match t with
-[ nil ⇒ ◊
-| cons b t ⇒ (¬ b) @ snot t
-].
-
-interpretation
- "complement (trace)"
- 'Complement t = (snot t).
-
-(* Basic properties *********************************************************)
-
-lemma snot_empty: ∁ (◊) = ◊.
-// qed.
-
-lemma snot_inh: ∀t,b. ∁ (b@t) = (¬ b) @ ∁ t.
-// qed.
-
-lemma snot_true: ∀t. ∁ (Ⓣ @ t) = Ⓕ @ ∁ t.
-// qed.
-
-lemma snot_false: ∀t. ∁ (Ⓕ @ t) = Ⓣ @ ∁ t.
-// qed.
-
-lemma snot_length: ∀t. |∁ t| = |t|.
-#t elim t -t normalize //
-qed.
-
-lemma snot_colength: ∀t. ∥∁ t∥ = |t| - ∥t∥.
-#t elim t -t //
-* /2 width=1 by minus_Sn_m/
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/runion_3.ma".
-include "ground_2/relocation/trace_isid.ma".
-
-(* RELOCATION TRACE *********************************************************)
-
-inductive sor: relation3 trace trace trace ≝
- | sor_empty: sor (◊) (◊) (◊)
- | sor_inh : ∀cs1,cs2,cs. sor cs1 cs2 cs →
- ∀b1,b2. sor (b1 @ cs1) (b2 @ cs2) ((b1 ∨ b2) @ cs).
-
-interpretation
- "union (trace)"
- 'RUnion L1 L2 L = (sor L2 L1 L).
-
-(* Basic properties *********************************************************)
-
-lemma sor_length: ∀cs1,cs2. |cs1| = |cs2| →
- ∃∃cs. cs2 ⋓ cs1 ≡ cs & |cs| = |cs1| & |cs| = |cs2|.
-#cs1 elim cs1 -cs1
-[ #cs2 #H >(length_inv_zero_sn … H) -H /2 width=4 by sor_empty, ex3_intro/
-| #b1 #cs1 #IH #x #H elim (length_inv_succ_sn … H) -H
- #cs2 #b2 #H12 #H destruct elim (IH … H12) -IH -H12
- #cs #H12 #H1 #H2 @(ex3_intro … ((b1 ∨ b2) @ cs)) /2 width=1 by sor_inh/ (**) (* explicit constructor *)
-]
-qed-.
-
-lemma sor_sym: ∀cs1,cs2,cs. cs1 ⋓ cs2 ≡ cs → cs2 ⋓ cs1 ≡ cs.
-#cs1 #cs2 #cs #H elim H -cs1 -cs2 -cs /2 width=1 by sor_inh/
-qed-.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma sor_inv_length: ∀cs1,cs2,cs. cs2 ⋓ cs1 ≡ cs →
- ∧∧ |cs1| = |cs2| & |cs| = |cs1| & |cs| = |cs2|.
-#cs1 #cs2 #cs #H elim H -cs1 -cs2 -cs /2 width=1 by and3_intro/
-#cs1 #cs2 #cs #_ #b1 #b2 * /2 width=1 by and3_intro/
-qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-lemma sor_fwd_isid_sn: ∀cs1,cs2,cs. cs1 ⋓ cs2 ≡ cs → 𝐈⦃cs1⦄ → 𝐈⦃cs⦄.
-#cs1 #cs2 #cs #H elim H -cs1 -cs2 -cs //
-#cs1 #cs2 #cs #_ #b1 #b2 #IH #H elim (isid_inv_cons … H) -H
-/3 width=1 by isid_true/
-qed-.
-
-lemma sor_fwd_isid_dx: ∀cs1,cs2,cs. cs1 ⋓ cs2 ≡ cs → 𝐈⦃cs2⦄ → 𝐈⦃cs⦄.
-/3 width=4 by sor_fwd_isid_sn, sor_sym/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( x ⊞ break term 46 y1 ⊟ break term 46 y2 ≡ break term 46 z )"
- non associative with precedence 45
- for @{ 'RPlusMinus $x $y1 $y2 $z }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/ynat/ynat_plus.ma".
-
-(* NATURAL NUMBERS WITH INFINITY ********************************************)
-
-lemma ymax_pre_dx: ∀x,y. x ≤ y → x - y + y = y.
-#x #y * -x -y //
-#x #y #Hxy >yminus_inj >(eq_minus_O … Hxy) -Hxy //
-qed-.
-
-lemma ymax_pre_sn: ∀x,y. y ≤ x → x - y + y = x.
-#x #y * -x -y
-[ #x #y #Hxy >yminus_inj /3 width=3 by plus_minus, eq_f/
-| * //
-]
-qed-.
-
-lemma ymax_pre_i_dx: ∀y,x. y ≤ x - y + y.
-// qed.
-
-lemma ymax_pre_i_sn: ∀y,x. x ≤ x - y + y.
-* // #y * /2 width=1 by yle_inj/
-qed.
-
-lemma ymax_pre_e: ∀x,z. x ≤ z → ∀y. y ≤ z → x - y + y ≤ z.
-#x #z #Hxz #y #Hyz elim (yle_split x y)
-[ #Hxy >(ymax_pre_dx … Hxy) -x //
-| #Hyx >(ymax_pre_sn … Hyx) -y //
-]
-qed.
-
-lemma ymax_pre_dx_comm: ∀x,y. x ≤ y → y + (x - y) = y.
-/2 width=1 by ymax_pre_dx/ qed-.
-
-lemma ymax_pre_sn_comm: ∀x,y. y ≤ x → y + (x - y) = x.
-/2 width=1 by ymax_pre_sn/ qed-.
-
-lemma ymax_pre_i_dx_comm: ∀y,x. y ≤ y + (x - y).
-// qed.
-
-lemma ymax_pre_i_sn_comm: ∀y,x. x ≤ y + (x - y).
-/2 width=1 by ymax_pre_i_sn/ qed.
-
-lemma ymax_pre_e_comm: ∀x,z. x ≤ z → ∀y. y ≤ z → y + (x - y) ≤ z.
-/2 width=1 by ymax_pre_e/ qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/ynat/ynat_plus.ma".
-
-(* NATURAL NUMBERS WITH INFINITY ********************************************)
-
-fact ymin_pre_dx_aux: ∀x,y. y ≤ x → x - (x - y) ≤ y.
-#x #y * -x -y
-[ #x #y #Hxy >yminus_inj
- /3 width=4 by yle_inj, monotonic_le_minus_l/
-| * //
-]
-qed-.
-
-lemma ymin_pre_sn: ∀x,y. x ≤ y → x - (x - y) = x.
-#x #y * -x -y //
-#x #y #Hxy >yminus_inj >(eq_minus_O … Hxy) -Hxy //
-qed-.
-
-lemma ymin_pre_i_dx: ∀x,y. x - (x - y) ≤ y.
-#x #y elim (yle_split x y) /2 width=1 by ymin_pre_dx_aux/
-#Hxy >(ymin_pre_sn … Hxy) //
-qed.
-
-lemma ymin_pre_i_sn: ∀x,y. x - (x - y) ≤ x.
-// qed.
-
-lemma ymin_pre_dx: ∀x,y. y ≤ yinj x → yinj x - (yinj x - y) = y.
-#x #y #H elim (yle_inv_inj2 … H) -H
-#z #Hzx #H destruct >yminus_inj
-/3 width=4 by minus_le_minus_minus_comm, eq_f/
-qed-.
-
-lemma ymin_pre_e: ∀z,x. z ≤ yinj x → ∀y. z ≤ y →
- z ≤ yinj x - (yinj x - y).
-#z #x #Hzx #y #Hzy elim (yle_split x y)
-[ #H >(ymin_pre_sn … H) -y //
-| #H >(ymin_pre_dx … H) -x //
-]
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/ynat/ynat_lt.ma".
-
-(* NATURAL NUMBERS WITH INFINITY ********************************************)
-
-(* subtraction *)
-definition yminus: ynat → ynat → ynat ≝ λx,y. match y with
-[ yinj n ⇒ ypred^n x
-| Y ⇒ yinj 0
-].
-
-interpretation "ynat minus" 'minus x y = (yminus x y).
-
-lemma yminus_O2: ∀m:ynat. m - 0 = m.
-// qed.
-
-lemma yminus_S2: ∀m:ynat. ∀n:nat. m - S n = ⫰(m - n).
-// qed.
-
-lemma yminus_Y2: ∀m. m - (∞) = 0.
-// qed.
-
-(* Basic properties *********************************************************)
-
-lemma yminus_inj: ∀m,n. yinj m - yinj n = yinj (m - n).
-#m #n elim n -n //
-#n #IH >yminus_S2 >IH -IH >eq_minus_S_pred //
-qed.
-
-lemma yminus_Y_inj: ∀n. ∞ - yinj n = ∞.
-#n elim n -n //
-qed.
-
-lemma yminus_O1: ∀x:ynat. 0 - x = 0.
-* // qed.
-
-lemma yminus_refl: ∀x:ynat. x - x = 0.
-* // qed.
-
-lemma yminus_minus_comm: ∀y,z,x. x - y - z = x - z - y.
-* #y [ * #z [ * // ] ] >yminus_O1 //
-qed.
-
-(* Properties on predecessor ************************************************)
-
-lemma yminus_SO2: ∀m. m - 1 = ⫰m.
-* //
-qed.
-
-lemma yminus_pred1: ∀x,y. ⫰x - y = ⫰(x-y).
-#x * // #y elim y -y //
-qed.
-
-lemma yminus_pred: ∀n,m. 0 < m → 0 < n → ⫰m - ⫰n = m - n.
-* // #n *
-[ #m #Hm #Hn >yminus_inj >yminus_inj
- /4 width=1 by ylt_inv_inj, minus_pred_pred, eq_f/
-| >yminus_Y_inj //
-]
-qed-.
-
-(* Properties on successor **************************************************)
-
-lemma yminus_succ: ∀n,m. ⫯m - ⫯n = m - n.
-* // qed.
-
-lemma yminus_succ1_inj: ∀n:nat. ∀m:ynat. n ≤ m → ⫯m - n = ⫯(m - n).
-#n *
-[ #m #Hmn >yminus_inj >yminus_inj
- /4 width=1 by yle_inv_inj, plus_minus, eq_f/
-| >yminus_Y_inj //
-]
-qed-.
-
-lemma yminus_succ2: ∀y,x. x - ⫯y = ⫰(x-y).
-* //
-qed.
-
-(* Properties on order ******************************************************)
-
-lemma yle_minus_sn: ∀n,m. m - n ≤ m.
-* // #n * /2 width=1 by yle_inj/
-qed.
-
-lemma yle_to_minus: ∀m:ynat. ∀n:ynat. m ≤ n → m - n = 0.
-#m #n * -m -n /3 width=3 by eq_minus_O, eq_f/
-qed-.
-
-lemma yminus_to_le: ∀n:ynat. ∀m:ynat. m - n = 0 → m ≤ n.
-* // #n *
-[ #m >yminus_inj #H lapply (yinj_inj … H) -H (**) (* destruct lemma needed *)
- /2 width=1 by yle_inj/
-| >yminus_Y_inj #H destruct
-]
-qed.
-
-lemma monotonic_yle_minus_dx: ∀x,y. x ≤ y → ∀z. x - z ≤ y - z.
-#x #y #Hxy * //
-#z elim z -z /3 width=1 by yle_pred/
-qed.
-
-(* Properties on strict order ***********************************************)
-
-lemma ylt_to_minus: ∀x,y:ynat. x < y → 0 < y - x.
-#x #y #H elim H -x -y /3 width=1 by ylt_inj, lt_plus_to_minus_r/
-qed.
-
-lemma yminus_to_lt: ∀x,y:ynat. 0 < y - x → x < y.
-* [2: #y #H elim (ylt_yle_false … H) // ]
-#m * /4 width=1 by ylt_inv_inj, ylt_inj, lt_minus_to_plus_r/
-qed-.
-
-lemma monotonic_ylt_minus_dx: ∀x,y:ynat. x < y → ∀z:nat. z ≤ x → x - z < y - z.
-#x #y * -x -y
-/4 width=1 by ylt_inj, yle_inv_inj, monotonic_lt_minus_l/
-qed.
-
-(* Properties on minus ******************************************************)
-
-lemma yplus_minus_inj: ∀m:ynat. ∀n:nat. m + n - n = m.
-#m #n elim n -n //
-#n #IHn >(yplus_succ2 m n) >(yminus_succ … n) //
-qed.
-
-lemma yplus_minus: ∀m,n. m + n - n ≤ m.
-#m * //
-qed.
-
-lemma yminus_plus2: ∀z,y,x:ynat. x - (y + z) = x - y - z.
-* // #z * [2: >yplus_Y1 >yminus_O1 // ] #y *
-[ #x >yplus_inj >yminus_inj >yminus_inj >yminus_inj /2 width=1 by eq_f/
-| >yplus_inj >yminus_Y_inj //
-]
-qed.
-
-(* Forward lemmas on minus **************************************************)
-
-lemma yle_plus1_to_minus_inj2: ∀x,z:ynat. ∀y:nat. x + y ≤ z → x ≤ z - y.
-#x #z #y #H lapply (monotonic_yle_minus_dx … H y) -H //
-qed-.
-
-lemma yle_plus1_to_minus_inj1: ∀x,z:ynat. ∀y:nat. y + x ≤ z → x ≤ z - y.
-/2 width=1 by yle_plus1_to_minus_inj2/ qed-.
-
-lemma yle_plus2_to_minus_inj2: ∀x,y:ynat. ∀z:nat. x ≤ y + z → x - z ≤ y.
-/2 width=1 by monotonic_yle_minus_dx/ qed-.
-
-lemma yle_plus2_to_minus_inj1: ∀x,y:ynat. ∀z:nat. x ≤ z + y → x - z ≤ y.
-/2 width=1 by yle_plus2_to_minus_inj2/ qed-.
-
-lemma yplus_minus_assoc_inj: ∀x:nat. ∀y,z:ynat. x ≤ y → z + (y - x) = z + y - x.
-#x *
-[ #y * // #z >yminus_inj >yplus_inj >yplus_inj
- /4 width=1 by yle_inv_inj, plus_minus, eq_f/
-| >yminus_Y_inj //
-]
-qed-.
-
-lemma yplus_minus_assoc_comm_inj: ∀x:nat. ∀y,z:ynat. x ≤ y → z - (y - x) = z + x - y.
-#x *
-[ #y *
- [ #z >yminus_inj >yminus_inj >yplus_inj >yminus_inj
- /4 width=1 by yle_inv_inj, minus_le_minus_minus_comm, eq_f/
- | >yminus_inj >yminus_Y_inj //
- ]
-| >yminus_Y_inj //
-]
-qed-.
-
-lemma yplus_minus_comm_inj: ∀y:nat. ∀x,z:ynat. y ≤ x → x + z - y = x - y + z.
-#y * // #x * //
-#z #Hxy >yplus_inj >yminus_inj <plus_minus
-/2 width=1 by yle_inv_inj/
-qed-.
-
-lemma ylt_plus1_to_minus_inj2: ∀x,z:ynat. ∀y:nat. x + y < z → x < z - y.
-#x #z #y #H lapply (monotonic_ylt_minus_dx … H y ?) -H //
-qed-.
-
-lemma ylt_plus1_to_minus_inj1: ∀x,z:ynat. ∀y:nat. y + x < z → x < z - y.
-/2 width=1 by ylt_plus1_to_minus_inj2/ qed-.
-
-lemma ylt_plus2_to_minus_inj2: ∀x,y:ynat. ∀z:nat. z ≤ x → x < y + z → x - z < y.
-/2 width=1 by monotonic_ylt_minus_dx/ qed-.
-
-lemma ylt_plus2_to_minus_inj1: ∀x,y:ynat. ∀z:nat. z ≤ x → x < z + y → x - z < y.
-/2 width=1 by ylt_plus2_to_minus_inj2/ qed-.
-
-lemma yplus_inv_minus: ∀x1,y1. y1 ≤ yinj x1 →
- ∀x2,y2. yinj x1 + x2 = yinj y2 + y1 →
- yinj x1 - y1 = yinj y2 - x2 ∧ x2 ≤ yinj y2.
-#x1 #y1 #Hyx1 #x2 #y2 #H0
-lapply (yle_fwd_plus_ge_inj … x2 y2 Hyx1 ?) // #Hxy2
-elim (yle_inv_inj2 … Hyx1) -Hyx1 #m #Hyx1 #H destruct
-elim (yle_inv_inj2 … Hxy2) #n #H1 #H destruct
->yplus_inj in H0; >yplus_inj >yminus_inj >yminus_inj #H0
-@conj // lapply (yinj_inj … H0) -H0 /3 width=1 by arith_b1, eq_f/
-qed-.
-
-(* Inversion lemmas on minus ************************************************)
-
-lemma yle_inv_plus_inj2: ∀x,z:ynat. ∀y:nat. x + y ≤ z → x ≤ z - y ∧ y ≤ z.
-/3 width=3 by yle_plus1_to_minus_inj2, yle_trans, conj/ qed-.
-
-lemma yle_inv_plus_inj1: ∀x,z:ynat. ∀y:nat. y + x ≤ z → x ≤ z - y ∧ y ≤ z.
-/2 width=1 by yle_inv_plus_inj2/ qed-.
-
-lemma yle_inv_plus_inj_dx: ∀x,y:ynat. ∀z:nat. x + y ≤ z →
- ∃∃m,n. x = yinj m & y = yinj n & x ≤ z - y & y ≤ z.
-#x #y #z #Hz elim (yle_inv_inj2 … Hz)
-#z0 #_ #H elim (yplus_inv_inj … H) -H
-#m #n #H1 #H2 #H3 destruct
-elim (yle_inv_plus_inj2 … Hz) -Hz /2 width=2 by ex4_2_intro/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/ynat/ynat_plus.ma".
-
-(* NATURAL NUMBERS WITH INFINITY ********************************************)
-
-(* right subtraction *)
-definition yminus_dx: nat → ynat → nat ≝ λx,y. match y with
-[ yinj n ⇒ x-n
-| Y ⇒ 0
-].
-
-interpretation "ynat right minus" 'minus x y = (yminus_dx x y).
-
-lemma yminus_dx_inj (m) (n): m - yinj n = m - n.
-// qed.
-
-lemma yminus_dx_Y2: ∀m. m - (∞) = 0.
-// qed.
-
-lemma yminus_dx_succ_bi (n:ynat) (m): ↑m - ↑n = m - n.
-* // qed.
-
-lemma yminus_dx_S2: ∀n:ynat. ∀m. m - ↑n = ↓(m - n).
-* // qed.
-
-lemma yplus_minus_dx (x) (y): x ≤ yinj y → yinj y = x + yinj (y-x).
-* [ #x #y #H >yplus_inj /4 width=1 by yle_inv_inj, minus_to_plus, eq_f/ ]
-#y #H lapply (yle_inv_Y1 … H) -H #H destruct
-qed-.
-
-(*
-
-
-(* Basic properties *********************************************************)
-
-lemma yminus_inj: ∀m,n. yinj m - yinj n = yinj (m - n).
-#m #n elim n -n //
-#n #IH >yminus_S2 >IH -IH >eq_minus_S_pred //
-qed.
-
-lemma yminus_Y_inj: ∀n. ∞ - yinj n = ∞.
-#n elim n -n //
-qed.
-
-lemma yminus_O1: ∀x:ynat. 0 - x = 0.
-* // qed.
-
-lemma yminus_refl: ∀x:ynat. x - x = 0.
-* // qed.
-
-lemma yminus_minus_comm: ∀y,z,x. x - y - z = x - z - y.
-* #y [ * #z [ * // ] ] >yminus_O1 //
-qed.
-
-(* Properties on predecessor ************************************************)
-
-lemma yminus_SO2: ∀m. m - 1 = ⫰m.
-* //
-qed.
-
-lemma yminus_pred1: ∀x,y. ⫰x - y = ⫰(x-y).
-#x * // #y elim y -y //
-qed.
-
-lemma yminus_pred: ∀n,m. 0 < m → 0 < n → ⫰m - ⫰n = m - n.
-* // #n *
-[ #m #Hm #Hn >yminus_inj >yminus_inj
- /4 width=1 by ylt_inv_inj, minus_pred_pred, eq_f/
-| >yminus_Y_inj //
-]
-qed-.
-
-(* Properties on successor **************************************************)
-
-lemma yminus_succ1_inj: ∀n:nat. ∀m:ynat. n ≤ m → ⫯m - n = ⫯(m - n).
-#n *
-[ #m #Hmn >yminus_inj >yminus_inj
- /4 width=1 by yle_inv_inj, plus_minus, eq_f/
-| >yminus_Y_inj //
-]
-qed-.
-
-lemma yminus_succ2: ∀y,x. x - ⫯y = ⫰(x-y).
-* //
-qed.
-
-(* Properties on order ******************************************************)
-
-lemma yle_minus_sn: ∀n,m. m - n ≤ m.
-* // #n * /2 width=1 by yle_inj/
-qed.
-
-lemma yle_to_minus: ∀m:ynat. ∀n:ynat. m ≤ n → m - n = 0.
-#m #n * -m -n /3 width=3 by eq_minus_O, eq_f/
-qed-.
-
-lemma yminus_to_le: ∀n:ynat. ∀m:ynat. m - n = 0 → m ≤ n.
-* // #n *
-[ #m >yminus_inj #H lapply (yinj_inj … H) -H (**) (* destruct lemma needed *)
- /2 width=1 by yle_inj/
-| >yminus_Y_inj #H destruct
-]
-qed.
-
-lemma monotonic_yle_minus_dx: ∀x,y. x ≤ y → ∀z. x - z ≤ y - z.
-#x #y #Hxy * //
-#z elim z -z /3 width=1 by yle_pred/
-qed.
-
-(* Properties on strict order ***********************************************)
-
-lemma ylt_to_minus: ∀x,y:ynat. x < y → 0 < y - x.
-#x #y #H elim H -x -y /3 width=1 by ylt_inj, lt_plus_to_minus_r/
-qed.
-
-lemma yminus_to_lt: ∀x,y:ynat. 0 < y - x → x < y.
-* [2: #y #H elim (ylt_yle_false … H) // ]
-#m * /4 width=1 by ylt_inv_inj, ylt_inj, lt_minus_to_plus_r/
-qed-.
-
-lemma monotonic_ylt_minus_dx: ∀x,y:ynat. x < y → ∀z:nat. z ≤ x → x - z < y - z.
-#x #y * -x -y
-/4 width=1 by ylt_inj, yle_inv_inj, monotonic_lt_minus_l/
-qed.
-
-(* Properties on minus ******************************************************)
-
-lemma yplus_minus_inj: ∀m:ynat. ∀n:nat. m + n - n = m.
-#m #n elim n -n //
-#n #IHn >(yplus_succ2 m n) >(yminus_succ … n) //
-qed.
-
-lemma yplus_minus: ∀m,n. m + n - n ≤ m.
-#m * //
-qed.
-
-lemma yminus_plus2: ∀z,y,x:ynat. x - (y + z) = x - y - z.
-* // #z * [2: >yplus_Y1 >yminus_O1 // ] #y *
-[ #x >yplus_inj >yminus_inj >yminus_inj >yminus_inj /2 width=1 by eq_f/
-| >yplus_inj >yminus_Y_inj //
-]
-qed.
-
-(* Forward lemmas on minus **************************************************)
-
-lemma yle_plus1_to_minus_inj2: ∀x,z:ynat. ∀y:nat. x + y ≤ z → x ≤ z - y.
-#x #z #y #H lapply (monotonic_yle_minus_dx … H y) -H //
-qed-.
-
-lemma yle_plus1_to_minus_inj1: ∀x,z:ynat. ∀y:nat. y + x ≤ z → x ≤ z - y.
-/2 width=1 by yle_plus1_to_minus_inj2/ qed-.
-
-lemma yle_plus2_to_minus_inj2: ∀x,y:ynat. ∀z:nat. x ≤ y + z → x - z ≤ y.
-/2 width=1 by monotonic_yle_minus_dx/ qed-.
-
-lemma yle_plus2_to_minus_inj1: ∀x,y:ynat. ∀z:nat. x ≤ z + y → x - z ≤ y.
-/2 width=1 by yle_plus2_to_minus_inj2/ qed-.
-
-lemma yplus_minus_assoc_inj: ∀x:nat. ∀y,z:ynat. x ≤ y → z + (y - x) = z + y - x.
-#x *
-[ #y * // #z >yminus_inj >yplus_inj >yplus_inj
- /4 width=1 by yle_inv_inj, plus_minus, eq_f/
-| >yminus_Y_inj //
-]
-qed-.
-
-lemma yplus_minus_assoc_comm_inj: ∀x:nat. ∀y,z:ynat. x ≤ y → z - (y - x) = z + x - y.
-#x *
-[ #y *
- [ #z >yminus_inj >yminus_inj >yplus_inj >yminus_inj
- /4 width=1 by yle_inv_inj, minus_le_minus_minus_comm, eq_f/
- | >yminus_inj >yminus_Y_inj //
- ]
-| >yminus_Y_inj //
-]
-qed-.
-
-lemma yplus_minus_comm_inj: ∀y:nat. ∀x,z:ynat. y ≤ x → x + z - y = x - y + z.
-#y * // #x * //
-#z #Hxy >yplus_inj >yminus_inj <plus_minus
-/2 width=1 by yle_inv_inj/
-qed-.
-
-lemma ylt_plus1_to_minus_inj2: ∀x,z:ynat. ∀y:nat. x + y < z → x < z - y.
-#x #z #y #H lapply (monotonic_ylt_minus_dx … H y ?) -H //
-qed-.
-
-lemma ylt_plus1_to_minus_inj1: ∀x,z:ynat. ∀y:nat. y + x < z → x < z - y.
-/2 width=1 by ylt_plus1_to_minus_inj2/ qed-.
-
-lemma ylt_plus2_to_minus_inj2: ∀x,y:ynat. ∀z:nat. z ≤ x → x < y + z → x - z < y.
-/2 width=1 by monotonic_ylt_minus_dx/ qed-.
-
-lemma ylt_plus2_to_minus_inj1: ∀x,y:ynat. ∀z:nat. z ≤ x → x < z + y → x - z < y.
-/2 width=1 by ylt_plus2_to_minus_inj2/ qed-.
-
-lemma yplus_inv_minus: ∀x1,y1. y1 ≤ yinj x1 →
- ∀x2,y2. yinj x1 + x2 = yinj y2 + y1 →
- yinj x1 - y1 = yinj y2 - x2 ∧ x2 ≤ yinj y2.
-#x1 #y1 #Hyx1 #x2 #y2 #H0
-lapply (yle_fwd_plus_ge_inj … x2 y2 Hyx1 ?) // #Hxy2
-elim (yle_inv_inj2 … Hyx1) -Hyx1 #m #Hyx1 #H destruct
-elim (yle_inv_inj2 … Hxy2) #n #H1 #H destruct
->yplus_inj in H0; >yplus_inj >yminus_inj >yminus_inj #H0
-@conj // lapply (yinj_inj … H0) -H0 /3 width=1 by arith_b1, eq_f/
-qed-.
-
-(* Inversion lemmas on minus ************************************************)
-
-lemma yle_inv_plus_inj2: ∀x,z:ynat. ∀y:nat. x + y ≤ z → x ≤ z - y ∧ y ≤ z.
-/3 width=3 by yle_plus1_to_minus_inj2, yle_trans, conj/ qed-.
-
-lemma yle_inv_plus_inj1: ∀x,z:ynat. ∀y:nat. y + x ≤ z → x ≤ z - y ∧ y ≤ z.
-/2 width=1 by yle_inv_plus_inj2/ qed-.
-
-lemma yle_inv_plus_inj_dx: ∀x,y:ynat. ∀z:nat. x + y ≤ z →
- ∃∃m,n. x = yinj m & y = yinj n & x ≤ z - y & y ≤ z.
-#x #y #z #Hz elim (yle_inv_inj2 … Hz)
-#z0 #_ #H elim (yplus_inv_inj … H) -H
-#m #n #H1 #H2 #H3 destruct
-elim (yle_inv_plus_inj2 … Hz) -Hz /2 width=2 by ex4_2_intro/
-qed-.
-*)
+++ /dev/null
-
-lemma pippo: ∀x,y. x + y ≤ x → x = ∞ ∨ y = 0.
-/3 width=1 by discr_yplus_xy_x, yle_antisym/ qed-.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/rplusminus_4.ma".
-include "ground_2/ynat/ynat_plus.ma".
-
-(* NATURAL NUMBERS WITH INFINITY ********************************************)
-
-(* algebraic x + y1 - y2 = z *)
-inductive yrpm (x:ynat) (y1:ynat) (y2:ynat): predicate ynat ≝
-| yrpm_ge: y2 ≤ y1 → yrpm x y1 y2 (x + (y1 - y2))
-| yrpm_lt: y1 < y2 → yrpm x y1 y2 (x - (y2 - y1))
-.
-
-interpretation "ynat 'algebraic plus-minus' (relational)"
- 'RPlusMinus x y1 y2 z = (yrpm x y1 y2 z).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma ypm_inv_ge: ∀x,y1,y2,z. x ⊞ y1 ⊟ y2 ≡ z →
- y2 ≤ y1 → z = x + (y1 - y2).
-#x #y1 #y2 #z * -z //
-#Hy12 #H elim (ylt_yle_false … H) -H //
-qed-.
-
-lemma ypm_inv_lt: ∀x,y1,y2,z. x ⊞ y1 ⊟ y2 ≡ z →
- y1 < y2 → z = x - (y2 - y1).
-#x #y1 #y2 #z * -z //
-#Hy21 #H elim (ylt_yle_false … H) -H //
-qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma ypm_inv_le: ∀x,y1,y2,z. x ⊞ y1 ⊟ y2 ≡ z →
- y1 ≤ y2 → z = x - (y2 - y1).
-#x #y1 #y2 #z #H #Hy12 elim (yle_split_eq … Hy12) -Hy12 #Hy12
-[ /2 width=1 by ypm_inv_lt/
-| >(ypm_inv_ge … H) -H // destruct >yminus_refl //
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "arithmetics/nat.ma".
-
-(* INFINITARY NATURAL NUMBERS ***********************************************)
-
-(* the type of infinitary natural numbers *)
-coinductive ynat: Type[0] ≝
-| YO: ynat
-| YS: ynat → ynat
-.
-
-interpretation "ynat successor" 'Successor m = (YS m).
-
-(* the coercion of nat to ynat *)
-let rec ynat_of_nat n ≝ match n with
-[ O ⇒ YO
-| S m ⇒ YS (ynat_of_nat m)
-].
-
-coercion ynat_of_nat.
-
-(* the infinity *)
-let corec Y : ynat ≝ ⫯Y.
-
-interpretation "ynat infinity" 'Infinity = Y.
-
-(* destructing identity on ynat *)
-definition yid: ynat → ynat ≝ λm. match m with
-[ YO ⇒ 0
-| YS n ⇒ ⫯n
-].
-
-(* Properties ***************************************************************)
-
-fact yid_rew: ∀n. yid n = n.
-* // qed-.
-
-lemma Y_rew: ⫯∞ = ∞.
-<(yid_rew ∞) in ⊢ (???%); //
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation.ma".
-include "ground_2/xoa_props.ma".
-include "ground_2/ynat/ynat.ma".
-
-(* INFINITARY NATURAL NUMBERS ***********************************************)
-
-(* "is_zero" predicate *)
-definition yzero: predicate ynat ≝ λx. match x with
-[ YO ⇒ ⊤
-| YS _ ⇒ ⊥
-].
-
-(* Inversion lemmas *********************************************************)
-
-lemma discr_YS_YO: ∀n. ⫯n = 0 → ⊥.
-#n #H change with (yzero (⫯n))
->H -H //
-qed-.
-
-lemma discr_YO_YS: ∀n. ynat_of_nat 0 = ⫯n → ⊥. (**) (* explicit coercion *)
-/2 width=2 by discr_YS_YO/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/star.ma".
-include "ground_2/ynat/ynat_iszero.ma".
-include "ground_2/ynat/ynat_pred.ma".
-
-(* INFINITARY NATURAL NUMBERS ***********************************************)
-
-(* order relation *)
-coinductive yle: relation ynat ≝
-| yle_O: ∀n. yle 0 n
-| yle_S: ∀m,n. yle m n → yle (⫯m) (⫯n)
-.
-
-interpretation "natural 'less or equal to'" 'leq x y = (yle x y).
-
-(* Inversion lemmas *********************************************************)
-
-fact yle_inv_O2_aux: ∀m,x. m ≤ x → x = 0 → m = 0.
-#m #x * -m -x //
-#m #x #_ #H elim (discr_YS_YO … H) (**) (* destructing lemma needed *)
-qed-.
-
-lemma yle_inv_O2: ∀m. m ≤ 0 → m = 0.
-/2 width =3 by yle_inv_O2_aux/ qed-.
-
-fact yle_inv_S1_aux: ∀x,y. x ≤ y → ∀m. x = ⫯m → ∃∃n. m ≤ n & y = ⫯n.
-#x #y * -x -y
-[ #y #m #H elim (discr_YO_YS … H) (**) (* destructing lemma needed *)
-| #x #y #Hxy #m #H destruct /2 width=3 by ex2_intro/
-]
-qed-.
-
-lemma yle_inv_S1: ∀m,y. ⫯m ≤ y → ∃∃n. m ≤ n & y = ⫯n.
-/2 width=3 by yle_inv_S1_aux/ qed-.
-
-lemma yle_inv_S: ∀m,n. ⫯m ≤ ⫯n → m ≤ n.
-#m #n #H elim (yle_inv_S1 … H) -H
-#x #Hx #H destruct //
-qed-.
-
-(* Properties ***************************************************************)
-
-let corec yle_refl: reflexive … yle ≝ ?.
-* [ @yle_O | #x @yle_S // ]
-qed.
-
-let corec yle_Y: ∀m. m ≤ ∞ ≝ ?.
-* [ @yle_O | #m <Y_rew @yle_S // ]
-qed.
-
-let corec yle_S_dx: ∀m,n. m ≤ n → m ≤ ⫯n ≝ ?.
-#m #n * -m -n [ #n @yle_O | #m #n #H @yle_S /2 width=1 by/ ]
-qed.
-
-lemma yle_refl_S_dx: ∀x. x ≤ ⫯x.
-/2 width=1 by yle_refl, yle_S_dx/ qed.
-
-lemma yle_pred_sn: ∀m,n. m ≤ n → ⫰m ≤ n ≝ ?.
-* // #m #n #H elim (yle_inv_S1 … H) -H
-#x #Hm #H destruct /2 width=1 by yle_S_dx/
-qed.
-
-lemma yle_refl_pred_sn: ∀x. ⫰x ≤ x.
-/2 width=1 by yle_refl, yle_pred_sn/ qed.
-
-let corec yle_trans: Transitive … yle ≝ ?.
-#x #y * -x -y [ #x #z #_ @yle_O ]
-#x #y #Hxy #z #H elim (yle_inv_S1 … H) -H
-#n #Hyz #H destruct
-@yle_S @(yle_trans … Hxy … Hyz) (**) (* cofix not guarded by constructors *)
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/ynat/ynat.ma".
-
-(* INFINITARY NATURAL NUMBERS ***********************************************)
-
-(* the predecessor on ynat *)
-definition ypred: ynat → ynat ≝ λm. match m with
-[ YO ⇒ 0
-| YS n ⇒ n
-].
-
-notation "hvbox( ⫰ term 55 T )"
- non associative with precedence 55
- for @{ 'Predecessor $T }.
-
-interpretation "ynat predecessor" 'Predecessor m = (ypred m).
-
-(* Properties ***************************************************************)
-
-lemma ypred_S: ∀m. ⫰⫯m = m.
-// qed.
-
-(* Inversion lemmas *********************************************************)
-
-lemma YS_inj: ∀m,n. ⫯m = ⫯n → m = n.
-#m #n #H <(ypred_S m) <(ypred_S n) //
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "basics/relations.ma".
-
-(* GENERATED LIBRARY ********************************************************)
-
-lemma insert_eq_0: ∀A,a. ∀Q1,Q2:predicate A. (∀a0. Q1 a0 → a = a0 → Q2 a0) → Q1 a → Q2 a.
-/2 width=1 by/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "arithmetics/nat.ma".
-include "ground_2/xoa/ex_3_1.ma".
-include "ground_2/xoa/or_3.ma".
-include "ground_2/notation/functions/uparrow_1.ma".
-include "ground_2/notation/functions/downarrow_1.ma".
-include "ground_2/pull/pull_2.ma".
-include "ground_2/lib/relations.ma".
-
-(* ARITHMETICAL PROPERTIES **************************************************)
-
-interpretation "nat successor" 'UpArrow m = (S m).
-
-interpretation "nat predecessor" 'DownArrow m = (pred m).
-
-interpretation "nat min" 'and x y = (min x y).
-
-interpretation "nat max" 'or x y = (max x y).
-
-(* Iota equations ***********************************************************)
-
-lemma pred_O: pred 0 = 0.
-normalize // qed.
-
-lemma pred_S: ∀m. pred (S m) = m.
-// qed.
-
-lemma plus_S1: ∀x,y. ↑(x+y) = (↑x) + y.
-// qed.
-
-lemma max_O1: ∀n. n = (0 ∨ n).
-// qed.
-
-lemma max_O2: ∀n. n = (n ∨ 0).
-// qed.
-
-lemma max_SS: ∀n1,n2. ↑(n1∨n2) = (↑n1 ∨ ↑n2).
-#n1 #n2 elim (decidable_le n1 n2) #H normalize
-[ >(le_to_leb_true … H) | >(not_le_to_leb_false … H) ] -H //
-qed.
-
-(* Equalities ***************************************************************)
-
-lemma plus_SO_sn (n): 1 + n = ↑n.
-// qed-.
-
-lemma plus_SO_dx (n): n + 1 = ↑n.
-// qed.
-
-lemma minus_SO_dx (n): n-1 = ↓n.
-// qed.
-
-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
-@plus_to_minus >plus_minus_associative //
-qed-.
-
-(* Note: uses minus_minus_comm, minus_plus_m_m, commutative_plus, plus_minus *)
-lemma plus_minus_minus_be: ∀x,y,z. y ≤ z → z ≤ x → (x - z) + (z - y) = x - y.
-#x #z #y #Hzy #Hyx >plus_minus // >commutative_plus >plus_minus //
-qed-.
-
-lemma lt_succ_pred: ∀m,n. n < m → m = ↑↓m.
-#m #n #Hm >S_pred /2 width=2 by ltn_to_ltO/
-qed-.
-
-fact plus_minus_minus_be_aux: ∀i,x,y,z. y ≤ z → z ≤ x → i = z - y → x - z + i = x - y.
-/2 width=1 by plus_minus_minus_be/ qed-.
-
-lemma le_plus_minus: ∀m,n,p. p ≤ n → m + n - p = m + (n - p).
-/2 by plus_minus/ qed-.
-
-lemma le_plus_minus_comm: ∀n,m,p. p ≤ m → m + n - p = m - p + n.
-/2 by plus_minus/ qed-.
-
-lemma minus_minus_comm3: ∀n,x,y,z. n-x-y-z = n-y-z-x.
-// qed.
-
-lemma idempotent_max: ∀n:nat. n = (n ∨ n).
-#n normalize >le_to_leb_true //
-qed.
-
-lemma associative_max: associative … max.
-#x #y #z normalize
-@(leb_elim x y) normalize #Hxy
-@(leb_elim y z) normalize #Hyz //
-[1,2: >le_to_leb_true /2 width=3 by transitive_le/
-| >not_le_to_leb_false /4 width=3 by lt_to_not_le, not_le_to_lt, transitive_lt/
- >not_le_to_leb_false //
-]
-qed.
-
-(* Properties ***************************************************************)
-
-lemma eq_nat_dec: ∀n1,n2:nat. Decidable (n1 = n2).
-#n1 elim n1 -n1 [| #n1 #IHn1 ] * [2,4: #n2 ]
-[1,4: @or_intror #H destruct
-| elim (IHn1 n2) -IHn1 /3 width=1 by or_intror, or_introl/
-| /2 width=1 by or_introl/
-]
-qed-.
-
-lemma lt_or_eq_or_gt: ∀m,n. ∨∨ m < n | n = m | n < m.
-#m #n elim (lt_or_ge m n) /2 width=1 by or3_intro0/
-#H elim H -m /2 width=1 by or3_intro1/
-#m #Hm * /3 width=1 by not_le_to_lt, le_S_S, or3_intro2/
-qed-.
-
-lemma monotonic_le_minus_l2: ∀x1,x2,y,z. x1 ≤ x2 → x1 - y - z ≤ x2 - y - z.
-/3 width=1 by monotonic_le_minus_l/ qed.
-
-lemma minus_le_trans_sn: ∀x1,x2. x1 ≤ x2 → ∀x. x1-x ≤ x2.
-/2 width=3 by transitive_le/ qed.
-
-lemma le_plus_to_minus_l: ∀a,b,c. a + b ≤ c → b ≤ c-a.
-/2 width=1 by le_plus_to_minus_r/
-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)
-@le_S_S_to_le >S_pred /2 width=3 by transitive_lt/
-qed.
-
-lemma lt_S_S: ∀x,y. x < y → ↑x < ↑y.
-/2 width=1 by le_S_S/ qed.
-
-lemma lt_S: ∀n,m. n < m → n < ↑m.
-/2 width=1 by le_S/ qed.
-
-lemma monotonic_lt_minus_r:
-∀p,q,n. q < n -> q < p → n-p < n-q.
-#p #q #n #Hn #H
-lapply (monotonic_le_minus_r … n H) -H #H
-@(le_to_lt_to_lt … H) -H
-/2 width=1 by lt_plus_to_minus/
-qed.
-
-lemma max_S1_le_S: ∀n1,n2,n. (n1 ∨ n2) ≤ n → (↑n1 ∨ n2) ≤ ↑n.
-/4 width=2 by to_max, le_maxr, le_S_S, le_S/ qed-.
-
-lemma max_S2_le_S: ∀n1,n2,n. (n1 ∨ n2) ≤ n → (n1 ∨ ↑n2) ≤ ↑n.
-/2 width=1 by max_S1_le_S/ qed-.
-
-(* Inversion & forward lemmas ***********************************************)
-
-lemma lt_refl_false: ∀n. n < n → ⊥.
-#n #H elim (lt_to_not_eq … H) -H /2 width=1 by/
-qed-.
-
-lemma lt_zero_false: ∀n. n < 0 → ⊥.
-#n #H elim (lt_to_not_le … H) -H /2 width=1 by/
-qed-.
-
-lemma 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-.
-
-lemma le_plus_xSy_O_false: ∀x,y. x + S y ≤ 0 → ⊥.
-#x #y #H lapply (le_n_O_to_eq … H) -H <plus_n_Sm #H destruct
-qed-.
-
-lemma le_plus_xySz_x_false: ∀y,z,x. x + y + S z ≤ x → ⊥.
-#y #z #x elim x -x /3 width=1 by le_S_S_to_le/
-#H elim (le_plus_xSy_O_false … H)
-qed-.
-
-lemma plus_xySz_x_false: ∀z,x,y. x + y + S z = x → ⊥.
-/2 width=4 by le_plus_xySz_x_false/ qed-.
-
-lemma plus_xSy_x_false: ∀y,x. x + S y = x → ⊥.
-/2 width=4 by plus_xySz_x_false/ qed-.
-
-lemma pred_inv_fix_sn: ∀x. ↓x = x → 0 = x.
-* // #x <pred_Sn #H
-elim (succ_inv_refl_sn x) //
-qed-.
-
-lemma discr_plus_xy_y: ∀x,y. x + y = y → x = 0.
-// qed-.
-
-lemma discr_plus_x_xy: ∀x,y. x = x + y → y = 0.
-/2 width=2 by le_plus_minus_comm/ qed-.
-
-lemma plus2_le_sn_sn: ∀m1,m2,n1,n2. m1 + n1 = m2 + n2 → m1 ≤ m2 → n2 ≤ n1.
-#m1 #m2 #n1 #n2 #H #Hm
-lapply (monotonic_le_plus_l n1 … Hm) -Hm >H -H
-/2 width=2 by le_plus_to_le/
-qed-.
-
-lemma plus2_le_sn_dx: ∀m1,m2,n1,n2. m1 + n1 = n2 + m2 → m1 ≤ m2 → n2 ≤ n1.
-/2 width=4 by plus2_le_sn_sn/ qed-.
-
-lemma plus2_le_dx_sn: ∀m1,m2,n1,n2. n1 + m1 = m2 + n2 → m1 ≤ m2 → n2 ≤ n1.
-/2 width=4 by plus2_le_sn_sn/ qed-.
-
-lemma plus2_le_dx_dx: ∀m1,m2,n1,n2. n1 + m1 = n2 + m2 → m1 ≤ m2 → n2 ≤ n1.
-/2 width=4 by plus2_le_sn_sn/ qed-.
-
-lemma lt_S_S_to_lt: ∀x,y. ↑x < ↑y → x < y.
-/2 width=1 by le_S_S_to_le/ qed-.
-
-(* Note this should go in nat.ma *)
-lemma discr_x_minus_xy: ∀x,y. x = x - y → x = 0 ∨ y = 0.
-#x @(nat_ind_plus … x) -x /2 width=1 by or_introl/
-#x #_ #y @(nat_ind_plus … y) -y /2 width=1 by or_intror/
-#y #_ >minus_plus_plus_l
-#H lapply (discr_plus_xy_minus_xz … H) -H
-#H destruct
-qed-.
-
-lemma lt_inv_O1: ∀n. 0 < n → ∃m. ↑m = n.
-* /2 width=2 by ex_intro/
-#H cases (lt_le_false … H) -H //
-qed-.
-
-lemma lt_inv_S1: ∀m,n. ↑m < n → ∃∃p. m < p & ↑p = n.
-#m * /3 width=3 by lt_S_S_to_lt, ex2_intro/
-#H cases (lt_le_false … H) -H //
-qed-.
-
-lemma lt_inv_gen: ∀y,x. x < y → ∃∃z. x ≤ z & ↑z = y.
-* /3 width=3 by le_S_S_to_le, ex2_intro/
-#x #H elim (lt_le_false … H) -H //
-qed-.
-
-lemma plus_inv_O3: ∀x,y. x + y = 0 → x = 0 ∧ y = 0.
-/2 width=1 by plus_le_0/ qed-.
-
-lemma plus_inv_S3_sn: ∀x1,x2,x3. x1+x2 = ↑x3 →
- ∨∨ ∧∧ x1 = 0 & x2 = ↑x3
- | ∃∃y1. x1 = ↑y1 & y1 + x2 = x3.
-* /3 width=1 by or_introl, conj/
-#x1 #x2 #x3 <plus_S1 #H destruct
-/3 width=3 by ex2_intro, or_intror/
-qed-.
-
-lemma plus_inv_S3_dx: ∀x2,x1,x3. x1+x2 = ↑x3 →
- ∨∨ ∧∧ x2 = 0 & x1 = ↑x3
- | ∃∃y2. x2 = ↑y2 & x1 + y2 = x3.
-* /3 width=1 by or_introl, conj/
-#x2 #x1 #x3 <plus_n_Sm #H destruct
-/3 width=3 by ex2_intro, or_intror/
-qed-.
-
-lemma max_inv_O3: ∀x,y. (x ∨ y) = 0 → 0 = x ∧ 0 = y.
-/4 width=2 by le_maxr, le_maxl, le_n_O_to_eq, conj/
-qed-.
-
-lemma zero_eq_plus: ∀x,y. 0 = x + y → 0 = x ∧ 0 = y.
-* /2 width=1 by conj/ #x #y normalize #H destruct
-qed-.
-
-lemma nat_split: ∀x. x = 0 ∨ ∃y. ↑y = x.
-* /3 width=2 by ex_intro, or_introl, or_intror/
-qed-.
-
-lemma lt_elim: ∀R:relation nat.
- (∀n2. R O (↑n2)) →
- (∀n1,n2. R n1 n2 → R (↑n1) (↑n2)) →
- ∀n2,n1. n1 < n2 → R n1 n2.
-#R #IH1 #IH2 #n2 elim n2 -n2
-[ #n1 #H elim (lt_le_false … H) -H //
-| #n2 #IH * /4 width=1 by lt_S_S_to_lt/
-]
-qed-.
-
-lemma le_elim: ∀R:relation nat.
- (∀n2. R O (n2)) →
- (∀n1,n2. R n1 n2 → R (↑n1) (↑n2)) →
- ∀n1,n2. n1 ≤ n2 → R n1 n2.
-#R #IH1 #IH2 #n1 #n2 @(nat_elim2 … n1 n2) -n1 -n2
-/4 width=1 by monotonic_pred/ -IH1 -IH2
-#n1 #H elim (lt_le_false … H) -H //
-qed-.
-
-lemma nat_elim_le_sn (Q:relation …):
- (∀m1,m2. (∀m. m < m2-m1 → Q (m2-m) m2) → m1 ≤ m2 → Q m1 m2) →
- ∀n1,n2. n1 ≤ n2 → Q n1 n2.
-#Q #IH #n1 #n2 #Hn
-<(minus_minus_m_m … Hn) -Hn
-lapply (minus_le n2 n1)
-let d ≝ (n2-n1)
-@(nat_elim1 … d) -d -n1 #d
-@pull_2 #Hd
-<(minus_minus_m_m … Hd) in ⊢ (%→?); -Hd
-let n1 ≝ (n2-d) #IHd
-@IH -IH [| // ] #m #Hn
-/4 width=3 by lt_to_le, lt_to_le_to_lt/
-qed-.
-
-(* Iterators ****************************************************************)
-
-(* Note: see also: lib/arithemetics/bigops.ma *)
-rec definition iter (n:nat) (B:Type[0]) (op: B → B) (nil: B) ≝
- match n with
- [ O ⇒ nil
- | S k ⇒ op (iter k B op nil)
- ].
-
-interpretation "iterated function" 'exp op n = (iter n ? op).
-
-lemma iter_O: ∀B:Type[0]. ∀f:B→B.∀b. f^0 b = b.
-// qed.
-
-lemma iter_S: ∀B:Type[0]. ∀f:B→B.∀b,l. f^(S l) b = f (f^l b).
-// qed.
-
-lemma iter_n_Sm: ∀B:Type[0]. ∀f:B→B. ∀b,l. f^l (f b) = f (f^l b).
-#B #f #b #l elim l -l normalize //
-qed.
-
-lemma iter_plus: ∀B:Type[0]. ∀f:B→B. ∀b,l1,l2. f^(l1+l2) b = f^l1 (f^l2 b).
-#B #f #b #l1 elim l1 -l1 normalize //
-qed.
-
-(* Trichotomy operator ******************************************************)
-
-(* Note: this is "if eqb n1 n2 then a2 else if leb n1 n2 then a1 else a3" *)
-rec definition tri (A:Type[0]) n1 n2 a1 a2 a3 on n1 : A ≝
- match n1 with
- [ O ⇒ match n2 with [ O ⇒ a2 | S n2 ⇒ a1 ]
- | S n1 ⇒ match n2 with [ O ⇒ a3 | S n2 ⇒ tri A n1 n2 a1 a2 a3 ]
- ].
-
-lemma tri_lt: ∀A,a1,a2,a3,n2,n1. n1 < n2 → tri A n1 n2 a1 a2 a3 = a1.
-#A #a1 #a2 #a3 #n2 elim n2 -n2
-[ #n1 #H elim (lt_zero_false … H)
-| #n2 #IH #n1 elim n1 -n1 /3 width=1 by monotonic_lt_pred/
-]
-qed.
-
-lemma tri_eq: ∀A,a1,a2,a3,n. tri A n n a1 a2 a3 = a2.
-#A #a1 #a2 #a3 #n elim n -n normalize //
-qed.
-
-lemma tri_gt: ∀A,a1,a2,a3,n1,n2. n2 < n1 → tri A n1 n2 a1 a2 a3 = a3.
-#A #a1 #a2 #a3 #n1 elim n1 -n1
-[ #n2 #H elim (lt_zero_false … H)
-| #n1 #IH #n2 elim n2 -n2 /3 width=1 by monotonic_lt_pred/
-]
-qed.
-
-(* 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-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/lib/arith.ma".
-
-(* ARITHMETICAL PROPERTIES FOR λδ-2B ****************************************)
-
-(* Equalities ***************************************************************)
-
-lemma plus_n_2: ∀n. n + 2 = n + 1 + 1.
-// qed.
-
-lemma arith_b1: ∀a,b,c1. c1 ≤ b → a - c1 - (b - c1) = a - b.
-#a #b #c1 #H >minus_minus_comm >minus_le_minus_minus_comm //
-qed-.
-
-lemma arith_b2: ∀a,b,c1,c2. c1 + c2 ≤ b → a - c1 - c2 - (b - c1 - c2) = a - b.
-#a #b #c1 #c2 #H >minus_plus >minus_plus >minus_plus /2 width=1 by arith_b1/
-qed-.
-
-lemma arith_c1x: ∀x,a,b,c1. x + c1 + a - (b + c1) = x + a - b.
-/3 by monotonic_le_minus_l, le_to_le_to_eq, le_n/ qed.
-
-lemma arith_h1: ∀a1,a2,b,c1. c1 ≤ a1 → c1 ≤ b →
- a1 - c1 + a2 - (b - c1) = a1 + a2 - b.
-#a1 #a2 #b #c1 #H1 #H2 >plus_minus /2 width=1 by arith_b2/
-qed-.
-
-lemma arith_i: ∀x,y,z. y < x → x+z-y-1 = x-y-1+z.
-/2 width=1 by plus_minus/ qed-.
-
-(* Properties ***************************************************************)
-
-fact le_repl_sn_conf_aux: ∀x,y,z:nat. x ≤ z → x = y → y ≤ z.
-// qed-.
-
-fact le_repl_sn_trans_aux: ∀x,y,z:nat. x ≤ z → y = x → y ≤ z.
-// qed-.
-
-lemma arith_j: ∀x,y,z. x-y-1 ≤ x-(y-z)-1.
-/3 width=1 by monotonic_le_minus_l, monotonic_le_minus_r/ qed.
-
-lemma arith_k_sn: ∀z,x,y,n. z < x → x+n ≤ y → x-z-1+n ≤ y-z-1.
-#z #x #y #n #Hzx #Hxny
->plus_minus [2: /2 width=1 by monotonic_le_minus_r/ ]
->plus_minus [2: /2 width=1 by lt_to_le/ ]
-/2 width=1 by monotonic_le_minus_l2/
-qed.
-
-lemma arith_k_dx: ∀z,x,y,n. z < x → y ≤ x+n → y-z-1 ≤ x-z-1+n.
-#z #x #y #n #Hzx #Hyxn
->plus_minus [2: /2 width=1 by monotonic_le_minus_r/ ]
->plus_minus [2: /2 width=1 by lt_to_le/ ]
-/2 width=1 by monotonic_le_minus_l2/
-qed.
-
-(* Inversion & forward lemmas ***********************************************)
-
-lemma lt_plus_SO_to_le: ∀x,y. x < y + 1 → x ≤ y.
-/2 width=1 by monotonic_pred/ qed-.
-
-(* Iterators ****************************************************************)
-
-lemma iter_SO: ∀B:Type[0]. ∀f:B→B. ∀b,l. f^(l+1) b = f (f^l b).
-#B #f #b #l >commutative_plus //
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/lib/arith.ma".
-
-(* ARITHMETICAL PROPERTIES FOR λδ-2B ****************************************)
-
-lemma arith_l4 (m11) (m12) (m21) (m22):
- m21+m22-(m11+m12) = m21-m11-m12+(m22-(m11-m21)-(m12-(m21-m11))).
-#m11 #m12 #m21 #m22 >minus_plus
-elim (le_or_ge (m11+m12) m21) #Hm1121
-[ lapply (transitive_le m11 ??? Hm1121) // #Hm121
- lapply (le_plus_to_minus_l … Hm1121) #Hm12211
- <plus_minus // @eq_f2 // >(eq_minus_O m11 ?) // >(eq_minus_O m12 ?) //
-| >(eq_minus_O m21 ?) // <plus_O_n <minus_plus <commutative_plus
- elim (le_or_ge m11 m21) #Hm121
- [ lapply (le_plus_to_minus_comm … Hm1121) #Hm2112
- >(eq_minus_O m11 ?) // <plus_minus_associative // <minus_le_minus_minus_comm //
- | >(eq_minus_O m21 ?) // <minus_le_minus_minus_comm //
- ]
-]
-qed.
-
-lemma arith_l3 (m) (n1) (n2): n1+n2-m = n1-m+(n2-(m-n1)).
-// qed.
-
-lemma arith_l2 (n1) (n2): ↑n2-n1 = 1-n1+(n2-(n1-1)).
-#n1 #n2 <arith_l3 //
-qed.
-
-lemma arith_l1: ∀x. 1 = 1-x+(x-(x-1)).
-#x <arith_l2 //
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "basics/bool.ma".
-include "ground_2/lib/relations.ma".
-include "ground_2/notation/functions/no_0.ma".
-include "ground_2/notation/functions/yes_0.ma".
-
-(* BOOLEAN PROPERTIES *******************************************************)
-
-interpretation "boolean false" 'no = false.
-
-interpretation "boolean true" 'yes = true.
-
-(* Basic properties *********************************************************)
-
-lemma commutative_orb: commutative … orb.
-* * // qed.
-
-lemma orb_true_dx: ∀b. (b ∨ Ⓣ) = Ⓣ.
-* // qed.
-
-lemma orb_true_sn: ∀b. (Ⓣ ∨ b) = Ⓣ.
-// qed.
-
-lemma commutative_andb: commutative … andb.
-* * // qed.
-
-lemma andb_false_dx: ∀b. (b ∧ Ⓕ) = Ⓕ.
-* // qed.
-
-lemma andb_false_sn: ∀b. (Ⓕ ∧ b) = Ⓕ.
-// qed.
-
-lemma eq_bool_dec: ∀b1,b2:bool. Decidable (b1 = b2).
-* * /2 width=1 by or_introl/
-@or_intror #H destruct
-qed-.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma orb_inv_false_dx: ∀b1,b2:bool. (b1 ∨ b2) = Ⓕ → b1 = Ⓕ ∧ b2 = Ⓕ.
-* normalize /2 width=1 by conj/ #b2 #H destruct
-qed-.
-
-lemma andb_inv_true_dx: ∀b1,b2:bool. (b1 ∧ b2) = Ⓣ → b1 = Ⓣ ∧ b2 = Ⓣ.
-* normalize /2 width=1 by conj/ #b2 #H destruct
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/doteq_4.ma".
-include "ground_2/lib/relations.ma".
-
-(* EXTENSIONAL EQUIVALENCE **************************************************)
-
-definition exteq (A,B:Type[0]): relation (A → B) ≝
- λf1,f2. ∀a. f1 a = f2 a.
-
-interpretation "extensional equivalence"
- 'DotEq A B f1 f2 = (exteq A B f1 f2).
-
-(* Basic_properties *********************************************************)
-
-lemma exteq_refl (A) (B): reflexive … (exteq A B).
-// qed.
-
-lemma exteq_repl (A) (B): replace_2 … (exteq A B) (exteq A B) (exteq A B).
-// qed-.
-
-lemma exteq_sym (A) (B): symmetric … (exteq A B).
-/2 width=1 by exteq_repl/ qed-.
-
-lemma exteq_trans (A) (B): Transitive … (exteq A B).
-/2 width=1 by exteq_repl/ qed-.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/lib/relations.ma".
-
-(* FUNCTIONS ****************************************************************)
-
-definition left_identity (A) (f): predicate A ≝ λi. ∀a:A. a = f i a.
-
-definition right_identity (A) (f): predicate A ≝ λi. ∀a:A. a = f a i.
-
-definition compatible_2 (A) (B):
- relation3 … (relation A) (relation B) ≝
- λf,Sa,Sb.
- ∀a1,a2. Sa a1 a2 → Sb (f a1) (f a2).
-
-definition compatible_3 (A) (B) (C):
- relation4 … (relation A) (relation B) (relation C) ≝
- λf,Sa,Sb,Sc.
- ∀a1,a2. Sa a1 a2 → ∀b1,b2. Sb b1 b2 → Sc (f a1 b1) (f a2 b2).
-
-definition annulment_2 (A) (f): predicate A ≝
- λi:A. ∀a1,a2. i = f a1 a2 → ∧∧ i = a1 & i = a2.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/functions/circledE_1.ma".
-include "ground_2/notation/functions/oplusright_3.ma".
-include "ground_2/lib/relations.ma".
-
-(* LISTS ********************************************************************)
-
-inductive list (A:Type[0]) : Type[0] :=
- | nil : list A
- | cons: A → list A → list A.
-
-interpretation "nil (list)" 'CircledE A = (nil A).
-
-interpretation "cons (list)" 'OPlusRight A hd tl = (cons A hd tl).
-
-rec definition all A (R:predicate A) (l:list A) on l ≝
- match l with
- [ nil ⇒ ⊤
- | cons hd tl ⇒ ∧∧ R hd & all A R tl
- ].
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "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-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/lib/arith.ma".
-include "ground_2/lib/list.ma".
-
-(* LENGTH OF A LIST *********************************************************)
-
-rec definition length A (l:list A) on l ≝ match l with
-[ nil ⇒ 0
-| cons _ l ⇒ ↑(length A l)
-].
-
-interpretation "length (list)"
- 'card l = (length ? l).
-
-(* Basic properties *********************************************************)
-
-lemma length_nil (A:Type[0]): |nil A| = 0.
-// qed.
-
-lemma length_cons (A:Type[0]) (l:list A) (a:A): |a⨮l| = ↑|l|.
-// qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma length_inv_zero_dx (A:Type[0]) (l:list A): |l| = 0 → l = Ⓔ.
-#A * // #a #l >length_cons #H destruct
-qed-.
-
-lemma length_inv_zero_sn (A:Type[0]) (l:list A): 0 = |l| → l = Ⓔ.
-/2 width=1 by length_inv_zero_dx/ qed-.
-
-lemma length_inv_succ_dx (A:Type[0]) (l:list A) (x): |l| = ↑x →
- ∃∃tl,a. x = |tl| & l = a ⨮ tl.
-#A * /2 width=4 by ex2_2_intro/
->length_nil #x #H destruct
-qed-.
-
-lemma length_inv_succ_sn (A:Type[0]) (l:list A) (x): ↑x = |l| →
- ∃∃tl,a. x = |tl| & l = a ⨮ tl.
-/2 width=1 by length_inv_succ_dx/ qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "basics/logic.ma".
-include "ground_2/notation/xoa/false_0.ma".
-include "ground_2/notation/xoa/true_0.ma".
-include "ground_2/notation/xoa/or_2.ma".
-include "ground_2/notation/xoa/and_2.ma".
-
-interpretation "logical false" 'false = False.
-
-interpretation "logical true" 'true = True.
-
-(* Logical properties missing in the basic library **************************)
-
-lemma commutative_and: ∀A,B. A ∧ B → B ∧ A.
-#A #B * /2 width=1 by conj/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "arithmetics/lstar.ma".
-
-(* PROPERTIES OF NAT-LABELED REFLEXIVE AND TRANSITIVE CLOSURE ***************)
-
-definition llstar: ∀A:Type[0]. ∀B. (A→relation B) → nat → (A→relation B) ≝
- λA,B,R,l,a. lstar … (R a) l.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/insert_eq/insert_eq_0.ma".
-include "ground_2/lib/functions.ma".
-
-(* LABELLED TRANSITIVE CLOSURE **********************************************)
-
-inductive ltc (A:Type[0]) (f) (B) (R:relation3 A B B): relation3 A B B ≝
-| ltc_rc : ∀a,b1,b2. R a b1 b2 → ltc … a b1 b2
-| ltc_trans: ∀a1,a2,b1,b,b2. ltc … a1 b1 b → ltc … a2 b b2 → ltc … (f a1 a2) b1 b2
-.
-
-(* Basic properties *********************************************************)
-
-lemma ltc_sn (A) (f) (B) (R): ∀a1,b1,b. R a1 b1 b →
- ∀a2,b2. ltc A f B R a2 b b2 → ltc … f … R (f a1 a2) b1 b2.
-/3 width=3 by ltc_rc, ltc_trans/ qed.
-
-lemma ltc_dx (A) (f) (B) (R): ∀a1,b1,b. ltc A f B R a1 b1 b →
- ∀a2,b2. R a2 b b2 → ltc … f … R (f a1 a2) b1 b2.
-/3 width=3 by ltc_rc, ltc_trans/ qed.
-
-(* Basic eliminators ********************************************************)
-
-lemma ltc_ind_sn (A) (f) (B) (R) (Q:relation2 A B) (b2): associative … f →
- (∀a,b1. R a b1 b2 → Q a b1) →
- (∀a1,a2,b1,b. R a1 b1 b → ltc … f … R a2 b b2 → Q a2 b → Q (f a1 a2) b1) →
- ∀a,b1. ltc … f … R a b1 b2 → Q a b1.
-#A #f #B #R #Q #b2 #Hf #IH1 #IH2 #a #b1 @(insert_eq_0 … b2)
-#b0 #H elim H -a -b1 -b0 /2 width=2 by/
-#a1 #a2 #b1 #b #b0 #H #Hb2 #_
-generalize in match Hb2; generalize in match a2; -Hb2 -a2
-elim H -a1 -b1 -b /4 width=4 by ltc_trans/
-qed-.
-
-lemma ltc_ind_dx (A) (f) (B) (R) (Q:A→predicate B) (b1): associative … f →
- (∀a,b2. R a b1 b2 → Q a b2) →
- (∀a1,a2,b,b2. ltc … f … R a1 b1 b → Q a1 b → R a2 b b2 → Q (f a1 a2) b2) →
- ∀a,b2. ltc … f … R a b1 b2 → Q a b2.
-#A #f #B #R #Q #b1 #Hf #IH1 #IH2 #a #b2 @(insert_eq_0 … b1)
-#b0 #H elim H -a -b0 -b2 /2 width=2 by/
-#a1 #a2 #b0 #b #b2 #Hb0 #H #IHb0 #_
-generalize in match IHb0; generalize in match Hb0; generalize in match a1; -IHb0 -Hb0 -a1
-elim H -a2 -b -b2 /4 width=4 by ltc_trans/
-qed-.
-
-(* Advanced elimiators with reflexivity *************************************)
-
-lemma ltc_ind_sn_refl (A) (i) (f) (B) (R) (Q:relation2 A B) (b2):
- associative … f → right_identity … f i → reflexive B (R i) →
- Q i b2 →
- (∀a1,a2,b1,b. R a1 b1 b → ltc … f … R a2 b b2 → Q a2 b → Q (f a1 a2) b1) →
- ∀a,b1. ltc … f … R a b1 b2 → Q a b1.
-#A #i #f #B #R #Q #b2 #H1f #H2f #HR #IH1 #IH2 #a #b1 #H
-@(ltc_ind_sn … R … H1f … IH2 … H) -a -b1 -H1f #a #b1 #Hb12
->(H2f a) -H2f /3 width=4 by ltc_rc/
-qed-.
-
-lemma ltc_ind_dx_refl (A) (i) (f) (B) (R) (Q:A→predicate B) (b1):
- associative … f → left_identity … f i → reflexive B (R i) →
- Q i b1 →
- (∀a1,a2,b,b2. ltc … f … R a1 b1 b → Q a1 b → R a2 b b2 → Q (f a1 a2) b2) →
- ∀a,b2. ltc … f … R a b1 b2 → Q a b2.
-#A #i #f #B #R #Q #b1 #H1f #H2f #HR #IH1 #IH2 #a #b2 #H
-@(ltc_ind_dx … R … H1f … IH2 … H) -a -b2 -H1f #a #b2 #Hb12
->(H2f a) -H2f /3 width=4 by ltc_rc/
-qed-.
-
-(* Properties with lsub *****************************************************)
-
-lemma ltc_lsub_trans: ∀A,f. associative … f →
- ∀B,C,R,S. (∀n. lsub_trans B C (λL. R L n) S) →
- ∀n. lsub_trans B C (λL. ltc A f … (R L) n) S.
-#A #f #Hf #B #C #R #S #HRS #n #L2 #T1 #T2 #H
-@(ltc_ind_dx … Hf ???? H) -n -T2
-/3 width=5 by ltc_dx, ltc_rc/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/lib/star.ma".
-include "ground_2/lib/ltc.ma".
-
-(* LABELLED TRANSITIVE CLOSURE **********************************************)
-
-alias symbol "subseteq" = "relation inclusion".
-
-(* Properties with contextual transitive closure ****************************)
-
-lemma ltc_CTC (C) (A) (i) (f) (B) (R:relation4 C A B B):
- left_identity … f i →
- ∀c. CTC … (λc. R c i) c ⊆ ltc … f … (R c) i.
-#C #A #i #f #B #R #Hf #c #b1 #b2 #H elim H -b2 /2 width=1 by ltc_rc/
-#b #b2 #_ #Hb2 #IH >(Hf i) -Hf /2 width=3 by ltc_dx/
-qed.
-
-(* Inversion lemmas with contextual transitive closure **********************)
-
-lemma ltc_inv_CTC (C) (A) (i) (f) (B) (R:relation4 C A B B):
- associative … f → annulment_2 … f i →
- ∀c. ltc … f … (R c) i ⊆ CTC … (λc. R c i) c.
-#C #A #i #f #B #R #H1f #H2f #c #b1 #b2
-@(insert_eq_0 … i) #a #H
-@(ltc_ind_dx A f B … H) -a -b2 /2 width=1 by inj/ -H1f
-#a1 #a2 #b #b2 #_ #IH #Hb2 #H <H
-elim (H2f … H) -H2f -H #H1 #H2 destruct
-/3 width=3 by step/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "basics/relations.ma".
-include "ground_2/xoa/and_3.ma".
-include "ground_2/xoa/ex_2_2.ma".
-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.
-
-(* Inclusion ****************************************************************)
-
-definition subR2 (S1) (S2): relation (relation2 S1 S2) ≝
- λR1,R2. (∀a1,a2. R1 a1 a2 → R2 a1 a2).
-
-interpretation "2-relation inclusion"
- 'subseteq R1 R2 = (subR2 ?? R1 R2).
-
-definition subR3 (S1) (S2) (S3): relation (relation3 S1 S2 S3) ≝
- λR1,R2. (∀a1,a2,a3. R1 a1 a2 a3 → R2 a1 a2 a3).
-
-interpretation "3-relation inclusion"
- 'subseteq R1 R2 = (subR3 ??? R1 R2).
-
-(* 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 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 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.
-
-definition Decidable: Prop → Prop ≝ λR. R ∨ (R → ⊥).
-
-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 ≝
- ∀a0,a1. R a0 a1 → ∀a2. R a0 a2 → 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) (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) ≝
- λR1,R2.
- ∀a0. pw_confluent2 A R1 R2 a0.
-
-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 ≝
- ∀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) ≝
- λ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) ≝
- λ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) ≝
- λR. ∀b1. R b1 → ∀b2. R b2 → b1 = b2.
-
-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 ≝
- λ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.
-#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 ≝
- λ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.
-#A #R #S #a2 #Ha2
-@SN_sn_intro #a1 #HRa12 #HSa12
-elim HSa12 -HSa12 /2 width=1 by/
-qed.
-
-(* Relations on unboxed triples *********************************************)
-
-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).
-/3 width=1 by and3_intro, or_intror/ qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "basics/star1.ma".
-include "ground_2/lib/relations.ma".
-
-(* TRANSITIVE CLOSURE *******************************************************)
-
-definition CTC: ∀A:Type[0]. ∀B. (A→relation B) → (A→relation B) ≝
- λA,B,R,a. TC … (R a).
-
-definition s_r_transitive: ∀A,B. relation2 (A→relation B) (B→relation A) ≝ λA,B,R1,R2.
- ∀L2,T1,T2. R1 L2 T1 T2 → ∀L1. R2 T1 L1 L2 → CTC … R1 L1 T1 T2.
-
-definition s_rs_transitive: ∀A,B. relation2 (A→relation B) (B→relation A) ≝ λA,B,R1,R2.
- ∀L2,T1,T2. CTC … R1 L2 T1 T2 → ∀L1. R2 T1 L1 L2 → CTC … R1 L1 T1 T2.
-
-lemma TC_strip1: ∀A,R1,R2. confluent2 A R1 R2 →
- ∀a0,a1. TC … R1 a0 a1 → ∀a2. R2 a0 a2 →
- ∃∃a. R2 a1 a & TC … R1 a2 a.
-#A #R1 #R2 #HR12 #a0 #a1 #H elim H -a1
-[ #a1 #Ha01 #a2 #Ha02
- elim (HR12 … Ha01 … Ha02) -HR12 -a0 /3 width=3 by inj, ex2_intro/
-| #a #a1 #_ #Ha1 #IHa0 #a2 #Ha02
- elim (IHa0 … Ha02) -a0 #a0 #Ha0 #Ha20
- elim (HR12 … Ha1 … Ha0) -HR12 -a /4 width=5 by step, ex2_intro/
-]
-qed.
-
-lemma TC_strip2: ∀A,R1,R2. confluent2 A R1 R2 →
- ∀a0,a2. TC … R2 a0 a2 → ∀a1. R1 a0 a1 →
- ∃∃a. TC … R2 a1 a & R1 a2 a.
-#A #R1 #R2 #HR12 #a0 #a2 #H elim H -a2
-[ #a2 #Ha02 #a1 #Ha01
- elim (HR12 … Ha01 … Ha02) -HR12 -a0 /3 width=3 by inj, ex2_intro/
-| #a #a2 #_ #Ha2 #IHa0 #a1 #Ha01
- elim (IHa0 … Ha01) -a0 #a0 #Ha10 #Ha0
- elim (HR12 … Ha0 … Ha2) -HR12 -a /4 width=3 by step, ex2_intro/
-]
-qed.
-
-lemma TC_confluent2: ∀A,R1,R2.
- confluent2 A R1 R2 → confluent2 A (TC … R1) (TC … R2).
-#A #R1 #R2 #HR12 #a0 #a1 #H elim H -a1
-[ #a1 #Ha01 #a2 #Ha02
- elim (TC_strip2 … HR12 … Ha02 … Ha01) -HR12 -a0 /3 width=3 by inj, ex2_intro/
-| #a #a1 #_ #Ha1 #IHa0 #a2 #Ha02
- elim (IHa0 … Ha02) -a0 #a0 #Ha0 #Ha20
- elim (TC_strip2 … HR12 … Ha0 … Ha1) -HR12 -a /4 width=5 by step, ex2_intro/
-]
-qed.
-
-lemma TC_strap1: ∀A,R1,R2. transitive2 A R1 R2 →
- ∀a1,a0. TC … R1 a1 a0 → ∀a2. R2 a0 a2 →
- ∃∃a. R2 a1 a & TC … R1 a a2.
-#A #R1 #R2 #HR12 #a1 #a0 #H elim H -a0
-[ #a0 #Ha10 #a2 #Ha02
- elim (HR12 … Ha10 … Ha02) -HR12 -a0 /3 width=3 by inj, ex2_intro/
-| #a #a0 #_ #Ha0 #IHa #a2 #Ha02
- elim (HR12 … Ha0 … Ha02) -HR12 -a0 #a0 #Ha0 #Ha02
- elim (IHa … Ha0) -a /4 width=5 by step, ex2_intro/
-]
-qed.
-
-lemma TC_strap2: ∀A,R1,R2. transitive2 A R1 R2 →
- ∀a0,a2. TC … R2 a0 a2 → ∀a1. R1 a1 a0 →
- ∃∃a. TC … R2 a1 a & R1 a a2.
-#A #R1 #R2 #HR12 #a0 #a2 #H elim H -a2
-[ #a2 #Ha02 #a1 #Ha10
- elim (HR12 … Ha10 … Ha02) -HR12 -a0 /3 width=3 by inj, ex2_intro/
-| #a #a2 #_ #Ha02 #IHa #a1 #Ha10
- elim (IHa … Ha10) -a0 #a0 #Ha10 #Ha0
- elim (HR12 … Ha0 … Ha02) -HR12 -a /4 width=3 by step, ex2_intro/
-]
-qed.
-
-lemma TC_transitive2: ∀A,R1,R2.
- transitive2 A R1 R2 → transitive2 A (TC … R1) (TC … R2).
-#A #R1 #R2 #HR12 #a1 #a0 #H elim H -a0
-[ #a0 #Ha10 #a2 #Ha02
- elim (TC_strap2 … HR12 … Ha02 … Ha10) -HR12 -a0 /3 width=3 by inj, ex2_intro/
-| #a #a0 #_ #Ha0 #IHa #a2 #Ha02
- elim (TC_strap2 … HR12 … Ha02 … Ha0) -HR12 -a0 #a0 #Ha0 #Ha02
- elim (IHa … Ha0) -a /4 width=5 by step, ex2_intro/
-]
-qed.
-
-lemma CTC_lsub_trans: ∀A,B,R,S. lsub_trans A B R S → lsub_trans A B (CTC … R) S.
-#A #B #R #S #HRS #L2 #T1 #T2 #H elim H -T2 /3 width=3 by inj/
-#T #T2 #_ #HT2 #IHT1 #L1 #HL12
-lapply (HRS … HT2 … HL12) -HRS -HT2 /3 width=3 by step/
-qed-.
-
-lemma s_r_conf1_CTC1: ∀A,B,S,R. s_r_confluent1 A B S R → s_r_confluent1 A B (CTC … S) R.
-#A #B #S #R #HSR #L1 #T1 #T2 #H @(TC_ind_dx … T1 H) -T1 /3 width=3 by/
-qed-.
-
-lemma s_r_trans_CTC1: ∀A,B,S,R. s_r_confluent1 A B S R →
- s_r_transitive A B S R → s_rs_transitive A B S R.
-#A #B #S #R #H1SR #H2SR #L2 #T1 #T2 #H @(TC_ind_dx … T1 H) -T1 /2 width=3 by/
-#T1 #T #HT1 #_ #IHT2 #L1 #HL12 lapply (H2SR … HT1 … HL12) -H2SR -HT1
-/4 width=5 by s_r_conf1_CTC1, trans_TC/
-qed-.
-
-lemma s_r_trans_CTC2: ∀A,B,S,R. s_rs_transitive A B S R → s_r_transitive A B S (CTC … R).
-#A #B #S #R #HSR #L2 #T1 #T2 #HT12 #L1 #H @(TC_ind_dx … L1 H) -L1 /3 width=3 by inj/
-qed-.
-
-lemma s_r_to_s_rs_trans: ∀A,B,S,R. s_r_transitive A B (CTC … S) R →
- s_rs_transitive A B S R.
-#A #B #S #R #HSR #L2 #T1 #T2 #HL2 #L1 #HT1
-elim (TC_idem … (S L1) … T1 T2)
-#_ #H @H @HSR //
-qed-.
-
-lemma s_rs_to_s_r_trans: ∀A,B,S,R. s_rs_transitive A B S R →
- s_r_transitive A B (CTC … S) R.
-#A #B #S #R #HSR #L2 #T1 #T2 #HL2 #L1 #HT1
-elim (TC_idem … (S L1) … T1 T2)
-#H #_ @H @HSR //
-qed-.
-
-lemma s_rs_trans_TC1: ∀A,B,S,R. s_rs_transitive A B S R →
- s_rs_transitive A B (CTC … S) R.
-#A #B #S #R #HSR #L2 #T1 #T2 #HL2 #L1 #HT1
-elim (TC_idem … (S L1) … T1 T2)
-elim (TC_idem … (S L2) … T1 T2)
-#_ #H1 #H2 #_ @H2 @HSR /3 width=3 by/
-qed-.
-
-(* Normal form and strong normalization *************************************)
-
-lemma SN_to_NF: ∀A,R,S. NF_dec A R S →
- ∀a1. SN A R S a1 →
- ∃∃a2. star … R a1 a2 & NF A R S a2.
-#A #R #S #HRS #a1 #H elim H -a1
-#a1 #_ #IHa1 elim (HRS a1) -HRS /2 width=3 by srefl, ex2_intro/
-* #a0 #Ha10 #Ha01 elim (IHa1 … Ha10 Ha01) -IHa1 -Ha01 /3 width=3 by star_compl, ex2_intro/
-qed-.
-
-(* Relations on unboxed pairs ***********************************************)
-
-lemma bi_TC_strip: ∀A,B,R. bi_confluent A B R →
- ∀a0,a1,b0,b1. R a0 b0 a1 b1 → ∀a2,b2. bi_TC … R a0 b0 a2 b2 →
- ∃∃a,b. bi_TC … R a1 b1 a b & R a2 b2 a b.
-#A #B #R #HR #a0 #a1 #b0 #b1 #H01 #a2 #b2 #H elim H -a2 -b2
-[ #a2 #b2 #H02
- elim (HR … H01 … H02) -HR -a0 -b0 /3 width=4 by ex2_2_intro, bi_inj/
-| #a2 #b2 #a3 #b3 #_ #H23 * #a #b #H1 #H2
- elim (HR … H23 … H2) -HR -a0 -b0 -a2 -b2 /3 width=4 by ex2_2_intro, bi_step/
-]
-qed.
-
-lemma bi_TC_confluent: ∀A,B,R. bi_confluent A B R →
- bi_confluent A B (bi_TC … R).
-#A #B #R #HR #a0 #a1 #b0 #b1 #H elim H -a1 -b1
-[ #a1 #b1 #H01 #a2 #b2 #H02
- elim (bi_TC_strip … HR … H01 … H02) -a0 -b0 /3 width=4 by ex2_2_intro, bi_inj/
-| #a1 #b1 #a3 #b3 #_ #H13 #IH #a2 #b2 #H02
- elim (IH … H02) -a0 -b0 #a0 #b0 #H10 #H20
- elim (bi_TC_strip … HR … H13 … H10) -a1 -b1 /3 width=7 by ex2_2_intro, bi_step/
-]
-qed.
-
-lemma bi_TC_decomp_r: ∀A,B. ∀R:bi_relation A B.
- ∀a1,a2,b1,b2. bi_TC … R a1 b1 a2 b2 →
- R a1 b1 a2 b2 ∨
- ∃∃a,b. bi_TC … R a1 b1 a b & R a b a2 b2.
-#A #B #R #a1 #a2 #b1 #b2 * -a2 -b2 /2 width=1/ /3 width=4 by ex2_2_intro, or_intror/
-qed-.
-
-lemma bi_TC_decomp_l: ∀A,B. ∀R:bi_relation A B.
- ∀a1,a2,b1,b2. bi_TC … R a1 b1 a2 b2 →
- R a1 b1 a2 b2 ∨
- ∃∃a,b. R a1 b1 a b & bi_TC … R a b a2 b2.
-#A #B #R #a1 #a2 #b1 #b2 #H @(bi_TC_ind_dx … a1 b1 H) -a1 -b1
-[ /2 width=1 by or_introl/
-| #a1 #a #b1 #b #Hab1 #Hab2 #_ /3 width=4 by ex2_2_intro, or_intror/ (**) (* auto fails without #_ *)
-]
-qed-.
-
-(* Relations on unboxed triples *********************************************)
-
-definition tri_star: ∀A,B,C,R. tri_relation A B C ≝
- λA,B,C,R. tri_RC A B C (tri_TC … R).
-
-lemma tri_star_tri_reflexive: ∀A,B,C,R. tri_reflexive A B C (tri_star … R).
-/2 width=1 by/ qed.
-
-lemma tri_TC_to_tri_star: ∀A,B,C,R,a1,b1,c1,a2,b2,c2.
- tri_TC A B C R a1 b1 c1 a2 b2 c2 →
- tri_star A B C R a1 b1 c1 a2 b2 c2.
-/2 width=1 by or_introl/ qed.
-
-lemma tri_R_to_tri_star: ∀A,B,C,R,a1,b1,c1,a2,b2,c2.
- R a1 b1 c1 a2 b2 c2 → tri_star A B C R a1 b1 c1 a2 b2 c2.
-/3 width=1 by tri_TC_to_tri_star, tri_inj/ qed.
-
-lemma tri_star_strap1: ∀A,B,C,R,a1,a,a2,b1,b,b2,c1,c,c2.
- tri_star A B C R a1 b1 c1 a b c →
- R a b c a2 b2 c2 → tri_star A B C R a1 b1 c1 a2 b2 c2.
-#A #B #C #R #a1 #a #a2 #b1 #b #b2 #c1 #c #c2 *
-[ /3 width=5 by tri_TC_to_tri_star, tri_step/
-| * #H1 #H2 #H3 destruct /2 width=1 by tri_R_to_tri_star/
-]
-qed.
-
-lemma tri_star_strap2: ∀A,B,C,R,a1,a,a2,b1,b,b2,c1,c,c2. R a1 b1 c1 a b c →
- tri_star A B C R a b c a2 b2 c2 →
- tri_star A B C R a1 b1 c1 a2 b2 c2.
-#A #B #C #R #a1 #a #a2 #b1 #b #b2 #c1 #c #c2 #H *
-[ /3 width=5 by tri_TC_to_tri_star, tri_TC_strap/
-| * #H1 #H2 #H3 destruct /2 width=1 by tri_R_to_tri_star/
-]
-qed.
-
-lemma tri_star_to_tri_TC_to_tri_TC: ∀A,B,C,R,a1,a,a2,b1,b,b2,c1,c,c2.
- tri_star A B C R a1 b1 c1 a b c →
- tri_TC A B C R a b c a2 b2 c2 →
- tri_TC A B C R a1 b1 c1 a2 b2 c2.
-#A #B #C #R #a1 #a #a2 #b1 #b #b2 #c1 #c #c2 *
-[ /2 width=5 by tri_TC_transitive/
-| * #H1 #H2 #H3 destruct /2 width=1 by/
-]
-qed.
-
-lemma tri_TC_to_tri_star_to_tri_TC: ∀A,B,C,R,a1,a,a2,b1,b,b2,c1,c,c2.
- tri_TC A B C R a1 b1 c1 a b c →
- tri_star A B C R a b c a2 b2 c2 →
- tri_TC A B C R a1 b1 c1 a2 b2 c2.
-#A #B #C #R #a1 #a #a2 #b1 #b #b2 #c1 #c #c2 #H *
-[ /2 width=5 by tri_TC_transitive/
-| * #H1 #H2 #H3 destruct /2 width=1 by/
-]
-qed.
-
-lemma tri_tansitive_tri_star: ∀A,B,C,R. tri_transitive A B C (tri_star … R).
-#A #B #C #R #a1 #a #b1 #b #c1 #c #H #a2 #b2 #c2 *
-[ /3 width=5 by tri_star_to_tri_TC_to_tri_TC, tri_TC_to_tri_star/
-| * #H1 #H2 #H3 destruct /2 width=1 by/
-]
-qed.
-
-lemma tri_star_ind: ∀A,B,C,R,a1,b1,c1. ∀P:relation3 A B C. P a1 b1 c1 →
- (∀a,a2,b,b2,c,c2. tri_star … R a1 b1 c1 a b c → R a b c a2 b2 c2 → P a b c → P a2 b2 c2) →
- ∀a2,b2,c2. tri_star … R a1 b1 c1 a2 b2 c2 → P a2 b2 c2.
-#A #B #C #R #a1 #b1 #c1 #P #H #IH #a2 #b2 #c2 *
-[ #H12 elim H12 -a2 -b2 -c2 /3 width=6 by tri_TC_to_tri_star/
-| * #H1 #H2 #H3 destruct //
-]
-qed-.
-
-lemma tri_star_ind_dx: ∀A,B,C,R,a2,b2,c2. ∀P:relation3 A B C. P a2 b2 c2 →
- (∀a1,a,b1,b,c1,c. R a1 b1 c1 a b c → tri_star … R a b c a2 b2 c2 → P a b c → P a1 b1 c1) →
- ∀a1,b1,c1. tri_star … R a1 b1 c1 a2 b2 c2 → P a1 b1 c1.
-#A #B #C #R #a2 #b2 #c2 #P #H #IH #a1 #b1 #c1 *
-[ #H12 @(tri_TC_ind_dx … a1 b1 c1 H12) -a1 -b1 -c1 /3 width=6 by tri_TC_to_tri_star/
-| * #H1 #H2 #H3 destruct //
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "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.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "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-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "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.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "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.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( l1 @@ break l2 )"
- right associative with precedence 47
- for @{ 'Append $l1 $l2 }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( f @❨ break term 46 a ❩ )"
- non associative with precedence 60
- for @{ 'Apply $f $a }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( 𝐁❨ term 46 l, break term 46 h ❩ )"
- non associative with precedence 90
- for @{ 'Basic $l $h }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation < "hvbox( Ⓔ )"
- non associative with precedence 55
- for @{ 'CircledE $S }.
-
-notation > "hvbox( Ⓔ )"
- non associative with precedence 55
- for @{ 'CircledE ? }.
-
-notation > "hvbox( Ⓔ{ term 46 C } )"
- non associative with precedence 55
- for @{ 'CircledE $S }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( f2 ~∘ break f1 )"
- right associative with precedence 60
- for @{ 'CoCompose $f2 $f1 }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "◊"
- non associative with precedence 55
- for @{ 'Diamond }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( ↓ term 70 T )"
- non associative with precedence 70
- for @{ 'DownArrow $T }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation < "hvbox( ⫰ term 46 a )"
- non associative with precedence 46
- for @{ 'DownSpoon $S $a }.
-
-notation > "hvbox( ⫰ term 46 a )"
- non associative with precedence 46
- for @{ 'DownSpoon ? $a }.
-
-notation > "hvbox( ⫰{ term 46 S } break term 46 a )"
- non associative with precedence 46
- for @{ 'DownSpoon $S $a }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation < "hvbox( ⫰*[ break term 46 n ] break term 46 a )"
- non associative with precedence 46
- for @{ 'DownSpoonStar $S $n $a }.
-
-notation > "hvbox( ⫰*[ break term 46 n ] break term 46 a )"
- non associative with precedence 46
- for @{ 'DownSpoonStar ? $n $a }.
-
-notation > "hvbox( ⫰*{ term 46 S }[ break term 46 n ] break term 46 a )"
- non associative with precedence 46
- for @{ 'DownSpoonStar $S $n $a }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( ⫱ term 46 T )"
- non associative with precedence 46
- for @{ 'DropPred $T }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( ⫱ *[ term 46 n ] break term 46 T )"
- non associative with precedence 46
- for @{ 'DropPreds $n $T }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( 𝐈𝐝 )"
- non associative with precedence 90
- for @{ 'Identity }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "∞"
- non associative with precedence 55
- for @{ 'Infinity }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "Ⓕ"
- non associative with precedence 55
- for @{'no}.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "𝟙𝟘"
- non associative with precedence 55
- for @{ 'OneZero }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation < "hvbox( hd ⨮ break tl )"
- right associative with precedence 47
- for @{ 'OPlusRight $S $hd $tl }.
-
-notation > "hvbox( hd ⨮ break tl )"
- right associative with precedence 47
- for @{ 'OPlusRight ? $hd $tl }.
-
-notation > "hvbox( hd ⨮{ break term 46 S } break term 46 tl )"
- non associative with precedence 47
- for @{ 'OPlusRight $S $hd $tl }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( ❨ term 46 hd1, break term 46 hd2 ❩; break term 46 tl )"
- non associative with precedence 47
- for @{ 'Semicolon $hd1 $hd2 $tl }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox ( 〈 term 46 x1, break term 46 x2 , break term 46 x3, break term 46 x4 〉 )"
- non associative with precedence 55
- for @{ 'Tuple $x1 $x2 $x3 $x4 }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( 𝐔 ❨ break term 46 a ❩ )"
- non associative with precedence 90
- for @{ 'Uniform $a }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( ↑ term 70 T )"
- non associative with precedence 70
- for @{ 'UpArrow $T }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( ↑*[ term 46 n ] break term 70 T )"
- non associative with precedence 70
- for @{ 'UpArrowStar $n $T }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( ↕* term 46 T )"
- non associative with precedence 46
- for @{ 'UpDownArrowStar $T }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( ⫯ term 46 T )"
- non associative with precedence 46
- for @{ 'UpSpoon $T }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( ⫯*[ term 46 n ] break term 46 T )"
- non associative with precedence 46
- for @{ 'UpSpoonStar $n $T }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "Ⓣ"
- non associative with precedence 55
- for @{'yes}.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "𝟘𝟙"
- non associative with precedence 55
- for @{ 'ZeroOne }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "𝟘𝟘"
- non associative with precedence 55
- for @{ 'ZeroZero }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation < "hvbox( f1 ≐ break term 46 f2 )"
- non associative with precedence 45
- for @{ 'DotEq $A $B $f1 $f2 }.
-
-notation > "hvbox( f1 ≐ break term 46 f2 )"
- non associative with precedence 45
- for @{ 'DotEq ? ? $f1 $f2 }.
-
-notation > "hvbox( f1 ≐{ break term 46 A, break term 46 B } break term 46 f2 )"
- non associative with precedence 45
- for @{ 'DotEq $A $B $f1 $f2 }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( f1 ≡ break term 46 f2 )"
- non associative with precedence 45
- for @{ 'IdEq $f1 $f2 }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( 𝛀❪ term 46 f ❫ )"
- non associative with precedence 45
- for @{ 'IsDivergent $f }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( 𝐅❪ term 46 f ❫ )"
- non associative with precedence 45
- for @{ 'IsFinite $f }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( 𝐈❪ term 46 f ❫ )"
- non associative with precedence 45
- for @{ 'IsIdentity $f }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( 𝐑𝐓❪ term 46 n, break term 46 c ❫ )"
- non associative with precedence 45
- for @{ 'IsRedType $n $c }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( 𝐓❪ term 46 f ❫ )"
- non associative with precedence 45
- for @{ 'IsTotal $f }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( 𝐓❪ term 46 n, break term 46 c ❫ )"
- non associative with precedence 45
- for @{ 'IsType $n $c }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( 𝐔❪ term 46 f ❫ )"
- non associative with precedence 45
- for @{ 'IsUniform $f }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( f1 ∥ break term 46 f2 )"
- non associative with precedence 45
- for @{ 'Parallel $f1 $f2 }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( f1 ⊚ break term 46 f2 ≘ break term 46 f )"
- non associative with precedence 45
- for @{ 'RAfter $f1 $f2 $f }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( @❪ term 46 T1 , break term 46 f ❫ ≘ break term 46 T2 )"
- non associative with precedence 45
- for @{ 'RAt $T1 $f $T2 }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( f1 ~⊚ break term 46 f2 ≘ break term 46 f )"
- non associative with precedence 45
- for @{ 'RCoAfter $f1 $f2 $f }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( 𝐂❪ term 46 f ❫ ≘ break term 46 n )"
- non associative with precedence 45
- for @{ 'RCoLength $f $n }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation < "hvbox( v1 ≗ break term 46 v2 )"
- non associative with precedence 45
- for @{ 'RingEq $M $v1 $v2 }.
-
-notation > "hvbox( v1 ≗ break term 46 v2 )"
- non associative with precedence 45
- for @{ 'RingEq ? $v1 $v2 }.
-
-notation > "hvbox( v1 ≗{ break term 46 M } break term 46 v2 )"
- non associative with precedence 45
- for @{ 'RingEq $M $v1 $v2 }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( L1 ⋒ break term 46 L2 ≘ break term 46 L )"
- non associative with precedence 45
- for @{ 'RIntersection $L1 $L2 $L }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( T1 ▭ break term 46 T2 ≘ break term 46 T )"
- non associative with precedence 45
- for @{ 'RMinus $T1 $T2 $T }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( L1 ⋓ break term 46 L2 ≘ break term 46 L )"
- non associative with precedence 45
- for @{ 'RUnion $L1 $L2 $L }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation > "hvbox(∧∧ term 34 P0 break & term 34 P1)"
- non associative with precedence 35
- for @{ 'and $P0 $P1 }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple conjunction connective (3) *)
-
-notation "hvbox(∧∧ term 34 P0 break & term 34 P1 break & term 34 P2)"
- non associative with precedence 35
- for @{ 'And $P0 $P1 $P2 }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple conjunction connective (4) *)
-
-notation "hvbox(∧∧ term 34 P0 break & term 34 P1 break & term 34 P2 break & term 34 P3)"
- non associative with precedence 35
- for @{ 'And $P0 $P1 $P2 $P3 }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (1, 2) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0)"
- non associative with precedence 20
- for @{ 'Ex2 (λ${ident x0}.λ${ident x1}.$P0) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0)"
- non associative with precedence 20
- for @{ 'Ex2 (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (1, 3) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0)"
- non associative with precedence 20
- for @{ 'Ex3 (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0)"
- non associative with precedence 20
- for @{ 'Ex3 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* 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) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (2, 2) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1)"
- non associative with precedence 20
- for @{ 'Ex2 (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1)"
- non associative with precedence 20
- for @{ 'Ex2 (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (2, 3) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1)"
- non associative with precedence 20
- for @{ 'Ex3 (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1)"
- non associative with precedence 20
- for @{ 'Ex3 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (3, 1) *)
-
-notation > "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.$P0) (λ${ident x0}.$P1) (λ${ident x0}.$P2) }.
-
-notation < "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.$P0) (λ${ident x0}:$T0.$P1) (λ${ident x0}:$T0.$P2) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (3, 2) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
- non associative with precedence 20
- for @{ 'Ex2 (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) (λ${ident x0}.λ${ident x1}.$P2) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
- non associative with precedence 20
- for @{ 'Ex2 (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P2) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (3, 3) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
- non associative with precedence 20
- for @{ 'Ex3 (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
- non associative with precedence 20
- for @{ 'Ex3 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (3, 4) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
- non associative with precedence 20
- for @{ 'Ex4 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
- non associative with precedence 20
- for @{ 'Ex4 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (3, 5) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
- non associative with precedence 20
- for @{ 'Ex5 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2)"
- non associative with precedence 20
- for @{ 'Ex5 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (4, 1) *)
-
-notation > "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.$P0) (λ${ident x0}.$P1) (λ${ident x0}.$P2) (λ${ident x0}.$P3) }.
-
-notation < "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.$P0) (λ${ident x0}:$T0.$P1) (λ${ident x0}:$T0.$P2) (λ${ident x0}:$T0.$P3) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (4, 2) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
- non associative with precedence 20
- for @{ 'Ex2 (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) (λ${ident x0}.λ${ident x1}.$P2) (λ${ident x0}.λ${ident x1}.$P3) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
- non associative with precedence 20
- for @{ 'Ex2 (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P3) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (4, 3) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
- non associative with precedence 20
- for @{ 'Ex3 (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
- non associative with precedence 20
- for @{ 'Ex3 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (4, 4) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
- non associative with precedence 20
- for @{ 'Ex4 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
- non associative with precedence 20
- for @{ 'Ex4 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (4, 5) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
- non associative with precedence 20
- for @{ 'Ex5 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)"
- non associative with precedence 20
- for @{ 'Ex5 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (5, 1) *)
-
-notation > "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}.$P0) (λ${ident x0}.$P1) (λ${ident x0}.$P2) (λ${ident x0}.$P3) (λ${ident x0}.$P4) }.
-
-notation < "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex (λ${ident x0}:$T0.$P0) (λ${ident x0}:$T0.$P1) (λ${ident x0}:$T0.$P2) (λ${ident x0}:$T0.$P3) (λ${ident x0}:$T0.$P4) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (5, 2) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex2 (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) (λ${ident x0}.λ${ident x1}.$P2) (λ${ident x0}.λ${ident x1}.$P3) (λ${ident x0}.λ${ident x1}.$P4) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex2 (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P4) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (5, 3) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex3 (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P4) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex3 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P4) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (5, 4) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex4 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P4) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex4 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P4) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (5, 5) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex5 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P4) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex5 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P4) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (5, 6) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex6 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P4) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex6 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P4) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (5, 7) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex7 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P4) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)"
- non associative with precedence 20
- for @{ 'Ex7 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P4) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (6, 3) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex3 (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P5) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex3 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P5) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (6, 4) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex4 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P5) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex4 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P5) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (6, 5) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex5 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P5) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex5 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P5) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (6, 6) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex6 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P5) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex6 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P5) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (6, 7) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex7 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P5) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex7 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P5) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (6, 8) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 , ident x7 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex8 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.$P5) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 , ident x7 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex8 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.$P5) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (6, 9) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 , ident x7 , ident x8 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex9 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.$P5) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 , ident x7 , ident x8 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)"
- non associative with precedence 20
- for @{ 'Ex9 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.$P5) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (7, 10) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 , ident x7 , ident x8 , ident x9 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
- non associative with precedence 20
- for @{ 'Ex10 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.λ${ident x9}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.λ${ident x9}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.λ${ident x9}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.λ${ident x9}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.λ${ident x9}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.λ${ident x9}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.λ${ident x7}.λ${ident x8}.λ${ident x9}.$P6) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 , ident x7 , ident x8 , ident x9 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
- non associative with precedence 20
- for @{ 'Ex10 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.λ${ident x9}:$T9.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.λ${ident x9}:$T9.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.λ${ident x9}:$T9.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.λ${ident x9}:$T9.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.λ${ident x9}:$T9.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.λ${ident x9}:$T9.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.λ${ident x7}:$T7.λ${ident x8}:$T8.λ${ident x9}:$T9.$P6) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (7, 3) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
- non associative with precedence 20
- for @{ 'Ex3 (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P6) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
- non associative with precedence 20
- for @{ 'Ex3 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P6) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (7, 4) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
- non associative with precedence 20
- for @{ 'Ex4 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P6) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
- non associative with precedence 20
- for @{ 'Ex4 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P6) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (7, 5) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
- non associative with precedence 20
- for @{ 'Ex5 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P6) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
- non associative with precedence 20
- for @{ 'Ex5 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P6) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (7, 6) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
- non associative with precedence 20
- for @{ 'Ex6 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P6) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
- non associative with precedence 20
- for @{ 'Ex6 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P6) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (7, 7) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
- non associative with precedence 20
- for @{ 'Ex7 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P6) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)"
- non associative with precedence 20
- for @{ 'Ex7 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P6) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (8, 4) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6 break & term 19 P7)"
- non associative with precedence 20
- for @{ 'Ex4 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P6) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P7) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6 break & term 19 P7)"
- non associative with precedence 20
- for @{ 'Ex4 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P6) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P7) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (8, 5) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6 break & term 19 P7)"
- non associative with precedence 20
- for @{ 'Ex5 (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P6) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P7) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6 break & term 19 P7)"
- non associative with precedence 20
- for @{ 'Ex5 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P6) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P7) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple existental quantifier (9, 3) *)
-
-notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6 break & term 19 P7 break & term 19 P8)"
- non associative with precedence 20
- for @{ 'Ex3 (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P6) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P7) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P8) }.
-
-notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6 break & term 19 P7 break & term 19 P8)"
- non associative with precedence 20
- for @{ 'Ex3 (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P6) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P7) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P8) }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "⊥"
- non associative with precedence 19
- for @{'false}.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation > "hvbox(∨∨ term 29 P0 break | term 29 P1)"
- non associative with precedence 30
- for @{ 'or $P0 $P1 }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple disjunction connective (3) *)
-
-notation "hvbox(∨∨ term 29 P0 break | term 29 P1 break | term 29 P2)"
- non associative with precedence 30
- for @{ 'Or $P0 $P1 $P2 }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple disjunction connective (4) *)
-
-notation "hvbox(∨∨ term 29 P0 break | term 29 P1 break | term 29 P2 break | term 29 P3)"
- non associative with precedence 30
- for @{ 'Or $P0 $P1 $P2 $P3 }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-(* multiple disjunction connective (5) *)
-
-notation "hvbox(∨∨ term 29 P0 break | term 29 P1 break | term 29 P2 break | term 29 P3 break | term 29 P4)"
- non associative with precedence 30
- for @{ 'Or $P0 $P1 $P2 $P3 $P4 }.
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "⊤"
- non associative with precedence 19
- for @{'true}.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "basics/pts.ma".
-
-(* GENERATED LIBRARY ********************************************************)
-
-lemma pull_2 (A1:Type[0])
- (A2:Type[0])
- (A:A1→A2→Type[0]):
- (∀x2,x1. A x1 x2) →
- (∀x1,x2. A x1 x2).
-/2 width=1 by/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "basics/pts.ma".
-
-(* GENERATED LIBRARY ********************************************************)
-
-lemma pull_4 (A1:Type[0])
- (A2:A1→Type[0])
- (A3:∀x1.A2 x1→Type[0])
- (A4:Type[0])
- (A:∀x1:A1.∀x2:A2 x1.A3 x1 x2 → A4 → Type[0]):
- (∀x4,x1,x2,x3. A x1 x2 x3 x4) →
- (∀x1,x2,x3,x4. A x1 x2 x3 x4).
-/2 width=1 by/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/functions/diamond_0.ma".
-include "ground_2/notation/functions/semicolon_3.ma".
-include "ground_2/lib/arith.ma".
-
-(* MULTIPLE RELOCATION WITH PAIRS *******************************************)
-
-inductive mr2: Type[0] :=
- | nil2 : mr2
- | cons2: nat → nat → mr2 → mr2.
-
-interpretation "nil (multiple relocation with pairs)"
- 'Diamond = (nil2).
-
-interpretation "cons (multiple relocation with pairs)"
- 'Semicolon hd1 hd2 tl = (cons2 hd1 hd2 tl).
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/functions/append_2.ma".
-include "ground_2/relocation/mr2.ma".
-
-(* MULTIPLE RELOCATION WITH PAIRS *******************************************)
-
-let rec mr2_append cs1 cs2 on cs1 ≝
- match cs1 with
- [ nil2 ⇒ cs2
- | cons2 l m cs1 ⇒ ❨l, m❩; mr2_append cs1 cs2
- ].
-
-interpretation "append (multiple relocation with pairs)"
- 'Append cs1 cs2 = (mr2_append cs1 cs2).
-
-(* Basic properties *********************************************************)
-
-lemma mr2_append_nil (cs2): cs2 = ◊ @@ cs2.
-// qed.
-
-lemma mr2_append_cons (l) (m) (cs1) (cs2):
- ❨l, m❩; (cs1 @@ cs2) = (❨l, m❩; cs1) @@ cs2.
-// qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/rat_3.ma".
-include "ground_2/relocation/mr2.ma".
-
-(* MULTIPLE RELOCATION WITH PAIRS *******************************************)
-
-inductive at: mr2 → relation nat ≝
-| at_nil: ∀i. at (◊) i i
-| at_lt : ∀cs,l,m,i1,i2. i1 < l →
- at cs i1 i2 → at (❨l, m❩;cs) i1 i2
-| at_ge : ∀cs,l,m,i1,i2. l ≤ i1 →
- at cs (i1 + m) i2 → at (❨l, m❩;cs) i1 i2
-.
-
-interpretation "application (multiple relocation with pairs)"
- 'RAt i1 cs i2 = (at cs i1 i2).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact at_inv_nil_aux: ∀cs,i1,i2. @❪i1, cs❫ ≘ i2 → cs = ◊ → i1 = i2.
-#cs #i1 #i2 * -cs -i1 -i2
-[ //
-| #cs #l #m #i1 #i2 #_ #_ #H destruct
-| #cs #l #m #i1 #i2 #_ #_ #H destruct
-]
-qed-.
-
-lemma at_inv_nil: ∀i1,i2. @❪i1, ◊❫ ≘ i2 → i1 = i2.
-/2 width=3 by at_inv_nil_aux/ qed-.
-
-fact at_inv_cons_aux: ∀cs,i1,i2. @❪i1, cs❫ ≘ i2 →
- ∀l,m,cs0. cs = ❨l, m❩;cs0 →
- i1 < l ∧ @❪i1, cs0❫ ≘ i2 ∨
- l ≤ i1 ∧ @❪i1 + m, cs0❫ ≘ i2.
-#cs #i1 #i2 * -cs -i1 -i2
-[ #i #l #m #cs #H destruct
-| #cs1 #l1 #m1 #i1 #i2 #Hil1 #Hi12 #l2 #m2 #cs2 #H destruct /3 width=1 by or_introl, conj/
-| #cs1 #l1 #m1 #i1 #i2 #Hli1 #Hi12 #l2 #m2 #cs2 #H destruct /3 width=1 by or_intror, conj/
-]
-qed-.
-
-lemma at_inv_cons: ∀cs,l,m,i1,i2. @❪i1, ❨l, m❩;cs❫ ≘ i2 →
- i1 < l ∧ @❪i1, cs❫ ≘ i2 ∨
- l ≤ i1 ∧ @❪i1 + m, cs❫ ≘ i2.
-/2 width=3 by at_inv_cons_aux/ qed-.
-
-lemma at_inv_cons_lt: ∀cs,l,m,i1,i2. @❪i1, ❨l, m❩;cs❫ ≘ i2 →
- i1 < l → @❪i1, cs❫ ≘ i2.
-#cs #l #m #i1 #m2 #H
-elim (at_inv_cons … H) -H * // #Hli1 #_ #Hi1l
-elim (lt_le_false … Hi1l Hli1)
-qed-.
-
-lemma at_inv_cons_ge: ∀cs,l,m,i1,i2. @❪i1, ❨l, m❩;cs❫ ≘ i2 →
- l ≤ i1 → @❪i1 + m, cs❫ ≘ i2.
-#cs #l #m #i1 #m2 #H
-elim (at_inv_cons … H) -H * // #Hi1l #_ #Hli1
-elim (lt_le_false … Hi1l Hli1)
-qed-.
-
-(* Main properties **********************************************************)
-
-theorem at_mono: ∀cs,i,i1. @❪i, cs❫ ≘ i1 → ∀i2. @❪i, cs❫ ≘ i2 → i1 = i2.
-#cs #i #i1 #H elim H -cs -i -i1
-[ #i #x #H <(at_inv_nil … H) -x //
-| #cs #l #m #i #i1 #Hil #_ #IHi1 #x #H
- lapply (at_inv_cons_lt … H Hil) -H -Hil /2 width=1 by/
-| #cs #l #m #i #i1 #Hli #_ #IHi1 #x #H
- lapply (at_inv_cons_ge … H Hli) -H -Hli /2 width=1 by/
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/rminus_3.ma".
-include "ground_2/relocation/mr2.ma".
-
-(* MULTIPLE RELOCATION WITH PAIRS *******************************************)
-
-inductive minuss: nat → relation mr2 ≝
-| minuss_nil: ∀i. minuss i (◊) (◊)
-| minuss_lt : ∀cs1,cs2,l,m,i. i < l → minuss i cs1 cs2 →
- minuss i (❨l, m❩;cs1) (❨l - i, m❩;cs2)
-| minuss_ge : ∀cs1,cs2,l,m,i. l ≤ i → minuss (m + i) cs1 cs2 →
- minuss i (❨l, m❩;cs1) cs2
-.
-
-interpretation "minus (multiple relocation with pairs)"
- 'RMinus cs1 i cs2 = (minuss i cs1 cs2).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact minuss_inv_nil1_aux: ∀cs1,cs2,i. cs1 ▭ i ≘ cs2 → cs1 = ◊ → cs2 = ◊.
-#cs1 #cs2 #i * -cs1 -cs2 -i
-[ //
-| #cs1 #cs2 #l #m #i #_ #_ #H destruct
-| #cs1 #cs2 #l #m #i #_ #_ #H destruct
-]
-qed-.
-
-lemma minuss_inv_nil1: ∀cs2,i. ◊ ▭ i ≘ cs2 → cs2 = ◊.
-/2 width=4 by minuss_inv_nil1_aux/ qed-.
-
-fact minuss_inv_cons1_aux: ∀cs1,cs2,i. cs1 ▭ i ≘ cs2 →
- ∀l,m,cs. cs1 = ❨l, m❩;cs →
- l ≤ i ∧ cs ▭ m + i ≘ cs2 ∨
- ∃∃cs0. i < l & cs ▭ i ≘ cs0 &
- cs2 = ❨l - i, m❩;cs0.
-#cs1 #cs2 #i * -cs1 -cs2 -i
-[ #i #l #m #cs #H destruct
-| #cs1 #cs #l1 #m1 #i1 #Hil1 #Hcs #l2 #m2 #cs2 #H destruct /3 width=3 by ex3_intro, or_intror/
-| #cs1 #cs #l1 #m1 #i1 #Hli1 #Hcs #l2 #m2 #cs2 #H destruct /3 width=1 by or_introl, conj/
-]
-qed-.
-
-lemma minuss_inv_cons1: ∀cs1,cs2,l,m,i. ❨l, m❩;cs1 ▭ i ≘ cs2 →
- l ≤ i ∧ cs1 ▭ m + i ≘ cs2 ∨
- ∃∃cs. i < l & cs1 ▭ i ≘ cs &
- cs2 = ❨l - i, m❩;cs.
-/2 width=3 by minuss_inv_cons1_aux/ qed-.
-
-lemma minuss_inv_cons1_ge: ∀cs1,cs2,l,m,i. ❨l, m❩;cs1 ▭ i ≘ cs2 →
- l ≤ i → cs1 ▭ m + i ≘ cs2.
-#cs1 #cs2 #l #m #i #H
-elim (minuss_inv_cons1 … H) -H * // #cs #Hil #_ #_ #Hli
-elim (lt_le_false … Hil Hli)
-qed-.
-
-lemma minuss_inv_cons1_lt: ∀cs1,cs2,l,m,i. ❨l, m❩;cs1 ▭ i ≘ cs2 →
- i < l →
- ∃∃cs. cs1 ▭ i ≘ cs & cs2 = ❨l - i, m❩;cs.
-#cs1 #cs2 #l #m #i #H elim (minuss_inv_cons1 … H) -H * /2 width=3 by ex2_intro/
-#Hli #_ #Hil elim (lt_le_false … Hil Hli)
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/relocation/mr2.ma".
-
-(* MULTIPLE RELOCATION WITH PAIRS *******************************************)
-
-rec definition pluss (cs:mr2) (i:nat) on cs ≝ match cs with
-[ nil2 ⇒ ◊
-| cons2 l m cs ⇒ ❨l + i,m❩;pluss cs i
-].
-
-interpretation "plus (multiple relocation with pairs)"
- 'plus x y = (pluss x y).
-
-(* Basic properties *********************************************************)
-
-lemma pluss_SO2: ∀l,m,cs. (❨l,m❩;cs) + 1 = ❨↑l,m❩;cs + 1.
-normalize // qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma pluss_inv_nil2: ∀i,cs. cs + i = ◊ → cs = ◊.
-#i * // normalize
-#l #m #cs #H destruct
-qed.
-
-lemma pluss_inv_cons2: ∀i,l,m,cs2,cs. cs + i = ❨l,m❩;cs2 →
- ∃∃cs1. cs1 + i = cs2 & cs = ❨l - i,m❩;cs1.
-#i #l #m #cs2 *
-[ normalize #H destruct
-| #l1 #m1 #cs1 whd in ⊢ (??%?→?); #H destruct
- <minus_plus_m_m /2 width=3 by ex2_intro/
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/functions/upspoon_1.ma".
-include "ground_2/lib/stream_tls.ma".
-
-(* RELOCATION N-STREAM ******************************************************)
-
-definition rtmap: Type[0] ≝ stream nat.
-
-definition push: rtmap → rtmap ≝ λf. 0⨮f.
-
-interpretation "push (nstream)" 'UpSpoon f = (push f).
-
-definition next: rtmap → rtmap.
-* #n #f @(↑n⨮f)
-defined.
-
-interpretation "next (nstream)" 'UpArrow f = (next f).
-
-(* Basic properties *********************************************************)
-
-lemma push_rew: ∀f. 0⨮f = ⫯f.
-// qed.
-
-lemma next_rew: ∀f,n. (↑n)⨮f = ↑(n⨮f).
-// qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma injective_push: injective ? ? push.
-#f1 #f2 normalize #H destruct //
-qed-.
-
-lemma discr_push_next: ∀f1,f2. ⫯f1 = ↑f2 → ⊥.
-#f1 * #n2 #f2 normalize #H destruct
-qed-.
-
-lemma discr_next_push: ∀f1,f2. ↑f1 = ⫯f2 → ⊥.
-* #n1 #f1 #f2 normalize #H destruct
-qed-.
-
-lemma injective_next: injective ? ? next.
-* #n1 #f1 * #n2 #f2 normalize #H destruct //
-qed-.
-
-lemma push_inv_seq_sn: ∀f,g,n. n⨮g = ⫯f → 0 = n ∧ g = f.
-#f #g #n <push_rew #H destruct /2 width=1 by conj/
-qed-.
-
-lemma push_inv_seq_dx: ∀f,g,n. ⫯f = n⨮g → 0 = n ∧ g = f.
-#f #g #n <push_rew #H destruct /2 width=1 by conj/
-qed-.
-
-lemma next_inv_seq_sn: ∀f,g,n. n⨮g = ↑f → ∃∃m. m⨮g = f & ↑m = n.
-* #m #f #g #n <next_rew #H destruct /2 width=3 by ex2_intro/
-qed-.
-
-lemma next_inv_seq_dx: ∀f,g,n. ↑f = n⨮g → ∃∃m. m⨮g = f & ↑m = n.
-* #m #f #g #n <next_rew #H destruct /2 width=3 by ex2_intro/
-qed-.
-
-lemma case_prop: ∀R:predicate rtmap.
- (∀f. R (⫯f)) → (∀f. R (↑f)) → ∀f. R f.
-#R #H1 #H2 * * //
-qed-.
-
-lemma case_type0: ∀R:rtmap→Type[0].
- (∀f. R (⫯f)) → (∀f. R (↑f)) → ∀f. R f.
-#R #H1 #H2 * * //
-qed-.
-
-lemma iota_push: ∀R,a,b,f. a f = case_type0 R a b (⫯f).
-// qed.
-
-lemma iota_next: ∀R,a,b,f. b f = case_type0 R a b (↑f).
-#R #a #b * //
-qed.
-
-(* Specific properties ******************************************************)
-
-lemma tl_push: ∀f. f = ⫰⫯f.
-// qed.
-
-lemma tl_next: ∀f. ⫰f = ⫰↑f.
-* // qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/relocation/nstream_istot.ma".
-include "ground_2/relocation/rtmap_after.ma".
-
-(* RELOCATION N-STREAM ******************************************************)
-
-corec definition compose: rtmap → rtmap → rtmap.
-#f2 * #n1 #f1 @(seq … (f2@❨n1❩)) @(compose ? f1) -compose -f1
-@(⫰*[↑n1] f2)
-defined.
-
-interpretation "functional composition (nstream)"
- 'compose f2 f1 = (compose f2 f1).
-
-(* Basic properies on compose ***********************************************)
-
-lemma compose_rew: ∀f2,f1,n1. f2@❨n1❩⨮(⫰*[↑n1]f2)∘f1 = f2∘(n1⨮f1).
-#f2 #f1 #n1 <(stream_rew … (f2∘(n1⨮f1))) normalize //
-qed.
-
-lemma compose_next: ∀f2,f1,f. f2∘f1 = f → (↑f2)∘f1 = ↑f.
-#f2 * #n1 #f1 #f <compose_rew <compose_rew
-* -f <tls_S1 /2 width=1 by eq_f2/
-qed.
-
-(* Basic inversion lemmas on compose ****************************************)
-
-lemma compose_inv_rew: ∀f2,f1,f,n1,n. f2∘(n1⨮f1) = n⨮f →
- f2@❨n1❩ = n ∧ (⫰*[↑n1]f2)∘f1 = f.
-#f2 #f1 #f #n1 #n <(stream_rew … (f2∘(n1⨮f1))) normalize
-#H destruct /2 width=1 by conj/
-qed-.
-
-lemma compose_inv_O2: ∀f2,f1,f,n2,n. (n2⨮f2)∘(⫯f1) = n⨮f →
- n2 = n ∧ f2∘f1 = f.
-#f2 #f1 #f #n2 #n <compose_rew
-#H destruct /2 width=1 by conj/
-qed-.
-
-lemma compose_inv_S2: ∀f2,f1,f,n2,n1,n. (n2⨮f2)∘(↑n1⨮f1) = n⨮f →
- ↑(n2+f2@❨n1❩) = n ∧ f2∘(n1⨮f1) = f2@❨n1❩⨮f.
-#f2 #f1 #f #n2 #n1 #n <compose_rew
-#H destruct <tls_S1 /2 width=1 by conj/
-qed-.
-
-lemma compose_inv_S1: ∀f2,f1,f,n1,n. (↑f2)∘(n1⨮f1) = n⨮f →
- ↑(f2@❨n1❩) = n ∧ f2∘(n1⨮f1) = f2@❨n1❩⨮f.
-#f2 #f1 #f #n1 #n <compose_rew
-#H destruct <tls_S1 /2 width=1 by conj/
-qed-.
-
-(* Specific properties on after *********************************************)
-
-lemma after_O2: ∀f2,f1,f. f2 ⊚ f1 ≘ f →
- ∀n. n⨮f2 ⊚ ⫯f1 ≘ n⨮f.
-#f2 #f1 #f #Hf #n elim n -n /2 width=7 by after_refl, after_next/
-qed.
-
-lemma after_S2: ∀f2,f1,f,n1,n. f2 ⊚ n1⨮f1 ≘ n⨮f →
- ∀n2. n2⨮f2 ⊚ ↑n1⨮f1 ≘ ↑(n2+n)⨮f.
-#f2 #f1 #f #n1 #n #Hf #n2 elim n2 -n2 /2 width=7 by after_next, after_push/
-qed.
-
-lemma after_apply: ∀n1,f2,f1,f. (⫰*[↑n1] f2) ⊚ f1 ≘ f → f2 ⊚ n1⨮f1 ≘ f2@❨n1❩⨮f.
-#n1 elim n1 -n1
-[ * /2 width=1 by after_O2/
-| #n1 #IH * /3 width=1 by after_S2/
-]
-qed-.
-
-corec lemma after_total_aux: ∀f2,f1,f. f2 ∘ f1 = f → f2 ⊚ f1 ≘ f.
-* #n2 #f2 * #n1 #f1 * #n #f cases n2 -n2
-[ cases n1 -n1
- [ #H cases (compose_inv_O2 … H) -H /3 width=7 by after_refl, eq_f2/
- | #n1 #H cases (compose_inv_S2 … H) -H * -n /3 width=7 by after_push/
- ]
-| #n2 >next_rew #H cases (compose_inv_S1 … H) -H * -n /3 width=5 by after_next/
-]
-qed-.
-
-theorem after_total: ∀f1,f2. f2 ⊚ f1 ≘ f2 ∘ f1.
-/2 width=1 by after_total_aux/ qed.
-
-(* Specific inversion lemmas on after ***************************************)
-
-lemma after_inv_xpx: ∀f2,g2,f,n2,n. n2⨮f2 ⊚ g2 ≘ n⨮f → ∀f1. ⫯f1 = g2 →
- f2 ⊚ f1 ≘ f ∧ n2 = n.
-#f2 #g2 #f #n2 elim n2 -n2
-[ #n #Hf #f1 #H2 elim (after_inv_ppx … Hf … H2) -g2 [2,3: // ]
- #g #Hf #H elim (push_inv_seq_dx … H) -H destruct /2 width=1 by conj/
-| #n2 #IH #n #Hf #f1 #H2 elim (after_inv_nxx … Hf) -Hf [2,3: // ]
- #g1 #Hg #H1 elim (next_inv_seq_dx … H1) -H1
- #x #Hx #H destruct elim (IH … Hg) [2,3: // ] -IH -Hg
- #H destruct /2 width=1 by conj/
-]
-qed-.
-
-lemma after_inv_xnx: ∀f2,g2,f,n2,n. n2⨮f2 ⊚ g2 ≘ n⨮f → ∀f1. ↑f1 = g2 →
- ∃∃m. f2 ⊚ f1 ≘ m⨮f & ↑(n2+m) = n.
-#f2 #g2 #f #n2 elim n2 -n2
-[ #n #Hf #f1 #H2 elim (after_inv_pnx … Hf … H2) -g2 [2,3: // ]
- #g #Hf #H elim (next_inv_seq_dx … H) -H
- #x #Hx #Hg destruct /2 width=3 by ex2_intro/
-| #n2 #IH #n #Hf #f1 #H2 elim (after_inv_nxx … Hf) -Hf [2,3: // ]
- #g #Hg #H elim (next_inv_seq_dx … H) -H
- #x #Hx #H destruct elim (IH … Hg) -IH -Hg [2,3: // ]
- #m #Hf #Hm destruct /2 width=3 by ex2_intro/
-]
-qed-.
-
-lemma after_inv_const: ∀f2,f1,f,n1,n. n⨮f2 ⊚ n1⨮f1 ≘ n⨮f → f2 ⊚ f1 ≘ f ∧ 0 = n1.
-#f2 #f1 #f #n1 #n elim n -n
-[ #H elim (after_inv_pxp … H) -H [ |*: // ]
- #g2 #Hf #H elim (push_inv_seq_dx … H) -H /2 width=1 by conj/
-| #n #IH #H lapply (after_inv_nxn … H ????) -H /2 width=5 by/
-]
-qed-.
-
-lemma after_inv_total: ∀f2,f1,f. f2 ⊚ f1 ≘ f → f2 ∘ f1 ≡ f.
-/2 width=4 by after_mono/ qed-.
-
-(* Specific forward lemmas on after *****************************************)
-
-lemma after_fwd_hd: ∀f2,f1,f,n1,n. f2 ⊚ n1⨮f1 ≘ n⨮f → f2@❨n1❩ = n.
-#f2 #f1 #f #n1 #n #H lapply (after_fwd_at ? n1 0 … H) -H [1,2,3: // ]
-/3 width=2 by at_inv_O1, sym_eq/
-qed-.
-
-lemma after_fwd_tls: ∀f,f1,n1,f2,n2,n. n2⨮f2 ⊚ n1⨮f1 ≘ n⨮f →
- (⫰*[n1]f2) ⊚ f1 ≘ f.
-#f #f1 #n1 elim n1 -n1
-[ #f2 #n2 #n #H elim (after_inv_xpx … H) -H //
-| #n1 #IH * #m1 #f2 #n2 #n #H elim (after_inv_xnx … H) -H [2,3: // ]
- #m #Hm #H destruct /2 width=3 by/
-]
-qed-.
-
-lemma after_inv_apply: ∀f2,f1,f,n2,n1,n. n2⨮f2 ⊚ n1⨮f1 ≘ n⨮f →
- (n2⨮f2)@❨n1❩ = n ∧ (⫰*[n1]f2) ⊚ f1 ≘ f.
-/3 width=3 by after_fwd_tls, after_fwd_hd, conj/ qed-.
-
-(* Properties on apply ******************************************************)
-
-lemma compose_apply (f2) (f1) (i): f2@❨f1@❨i❩❩ = (f2∘f1)@❨i❩.
-/4 width=6 by after_fwd_at, at_inv_total, sym_eq/ qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/relocation/rtmap_basic.ma".
-include "ground_2/relocation/nstream_after.ma".
-
-(* RELOCATION N-STREAM ******************************************************)
-
-(* Specific properties on basic relocation **********************************)
-
-lemma apply_basic_lt: ∀m,n,i. i < m → 𝐁❨m,n❩@❨i❩ = i.
-/3 width=1 by at_inv_total, at_basic_lt/ qed-.
-
-lemma apply_basic_ge: ∀m,n,i. m ≤ i → 𝐁❨m,n❩@❨i❩ = n+i.
-/3 width=1 by at_inv_total, at_basic_ge/ qed-.
-
-(* Specific main properties on basic relocation *****************************)
-
-theorem basic_swap: ∀d1,d2. d2 ≤ d1 →
- ∀h1,h2. 𝐁❨d2,h2❩∘𝐁❨d1,h1❩ ≡ 𝐁❨h2+d1,h1❩∘𝐁❨d2,h2❩.
-#d1 #d2 #Hd21 #h1 #h2
-@nstream_inv_eq
-@nstream_eq_inv_ext #i
-<compose_apply <compose_apply
-elim (lt_or_ge i d2) #Hd2
-[ lapply (lt_to_le_to_lt … Hd2 Hd21) -Hd21 #Hd1
- >(apply_basic_lt … Hd1) >(apply_basic_lt … Hd2) >apply_basic_lt
- /2 width=1 by le_plus_a/
-| elim (lt_or_ge i d1) -Hd21 #Hd1
- [ >(apply_basic_lt … Hd1) >(apply_basic_ge … Hd2) >apply_basic_lt
- /2 width=1 by monotonic_lt_plus_r/
- | >(apply_basic_ge … Hd1) >(apply_basic_ge … Hd2)
- >apply_basic_ge [2: /2 width=1 by le_plus_a/ ]
- >apply_basic_ge /2 width=1 by monotonic_le_plus_r/
- ]
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/functions/cocompose_2.ma".
-include "ground_2/relocation/rtmap_coafter.ma".
-
-(* RELOCATION N-STREAM ******************************************************)
-
-rec definition fun0 (n1:nat) on n1: rtmap → nat.
-* * [ | #n2 #f2 @0 ]
-#f2 cases n1 -n1 [ @0 ]
-#n1 @(↑(fun0 n1 f2))
-defined.
-
-rec definition fun2 (n1:nat) on n1: rtmap → rtmap.
-* * [ | #n2 #f2 @(n2⨮f2) ]
-#f2 cases n1 -n1 [ @f2 ]
-#n1 @(fun2 n1 f2)
-defined.
-
-rec definition fun1 (n1:nat) (f1:rtmap) on n1: rtmap → rtmap.
-* * [ | #n2 #f2 @(n1⨮f1) ]
-#f2 cases n1 -n1 [ @f1 ]
-#n1 @(fun1 n1 f1 f2)
-defined.
-
-corec definition cocompose: rtmap → rtmap → rtmap.
-#f2 * #n1 #f1 @(seq … (fun0 n1 f2)) @(cocompose (fun2 n1 f2) (fun1 n1 f1 f2))
-defined.
-
-interpretation "functional co-composition (nstream)"
- 'CoCompose f1 f2 = (cocompose f1 f2).
-
-(* Basic properties on funs *************************************************)
-
-(* Note: we need theese since matita blocks recursive δ when ι is blocked *)
-lemma fun0_xn: ∀f2,n1. 0 = fun0 n1 (↑f2).
-* #n2 #f2 * //
-qed.
-
-lemma fun2_xn: ∀f2,n1. f2 = fun2 n1 (↑f2).
-* #n2 #f2 * //
-qed.
-
-lemma fun1_xxn: ∀f2,f1,n1. fun1 n1 f1 (↑f2) = n1⨮f1.
-* #n2 #f2 #f1 * //
-qed.
-
-(* Basic properies on cocompose *********************************************)
-
-lemma cocompose_rew: ∀f2,f1,n1. (fun0 n1 f2)⨮(fun2 n1 f2)~∘(fun1 n1 f1 f2) = f2 ~∘ (n1⨮f1).
-#f2 #f1 #n1 <(stream_rew … (f2~∘(n1⨮f1))) normalize //
-qed.
-
-(* Basic inversion lemmas on compose ****************************************)
-
-lemma cocompose_inv_ppx: ∀f2,f1,f,x. (⫯f2) ~∘ (⫯f1) = x⨮f →
- 0 = x ∧ f2 ~∘ f1 = f.
-#f2 #f1 #f #x
-<cocompose_rew #H destruct
-normalize /2 width=1 by conj/
-qed-.
-
-lemma cocompose_inv_pnx: ∀f2,f1,f,n1,x. (⫯f2) ~∘ (↑n1⨮f1) = x⨮f →
- ∃∃n. ↑n = x & f2 ~∘ (n1⨮f1) = n⨮f.
-#f2 #f1 #f #n1 #x
-<cocompose_rew #H destruct
-@(ex2_intro … (fun0 n1 f2)) // <cocompose_rew
-/3 width=1 by eq_f2/
-qed-.
-
-lemma cocompose_inv_nxx: ∀f2,f1,f,n1,x. (↑f2) ~∘ (n1⨮f1) = x⨮f →
- 0 = x ∧ f2 ~∘ (n1⨮f1) = f.
-#f2 #f1 #f #n1 #x
-<cocompose_rew #H destruct
-/2 width=1 by conj/
-qed-.
-
-(* Specific properties on coafter *******************************************)
-
-corec lemma coafter_total_aux: ∀f2,f1,f. f2 ~∘ f1 = f → f2 ~⊚ f1 ≘ f.
-* #n2 #f2 * #n1 #f1 * #n #f cases n2 -n2
-[ cases n1 -n1
- [ #H cases (cocompose_inv_ppx … H) -H /3 width=7 by coafter_refl, eq_f2/
- | #n1 #H cases (cocompose_inv_pnx … H) -H /3 width=7 by coafter_push/
- ]
-| #n2 >next_rew #H cases (cocompose_inv_nxx … H) -H /3 width=5 by coafter_next/
-]
-qed-.
-
-theorem coafter_total: ∀f2,f1. f2 ~⊚ f1 ≘ f2 ~∘ f1.
-/2 width=1 by coafter_total_aux/ qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.tcs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/relocation/rtmap_eq.ma".
-
-(* RELOCATION N-STREAM ******************************************************)
-
-(* Specific properties ******************************************************)
-
-fact eq_inv_seq_aux: ∀f1,f2,n1,n2. n1⨮f1 ≡ n2⨮f2 → n1 = n2 ∧ f1 ≡ f2.
-#f1 #f2 #n1 #n2 @(nat_elim2 … n1 n2) -n1 -n2
-[ #n2 #H elim (eq_inv_px … H) -H [2,3: // ]
- #g1 #H1 #H elim (push_inv_seq_dx … H) -H /2 width=1 by conj/
-| #n1 #H elim (eq_inv_np … H) -H //
-| #n1 #n2 #IH #H lapply (eq_inv_nn … H ????) -H [1,2,3,4: // ]
- #H elim (IH H) -IH -H /2 width=1 by conj/
-]
-qed-.
-
-lemma eq_inv_seq: ∀g1,g2. g1 ≡ g2 → ∀f1,f2,n1,n2. n1⨮f1 = g1 → n2⨮f2 = g2 →
- n1 = n2 ∧ f1 ≡ f2.
-/2 width=1 by eq_inv_seq_aux/ qed-.
-
-corec lemma nstream_eq: ∀f1,f2. f1 ≡ f2 → f1 ≗ f2.
-* #n1 #f1 * #n2 #f2 #Hf cases (eq_inv_gen … Hf) -Hf *
-#g1 #g2 #Hg #H1 #H2
-[ cases (push_inv_seq_dx … H1) -H1 * -n1 #H1
- cases (push_inv_seq_dx … H2) -H2 * -n2 #H2
- @eq_seq /2 width=1 by/
-| cases (next_inv_seq_dx … H1) -H1 #m1 #H1 * -n1
- cases (next_inv_seq_dx … H2) -H2 #m2 #H2 * -n2
- cases (eq_inv_seq … Hg … H1 H2) -g1 -g2 #Hm #Hf
- @eq_seq /2 width=1 by/
-]
-qed-.
-
-corec lemma nstream_inv_eq: ∀f1,f2. f1 ≗ f2 → f1 ≡ f2.
-* #n1 #f1 * #n2 #f2 #H cases (eq_stream_inv_seq ??? H) -H [2,3,4,5,6,7: // ]
-#Hf * -n2 cases n1 -n1 /3 width=5 by eq_push/
-#n @eq_next /3 width=5 by eq_seq/
-qed.
-
-lemma eq_seq_id: ∀f1,f2. f1 ≡ f2 → ∀n. n⨮f1 ≡ n⨮f2.
-/4 width=1 by nstream_inv_eq, nstream_eq, eq_seq/ qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/functions/identity_0.ma".
-include "ground_2/relocation/rtmap_eq.ma".
-
-(* RELOCATION N-STREAM ******************************************************)
-
-corec definition id: rtmap ≝ ⫯id.
-
-interpretation "identity (nstream)"
- 'Identity = (id).
-
-(* Basic properties *********************************************************)
-
-lemma id_rew: ⫯𝐈𝐝 = 𝐈𝐝.
-<(stream_rew … (𝐈𝐝)) in ⊢ (???%); normalize //
-qed.
-
-lemma id_eq_rew: ⫯𝐈𝐝 ≡ 𝐈𝐝.
-cases id_rew in ⊢ (??%); //
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/functions/identity_0.ma".
-include "ground_2/relocation/rtmap_isid.ma".
-
-(* RELOCATION N-STREAM ******************************************************)
-
-(* Specific inversion lemmas ************************************************)
-
-lemma isid_inv_seq: ∀f,n. 𝐈❪n⨮f❫ → 𝐈❪f❫ ∧ 0 = n.
-#f #n #H elim (isid_inv_gen … H) -H
-#g #Hg #H elim (push_inv_seq_dx … H) -H /2 width=1 by conj/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.tcs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/functions/apply_2.ma".
-include "ground_2/relocation/nstream_eq.ma".
-include "ground_2/relocation/rtmap_istot.ma".
-
-(* RELOCATION N-STREAM ******************************************************)
-
-rec definition apply (i: nat) on i: rtmap → nat ≝ ?.
-* #n #f cases i -i
-[ @n
-| #i lapply (apply i f) -apply -i -f
- #i @(↑(n+i))
-]
-defined.
-
-interpretation "functional application (nstream)"
- 'Apply f i = (apply i f).
-
-(* Specific properties on at ************************************************)
-
-lemma at_O1: ∀i2,f. @❪0, i2⨮f❫ ≘ i2.
-#i2 elim i2 -i2 /2 width=5 by at_refl, at_next/
-qed.
-
-lemma at_S1: ∀n,f,i1,i2. @❪i1, f❫ ≘ i2 → @❪↑i1, n⨮f❫ ≘ ↑(n+i2).
-#n elim n -n /3 width=7 by at_push, at_next/
-qed.
-
-lemma at_total: ∀i1,f. @❪i1, f❫ ≘ f@❨i1❩.
-#i1 elim i1 -i1
-[ * // | #i #IH * /3 width=1 by at_S1/ ]
-qed.
-
-lemma at_istot: ∀f. 𝐓❪f❫.
-/2 width=2 by ex_intro/ qed.
-
-lemma at_plus2: ∀f,i1,i,n,m. @❪i1, n⨮f❫ ≘ i → @❪i1, (m+n)⨮f❫ ≘ m+i.
-#f #i1 #i #n #m #H elim m -m //
-#m <plus_S1 /2 width=5 by at_next/ (**) (* full auto fails *)
-qed.
-
-(* Specific inversion lemmas on at ******************************************)
-
-lemma at_inv_O1: ∀f,n,i2. @❪0, n⨮f❫ ≘ i2 → n = i2.
-#f #n elim n -n /2 width=6 by at_inv_ppx/
-#n #IH #i2 #H elim (at_inv_xnx … H) -H [2,3: // ]
-#j2 #Hj * -i2 /3 width=1 by eq_f/
-qed-.
-
-lemma at_inv_S1: ∀f,n,j1,i2. @❪↑j1, n⨮f❫ ≘ i2 →
- ∃∃j2. @❪j1, f❫ ≘ j2 & ↑(n+j2) = i2.
-#f #n elim n -n /2 width=5 by at_inv_npx/
-#n #IH #j1 #i2 #H elim (at_inv_xnx … H) -H [2,3: // ]
-#j2 #Hj * -i2 elim (IH … Hj) -IH -Hj
-#i2 #Hi * -j2 /2 width=3 by ex2_intro/
-qed-.
-
-lemma at_inv_total: ∀f,i1,i2. @❪i1, f❫ ≘ i2 → f@❨i1❩ = i2.
-/2 width=6 by at_mono/ qed-.
-
-(* Spercific forward lemmas on at *******************************************)
-
-lemma at_increasing_plus: ∀f,n,i1,i2. @❪i1, n⨮f❫ ≘ i2 → i1 + n ≤ i2.
-#f #n *
-[ #i2 #H <(at_inv_O1 … H) -i2 //
-| #i1 #i2 #H elim (at_inv_S1 … H) -H
- #j1 #Ht * -i2 /4 width=2 by at_increasing, monotonic_le_plus_r, le_S_S/
-]
-qed-.
-
-lemma at_fwd_id: ∀f,n,i. @❪i, n⨮f❫ ≘ i → 0 = n.
-#f #n #i #H elim (at_fwd_id_ex … H) -H
-#g #H elim (push_inv_seq_dx … H) -H //
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma apply_O1: ∀n,f. (n⨮f)@❨0❩ = n.
-// qed.
-
-lemma apply_S1: ∀n,f,i. (n⨮f)@❨↑i❩ = ↑(n+f@❨i❩).
-// qed.
-
-lemma apply_eq_repl (i): eq_repl … (λf1,f2. f1@❨i❩ = f2@❨i❩).
-#i elim i -i [2: #i #IH ] * #n1 #f1 * #n2 #f2 #H
-elim (eq_inv_seq_aux … H) -H normalize //
-#Hn #Hf /4 width=1 by eq_f2, eq_f/
-qed.
-
-lemma apply_S2: ∀f,i. (↑f)@❨i❩ = ↑(f@❨i❩).
-* #n #f * //
-qed.
-
-(* Main inversion lemmas ****************************************************)
-
-theorem apply_inj: ∀f,i1,i2,j. f@❨i1❩ = j → f@❨i2❩ = j → i1 = i2.
-/2 width=4 by at_inj/ qed-.
-
-corec theorem nstream_eq_inv_ext: ∀f1,f2. (∀i. f1@❨i❩ = f2@❨i❩) → f1 ≗ f2.
-* #n1 #f1 * #n2 #f2 #Hf @eq_seq
-[ @(Hf 0)
-| @nstream_eq_inv_ext -nstream_eq_inv_ext #i
- lapply (Hf 0) >apply_O1 >apply_O1 #H destruct
- lapply (Hf (↑i)) >apply_S1 >apply_S1 #H
- /3 width=2 by injective_plus_r, injective_S/
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/relocation/rtmap_sor.ma".
-
-(* RELOCATION N-STREAM ******************************************************)
-
-axiom union: rtmap → rtmap → rtmap.
-
-interpretation "union (nstream)"
- 'union f1 f2 = (union f1 f2).
-
-(* Specific properties on sor ***********************************************)
-
-axiom sor_total: ∀f1,f2. f1 ⋓ f2 ≘ f1 ∪ f2.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/relocation/nstream.ma".
-
-(* RELOCATION MAP ***********************************************************)
-
-lemma pn_split: ∀f. (∃g. ⫯g = f) ∨ (∃g. ↑g = f).
-@case_prop /3 width=2 by or_introl, or_intror, ex_intro/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/rafter_3.ma".
-include "ground_2/relocation/rtmap_istot.ma".
-
-(* RELOCATION MAP ***********************************************************)
-
-coinductive after: relation3 rtmap rtmap rtmap ≝
-| after_refl: ∀f1,f2,f,g1,g2,g.
- after f1 f2 f → ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → after g1 g2 g
-| after_push: ∀f1,f2,f,g1,g2,g.
- after f1 f2 f → ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → after g1 g2 g
-| after_next: ∀f1,f2,f,g1,g.
- after f1 f2 f → ↑f1 = g1 → ↑f = g → after g1 f2 g
-.
-
-interpretation "relational composition (rtmap)"
- 'RAfter f1 f2 f = (after f1 f2 f).
-
-definition H_after_inj: predicate rtmap ≝
- λf1. 𝐓❪f1❫ →
- ∀f,f21,f22. f1 ⊚ f21 ≘ f → f1 ⊚ f22 ≘ f → f21 ≡ f22.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma after_inv_ppx: ∀g1,g2,g. g1 ⊚ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 →
- ∃∃f. f1 ⊚ f2 ≘ f & ⫯f = g.
-#g1 #g2 #g * -g1 -g2 -g #f1 #f2 #f #g1
-[ #g2 #g #Hf #H1 #H2 #H #x1 #x2 #Hx1 #Hx2 destruct
- >(injective_push … Hx1) >(injective_push … Hx2) -x2 -x1
- /2 width=3 by ex2_intro/
-| #g2 #g #_ #_ #H2 #_ #x1 #x2 #_ #Hx2 destruct
- elim (discr_push_next … Hx2)
-| #g #_ #H1 #_ #x1 #x2 #Hx1 #_ destruct
- elim (discr_push_next … Hx1)
-]
-qed-.
-
-lemma after_inv_pnx: ∀g1,g2,g. g1 ⊚ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 →
- ∃∃f. f1 ⊚ f2 ≘ f & ↑f = g.
-#g1 #g2 #g * -g1 -g2 -g #f1 #f2 #f #g1
-[ #g2 #g #_ #_ #H2 #_ #x1 #x2 #_ #Hx2 destruct
- elim (discr_next_push … Hx2)
-| #g2 #g #Hf #H1 #H2 #H3 #x1 #x2 #Hx1 #Hx2 destruct
- >(injective_push … Hx1) >(injective_next … Hx2) -x2 -x1
- /2 width=3 by ex2_intro/
-| #g #_ #H1 #_ #x1 #x2 #Hx1 #_ destruct
- elim (discr_push_next … Hx1)
-]
-qed-.
-
-lemma after_inv_nxx: ∀g1,f2,g. g1 ⊚ f2 ≘ g → ∀f1. ↑f1 = g1 →
- ∃∃f. f1 ⊚ f2 ≘ f & ↑f = g.
-#g1 #f2 #g * -g1 -f2 -g #f1 #f2 #f #g1
-[ #g2 #g #_ #H1 #_ #_ #x1 #Hx1 destruct
- elim (discr_next_push … Hx1)
-| #g2 #g #_ #H1 #_ #_ #x1 #Hx1 destruct
- elim (discr_next_push … Hx1)
-| #g #Hf #H1 #H #x1 #Hx1 destruct
- >(injective_next … Hx1) -x1
- /2 width=3 by ex2_intro/
-]
-qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma after_inv_ppp: ∀g1,g2,g. g1 ⊚ g2 ≘ g →
- ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → f1 ⊚ f2 ≘ f.
-#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H elim (after_inv_ppx … Hg … H1 H2) -g1 -g2
-#x #Hf #Hx destruct <(injective_push … Hx) -f //
-qed-.
-
-lemma after_inv_ppn: ∀g1,g2,g. g1 ⊚ g2 ≘ g →
- ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ↑f = g → ⊥.
-#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H elim (after_inv_ppx … Hg … H1 H2) -g1 -g2
-#x #Hf #Hx destruct elim (discr_push_next … Hx)
-qed-.
-
-lemma after_inv_pnn: ∀g1,g2,g. g1 ⊚ g2 ≘ g →
- ∀f1,f2,f. ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → f1 ⊚ f2 ≘ f.
-#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H elim (after_inv_pnx … Hg … H1 H2) -g1 -g2
-#x #Hf #Hx destruct <(injective_next … Hx) -f //
-qed-.
-
-lemma after_inv_pnp: ∀g1,g2,g. g1 ⊚ g2 ≘ g →
- ∀f1,f2,f. ⫯f1 = g1 → ↑f2 = g2 → ⫯f = g → ⊥.
-#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H elim (after_inv_pnx … Hg … H1 H2) -g1 -g2
-#x #Hf #Hx destruct elim (discr_next_push … Hx)
-qed-.
-
-lemma after_inv_nxn: ∀g1,f2,g. g1 ⊚ f2 ≘ g →
- ∀f1,f. ↑f1 = g1 → ↑f = g → f1 ⊚ f2 ≘ f.
-#g1 #f2 #g #Hg #f1 #f #H1 #H elim (after_inv_nxx … Hg … H1) -g1
-#x #Hf #Hx destruct <(injective_next … Hx) -f //
-qed-.
-
-lemma after_inv_nxp: ∀g1,f2,g. g1 ⊚ f2 ≘ g →
- ∀f1,f. ↑f1 = g1 → ⫯f = g → ⊥.
-#g1 #f2 #g #Hg #f1 #f #H1 #H elim (after_inv_nxx … Hg … H1) -g1
-#x #Hf #Hx destruct elim (discr_next_push … Hx)
-qed-.
-
-lemma after_inv_pxp: ∀g1,g2,g. g1 ⊚ g2 ≘ g →
- ∀f1,f. ⫯f1 = g1 → ⫯f = g →
- ∃∃f2. f1 ⊚ f2 ≘ f & ⫯f2 = g2.
-#g1 * * [2: #m2] #g2 #g #Hg #f1 #f #H1 #H
-[ elim (after_inv_pnp … Hg … H1 … H) -g1 -g -f1 -f //
-| lapply (after_inv_ppp … Hg … H1 … H) -g1 -g /2 width=3 by ex2_intro/
-]
-qed-.
-
-lemma after_inv_pxn: ∀g1,g2,g. g1 ⊚ g2 ≘ g →
- ∀f1,f. ⫯f1 = g1 → ↑f = g →
- ∃∃f2. f1 ⊚ f2 ≘ f & ↑f2 = g2.
-#g1 * * [2: #m2] #g2 #g #Hg #f1 #f #H1 #H
-[ lapply (after_inv_pnn … Hg … H1 … H) -g1 -g /2 width=3 by ex2_intro/
-| elim (after_inv_ppn … Hg … H1 … H) -g1 -g -f1 -f //
-]
-qed-.
-
-lemma after_inv_xxp: ∀g1,g2,g. g1 ⊚ g2 ≘ g → ∀f. ⫯f = g →
- ∃∃f1,f2. f1 ⊚ f2 ≘ f & ⫯f1 = g1 & ⫯f2 = g2.
-* * [2: #m1 ] #g1 #g2 #g #Hg #f #H
-[ elim (after_inv_nxp … Hg … H) -g2 -g -f //
-| elim (after_inv_pxp … Hg … H) -g /2 width=5 by ex3_2_intro/
-]
-qed-.
-
-lemma after_inv_xxn: ∀g1,g2,g. g1 ⊚ g2 ≘ g → ∀f. ↑f = g →
- (∃∃f1,f2. f1 ⊚ f2 ≘ f & ⫯f1 = g1 & ↑f2 = g2) ∨
- ∃∃f1. f1 ⊚ g2 ≘ f & ↑f1 = g1.
-* * [2: #m1 ] #g1 #g2 #g #Hg #f #H
-[ /4 width=5 by after_inv_nxn, or_intror, ex2_intro/
-| elim (after_inv_pxn … Hg … H) -g
- /3 width=5 by or_introl, ex3_2_intro/
-]
-qed-.
-
-lemma after_inv_pxx: ∀g1,g2,g. g1 ⊚ g2 ≘ g → ∀f1. ⫯f1 = g1 →
- (∃∃f2,f. f1 ⊚ f2 ≘ f & ⫯f2 = g2 & ⫯f = g) ∨
- (∃∃f2,f. f1 ⊚ f2 ≘ f & ↑f2 = g2 & ↑f = g).
-#g1 * * [2: #m2 ] #g2 #g #Hg #f1 #H
-[ elim (after_inv_pnx … Hg … H) -g1
- /3 width=5 by or_intror, ex3_2_intro/
-| elim (after_inv_ppx … Hg … H) -g1
- /3 width=5 by or_introl, ex3_2_intro/
-]
-qed-.
-
-(* Basic properties *********************************************************)
-
-corec lemma after_eq_repl_back2: ∀f1,f. eq_repl_back (λf2. f2 ⊚ f1 ≘ f).
-#f1 #f #f2 * -f2 -f1 -f
-#f21 #f1 #f #g21 [1,2: #g1 ] #g #Hf #H21 [1,2: #H1 ] #H #g22 #H0
-[ cases (eq_inv_px … H0 … H21) -g21 /3 width=7 by after_refl/
-| cases (eq_inv_px … H0 … H21) -g21 /3 width=7 by after_push/
-| cases (eq_inv_nx … H0 … H21) -g21 /3 width=5 by after_next/
-]
-qed-.
-
-lemma after_eq_repl_fwd2: ∀f1,f. eq_repl_fwd (λf2. f2 ⊚ f1 ≘ f).
-#f1 #f @eq_repl_sym /2 width=3 by after_eq_repl_back2/
-qed-.
-
-corec lemma after_eq_repl_back1: ∀f2,f. eq_repl_back (λf1. f2 ⊚ f1 ≘ f).
-#f2 #f #f1 * -f2 -f1 -f
-#f2 #f11 #f #g2 [1,2: #g11 ] #g #Hf #H2 [1,2: #H11 ] #H #g2 #H0
-[ cases (eq_inv_px … H0 … H11) -g11 /3 width=7 by after_refl/
-| cases (eq_inv_nx … H0 … H11) -g11 /3 width=7 by after_push/
-| @(after_next … H2 H) /2 width=5 by/
-]
-qed-.
-
-lemma after_eq_repl_fwd1: ∀f2,f. eq_repl_fwd (λf1. f2 ⊚ f1 ≘ f).
-#f2 #f @eq_repl_sym /2 width=3 by after_eq_repl_back1/
-qed-.
-
-corec lemma after_eq_repl_back0: ∀f1,f2. eq_repl_back (λf. f2 ⊚ f1 ≘ f).
-#f2 #f1 #f * -f2 -f1 -f
-#f2 #f1 #f01 #g2 [1,2: #g1 ] #g01 #Hf01 #H2 [1,2: #H1 ] #H01 #g02 #H0
-[ cases (eq_inv_px … H0 … H01) -g01 /3 width=7 by after_refl/
-| cases (eq_inv_nx … H0 … H01) -g01 /3 width=7 by after_push/
-| cases (eq_inv_nx … H0 … H01) -g01 /3 width=5 by after_next/
-]
-qed-.
-
-lemma after_eq_repl_fwd0: ∀f2,f1. eq_repl_fwd (λf. f2 ⊚ f1 ≘ f).
-#f2 #f1 @eq_repl_sym /2 width=3 by after_eq_repl_back0/
-qed-.
-
-(* Main properties **********************************************************)
-
-corec theorem after_trans1: ∀f0,f3,f4. f0 ⊚ f3 ≘ f4 →
- ∀f1,f2. f1 ⊚ f2 ≘ f0 →
- ∀f. f2 ⊚ f3 ≘ f → f1 ⊚ f ≘ f4.
-#f0 #f3 #f4 * -f0 -f3 -f4 #f0 #f3 #f4 #g0 [1,2: #g3 ] #g4
-[ #Hf4 #H0 #H3 #H4 #g1 #g2 #Hg0 #g #Hg
- cases (after_inv_xxp … Hg0 … H0) -g0
- #f1 #f2 #Hf0 #H1 #H2
- cases (after_inv_ppx … Hg … H2 H3) -g2 -g3
- #f #Hf #H /3 width=7 by after_refl/
-| #Hf4 #H0 #H3 #H4 #g1 #g2 #Hg0 #g #Hg
- cases (after_inv_xxp … Hg0 … H0) -g0
- #f1 #f2 #Hf0 #H1 #H2
- cases (after_inv_pnx … Hg … H2 H3) -g2 -g3
- #f #Hf #H /3 width=7 by after_push/
-| #Hf4 #H0 #H4 #g1 #g2 #Hg0 #g #Hg
- cases (after_inv_xxn … Hg0 … H0) -g0 *
- [ #f1 #f2 #Hf0 #H1 #H2
- cases (after_inv_nxx … Hg … H2) -g2
- #f #Hf #H /3 width=7 by after_push/
- | #f1 #Hf0 #H1 /3 width=6 by after_next/
- ]
-]
-qed-.
-
-corec theorem after_trans2: ∀f1,f0,f4. f1 ⊚ f0 ≘ f4 →
- ∀f2, f3. f2 ⊚ f3 ≘ f0 →
- ∀f. f1 ⊚ f2 ≘ f → f ⊚ f3 ≘ f4.
-#f1 #f0 #f4 * -f1 -f0 -f4 #f1 #f0 #f4 #g1 [1,2: #g0 ] #g4
-[ #Hf4 #H1 #H0 #H4 #g2 #g3 #Hg0 #g #Hg
- cases (after_inv_xxp … Hg0 … H0) -g0
- #f2 #f3 #Hf0 #H2 #H3
- cases (after_inv_ppx … Hg … H1 H2) -g1 -g2
- #f #Hf #H /3 width=7 by after_refl/
-| #Hf4 #H1 #H0 #H4 #g2 #g3 #Hg0 #g #Hg
- cases (after_inv_xxn … Hg0 … H0) -g0 *
- [ #f2 #f3 #Hf0 #H2 #H3
- cases (after_inv_ppx … Hg … H1 H2) -g1 -g2
- #f #Hf #H /3 width=7 by after_push/
- | #f2 #Hf0 #H2
- cases (after_inv_pnx … Hg … H1 H2) -g1 -g2
- #f #Hf #H /3 width=6 by after_next/
- ]
-| #Hf4 #H1 #H4 #f2 #f3 #Hf0 #g #Hg
- cases (after_inv_nxx … Hg … H1) -g1
- #f #Hg #H /3 width=6 by after_next/
-]
-qed-.
-
-(* Main inversion lemmas ****************************************************)
-
-corec theorem after_mono: ∀f1,f2,x,y. f1 ⊚ f2 ≘ x → f1 ⊚ f2 ≘ y → x ≡ y.
-#f1 #f2 #x #y * -f1 -f2 -x
-#f1 #f2 #x #g1 [1,2: #g2 ] #g #Hx #H1 [1,2: #H2 ] #H0x #Hy
-[ cases (after_inv_ppx … Hy … H1 H2) -g1 -g2 /3 width=8 by eq_push/
-| cases (after_inv_pnx … Hy … H1 H2) -g1 -g2 /3 width=8 by eq_next/
-| cases (after_inv_nxx … Hy … H1) -g1 /3 width=8 by eq_next/
-]
-qed-.
-
-lemma after_mono_eq: ∀f1,f2,f. f1 ⊚ f2 ≘ f → ∀g1,g2,g. g1 ⊚ g2 ≘ g →
- f1 ≡ g1 → f2 ≡ g2 → f ≡ g.
-/4 width=4 by after_mono, after_eq_repl_back1, after_eq_repl_back2/ qed-.
-
-(* Properties on tls ********************************************************)
-
-lemma after_tls: ∀n,f1,f2,f. @❪0, f1❫ ≘ n →
- f1 ⊚ f2 ≘ f → ⫱*[n]f1 ⊚ f2 ≘ ⫱*[n]f.
-#n elim n -n //
-#n #IH #f1 #f2 #f #Hf1 #Hf
-cases (at_inv_pxn … Hf1) -Hf1 [ |*: // ] #g1 #Hg1 #H1
-cases (after_inv_nxx … Hf … H1) -Hf #g #Hg #H0 destruct
-<tls_xn <tls_xn /2 width=1 by/
-qed.
-
-(* Properties on isid *******************************************************)
-
-corec lemma after_isid_sn: ∀f1. 𝐈❪f1❫ → ∀f2. f1 ⊚ f2 ≘ f2.
-#f1 * -f1 #f1 #g1 #Hf1 #H1 #f2 cases (pn_split f2) * #g2 #H2
-/3 width=7 by after_push, after_refl/
-qed.
-
-corec lemma after_isid_dx: ∀f2. 𝐈❪f2❫ → ∀f1. f1 ⊚ f2 ≘ f1.
-#f2 * -f2 #f2 #g2 #Hf2 #H2 #f1 cases (pn_split f1) * #g1 #H1
-[ /3 width=7 by after_refl/
-| @(after_next … H1 H1) /3 width=3 by isid_push/
-]
-qed.
-
-(* Inversion lemmas on isid *************************************************)
-
-lemma after_isid_inv_sn: ∀f1,f2,f. f1 ⊚ f2 ≘ f → 𝐈❪f1❫ → f2 ≡ f.
-/3 width=6 by after_isid_sn, after_mono/ qed-.
-
-lemma after_isid_inv_dx: ∀f1,f2,f. f1 ⊚ f2 ≘ f → 𝐈❪f2❫ → f1 ≡ f.
-/3 width=6 by after_isid_dx, after_mono/ qed-.
-
-corec lemma after_fwd_isid1: ∀f1,f2,f. f1 ⊚ f2 ≘ f → 𝐈❪f❫ → 𝐈❪f1❫.
-#f1 #f2 #f * -f1 -f2 -f
-#f1 #f2 #f #g1 [1,2: #g2 ] #g #Hf #H1 [1,2: #H2 ] #H0 #H
-[ /4 width=6 by isid_inv_push, isid_push/ ]
-cases (isid_inv_next … H … H0)
-qed-.
-
-corec lemma after_fwd_isid2: ∀f1,f2,f. f1 ⊚ f2 ≘ f → 𝐈❪f❫ → 𝐈❪f2❫.
-#f1 #f2 #f * -f1 -f2 -f
-#f1 #f2 #f #g1 [1,2: #g2 ] #g #Hf #H1 [1,2: #H2 ] #H0 #H
-[ /4 width=6 by isid_inv_push, isid_push/ ]
-cases (isid_inv_next … H … H0)
-qed-.
-
-lemma after_inv_isid3: ∀f1,f2,f. f1 ⊚ f2 ≘ f → 𝐈❪f❫ → 𝐈❪f1❫ ∧ 𝐈❪f2❫.
-/3 width=4 by after_fwd_isid2, after_fwd_isid1, conj/ qed-.
-
-(* Properties on isuni ******************************************************)
-
-lemma after_isid_isuni: ∀f1,f2. 𝐈❪f2❫ → 𝐔❪f1❫ → f1 ⊚ ↑f2 ≘ ↑f1.
-#f1 #f2 #Hf2 #H elim H -H
-/5 width=7 by after_isid_dx, after_eq_repl_back2, after_next, after_push, eq_push_inv_isid/
-qed.
-
-lemma after_uni_next2: ∀f2. 𝐔❪f2❫ → ∀f1,f. ↑f2 ⊚ f1 ≘ f → f2 ⊚ ↑f1 ≘ f.
-#f2 #H elim H -f2
-[ #f2 #Hf2 #f1 #f #Hf
- elim (after_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H0 destruct
- /4 width=7 by after_isid_inv_sn, after_isid_sn, after_eq_repl_back0, eq_next/
-| #f2 #_ #g2 #H2 #IH #f1 #f #Hf
- elim (after_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H0 destruct
- /3 width=5 by after_next/
-]
-qed.
-
-(* Properties on uni ********************************************************)
-
-lemma after_uni: ∀n1,n2. 𝐔❨n1❩ ⊚ 𝐔❨n2❩ ≘ 𝐔❨n1+n2❩.
-@nat_elim2 [3: #n #m <plus_n_Sm ] (**) (* full auto fails *)
-/4 width=5 by after_uni_next2, after_isid_dx, after_isid_sn, after_next/
-qed.
-
-(* Forward lemmas on at *****************************************************)
-
-lemma after_at_fwd: ∀i,i1,f. @❪i1, f❫ ≘ i → ∀f2,f1. f2 ⊚ f1 ≘ f →
- ∃∃i2. @❪i1, f1❫ ≘ i2 & @❪i2, f2❫ ≘ i.
-#i elim i -i [2: #i #IH ] #i1 #f #Hf #f2 #f1 #Hf21
-[ elim (at_inv_xxn … Hf) -Hf [1,3:* |*: // ]
- [1: #g #j1 #Hg #H0 #H |2,4: #g #Hg #H ]
-| elim (at_inv_xxp … Hf) -Hf //
- #g #H1 #H
-]
-[2: elim (after_inv_xxn … Hf21 … H) -f *
- [ #g2 #g1 #Hg21 #H2 #H1 | #g2 #Hg21 #H2 ]
-|*: elim (after_inv_xxp … Hf21 … H) -f
- #g2 #g1 #Hg21 #H2 #H1
-]
-[4: -Hg21 |*: elim (IH … Hg … Hg21) -g -IH ]
-/3 width=9 by at_refl, at_push, at_next, ex2_intro/
-qed-.
-
-lemma after_fwd_at: ∀i,i2,i1,f1,f2. @❪i1, f1❫ ≘ i2 → @❪i2, f2❫ ≘ i →
- ∀f. f2 ⊚ f1 ≘ f → @❪i1, f❫ ≘ i.
-#i elim i -i [2: #i #IH ] #i2 #i1 #f1 #f2 #Hf1 #Hf2 #f #Hf
-[ elim (at_inv_xxn … Hf2) -Hf2 [1,3: * |*: // ]
- #g2 [ #j2 ] #Hg2 [ #H22 ] #H20
- [ elim (at_inv_xxn … Hf1 … H22) -i2 *
- #g1 [ #j1 ] #Hg1 [ #H11 ] #H10
- [ elim (after_inv_ppx … Hf … H20 H10) -f1 -f2 /3 width=7 by at_push/
- | elim (after_inv_pnx … Hf … H20 H10) -f1 -f2 /3 width=6 by at_next/
- ]
- | elim (after_inv_nxx … Hf … H20) -f2 /3 width=7 by at_next/
- ]
-| elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H22 #H20
- elim (at_inv_xxp … Hf1 … H22) -i2 #g1 #H11 #H10
- elim (after_inv_ppx … Hf … H20 H10) -f1 -f2 /2 width=2 by at_refl/
-]
-qed-.
-
-lemma after_fwd_at2: ∀f,i1,i. @❪i1, f❫ ≘ i → ∀f1,i2. @❪i1, f1❫ ≘ i2 →
- ∀f2. f2 ⊚ f1 ≘ f → @❪i2, f2❫ ≘ i.
-#f #i1 #i #Hf #f1 #i2 #Hf1 #f2 #H elim (after_at_fwd … Hf … H) -f
-#j1 #H #Hf2 <(at_mono … Hf1 … H) -i1 -i2 //
-qed-.
-
-lemma after_fwd_at1: ∀i,i2,i1,f,f2. @❪i1, f❫ ≘ i → @❪i2, f2❫ ≘ i →
- ∀f1. f2 ⊚ f1 ≘ f → @❪i1, f1❫ ≘ i2.
-#i elim i -i [2: #i #IH ] #i2 #i1 #f #f2 #Hf #Hf2 #f1 #Hf1
-[ elim (at_inv_xxn … Hf) -Hf [1,3: * |*: // ]
- #g [ #j1 ] #Hg [ #H01 ] #H00
- elim (at_inv_xxn … Hf2) -Hf2 [1,3,5,7: * |*: // ]
- #g2 [1,3: #j2 ] #Hg2 [1,2: #H22 ] #H20
- [ elim (after_inv_pxp … Hf1 … H20 H00) -f2 -f /3 width=7 by at_push/
- | elim (after_inv_pxn … Hf1 … H20 H00) -f2 -f /3 width=5 by at_next/
- | elim (after_inv_nxp … Hf1 … H20 H00)
- | /4 width=9 by after_inv_nxn, at_next/
- ]
-| elim (at_inv_xxp … Hf) -Hf // #g #H01 #H00
- elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H21 #H20
- elim (after_inv_pxp … Hf1 … H20 H00) -f2 -f /3 width=2 by at_refl/
-]
-qed-.
-
-(* Properties with at *******************************************************)
-
-lemma after_uni_dx: ∀i2,i1,f2. @❪i1, f2❫ ≘ i2 →
- ∀f. f2 ⊚ 𝐔❨i1❩ ≘ f → 𝐔❨i2❩ ⊚ ⫱*[i2] f2 ≘ f.
-#i2 elim i2 -i2
-[ #i1 #f2 #Hf2 #f #Hf
- elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H1 #H2 destruct
- lapply (after_isid_inv_dx … Hf ?) -Hf
- /3 width=3 by after_isid_sn, after_eq_repl_back0/
-| #i2 #IH #i1 #f2 #Hf2 #f #Hf
- elim (at_inv_xxn … Hf2) -Hf2 [1,3: * |*: // ]
- [ #g2 #j1 #Hg2 #H1 #H2 destruct
- elim (after_inv_pnx … Hf) -Hf [ |*: // ] #g #Hg #H destruct
- <tls_xn /3 width=5 by after_next/
- | #g2 #Hg2 #H2 destruct
- elim (after_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H destruct
- <tls_xn /3 width=5 by after_next/
- ]
-]
-qed.
-
-lemma after_uni_sn: ∀i2,i1,f2. @❪i1, f2❫ ≘ i2 →
- ∀f. 𝐔❨i2❩ ⊚ ⫱*[i2] f2 ≘ f → f2 ⊚ 𝐔❨i1❩ ≘ f.
-#i2 elim i2 -i2
-[ #i1 #f2 #Hf2 #f #Hf
- elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H1 #H2 destruct
- lapply (after_isid_inv_sn … Hf ?) -Hf
- /3 width=3 by after_isid_dx, after_eq_repl_back0/
-| #i2 #IH #i1 #f2 #Hf2 #f #Hf
- elim (after_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H destruct
- elim (at_inv_xxn … Hf2) -Hf2 [1,3: * |*: // ]
- [ #g2 #j1 #Hg2 #H1 #H2 destruct /3 width=7 by after_push/
- | #g2 #Hg2 #H2 destruct /3 width=5 by after_next/
- ]
-]
-qed-.
-
-lemma after_uni_succ_dx: ∀i2,i1,f2. @❪i1, f2❫ ≘ i2 →
- ∀f. f2 ⊚ 𝐔❨↑i1❩ ≘ f → 𝐔❨↑i2❩ ⊚ ⫱*[↑i2] f2 ≘ f.
-#i2 elim i2 -i2
-[ #i1 #f2 #Hf2 #f #Hf
- elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H1 #H2 destruct
- elim (after_inv_pnx … Hf) -Hf [ |*: // ] #g #Hg #H
- lapply (after_isid_inv_dx … Hg ?) -Hg
- /4 width=5 by after_isid_sn, after_eq_repl_back0, after_next/
-| #i2 #IH #i1 #f2 #Hf2 #f #Hf
- elim (at_inv_xxn … Hf2) -Hf2 [1,3: * |*: // ]
- [ #g2 #j1 #Hg2 #H1 #H2 destruct
- elim (after_inv_pnx … Hf) -Hf [ |*: // ] #g #Hg #H destruct
- <tls_xn /3 width=5 by after_next/
- | #g2 #Hg2 #H2 destruct
- elim (after_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H destruct
- <tls_xn /3 width=5 by after_next/
- ]
-]
-qed.
-
-lemma after_uni_succ_sn: ∀i2,i1,f2. @❪i1, f2❫ ≘ i2 →
- ∀f. 𝐔❨↑i2❩ ⊚ ⫱*[↑i2] f2 ≘ f → f2 ⊚ 𝐔❨↑i1❩ ≘ f.
-#i2 elim i2 -i2
-[ #i1 #f2 #Hf2 #f #Hf
- elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H1 #H2 destruct
- elim (after_inv_nxx … Hf) -Hf [ |*: // ] #g #Hg #H destruct
- lapply (after_isid_inv_sn … Hg ?) -Hg
- /4 width=7 by after_isid_dx, after_eq_repl_back0, after_push/
-| #i2 #IH #i1 #f2 #Hf2 #f #Hf
- elim (after_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H destruct
- elim (at_inv_xxn … Hf2) -Hf2 [1,3: * |*: // ]
- [ #g2 #j1 #Hg2 #H1 #H2 destruct <tls_xn in Hg; /3 width=7 by after_push/
- | #g2 #Hg2 #H2 destruct <tls_xn in Hg; /3 width=5 by after_next/
- ]
-]
-qed-.
-
-lemma after_uni_one_dx: ∀f2,f. ⫯f2 ⊚ 𝐔❨↑O❩ ≘ f → 𝐔❨↑O❩ ⊚ f2 ≘ f.
-#f2 #f #H @(after_uni_succ_dx … (⫯f2)) /2 width=3 by at_refl/
-qed.
-
-lemma after_uni_one_sn: ∀f1,f. 𝐔❨↑O❩ ⊚ f1 ≘ f → ⫯f1 ⊚ 𝐔❨↑O❩ ≘ f.
-/3 width=3 by after_uni_succ_sn, at_refl/ qed-.
-
-(* Forward lemmas on istot **************************************************)
-
-lemma after_istot_fwd: ∀f2,f1,f. f2 ⊚ f1 ≘ f → 𝐓❪f2❫ → 𝐓❪f1❫ → 𝐓❪f❫.
-#f2 #f1 #f #Hf #Hf2 #Hf1 #i1 elim (Hf1 i1) -Hf1
-#i2 #Hf1 elim (Hf2 i2) -Hf2
-/3 width=7 by after_fwd_at, ex_intro/
-qed-.
-
-lemma after_fwd_istot_dx: ∀f2,f1,f. f2 ⊚ f1 ≘ f → 𝐓❪f❫ → 𝐓❪f1❫.
-#f2 #f1 #f #H #Hf #i1 elim (Hf i1) -Hf
-#i2 #Hf elim (after_at_fwd … Hf … H) -f /2 width=2 by ex_intro/
-qed-.
-
-lemma after_fwd_istot_sn: ∀f2,f1,f. f2 ⊚ f1 ≘ f → 𝐓❪f❫ → 𝐓❪f2❫.
-#f2 #f1 #f #H #Hf #i1 elim (Hf i1) -Hf
-#i #Hf elim (after_at_fwd … Hf … H) -f
-#i2 #Hf1 #Hf2 lapply (at_increasing … Hf1) -f1
-#Hi12 elim (at_le_ex … Hf2 … Hi12) -i2 /2 width=2 by ex_intro/
-qed-.
-
-lemma after_inv_istot: ∀f2,f1,f. f2 ⊚ f1 ≘ f → 𝐓❪f❫ → 𝐓❪f2❫ ∧ 𝐓❪f1❫.
-/3 width=4 by after_fwd_istot_sn, after_fwd_istot_dx, conj/ qed-.
-
-lemma after_at1_fwd: ∀f1,i1,i2. @❪i1, f1❫ ≘ i2 → ∀f2. 𝐓❪f2❫ → ∀f. f2 ⊚ f1 ≘ f →
- ∃∃i. @❪i2, f2❫ ≘ i & @❪i1, f❫ ≘ i.
-#f1 #i1 #i2 #Hf1 #f2 #Hf2 #f #Hf elim (Hf2 i2) -Hf2
-/3 width=8 by after_fwd_at, ex2_intro/
-qed-.
-
-lemma after_fwd_isid_sn: ∀f2,f1,f. 𝐓❪f❫ → f2 ⊚ f1 ≘ f → f1 ≡ f → 𝐈❪f2❫.
-#f2 #f1 #f #H #Hf elim (after_inv_istot … Hf H) -H
-#Hf2 #Hf1 #H @isid_at_total // -Hf2
-#i2 #i #Hf2 elim (Hf1 i2) -Hf1
-#i0 #Hf1 lapply (at_increasing … Hf1)
-#Hi20 lapply (after_fwd_at2 … i0 … Hf1 … Hf) -Hf
-/3 width=7 by at_eq_repl_back, at_mono, at_id_le/
-qed-.
-
-lemma after_fwd_isid_dx: ∀f2,f1,f. 𝐓❪f❫ → f2 ⊚ f1 ≘ f → f2 ≡ f → 𝐈❪f1❫.
-#f2 #f1 #f #H #Hf elim (after_inv_istot … Hf H) -H
-#Hf2 #Hf1 #H2 @isid_at_total // -Hf1
-#i1 #i2 #Hi12 elim (after_at1_fwd … Hi12 … Hf) -f1
-/3 width=8 by at_inj, at_eq_repl_back/
-qed-.
-
-corec fact after_inj_O_aux: ∀f1. @❪0, f1❫ ≘ 0 → H_after_inj f1.
-#f1 #H1f1 #H2f1 #f #f21 #f22 #H1f #H2f
-cases (at_inv_pxp … H1f1) -H1f1 [ |*: // ] #g1 #H1
-lapply (istot_inv_push … H2f1 … H1) -H2f1 #H2g1
-cases (H2g1 0) #n #Hn
-cases (after_inv_pxx … H1f … H1) -H1f * #g21 #g #H1g #H21 #H
-[ cases (after_inv_pxp … H2f … H1 H) -f1 -f #g22 #H2g #H22
- @(eq_push … H21 H22) -f21 -f22
-| cases (after_inv_pxn … H2f … H1 H) -f1 -f #g22 #H2g #H22
- @(eq_next … H21 H22) -f21 -f22
-]
-@(after_inj_O_aux (⫱*[n]g1) … (⫱*[n]g)) -after_inj_O_aux
-/2 width=1 by after_tls, istot_tls, at_pxx_tls/
-qed-.
-
-fact after_inj_aux: (∀f1. @❪0, f1❫ ≘ 0 → H_after_inj f1) →
- ∀i2,f1. @❪0, f1❫ ≘ i2 → H_after_inj f1.
-#H0 #i2 elim i2 -i2 /2 width=1 by/ -H0
-#i2 #IH #f1 #H1f1 #H2f1 #f #f21 #f22 #H1f #H2f
-elim (at_inv_pxn … H1f1) -H1f1 [ |*: // ] #g1 #H1g1 #H1
-elim (after_inv_nxx … H1f … H1) -H1f #g #H1g #H
-lapply (after_inv_nxn … H2f … H1 H) -f #H2g
-/3 width=6 by istot_inv_next/
-qed-.
-
-theorem after_inj: ∀f1. H_after_inj f1.
-#f1 #H cases (H 0) /3 width=7 by after_inj_aux, after_inj_O_aux/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.tcs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/rat_3.ma".
-include "ground_2/relocation/rtmap_uni.ma".
-
-(* RELOCATION MAP ***********************************************************)
-
-coinductive at: rtmap → relation nat ≝
-| at_refl: ∀f,g,j1,j2. ⫯f = g → 0 = j1 → 0 = j2 → at g j1 j2
-| at_push: ∀f,i1,i2. at f i1 i2 → ∀g,j1,j2. ⫯f = g → ↑i1 = j1 → ↑i2 = j2 → at g j1 j2
-| at_next: ∀f,i1,i2. at f i1 i2 → ∀g,j2. ↑f = g → ↑i2 = j2 → at g i1 j2
-.
-
-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.
-
-(* Basic inversion lemmas ***************************************************)
-
-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.
-#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/
-| #f #i1 #i2 #_ #g #j2 * #_ #x #x1 #_ #H elim (discr_push_next … H)
-]
-qed-.
-
-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)
-| #f #i1 #i2 #Hi #g #j2 * * #x #H >(injective_next … H) -g /2 width=3 by ex2_intro/
-]
-qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-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 →
- ∀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.
-#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 →
- ∀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.
-#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.
-#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.
-#f elim (pn_split … f) *
-#g #H #i1 #i2 #Hf #j2 #H1 #H2
-[ elim (at_inv_ppn … Hf … H1 H H2)
-| /3 width=5 by at_inv_xnn, ex2_intro/
-]
-qed-.
-
-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
-[ elim (at_inv_npp … Hf … H1 H H2)
-| elim (at_inv_xnp … Hf … H H2)
-]
-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.
-#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 →
- (0 = i1 ∧ 0 = 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.
-#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.
-#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 →
- ∃∃g. 0 = i1 & ⫯g = f.
-#f elim (pn_split f) *
-#g #H #i1 #i2 #Hf #H2
-[ /3 width=6 by at_inv_xpp, ex2_intro/
-| elim (at_inv_xnp … Hf … H H2)
-]
-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.
-#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/
-| lapply (at_inv_xnn … Hf … H H2) -i2 /3 width=3 by or_intror, ex2_intro/
-]
-qed-.
-
-(* Basic forward lemmas *****************************************************)
-
-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 * //
- #i1 #f #Hf elim (at_inv_nxn … Hf) -Hf [1,4: * |*: // ]
- /3 width=2 by le_S_S, le_S/
-]
-qed-.
-
-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.
-#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
-#H elim (lt_le_false … H) -H //
-qed-.
-
-(* Basic properties *********************************************************)
-
-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/
-| #f1 #i1 #i2 #Hf1 #g1 #j2 #H #H2 #f2 #H12 cases (eq_inv_nx … H12 … H) -g1 /3 width=5 by at_next/
-]
-qed-.
-
-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.
-#j2 elim j2 -j2 [2: #j2 #IH ] #i2 #f #Hf
-[ elim (at_inv_xxn … Hf) -Hf [1,3: * |*: // ]
- #g [ #x2 ] #Hg [ #H2 ] #H0
- [ * /3 width=3 by at_refl, ex2_intro/
- #i1 #Hi12 destruct lapply (le_S_S_to_le … Hi12) -Hi12
- #Hi12 elim (IH … Hg … Hi12) -x2 -IH
- /3 width=7 by at_push, ex2_intro, le_S_S/
- | #i1 #Hi12 elim (IH … Hg … Hi12) -IH -i2
- /3 width=5 by at_next, ex2_intro, le_S_S/
- ]
-| elim (at_inv_xxp … Hf) -Hf //
- #g * -i2 #H2 #i1 #Hi12 <(le_n_O_to_eq … Hi12)
- /3 width=3 by at_refl, ex2_intro/
-]
-qed-.
-
-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 →
- i1 < i2 → j1 < j2.
-#j2 elim j2 -j2
-[ #i2 #f #H2f elim (at_inv_xxp … H2f) -H2f //
- #g #H21 #_ #j1 #i1 #_ #Hi elim (lt_le_false … Hi) -Hi //
-| #j2 #IH #i2 #f #H2f * //
- #j1 #i1 #H1f #Hi elim (lt_inv_gen … Hi)
- #x2 #_ #H21 elim (at_inv_nxn … H2f … H21) -H2f [1,3: * |*: // ]
- #g #H2g #H
- [ elim (at_inv_xpn … H1f … H) -f
- /4 width=8 by lt_S_S_to_lt, lt_S_S/
- | /4 width=8 by at_inv_xnn, lt_S_S/
- ]
-]
-qed-.
-
-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 //
- #g * -i1 #H #j2 #i2 #H2f #Hj elim (lt_inv_O1 … Hj) -Hj
- #x2 #H22 elim (at_inv_xpn … H2f … H H22) -f //
-| #j1 #IH *
- [ #f #H1f elim (at_inv_pxn … H1f) -H1f [ |*: // ]
- #g #H1g #H #j2 #i2 #H2f #Hj elim (lt_inv_S1 … Hj) -Hj
- /3 width=7 by at_inv_xnn/
- | #i1 #f #H1f #j2 #i2 #H2f #Hj elim (lt_inv_S1 … Hj) -Hj
- #y2 #Hj #H22 elim (at_inv_nxn … H1f) -H1f [1,4: * |*: // ]
- #g #Hg #H
- [ elim (at_inv_xpn … H2f … H H22) -f -H22
- /3 width=7 by lt_S_S/
- | /3 width=7 by at_inv_xnn/
- ]
- ]
-]
-qed-.
-
-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.
-#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-.
-
-theorem at_div_comm: ∀f2,g2,f1,g1.
- H_at_div f2 g2 f1 g1 → H_at_div g2 f2 g1 f1.
-#f2 #g2 #f1 #g1 #IH #jg #jf #j #Hg #Hf
-elim (IH … Hf Hg) -IH -j /2 width=3 by ex2_intro/
-qed-.
-
-theorem at_div_pp: ∀f2,g2,f1,g1.
- H_at_div f2 g2 f1 g1 → H_at_div (⫯f2) (⫯g2) (⫯f1) (⫯g1).
-#f2 #g2 #f1 #g1 #IH #jf #jg #j #Hf #Hg
-elim (at_inv_xpx … Hf) -Hf [1,2: * |*: // ]
-[ #H1 #H2 destruct -IH
- lapply (at_inv_xpp … Hg ???) -Hg [4: |*: // ] #H destruct
- /3 width=3 by at_refl, ex2_intro/
-| #xf #i #Hf2 #H1 #H2 destruct
- lapply (at_inv_xpn … Hg ????) -Hg [5: * |*: // ] #xg #Hg2 #H destruct
- elim (IH … Hf2 Hg2) -IH -i /3 width=9 by at_push, ex2_intro/
-]
-qed-.
-
-theorem at_div_nn: ∀f2,g2,f1,g1.
- H_at_div f2 g2 f1 g1 → H_at_div (↑f2) (↑g2) (f1) (g1).
-#f2 #g2 #f1 #g1 #IH #jf #jg #j #Hf #Hg
-elim (at_inv_xnx … Hf) -Hf [ |*: // ] #i #Hf2 #H destruct
-lapply (at_inv_xnn … Hg ????) -Hg [5: |*: // ] #Hg2
-elim (IH … Hf2 Hg2) -IH -i /2 width=3 by ex2_intro/
-qed-.
-
-theorem at_div_np: ∀f2,g2,f1,g1.
- H_at_div f2 g2 f1 g1 → H_at_div (↑f2) (⫯g2) (f1) (↑g1).
-#f2 #g2 #f1 #g1 #IH #jf #jg #j #Hf #Hg
-elim (at_inv_xnx … Hf) -Hf [ |*: // ] #i #Hf2 #H destruct
-lapply (at_inv_xpn … Hg ????) -Hg [5: * |*: // ] #xg #Hg2 #H destruct
-elim (IH … Hf2 Hg2) -IH -i /3 width=7 by at_next, ex2_intro/
-qed-.
-
-theorem at_div_pn: ∀f2,g2,f1,g1.
- H_at_div f2 g2 f1 g1 → H_at_div (⫯f2) (↑g2) (↑f1) (g1).
-/4 width=6 by at_div_np, at_div_comm/ qed-.
-
-(* Properties on tls ********************************************************)
-
-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.
-#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
- elim (IH … H) -IH -H #i1 #Hf
- elim (pn_split f) * #g #Hg destruct /3 width=8 by at_push, at_next, ex_intro/
-]
-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.
-#n elim n -n
-[ #g #i1 #j2 #Hg #H
- elim (at_inv_pxp … H) -H [ |*: // ] #f #H0
- elim (at_inv_npx … Hg … H0) -Hg [ |*: // ] #x2 #Hf #H2 destruct
- /2 width=3 by ex2_intro/
-| #n #IH #g #i1 #j2 #Hg #H
- elim (at_inv_pxn … H) -H [ |*: // ] #f #Hf2 #H0
- elim (at_inv_xnx … Hg … H0) -Hg #x2 #Hf1 #H2 destruct
- elim (IH … Hf1 Hf2) -IH -Hf1 -Hf2 #i2 #Hf #H2 destruct
- /2 width=3 by ex2_intro/
-]
-qed-.
-
-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/
-| #i2 #IH #i1 #f #Hf
- elim (at_inv_xxn … Hf) -Hf [1,3: * |*: // ]
- [ #g #j1 #Hg #H1 #H2 | #g #Hg #Ho ] destruct
- <tls_xn /2 width=2 by/
-]
-qed-.
-
-(* Advanced inversion lemmas on isid ****************************************)
-
-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.
-/3 width=6 by isid_inv_at, at_mono/ qed-.
-
-(* Advanced properties on isid **********************************************)
-
-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/
-qed-.
-
-(* Advanced properties on id ************************************************)
-
-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.
-/2 width=1 by isid_inv_at/ qed.
-
-(* Advanced forward lemmas on id ********************************************)
-
-lemma at_id_fwd: ∀i1,i2. @❪i1,𝐈𝐝❫ ≘ i2 → i1 = i2.
-/2 width=4 by at_mono/ qed.
-
-(* Main properties on id ****************************************************)
-
-theorem at_div_id_dx: ∀f. H_at_div f 𝐈𝐝 𝐈𝐝 f.
-#f #jf #j0 #j #Hf #H0
-lapply (at_id_fwd … H0) -H0 #H destruct
-/2 width=3 by ex2_intro/
-qed-.
-
-theorem at_div_id_sn: ∀f. H_at_div 𝐈𝐝 f f 𝐈𝐝.
-/3 width=6 by at_div_id_dx, at_div_comm/ qed-.
-
-(* Properties with uniform relocations **************************************)
-
-lemma at_uni: ∀n,i. @❪i,𝐔❨n❩❫ ≘ n+i.
-#n elim n -n /2 width=5 by at_next/
-qed.
-
-(* Inversion lemmas with uniform relocations ********************************)
-
-lemma at_inv_uni: ∀n,i,j. @❪i,𝐔❨n❩❫ ≘ j → j = n+i.
-/2 width=4 by at_mono/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/functions/basic_2.ma".
-include "ground_2/relocation/rtmap_at.ma".
-
-(* RELOCATION MAP ***********************************************************)
-
-definition basic: nat → nat → rtmap ≝ λm,n. ⫯*[m] 𝐔❨n❩.
-
-interpretation "basic relocation (rtmap)"
- 'Basic m n = (basic m n).
-
-(* Prioerties with application **********************************************)
-
-lemma at_basic_lt: ∀m,n,i. i < m → @❪i, 𝐁❨m,n❩❫ ≘ i.
-#m elim m -m [ #n #i #H elim (lt_zero_false … H) ]
-#m #IH #n * [ /2 width=2 by refl, at_refl/ ]
-#i #H lapply (lt_S_S_to_lt … H) -H /3 width=7 by refl, at_push/
-qed.
-
-lemma at_basic_ge: ∀m,n,i. m ≤ i → @❪i, 𝐁❨m,n❩❫ ≘ n+i.
-#m elim m -m //
-#m #IH #n #j #H
-elim (le_inv_S1 … H) -H #i #Hmi #H destruct
-/3 width=7 by refl, at_push/
-qed.
-
-(* Inversion lemmas with application ****************************************)
-
-lemma at_basic_inv_lt: ∀m,n,i,j. i < m → @❪i, 𝐁❨m,n❩❫ ≘ j → i = j.
-/3 width=4 by at_basic_lt, at_mono/ qed-.
-
-lemma at_basic_inv_ge: ∀m,n,i,j. m ≤ i → @❪i, 𝐁❨m,n❩❫ ≘ j → n+i = j.
-/3 width=4 by at_basic_ge, at_mono/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "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.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/rcoafter_3.ma".
-include "ground_2/relocation/rtmap_sor.ma".
-include "ground_2/relocation/rtmap_after.ma".
-
-(* RELOCATION MAP ***********************************************************)
-
-coinductive coafter: relation3 rtmap rtmap rtmap ≝
-| coafter_refl: ∀f1,f2,f,g1,g2,g. coafter f1 f2 f →
- ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → coafter g1 g2 g
-| coafter_push: ∀f1,f2,f,g1,g2,g. coafter f1 f2 f →
- ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → coafter g1 g2 g
-| coafter_next: ∀f1,f2,f,g1,g. coafter f1 f2 f →
- ↑f1 = g1 → ⫯f = g → coafter g1 f2 g
-.
-
-interpretation "relational co-composition (rtmap)"
- 'RCoAfter f1 f2 f = (coafter f1 f2 f).
-
-definition H_coafter_inj: predicate rtmap ≝
- λf1. 𝐓❪f1❫ →
- ∀f,f21,f22. f1 ~⊚ f21 ≘ f → f1 ~⊚ f22 ≘ f → f21 ≡ f22.
-
-definition H_coafter_fwd_isid2: predicate rtmap ≝
- λf1. ∀f2,f. f1 ~⊚ f2 ≘ f → 𝐓❪f1❫ → 𝐈❪f❫ → 𝐈❪f2❫.
-
-definition H_coafter_isfin2_fwd: predicate rtmap ≝
- λf1. ∀f2. 𝐅❪f2❫ → 𝐓❪f1❫ → ∀f. f1 ~⊚ f2 ≘ f → 𝐅❪f❫.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma coafter_inv_ppx: ∀g1,g2,g. g1 ~⊚ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 →
- ∃∃f. f1 ~⊚ f2 ≘ f & ⫯f = g.
-#g1 #g2 #g * -g1 -g2 -g #f1 #f2 #f #g1
-[ #g2 #g #Hf #H1 #H2 #H #x1 #x2 #Hx1 #Hx2 destruct
- >(injective_push … Hx1) >(injective_push … Hx2) -x2 -x1
- /2 width=3 by ex2_intro/
-| #g2 #g #_ #_ #H2 #_ #x1 #x2 #_ #Hx2 destruct
- elim (discr_push_next … Hx2)
-| #g #_ #H1 #_ #x1 #x2 #Hx1 #_ destruct
- elim (discr_push_next … Hx1)
-]
-qed-.
-
-lemma coafter_inv_pnx: ∀g1,g2,g. g1 ~⊚ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 →
- ∃∃f. f1 ~⊚ f2 ≘ f & ↑f = g.
-#g1 #g2 #g * -g1 -g2 -g #f1 #f2 #f #g1
-[ #g2 #g #_ #_ #H2 #_ #x1 #x2 #_ #Hx2 destruct
- elim (discr_next_push … Hx2)
-| #g2 #g #Hf #H1 #H2 #H3 #x1 #x2 #Hx1 #Hx2 destruct
- >(injective_push … Hx1) >(injective_next … Hx2) -x2 -x1
- /2 width=3 by ex2_intro/
-| #g #_ #H1 #_ #x1 #x2 #Hx1 #_ destruct
- elim (discr_push_next … Hx1)
-]
-qed-.
-
-lemma coafter_inv_nxx: ∀g1,f2,g. g1 ~⊚ f2 ≘ g → ∀f1. ↑f1 = g1 →
- ∃∃f. f1 ~⊚ f2 ≘ f & ⫯f = g.
-#g1 #f2 #g * -g1 -f2 -g #f1 #f2 #f #g1
-[ #g2 #g #_ #H1 #_ #_ #x1 #Hx1 destruct
- elim (discr_next_push … Hx1)
-| #g2 #g #_ #H1 #_ #_ #x1 #Hx1 destruct
- elim (discr_next_push … Hx1)
-| #g #Hf #H1 #H #x1 #Hx1 destruct
- >(injective_next … Hx1) -x1
- /2 width=3 by ex2_intro/
-]
-qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma coafter_inv_ppp: ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
- ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → f1 ~⊚ f2 ≘ f.
-#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H
-elim (coafter_inv_ppx … Hg … H1 H2) -g1 -g2 #x #Hf #Hx destruct
-<(injective_push … Hx) -f //
-qed-.
-
-lemma coafter_inv_ppn: ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
- ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ↑f = g → ⊥.
-#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H
-elim (coafter_inv_ppx … Hg … H1 H2) -g1 -g2 #x #Hf #Hx destruct
-elim (discr_push_next … Hx)
-qed-.
-
-lemma coafter_inv_pnn: ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
- ∀f1,f2,f. ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → f1 ~⊚ f2 ≘ f.
-#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H
-elim (coafter_inv_pnx … Hg … H1 H2) -g1 -g2 #x #Hf #Hx destruct
-<(injective_next … Hx) -f //
-qed-.
-
-lemma coafter_inv_pnp: ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
- ∀f1,f2,f. ⫯f1 = g1 → ↑f2 = g2 → ⫯f = g → ⊥.
-#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H
-elim (coafter_inv_pnx … Hg … H1 H2) -g1 -g2 #x #Hf #Hx destruct
-elim (discr_next_push … Hx)
-qed-.
-
-lemma coafter_inv_nxp: ∀g1,f2,g. g1 ~⊚ f2 ≘ g →
- ∀f1,f. ↑f1 = g1 → ⫯f = g → f1 ~⊚ f2 ≘ f.
-#g1 #f2 #g #Hg #f1 #f #H1 #H
-elim (coafter_inv_nxx … Hg … H1) -g1 #x #Hf #Hx destruct
-<(injective_push … Hx) -f //
-qed-.
-
-lemma coafter_inv_nxn: ∀g1,f2,g. g1 ~⊚ f2 ≘ g →
- ∀f1,f. ↑f1 = g1 → ↑f = g → ⊥.
-#g1 #f2 #g #Hg #f1 #f #H1 #H
-elim (coafter_inv_nxx … Hg … H1) -g1 #x #Hf #Hx destruct
-elim (discr_push_next … Hx)
-qed-.
-
-lemma coafter_inv_pxp: ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
- ∀f1,f. ⫯f1 = g1 → ⫯f = g →
- ∃∃f2. f1 ~⊚ f2 ≘ f & ⫯f2 = g2.
-#g1 #g2 #g #Hg #f1 #f #H1 #H elim (pn_split g2) * #f2 #H2
-[ lapply (coafter_inv_ppp … Hg … H1 H2 H) -g1 -g /2 width=3 by ex2_intro/
-| elim (coafter_inv_pnp … Hg … H1 H2 H)
-]
-qed-.
-
-lemma coafter_inv_pxn: ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
- ∀f1,f. ⫯f1 = g1 → ↑f = g →
- ∃∃f2. f1 ~⊚ f2 ≘ f & ↑f2 = g2.
-#g1 #g2 #g #Hg #f1 #f #H1 #H elim (pn_split g2) * #f2 #H2
-[ elim (coafter_inv_ppn … Hg … H1 H2 H)
-| lapply (coafter_inv_pnn … Hg … H1 … H) -g1 -g /2 width=3 by ex2_intro/
-]
-qed-.
-
-lemma coafter_inv_xxn: ∀g1,g2,g. g1 ~⊚ g2 ≘ g → ∀f. ↑f = g →
- ∃∃f1,f2. f1 ~⊚ f2 ≘ f & ⫯f1 = g1 & ↑f2 = g2.
-#g1 #g2 #g #Hg #f #H elim (pn_split g1) * #f1 #H1
-[ elim (coafter_inv_pxn … Hg … H1 H) -g /2 width=5 by ex3_2_intro/
-| elim (coafter_inv_nxn … Hg … H1 H)
-]
-qed-.
-
-lemma coafter_inv_xnn: ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
- ∀f2,f. ↑f2 = g2 → ↑f = g →
- ∃∃f1. f1 ~⊚ f2 ≘ f & ⫯f1 = g1.
-#g1 #g2 #g #Hg #f2 #f #H2 destruct #H
-elim (coafter_inv_xxn … Hg … H) -g
-#z1 #z2 #Hf #H1 #H2 destruct /2 width=3 by ex2_intro/
-qed-.
-
-lemma coafter_inv_xxp: ∀g1,g2,g. g1 ~⊚ g2 ≘ g → ∀f. ⫯f = g →
- (∃∃f1,f2. f1 ~⊚ f2 ≘ f & ⫯f1 = g1 & ⫯f2 = g2) ∨
- ∃∃f1. f1 ~⊚ g2 ≘ f & ↑f1 = g1.
-#g1 #g2 #g #Hg #f #H elim (pn_split g1) * #f1 #H1
-[ elim (coafter_inv_pxp … Hg … H1 H) -g
- /3 width=5 by or_introl, ex3_2_intro/
-| /4 width=5 by coafter_inv_nxp, or_intror, ex2_intro/
-]
-qed-.
-
-lemma coafter_inv_pxx: ∀g1,g2,g. g1 ~⊚ g2 ≘ g → ∀f1. ⫯f1 = g1 →
- (∃∃f2,f. f1 ~⊚ f2 ≘ f & ⫯f2 = g2 & ⫯f = g) ∨
- (∃∃f2,f. f1 ~⊚ f2 ≘ f & ↑f2 = g2 & ↑f = g).
-#g1 #g2 #g #Hg #f1 #H1 elim (pn_split g2) * #f2 #H2
-[ elim (coafter_inv_ppx … Hg … H1 H2) -g1
- /3 width=5 by or_introl, ex3_2_intro/
-| elim (coafter_inv_pnx … Hg … H1 H2) -g1
- /3 width=5 by or_intror, ex3_2_intro/
-]
-qed-.
-
-(* Basic properties *********************************************************)
-
-corec lemma coafter_eq_repl_back2: ∀f1,f. eq_repl_back (λf2. f2 ~⊚ f1 ≘ f).
-#f1 #f #f2 * -f2 -f1 -f
-#f21 #f1 #f #g21 [1,2: #g1 ] #g #Hf #H21 [1,2: #H1 ] #H #g22 #H0
-[ cases (eq_inv_px … H0 … H21) -g21 /3 width=7 by coafter_refl/
-| cases (eq_inv_px … H0 … H21) -g21 /3 width=7 by coafter_push/
-| cases (eq_inv_nx … H0 … H21) -g21 /3 width=5 by coafter_next/
-]
-qed-.
-
-lemma coafter_eq_repl_fwd2: ∀f1,f. eq_repl_fwd (λf2. f2 ~⊚ f1 ≘ f).
-#f1 #f @eq_repl_sym /2 width=3 by coafter_eq_repl_back2/
-qed-.
-
-corec lemma coafter_eq_repl_back1: ∀f2,f. eq_repl_back (λf1. f2 ~⊚ f1 ≘ f).
-#f2 #f #f1 * -f2 -f1 -f
-#f2 #f11 #f #g2 [1,2: #g11 ] #g #Hf #H2 [1,2: #H11 ] #H #g2 #H0
-[ cases (eq_inv_px … H0 … H11) -g11 /3 width=7 by coafter_refl/
-| cases (eq_inv_nx … H0 … H11) -g11 /3 width=7 by coafter_push/
-| @(coafter_next … H2 H) /2 width=5 by/
-]
-qed-.
-
-lemma coafter_eq_repl_fwd1: ∀f2,f. eq_repl_fwd (λf1. f2 ~⊚ f1 ≘ f).
-#f2 #f @eq_repl_sym /2 width=3 by coafter_eq_repl_back1/
-qed-.
-
-corec lemma coafter_eq_repl_back0: ∀f1,f2. eq_repl_back (λf. f2 ~⊚ f1 ≘ f).
-#f2 #f1 #f * -f2 -f1 -f
-#f2 #f1 #f01 #g2 [1,2: #g1 ] #g01 #Hf01 #H2 [1,2: #H1 ] #H01 #g02 #H0
-[ cases (eq_inv_px … H0 … H01) -g01 /3 width=7 by coafter_refl/
-| cases (eq_inv_nx … H0 … H01) -g01 /3 width=7 by coafter_push/
-| cases (eq_inv_px … H0 … H01) -g01 /3 width=5 by coafter_next/
-]
-qed-.
-
-lemma coafter_eq_repl_fwd0: ∀f2,f1. eq_repl_fwd (λf. f2 ~⊚ f1 ≘ f).
-#f2 #f1 @eq_repl_sym /2 width=3 by coafter_eq_repl_back0/
-qed-.
-
-(* Main inversion lemmas ****************************************************)
-
-corec theorem coafter_mono: ∀f1,f2,x,y. f1 ~⊚ f2 ≘ x → f1 ~⊚ f2 ≘ y → x ≡ y.
-#f1 #f2 #x #y * -f1 -f2 -x
-#f1 #f2 #x #g1 [1,2: #g2 ] #g #Hx #H1 [1,2: #H2 ] #H0x #Hy
-[ cases (coafter_inv_ppx … Hy … H1 H2) -g1 -g2 /3 width=8 by eq_push/
-| cases (coafter_inv_pnx … Hy … H1 H2) -g1 -g2 /3 width=8 by eq_next/
-| cases (coafter_inv_nxx … Hy … H1) -g1 /3 width=8 by eq_push/
-]
-qed-.
-
-lemma coafter_mono_eq: ∀f1,f2,f. f1 ~⊚ f2 ≘ f → ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
- f1 ≡ g1 → f2 ≡ g2 → f ≡ g.
-/4 width=4 by coafter_mono, coafter_eq_repl_back1, coafter_eq_repl_back2/ qed-.
-
-(* Forward lemmas with pushs ************************************************)
-
-lemma coafter_fwd_pushs: ∀j,i,g2,f1,g. g2 ~⊚ ⫯*[i]f1 ≘ g → @❪i, g2❫ ≘ j →
- ∃f. ⫯*[j] f = g.
-#j elim j -j
-[ #i #g2 #f1 #g #Hg #H
- elim (at_inv_xxp … H) -H [|*: // ] #f2 #H1 #H2 destruct
- /2 width=2 by ex_intro/
-| #j #IH * [| #i ] #g2 #f1 #g #Hg #H
- [ elim (at_inv_pxn … H) -H [|*: // ] #f2 #Hij #H destruct
- elim (coafter_inv_nxx … Hg) -Hg [|*: // ] #f #Hf #H destruct
- elim (IH … Hf Hij) -f1 -f2 -IH /2 width=2 by ex_intro/
- | elim (at_inv_nxn … H) -H [1,4: * |*: // ] #f2 #Hij #H destruct
- [ elim (coafter_inv_ppx … Hg) -Hg [|*: // ] #f #Hf #H destruct
- elim (IH … Hf Hij) -f1 -f2 -i /2 width=2 by ex_intro/
- | elim (coafter_inv_nxx … Hg) -Hg [|*: // ] #f #Hf #H destruct
- elim (IH … Hf Hij) -f1 -f2 -i /2 width=2 by ex_intro/
- ]
- ]
-]
-qed-.
-
-(* Inversion lemmas with tail ***********************************************)
-
-lemma coafter_inv_tl1: ∀g2,g1,g. g2 ~⊚ ⫱g1 ≘ g →
- ∃∃f. ⫯g2 ~⊚ g1 ≘ f & ⫱f = g.
-#g2 #g1 #g elim (pn_split g1) * #f1 #H1 #H destruct
-[ /3 width=7 by coafter_refl, ex2_intro/
-| @(ex2_intro … (↑g)) /2 width=7 by coafter_push/ (**) (* full auto fails *)
-]
-qed-.
-
-lemma coafter_inv_tl0: ∀g2,g1,g. g2 ~⊚ g1 ≘ ⫱g →
- ∃∃f1. ⫯g2 ~⊚ f1 ≘ g & ⫱f1 = g1.
-#g2 #g1 #g elim (pn_split g) * #f #H0 #H destruct
-[ /3 width=7 by coafter_refl, ex2_intro/
-| @(ex2_intro … (↑g1)) /2 width=7 by coafter_push/ (**) (* full auto fails *)
-]
-qed-.
-
-(* Properties with iterated tail ********************************************)
-
-lemma coafter_tls: ∀j,i,f1,f2,f. @❪i, f1❫ ≘ j →
- f1 ~⊚ f2 ≘ f → ⫱*[j]f1 ~⊚ ⫱*[i]f2 ≘ ⫱*[j]f.
-#j elim j -j [ #i | #j #IH * [| #i ] ] #f1 #f2 #f #Hf1 #Hf
-[ elim (at_inv_xxp … Hf1) -Hf1 [ |*: // ] #g1 #Hg1 #H1 destruct //
-| elim (at_inv_pxn … Hf1) -Hf1 [ |*: // ] #g1 #Hg1 #H1
- elim (coafter_inv_nxx … Hf … H1) -Hf #g #Hg #H0 destruct
- lapply (IH … Hg1 Hg) -IH -Hg1 -Hg //
-| elim (at_inv_nxn … Hf1) -Hf1 [1,4: * |*: // ] #g1 #Hg1 #H1
- [ elim (coafter_inv_pxx … Hf … H1) -Hf * #g2 #g #Hg #H2 #H0 destruct
- lapply (IH … Hg1 Hg) -IH -Hg1 -Hg #H //
- | elim (coafter_inv_nxx … Hf … H1) -Hf #g #Hg #H0 destruct
- lapply (IH … Hg1 Hg) -IH -Hg1 -Hg #H //
- ]
-]
-qed.
-
-lemma coafter_tls_O: ∀n,f1,f2,f. @❪0, f1❫ ≘ n →
- f1 ~⊚ f2 ≘ f → ⫱*[n]f1 ~⊚ f2 ≘ ⫱*[n]f.
-/2 width=1 by coafter_tls/ qed.
-
-lemma coafter_tls_succ: ∀g2,g1,g. g2 ~⊚ g1 ≘ g →
- ∀n. @❪0, g2❫ ≘ n → ⫱*[↑n]g2 ~⊚ ⫱g1 ≘ ⫱*[↑n]g.
-#g2 #g1 #g #Hg #n #Hg2
-lapply (coafter_tls … Hg2 … Hg) -Hg #Hg
-lapply (at_pxx_tls … Hg2) -Hg2 #H
-elim (at_inv_pxp … H) -H [ |*: // ] #f2 #H2
-elim (coafter_inv_pxx … Hg … H2) -Hg * #f1 #f #Hf #H1 #H0 destruct
-<tls_S <tls_S <H2 <H0 -g2 -g -n //
-qed.
-
-lemma coafter_fwd_xpx_pushs: ∀g2,f1,g,i,j. @❪i, g2❫ ≘ j → g2 ~⊚ ⫯*[↑i]f1 ≘ g →
- ∃∃f. ⫱*[↑j]g2 ~⊚ f1 ≘ f & ⫯*[↑j]f = g.
-#g2 #g1 #g #i #j #Hg2 <pushs_xn #Hg
-elim (coafter_fwd_pushs … Hg Hg2) #f #H0 destruct
-lapply (coafter_tls … Hg2 Hg) -Hg <tls_pushs <tls_pushs #Hf
-lapply (at_inv_tls … Hg2) -Hg2 #H
-lapply (coafter_eq_repl_fwd2 … Hf … H) -H -Hf #Hf
-elim (coafter_inv_ppx … Hf) [|*: // ] -Hf #g #Hg #H destruct
-/2 width=3 by ex2_intro/
-qed-.
-
-lemma coafter_fwd_xnx_pushs: ∀g2,f1,g,i,j. @❪i, g2❫ ≘ j → g2 ~⊚ ⫯*[i]↑f1 ≘ g →
- ∃∃f. ⫱*[↑j]g2 ~⊚ f1 ≘ f & ⫯*[j] ↑f = g.
-#g2 #g1 #g #i #j #Hg2 #Hg
-elim (coafter_fwd_pushs … Hg Hg2) #f #H0 destruct
-lapply (coafter_tls … Hg2 Hg) -Hg <tls_pushs <tls_pushs #Hf
-lapply (at_inv_tls … Hg2) -Hg2 #H
-lapply (coafter_eq_repl_fwd2 … Hf … H) -H -Hf #Hf
-elim (coafter_inv_pnx … Hf) [|*: // ] -Hf #g #Hg #H destruct
-/2 width=3 by ex2_intro/
-qed-.
-
-(* Properties with test for identity ****************************************)
-
-corec lemma coafter_isid_sn: ∀f1. 𝐈❪f1❫ → ∀f2. f1 ~⊚ f2 ≘ f2.
-#f1 * -f1 #f1 #g1 #Hf1 #H1 #f2 cases (pn_split f2) * #g2 #H2
-/3 width=7 by coafter_push, coafter_refl/
-qed.
-
-corec lemma coafter_isid_dx: ∀f2,f. 𝐈❪f2❫ → 𝐈❪f❫ → ∀f1. f1 ~⊚ f2 ≘ f.
-#f2 #f * -f2 #f2 #g2 #Hf2 #H2 * -f #f #g #Hf #H #f1 cases (pn_split f1) * #g1 #H1
-[ /3 width=7 by coafter_refl/
-| @(coafter_next … H1 … H) /3 width=3 by isid_push/
-]
-qed.
-
-(* Inversion lemmas with test for identity **********************************)
-
-lemma coafter_isid_inv_sn: ∀f1,f2,f. f1 ~⊚ f2 ≘ f → 𝐈❪f1❫ → f2 ≡ f.
-/3 width=6 by coafter_isid_sn, coafter_mono/ qed-.
-
-lemma coafter_isid_inv_dx: ∀f1,f2,f. f1 ~⊚ f2 ≘ f → 𝐈❪f2❫ → 𝐈❪f❫.
-/4 width=4 by eq_id_isid, coafter_isid_dx, coafter_mono/ qed-.
-
-(* Properties with test for uniform relocations *****************************)
-
-lemma coafter_isuni_isid: ∀f2. 𝐈❪f2❫ → ∀f1. 𝐔❪f1❫ → f1 ~⊚ f2 ≘ f2.
-#f #Hf #g #H elim H -g
-/3 width=5 by coafter_isid_sn, coafter_eq_repl_back0, coafter_next, eq_push_inv_isid/
-qed.
-
-
-(*
-lemma coafter_isid_isuni: ∀f1,f2. 𝐈❪f2❫ → 𝐔❪f1❫ → f1 ~⊚ ↑f2 ≘ ↑f1.
-#f1 #f2 #Hf2 #H elim H -H
-/5 width=7 by coafter_isid_dx, coafter_eq_repl_back2, coafter_next, coafter_push, eq_push_inv_isid/
-qed.
-
-lemma coafter_uni_next2: ∀f2. 𝐔❪f2❫ → ∀f1,f. ↑f2 ~⊚ f1 ≘ f → f2 ~⊚ ↑f1 ≘ f.
-#f2 #H elim H -f2
-[ #f2 #Hf2 #f1 #f #Hf
- elim (coafter_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H0 destruct
- /4 width=7 by coafter_isid_inv_sn, coafter_isid_sn, coafter_eq_repl_back0, eq_next/
-| #f2 #_ #g2 #H2 #IH #f1 #f #Hf
- elim (coafter_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H0 destruct
- /3 width=5 by coafter_next/
-]
-qed.
-*)
-
-(* Properties with uniform relocations **************************************)
-
-lemma coafter_uni_sn: ∀i,f. 𝐔❨i❩ ~⊚ f ≘ ⫯*[i] f.
-#i elim i -i /2 width=5 by coafter_isid_sn, coafter_next/
-qed.
-
-(*
-lemma coafter_uni: ∀n1,n2. 𝐔❨n1❩ ~⊚ 𝐔❨n2❩ ≘ 𝐔❨n1+n2❩.
-@nat_elim2
-/4 width=5 by coafter_uni_next2, coafter_isid_sn, coafter_isid_dx, coafter_next/
-qed.
-
-(* Forward lemmas on at *****************************************************)
-
-lemma coafter_at_fwd: ∀i,i1,f. @❪i1, f❫ ≘ i → ∀f2,f1. f2 ~⊚ f1 ≘ f →
- ∃∃i2. @❪i1, f1❫ ≘ i2 & @❪i2, f2❫ ≘ i.
-#i elim i -i [2: #i #IH ] #i1 #f #Hf #f2 #f1 #Hf21
-[ elim (at_inv_xxn … Hf) -Hf [1,3:* |*: // ]
- [1: #g #j1 #Hg #H0 #H |2,4: #g #Hg #H ]
-| elim (at_inv_xxp … Hf) -Hf //
- #g #H1 #H
-]
-[2: elim (coafter_inv_xxn … Hf21 … H) -f *
- [ #g2 #g1 #Hg21 #H2 #H1 | #g2 #Hg21 #H2 ]
-|*: elim (coafter_inv_xxp … Hf21 … H) -f
- #g2 #g1 #Hg21 #H2 #H1
-]
-[4: -Hg21 |*: elim (IH … Hg … Hg21) -g -IH ]
-/3 width=9 by at_refl, at_push, at_next, ex2_intro/
-qed-.
-
-lemma coafter_fwd_at: ∀i,i2,i1,f1,f2. @❪i1, f1❫ ≘ i2 → @❪i2, f2❫ ≘ i →
- ∀f. f2 ~⊚ f1 ≘ f → @❪i1, f❫ ≘ i.
-#i elim i -i [2: #i #IH ] #i2 #i1 #f1 #f2 #Hf1 #Hf2 #f #Hf
-[ elim (at_inv_xxn … Hf2) -Hf2 [1,3: * |*: // ]
- #g2 [ #j2 ] #Hg2 [ #H22 ] #H20
- [ elim (at_inv_xxn … Hf1 … H22) -i2 *
- #g1 [ #j1 ] #Hg1 [ #H11 ] #H10
- [ elim (coafter_inv_ppx … Hf … H20 H10) -f1 -f2 /3 width=7 by at_push/
- | elim (coafter_inv_pnx … Hf … H20 H10) -f1 -f2 /3 width=6 by at_next/
- ]
- | elim (coafter_inv_nxx … Hf … H20) -f2 /3 width=7 by at_next/
- ]
-| elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H22 #H20
- elim (at_inv_xxp … Hf1 … H22) -i2 #g1 #H11 #H10
- elim (coafter_inv_ppx … Hf … H20 H10) -f1 -f2 /2 width=2 by at_refl/
-]
-qed-.
-
-lemma coafter_fwd_at2: ∀f,i1,i. @❪i1, f❫ ≘ i → ∀f1,i2. @❪i1, f1❫ ≘ i2 →
- ∀f2. f2 ~⊚ f1 ≘ f → @❪i2, f2❫ ≘ i.
-#f #i1 #i #Hf #f1 #i2 #Hf1 #f2 #H elim (coafter_at_fwd … Hf … H) -f
-#j1 #H #Hf2 <(at_mono … Hf1 … H) -i1 -i2 //
-qed-.
-
-lemma coafter_fwd_at1: ∀i,i2,i1,f,f2. @❪i1, f❫ ≘ i → @❪i2, f2❫ ≘ i →
- ∀f1. f2 ~⊚ f1 ≘ f → @❪i1, f1❫ ≘ i2.
-#i elim i -i [2: #i #IH ] #i2 #i1 #f #f2 #Hf #Hf2 #f1 #Hf1
-[ elim (at_inv_xxn … Hf) -Hf [1,3: * |*: // ]
- #g [ #j1 ] #Hg [ #H01 ] #H00
- elim (at_inv_xxn … Hf2) -Hf2 [1,3,5,7: * |*: // ]
- #g2 [1,3: #j2 ] #Hg2 [1,2: #H22 ] #H20
- [ elim (coafter_inv_pxp … Hf1 … H20 H00) -f2 -f /3 width=7 by at_push/
- | elim (coafter_inv_pxn … Hf1 … H20 H00) -f2 -f /3 width=5 by at_next/
- | elim (coafter_inv_nxp … Hf1 … H20 H00)
- | /4 width=9 by coafter_inv_nxn, at_next/
- ]
-| elim (at_inv_xxp … Hf) -Hf // #g #H01 #H00
- elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H21 #H20
- elim (coafter_inv_pxp … Hf1 … H20 H00) -f2 -f /3 width=2 by at_refl/
-]
-qed-.
-
-(* Properties with at *******************************************************)
-
-lemma coafter_uni_dx: ∀i2,i1,f2. @❪i1, f2❫ ≘ i2 →
- ∀f. f2 ~⊚ 𝐔❨i1❩ ≘ f → 𝐔❨i2❩ ~⊚ ⫱*[i2] f2 ≘ f.
-#i2 elim i2 -i2
-[ #i1 #f2 #Hf2 #f #Hf
- elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H1 #H2 destruct
- lapply (coafter_isid_inv_dx … Hf ?) -Hf
- /3 width=3 by coafter_isid_sn, coafter_eq_repl_back0/
-| #i2 #IH #i1 #f2 #Hf2 #f #Hf
- elim (at_inv_xxn … Hf2) -Hf2 [1,3: * |*: // ]
- [ #g2 #j1 #Hg2 #H1 #H2 destruct
- elim (coafter_inv_pnx … Hf) -Hf [ |*: // ] #g #Hg #H destruct
- /3 width=5 by coafter_next/
- | #g2 #Hg2 #H2 destruct
- elim (coafter_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H destruct
- /3 width=5 by coafter_next/
- ]
-]
-qed.
-
-lemma coafter_uni_sn: ∀i2,i1,f2. @❪i1, f2❫ ≘ i2 →
- ∀f. 𝐔❨i2❩ ~⊚ ⫱*[i2] f2 ≘ f → f2 ~⊚ 𝐔❨i1❩ ≘ f.
-#i2 elim i2 -i2
-[ #i1 #f2 #Hf2 #f #Hf
- elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H1 #H2 destruct
- lapply (coafter_isid_inv_sn … Hf ?) -Hf
- /3 width=3 by coafter_isid_dx, coafter_eq_repl_back0/
-| #i2 #IH #i1 #f2 #Hf2 #f #Hf
- elim (coafter_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H destruct
- elim (at_inv_xxn … Hf2) -Hf2 [1,3: * |*: // ]
- [ #g2 #j1 #Hg2 #H1 #H2 destruct /3 width=7 by coafter_push/
- | #g2 #Hg2 #H2 destruct /3 width=5 by coafter_next/
- ]
-]
-qed-.
-
-lemma coafter_uni_succ_dx: ∀i2,i1,f2. @❪i1, f2❫ ≘ i2 →
- ∀f. f2 ~⊚ 𝐔❨↑i1❩ ≘ f → 𝐔❨↑i2❩ ~⊚ ⫱*[↑i2] f2 ≘ f.
-#i2 elim i2 -i2
-[ #i1 #f2 #Hf2 #f #Hf
- elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H1 #H2 destruct
- elim (coafter_inv_pnx … Hf) -Hf [ |*: // ] #g #Hg #H
- lapply (coafter_isid_inv_dx … Hg ?) -Hg
- /4 width=5 by coafter_isid_sn, coafter_eq_repl_back0, coafter_next/
-| #i2 #IH #i1 #f2 #Hf2 #f #Hf
- elim (at_inv_xxn … Hf2) -Hf2 [1,3: * |*: // ]
- [ #g2 #j1 #Hg2 #H1 #H2 destruct
- elim (coafter_inv_pnx … Hf) -Hf [ |*: // ] #g #Hg #H destruct
- /3 width=5 by coafter_next/
- | #g2 #Hg2 #H2 destruct
- elim (coafter_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H destruct
- /3 width=5 by coafter_next/
- ]
-]
-qed.
-
-lemma coafter_uni_succ_sn: ∀i2,i1,f2. @❪i1, f2❫ ≘ i2 →
- ∀f. 𝐔❨↑i2❩ ~⊚ ⫱*[↑i2] f2 ≘ f → f2 ~⊚ 𝐔❨↑i1❩ ≘ f.
-#i2 elim i2 -i2
-[ #i1 #f2 #Hf2 #f #Hf
- elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H1 #H2 destruct
- elim (coafter_inv_nxx … Hf) -Hf [ |*: // ] #g #Hg #H destruct
- lapply (coafter_isid_inv_sn … Hg ?) -Hg
- /4 width=7 by coafter_isid_dx, coafter_eq_repl_back0, coafter_push/
-| #i2 #IH #i1 #f2 #Hf2 #f #Hf
- elim (coafter_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H destruct
- elim (at_inv_xxn … Hf2) -Hf2 [1,3: * |*: // ]
- [ #g2 #j1 #Hg2 #H1 #H2 destruct <tls_xn in Hg; /3 width=7 by coafter_push/
- | #g2 #Hg2 #H2 destruct <tls_xn in Hg; /3 width=5 by coafter_next/
- ]
-]
-qed-.
-
-lemma coafter_uni_one_dx: ∀f2,f. ⫯f2 ~⊚ 𝐔❨↑O❩ ≘ f → 𝐔❨↑O❩ ~⊚ f2 ≘ f.
-#f2 #f #H @(coafter_uni_succ_dx … (⫯f2)) /2 width=3 by at_refl/
-qed.
-
-lemma coafter_uni_one_sn: ∀f1,f. 𝐔❨↑O❩ ~⊚ f1 ≘ f → ⫯f1 ~⊚ 𝐔❨↑O❩ ≘ f.
-/3 width=3 by coafter_uni_succ_sn, at_refl/ qed-.
-*)
-(* Forward lemmas with istot ************************************************)
-(*
-lemma coafter_istot_fwd: ∀f2,f1,f. f2 ~⊚ f1 ≘ f → 𝐓❪f2❫ → 𝐓❪f1❫ → 𝐓❪f❫.
-#f2 #f1 #f #Hf #Hf2 #Hf1 #i1 elim (Hf1 i1) -Hf1
-#i2 #Hf1 elim (Hf2 i2) -Hf2
-/3 width=7 by coafter_fwd_at, ex_intro/
-qed-.
-
-lemma coafter_fwd_istot_dx: ∀f2,f1,f. f2 ~⊚ f1 ≘ f → 𝐓❪f❫ → 𝐓❪f1❫.
-#f2 #f1 #f #H #Hf #i1 elim (Hf i1) -Hf
-#i2 #Hf elim (coafter_at_fwd … Hf … H) -f /2 width=2 by ex_intro/
-qed-.
-
-lemma coafter_fwd_istot_sn: ∀f2,f1,f. f2 ~⊚ f1 ≘ f → 𝐓❪f❫ → 𝐓❪f2❫.
-#f2 #f1 #f #H #Hf #i1 elim (Hf i1) -Hf
-#i #Hf elim (coafter_at_fwd … Hf … H) -f
-#i2 #Hf1 #Hf2 lapply (at_increasing … Hf1) -f1
-#Hi12 elim (at_le_ex … Hf2 … Hi12) -i2 /2 width=2 by ex_intro/
-qed-.
-
-lemma coafter_inv_istot: ∀f2,f1,f. f2 ~⊚ f1 ≘ f → 𝐓❪f❫ → 𝐓❪f2❫ ∧ 𝐓❪f1❫.
-/3 width=4 by coafter_fwd_istot_sn, coafter_fwd_istot_dx, conj/ qed-.
-
-lemma coafter_at1_fwd: ∀f1,i1,i2. @❪i1, f1❫ ≘ i2 → ∀f2. 𝐓❪f2❫ → ∀f. f2 ~⊚ f1 ≘ f →
- ∃∃i. @❪i2, f2❫ ≘ i & @❪i1, f❫ ≘ i.
-#f1 #i1 #i2 #Hf1 #f2 #Hf2 #f #Hf elim (Hf2 i2) -Hf2
-/3 width=8 by coafter_fwd_at, ex2_intro/
-qed-.
-
-lemma coafter_fwd_isid_sn: ∀f2,f1,f. 𝐓❪f❫ → f2 ~⊚ f1 ≘ f → f1 ≡ f → 𝐈❪f2❫.
-#f2 #f1 #f #H #Hf elim (coafter_inv_istot … Hf H) -H
-#Hf2 #Hf1 #H @isid_at_total // -Hf2
-#i2 #i #Hf2 elim (Hf1 i2) -Hf1
-#i0 #Hf1 lapply (at_increasing … Hf1)
-#Hi20 lapply (coafter_fwd_at2 … i0 … Hf1 … Hf) -Hf
-/3 width=7 by at_eq_repl_back, at_mono, at_id_le/
-qed-.
-
-lemma coafter_fwd_isid_dx: ∀f2,f1,f. 𝐓❪f❫ → f2 ~⊚ f1 ≘ f → f2 ≡ f → 𝐈❪f1❫.
-#f2 #f1 #f #H #Hf elim (coafter_inv_istot … Hf H) -H
-#Hf2 #Hf1 #H2 @isid_at_total // -Hf1
-#i1 #i2 #Hi12 elim (coafter_at1_fwd … Hi12 … Hf) -f1
-/3 width=8 by at_inj, at_eq_repl_back/
-qed-.
-*)
-corec fact coafter_inj_O_aux: ∀f1. @❪0, f1❫ ≘ 0 → H_coafter_inj f1.
-#f1 #H1f1 #H2f1 #f #f21 #f22 #H1f #H2f
-cases (at_inv_pxp … H1f1) -H1f1 [ |*: // ] #g1 #H1
-lapply (istot_inv_push … H2f1 … H1) -H2f1 #H2g1
-cases (H2g1 0) #n #Hn
-cases (coafter_inv_pxx … H1f … H1) -H1f * #g21 #g #H1g #H21 #H
-[ cases (coafter_inv_pxp … H2f … H1 H) -f1 -f #g22 #H2g #H22
- @(eq_push … H21 H22) -f21 -f22
-| cases (coafter_inv_pxn … H2f … H1 H) -f1 -f #g22 #H2g #H22
- @(eq_next … H21 H22) -f21 -f22
-]
-@(coafter_inj_O_aux (⫱*[n]g1) … (⫱*[n]g)) -coafter_inj_O_aux
-/2 width=1 by coafter_tls, istot_tls, at_pxx_tls/
-qed-.
-
-fact coafter_inj_aux: (∀f1. @❪0, f1❫ ≘ 0 → H_coafter_inj f1) →
- ∀i2,f1. @❪0, f1❫ ≘ i2 → H_coafter_inj f1.
-#H0 #i2 elim i2 -i2 /2 width=1 by/ -H0
-#i2 #IH #f1 #H1f1 #H2f1 #f #f21 #f22 #H1f #H2f
-elim (at_inv_pxn … H1f1) -H1f1 [ |*: // ] #g1 #H1g1 #H1
-elim (coafter_inv_nxx … H1f … H1) -H1f #g #H1g #H
-lapply (coafter_inv_nxp … H2f … H1 H) -f #H2g
-/3 width=6 by istot_inv_next/
-qed-.
-
-theorem coafter_inj: ∀f1. H_coafter_inj f1.
-#f1 #H cases (H 0) /3 width=7 by coafter_inj_aux, coafter_inj_O_aux/
-qed-.
-
-corec fact coafter_fwd_isid2_O_aux: ∀f1. @❪0, f1❫ ≘ 0 →
- H_coafter_fwd_isid2 f1.
-#f1 #H1f1 #f2 #f #H #H2f1 #Hf
-cases (at_inv_pxp … H1f1) -H1f1 [ |*: // ] #g1 #H1
-lapply (istot_inv_push … H2f1 … H1) -H2f1 #H2g1
-cases (H2g1 0) #n #Hn
-cases (coafter_inv_pxx … H … H1) -H * #g2 #g #H #H2 #H0
-[ lapply (isid_inv_push … Hf … H0) -Hf #Hg
- @(isid_push … H2) -H2
- /3 width=7 by coafter_tls_O, at_pxx_tls, istot_tls, isid_tls/
-| cases (isid_inv_next … Hf … H0)
-]
-qed-.
-
-fact coafter_fwd_isid2_aux: (∀f1. @❪0, f1❫ ≘ 0 → H_coafter_fwd_isid2 f1) →
- ∀i2,f1. @❪0, f1❫ ≘ i2 → H_coafter_fwd_isid2 f1.
-#H0 #i2 elim i2 -i2 /2 width=1 by/ -H0
-#i2 #IH #f1 #H1f1 #f2 #f #H #H2f1 #Hf
-elim (at_inv_pxn … H1f1) -H1f1 [ |*: // ] #g1 #Hg1 #H1
-elim (coafter_inv_nxx … H … H1) -H #g #Hg #H0
-@(IH … Hg1 … Hg) /2 width=3 by istot_inv_next, isid_inv_push/ (**) (* full auto fails *)
-qed-.
-
-lemma coafter_fwd_isid2: ∀f1. H_coafter_fwd_isid2 f1.
-#f1 #f2 #f #Hf #H cases (H 0)
-/3 width=7 by coafter_fwd_isid2_aux, coafter_fwd_isid2_O_aux/
-qed-.
-
-fact coafter_isfin2_fwd_O_aux: ∀f1. @❪0, f1❫ ≘ 0 →
- H_coafter_isfin2_fwd f1.
-#f1 #Hf1 #f2 #H
-generalize in match Hf1; generalize in match f1; -f1
-@(isfin_ind … H) -f2
-[ /3 width=4 by coafter_isid_inv_dx, isfin_isid/ ]
-#f2 #_ #IH #f1 #H #Hf1 #f #Hf
-elim (at_inv_pxp … H) -H [ |*: // ] #g1 #H1
-lapply (istot_inv_push … Hf1 … H1) -Hf1 #Hg1
-elim (Hg1 0) #n #Hn
-[ elim (coafter_inv_ppx … Hf) | elim (coafter_inv_pnx … Hf)
-] -Hf [1,6: |*: // ] #g #Hg #H0 destruct
-/5 width=6 by isfin_next, isfin_push, isfin_inv_tls, istot_tls, at_pxx_tls, coafter_tls_O/
-qed-.
-
-fact coafter_isfin2_fwd_aux: (∀f1. @❪0, f1❫ ≘ 0 → H_coafter_isfin2_fwd f1) →
- ∀i2,f1. @❪0, f1❫ ≘ i2 → H_coafter_isfin2_fwd f1.
-#H0 #i2 elim i2 -i2 /2 width=1 by/ -H0
-#i2 #IH #f1 #H1f1 #f2 #Hf2 #H2f1 #f #Hf
-elim (at_inv_pxn … H1f1) -H1f1 [ |*: // ] #g1 #Hg1 #H1
-elim (coafter_inv_nxx … Hf … H1) -Hf #g #Hg #H0
-lapply (IH … Hg1 … Hg) -i2 -Hg
-/2 width=4 by istot_inv_next, isfin_push/ (**) (* full auto fails *)
-qed-.
-
-lemma coafter_isfin2_fwd: ∀f1. H_coafter_isfin2_fwd f1.
-#f1 #f2 #Hf2 #Hf1 cases (Hf1 0)
-/3 width=7 by coafter_isfin2_fwd_aux, coafter_isfin2_fwd_O_aux/
-qed-.
-
-lemma coafter_inv_sor: ∀f. 𝐅❪f❫ → ∀f2. 𝐓❪f2❫ → ∀f1. f2 ~⊚ f1 ≘ f → ∀fa,fb. fa ⋓ fb ≘ f →
- ∃∃f1a,f1b. f2 ~⊚ f1a ≘ fa & f2 ~⊚ f1b ≘ fb & f1a ⋓ f1b ≘ f1.
-@isfin_ind
-[ #f #Hf #f2 #Hf2 #f1 #H1f #fa #fb #H2f
- elim (sor_inv_isid3 … H2f) -H2f //
- lapply (coafter_fwd_isid2 … H1f ??) -H1f //
- /3 width=5 by ex3_2_intro, coafter_isid_dx, sor_isid/
-| #f #_ #IH #f2 #Hf2 #f1 #H1 #fa #fb #H2
- elim (sor_inv_xxp … H2) -H2 [ |*: // ] #ga #gb #H2f
- elim (coafter_inv_xxp … H1) -H1 [1,3: * |*: // ] #g2 [ #g1 ] #H1f #Hgf2
- [ lapply (istot_inv_push … Hf2 … Hgf2) | lapply (istot_inv_next … Hf2 … Hgf2) ] -Hf2 #Hg2
- elim (IH … Hg2 … H1f … H2f) -f -Hg2
- /3 width=11 by sor_pp, ex3_2_intro, coafter_refl, coafter_next/
-| #f #_ #IH #f2 #Hf2 #f1 #H1 #fa #fb #H2
- elim (coafter_inv_xxn … H1) -H1 [ |*: // ] #g2 #g1 #H1f #Hgf2
- lapply (istot_inv_push … Hf2 … Hgf2) -Hf2 #Hg2
- elim (sor_inv_xxn … H2) -H2 [1,3,4: * |*: // ] #ga #gb #H2f
- elim (IH … Hg2 … H1f … H2f) -f -Hg2
- /3 width=11 by sor_np, sor_pn, sor_nn, ex3_2_intro, coafter_refl, coafter_push/
-]
-qed-.
-
-(* Properties with istot ****************************************************)
-
-lemma coafter_sor: ∀f. 𝐅❪f❫ → ∀f2. 𝐓❪f2❫ → ∀f1. f2 ~⊚ f1 ≘ f → ∀f1a,f1b. f1a ⋓ f1b ≘ f1 →
- ∃∃fa,fb. f2 ~⊚ f1a ≘ fa & f2 ~⊚ f1b ≘ fb & fa ⋓ fb ≘ f.
-@isfin_ind
-[ #f #Hf #f2 #Hf2 #f1 #Hf #f1a #f1b #Hf1
- lapply (coafter_fwd_isid2 … Hf ??) -Hf // #H2f1
- elim (sor_inv_isid3 … Hf1) -Hf1 //
- /3 width=5 by coafter_isid_dx, sor_idem, ex3_2_intro/
-| #f #_ #IH #f2 #Hf2 #f1 #H1 #f1a #f1b #H2
- elim (coafter_inv_xxp … H1) -H1 [1,3: * |*: // ]
- [ #g2 #g1 #Hf #Hgf2 #Hgf1
- elim (sor_inv_xxp … H2) -H2 [ |*: // ] #ga #gb #Hg1
- lapply (istot_inv_push … Hf2 … Hgf2) -Hf2 #Hg2
- elim (IH … Hf … Hg1) // -f1 -g1 -IH -Hg2
- /3 width=11 by coafter_refl, sor_pp, ex3_2_intro/
- | #g2 #Hf #Hgf2
- lapply (istot_inv_next … Hf2 … Hgf2) -Hf2 #Hg2
- elim (IH … Hf … H2) // -f1 -IH -Hg2
- /3 width=11 by coafter_next, sor_pp, ex3_2_intro/
- ]
-| #f #_ #IH #f2 #Hf2 #f1 #H1 #f1a #f1b #H2
- elim (coafter_inv_xxn … H1) -H1 [ |*: // ] #g2 #g1 #Hf #Hgf2 #Hgf1
- lapply (istot_inv_push … Hf2 … Hgf2) -Hf2 #Hg2
- elim (sor_inv_xxn … H2) -H2 [1,3,4: * |*: // ] #ga #gb #Hg1
- elim (IH … Hf … Hg1) // -f1 -g1 -IH -Hg2
- /3 width=11 by coafter_refl, coafter_push, sor_np, sor_pn, sor_nn, ex3_2_intro/
-]
-qed-.
-
-(* Properties with after ****************************************************)
-(*
-corec theorem coafter_trans1: ∀f0,f3,f4. f0 ~⊚ f3 ≘ f4 →
- ∀f1,f2. f1 ~⊚ f2 ≘ f0 →
- ∀f. f2 ~⊚ f3 ≘ f → f1 ~⊚ f ≘ f4.
-#f0 #f3 #f4 * -f0 -f3 -f4 #f0 #f3 #f4 #g0 [1,2: #g3 ] #g4
-[ #Hf4 #H0 #H3 #H4 #g1 #g2 #Hg0 #g #Hg
- cases (coafter_inv_xxp … Hg0 … H0) -g0
- #f1 #f2 #Hf0 #H1 #H2
- cases (coafter_inv_ppx … Hg … H2 H3) -g2 -g3
- #f #Hf #H /3 width=7 by coafter_refl/
-| #Hf4 #H0 #H3 #H4 #g1 #g2 #Hg0 #g #Hg
- cases (coafter_inv_xxp … Hg0 … H0) -g0
- #f1 #f2 #Hf0 #H1 #H2
- cases (coafter_inv_pnx … Hg … H2 H3) -g2 -g3
- #f #Hf #H /3 width=7 by coafter_push/
-| #Hf4 #H0 #H4 #g1 #g2 #Hg0 #g #Hg
- cases (coafter_inv_xxn … Hg0 … H0) -g0 *
- [ #f1 #f2 #Hf0 #H1 #H2
- cases (coafter_inv_nxx … Hg … H2) -g2
- #f #Hf #H /3 width=7 by coafter_push/
- | #f1 #Hf0 #H1 /3 width=6 by coafter_next/
- ]
-]
-qed-.
-
-corec theorem coafter_trans2: ∀f1,f0,f4. f1 ~⊚ f0 ≘ f4 →
- ∀f2, f3. f2 ~⊚ f3 ≘ f0 →
- ∀f. f1 ~⊚ f2 ≘ f → f ~⊚ f3 ≘ f4.
-#f1 #f0 #f4 * -f1 -f0 -f4 #f1 #f0 #f4 #g1 [1,2: #g0 ] #g4
-[ #Hf4 #H1 #H0 #H4 #g2 #g3 #Hg0 #g #Hg
- cases (coafter_inv_xxp … Hg0 … H0) -g0
- #f2 #f3 #Hf0 #H2 #H3
- cases (coafter_inv_ppx … Hg … H1 H2) -g1 -g2
- #f #Hf #H /3 width=7 by coafter_refl/
-| #Hf4 #H1 #H0 #H4 #g2 #g3 #Hg0 #g #Hg
- cases (coafter_inv_xxn … Hg0 … H0) -g0 *
- [ #f2 #f3 #Hf0 #H2 #H3
- cases (coafter_inv_ppx … Hg … H1 H2) -g1 -g2
- #f #Hf #H /3 width=7 by coafter_push/
- | #f2 #Hf0 #H2
- cases (coafter_inv_pnx … Hg … H1 H2) -g1 -g2
- #f #Hf #H /3 width=6 by coafter_next/
- ]
-| #Hf4 #H1 #H4 #f2 #f3 #Hf0 #g #Hg
- cases (coafter_inv_nxx … Hg … H1) -g1
- #f #Hg #H /3 width=6 by coafter_next/
-]
-qed-.
-*)
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/xoa/ex_3_2.ma".
-include "ground_2/notation/relations/ideq_2.ma".
-include "ground_2/relocation/rtmap.ma".
-
-(* RELOCATION MAP ***********************************************************)
-
-coinductive eq: relation rtmap ≝
-| eq_push: ∀f1,f2,g1,g2. eq f1 f2 → ⫯f1 = g1 → ⫯f2 = g2 → eq g1 g2
-| eq_next: ∀f1,f2,g1,g2. eq f1 f2 → ↑f1 = g1 → ↑f2 = g2 → eq g1 g2
-.
-
-interpretation "extensional equivalence (rtmap)"
- 'IdEq f1 f2 = (eq f1 f2).
-
-definition eq_repl (R:relation …) ≝
- ∀f1,f2. f1 ≡ f2 → R f1 f2.
-
-definition eq_repl_back (R:predicate …) ≝
- ∀f1. R f1 → ∀f2. f1 ≡ f2 → R f2.
-
-definition eq_repl_fwd (R:predicate …) ≝
- ∀f1. R f1 → ∀f2. f2 ≡ f1 → R f2.
-
-(* Basic properties *********************************************************)
-
-corec lemma eq_refl: reflexive … eq.
-#f cases (pn_split f) *
-#g #Hg [ @(eq_push … Hg Hg) | @(eq_next … Hg Hg) ] -Hg //
-qed.
-
-corec lemma eq_sym: symmetric … eq.
-#f1 #f2 * -f1 -f2
-#f1 #f2 #g1 #g2 #Hf #H1 #H2
-[ @(eq_push … H2 H1) | @(eq_next … H2 H1) ] -g2 -g1 /2 width=1 by/
-qed-.
-
-lemma eq_repl_sym: ∀R. eq_repl_back R → eq_repl_fwd R.
-/3 width=3 by eq_sym/ qed-.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma eq_inv_px: ∀g1,g2. g1 ≡ g2 → ∀f1. ⫯f1 = g1 →
- ∃∃f2. f1 ≡ f2 & ⫯f2 = g2.
-#g1 #g2 * -g1 -g2
-#f1 #f2 #g1 #g2 #Hf * * -g1 -g2
-#x1 #H
-[ lapply (injective_push … H) -H /2 width=3 by ex2_intro/
-| elim (discr_push_next … H)
-]
-qed-.
-
-lemma eq_inv_nx: ∀g1,g2. g1 ≡ g2 → ∀f1. ↑f1 = g1 →
- ∃∃f2. f1 ≡ f2 & ↑f2 = g2.
-#g1 #g2 * -g1 -g2
-#f1 #f2 #g1 #g2 #Hf * * -g1 -g2
-#x1 #H
-[ elim (discr_next_push … H)
-| lapply (injective_next … H) -H /2 width=3 by ex2_intro/
-]
-qed-.
-
-lemma eq_inv_xp: ∀g1,g2. g1 ≡ g2 → ∀f2. ⫯f2 = g2 →
- ∃∃f1. f1 ≡ f2 & ⫯f1 = g1.
-#g1 #g2 * -g1 -g2
-#f1 #f2 #g1 #g2 #Hf * * -g1 -g2
-#x2 #H
-[ lapply (injective_push … H) -H /2 width=3 by ex2_intro/
-| elim (discr_push_next … H)
-]
-qed-.
-
-lemma eq_inv_xn: ∀g1,g2. g1 ≡ g2 → ∀f2. ↑f2 = g2 →
- ∃∃f1. f1 ≡ f2 & ↑f1 = g1.
-#g1 #g2 * -g1 -g2
-#f1 #f2 #g1 #g2 #Hf * * -g1 -g2
-#x2 #H
-[ elim (discr_next_push … H)
-| lapply (injective_next … H) -H /2 width=3 by ex2_intro/
-]
-qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma eq_inv_pp: ∀g1,g2. g1 ≡ g2 → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 → f1 ≡ f2.
-#g1 #g2 #H #f1 #f2 #H1 elim (eq_inv_px … H … H1) -g1
-#x2 #Hx2 * -g2
-#H lapply (injective_push … H) -H //
-qed-.
-
-lemma eq_inv_nn: ∀g1,g2. g1 ≡ g2 → ∀f1,f2. ↑f1 = g1 → ↑f2 = g2 → f1 ≡ f2.
-#g1 #g2 #H #f1 #f2 #H1 elim (eq_inv_nx … H … H1) -g1
-#x2 #Hx2 * -g2
-#H lapply (injective_next … H) -H //
-qed-.
-
-lemma eq_inv_pn: ∀g1,g2. g1 ≡ g2 → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 → ⊥.
-#g1 #g2 #H #f1 #f2 #H1 elim (eq_inv_px … H … H1) -g1
-#x2 #Hx2 * -g2
-#H elim (discr_next_push … H)
-qed-.
-
-lemma eq_inv_np: ∀g1,g2. g1 ≡ g2 → ∀f1,f2. ↑f1 = g1 → ⫯f2 = g2 → ⊥.
-#g1 #g2 #H #f1 #f2 #H1 elim (eq_inv_nx … H … H1) -g1
-#x2 #Hx2 * -g2
-#H elim (discr_push_next … H)
-qed-.
-
-lemma eq_inv_gen: ∀f1,f2. f1 ≡ f2 →
- (∃∃g1,g2. g1 ≡ g2 & ⫯g1 = f1 & ⫯g2 = f2) ∨
- ∃∃g1,g2. g1 ≡ g2 & ↑g1 = f1 & ↑g2 = f2.
-#f1 elim (pn_split f1) * #g1 #H1 #f2 #Hf
-[ elim (eq_inv_px … Hf … H1) -Hf /3 width=5 by or_introl, ex3_2_intro/
-| elim (eq_inv_nx … Hf … H1) -Hf /3 width=5 by or_intror, ex3_2_intro/
-]
-qed-.
-
-(* Main properties **********************************************************)
-
-corec theorem eq_trans: Transitive … eq.
-#f1 #f * -f1 -f
-#f1 #f #g1 #g #Hf1 #H1 #H #f2 #Hf2
-[ cases (eq_inv_px … Hf2 … H) | cases (eq_inv_nx … Hf2 … H) ] -g
-/3 width=5 by eq_push, eq_next/
-qed-.
-
-theorem eq_canc_sn: ∀f2. eq_repl_back (λf. f ≡ f2).
-/3 width=3 by eq_trans, eq_sym/ qed-.
-
-theorem eq_canc_dx: ∀f1. eq_repl_fwd (λf. f1 ≡ f).
-/3 width=3 by eq_trans, eq_sym/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/rcolength_2.ma".
-include "ground_2/relocation/rtmap_isid.ma".
-
-(* RELOCATION MAP ***********************************************************)
-
-inductive fcla: relation2 rtmap nat ≝
-| fcla_isid: ∀f. 𝐈❪f❫ → fcla f 0
-| fcla_push: ∀f,n. fcla f n → fcla (⫯f) n
-| fcla_next: ∀f,n. fcla f n → fcla (↑f) (↑n)
-.
-
-interpretation "finite colength assignment (rtmap)"
- 'RCoLength f n = (fcla f n).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma fcla_inv_px: ∀g,m. 𝐂❪g❫ ≘ m → ∀f. ⫯f = g → 𝐂❪f❫ ≘ m.
-#g #m * -g -m /3 width=3 by fcla_isid, isid_inv_push/
-#g #m #_ #f #H elim (discr_push_next … H)
-qed-.
-
-lemma fcla_inv_nx: ∀g,m. 𝐂❪g❫ ≘ m → ∀f. ↑f = g →
- ∃∃n. 𝐂❪f❫ ≘ n & ↑n = m.
-#g #m * -g -m /2 width=3 by ex2_intro/
-[ #g #Hg #f #H elim (isid_inv_next … H) -H //
-| #g #m #_ #f #H elim (discr_next_push … H)
-]
-qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma cla_inv_nn: ∀g,m. 𝐂❪g❫ ≘ m → ∀f,n. ↑f = g → ↑n = m → 𝐂❪f❫ ≘ n.
-#g #m #H #f #n #H1 #H2 elim (fcla_inv_nx … H … H1) -g
-#x #Hf #H destruct //
-qed-.
-
-lemma cla_inv_np: ∀g,m. 𝐂❪g❫ ≘ m → ∀f. ↑f = g → 0 = m → ⊥.
-#g #m #H #f #H1 elim (fcla_inv_nx … H … H1) -g
-#x #_ #H1 #H2 destruct
-qed-.
-
-lemma fcla_inv_xp: ∀g,m. 𝐂❪g❫ ≘ m → 0 = m → 𝐈❪g❫.
-#g #m #H elim H -g -m /3 width=3 by isid_push/
-#g #m #_ #_ #H destruct
-qed-.
-
-lemma fcla_inv_isid: ∀f,n. 𝐂❪f❫ ≘ n → 𝐈❪f❫ → 0 = n.
-#f #n #H elim H -f -n /3 width=3 by isid_inv_push/
-#f #n #_ #_ #H elim (isid_inv_next … H) -H //
-qed-.
-
-(* Main forward lemmas ******************************************************)
-
-theorem fcla_mono: ∀f,n1. 𝐂❪f❫ ≘ n1 → ∀n2. 𝐂❪f❫ ≘ n2 → n1 = n2.
-#f #n #H elim H -f -n
-[ /2 width=3 by fcla_inv_isid/
-| /3 width=3 by fcla_inv_px/
-| #f #n1 #_ #IH #n2 #H elim (fcla_inv_nx … H) -H [2,3 : // ]
- #g #Hf #H destruct /3 width=1 by eq_f/
-]
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma fcla_eq_repl_back: ∀n. eq_repl_back … (λf. 𝐂❪f❫ ≘ n).
-#n #f1 #H elim H -f1 -n /3 width=3 by fcla_isid, isid_eq_repl_back/
-#f1 #n #_ #IH #g2 #H [ elim (eq_inv_px … H) | elim (eq_inv_nx … H) ] -H
-/3 width=3 by fcla_push, fcla_next/
-qed-.
-
-lemma fcla_eq_repl_fwd: ∀n. eq_repl_fwd … (λf. 𝐂❪f❫ ≘ n).
-#n @eq_repl_sym /2 width=3 by fcla_eq_repl_back/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/relocation/nstream_id.ma".
-include "ground_2/relocation/rtmap_isid.ma".
-
-(* RELOCATION MAP ***********************************************************)
-
-(* Basic properties *********************************************************)
-
-lemma id_isid: 𝐈❪𝐈𝐝❫.
-/3 width=5 by eq_push_isid/ qed.
-
-(* Alternative definition of isid *******************************************)
-
-lemma eq_id_isid: ∀f. 𝐈𝐝 ≡ f → 𝐈❪f❫.
-/2 width=3 by isid_eq_repl_back/ qed.
-
-lemma eq_id_inv_isid: ∀f. 𝐈❪f❫ → 𝐈𝐝 ≡ f.
-/2 width=1 by isid_inv_eq_repl/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/isdivergent_1.ma".
-include "ground_2/relocation/rtmap_nexts.ma".
-include "ground_2/relocation/rtmap_tls.ma".
-
-(* RELOCATION MAP ***********************************************************)
-
-coinductive isdiv: predicate rtmap ≝
-| isdiv_next: ∀f,g. isdiv f → ↑f = g → isdiv g
-.
-
-interpretation "test for divergence (rtmap)"
- 'IsDivergent f = (isdiv f).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma isdiv_inv_gen: ∀g. 𝛀❪g❫ → ∃∃f. 𝛀❪f❫ & ↑f = g.
-#g * -g
-#f #g #Hf * /2 width=3 by ex2_intro/
-qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma isdiv_inv_next: ∀g. 𝛀❪g❫ → ∀f. ↑f = g → 𝛀❪f❫.
-#g #H elim (isdiv_inv_gen … H) -H
-#f #Hf * -g #g #H >(injective_next … H) -H //
-qed-.
-
-lemma isdiv_inv_push: ∀g. 𝛀❪g❫ → ∀f. ⫯f = g → ⊥.
-#g #H elim (isdiv_inv_gen … H) -H
-#f #Hf * -g #g #H elim (discr_push_next … H)
-qed-.
-
-(* Main inversion lemmas ****************************************************)
-
-corec theorem isdiv_inv_eq_repl: ∀f1,f2. 𝛀❪f1❫ → 𝛀❪f2❫ → f1 ≡ f2.
-#f1 #f2 #H1 #H2
-cases (isdiv_inv_gen … H1) -H1
-cases (isdiv_inv_gen … H2) -H2
-/3 width=5 by eq_next/
-qed-.
-
-(* Basic properties *********************************************************)
-
-corec lemma isdiv_eq_repl_back: eq_repl_back … isdiv.
-#f1 #H cases (isdiv_inv_gen … H) -H
-#g1 #Hg1 #H1 #f2 #Hf cases (eq_inv_nx … Hf … H1) -f1
-/3 width=3 by isdiv_next/
-qed-.
-
-lemma isdiv_eq_repl_fwd: eq_repl_fwd … isdiv.
-/3 width=3 by isdiv_eq_repl_back, eq_repl_sym/ qed-.
-
-(* Alternative definition ***************************************************)
-
-corec lemma eq_next_isdiv: ∀f. ↑f ≡ f → 𝛀❪f❫.
-#f #H cases (eq_inv_nx … H) -H /4 width=3 by isdiv_next, eq_trans/
-qed.
-
-corec lemma eq_next_inv_isdiv: ∀f. 𝛀❪f❫ → ↑f ≡ f.
-#f * -f
-#f #g #Hf #Hg @(eq_next … Hg) [2: @eq_next_inv_isdiv // | skip ]
-@eq_f //
-qed-.
-
-(* Properties with iterated next ********************************************)
-
-lemma isdiv_nexts: ∀n,f. 𝛀❪f❫ → 𝛀❪↑*[n]f❫.
-#n elim n -n /3 width=3 by isdiv_next/
-qed.
-
-(* Inversion lemmas with iterated next **************************************)
-
-lemma isdiv_inv_nexts: ∀n,g. 𝛀❪↑*[n]g❫ → 𝛀❪g❫.
-#n elim n -n /3 width=3 by isdiv_inv_next/
-qed.
-
-(* Properties with tail *****************************************************)
-
-lemma isdiv_tl: ∀f. 𝛀❪f❫ → 𝛀❪⫱f❫.
-#f cases (pn_split f) * #g * -f #H
-[ elim (isdiv_inv_push … H) -H //
-| /2 width=3 by isdiv_inv_next/
-]
-qed.
-
-(* Properties with iterated tail ********************************************)
-
-lemma isdiv_tls: ∀n,g. 𝛀❪g❫ → 𝛀❪⫱*[n]g❫.
-#n elim n -n /3 width=1 by isdiv_tl/
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/isfinite_1.ma".
-include "ground_2/relocation/rtmap_fcla.ma".
-
-(* RELOCATION MAP ***********************************************************)
-
-definition isfin: predicate rtmap ≝
- λf. ∃n. 𝐂❪f❫ ≘ n.
-
-interpretation "test for finite colength (rtmap)"
- 'IsFinite f = (isfin f).
-
-(* Basic eliminators ********************************************************)
-
-lemma isfin_ind (R:predicate rtmap): (∀f. 𝐈❪f❫ → R f) →
- (∀f. 𝐅❪f❫ → R f → R (⫯f)) →
- (∀f. 𝐅❪f❫ → R f → R (↑f)) →
- ∀f. 𝐅❪f❫ → R f.
-#R #IH1 #IH2 #IH3 #f #H elim H -H
-#n #H elim H -f -n /3 width=2 by ex_intro/
-qed-.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma isfin_inv_push: ∀g. 𝐅❪g❫ → ∀f. ⫯f = g → 𝐅❪f❫.
-#g * /3 width=4 by fcla_inv_px, ex_intro/
-qed-.
-
-lemma isfin_inv_next: ∀g. 𝐅❪g❫ → ∀f. ↑f = g → 𝐅❪f❫.
-#g * #n #H #f #H0 elim (fcla_inv_nx … H … H0) -g
-/2 width=2 by ex_intro/
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma isfin_eq_repl_back: eq_repl_back … isfin.
-#f1 * /3 width=4 by fcla_eq_repl_back, ex_intro/
-qed-.
-
-lemma isfin_eq_repl_fwd: eq_repl_fwd … isfin.
-/3 width=3 by isfin_eq_repl_back, eq_repl_sym/ qed-.
-
-lemma isfin_isid: ∀f. 𝐈❪f❫ → 𝐅❪f❫.
-/3 width=2 by fcla_isid, ex_intro/ qed.
-
-lemma isfin_push: ∀f. 𝐅❪f❫ → 𝐅❪⫯f❫.
-#f * /3 width=2 by fcla_push, ex_intro/
-qed.
-
-lemma isfin_next: ∀f. 𝐅❪f❫ → 𝐅❪↑f❫.
-#f * /3 width=2 by fcla_next, ex_intro/
-qed.
-
-(* Properties with iterated push ********************************************)
-
-lemma isfin_pushs: ∀n,f. 𝐅❪f❫ → 𝐅❪⫯*[n]f❫.
-#n elim n -n /3 width=3 by isfin_push/
-qed.
-
-(* Inversion lemmas with iterated push **************************************)
-
-lemma isfin_inv_pushs: ∀n,g. 𝐅❪⫯*[n]g❫ → 𝐅❪g❫.
-#n elim n -n /3 width=3 by isfin_inv_push/
-qed.
-
-(* Properties with tail *****************************************************)
-
-lemma isfin_tl: ∀f. 𝐅❪f❫ → 𝐅❪⫱f❫.
-#f elim (pn_split f) * #g #H #Hf destruct
-/3 width=3 by isfin_inv_push, isfin_inv_next/
-qed.
-
-(* Inversion lemmas with tail ***********************************************)
-
-lemma isfin_inv_tl: ∀f. 𝐅❪⫱f❫ → 𝐅❪f❫.
-#f elim (pn_split f) * /2 width=1 by isfin_next, isfin_push/
-qed-.
-
-(* Inversion lemmas with iterated tail **************************************)
-
-lemma isfin_inv_tls: ∀n,f. 𝐅❪⫱*[n]f❫ → 𝐅❪f❫.
-#n elim n -n /3 width=1 by isfin_inv_tl/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/isidentity_1.ma".
-include "ground_2/relocation/rtmap_tls.ma".
-
-(* RELOCATION MAP ***********************************************************)
-
-coinductive isid: predicate rtmap ≝
-| isid_push: ∀f,g. isid f → ⫯f = g → isid g
-.
-
-interpretation "test for identity (rtmap)"
- 'IsIdentity f = (isid f).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma isid_inv_gen: ∀g. 𝐈❪g❫ → ∃∃f. 𝐈❪f❫ & ⫯f = g.
-#g * -g
-#f #g #Hf * /2 width=3 by ex2_intro/
-qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma isid_inv_push: ∀g. 𝐈❪g❫ → ∀f. ⫯f = g → 𝐈❪f❫.
-#g #H elim (isid_inv_gen … H) -H
-#f #Hf * -g #g #H >(injective_push … H) -H //
-qed-.
-
-lemma isid_inv_next: ∀g. 𝐈❪g❫ → ∀f. ↑f = g → ⊥.
-#g #H elim (isid_inv_gen … H) -H
-#f #Hf * -g #g #H elim (discr_next_push … H)
-qed-.
-
-(* Main inversion lemmas ****************************************************)
-
-corec theorem isid_inv_eq_repl: ∀f1,f2. 𝐈❪f1❫ → 𝐈❪f2❫ → f1 ≡ f2.
-#f1 #f2 #H1 #H2
-cases (isid_inv_gen … H1) -H1
-cases (isid_inv_gen … H2) -H2
-/3 width=5 by eq_push/
-qed-.
-
-(* Basic properties *********************************************************)
-
-corec lemma isid_eq_repl_back: eq_repl_back … isid.
-#f1 #H cases (isid_inv_gen … H) -H
-#g1 #Hg1 #H1 #f2 #Hf cases (eq_inv_px … Hf … H1) -f1
-/3 width=3 by isid_push/
-qed-.
-
-lemma isid_eq_repl_fwd: eq_repl_fwd … isid.
-/3 width=3 by isid_eq_repl_back, eq_repl_sym/ qed-.
-
-(* Alternative definition ***************************************************)
-
-corec lemma eq_push_isid: ∀f. ⫯f ≡ f → 𝐈❪f❫.
-#f #H cases (eq_inv_px … H) -H /4 width=3 by isid_push, eq_trans/
-qed.
-
-corec lemma eq_push_inv_isid: ∀f. 𝐈❪f❫ → ⫯f ≡ f.
-#f * -f
-#f #g #Hf #Hg @(eq_push … Hg) [2: @eq_push_inv_isid // | skip ]
-@eq_f //
-qed-.
-
-(* Properties with iterated push ********************************************)
-
-lemma isid_pushs: ∀n,f. 𝐈❪f❫ → 𝐈❪⫯*[n]f❫.
-#n elim n -n /3 width=3 by isid_push/
-qed.
-
-(* Inversion lemmas with iterated push **************************************)
-
-lemma isid_inv_pushs: ∀n,g. 𝐈❪⫯*[n]g❫ → 𝐈❪g❫.
-#n elim n -n /3 width=3 by isid_inv_push/
-qed.
-
-(* Properties with tail *****************************************************)
-
-lemma isid_tl: ∀f. 𝐈❪f❫ → 𝐈❪⫱f❫.
-#f cases (pn_split f) * #g * -f #H
-[ /2 width=3 by isid_inv_push/
-| elim (isid_inv_next … H) -H //
-]
-qed.
-
-(* Properties with iterated tail ********************************************)
-
-lemma isid_tls: ∀n,g. 𝐈❪g❫ → 𝐈❪⫱*[n]g❫.
-#n elim n -n /3 width=1 by isid_tl/
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/istotal_1.ma".
-include "ground_2/relocation/rtmap_at.ma".
-
-(* RELOCATION MAP ***********************************************************)
-
-definition istot: predicate rtmap ≝ λf. ∀i. ∃j. @❪i,f❫ ≘ j.
-
-interpretation "test for totality (rtmap)"
- 'IsTotal f = (istot f).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma istot_inv_push: ∀g. 𝐓❪g❫ → ∀f. ⫯f = g → 𝐓❪f❫.
-#g #Hg #f #H #i elim (Hg (↑i)) -Hg
-#j #Hg elim (at_inv_npx … Hg … H) -Hg -H /2 width=3 by ex_intro/
-qed-.
-
-lemma istot_inv_next: ∀g. 𝐓❪g❫ → ∀f. ↑f = g → 𝐓❪f❫.
-#g #Hg #f #H #i elim (Hg i) -Hg
-#j #Hg elim (at_inv_xnx … Hg … H) -Hg -H /2 width=2 by ex_intro/
-qed-.
-
-(* Properties on tl *********************************************************)
-
-lemma istot_tl: ∀f. 𝐓❪f❫ → 𝐓❪⫱f❫.
-#f cases (pn_split f) *
-#g * -f /2 width=3 by istot_inv_next, istot_inv_push/
-qed.
-
-(* Properties on tls ********************************************************)
-
-lemma istot_tls: ∀n,f. 𝐓❪f❫ → 𝐓❪⫱*[n]f❫.
-#n elim n -n /3 width=1 by istot_tl/
-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) →
- f1 ≡ f2.
-#f1 cases (pn_split f1) * #g1 #H1
-#f2 cases (pn_split f2) * #g2 #H2
-#Hf1 #Hf2 #Hi
-[ @(eq_push … H1 H2) @at_ext -at_ext /2 width=3 by istot_inv_push/ -Hf1 -Hf2
- #i #i1 #i2 #Hg1 #Hg2 lapply (Hi (↑i) (↑i1) (↑i2) ??) /2 width=7 by at_push/
-| cases (Hf2 0) -Hf1 -Hf2 -at_ext
- #j2 #Hf2 cases (at_increasing_strict … Hf2 … H2) -H2
- lapply (Hi 0 0 j2 … Hf2) /2 width=2 by at_refl/ -Hi -Hf2 -H1
- #H2 #H cases (lt_le_false … H) -H //
-| cases (Hf1 0) -Hf1 -Hf2 -at_ext
- #j1 #Hf1 cases (at_increasing_strict … Hf1 … H1) -H1
- lapply (Hi 0 j1 0 Hf1 ?) /2 width=2 by at_refl/ -Hi -Hf1 -H2
- #H1 #H cases (lt_le_false … H) -H //
-| @(eq_next … H1 H2) @at_ext -at_ext /2 width=3 by istot_inv_next/ -Hf1 -Hf2
- #i #i1 #i2 #Hg1 #Hg2 lapply (Hi i (↑i1) (↑i2) ??) /2 width=5 by at_next/
-]
-qed-.
-
-(* Advanced properties on at ************************************************)
-
-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/
-| /4 width=6 by at_mono, or_intror/
-]
-qed-.
-
-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/
- #Hi2 @IH -IH #i1 #H #Hi elim (le_to_or_lt_eq … H) -H /2 width=3 by/
- #H destruct -Ht /2 width=1 by/
-]
-qed-.
-
-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❫.
-#f #H1f #H2f @isid_at
-#i lapply (H1f i) -H1f *
-#j #Hf >(H2f … Hf) in ⊢ (???%); -H2f //
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/isuniform_1.ma".
-include "ground_2/relocation/rtmap_isfin.ma".
-
-(* RELOCATION MAP ***********************************************************)
-
-inductive isuni: predicate rtmap ≝
-| isuni_isid: ∀f. 𝐈❪f❫ → isuni f
-| isuni_next: ∀f. isuni f → ∀g. ↑f = g → isuni g
-.
-
-interpretation "test for uniformity (rtmap)"
- 'IsUniform f = (isuni f).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma isuni_inv_push: ∀g. 𝐔❪g❫ → ∀f. ⫯f = g → 𝐈❪f❫.
-#g * -g /2 width=3 by isid_inv_push/
-#f #_ #g #H #x #Hx destruct elim (discr_push_next … Hx)
-qed-.
-
-lemma isuni_inv_next: ∀g. 𝐔❪g❫ → ∀f. ↑f = g → 𝐔❪f❫.
-#g * -g #f #Hf
-[ #x #Hx elim (isid_inv_next … Hf … Hx)
-| #g #H #x #Hx destruct /2 width=1 by injective_push/
-]
-qed-.
-
-lemma isuni_split: ∀g. 𝐔❪g❫ → (∃∃f. 𝐈❪f❫ & ⫯f = g) ∨ (∃∃f.𝐔❪f❫ & ↑f = g).
-#g #H elim (pn_split g) * #f #Hf
-/4 width=3 by isuni_inv_next, isuni_inv_push, or_introl, or_intror, ex2_intro/
-qed-.
-
-(* basic forward lemmas *****************************************************)
-
-lemma isuni_fwd_push: ∀g. 𝐔❪g❫ → ∀f. ⫯f = g → 𝐔❪f❫.
-/3 width=3 by isuni_inv_push, isuni_isid/ qed-.
-
-(* Forward lemmas with test for finite colength *****************************)
-
-lemma isuni_fwd_isfin: ∀f. 𝐔❪f❫ → 𝐅❪f❫.
-#f #H elim H -f /3 width=1 by isfin_next, isfin_isid/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/functions/uparrowstar_2.ma".
-include "ground_2/relocation/rtmap_eq.ma".
-
-(* RELOCATION MAP ***********************************************************)
-
-rec definition nexts (f:rtmap) (n:nat) on n: rtmap ≝ match n with
-[ O ⇒ f | S m ⇒ ↑(nexts f m) ].
-
-interpretation "nexts (rtmap)" 'UpArrowStar n f = (nexts f n).
-
-(* Basic_inversion lemmas *****************************************************)
-
-lemma eq_inv_nexts_sn: ∀n,f1,g2. ↑*[n] f1 ≡ g2 →
- ∃∃f2. f1 ≡ f2 & ↑*[n] f2 = g2.
-#n elim n -n /2 width=3 by ex2_intro/
-#n #IH #f1 #g2 #H elim (eq_inv_nx … H) -H [|*: // ]
-#f0 #Hf10 #H1 elim (IH … Hf10) -IH -Hf10 #f2 #Hf12 #H2 destruct
-/2 width=3 by ex2_intro/
-qed-.
-
-lemma eq_inv_nexts_dx: ∀n,f2,g1. g1 ≡ ↑*[n] f2 →
- ∃∃f1. f1 ≡ f2 & ↑*[n] f1 = g1.
-#n elim n -n /2 width=3 by ex2_intro/
-#n #IH #f2 #g1 #H elim (eq_inv_xn … H) -H [|*: // ]
-#f0 #Hf02 #H1 elim (IH … Hf02) -IH -Hf02 #f1 #Hf12 #H2 destruct
-/2 width=3 by ex2_intro/
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma nexts_O: ∀f. f = ↑*[0] f.
-// qed.
-
-lemma nexts_S: ∀f,n. ↑↑*[n] f = ↑*[↑n] f.
-// qed.
-
-lemma nexts_eq_repl: ∀n. eq_repl (λf1,f2. ↑*[n] f1 ≡ ↑*[n] f2).
-#n elim n -n /3 width=5 by eq_next/
-qed.
-
-(* Advanced properties ******************************************************)
-
-lemma nexts_xn: ∀n,f. ↑*[n] ↑f = ↑*[↑n] f.
-#n elim n -n //
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/functions/upspoonstar_2.ma".
-include "ground_2/relocation/rtmap_eq.ma".
-
-(* RELOCATION MAP ***********************************************************)
-
-rec definition pushs (f:rtmap) (n:nat) on n: rtmap ≝ match n with
-[ O ⇒ f | S m ⇒ ⫯(pushs f m) ].
-
-interpretation "pushs (rtmap)" 'UpSpoonStar n f = (pushs f n).
-
-(* Basic_inversion lemmas *****************************************************)
-
-lemma eq_inv_pushs_sn: ∀n,f1,g2. ⫯*[n] f1 ≡ g2 →
- ∃∃f2. f1 ≡ f2 & ⫯*[n] f2 = g2.
-#n elim n -n /2 width=3 by ex2_intro/
-#n #IH #f1 #g2 #H elim (eq_inv_px … H) -H [|*: // ]
-#f0 #Hf10 #H1 elim (IH … Hf10) -IH -Hf10 #f2 #Hf12 #H2 destruct
-/2 width=3 by ex2_intro/
-qed-.
-
-lemma eq_inv_pushs_dx: ∀n,f2,g1. g1 ≡ ⫯*[n] f2 →
- ∃∃f1. f1 ≡ f2 & ⫯*[n] f1 = g1.
-#n elim n -n /2 width=3 by ex2_intro/
-#n #IH #f2 #g1 #H elim (eq_inv_xp … H) -H [|*: // ]
-#f0 #Hf02 #H1 elim (IH … Hf02) -IH -Hf02 #f1 #Hf12 #H2 destruct
-/2 width=3 by ex2_intro/
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma pushs_O: ∀f. f = ⫯*[0] f.
-// qed.
-
-lemma pushs_S: ∀f,n. ⫯⫯*[n] f = ⫯*[↑n] f.
-// qed.
-
-lemma pushs_eq_repl: ∀n. eq_repl (λf1,f2. ⫯*[n] f1 ≡ ⫯*[n] f2).
-#n elim n -n /3 width=5 by eq_push/
-qed.
-
-(* Advanced properties ******************************************************)
-
-lemma pushs_xn: ∀n,f. ⫯*[n] ⫯f = ⫯*[↑n] f.
-#n elim n -n //
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/rintersection_3.ma".
-include "ground_2/relocation/rtmap_sle.ma".
-
-coinductive sand: relation3 rtmap rtmap rtmap ≝
-| sand_pp: ∀f1,f2,f,g1,g2,g. sand f1 f2 f → ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → sand g1 g2 g
-| sand_np: ∀f1,f2,f,g1,g2,g. sand f1 f2 f → ↑f1 = g1 → ⫯f2 = g2 → ⫯f = g → sand g1 g2 g
-| sand_pn: ∀f1,f2,f,g1,g2,g. sand f1 f2 f → ⫯f1 = g1 → ↑f2 = g2 → ⫯f = g → sand g1 g2 g
-| sand_nn: ∀f1,f2,f,g1,g2,g. sand f1 f2 f → ↑f1 = g1 → ↑f2 = g2 → ↑f = g → sand g1 g2 g
-.
-
-interpretation "intersection (rtmap)"
- 'RIntersection f1 f2 f = (sand f1 f2 f).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma sand_inv_ppx: ∀g1,g2,g. g1 ⋒ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 →
- ∃∃f. f1 ⋒ f2 ≘ f & ⫯f = g.
-#g1 #g2 #g * -g1 -g2 -g
-#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
-try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
-try elim (discr_push_next … Hx1) try elim (discr_next_push … Hx1)
-try (>(injective_push … Hx2) -x2) try (>(injective_next … Hx2) -x2)
-try elim (discr_push_next … Hx2) try elim (discr_next_push … Hx2)
-/2 width=3 by ex2_intro/
-qed-.
-
-lemma sand_inv_npx: ∀g1,g2,g. g1 ⋒ g2 ≘ g → ∀f1,f2. ↑f1 = g1 → ⫯f2 = g2 →
- ∃∃f. f1 ⋒ f2 ≘ f & ⫯f = g.
-#g1 #g2 #g * -g1 -g2 -g
-#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
-try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
-try elim (discr_push_next … Hx1) try elim (discr_next_push … Hx1)
-try (>(injective_push … Hx2) -x2) try (>(injective_next … Hx2) -x2)
-try elim (discr_push_next … Hx2) try elim (discr_next_push … Hx2)
-/2 width=3 by ex2_intro/
-qed-.
-
-lemma sand_inv_pnx: ∀g1,g2,g. g1 ⋒ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 →
- ∃∃f. f1 ⋒ f2 ≘ f & ⫯f = g.
-#g1 #g2 #g * -g1 -g2 -g
-#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
-try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
-try elim (discr_push_next … Hx1) try elim (discr_next_push … Hx1)
-try (>(injective_push … Hx2) -x2) try (>(injective_next … Hx2) -x2)
-try elim (discr_push_next … Hx2) try elim (discr_next_push … Hx2)
-/2 width=3 by ex2_intro/
-qed-.
-
-lemma sand_inv_nnx: ∀g1,g2,g. g1 ⋒ g2 ≘ g → ∀f1,f2. ↑f1 = g1 → ↑f2 = g2 →
- ∃∃f. f1 ⋒ f2 ≘ f & ↑f = g.
-#g1 #g2 #g * -g1 -g2 -g
-#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
-try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
-try elim (discr_push_next … Hx1) try elim (discr_next_push … Hx1)
-try (>(injective_push … Hx2) -x2) try (>(injective_next … Hx2) -x2)
-try elim (discr_push_next … Hx2) try elim (discr_next_push … Hx2)
-/2 width=3 by ex2_intro/
-qed-.
-
-(* Basic properties *********************************************************)
-
-corec lemma sand_eq_repl_back1: ∀f2,f. eq_repl_back … (λf1. f1 ⋒ f2 ≘ f).
-#f2 #f #f1 * -f1 -f2 -f
-#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x #Hx
-try cases (eq_inv_px … Hx … H1) try cases (eq_inv_nx … Hx … H1) -g1
-/3 width=7 by sand_pp, sand_np, sand_pn, sand_nn/
-qed-.
-
-lemma sand_eq_repl_fwd1: ∀f2,f. eq_repl_fwd … (λf1. f1 ⋒ f2 ≘ f).
-#f2 #f @eq_repl_sym /2 width=3 by sand_eq_repl_back1/
-qed-.
-
-corec lemma sand_eq_repl_back2: ∀f1,f. eq_repl_back … (λf2. f1 ⋒ f2 ≘ f).
-#f1 #f #f2 * -f1 -f2 -f
-#f1 #f2 #f #g1 #g2 #g #Hf #H #H2 #H0 #x #Hx
-try cases (eq_inv_px … Hx … H2) try cases (eq_inv_nx … Hx … H2) -g2
-/3 width=7 by sand_pp, sand_np, sand_pn, sand_nn/
-qed-.
-
-lemma sand_eq_repl_fwd2: ∀f1,f. eq_repl_fwd … (λf2. f1 ⋒ f2 ≘ f).
-#f1 #f @eq_repl_sym /2 width=3 by sand_eq_repl_back2/
-qed-.
-
-corec lemma sand_eq_repl_back3: ∀f1,f2. eq_repl_back … (λf. f1 ⋒ f2 ≘ f).
-#f1 #f2 #f * -f1 -f2 -f
-#f1 #f2 #f #g1 #g2 #g #Hf #H #H2 #H0 #x #Hx
-try cases (eq_inv_px … Hx … H0) try cases (eq_inv_nx … Hx … H0) -g
-/3 width=7 by sand_pp, sand_np, sand_pn, sand_nn/
-qed-.
-
-lemma sand_eq_repl_fwd3: ∀f1,f2. eq_repl_fwd … (λf. f1 ⋒ f2 ≘ f).
-#f1 #f2 @eq_repl_sym /2 width=3 by sand_eq_repl_back3/
-qed-.
-
-corec lemma sand_refl: ∀f. f ⋒ f ≘ f.
-#f cases (pn_split f) * #g #H
-[ @(sand_pp … H H H) | @(sand_nn … H H H) ] -H //
-qed.
-
-corec lemma sand_sym: ∀f1,f2,f. f1 ⋒ f2 ≘ f → f2 ⋒ f1 ≘ f.
-#f1 #f2 #f * -f1 -f2 -f
-#f1 #f2 #f #g1 #g2 #g #Hf * * * -g1 -g2 -g
-[ @sand_pp | @sand_pn | @sand_np | @sand_nn ] /2 width=7 by/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.tcs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/parallel_2.ma".
-include "ground_2/relocation/rtmap_isid.ma".
-
-(* RELOCATION MAP ***********************************************************)
-
-coinductive sdj: relation rtmap ≝
-| sdj_pp: ∀f1,f2,g1,g2. sdj f1 f2 → ⫯f1 = g1 → ⫯f2 = g2 → sdj g1 g2
-| sdj_np: ∀f1,f2,g1,g2. sdj f1 f2 → ↑f1 = g1 → ⫯f2 = g2 → sdj g1 g2
-| sdj_pn: ∀f1,f2,g1,g2. sdj f1 f2 → ⫯f1 = g1 → ↑f2 = g2 → sdj g1 g2
-.
-
-interpretation "disjointness (rtmap)"
- 'Parallel f1 f2 = (sdj f1 f2).
-
-(* Basic properties *********************************************************)
-
-axiom sdj_eq_repl_back1: ∀f2. eq_repl_back … (λf1. f1 ∥ f2).
-
-lemma sdj_eq_repl_fwd1: ∀f2. eq_repl_fwd … (λf1. f1 ∥ f2).
-#f2 @eq_repl_sym /2 width=3 by sdj_eq_repl_back1/
-qed-.
-
-axiom sdj_eq_repl_back2: ∀f1. eq_repl_back … (λf2. f1 ∥ f2).
-
-lemma sdj_eq_repl_fwd2: ∀f1. eq_repl_fwd … (λf2. f1 ∥ f2).
-#f1 @eq_repl_sym /2 width=3 by sdj_eq_repl_back2/
-qed-.
-
-corec lemma sdj_sym: symmetric … sdj.
-#f1 #f2 * -f1 -f2
-#f1 #f2 #g1 #g2 #Hf #H1 #H2
-[ @(sdj_pp … H2 H1) | @(sdj_pn … H2 H1) | @(sdj_np … H2 H1) ] -g2 -g1
-/2 width=1 by/
-qed-.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma sdj_inv_pp: ∀g1,g2. g1 ∥ g2 → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 → f1 ∥ f2.
-#g1 #g2 * -g1 -g2
-#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct
-[ lapply (injective_push … Hx1) -Hx1
- lapply (injective_push … Hx2) -Hx2 //
-| elim (discr_push_next … Hx1)
-| elim (discr_push_next … Hx2)
-]
-qed-.
-
-lemma sdj_inv_np: ∀g1,g2. g1 ∥ g2 → ∀f1,f2. ↑f1 = g1 → ⫯f2 = g2 → f1 ∥ f2.
-#g1 #g2 * -g1 -g2
-#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct
-[ elim (discr_next_push … Hx1)
-| lapply (injective_next … Hx1) -Hx1
- lapply (injective_push … Hx2) -Hx2 //
-| elim (discr_push_next … Hx2)
-]
-qed-.
-
-lemma sdj_inv_pn: ∀g1,g2. g1 ∥ g2 → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 → f1 ∥ f2.
-#g1 #g2 * -g1 -g2
-#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct
-[ elim (discr_next_push … Hx2)
-| elim (discr_push_next … Hx1)
-| lapply (injective_push … Hx1) -Hx1
- lapply (injective_next … Hx2) -Hx2 //
-]
-qed-.
-
-lemma sdj_inv_nn: ∀g1,g2. g1 ∥ g2 → ∀f1,f2. ↑f1 = g1 → ↑f2 = g2 → ⊥.
-#g1 #g2 * -g1 -g2
-#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct
-[ elim (discr_next_push … Hx1)
-| elim (discr_next_push … Hx2)
-| elim (discr_next_push … Hx1)
-]
-qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma sdj_inv_nx: ∀g1,g2. g1 ∥ g2 → ∀f1. ↑f1 = g1 →
- ∃∃f2. f1 ∥ f2 & ⫯f2 = g2.
-#g1 #g2 elim (pn_split g2) * #f2 #H2 #H #f1 #H1
-[ lapply (sdj_inv_np … H … H1 H2) -H /2 width=3 by ex2_intro/
-| elim (sdj_inv_nn … H … H1 H2)
-]
-qed-.
-
-lemma sdj_inv_xn: ∀g1,g2. g1 ∥ g2 → ∀f2. ↑f2 = g2 →
- ∃∃f1. f1 ∥ f2 & ⫯f1 = g1.
-#g1 #g2 elim (pn_split g1) * #f1 #H1 #H #f2 #H2
-[ lapply (sdj_inv_pn … H … H1 H2) -H /2 width=3 by ex2_intro/
-| elim (sdj_inv_nn … H … H1 H2)
-]
-qed-.
-
-lemma sdj_inv_xp: ∀g1,g2. g1 ∥ g2 → ∀f2. ⫯f2 = g2 →
- ∨∨ ∃∃f1. f1 ∥ f2 & ⫯f1 = g1
- | ∃∃f1. f1 ∥ f2 & ↑f1 = g1.
-#g1 #g2 elim (pn_split g1) * #f1 #H1 #H #f2 #H2
-[ lapply (sdj_inv_pp … H … H1 H2) | lapply (sdj_inv_np … H … H1 H2) ] -H -H2
-/3 width=3 by ex2_intro, or_introl, or_intror/
-qed-.
-
-lemma sdj_inv_px: ∀g1,g2. g1 ∥ g2 → ∀f1. ⫯f1 = g1 →
- ∨∨ ∃∃f2. f1 ∥ f2 & ⫯f2 = g2
- | ∃∃f2. f1 ∥ f2 & ↑f2 = g2.
-#g1 #g2 elim (pn_split g2) * #f2 #H2 #H #f1 #H1
-[ lapply (sdj_inv_pp … H … H1 H2) | lapply (sdj_inv_pn … H … H1 H2) ] -H -H1
-/3 width=3 by ex2_intro, or_introl, or_intror/
-qed-.
-
-(* Properties with isid *****************************************************)
-
-corec lemma sdj_isid_dx: ∀f2. 𝐈❪f2❫ → ∀f1. f1 ∥ f2.
-#f2 * -f2
-#f2 #g2 #Hf2 #H2 #f1 cases (pn_split f1) *
-/3 width=5 by sdj_np, sdj_pp/
-qed.
-
-corec lemma sdj_isid_sn: ∀f1. 𝐈❪f1❫ → ∀f2. f1 ∥ f2.
-#f1 * -f1
-#f1 #g1 #Hf1 #H1 #f2 cases (pn_split f2) *
-/3 width=5 by sdj_pn, sdj_pp/
-qed.
-
-(* Inversion lemmas with isid ***********************************************)
-
-corec lemma sdj_inv_refl: ∀f. f ∥ f → 𝐈❪f❫.
-#f cases (pn_split f) * #g #Hg #H
-[ lapply (sdj_inv_pp … H … Hg Hg) -H /3 width=3 by isid_push/
-| elim (sdj_inv_nn … H … Hg Hg)
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.tcs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/relocation/rtmap_isid.ma".
-include "ground_2/relocation/rtmap_isdiv.ma".
-
-(* RELOCATION MAP ***********************************************************)
-
-coinductive sle: relation rtmap ≝
-| sle_push: ∀f1,f2,g1,g2. sle f1 f2 → ⫯f1 = g1 → ⫯f2 = g2 → sle g1 g2
-| sle_next: ∀f1,f2,g1,g2. sle f1 f2 → ↑f1 = g1 → ↑f2 = g2 → sle g1 g2
-| sle_weak: ∀f1,f2,g1,g2. sle f1 f2 → ⫯f1 = g1 → ↑f2 = g2 → sle g1 g2
-.
-
-interpretation "inclusion (rtmap)"
- 'subseteq f1 f2 = (sle f1 f2).
-
-(* Basic properties *********************************************************)
-
-axiom sle_eq_repl_back1: ∀f2. eq_repl_back … (λf1. f1 ⊆ f2).
-
-lemma sle_eq_repl_fwd1: ∀f2. eq_repl_fwd … (λf1. f1 ⊆ f2).
-#f2 @eq_repl_sym /2 width=3 by sle_eq_repl_back1/
-qed-.
-
-axiom sle_eq_repl_back2: ∀f1. eq_repl_back … (λf2. f1 ⊆ f2).
-
-lemma sle_eq_repl_fwd2: ∀f1. eq_repl_fwd … (λf2. f1 ⊆ f2).
-#f1 @eq_repl_sym /2 width=3 by sle_eq_repl_back2/
-qed-.
-
-corec lemma sle_refl: ∀f. f ⊆ f.
-#f cases (pn_split f) * #g #H
-[ @(sle_push … H H) | @(sle_next … H H) ] -H //
-qed.
-
-lemma sle_refl_eq: ∀f1,f2. f1 ≡ f2 → f1 ⊆ f2.
-/2 width=3 by sle_eq_repl_back2/ qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma sle_inv_xp: ∀g1,g2. g1 ⊆ g2 → ∀f2. ⫯f2 = g2 →
- ∃∃f1. f1 ⊆ f2 & ⫯f1 = g1.
-#g1 #g2 * -g1 -g2
-#f1 #f2 #g1 #g2 #H #H1 #H2 #x2 #Hx2 destruct
-[ lapply (injective_push … Hx2) -Hx2 /2 width=3 by ex2_intro/ ]
-elim (discr_push_next … Hx2)
-qed-.
-
-lemma sle_inv_nx: ∀g1,g2. g1 ⊆ g2 → ∀f1. ↑f1 = g1 →
- ∃∃f2. f1 ⊆ f2 & ↑f2 = g2.
-#g1 #g2 * -g1 -g2
-#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #Hx1 destruct
-[2: lapply (injective_next … Hx1) -Hx1 /2 width=3 by ex2_intro/ ]
-elim (discr_next_push … Hx1)
-qed-.
-
-lemma sle_inv_pn: ∀g1,g2. g1 ⊆ g2 → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 → f1 ⊆ f2.
-#g1 #g2 * -g1 -g2
-#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct
-[ elim (discr_next_push … Hx2)
-| elim (discr_push_next … Hx1)
-| lapply (injective_push … Hx1) -Hx1
- lapply (injective_next … Hx2) -Hx2 //
-]
-qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma sle_inv_pp: ∀g1,g2. g1 ⊆ g2 → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 → f1 ⊆ f2.
-#g1 #g2 #H #f1 #f2 #H1 #H2 elim (sle_inv_xp … H … H2) -g2
-#x1 #H #Hx1 destruct lapply (injective_push … Hx1) -Hx1 //
-qed-.
-
-lemma sle_inv_nn: ∀g1,g2. g1 ⊆ g2 → ∀f1,f2. ↑f1 = g1 → ↑f2 = g2 → f1 ⊆ f2.
-#g1 #g2 #H #f1 #f2 #H1 #H2 elim (sle_inv_nx … H … H1) -g1
-#x2 #H #Hx2 destruct lapply (injective_next … Hx2) -Hx2 //
-qed-.
-
-lemma sle_inv_px: ∀g1,g2. g1 ⊆ g2 → ∀f1. ⫯f1 = g1 →
- (∃∃f2. f1 ⊆ f2 & ⫯f2 = g2) ∨ ∃∃f2. f1 ⊆ f2 & ↑f2 = g2.
-#g1 #g2 elim (pn_split g2) * #f2 #H2 #H #f1 #H1
-[ lapply (sle_inv_pp … H … H1 H2) | lapply (sle_inv_pn … H … H1 H2) ] -H -H1
-/3 width=3 by ex2_intro, or_introl, or_intror/
-qed-.
-
-lemma sle_inv_xn: ∀g1,g2. g1 ⊆ g2 → ∀f2. ↑f2 = g2 →
- (∃∃f1. f1 ⊆ f2 & ⫯f1 = g1) ∨ ∃∃f1. f1 ⊆ f2 & ↑f1 = g1.
-#g1 #g2 elim (pn_split g1) * #f1 #H1 #H #f2 #H2
-[ lapply (sle_inv_pn … H … H1 H2) | lapply (sle_inv_nn … H … H1 H2) ] -H -H2
-/3 width=3 by ex2_intro, or_introl, or_intror/
-qed-.
-
-(* Main properties **********************************************************)
-
-corec theorem sle_trans: Transitive … sle.
-#f1 #f * -f1 -f
-#f1 #f #g1 #g #Hf #H1 #H #g2 #H0
-[ cases (sle_inv_px … H0 … H) * |*: cases (sle_inv_nx … H0 … H) ] -g
-/3 width=5 by sle_push, sle_next, sle_weak/
-qed-.
-
-(* Properties with iteraded push ********************************************)
-
-lemma sle_pushs: ∀f1,f2. f1 ⊆ f2 → ∀i. ⫯*[i] f1 ⊆ ⫯*[i] f2.
-#f1 #f2 #Hf12 #i elim i -i /2 width=5 by sle_push/
-qed.
-
-(* Properties with tail *****************************************************)
-
-lemma sle_px_tl: ∀g1,g2. g1 ⊆ g2 → ∀f1. ⫯f1 = g1 → f1 ⊆ ⫱g2.
-#g1 #g2 #H #f1 #H1 elim (sle_inv_px … H … H1) -H -H1 * //
-qed.
-
-lemma sle_xn_tl: ∀g1,g2. g1 ⊆ g2 → ∀f2. ↑f2 = g2 → ⫱g1 ⊆ f2.
-#g1 #g2 #H #f2 #H2 elim (sle_inv_xn … H … H2) -H -H2 * //
-qed.
-
-lemma sle_tl: ∀f1,f2. f1 ⊆ f2 → ⫱f1 ⊆ ⫱f2.
-#f1 elim (pn_split f1) * #g1 #H1 #f2 #H
-[ lapply (sle_px_tl … H … H1) -H //
-| elim (sle_inv_nx … H … H1) -H //
-]
-qed.
-
-(* Inversion lemmas with tail ***********************************************)
-
-lemma sle_inv_tl_sn: ∀f1,f2. ⫱f1 ⊆ f2 → f1 ⊆ ↑f2.
-#f1 elim (pn_split f1) * #g1 #H destruct
-/2 width=5 by sle_next, sle_weak/
-qed-.
-
-lemma sle_inv_tl_dx: ∀f1,f2. f1 ⊆ ⫱f2 → ⫯f1 ⊆ f2.
-#f1 #f2 elim (pn_split f2) * #g2 #H destruct
-/2 width=5 by sle_push, sle_weak/
-qed-.
-
-(* Properties with iteraded tail ********************************************)
-
-lemma sle_tls: ∀f1,f2. f1 ⊆ f2 → ∀i. ⫱*[i] f1 ⊆ ⫱*[i] f2.
-#f1 #f2 #Hf12 #i elim i -i /2 width=5 by sle_tl/
-qed.
-
-(* Properties with isid *****************************************************)
-
-corec lemma sle_isid_sn: ∀f1. 𝐈❪f1❫ → ∀f2. f1 ⊆ f2.
-#f1 * -f1
-#f1 #g1 #Hf1 #H1 #f2 cases (pn_split f2) *
-/3 width=5 by sle_weak, sle_push/
-qed.
-
-(* Inversion lemmas with isid ***********************************************)
-
-corec lemma sle_inv_isid_dx: ∀f1,f2. f1 ⊆ f2 → 𝐈❪f2❫ → 𝐈❪f1❫.
-#f1 #f2 * -f1 -f2
-#f1 #f2 #g1 #g2 #Hf * * #H
-[2,3: elim (isid_inv_next … H) // ]
-lapply (isid_inv_push … H ??) -H
-/3 width=3 by isid_push/
-qed-.
-
-(* Properties with isdiv ****************************************************)
-
-corec lemma sle_isdiv_dx: ∀f2. 𝛀❪f2❫ → ∀f1. f1 ⊆ f2.
-#f2 * -f2
-#f2 #g2 #Hf2 #H2 #f1 cases (pn_split f1) *
-/3 width=5 by sle_weak, sle_next/
-qed.
-
-(* Inversion lemmas with isdiv **********************************************)
-
-corec lemma sle_inv_isdiv_sn: ∀f1,f2. f1 ⊆ f2 → 𝛀❪f1❫ → 𝛀❪f2❫.
-#f1 #f2 * -f1 -f2
-#f1 #f2 #g1 #g2 #Hf * * #H
-[1,3: elim (isdiv_inv_push … H) // ]
-lapply (isdiv_inv_next … H ??) -H
-/3 width=3 by isdiv_next/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/xoa/ex_4_2.ma".
-include "ground_2/notation/relations/runion_3.ma".
-include "ground_2/relocation/rtmap_isfin.ma".
-include "ground_2/relocation/rtmap_sle.ma".
-
-coinductive sor: relation3 rtmap rtmap rtmap ≝
-| sor_pp: ∀f1,f2,f,g1,g2,g. sor f1 f2 f → ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → sor g1 g2 g
-| sor_np: ∀f1,f2,f,g1,g2,g. sor f1 f2 f → ↑f1 = g1 → ⫯f2 = g2 → ↑f = g → sor g1 g2 g
-| sor_pn: ∀f1,f2,f,g1,g2,g. sor f1 f2 f → ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → sor g1 g2 g
-| sor_nn: ∀f1,f2,f,g1,g2,g. sor f1 f2 f → ↑f1 = g1 → ↑f2 = g2 → ↑f = g → sor g1 g2 g
-.
-
-interpretation "union (rtmap)"
- 'RUnion f1 f2 f = (sor f1 f2 f).
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma sor_inv_ppx: ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ⫯f2 = g2 →
- ∃∃f. f1 ⋓ f2 ≘ f & ⫯f = g.
-#g1 #g2 #g * -g1 -g2 -g
-#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
-try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
-try elim (discr_push_next … Hx1) try elim (discr_next_push … Hx1)
-try (>(injective_push … Hx2) -x2) try (>(injective_next … Hx2) -x2)
-try elim (discr_push_next … Hx2) try elim (discr_next_push … Hx2)
-/2 width=3 by ex2_intro/
-qed-.
-
-lemma sor_inv_npx: ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f1,f2. ↑f1 = g1 → ⫯f2 = g2 →
- ∃∃f. f1 ⋓ f2 ≘ f & ↑f = g.
-#g1 #g2 #g * -g1 -g2 -g
-#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
-try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
-try elim (discr_push_next … Hx1) try elim (discr_next_push … Hx1)
-try (>(injective_push … Hx2) -x2) try (>(injective_next … Hx2) -x2)
-try elim (discr_push_next … Hx2) try elim (discr_next_push … Hx2)
-/2 width=3 by ex2_intro/
-qed-.
-
-lemma sor_inv_pnx: ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f1,f2. ⫯f1 = g1 → ↑f2 = g2 →
- ∃∃f. f1 ⋓ f2 ≘ f & ↑f = g.
-#g1 #g2 #g * -g1 -g2 -g
-#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
-try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
-try elim (discr_push_next … Hx1) try elim (discr_next_push … Hx1)
-try (>(injective_push … Hx2) -x2) try (>(injective_next … Hx2) -x2)
-try elim (discr_push_next … Hx2) try elim (discr_next_push … Hx2)
-/2 width=3 by ex2_intro/
-qed-.
-
-lemma sor_inv_nnx: ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f1,f2. ↑f1 = g1 → ↑f2 = g2 →
- ∃∃f. f1 ⋓ f2 ≘ f & ↑f = g.
-#g1 #g2 #g * -g1 -g2 -g
-#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
-try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
-try elim (discr_push_next … Hx1) try elim (discr_next_push … Hx1)
-try (>(injective_push … Hx2) -x2) try (>(injective_next … Hx2) -x2)
-try elim (discr_push_next … Hx2) try elim (discr_next_push … Hx2)
-/2 width=3 by ex2_intro/
-qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma sor_inv_ppn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ↑f = g → ⊥.
-#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0
-elim (sor_inv_ppx … H … H1 H2) -g1 -g2 #x #_ #H destruct
-/2 width=3 by discr_push_next/
-qed-.
-
-lemma sor_inv_nxp: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- ∀f1,f. ↑f1 = g1 → ⫯f = g → ⊥.
-#g1 #g2 #g #H #f1 #f #H1 #H0
-elim (pn_split g2) * #f2 #H2
-[ elim (sor_inv_npx … H … H1 H2)
-| elim (sor_inv_nnx … H … H1 H2)
-] -g1 -g2 #x #_ #H destruct
-/2 width=3 by discr_next_push/
-qed-.
-
-lemma sor_inv_xnp: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- ∀f2,f. ↑f2 = g2 → ⫯f = g → ⊥.
-#g1 #g2 #g #H #f2 #f #H2 #H0
-elim (pn_split g1) * #f1 #H1
-[ elim (sor_inv_pnx … H … H1 H2)
-| elim (sor_inv_nnx … H … H1 H2)
-] -g1 -g2 #x #_ #H destruct
-/2 width=3 by discr_next_push/
-qed-.
-
-lemma sor_inv_ppp: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- ∀f1,f2,f. ⫯f1 = g1 → ⫯f2 = g2 → ⫯f = g → f1 ⋓ f2 ≘ f.
-#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0
-elim (sor_inv_ppx … H … H1 H2) -g1 -g2 #x #Hx #H destruct
-<(injective_push … H) -f //
-qed-.
-
-lemma sor_inv_npn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- ∀f1,f2,f. ↑f1 = g1 → ⫯f2 = g2 → ↑f = g → f1 ⋓ f2 ≘ f.
-#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0
-elim (sor_inv_npx … H … H1 H2) -g1 -g2 #x #Hx #H destruct
-<(injective_next … H) -f //
-qed-.
-
-lemma sor_inv_pnn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- ∀f1,f2,f. ⫯f1 = g1 → ↑f2 = g2 → ↑f = g → f1 ⋓ f2 ≘ f.
-#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0
-elim (sor_inv_pnx … H … H1 H2) -g1 -g2 #x #Hx #H destruct
-<(injective_next … H) -f //
-qed-.
-
-lemma sor_inv_nnn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- ∀f1,f2,f. ↑f1 = g1 → ↑f2 = g2 → ↑f = g → f1 ⋓ f2 ≘ f.
-#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0
-elim (sor_inv_nnx … H … H1 H2) -g1 -g2 #x #Hx #H destruct
-<(injective_next … H) -f //
-qed-.
-
-lemma sor_inv_pxp: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- ∀f1,f. ⫯f1 = g1 → ⫯f = g →
- ∃∃f2. f1 ⋓ f2 ≘ f & ⫯f2 = g2.
-#g1 #g2 #g #H #f1 #f #H1 #H0
-elim (pn_split g2) * #f2 #H2
-[ /3 width=7 by sor_inv_ppp, ex2_intro/
-| elim (sor_inv_xnp … H … H2 H0)
-]
-qed-.
-
-lemma sor_inv_xpp: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- ∀f2,f. ⫯f2 = g2 → ⫯f = g →
- ∃∃f1. f1 ⋓ f2 ≘ f & ⫯f1 = g1.
-#g1 #g2 #g #H #f2 #f #H2 #H0
-elim (pn_split g1) * #f1 #H1
-[ /3 width=7 by sor_inv_ppp, ex2_intro/
-| elim (sor_inv_nxp … H … H1 H0)
-]
-qed-.
-
-lemma sor_inv_pxn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- ∀f1,f. ⫯f1 = g1 → ↑f = g →
- ∃∃f2. f1 ⋓ f2 ≘ f & ↑f2 = g2.
-#g1 #g2 #g #H #f1 #f #H1 #H0
-elim (pn_split g2) * #f2 #H2
-[ elim (sor_inv_ppn … H … H1 H2 H0)
-| /3 width=7 by sor_inv_pnn, ex2_intro/
-]
-qed-.
-
-lemma sor_inv_xpn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- ∀f2,f. ⫯f2 = g2 → ↑f = g →
- ∃∃f1. f1 ⋓ f2 ≘ f & ↑f1 = g1.
-#g1 #g2 #g #H #f2 #f #H2 #H0
-elim (pn_split g1) * #f1 #H1
-[ elim (sor_inv_ppn … H … H1 H2 H0)
-| /3 width=7 by sor_inv_npn, ex2_intro/
-]
-qed-.
-
-lemma sor_inv_xxp: ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f. ⫯f = g →
- ∃∃f1,f2. f1 ⋓ f2 ≘ f & ⫯f1 = g1 & ⫯f2 = g2.
-#g1 #g2 #g #H #f #H0
-elim (pn_split g1) * #f1 #H1
-[ elim (sor_inv_pxp … H … H1 H0) -g /2 width=5 by ex3_2_intro/
-| elim (sor_inv_nxp … H … H1 H0)
-]
-qed-.
-
-lemma sor_inv_nxn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- ∀f1,f. ↑f1 = g1 → ↑f = g →
- (∃∃f2. f1 ⋓ f2 ≘ f & ⫯f2 = g2) ∨
- ∃∃f2. f1 ⋓ f2 ≘ f & ↑f2 = g2.
-#g1 #g2 elim (pn_split g2) *
-/4 width=7 by sor_inv_npn, sor_inv_nnn, ex2_intro, or_intror, or_introl/
-qed-.
-
-lemma sor_inv_xnn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- ∀f2,f. ↑f2 = g2 → ↑f = g →
- (∃∃f1. f1 ⋓ f2 ≘ f & ⫯f1 = g1) ∨
- ∃∃f1. f1 ⋓ f2 ≘ f & ↑f1 = g1.
-#g1 elim (pn_split g1) *
-/4 width=7 by sor_inv_pnn, sor_inv_nnn, ex2_intro, or_intror, or_introl/
-qed-.
-
-lemma sor_inv_xxn: ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f. ↑f = g →
- ∨∨ ∃∃f1,f2. f1 ⋓ f2 ≘ f & ↑f1 = g1 & ⫯f2 = g2
- | ∃∃f1,f2. f1 ⋓ f2 ≘ f & ⫯f1 = g1 & ↑f2 = g2
- | ∃∃f1,f2. f1 ⋓ f2 ≘ f & ↑f1 = g1 & ↑f2 = g2.
-#g1 #g2 #g #H #f #H0
-elim (pn_split g1) * #f1 #H1
-[ elim (sor_inv_pxn … H … H1 H0) -g
- /3 width=5 by or3_intro1, ex3_2_intro/
-| elim (sor_inv_nxn … H … H1 H0) -g *
- /3 width=5 by or3_intro0, or3_intro2, ex3_2_intro/
-]
-qed-.
-
-(* Main inversion lemmas ****************************************************)
-
-corec theorem sor_mono: ∀f1,f2,x,y. f1 ⋓ f2 ≘ x → f1 ⋓ f2 ≘ y → x ≡ y.
-#f1 #f2 #x #y * -f1 -f2 -x
-#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #H
-[ cases (sor_inv_ppx … H … H1 H2)
-| cases (sor_inv_npx … H … H1 H2)
-| cases (sor_inv_pnx … H … H1 H2)
-| cases (sor_inv_nnx … H … H1 H2)
-] -g1 -g2
-/3 width=5 by eq_push, eq_next/
-qed-.
-
-(* Basic properties *********************************************************)
-
-corec lemma sor_eq_repl_back1: ∀f2,f. eq_repl_back … (λf1. f1 ⋓ f2 ≘ f).
-#f2 #f #f1 * -f1 -f2 -f
-#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x #Hx
-try cases (eq_inv_px … Hx … H1) try cases (eq_inv_nx … Hx … H1) -g1
-/3 width=7 by sor_pp, sor_np, sor_pn, sor_nn/
-qed-.
-
-lemma sor_eq_repl_fwd1: ∀f2,f. eq_repl_fwd … (λf1. f1 ⋓ f2 ≘ f).
-#f2 #f @eq_repl_sym /2 width=3 by sor_eq_repl_back1/
-qed-.
-
-corec lemma sor_eq_repl_back2: ∀f1,f. eq_repl_back … (λf2. f1 ⋓ f2 ≘ f).
-#f1 #f #f2 * -f1 -f2 -f
-#f1 #f2 #f #g1 #g2 #g #Hf #H #H2 #H0 #x #Hx
-try cases (eq_inv_px … Hx … H2) try cases (eq_inv_nx … Hx … H2) -g2
-/3 width=7 by sor_pp, sor_np, sor_pn, sor_nn/
-qed-.
-
-lemma sor_eq_repl_fwd2: ∀f1,f. eq_repl_fwd … (λf2. f1 ⋓ f2 ≘ f).
-#f1 #f @eq_repl_sym /2 width=3 by sor_eq_repl_back2/
-qed-.
-
-corec lemma sor_eq_repl_back3: ∀f1,f2. eq_repl_back … (λf. f1 ⋓ f2 ≘ f).
-#f1 #f2 #f * -f1 -f2 -f
-#f1 #f2 #f #g1 #g2 #g #Hf #H #H2 #H0 #x #Hx
-try cases (eq_inv_px … Hx … H0) try cases (eq_inv_nx … Hx … H0) -g
-/3 width=7 by sor_pp, sor_np, sor_pn, sor_nn/
-qed-.
-
-lemma sor_eq_repl_fwd3: ∀f1,f2. eq_repl_fwd … (λf. f1 ⋓ f2 ≘ f).
-#f1 #f2 @eq_repl_sym /2 width=3 by sor_eq_repl_back3/
-qed-.
-
-corec lemma sor_idem: ∀f. f ⋓ f ≘ f.
-#f cases (pn_split f) * #g #H
-[ @(sor_pp … H H H) | @(sor_nn … H H H) ] -H //
-qed.
-
-corec lemma sor_comm: ∀f1,f2,f. f1 ⋓ f2 ≘ f → f2 ⋓ f1 ≘ f.
-#f1 #f2 #f * -f1 -f2 -f
-#f1 #f2 #f #g1 #g2 #g #Hf * * * -g1 -g2 -g
-[ @sor_pp | @sor_pn | @sor_np | @sor_nn ] /2 width=7 by/
-qed-.
-
-(* Properties with tail *****************************************************)
-
-lemma sor_tl: ∀f1,f2,f. f1 ⋓ f2 ≘ f → ⫱f1 ⋓ ⫱f2 ≘ ⫱f.
-#f1 cases (pn_split f1) * #g1 #H1
-#f2 cases (pn_split f2) * #g2 #H2
-#f #Hf
-[ cases (sor_inv_ppx … Hf … H1 H2)
-| cases (sor_inv_pnx … Hf … H1 H2)
-| cases (sor_inv_npx … Hf … H1 H2)
-| cases (sor_inv_nnx … Hf … H1 H2)
-] -Hf #g #Hg #H destruct //
-qed.
-
-lemma sor_xxn_tl: ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f. ↑f = g →
- (∃∃f1,f2. f1 ⋓ f2 ≘ f & ↑f1 = g1 & ⫱g2 = f2) ∨
- (∃∃f1,f2. f1 ⋓ f2 ≘ f & ⫱g1 = f1 & ↑f2 = g2).
-#g1 #g2 #g #H #f #H0 elim (sor_inv_xxn … H … H0) -H -H0 *
-/3 width=5 by ex3_2_intro, or_introl, or_intror/
-qed-.
-
-lemma sor_xnx_tl: ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f2. ↑f2 = g2 →
- ∃∃f1,f. f1 ⋓ f2 ≘ f & ⫱g1 = f1 & ↑f = g.
-#g1 elim (pn_split g1) * #f1 #H1 #g2 #g #H #f2 #H2
-[ elim (sor_inv_pnx … H … H1 H2) | elim (sor_inv_nnx … H … H1 H2) ] -g2
-/3 width=5 by ex3_2_intro/
-qed-.
-
-lemma sor_nxx_tl: ∀g1,g2,g. g1 ⋓ g2 ≘ g → ∀f1. ↑f1 = g1 →
- ∃∃f2,f. f1 ⋓ f2 ≘ f & ⫱g2 = f2 & ↑f = g.
-#g1 #g2 elim (pn_split g2) * #f2 #H2 #g #H #f1 #H1
-[ elim (sor_inv_npx … H … H1 H2) | elim (sor_inv_nnx … H … H1 H2) ] -g1
-/3 width=5 by ex3_2_intro/
-qed-.
-
-(* Properties with iterated tail ********************************************)
-
-lemma sor_tls: ∀f1,f2,f. f1 ⋓ f2 ≘ f →
- ∀n. ⫱*[n]f1 ⋓ ⫱*[n]f2 ≘ ⫱*[n]f.
-#f1 #f2 #f #Hf #n elim n -n /2 width=1 by sor_tl/
-qed.
-
-(* Properies with test for identity *****************************************)
-
-corec lemma sor_isid_sn: ∀f1. 𝐈❪f1❫ → ∀f2. f1 ⋓ f2 ≘ f2.
-#f1 * -f1
-#f1 #g1 #Hf1 #H1 #f2 cases (pn_split f2) *
-/3 width=7 by sor_pp, sor_pn/
-qed.
-
-corec lemma sor_isid_dx: ∀f2. 𝐈❪f2❫ → ∀f1. f1 ⋓ f2 ≘ f1.
-#f2 * -f2
-#f2 #g2 #Hf2 #H2 #f1 cases (pn_split f1) *
-/3 width=7 by sor_pp, sor_np/
-qed.
-
-lemma sor_isid: ∀f1,f2,f. 𝐈❪f1❫ → 𝐈❪f2❫ → 𝐈❪f❫ → f1 ⋓ f2 ≘ f.
-/4 width=3 by sor_eq_repl_back2, sor_eq_repl_back1, isid_inv_eq_repl/ qed.
-
-(* Inversion lemmas with tail ***********************************************)
-
-lemma sor_inv_tl_sn: ∀f1,f2,f. ⫱f1 ⋓ f2 ≘ f → f1 ⋓ ↑f2 ≘ ↑f.
-#f1 #f2 #f elim (pn_split f1) *
-#g1 #H destruct /2 width=7 by sor_pn, sor_nn/
-qed-.
-
-lemma sor_inv_tl_dx: ∀f1,f2,f. f1 ⋓ ⫱f2 ≘ f → ↑f1 ⋓ f2 ≘ ↑f.
-#f1 #f2 #f elim (pn_split f2) *
-#g2 #H destruct /2 width=7 by sor_np, sor_nn/
-qed-.
-
-(* Inversion lemmas with test for identity **********************************)
-
-lemma sor_isid_inv_sn: ∀f1,f2,f. f1 ⋓ f2 ≘ f → 𝐈❪f1❫ → f2 ≡ f.
-/3 width=4 by sor_isid_sn, sor_mono/
-qed-.
-
-lemma sor_isid_inv_dx: ∀f1,f2,f. f1 ⋓ f2 ≘ f → 𝐈❪f2❫ → f1 ≡ f.
-/3 width=4 by sor_isid_dx, sor_mono/
-qed-.
-
-corec lemma sor_fwd_isid1: ∀f1,f2,f. f1 ⋓ f2 ≘ f → 𝐈❪f❫ → 𝐈❪f1❫.
-#f1 #f2 #f * -f1 -f2 -f
-#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H #Hg
-[ /4 width=6 by isid_inv_push, isid_push/ ]
-cases (isid_inv_next … Hg … H)
-qed-.
-
-corec lemma sor_fwd_isid2: ∀f1,f2,f. f1 ⋓ f2 ≘ f → 𝐈❪f❫ → 𝐈❪f2❫.
-#f1 #f2 #f * -f1 -f2 -f
-#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H #Hg
-[ /4 width=6 by isid_inv_push, isid_push/ ]
-cases (isid_inv_next … Hg … H)
-qed-.
-
-lemma sor_inv_isid3: ∀f1,f2,f. f1 ⋓ f2 ≘ f → 𝐈❪f❫ → 𝐈❪f1❫ ∧ 𝐈❪f2❫.
-/3 width=4 by sor_fwd_isid2, sor_fwd_isid1, conj/ qed-.
-
-(* Properties with finite colength assignment *******************************)
-
-lemma sor_fcla_ex: ∀f1,n1. 𝐂❪f1❫ ≘ n1 → ∀f2,n2. 𝐂❪f2❫ ≘ n2 →
- ∃∃f,n. f1 ⋓ f2 ≘ f & 𝐂❪f❫ ≘ n & (n1 ∨ n2) ≤ n & n ≤ n1 + n2.
-#f1 #n1 #Hf1 elim Hf1 -f1 -n1 /3 width=6 by sor_isid_sn, ex4_2_intro/
-#f1 #n1 #Hf1 #IH #f2 #n2 * -f2 -n2 /3 width=6 by fcla_push, fcla_next, ex4_2_intro, sor_isid_dx/
-#f2 #n2 #Hf2 elim (IH … Hf2) -IH -Hf2 -Hf1 [2,4: #f #n <plus_n_Sm ] (**) (* full auto fails *)
-[ /3 width=7 by fcla_next, sor_pn, max_S2_le_S, le_S_S, ex4_2_intro/
-| /4 width=7 by fcla_next, sor_nn, le_S, le_S_S, ex4_2_intro/
-| /3 width=7 by fcla_push, sor_pp, ex4_2_intro/
-| /3 width=7 by fcla_next, sor_np, max_S1_le_S, le_S_S, ex4_2_intro/
-]
-qed-.
-
-lemma sor_fcla: ∀f1,n1. 𝐂❪f1❫ ≘ n1 → ∀f2,n2. 𝐂❪f2❫ ≘ n2 → ∀f. f1 ⋓ f2 ≘ f →
- ∃∃n. 𝐂❪f❫ ≘ n & (n1 ∨ n2) ≤ n & n ≤ n1 + n2.
-#f1 #n1 #Hf1 #f2 #n2 #Hf2 #f #Hf elim (sor_fcla_ex … Hf1 … Hf2) -Hf1 -Hf2
-/4 width=6 by sor_mono, fcla_eq_repl_back, ex3_intro/
-qed-.
-
-(* Forward lemmas with finite colength **************************************)
-
-lemma sor_fwd_fcla_sn_ex: ∀f,n. 𝐂❪f❫ ≘ n → ∀f1,f2. f1 ⋓ f2 ≘ f →
- ∃∃n1. 𝐂❪f1❫ ≘ n1 & n1 ≤ n.
-#f #n #H elim H -f -n
-[ /4 width=4 by sor_fwd_isid1, fcla_isid, ex2_intro/
-| #f #n #_ #IH #f1 #f2 #H
- elim (sor_inv_xxp … H) -H [ |*: // ] #g1 #g2 #Hf #H1 #H2 destruct
- elim (IH … Hf) -f /3 width=3 by fcla_push, ex2_intro/
-| #f #n #_ #IH #f1 #f2 #H
- elim (sor_inv_xxn … H) -H [1,3,4: * |*: // ] #g1 #g2 #Hf #H1 #H2 destruct
- elim (IH … Hf) -f /3 width=3 by fcla_push, fcla_next, le_S_S, le_S, ex2_intro/
-]
-qed-.
-
-lemma sor_fwd_fcla_dx_ex: ∀f,n. 𝐂❪f❫ ≘ n → ∀f1,f2. f1 ⋓ f2 ≘ f →
- ∃∃n2. 𝐂❪f2❫ ≘ n2 & n2 ≤ n.
-/3 width=4 by sor_fwd_fcla_sn_ex, sor_comm/ qed-.
-
-(* Properties with test for finite colength *********************************)
-
-lemma sor_isfin_ex: ∀f1,f2. 𝐅❪f1❫ → 𝐅❪f2❫ → ∃∃f. f1 ⋓ f2 ≘ f & 𝐅❪f❫.
-#f1 #f2 * #n1 #H1 * #n2 #H2 elim (sor_fcla_ex … H1 … H2) -H1 -H2
-/3 width=4 by ex2_intro, ex_intro/
-qed-.
-
-lemma sor_isfin: ∀f1,f2. 𝐅❪f1❫ → 𝐅❪f2❫ → ∀f. f1 ⋓ f2 ≘ f → 𝐅❪f❫.
-#f1 #f2 #Hf1 #Hf2 #f #Hf elim (sor_isfin_ex … Hf1 … Hf2) -Hf1 -Hf2
-/3 width=6 by sor_mono, isfin_eq_repl_back/
-qed-.
-
-(* Forward lemmas with test for finite colength *****************************)
-
-lemma sor_fwd_isfin_sn: ∀f. 𝐅❪f❫ → ∀f1,f2. f1 ⋓ f2 ≘ f → 𝐅❪f1❫.
-#f * #n #Hf #f1 #f2 #H
-elim (sor_fwd_fcla_sn_ex … Hf … H) -f -f2 /2 width=2 by ex_intro/
-qed-.
-
-lemma sor_fwd_isfin_dx: ∀f. 𝐅❪f❫ → ∀f1,f2. f1 ⋓ f2 ≘ f → 𝐅❪f2❫.
-#f * #n #Hf #f1 #f2 #H
-elim (sor_fwd_fcla_dx_ex … Hf … H) -f -f1 /2 width=2 by ex_intro/
-qed-.
-
-(* Inversion lemmas with test for finite colength ***************************)
-
-lemma sor_inv_isfin3: ∀f1,f2,f. f1 ⋓ f2 ≘ f → 𝐅❪f❫ → 𝐅❪f1❫ ∧ 𝐅❪f2❫.
-/3 width=4 by sor_fwd_isfin_dx, sor_fwd_isfin_sn, conj/ qed-.
-
-(* Inversion lemmas with inclusion ******************************************)
-
-corec lemma sor_inv_sle_sn: ∀f1,f2,f. f1 ⋓ f2 ≘ f → f1 ⊆ f.
-#f1 #f2 #f * -f1 -f2 -f
-#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0
-/3 width=5 by sle_push, sle_next, sle_weak/
-qed-.
-
-corec lemma sor_inv_sle_dx: ∀f1,f2,f. f1 ⋓ f2 ≘ f → f2 ⊆ f.
-#f1 #f2 #f * -f1 -f2 -f
-#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0
-/3 width=5 by sle_push, sle_next, sle_weak/
-qed-.
-
-lemma sor_inv_sle_sn_trans: ∀f1,f2,f. f1 ⋓ f2 ≘ f → ∀g. g ⊆ f1 → g ⊆ f.
-/3 width=4 by sor_inv_sle_sn, sle_trans/ qed-.
-
-lemma sor_inv_sle_dx_trans: ∀f1,f2,f. f1 ⋓ f2 ≘ f → ∀g. g ⊆ f2 → g ⊆ f.
-/3 width=4 by sor_inv_sle_dx, sle_trans/ qed-.
-
-axiom sor_inv_sle: ∀f1,f2,f. f1 ⋓ f2 ≘ f → ∀g. f1 ⊆ g → f2 ⊆ g → f ⊆ g.
-
-(* Properties with inclusion ************************************************)
-
-corec lemma sor_sle_dx: ∀f1,f2. f1 ⊆ f2 → f1 ⋓ f2 ≘ f2.
-#f1 #f2 * -f1 -f2 /3 width=7 by sor_pp, sor_nn, sor_pn/
-qed.
-
-corec lemma sor_sle_sn: ∀f1,f2. f1 ⊆ f2 → f2 ⋓ f1 ≘ f2.
-#f1 #f2 * -f1 -f2 /3 width=7 by sor_pp, sor_nn, sor_np/
-qed.
-
-(* Main properties **********************************************************)
-
-axiom monotonic_sle_sor: ∀f1,g1. f1 ⊆ g1 → ∀f2,g2. f2 ⊆ g2 →
- ∀f. f1 ⋓ f2 ≘ f → ∀g. g1 ⋓ g2 ≘ g → f ⊆ g.
-
-axiom sor_assoc_dx: ∀f0,f3,f4. f0 ⋓ f3 ≘ f4 →
- ∀f1,f2. f1 ⋓ f2 ≘ f0 →
- ∀f. f2 ⋓ f3 ≘ f → f1 ⋓ f ≘ f4.
-
-axiom sor_assoc_sn: ∀f1,f0,f4. f1 ⋓ f0 ≘ f4 →
- ∀f2, f3. f2 ⋓ f3 ≘ f0 →
- ∀f. f1 ⋓ f2 ≘ f → f ⋓ f3 ≘ f4.
-
-lemma sor_comm_23: ∀f0,f1,f2,f3,f4,f.
- f0⋓f4 ≘ f1 → f1⋓f2 ≘ f → f0⋓f2 ≘ f3 → f3⋓f4 ≘ f.
-/4 width=6 by sor_comm, sor_assoc_dx/ qed-.
-
-corec theorem sor_comm_23_idem: ∀f0,f1,f2. f0 ⋓ f1 ≘ f2 →
- ∀f. f1 ⋓ f2 ≘ f → f1 ⋓ f0 ≘ f.
-#f0 #f1 #f2 * -f0 -f1 -f2
-#f0 #f1 #f2 #g0 #g1 #g2 #Hf2 #H0 #H1 #H2 #g #Hg
-[ cases (sor_inv_ppx … Hg … H1 H2)
-| cases (sor_inv_pnx … Hg … H1 H2)
-| cases (sor_inv_nnx … Hg … H1 H2)
-| cases (sor_inv_nnx … Hg … H1 H2)
-] -g2 #f #Hf #H
-/3 width=7 by sor_nn, sor_np, sor_pn, sor_pp/
-qed-.
-
-corec theorem sor_coll_dx: ∀f1,f2,f. f1 ⋓ f2 ≘ f → ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- ∀g0. g1 ⋓ g0 ≘ f1 → g2 ⋓ g0 ≘ f2 → g ⋓ g0 ≘ f.
-#f1 #f2 #f cases (pn_split f) * #x #Hx #Hf #g1 #g2 #g #Hg #g0 #Hf1 #Hf2
-[ cases (sor_inv_xxp … Hf … Hx) -Hf #x1 #x2 #Hf #Hx1 #Hx2
- cases (sor_inv_xxp … Hf1 … Hx1) -f1 #y1 #y0 #Hf1 #Hy1 #Hy0
- cases (sor_inv_xpp … Hf2 … Hy0 … Hx2) -f2 #y2 #Hf2 #Hy2
- cases (sor_inv_ppx … Hg … Hy1 Hy2) -g1 -g2 #y #Hg #Hy
- @(sor_pp … Hy Hy0 Hx) -g -g0 -f /2 width=8 by/
-| cases (pn_split g) * #y #Hy
- [ cases (sor_inv_xxp … Hg … Hy) -Hg #y1 #y2 #Hg #Hy1 #Hy2
- cases (sor_xxn_tl … Hf … Hx) * #x1 #x2 #_ #Hx1 #Hx2
- [ cases (sor_inv_pxn … Hf1 … Hy1 Hx1) -g1 #y0 #Hf1 #Hy0
- cases (sor_inv_pnx … Hf2 … Hy2 Hy0) -g2 -x2 #x2 #Hf2 #Hx2
- | cases (sor_inv_pxn … Hf2 … Hy2 Hx2) -g2 #y0 #Hf2 #Hy0
- cases (sor_inv_pnx … Hf1 … Hy1 Hy0) -g1 -x1 #x1 #Hf1 #Hx1
- ]
- lapply (sor_inv_nnn … Hf … Hx1 Hx2 Hx) -f1 -f2 #Hf
- @(sor_pn … Hy Hy0 Hx) -g -g0 -f /2 width=8 by/
- | lapply (sor_tl … Hf) -Hf #Hf
- lapply (sor_tl … Hg) -Hg #Hg
- lapply (sor_tl … Hf1) -Hf1 #Hf1
- lapply (sor_tl … Hf2) -Hf2 #Hf2
- cases (pn_split g0) * #y0 #Hy0
- [ @(sor_np … Hy Hy0 Hx) /2 width=8 by/
- | @(sor_nn … Hy Hy0 Hx) /2 width=8 by/
- ]
- ]
-]
-qed-.
-
-corec theorem sor_distr_dx: ∀g0,g1,g2,g. g1 ⋓ g2 ≘ g →
- ∀f1,f2,f. g1 ⋓ g0 ≘ f1 → g2 ⋓ g0 ≘ f2 → g ⋓ g0 ≘ f →
- f1 ⋓ f2 ≘ f.
-#g0 cases (pn_split g0) * #y0 #H0 #g1 #g2 #g
-[ * -g1 -g2 -g #y1 #y2 #y #g1 #g2 #g #Hy #Hy1 #Hy2 #Hy #f1 #f2 #f #Hf1 #Hf2 #Hf
- [ cases (sor_inv_ppx … Hf1 … Hy1 H0) -g1
- cases (sor_inv_ppx … Hf2 … Hy2 H0) -g2
- cases (sor_inv_ppx … Hf … Hy H0) -g
- | cases (sor_inv_npx … Hf1 … Hy1 H0) -g1
- cases (sor_inv_ppx … Hf2 … Hy2 H0) -g2
- cases (sor_inv_npx … Hf … Hy H0) -g
- | cases (sor_inv_ppx … Hf1 … Hy1 H0) -g1
- cases (sor_inv_npx … Hf2 … Hy2 H0) -g2
- cases (sor_inv_npx … Hf … Hy H0) -g
- | cases (sor_inv_npx … Hf1 … Hy1 H0) -g1
- cases (sor_inv_npx … Hf2 … Hy2 H0) -g2
- cases (sor_inv_npx … Hf … Hy H0) -g
- ] -g0 #y #Hy #H #y2 #Hy2 #H2 #y1 #Hy1 #H1
- /3 width=8 by sor_nn, sor_np, sor_pn, sor_pp/
-| #H #f1 #f2 #f #Hf1 #Hf2 #Hf
- cases (sor_xnx_tl … Hf1 … H0) -Hf1
- cases (sor_xnx_tl … Hf2 … H0) -Hf2
- cases (sor_xnx_tl … Hf … H0) -Hf
- -g0 #y #x #Hx #Hy #H #y2 #x2 #Hx2 #Hy2 #H2 #y1 #x1 #Hx1 #Hy1 #H1
- /4 width=8 by sor_tl, sor_nn/
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/functions/droppred_1.ma".
-include "ground_2/relocation/rtmap_eq.ma".
-
-(* RELOCATION MAP ***********************************************************)
-
-definition tl: rtmap → rtmap.
-@case_type0 #f @f
-defined.
-
-interpretation "tail (rtmap)" 'DropPred f = (tl f).
-
-(* Basic properties *********************************************************)
-
-lemma tl_rew: ∀f. case_type0 (λ_:rtmap.rtmap) (λf:rtmap.f) (λf:rtmap.f) f = ⫱f.
-// qed.
-
-lemma tl_push_rew: ∀f. f = ⫱⫯f.
-#f <tl_rew <iota_push //
-qed.
-
-lemma tl_next_rew: ∀f. f = ⫱↑f.
-#f <tl_rew <iota_next //
-qed.
-
-lemma tl_eq_repl: eq_repl … (λf1,f2. ⫱f1 ≡ ⫱f2).
-#f1 #f2 * -f1 -f2 //
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/functions/droppreds_2.ma".
-include "ground_2/relocation/rtmap_pushs.ma".
-include "ground_2/relocation/rtmap_tl.ma".
-
-(* RELOCATION MAP ***********************************************************)
-
-rec definition tls (f:rtmap) (n:nat) on n: rtmap ≝ match n with
-[ O ⇒ f | S m ⇒ ⫱(tls f m) ].
-
-interpretation "tls (rtmap)" 'DropPreds n f = (tls f n).
-
-(* Basic properties *********************************************************)
-
-lemma tls_O: ∀f. f = ⫱*[0] f.
-// qed.
-
-lemma tls_S: ∀f,n. ⫱ ⫱*[n] f = ⫱*[↑n] f.
-// qed.
-
-lemma tls_eq_repl: ∀n. eq_repl (λf1,f2. ⫱*[n] f1 ≡ ⫱*[n] f2).
-#n elim n -n /3 width=1 by tl_eq_repl/
-qed.
-
-(* Advanced properties ******************************************************)
-
-lemma tls_xn: ∀n,f. ⫱*[n] ⫱f = ⫱*[↑n] f.
-#n elim n -n //
-qed.
-
-(* Properties with pushs ****************************************************)
-
-lemma tls_pushs: ∀n,f. f = ⫱*[n] ⫯*[n] f.
-#n elim n -n //
-#n #IH #f <tls_xn //
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/functions/uniform_1.ma".
-include "ground_2/relocation/rtmap_id.ma".
-include "ground_2/relocation/rtmap_isuni.ma".
-
-(* RELOCATION MAP ***********************************************************)
-
-rec definition uni (n:nat) on n: rtmap ≝ match n with
-[ O ⇒ 𝐈𝐝
-| S n ⇒ ↑(uni n)
-].
-
-interpretation "uniform relocation (rtmap)"
- 'Uniform n = (uni n).
-
-(* Basic properties *********************************************************)
-
-lemma uni_zero: 𝐈𝐝 = 𝐔❨0❩.
-// qed.
-
-lemma uni_succ: ∀n. ↑𝐔❨n❩ = 𝐔❨↑n❩.
-// qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma uni_inv_push_dx: ∀f,n. 𝐔❨n❩ ≡ ⫯f → 0 = n ∧ 𝐈𝐝 ≡ f.
-#f * /3 width=5 by eq_inv_pp, conj/
-#n <uni_succ #H elim (eq_inv_np … H) -H //
-qed-.
-
-lemma uni_inv_push_sn: ∀f,n. ⫯f ≡ 𝐔❨n❩ → 0 = n ∧ 𝐈𝐝 ≡ f.
-/3 width=1 by uni_inv_push_dx, eq_sym/ qed-.
-
-lemma uni_inv_id_dx: ∀n. 𝐔❨n❩ ≡ 𝐈𝐝 → 0 = n.
-#n <id_rew #H elim (uni_inv_push_dx … H) -H //
-qed-.
-
-lemma uni_inv_id_sn: ∀n. 𝐈𝐝 ≡ 𝐔❨n❩ → 0 = n.
-/3 width=1 by uni_inv_id_dx, eq_sym/ qed-.
-
-lemma uni_inv_next_dx: ∀f,n. 𝐔❨n❩ ≡ ↑f → ∃∃m. 𝐔❨m❩ ≡ f & ↑m = n.
-#f *
-[ <uni_zero <id_rew #H elim (eq_inv_pn … H) -H //
-| #n <uni_succ /3 width=5 by eq_inv_nn, ex2_intro/
-]
-qed-.
-
-lemma uni_inv_next_sn: ∀f,n. ↑f ≡ 𝐔❨n❩ → ∃∃m. 𝐔❨m❩ ≡ f & ↑m = n.
-/3 width=1 by uni_inv_next_dx, eq_sym/ qed-.
-
-(* Properties with test for identity ****************************************)
-
-lemma uni_isid: ∀f. 𝐈❪f❫ → 𝐔❨0❩ ≡ f.
-/2 width=1 by eq_id_inv_isid/ qed-.
-
-(* Inversion lemmas with test for identity **********************************)
-
-lemma uni_inv_isid: ∀f. 𝐔❨0❩ ≡ f → 𝐈❪f❫.
-/2 width=1 by eq_id_isid/ qed-.
-
-(* Properties with finite colength assignment ***************************)
-
-lemma fcla_uni: ∀n. 𝐂❪𝐔❨n❩❫ ≘ n.
-#n elim n -n /2 width=1 by fcla_isid, fcla_next/
-qed.
-
-(* Properties with test for finite colength ***************************)
-
-lemma isfin_uni: ∀n. 𝐅❪𝐔❨n❩❫.
-/3 width=2 by ex_intro/ qed.
-
-(* Properties with test for uniformity **************************************)
-
-lemma isuni_uni: ∀n. 𝐔❪𝐔❨n❩❫.
-#n elim n -n /3 width=3 by isuni_isid, isuni_next/
-qed.
-
-lemma uni_isuni: ∀f. 𝐔❪f❫ → ∃n. 𝐔❨n❩ ≡ f.
-#f #H elim H -f /3 width=2 by uni_isid, ex_intro/
-#f #_ #g #H * /3 width=6 by eq_next, ex_intro/
-qed-.
-
-(* Inversion lemmas with test for uniformity ********************************)
-
-lemma uni_inv_isuni: ∀n,f. 𝐔❨n❩ ≡ f → 𝐔❪f❫.
-#n elim n -n /3 width=1 by uni_inv_isid, isuni_isid/
-#n #IH #x <uni_succ #H elim (eq_inv_nx … H) -H /3 width=3 by isuni_next/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/xoa/ex_1_2.ma".
-include "ground_2/notation/functions/tuple_4.ma".
-include "ground_2/notation/functions/zerozero_0.ma".
-include "ground_2/notation/functions/zeroone_0.ma".
-include "ground_2/notation/functions/onezero_0.ma".
-include "ground_2/lib/arith.ma".
-
-(* RT-TRANSITION COUNTER ****************************************************)
-
-record rtc: Type[0] ≝ {
- ri: nat; (* Note: inner r-steps *)
- rs: nat; (* Note: spine r-steps *)
- ti: nat; (* Note: inner t-steps *)
- ts: nat (* Note: spine t-steps *)
-}.
-
-interpretation "constructor (rtc)"
- 'Tuple ri rs ti ts = (mk_rtc ri rs ti ts).
-
-interpretation "one structural step (rtc)"
- 'ZeroZero = (mk_rtc O O O O).
-
-interpretation "one r-step (rtc)"
- 'OneZero = (mk_rtc O (S O) O O).
-
-interpretation "one t-step (rtc)"
- 'ZeroOne = (mk_rtc O O O (S O)).
-
-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〉)
-.
-
-(* Basic properties *********************************************************)
-
-lemma eq_t_refl: reflexive … eq_t.
-* // qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-fact eq_t_inv_dx_aux: ∀x,y. eq_t x y →
- ∀ri1,rs1,ti,ts. x = 〈ri1,rs1,ti,ts〉 →
- ∃∃ri2,rs2. y = 〈ri2,rs2,ti,ts〉.
-#x #y * -x -y
-#ri1 #ri #rs1 #rs #ti1 #ts1 #ri2 #rs2 #ti2 #ts2 #H destruct -ri2 -rs2
-/2 width=3 by ex1_2_intro/
-qed-.
-
-lemma eq_t_inv_dx: ∀ri1,rs1,ti,ts,y. eq_t (〈ri1,rs1,ti,ts〉) y →
- ∃∃ri2,rs2. y = 〈ri2,rs2,ti,ts〉.
-/2 width=5 by eq_t_inv_dx_aux/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/isredtype_2.ma".
-include "ground_2/steps/rtc.ma".
-
-(* RT-TRANSITION COUNTER ****************************************************)
-
-definition isrt: relation2 nat rtc ≝ λ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 isrt_00: 𝐑𝐓❪0,𝟘𝟘❫.
-/2 width=3 by ex1_2_intro/ qed.
-
-lemma isrt_10: 𝐑𝐓❪0,𝟙𝟘❫.
-/2 width=3 by ex1_2_intro/ qed.
-
-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❫.
-#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.
-#n * #ri #rs #H destruct //
-qed-.
-
-lemma isrt_inv_10: ∀n. 𝐑𝐓❪n,𝟙𝟘❫ → 0 = n.
-#n * #ri #rs #H destruct //
-qed-.
-
-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.
-#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.
-#n #c1 #c2 * #ri1 #rs1 #H1 * #ri2 #rs2 #H2 destruct //
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/xoa/ex_3_2.ma".
-include "ground_2/steps/rtc_max.ma".
-include "ground_2/steps/rtc_isrt.ma".
-
-(* RT-TRANSITION COUNTER ****************************************************)
-
-(* Properties with test for constrained rt-transition counter ***************)
-
-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❫.
-/2 width=1 by isrt_max/ qed.
-
-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❫.
-#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.
-#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❫.
-#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❫.
-#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❫.
-#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
-<(isrt_inj … H … Hc2) -Hc2
-<idempotent_max /2 width=1 by conj/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/steps/rtc_isrt_shift.ma".
-include "ground_2/steps/rtc_isrt_max.ma".
-
-(* RT-TRANSITION COUNTER ****************************************************)
-
-(* Inversion properties with test for constrained rt-transition counter *****)
-
-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
-/2 width=1 by conj/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/xoa/ex_3_2.ma".
-include "ground_2/steps/rtc_plus.ma".
-include "ground_2/steps/rtc_isrt.ma".
-
-(* RT-TRANSITION COUNTER ****************************************************)
-
-(* Properties with test for constrained rt-transition counter ***************)
-
-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❫.
-/2 width=1 by isrt_plus/ qed.
-
-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+𝟘𝟙❫.
-/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.
-#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❫.
-#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.
-#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
-/2 width=3 by ex2_intro/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/steps/rtc_shift.ma".
-include "ground_2/steps/rtc_isrt.ma".
-
-(* RT-TRANSITION COUNTER ****************************************************)
-
-(* Properties with test for costrained rt-transition counter ****************)
-
-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.
-#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❫.
-#c #H elim (isrt_inv_shift … H) -H //
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/notation/relations/istype_2.ma".
-include "ground_2/steps/rtc.ma".
-
-(* T-TRANSITION COUNTER *****************************************************)
-
-definition ist: relation2 nat rtc ≝
- λts,c. 〈0,0,0,ts〉 = c.
-
-interpretation "test for t-transition counter (rtc)"
- 'IsType ts c = (ist ts c).
-
-(* Basic properties *********************************************************)
-
-lemma ist_00: 𝐓❪0,𝟘𝟘❫.
-// qed.
-
-lemma ist_01: 𝐓❪1,𝟘𝟙❫.
-// qed.
-
-(* Basic inversion properties ***********************************************)
-
-lemma ist_inv_00: ∀n. 𝐓❪n,𝟘𝟘❫ → 0 = n.
-#n #H destruct //
-qed-.
-
-lemma ist_inv_01: ∀n. 𝐓❪n,𝟘𝟙❫ → 1 = n.
-#n #H destruct //
-qed-.
-
-lemma ist_inv_10: ∀n. 𝐓❪n,𝟙𝟘❫ → ⊥.
-#h #H destruct
-qed-.
-
-(* Main inversion properties ************************************************)
-
-theorem ist_inj: ∀n1,n2,c. 𝐓❪n1,c❫ → 𝐓❪n2,c❫ → n1 = n2.
-#n1 #n2 #c #H1 #H2 destruct //
-qed-.
-
-theorem ist_mono: ∀n,c1,c2. 𝐓❪n,c1❫ → 𝐓❪n,c2❫ → c1 = c2.
-#n #c1 #c2 #H1 #H2 destruct //
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/xoa/ex_3_2.ma".
-include "ground_2/steps/rtc_max.ma".
-include "ground_2/steps/rtc_ist.ma".
-
-(* RT-TRANSITION COUNTER ****************************************************)
-
-(* Properties with test for t-transition counter ****************************)
-
-lemma ist_max: ∀n1,n2,c1,c2. 𝐓❪n1,c1❫ → 𝐓❪n2,c2❫ → 𝐓❪n1∨n2,c1∨c2❫.
-#n1 #n2 #c1 #c2 #H1 #H2 destruct //
-qed.
-
-lemma ist_max_O1: ∀n,c1,c2. 𝐓❪0,c1❫ → 𝐓❪n,c2❫ → 𝐓❪n,c1∨c2❫.
-/2 width=1 by ist_max/ qed.
-
-lemma ist_max_O2: ∀n,c1,c2. 𝐓❪n,c1❫ → 𝐓❪0,c2❫ → 𝐓❪n,c1∨c2❫.
-#n #c1 #c2 #H1 #H2 >(max_O2 n) /2 width=1 by ist_max/
-qed.
-
-lemma ist_max_idem1: ∀n,c1,c2. 𝐓❪n,c1❫ → 𝐓❪n,c2❫ → 𝐓❪n,c1∨c2❫.
-#n #c1 #c2 #H1 #H2 >(idempotent_max n) /2 width=1 by ist_max/
-qed.
-
-(* Inversion properties with test for t-transition counter ******************)
-
-lemma ist_inv_max:
- ∀n,c1,c2. 𝐓❪n,c1 ∨ c2❫ →
- ∃∃n1,n2. 𝐓❪n1,c1❫ & 𝐓❪n2,c2❫ & (n1 ∨ n2) = n.
-#n #c1 #c2 #H
-elim (max_inv_dx … H) -H #ri1 #rs1 #ti1 #ts1 #ri2 #rs2 #ti2 #ts2 #H1 #H2 #H3 #H4 #H5 #H6 destruct
-elim (max_inv_O3 … H1) -H1 #H11 #H12 destruct
-elim (max_inv_O3 … H2) -H2 #H21 #H22 destruct
-elim (max_inv_O3 … H3) -H3 #H31 #H32 destruct
-/2 width=5 by ex3_2_intro/
-qed-.
-
-lemma ist_O_inv_max: ∀c1,c2. 𝐓❪0,c1 ∨ c2❫ → ∧∧ 𝐓❪0,c1❫ & 𝐓❪0,c2❫.
-#c1 #c2 #H
-elim (ist_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 ist_inv_max_O_dx: ∀n,c1,c2. 𝐓❪n,c1 ∨ c2❫ → 𝐓❪0,c2❫ → 𝐓❪n,c1❫.
-#n #c1 #c2 #H #H2
-elim (ist_inv_max … H) -H #n1 #n2 #Hn1 #Hn2 #H destruct //
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/xoa/ex_3_2.ma".
-include "ground_2/steps/rtc_plus.ma".
-include "ground_2/steps/rtc_ist.ma".
-
-(* RT-TRANSITION COUNTER ****************************************************)
-
-(* Properties with test for t-transition counter ****************************)
-
-lemma ist_plus: ∀n1,n2,c1,c2. 𝐓❪n1,c1❫ → 𝐓❪n2,c2❫ → 𝐓❪n1+n2,c1+c2❫.
-#n1 #n2 #c1 #c2 #H1 #H2 destruct //
-qed.
-
-lemma ist_plus_O1: ∀n,c1,c2. 𝐓❪0,c1❫ → 𝐓❪n,c2❫ → 𝐓❪n,c1+c2❫.
-/2 width=1 by ist_plus/ qed.
-
-lemma ist_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 ist_plus/
-qed.
-
-lemma ist_succ: ∀n,c. 𝐓❪n,c❫ → 𝐓❪↑n,c+𝟘𝟙❫.
-/2 width=1 by ist_plus/ qed.
-
-(* Inversion properties with test for constrained rt-transition counter *****)
-
-lemma ist_inv_plus:
- ∀n,c1,c2. 𝐓❪n,c1 + c2❫ →
- ∃∃n1,n2. 𝐓❪n1,c1❫ & 𝐓❪n2,c2❫ & n1 + n2 = n.
-#n #c1 #c2 #H
-elim (plus_inv_dx … H) -H #ri1 #rs1 #ti1 #ts1 #ri2 #rs2 #ti2 #ts2 #H1 #H2 #H3 #H4 #H5 #H6 destruct
-elim (plus_inv_O3 … H1) -H1 #H11 #H12 destruct
-elim (plus_inv_O3 … H2) -H2 #H21 #H22 destruct
-elim (plus_inv_O3 … H3) -H3 #H31 #H32 destruct
-/3 width=5 by ex3_2_intro/
-qed-.
-
-lemma ist_inv_plus_O_dx: ∀n,c1,c2. 𝐓❪n,c1 + c2❫ → 𝐓❪0,c2❫ → 𝐓❪n,c1❫.
-#n #c1 #c2 #H #H2
-elim (ist_inv_plus … H) -H #n1 #n2 #Hn1 #Hn2 #H destruct //
-qed-.
-
-lemma ist_inv_plus_SO_dx:
- ∀n,c1,c2. 𝐓❪n,c1 + c2❫ → 𝐓❪1,c2❫ →
- ∃∃m. 𝐓❪m,c1❫ & n = ↑m.
-#n #c1 #c2 #H #H2 destruct
-elim (ist_inv_plus … H) -H #n1 #n2 #Hn1 #Hn2 #H destruct
-/2 width=3 by ex2_intro/
-qed-.
-
-lemma ist_inv_plus_10_dx: ∀n,c. 𝐓❪n,c+𝟙𝟘❫ → ⊥.
-#n #c #H
-elim (ist_inv_plus … H) -H #n1 #n2 #_ #H #_
-/2 width=2 by ist_inv_10/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/steps/rtc_shift.ma".
-include "ground_2/steps/rtc_ist.ma".
-
-(* RT-TRANSITION COUNTER ****************************************************)
-
-(* Properties with test for t-transition counter ****************************)
-
-lemma ist_zero_shift: ∀c. 𝐓❪0,c❫ → 𝐓❪0,↕*c❫.
-#c #H destruct //
-qed.
-
-(* Inversion properties with test for t-transition counter ******************)
-
-lemma ist_inv_shift: ∀n,c. 𝐓❪n,↕*c❫ → ∧∧ 𝐓❪0,c❫ & 0 = n.
-#n #c #H
-elim (shift_inv_dx … H) -H #rt0 #rs0 #ti0 #ts0 #H1 #_ #H2 #H3 #H4 destruct
-elim (max_inv_O3 … H1) -H1 #H11 #H12 destruct
-elim (max_inv_O3 … H2) -H2 #H21 #H22 destruct
-/2 width=1 by conj/
-qed-.
-
-lemma ist_inv_zero_shift: ∀c. 𝐓❪0,↕*c❫ → 𝐓❪0,c❫.
-#c #H elim (ist_inv_shift … H) -H //
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/xoa/ex_6_8.ma".
-include "ground_2/steps/rtc.ma".
-
-(* RT-TRANSITION COUNTER ****************************************************)
-
-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〉
- ]
-].
-
-interpretation "maximum (rtc)"
- 'or c1 c2 = (max c1 c2).
-
-(* Basic properties *********************************************************)
-
-lemma max_rew: ∀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.
-
-lemma max_O_dx: ∀c. c = (c ∨ 𝟘𝟘).
-* #ri #rs #ti #ts <max_rew //
-qed.
-
-lemma max_idem: ∀c. c = (c ∨ c).
-* #ri #rs #ti #ts <max_rew //
-qed.
-
-(* Basic inversion properties ***********************************************)
-
-lemma max_inv_dx: ∀ri,rs,ti,ts,c1,c2. 〈ri,rs,ti,ts〉 = (c1 ∨ c2) →
- ∃∃ri1,rs1,ti1,ts1,ri2,rs2,ti2,ts2.
- (ri1∨ri2) = ri & (rs1∨rs2) = rs & (ti1∨ti2) = ti & (ts1∨ts2) = ts &
- 〈ri1,rs1,ti1,ts1〉 = c1 & 〈ri2,rs2,ti2,ts2〉 = c2.
-#ri #rs #ti #ts * #ri1 #rs1 #ti1 #ts1 * #ri2 #rs2 #ti2 #ts2
-<max_rew #H destruct /2 width=14 by ex6_8_intro/
-qed-.
-
-(* Main Properties **********************************************************)
-
-theorem max_assoc: associative … max.
-* #ri1 #rs1 #ti1 #ts1 * #ri2 #rs2 #ti2 #ts2 * #ri3 #rs3 #ti3 #ts3
-<max_rew <max_rew //
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/steps/rtc_shift.ma".
-include "ground_2/steps/rtc_max.ma".
-
-(* RT-TRANSITION COUNTER ****************************************************)
-
-(* Properties with max and shift ********************************************)
-
-lemma max_shift: ∀c1,c2. ((↕*c1) ∨ (↕*c2)) = ↕*(c1∨c2).
-* #ri1 #rs1 #ti1 #ts1 * #ri2 #rs2 #ti2 #ts2
-<shift_rew <shift_rew <shift_rew <max_rew //
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/xoa/ex_6_8.ma".
-include "ground_2/steps/rtc.ma".
-
-(* RT-TRANSITION COUNTER ****************************************************)
-
-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〉
- ]
-].
-
-interpretation "plus (rtc)"
- 'plus c1 c2 = (plus c1 c2).
-
-(* Basic properties *********************************************************)
-
-(**) (* 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,rs1,ti1,ts1〉) + (〈ri2,rs2,ti2,ts2〉).
-// qed.
-
-lemma plus_O_dx: ∀c. c = c + 𝟘𝟘.
-* #ri #rs #ti #ts <plus_rew //
-qed.
-
-(* Basic inversion properties ***********************************************)
-
-lemma plus_inv_dx: ∀ri,rs,ti,ts,c1,c2. 〈ri,rs,ti,ts〉 = c1 + c2 →
- ∃∃ri1,rs1,ti1,ts1,ri2,rs2,ti2,ts2.
- ri1+ri2 = ri & rs1+rs2 = rs & ti1+ti2 = ti & ts1+ts2 = ts &
- 〈ri1,rs1,ti1,ts1〉 = c1 & 〈ri2,rs2,ti2,ts2〉 = c2.
-#ri #rs #ti #ts * #ri1 #rs1 #ti1 #ts1 * #ri2 #rs2 #ti2 #ts2
-<plus_rew #H destruct /2 width=14 by ex6_8_intro/
-qed-.
-
-(* Main Properties **********************************************************)
-
-theorem plus_assoc: associative … plus.
-* #ri1 #rs1 #ti1 #ts1 * #ri2 #rs2 #ti2 #ts2 * #ri3 #rs3 #ti3 #ts3
-<plus_rew //
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/xoa/ex_5_4.ma".
-include "ground_2/notation/functions/updownarrowstar_1.ma".
-include "ground_2/steps/rtc.ma".
-
-(* RT-TRANSITION COUNTER ****************************************************)
-
-definition shift (c:rtc): rtc ≝ match c with
-[ 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〉.
-normalize //
-qed.
-
-lemma shift_O: 𝟘𝟘 = ↕*𝟘𝟘.
-// qed.
-
-(* Basic inversion properties ***********************************************)
-
-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.
-#ri #rs #ti #ts * #ri0 #rs0 #ti0 #ts0 <shift_rew #H destruct
-/2 width=7 by ex5_4_intro/
-qed-.
+++ /dev/null
-<?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 = "cic:/matita/lambdadelta/ground_2/ (background for λδ version 2)"
->
- <sitemap name="sitemap"/>
-
- <section4 name="summary">Summary of the Specification</section4>
- <body>Here is a numerical account of the specification's contents
- and its timeline.
- </body>
- <table name="ground_2_sum"/>
-
- <news class="alpha" date="2020 February 27.">
- Specification becomes an independent package.
- </news>
- <news class="alpha" date="2020 January 6.">
- Centralized xoa infrastructure removed.
- </news>
- <news class="alpha" date="2018 June 6.">
- Decentralized xoa infrastructure.
- </news>
- <news class="alpha" date="2016 April 18.">
- Generic rt-transition counter (rtc).
- </news>
- <news class="alpha" date="2016 March 4.">
- Platform-independent multiple relocation (rtmap).
- </news>
- <news class="alpha" date="2016 January 20.">
- Multiple relocation with streams of naturals.
- </news>
- <news class="alpha" date="2015 October 11.">
- Multiple relocation with lists of booleans.
- </news>
- <news class="alpha" date="2013 November 27.">
- Natural numbers with infinity (ynat).
- </news>
- <news class="alpha" date="2011 August 10.">
- Specification starts.
- </news>
-
- <section4 name="structure">Logical Structure of the Specification</section4>
- <body>This table reports the specification's components and their planes.
- </body>
- <table name="ground_2_src"/>
-
- <footer/>
-</page>
+++ /dev/null
-name "ground_2_src"
-
-table {
- class "gray"
- [ { "component" * } {
- [ { "plane" * } {
- [ "files" * ]
- }
- ]
- }
- ]
- class "water"
- [ { "generic rt-transition counter" * } {
- [ { "" * } {
- [ "rtc_ist ( 𝐓❪?,?❫ )" "rtc_ist_shift" "rtc_ist_plus" "rtc_ist_max" * ]
- [ "rtc_isrc ( 𝐑𝐓❪?,?❫ )" "rtc_isrt_shift" "rtc_isrt_plus" "rtc_isrt_max" "rtc_isrt_max_shift" * ]
- [ "rtc ( 〈?,?,?,?〉 ) ( 𝟘𝟘 ) ( 𝟙𝟘 ) ( 𝟘𝟙 )" "rtc_shift ( ↕*? )" "rtc_plus ( ? + ? )" "rtc_max ( ? ∨ ? )" "rtc_max_shift" * ]
- }
- ]
- }
- ]
- class "green"
- [ { "multiple relocation" * } {
- [ { "" * } {
- [ "rtmap" "rtmap_eq ( ? ≡ ? )" "rtmap_pushs ( ⫯*[?]? )" "rtmap_nexts ( ↑*[?]? )"
- "rtmap_tl ( ⫱? )" "rtmap_tls ( ⫱*[?]? )" "rtmap_isid ( 𝐈❪?❫ )" "rtmap_id" "rtmap_isdiv ( 𝛀❪?❫ )"
- "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_after"
- * ]
- [ "nstream ( ⫯? ) ( ↑? )" "nstream_eq" "" ""
- "" "" "nstream_isid" "nstream_id ( 𝐈𝐝 )" ""
- "" "" "" ""
- "" "" "" "nstream_sor"
- "" "nstream_istot ( ?@❨?❩ )" "nstream_after ( ? ∘ ? )" "nstream_coafter ( ? ~∘ ? )"
- "nstream_basic" ""
- * ]
-(*
- [ "trace ( ∥?∥ )" "trace_at ( @❪?,?❫ ≘ ? )" "trace_after ( ? ⊚ ? ≘ ? )" "trace_isid ( 𝐈❪?❫ )" "trace_isun ( 𝐔❪?❫ )"
- "trace_sle ( ? ⊆ ? )" "trace_sor ( ? ⋓ ? ≘ ? )" "trace_snot ( ∁ ? )" * ]
-*)
- [ "mr2 ( ◊ ) ( ❨?,?❩;? )" "mr2_append ( ? @@? )" "mr2_at ( @❪?,?❫ ≘ ? )" "mr2_plus ( ? + ? )" "mr2_minus ( ? ▭ ? ≘ ? )" * ]
- }
- ]
- }
- ]
- class "grass"
- [ { "natural numbers with infinity" * } {
- [ { "" * } {
- [ "ynat ( ∞ )" "ynat_pred ( ↓? )" "ynat_succ ( ↑? )"
- "ynat_le ( ? ≤ ? )" "ynat_lt ( ? < ? )"
- "ynat_plus ( ? + ? )" "ynat_minus_sn ( ? - ? )" *
- ]
- }
- ]
- }
- ]
- class "yellow"
- [ { "extensions to the library" * } {
- [ { "" * } {
- [ "stream ( ? ⨮{?} ? )" "stream_eq ( ? ≗{?} ? )" "stream_hdtl ( ⫰{?}? )" "stream_tls ( ⫰*{?}[?]? )" * ]
- [ "list ( Ⓔ{?} ) ( ? ⨮{?} ? )" "list_length ( |?| )" * ]
- [ "bool ( Ⓕ ) ( Ⓣ )" "arith ( ?^? ) ( ↑? ) ( ↓? ) ( ? ∨ ? ) ( ? ∧ ? )" "arith_2a" "arith_2b" * ]
- [ "ltc" "ltc_ctc" * ]
- [ "logic ( ⊥ ) ( ⊤ )" "relations ( ? ⊆ ? )" "functions" "exteq ( ? ≐{?,?} ? )" "star" "lstar_2a" * ]
- }
- ]
- }
- ]
- class "orange"
- [ { "generated library" * } {
- [ { "generalization with equality" * } {
- [ "insert_eq" * ]
- }
- ]
- [ { "permutation of quantifiers" * } {
- [ "pull" * ]
- }
- ]
- [ { "logical decomposables" * } {
- [ "xoa ( ∃∃ ) ( ∨∨ ) ( ∧∧ )" * ]
- }
- ]
- }
- ]
- class "red"
- [ { "" * } {
- [ { "" * } {
- [ * ]
- }
- ]
- }
- ]
-}
-
-class "top" { * }
-
-class "capitalize italic" { 0 }
-
-class "italic" { 1 }
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<helm_registry>
- <section name="xoa">
- <key name="output_dir">.</key>
- <key name="objects">ground_2/xoa</key>
- <key name="notations">ground_2/notation/xoa</key>
- <key name="include">basics/pts.ma</key>
- <key name="and">3</key>
- <key name="and">4</key>
- <key name="ex">1 2</key>
- <key name="ex">1 3</key>
- <key name="ex">1 4</key>
- <key name="ex">2 2</key>
- <key name="ex">2 3</key>
- <key name="ex">3 1</key>
- <key name="ex">3 2</key>
- <key name="ex">3 3</key>
- <key name="ex">3 4</key>
- <key name="ex">3 5</key>
- <key name="ex">4 1</key>
- <key name="ex">4 2</key>
- <key name="ex">4 3</key>
- <key name="ex">4 4</key>
- <key name="ex">4 5</key>
- <key name="ex">5 1</key>
- <key name="ex">5 2</key>
- <key name="ex">5 3</key>
- <key name="ex">5 4</key>
- <key name="ex">5 5</key>
- <key name="ex">5 6</key>
- <key name="ex">5 7</key>
- <key name="ex">6 3</key>
- <key name="ex">6 4</key>
- <key name="ex">6 5</key>
- <key name="ex">6 6</key>
- <key name="ex">6 7</key>
- <key name="ex">6 8</key>
- <key name="ex">6 9</key>
- <key name="ex">7 3</key>
- <key name="ex">7 4</key>
- <key name="ex">7 5</key>
- <key name="ex">7 6</key>
- <key name="ex">7 7</key>
- <key name="ex">7 10</key>
- <key name="ex">8 4</key>
- <key name="ex">8 5</key>
- <key name="ex">9 3</key>
- <key name="or">3</key>
- <key name="or">4</key>
- <key name="or">5</key>
- </section>
-</helm_registry>
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/and_3.ma".
-
-(* multiple conjunction connective (3) *)
-
-inductive and3 (P0,P1,P2:Prop) : Prop ≝
- | and3_intro: P0 → P1 → P2 → and3 ? ? ?
-.
-
-interpretation "multiple conjunction connective (3)" 'And P0 P1 P2 = (and3 P0 P1 P2).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/and_4.ma".
-
-(* multiple conjunction connective (4) *)
-
-inductive and4 (P0,P1,P2,P3:Prop) : Prop ≝
- | and4_intro: P0 → P1 → P2 → P3 → and4 ? ? ? ?
-.
-
-interpretation "multiple conjunction connective (4)" 'And P0 P1 P2 P3 = (and4 P0 P1 P2 P3).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_1_2.ma".
-
-(* multiple existental quantifier (1, 2) *)
-
-inductive ex1_2 (A0,A1:Type[0]) (P0:A0→A1→Prop) : Prop ≝
- | ex1_2_intro: ∀x0,x1. P0 x0 x1 → ex1_2 ? ? ?
-.
-
-interpretation "multiple existental quantifier (1, 2)" 'Ex2 P0 = (ex1_2 ? ? P0).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_1_3.ma".
-
-(* multiple existental quantifier (1, 3) *)
-
-inductive ex1_3 (A0,A1,A2:Type[0]) (P0:A0→A1→A2→Prop) : Prop ≝
- | ex1_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → ex1_3 ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (1, 3)" 'Ex3 P0 = (ex1_3 ? ? ? P0).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* 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).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_2_2.ma".
-
-(* multiple existental quantifier (2, 2) *)
-
-inductive ex2_2 (A0,A1:Type[0]) (P0,P1:A0→A1→Prop) : Prop ≝
- | ex2_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → ex2_2 ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (2, 2)" 'Ex2 P0 P1 = (ex2_2 ? ? P0 P1).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_2_3.ma".
-
-(* multiple existental quantifier (2, 3) *)
-
-inductive ex2_3 (A0,A1,A2:Type[0]) (P0,P1:A0→A1→A2→Prop) : Prop ≝
- | ex2_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → ex2_3 ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (2, 3)" 'Ex3 P0 P1 = (ex2_3 ? ? ? P0 P1).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_3_1.ma".
-
-(* multiple existental quantifier (3, 1) *)
-
-inductive ex3 (A0:Type[0]) (P0,P1,P2:A0→Prop) : Prop ≝
- | ex3_intro: ∀x0. P0 x0 → P1 x0 → P2 x0 → ex3 ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (3, 1)" 'Ex P0 P1 P2 = (ex3 ? P0 P1 P2).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_3_2.ma".
-
-(* multiple existental quantifier (3, 2) *)
-
-inductive ex3_2 (A0,A1:Type[0]) (P0,P1,P2:A0→A1→Prop) : Prop ≝
- | ex3_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → P2 x0 x1 → ex3_2 ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (3, 2)" 'Ex2 P0 P1 P2 = (ex3_2 ? ? P0 P1 P2).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_3_3.ma".
-
-(* multiple existental quantifier (3, 3) *)
-
-inductive ex3_3 (A0,A1,A2:Type[0]) (P0,P1,P2:A0→A1→A2→Prop) : Prop ≝
- | ex3_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → ex3_3 ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (3, 3)" 'Ex3 P0 P1 P2 = (ex3_3 ? ? ? P0 P1 P2).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_3_4.ma".
-
-(* multiple existental quantifier (3, 4) *)
-
-inductive ex3_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2:A0→A1→A2→A3→Prop) : Prop ≝
- | ex3_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → ex3_4 ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (3, 4)" 'Ex4 P0 P1 P2 = (ex3_4 ? ? ? ? P0 P1 P2).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_3_5.ma".
-
-(* multiple existental quantifier (3, 5) *)
-
-inductive ex3_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2:A0→A1→A2→A3→A4→Prop) : Prop ≝
- | ex3_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → ex3_5 ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (3, 5)" 'Ex5 P0 P1 P2 = (ex3_5 ? ? ? ? ? P0 P1 P2).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_4_1.ma".
-
-(* multiple existental quantifier (4, 1) *)
-
-inductive ex4 (A0:Type[0]) (P0,P1,P2,P3:A0→Prop) : Prop ≝
- | ex4_intro: ∀x0. P0 x0 → P1 x0 → P2 x0 → P3 x0 → ex4 ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (4, 1)" 'Ex P0 P1 P2 P3 = (ex4 ? P0 P1 P2 P3).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/xoa/ex_4_1.ma".
-
-(* 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.
-#A0 #P0 #P1 #P2 #P3 * /2 width=5 by ex4_intro/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_4_2.ma".
-
-(* multiple existental quantifier (4, 2) *)
-
-inductive ex4_2 (A0,A1:Type[0]) (P0,P1,P2,P3:A0→A1→Prop) : Prop ≝
- | ex4_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → P2 x0 x1 → P3 x0 x1 → ex4_2 ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (4, 2)" 'Ex2 P0 P1 P2 P3 = (ex4_2 ? ? P0 P1 P2 P3).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_4_3.ma".
-
-(* multiple existental quantifier (4, 3) *)
-
-inductive ex4_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3:A0→A1→A2→Prop) : Prop ≝
- | ex4_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → ex4_3 ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (4, 3)" 'Ex3 P0 P1 P2 P3 = (ex4_3 ? ? ? P0 P1 P2 P3).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_4_4.ma".
-
-(* multiple existental quantifier (4, 4) *)
-
-inductive ex4_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3:A0→A1→A2→A3→Prop) : Prop ≝
- | ex4_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → ex4_4 ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (4, 4)" 'Ex4 P0 P1 P2 P3 = (ex4_4 ? ? ? ? P0 P1 P2 P3).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_4_5.ma".
-
-(* multiple existental quantifier (4, 5) *)
-
-inductive ex4_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3:A0→A1→A2→A3→A4→Prop) : Prop ≝
- | ex4_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → ex4_5 ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (4, 5)" 'Ex5 P0 P1 P2 P3 = (ex4_5 ? ? ? ? ? P0 P1 P2 P3).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_5_1.ma".
-
-(* multiple existental quantifier (5, 1) *)
-
-inductive ex5 (A0:Type[0]) (P0,P1,P2,P3,P4:A0→Prop) : Prop ≝
- | ex5_intro: ∀x0. P0 x0 → P1 x0 → P2 x0 → P3 x0 → P4 x0 → ex5 ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (5, 1)" 'Ex P0 P1 P2 P3 P4 = (ex5 ? P0 P1 P2 P3 P4).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_5_2.ma".
-
-(* multiple existental quantifier (5, 2) *)
-
-inductive ex5_2 (A0,A1:Type[0]) (P0,P1,P2,P3,P4:A0→A1→Prop) : Prop ≝
- | ex5_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → P2 x0 x1 → P3 x0 x1 → P4 x0 x1 → ex5_2 ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (5, 2)" 'Ex2 P0 P1 P2 P3 P4 = (ex5_2 ? ? P0 P1 P2 P3 P4).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_5_3.ma".
-
-(* multiple existental quantifier (5, 3) *)
-
-inductive ex5_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→Prop) : Prop ≝
- | ex5_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → P4 x0 x1 x2 → ex5_3 ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (5, 3)" 'Ex3 P0 P1 P2 P3 P4 = (ex5_3 ? ? ? P0 P1 P2 P3 P4).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_5_4.ma".
-
-(* multiple existental quantifier (5, 4) *)
-
-inductive ex5_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→A3→Prop) : Prop ≝
- | ex5_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → P4 x0 x1 x2 x3 → ex5_4 ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (5, 4)" 'Ex4 P0 P1 P2 P3 P4 = (ex5_4 ? ? ? ? P0 P1 P2 P3 P4).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_5_5.ma".
-
-(* multiple existental quantifier (5, 5) *)
-
-inductive ex5_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→A3→A4→Prop) : Prop ≝
- | ex5_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → P4 x0 x1 x2 x3 x4 → ex5_5 ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (5, 5)" 'Ex5 P0 P1 P2 P3 P4 = (ex5_5 ? ? ? ? ? P0 P1 P2 P3 P4).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_5_6.ma".
-
-(* multiple existental quantifier (5, 6) *)
-
-inductive ex5_6 (A0,A1,A2,A3,A4,A5:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→A3→A4→A5→Prop) : Prop ≝
- | ex5_6_intro: ∀x0,x1,x2,x3,x4,x5. P0 x0 x1 x2 x3 x4 x5 → P1 x0 x1 x2 x3 x4 x5 → P2 x0 x1 x2 x3 x4 x5 → P3 x0 x1 x2 x3 x4 x5 → P4 x0 x1 x2 x3 x4 x5 → ex5_6 ? ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (5, 6)" 'Ex6 P0 P1 P2 P3 P4 = (ex5_6 ? ? ? ? ? ? P0 P1 P2 P3 P4).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_5_7.ma".
-
-(* multiple existental quantifier (5, 7) *)
-
-inductive ex5_7 (A0,A1,A2,A3,A4,A5,A6:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→A3→A4→A5→A6→Prop) : Prop ≝
- | ex5_7_intro: ∀x0,x1,x2,x3,x4,x5,x6. P0 x0 x1 x2 x3 x4 x5 x6 → P1 x0 x1 x2 x3 x4 x5 x6 → P2 x0 x1 x2 x3 x4 x5 x6 → P3 x0 x1 x2 x3 x4 x5 x6 → P4 x0 x1 x2 x3 x4 x5 x6 → ex5_7 ? ? ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (5, 7)" 'Ex7 P0 P1 P2 P3 P4 = (ex5_7 ? ? ? ? ? ? ? P0 P1 P2 P3 P4).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_6_3.ma".
-
-(* multiple existental quantifier (6, 3) *)
-
-inductive ex6_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→Prop) : Prop ≝
- | ex6_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → P4 x0 x1 x2 → P5 x0 x1 x2 → ex6_3 ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (6, 3)" 'Ex3 P0 P1 P2 P3 P4 P5 = (ex6_3 ? ? ? P0 P1 P2 P3 P4 P5).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_6_4.ma".
-
-(* multiple existental quantifier (6, 4) *)
-
-inductive ex6_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→Prop) : Prop ≝
- | ex6_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → P4 x0 x1 x2 x3 → P5 x0 x1 x2 x3 → ex6_4 ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (6, 4)" 'Ex4 P0 P1 P2 P3 P4 P5 = (ex6_4 ? ? ? ? P0 P1 P2 P3 P4 P5).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_6_5.ma".
-
-(* multiple existental quantifier (6, 5) *)
-
-inductive ex6_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→Prop) : Prop ≝
- | ex6_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → P4 x0 x1 x2 x3 x4 → P5 x0 x1 x2 x3 x4 → ex6_5 ? ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (6, 5)" 'Ex5 P0 P1 P2 P3 P4 P5 = (ex6_5 ? ? ? ? ? P0 P1 P2 P3 P4 P5).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_6_6.ma".
-
-(* multiple existental quantifier (6, 6) *)
-
-inductive ex6_6 (A0,A1,A2,A3,A4,A5:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→A5→Prop) : Prop ≝
- | ex6_6_intro: ∀x0,x1,x2,x3,x4,x5. P0 x0 x1 x2 x3 x4 x5 → P1 x0 x1 x2 x3 x4 x5 → P2 x0 x1 x2 x3 x4 x5 → P3 x0 x1 x2 x3 x4 x5 → P4 x0 x1 x2 x3 x4 x5 → P5 x0 x1 x2 x3 x4 x5 → ex6_6 ? ? ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (6, 6)" 'Ex6 P0 P1 P2 P3 P4 P5 = (ex6_6 ? ? ? ? ? ? P0 P1 P2 P3 P4 P5).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_6_7.ma".
-
-(* multiple existental quantifier (6, 7) *)
-
-inductive ex6_7 (A0,A1,A2,A3,A4,A5,A6:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→A5→A6→Prop) : Prop ≝
- | ex6_7_intro: ∀x0,x1,x2,x3,x4,x5,x6. P0 x0 x1 x2 x3 x4 x5 x6 → P1 x0 x1 x2 x3 x4 x5 x6 → P2 x0 x1 x2 x3 x4 x5 x6 → P3 x0 x1 x2 x3 x4 x5 x6 → P4 x0 x1 x2 x3 x4 x5 x6 → P5 x0 x1 x2 x3 x4 x5 x6 → ex6_7 ? ? ? ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (6, 7)" 'Ex7 P0 P1 P2 P3 P4 P5 = (ex6_7 ? ? ? ? ? ? ? P0 P1 P2 P3 P4 P5).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_6_8.ma".
-
-(* multiple existental quantifier (6, 8) *)
-
-inductive ex6_8 (A0,A1,A2,A3,A4,A5,A6,A7:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→A5→A6→A7→Prop) : Prop ≝
- | ex6_8_intro: ∀x0,x1,x2,x3,x4,x5,x6,x7. P0 x0 x1 x2 x3 x4 x5 x6 x7 → P1 x0 x1 x2 x3 x4 x5 x6 x7 → P2 x0 x1 x2 x3 x4 x5 x6 x7 → P3 x0 x1 x2 x3 x4 x5 x6 x7 → P4 x0 x1 x2 x3 x4 x5 x6 x7 → P5 x0 x1 x2 x3 x4 x5 x6 x7 → ex6_8 ? ? ? ? ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (6, 8)" 'Ex8 P0 P1 P2 P3 P4 P5 = (ex6_8 ? ? ? ? ? ? ? ? P0 P1 P2 P3 P4 P5).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_6_9.ma".
-
-(* multiple existental quantifier (6, 9) *)
-
-inductive ex6_9 (A0,A1,A2,A3,A4,A5,A6,A7,A8:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→A5→A6→A7→A8→Prop) : Prop ≝
- | ex6_9_intro: ∀x0,x1,x2,x3,x4,x5,x6,x7,x8. P0 x0 x1 x2 x3 x4 x5 x6 x7 x8 → P1 x0 x1 x2 x3 x4 x5 x6 x7 x8 → P2 x0 x1 x2 x3 x4 x5 x6 x7 x8 → P3 x0 x1 x2 x3 x4 x5 x6 x7 x8 → P4 x0 x1 x2 x3 x4 x5 x6 x7 x8 → P5 x0 x1 x2 x3 x4 x5 x6 x7 x8 → ex6_9 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (6, 9)" 'Ex9 P0 P1 P2 P3 P4 P5 = (ex6_9 ? ? ? ? ? ? ? ? ? P0 P1 P2 P3 P4 P5).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_7_10.ma".
-
-(* multiple existental quantifier (7, 10) *)
-
-inductive ex7_10 (A0,A1,A2,A3,A4,A5,A6,A7,A8,A9:Type[0]) (P0,P1,P2,P3,P4,P5,P6:A0→A1→A2→A3→A4→A5→A6→A7→A8→A9→Prop) : Prop ≝
- | ex7_10_intro: ∀x0,x1,x2,x3,x4,x5,x6,x7,x8,x9. P0 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 → P1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 → P2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 → P3 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 → P4 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 → P5 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 → P6 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 → ex7_10 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (7, 10)" 'Ex10 P0 P1 P2 P3 P4 P5 P6 = (ex7_10 ? ? ? ? ? ? ? ? ? ? P0 P1 P2 P3 P4 P5 P6).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_7_3.ma".
-
-(* multiple existental quantifier (7, 3) *)
-
-inductive ex7_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3,P4,P5,P6:A0→A1→A2→Prop) : Prop ≝
- | ex7_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → P4 x0 x1 x2 → P5 x0 x1 x2 → P6 x0 x1 x2 → ex7_3 ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (7, 3)" 'Ex3 P0 P1 P2 P3 P4 P5 P6 = (ex7_3 ? ? ? P0 P1 P2 P3 P4 P5 P6).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_7_4.ma".
-
-(* multiple existental quantifier (7, 4) *)
-
-inductive ex7_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3,P4,P5,P6:A0→A1→A2→A3→Prop) : Prop ≝
- | ex7_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → P4 x0 x1 x2 x3 → P5 x0 x1 x2 x3 → P6 x0 x1 x2 x3 → ex7_4 ? ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (7, 4)" 'Ex4 P0 P1 P2 P3 P4 P5 P6 = (ex7_4 ? ? ? ? P0 P1 P2 P3 P4 P5 P6).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_7_5.ma".
-
-(* multiple existental quantifier (7, 5) *)
-
-inductive ex7_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3,P4,P5,P6:A0→A1→A2→A3→A4→Prop) : Prop ≝
- | ex7_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → P4 x0 x1 x2 x3 x4 → P5 x0 x1 x2 x3 x4 → P6 x0 x1 x2 x3 x4 → ex7_5 ? ? ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (7, 5)" 'Ex5 P0 P1 P2 P3 P4 P5 P6 = (ex7_5 ? ? ? ? ? P0 P1 P2 P3 P4 P5 P6).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_7_6.ma".
-
-(* multiple existental quantifier (7, 6) *)
-
-inductive ex7_6 (A0,A1,A2,A3,A4,A5:Type[0]) (P0,P1,P2,P3,P4,P5,P6:A0→A1→A2→A3→A4→A5→Prop) : Prop ≝
- | ex7_6_intro: ∀x0,x1,x2,x3,x4,x5. P0 x0 x1 x2 x3 x4 x5 → P1 x0 x1 x2 x3 x4 x5 → P2 x0 x1 x2 x3 x4 x5 → P3 x0 x1 x2 x3 x4 x5 → P4 x0 x1 x2 x3 x4 x5 → P5 x0 x1 x2 x3 x4 x5 → P6 x0 x1 x2 x3 x4 x5 → ex7_6 ? ? ? ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (7, 6)" 'Ex6 P0 P1 P2 P3 P4 P5 P6 = (ex7_6 ? ? ? ? ? ? P0 P1 P2 P3 P4 P5 P6).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_7_7.ma".
-
-(* multiple existental quantifier (7, 7) *)
-
-inductive ex7_7 (A0,A1,A2,A3,A4,A5,A6:Type[0]) (P0,P1,P2,P3,P4,P5,P6:A0→A1→A2→A3→A4→A5→A6→Prop) : Prop ≝
- | ex7_7_intro: ∀x0,x1,x2,x3,x4,x5,x6. P0 x0 x1 x2 x3 x4 x5 x6 → P1 x0 x1 x2 x3 x4 x5 x6 → P2 x0 x1 x2 x3 x4 x5 x6 → P3 x0 x1 x2 x3 x4 x5 x6 → P4 x0 x1 x2 x3 x4 x5 x6 → P5 x0 x1 x2 x3 x4 x5 x6 → P6 x0 x1 x2 x3 x4 x5 x6 → ex7_7 ? ? ? ? ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (7, 7)" 'Ex7 P0 P1 P2 P3 P4 P5 P6 = (ex7_7 ? ? ? ? ? ? ? P0 P1 P2 P3 P4 P5 P6).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_8_4.ma".
-
-(* multiple existental quantifier (8, 4) *)
-
-inductive ex8_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3,P4,P5,P6,P7:A0→A1→A2→A3→Prop) : Prop ≝
- | ex8_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → P4 x0 x1 x2 x3 → P5 x0 x1 x2 x3 → P6 x0 x1 x2 x3 → P7 x0 x1 x2 x3 → ex8_4 ? ? ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (8, 4)" 'Ex4 P0 P1 P2 P3 P4 P5 P6 P7 = (ex8_4 ? ? ? ? P0 P1 P2 P3 P4 P5 P6 P7).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_8_5.ma".
-
-(* multiple existental quantifier (8, 5) *)
-
-inductive ex8_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3,P4,P5,P6,P7:A0→A1→A2→A3→A4→Prop) : Prop ≝
- | ex8_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → P4 x0 x1 x2 x3 x4 → P5 x0 x1 x2 x3 x4 → P6 x0 x1 x2 x3 x4 → P7 x0 x1 x2 x3 x4 → ex8_5 ? ? ? ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (8, 5)" 'Ex5 P0 P1 P2 P3 P4 P5 P6 P7 = (ex8_5 ? ? ? ? ? P0 P1 P2 P3 P4 P5 P6 P7).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/ex_9_3.ma".
-
-(* multiple existental quantifier (9, 3) *)
-
-inductive ex9_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3,P4,P5,P6,P7,P8:A0→A1→A2→Prop) : Prop ≝
- | ex9_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → P4 x0 x1 x2 → P5 x0 x1 x2 → P6 x0 x1 x2 → P7 x0 x1 x2 → P8 x0 x1 x2 → ex9_3 ? ? ? ? ? ? ? ? ? ? ? ?
-.
-
-interpretation "multiple existental quantifier (9, 3)" 'Ex3 P0 P1 P2 P3 P4 P5 P6 P7 P8 = (ex9_3 ? ? ? P0 P1 P2 P3 P4 P5 P6 P7 P8).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/or_3.ma".
-
-(* multiple disjunction connective (3) *)
-
-inductive or3 (P0,P1,P2:Prop) : Prop ≝
- | or3_intro0: P0 → or3 ? ? ?
- | or3_intro1: P1 → or3 ? ? ?
- | or3_intro2: P2 → or3 ? ? ?
-.
-
-interpretation "multiple disjunction connective (3)" 'Or P0 P1 P2 = (or3 P0 P1 P2).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/or_4.ma".
-
-(* multiple disjunction connective (4) *)
-
-inductive or4 (P0,P1,P2,P3:Prop) : Prop ≝
- | or4_intro0: P0 → or4 ? ? ? ?
- | or4_intro1: P1 → or4 ? ? ? ?
- | or4_intro2: P2 → or4 ? ? ? ?
- | or4_intro3: P3 → or4 ? ? ? ?
-.
-
-interpretation "multiple disjunction connective (4)" 'Or P0 P1 P2 P3 = (or4 P0 P1 P2 P3).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* This file was generated by xoa.native: do not edit *********************)
-
-include "basics/pts.ma".
-
-include "ground_2/notation/xoa/or_5.ma".
-
-(* multiple disjunction connective (5) *)
-
-inductive or5 (P0,P1,P2,P3,P4:Prop) : Prop ≝
- | or5_intro0: P0 → or5 ? ? ? ? ?
- | or5_intro1: P1 → or5 ? ? ? ? ?
- | or5_intro2: P2 → or5 ? ? ? ? ?
- | or5_intro3: P3 → or5 ? ? ? ? ?
- | or5_intro4: P4 → or5 ? ? ? ? ?
-.
-
-interpretation "multiple disjunction connective (5)" 'Or P0 P1 P2 P3 P4 = (or5 P0 P1 P2 P3 P4).
-
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/lib/arith.ma".
-include "ground_2/notation/functions/infinity_0.ma".
-
-(* NATURAL NUMBERS WITH INFINITY ********************************************)
-
-(* the type of natural numbers with infinity *)
-inductive ynat: Type[0] ≝
-| yinj: nat → ynat
-| Y : ynat
-.
-
-coercion yinj.
-
-interpretation "ynat infinity" 'Infinity = Y.
-
-(* Inversion lemmas *********************************************************)
-
-lemma yinj_inj: ∀m,n. yinj m = yinj n → m = n.
-#m #n #H destruct //
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma eq_ynat_dec: ∀n1,n2:ynat. Decidable (n1 = n2).
-* [ #n1 ] * [1,3: #n2 ] /2 width=1 by or_introl/
-[2,3: @or_intror #H destruct ]
-elim (eq_nat_dec n1 n2) /4 width=1 by yinj_inj, or_intror, or_introl/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/ynat/ynat_succ.ma".
-
-(* NATURAL NUMBERS WITH INFINITY ********************************************)
-
-(* order relation *)
-inductive yle: relation ynat ≝
-| yle_inj: ∀m,n. m ≤ n → yle m n
-| yle_Y : ∀m. yle m (∞)
-.
-
-interpretation "ynat 'less or equal to'" 'leq x y = (yle x y).
-
-(* Basic inversion lemmas ***************************************************)
-
-fact yle_inv_inj2_aux: ∀x,y. x ≤ y → ∀n. y = yinj n →
- ∃∃m. m ≤ n & x = yinj m.
-#x #y * -x -y
-[ #x #y #Hxy #n #Hy destruct /2 width=3 by ex2_intro/
-| #x #n #Hy destruct
-]
-qed-.
-
-lemma yle_inv_inj2: ∀x,n. x ≤ yinj n → ∃∃m. m ≤ n & x = yinj m.
-/2 width=3 by yle_inv_inj2_aux/ qed-.
-
-lemma yle_inv_inj: ∀m,n. yinj m ≤ yinj n → m ≤ n.
-#m #n #H elim (yle_inv_inj2 … H) -H
-#x #Hxn #H destruct //
-qed-.
-
-fact yle_inv_O2_aux: ∀m:ynat. ∀x:ynat. m ≤ x → x = 0 → m = 0.
-#m #x * -m -x
-[ #m #n #Hmn #H destruct /3 width=1 by le_n_O_to_eq, eq_f/
-| #m #H destruct
-]
-qed-.
-
-lemma yle_inv_O2: ∀m:ynat. m ≤ 0 → m = 0.
-/2 width =3 by yle_inv_O2_aux/ qed-.
-
-fact yle_inv_Y1_aux: ∀x,n. x ≤ n → x = ∞ → n = ∞.
-#x #n * -x -n //
-#x #n #_ #H destruct
-qed-.
-
-lemma yle_inv_Y1: ∀n. ∞ ≤ n → n = ∞.
-/2 width=3 by yle_inv_Y1_aux/ qed-.
-
-lemma yle_antisym: ∀y,x. x ≤ y → y ≤ x → x = y.
-#x #y #H elim H -x -y
-/4 width=1 by yle_inv_Y1, yle_inv_inj, le_to_le_to_eq, eq_f/
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma le_O1: ∀n:ynat. 0 ≤ n.
-* /2 width=1 by yle_inj/
-qed.
-
-lemma yle_refl: reflexive … yle.
-* /2 width=1 by le_n, yle_inj/
-qed.
-
-lemma yle_split: ∀x,y:ynat. x ≤ y ∨ y ≤ x.
-* /2 width=1 by or_intror/
-#x * /2 width=1 by or_introl/
-#y elim (le_or_ge x y) /3 width=1 by yle_inj, or_introl, or_intror/
-qed-.
-
-(* Inversion lemmas on successor ********************************************)
-
-fact yle_inv_succ1_aux: ∀x,y:ynat. x ≤ y → ∀m. x = ↑m → m ≤ ↓y ∧ ↑↓y = y.
-#x #y * -x -y
-[ #x #y #Hxy #m #H elim (ysucc_inv_inj_sn … H) -H
- #n #H1 #H2 destruct elim (le_inv_S1 … Hxy) -Hxy
- #m #Hnm #H destruct /3 width=1 by yle_inj, conj/
-| #x #y #H destruct /2 width=1 by yle_Y, conj/
-]
-qed-.
-
-lemma yle_inv_succ1: ∀m,y:ynat. ↑m ≤ y → m ≤ ↓y ∧ ↑↓y = y.
-/2 width=3 by yle_inv_succ1_aux/ qed-.
-
-lemma yle_inv_succ: ∀m,n. ↑m ≤ ↑n → m ≤ n.
-#m #n #H elim (yle_inv_succ1 … H) -H //
-qed-.
-
-lemma yle_inv_succ2: ∀x,y. x ≤ ↑y → ↓x ≤ y.
-#x #y #Hxy elim (ynat_cases x)
-[ #H destruct //
-| * #m #H destruct /2 width=1 by yle_inv_succ/
-]
-qed-.
-
-(* Properties on predecessor ************************************************)
-
-lemma yle_pred_sn: ∀m,n. m ≤ n → ↓m ≤ n.
-#m #n * -m -n /3 width=3 by transitive_le, yle_inj/
-qed.
-
-lemma yle_refl_pred_sn: ∀x. ↓x ≤ x.
-/2 width=1 by yle_refl, yle_pred_sn/ qed.
-
-lemma yle_pred: ∀m,n. m ≤ n → ↓m ≤ ↓n.
-#m #n * -m -n /3 width=1 by yle_inj, monotonic_pred/
-qed.
-
-(* Properties on successor **************************************************)
-
-lemma yle_succ: ∀m,n. m ≤ n → ↑m ≤ ↑n.
-#m #n * -m -n /3 width=1 by yle_inj, le_S_S/
-qed.
-
-lemma yle_succ_dx: ∀m,n. m ≤ n → m ≤ ↑n.
-#m #n * -m -n /3 width=1 by le_S, yle_inj/
-qed.
-
-lemma yle_refl_S_dx: ∀x. x ≤ ↑x.
-/2 width=1 by yle_succ_dx/ qed.
-
-lemma yle_refl_SP_dx: ∀x. x ≤ ↑↓x.
-* // * //
-qed.
-
-lemma yle_succ2: ∀x,y. ↓x ≤ y → x ≤ ↑y.
-#x #y #Hxy elim (ynat_cases x)
-[ #H destruct //
-| * #m #H destruct /2 width=1 by yle_succ/
-]
-qed-.
-
-(* Main properties **********************************************************)
-
-theorem yle_trans: Transitive … yle.
-#x #y * -x -y
-[ #x #y #Hxy * //
- #z #H lapply (yle_inv_inj … H) -H
- /3 width=3 by transitive_le, yle_inj/ (**) (* full auto too slow *)
-| #x #z #H lapply (yle_inv_Y1 … H) //
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/ynat/ynat_le.ma".
-
-(* NATURAL NUMBERS WITH INFINITY ********************************************)
-
-(* strict order relation *)
-inductive ylt: relation ynat ≝
-| ylt_inj: ∀m,n. m < n → ylt m n
-| ylt_Y : ∀m:nat. ylt m (∞)
-.
-
-interpretation "ynat 'less than'" 'lt x y = (ylt x y).
-
-(* Basic forward lemmas *****************************************************)
-
-lemma ylt_fwd_gen: ∀x,y. x < y → ∃m. x = yinj m.
-#x #y * -x -y /2 width=2 by ex_intro/
-qed-.
-
-lemma ylt_fwd_lt_O1: ∀x,y:ynat. x < y → 0 < y.
-#x #y #H elim H -x -y /3 width=2 by ylt_inj, ltn_to_ltO/
-qed-.
-
-(* Basic inversion lemmas ***************************************************)
-
-fact ylt_inv_inj2_aux: ∀x,y. x < y → ∀n. y = yinj n →
- ∃∃m. m < n & x = yinj m.
-#x #y * -x -y
-[ #x #y #Hxy #n #Hy elim (le_inv_S1 … Hxy) -Hxy
- #m #Hm #H destruct /3 width=3 by le_S_S, ex2_intro/
-| #x #n #Hy destruct
-]
-qed-.
-
-lemma ylt_inv_inj2: ∀x,n. x < yinj n →
- ∃∃m. m < n & x = yinj m.
-/2 width=3 by ylt_inv_inj2_aux/ qed-.
-
-lemma ylt_inv_inj: ∀m,n. yinj m < yinj n → m < n.
-#m #n #H elim (ylt_inv_inj2 … H) -H
-#x #Hx #H destruct //
-qed-.
-
-lemma ylt_inv_Y1: ∀n. ∞ < n → ⊥.
-#n #H elim (ylt_fwd_gen … H) -H
-#y #H destruct
-qed-.
-
-lemma ylt_inv_Y2: ∀x:ynat. x < ∞ → ∃n. x = yinj n.
-* /2 width=2 by ex_intro/
-#H elim (ylt_inv_Y1 … H)
-qed-.
-
-lemma ylt_inv_O1: ∀n:ynat. 0 < n → ↑↓n = n.
-* // #n #H lapply (ylt_inv_inj … H) -H normalize
-/3 width=1 by S_pred, eq_f/
-qed-.
-
-(* Inversion lemmas on successor ********************************************)
-
-fact ylt_inv_succ1_aux: ∀x,y:ynat. x < y → ∀m. x = ↑m → m < ↓y ∧ ↑↓y = y.
-#x #y * -x -y
-[ #x #y #Hxy #m #H elim (ysucc_inv_inj_sn … H) -H
- #n #H1 #H2 destruct elim (le_inv_S1 … Hxy) -Hxy
- #m #Hnm #H destruct /3 width=1 by ylt_inj, conj/
-| #x #y #H elim (ysucc_inv_inj_sn … H) -H
- #m #H #_ destruct /2 width=1 by ylt_Y, conj/
-]
-qed-.
-
-lemma ylt_inv_succ1: ∀m,y:ynat. ↑m < y → m < ↓y ∧ ↑↓y = y.
-/2 width=3 by ylt_inv_succ1_aux/ qed-.
-
-lemma ylt_inv_succ: ∀m,n. ↑m < ↑n → m < n.
-#m #n #H elim (ylt_inv_succ1 … H) -H //
-qed-.
-
-(* Forward lemmas on successor **********************************************)
-
-fact ylt_fwd_succ2_aux: ∀x,y. x < y → ∀n. y = ↑n → x ≤ n.
-#x #y * -x -y
-[ #x #y #Hxy #m #H elim (ysucc_inv_inj_sn … H) -H
- #n #H1 #H2 destruct /3 width=1 by yle_inj, le_S_S_to_le/
-| #x #n #H lapply (ysucc_inv_Y_sn … H) -H //
-]
-qed-.
-
-lemma ylt_fwd_succ2: ∀m,n. m < ↑n → m ≤ n.
-/2 width=3 by ylt_fwd_succ2_aux/ qed-.
-
-(* inversion and forward lemmas on order ************************************)
-
-lemma ylt_fwd_le_succ1: ∀m,n. m < n → ↑m ≤ n.
-#m #n * -m -n /2 width=1 by yle_inj/
-qed-.
-
-lemma ylt_fwd_le_pred2: ∀x,y:ynat. x < y → x ≤ ↓y.
-#x #y #H elim H -x -y /3 width=1 by yle_inj, monotonic_pred/
-qed-.
-
-lemma ylt_fwd_le: ∀m:ynat. ∀n:ynat. m < n → m ≤ n.
-#m #n * -m -n /3 width=1 by lt_to_le, yle_inj/
-qed-.
-
-lemma ylt_yle_false: ∀m:ynat. ∀n:ynat. m < n → n ≤ m → ⊥.
-#m #n * -m -n
-[ #m #n #Hmn #H lapply (yle_inv_inj … H) -H
- #H elim (lt_refl_false n) /2 width=3 by le_to_lt_to_lt/
-| #m #H lapply (yle_inv_Y1 … H) -H
- #H destruct
-]
-qed-.
-
-lemma ylt_inv_le: ∀x,y. x < y → x < ∞ ∧ ↑x ≤ y.
-#x #y #H elim H -x -y /3 width=1 by yle_inj, conj/
-qed-.
-
-(* Basic properties *********************************************************)
-
-lemma ylt_O1: ∀x:ynat. ↑↓x = x → 0 < x.
-* // * /2 width=1 by ylt_inj/ normalize
-#H destruct
-qed.
-
-lemma yle_inv_succ_sn_lt (x:ynat) (y:ynat):
- ↑x ≤ y → ∧∧ x ≤ ↓y & 0 < y.
-#x #y #H elim (yle_inv_succ1 … H) -H /3 width=2 by ylt_O1, conj/
-qed-.
-
-(* Properties on predecessor ************************************************)
-
-lemma ylt_pred: ∀m,n:ynat. m < n → 0 < m → ↓m < ↓n.
-#m #n * -m -n
-/4 width=1 by ylt_inv_inj, ylt_inj, monotonic_lt_pred/
-qed.
-
-(* Properties on successor **************************************************)
-
-lemma ylt_O_succ: ∀x:ynat. 0 < ↑x.
-* /2 width=1 by ylt_inj/
-qed.
-
-lemma ylt_succ: ∀m,n. m < n → ↑m < ↑n.
-#m #n #H elim H -m -n /3 width=1 by ylt_inj, le_S_S/
-qed.
-
-lemma ylt_succ_Y: ∀x. x < ∞ → ↑x < ∞.
-* /2 width=1 by/ qed.
-
-lemma yle_succ1_inj: ∀x. ∀y:ynat. ↑yinj x ≤ y → x < y.
-#x * /3 width=1 by yle_inv_inj, ylt_inj/
-qed.
-
-lemma ylt_succ2_refl: ∀x,y:ynat. x < y → x < ↑x.
-#x #y #H elim (ylt_fwd_gen … H) -y /2 width=1 by ylt_inj/
-qed.
-
-(* Properties on order ******************************************************)
-
-lemma yle_split_eq: ∀m,n:ynat. m ≤ n → m < n ∨ m = n.
-#m #n * -m -n
-[ #m #n #Hmn elim (le_to_or_lt_eq … Hmn) -Hmn
- /3 width=1 by or_introl, ylt_inj/
-| * /2 width=1 by or_introl, ylt_Y/
-]
-qed-.
-
-lemma ylt_split: ∀m,n:ynat. m < n ∨ n ≤ m.
-#m #n elim (yle_split m n) /2 width=1 by or_intror/
-#H elim (yle_split_eq … H) -H /2 width=1 by or_introl, or_intror/
-qed-.
-
-lemma ylt_split_eq: ∀m,n:ynat. ∨∨ m < n | n = m | n < m.
-#m #n elim (ylt_split m n) /2 width=1 by or3_intro0/
-#H elim (yle_split_eq … H) -H /2 width=1 by or3_intro1, or3_intro2/
-qed-.
-
-lemma ylt_yle_trans: ∀x:ynat. ∀y:ynat. ∀z:ynat. y ≤ z → x < y → x < z.
-#x #y #z * -y -z
-[ #y #z #Hyz #H elim (ylt_inv_inj2 … H) -H
- #m #Hm #H destruct /3 width=3 by ylt_inj, lt_to_le_to_lt/
-| #y * //
-]
-qed-.
-
-lemma yle_ylt_trans: ∀x:ynat. ∀y:ynat. ∀z:ynat. y < z → x ≤ y → x < z.
-#x #y #z * -y -z
-[ #y #z #Hyz #H elim (yle_inv_inj2 … H) -H
- #m #Hm #H destruct /3 width=3 by ylt_inj, le_to_lt_to_lt/
-| #y #H elim (yle_inv_inj2 … H) -H //
-]
-qed-.
-
-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-.
-
-lemma yle_lt: ∀x,y. x < ∞ → ↑x ≤ y → x < y.
-#x * // #y #H elim (ylt_inv_Y2 … H) -H #n #H destruct
-/3 width=1 by ylt_inj, yle_inv_inj/
-qed-.
-
-(* Main properties **********************************************************)
-
-theorem ylt_trans: Transitive … ylt.
-#x #y * -x -y
-[ #x #y #Hxy * //
- #z #H lapply (ylt_inv_inj … H) -H
- /3 width=3 by transitive_lt, ylt_inj/ (**) (* full auto too slow *)
-| #x #z #H elim (ylt_yle_false … H) //
-]
-qed-.
-
-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.
- (∀y. (∀x. x < y → R x) → R y) →
- ∀y:nat. ∀x. x ≤ y → R x.
-#R #IH #y elim y -y
-[ #x #H >(yle_inv_O2 … H) -x
- @IH -IH #x #H elim (ylt_yle_false … H) -H //
-| /5 width=3 by ylt_yle_trans, ylt_fwd_succ2/
-]
-qed-.
-
-fact ynat_ind_lt_aux: ∀R:predicate ynat.
- (∀y. (∀x. x < y → R x) → R y) →
- ∀y:nat. R y.
-/4 width=2 by ynat_ind_lt_le_aux/ qed-.
-
-lemma ynat_ind_lt: ∀R:predicate ynat.
- (∀y. (∀x. x < y → R x) → R y) →
- ∀y. R y.
-#R #IH * /4 width=1 by ynat_ind_lt_aux/
-@IH #x #H elim (ylt_inv_Y2 … H) -H
-#n #H destruct /4 width=1 by ynat_ind_lt_aux/
-qed-.
-
-fact ynat_f_ind_aux: ∀A. ∀f:A→ynat. ∀R:predicate A.
- (∀x. (∀a. f a < x → R a) → ∀a. f a = x → R a) →
- ∀x,a. f a = x → R a.
-#A #f #R #IH #x @(ynat_ind_lt … x) -x
-/3 width=3 by/
-qed-.
-
-lemma ynat_f_ind: ∀A. ∀f:A→ynat. ∀R:predicate A.
- (∀x. (∀a. f a < x → R a) → ∀a. f a = x → R a) → ∀a. R a.
-#A #f #R #IH #a
-@(ynat_f_ind_aux … IH) -IH [2: // | skip ]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/ynat/ynat_plus.ma".
-
-(* NATURAL NUMBERS WITH INFINITY ********************************************)
-
-(* left subtraction *)
-definition yminus_sn (x) (y): ynat ≝ ypred^y x.
-
-interpretation "ynat left minus" 'minus x y = (yminus_sn x y).
-
-lemma yminus_O2: ∀m:ynat. m - 0 = m.
-// qed.
-
-lemma yminus_S2: ∀m:ynat. ∀n:nat. m - S n = ↓(m - n).
-// qed.
-
-(* Basic properties *********************************************************)
-
-lemma yminus_inj: ∀m,n. yinj m - n = yinj (m - n).
-#m #n elim n -n //
-#n #IH >yminus_S2 >IH -IH >eq_minus_S_pred //
-qed.
-
-lemma yminus_Y_inj: ∀n. ∞ - n = ∞.
-#n elim n -n //
-qed.
-
-lemma yminus_O1: ∀x:nat. yinj 0 - x = 0.
-// qed.
-
-lemma yminus_refl: ∀x:nat. yinj x - x = 0.
-// qed.
-
-lemma yminus_minus_comm: ∀x:ynat. ∀y,z. x - y - z = x - z - y.
-* // qed.
-
-(* Properties on predecessor ************************************************)
-
-lemma yminus_SO2: ∀m:ynat. m - 1 = ↓m.
-// qed.
-
-lemma yminus_pred1: ∀x,y. ↓x - y = ↓(x-y).
-#x * // #y elim y -y //
-qed.
-
-lemma yminus_pred: ∀m:ynat. ∀n. 0 < m → 0 < n → ↓m - ↓n = m - n.
-* // #m #n >yminus_inj >yminus_inj
-/4 width=1 by ylt_inv_inj, minus_pred_pred, eq_f/
-qed-.
-
-(* Properties on successor **************************************************)
-
-lemma yminus_succ: ∀m:ynat. ∀n. ↑m - ↑n = m - n.
-* // qed.
-
-lemma yminus_succ1_inj: ∀n:nat. ∀m:ynat. n ≤ m → ↑m - n = ↑(m - n).
-#n *
-[ #m #Hmn >yminus_inj >yminus_inj
- /4 width=1 by yle_inv_inj, plus_minus, eq_f/
-| >yminus_Y_inj //
-]
-qed-.
-
-lemma yminus_succ2: ∀x:ynat. ∀y. x - ↑y = ↓(x-y).
-* //
-qed.
-
-(* Properties on order ******************************************************)
-
-lemma yle_minus_sn: ∀m:ynat. ∀n. m - n ≤ m.
-* // #n /2 width=1 by yle_inj/
-qed.
-
-lemma yle_to_minus: ∀m:ynat. ∀n:nat. m ≤ n → m - n = 0.
-*
-[ #m #n #H >yminus_inj /4 width=1 by yle_inv_inj, eq_minus_O, eq_f/
-| #n #H lapply (yle_inv_Y1 … H) -H #H destruct
-]
-qed-.
-
-lemma yminus_to_le: ∀m:ynat. ∀n. m - n = 0 → m ≤ n.
-* [2: #n >yminus_Y_inj #H destruct ]
-#m #n >yminus_inj #H
-lapply (yinj_inj … H) -H (**) (* destruct lemma needed *)
-/2 width=1 by yle_inj/
-qed.
-
-lemma monotonic_yle_minus_dx: ∀x,y. x ≤ y → ∀z. x - z ≤ y - z.
-#x #y * /3 width=1 by yle_inj, monotonic_le_minus_l2/
-qed.
-
-(* Properties on strict order ***********************************************)
-
-lemma ylt_to_minus: ∀y:ynat. ∀x. yinj x < y → 0 < y - x.
-* // #y #x #H >yminus_inj
-/4 width=1 by ylt_inj, ylt_inv_inj, lt_plus_to_minus_r/
-qed.
-
-lemma yminus_to_lt: ∀y:ynat. ∀x. 0 < y - x → x < y.
-* // #y #x >yminus_inj #H
-/4 width=1 by ylt_inv_inj, ylt_inj, lt_minus_to_plus_r/
-qed-.
-
-lemma monotonic_ylt_minus_dx: ∀x,y:ynat. x < y → ∀z:nat. z ≤ x → x - z < y - z.
-#x #y * -x -y
-/4 width=1 by ylt_inj, yle_inv_inj, monotonic_lt_minus_l/
-qed.
-
-(* Properties on minus ******************************************************)
-
-lemma yplus_minus: ∀m:ynat. ∀n:nat. m + n - n = m.
-#m #n elim n -n //
-#n #IHn >(yplus_succ2 m n) >(yminus_succ … n) //
-qed.
-
-lemma yminus_plus2: ∀x:ynat. ∀y,z. x - (y + z) = x - y - z.
-* // qed.
-
-(* Forward lemmas on minus **************************************************)
-
-lemma yle_plus1_to_minus_inj2: ∀x,z:ynat. ∀y:nat. x + y ≤ z → x ≤ z - y.
-#x #z #y #H lapply (monotonic_yle_minus_dx … H y) -H //
-qed-.
-
-lemma yle_plus1_to_minus_inj1: ∀x,z:ynat. ∀y:nat. y + x ≤ z → x ≤ z - y.
-/2 width=1 by yle_plus1_to_minus_inj2/ qed-.
-
-lemma yle_plus2_to_minus_inj2: ∀x,y:ynat. ∀z:nat. x ≤ y + z → x - z ≤ y.
-/2 width=1 by monotonic_yle_minus_dx/ qed-.
-
-lemma yle_plus2_to_minus_inj1: ∀x,y:ynat. ∀z:nat. x ≤ z + y → x - z ≤ y.
-/2 width=1 by yle_plus2_to_minus_inj2/ qed-.
-
-lemma yminus_plus (x:ynat) (y:nat): y ≤ x → x = (x-y)+y.
-* // #x #y #H >yminus_inj >yplus_inj
-/4 width=1 by yle_inv_inj, plus_minus, eq_f/
-qed-.
-
-lemma yplus_minus_assoc_inj: ∀x:nat. ∀y,z:ynat. x ≤ y → z + (y - x) = z + y - x.
-#x *
-[ #y * // #z >yminus_inj >yplus_inj >yplus_inj
- /4 width=1 by yle_inv_inj, plus_minus, eq_f/
-| >yminus_Y_inj //
-]
-qed-.
-
-alias symbol "plus" (instance 5) = "ynat plus".
-alias symbol "minus" (instance 4) = "ynat left minus".
-alias symbol "minus" (instance 3) = "natural minus".
-alias symbol "minus" (instance 2) = "ynat left minus".
-alias symbol "leq" (instance 6) = "natural 'less or equal to'".
-lemma yplus_minus_assoc_comm_inj: ∀z:ynat. ∀x,y:nat. x ≤ y → z - (y - x) = z + x - y.
-* // #z #x #y >yminus_inj >yplus_inj >yminus_inj
-/4 width=1 by yle_inv_inj, minus_le_minus_minus_comm, eq_f/
-qed-.
-
-lemma yplus_minus_comm_inj: ∀y:nat. ∀x,z:ynat. y ≤ x → x + z - y = x - y + z.
-#y * // #x * //
-#z #Hxy >yplus_inj >yminus_inj <plus_minus
-/2 width=1 by yle_inv_inj/
-qed-.
-
-lemma ylt_plus1_to_minus_inj2: ∀x,z:ynat. ∀y:nat. x + y < z → x < z - y.
-#x #z #y #H lapply (monotonic_ylt_minus_dx … H y ?) -H //
-qed-.
-
-lemma ylt_plus1_to_minus_inj1: ∀x,z:ynat. ∀y:nat. y + x < z → x < z - y.
-/2 width=1 by ylt_plus1_to_minus_inj2/ qed-.
-
-lemma ylt_plus2_to_minus_inj2: ∀x,y:ynat. ∀z:nat. z ≤ x → x < y + z → x - z < y.
-/2 width=1 by monotonic_ylt_minus_dx/ qed-.
-
-lemma ylt_plus2_to_minus_inj1: ∀x,y:ynat. ∀z:nat. z ≤ x → x < z + y → x - z < y.
-/2 width=1 by ylt_plus2_to_minus_inj2/ qed-.
-
-lemma yplus_inv_Y1: ∀x,y. ∞ = x + y → ∨∨ ∞ = x | ∞ = y.
-* /2 width=1 by or_introl/ #x * // #y >yplus_inj #H destruct
-qed-.
-
-lemma yplus_inv_minus:
- ∀x1,y2:ynat.∀y1,x2:nat.
- y1 ≤ x1 → x1 + x2 = y2 + y1 → ∧∧ x1 - y1 = y2 - x2 & x2 ≤ y2.
-*
-[ #x1 * [| #y1 #x2 #_ >yplus_inj >yplus_Y1 #H destruct ]
- #y2 #y1 #x2 #H1 >yplus_inj >yplus_inj #H2 >yminus_inj >yminus_inj
- lapply (yle_inv_inj … H1) -H1 #Hyx1
- lapply (yinj_inj … H2) -H2 #Hxy (**) (* destruct lemma needed *)
- /5 width=4 by yle_inj, plus2_le_sn_sn, plus_to_minus_2, conj, eq_f2/
-| #y2 #y1 #x2 #_ >yplus_Y1 #H
- elim (yplus_inv_Y1 … H) -H #H destruct /2 width=1 by conj/
-]
-qed-.
-
-(* Inversion lemmas on minus ************************************************)
-
-lemma yle_inv_plus_inj2: ∀x,z:ynat. ∀y:nat. x + y ≤ z → x ≤ z - y ∧ y ≤ z.
-/3 width=3 by yle_plus1_to_minus_inj2, yle_trans, conj/ qed-.
-
-lemma yle_inv_plus_inj1: ∀x,z:ynat. ∀y:nat. y + x ≤ z → x ≤ z - y ∧ y ≤ z.
-/2 width=1 by yle_inv_plus_inj2/ qed-.
-
-lemma yle_inv_plus_inj_dx: ∀z,x:ynat. ∀y:nat. x + y ≤ z →
- ∧∧ x ≤ z - y & y ≤ z.
-* [| /2 width=1 by conj/ ]
-#z * [| #y >yplus_Y1 #H >(yle_inv_Y1 … H) -z /2 width=1 by conj/ ]
-#x #y >yplus_inj #H >yminus_inj
-/5 width=2 by yle_inv_inj, yle_inj, le_plus_to_minus_r, le_plus_b, conj/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/xoa/ex_3_2.ma".
-include "ground_2/ynat/ynat_lt.ma".
-
-(* NATURAL NUMBERS WITH INFINITY ********************************************)
-
-(* addition *)
-definition yplus: ynat → ynat → ynat ≝ λx,y. match y with
-[ yinj n ⇒ ysucc^n x
-| Y ⇒ Y
-].
-
-interpretation "ynat plus" 'plus x y = (yplus x y).
-
-lemma yplus_O2: ∀m:ynat. m + 0 = m.
-// qed.
-
-lemma yplus_S2: ∀m:ynat. ∀n. m + S n = ↑(m + n).
-// qed.
-
-lemma yplus_Y2: ∀m:ynat. m + (∞) = ∞.
-// qed.
-
-(* Properties on successor **************************************************)
-
-lemma yplus_succ2: ∀m,n. m + ↑n = ↑(m + n).
-#m * //
-qed.
-
-lemma yplus_succ1: ∀m,n. ↑m + n = ↑(m + n).
-#m * // #n elim n -n //
-qed.
-
-lemma yplus_succ_swap: ∀m,n. m + ↑n = ↑m + n.
-// qed.
-
-lemma yplus_SO2: ∀m:ynat. m + 1 = ↑m.
-* //
-qed.
-
-(* Basic properties *********************************************************)
-
-lemma yplus_inj: ∀n,m. yinj m + yinj n = yinj (m + n).
-#n elim n -n //
-#n #IHn #m >(yplus_succ2 ? n) >IHn -IHn
-<plus_n_Sm //
-qed.
-
-lemma yplus_Y1: ∀m. ∞ + m = ∞.
-* // #m elim m -m //
-qed.
-
-lemma yplus_comm: commutative … yplus.
-* [ #m ] * [1,3: #n ] //
-qed.
-
-lemma yplus_assoc: associative … yplus.
-#x #y * // #z cases y -y
-[ #y >yplus_inj whd in ⊢ (??%%); <iter_plus //
-| >yplus_Y1 //
-]
-qed.
-
-lemma yplus_O1: ∀n:ynat. 0 + n = n.
-#n >yplus_comm // qed.
-
-lemma yplus_comm_23: ∀x,y,z. x + z + y = x + y + z.
-#x #y #z >yplus_assoc //
-qed.
-
-lemma yplus_comm_24: ∀x1,x2,x3,x4. x1 + x4 + x3 + x2 = x1 + x2 + x3 + x4.
-#x1 #x2 #x3 #x4
->yplus_assoc >yplus_assoc >yplus_assoc >yplus_assoc
-/2 width=1 by eq_f2/
-qed.
-
-lemma yplus_assoc_23: ∀x1,x2,x3,x4. x1 + x2 + (x3 + x4) = x1 + (x2 + x3) + x4.
-#x1 #x2 #x3 #x4 >yplus_assoc >yplus_assoc
-/2 width=1 by eq_f2/
-qed.
-
-(* Inversion lemmas on successor *********************************************)
-
-lemma yplus_inv_succ_lt_dx: ∀x,y,z:ynat. 0 < y → x + y = ↑z → x + ↓y = z.
-#x #y #z #H <(ylt_inv_O1 y) // >yplus_succ2
-/2 width=1 by ysucc_inv_inj/
-qed-.
-
-lemma yplus_inv_succ_lt_sn: ∀x,y,z:ynat. 0 < x → x + y = ↑z → ↓x + y = z.
-#x #y #z #H <(ylt_inv_O1 x) // >yplus_succ1
-/2 width=1 by ysucc_inv_inj/
-
-qed-.
-
-(* Inversion lemmas on order ************************************************)
-
-lemma yle_inv_plus_dx: ∀x,y. x ≤ y → ∃z. x + z = y.
-#x #y #H elim H -x -y /2 width=2 by ex_intro/
-#m #n #H @(ex_intro … (yinj (n-m))) (**) (* explicit constructor *)
-/3 width=1 by plus_minus, eq_f/
-qed-.
-
-lemma yle_inv_plus_sn: ∀x,y. x ≤ y → ∃z. z + x = y.
-#x #y #H elim (yle_inv_plus_dx … H) -H
-/2 width=2 by ex_intro/
-qed-.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma yplus_inv_inj: ∀z,y,x. x + y = yinj z →
- ∃∃m,n. m + n = z & x = yinj m & y = yinj n.
-#z * [2: normalize #x #H destruct ]
-#y * [2: >yplus_Y1 #H destruct ]
-/3 width=5 by yinj_inj, ex3_2_intro/
-qed-.
-
-lemma yplus_inv_O: ∀x,y:ynat. x + y = 0 → x = 0 ∧ y = 0.
-#x #y #H elim (yplus_inv_inj … H) -H
-#m * /2 width=1 by conj/ #n <plus_n_Sm #H destruct
-qed-.
-
-lemma discr_yplus_xy_x: ∀x,y. x + y = x → x = ∞ ∨ y = 0.
-* /2 width=1 by or_introl/
-#x elim x -x /2 width=1 by or_intror/
-#x #IHx * [2: >yplus_Y2 #H destruct ]
-#y <ysucc_inj >yplus_succ1 #H
-lapply (ysucc_inv_inj … H) -H #H
-elim (IHx … H) -IHx -H /2 width=1 by or_introl, or_intror/
-qed-.
-
-lemma discr_yplus_x_xy: ∀x,y. x = x + y → x = ∞ ∨ y = 0.
-/2 width=1 by discr_yplus_xy_x/ qed-.
-
-lemma yplus_inv_monotonic_dx_inj: ∀z,x,y. x + yinj z = y + yinj z → x = y.
-#z @(nat_ind_plus … z) -z /3 width=2 by ysucc_inv_inj/
-qed-.
-
-lemma yplus_inv_monotonic_dx: ∀z,x,y. z < ∞ → x + z = y + z → x = y.
-#z #x #y #H elim (ylt_inv_Y2 … H) -H /2 width=2 by yplus_inv_monotonic_dx_inj/
-qed-.
-
-lemma yplus_inv_Y2: ∀x,y. x + y = ∞ → x = ∞ ∨ y = ∞.
-* /2 width=1 by or_introl/ #x * // #y >yplus_inj #H destruct
-qed-.
-
-lemma yplus_inv_monotonic_23: ∀z,x1,x2,y1,y2. z < ∞ →
- x1 + z + y1 = x2 + z + y2 → x1 + y1 = x2 + y2.
-#z #x1 #x2 #y1 #y2 #Hz #H @(yplus_inv_monotonic_dx z) //
->yplus_comm_23 >H -H //
-qed-.
-
-(* Inversion lemmas on strict_order *****************************************)
-
-lemma ylt_inv_plus_Y: ∀x,y. x + y < ∞ → x < ∞ ∧ y < ∞.
-#x #y #H elim (ylt_inv_Y2 … H) -H
-#z #H elim (yplus_inv_inj … H) -H /2 width=1 by conj/
-qed-.
-
-lemma ylt_inv_plus_sn: ∀x,y. x < y → ∃∃z. ↑z + x = y & x < ∞.
-#x #y #H elim (ylt_inv_le … H) -H
-#Hx #H elim (yle_inv_plus_sn … H) -H
-/2 width=2 by ex2_intro/
-qed-.
-
-lemma ylt_inv_plus_dx: ∀x,y. x < y → ∃∃z. x + ↑z = y & x < ∞.
-#x #y #H elim (ylt_inv_plus_sn … H) -H
-#z >yplus_comm /2 width=2 by ex2_intro/
-qed-.
-
-(* Properties on order ******************************************************)
-
-lemma yle_plus_dx2: ∀n,m. n ≤ m + n.
-* //
-#n elim n -n //
-#n #IHn #m >(yplus_succ2 ? n) @(yle_succ n) // (**) (* full auto fails *)
-qed.
-
-lemma yle_plus_dx1: ∀n,m. m ≤ m + n.
-// qed.
-
-lemma yle_plus_dx1_trans: ∀x,z. z ≤ x → ∀y. z ≤ x + y.
-/2 width=3 by yle_trans/ qed.
-
-lemma yle_plus_dx2_trans: ∀y,z. z ≤ y → ∀x. z ≤ x + y.
-/2 width=3 by yle_trans/ qed.
-
-lemma monotonic_yle_plus_dx: ∀x,y. x ≤ y → ∀z. x + z ≤ y + z.
-#x #y #Hxy * //
-#z elim z -z /3 width=1 by yle_succ/
-qed.
-
-lemma monotonic_yle_plus_sn: ∀x,y. x ≤ y → ∀z. z + x ≤ z + y.
-/2 width=1 by monotonic_yle_plus_dx/ qed.
-
-lemma monotonic_yle_plus: ∀x1,y1. x1 ≤ y1 → ∀x2,y2. x2 ≤ y2 →
- x1 + x2 ≤ y1 + y2.
-/3 width=3 by monotonic_yle_plus_dx, monotonic_yle_plus_sn, yle_trans/ qed.
-
-lemma ylt_plus_Y: ∀x,y. x < ∞ → y < ∞ → x + y < ∞.
-#x #y #Hx elim (ylt_inv_Y2 … Hx) -Hx
-#m #Hm #Hy elim (ylt_inv_Y2 … Hy) -Hy //
-qed.
-
-(* Forward lemmas on order **************************************************)
-
-lemma yle_fwd_plus_sn2: ∀x,y,z. x + y ≤ z → y ≤ z.
-/2 width=3 by yle_trans/ qed-.
-
-lemma yle_fwd_plus_sn1: ∀x,y,z. x + y ≤ z → x ≤ z.
-/2 width=3 by yle_trans/ qed-.
-
-lemma yle_inv_monotonic_plus_dx_inj: ∀x,y:ynat.∀z:nat. x + z ≤ y + z → x ≤ y.
-#x #y #z elim z -z /3 width=1 by yle_inv_succ/
-qed-.
-
-lemma yle_inv_monotonic_plus_sn_inj: ∀x,y:ynat.∀z:nat. z + x ≤ z + y → x ≤ y.
-/2 width=2 by yle_inv_monotonic_plus_dx_inj/ qed-.
-
-lemma yle_inv_monotonic_plus_dx: ∀x,y,z. z < ∞ → x + z ≤ y + z → x ≤ y.
-#x #y #z #Hz elim (ylt_inv_Y2 … Hz) -Hz #m #H destruct
-/2 width=2 by yle_inv_monotonic_plus_sn_inj/
-qed-.
-
-lemma yle_inv_monotonic_plus_sn: ∀x,y,z. z < ∞ → z + x ≤ z + y → x ≤ y.
-/2 width=3 by yle_inv_monotonic_plus_dx/ qed-.
-
-lemma yle_fwd_plus_ge: ∀m1,m2:nat. m2 ≤ m1 → ∀n1,n2:ynat. m1 + n1 ≤ m2 + n2 → n1 ≤ n2.
-#m1 #m2 #Hm12 #n1 #n2 #H
-lapply (monotonic_yle_plus … Hm12 … H) -Hm12 -H
-/2 width=2 by yle_inv_monotonic_plus_sn_inj/
-qed-.
-
-lemma yle_fwd_plus_ge_inj: ∀m1:nat. ∀m2,n1,n2:ynat. m2 ≤ m1 → m1 + n1 ≤ m2 + n2 → n1 ≤ n2.
-#m2 #m1 #n1 #n2 #H elim (yle_inv_inj2 … H) -H
-#x #H0 #H destruct /3 width=4 by yle_fwd_plus_ge, yle_inj/
-qed-.
-
-lemma yle_fwd_plus_yge: ∀n2,m1:ynat. ∀n1,m2:nat. m2 ≤ m1 → m1 + n1 ≤ m2 + n2 → n1 ≤ n2.
-* // #n2 * /2 width=4 by yle_fwd_plus_ge_inj/
-qed-.
-
-(* Properties on strict order ***********************************************)
-
-lemma ylt_plus_dx1_trans: ∀x,z. z < x → ∀y. z < x + y.
-/2 width=3 by ylt_yle_trans/ qed.
-
-lemma ylt_plus_dx2_trans: ∀y,z. z < y → ∀x. z < x + y.
-/2 width=3 by ylt_yle_trans/ qed.
-
-lemma monotonic_ylt_plus_dx_inj: ∀x,y. x < y → ∀z:nat. x + yinj z < y + yinj z.
-#x #y #Hxy #z elim z -z /3 width=1 by ylt_succ/
-qed.
-
-lemma monotonic_ylt_plus_sn_inj: ∀x,y. x < y → ∀z:nat. yinj z + x < yinj z + y.
-/2 width=1 by monotonic_ylt_plus_dx_inj/ qed.
-
-lemma monotonic_ylt_plus_dx: ∀x,y. x < y → ∀z. z < ∞ → x + z < y + z.
-#x #y #Hxy #z #Hz elim (ylt_inv_Y2 … Hz) -Hz
-#m #H destruct /2 width=1 by monotonic_ylt_plus_dx_inj/
-qed.
-
-lemma monotonic_ylt_plus_sn: ∀x,y. x < y → ∀z. z < ∞ → z + x < z + y.
-/2 width=1 by monotonic_ylt_plus_dx/ qed.
-
-lemma monotonic_ylt_plus_inj: ∀m1,m2. m1 < m2 → ∀n1,n2. yinj n1 ≤ n2 → m1 + n1 < m2 + n2.
-/3 width=3 by monotonic_ylt_plus_sn_inj, monotonic_yle_plus_sn, ylt_yle_trans/
-qed.
-
-lemma monotonic_ylt_plus: ∀m1,m2. m1 < m2 → ∀n1. n1 < ∞ → ∀n2. n1 ≤ n2 → m1 + n1 < m2 + n2.
-#m1 #m2 #Hm12 #n1 #H elim (ylt_inv_Y2 … H) -H #m #H destruct /2 width=1 by monotonic_ylt_plus_inj/
-qed.
-
-(* Forward lemmas on strict order *******************************************)
-
-lemma ylt_inv_monotonic_plus_dx: ∀x,y,z. x + z < y + z → x < y.
-* [2: #y #z >yplus_comm #H elim (ylt_inv_Y1 … H) ]
-#x * // #y * [2: #H elim (ylt_inv_Y1 … H) ]
-/4 width=3 by ylt_inv_inj, ylt_inj, lt_plus_to_lt_l/
-qed-.
-
-lemma ylt_fwd_plus_ge: ∀m1,m2. m2 ≤ m1 → ∀n1,n2. m1 + n1 < m2 + n2 → n1 < n2.
-#m1 #m2 #Hm12 #n1 #n2 #H elim (ylt_fwd_gen … H)
-#x #H0 elim (yplus_inv_inj … H0) -H0
-#y #z #_ #H2 #H3 destruct -x
-elim (yle_inv_inj2 … Hm12)
-#x #_ #H0 destruct
-lapply (monotonic_ylt_plus … H … Hm12) -H -Hm12
-/2 width=2 by ylt_inv_monotonic_plus_dx/
-qed-.
-
-(* Properties on predeccessor ***********************************************)
-
-lemma yplus_pred1: ∀x,y:ynat. 0 < x → ↓x + y = ↓(x+y).
-#x * // #y elim y -y // #y #IH #Hx
->yplus_S2 >yplus_S2 >IH -IH // >ylt_inv_O1
-/2 width=1 by ylt_plus_dx1_trans/
-qed-.
-
-lemma yplus_pred2: ∀x,y:ynat. 0 < y → x + ↓y = ↓(x+y).
-/2 width=1 by yplus_pred1/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/ynat/ynat.ma".
-
-(* NATURAL NUMBERS WITH INFINITY ********************************************)
-
-(* the predecessor function *)
-definition ypred: ynat → ynat ≝ λm. match m with
-[ yinj m ⇒ ↓m
-| Y ⇒ Y
-].
-
-interpretation "ynat predecessor" 'DownArrow m = (ypred m).
-
-lemma ypred_O: ↓(yinj 0) = yinj 0.
-// qed.
-
-lemma ypred_S: ∀m:nat. ↓(↑m) = yinj m.
-// qed.
-
-lemma ypred_Y: (↓∞) = ∞.
-// qed.
-
-(* Inversion lemmas *********************************************************)
-
-lemma ypred_inv_refl: ∀m:ynat. ↓m = m → m = 0 ∨ m = ∞.
-* // #m #H lapply (yinj_inj … H) -H (**) (* destruct lemma needed *)
-/4 width=1 by pred_inv_fix_sn, or_introl, eq_f/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground_2/ynat/ynat_pred.ma".
-
-(* NATURAL NUMBERS WITH INFINITY ********************************************)
-
-(* the successor function *)
-definition ysucc: ynat → ynat ≝ λm. match m with
-[ yinj m ⇒ ↑m
-| Y ⇒ Y
-].
-
-interpretation "ynat successor" 'UpArrow m = (ysucc m).
-
-lemma ysucc_inj: ∀m:nat. ↑(yinj m) = yinj (↑m).
-// qed.
-
-lemma ysucc_Y: ↑(∞) = ∞.
-// qed.
-
-(* Properties ***************************************************************)
-
-lemma ypred_succ: ∀m. ↓↑m = m.
-* // qed.
-
-lemma ynat_cases: ∀n:ynat. n = 0 ∨ ∃m:ynat. n = ↑m.
-*
-[ * /2 width=1 by or_introl/
- #n @or_intror @(ex_intro … n) // (**) (* explicit constructor *)
-| @or_intror @(ex_intro … (∞)) // (**) (* explicit constructor *)
-]
-qed-.
-
-lemma ysucc_iter_Y: ∀m. ysucc^m (∞) = ∞.
-#m elim m -m //
-#m #IHm whd in ⊢ (??%?); >IHm //
-qed.
-
-(* Inversion lemmas *********************************************************)
-
-lemma ysucc_inv_inj: ∀m,n. ↑m = ↑n → m = n.
-#m #n #H <(ypred_succ m) <(ypred_succ n) //
-qed-.
-
-lemma ysucc_inv_refl: ∀m. ↑m = m → m = ∞.
-* //
-#m #H lapply (yinj_inj … H) -H (**) (* destruct lemma needed *)
-#H elim (lt_refl_false m) //
-qed-.
-
-lemma ysucc_inv_inj_sn: ∀m2,n1. yinj m2 = ↑n1 →
- ∃∃m1. n1 = yinj m1 & m2 = S m1.
-#m2 * normalize
-[ #n1 #H destruct /2 width=3 by ex2_intro/
-| #H destruct
-]
-qed-.
-
-lemma ysucc_inv_inj_dx: ∀m2,n1. ↑n1 = yinj m2 →
- ∃∃m1. n1 = yinj m1 & m2 = S m1.
-/2 width=1 by ysucc_inv_inj_sn/ qed-.
-
-lemma ysucc_inv_Y_sn: ∀m. ∞ = ↑m → m = ∞.
-* // normalize
-#m #H destruct
-qed-.
-
-lemma ysucc_inv_Y_dx: ∀m. ↑m = ∞ → m = ∞.
-/2 width=1 by ysucc_inv_Y_sn/ qed-.
-
-lemma ysucc_inv_O_sn: ∀m. yinj 0 = ↑m → ⊥. (**) (* explicit coercion *)
-#m #H elim (ysucc_inv_inj_sn … H) -H
-#n #_ #H destruct
-qed-.
-
-lemma ysucc_inv_O_dx: ∀m:ynat. ↑m = 0 → ⊥.
-/2 width=2 by ysucc_inv_O_sn/ qed-.
-
-(* Eliminators **************************************************************)
-
-lemma ynat_ind: ∀R:predicate ynat.
- R 0 → (∀n:nat. R n → R (↑n)) → R (∞) →
- ∀x. R x.
-#R #H1 #H2 #H3 * // #n elim n -n /2 width=1 by/
-qed-.
(* *)
(**************************************************************************)
-include "ground_2/lib/star.ma".
+include "ground/lib/star.ma".
include "static_2/notation/relations/relationstar_4.ma".
include "static_2/static/rex.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_1_2.ma".
-include "ground_2/xoa/ex_4_3.ma".
-include "ground_2/relocation/rtmap_coafter.ma".
+include "ground/xoa/ex_1_2.ma".
+include "ground/xoa/ex_4_3.ma".
+include "ground/relocation/rtmap_coafter.ma".
include "static_2/notation/relations/rdropstar_4.ma".
include "static_2/notation/relations/rdrop_3.ma".
include "static_2/relocation/seq.ma".
(* *)
(**************************************************************************)
-include "ground_2/lib/star.ma".
+include "ground/lib/star.ma".
include "static_2/relocation/seq_seq.ma".
(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************)
(* *)
(**************************************************************************)
-include "ground_2/lib/ltc.ma".
+include "ground/lib/ltc.ma".
include "static_2/relocation/seq_seq.ma".
(* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************)
(* *)
(**************************************************************************)
-include "ground_2/pull/pull_4.ma".
-include "ground_2/relocation/rtmap_uni.ma".
+include "ground/pull/pull_4.ma".
+include "ground/relocation/rtmap_uni.ma".
include "static_2/notation/relations/relation_3.ma".
include "static_2/syntax/cext2.ma".
include "static_2/relocation/sex.ma".
(* *)
(**************************************************************************)
-include "ground_2/relocation/nstream_after.ma".
+include "ground/relocation/nstream_after.ma".
include "static_2/notation/relations/rliftstar_3.ma".
include "static_2/notation/relations/rlift_3.ma".
include "static_2/syntax/term.ma".
(* *)
(**************************************************************************)
-include "ground_2/relocation/rtmap_basic_after.ma".
+include "ground/relocation/rtmap_basic_after.ma".
include "static_2/notation/relations/rlift_4.ma".
include "static_2/relocation/lifts.ma".
(* *)
(**************************************************************************)
-include "ground_2/relocation/rtmap_sle.ma".
-include "ground_2/relocation/rtmap_sdj.ma".
+include "ground/relocation/rtmap_sle.ma".
+include "ground/relocation/rtmap_sdj.ma".
include "static_2/notation/relations/relation_5.ma".
include "static_2/syntax/lenv.ma".
(* *)
(**************************************************************************)
-include "ground_2/relocation/rtmap_sand.ma".
+include "ground/relocation/rtmap_sand.ma".
include "static_2/relocation/drops.ma".
(* GENERIC ENTRYWISE EXTENSION OF CONTEXT-SENSITIVE REALTIONS FOR TERMS *****)
(* *)
(**************************************************************************)
-include "ground_2/lib/star.ma".
+include "ground/lib/star.ma".
include "static_2/relocation/sex.ma".
(* GENERIC ENTRYWISE EXTENSION OF CONTEXT-SENSITIVE REALTIONS FOR TERMS *****)
(* *)
(**************************************************************************)
-include "ground_2/lib/star.ma".
+include "ground/lib/star.ma".
include "static_2/notation/relations/suptermplus_6.ma".
include "static_2/notation/relations/suptermplus_7.ma".
include "static_2/s_transition/fqu.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_2_3.ma".
-include "ground_2/xoa/ex_3_3.ma".
-include "ground_2/xoa/or_5.ma".
-include "ground_2/lib/star.ma".
+include "ground/xoa/ex_2_3.ma".
+include "ground/xoa/ex_3_3.ma".
+include "ground/xoa/or_5.ma".
+include "ground/lib/star.ma".
include "static_2/notation/relations/suptermstar_6.ma".
include "static_2/notation/relations/suptermstar_7.ma".
include "static_2/s_transition/fquq.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/and_4.ma".
-include "ground_2/xoa/ex_4_2.ma".
-include "ground_2/xoa/or_4.ma".
+include "ground/xoa/and_4.ma".
+include "ground/xoa/ex_4_2.ma".
+include "ground/xoa/or_4.ma".
include "static_2/notation/relations/supterm_6.ma".
include "static_2/notation/relations/supterm_7.ma".
include "static_2/syntax/lenv.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_2_3.ma".
-include "ground_2/xoa/ex_3_2.ma".
+include "ground/xoa/ex_2_3.ma".
+include "ground/xoa/ex_3_2.ma".
include "static_2/notation/relations/atomicarity_4.ma".
include "static_2/syntax/aarity.ma".
include "static_2/syntax/lenv.ma".
(* *)
(**************************************************************************)
-include "ground_2/relocation/rtmap_sor.ma".
+include "ground/relocation/rtmap_sor.ma".
include "static_2/notation/relations/freeplus_3.ma".
include "static_2/syntax/lenv.ma".
(* *)
(**************************************************************************)
-include "ground_2/relocation/nstream_coafter.ma".
+include "ground/relocation/nstream_coafter.ma".
include "static_2/relocation/drops_drops.ma".
include "static_2/static/frees_fqup.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_4_4.ma".
-include "ground_2/relocation/rtmap_id.ma".
+include "ground/xoa/ex_4_4.ma".
+include "ground/relocation/rtmap_id.ma".
include "static_2/notation/relations/subseteq_4.ma".
include "static_2/syntax/lveq.ma".
include "static_2/static/frees.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_5_4.ma".
+include "ground/xoa/ex_5_4.ma".
include "static_2/notation/relations/lrsubeqa_3.ma".
include "static_2/static/aaa.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_6_4.ma".
+include "ground/xoa/ex_6_4.ma".
include "static_2/notation/relations/lrsubeqc_4.ma".
include "static_2/static/aaa.ma".
include "static_2/static/gcp_cr.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_3_3.ma".
-include "ground_2/xoa/ex_4_3.ma".
-include "ground_2/xoa/ex_5_5.ma".
-include "ground_2/xoa/ex_5_6.ma".
-include "ground_2/xoa/ex_6_5.ma".
-include "ground_2/xoa/ex_7_6.ma".
+include "ground/xoa/ex_3_3.ma".
+include "ground/xoa/ex_4_3.ma".
+include "ground/xoa/ex_5_5.ma".
+include "ground/xoa/ex_5_6.ma".
+include "ground/xoa/ex_6_5.ma".
+include "ground/xoa/ex_7_6.ma".
include "static_2/notation/relations/lrsubeqf_4.ma".
-include "ground_2/relocation/nstream_sor.ma".
+include "ground/relocation/nstream_sor.ma".
include "static_2/static/frees.ma".
(* RESTRICTED REFINEMENT FOR CONTEXT-SENSITIVE FREE VARIABLES ***************)
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_2_3.ma".
-include "ground_2/xoa/ex_3_2.ma".
-include "ground_2/xoa/ex_3_3.ma".
-include "ground_2/xoa/ex_3_4.ma".
+include "ground/xoa/ex_2_3.ma".
+include "ground/xoa/ex_3_2.ma".
+include "ground/xoa/ex_3_3.ma".
+include "ground/xoa/ex_3_4.ma".
include "static_2/notation/relations/lrsubeqc_2.ma".
include "static_2/syntax/lenv.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_1_2.ma".
-include "ground_2/xoa/ex_3_4.ma".
-include "ground_2/xoa/ex_4_4.ma".
-include "ground_2/xoa/ex_4_5.ma".
-include "ground_2/relocation/rtmap_id.ma".
+include "ground/xoa/ex_1_2.ma".
+include "ground/xoa/ex_3_4.ma".
+include "ground/xoa/ex_4_4.ma".
+include "ground/xoa/ex_4_5.ma".
+include "ground/relocation/rtmap_id.ma".
include "static_2/notation/relations/relation_4.ma".
include "static_2/syntax/cext2.ma".
include "static_2/relocation/sex.ma".
* Initial invocation: - Patience on me to gain peace and perfection! -
*)
-include "ground_2/lib/relations.ma".
+include "ground/lib/relations.ma".
include "static_2/notation/functions/item0_0.ma".
include "static_2/notation/functions/snitem2_2.ma".
(* *)
(**************************************************************************)
-include "ground_2/lib/arith.ma".
+include "ground/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".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_1_2.ma".
+include "ground/xoa/ex_1_2.ma".
include "static_2/notation/functions/snitem_2.ma".
include "static_2/notation/functions/snbind1_2.ma".
include "static_2/notation/functions/snbind2_3.ma".
(* *)
(**************************************************************************)
-include "ground_2/lib/star.ma".
+include "ground/lib/star.ma".
include "static_2/syntax/ext2.ma".
(* EXTENSION TO BINDERS OF A RELATION FOR TERMS *****************************)
(* *)
(**************************************************************************)
-include "ground_2/lib/bool.ma".
-include "ground_2/lib/arith.ma".
+include "ground/lib/bool.ma".
+include "ground/lib/arith.ma".
(* ITEMS ********************************************************************)
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_3_4.ma".
-include "ground_2/xoa/ex_4_1.ma".
+include "ground/xoa/ex_3_4.ma".
+include "ground/xoa/ex_4_1.ma".
include "static_2/notation/relations/voidstareq_4.ma".
include "static_2/syntax/lenv.ma".
(* *)
(**************************************************************************)
-include "ground_2/lib/arith.ma".
+include "ground/lib/arith.ma".
include "static_2/notation/functions/upspoon_2.ma".
(* SORT HIERARCHY ***********************************************************)
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_1_2.ma".
+include "ground/xoa/ex_1_2.ma".
include "static_2/notation/relations/topiso_2.ma".
include "static_2/syntax/term.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_3_2.ma".
+include "ground/xoa/ex_3_2.ma".
include "static_2/notation/relations/stareq_2.ma".
include "static_2/syntax/term.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_1_3.ma".
+include "ground/xoa/ex_1_3.ma".
include "static_2/notation/functions/item0_1.ma".
include "static_2/notation/functions/snitem2_3.ma".
include "static_2/notation/functions/snbind2_4.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_1_4.ma".
+include "ground/xoa/ex_1_4.ma".
include "static_2/notation/relations/simple_1.ma".
include "static_2/syntax/term.ma".
(* *)
(**************************************************************************)
-include "ground_2/lib/list.ma".
+include "ground/lib/list.ma".
include "static_2/notation/functions/snapplvector_2.ma".
include "static_2/syntax/term_simple.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_1_2.ma".
-include "ground_2/xoa/ex_3_2.ma".
+include "ground/xoa/ex_1_2.ma".
+include "ground/xoa/ex_3_2.ma".
include "static_2/notation/relations/approxeq_2.ma".
include "static_2/syntax/term_weight.ma".