]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/ground/counters/rtc_ist_plus.ma
propagating the arithmetics library, partial commit
[helm.git] / matita / matita / contribs / lambdadelta / ground / counters / rtc_ist_plus.ma
diff --git a/matita/matita/contribs/lambdadelta/ground/counters/rtc_ist_plus.ma b/matita/matita/contribs/lambdadelta/ground/counters/rtc_ist_plus.ma
new file mode 100644 (file)
index 0000000..08bb3b7
--- /dev/null
@@ -0,0 +1,69 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "ground/xoa/ex_3_2.ma".
+include "ground/counters/rtc_plus.ma".
+include "ground/counters/rtc_ist.ma".
+
+(* T-BOUND RT-TRANSITION COUNTERS *******************************************)
+
+(* Constructions with rtc_plus **********************************************)
+
+lemma rtc_ist_plus (n1) (n2) (c1) (c2): ð“❊n1,c1âŦ â†’ ð“❊n2,c2âŦ â†’ ð“❊n1+n2,c1+c2âŦ.
+#n1 #n2 #c1 #c2 #H1 #H2 destruct //
+qed.
+
+lemma rtc_ist_plus_zero_sn (n) (c1) (c2): ð“❊𝟎,c1âŦ â†’ ð“❊n,c2âŦ â†’ ð“❊n,c1+c2âŦ.
+#n #c1 #c2 #H1 #H2 >(nplus_zero_sn n)
+/2 width=1 by rtc_ist_plus/
+qed.
+
+lemma rtc_ist_plus_zero_dx (n) (c1) (c2): ð“❊n,c1âŦ â†’ ð“❊𝟎,c2âŦ â†’ ð“❊n,c1+c2âŦ.
+/2 width=1 by rtc_ist_plus/ qed.
+
+lemma rtc_ist_succ (n) (c): ð“❊n,câŦ â†’ ð“❊↑n,c+𝟘𝟙âŦ.
+#n #c #H >nplus_one_dx
+/2 width=1 by rtc_ist_plus/
+qed.
+
+(* Inversions with rtc_plus *************************************************)
+
+lemma rtc_ist_inv_plus (n) (c1) (c2): ð“❊n,c1 + c2âŦ â†’
+      âˆƒâˆƒn1,n2. ð“❊n1,c1âŦ & ð“❊n2,c2âŦ & n1 + n2 = n.
+#n #c1 #c2 #H
+elim (rtc_plus_inv_dx â€Ķ H) -H #ri1 #rs1 #ti1 #ts1 #ri2 #rs2 #ti2 #ts2 #H1 #H2 #H3 #H4 #H5 #H6 destruct
+elim (eq_inv_nplus_zero â€Ķ H1) -H1 #H11 #H12 destruct
+elim (eq_inv_nplus_zero â€Ķ H2) -H2 #H21 #H22 destruct
+elim (eq_inv_nplus_zero â€Ķ H3) -H3 #H31 #H32 destruct
+/3 width=5 by ex3_2_intro/
+qed-.
+
+lemma rtc_ist_inv_plus_zero_dx (n) (c1) (c2): ð“❊n,c1 + c2âŦ â†’ ð“❊𝟎,c2âŦ â†’ ð“❊n,c1âŦ.
+#n #c1 #c2 #H #H2
+elim (rtc_ist_inv_plus â€Ķ H) -H #n1 #n2 #Hn1 #Hn2 #H destruct //
+qed-.
+
+lemma rtc_ist_inv_plus_one_dx:
+      âˆ€n,c1,c2. ð“❊n,c1 + c2âŦ â†’ ð“❊𝟏,c2âŦ â†’
+      âˆƒâˆƒm. ð“❊m,c1âŦ & n = â†‘m.
+#n #c1 #c2 #H #H2 destruct
+elim (rtc_ist_inv_plus â€Ķ H) -H #n1 #n2 #Hn1 #Hn2 #H destruct
+/2 width=3 by ex2_intro/
+qed-.
+
+lemma rtc_ist_inv_plus_zu_dx (n) (c): ð“❊n,c+𝟙𝟘âŦ â†’ âŠĨ.
+#n #c #H
+elim (rtc_ist_inv_plus â€Ķ H) -H #n1 #n2 #_ #H #_
+/2 width=2 by rtc_ist_inv_uz/
+qed-.