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_2/xoa/ex_3_2.ma".
16 include "ground_2/steps/rtc_plus.ma".
17 include "ground_2/steps/rtc_isrt.ma".
19 (* RT-TRANSITION COUNTER ****************************************************)
21 (* Properties with test for constrained rt-transition counter ***************)
23 lemma isrt_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 isrt_plus_O1: ân,c1,c2. ððâŠ0,c1âŦ â ððâŠn,c2âŦ â ððâŠn,c1+c2âŦ.
29 /2 width=1 by isrt_plus/ qed.
31 lemma isrt_plus_O2: ân,c1,c2. ððâŠn,c1âŦ â ððâŠ0,c2âŦ â ððâŠn,c1+c2âŦ.
32 #n #c1 #c2 #H1 #H2 >(plus_n_O n) /2 width=1 by isrt_plus/
35 lemma isrt_succ: ân,c. ððâŠn,câŦ â ððâŠân,c+ððâŦ.
36 /2 width=1 by isrt_plus/ qed.
38 (* Inversion properties with test for constrained rt-transition counter *****)
40 lemma isrt_inv_plus: ân,c1,c2. ððâŠn,c1 + c2âŦ â
41 âân1,n2. ððâŠn1,c1âŦ & ððâŠn2,c2âŦ & n1 + n2 = n.
42 #n #c1 #c2 * #ri #rs #H
43 elim (plus_inv_dx âĶ H) -H #ri1 #rs1 #ti1 #ts1 #ri2 #rs2 #ti2 #ts2 #_ #_ #H1 #H2 #H3 #H4
44 elim (plus_inv_O3 âĶ H1) -H1 /3 width=5 by ex3_2_intro, ex1_2_intro/
47 lemma isrt_inv_plus_O_dx: ân,c1,c2. ððâŠn,c1 + c2âŦ â ððâŠ0,c2âŦ â ððâŠn,c1âŦ.
49 elim (isrt_inv_plus âĶ H) -H #n1 #n2 #Hn1 #Hn2 #H destruct
50 lapply (isrt_inj âĶ Hn2 H2) -c2 #H destruct //
53 lemma isrt_inv_plus_SO_dx: ân,c1,c2. ððâŠn,c1 + c2âŦ â ððâŠ1,c2âŦ â
54 ââm. ððâŠm,c1âŦ & n = âm.
56 elim (isrt_inv_plus âĶ H) -H #n1 #n2 #Hn1 #Hn2 #H destruct
57 lapply (isrt_inj âĶ Hn2 H2) -c2 #H destruct
58 /2 width=3 by ex2_intro/