]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/ground/relocation/rtmap_isuni.ma
ground_2 released and permanently renamed as ground
[helm.git] / matita / matita / contribs / lambdadelta / ground / relocation / rtmap_isuni.ma
diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/rtmap_isuni.ma b/matita/matita/contribs/lambdadelta/ground/relocation/rtmap_isuni.ma
new file mode 100644 (file)
index 0000000..0607f83
--- /dev/null
@@ -0,0 +1,56 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "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-.