]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/ground/relocation/rtmap_tls.ma
propagating the arithmetics library, partial commit
[helm.git] / matita / matita / contribs / lambdadelta / ground / relocation / rtmap_tls.ma
index d4cb4d21644a23794e4f7251fd7ff4963f39ea35..e6aea52db0cc50c753bccc5e29162c05b9a9dce3 100644 (file)
@@ -18,32 +18,35 @@ 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) ].
+definition tls (f:rtmap) (n:nat) ≝ tl^n f.
 
 interpretation "tls (rtmap)" 'DropPreds n f = (tls f n).
 
 (* Basic properties *********************************************************)
 
-lemma tls_O: ∀f. f = ⫱*[0] f.
+lemma tls_O: ∀f. f = ⫱*[𝟎] f.
 // qed.
 
 lemma tls_S: ∀f,n. ⫱ ⫱*[n] f = ⫱*[↑n] f.
-// qed.
+#f #n @(niter_succ … tl)
+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/
+#n @(nat_ind_succ … 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 //
+lemma tls_swap (n) (f): ⫱ ⫱*[n] f = ⫱*[n] ⫱f.
+#f #n @(niter_appl … tl)
 qed.
 
+lemma tls_xn: ∀n,f. ⫱*[n] ⫱f = ⫱*[↑n] f.
+// qed.
+
 (* Properties with pushs ****************************************************)
 
 lemma tls_pushs: ∀n,f. f = ⫱*[n] ⫯*[n] f.
-#n elim n -n //
-#n #IH #f <tls_xn //
+#n @(nat_ind_succ … n) -n //
+#n #IH #f <tls_xn <pushs_S <tl_push_rew //
 qed.