]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc/unfold/unfold.etc
update in delayed_updating
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc / unfold / unfold.etc
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 "basic_2/notation/relations/unfold_4.ma".
16 include "basic_2/grammar/lenv_append.ma".
17 include "basic_2/grammar/genv.ma".
18 include "basic_2/substitution/drop.ma".
19
20 (* CONTEXT-SENSITIVE UNFOLD FOR TERMS ***************************************)
21
22 (* activate genv *)
23 inductive unfold: relation4 genv lenv term lenv ≝
24 | unfold_sort: ∀G,L,s. unfold G L (⋆s) L
25 | unfold_lref: ∀I,G,L1,L2,K1,K2,V,i. ⬇[i] L1 ≡ K1. ⓑ{I}V →
26                unfold G K1 V K2 → ⬇[Ⓣ, |L2|, i] L2 ≡ K2 →
27                unfold G L1 (#i) (L1@@L2)
28 | unfold_bind: ∀a,I,G,L1,L2,V,T.
29                unfold G (L1.ⓑ{I}V) T L2 → unfold G L1 (ⓑ{a,I}V.T) L2
30 | unfold_flat: ∀I,G,L1,L2,V,T.
31                unfold G L1 T L2 → unfold G L1 (ⓕ{I}V.T) L2
32 .
33
34 interpretation "context-sensitive unfold (term)"
35    'Unfold G L1 T L2 = (unfold G L1 T L2).