]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/static_2/syntax/fold.ma
update in delayed_updating
[helm.git] / matita / matita / contribs / lambdadelta / static_2 / syntax / fold.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 "static_2/syntax/lenv.ma".
16
17 (* FOLD FOR RESTRICTED CLOSURES *********************************************)
18
19 rec definition fold L T on L ≝ match L with
20 [ LAtom     ⇒ T
21 | LBind L I ⇒ match I with
22   [ BUnit _   ⇒ fold L (-ⓛ⋆𝟎.T)
23   | BPair I V ⇒ fold L (-ⓑ[I]V.T)
24   ]
25 ].
26
27 interpretation "fold (restricted closure)" 'plus L T = (fold L T).
28
29 (* Basic properties *********************************************************)
30
31 lemma fold_atom: ∀T. ⋆ + T = T.
32 // qed.
33
34 lemma fold_unit: ∀I,L,T. L.ⓤ[I]+T = L+(-ⓛ⋆𝟎.T).
35 // qed.
36
37 lemma fold_pair: ∀I,L,V,T. (L.ⓑ[I]V)+T = L+(-ⓑ[I]V.T).
38 // qed.