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/notation/relations/predicate_m_2.ma".
16 include "ground/counters/rtc.ma".
18 (* T-BOUND RT-TRANSITION COUNTERS *******************************************)
20 definition rtc_ism: relation2 nat rtc ≝ λts,c.
21 ∃∃ri,rs. 〈ri,rs,𝟎,ts〉 = c.
24 "construction (t-bound rt-transition counters)"
25 'PredicateM ts c = (rtc_ism ts c).
27 (* Basic constructions ******************************************************)
29 lemma rtc_ism_zz: 𝐌❨𝟎,𝟘𝟘❩.
30 /2 width=3 by ex1_2_intro/ qed.
32 lemma rtc_ism_zu: 𝐌❨𝟎,𝟙𝟘❩.
33 /2 width=3 by ex1_2_intro/ qed.
35 lemma rtc_ism_uz: 𝐌❨𝟏,𝟘𝟙❩.
36 /2 width=3 by ex1_2_intro/ qed.
38 lemma rtc_ism_eq_t_trans (n) (c1) (c2): 𝐌❨n,c1❩ → rtc_eq_t c1 c2 → 𝐌❨n,c2❩.
39 #n #c1 #c2 * #ri1 #rs1 #H destruct
40 #H elim (rtc_eq_t_inv_dx … H) -H /2 width=3 by ex1_2_intro/
43 (* Basic destructions *******************************************************)
45 lemma rtc_ism_des_zz (n): 𝐌❨n,𝟘𝟘❩ → 𝟎 = n.
46 #n * #ri #rs #H destruct //
49 lemma rtc_ism_des_uz (n): 𝐌❨n,𝟙𝟘❩ → 𝟎 = n.
50 #n * #ri #rs #H destruct //
53 lemma rtc_ism_des_01 (n): 𝐌❨n,𝟘𝟙❩ → ninj (𝟏) = n.
54 #n * #ri #rs #H destruct //
57 (* Main inversions **********************************************************)
59 theorem rtc_ism_inj (n1) (n2) (c): 𝐌❨n1,c❩ → 𝐌❨n2,c❩ → n1 = n2.
60 #n1 #n2 #c * #ri1 #rs1 #H1 * #ri2 #rs2 #H2 destruct //
63 theorem rtc_ism_mono (n) (c1) (c2): 𝐌❨n,c1❩ → 𝐌❨n,c2❩ → rtc_eq_t c1 c2.
64 #n #c1 #c2 * #ri1 #rs1 #H1 * #ri2 #rs2 #H2 destruct //