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_ism.ma".
19 (* T-BOUND RT-TRANSITION COUNTERS *******************************************)
21 (* Constructions with rtc_plus **********************************************)
23 lemma rtc_ism_plus (n1) (n2) (c1) (c2): šāØn1,c1ā© ā šāØn2,c2ā© ā šāØn1+n2,c1+c2ā©.
24 #n1 #n2 #c1 #c2 * #ri1 #rs1 #H1 * #ri2 #rs2 #H2 destruct
25 /2 width=3 by ex1_2_intro/
28 lemma rtc_ism_plus_zero_sn (n) (c1) (c2): šāØš,c1ā© ā šāØn,c2ā© ā šāØn,c1+c2ā©.
29 #n #c1 #c2 #H1 #H2 >(nplus_zero_sn n) /2 width=1 by rtc_ism_plus/
32 lemma rtc_ism_plus_zero_dx (n) (c1) (c2): šāØn,c1ā© ā šāØš,c2ā© ā šāØn,c1+c2ā©.
33 /2 width=1 by rtc_ism_plus/ qed.
35 lemma rtc_ism_succ (n) (c): šāØn,cā© ā šāØān,c+ššā©.
36 #n #c #H >nplus_unit_dx
37 /2 width=1 by rtc_ism_plus/
40 (* Inversions with rtc_plus *************************************************)
42 lemma rtc_ism_inv_plus (n) (c1) (c2): šāØn,c1 + c2ā© ā
43 āān1,n2. šāØn1,c1ā© & šāØn2,c2ā© & n1 + n2 = n.
44 #n #c1 #c2 * #ri #rs #H
45 elim (rtc_plus_inv_dx ā¦ H) -H #ri1 #rs1 #ti1 #ts1 #ri2 #rs2 #ti2 #ts2 #_ #_ #H1 #H2 #H3 #H4
46 elim (eq_inv_nplus_zero ā¦ H1) -H1 /3 width=5 by ex3_2_intro, ex1_2_intro/
49 lemma rtc_ism_inv_plus_zero_dx (n) (c1) (c2): šāØn,c1 + c2ā© ā šāØš,c2ā© ā šāØn,c1ā©.
51 elim (rtc_ism_inv_plus ā¦ H) -H #n1 #n2 #Hn1 #Hn2 #H destruct
52 lapply (rtc_ism_inj ā¦ Hn2 H2) -c2 #H destruct //
55 lemma rtc_ism_inv_plus_unit_dx (n) (c1) (c2): šāØn,c1 + c2ā© ā šāØš,c2ā© ā
56 āām. šāØm,c1ā© & n = ām.
58 elim (rtc_ism_inv_plus ā¦ H) -H #n1 #n2 #Hn1 #Hn2 #H destruct
59 lapply (rtc_ism_inj ā¦ Hn2 H2) -c2 #H destruct
60 /2 width=3 by ex2_intro/