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/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".
22 (* RT-TRANSITION COUNTER ****************************************************)
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 *)
31 interpretation "constructor (rtc)"
32 'Tuple ri rs ti ts = (mk_rtc ri rs ti ts).
34 interpretation "one structural step (rtc)"
35 'ZeroZero = (mk_rtc O O O O).
37 interpretation "one r-step (rtc)"
38 'OneZero = (mk_rtc O (S O) O O).
40 interpretation "one t-step (rtc)"
41 'ZeroOne = (mk_rtc O O O (S O)).
43 definition rtc_eq_f: relation rtc ≝ λc1,c2. ⊤.
45 inductive rtc_eq_t: relation rtc ≝
46 | eq_t_intro: ∀ri1,ri2,rs1,rs2,ti,ts.
47 rtc_eq_t (〈ri1,rs1,ti,ts〉) (〈ri2,rs2,ti,ts〉)
50 (* Basic properties *********************************************************)
52 lemma rtc_eq_t_refl: reflexive … rtc_eq_t.
55 (* Basic inversion lemmas ***************************************************)
57 fact rtc_eq_t_inv_dx_aux:
59 ∀ri1,rs1,ti,ts. x = 〈ri1,rs1,ti,ts〉 →
60 ∃∃ri2,rs2. y = 〈ri2,rs2,ti,ts〉.
62 #ri1 #ri #rs1 #rs #ti1 #ts1 #ri2 #rs2 #ti2 #ts2 #H destruct -ri2 -rs2
63 /2 width=3 by ex1_2_intro/
66 lemma rtc_eq_t_inv_dx:
67 ∀ri1,rs1,ti,ts,y. rtc_eq_t (〈ri1,rs1,ti,ts〉) y →
68 ∃∃ri2,rs2. y = 〈ri2,rs2,ti,ts〉.
69 /2 width=5 by rtc_eq_t_inv_dx_aux/ qed-.