1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "ground/xoa/ex_3_2.ma".
16 include "ground/counters/rtc_plus.ma".
17 include "ground/counters/rtc_ist.ma".
19 (* T-BOUND RT-TRANSITION COUNTERS *******************************************)
21 (* Constructions with rtc_plus **********************************************)
23 lemma rtc_ist_plus (n1) (n2) (c1) (c2): ðâŠn1,c1âŦ â ðâŠn2,c2âŦ â ðâŠn1+n2,c1+c2âŦ.
24 #n1 #n2 #c1 #c2 #H1 #H2 destruct //
27 lemma rtc_ist_plus_zero_sn (n) (c1) (c2): ðâŠð,c1âŦ â ðâŠn,c2âŦ â ðâŠn,c1+c2âŦ.
28 #n #c1 #c2 #H1 #H2 >(nplus_zero_sn n)
29 /2 width=1 by rtc_ist_plus/
32 lemma rtc_ist_plus_zero_dx (n) (c1) (c2): ðâŠn,c1âŦ â ðâŠð,c2âŦ â ðâŠn,c1+c2âŦ.
33 /2 width=1 by rtc_ist_plus/ qed.
35 lemma rtc_ist_succ (n) (c): ðâŠn,câŦ â ðâŠân,c+ððâŦ.
36 #n #c #H >nplus_one_dx
37 /2 width=1 by rtc_ist_plus/
40 (* Inversions with rtc_plus *************************************************)
42 lemma rtc_ist_inv_plus (n) (c1) (c2): ðâŠn,c1 + c2âŦ â
43 âân1,n2. ðâŠn1,c1âŦ & ðâŠn2,c2âŦ & n1 + n2 = n.
45 elim (rtc_plus_inv_dx âĶ H) -H #ri1 #rs1 #ti1 #ts1 #ri2 #rs2 #ti2 #ts2 #H1 #H2 #H3 #H4 #H5 #H6 destruct
46 elim (eq_inv_nplus_zero âĶ H1) -H1 #H11 #H12 destruct
47 elim (eq_inv_nplus_zero âĶ H2) -H2 #H21 #H22 destruct
48 elim (eq_inv_nplus_zero âĶ H3) -H3 #H31 #H32 destruct
49 /3 width=5 by ex3_2_intro/
52 lemma rtc_ist_inv_plus_zero_dx (n) (c1) (c2): ðâŠn,c1 + c2âŦ â ðâŠð,c2âŦ â ðâŠn,c1âŦ.
54 elim (rtc_ist_inv_plus âĶ H) -H #n1 #n2 #Hn1 #Hn2 #H destruct //
57 lemma rtc_ist_inv_plus_one_dx:
58 ân,c1,c2. ðâŠn,c1 + c2âŦ â ðâŠð,c2âŦ â
59 ââm. ðâŠm,c1âŦ & n = âm.
60 #n #c1 #c2 #H #H2 destruct
61 elim (rtc_ist_inv_plus âĶ H) -H #n1 #n2 #Hn1 #Hn2 #H destruct
62 /2 width=3 by ex2_intro/
65 lemma rtc_ist_inv_plus_zu_dx (n) (c): ðâŠn,c+ððâŦ â âĨ.
67 elim (rtc_ist_inv_plus âĶ H) -H #n1 #n2 #_ #H #_
68 /2 width=2 by rtc_ist_inv_uz/