]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/counters/rtc_ist.ma
propagating the arithmetics library, partial commit
[helm.git] / matita / matita / contribs / lambdadelta / ground / counters / rtc_ist.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "ground/notation/relations/ist_2.ma".
16 include "ground/counters/rtc.ma".
17
18 (* T-TRANSITION COUNTERS ****************************************************)
19
20 definition rtc_ist: relation2 nat rtc ≝
21            λts,c. 〈𝟎,𝟎,𝟎,ts〉 = c.
22
23 interpretation
24   "t-transition counters (rtc)"
25   'IsT ts c = (rtc_ist ts c).
26
27 (* Basic constructions ******************************************************)
28
29 lemma rtc_ist_zz: 𝐓❪𝟎,𝟘𝟘❫.
30 // qed.
31
32 lemma rtc_ist_zu: 𝐓❪𝟏,𝟘𝟙❫.
33 // qed.
34
35 (* Basic inversions *********************************************************)
36
37 lemma rtc_ist_inv_zz (n): 𝐓❪n,𝟘𝟘❫ → 𝟎 = n.
38 #n #H destruct //
39 qed-.
40
41 lemma rtc_ist_inv_zu (n): 𝐓❪n,𝟘𝟙❫ → ninj (𝟏) = n.
42 #n #H destruct //
43 qed-.
44
45 lemma rtc_ist_inv_uz (n): 𝐓❪n,𝟙𝟘❫ → ⊥.
46 #h #H destruct
47 qed-.
48
49 (* Main inversions **********************************************************)
50
51 theorem rtc_ist_inj (n1) (n2) (c): 𝐓❪n1,c❫ → 𝐓❪n2,c❫ → n1 = n2.
52 #n1 #n2 #c #H1 #H2 destruct //
53 qed-.
54
55 theorem rtc_ist_mono (n) (c1) (c2): 𝐓❪n,c1❫ → 𝐓❪n,c2❫ → c1 = c2.
56 #n #c1 #c2 #H1 #H2 destruct //
57 qed-.