]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/counters/rtc_shift.ma
propagating the arithmetics library, partial commit
[helm.git] / matita / matita / contribs / lambdadelta / ground / counters / rtc_shift.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/xoa/ex_5_4.ma".
16 include "ground/notation/functions/updownarrowstar_1.ma".
17 include "ground/arith/nat_max.ma".
18 include "ground/counters/rtc.ma".
19
20 (* SHIFT FOR RT-TRANSITION COUNTERS *****************************************)
21
22 definition rtc_shift (c:rtc): rtc β‰
23 match c with
24 [ mk_rtc ri rs ti ts β‡’ βŒ©ri βˆ¨ rs, πŸŽ, ti βˆ¨ ts, πŸŽβŒͺ 
25 ].
26
27 interpretation
28   "shift (rtc)"
29   'UpDownArrowStar c = (rtc_shift c).
30
31 (* Basic constructions ******************************************************)
32
33 lemma rtc_shift_rew (ri) (rs) (ti) (ts):
34       βŒ©ri βˆ¨ rs, πŸŽ, ti βˆ¨ ts, πŸŽβŒͺ = β†•*〈ri,rs,ti,tsβŒͺ.
35 //
36 qed.
37
38 lemma rtc_shift_zz: πŸ˜πŸ˜ = β†•*𝟘𝟘.
39 // qed.
40
41 (* Basic inversions *********************************************************)
42
43 lemma rtc_shift_inv_dx (ri) (rs) (ti) (ts) (c):
44       βŒ©ri,rs,ti,tsβŒͺ = β†•*c β†’
45       βˆƒβˆƒri0,rs0,ti0,ts0.
46       (ri0∨rs0) = ri & πŸŽ = rs & (ti0∨ts0) = ti & πŸŽ = ts & βŒ©ri0,rs0,ti0,ts0βŒͺ = c.
47 #ri #rs #ti #ts * #ri0 #rs0 #ti0 #ts0 <rtc_shift_rew #H destruct
48 /2 width=7 by ex5_4_intro/
49 qed-.