--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM 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 properties *********************************************************)
+
+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.
+
+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-.
+
+(* 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_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 forward lemmas *****************************************************)
+
+lemma isfin_fwd_push: āg. š
ā¦gā¦ ā āf. āf = g ā š
ā¦fā¦.
+#g * /3 width=4 by fcla_inv_px, ex_intro/
+qed-.