]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/steps/rtc.ma
56ced165b335d4cbc9d6fd44013efa490fb7c9ad
[helm.git] / matita / matita / contribs / lambdadelta / ground / steps / rtc.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_1_2.ma".
16 include "ground/notation/functions/tuple_4.ma".
17 include "ground/notation/functions/zerozero_0.ma".
18 include "ground/notation/functions/zeroone_0.ma".
19 include "ground/notation/functions/onezero_0.ma".
20 include "ground/lib/arith.ma".
21
22 (* RT-TRANSITION COUNTER ****************************************************)
23
24 record rtc: Type[0] ≝ {
25    ri: nat; (* Note: inner r-steps *)
26    rs: nat; (* Note: spine r-steps *)
27    ti: nat; (* Note: inner t-steps *)
28    ts: nat  (* Note: spine t-steps *)
29 }.
30
31 interpretation "constructor (rtc)"
32    'Tuple ri rs ti ts = (mk_rtc ri rs ti ts).
33
34 interpretation "one structural step (rtc)"
35    'ZeroZero = (mk_rtc O O O O).
36
37 interpretation "one r-step (rtc)"
38    'OneZero = (mk_rtc O (S O) O O).
39
40 interpretation "one t-step (rtc)"
41    'ZeroOne = (mk_rtc O O O (S O)).
42
43 definition eq_f: relation rtc ≝ λc1,c2. ⊤.
44
45 inductive eq_t: relation rtc ≝
46 | eq_t_intro: ∀ri1,ri2,rs1,rs2,ti,ts.
47               eq_t (〈ri1,rs1,ti,ts〉) (〈ri2,rs2,ti,ts〉)
48 .
49
50 (* Basic properties *********************************************************)
51
52 lemma eq_t_refl: reflexive …  eq_t.
53 * // qed.
54
55 (* Basic inversion lemmas ***************************************************)
56
57 fact eq_t_inv_dx_aux: ∀x,y. eq_t x y →
58                       ∀ri1,rs1,ti,ts. x = 〈ri1,rs1,ti,ts〉 →
59                       ∃∃ri2,rs2. y = 〈ri2,rs2,ti,ts〉.
60 #x #y * -x -y
61 #ri1 #ri #rs1 #rs #ti1 #ts1 #ri2 #rs2 #ti2 #ts2 #H destruct -ri2 -rs2
62 /2 width=3 by ex1_2_intro/
63 qed-.
64
65 lemma eq_t_inv_dx: ∀ri1,rs1,ti,ts,y. eq_t (〈ri1,rs1,ti,ts〉) y →
66                    ∃∃ri2,rs2. y = 〈ri2,rs2,ti,ts〉.
67 /2 width=5 by eq_t_inv_dx_aux/ qed-.