]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambda/terms/pointer_list.ma
c1e710649c58c1bc64adec1c46ac0eb8a167c457
[helm.git] / matita / matita / contribs / lambda / terms / pointer_list.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 "terms/pointer.ma".
16
17 (* POINTER LIST *************************************************************)
18
19 (* Policy: pointer list metavariables: r, s *)
20 definition ptrl: Type[0] ≝ list ptr.
21
22 (* Note: a "whd" computation contracts just redexes in the whd *)
23 definition is_whd: predicate ptrl ≝ All … in_whd.
24
25 lemma is_whd_dx: ∀s. is_whd s → is_whd (dx:::s).
26 #s elim s -s //
27 #p #s #IHs * /3 width=1/ 
28 qed.
29
30 lemma is_whd_append: ∀r. is_whd r → ∀s. is_whd s → is_whd (r@s).
31 #r elim r -r //
32 #q #r #IHr * /3 width=1/
33 qed.
34
35 definition ho_compatible_rc: predicate (ptrl→relation term) ≝ λR.
36                              ∀s,A1,A2. R s A1 A2 → R (rc:::s) (𝛌.A1) (𝛌.A2).
37
38 definition ho_compatible_sn: predicate (ptrl→relation term) ≝ λR.
39                              ∀s,B1,B2,A. R s B1 B2 → R (sn:::s) (@B1.A) (@B2.A).
40
41 definition ho_compatible_dx: predicate (ptrl→relation term) ≝ λR.
42                              ∀s,B,A1,A2. R s A1 A2 → R (dx:::s) (@B.A1) (@B.A2).
43
44 lemma lstar_compatible_rc: ∀R. compatible_rc R → ho_compatible_rc (lstar … R).
45 #R #HR #s #A1 #A2 #H @(lstar_ind_l ????????? H) -s -A1 // /3 width=3/
46 qed.
47
48 lemma lstar_compatible_sn: ∀R. compatible_sn R → ho_compatible_sn (lstar … R).
49 #R #HR #s #B1 #B2 #A #H @(lstar_ind_l ????????? H) -s -B1 // /3 width=3/
50 qed.
51
52 lemma lstar_compatible_dx: ∀R. compatible_dx R → ho_compatible_dx (lstar … R).
53 #R #HR #s #B #A1 #A2 #H @(lstar_ind_l ????????? H) -s -A1 // /3 width=3/
54 qed.